@ovotech/element-native 4.4.9 → 5.0.0-canary-bcb1788-338

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 (277) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +1 -1
  2. package/dist/components/Accordion/Accordion.js +11 -9
  3. package/dist/components/Accordion/Icon.d.ts +2 -1
  4. package/dist/components/Accordion/Icon.js +9 -6
  5. package/dist/components/Accordion/styles.d.ts +1520 -1525
  6. package/dist/components/Accordion/styles.js +17 -11
  7. package/dist/components/Accordion/types.d.ts +2 -1
  8. package/dist/components/ActionCard/ActionCard.d.ts +2 -2
  9. package/dist/components/ActionCard/ActionCard.js +21 -21
  10. package/dist/components/ActionCard/CloseIconShape.js +2 -2
  11. package/dist/components/ActionCard/IndicatorIconShape.js +2 -2
  12. package/dist/components/ActionList/ActionList.d.ts +9 -3
  13. package/dist/components/ActionList/ActionList.js +7 -6
  14. package/dist/components/ActionList/styled.d.ts +5116 -3430
  15. package/dist/components/ActionList/styled.js +36 -19
  16. package/dist/components/Badge/Badge.d.ts +511 -508
  17. package/dist/components/Badge/Badge.js +24 -34
  18. package/dist/components/Badge/index.d.ts +1 -1
  19. package/dist/components/Card/Card.d.ts +9 -1
  20. package/dist/components/Card/Card.js +5 -6
  21. package/dist/components/Checkbox/Checkbox.js +13 -13
  22. package/dist/components/DataTable/styles.d.ts +6527 -6553
  23. package/dist/components/DataTable/styles.js +27 -27
  24. package/dist/components/DateField/DateField.d.ts +5 -4
  25. package/dist/components/DateField/DateField.js +20 -10
  26. package/dist/components/Disclosure/Disclosure.js +6 -6
  27. package/dist/components/Divider/Divider.js +3 -3
  28. package/dist/components/Em/Em.d.ts +493 -495
  29. package/dist/components/Em/Em.js +1 -1
  30. package/dist/components/ErrorText/ErrorText.d.ts +493 -495
  31. package/dist/components/ErrorText/ErrorText.js +6 -4
  32. package/dist/components/Field/Field.js +1 -1
  33. package/dist/components/Grid/Col.d.ts +493 -495
  34. package/dist/components/Grid/Col.js +10 -16
  35. package/dist/components/Grid/Row.d.ts +493 -495
  36. package/dist/components/Grid/Row.js +7 -6
  37. package/dist/components/HintText/HintText.d.ts +493 -495
  38. package/dist/components/HintText/HintText.js +6 -4
  39. package/dist/components/Icon/Icon.d.ts +1 -3
  40. package/dist/components/Icon/Icon.js +3 -5
  41. package/dist/components/Input/Input.d.ts +1 -1
  42. package/dist/components/Input/Input.js +16 -11
  43. package/dist/components/LabelText/LabelText.d.ts +493 -495
  44. package/dist/components/LabelText/LabelText.js +7 -4
  45. package/dist/components/LineThrough/LineThrough.d.ts +493 -495
  46. package/dist/components/List/styled.d.ts +2017 -2025
  47. package/dist/components/List/styled.js +11 -11
  48. package/dist/components/Margin/Margin.d.ts +493 -495
  49. package/dist/components/Margin/Margin.js +4 -2
  50. package/dist/components/NavHeader/NavHeader.d.ts +7 -1
  51. package/dist/components/NavHeader/NavHeader.js +2 -12
  52. package/dist/components/NavHeader/NavHeader.styles.d.ts +3489 -4636
  53. package/dist/components/NavHeader/NavHeader.styles.js +22 -32
  54. package/dist/components/Notification/Notification.d.ts +987 -991
  55. package/dist/components/Notification/Notification.js +18 -18
  56. package/dist/components/P/P.d.ts +7 -3
  57. package/dist/components/P/P.js +4 -2
  58. package/dist/components/PasswordInput/PasswordInput.styled.d.ts +493 -495
  59. package/dist/components/PasswordInput/PasswordInput.styled.js +2 -2
  60. package/dist/components/ProductCarousel/NavigationDots.js +4 -4
  61. package/dist/components/ProductCarousel/ProductCarousel.js +4 -4
  62. package/dist/components/Radio/Radio.js +11 -11
  63. package/dist/components/RadioCard/RadioCard.d.ts +0 -1
  64. package/dist/components/RadioCard/RadioCard.js +15 -15
  65. package/dist/components/SegmentedControls/SegmentedControls.js +5 -5
  66. package/dist/components/SegmentedControls/components/SegmentButton.js +4 -4
  67. package/dist/components/SelectField/Select.d.ts +493 -495
  68. package/dist/components/SelectField/Select.js +22 -24
  69. package/dist/components/SkeletonCircle/SkeletonCircle.d.ts +2 -2
  70. package/dist/components/SkeletonCircle/SkeletonCircle.js +6 -6
  71. package/dist/components/SkeletonHeading/SkeletonHeading.js +4 -4
  72. package/dist/components/SkeletonText/SkeletonText.js +4 -4
  73. package/dist/components/Spinner/Spinner.js +2 -2
  74. package/dist/components/Stack/Stack.js +4 -2
  75. package/dist/components/Strong/Strong.d.ts +493 -495
  76. package/dist/components/Strong/Strong.js +2 -2
  77. package/dist/components/SubLabelText/SubLabelText.d.ts +493 -495
  78. package/dist/components/SubLabelText/SubLabelText.js +4 -4
  79. package/dist/components/Tabs/Tab.js +8 -13
  80. package/dist/components/Tabs/TabList.d.ts +1 -2
  81. package/dist/components/Tabs/TabList.js +3 -6
  82. package/dist/components/Tabs/TabPanel.js +2 -2
  83. package/dist/components/Tabs/Tabs.d.ts +1 -2
  84. package/dist/components/Tabs/Tabs.js +4 -7
  85. package/dist/components/TextareaInput/TextareaInput.js +2 -2
  86. package/dist/components/Toast/Toast.js +16 -24
  87. package/dist/components/Toggle/Toggle.js +5 -9
  88. package/dist/components/Toggle/styles.d.ts +2023 -2031
  89. package/dist/components/Toggle/styles.js +10 -8
  90. package/dist/components/index.d.ts +6 -20
  91. package/dist/components/index.js +6 -20
  92. package/dist/esm/components/Accordion/Accordion.js +10 -8
  93. package/dist/esm/components/Accordion/Icon.js +9 -6
  94. package/dist/esm/components/Accordion/styles.js +17 -11
  95. package/dist/esm/components/ActionCard/ActionCard.js +22 -22
  96. package/dist/esm/components/ActionCard/CloseIconShape.js +2 -2
  97. package/dist/esm/components/ActionCard/IndicatorIconShape.js +2 -2
  98. package/dist/esm/components/ActionList/ActionList.js +9 -8
  99. package/dist/esm/components/ActionList/styled.js +35 -18
  100. package/dist/esm/components/Badge/Badge.js +25 -35
  101. package/dist/esm/components/Card/Card.js +5 -6
  102. package/dist/esm/components/Checkbox/Checkbox.js +13 -13
  103. package/dist/esm/components/DataTable/styles.js +27 -27
  104. package/dist/esm/components/DateField/DateField.js +20 -10
  105. package/dist/esm/components/Disclosure/Disclosure.js +6 -6
  106. package/dist/esm/components/Divider/Divider.js +3 -3
  107. package/dist/esm/components/Em/Em.js +1 -1
  108. package/dist/esm/components/ErrorText/ErrorText.js +6 -4
  109. package/dist/esm/components/Field/Field.js +1 -1
  110. package/dist/esm/components/Grid/Col.js +10 -16
  111. package/dist/esm/components/Grid/Row.js +7 -6
  112. package/dist/esm/components/HintText/HintText.js +6 -4
  113. package/dist/esm/components/Icon/Icon.js +3 -5
  114. package/dist/esm/components/Input/Input.js +16 -11
  115. package/dist/esm/components/LabelText/LabelText.js +7 -4
  116. package/dist/esm/components/List/styled.js +11 -11
  117. package/dist/esm/components/Margin/Margin.js +4 -2
  118. package/dist/esm/components/NavHeader/NavHeader.js +3 -13
  119. package/dist/esm/components/NavHeader/NavHeader.styles.js +21 -31
  120. package/dist/esm/components/Notification/Notification.js +18 -18
  121. package/dist/esm/components/P/P.js +4 -2
  122. package/dist/esm/components/PasswordInput/PasswordInput.styled.js +2 -2
  123. package/dist/esm/components/ProductCarousel/NavigationDots.js +4 -4
  124. package/dist/esm/components/ProductCarousel/ProductCarousel.js +4 -4
  125. package/dist/esm/components/Radio/Radio.js +11 -11
  126. package/dist/esm/components/RadioCard/RadioCard.js +15 -15
  127. package/dist/esm/components/SegmentedControls/SegmentedControls.js +5 -5
  128. package/dist/esm/components/SegmentedControls/components/SegmentButton.js +4 -4
  129. package/dist/esm/components/SelectField/Select.js +23 -25
  130. package/dist/esm/components/SkeletonCircle/SkeletonCircle.js +6 -6
  131. package/dist/esm/components/SkeletonHeading/SkeletonHeading.js +3 -3
  132. package/dist/esm/components/SkeletonText/SkeletonText.js +4 -4
  133. package/dist/esm/components/Spinner/Spinner.js +2 -2
  134. package/dist/esm/components/Stack/Stack.js +4 -2
  135. package/dist/esm/components/Strong/Strong.js +2 -2
  136. package/dist/esm/components/SubLabelText/SubLabelText.js +4 -4
  137. package/dist/esm/components/Tabs/Tab.js +8 -13
  138. package/dist/esm/components/Tabs/TabList.js +3 -6
  139. package/dist/esm/components/Tabs/TabPanel.js +2 -2
  140. package/dist/esm/components/Tabs/Tabs.js +4 -7
  141. package/dist/esm/components/TextareaInput/TextareaInput.js +2 -2
  142. package/dist/esm/components/Toast/Toast.js +16 -24
  143. package/dist/esm/components/Toggle/Toggle.js +5 -9
  144. package/dist/esm/components/Toggle/styles.js +10 -8
  145. package/dist/esm/components/index.js +6 -20
  146. package/dist/esm/hooks/use-breakpoint.js +1 -1
  147. package/dist/esm/providers/IconsProvider.js +1 -1
  148. package/dist/esm/providers/index.js +3 -1
  149. package/dist/hooks/use-breakpoint.js +1 -1
  150. package/dist/providers/IconsProvider.d.ts +1 -1
  151. package/dist/providers/index.d.ts +3 -1
  152. package/dist/providers/index.js +3 -1
  153. package/dist/styled.native.d.ts +3012 -3023
  154. package/package.json +3 -3
  155. package/dist/components/CTAButton/CTAButton.d.ts +0 -20
  156. package/dist/components/CTAButton/CTAButton.js +0 -119
  157. package/dist/components/CTAButton/index.d.ts +0 -1
  158. package/dist/components/CTAButton/index.js +0 -8
  159. package/dist/components/CTALink/CTALink.d.ts +0 -11
  160. package/dist/components/CTALink/CTALink.js +0 -23
  161. package/dist/components/CTALink/index.d.ts +0 -1
  162. package/dist/components/CTALink/index.js +0 -7
  163. package/dist/components/DescriptionList/DescriptionList.d.ts +0 -10
  164. package/dist/components/DescriptionList/DescriptionList.js +0 -44
  165. package/dist/components/DescriptionList/index.d.ts +0 -1
  166. package/dist/components/DescriptionList/index.js +0 -6
  167. package/dist/components/DescriptionList/styled.d.ts +0 -570
  168. package/dist/components/DescriptionList/styled.js +0 -86
  169. package/dist/components/Display0/Display0.d.ts +0 -5
  170. package/dist/components/Display0/Display0.js +0 -73
  171. package/dist/components/Display0/index.d.ts +0 -1
  172. package/dist/components/Display0/index.js +0 -5
  173. package/dist/components/Display1/Display1.d.ts +0 -5
  174. package/dist/components/Display1/Display1.js +0 -73
  175. package/dist/components/Display1/index.d.ts +0 -1
  176. package/dist/components/Display1/index.js +0 -5
  177. package/dist/components/Display2/Display2.d.ts +0 -5
  178. package/dist/components/Display2/Display2.js +0 -73
  179. package/dist/components/Display2/index.d.ts +0 -1
  180. package/dist/components/Display2/index.js +0 -5
  181. package/dist/components/Display3/Display3.d.ts +0 -5
  182. package/dist/components/Display3/Display3.js +0 -73
  183. package/dist/components/Display3/index.d.ts +0 -1
  184. package/dist/components/Display3/index.js +0 -5
  185. package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +0 -18
  186. package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.js +0 -52
  187. package/dist/components/ErrorSummaryNotification/index.d.ts +0 -1
  188. package/dist/components/ErrorSummaryNotification/index.js +0 -5
  189. package/dist/components/FilterSelect/FilterSelect.d.ts +0 -17
  190. package/dist/components/FilterSelect/FilterSelect.js +0 -88
  191. package/dist/components/FilterSelect/index.d.ts +0 -1
  192. package/dist/components/FilterSelect/index.js +0 -5
  193. package/dist/components/Heading1/Heading1.d.ts +0 -5
  194. package/dist/components/Heading1/Heading1.js +0 -73
  195. package/dist/components/Heading1/index.d.ts +0 -1
  196. package/dist/components/Heading1/index.js +0 -5
  197. package/dist/components/Heading2/Heading2.d.ts +0 -5
  198. package/dist/components/Heading2/Heading2.js +0 -73
  199. package/dist/components/Heading2/index.d.ts +0 -1
  200. package/dist/components/Heading2/index.js +0 -5
  201. package/dist/components/Heading3/Heading3.d.ts +0 -5
  202. package/dist/components/Heading3/Heading3.js +0 -73
  203. package/dist/components/Heading3/index.d.ts +0 -1
  204. package/dist/components/Heading3/index.js +0 -5
  205. package/dist/components/Heading4/Heading4.d.ts +0 -5
  206. package/dist/components/Heading4/Heading4.js +0 -73
  207. package/dist/components/Heading4/index.d.ts +0 -1
  208. package/dist/components/Heading4/index.js +0 -5
  209. package/dist/components/Label/Label.d.ts +0 -7
  210. package/dist/components/Label/Label.js +0 -51
  211. package/dist/components/Label/index.d.ts +0 -1
  212. package/dist/components/Label/index.js +0 -5
  213. package/dist/components/Lead/Lead.d.ts +0 -7
  214. package/dist/components/Lead/Lead.js +0 -53
  215. package/dist/components/Lead/index.d.ts +0 -1
  216. package/dist/components/Lead/index.js +0 -5
  217. package/dist/components/NavHeader/IconButton.d.ts +0 -15
  218. package/dist/components/NavHeader/IconButton.js +0 -21
  219. package/dist/components/SkeletonCTA/SkeletonCTA.d.ts +0 -6
  220. package/dist/components/SkeletonCTA/SkeletonCTA.js +0 -42
  221. package/dist/components/SkeletonCTA/index.d.ts +0 -1
  222. package/dist/components/SkeletonCTA/index.js +0 -5
  223. package/dist/components/Small/Small.d.ts +0 -576
  224. package/dist/components/Small/Small.js +0 -39
  225. package/dist/components/Small/index.d.ts +0 -1
  226. package/dist/components/Small/index.js +0 -5
  227. package/dist/components/TextGroup/TextGroup.d.ts +0 -3
  228. package/dist/components/TextGroup/TextGroup.js +0 -43
  229. package/dist/components/TextGroup/index.d.ts +0 -1
  230. package/dist/components/TextGroup/index.js +0 -5
  231. package/dist/components/TextLink/TextLink.d.ts +0 -8
  232. package/dist/components/TextLink/TextLink.js +0 -75
  233. package/dist/components/TextLink/index.d.ts +0 -1
  234. package/dist/components/TextLink/index.js +0 -5
  235. package/dist/esm/components/CTAButton/CTAButton.js +0 -90
  236. package/dist/esm/components/CTAButton/index.js +0 -1
  237. package/dist/esm/components/CTALink/CTALink.js +0 -18
  238. package/dist/esm/components/CTALink/index.js +0 -1
  239. package/dist/esm/components/DescriptionList/DescriptionList.js +0 -40
  240. package/dist/esm/components/DescriptionList/index.js +0 -1
  241. package/dist/esm/components/DescriptionList/styled.js +0 -58
  242. package/dist/esm/components/Display0/Display0.js +0 -46
  243. package/dist/esm/components/Display0/index.js +0 -1
  244. package/dist/esm/components/Display1/Display1.js +0 -46
  245. package/dist/esm/components/Display1/index.js +0 -1
  246. package/dist/esm/components/Display2/Display2.js +0 -46
  247. package/dist/esm/components/Display2/index.js +0 -1
  248. package/dist/esm/components/Display3/Display3.js +0 -46
  249. package/dist/esm/components/Display3/index.js +0 -1
  250. package/dist/esm/components/ErrorSummaryNotification/ErrorSummaryNotification.js +0 -49
  251. package/dist/esm/components/ErrorSummaryNotification/index.js +0 -1
  252. package/dist/esm/components/FilterSelect/FilterSelect.js +0 -61
  253. package/dist/esm/components/FilterSelect/index.js +0 -1
  254. package/dist/esm/components/Heading1/Heading1.js +0 -46
  255. package/dist/esm/components/Heading1/index.js +0 -1
  256. package/dist/esm/components/Heading2/Heading2.js +0 -46
  257. package/dist/esm/components/Heading2/index.js +0 -1
  258. package/dist/esm/components/Heading3/Heading3.js +0 -46
  259. package/dist/esm/components/Heading3/index.js +0 -1
  260. package/dist/esm/components/Heading4/Heading4.js +0 -46
  261. package/dist/esm/components/Heading4/index.js +0 -1
  262. package/dist/esm/components/Label/Label.js +0 -25
  263. package/dist/esm/components/Label/index.js +0 -1
  264. package/dist/esm/components/Lead/Lead.js +0 -27
  265. package/dist/esm/components/Lead/index.js +0 -1
  266. package/dist/esm/components/NavHeader/IconButton.js +0 -17
  267. package/dist/esm/components/SkeletonCTA/SkeletonCTA.js +0 -35
  268. package/dist/esm/components/SkeletonCTA/index.js +0 -1
  269. package/dist/esm/components/Small/Small.js +0 -13
  270. package/dist/esm/components/Small/index.js +0 -1
  271. package/dist/esm/components/TextGroup/TextGroup.js +0 -39
  272. package/dist/esm/components/TextGroup/index.js +0 -1
  273. package/dist/esm/components/TextLink/TextLink.js +0 -49
  274. package/dist/esm/components/TextLink/index.js +0 -1
  275. package/dist/esm/providers/types.js +0 -1
  276. package/dist/providers/types.d.ts +0 -5
  277. package/dist/providers/types.js +0 -2
