@ovotech/element-native 5.5.0 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/dist/components/Accordion/styles.d.ts +9 -0
  2. package/dist/components/ActionList/Action.d.ts +23 -0
  3. package/dist/components/ActionList/Action.js +29 -0
  4. package/dist/components/ActionList/ActionList.d.ts +11 -27
  5. package/dist/components/ActionList/ActionList.js +9 -25
  6. package/dist/components/ActionList/ActionListItems/DataListItem.d.ts +23 -0
  7. package/dist/components/ActionList/ActionListItems/DataListItem.js +21 -0
  8. package/dist/components/ActionList/ActionListItems/EditableListItem.d.ts +43 -0
  9. package/dist/components/ActionList/ActionListItems/EditableListItem.js +134 -0
  10. package/dist/components/ActionList/ActionListItems/NavigationListItem.d.ts +16 -0
  11. package/dist/components/ActionList/ActionListItems/NavigationListItem.js +30 -0
  12. package/dist/components/ActionList/ActionListItems/ProgressRing.d.ts +7 -0
  13. package/dist/components/ActionList/ActionListItems/ProgressRing.js +66 -0
  14. package/dist/components/ActionList/ActionListItems/ToggleListItem.d.ts +9 -0
  15. package/dist/components/ActionList/ActionListItems/ToggleListItem.js +13 -0
  16. package/dist/components/ActionList/ActionListItems/styles.d.ts +10433 -0
  17. package/dist/components/ActionList/ActionListItems/styles.js +171 -0
  18. package/dist/components/ActionList/components/ActionListHeading.d.ts +9 -0
  19. package/dist/components/ActionList/components/ActionListHeading.js +11 -0
  20. package/dist/components/ActionList/index.d.ts +6 -1
  21. package/dist/components/ActionList/index.js +11 -2
  22. package/dist/components/ActionList/styled.d.ts +1187 -7
  23. package/dist/components/ActionList/styled.js +24 -9
  24. package/dist/components/Badge/Badge.d.ts +3 -0
  25. package/dist/components/Button/Button.js +1 -1
  26. package/dist/components/Button/Button.styles.d.ts +12 -0
  27. package/dist/components/Card/Card.d.ts +7 -4
  28. package/dist/components/Card/Card.js +44 -22
  29. package/dist/components/Card/Card.styles.d.ts +11 -1
  30. package/dist/components/Card/Card.styles.js +7 -11
  31. package/dist/components/Cards/AccountCard/AccountCard.styles.d.ts +24 -0
  32. package/dist/components/Cards/BalanceCard/BalanceCard.styles.d.ts +46 -1
  33. package/dist/components/Cards/BalanceCard/BalanceCard.styles.js +2 -2
  34. package/dist/components/Cards/DisruptiveCard/DisruptiveCard.d.ts +13 -0
  35. package/dist/components/Cards/DisruptiveCard/DisruptiveCard.js +45 -0
  36. package/dist/components/Cards/DisruptiveCard/DisruptiveCard.styles.d.ts +580 -0
  37. package/dist/components/Cards/DisruptiveCard/DisruptiveCard.styles.js +11 -0
  38. package/dist/components/Cards/DisruptiveCard/index.d.ts +1 -0
  39. package/dist/components/Cards/DisruptiveCard/index.js +17 -0
  40. package/dist/components/Cards/HeroImageCard/HeroImageCard.d.ts +12 -0
  41. package/dist/components/Cards/HeroImageCard/HeroImageCard.js +65 -0
  42. package/dist/components/Cards/HeroImageCard/HeroImageCard.styles.d.ts +1741 -0
  43. package/dist/components/Cards/HeroImageCard/HeroImageCard.styles.js +27 -0
  44. package/dist/components/Cards/HeroImageCard/index.d.ts +1 -0
  45. package/dist/components/Cards/HeroImageCard/index.js +17 -0
  46. package/dist/components/Cards/IconDataCard/IconDataCard.styles.d.ts +12 -0
  47. package/dist/components/Cards/IconTextCard/IconTextCard.js +3 -16
  48. package/dist/components/Cards/IconTextCard/IconTextCard.styles.d.ts +10 -576
  49. package/dist/components/Cards/IconTextCard/IconTextCard.styles.js +1 -6
  50. package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.d.ts +14 -0
  51. package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.js +26 -0
  52. package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.d.ts +2903 -0
  53. package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.js +34 -0
  54. package/dist/components/Cards/IllustrationTextCard/index.d.ts +1 -0
  55. package/dist/components/Cards/IllustrationTextCard/index.js +17 -0
  56. package/dist/components/Cards/LinkTextCard/LinkTextCard.d.ts +2 -2
  57. package/dist/components/Cards/LinkTextCard/LinkTextCard.js +7 -6
  58. package/dist/components/Cards/LinkTextCard/LinkTextCard.styles.d.ts +20 -2
  59. package/dist/components/Cards/LinkTextCard/LinkTextCard.styles.js +9 -6
  60. package/dist/components/Cards/ProgressBarCard/ProgressBarCard.styles.d.ts +28 -1
  61. package/dist/components/Cards/QuickLinkCard/QuickLinkCard.d.ts +12 -0
  62. package/dist/components/Cards/QuickLinkCard/QuickLinkCard.js +27 -0
  63. package/dist/components/Cards/QuickLinkCard/QuickLinkCard.styles.d.ts +2897 -0
  64. package/dist/components/Cards/QuickLinkCard/QuickLinkCard.styles.js +31 -0
  65. package/dist/components/Cards/QuickLinkCard/index.d.ts +1 -0
  66. package/dist/components/Cards/QuickLinkCard/index.js +17 -0
  67. package/dist/components/Cards/ServicesImageCard/ServicesImageCard.d.ts +12 -0
  68. package/dist/components/Cards/ServicesImageCard/ServicesImageCard.js +24 -0
  69. package/dist/components/Cards/ServicesImageCard/ServicesImageCard.styles.d.ts +2902 -0
  70. package/dist/components/Cards/ServicesImageCard/ServicesImageCard.styles.js +38 -0
  71. package/dist/components/Cards/ServicesImageCard/index.d.ts +1 -0
  72. package/dist/components/Cards/ServicesImageCard/index.js +17 -0
  73. package/dist/components/Cards/components.d.ts +15 -0
  74. package/dist/components/Cards/components.js +24 -0
  75. package/dist/components/Cards/index.d.ts +5 -0
  76. package/dist/components/Cards/index.js +11 -1
  77. package/dist/components/Cards/shared.styles.d.ts +2835 -505
  78. package/dist/components/Cards/shared.styles.js +18 -2
  79. package/dist/components/Cards/utils.d.ts +1 -0
  80. package/dist/components/Cards/utils.js +13 -1
  81. package/dist/components/Checkbox/Checkbox.d.ts +2 -13
  82. package/dist/components/Checkbox/Checkbox.js +3 -49
  83. package/dist/components/Checkbox/styled.d.ts +3483 -0
  84. package/dist/components/Checkbox/styled.js +52 -0
  85. package/dist/components/Checkbox/types.d.ts +16 -0
  86. package/dist/components/Checkbox/types.js +2 -0
  87. package/dist/components/CurrencyInput/CurrencyInput.d.ts +2 -1
  88. package/dist/components/CurrencyInput/CurrencyInput.js +11 -4
  89. package/dist/components/CurrencyInput/styled.d.ts +2318 -0
  90. package/dist/components/CurrencyInput/styled.js +39 -0
  91. package/dist/components/DataTable/styles.d.ts +39 -0
  92. package/dist/components/Disclosure/Disclosure.d.ts +3 -0
  93. package/dist/components/Divider/Divider.d.ts +1 -1
  94. package/dist/components/Divider/Divider.js +3 -1
  95. package/dist/components/Em/Em.d.ts +3 -0
  96. package/dist/components/EmailInput/EmailInput.d.ts +4 -1
  97. package/dist/components/EmailInput/EmailInput.js +18 -2
  98. package/dist/components/EmptyState/EmptyState.d.ts +2 -0
  99. package/dist/components/EmptyState/EmptyState.js +17 -0
  100. package/dist/components/EmptyState/EmptyState.test.d.ts +1 -0
  101. package/dist/components/EmptyState/EmptyState.test.js +92 -0
  102. package/dist/components/EmptyState/index.d.ts +1 -0
  103. package/dist/components/EmptyState/index.js +17 -0
  104. package/dist/components/EmptyState/styles.d.ts +1156 -0
  105. package/dist/components/EmptyState/styles.js +23 -0
  106. package/dist/components/EmptyState/types.d.ts +18 -0
  107. package/dist/components/EmptyState/types.js +2 -0
  108. package/dist/components/ErrorText/ErrorText.d.ts +3 -0
  109. package/dist/components/Field/Field.d.ts +3 -2
  110. package/dist/components/Field/Field.js +3 -2
  111. package/dist/components/Grid/Col.d.ts +3 -0
  112. package/dist/components/HintText/HintText.d.ts +3 -0
  113. package/dist/components/Input/Input.d.ts +2 -1
  114. package/dist/components/Input/Input.js +6 -97
  115. package/dist/components/Input/styled.d.ts +1747 -0
  116. package/dist/components/Input/styled.js +96 -0
  117. package/dist/components/LabelText/LabelText.d.ts +3 -0
  118. package/dist/components/LargeValueReference/LargeValueReference.d.ts +11 -0
  119. package/dist/components/LargeValueReference/LargeValueReference.js +49 -0
  120. package/dist/components/LargeValueReference/index.d.ts +1 -0
  121. package/dist/components/LargeValueReference/index.js +17 -0
  122. package/dist/components/LargeValueReference/styles.d.ts +1741 -0
  123. package/dist/components/LargeValueReference/styles.js +29 -0
  124. package/dist/components/LineThrough/LineThrough.d.ts +3 -0
  125. package/dist/components/List/styled.d.ts +12 -0
  126. package/dist/components/Margin/Margin.d.ts +3 -0
  127. package/dist/components/NavHeader/NavHeader.styles.d.ts +33 -0
  128. package/dist/components/Notification/Notification.styles.d.ts +27 -0
  129. package/dist/components/PasswordInput/PasswordInput.styled.d.ts +4 -3
  130. package/dist/components/PasswordInput/PasswordInput.styled.js +5 -3
  131. package/dist/components/PasswordInput/PasswordVisibilityToggle.js +2 -8
  132. package/dist/components/RadioCard/RadioCard.d.ts +2 -1
  133. package/dist/components/RadioCard/RadioCard.js +7 -57
  134. package/dist/components/RadioCard/RadioCard.styles.d.ts +2901 -0
  135. package/dist/components/RadioCard/RadioCard.styles.js +97 -0
  136. package/dist/components/SelectField/Select.d.ts +5 -579
  137. package/dist/components/SelectField/Select.js +7 -107
  138. package/dist/components/SelectField/SelectField.d.ts +2 -2
  139. package/dist/components/SelectField/SelectField.js +2 -2
  140. package/dist/components/SelectField/styled.d.ts +4642 -0
  141. package/dist/components/SelectField/styled.js +118 -0
  142. package/dist/components/SkeletonText/SkeletonText.js +4 -4
  143. package/dist/components/Strong/Strong.d.ts +3 -0
  144. package/dist/components/SubLabelText/SubLabelText.d.ts +3 -0
  145. package/dist/components/Tabs/Tab.d.ts +3 -0
  146. package/dist/components/TextareaInput/TextareaInput.js +12 -6
  147. package/dist/components/Toggle/Toggle.d.ts +3 -1
  148. package/dist/components/Toggle/Toggle.js +4 -6
  149. package/dist/components/Toggle/styles.d.ts +13 -0
  150. package/dist/components/Toggle/styles.js +3 -3
  151. package/dist/components/index.d.ts +3 -0
  152. package/dist/components/index.js +3 -0
  153. package/dist/esm/components/ActionList/Action.js +26 -0
  154. package/dist/esm/components/ActionList/ActionList.js +12 -28
  155. package/dist/esm/components/ActionList/ActionListItems/DataListItem.js +17 -0
  156. package/dist/esm/components/ActionList/ActionListItems/EditableListItem.js +131 -0
  157. package/dist/esm/components/ActionList/ActionListItems/NavigationListItem.js +26 -0
  158. package/dist/esm/components/ActionList/ActionListItems/ProgressRing.js +29 -0
  159. package/dist/esm/components/ActionList/ActionListItems/ToggleListItem.js +9 -0
  160. package/dist/esm/components/ActionList/ActionListItems/styles.js +135 -0
  161. package/dist/esm/components/ActionList/components/ActionListHeading.js +7 -0
  162. package/dist/esm/components/ActionList/index.js +6 -1
  163. package/dist/esm/components/ActionList/styled.js +23 -8
  164. package/dist/esm/components/Button/Button.js +1 -1
  165. package/dist/esm/components/Card/Card.js +45 -23
  166. package/dist/esm/components/Card/Card.styles.js +8 -12
  167. package/dist/esm/components/Cards/BalanceCard/BalanceCard.styles.js +2 -2
  168. package/dist/esm/components/Cards/DisruptiveCard/DisruptiveCard.js +41 -0
  169. package/dist/esm/components/Cards/DisruptiveCard/DisruptiveCard.styles.js +5 -0
  170. package/dist/esm/components/Cards/DisruptiveCard/index.js +1 -0
  171. package/dist/esm/components/Cards/HeroImageCard/HeroImageCard.js +28 -0
  172. package/dist/esm/components/Cards/HeroImageCard/HeroImageCard.styles.js +21 -0
  173. package/dist/esm/components/Cards/HeroImageCard/index.js +1 -0
  174. package/dist/esm/components/Cards/IconTextCard/IconTextCard.js +5 -18
  175. package/dist/esm/components/Cards/IconTextCard/IconTextCard.styles.js +0 -5
  176. package/dist/esm/components/Cards/IllustrationTextCard/IllustrationTextCard.js +22 -0
  177. package/dist/esm/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.js +28 -0
  178. package/dist/esm/components/Cards/IllustrationTextCard/index.js +1 -0
  179. package/dist/esm/components/Cards/LinkTextCard/LinkTextCard.js +7 -6
  180. package/dist/esm/components/Cards/LinkTextCard/LinkTextCard.styles.js +9 -6
  181. package/dist/esm/components/Cards/QuickLinkCard/QuickLinkCard.js +23 -0
  182. package/dist/esm/components/Cards/QuickLinkCard/QuickLinkCard.styles.js +25 -0
  183. package/dist/esm/components/Cards/QuickLinkCard/index.js +1 -0
  184. package/dist/esm/components/Cards/ServicesImageCard/ServicesImageCard.js +20 -0
  185. package/dist/esm/components/Cards/ServicesImageCard/ServicesImageCard.styles.js +32 -0
  186. package/dist/esm/components/Cards/ServicesImageCard/index.js +1 -0
  187. package/dist/esm/components/Cards/components.js +19 -0
  188. package/dist/esm/components/Cards/index.js +5 -0
  189. package/dist/esm/components/Cards/shared.styles.js +17 -1
  190. package/dist/esm/components/Cards/utils.js +11 -0
  191. package/dist/esm/components/Checkbox/Checkbox.js +2 -45
  192. package/dist/esm/components/Checkbox/styled.js +46 -0
  193. package/dist/esm/components/Checkbox/types.js +1 -0
  194. package/dist/esm/components/CurrencyInput/CurrencyInput.js +12 -5
  195. package/dist/esm/components/CurrencyInput/styled.js +33 -0
  196. package/dist/esm/components/Divider/Divider.js +3 -1
  197. package/dist/esm/components/EmailInput/EmailInput.js +18 -2
  198. package/dist/esm/components/EmptyState/EmptyState.js +13 -0
  199. package/dist/esm/components/EmptyState/EmptyState.test.js +90 -0
  200. package/dist/esm/components/EmptyState/index.js +1 -0
  201. package/dist/esm/components/EmptyState/styles.js +17 -0
  202. package/dist/esm/components/EmptyState/types.js +1 -0
  203. package/dist/esm/components/Field/Field.js +3 -2
  204. package/dist/esm/components/Input/Input.js +6 -64
  205. package/dist/esm/components/Input/styled.js +60 -0
  206. package/dist/esm/components/LargeValueReference/LargeValueReference.js +45 -0
  207. package/dist/esm/components/LargeValueReference/index.js +1 -0
  208. package/dist/esm/components/LargeValueReference/styles.js +23 -0
  209. package/dist/esm/components/PasswordInput/PasswordInput.styled.js +5 -3
  210. package/dist/esm/components/PasswordInput/PasswordVisibilityToggle.js +2 -8
  211. package/dist/esm/components/RadioCard/RadioCard.js +5 -52
  212. package/dist/esm/components/RadioCard/RadioCard.styles.js +61 -0
  213. package/dist/esm/components/SelectField/Select.js +7 -74
  214. package/dist/esm/components/SelectField/SelectField.js +3 -3
  215. package/dist/esm/components/SelectField/styled.js +82 -0
  216. package/dist/esm/components/SkeletonText/SkeletonText.js +4 -4
  217. package/dist/esm/components/TextareaInput/TextareaInput.js +12 -6
  218. package/dist/esm/components/Toggle/Toggle.js +4 -6
  219. package/dist/esm/components/Toggle/styles.js +3 -3
  220. package/dist/esm/components/index.js +3 -0
  221. package/dist/esm/hooks/use-font-scaling.js +32 -0
  222. package/dist/esm/index.js +1 -0
  223. package/dist/esm/test/utils.js +12 -0
  224. package/dist/esm/utils/utils.js +12 -1
  225. package/dist/hooks/use-font-scaling.d.ts +26 -0
  226. package/dist/hooks/use-font-scaling.js +35 -0
  227. package/dist/index.d.ts +1 -0
  228. package/dist/index.js +1 -0
  229. package/dist/styled.native.d.ts +18 -0
  230. package/dist/test/utils.d.ts +4 -0
  231. package/dist/test/utils.js +28 -0
  232. package/dist/utils/utils.d.ts +11 -1
  233. package/dist/utils/utils.js +12 -0
  234. package/package.json +4 -4
  235. package/dist/components/ErrorWrapper/styles.d.ts +0 -0
  236. package/dist/components/ErrorWrapper/styles.js +0 -1
  237. package/dist/esm/components/ErrorWrapper/styles.js +0 -1
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.StyledCategory = exports.StyledP = exports.RadioDot = exports.Radio = exports.SelectOption = exports.DropdownContainer = exports.DropdownWrapper = exports.SelectInput = void 0;
37
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
38
+ const styled_native_1 = __importStar(require("../../styled.native"));
39
+ const theme_1 = require("../../theme");
40
+ const utils_1 = require("../../utils");
41
+ const P_1 = require("../P");
42
+ exports.SelectInput = styled_native_1.default.TouchableOpacity(({ theme, hasError, isSelected, size }) => {
43
+ const isSmall = size === 'small';
44
+ let borderColor = 'transparent';
45
+ /* prioritise error and selected states for border, even when focused */
46
+ if (hasError) {
47
+ borderColor = theme.color.alert.error;
48
+ }
49
+ else if (isSelected) {
50
+ borderColor = theme.color.surface.onSurface;
51
+ }
52
+ return (0, styled_native_1.css) `
53
+ flex-direction: row;
54
+ align-items: center;
55
+ background-color: ${theme.color.surface.bright};
56
+ border-color: ${borderColor};
57
+ border-width: ${(0, theme_1.numToPx)(theme.border.width.md)};
58
+ border-radius: ${(0, theme_1.numToPx)(theme.border.radius.md)};
59
+ padding-top: ${(0, theme_1.numToPx)(theme.space[isSmall ? 200 : 400])};
60
+ padding-bottom: ${(0, theme_1.numToPx)(theme.space[isSmall ? 200 : 400])};
61
+ padding-left: ${(0, theme_1.numToPx)(theme.space[400])};
62
+ padding-right: ${(0, theme_1.numToPx)(theme.space[400])};
63
+ min-height: ${(0, theme_1.numToPx)(theme.space[isSmall ? 1100 : 1600])};
64
+ ${(0, utils_1.getShadowCSS)({ theme })}
65
+ `;
66
+ });
67
+ exports.DropdownWrapper = styled_native_1.default.TouchableOpacity(({ theme }) => (0, styled_native_1.css) `
68
+ flex: 1;
69
+ justify-content: center;
70
+ align-items: center;
71
+
72
+ /* 80 is an opacity for hex https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4 */
73
+ background-color: ${theme.color.brand.dark}80;
74
+ `);
75
+ exports.DropdownContainer = (0, styled_native_1.default)(react_native_safe_area_context_1.SafeAreaView)(({ theme }) => (0, styled_native_1.css) `
76
+ width: 95%;
77
+ max-height: 70%;
78
+ border-radius: ${(0, theme_1.numToPx)(theme.border.radius.md)};
79
+ background-color: ${theme.color.surface.bright};
80
+ `);
81
+ exports.SelectOption = styled_native_1.default.TouchableOpacity(({ theme, isLastOption }) => (0, styled_native_1.css) `
82
+ flex-direction: row;
83
+ align-items: center;
84
+ border-bottom-color: ${theme.color.input.borderDim};
85
+ border-bottom-width: ${isLastOption ? 0 : 1}px;
86
+ padding: 0 ${(0, theme_1.numToPx)(theme.space[400])};
87
+ `);
88
+ exports.Radio = styled_native_1.default.View(({ theme, isChecked }) => (0, styled_native_1.css) `
89
+ background-color: ${isChecked
90
+ ? theme.input.color.selectedTint
91
+ : 'transparent'};
92
+ width: ${(0, theme_1.numToPx)(theme.space[600])};
93
+ height: ${(0, theme_1.numToPx)(theme.space[600])};
94
+ margin-left: auto;
95
+ border-radius: ${(0, theme_1.numToPx)(theme.space[600])};
96
+ border-width: ${(0, theme_1.numToPx)(theme.border.width.md)};
97
+ border-color: ${theme.input.color[isChecked ? 'selected' : 'border']};
98
+ `);
99
+ exports.RadioDot = styled_native_1.default.View(({ theme, isChecked }) => (0, styled_native_1.css) `
100
+ background-color: ${theme.input.color.selected};
101
+ position: absolute;
102
+ top: ${(0, theme_1.numToPx)(theme.space[100])};
103
+ width: ${(0, theme_1.numToPx)(theme.space[300])};
104
+ height: ${(0, theme_1.numToPx)(theme.space[300])};
105
+ border-radius: ${(0, theme_1.numToPx)(theme.space[300])};
106
+ align-self: center;
107
+ opacity: ${isChecked ? 1 : 0};
108
+ `);
109
+ exports.StyledP = (0, styled_native_1.default)(P_1.P)(({ theme }) => (0, styled_native_1.css) `
110
+ margin-top: ${(0, theme_1.numToPx)(theme.space[300])};
111
+ margin-bottom: ${(0, theme_1.numToPx)(theme.space[300])};
112
+ `);
113
+ exports.StyledCategory = (0, styled_native_1.default)(P_1.P)(({ theme }) => (0, styled_native_1.css) `
114
+ font-size: ${(0, theme_1.numToPx)(theme.font.size.xs.mediaQuery.lg)};
115
+ color: ${theme.color.surface.onSurface};
116
+ background-color: ${theme.color.surface.surface};
117
+ padding: ${(0, theme_1.numToPx)(theme.space[100])} ${(0, theme_1.numToPx)(theme.space[400])};
118
+ `);
@@ -21,10 +21,10 @@ const hooks_1 = require("../../hooks");
21
21
  const styled_native_1 = __importDefault(require("../../styled.native"));
