@ovotech/element-native 2.0.4 → 2.2.0-canary-1cac2ba-73

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 (183) hide show
  1. package/dist/components/Accordion/Accordion.js +23 -22
  2. package/dist/components/Accordion/Icon.js +7 -10
  3. package/dist/components/Accordion/styles.d.ts +688 -46
  4. package/dist/components/Accordion/styles.js +56 -49
  5. package/dist/components/Accordion/types.d.ts +1 -0
  6. package/dist/components/Badge/Badge.d.ts +238 -8
  7. package/dist/components/Badge/Badge.js +35 -14
  8. package/dist/components/CTAButton/CTAButton.d.ts +7 -12
  9. package/dist/components/CTAButton/CTAButton.js +18 -19
  10. package/dist/components/CTALink/CTALink.d.ts +3 -4
  11. package/dist/components/Card/Card.d.ts +228 -5
  12. package/dist/components/Card/Card.js +5 -25
  13. package/dist/components/Checkbox/Checkbox.js +19 -26
  14. package/dist/components/DataTable/DataTable.d.ts +3 -12
  15. package/dist/components/DataTable/DataTable.js +8 -71
  16. package/dist/components/DataTable/TableRow.d.ts +2 -0
  17. package/dist/components/DataTable/TableRow.js +33 -0
  18. package/dist/components/DataTable/index.d.ts +2 -0
  19. package/dist/components/DataTable/index.js +16 -0
  20. package/dist/components/DataTable/styles.d.ts +2517 -0
  21. package/dist/components/DataTable/styles.js +77 -0
  22. package/dist/components/DataTable/types.d.ts +15 -0
  23. package/dist/components/DataTable/types.js +2 -0
  24. package/dist/components/DateField/DateField.js +9 -9
  25. package/dist/components/DescriptionList/DescriptionList.d.ts +10 -0
  26. package/dist/components/DescriptionList/DescriptionList.js +66 -0
  27. package/dist/components/DescriptionList/index.d.ts +1 -0
  28. package/dist/components/DescriptionList/index.js +6 -0
  29. package/dist/components/DescriptionList/styled.d.ts +241 -0
  30. package/dist/components/DescriptionList/styled.js +88 -0
  31. package/dist/components/Disclosure/Disclosure.js +7 -10
  32. package/dist/components/Divider/Divider.d.ts +5 -0
  33. package/dist/components/Divider/Divider.js +45 -0
  34. package/dist/components/Divider/index.d.ts +1 -0
  35. package/dist/components/Divider/index.js +5 -0
  36. package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +1 -1
  37. package/dist/components/ErrorText/ErrorText.d.ts +228 -1
  38. package/dist/components/ErrorText/ErrorText.js +1 -1
  39. package/dist/components/Field/Field.js +3 -3
  40. package/dist/components/Grid/Col.d.ts +229 -2
  41. package/dist/components/Grid/Row.d.ts +228 -1
  42. package/dist/components/Heading/Heading.js +8 -24
  43. package/dist/components/HintText/HintText.d.ts +228 -1
  44. package/dist/components/HintText/HintText.js +1 -1
  45. package/dist/components/Icon/Icon.d.ts +2 -3
  46. package/dist/components/Icon/Icon.js +2 -2
  47. package/dist/components/Input/CurrencyInput.d.ts +2 -1
  48. package/dist/components/Input/EmailInput.d.ts +2 -1
  49. package/dist/components/Input/Input.d.ts +4 -2
  50. package/dist/components/Input/Input.js +16 -18
  51. package/dist/components/Input/NumberInput.d.ts +2 -1
  52. package/dist/components/Input/PasswordInput.d.ts +4 -1
  53. package/dist/components/Input/PasswordInput.js +4 -2
  54. package/dist/components/Input/PasswordInput.styled.d.ts +231 -0
  55. package/dist/components/Input/PasswordInput.styled.js +37 -0
  56. package/dist/components/Input/PasswordVisibilityToggle.d.ts +11 -0
  57. package/dist/components/Input/PasswordVisibilityToggle.js +51 -0
  58. package/dist/components/Input/{TelInput.d.ts → PhoneInput.d.ts} +3 -2
  59. package/dist/components/Input/{TelInput.js → PhoneInput.js} +3 -3
  60. package/dist/components/Input/TextInput.d.ts +2 -1
  61. package/dist/components/Input/TextareaInput.d.ts +2 -1
  62. package/dist/components/Input/TextareaInput.js +11 -9
  63. package/dist/components/Input/index.d.ts +1 -1
  64. package/dist/components/Input/index.js +3 -3
  65. package/dist/components/LabelText/LabelText.d.ts +228 -1
  66. package/dist/components/LabelText/LabelText.js +1 -1
  67. package/dist/components/List/List.d.ts +706 -3
  68. package/dist/components/List/List.js +18 -5
  69. package/dist/components/Margin/Margin.d.ts +228 -1
  70. package/dist/components/NavHeader/NavHeader.d.ts +1 -0
  71. package/dist/components/NavHeader/NavHeader.js +11 -13
  72. package/dist/components/Notification/Notification.d.ts +466 -20
  73. package/dist/components/Notification/Notification.js +32 -44
  74. package/dist/components/Radio/Radio.js +18 -36
  75. package/dist/components/SelectField/Select.d.ts +244 -0
  76. package/dist/components/SelectField/Select.js +101 -0
  77. package/dist/components/SelectField/SelectField.d.ts +7 -0
  78. package/dist/components/SelectField/SelectField.js +38 -0
  79. package/dist/components/SelectField/index.d.ts +1 -0
  80. package/dist/components/SelectField/index.js +5 -0
  81. package/dist/components/SkeletonLoading/Skeleton.d.ts +228 -1
  82. package/dist/components/SkeletonLoading/SkeletonAnimation.d.ts +6 -0
  83. package/dist/components/SkeletonLoading/SkeletonAnimation.js +57 -0
  84. package/dist/components/SkeletonLoading/SkeletonCTA.js +3 -1
  85. package/dist/components/SkeletonLoading/SkeletonCircle.js +4 -2
  86. package/dist/components/SkeletonLoading/SkeletonHeading.js +3 -1
  87. package/dist/components/SkeletonLoading/SkeletonText.js +2 -2
  88. package/dist/components/SubLabelText/SubLabelText.d.ts +228 -1
  89. package/dist/components/SubLabelText/SubLabelText.js +1 -1
  90. package/dist/components/SummaryList/SummaryList.d.ts +4 -0
  91. package/dist/components/SummaryList/SummaryList.js +5 -0
  92. package/dist/components/Tabs/Tab.js +22 -19
  93. package/dist/components/Tabs/TabList.d.ts +11 -1
  94. package/dist/components/Tabs/TabList.js +19 -16
  95. package/dist/components/Tabs/TabPanel.js +32 -6
  96. package/dist/components/Tabs/Tabs.d.ts +8 -6
  97. package/dist/components/Tabs/Tabs.js +10 -6
  98. package/dist/components/Text/Text.d.ts +1140 -5
  99. package/dist/components/Text/Text.js +6 -10
  100. package/dist/components/TextField/CurrencyField.d.ts +2 -1
  101. package/dist/components/TextField/EmailField.d.ts +2 -1
  102. package/dist/components/TextField/NumberField.d.ts +2 -1
  103. package/dist/components/TextField/PasswordField.d.ts +4 -1
  104. package/dist/components/TextField/PasswordField.js +2 -2
  105. package/dist/components/TextField/PhoneField.d.ts +10 -0
  106. package/dist/components/TextField/PhoneField.js +56 -0
  107. package/dist/components/TextField/TelField.d.ts +6 -1
  108. package/dist/components/TextField/TelField.js +7 -2
  109. package/dist/components/TextField/TextField.d.ts +2 -1
  110. package/dist/components/TextField/TextareaField.d.ts +2 -1
  111. package/dist/components/TextField/index.d.ts +1 -0
  112. package/dist/components/TextField/index.js +3 -1
  113. package/dist/components/TextLink/TextLink.js +2 -2
  114. package/dist/components/index.d.ts +3 -0
  115. package/dist/components/index.js +3 -0
  116. package/dist/esm/components/Accordion/Accordion.js +26 -25
  117. package/dist/esm/components/Accordion/Icon.js +8 -8
  118. package/dist/esm/components/Accordion/styles.js +29 -48
  119. package/dist/esm/components/Badge/Badge.js +35 -14
  120. package/dist/esm/components/CTAButton/CTAButton.js +20 -21
  121. package/dist/esm/components/Card/Card.js +5 -25
  122. package/dist/esm/components/Checkbox/Checkbox.js +17 -27
  123. package/dist/esm/components/DataTable/DataTable.js +3 -66
  124. package/dist/esm/components/DataTable/TableRow.js +26 -0
  125. package/dist/esm/components/DataTable/index.js +2 -0
  126. package/dist/esm/components/DataTable/styles.js +51 -0
  127. package/dist/esm/components/DataTable/types.js +1 -0
  128. package/dist/esm/components/DateField/DateField.js +9 -9
  129. package/dist/esm/components/DescriptionList/DescriptionList.js +39 -0
  130. package/dist/esm/components/DescriptionList/index.js +1 -0
  131. package/dist/esm/components/DescriptionList/styled.js +57 -0
  132. package/dist/esm/components/Disclosure/Disclosure.js +9 -12
  133. package/dist/esm/components/Divider/Divider.js +15 -0
  134. package/dist/esm/components/Divider/index.js +1 -0
  135. package/dist/esm/components/ErrorText/ErrorText.js +1 -1
  136. package/dist/esm/components/Field/Field.js +3 -3
  137. package/dist/esm/components/Heading/Heading.js +8 -24
  138. package/dist/esm/components/HintText/HintText.js +1 -1
  139. package/dist/esm/components/Icon/Icon.js +2 -2
  140. package/dist/esm/components/Input/Input.js +18 -20
  141. package/dist/esm/components/Input/PasswordInput.js +4 -2
  142. package/dist/esm/components/Input/PasswordInput.styled.js +11 -0
  143. package/dist/esm/components/Input/PasswordVisibilityToggle.js +23 -0
  144. package/dist/esm/components/Input/{TelInput.js → PhoneInput.js} +2 -2
  145. package/dist/esm/components/Input/TextareaInput.js +11 -9
  146. package/dist/esm/components/Input/index.js +1 -1
  147. package/dist/esm/components/LabelText/LabelText.js +1 -1
  148. package/dist/esm/components/List/List.js +17 -5
  149. package/dist/esm/components/NavHeader/NavHeader.js +12 -14
  150. package/dist/esm/components/Notification/Notification.js +34 -46
  151. package/dist/esm/components/Radio/Radio.js +18 -36
  152. package/dist/esm/components/SelectField/Select.js +74 -0
  153. package/dist/esm/components/SelectField/SelectField.js +31 -0
  154. package/dist/esm/components/SelectField/index.js +1 -0
  155. package/dist/esm/components/SkeletonLoading/SkeletonAnimation.js +30 -0
  156. package/dist/esm/components/SkeletonLoading/SkeletonCTA.js +3 -1
  157. package/dist/esm/components/SkeletonLoading/SkeletonCircle.js +4 -2
  158. package/dist/esm/components/SkeletonLoading/SkeletonHeading.js +3 -1
  159. package/dist/esm/components/SkeletonLoading/SkeletonText.js +2 -2
  160. package/dist/esm/components/SubLabelText/SubLabelText.js +1 -1
  161. package/dist/esm/components/SummaryList/SummaryList.js +5 -0
  162. package/dist/esm/components/Tabs/Tab.js +22 -16
  163. package/dist/esm/components/Tabs/TabList.js +18 -16
  164. package/dist/esm/components/Tabs/TabPanel.js +9 -6
  165. package/dist/esm/components/Tabs/Tabs.js +9 -6
  166. package/dist/esm/components/Text/Text.js +6 -10
  167. package/dist/esm/components/TextField/PasswordField.js +2 -2
  168. package/dist/esm/components/TextField/PhoneField.js +30 -0
  169. package/dist/esm/components/TextField/TelField.js +7 -2
  170. package/dist/esm/components/TextField/index.js +1 -0
  171. package/dist/esm/components/TextLink/TextLink.js +2 -2
  172. package/dist/esm/components/index.js +3 -0
  173. package/dist/esm/providers/icons/Logo.js +6 -3
  174. package/dist/esm/theme/create-theme.js +2 -176
  175. package/dist/esm/theme/index.js +13 -2
  176. package/dist/providers/icons/Logo.js +5 -2
  177. package/dist/styled.native.d.ts +1363 -1
  178. package/dist/theme/create-theme.d.ts +1 -1
  179. package/dist/theme/create-theme.js +2 -176
  180. package/dist/theme/index.d.ts +228 -2
  181. package/dist/theme/index.js +13 -2
  182. package/dist/theme/theme.d.ts +1 -110
  183. package/package.json +12 -10