@@ -8,22 +8,24 @@ var element_core_1 = require("@ovotech/element-core");
8
8
  var react_native_1 = require("react-native");
9
9
  var styled_native_1 = __importDefault(require("../../styled.native"));
10
10
  exports.StyledWrapper = styled_native_1.default.TouchableOpacity(function (_a) {
11
- var core = _a.theme.core, hasLabel = _a.hasLabel, inline = _a.inline, labelPosition = _a.labelPosition;
12
- return "\n width: ".concat(hasLabel ? (inline ? undefined : '100%') : (0, element_core_1.numToPx)(core.space[11]), ";\n display: flex;\n flex-direction: row").concat(labelPosition === 'left' ? '' : '-reverse', ";\n justify-content: space-between;\n position: relative;\n ");
11
+ var theme = _a.theme, hasLabel = _a.hasLabel, inline = _a.inline, labelPosition = _a.labelPosition;
12
+ return "\n width: ".concat(hasLabel ? (inline ? undefined : '100%') : (0, element_core_1.numToPx)(theme.space[1100]), ";\n display: flex;\n flex-direction: row").concat(labelPosition === 'left' ? '' : '-reverse', ";\n justify-content: space-between;\n position: relative;\n ");
13
13
  });
14
14
  exports.StyledToggleInputWrapper = styled_native_1.default.View(function (_a) {
15
- var core = _a.theme.core, labelPosition = _a.labelPosition;
16
- return "\n width: ".concat((0, element_core_1.numToPx)(core.space[11]), ";\n height: ").concat((0, element_core_1.numToPx)(core.space[6]), ";\n ").concat(labelPosition
15
+ var theme = _a.theme, labelPosition = _a.labelPosition;
16
+ return "\n width: ".concat((0, element_core_1.numToPx)(theme.space[1100]), ";\n height: ").concat((0, element_core_1.numToPx)(theme.space[600]), ";\n ").concat(labelPosition
17
17
  ? labelPosition === 'left'
18
18
  ? 'margin-left: 10px;'
19
19
  : 'margin-right: 10px;'
20
20
  : null, "\n ");
21
21
  });
22
22
  exports.StyledToggleInput = styled_native_1.default.View(function (_a) {
23
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, checked = _a.checked;
24
- return "\n width: ".concat((0, element_core_1.numToPx)(core.space[11]), ";\n height: ").concat((0, element_core_1.numToPx)(core.space[6]), ";\n justify-content: center;\n border-radius: ").concat((0, element_core_1.numToPx)(core.radius.large), ";\n background: ").concat(checked ? semantic.focus.outline : semantic.message.secondary, ";\n ");
23
+ var theme = _a.theme, checked = _a.checked;
24
+ return "\n width: ".concat((0, element_core_1.numToPx)(theme.space[1100]), ";\n height: ").concat((0, element_core_1.numToPx)(theme.space[600]), ";\n justify-content: center;\n border-radius: ").concat((0, element_core_1.numToPx)(theme.border.radius.lg), ";\n background: ").concat(checked
25
+ ? theme.color.outline.outer
26
+ : theme.color.surface.onSurfaceVariant, ";\n ");
25
27
  });
26
28
  exports.StyledToggleDot = (0, styled_native_1.default)(react_native_1.Animated.View)(function (_a) {
27
- var core = _a.theme.core, checked = _a.checked;
28
- return "\n position: absolute;\n width: ".concat((0, element_core_1.numToPx)(core.space[4]), ";\n height: ").concat((0, element_core_1.numToPx)(core.space[4]), ";\n border-radius: ").concat((0, element_core_1.numToPx)(core.space[4]), ";\n background-color: ").concat(checked ? core.color.brand.white : core.color.neutral.lighter, ";\n");
29
+ var theme = _a.theme, checked = _a.checked;
30
+ return "\n position: absolute;\n width: ".concat((0, element_core_1.numToPx)(theme.space[400]), ";\n height: ").concat((0, element_core_1.numToPx)(theme.space[400]), ";\n border-radius: ").concat((0, element_core_1.numToPx)(theme.space[400]), ";\n background-color: ").concat(checked ? theme.color.brand.onBrand : theme.color.surface.dim, ";\n");
29
31
  });
@@ -4,33 +4,22 @@ export * from './ActionList';
4
4
  export * from './Badge';
5
5
  export * from './Card';
6
6
  export * from './Checkbox';
7
- export * from './CTAButton';
8
- export * from './CTALink';
7
+ export * from './Button';
8
+ export * from './Link';
9
9
  export * from './CurrencyField';
10
10
  export * from './CurrencyInput';
11
11
  export * from './DataTable';
12
12
  export * from './DateField';
13
- export * from './DescriptionList';
14
13
  export * from './Disclosure';
15
- export * from './Display0';
16
- export * from './Display1';
17
- export * from './Display2';
18
- export * from './Display3';
14
+ export * from './Display';
19
15
  export * from './Divider';
20
16
  export * from './Em';
21
17
  export * from './EmailField';
22
18
  export * from './EmailInput';
23
- export * from './ErrorSummaryNotification';
24
19
  export * from './Field';
25
- export * from './FilterSelect';
26
20
  export * from './Grid';
27
- export * from './Heading1';
28
- export * from './Heading2';
29
- export * from './Heading3';
30
- export * from './Heading4';
21
+ export * from './Heading';
31
22
  export * from './Icon';
32
- export * from './Label';
33
- export * from './Lead';
34
23
  export * from './LineThrough';
35
24
  export * from './List';
36
25
  export * from './Margin';
@@ -47,10 +36,9 @@ export * from './Radio';
47
36
  export * from './SegmentedControls';
48
37
  export * from './SelectField';
49
38
  export * from './SkeletonCircle';
50
- export * from './SkeletonCTA';
39
+ export * from './SkeletonButton';
51
40
  export * from './SkeletonHeading';
52
41
  export * from './SkeletonText';
53
- export * from './Small';
54
42
  export * from './Spinner';
55
43
  export * from './Stack';
56
44
  export * from './Strong';
@@ -58,10 +46,8 @@ export * from './Tabs';
58
46
  export * from './TextareaField';
59
47
  export * from './TextareaInput';
60
48
  export * from './TextField';
61
- export * from './TextGroup';
62
49
  export * from './TextInput';
63
- export * from './TextLink';
64
50
  export * from './Toggle';
65
51
  export * from './Toast';
66
- export * from './ProductCarousel';
67
52
  export * from './RadioCard';
53
+ export * from './Pictogram';
@@ -20,33 +20,22 @@ __exportStar(require("./ActionList"), exports);
20
20
  __exportStar(require("./Badge"), exports);
21
21
  __exportStar(require("./Card"), exports);
22
22
  __exportStar(require("./Checkbox"), exports);
23
- __exportStar(require("./CTAButton"), exports);
24
- __exportStar(require("./CTALink"), exports);
23
+ __exportStar(require("./Button"), exports);
24
+ __exportStar(require("./Link"), exports);
25
25
  __exportStar(require("./CurrencyField"), exports);
26
26
  __exportStar(require("./CurrencyInput"), exports);
27
27
  __exportStar(require("./DataTable"), exports);
28
28
  __exportStar(require("./DateField"), exports);
29
- __exportStar(require("./DescriptionList"), exports);
30
29
  __exportStar(require("./Disclosure"), exports);
31
- __exportStar(require("./Display0"), exports);
32
- __exportStar(require("./Display1"), exports);
33
- __exportStar(require("./Display2"), exports);
34
- __exportStar(require("./Display3"), exports);
30
+ __exportStar(require("./Display"), exports);
35
31
  __exportStar(require("./Divider"), exports);
36
32
  __exportStar(require("./Em"), exports);
37
33
  __exportStar(require("./EmailField"), exports);
38
34
  __exportStar(require("./EmailInput"), exports);
39
- __exportStar(require("./ErrorSummaryNotification"), exports);
40
35
  __exportStar(require("./Field"), exports);
41
- __exportStar(require("./FilterSelect"), exports);
42
36
  __exportStar(require("./Grid"), exports);
43
- __exportStar(require("./Heading1"), exports);
44
- __exportStar(require("./Heading2"), exports);
45
- __exportStar(require("./Heading3"), exports);
46
- __exportStar(require("./Heading4"), exports);
37
+ __exportStar(require("./Heading"), exports);
47
38
  __exportStar(require("./Icon"), exports);
48
- __exportStar(require("./Label"), exports);
49
- __exportStar(require("./Lead"), exports);
50
39
  __exportStar(require("./LineThrough"), exports);
51
40
  __exportStar(require("./List"), exports);
52
41
  __exportStar(require("./Margin"), exports);
@@ -63,10 +52,9 @@ __exportStar(require("./Radio"), exports);
63
52
  __exportStar(require("./SegmentedControls"), exports);
64
53
  __exportStar(require("./SelectField"), exports);
65
54
  __exportStar(require("./SkeletonCircle"), exports);
66
- __exportStar(require("./SkeletonCTA"), exports);
55
+ __exportStar(require("./SkeletonButton"), exports);
67
56
  __exportStar(require("./SkeletonHeading"), exports);
68
57
  __exportStar(require("./SkeletonText"), exports);
69
- __exportStar(require("./Small"), exports);
70
58
  __exportStar(require("./Spinner"), exports);
71
59
  __exportStar(require("./Stack"), exports);
72
60
  __exportStar(require("./Strong"), exports);
@@ -74,10 +62,8 @@ __exportStar(require("./Tabs"), exports);
74
62
  __exportStar(require("./TextareaField"), exports);
75
63
  __exportStar(require("./TextareaInput"), exports);
76
64
  __exportStar(require("./TextField"), exports);
77
- __exportStar(require("./TextGroup"), exports);
78
65
  __exportStar(require("./TextInput"), exports);
79
- __exportStar(require("./TextLink"), exports);
80
66
  __exportStar(require("./Toggle"), exports);
81
67
  __exportStar(require("./Toast"), exports);
82
- __exportStar(require("./ProductCarousel"), exports);
83
68
  __exportStar(require("./RadioCard"), exports);
69
+ __exportStar(require("./Pictogram"), exports);
@@ -29,7 +29,7 @@ import { Component, useCallback, useContext, useEffect, useMemo, useState, } fro
29
29
  import Animated, { interpolateColor, runOnUI, useAnimatedStyle, useDerivedValue, useSharedValue, withTiming, } from 'react-native-reanimated';
30
30
  import { useLayout } from '../../hooks/use-layout';
31
31
  import { ThemeContext } from '../../styled.native';
32
- import { Heading4 } from '../Heading4';
32
+ import { Heading4 } from '../Heading';
33
33
  import { AccordionGroupContext } from './Group';
34
34
  import { AccordionIcon } from './Icon';
35
35
  import { StyledAccordion, StyledAccordionHeader, StyledContainer, } from './styles';
@@ -50,13 +50,16 @@ export function withAnimated(WrappedComponent) {
50
50
  return Animated.createAnimatedComponent(WithAnimated);
51
51
  }
52
52
  export var Accordion = function (_a) {
53
- var _b = _a.expanded, expanded = _b === void 0 ? false : _b, first = _a.first, last = _a.last, title = _a.title, children = _a.children, onToggle = _a.onToggle;
54
- var _c = useContext(ThemeContext), core = _c.core, semantic = _c.semantic;
53
+ var _b = _a.expanded, expanded = _b === void 0 ? false : _b, first = _a.first, last = _a.last, title = _a.title, children = _a.children, onToggle = _a.onToggle, _c = _a.variant, variant = _c === void 0 ? 'default' : _c;
54
+ var theme = useContext(ThemeContext);
55
55
  var Header = useContext(AccordionGroupContext).Header;
56
56
  var AccordionHeading = Header !== null && Header !== void 0 ? Header : Heading4;
57
57
  var AnimatedHeading = useMemo(function () { return withAnimated(AccordionHeading); }, [AccordionHeading]);
58
58
  var _d = useLayout(0), layout = _d[0], onLayout = _d[1];
59
59
  var _e = useState(expanded), open = _e[0], setOpen = _e[1];
60
+ var initialHeadingColor = variant === 'default'
61
+ ? theme.color.brand.brand
62
+ : theme.color.surface.onSurface;
60
63
  var handleHeightContent = useMemo(function () { return layout.height || 100; }, [layout.height]);
61
64
  var size = useSharedValue(handleHeightContent);
62
65
  useEffect(function () {
@@ -91,16 +94,15 @@ export var Accordion = function (_a) {
91
94
  }, [handleHeightContent, open, size]);
92
95
  var containerAnimatedStyle = useMemo(function () { return [{ overflow: 'hidden' }, style]; }, [style]);
93
96
  var headerStyle = useAnimatedStyle(function () { return ({
94
- color: interpolateColor(progress.value, [0, 1], [semantic.message.branded, semantic.message.base]),
97
+ color: interpolateColor(progress.value, [0, 1], [initialHeadingColor, theme.color.surface.onSurface]),
95
98
  }); }, [progress]);
96
- return (_jsxs(StyledAccordion, { first: first, last: last, isExpanded: open, children: [_jsxs(StyledAccordionHeader, { accessibilityState: { expanded: open }, onPress: toggleOpen, testID: "accordionTitle", children: [_jsx(AnimatedHeading, { style: [
99
+ return (_jsxs(StyledAccordion, { first: first, last: last, isExpanded: open, "$variant": variant, children: [_jsxs(StyledAccordionHeader, { accessibilityState: { expanded: open }, onPress: toggleOpen, testID: "accordionTitle", children: [_jsx(AnimatedHeading, { style: [
97
100
  headerStyle,
98
101
  {
99
- paddingTop: core.space[1],
100
- paddingRight: core.space[3],
102
+ paddingRight: theme.space[300],
101
103
  marginTop: 0,
102
104
  marginBottom: 0,
103
105
  flexShrink: 1,
104
106
  },
105
- ], children: title }), _jsx(AccordionIcon, { animationTiming: progress })] }), _jsx(Animated.View, { style: containerAnimatedStyle, children: _jsx(StyledContainer, { onLayout: onLayout, children: children }) })] }));
107
+ ], children: title }), _jsx(AccordionIcon, { animationTiming: progress, "$variant": variant })] }), _jsx(Animated.View, { style: containerAnimatedStyle, children: _jsx(StyledContainer, { onLayout: onLayout, children: children }) })] }));
106
108
  };
@@ -6,11 +6,14 @@ import { ThemeContext } from '../../styled.native';
6
6
  var OVO_LOGO_ANGLE = 105;
7
7
  var AnimatedPath = Animated.createAnimatedComponent(Path);
8
8
  export function AccordionIcon(_a) {
9
- var animationTiming = _a.animationTiming;
10
- var _b = useContext(ThemeContext), core = _b.core, semantic = _b.semantic;
9
+ var animationTiming = _a.animationTiming, $variant = _a.$variant;
10
+ var color = useContext(ThemeContext).color;
11
+ var initialBgColor = $variant === 'default' ? color.surface.borderDim : color.brand.dark;
12
+ var expandedBgColor = $variant === 'default' ? color.brand.brand : color.brand.dark;
13
+ var initialIconColor = $variant === 'default' ? color.surface.onSurface : color.brand.onBrand;
11
14
  var outerAnimatedStyles = useAnimatedStyle(function () { return ({
12
- backgroundColor: interpolateColor(animationTiming.value, [0, 1], [semantic.surface.cutout, semantic.message.branded]),
13
- height: 36 - animationTiming.value * 4,
15
+ backgroundColor: interpolateColor(animationTiming.value, [0, 1], [initialBgColor, expandedBgColor]),
16
+ height: 32 - animationTiming.value,
14
17
  margin: 2 * animationTiming.value,
15
18
  transform: [{ rotateZ: animationTiming.value * -OVO_LOGO_ANGLE + 'deg' }],
16
19
  }); }, [animationTiming]);
@@ -25,11 +28,11 @@ export function AccordionIcon(_a) {
25
28
  }); }, [animationTiming]);
