@ovotech/element-native 3.3.2 → 3.4.0-canary-d9e3d0a-143

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 (257) hide show
  1. package/dist/components/Accordion/Accordion.js +5 -5
  2. package/dist/components/Accordion/styles.d.ts +4 -3
  3. package/dist/components/Accordion/styles.js +2 -2
  4. package/dist/components/ActionCard/ActionCard.d.ts +19 -0
  5. package/dist/components/ActionCard/ActionCard.js +115 -0
  6. package/dist/components/ActionCard/CloseIconShape.d.ts +3 -0
  7. package/dist/components/ActionCard/CloseIconShape.js +52 -0
  8. package/dist/components/ActionCard/IndicatorIconShape.d.ts +3 -0
  9. package/dist/components/ActionCard/IndicatorIconShape.js +52 -0
  10. package/dist/components/ActionCard/index.d.ts +1 -0
  11. package/dist/components/ActionCard/index.js +5 -0
  12. package/dist/components/ActionList/styled.d.ts +5 -5
  13. package/dist/components/Badge/Badge.d.ts +1 -1
  14. package/dist/components/Card/Card.d.ts +1 -1
  15. package/dist/components/{TextField → CurrencyField}/CurrencyField.js +1 -1
  16. package/dist/components/CurrencyField/index.d.ts +1 -0
  17. package/dist/components/CurrencyField/index.js +5 -0
  18. package/dist/components/{Input → CurrencyInput}/CurrencyInput.d.ts +1 -1
  19. package/dist/components/{Input → CurrencyInput}/CurrencyInput.js +1 -1
  20. package/dist/components/CurrencyInput/index.d.ts +1 -0
  21. package/dist/components/CurrencyInput/index.js +5 -0
  22. package/dist/components/DataTable/styles.d.ts +11 -11
  23. package/dist/components/DateField/DateField.js +2 -2
  24. package/dist/components/DescriptionList/styled.d.ts +1 -1
  25. package/dist/components/{SkeletonLoading/Skeleton.d.ts → Em/Em.d.ts} +2 -2
  26. package/dist/components/Em/Em.js +13 -0
  27. package/dist/components/Em/index.d.ts +1 -0
  28. package/dist/components/Em/index.js +5 -0
  29. package/dist/components/{TextField → EmailField}/EmailField.js +1 -1
  30. package/dist/components/EmailField/index.d.ts +1 -0
  31. package/dist/components/EmailField/index.js +5 -0
  32. package/dist/components/{Input → EmailInput}/EmailInput.js +1 -1
  33. package/dist/components/EmailInput/index.d.ts +1 -0
  34. package/dist/components/EmailInput/index.js +5 -0
  35. package/dist/components/ErrorText/ErrorText.d.ts +1 -1
  36. package/dist/components/Grid/Col.d.ts +1 -1
  37. package/dist/components/Grid/Row.d.ts +1 -1
  38. package/dist/components/Heading1/Heading1.d.ts +3 -0
  39. package/dist/components/{Heading/Heading.js → Heading1/Heading1.js} +2 -35
  40. package/dist/components/Heading1/index.d.ts +1 -0
  41. package/dist/components/Heading1/index.js +5 -0
  42. package/dist/components/Heading2/Heading2.d.ts +3 -0
  43. package/dist/components/Heading2/Heading2.js +71 -0
  44. package/dist/components/Heading2/index.d.ts +1 -0
  45. package/dist/components/Heading2/index.js +5 -0
  46. package/dist/components/Heading3/Heading3.d.ts +3 -0
  47. package/dist/components/Heading3/Heading3.js +71 -0
  48. package/dist/components/Heading3/index.d.ts +1 -0
  49. package/dist/components/Heading3/index.js +5 -0
  50. package/dist/components/Heading4/Heading4.d.ts +3 -0
  51. package/dist/components/Heading4/Heading4.js +71 -0
  52. package/dist/components/Heading4/index.d.ts +1 -0
  53. package/dist/components/Heading4/index.js +5 -0
  54. package/dist/components/HintText/HintText.d.ts +1 -1
  55. package/dist/components/LabelText/LabelText.d.ts +1 -1
  56. package/dist/components/LineThrough/LineThrough.d.ts +228 -0
  57. package/dist/components/{SkeletonLoading/Skeleton.js → LineThrough/LineThrough.js} +2 -2
  58. package/dist/components/LineThrough/index.d.ts +1 -0
  59. package/dist/components/LineThrough/index.js +5 -0
  60. package/dist/components/List/List.d.ts +4 -240
  61. package/dist/components/List/List.js +44 -91
  62. package/dist/components/{Text/Text.d.ts → List/styled.d.ts} +658 -442
  63. package/dist/components/List/styled.js +70 -0
  64. package/dist/components/Margin/Margin.d.ts +1 -1
  65. package/dist/components/NavHeader/IconButton.d.ts +13 -0
  66. package/dist/components/NavHeader/IconButton.js +31 -0
  67. package/dist/components/NavHeader/NavHeader.d.ts +7 -14
  68. package/dist/components/NavHeader/NavHeader.js +39 -48
  69. package/dist/components/NavHeader/NavHeader.styles.d.ts +1833 -0
  70. package/dist/components/NavHeader/NavHeader.styles.js +72 -0
  71. package/dist/components/NavHeader/index.d.ts +1 -1
  72. package/dist/components/Notification/Notification.d.ts +2 -2
  73. package/dist/components/{TextField → NumberField}/NumberField.js +1 -1
  74. package/dist/components/NumberField/index.d.ts +1 -0
  75. package/dist/components/NumberField/index.js +5 -0
  76. package/dist/components/{Input → NumberInput}/NumberInput.js +1 -1
  77. package/dist/components/NumberInput/index.d.ts +1 -0
  78. package/dist/components/NumberInput/index.js +5 -0
  79. package/dist/components/P/P.d.ts +239 -0
  80. package/dist/components/P/P.js +38 -0
  81. package/dist/components/P/index.d.ts +1 -0
  82. package/dist/components/P/index.js +5 -0
  83. package/dist/components/{TextField → PasswordField}/PasswordField.js +1 -1
  84. package/dist/components/PasswordField/index.d.ts +1 -0
  85. package/dist/components/PasswordField/index.js +5 -0
  86. package/dist/components/{Input → PasswordInput}/PasswordInput.js +1 -1
  87. package/dist/components/{Input → PasswordInput}/PasswordInput.styled.d.ts +1 -1
  88. package/dist/components/PasswordInput/index.d.ts +1 -0
  89. package/dist/components/PasswordInput/index.js +5 -0
  90. package/dist/components/{TextField → PhoneField}/PhoneField.js +1 -1
  91. package/dist/components/PhoneField/index.d.ts +1 -0
  92. package/dist/components/PhoneField/index.js +5 -0
  93. package/dist/components/{Input → PhoneInput}/PhoneInput.d.ts +1 -2
  94. package/dist/components/{Input → PhoneInput}/PhoneInput.js +2 -3
  95. package/dist/components/PhoneInput/index.d.ts +1 -0
  96. package/dist/components/PhoneInput/index.js +5 -0
  97. package/dist/components/SelectField/Select.d.ts +1 -1
  98. package/dist/components/SelectField/Select.js +5 -4
  99. package/dist/components/SkeletonAnimation/index.d.ts +1 -0
  100. package/dist/components/SkeletonAnimation/index.js +5 -0
  101. package/dist/components/{SkeletonLoading → SkeletonCTA}/SkeletonCTA.js +4 -5
  102. package/dist/components/SkeletonCTA/index.d.ts +1 -0
  103. package/dist/components/SkeletonCTA/index.js +5 -0
  104. package/dist/components/{SkeletonLoading → SkeletonCircle}/SkeletonCircle.js +3 -4
  105. package/dist/components/SkeletonCircle/index.d.ts +1 -0
  106. package/dist/components/SkeletonCircle/index.js +5 -0
  107. package/dist/components/{SkeletonLoading → SkeletonHeading}/SkeletonHeading.js +4 -5
  108. package/dist/components/SkeletonHeading/index.d.ts +1 -0
  109. package/dist/components/SkeletonHeading/index.js +5 -0
  110. package/dist/components/{SkeletonLoading → SkeletonText}/SkeletonText.js +4 -5
  111. package/dist/components/SkeletonText/index.d.ts +1 -0
  112. package/dist/components/SkeletonText/index.js +5 -0
  113. package/dist/components/Small/Small.d.ts +239 -0
  114. package/dist/components/Small/Small.js +38 -0
  115. package/dist/components/Small/index.d.ts +1 -0
  116. package/dist/components/Small/index.js +5 -0
  117. package/dist/components/Strong/Strong.d.ts +228 -0
  118. package/dist/components/Strong/Strong.js +11 -0
  119. package/dist/components/Strong/index.d.ts +1 -0
  120. package/dist/components/Strong/index.js +5 -0
  121. package/dist/components/SubLabelText/SubLabelText.d.ts +1 -1
  122. package/dist/components/TextField/TextField.js +1 -1
  123. package/dist/components/TextField/index.d.ts +0 -7
  124. package/dist/components/TextField/index.js +1 -15
  125. package/dist/components/TextGroup/TextGroup.d.ts +3 -0
  126. package/dist/components/TextGroup/TextGroup.js +47 -0
  127. package/dist/components/TextGroup/index.d.ts +1 -0
  128. package/dist/components/TextGroup/index.js +5 -0
  129. package/dist/components/{Input → TextInput}/TextInput.js +1 -1
  130. package/dist/components/TextInput/index.d.ts +1 -0
  131. package/dist/components/TextInput/index.js +5 -0
  132. package/dist/components/{TextField → TextareaField}/TextareaField.js +1 -1
  133. package/dist/components/TextareaField/index.d.ts +1 -0
  134. package/dist/components/TextareaField/index.js +5 -0
  135. package/dist/components/{Input → TextareaInput}/TextareaInput.d.ts +1 -1
  136. package/dist/components/{Input → TextareaInput}/TextareaInput.js +1 -1
  137. package/dist/components/TextareaInput/index.d.ts +1 -0
  138. package/dist/components/TextareaInput/index.js +5 -0
  139. package/dist/components/index.d.ts +28 -4
  140. package/dist/components/index.js +28 -4
  141. package/dist/esm/components/Accordion/Accordion.js +3 -3
  142. package/dist/esm/components/Accordion/styles.js +2 -2
  143. package/dist/esm/components/ActionCard/ActionCard.js +85 -0
  144. package/dist/esm/components/ActionCard/CloseIconShape.js +22 -0
  145. package/dist/esm/components/ActionCard/IndicatorIconShape.js +22 -0
  146. package/dist/esm/components/ActionCard/index.js +1 -0
  147. package/dist/esm/components/{TextField → CurrencyField}/CurrencyField.js +1 -1
  148. package/dist/esm/components/CurrencyField/index.js +1 -0
  149. package/dist/esm/components/{Input → CurrencyInput}/CurrencyInput.js +1 -1
  150. package/dist/esm/components/CurrencyInput/index.js +1 -0
  151. package/dist/esm/components/DateField/DateField.js +1 -1
  152. package/dist/esm/components/Em/Em.js +7 -0
  153. package/dist/esm/components/Em/index.js +1 -0
  154. package/dist/esm/components/{TextField → EmailField}/EmailField.js +1 -1
  155. package/dist/esm/components/EmailField/index.js +1 -0
  156. package/dist/esm/components/{Input → EmailInput}/EmailInput.js +1 -1
  157. package/dist/esm/components/EmailInput/index.js +1 -0
  158. package/dist/esm/components/Heading1/Heading1.js +44 -0
  159. package/dist/esm/components/Heading1/index.js +1 -0
  160. package/dist/esm/components/Heading2/Heading2.js +44 -0
  161. package/dist/esm/components/Heading2/index.js +1 -0
  162. package/dist/esm/components/Heading3/Heading3.js +44 -0
  163. package/dist/esm/components/Heading3/index.js +1 -0
  164. package/dist/esm/components/Heading4/Heading4.js +44 -0
  165. package/dist/esm/components/Heading4/index.js +1 -0
  166. package/dist/esm/components/{SkeletonLoading/Skeleton.js → LineThrough/LineThrough.js} +1 -1
  167. package/dist/esm/components/LineThrough/index.js +1 -0
  168. package/dist/esm/components/List/List.js +41 -65
  169. package/dist/esm/components/List/styled.js +44 -0
  170. package/dist/esm/components/NavHeader/IconButton.js +27 -0
  171. package/dist/esm/components/NavHeader/NavHeader.js +41 -50
  172. package/dist/esm/components/NavHeader/NavHeader.styles.js +43 -0
  173. package/dist/esm/components/{TextField → NumberField}/NumberField.js +1 -1
  174. package/dist/esm/components/NumberField/index.js +1 -0
  175. package/dist/esm/components/{Input → NumberInput}/NumberInput.js +1 -1
  176. package/dist/esm/components/NumberInput/index.js +1 -0
  177. package/dist/esm/components/P/P.js +12 -0
  178. package/dist/esm/components/P/index.js +1 -0
  179. package/dist/esm/components/{TextField → PasswordField}/PasswordField.js +1 -1
  180. package/dist/esm/components/PasswordField/index.js +1 -0
  181. package/dist/esm/components/{Input → PasswordInput}/PasswordInput.js +1 -1
  182. package/dist/esm/components/PasswordInput/index.js +1 -0
  183. package/dist/esm/components/{TextField → PhoneField}/PhoneField.js +1 -1
  184. package/dist/esm/components/PhoneField/index.js +1 -0
  185. package/dist/esm/components/{Input → PhoneInput}/PhoneInput.js +2 -3
  186. package/dist/esm/components/PhoneInput/index.js +1 -0
  187. package/dist/esm/components/SelectField/Select.js +2 -1
  188. package/dist/esm/components/SkeletonAnimation/index.js +1 -0
  189. package/dist/esm/components/{SkeletonLoading → SkeletonCTA}/SkeletonCTA.js +3 -4
  190. package/dist/esm/components/SkeletonCTA/index.js +1 -0
  191. package/dist/esm/components/{SkeletonLoading → SkeletonCircle}/SkeletonCircle.js +3 -4
  192. package/dist/esm/components/SkeletonCircle/index.js +1 -0
  193. package/dist/esm/components/{SkeletonLoading → SkeletonHeading}/SkeletonHeading.js +3 -4
  194. package/dist/esm/components/SkeletonHeading/index.js +1 -0
  195. package/dist/esm/components/{SkeletonLoading → SkeletonText}/SkeletonText.js +3 -4
  196. package/dist/esm/components/SkeletonText/index.js +1 -0
  197. package/dist/esm/components/Small/Small.js +12 -0
  198. package/dist/esm/components/Small/index.js +1 -0
  199. package/dist/esm/components/Strong/Strong.js +5 -0
  200. package/dist/esm/components/Strong/index.js +1 -0
  201. package/dist/esm/components/TextField/TextField.js +1 -1
  202. package/dist/esm/components/TextField/index.js +0 -7
  203. package/dist/esm/components/TextGroup/TextGroup.js +43 -0
  204. package/dist/esm/components/TextGroup/index.js +1 -0
  205. package/dist/esm/components/{Input → TextInput}/TextInput.js +1 -1
  206. package/dist/esm/components/TextInput/index.js +1 -0
  207. package/dist/esm/components/{TextField → TextareaField}/TextareaField.js +1 -1
  208. package/dist/esm/components/TextareaField/index.js +1 -0
  209. package/dist/esm/components/{Input → TextareaInput}/TextareaInput.js +1 -1
  210. package/dist/esm/components/TextareaInput/index.js +1 -0
  211. package/dist/esm/components/index.js +28 -4
  212. package/dist/styled.native.d.ts +6 -6
  213. package/package.json +5 -3
  214. package/dist/components/Heading/Heading.d.ts +0 -6
  215. package/dist/components/Heading/index.d.ts +0 -1
  216. package/dist/components/Heading/index.js +0 -8
  217. package/dist/components/Input/index.d.ts +0 -7
  218. package/dist/components/Input/index.js +0 -17
  219. package/dist/components/SkeletonLoading/index.d.ts +0 -5
  220. package/dist/components/SkeletonLoading/index.js +0 -21
  221. package/dist/components/Text/Text.js +0 -93
  222. package/dist/components/Text/index.d.ts +0 -1
  223. package/dist/components/Text/index.js +0 -10
  224. package/dist/components/TextField/TelField.d.ts +0 -14
  225. package/dist/components/TextField/TelField.js +0 -38
  226. package/dist/esm/components/Heading/Heading.js +0 -74
  227. package/dist/esm/components/Heading/index.js +0 -1
  228. package/dist/esm/components/Input/index.js +0 -7
  229. package/dist/esm/components/SkeletonLoading/index.js +0 -5
  230. package/dist/esm/components/Text/Text.js +0 -66
  231. package/dist/esm/components/Text/index.js +0 -1
  232. package/dist/esm/components/TextField/TelField.js +0 -35
  233. /package/dist/components/{TextField → CurrencyField}/CurrencyField.d.ts +0 -0
  234. /package/dist/components/{TextField → EmailField}/EmailField.d.ts +0 -0
  235. /package/dist/components/{Input → EmailInput}/EmailInput.d.ts +0 -0
  236. /package/dist/components/{TextField → NumberField}/NumberField.d.ts +0 -0
  237. /package/dist/components/{Input → NumberInput}/NumberInput.d.ts +0 -0
  238. /package/dist/components/{TextField → PasswordField}/PasswordField.d.ts +0 -0
  239. /package/dist/components/{Input → PasswordInput}/PasswordInput.d.ts +0 -0
  240. /package/dist/components/{Input → PasswordInput}/PasswordInput.styled.js +0 -0
  241. /package/dist/components/{Input → PasswordInput}/PasswordVisibilityToggle.d.ts +0 -0
  242. /package/dist/components/{Input → PasswordInput}/PasswordVisibilityToggle.js +0 -0
  243. /package/dist/components/{TextField → PhoneField}/PhoneField.d.ts +0 -0
  244. /package/dist/components/{SkeletonLoading → SkeletonAnimation}/SkeletonAnimation.d.ts +0 -0
  245. /package/dist/components/{SkeletonLoading → SkeletonAnimation}/SkeletonAnimation.js +0 -0
  246. /package/dist/components/{SkeletonLoading → SkeletonCTA}/SkeletonCTA.d.ts +0 -0
  247. /package/dist/components/{SkeletonLoading → SkeletonCircle}/SkeletonCircle.d.ts +0 -0
  248. /package/dist/components/{SkeletonLoading → SkeletonHeading}/SkeletonHeading.d.ts +0 -0
  249. /package/dist/components/{SkeletonLoading → SkeletonText}/SkeletonText.d.ts +0 -0
  250. /package/dist/components/{Input → TextInput}/TextInput.d.ts +0 -0
  251. /package/dist/components/{TextField → TextareaField}/TextareaField.d.ts +0 -0
  252. /package/dist/esm/components/{Input → PasswordInput}/PasswordInput.styled.js +0 -0
  253. /package/dist/esm/components/{Input → PasswordInput}/PasswordVisibilityToggle.js +0 -0
  254. /package/dist/esm/components/{SkeletonLoading → SkeletonAnimation}/SkeletonAnimation.js +0 -0
  255. /package/dist/esm/{components/Accordion/hooks.js → hooks/use-layout.js} +0 -0
  256. /package/dist/{components/Accordion/hooks.d.ts → hooks/use-layout.d.ts} +0 -0
  257. /package/dist/{components/Accordion/hooks.js → hooks/use-layout.js} +0 -0