22
22
  const P_1 = require("../P");
23
23
  const SkeletonAnimation_1 = require("../SkeletonAnimation");
24
- const StyledSkeletonText = styled_native_1.default.View(({ theme, aboveSmallBreakpoint, short, size, lines = 1 }) => {
24
+ const StyledSkeletonText = styled_native_1.default.View(({ theme, aboveSmallBreakpoint, short, size, isLast }) => {
25
25
  return `
26
26
  background-color: ${theme.color.surface.dim};
27
- margin-bottom: ${lines > 1 ? (0, element_core_1.numToPx)(theme.space[200]) : 0};
27
+ margin-bottom: ${isLast ? 0 : (0, element_core_1.numToPx)(theme.space[200])};
28
28
  border-radius: ${(0, element_core_1.numToPx)(theme.border.radius.sm)};
29
29
  height: ${aboveSmallBreakpoint
30
30
  ? (0, element_core_1.numToPx)(theme.font.size.md.mediaQuery.lg)
@@ -37,9 +37,9 @@ const SkeletonText = (_a) => {
37
37
  var { lines = 1, size } = _a, rest = __rest(_a, ["lines", "size"]);
38
38
  const generatedLines = [];
39
39
  const { smallAndUp } = (0, hooks_1.useBreakpoint)();
40
- const hasMultipleLines = lines > 1;
41
40
  for (let i = 1; i <= lines; i++) {
42
- generatedLines.push((0, jsx_runtime_1.jsx)(StyledSkeletonText, { short: hasMultipleLines && i === lines, aboveSmallBreakpoint: smallAndUp, size: size }, `line-${i}`));
41
+ const isLast = i === lines;
42
+ generatedLines.push((0, jsx_runtime_1.jsx)(StyledSkeletonText, { short: lines > 1 && isLast, aboveSmallBreakpoint: smallAndUp, size: size, isLast: isLast }, `line-${i}`));
43
43
  }
44
44
  return (
45
45
  // @ts-ignore styled components stuff
@@ -37,6 +37,7 @@ export declare const Strong: import("styled-components").StyledComponent<typeof
37
37
  "30": string;
38
38
  "40": string;
39
39
  "50": string;
40
+ "55": string;
40
41
  "56": string;
41
42
  "60": string;
42
43
  "70": string;
@@ -79,6 +80,7 @@ export declare const Strong: import("styled-components").StyledComponent<typeof
79
80
  onBrandVariant: string;
80
81
  aiGradientFrom: string;
81
82
  aiGradientTo: string;
83
+ accessible: string;
82
84
  fixed: {
83
85
  brand: string;
84
86
  dark: string;
@@ -87,6 +89,7 @@ export declare const Strong: import("styled-components").StyledComponent<typeof
87
89
  bright: string;
88
90
  onBrand: string;
89
91
  onBrandVariant: string;
92
+ accessible: string;
90
93
  };
91
94
  };
92
95
  outline: {
@@ -42,6 +42,7 @@ declare const SubLabelText: (props: Omit<{
42
42
  "30": string;
43
43
  "40": string;
44
44
  "50": string;
45
+ "55": string;
45
46
  "56": string;
46
47
  "60": string;
47
48
  "70": string;
@@ -84,6 +85,7 @@ declare const SubLabelText: (props: Omit<{
84
85
  onBrandVariant: string;
85
86
  aiGradientFrom: string;
86
87
  aiGradientTo: string;
88
+ accessible: string;
87
89
  fixed: {
88
90
  brand: string;
89
91
  dark: string;
@@ -92,6 +94,7 @@ declare const SubLabelText: (props: Omit<{
92
94
  bright: string;
93
95
  onBrand: string;
94
96
  onBrandVariant: string;
97
+ accessible: string;
95
98
  };
96
99
  };
97
100
  outline: {
@@ -46,6 +46,7 @@ declare const TabTouchable: import("styled-components").StyledComponent<typeof i
46
46
  "30": string;
47
47
  "40": string;
48
48
  "50": string;
49
+ "55": string;
49
50
  "56": string;
50
51
  "60": string;
51
52
  "70": string;
@@ -88,6 +89,7 @@ declare const TabTouchable: import("styled-components").StyledComponent<typeof i
88
89
  onBrandVariant: string;
89
90
  aiGradientFrom: string;
90
91
  aiGradientTo: string;
92
+ accessible: string;
91
93
  fixed: {
92
94
  brand: string;
93
95
  dark: string;
@@ -96,6 +98,7 @@ declare const TabTouchable: import("styled-components").StyledComponent<typeof i
96
98
  bright: string;
97
99
  onBrand: string;
98
100
  onBrandVariant: string;
101
+ accessible: string;
99
102
  };
100
103
  };
101
104
  outline: {
@@ -47,15 +47,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
47
47
  exports.TextareaInput = void 0;
48
48
  const jsx_runtime_1 = require("react/jsx-runtime");
49
49
  const element_core_1 = require("@ovotech/element-core");
50
+ const hooks_1 = require("../../hooks");
50
51
  const styled_native_1 = __importStar(require("../../styled.native"));
51
52
  const Input_1 = require("../Input/Input");
52
- const StyledInput = (0, styled_native_1.default)(Input_1.Input)(({ theme, rows }) => (0, styled_native_1.css) `
53
- padding: ${(0, element_core_1.numToPx)(theme.space[200])};
54
- padding-top: ${(0, element_core_1.numToPx)(theme.space[300])};
55
- height: ${theme.space[800] * rows}px;
56
- `);
53
+ const StyledInput = (0, styled_native_1.default)(Input_1.Input)(({ theme, rows, smallAndUp, }) => {
54
+ const lineHeight = smallAndUp
55
+ ? theme.font.lineHeight.md.mediaQuery.lg
56
+ : theme.font.lineHeight.md.mediaQuery.sm;
57
+ return (0, styled_native_1.css) `
58
+ min-height: ${theme.space[800] * rows}px;
59
+ line-height: ${rows > 1 ? (0, element_core_1.numToPx)(lineHeight) : 'normal'};
60
+ `;
61
+ });
57
62
  const TextareaInput = (_a) => {
58
63
  var { rows = 3, ref } = _a, rest = __rest(_a, ["rows", "ref"]);
59
- return ((0, jsx_runtime_1.jsx)(StyledInput, Object.assign({}, rest, { keyboardType: "default", multiline: true, textAlignVertical: "top", rows: rows, ref: ref })));
64
+ const breakpoints = (0, hooks_1.useBreakpoint)();
65
+ return ((0, jsx_runtime_1.jsx)(StyledInput, Object.assign({}, rest, breakpoints, { keyboardType: "default", multiline: true, textAlignVertical: "top", rows: rows, ref: ref })));
60
66
  };
61
67
  exports.TextareaInput = TextareaInput;
@@ -8,6 +8,8 @@ type ToggleProps = Omit<TouchableOpacityProps, 'children'> & {
8
8
  hint?: ReactNode;
9
9
  labelPosition?: HorizontalPosition;
10
10
  ref?: React.RefObject<View>;
11
+ testID?: string;
12
+ toggleBackgroundColor?: string;
11
13
  };
12
- export declare const Toggle: ({ activeOpacity, checked, label, hint, inline, labelPosition, testID, ref, ...rest }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const Toggle: ({ activeOpacity, checked, label, hint, inline, labelPosition, testID, ref, toggleBackgroundColor, ...rest }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
13
15
  export {};
@@ -20,7 +20,7 @@ const HintText_1 = require("../HintText/HintText");
20
20
  const LabelText_1 = require("../LabelText");
21
21
  const styles_1 = require("./styles");
22
22
  const Input = (_a) => {
23
- var { checked, labelPosition, testID } = _a, rest = __rest(_a, ["checked", "labelPosition", "testID"]);
23
+ var { checked, labelPosition, testID, toggleBackgroundColor } = _a, rest = __rest(_a, ["checked", "labelPosition", "testID", "toggleBackgroundColor"]);
24
24
  const theme = (0, styled_native_1.useTheme)();
25
25
  const leftVal = (0, react_1.useRef)(new react_native_1.Animated.Value(checked ? theme.space[600] : theme.space[100])).current;
26
26
  (0, react_1.useEffect)(() => {
@@ -30,13 +30,11 @@ const Input = (_a) => {
30
30
  useNativeDriver: true,
31
31
  }).start();
32
32
  }, [checked]);
33
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledToggleInputWrapper, Object.assign({ labelPosition: labelPosition }, rest, { children: (0, jsx_runtime_1.jsx)(styles_1.StyledToggleInput, { checked: checked, testID: testID, children: (0, jsx_runtime_1.jsx)(styles_1.StyledToggleDot, { style: {
34
- transform: [{ translateX: leftVal }],
35
- }, checked: checked }) }) })));
33
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledToggleInputWrapper, Object.assign({ labelPosition: labelPosition }, rest, { children: (0, jsx_runtime_1.jsx)(styles_1.StyledToggleInput, { checked: checked, testID: testID, toggleBackgroundColor: toggleBackgroundColor, children: (0, jsx_runtime_1.jsx)(styles_1.StyledToggleDot, { style: { transform: [{ translateX: leftVal }] }, checked: checked }) }) })));
36
34
  };
37
35
  const Toggle = (_a) => {
38
- var { activeOpacity = 0.8, checked = false, label, hint, inline, labelPosition = 'left', testID, ref } = _a, rest = __rest(_a, ["activeOpacity", "checked", "label", "hint", "inline", "labelPosition", "testID", "ref"]);
36
+ var { activeOpacity = 0.8, checked = false, label, hint, inline, labelPosition = 'left', testID, ref, toggleBackgroundColor } = _a, rest = __rest(_a, ["activeOpacity", "checked", "label", "hint", "inline", "labelPosition", "testID", "ref", "toggleBackgroundColor"]);
39
37
  const hasLabel = label !== undefined;
40
- return ((0, jsx_runtime_1.jsxs)(styles_1.StyledWrapper, Object.assign({ ref: ref, accessible: true, accessibilityRole: "checkbox", activeOpacity: activeOpacity, accessibilityState: { checked }, hitSlop: 10, hasLabel: hasLabel, labelPosition: labelPosition, inline: inline }, rest, { children: [hasLabel ? ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flexShrink: 1 }, children: [(0, jsx_runtime_1.jsx)(LabelText_1.LabelText, { children: label }), hint ? (0, jsx_runtime_1.jsx)(HintText_1.HintText, { children: hint }) : null] })) : null, (0, jsx_runtime_1.jsx)(Input, { checked: checked, testID: testID, labelPosition: hasLabel ? labelPosition : undefined })] })));
38
+ return ((0, jsx_runtime_1.jsxs)(styles_1.StyledWrapper, Object.assign({ ref: ref, accessible: true, accessibilityRole: "checkbox", activeOpacity: activeOpacity, accessibilityState: { checked }, hitSlop: 10, hasLabel: hasLabel, labelPosition: labelPosition, inline: inline }, rest, { children: [hasLabel ? ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flexShrink: 1 }, children: [(0, jsx_runtime_1.jsx)(LabelText_1.LabelText, { children: label }), hint ? (0, jsx_runtime_1.jsx)(HintText_1.HintText, { children: hint }) : null] })) : null, (0, jsx_runtime_1.jsx)(Input, { checked: checked, testID: testID, labelPosition: hasLabel ? labelPosition : undefined, toggleBackgroundColor: toggleBackgroundColor })] })));
41
39
  };
42
40
  exports.Toggle = Toggle;
@@ -39,6 +39,7 @@ export declare const StyledWrapper: import("styled-components").StyledComponent<
39
39
  "30": string;
40
40
  "40": string;
41
41
  "50": string;
42
+ "55": string;
42
43
  "56": string;
43
44
  "60": string;
44
45
  "70": string;
@@ -81,6 +82,7 @@ export declare const StyledWrapper: import("styled-components").StyledComponent<
81
82
  onBrandVariant: string;
82
83
  aiGradientFrom: string;
83
84
  aiGradientTo: string;
85
+ accessible: string;
84
86
  fixed: {
85
87
  brand: string;
86
88
  dark: string;
@@ -89,6 +91,7 @@ export declare const StyledWrapper: import("styled-components").StyledComponent<
89
91
  bright: string;
90
92
  onBrand: string;
91
93
  onBrandVariant: string;
94
+ accessible: string;
92
95
  };
93
96
  };
94
97
  outline: {
@@ -618,6 +621,7 @@ export declare const StyledToggleInputWrapper: import("styled-components").Style
618
621
  "30": string;
619
622
  "40": string;
620
623
  "50": string;
624
+ "55": string;
621
625
  "56": string;
622
626
  "60": string;
623
627
  "70": string;
@@ -660,6 +664,7 @@ export declare const StyledToggleInputWrapper: import("styled-components").Style
660
664
  onBrandVariant: string;
661
665
  aiGradientFrom: string;
662
666
  aiGradientTo: string;
667
+ accessible: string;
663
668
  fixed: {
664
669
  brand: string;
665
670
  dark: string;
@@ -668,6 +673,7 @@ export declare const StyledToggleInputWrapper: import("styled-components").Style
668
673
  bright: string;
669
674
  onBrand: string;
670
675
  onBrandVariant: string;
676
+ accessible: string;
671
677
  };
672
678
  };
673
679
  outline: {
@@ -1195,6 +1201,7 @@ export declare const StyledToggleInput: import("styled-components").StyledCompon
1195
1201
  "30": string;
1196
1202
  "40": string;
1197
1203
  "50": string;
1204
+ "55": string;
1198
1205
  "56": string;
1199
1206
  "60": string;
1200
1207
  "70": string;
@@ -1237,6 +1244,7 @@ export declare const StyledToggleInput: import("styled-components").StyledCompon
1237
1244
  onBrandVariant: string;
1238
1245
  aiGradientFrom: string;
1239
1246
  aiGradientTo: string;
1247
+ accessible: string;
1240
1248
  fixed: {
1241
1249
  brand: string;
1242
1250
  dark: string;
@@ -1245,6 +1253,7 @@ export declare const StyledToggleInput: import("styled-components").StyledCompon
1245
1253
  bright: string;
1246
1254
  onBrand: string;
1247
1255
  onBrandVariant: string;
1256
+ accessible: string;
1248
1257
  };
1249
1258
  };
1250
1259
  outline: {
@@ -1732,6 +1741,7 @@ export declare const StyledToggleInput: import("styled-components").StyledCompon
1732
1741
  };
1733
1742
  }, {
1734
1743
  checked?: boolean;
1744
+ toggleBackgroundColor?: string;
1735
1745
  }, never>;
1736
1746
  export declare const StyledToggleDot: import("styled-components").StyledComponent<Animated.AnimatedComponent<typeof import("react-native").View>, {
1737
1747
  color: {
@@ -1772,6 +1782,7 @@ export declare const StyledToggleDot: import("styled-components").StyledComponen
1772
1782
  "30": string;
1773
1783
  "40": string;
1774
1784
  "50": string;
1785
+ "55": string;
1775
1786
  "56": string;
1776
1787
  "60": string;
1777
1788
  "70": string;
@@ -1814,6 +1825,7 @@ export declare const StyledToggleDot: import("styled-components").StyledComponen
1814
1825
  onBrandVariant: string;
1815
1826
  aiGradientFrom: string;
1816
1827
  aiGradientTo: string;
1828
+ accessible: string;
1817
1829
  fixed: {
1818
1830
  brand: string;
1819
1831
  dark: string;
@@ -1822,6 +1834,7 @@ export declare const StyledToggleDot: import("styled-components").StyledComponen
1822
1834
  bright: string;
1823
1835
  onBrand: string;
1824
1836
  onBrandVariant: string;
1837
+ accessible: string;
1825
1838
  };
1826
1839
  };
1827
1840
  outline: {
@@ -25,14 +25,14 @@ exports.StyledToggleInputWrapper = styled_native_1.default.View(({ theme, labelP
25
25
  : ''}
26
26
  `;
27
27
  });
28
- exports.StyledToggleInput = styled_native_1.default.View(({ theme, checked }) => {
28
+ exports.StyledToggleInput = styled_native_1.default.View(({ theme, checked, toggleBackgroundColor }) => {
29
29
  return `
30
30
  width: ${(0, element_core_1.numToPx)(theme.space[1100])};
31
31
  height: ${(0, element_core_1.numToPx)(theme.space[600])};
32
32
  justify-content: center;
33
33
  border-radius: ${(0, element_core_1.numToPx)(theme.border.radius.lg)};
34
- background: ${checked
35
- ? theme.color.outline.outer
34
+ background-color: ${checked
35
+ ? toggleBackgroundColor || theme.color.outline.outer
36
36
  : theme.color.surface.onSurfaceVariant};
37
37
  `;
38
38
  });
@@ -16,10 +16,13 @@ export * from './Divider';
16
16
  export * from './Em';
17
17
  export * from './EmailField';
18
18
  export * from './EmailInput';
19
+ export * from './EmptyState';
20
+ export * from './ErrorWrapper';
19
21
  export * from './Field';
20
22
  export * from './Grid';
21
23
  export * from './Heading';
22
24
  export * from './Icon';
25
+ export * from './LargeValueReference';
23
26
  export * from './LineThrough';
24
27
  export * from './Link';
25
28
  export * from './List';
@@ -32,10 +32,13 @@ __exportStar(require("./Divider"), exports);
32
32
  __exportStar(require("./Em"), exports);
33
33
  __exportStar(require("./EmailField"), exports);
34
34
  __exportStar(require("./EmailInput"), exports);
35
+ __exportStar(require("./EmptyState"), exports);
36
+ __exportStar(require("./ErrorWrapper"), exports);
35
37
  __exportStar(require("./Field"), exports);
36
38
  __exportStar(require("./Grid"), exports);
37
39
  __exportStar(require("./Heading"), exports);
38
40
  __exportStar(require("./Icon"), exports);
41
+ __exportStar(require("./LargeValueReference"), exports);
39
42
  __exportStar(require("./LineThrough"), exports);
40
43
  __exportStar(require("./Link"), exports);
41
44
  __exportStar(require("./List"), exports);
@@ -0,0 +1,26 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { TouchableOpacity, View, } from 'react-native';
14
+ import { useBreakpoint } from '../../hooks';
15
+ import { Badge } from '../Badge';
16
+ import { StyledActionInner, StyledActionNodeWrapper, StyledActionText, StyledActionWrapper, StyledHintText, StyledLeftIcon, StyledRightIcon, StyledTextWrapper, } from './styled';
17
+ const ActionWrapper = (_a) => {
18
+ var { children, accessibilityRole, accessibilityLabel, accessibilityHint, activeOpacity = 0.75, fullWidth, hasBorder = false, inverted = false, inList, onPress, testID, standalone = false, ref } = _a, rest = __rest(_a, ["children", "accessibilityRole", "accessibilityLabel", "accessibilityHint", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inList", "onPress", "testID", "standalone", "ref"]);
19
+ return (_jsx(StyledActionWrapper, Object.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 }) }) })));
20
+ };
21
+ const Action = (_a) => {
22
+ var { accessibilityRole = 'link', accessibilityLabel, accessibilityHint, children, fullWidth = false, inverted = false, onPress, testID, iconLeft, iconRight, standalone = false, badgeVariant = 'info', badgeText, hint, ref } = _a, rest = __rest(_a, ["accessibilityRole", "accessibilityLabel", "accessibilityHint", "children", "fullWidth", "inverted", "onPress", "testID", "iconLeft", "iconRight", "standalone", "badgeVariant", "badgeText", "hint", "ref"]);
23
+ const { smallAndUp } = useBreakpoint();
24
+ return (_jsxs(ActionWrapper, Object.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] })));
25
+ };
26
+ export { Action };
@@ -10,35 +10,19 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { Children, cloneElement, } from 'react';
14
- import { TouchableOpacity, View, } from 'react-native';
15
- import { useBreakpoint } from '../../hooks';
13
+ import { Children, cloneElement } from 'react';
14
+ import { View } from 'react-native';
16
15
  import { getValidChildren } from '../../utils';