26
29
  return (_jsx(Animated.View, { style: [
27
30
  {
28
- backgroundColor: semantic.surface.cutout,
31
+ backgroundColor: color.surface.dim,
29
32
  aspectRatio: 1,
30
33
  alignItems: 'center',
31
34
  justifyContent: 'center',
32
35
  },
33
36
  outerAnimatedStyles,
34
- ], children: _jsx(Animated.View, { style: innerAnimatedStyles, children: _jsxs(Svg, { width: "16", height: "16", viewBox: "0 0 16 16", children: [_jsx(AnimatedPath, { animatedProps: plusAnimatedProps, d: "M9 9H16V6.99H9V0H6.99V7H0V9.01H7V16.01H9.01V9.01L9 9Z", fill: semantic.message.secondary }), _jsx(AnimatedPath, { animatedProps: minusAnimatedProps, d: "M16.3826 9.66663V7.66663H0.462646V9.66663H16.3826Z", fill: core.color.brand.white })] }) }) }));
37
+ ], children: _jsx(Animated.View, { style: innerAnimatedStyles, children: _jsxs(Svg, { width: "14", height: "14", viewBox: "0 0 16 16", children: [_jsx(AnimatedPath, { animatedProps: plusAnimatedProps, d: "M9 9H16V6.99H9V0H6.99V7H0V9.01H7V16.01H9.01V9.01L9 9Z", fill: initialIconColor }), _jsx(AnimatedPath, { animatedProps: minusAnimatedProps, d: "M16.3826 9.66663V7.66663H0.462646V9.66663H16.3826Z", fill: color.brand.onBrand })] }) }) }));
35
38
  }