@@ -1,7 +1,3 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  var __assign = (this && this.__assign) || function () {
6
2
  __assign = Object.assign || function(t) {
7
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -27,59 +23,45 @@ var __rest = (this && this.__rest) || function (s, e) {
27
23
  import React, { forwardRef } from 'react';
28
24
  import { TouchableOpacity, View, } from 'react-native';
29
25
  import styled from '../../styled.native';
30
- import { pxToNumber } from '../../utils';
31
26
  import { HintText } from '../HintText';
32
27
  import { LabelText } from '../LabelText';
33
28
  var StyledRadioInputWrapper = styled.View(function (_a) {
34
- var radio = _a.theme.radio;
35
- var radioSize = pxToNumber(radio.size);
36
- var gap = pxToNumber(radio.gap);
37
- return "\n width: ".concat(radioSize + gap, "px;\n height: ").concat(radio.touchSize, ";\n ");
29
+ var core = _a.theme.core;
30
+ return "\n width: ".concat(core.space[6], ";\n height: ").concat(core.space[6], ";\n margin-right: 10px;\n ");
38
31
  });
39
32
  var StyledRadioInput = styled.View(function (_a) {
40
- var radio = _a.theme.radio, invalid = _a.invalid, checked = _a.checked;
41
- var touchSize = pxToNumber(radio.touchSize);
42
- var radioSize = pxToNumber(radio.size);
43
- var radioDistance = (touchSize - radioSize) / 2;
44
- return "\n width: ".concat(radio.size, ";\n height: ").concat(radio.size, ";\n border: ").concat(radio.borderWidth, " solid;\n margin-top: ").concat(radioDistance, "px;\n border-radius: ").concat(radioSize / 2, "px;\n border-color: ").concat(invalid
45
- ? radio.errorColor
33
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, invalid = _a.invalid, checked = _a.checked;
34
+ return "\n width: ".concat(core.space[6], ";\n height: ").concat(core.space[6], ";\n border: ").concat(core.borderWidth.small, " solid;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n border-color: ").concat(invalid
35
+ ? semantic.error.border
46
36
  : checked
47
- ? radio.dotColor
48
- : radio.borderColor, ";\n background: ").concat(radio.background, ";\n background: ").concat(checked ? radio.checkedBackground : radio.background, ";\n ");
37
+ ? core.color.blue.dark
38
+ : semantic.border.functional, ";\n background: ").concat(checked ? core.color.blue.lightest : 'transparent', ";\n ");
49
39
  });
50
40
  var StyledRadioInputDot = styled.View(function (_a) {
51
- var radio = _a.theme.radio, checked = _a.checked;
52
- var radioSize = pxToNumber(radio.size);
53
- var dotSize = pxToNumber(radio.dotSize);
54
- var borderWidth = pxToNumber(radio.borderWidth);
55
- var dotDistance = (radioSize - dotSize) / 2 - borderWidth;
56
- return "\n width: ".concat(radio.dotSize, ";\n height: ").concat(radio.dotSize, ";\n margin: ").concat(dotDistance, "px;\n border-radius: ").concat(radioSize / 2, "px;\n background: ").concat(radio.dotColor, ";\n opacity: ").concat(checked ? 1 : 0, ";\n ");
41
+ var core = _a.theme.core, checked = _a.checked;
42
+ return "\n width: ".concat(core.space[3], ";\n height: ").concat(core.space[3], ";\n border-radius: 50%;\n background: ").concat(core.color.blue.dark, ";\n opacity: ").concat(checked ? 1 : 0, ";\n ");
57
43
  });
58
44
  var Input = function (_a) {
59
- var checked = _a.checked, invalid = _a.invalid, rest = __rest(_a, ["checked", "invalid"]);
45
+ var checked = _a.checked, invalid = _a.invalid, testID = _a.testID, rest = __rest(_a, ["checked", "invalid", "testID"]);
60
46
  return (React.createElement(StyledRadioInputWrapper, __assign({}, rest),
61
- React.createElement(StyledRadioInput, { invalid: invalid, checked: checked },
47
+ React.createElement(StyledRadioInput, { invalid: invalid, checked: checked, testID: testID },
62
48
  React.createElement(StyledRadioInputDot, { checked: checked }))));
63
49
  };
64
- var RadioLabelText = styled(LabelText)(function (_a) {
65
- var space = _a.theme.space;
66
- return "\n padding-top: ".concat(space[3], ";\n ");
50
+ var StyledWrapper = styled.View(function (_a) {
51
+ var core = _a.theme.core;
52
+ return "\n padding-top: ".concat(core.space[3], ";\n flex-direction: row;\n ");
67
53
  });
68
- var StyledWrapper = styled.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n"], ["\n flex-direction: row;\n"])));
69
54
  var Radio = forwardRef(function (_a, ref) {
70
55
  var label = _a.label, hint = _a.hint, checked = _a.checked, invalid = _a.invalid,
71
56
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
72
57
  value = _a.value, // "value" is needed for RadioGroup, but isn't actually used in the radio anywhere
73
58
  _b = _a.activeOpacity, // "value" is needed for RadioGroup, but isn't actually used in the radio anywhere
74
- activeOpacity = _b === void 0 ? 0.8 : _b, rest = __rest(_a, ["label", "hint", "checked", "invalid", "value", "activeOpacity"]);
75
- return (React.createElement(TouchableOpacity, __assign({ ref: ref, accessibilityRole: "radio", activeOpacity: activeOpacity, accessibilityState: { checked: checked },
76
- // @ts-ignore
77
- invalid: invalid }, rest),
59
+ activeOpacity = _b === void 0 ? 0.8 : _b, testID = _a.testID, rest = __rest(_a, ["label", "hint", "checked", "invalid", "value", "activeOpacity", "testID"]);
60
+ return (React.createElement(TouchableOpacity, __assign({ ref: ref, accessibilityRole: "radio", activeOpacity: activeOpacity, accessibilityState: { checked: checked } }, rest),
78
61
  React.createElement(StyledWrapper, null,
79
- React.createElement(Input, { checked: checked, invalid: invalid }),
62
+ React.createElement(Input, { checked: checked, invalid: invalid, testID: testID }),
80
63
  React.createElement(View, { style: { flexShrink: 1 } },
81
- React.createElement(RadioLabelText, null, label),
64
+ React.createElement(LabelText, null, label),
82
65
  hint ? React.createElement(HintText, null, hint) : null))));
83
66
  });
84
67
  export { Radio };
85
- var templateObject_1;
@@ -0,0 +1,74 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
6
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
7
+ if (ar || !(i in from)) {
8
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
9
+ ar[i] = from[i];
10
+ }
11
+ }
12
+ return to.concat(ar || Array.prototype.slice.call(from));
13
+ };
14
+ import React, { useState } from 'react';
15
+ import { Modal, ScrollView, View } from 'react-native';
16
+ import styled, { css } from '../../styled.native';
17
+ import { Icon } from '../Icon';
18
+ import { P, Strong } from '../Text';
19
+ var SelectInput = styled.TouchableOpacity(function (_a) {
20
+ var _b = _a.theme, semantic = _b.semantic, core = _b.core, hasError = _a.hasError;
21
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-color: ", ";\n border-width: ", "\n border-radius: ", ";\n padding-vertical: ", "\n padding-left: ", "\n padding-right: 14px;\n height: 44px;\n "], ["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-color: ", ";\n border-width: ", "\n border-radius: ", ";\n padding-vertical: ", "\n padding-left: ", "\n padding-right: 14px;\n height: 44px;\n "])), core.color.brand.white, hasError ? semantic.error.border : semantic.border.functional, core.borderWidth.small, core.radius.small, core.space[2], core.space[2]);
22
+ });
23
+ var DropdownWrapper = styled.View(function (_a) {
24
+ var core = _a.theme.core;
25
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex: 1;\n justify-content: center;\n align-items: center;\n // 40 is an opacity for hex https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4\n background-color: ", "40;\n "], ["\n flex: 1;\n justify-content: center;\n align-items: center;\n // 40 is an opacity for hex https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4\n background-color: ", "40;\n "])), core.color.neutral.darkest);
26
+ });
27
+ var DropdownContainer = styled.SafeAreaView(function (_a) {
28
+ var core = _a.theme.core;
29
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 95%;\n max-height: 70%;\n border-radius: ", ";\n background-color: ", ";\n "], ["\n width: 95%;\n max-height: 70%;\n border-radius: ", ";\n background-color: ", ";\n "])), core.radius.small, core.color.brand.white);
30
+ });
31
+ var SelectOption = styled.TouchableOpacity(function (_a) {
32
+ var _b = _a.theme, semantic = _b.semantic, core = _b.core, isLastOption = _a.isLastOption;
33
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n border-bottom-color: ", ";\n border-bottom-width: ", "px;\n padding-horizontal: ", ";\n "], ["\n flex-direction: row;\n align-items: center;\n border-bottom-color: ", ";\n border-bottom-width: ", "px;\n padding-horizontal: ", ";\n "])), semantic.border.differentiated, isLastOption ? 0 : 1, core.space[4]);
34
+ });
35
+ var Radio = styled.View(function (_a) {
36
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, isChecked = _a.isChecked;
37
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 24px;\n height: 24px;\n margin-left: auto;\n border-radius: 24px;\n border-width: ", ";\n border-color: ", ";\n "], ["\n width: 24px;\n height: 24px;\n margin-left: auto;\n border-radius: 24px;\n border-width: ", ";\n border-color: ", ";\n "])), core.borderWidth.small, isChecked
38
+ ? semantic.focus.outline
39
+ : semantic.border.functional);
40
+ });
41
+ var RadioDot = styled.View(function (_a) {
42
+ var semantic = _a.theme.semantic, isChecked = _a.isChecked;
43
+ return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n position: absolute;\n top: 5px;\n width: 12px;\n height: 12px;\n border-radius: 12px;\n align-self: center;\n opacity: ", ";\n "], ["\n background-color: ", ";\n position: absolute;\n top: 5px;\n width: 12px;\n height: 12px;\n border-radius: 12px;\n align-self: center;\n opacity: ", ";\n "])), semantic.focus.outline, isChecked ? 1 : 0);
44
+ });
45
+ var StyledP = styled(P)(function (_a) {
46
+ var core = _a.theme.core;
47
+ return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-top: ", ";\n "], ["\n margin-top: ", ";\n "])), core.space[3]);
48
+ });
49
+ export var Select = function (_a) {
50
+ var _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.defaultSelected, defaultSelected = _c === void 0 ? { label: '', value: 'default' } : _c, _d = _a.noOptionMessage, noOptionMessage = _d === void 0 ? 'No option selected' : _d, _e = _a.onSelected, onSelected = _e === void 0 ? function () { return null; } : _e, _f = _a.hasError, hasError = _f === void 0 ? false : _f, _g = _a.testID, testID = _g === void 0 ? 'select' : _g;
51
+ var _h = useState(false), isOpen = _h[0], setOpen = _h[1];
52
+ var _j = useState(defaultSelected), selected = _j[0], setSelected = _j[1];
53
+ var handleOptionPress = function (val) {
54
+ onSelected(val);
55
+ setOpen(false);
56
+ setSelected(val);
57
+ };
58
+ var extendedOptions = __spreadArray([
59
+ { label: "-- ".concat(noOptionMessage, " --"), value: 'default' }
60
+ ], options, true);
61
+ return (React.createElement(View, null,
62
+ React.createElement(SelectInput, { testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); } },
63
+ React.createElement(P, { style: { marginTop: 0, marginBottom: 0 } }, selected.value === 'default' ? '' : selected.label),
64
+ React.createElement(Icon, { name: "chevron-down", size: 16, style: { marginLeft: 'auto' } })),
65
+ React.createElement(Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); } },
66
+ React.createElement(DropdownWrapper, null,
67
+ React.createElement(DropdownContainer, null,
68
+ React.createElement(ScrollView, { nestedScrollEnabled: true }, extendedOptions.map(function (option, i) { return (React.createElement(SelectOption, { key: option.label, accessibilityRole: "radio", isLastOption: i === extendedOptions.length - 1, onPress: function () { return handleOptionPress(option); } },
69
+ React.createElement(StyledP, null,
70
+ React.createElement(Strong, null, option.label)),
71
+ React.createElement(Radio, { isChecked: selected.value === option.value },
72
+ React.createElement(RadioDot, { isChecked: selected.value === option.value })))); })))))));
73
+ };
74
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
@@ -0,0 +1,31 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { Field } from '../Field';
25
+ import { Select } from './Select';
26
+ export var SelectField = function (_a) {
27
+ var error = _a.error, options = _a.options, onSelected = _a.onSelected, noOptionMessage = _a.noOptionMessage, defaultSelected = _a.defaultSelected, testID = _a.testID, rest = __rest(_a, ["error", "options", "onSelected", "noOptionMessage", "defaultSelected", "testID"]);
28
+ return (React.createElement(Field, __assign({ affixWidth: 20, error: error }, rest),
29
+ React.createElement(React.Fragment, null,
30
+ React.createElement(Select, { onSelected: onSelected, options: options, noOptionMessage: noOptionMessage, defaultSelected: defaultSelected, hasError: Boolean(error), testID: testID }))));
31
+ };
@@ -0,0 +1 @@
1
+ export { SelectField } from './SelectField';
@@ -0,0 +1,30 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import { View, Animated, Platform } from 'react-native';
3
+ export var SkeletonAnimation = function (_a) {
4
+ var children = _a.children, _b = _a.animation, animation = _b === void 0 ? 'pulse' : _b, testID = _a.testID;
5
+ var animationRef = useRef(new Animated.Value(0));
6
+ var animationLoop = useRef();
7
+ useEffect(function () {
8
+ animationLoop.current = Animated.timing(animationRef.current, {
9
+ toValue: 2,
10
+ delay: 400,
11
+ duration: 1500,
12
+ useNativeDriver: !!Platform.select({
13
+ web: false,
14
+ native: true,
15
+ }),
16
+ });
17
+ animationRef.current.setValue(0);
18
+ Animated.loop(animationLoop.current).start();
19
+ }, []);
20
+ return (React.createElement(View, { accessibilityRole: "none", accessibilityLabel: "loading...", accessible: false, testID: testID }, animation === 'pulse' ? (React.createElement(Animated.View, { style: [
21
+ {
22
+ height: '100%',
23
+ width: '100%',
24
+ opacity: animationRef.current.interpolate({
25
+ inputRange: [0.25, 1, 2],
26
+ outputRange: [1, 0.25, 1],
27
+ }),
28
+ },
29
+ ] }, children)) : (React.createElement(View, null, children))));
30
+ };
@@ -24,11 +24,13 @@ import React from 'react';
24
24
  import styled from '../../styled.native';
