@ovotech/element-native 2.2.0-canary-668a0ee-91 → 2.2.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 (302) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +2 -2
  2. package/dist/components/Accordion/Accordion.js +24 -21
  3. package/dist/components/Accordion/Group.js +32 -10
  4. package/dist/components/Accordion/Icon.js +14 -19
  5. package/dist/components/Accordion/hooks.d.ts +1 -1
  6. package/dist/components/Accordion/hooks.js +26 -3
  7. package/dist/components/Accordion/styles.d.ts +46 -688
  8. package/dist/components/Accordion/styles.js +49 -56
  9. package/dist/components/Badge/Badge.d.ts +46 -54
  10. package/dist/components/Badge/Badge.js +20 -35
  11. package/dist/components/CTAButton/CTAButton.d.ts +12 -7
  12. package/dist/components/CTAButton/CTAButton.js +27 -23
  13. package/dist/components/CTALink/CTALink.d.ts +4 -4
  14. package/dist/components/CTALink/CTALink.js +27 -5
  15. package/dist/components/Card/Card.d.ts +45 -47
  16. package/dist/components/Card/Card.js +25 -5
  17. package/dist/components/Checkbox/Checkbox.d.ts +3 -3
  18. package/dist/components/Checkbox/Checkbox.js +57 -18
  19. package/dist/components/Checkbox/CheckboxField.js +37 -7
  20. package/dist/components/DataTable/DataTable.d.ts +12 -3
  21. package/dist/components/DataTable/DataTable.js +98 -11
  22. package/dist/components/DataTable/index.d.ts +0 -2
  23. package/dist/components/DataTable/index.js +0 -16
  24. package/dist/components/DateField/DateField.d.ts +2 -2
  25. package/dist/components/DateField/DateField.js +28 -9
  26. package/dist/components/DescriptionList/DescriptionList.js +32 -8
  27. package/dist/components/DescriptionList/styled.d.ts +44 -50
  28. package/dist/components/DescriptionList/styled.js +34 -9
  29. package/dist/components/Disclosure/Disclosure.d.ts +3 -3
  30. package/dist/components/Disclosure/Disclosure.js +18 -12
  31. package/dist/components/Divider/Divider.js +7 -4
  32. package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +1 -1
  33. package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.js +28 -6
  34. package/dist/components/ErrorText/ErrorText.d.ts +39 -45
  35. package/dist/components/ErrorText/ErrorText.js +4 -7
  36. package/dist/components/Field/Field.d.ts +2 -2
  37. package/dist/components/Field/Field.js +49 -18
  38. package/dist/components/FormGroup/FormGroup.js +3 -2
  39. package/dist/components/Grid/Col.d.ts +39 -45
  40. package/dist/components/Grid/Col.js +3 -4
  41. package/dist/components/Grid/Row.d.ts +41 -47
  42. package/dist/components/Grid/Row.js +10 -7
  43. package/dist/components/Heading/Heading.js +32 -21
  44. package/dist/components/HintText/HintText.d.ts +39 -45
  45. package/dist/components/HintText/HintText.js +4 -7
  46. package/dist/components/Icon/Icon.d.ts +4 -3
  47. package/dist/components/Icon/Icon.js +27 -5
  48. package/dist/components/Input/CurrencyInput.d.ts +6 -6
  49. package/dist/components/Input/CurrencyInput.js +25 -3
  50. package/dist/components/Input/EmailInput.d.ts +6 -6
  51. package/dist/components/Input/EmailInput.js +25 -3
  52. package/dist/components/Input/Input.d.ts +8 -8
  53. package/dist/components/Input/Input.js +32 -26
  54. package/dist/components/Input/NumberInput.d.ts +6 -6
  55. package/dist/components/Input/NumberInput.js +25 -3
  56. package/dist/components/Input/PasswordInput.d.ts +6 -6
  57. package/dist/components/Input/PasswordInput.js +25 -3
  58. package/dist/components/Input/PasswordInput.styled.d.ts +39 -45
  59. package/dist/components/Input/PasswordInput.styled.js +5 -2
  60. package/dist/components/Input/PasswordVisibilityToggle.js +29 -14
  61. package/dist/components/Input/TelInput.d.ts +10 -0
  62. package/dist/components/Input/TelInput.js +41 -0
  63. package/dist/components/Input/TextInput.d.ts +6 -6
  64. package/dist/components/Input/TextInput.js +25 -3
  65. package/dist/components/Input/TextareaInput.d.ts +6 -6
  66. package/dist/components/Input/TextareaInput.js +10 -13
  67. package/dist/components/Input/index.d.ts +1 -1
  68. package/dist/components/Input/index.js +3 -3
  69. package/dist/components/LabelText/LabelText.d.ts +39 -45
  70. package/dist/components/LabelText/LabelText.js +4 -5
  71. package/dist/components/List/List.d.ts +131 -149
  72. package/dist/components/List/List.js +44 -30
  73. package/dist/components/Margin/Margin.d.ts +39 -45
  74. package/dist/components/Margin/Margin.js +3 -3
  75. package/dist/components/NavHeader/NavHeader.d.ts +1 -1
  76. package/dist/components/NavHeader/NavHeader.js +35 -34
  77. package/dist/components/Notification/Notification.d.ts +100 -104
  78. package/dist/components/Notification/Notification.js +49 -32
  79. package/dist/components/Radio/Radio.d.ts +3 -3
  80. package/dist/components/Radio/Radio.js +61 -16
  81. package/dist/components/Radio/RadioField.js +41 -11
  82. package/dist/components/SkeletonLoading/Skeleton.d.ts +39 -45
  83. package/dist/components/SkeletonLoading/SkeletonAnimation.js +33 -22
  84. package/dist/components/SkeletonLoading/SkeletonCTA.js +5 -4
  85. package/dist/components/SkeletonLoading/SkeletonCircle.js +6 -4
  86. package/dist/components/SkeletonLoading/SkeletonHeading.js +5 -4
  87. package/dist/components/SkeletonLoading/SkeletonText.js +5 -5
  88. package/dist/components/Stack/Stack.js +28 -6
  89. package/dist/components/Stretch/Stretch.js +2 -2
  90. package/dist/components/SubLabelText/SubLabelText.d.ts +39 -45
  91. package/dist/components/SubLabelText/SubLabelText.js +4 -5
  92. package/dist/components/SummaryList/SummaryList.js +32 -8
  93. package/dist/components/Tabs/Tab.d.ts +4 -4
  94. package/dist/components/Tabs/Tab.js +20 -23
  95. package/dist/components/Tabs/TabList.d.ts +222 -11
  96. package/dist/components/Tabs/TabList.js +18 -22
  97. package/dist/components/Tabs/TabPanel.js +10 -33
  98. package/dist/components/Tabs/Tabs.d.ts +227 -8
  99. package/dist/components/Tabs/Tabs.js +23 -26
  100. package/dist/components/Text/Text.d.ts +204 -234
  101. package/dist/components/Text/Text.js +20 -17
  102. package/dist/components/TextField/CurrencyField.d.ts +6 -6
  103. package/dist/components/TextField/CurrencyField.js +26 -3
  104. package/dist/components/TextField/EmailField.d.ts +6 -6
  105. package/dist/components/TextField/EmailField.js +26 -3
  106. package/dist/components/TextField/NumberField.d.ts +6 -6
  107. package/dist/components/TextField/NumberField.js +26 -3
  108. package/dist/components/TextField/PasswordField.d.ts +6 -6
  109. package/dist/components/TextField/PasswordField.js +26 -3
  110. package/dist/components/TextField/TelField.d.ts +6 -10
  111. package/dist/components/TextField/TelField.js +27 -9
  112. package/dist/components/TextField/TextField.d.ts +6 -6
  113. package/dist/components/TextField/TextField.js +26 -3
  114. package/dist/components/TextField/TextareaField.d.ts +6 -6
  115. package/dist/components/TextField/TextareaField.js +26 -3
  116. package/dist/components/TextField/index.d.ts +0 -1
  117. package/dist/components/TextField/index.js +1 -3
  118. package/dist/components/TextLink/TextLink.d.ts +4 -4
  119. package/dist/components/TextLink/TextLink.js +8 -5
  120. package/dist/components/index.d.ts +0 -1
  121. package/dist/components/index.js +0 -1
  122. package/dist/esm/components/Accordion/Accordion.js +26 -23
  123. package/dist/esm/components/Accordion/Group.js +9 -10
  124. package/dist/esm/components/Accordion/Icon.js +12 -20
  125. package/dist/esm/components/Accordion/hooks.js +3 -3
  126. package/dist/esm/components/Accordion/styles.js +48 -29
  127. package/dist/esm/components/Badge/Badge.js +17 -35
  128. package/dist/esm/components/CTAButton/CTAButton.js +28 -24
  129. package/dist/esm/components/CTALink/CTALink.js +4 -5
  130. package/dist/esm/components/Card/Card.js +25 -5
  131. package/dist/esm/components/Checkbox/Checkbox.js +34 -15
  132. package/dist/esm/components/Checkbox/CheckboxField.js +14 -7
  133. package/dist/esm/components/DataTable/DataTable.js +74 -10
  134. package/dist/esm/components/DataTable/index.js +0 -2
  135. package/dist/esm/components/DateField/DateField.js +28 -9
  136. package/dist/esm/components/DescriptionList/DescriptionList.js +9 -8
  137. package/dist/esm/components/DescriptionList/styled.js +31 -9
  138. package/dist/esm/components/Disclosure/Disclosure.js +19 -13
  139. package/dist/esm/components/Divider/Divider.js +4 -4
  140. package/dist/esm/components/ErrorSummaryNotification/ErrorSummaryNotification.js +5 -6
  141. package/dist/esm/components/ErrorText/ErrorText.js +4 -7
  142. package/dist/esm/components/Field/Field.js +26 -18
  143. package/dist/esm/components/FormGroup/FormGroup.js +3 -2
  144. package/dist/esm/components/Grid/Col.js +3 -4
  145. package/dist/esm/components/Grid/Row.js +7 -7
  146. package/dist/esm/components/Heading/Heading.js +29 -21
  147. package/dist/esm/components/HintText/HintText.js +4 -7
  148. package/dist/esm/components/Icon/Icon.js +4 -5
  149. package/dist/esm/components/Input/CurrencyInput.js +2 -3
  150. package/dist/esm/components/Input/EmailInput.js +2 -3
  151. package/dist/esm/components/Input/Input.js +33 -27
  152. package/dist/esm/components/Input/NumberInput.js +2 -3
  153. package/dist/esm/components/Input/PasswordInput.js +2 -3
  154. package/dist/esm/components/Input/PasswordInput.styled.js +5 -2
  155. package/dist/esm/components/Input/PasswordVisibilityToggle.js +7 -15
  156. package/dist/esm/components/Input/{PhoneInput.js → TelInput.js} +3 -4
  157. package/dist/esm/components/Input/TextInput.js +2 -3
  158. package/dist/esm/components/Input/TextareaInput.js +10 -13
  159. package/dist/esm/components/Input/index.js +1 -1
  160. package/dist/esm/components/LabelText/LabelText.js +4 -5
  161. package/dist/esm/components/List/List.js +45 -31
  162. package/dist/esm/components/Margin/Margin.js +3 -3
  163. package/dist/esm/components/NavHeader/NavHeader.js +32 -34
  164. package/dist/esm/components/Notification/Notification.js +50 -33
  165. package/dist/esm/components/Radio/Radio.js +38 -16
  166. package/dist/esm/components/Radio/RadioField.js +18 -11
  167. package/dist/esm/components/SkeletonLoading/SkeletonAnimation.js +11 -23
  168. package/dist/esm/components/SkeletonLoading/SkeletonCTA.js +5 -4
  169. package/dist/esm/components/SkeletonLoading/SkeletonCircle.js +6 -4
  170. package/dist/esm/components/SkeletonLoading/SkeletonHeading.js +5 -4
  171. package/dist/esm/components/SkeletonLoading/SkeletonText.js +5 -5
  172. package/dist/esm/components/Stack/Stack.js +5 -6
  173. package/dist/esm/components/Stretch/Stretch.js +2 -2
  174. package/dist/esm/components/SubLabelText/SubLabelText.js +4 -5
  175. package/dist/esm/components/SummaryList/SummaryList.js +9 -8
  176. package/dist/esm/components/Tabs/Tab.js +17 -23
  177. package/dist/esm/components/Tabs/TabList.js +18 -21
  178. package/dist/esm/components/Tabs/TabPanel.js +7 -10
  179. package/dist/esm/components/Tabs/Tabs.js +23 -25
  180. package/dist/esm/components/Text/Text.js +20 -17
  181. package/dist/esm/components/TextField/CurrencyField.js +3 -3
  182. package/dist/esm/components/TextField/EmailField.js +3 -3
  183. package/dist/esm/components/TextField/NumberField.js +3 -3
  184. package/dist/esm/components/TextField/PasswordField.js +3 -3
  185. package/dist/esm/components/TextField/TelField.js +4 -9
  186. package/dist/esm/components/TextField/TextField.js +3 -3
  187. package/dist/esm/components/TextField/TextareaField.js +3 -3
  188. package/dist/esm/components/TextField/index.js +0 -1
  189. package/dist/esm/components/TextLink/TextLink.js +8 -5
  190. package/dist/esm/components/index.js +0 -1
  191. package/dist/esm/hooks/use-breakpoint.js +4 -4
  192. package/dist/esm/providers/IconsProvider.js +2 -3
  193. package/dist/esm/providers/icons/ArrowDown.js +3 -2
  194. package/dist/esm/providers/icons/ArrowLeft.js +3 -2
  195. package/dist/esm/providers/icons/ArrowRight.js +3 -2
  196. package/dist/esm/providers/icons/ArrowUp.js +3 -2
  197. package/dist/esm/providers/icons/CaretDown.js +3 -2
  198. package/dist/esm/providers/icons/CaretLeft.js +3 -2
  199. package/dist/esm/providers/icons/CaretRight.js +3 -2
  200. package/dist/esm/providers/icons/CaretUp.js +3 -2
  201. package/dist/esm/providers/icons/Chart.js +3 -2
  202. package/dist/esm/providers/icons/Check.js +3 -2
  203. package/dist/esm/providers/icons/ChevronDown.js +3 -2
  204. package/dist/esm/providers/icons/ChevronLeft.js +3 -2
  205. package/dist/esm/providers/icons/ChevronLeftSmall.js +3 -2
  206. package/dist/esm/providers/icons/ChevronLeftSmallFirst.js +3 -2
  207. package/dist/esm/providers/icons/ChevronRight.js +3 -2
  208. package/dist/esm/providers/icons/ChevronRightSmall.js +3 -2
  209. package/dist/esm/providers/icons/ChevronRightSmallLast.js +3 -2
  210. package/dist/esm/providers/icons/ChevronUp.js +3 -2
  211. package/dist/esm/providers/icons/Cross.js +3 -2
  212. package/dist/esm/providers/icons/Dollar.js +3 -2
  213. package/dist/esm/providers/icons/Download.js +3 -2
  214. package/dist/esm/providers/icons/Electricity.js +3 -2
  215. package/dist/esm/providers/icons/Euro.js +3 -2
  216. package/dist/esm/providers/icons/Gas.js +4 -2
  217. package/dist/esm/providers/icons/Help.js +3 -2
  218. package/dist/esm/providers/icons/Hide.js +3 -2
  219. package/dist/esm/providers/icons/Home.js +3 -2
  220. package/dist/esm/providers/icons/Info.js +3 -2
  221. package/dist/esm/providers/icons/Link.js +4 -2
  222. package/dist/esm/providers/icons/Logo.js +4 -3
  223. package/dist/esm/providers/icons/Minus.js +3 -2
  224. package/dist/esm/providers/icons/NewWindow.js +3 -2
  225. package/dist/esm/providers/icons/PaymentCard.js +3 -2
  226. package/dist/esm/providers/icons/Plus.js +3 -2
  227. package/dist/esm/providers/icons/Pound.js +3 -2
  228. package/dist/esm/providers/icons/Search.js +3 -2
  229. package/dist/esm/providers/icons/Show.js +3 -2
  230. package/dist/esm/providers/icons/User.js +3 -2
  231. package/dist/esm/theme/create-theme.js +153 -0
  232. package/dist/esm/utils/utils.js +3 -7
  233. package/dist/hooks/use-breakpoint.js +4 -4
  234. package/dist/providers/IconsProvider.js +25 -3
  235. package/dist/providers/icons/ArrowDown.js +6 -2
  236. package/dist/providers/icons/ArrowLeft.js +6 -2
  237. package/dist/providers/icons/ArrowRight.js +6 -2
  238. package/dist/providers/icons/ArrowUp.js +6 -2
  239. package/dist/providers/icons/CaretDown.js +6 -2
  240. package/dist/providers/icons/CaretLeft.js +6 -2
  241. package/dist/providers/icons/CaretRight.js +6 -2
  242. package/dist/providers/icons/CaretUp.js +6 -2
  243. package/dist/providers/icons/Chart.js +6 -2
  244. package/dist/providers/icons/Check.js +6 -2
  245. package/dist/providers/icons/ChevronDown.js +6 -2
  246. package/dist/providers/icons/ChevronLeft.js +6 -2
  247. package/dist/providers/icons/ChevronLeftSmall.js +6 -2
  248. package/dist/providers/icons/ChevronLeftSmallFirst.js +6 -2
  249. package/dist/providers/icons/ChevronRight.js +6 -2
  250. package/dist/providers/icons/ChevronRightSmall.js +6 -2
  251. package/dist/providers/icons/ChevronRightSmallLast.js +6 -2
  252. package/dist/providers/icons/ChevronUp.js +6 -2
  253. package/dist/providers/icons/Cross.js +6 -2
  254. package/dist/providers/icons/Dollar.js +6 -2
  255. package/dist/providers/icons/Download.js +6 -2
  256. package/dist/providers/icons/Electricity.js +6 -2
  257. package/dist/providers/icons/Euro.js +6 -2
  258. package/dist/providers/icons/Gas.js +7 -2
  259. package/dist/providers/icons/Help.js +6 -2
  260. package/dist/providers/icons/Hide.js +6 -2
  261. package/dist/providers/icons/Home.js +6 -2
  262. package/dist/providers/icons/Info.js +6 -2
  263. package/dist/providers/icons/Link.js +7 -2
  264. package/dist/providers/icons/Logo.js +6 -2
  265. package/dist/providers/icons/Minus.js +6 -2
  266. package/dist/providers/icons/NewWindow.js +6 -2
  267. package/dist/providers/icons/PaymentCard.js +6 -2
  268. package/dist/providers/icons/Plus.js +6 -2
  269. package/dist/providers/icons/Pound.js +6 -2
  270. package/dist/providers/icons/Search.js +6 -2
  271. package/dist/providers/icons/Show.js +6 -2
  272. package/dist/providers/icons/User.js +6 -2
  273. package/dist/styled.native.d.ts +234 -270
  274. package/dist/theme/create-theme.js +153 -0
  275. package/dist/theme/index.d.ts +39 -45
  276. package/dist/theme/theme.d.ts +90 -0
  277. package/dist/utils/utils.d.ts +4 -5
  278. package/dist/utils/utils.js +26 -8
  279. package/package.json +5 -6
  280. package/dist/components/DataTable/TableRow.d.ts +0 -2
  281. package/dist/components/DataTable/TableRow.js +0 -31
  282. package/dist/components/DataTable/styles.d.ts +0 -2517
  283. package/dist/components/DataTable/styles.js +0 -77
  284. package/dist/components/DataTable/types.d.ts +0 -15
  285. package/dist/components/DataTable/types.js +0 -2
  286. package/dist/components/Input/PhoneInput.d.ts +0 -10
  287. package/dist/components/Input/PhoneInput.js +0 -19
  288. package/dist/components/SelectField/Select.d.ts +0 -244
  289. package/dist/components/SelectField/Select.js +0 -102
  290. package/dist/components/SelectField/SelectField.d.ts +0 -7
  291. package/dist/components/SelectField/SelectField.js +0 -33
  292. package/dist/components/SelectField/index.d.ts +0 -1
  293. package/dist/components/SelectField/index.js +0 -5
  294. package/dist/components/TextField/PhoneField.d.ts +0 -10
  295. package/dist/components/TextField/PhoneField.js +0 -33
  296. package/dist/esm/components/DataTable/TableRow.js +0 -27
  297. package/dist/esm/components/DataTable/styles.js +0 -51
  298. package/dist/esm/components/DataTable/types.js +0 -1
  299. package/dist/esm/components/SelectField/Select.js +0 -75
  300. package/dist/esm/components/SelectField/SelectField.js +0 -29
  301. package/dist/esm/components/SelectField/index.js +0 -1
  302. package/dist/esm/components/TextField/PhoneField.js +0 -30