@@ -6,26 +6,32 @@ import { numToPx } from '@ovotech/element-core';
6
6
  import Animated from 'react-native-reanimated';
7
7
  import styled, { css } from '../../styled.native';
8
8
  export var StyledAccordion = styled(Animated.View)(function (_a) {
9
- var _b = _a.theme, semantic = _b.semantic, core = _b.core, first = _a.first, last = _a.last, isExpanded = _a.isExpanded;
10
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "], ["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "])), numToPx(core.borderWidth.small), semantic.border.differentiated, isExpanded ? core.color.brand.white : 'transparent', core.transition.fast, first
9
+ var theme = _a.theme, first = _a.first, last = _a.last, isExpanded = _a.isExpanded, $variant = _a.$variant;
10
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "], ["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "])), numToPx(theme.border.width[$variant === 'default' ? 'sm' : 'md']), $variant === 'brand'
11
+ ? theme.color.brand.brand
12
+ : theme.color.surface.borderDim, $variant === 'brand'
13
+ ? theme.color.brand.bright
14
+ : isExpanded
15
+ ? theme.color.brand.onBrand
16
+ : 'transparent', theme.transition.duration.fast, first
11
17
  ? {
12
- borderTopLeftRadius: core.radius.small,
13
- borderTopRightRadius: core.radius.small,
18
+ borderTopLeftRadius: theme.border.radius.md,
19
+ borderTopRightRadius: theme.border.radius.md,
14
20
  }
15
21
  : null, last
16
22
  ? {
17
- borderBottomLeftRadius: core.radius.small,
18
- borderBottomRightRadius: core.radius.small,
19
- borderBottomWidth: core.borderWidth.small,
23
+ borderBottomLeftRadius: theme.border.radius.md,
24
+ borderBottomRightRadius: theme.border.radius.md,
25
+ borderBottomWidth: numToPx(theme.border.width[$variant === 'default' ? 'sm' : 'md']),
20
26
  }
21
27
  : null);
22
28
  });