25
25
  import { P } from '../Text';
26
26
  import { Skeleton } from './Skeleton';
27
+ import { SkeletonAnimation } from './SkeletonAnimation';
27
28
  var StyledSkeletonCTA = styled(Skeleton)(function (_a) {
28
29
  var _b = _a.theme, colors = _b.colors, space = _b.space, size = _a.size;
29
30
  return "\n background-color: ".concat(colors.borderMuted, ";\n width: ").concat(size, ";\n height: ").concat(space[12], ";\n ");
30
31
  });
31
32
  export var SkeletonCTA = function (_a) {
32
33
  var _b = _a.size, size = _b === void 0 ? '250px' : _b, rest = __rest(_a, ["size"]);
33
- return (React.createElement(StyledSkeletonCTA, __assign({ as: P, size: size }, rest)));
34
+ return (React.createElement(SkeletonAnimation, null,
35
+ React.createElement(StyledSkeletonCTA, __assign({ as: P, size: size }, rest))));
34
36
  };
@@ -24,6 +24,7 @@ import React from 'react';
24
24
  import styled from '../../styled.native';
25
25
  import { pxToNumber } from '../../utils';
26
26
  import { Skeleton } from './Skeleton';
27
+ import { SkeletonAnimation } from './SkeletonAnimation';
27
28
  var StyledSkeletonCircleWrapper = styled(Skeleton)(function (_a) {
28
29
  var size = _a.size;
29
30
  return "width: ".concat(size, "; max-width: 100%;");
@@ -34,6 +35,7 @@ var StyledSkeletonCircle = styled(Skeleton)(function (_a) {
34
35
  });
35
36
  export var SkeletonCircle = function (_a) {
36
37
  var _b = _a.size, size = _b === void 0 ? '120px' : _b, rest = __rest(_a, ["size"]);
37
- return (React.createElement(StyledSkeletonCircleWrapper, __assign({ size: size }, rest),
38
- React.createElement(StyledSkeletonCircle, { size: size })));
38
+ return (React.createElement(SkeletonAnimation, null,
39
+ React.createElement(StyledSkeletonCircleWrapper, __assign({ size: size }, rest),
40
+ React.createElement(StyledSkeletonCircle, { size: size }))));
39
41
  };
@@ -24,11 +24,13 @@ import React from 'react';
24
24
  import styled from '../../styled.native';
25
25
  import { Heading3 } from '../Heading';
26
26
  import { Skeleton } from './Skeleton';
27
+ import { SkeletonAnimation } from './SkeletonAnimation';
27
28
  var StyledSkeletonHeading = styled(Skeleton)(function (_a) {
28
29
  var colors = _a.theme.colors, size = _a.size;
29
30
  return "\n background-color: ".concat(colors.borderMuted, ";\n width: ").concat(size, ";\n ");
30
31
  });
31
32
  export var SkeletonHeading = function (_a) {
32
33
  var _b = _a.size, size = _b === void 0 ? '70%' : _b, _c = _a.headingComponent, Heading = _c === void 0 ? Heading3 : _c, rest = __rest(_a, ["size", "headingComponent"]);
33
- return (React.createElement(StyledSkeletonHeading, __assign({ "aria-hidden": "true", size: size, as: Heading }, rest), "\u00A0"));
34
+ return (React.createElement(SkeletonAnimation, null,
35
+ React.createElement(StyledSkeletonHeading, __assign({ "aria-hidden": "true", size: size, as: Heading }, rest), "\u00A0")));
34
36
  };
@@ -21,12 +21,12 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import React from 'react';
24
- import { View } from 'react-native';
25
24
  import { useBreakpoint } from '../../hooks';
26
25
  import styled from '../../styled.native';
27
26
  import { responsiveStyle } from '../../utils';
28
27
  import { P } from '../Text';
29
28
  import { Skeleton } from './Skeleton';
29
+ import { SkeletonAnimation } from './SkeletonAnimation';
30
30
  var StyledSkeletonText = styled(Skeleton)(function (_a) {
31
31
  var _b = _a.theme, colors = _b.colors, space = _b.space, responsiveFontSizes = _b.responsiveFontSizes, short = _a.short, breakpoints = _a.breakpoints;
32
32
  return "\n background-color: ".concat(colors.borderMuted, ";\n margin-bottom: ").concat(space[2], ";\n ").concat(responsiveStyle('height', responsiveFontSizes.body, breakpoints), "\n\n ").concat(short ? 'width: 50%' : '', ";\n ");
@@ -38,5 +38,5 @@ export var SkeletonText = function (_a) {
38
38
  for (var i = 1; i <= lines; i++) {
39
39
  generatedLines.push(React.createElement(StyledSkeletonText, { key: "line-".concat(i), short: i === lines, breakpoints: breakpoints }));
40
40
  }
41
- return (React.createElement(P, __assign({ as: View }, rest), generatedLines));
41
+ return (React.createElement(P, __assign({ as: SkeletonAnimation }, rest), generatedLines));
42
42
  };
@@ -8,7 +8,7 @@ import { styledComponentWithBreakpoints } from '../../utils';
8
8
  var StyledSubLabelText = styled.Text(function (_a) {
9
9
  var field = _a.theme.field, smallAndUp = _a.smallAndUp;
10
10
  var fontSize = smallAndUp ? field.fontSize[1] : field.fontSize[0];
11
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-weight: ", ";\n color: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-weight: ", ";\n color: ", ";\n font-size: ", ";\n "])), field.fontFamily, calculateLineHeight(fontSize, field.lineHeight), field.subLabel.fontWeight, field.subLabel.color, fontSize);
11
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n "])), field.fontFamily, calculateLineHeight(fontSize, field.lineHeight), field.subLabel.color, fontSize);
12
12
  });
13
13
  var SubLabelText = styledComponentWithBreakpoints(StyledSubLabelText);
14
14
  export { SubLabelText };
@@ -22,8 +22,13 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React, { Children, cloneElement, } from 'react';
24
24
  import { Dd, Dl, Dt } from '../List';
25
+ /**
26
+ * @deprecated This component has been deprecated and will be removed in a future release.
27
+ * Please use the Description List (List/Dl) component instead.
28
+ * */
25
29
  var SummaryList = function (_a) {
26
30
  var children = _a.children, rest = __rest(_a, ["children"]);
31
+ console.warn('SummaryList component has been deprecated and will be removed in a future release. Please use the DescriptionList component instead.');
27
32
  return (React.createElement(Dl, __assign({}, rest), Children.map(children, function (child, index) {
28
33
  return cloneElement(child, {
29
34
  index: index,
@@ -1,3 +1,7 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
1
5
  var __assign = (this && this.__assign) || function () {
2
6
  __assign = Object.assign || function(t) {
3
7
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -22,24 +26,26 @@ var __rest = (this && this.__rest) || function (s, e) {
22
26
  };
23
27
  import React, { forwardRef } from 'react';
24
28
  import { useBreakpoint, useFullWidth, } from '../../hooks';
25
- import styled from '../../styled.native';
26
- import { pxToNumber } from '../../utils';
27
- var StyledText = styled.Text(function (_a) {
28
- var tabs = _a.theme.tabs, smallAndUp = _a.smallAndUp, active = _a.active;
29
- return "\n font-size: ".concat(tabs.tab.fontSize[smallAndUp ? 1 : 0], ";\n font-family: ").concat(tabs.tab.fontFamily, ";\n font-weight: ").concat(tabs.tab.fontWeight, ";\n background-color: ").concat(active ? tabs.tab.active.backgroundColor : tabs.tab.inactive.backgroundColor, ";\n line-height: ").concat("".concat(tabs.tab.lineHeight * pxToNumber(tabs.tab.fontSize[0]), "px"), ";\n color: ").concat(active ? tabs.tab.active.foregroundColor : tabs.tab.inactive.foregroundColor, ";\n text-align: center;\n padding: ").concat("".concat(tabs.tab.paddingVertical[smallAndUp ? 1 : 0], " ").concat(tabs.tab.paddingHorizontal[smallAndUp ? 1 : 0]), ";\n");
29
+ import styled, { css } from '../../styled.native';
30
+ var TabText = styled.Text(function (_a) {
31
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
32
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-align: center;\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-align: center;\n padding: ", " ", ";\n "])), core.fontSize.body.small, core.fontFamily.bodyBold.native, core.lineHeight.body.small, semantic.message.base, core.space[3], core.space[smallAndUp ? 3 : 2]);
30
33
  });
31
- var StyledTouchableOpacity = styled.TouchableOpacity(function (_a) {
32
- var _b = _a.active, active = _b === void 0 ? false : _b, _c = _a.first, first = _c === void 0 ? false : _c, _d = _a.last, last = _d === void 0 ? false : _d, _e = _a.stretch, stretch = _e === void 0 ? false : _e, _f = _a.theme, card = _f.card, tabs = _f.tabs, inline = _a.inline;
33
- return "flex-grow: ".concat(stretch ? 1 : 0, ";\n border: ").concat(card.borderWidth, " solid ").concat(tabs.tab.borderColor, ";\n border-bottom-color: ").concat(active ? tabs.tab.active.backgroundColor : card.borderColor, ";\n border-top-color: ").concat(inline ? card.borderColor : tabs.tab.borderColor, ";\n border-right-color: ").concat(last && inline ? card.borderColor : tabs.tab.borderColor, "};\n border-left-color: ").concat(first && inline ? card.borderColor : tabs.tab.borderColor, "};\n border-right-width: ").concat(card.borderWidth, ";\n border-left-width: ").concat(first ? card.borderWidth : 0, ";\n background-color: ").concat(active ? tabs.tab.active.borderColor : tabs.tab.inactive.backgroundColor, ";\n padding-bottom: ").concat(tabs.tab.borderBottomWidth, ";\n");
34
+ var TabTouchable = styled.TouchableOpacity(function (_a) {
35
+ var _b = _a.active, active = _b === void 0 ? false : _b, _c = _a.first, first = _c === void 0 ? false : _c, _d = _a.last, last = _d === void 0 ? false : _d, _e = _a.stretch, stretch = _e === void 0 ? false : _e, _f = _a.theme, core = _f.core, semantic = _f.semantic, inline = _a.inline;
36
+ return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n flex-grow: ", ";\n border: ", " solid ", ";\n ", "\n ", "\n ", "\n ", "\n "], ["\n flex-grow: ", ";\n border: ", " solid ", ";\n ", "\n ", "\n ", "\n ", "\n "])), stretch ? 1 : 0, core.borderWidth.small, semantic.border.differentiated, active
37
+ ? css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-bottom-color: ", ";\n border-bottom-width: ", ";\n "], ["\n border-bottom-color: ", ";\n border-bottom-width: ", ";\n "])), semantic.message.branded, core.borderWidth.medium) : '', !inline
38
+ ? css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-top-color: transparent;\n border-top-width: 0;\n "], ["\n border-top-color: transparent;\n border-top-width: 0;\n "]))) : '', last && inline
39
+ ? ''
40
+ : css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border-right-color: transparent;\n border-right-width: 0;\n "], ["\n border-right-color: transparent;\n border-right-width: 0;\n "]))), first && inline
41
+ ? ''
42
+ : css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n border-left-color: transparent;\n border-left-width: 0;\n "], ["\n border-left-color: transparent;\n border-left-width: 0;\n "]))));
34
43
  });
35
- export var Tab = forwardRef(function (
36
- // eslint-disable-next-line
37
- _a, ref) {
38
- var active = _a.active, fullWidth = _a.fullWidth, children = _a.children, rest = __rest(_a,
39
- // eslint-disable-next-line
40
- ["active", "fullWidth", "children"]);
44
+ export var Tab = forwardRef(function (_a, ref) {
45
+ var active = _a.active, fullWidth = _a.fullWidth, children = _a.children, rest = __rest(_a, ["active", "fullWidth", "children"]);
41
46
  var stretch = useFullWidth(fullWidth);
42
47
  var breakpoints = useBreakpoint();
43
- return (React.createElement(StyledTouchableOpacity, __assign({ accessibilityRole: "tab", accessibilityState: { selected: active }, active: active, stretch: stretch, ref: ref }, rest),
44
- React.createElement(StyledText, __assign({ active: active }, breakpoints), children)));
48
+ return (React.createElement(TabTouchable, __assign({ accessibilityRole: "tab", accessibilityState: { selected: active }, active: active, stretch: stretch, ref: ref }, rest),
49
+ React.createElement(TabText, __assign({ active: active }, breakpoints), children)));
45
50
  });
51
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -25,24 +25,26 @@ var __rest = (this && this.__rest) || function (s, e) {
25
25
  return t;
26
26
  };
27
27
  import React, { Children, cloneElement } from 'react';
28
- import { View } from 'react-native';
29
28
  import styled, { css } from '../../styled.native';
30
29
  import { callAll } from '../../utils';
31
- export var TabList = styled(function (_a) {
30
+ var StyledTabList = styled.View(function (_a) {
31
+ var core = _a.theme.core;
32
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n margin: -", ";\n "], ["\n flex-direction: row;\n margin: -", ";\n "])), core.borderWidth.small);
33
+ });
34
+ export var TabList = function (_a) {
32
35
  var children = _a.children, setActiveTab = _a.setActiveTab, activeTab = _a.activeTab, tabRefs = _a.tabRefs, fullWidth = _a.fullWidth, inline = _a.inline, rest = __rest(_a, ["children", "setActiveTab", "activeTab", "tabRefs", "fullWidth", "inline"]);
33
- return (React.createElement(View, __assign({ accessibilityRole: "tablist" }, rest), Children.map(children, function (child, i) {
34
- return cloneElement(child, {
35
- onPress: callAll(function () { return setActiveTab && setActiveTab(i); }, child.props.onPress),
36
- active: activeTab === i,
37
- fullWidth: fullWidth,
38
- ref: tabRefs[i],
39
- first: i === 0,
40
- last: Children.count(children) - 1 === i,
41
- inline: inline,
42
- });
36
+ return (React.createElement(StyledTabList, __assign({ accessibilityRole: "tablist" }, rest), Children.map(children, function (child, i) {
37
+ return child
38
+ ? cloneElement(child, {
39
+ onPress: callAll(function () { return setActiveTab && setActiveTab(i); }, child.props.onPress),
40
+ active: activeTab === i,
41
+ fullWidth: fullWidth,
42
+ ref: tabRefs === null || tabRefs === void 0 ? void 0 : tabRefs[i],
43
+ first: i === 0,
44
+ last: Children.count(children) - 1 === i,
45
+ inline: inline,
46
+ })
47
+ : null;
43
48
  })));
44
- })(function (_a) {
45
- var card = _a.theme.card;
46
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n margin: -", ";\n "], ["\n flex-direction: row;\n margin: -", ";\n "])), card.borderWidth);
47
- });
49
+ };
48
50
  var templateObject_1;
@@ -1,3 +1,7 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
1
5
  var __assign = (this && this.__assign) || function () {
2
6
  __assign = Object.assign || function(t) {
3
7
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -21,14 +25,13 @@ var __rest = (this && this.__rest) || function (s, e) {
21
25
  return t;
22
26
  };
23
27
  import React from 'react';
24
- import { useBreakpoint } from '../../hooks';
25
- import styled from '../../styled.native';
28
+ import styled, { css } from '../../styled.native';
26
29
  var StyledView = styled.View(function (_a) {
27
- var card = _a.theme.card, smallAndUp = _a.smallAndUp;
28
- return "\n padding: ".concat(card.padding[smallAndUp ? 1 : 0], ";\n border-top-width: ").concat(card.borderWidth, ";\n border-style: solid;\n border-color: ").concat(card.borderColor, ";\n z-index: -1;\n ");
30
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic;
31
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", ";\n border-top-width: ", ";\n border-style: solid;\n border-color: ", ";\n z-index: -1;\n "], ["\n padding: ", ";\n border-top-width: ", ";\n border-style: solid;\n border-color: ", ";\n z-index: -1;\n "])), core.space[4], core.borderWidth.small, semantic.border.differentiated);
29
32
  });
30
33
  export var TabPanel = function (_a) {
31
34
  var rest = __rest(_a, []);
32
- var breakpoints = useBreakpoint();
33
- return React.createElement(StyledView, __assign({}, breakpoints, rest));
35
+ return React.createElement(StyledView, __assign({}, rest));
34
36
  };
37
+ var templateObject_1;
@@ -30,9 +30,15 @@ import { filterChildrenByType } from '../../utils';
30
30
  import { Card } from '../Card';
31
31
  import { TabList } from './TabList';
32
32
  import { TabPanel } from './TabPanel';
33
- export var Tabs = styled(function (_a) {
33
+ var TabsCard = styled(Card)(function (_a) {
34
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline;
35
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0;\n border: ", " solid\n ", ";\n "], ["\n padding: 0;\n border: ", " solid\n ", ";\n "])), core.borderWidth.small, inline ? semantic.border.differentiated : 'transparent');
36
+ });
37
+ export var Tabs = function (_a) {
34
38
  var children = _a.children, _b = _a.defaultSelected, defaultSelected = _b === void 0 ? 0 : _b, onSelected = _a.onSelected, fullWidth = _a.fullWidth, inline = _a.inline, rest = __rest(_a, ["children", "defaultSelected", "onSelected", "fullWidth", "inline"]);
35
39
  var _c = useState(defaultSelected), activeTab = _c[0], setActiveTab = _c[1];
40
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
41
+ // @ts-ignore there is no way to properly type it
36
42
  var tabList = filterChildrenByType(children, TabList);
37
43
  var tabPanels = filterChildrenByType(children, TabPanel);
38
44
  var tabRefs = tabPanels.map(function () { return createRef(); });
@@ -45,7 +51,7 @@ export var Tabs = styled(function (_a) {
45
51
  loaded.current = true;
46
52
  }
47
53
  }, [onSelected, activeTab]);
48
- return (React.createElement(Card, __assign({}, rest),
54
+ return (React.createElement(TabsCard, __assign({ inline: inline }, rest),
49
55
  tabList.map(function (child) {
50
56
  return cloneElement(child, {
51
57
  setActiveTab: setActiveTab,
@@ -62,8 +68,5 @@ export var Tabs = styled(function (_a) {
62
68
  hidden: activeTab !== index,
63
69
  });
64
70
  })));
65
- })(function (_a) {
66
- var _b = _a.theme, card = _b.card, tabs = _b.tabs, inline = _a.inline;
67
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0;\n border: ", " solid\n ", ";\n "], ["\n padding: 0;\n border: ", " solid\n ", ";\n "])), card.borderWidth, inline ? card.borderColor : tabs.tab.borderColor);
68
- });
71
+ };
69
72
  var templateObject_1;
@@ -29,22 +29,18 @@ import { View } from 'react-native';
29
29
  import styled, { css } from '../../styled.native';
30
30
  import { styledComponentWithBreakpoints } from '../../utils';
31
31
  var StyledP = styled.Text(function (_a) {
32
- var text = _a.theme.text, smallAndUp = _a.smallAndUp;
33
- var fontSize = smallAndUp ? text.p.fontSize[1] : text.p.fontSize[0];
34
- var lineHeight = smallAndUp ? text.p.lineHeight[1] : text.p.lineHeight[0];
35
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n "])), text.fontFamily, text.fontWeight, fontSize, lineHeight, text.color, smallAndUp ? text.p.marginTop[1] : text.p.marginTop[0], smallAndUp
36
- ? text.p.marginBottom[1]
37
- : text.p.marginBottom[0]);
32
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
33
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-bottom: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-bottom: ", ";\n "])), core.fontFamily.body.native, core.fontSize.body[smallAndUp ? 'large' : 'small'], core.lineHeight.body[smallAndUp ? 'large' : 'small'], semantic.message.base, core.space[3]);
38
34
  });
39
35
  export var P = styledComponentWithBreakpoints(StyledP);
40
36
  var StyledSmall = styled.Text(function (_a) {
41
- var text = _a.theme.text, smallAndUp = _a.smallAndUp;
42
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n "], ["\n font-size: ", ";\n "])), smallAndUp ? text.small.fontSize[1] : text.small.fontSize[0]);
37
+ var core = _a.theme.core, smallAndUp = _a.smallAndUp;
38
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n "])), core.fontSize.small[smallAndUp ? 'large' : 'small'], core.lineHeight.small[smallAndUp ? 'large' : 'small']);
43
39
  });
44
40
  export var Small = styledComponentWithBreakpoints(StyledSmall);
45
41
  export var Strong = styled.Text(function (_a) {
46
- var text = _a.theme.text;
47
- return "\n font-family: ".concat(text.strong.fontFamily, ";\n font-weight: ").concat(text.strong.fontWeight, ";\n ");
42
+ var core = _a.theme.core;
43
+ return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n ");
48
44
  });
49
45
  export var Em = styled.Text(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: 'System font';\n font-style: italic;\n"], ["\n font-family: 'System font';\n font-style: italic;\n"])));
50
46
  export var LineThrough = styled.Text(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n text-decoration: line-through;\n"], ["\n text-decoration: line-through;\n"])));
@@ -24,7 +24,7 @@ import React, { forwardRef } from 'react';
24
24
  import { Field } from '../Field';
25
25
  import { PasswordInput } from '../Input/PasswordInput';
26
26
  export var PasswordField = forwardRef(function (_a, ref) {
27
- var rest = __rest(_a, []);
27
+ var hasVisibilityToggle = _a.hasVisibilityToggle, rest = __rest(_a, ["hasVisibilityToggle"]);
28
28
  return (React.createElement(Field, __assign({}, rest, { ref: ref }),
29
- React.createElement(PasswordInput, null)));
29
+ React.createElement(PasswordInput, { hasVisibilityToggle: hasVisibilityToggle })));
30
30
  });
@@ -0,0 +1,30 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React, { forwardRef } from 'react';
24
+ import { Field } from '../Field';
25
+ import { PhoneInput } from '../Input/PhoneInput';
26
+ export var PhoneField = forwardRef(function (_a, ref) {
27
+ var rest = __rest(_a, []);
28
+ return (React.createElement(Field, __assign({}, rest, { ref: ref }),
29
+ React.createElement(PhoneInput, null)));
30
+ });
@@ -22,9 +22,14 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React, { forwardRef } from 'react';
24
24
  import { Field } from '../Field';
25
- import { TelInput } from '../Input/TelInput';
25
+ import { PhoneInput } from '../Input/PhoneInput';
26
+ /**
27
+ * @deprecated This component has been deprecated and will be removed in a future release.
28
+ * Please use the PhoneField component instead.
29
+ * */
26
30
  export var TelField = forwardRef(function (_a, ref) {
27
31
  var rest = __rest(_a, []);
32
+ console.warn('TelField component has been deprecated and will be removed in a future release. Please use the PhoneField component instead.');
28
33
  return (React.createElement(Field, __assign({}, rest, { ref: ref }),
29
- React.createElement(TelInput, null)));
34
+ React.createElement(PhoneInput, null)));
30
35
  });
@@ -2,6 +2,7 @@ export { CurrencyField } from './CurrencyField';
2
2
  export { TextField } from './TextField';
3
3
  export { NumberField } from './NumberField';
4
4
  export { TelField } from './TelField';
5
+ export { PhoneField } from './PhoneField';
5
6
  export { EmailField } from './EmailField';
6
7
  export { PasswordField } from './PasswordField';
7
8
  export { TextareaField } from './TextareaField';