@@ -10,6 +10,29 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
13
36
  var __rest = (this && this.__rest) || function (s, e) {
14
37
  var t = {};
15
38
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -23,8 +46,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
46
  };
24
47
  Object.defineProperty(exports, "__esModule", { value: true });
25
48
  exports.SummaryItem = exports.SummaryList = void 0;
26
- var jsx_runtime_1 = require("react/jsx-runtime");
27
- var react_1 = require("react");
49
+ var react_1 = __importStar(require("react"));
28
50
  var List_1 = require("../List");
29
51
  /**
30
52
  * @deprecated This component has been deprecated and will be removed in a future release.
@@ -33,15 +55,17 @@ var List_1 = require("../List");
33
55
  var SummaryList = function (_a) {
34
56
  var children = _a.children, rest = __rest(_a, ["children"]);
35
57
  console.warn('SummaryList component has been deprecated and will be removed in a future release. Please use the DescriptionList component instead.');
36
- return ((0, jsx_runtime_1.jsx)(List_1.Dl, __assign({}, rest, { children: react_1.Children.map(children, function (child, index) {
37
- return (0, react_1.cloneElement)(child, {
38
- index: index,
39
- });
40
- }) })));
58
+ return (react_1.default.createElement(List_1.Dl, __assign({}, rest), react_1.Children.map(children, function (child, index) {
59
+ return (0, react_1.cloneElement)(child, {
60
+ index: index,
61
+ });
62
+ })));
41
63
  };
42
64
  exports.SummaryList = SummaryList;
43
65
  var SummaryItem = function (_a) {
44
66
  var label = _a.label, children = _a.children, index = _a.index, rest = __rest(_a, ["label", "children", "index"]);
45
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(List_1.Dt, __assign({ style: index === 0 ? { marginTop: 0 } : undefined }, { children: label })), (0, jsx_runtime_1.jsx)(List_1.Dd, __assign({}, rest, { children: children }))] }));
67
+ return (react_1.default.createElement(react_1.default.Fragment, null,
68
+ react_1.default.createElement(List_1.Dt, { style: index === 0 ? { marginTop: 0 } : undefined }, label),
69
+ react_1.default.createElement(List_1.Dd, __assign({}, rest), children)));
46
70
  };
47
71
  exports.SummaryItem = SummaryItem;
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TouchableOpacity, GestureResponderEvent } from 'react-native';
3
3
  import { FullWidthOptions } from '../../hooks';
4
- export declare const Tab: import("react").ForwardRefExoticComponent<{
4
+ export declare const Tab: React.ForwardRefExoticComponent<{
5
5
  active?: boolean | undefined;
6
6
  fullWidth?: FullWidthOptions | undefined;
7
7
  onPress?: ((event: GestureResponderEvent) => void) | undefined;
8
8
  testID?: string | undefined;
9
9
  } & {
10
- children?: import("react").ReactNode;
11
- } & import("react").RefAttributes<TouchableOpacity>>;
10
+ children?: React.ReactNode;
11
+ } & React.RefAttributes<TouchableOpacity>>;
@@ -1,8 +1,4 @@
1
1
  "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
2
  var __assign = (this && this.__assign) || function () {
7
3
  __assign = Object.assign || function(t) {
8
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -48,30 +44,31 @@ var __rest = (this && this.__rest) || function (s, e) {
48
44
  }
49
45
  return t;
50
46
  };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
51
50
  Object.defineProperty(exports, "__esModule", { value: true });
52
51
  exports.Tab = void 0;
53
- var jsx_runtime_1 = require("react/jsx-runtime");
54
- var react_1 = require("react");
52
+ var react_1 = __importStar(require("react"));
55
53
  var hooks_1 = require("../../hooks");
56
- var styled_native_1 = __importStar(require("../../styled.native"));
57
- var TabText = styled_native_1.default.Text(function (_a) {
58
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
59
- return (0, styled_native_1.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]);
54
+ var styled_native_1 = __importDefault(require("../../styled.native"));
55
+ var utils_1 = require("../../utils");
56
+ var StyledText = styled_native_1.default.Text(function (_a) {
57
+ var tabs = _a.theme.tabs, smallAndUp = _a.smallAndUp, active = _a.active;
58
+ return "\n font-size: ".concat(tabs.tab.fontSize[smallAndUp ? 1 : 0], ";\n font-family: ").concat(tabs.tab.fontFamily, ";\n background-color: ").concat(active ? tabs.tab.active.backgroundColor : tabs.tab.inactive.backgroundColor, ";\n line-height: ").concat("".concat(tabs.tab.lineHeight * (0, utils_1.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");
60
59
  });
61
- var TabTouchable = styled_native_1.default.TouchableOpacity(function (_a) {
62
- 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;
63
- return (0, styled_native_1.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
64
- ? (0, styled_native_1.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
65
- ? (0, styled_native_1.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
66
- ? ''
67
- : (0, styled_native_1.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
68
- ? ''
69
- : (0, styled_native_1.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 "]))));
60
+ var StyledTouchableOpacity = styled_native_1.default.TouchableOpacity(function (_a) {
61
+ 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;
62
+ 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");
70
63
  });
71
- exports.Tab = (0, react_1.forwardRef)(function (_a, ref) {
72
- var active = _a.active, fullWidth = _a.fullWidth, children = _a.children, rest = __rest(_a, ["active", "fullWidth", "children"]);
64
+ exports.Tab = (0, react_1.forwardRef)(function (
65
+ // eslint-disable-next-line
66
+ _a, ref) {
67
+ var active = _a.active, fullWidth = _a.fullWidth, children = _a.children, rest = __rest(_a,
68
+ // eslint-disable-next-line
69
+ ["active", "fullWidth", "children"]);
73
70
  var stretch = (0, hooks_1.useFullWidth)(fullWidth);
74
71
  var breakpoints = (0, hooks_1.useBreakpoint)();
75
- return ((0, jsx_runtime_1.jsx)(TabTouchable, __assign({ accessibilityRole: "tab", accessibilityState: { selected: active }, active: active, stretch: stretch, ref: ref }, rest, { children: (0, jsx_runtime_1.jsx)(TabText, __assign({ active: active }, breakpoints, { children: children })) })));
72
+ return (react_1.default.createElement(StyledTouchableOpacity, __assign({ accessibilityRole: "tab", accessibilityState: { selected: active }, active: active, stretch: stretch, ref: ref }, rest),
73
+ react_1.default.createElement(StyledText, __assign({ active: active }, breakpoints), children)));
76
74
  });
77
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -1,11 +1,222 @@
1
- /// <reference types="react" />
2
- import { ViewProps } from 'react-native';
3
- declare type TabListProps = ViewProps & {
4
- fullWidth?: 'always' | 'never' | 'small';
5
- setActiveTab?: (i: number) => void;
6
- activeTab?: number;
7
- tabRefs?: React.RefObject<any>[];
8
- inline?: boolean;
9
- };
10
- export declare const TabList: ({ children, setActiveTab, activeTab, tabRefs, fullWidth, inline, ...rest }: TabListProps) => JSX.Element;
11
- export {};
1
+ export declare const TabList: import("styled-components").StyledComponent<({ children, setActiveTab, activeTab, tabRefs, fullWidth, inline, ...rest }: any) => JSX.Element, import("../../theme/theme").Theme & {
2
+ core: {
3
+ radius: Record<"small" | "medium" | "large" | "max", string>;
4
+ borderWidth: Record<"small" | "medium" | "large", string>;
5
+ breakpoint: Record<"small" | "medium" | "large", string | number>;
6
+ mediaQuery: Record<"small" | "medium" | "large", string>;
7
+ space: Record<0 | 2 | 1 | 10 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
8
+ transition: Record<"medium" | "slow" | "fast", string>;
9
+ opacity: Record<"transparent" | "translucent" | "solid", string | number>;
10
+ color: Record<"sand" | "red" | "orange" | "yellow" | "lime" | "green" | "teal" | "blue" | "purple", {
11
+ lightest: string;
12
+ lighter: string;
13
+ light: string;
14
+ base: string;
15
+ dark: string;
16
+ darker: string;
17
+ darkest: string;
18
+ }> & {
19
+ brand: Record<string, string>;
20
+ };
21
+ fontFamily: Record<"heading" | "body" | "mono" | "bodyBold", {
22
+ native: string;
23
+ web: string;
24
+ }>;
25
+ fontWeight: Record<"bold" | "book" | "black", string | number>;
26
+ fontSize: Record<"small" | "body" | "label" | "heading1" | "heading2" | "heading3" | "heading4" | "lead", {
27
+ small: string | number;
28
+ large: string | number;
29
+ }>;
30
+ lineHeight: Record<"small" | "body" | "label" | "heading1" | "heading2" | "heading3" | "heading4" | "lead", {
31
+ small: string | number;
32
+ large: string | number;
33
+ }>;
34
+ };
35
+ semantic: {
36
+ surface: Record<"base" | "cutout" | "elevated", string>;
37
+ message: Record<"base" | "link" | "error" | "secondary" | "branded", string>;
38
+ border: Record<"graphic" | "differentiated" | "functional", string>;
39
+ focus: Record<"outline" | "surface", string>;
40
+ inverted: Record<"surface" | "border", string> & {
41
+ message: Record<"base" | "link" | "secondary" | "branded", string>;
42
+ };
43
+ success: {
44
+ border: string;
45
+ surface: string;
46
+ message: {
47
+ base: string;
48
+ secondary: string;
49
+ };
50
+ };
51
+ warning: {
52
+ border: string;
53
+ surface: string;
54
+ message: {
55
+ base: string;
56
+ secondary: string;
57
+ };
58
+ };
59
+ error: {
60
+ border: string;
61
+ surface: string;
62
+ message: {
63
+ base: string;
64
+ secondary: string;
65
+ };
66
+ };
67
+ info: {
68
+ border: string;
69
+ surface: string;
70
+ message: {
71
+ base: string;
72
+ secondary: string;
73
+ };
74
+ };
75
+ electricity: {
76
+ border: string;
77
+ surface: string;
78
+ message: {
79
+ base: string;
80
+ secondary: string;
81
+ };
82
+ };
83
+ gas: {
84
+ border: string;
85
+ surface: string;
86
+ message: {
87
+ base: string;
88
+ secondary: string;
89
+ };
90
+ };
91
+ };
92
+ component: {
93
+ heading1: {
94
+ fontFamily: string;
95
+ fontWeight: string | number;
96
+ fontSize: {
97
+ small: string | number;
98
+ large: string | number;
99
+ };
100
+ lineHeight: {
101
+ small: string | number;
102
+ large: string | number;
103
+ };
104
+ };
105
+ heading2: {
106
+ fontFamily: string;
107
+ fontWeight: string | number;
108
+ fontSize: {
109
+ small: string | number;
110
+ large: string | number;
111
+ };
112
+ lineHeight: {
113
+ small: string | number;
114
+ large: string | number;
115
+ };
116
+ };
117
+ heading3: {
118
+ fontFamily: string;
119
+ fontWeight: string | number;
120
+ fontSize: {
121
+ small: string | number;
122
+ large: string | number;
123
+ };
124
+ lineHeight: {
125
+ small: string | number;
126
+ large: string | number;
127
+ };
128
+ };
129
+ heading4: {
130
+ fontFamily: string;
131
+ fontWeight: string | number;
132
+ fontSize: {
133
+ small: string | number;
134
+ large: string | number;
135
+ };
136
+ lineHeight: {
137
+ small: string | number;
138
+ large: string | number;
139
+ };
140
+ };
141
+ lead: {
142
+ fontFamily: string;
143
+ fontWeight: string | number;
144
+ fontSize: {
145
+ small: string | number;
146
+ large: string | number;
147
+ };
148
+ lineHeight: {
149
+ small: string | number;
150
+ large: string | number;
151
+ };
152
+ };
153
+ body: {
154
+ fontFamily: string;
155
+ fontWeight: string | number;
156
+ fontSize: {
157
+ small: string | number;
158
+ large: string | number;
159
+ };
160
+ lineHeight: {
161
+ small: string | number;
162
+ large: string | number;
163
+ };
164
+ };
165
+ small: {
166
+ fontFamily: string;
167
+ fontWeight: string | number;
168
+ fontSize: {
169
+ small: string | number;
170
+ large: string | number;
171
+ };
172
+ lineHeight: {
173
+ small: string | number;
174
+ large: string | number;
175
+ };
176
+ };
177
+ label: {
178
+ fontFamily: string;
179
+ fontWeight: string | number;
180
+ fontSize: {
181
+ small: string | number;
182
+ large: string | number;
183
+ };
184
+ lineHeight: {
185
+ small: string | number;
186
+ large: string | number;
187
+ };
188
+ };
189
+ cta: {
190
+ primary: {
191
+ message: string;
192
+ surface: string;
193
+ messageHover: string;
194
+ surfaceHover: string;
195
+ messageFocused: string;
196
+ surfaceFocused: string;
197
+ outlineFocused: string;
198
+ backgroundFocused: string;
199
+ };
200
+ secondary: {
201
+ message: string;
202
+ surface: string;
203
+ messageHover: string;
204
+ surfaceHover: string;
205
+ messageFocused: string;
206
+ surfaceFocused: string;
207
+ outlineFocused: string;
208
+ backgroundFocused: string;
209
+ };
210
+ destructive: {
211
+ message: string;
212
+ surface: string;
213
+ messageHover: string;
214
+ surfaceHover: string;
215
+ messageFocused: string;
216
+ surfaceFocused: string;
217
+ outlineFocused: string;
218
+ backgroundFocused: string;
219
+ };
220
+ };
221
+ };
222
+ }, {}, never>;
@@ -50,29 +50,25 @@ var __rest = (this && this.__rest) || function (s, e) {
50
50
  };
51
51
  Object.defineProperty(exports, "__esModule", { value: true });
52
52
  exports.TabList = void 0;
53
- var jsx_runtime_1 = require("react/jsx-runtime");
54
- var react_1 = require("react");
53
+ var react_1 = __importStar(require("react"));
54
+ var react_native_1 = require("react-native");
55
55
  var styled_native_1 = __importStar(require("../../styled.native"));
56
56
  var utils_1 = require("../../utils");
57
- var StyledTabList = styled_native_1.default.View(function (_a) {
58
- var core = _a.theme.core;
59
- return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n margin: -", ";\n "], ["\n flex-direction: row;\n margin: -", ";\n "])), core.borderWidth.small);
60
- });
61
- var TabList = function (_a) {
57
+ exports.TabList = (0, styled_native_1.default)(function (_a) {
62
58
  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"]);
63
- return ((0, jsx_runtime_1.jsx)(StyledTabList, __assign({ accessibilityRole: "tablist" }, rest, { children: react_1.Children.map(children, function (child, i) {
64
- return child
65
- ? (0, react_1.cloneElement)(child, {
66
- onPress: (0, utils_1.callAll)(function () { return setActiveTab && setActiveTab(i); }, child.props.onPress),
67
- active: activeTab === i,
68
- fullWidth: fullWidth,
69
- ref: tabRefs === null || tabRefs === void 0 ? void 0 : tabRefs[i],
70
- first: i === 0,
71
- last: react_1.Children.count(children) - 1 === i,
72
- inline: inline,
73
- })
74
- : null;
75
- }) })));
76
- };
77
- exports.TabList = TabList;
59
+ return (react_1.default.createElement(react_native_1.View, __assign({ accessibilityRole: "tablist" }, rest), react_1.Children.map(children, function (child, i) {
60
+ return (0, react_1.cloneElement)(child, {
61
+ onPress: (0, utils_1.callAll)(function () { return setActiveTab && setActiveTab(i); }, child.props.onPress),
62
+ active: activeTab === i,
63
+ fullWidth: fullWidth,
64
+ ref: tabRefs[i],
65
+ first: i === 0,
66
+ last: react_1.Children.count(children) - 1 === i,
67
+ inline: inline,
68
+ });
69
+ })));
70
+ })(function (_a) {
71
+ var card = _a.theme.card;
72
+ return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n margin: -", ";\n "], ["\n flex-direction: row;\n margin: -", ";\n "])), card.borderWidth);
73
+ });
78
74
  var templateObject_1;
@@ -1,8 +1,4 @@
1
1
  "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
2
  var __assign = (this && this.__assign) || function () {
7
3
  __assign = Object.assign || function(t) {
8
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -14,29 +10,6 @@ var __assign = (this && this.__assign) || function () {
14
10
  };
15
11
  return __assign.apply(this, arguments);
16
12
  };
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- var desc = Object.getOwnPropertyDescriptor(m, k);
20
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
- desc = { enumerable: true, get: function() { return m[k]; } };
22
- }
23
- Object.defineProperty(o, k2, desc);
24
- }) : (function(o, m, k, k2) {
25
- if (k2 === undefined) k2 = k;
26
- o[k2] = m[k];
27
- }));
28
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
- Object.defineProperty(o, "default", { enumerable: true, value: v });
30
- }) : function(o, v) {
31
- o["default"] = v;
32
- });
33
- var __importStar = (this && this.__importStar) || function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
13
  var __rest = (this && this.__rest) || function (s, e) {
41
14
  var t = {};
42
15
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -48,17 +21,21 @@ var __rest = (this && this.__rest) || function (s, e) {
48
21
  }
49
22
  return t;
50
23
  };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
51
27
  Object.defineProperty(exports, "__esModule", { value: true });
52
28
  exports.TabPanel = void 0;
53
- var jsx_runtime_1 = require("react/jsx-runtime");
54
- var styled_native_1 = __importStar(require("../../styled.native"));
29
+ var react_1 = __importDefault(require("react"));
30
+ var hooks_1 = require("../../hooks");
31
+ var styled_native_1 = __importDefault(require("../../styled.native"));
55
32
  var StyledView = styled_native_1.default.View(function (_a) {
56
- var _b = _a.theme, core = _b.core, semantic = _b.semantic;
57
- return (0, styled_native_1.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);
33
+ var card = _a.theme.card, smallAndUp = _a.smallAndUp;
34
+ 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 ");
58
35
  });
59
36
  var TabPanel = function (_a) {
60
37
  var rest = __rest(_a, []);
61
- return (0, jsx_runtime_1.jsx)(StyledView, __assign({}, rest));
38
+ var breakpoints = (0, hooks_1.useBreakpoint)();
39
+ return react_1.default.createElement(StyledView, __assign({}, breakpoints, rest));
62
40
  };
63
41
  exports.TabPanel = TabPanel;
64
- var templateObject_1;