23
29
  export var StyledAccordionHeader = styled.TouchableOpacity(function (_a) {
24
- var core = _a.theme.core;
25
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "], ["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "])), numToPx(core.space[5]), numToPx(core.space[3]));
30
+ var theme = _a.theme;
31
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "], ["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "])), numToPx(theme.space[500]), numToPx(theme.space[300]));
26
32
  });
27
33
  export var StyledContainer = styled.View(function (_a) {
28
- var core = _a.theme.core;
29
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "])), numToPx(core.space[12]), numToPx(core.space[6]), numToPx(core.space[3]));
34
+ var theme = _a.theme;
35
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "])), numToPx(theme.space[1200]), numToPx(theme.space[600]), numToPx(theme.space[300]));
30
36
  });
31
37
  var templateObject_1, templateObject_2, templateObject_3;
@@ -14,33 +14,33 @@ import { numToPx } from '@ovotech/element-core';
14
14
  import MaskedView from '@react-native-masked-view/masked-view';
15
15
  import { useContext, useEffect } from 'react';
16
16
  import { Image, Pressable, View } from 'react-native';
17
- import { Action, CTAButton, Heading2, Heading3, Icon, Margin, Stack, } from '../';
17
+ import { Action, Button, Heading2, Heading3, Icon, Margin, Stack } from '../';
18
18
  import styled, { ThemeContext } from '../../styled.native';