17
- import { Badge } from '../Badge';
18
- import { StyledActionInner, StyledActionList, StyledActionNodeWrapper, StyledActionText, StyledActionWrapper, StyledHintText, StyledLeftIcon, StyledRightIcon, StyledTextWrapper, } from './styled';
19
- const ActionList = (_a) => {
20
- var { children, inverted, borderBottom } = _a, rest = __rest(_a, ["children", "inverted", "borderBottom"]);
16
+ import { Divider } from '../Divider';
17
+ import { ActionListHeading } from './components/ActionListHeading';
18
+ import { StyledActionList } from './styled';
19
+ export const ActionList = (_a) => {
20
+ var { children, iconName, iconColor, heading, subheading } = _a, rest = __rest(_a, ["children", "iconName", "iconColor", "heading", "subheading"]);
21
21
  const validChildren = getValidChildren(children);
22
22
  const childCount = Children.count(validChildren);
23
- return (_jsx(StyledActionList, Object.assign({}, rest, { children: Children.map(validChildren, (child, index) => {
24
- var _a, _b;
25
- return cloneElement(child, {
26
- fullWidth: true,
27
- index,
28
- hasBorder: (childCount > 1 && index !== childCount - 1) || borderBottom,
29
- inverted: (_a = child.props.inverted) !== null && _a !== void 0 ? _a : inverted, // prioritise child prop
30
- inList: true,
31
- iconRight: (_b = child.props.iconRight) !== null && _b !== void 0 ? _b : 'chevron-right-small',
32
- });
33
- }) })));
23
+ return (_jsxs(View, { children: [_jsx(ActionListHeading, { iconName: iconName, heading: heading, subheading: subheading, iconColor: iconColor }), _jsx(StyledActionList, Object.assign({}, rest, { children: Children.map(validChildren, (child, index) => (_jsxs(View, { children: [cloneElement(child, {
24
+ fullWidth: true,
25
+ index,
26
+ inList: true,
27
+ }), childCount > 1 && index !== childCount - 1 && _jsx(Divider, {})] }))) }))] }));
34
28
  };
35
- const ActionWrapper = (_a) => {
36
- var { children, accessibilityRole, accessibilityLabel, accessibilityHint, activeOpacity = 0.75, fullWidth, hasBorder = false, inverted = false, inList, onPress, testID, standalone = false, ref } = _a, rest = __rest(_a, ["children", "accessibilityRole", "accessibilityLabel", "accessibilityHint", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inList", "onPress", "testID", "standalone", "ref"]);
37
- return (_jsx(StyledActionWrapper, Object.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 }) }) })));
38
- };
39
- const Action = (_a) => {
40
- var { accessibilityRole = 'link', accessibilityLabel, accessibilityHint, children, fullWidth = false, inverted = false, onPress, testID, iconLeft, iconRight, standalone = false, badgeVariant = 'info', badgeText, hint, ref } = _a, rest = __rest(_a, ["accessibilityRole", "accessibilityLabel", "accessibilityHint", "children", "fullWidth", "inverted", "onPress", "testID", "iconLeft", "iconRight", "standalone", "badgeVariant", "badgeText", "hint", "ref"]);
41
- const { smallAndUp } = useBreakpoint();
42
- return (_jsxs(ActionWrapper, Object.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] })));
43
- };
44
- export { Action, ActionList };
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useTheme } from '../../../styled.native';
3
+ import { Icon } from '../../Icon';
4
+ import { LabelText } from '../../LabelText';
5
+ import { P } from '../../P';
6
+ import { ProgressRing } from './ProgressRing';
7
+ import { ActionListItemWrapper, DataValueText, DirectionAndValueTextContainer, DirectionLabelContainer, GraphicContainer, LeftTextContainer, OnSurfaceP, RightTextContainer, StatusText, StyledImage, ValueTextContainer, } from './styles';
8
+ export const DataListItem = ({ testID, graphic, progressRingPercentage, heading, subHeading, statusText, valueText, valueSubText, directionLabel, }) => {
9
+ const theme = useTheme();
10
+ const isError = statusText === 'Error';
11
+ const hasProgressRing = progressRingPercentage !== undefined;
12
+ const IconContent = (graphic === null || graphic === void 0 ? void 0 : graphic.type) === 'icon' ? (_jsx(GraphicContainer, { isIcon: true, hasProgress: hasProgressRing, children: _jsx(Icon, { name: graphic.icon, size: 24, color: graphic.iconColor ? graphic.iconColor : theme.color.brand.brand }) })) : null;
13
+ return (_jsxs(ActionListItemWrapper, { testID: testID, children: [(graphic === null || graphic === void 0 ? void 0 : graphic.type) === 'icon' &&
14
+ (hasProgressRing ? (_jsx(ProgressRing, { percentage: progressRingPercentage, children: IconContent })) : (IconContent)), (graphic === null || graphic === void 0 ? void 0 : graphic.type) === 'image' && (_jsx(GraphicContainer, { children: _jsx(StyledImage, { source: typeof graphic.image === 'string'
15
+ ? { uri: graphic.image }
16
+ : graphic.image, resizeMode: "cover", accessibilityLabel: 'Data List Image' }) })), _jsxs(LeftTextContainer, { children: [heading && _jsx(LabelText, { children: heading }), subHeading && _jsx(P, { size: "sm", children: subHeading }), statusText && (_jsx(StatusText, { size: "sm", isError: isError, children: statusText }))] }), _jsxs(RightTextContainer, { children: [_jsxs(DirectionAndValueTextContainer, { children: [directionLabel && (_jsx(DirectionLabelContainer, { children: _jsx(OnSurfaceP, { size: "sm", children: directionLabel }) })), valueText && (_jsx(ValueTextContainer, { children: _jsx(DataValueText, { isError: isError, size: "lg", children: valueText }) }))] }), valueSubText && _jsx(OnSurfaceP, { size: "sm", children: valueSubText })] })] }));
17
+ };