@@ -0,0 +1,44 @@
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
+ import { jsx as _jsx } from "react/jsx-runtime";
28
+ import { useBreakpoint } from '../../hooks';
29
+ import styled, { css } from '../../styled.native';
30
+ import { pxToNumber, numToPx } from '../../utils';
31
+ var calculateLetterSpacing = function (fontSize, letterSpacing) {
32
+ return numToPx(pxToNumber(fontSize) * letterSpacing);
33
+ };
34
+ var StyledHeading3 = styled.Text(function (_a) {
35
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
36
+ var fontSize = core.fontSize.heading3[smallAndUp ? 'large' : 'small'];
37
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading3[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed), semantic.message.branded);
38
+ });
39
+ export var Heading3 = function (_a) {
40
+ var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
41
+ var breakpoints = useBreakpoint();
42
+ return (_jsx(StyledHeading3, __assign({ accessibilityRole: accessibilityRole }, breakpoints, rest)));
43
+ };
44
+ var templateObject_1;
@@ -0,0 +1 @@
1
+ export { Heading3 } from './Heading3';
@@ -0,0 +1,44 @@
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
+ import { jsx as _jsx } from "react/jsx-runtime";
28
+ import { useBreakpoint } from '../../hooks';
29
+ import styled, { css } from '../../styled.native';
30
+ import { pxToNumber, numToPx } from '../../utils';
31
+ var calculateLetterSpacing = function (fontSize, letterSpacing) {
32
+ return numToPx(pxToNumber(fontSize) * letterSpacing);
33
+ };
34
+ var StyledHeading4 = styled.Text(function (_a) {
35
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
36
+ var fontSize = core.fontSize.heading4[smallAndUp ? 'large' : 'small'];
37
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading4[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed), semantic.message.branded);
38
+ });
39
+ export var Heading4 = function (_a) {
40
+ var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
41
+ var breakpoints = useBreakpoint();
42
+ return (_jsx(StyledHeading4, __assign({ accessibilityRole: accessibilityRole }, breakpoints, rest)));
43
+ };
44
+ var templateObject_1;
@@ -0,0 +1 @@
1
+ export { Heading4 } from './Heading4';
@@ -3,5 +3,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import styled from '../../styled.native';
6
- export var Skeleton = styled.View(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
6
+ export var LineThrough = styled.Text(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-decoration: line-through;\n"], ["\n text-decoration: line-through;\n"])));
7
7
  var templateObject_1;
@@ -0,0 +1 @@
1
+ export { LineThrough } from './LineThrough';
@@ -1,7 +1,3 @@
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
  var __assign = (this && this.__assign) || function () {
6
2
  __assign = Object.assign || function(t) {
7
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -26,81 +22,61 @@ var __rest = (this && this.__rest) || function (s, e) {
26
22
  };
27
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
24
  import { Children } from 'react';
29
- import { View } from 'react-native';
30
- import styled, { css } from '../../styled.native';
31
- import { pxToNumber, styledComponentWithBreakpoints } from '../../utils';
25
+ import { styledComponentWithBreakpoints } from '../../utils';
32
26
  import { Stack } from '../Stack';
33
- var UlBullet = styled.View(function (_a) {
34
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, _c = _a.visible, visible = _c === void 0 ? true : _c, smallAndUp = _a.smallAndUp;
35
- var lineHeight = smallAndUp
36
- ? core.lineHeight.body.large
37
- : core.lineHeight.body.small;
38
- var topMargin = (pxToNumber(lineHeight) - pxToNumber(core.space[2])) / 2;
39
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-right: ", ";\n margin-top: ", "px;\n width: ", ";\n height: ", ";\n background-color: ", ";\n "], ["\n margin-right: ", ";\n margin-top: ", "px;\n width: ", ";\n height: ", ";\n background-color: ", ";\n "])), core.space[2], topMargin, core.space[2], core.space[2], visible ? semantic.message.base : 'transparent');
40
- });
41
- var StyledBullet = styled.Text(function (_a) {
42
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
43
- var fontSize = smallAndUp
44
- ? core.fontSize.body.large
45
- : core.fontSize.body.small;
46
- var lineHeight = smallAndUp
47
- ? core.lineHeight.body.large
48
- : core.lineHeight.body.small;
49
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n margin-right: ", ";\n width: ", ";\n text-align: right;\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n margin-right: ", ";\n width: ", ";\n text-align: right;\n "])), core.fontFamily.body.native, lineHeight, semantic.message.base, fontSize, core.space[2], core.space[4]);
50
- });
51
- var StyledUlItem = styled.View(function (_a) {
52
- var core = _a.theme.core, level = _a.level;
53
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n align-items: flex-start;\n justify-content: center;\n padding-left: ", ";\n "], ["\n flex-direction: row;\n align-items: flex-start;\n justify-content: center;\n padding-left: ", ";\n "])), core.space[level]);
54
- });
27
+ import { StyledBullet, StyledLi, StyledList, StyledOlItem, StyledUlItem, UlBullet, } from './styled';
55
28
  var Bullet = styledComponentWithBreakpoints(StyledBullet);
29
+ var ListWrapper = styledComponentWithBreakpoints(StyledList);
56
30
  var ListBulletItem = function (_a) {
57
31
  var children = _a.children, _b = _a.showBullets, showBullets = _b === void 0 ? true : _b, level = _a.level;
58
32
  return (_jsxs(StyledUlItem, __assign({ level: level }, { children: [_jsx(UlBullet, { visible: showBullets }), children] })));
59
33
  };
60
34
  var ListNumberedItem = function (_a) {
61
- var children = _a.children, prefix = _a.prefix;
62
- return (_jsxs(View, __assign({ style: { flexDirection: 'row' } }, { children: [_jsx(Bullet, { children: prefix }), children] })));
35
+ var children = _a.children, prefix = _a.prefix, level = _a.level;
36
+ return (_jsxs(StyledOlItem, __assign({ level: level }, { children: [_jsx(Bullet, { children: prefix }), children] })));
63
37
  };
64
- var StyledList = styled.View(function (_a) {
65
- var core = _a.theme.core, smallAndUp = _a.smallAndUp;
66
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n margin-top: ", ";\n margin-bottom: ", ";\n "])), smallAndUp ? core.space[3] : core.space[2], smallAndUp ? core.space[3] : core.space[2]);
67
- });
68
- var ListWrapper = styledComponentWithBreakpoints(StyledList);
69
- var Ul = function (_a) {
70
- var children = _a.children, _b = _a.showBullets, showBullets = _b === void 0 ? true : _b, rest = __rest(_a, ["children", "showBullets"]);
71
- var renderList = function (arrayChildren, level) {
72
- if (level === void 0) { level = 0; }
73
- return Children.map(arrayChildren, function (child) {
74
- var _a, _b, _c;
75
- // @ts-ignore It complains that child props doesn't exist. Weird.
76
- if (Array.isArray((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.children) && ((_b = child === null || child === void 0 ? void 0 : child.type) === null || _b === void 0 ? void 0 : _b.name) === 'Ul') {
77
- var lvl = level;
78
- var PADDING = 3;
79
- lvl = lvl + PADDING;
38
+ var renderList = function (_a) {
39
+ var arrayChildren = _a.arrayChildren, _b = _a.level, level = _b === void 0 ? 0 : _b, showBullets = _a.showBullets, listType = _a.listType;
40
+ return Children.map(arrayChildren, function (child, index) {
41
+ var _a, _b, _c, _d;
42
+ // Checking if there are any child types, i.e. nodes
43
+ if (
44
+ // @ts-ignore
45
+ Array.isArray((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.children) &&
46
+ // @ts-ignore
47
+ (child.type.name === 'Ul' || child.type.name === 'Ol')) {
48
+ var lvl = level;
49
+ var PADDING = 3;
50
+ lvl = lvl + PADDING;
51
+ return renderList({
52
+ // @ts-ignore It complains that child props doesn't exist. Weird.
53
+ arrayChildren: (_b = child === null || child === void 0 ? void 0 : child.props) === null || _b === void 0 ? void 0 : _b.children,
80
54
  // @ts-ignore It complains that child props doesn't exist. Weird.
81
- return renderList((_c = child === null || child === void 0 ? void 0 : child.props) === null || _c === void 0 ? void 0 : _c.children, lvl);
55
+ listType: (_d = (_c = child === null || child === void 0 ? void 0 : child.type) === null || _c === void 0 ? void 0 : _c.name) === null || _d === void 0 ? void 0 : _d.toLowerCase(),
56
+ showBullets: showBullets,
57
+ level: lvl,
58
+ });
59
+ }
60
+ else {
61
+ if (listType === 'ul') {
62
+ return (_jsx(ListBulletItem, __assign({ showBullets: showBullets, level: level }, { children: child })));
82
63
  }
83
64
  else {
84
- return (_jsx(ListBulletItem, __assign({ showBullets: showBullets, level: level }, { children: child })));
65
+ return (_jsx(ListNumberedItem, __assign({ level: level, prefix: "".concat(index + 1, ".") }, { children: child })));
85
66
  }
86
- });
87
- };
88
- return (_jsx(ListWrapper, __assign({}, rest, { children: _jsx(Stack, __assign({ spaceBetween: 2 }, { children: renderList(children) })) })));
67
+ }
68
+ });
69
+ };
70
+ var Li = function (_a) {
71
+ var children = _a.children, rest = __rest(_a, ["children"]);
72
+ return _jsx(StyledLi, __assign({}, rest, { children: children }));
73
+ };
74
+ var Ul = function (_a) {
75
+ var children = _a.children, _b = _a.showBullets, showBullets = _b === void 0 ? true : _b, rest = __rest(_a, ["children", "showBullets"]);
76
+ return (_jsx(ListWrapper, __assign({}, rest, { children: _jsx(Stack, __assign({ spaceBetween: 2 }, { children: renderList({ arrayChildren: children, listType: 'ul', showBullets: showBullets }) })) })));
89
77
  };
90
78
  var Ol = function (_a) {
91
79
  var children = _a.children, rest = __rest(_a, ["children"]);
92
- return (_jsx(ListWrapper, __assign({}, rest, { children: _jsx(Stack, __assign({ spaceBetween: 2 }, { children: Children.map(children, function (child, index) { return (_jsx(ListNumberedItem, __assign({ prefix: index + 1 + '.' }, { children: child }))); }) })) })));
80
+ return (_jsx(ListWrapper, __assign({}, rest, { children: _jsx(Stack, __assign({ spaceBetween: 2 }, { children: renderList({ arrayChildren: children, listType: 'ol' }) })) })));
93
81
  };
94
- var StyledLi = styled.Text(function (_a) {
95
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
96
- var fontSize = smallAndUp
97
- ? core.fontSize.body.large
98
- : core.fontSize.body.small;
99
- var lineHeight = smallAndUp
100
- ? core.lineHeight.body.large
101
- : core.lineHeight.body.large;
102
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n flex: 1;\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n flex: 1;\n "])), core.fontFamily.body.native, lineHeight, semantic.message.base, fontSize);
103
- });
104
- var Li = styledComponentWithBreakpoints(StyledLi);
105
82
  export { Ul, Ol, Li, ListWrapper };
106
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,44 @@
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
+ import styled, { css } from '../../styled.native';
6
+ import { pxToNumber } from '../../utils';
7
+ export var UlBullet = styled.View(function (_a) {
8
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, _c = _a.visible, visible = _c === void 0 ? true : _c, smallAndUp = _a.smallAndUp;
9
+ var lineHeight = smallAndUp
10
+ ? core.lineHeight.body.large
11
+ : core.lineHeight.body.small;
12
+ var topMargin = (pxToNumber(lineHeight) - pxToNumber(core.space[2])) / 2;
13
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-right: ", ";\n margin-top: ", "px;\n width: ", ";\n height: ", ";\n background-color: ", ";\n "], ["\n margin-right: ", ";\n margin-top: ", "px;\n width: ", ";\n height: ", ";\n background-color: ", ";\n "])), core.space[2], topMargin, core.space[2], core.space[2], visible ? semantic.message.base : 'transparent');
14
+ });
15
+ export var StyledBullet = styled.Text(function (_a) {
16
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
17
+ var fontSize = smallAndUp
18
+ ? core.fontSize.body.large
19
+ : core.fontSize.body.small;
20
+ var lineHeight = smallAndUp
21
+ ? core.lineHeight.body.large
22
+ : core.lineHeight.body.small;
23
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n margin-right: ", ";\n width: ", ";\n text-align: right;\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n margin-right: ", ";\n width: ", ";\n text-align: right;\n "])), core.fontFamily.body.native, lineHeight, semantic.message.base, fontSize, core.space[2], core.space[4]);
24
+ });
25
+ export var StyledUlItem = styled.View(function (_a) {
26
+ var core = _a.theme.core, level = _a.level;
27
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n align-items: flex-start;\n justify-content: center;\n padding-left: ", ";\n "], ["\n flex-direction: row;\n align-items: flex-start;\n justify-content: center;\n padding-left: ", ";\n "])), core.space[level]);
28
+ });
29
+ export var StyledOlItem = StyledUlItem;
30
+ export var StyledList = styled.View(function (_a) {
31
+ var core = _a.theme.core, smallAndUp = _a.smallAndUp;
32
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex-direction: column;\n flex: 1;\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n flex-direction: column;\n flex: 1;\n margin-top: ", ";\n margin-bottom: ", ";\n "])), smallAndUp ? core.space[3] : core.space[2], smallAndUp ? core.space[3] : core.space[2]);
33
+ });
34
+ export var StyledLi = styled.Text(function (_a) {
35
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
36
+ var fontSize = smallAndUp
37
+ ? core.fontSize.body.large
38
+ : core.fontSize.body.small;
39
+ var lineHeight = smallAndUp
40
+ ? core.lineHeight.body.large
41
+ : core.lineHeight.body.large;
42
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n flex: 1;\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n flex: 1;\n "])), core.fontFamily.body.native, lineHeight, semantic.message.base, fontSize);
43
+ });
44
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,27 @@
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
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { theme } from '@ovotech/element-core';
14
+ import { Pressable } from 'react-native';
15
+ import { Icon } from '../Icon';
16
+ import { StyledIconButtonL, StyledIconButtonS } from './NavHeader.styles';
17
+ export var IconButton = function (_a) {
18
+ var size = _a.size, animation = _a.animation, rightActionConfig = _a.rightActionConfig;
19
+ var ButtonStyled = size === 'small' ? StyledIconButtonS : StyledIconButtonL;
20
+ if (!rightActionConfig || !(rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.iconName)) {
21
+ return null;
22
+ }
23
+ return (_jsx(Pressable, __assign({ hitSlop: 44, pressRetentionOffset: 44, onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress }, { children: function (_a) {
24
+ var pressed = _a.pressed;
25
+ return (_jsx(ButtonStyled, __assign({ entering: animation, "$pressed": pressed }, { children: _jsx(Icon, { name: rightActionConfig.iconName, size: size === 'small' ? 16 : 18, color: theme.semantic.inverted.message.base }) })));
26
+ } })));
27
+ };
@@ -1,7 +1,3 @@
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
  var __assign = (this && this.__assign) || function () {
6
2
  __assign = Object.assign || function(t) {
7
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -13,51 +9,46 @@ var __assign = (this && this.__assign) || function () {
13
9
  };
14
10
  return __assign.apply(this, arguments);
15
11
  };
16
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
- import { TouchableOpacity, View } from 'react-native';
18
- import Animated, { FadeIn, FadeOut, Layout } from 'react-native-reanimated';
19
- import { Path, Svg } from 'react-native-svg';
20
- import styled, { css } from '../../styled.native';
21
- import { Heading3, Heading4 } from '../Heading';
22
- var BackIcon = function () {
23
- return (_jsx(Svg, __assign({ width: "10", height: "16", viewBox: "0 0 10 16" }, { children: _jsx(Path, { d: "M0.579956 8L8.57996 16L9.99996 14.58L3.41996 8L9.99996 1.42L8.57996 0L0.579956 8Z", fill: "white" }) })));
24
- };
25
- var StyledText = styled.Text(function (_a) {
26
- var _b = _a.theme, core = _b.core, semantic = _b.semantic;
27
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-family: ", ";\n "], ["\n color: ", ";\n font-size: ", ";\n font-family: ", ";\n "])), semantic.inverted.message.base, core.fontSize.small.small, core.fontFamily.body.native);
28
- });
29
- var LeftHeaderText = styled(StyledText)(function (_a) {
30
- var core = _a.theme.core;
31
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-left: ", ";\n "], ["\n padding-left: ", ";\n "])), core.space[2]);
32
- });
33
- var HeadlineView = styled(Animated.View)(function (_a) {
34
- var core = _a.theme.core;
35
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: 0 ", " ", ";\n "], ["\n padding: 0 ", " ", ";\n "])), core.space[3], core.space[3]);
36
- });
37
- var RootView = styled.View(function (_a) {
38
- var semantic = _a.theme.semantic;
39
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background-color: ", ";\n overflow: hidden;\n "], ["\n background-color: ", ";\n overflow: hidden;\n "])), semantic.message.branded);
40
- });
41
- var StyledView = styled(Animated.View)(function (_a) {
42
- var core = _a.theme.core, marginTop = _a.marginTop;
43
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n padding: ", ";\n padding-bottom: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-top: ", ";\n "], ["\n padding: ", ";\n padding-bottom: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-top: ", ";\n "])), core.space[3], core.space[2], marginTop !== null && marginTop !== void 0 ? marginTop : 0);
44
- });
45
- var StyledHeading4 = styled(Heading4)(function (_a) {
46
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, textAlign = _a.textAlign;
47
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-family: ", ";\n margin-top: 0;\n margin-bottom: 0;\n color: ", ";\n text-align: ", ";\n "], ["\n font-family: ", ";\n margin-top: 0;\n margin-bottom: 0;\n color: ", ";\n text-align: ", ";\n "])), core.fontFamily.bodyBold.native, semantic.inverted.message.base, textAlign);
48
- });
49
- var StyledHeading3 = styled(Heading3)(function (_a) {
50
- var semantic = _a.theme.semantic;
51
- return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 0;\n color: ", ";\n text-align: left;\n "], ["\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 0;\n color: ", ";\n text-align: left;\n "])), semantic.inverted.message.base);
52
- });
12
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { theme } from '@ovotech/element-core';
14
+ import { useEffect } from 'react';
15
+ import Animated, { FadeInDown, FadeInUp, FadeOutDown, FadeOutUp, Layout, runOnUI, useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
16
+ import { useLayout } from '../../hooks/use-layout';
17
+ import { Action } from '../ActionList';
18
+ import { IconButton } from './IconButton';
19
+ import { CollapsedTitle, CollapsedTitleWrapper, ExpandedTitle, IconButtonWrapper, NavContainer, NavWrapper, } from './NavHeader.styles';
20
+ // calculated based on layout with maximum possible height
21
+ var INITIAL_HEADER_HEIGHT = 115;
22
+ var FADE_ANIMATION_DURATION = 250; // ms
53
23
  export var NavHeader = function (_a) {
54
- var options = _a.options, headline = _a.headline;
55
- return (_jsxs(RootView, __assign({ layout: Layout === null || Layout === void 0 ? void 0 : Layout.duration(150) }, { children: [_jsxs(StyledView, __assign({ marginTop: options === null || options === void 0 ? void 0 : options.statusBarHeight }, { children: [(options === null || options === void 0 ? void 0 : options.headerLeft) ? (options === null || options === void 0 ? void 0 : options.headerLeft()) : (options === null || options === void 0 ? void 0 : options.canGoBack()) ? (_jsxs(TouchableOpacity, __assign({ style: {
56
- flexDirection: 'row',
57
- alignItems: 'center',
58
- flex: 1,
59
- flexGrow: 1,
60
- flexShrink: 1,
61
- }, onPress: options === null || options === void 0 ? void 0 : options.goBack }, { children: [_jsx(BackIcon, {}), _jsx(LeftHeaderText, { children: "Back" })] }))) : null, _jsx(Animated.View, __assign({ entering: FadeIn, exiting: FadeOut, style: { flex: 1, flexGrow: 3, flexShrink: 1 } }, { children: _jsx(StyledHeading4, __assign({ textAlign: (options === null || options === void 0 ? void 0 : options.canGoBack()) ? 'center' : 'left', numberOfLines: 1 }, { children: !headline ? options === null || options === void 0 ? void 0 : options.title : ' ' })) })), _jsx(View, __assign({ style: { flex: 1, flexGrow: 1, flexShrink: 1 } }, { children: options.headerRight ? options.headerRight() : null }))] })), headline ? (_jsx(HeadlineView, __assign({ entering: FadeIn, exiting: FadeOut }, { children: (options === null || options === void 0 ? void 0 : options.title) ? (_jsx(StyledHeading3, { children: options.title })) : null }))) : null] })));
24
+ var title = _a.title, scrolled = _a.scrolled, rightActionConfig = _a.rightActionConfig, canGoBack = _a.canGoBack, goBack = _a.goBack;
25
+ var _b = useLayout(INITIAL_HEADER_HEIGHT), layout = _b[0], onLayout = _b[1];
26
+ var navHeight = useSharedValue(layout.height); // initial value
27
+ var animatedNavHeight = useAnimatedStyle(function () {
28
+ return {
29
+ height: navHeight.value,
30
+ };
31
+ });
32
+ // take children calculated height and change NavContainer height accordingly but with animation
33
+ useEffect(function () {
34
+ runOnUI(function () {
35
+ 'worklet';
36
+ navHeight.value = withTiming(Math.floor(layout.height), {
37
+ duration: FADE_ANIMATION_DURATION,
38
+ });
39
+ })();
40
+ }, [layout.height]);
41
+ // NavContainer is animated view, height transition will be smooth
42
+ // in order to tell NavContainer which height it children have we need another NavWrapper
43
+ // back-button, title and right-action has wrappers with 33.3% and they are always rendered
44
+ // we need it for correct placing of the title when either back-button or right-action missing
45
+ return (_jsx(NavContainer, __assign({ style: animatedNavHeight }, { children: _jsxs(NavWrapper, __assign({ onLayout: onLayout }, { children: [_jsx(Animated.View, __assign({ style: {
46
+ width: scrolled ? '33.3%' : '100%',
47
+ // when back button is off we have small margin top for title, to write less code we can just set height
48
+ height: !canGoBack ? parseInt(theme.core.space[10]) : undefined,
49
+ }, layout: Layout.delay(FADE_ANIMATION_DURATION) }, { children: canGoBack && (_jsx(Action, __assign({ actionType: "back", onPress: goBack }, { children: "Back" }))) })), scrolled ? (_jsxs(_Fragment, { children: [_jsx(CollapsedTitleWrapper, { children: _jsx(CollapsedTitle, __assign({ numberOfLines: 1, ellipsizeMode: "tail", entering: FadeInDown.delay(FADE_ANIMATION_DURATION), exiting: FadeOutDown.duration(FADE_ANIMATION_DURATION) }, { children: title })) }), _jsx(IconButtonWrapper, { children: _jsx(IconButton, { rightActionConfig: rightActionConfig, size: "small", animation: FadeInDown.delay(FADE_ANIMATION_DURATION) }) })] })) : (_jsxs(_Fragment, { children: [_jsx(ExpandedTitle
50
+ // if we don't have right action leave more space for the title text in expanded state
51
+ , __assign({
52
+ // if we don't have right action leave more space for the title text in expanded state
53
+ fullWidth: !scrolled && !rightActionConfig, numberOfLines: 1, ellipsizeMode: "tail", hasBackButton: canGoBack, entering: FadeInUp.delay(FADE_ANIMATION_DURATION), exiting: FadeOutUp.duration(FADE_ANIMATION_DURATION) }, { children: title })), _jsx(IconButtonWrapper, { children: _jsx(IconButton, { rightActionConfig: rightActionConfig, size: "large", animation: FadeInUp.delay(FADE_ANIMATION_DURATION) }) })] }))] })) })));
62
54
  };
63
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
@@ -0,0 +1,43 @@
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
+ import { View } from 'react-native';
6
+ import Animated from 'react-native-reanimated';
7
+ import styled, { css } from '../../styled.native';
8
+ export var NavContainer = styled(Animated.View)(function (_a) {
9
+ var semantic = _a.theme.semantic;
10
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n background-color: ", ";\n "], ["\n width: 100%;\n background-color: ", ";\n "])), semantic.surface.base);
11
+ });
12
+ export var NavWrapper = styled(View)(function (_a) {
13
+ var core = _a.theme.core;
14
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n padding: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n "], ["\n width: 100%;\n padding: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n "])), core.space[2]);
15
+ });
16
+ export var ExpandedTitle = styled(Animated.Text)(function (_a) {
17
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBackButton = _a.hasBackButton, fullWidth = _a.fullWidth;
18
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n height: ", ";\n color: ", ";\n "], ["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n height: ", ";\n color: ", ";\n "])), fullWidth ? '100%' : '65%', core.fontFamily.heading.native, core.fontSize.heading1[hasBackButton ? 'small' : 'large'], hasBackButton
19
+ ? core.lineHeight.heading1.small
20
+ : core.space[13], hasBackButton ? core.lineHeight.heading1.small : core.space[13], semantic.message.branded);
21
+ });
22
+ export var CollapsedTitleWrapper = styled(Animated.View)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n justify-content: center;\n width: 33.3%;\n height: ", ";\n"], ["\n align-items: center;\n justify-content: center;\n width: 33.3%;\n height: ", ";\n"])), function (_a) {
23
+ var core = _a.theme.core;
24
+ return core.lineHeight.heading4.small;
25
+ });
26
+ export var CollapsedTitle = styled(Animated.Text)(function (_a) {
27
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic;
28
+ 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, core.fontSize.heading4.small, core.lineHeight.heading4.small, semantic.message.branded);
29
+ });
30
+ 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"])));
31
+ var iconButtonSharedStyles = css(function (_a) {
32
+ var semantic = _a.theme.semantic;
33
+ return "\n border-radius: 100px;\n background-color: ".concat(semantic.inverted.surface, ";\n align-items: center;\n justify-content: center;\n");
34
+ });
35
+ 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) {
36
+ var $pressed = _a.$pressed;
37
+ return ($pressed ? 0.8 : 1);
38
+ }, iconButtonSharedStyles);
39
+ 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) {
40
+ var $pressed = _a.$pressed;
41
+ return ($pressed ? 0.8 : 1);
42
+ }, iconButtonSharedStyles);
43
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { forwardRef } from 'react';
25
25
  import { Field } from '../Field';
26
- import { NumberInput } from '../Input/NumberInput';
26
+ import { NumberInput } from '../NumberInput';
27
27
  export var NumberField = forwardRef(function (_a, ref) {
28
28
  var rest = __rest(_a, []);
29
29
  return (_jsx(Field, __assign({}, rest, { ref: ref }, { children: _jsx(NumberInput, {}) })));
@@ -0,0 +1 @@
1
+ export { NumberField } from './NumberField';
@@ -11,6 +11,6 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { forwardRef } from 'react';
14
- import { Input } from './Input';
14
+ import { Input } from '../Input/Input';
15
15
  var NumberInput = forwardRef(function (props, ref) { return (_jsx(Input, __assign({}, props, { keyboardType: "numeric", autoCapitalize: "none", autoCorrect: false, ref: ref }))); });
16
16
  export { NumberInput };
@@ -0,0 +1 @@
1
+ export { NumberInput } from './NumberInput';
@@ -0,0 +1,12 @@
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
+ import styled, { css } from '../../styled.native';
6
+ import { styledComponentWithBreakpoints } from '../../utils';
7
+ var StyledP = styled.Text(function (_a) {
8
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
9
+ 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, core.fontSize.body[smallAndUp ? 'large' : 'small'], core.lineHeight.body[smallAndUp ? 'large' : 'small'], semantic.message.base);
10
+ });
11
+ export var P = styledComponentWithBreakpoints(StyledP);
12
+ var templateObject_1;
@@ -0,0 +1 @@
1
+ export { P } from './P';
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { forwardRef } from 'react';
25
25
  import { Field } from '../Field';
26
- import { PasswordInput } from '../Input/PasswordInput';
26
+ import { PasswordInput } from '../PasswordInput';
27
27
  export var PasswordField = forwardRef(function (_a, ref) {
28
28
  var hasVisibilityToggle = _a.hasVisibilityToggle, rest = __rest(_a, ["hasVisibilityToggle"]);
29
29
  return (_jsx(Field, __assign({}, rest, { ref: ref }, { children: _jsx(PasswordInput, { hasVisibilityToggle: hasVisibilityToggle }) })));
@@ -0,0 +1 @@
1
+ export { PasswordField } from './PasswordField';
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { forwardRef } from 'react';
25
- import { Input } from './Input';
25
+ import { Input } from '../Input/Input';
26
26
  import { PasswordVisibilityToggle, useTogglePasswordVisibility, } from './PasswordVisibilityToggle';
27
27
  var PasswordInput = forwardRef(function (_a, ref) {
28
28
  var props = __rest(_a, []);
@@ -0,0 +1 @@
1
+ export { PasswordInput } from './PasswordInput';
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { forwardRef } from 'react';
25
25
  import { Field } from '../Field';
26
- import { PhoneInput } from '../Input/PhoneInput';
26
+ import { PhoneInput } from '../PhoneInput';
27
27
  export var PhoneField = forwardRef(function (_a, ref) {
28
28
  var rest = __rest(_a, []);
29
29
  return (_jsx(Field, __assign({}, rest, { ref: ref }, { children: _jsx(PhoneInput, {}) })));
@@ -0,0 +1 @@
1
+ export { PhoneField } from './PhoneField';
@@ -11,6 +11,5 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { forwardRef } from 'react';
14
- import { Input } from './Input';
15
- var PhoneInput = forwardRef(function (props, ref) { return (_jsx(Input, __assign({}, props, { keyboardType: "phone-pad", autoCapitalize: "none", autoCorrect: false, ref: ref }))); });
16
- export { PhoneInput };
14
+ 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 }))); });
@@ -0,0 +1 @@
1
+ export { PhoneInput } from './PhoneInput';
@@ -19,7 +19,8 @@ import { Fragment, useState } from 'react';
19
19
  import { Modal, ScrollView, View } from 'react-native';
20
20
  import styled, { css } from '../../styled.native';
21
21
  import { Icon } from '../Icon';
22
- import { P, Strong } from '../Text';
22
+ import { P } from '../P';
23
+ import { Strong } from '../Strong';
23
24
  var SelectInput = styled.TouchableOpacity(function (_a) {
24
25
  var _b = _a.theme, semantic = _b.semantic, core = _b.core, hasError = _a.hasError;
25
26
  return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-color: ", ";\n border-width: ", "\n border-radius: ", ";\n padding-vertical: ", "\n padding-left: ", "\n padding-right: 14px;\n height: 44px;\n "], ["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-color: ", ";\n border-width: ", "\n border-radius: ", ";\n padding-vertical: ", "\n padding-left: ", "\n padding-right: 14px;\n height: 44px;\n "])), core.color.brand.white, hasError ? semantic.error.border : semantic.border.functional, core.borderWidth.small, core.radius.small, core.space[2], core.space[2]);
@@ -0,0 +1 @@
1
+ export { SkeletonAnimation } from './SkeletonAnimation';
@@ -22,10 +22,9 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import styled from '../../styled.native';
25
- import { P } from '../Text';
26
- import { Skeleton } from './Skeleton';
27
- import { SkeletonAnimation } from './SkeletonAnimation';
28
- var StyledSkeletonCTA = styled(Skeleton)(function (_a) {
25
+ import { P } from '../P';
26
+ import { SkeletonAnimation } from '../SkeletonAnimation';
27
+ var StyledSkeletonCTA = styled.View(function (_a) {
29
28
  var core = _a.theme.core, size = _a.size;
30
29
  return "\n background-color: ".concat(core.color.neutral.light, ";\n width: ").concat(size, ";\n height: ").concat(core.space[12], ";\n ");
31
30
  });
@@ -0,0 +1 @@
1
+ export { SkeletonCTA } from './SkeletonCTA';