19
19
  import { P } from '../P';
20
20
  import { IndicatorIconShape } from './IndicatorIconShape';
21
21
  var StyledPressableCard = styled.Pressable(function (_a) {
22
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
23
- var paddingVal = inline ? core.space[4] : core.space[6];
24
- var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
25
- return "\n border-radius: ".concat(inline ? numToPx(core.space[6]) : 0, ";\n background-color: ").concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat(numToPx(paddingVal), ";\n padding-bottom: ").concat(numToPx(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal), ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
22
+ var theme = _a.theme, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
23
+ var paddingVal = inline ? theme.space[400] : theme.space[600];
24
+ var reducedBottomPaddingVal = inline ? theme.space[300] : theme.space[500];
25
+ return "\n border-radius: ".concat(inline ? numToPx(theme.space[600]) : 0, ";\n background-color: ").concat(inverted ? theme.color.surface.dim : theme.color.surface.bright, ";\n padding: ").concat(numToPx(paddingVal), ";\n padding-bottom: ").concat(numToPx(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal), ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
26
26
  });
27
27
  var StyledCard = styled.View(function (_a) {
28
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
29
- var paddingVal = inline ? core.space[4] : core.space[6];
30
- var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
31
- return "\n border-radius: ".concat(inline ? numToPx(core.space[6]) : 0, ";\n background-color: ").concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat(numToPx(paddingVal), ";\n padding-bottom: ").concat(numToPx(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal), ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
28
+ var theme = _a.theme, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
29
+ var paddingVal = inline ? theme.space[400] : theme.space[600];
30
+ var reducedBottomPaddingVal = inline ? theme.space[300] : theme.space[500];
31
+ return "\n border-radius: ".concat(inline ? numToPx(theme.space[600]) : 0, ";\n background-color: ").concat(inverted ? theme.color.surface.onSurface : theme.color.surface.bright, ";\n padding: ").concat(numToPx(paddingVal), ";\n padding-bottom: ").concat(numToPx(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal), ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
32
32
  });
33
33
  var StyledP = styled(P)(function (_a) {
34
- var semantic = _a.theme.semantic, inverted = _a.inverted;
35
- return "\n color: ".concat(inverted ? semantic.inverted.message.base : semantic.message.base, ";\n");
34
+ var theme = _a.theme, inverted = _a.inverted;
35
+ return "\n color: ".concat(inverted ? theme.color.surface.bright : theme.color.surface.onSurface, ";\n");
36
36
  });
37
37
  var CloseIconWrapper = styled.View(function (_a) {
38
- var _b = _a.theme, core = _b.core, semantic = _b.semantic;
39
- return "\n padding: ".concat(numToPx(core.space[2]), ";\n background-color: ").concat(semantic.surface.elevated, ";\n border-radius: ").concat(numToPx(core.space[6]), ";\n");
38
+ var theme = _a.theme;
39
+ return "\n padding: ".concat(numToPx(theme.space[200]), ";\n background-color: ").concat(theme.color.surface.bright, ";\n border-radius: ").concat(numToPx(theme.space[600]), ";\n");
40
40
  });
41
41
  export var ActionCard = function (_a) {
42
42
  var _b = _a.accessibilityLabel, accessibilityLabel = _b === void 0 ? 'image' : _b, _c = _a.actionIconName, actionIconName = _c === void 0 ? 'chevron-right-small' : _c, body = _a.body, buttonTitle = _a.buttonTitle, ctaVariant = _a.ctaVariant, image = _a.image, _d = _a.inline, inline = _d === void 0 ? false : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, onMount = _a.onMount, onPressCloseButton = _a.onPressCloseButton, onPressActionButton = _a.onPressActionButton, onPressIndicator = _a.onPressIndicator, testID = _a.testID, title = _a.title;
43
- var _f = useContext(ThemeContext), core = _f.core, semantic = _f.semantic;
43
+ var theme = useContext(ThemeContext);
44
44
  var hasSingleAction = (onPressActionButton && !onPressIndicator && !onPressCloseButton) ||
45
45
  (onPressIndicator && !onPressActionButton && !onPressCloseButton);
46
46
  var cardAction = hasSingleAction
@@ -55,16 +55,16 @@ export var ActionCard = function (_a) {
55
55
  }
56
56
  }, []);
57
57
  var Heading = inline ? Heading3 : Heading2;
58
- var cardPadding = core.space[inline ? 4 : 6];
58
+ var cardPadding = theme.space[inline ? 400 : 600];
59
59
  var negativeMarginAdjustment = -cardPadding;
60
60
  return (_jsxs(RootContainer, __assign({}, (cardAction ? { onPress: cardAction } : {}), { inline: inline, inverted: inverted, reducedBottomPadding: Boolean(buttonTitle && !ctaVariant), testID: "".concat(testID, "-card"), accessibilityRole: cardAction ? 'button' : 'none', children: [_jsxs(View, { style: { flexDirection: 'row' }, children: [_jsx(View, { style: { flex: 1 }, children: _jsxs(Stack, { spaceBetween: 2, children: [_jsx(Heading, { style: {
61
61
  color: inverted
62
- ? semantic.inverted.message.link
63
- : semantic.message.branded,
62
+ ? theme.color.surface.bright
63
+ : theme.color.brand.brand,
64
64
  paddingRight: image || !onPressCloseButton ? 0 : cardPadding,
65
65
  }, testID: "".concat(testID, "-heading"), children: title }), _jsxs(View, { children: [typeof body === 'string' ? (_jsx(View, { style: {
66
66
  paddingRight: !image && !title && onPressCloseButton ? cardPadding : 0,
67
- }, children: _jsx(StyledP, { inverted: inverted, children: body }) })) : (body), buttonTitle && onPressActionButton && !onPressIndicator ? (!ctaVariant ? (_jsx(Margin, { top: 2, children: _jsx(Action, { inline: true, onPress: onPressActionButton, testID: "".concat(testID, "-button"), iconRight: actionIconName, inverted: inverted, children: buttonTitle }) })) : (_jsx(Margin, { top: 4, children: _jsx(CTAButton, { onPress: onPressActionButton, testID: "".concat(testID, "-button"), variant: ctaVariant, inverted: inverted, children: buttonTitle }) }))) : null] })] }) }), image ? (_jsx(MaskedView, { style: {
67
+ }, children: _jsx(StyledP, { inverted: inverted, children: body }) })) : (body), buttonTitle && onPressActionButton && !onPressIndicator ? (!ctaVariant ? (_jsx(Margin, { top: 2, children: _jsx(Action, { standalone: true, onPress: onPressActionButton, testID: "".concat(testID, "-button"), iconRight: actionIconName, inverted: inverted, children: buttonTitle }) })) : (_jsx(Margin, { top: 4, children: _jsx(Button, { onPress: onPressActionButton, testID: "".concat(testID, "-button"), variant: ctaVariant, inverted: inverted, children: buttonTitle }) }))) : null] })] }) }), image ? (_jsx(MaskedView, { style: {
68
68
  flex: 1,
69
69
  flexDirection: 'row',
70
70
  height: '100%',
@@ -93,9 +93,9 @@ export var ActionCard = function (_a) {
93
93
  position: 'absolute',
94
94
  right: inline ? 8 : 6,
95
95
  bottom: 16,
96
- }, color: semantic.surface.elevated, name: "chevron-right", accessibilityLabel: "chevron-right" })] })) : null] }), onPressCloseButton && !onPressIndicator ? (_jsx(Pressable, { style: {
96
+ }, color: theme.color.surface.bright, name: "chevron-right", accessibilityLabel: "chevron-right" })] })) : null] }), onPressCloseButton && !onPressIndicator ? (_jsx(Pressable, { style: {
97
97
  position: 'absolute',
98
- right: core.space[2],
99
- top: core.space[2],
100
- }, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: _jsx(CloseIconWrapper, { inverted: inverted, children: _jsx(Icon, { name: "cross", size: "16", color: semantic.message.base }) }) })) : null] })));
98
+ right: theme.space[200],
99
+ top: theme.space[200],
100
+ }, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: _jsx(CloseIconWrapper, { inverted: inverted, children: _jsx(Icon, { name: "cross", size: "16", color: theme.color.surface.onSurface }) }) })) : null] })));
101
101
  };
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Svg, { Path, ClipPath, Defs } from 'react-native-svg';
3
3
  import styled from '../../styled.native';
4
4
  var StyledPath = styled(Path)(function (_a) {
5
- var semantic = _a.theme.semantic, color = _a.color;
6
- return "\n fill: ".concat(color !== null && color !== void 0 ? color : semantic.message.branded, "\n");
5
+ var theme = _a.theme, color = _a.color;
6
+ return "\n fill: ".concat(color !== null && color !== void 0 ? color : theme.color.brand.brand, "\n");
7
7
  });
8
8
  export var CloseIconShape = function (_a) {
9
9
  var color = _a.color;
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import Svg, { Path } from 'react-native-svg';
3
3
  import styled from '../../styled.native';
4
4
  var StyledPath = styled(Path)(function (_a) {
5
- var semantic = _a.theme.semantic, color = _a.color;
6
- return "\n fill: ".concat(color !== null && color !== void 0 ? color : semantic.message.branded, "\n");
5
+ var theme = _a.theme, color = _a.color;
6
+ return "\n fill: ".concat(color !== null && color !== void 0 ? color : theme.color.brand.brand, "\n");
7
7
  });
8
8
  export var IndicatorIconShape = function (_a) {
9
9
  var color = _a.color;
@@ -22,12 +22,13 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import { Children, cloneElement, forwardRef, } from 'react';
25
- import { TouchableOpacity, } from 'react-native';
25
+ import { TouchableOpacity, View, } from 'react-native';
26
26
  import { useBreakpoint } from '../../hooks';
27
27
  import { getValidChildren } from '../../utils';
28
- import { StyledActionInner, StyledActionList, StyledActionNodeWrapper, StyledActionText, StyledActionWrapper, StyledLeftIcon, StyledRightIcon, } from './styled';
28
+ import { Badge } from '../Badge';
29
+ import { StyledActionInner, StyledActionList, StyledActionNodeWrapper, StyledActionText, StyledActionWrapper, StyledHintText, StyledLeftIcon, StyledRightIcon, StyledTextWrapper, } from './styled';
29
30
  var ActionList = function (_a) {
30
- var children = _a.children, inverted = _a.inverted, rest = __rest(_a, ["children", "inverted"]);
31
+ var children = _a.children, inverted = _a.inverted, borderBottom = _a.borderBottom, rest = __rest(_a, ["children", "inverted", "borderBottom"]);
31
32
  var validChildren = getValidChildren(children);
32
33
  var childCount = Children.count(validChildren);
33
34
  return (_jsx(StyledActionList, __assign({}, rest, { children: Children.map(validChildren, function (child, index) {
@@ -35,7 +36,7 @@ var ActionList = function (_a) {
35
36
  return cloneElement(child, {
36
37
  fullWidth: true,
37
38
  index: index,
38
- hasBorder: childCount > 1 && index !== childCount - 1,
39
+ hasBorder: (childCount > 1 && index !== childCount - 1) || borderBottom,
39
40
  inverted: (_a = child.props.inverted) !== null && _a !== void 0 ? _a : inverted, // prioritise child prop
40
41
  inList: true,
41
42
  iconRight: (_b = child.props.iconRight) !== null && _b !== void 0 ? _b : 'chevron-right-small',
@@ -43,12 +44,12 @@ var ActionList = function (_a) {
43
44
  }) })));
44
45
  };
45
46
  var ActionWrapper = forwardRef(function (_a, ref) {
46
- var children = _a.children, accessibilityRole = _a.accessibilityRole, accessibilityLabel = _a.accessibilityLabel, accessibilityHint = _a.accessibilityHint, _b = _a.activeOpacity, activeOpacity = _b === void 0 ? 0.75 : _b, fullWidth = _a.fullWidth, _c = _a.hasBorder, hasBorder = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, inList = _a.inList, onPress = _a.onPress, testID = _a.testID, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["children", "accessibilityRole", "accessibilityLabel", "accessibilityHint", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inline", "inList", "onPress", "testID", "standalone"]);
47
- return (_jsx(StyledActionWrapper, __assign({ ref: ref, hasBorder: hasBorder, inverted: inverted, testID: testID }, rest, { children: _jsx(TouchableOpacity, { hitSlop: inline ? 14 : null, activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint, onPress: onPress, children: _jsx(StyledActionInner, { fullWidth: fullWidth, inList: inList, inline: inline, standalone: standalone, children: children }) }) })));
47
+ var children = _a.children, accessibilityRole = _a.accessibilityRole, accessibilityLabel = _a.accessibilityLabel, accessibilityHint = _a.accessibilityHint, _b = _a.activeOpacity, activeOpacity = _b === void 0 ? 0.75 : _b, fullWidth = _a.fullWidth, _c = _a.hasBorder, hasBorder = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, inList = _a.inList, onPress = _a.onPress, testID = _a.testID, _e = _a.standalone, standalone = _e === void 0 ? false : _e, rest = __rest(_a, ["children", "accessibilityRole", "accessibilityLabel", "accessibilityHint", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inList", "onPress", "testID", "standalone"]);
48
+ return (_jsx(StyledActionWrapper, __assign({ ref: ref, hasBorder: hasBorder, inverted: inverted, testID: testID, inList: inList }, rest, { children: _jsx(TouchableOpacity, { activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint, onPress: onPress, children: _jsx(StyledActionInner, { fullWidth: fullWidth, inList: inList, standalone: standalone, children: children }) }) })));
48
49
  });
49
50
  var Action = forwardRef(function (_a, ref) {
50
- var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, accessibilityLabel = _a.accessibilityLabel, accessibilityHint = _a.accessibilityHint, children = _a.children, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, onPress = _a.onPress, testID = _a.testID, iconLeft = _a.iconLeft, iconRight = _a.iconRight, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["accessibilityRole", "accessibilityLabel", "accessibilityHint", "children", "fullWidth", "inverted", "inline", "onPress", "testID", "iconLeft", "iconRight", "standalone"]);
51
+ var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, accessibilityLabel = _a.accessibilityLabel, accessibilityHint = _a.accessibilityHint, children = _a.children, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, onPress = _a.onPress, testID = _a.testID, iconLeft = _a.iconLeft, iconRight = _a.iconRight, _e = _a.standalone, standalone = _e === void 0 ? false : _e, _f = _a.badgeVariant, badgeVariant = _f === void 0 ? 'info' : _f, badgeText = _a.badgeText, hint = _a.hint, rest = __rest(_a, ["accessibilityRole", "accessibilityLabel", "accessibilityHint", "children", "fullWidth", "inverted", "onPress", "testID", "iconLeft", "iconRight", "standalone", "badgeVariant", "badgeText", "hint"]);
51
52
  var smallAndUp = useBreakpoint().smallAndUp;
52
- return (_jsxs(ActionWrapper, __assign({ ref: ref, accessibilityRole: accessibilityRole, accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID, standalone: standalone }, rest, { children: [iconLeft ? (_jsx(StyledLeftIcon, { inverted: inverted, name: iconLeft, size: 16 })) : null, typeof children === 'string' ? (_jsx(StyledActionText, { smallAndUp: smallAndUp, inverted: inverted, inList: rest === null || rest === void 0 ? void 0 : rest.inList, children: children })) : (_jsx(StyledActionNodeWrapper, { children: children })), iconRight ? (_jsx(StyledRightIcon, { inverted: inverted, name: iconRight, size: 16 })) : null] })));
53
+ return (_jsxs(ActionWrapper, __assign({ ref: ref, accessibilityRole: accessibilityRole, accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint, fullWidth: fullWidth, inverted: inverted, onPress: onPress, testID: testID, standalone: standalone, hint: hint, badgeText: badgeText }, rest, { children: [iconLeft ? (_jsx(StyledLeftIcon, { inverted: inverted, name: iconLeft, size: 16 })) : null, _jsxs(View, { children: [typeof children === 'string' ? (_jsxs(StyledTextWrapper, { children: [_jsx(StyledActionText, { smallAndUp: smallAndUp, inverted: inverted, children: children }), badgeText ? (_jsx(Badge, { variant: badgeVariant, children: badgeText })) : null] })) : (_jsx(StyledActionNodeWrapper, { children: children })), hint ? (_jsx(StyledHintText, { inverted: inverted, children: hint })) : null] }), iconRight ? (_jsx(StyledRightIcon, { inverted: inverted, name: iconRight, size: 16 })) : null] })));
53
54
  });
54
55
  export { ActionList, Action };
@@ -5,36 +5,53 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  import { numToPx } from '@ovotech/element-core';
6
6
  import styled, { css } from '../../styled.native';
7
7
  import { styledComponentWithBreakpoints } from '../../utils';
8
+ import { HintText } from '../HintText';
8
9
  import { Icon } from '../Icon';
9
10
  var StyledList = styled.View(function (_a) {
10
- var core = _a.theme.core, smallAndUp = _a.smallAndUp;
11
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "])), numToPx(smallAndUp ? core.space[3] : core.space[2]), numToPx(smallAndUp ? core.space[3] : core.space[2]));
11
+ var theme = _a.theme, smallAndUp = _a.smallAndUp;
12
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "])), numToPx(smallAndUp ? theme.space[300] : theme.space[200]), numToPx(smallAndUp ? theme.space[300] : theme.space[200]));
12
13
  });
13
14
  export var StyledActionList = styledComponentWithBreakpoints(StyledList);
14
15
  export var StyledActionWrapper = styled.View(function (_a) {
15
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBorder = _a.hasBorder, inverted = _a.inverted;
16
- return "\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ".concat(hasBorder ? numToPx(core.borderWidth.small) : 0, ";\n border-bottom-style: solid;\n border-bottom-color: ").concat(inverted ? semantic.inverted.border : semantic.border.graphic, ";\n");
16
+ var theme = _a.theme, hasBorder = _a.hasBorder, inverted = _a.inverted, inList = _a.inList, hint = _a.hint, badgeText = _a.badgeText;
17
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ", ";\n border-bottom-style: solid;\n border-bottom-color: ", ";\n padding: ", " 0;\n "], ["\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ", ";\n border-bottom-style: solid;\n border-bottom-color: ", ";\n padding: ", " 0;\n "])), hasBorder ? numToPx(theme.border.width.sm) : 0, inverted
18
+ ? theme.color.surface.dim
19
+ : theme.color.brand.fixed.onBrand, inList && (hint || badgeText) ? numToPx(theme.space[200]) : 0);
17
20
  });
18
21
  export var StyledActionInner = styled.View(function (_a) {
19
- var fullWidth = _a.fullWidth, inline = _a.inline, standalone = _a.standalone;
20
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "])), fullWidth ? 'space-between' : 'flex-start', inline || standalone ? '' : '44px');
22
+ var fullWidth = _a.fullWidth, standalone = _a.standalone;
23
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "], ["\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "])), fullWidth ? 'space-between' : 'flex-start', standalone ? '' : '44px');
21
24
  });
22
25
  export var StyledActionText = styled.Text(function (_a) {
23
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.inList, inList = _d === void 0 ? false : _d;
26
+ var theme = _a.theme, smallAndUp = _a.smallAndUp, _b = _a.inverted, inverted = _b === void 0 ? false : _b;
24
27
  var fontSize = smallAndUp
25
- ? core.fontSize.body.large
26
- : core.fontSize.body.small;
27
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n flex: ", ";\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n flex: ", ";\n "])), inverted
28
- ? semantic.inverted.message.base
29
- : semantic.message.base, core.fontFamily.bodyBold.native, numToPx(fontSize), numToPx(core.lineHeight.body.small), inList ? 1 : 'none');
28
+ ? theme.font.size.md.mediaQuery.lg
29
+ : theme.font.size.md.mediaQuery.sm;
30
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "])), inverted
31
+ ? theme.color.surface.bright
32
+ : theme.color.surface.onSurface, theme.native.font.family.bold, numToPx(fontSize), numToPx(theme.font.lineHeight.md.mediaQuery.sm));
30
33
  });
31
- export var StyledActionNodeWrapper = styled.View(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex: 1;\n flex-direction: row;\n"], ["\n display: flex;\n flex: 1;\n flex-direction: row;\n"])));
34
+ export var StyledActionNodeWrapper = styled.View(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n flex: 1;\n flex-direction: row;\n"], ["\n display: flex;\n flex: 1;\n flex-direction: row;\n"])));
32
35
  export var StyledRightIcon = styled(Icon)(function (_a) {
33
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, inverted = _a.inverted;
34
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n margin-left: ", ";\n margin-top: 2px; /* compensation for the line-height of the text */\n "], ["\n color: ", ";\n margin-left: ", ";\n margin-top: 2px; /* compensation for the line-height of the text */\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, numToPx(core.space[1]));
36
+ var theme = _a.theme, inverted = _a.inverted;
37
+ return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n margin-left: ", ";\n margin-top: 2px; /* compensation for the line-height of the text */\n "], ["\n color: ", ";\n margin-left: ", ";\n margin-top: 2px; /* compensation for the line-height of the text */\n "])), inverted
38
+ ? theme.color.surface.bright
39
+ : theme.color.surface.onSurface, numToPx(theme.space[100]));
35
40
  });
36
41
  export var StyledLeftIcon = styled(Icon)(function (_a) {
37
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, inverted = _a.inverted;
38
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n margin-right: ", ";\n margin-top: ", ";\n align-self: flex-start;\n "], ["\n color: ", ";\n margin-right: ", ";\n margin-top: ", ";\n align-self: flex-start;\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, numToPx(core.space[1]), numToPx(core.space[1]));
42
+ var theme = _a.theme, inverted = _a.inverted;
43
+ return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n color: ", ";\n margin-right: ", ";\n "], ["\n color: ", ";\n margin-right: ", ";\n "])), inverted
44
+ ? theme.color.surface.bright
45
+ : theme.color.surface.onSurface, numToPx(theme.space[100]));
39
46
  });
40
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
47
+ export var StyledTextWrapper = styled.View(function (_a) {
48
+ var theme = _a.theme;
49
+ return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n gap: ", ";\n "], ["\n flex-direction: row;\n align-items: center;\n gap: ", ";\n "])), numToPx(theme.space[200]));
50
+ });
51
+ export var StyledHintText = styled(HintText)(function (_a) {
52
+ var theme = _a.theme, _b = _a.inverted, inverted = _b === void 0 ? false : _b;
53
+ return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), inverted
54
+ ? theme.color.surface.bright
55
+ : theme.color.surface.onSurfaceVariant);
56
+ });
57
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;