@ovotech/element-native 3.8.0 → 3.8.1-canary-dff71b6-233

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 (162) hide show
  1. package/dist/components/Accordion/Accordion.js +4 -9
  2. package/dist/components/Accordion/styles.d.ts +1225 -484
  3. package/dist/components/Accordion/styles.js +4 -3
  4. package/dist/components/ActionCard/ActionCard.js +4 -3
  5. package/dist/components/ActionList/ActionList.d.ts +1 -1
  6. package/dist/components/ActionList/ActionList.js +2 -1
  7. package/dist/components/ActionList/styled.d.ts +2502 -1020
  8. package/dist/components/ActionList/styled.js +6 -5
  9. package/dist/components/Badge/Badge.d.ts +408 -161
  10. package/dist/components/Badge/Badge.js +3 -2
  11. package/dist/components/CTAButton/CTAButton.js +7 -6
  12. package/dist/components/Card/Card.d.ts +410 -161
  13. package/dist/components/Card/Card.js +5 -4
  14. package/dist/components/Checkbox/Checkbox.js +4 -3
  15. package/dist/components/DataTable/styles.d.ts +5472 -2261
  16. package/dist/components/DataTable/styles.js +14 -15
  17. package/dist/components/DateField/DateField.js +4 -3
  18. package/dist/components/DescriptionList/styled.d.ts +407 -160
  19. package/dist/components/DescriptionList/styled.js +5 -4
  20. package/dist/components/Disclosure/Disclosure.js +4 -3
  21. package/dist/components/Em/Em.d.ts +407 -160
  22. package/dist/components/ErrorText/ErrorText.d.ts +407 -160
  23. package/dist/components/ErrorText/ErrorText.js +2 -3
  24. package/dist/components/FilterSelect/FilterSelect.js +5 -4
  25. package/dist/components/Grid/Col.d.ts +407 -160
  26. package/dist/components/Grid/Col.js +3 -3
  27. package/dist/components/Grid/Row.d.ts +407 -160
  28. package/dist/components/Grid/Row.js +4 -4
  29. package/dist/components/Heading1/Heading1.d.ts +3 -1
  30. package/dist/components/Heading1/Heading1.js +6 -4
  31. package/dist/components/Heading2/Heading2.d.ts +3 -1
  32. package/dist/components/Heading2/Heading2.js +6 -4
  33. package/dist/components/Heading3/Heading3.d.ts +3 -1
  34. package/dist/components/Heading3/Heading3.js +6 -4
  35. package/dist/components/Heading4/Heading4.d.ts +3 -1
  36. package/dist/components/Heading4/Heading4.js +6 -4
  37. package/dist/components/HintText/HintText.d.ts +407 -160
  38. package/dist/components/HintText/HintText.js +2 -3
  39. package/dist/components/Input/Input.js +7 -4
  40. package/dist/components/Label/Label.d.ts +5 -241
  41. package/dist/components/Label/Label.js +17 -4
  42. package/dist/components/LabelText/LabelText.d.ts +407 -160
  43. package/dist/components/LabelText/LabelText.js +2 -1
  44. package/dist/components/Lead/Lead.d.ts +5 -241
  45. package/dist/components/Lead/Lead.js +19 -4
  46. package/dist/components/LineThrough/LineThrough.d.ts +407 -160
  47. package/dist/components/List/styled.d.ts +1636 -648
  48. package/dist/components/List/styled.js +4 -4
  49. package/dist/components/Margin/Margin.d.ts +408 -162
  50. package/dist/components/Margin/Margin.js +2 -3
  51. package/dist/components/NavHeader/NavHeader.d.ts +10 -2
  52. package/dist/components/NavHeader/NavHeader.js +25 -29
  53. package/dist/components/NavHeader/NavHeader.styles.d.ts +3845 -1387
  54. package/dist/components/NavHeader/NavHeader.styles.js +18 -17
  55. package/dist/components/Notification/Notification.d.ts +816 -322
  56. package/dist/components/Notification/Notification.js +18 -15
  57. package/dist/components/P/P.d.ts +2 -0
  58. package/dist/components/P/P.js +3 -2
  59. package/dist/components/PasswordInput/PasswordInput.styled.d.ts +407 -160
  60. package/dist/components/PasswordInput/PasswordInput.styled.js +2 -1
  61. package/dist/components/{HorizontalCarousel/HorizontalCarousel.d.ts → ProductCarousel/ProductCarousel.d.ts} +2 -2
  62. package/dist/components/ProductCarousel/ProductCarousel.js +128 -0
  63. package/dist/components/ProductCarousel/anchor-point.d.ts +10 -0
  64. package/dist/components/ProductCarousel/anchor-point.js +53 -0
  65. package/dist/components/ProductCarousel/index.d.ts +1 -0
  66. package/dist/components/ProductCarousel/index.js +5 -0
  67. package/dist/components/Radio/Radio.js +5 -4
  68. package/dist/components/RadioCard/RadioCard.d.ts +9 -0
  69. package/dist/components/RadioCard/RadioCard.js +72 -0
  70. package/dist/components/RadioCard/index.d.ts +1 -0
  71. package/dist/components/RadioCard/index.js +5 -0
  72. package/dist/components/SelectField/Select.d.ts +407 -160
  73. package/dist/components/SelectField/Select.js +8 -7
  74. package/dist/components/SkeletonCTA/SkeletonCTA.js +2 -1
  75. package/dist/components/SkeletonCircle/SkeletonCircle.js +2 -2
  76. package/dist/components/SkeletonText/SkeletonText.js +4 -1
  77. package/dist/components/Small/Small.d.ts +407 -160
  78. package/dist/components/Small/Small.js +2 -1
  79. package/dist/components/Stack/Stack.d.ts +1 -2
  80. package/dist/components/Stack/Stack.js +2 -1
  81. package/dist/components/Strong/Strong.d.ts +407 -160
  82. package/dist/components/SubLabelText/SubLabelText.d.ts +407 -160
  83. package/dist/components/SubLabelText/SubLabelText.js +2 -1
  84. package/dist/components/Tabs/Tab.js +8 -7
  85. package/dist/components/Tabs/TabList.js +2 -1
  86. package/dist/components/Tabs/TabPanel.js +2 -1
  87. package/dist/components/Tabs/Tabs.js +2 -1
  88. package/dist/components/TextareaInput/TextareaInput.js +2 -2
  89. package/dist/components/Toast/Toast.js +3 -2
  90. package/dist/components/Toggle/Toggle.js +2 -2
  91. package/dist/components/Toggle/styles.d.ts +1638 -650
  92. package/dist/components/Toggle/styles.js +5 -4
  93. package/dist/components/index.d.ts +2 -0
  94. package/dist/components/index.js +2 -0
  95. package/dist/esm/components/Accordion/Accordion.js +4 -9
  96. package/dist/esm/components/Accordion/styles.js +4 -3
  97. package/dist/esm/components/ActionCard/ActionCard.js +4 -3
  98. package/dist/esm/components/ActionList/ActionList.js +2 -1
  99. package/dist/esm/components/ActionList/styled.js +6 -5
  100. package/dist/esm/components/Badge/Badge.js +3 -2
  101. package/dist/esm/components/CTAButton/CTAButton.js +7 -6
  102. package/dist/esm/components/Card/Card.js +5 -4
  103. package/dist/esm/components/Checkbox/Checkbox.js +4 -3
  104. package/dist/esm/components/DataTable/styles.js +14 -15
  105. package/dist/esm/components/DateField/DateField.js +4 -3
  106. package/dist/esm/components/DescriptionList/styled.js +5 -4
  107. package/dist/esm/components/Disclosure/Disclosure.js +4 -3
  108. package/dist/esm/components/ErrorText/ErrorText.js +2 -3
  109. package/dist/esm/components/FilterSelect/FilterSelect.js +5 -4
  110. package/dist/esm/components/Grid/Col.js +3 -3
  111. package/dist/esm/components/Grid/Row.js +4 -4
  112. package/dist/esm/components/Heading1/Heading1.js +5 -3
  113. package/dist/esm/components/Heading2/Heading2.js +5 -3
  114. package/dist/esm/components/Heading3/Heading3.js +5 -3
  115. package/dist/esm/components/Heading4/Heading4.js +5 -3
  116. package/dist/esm/components/HintText/HintText.js +2 -3
  117. package/dist/esm/components/Input/Input.js +7 -4
  118. package/dist/esm/components/Label/Label.js +17 -4
  119. package/dist/esm/components/LabelText/LabelText.js +2 -1
  120. package/dist/esm/components/Lead/Lead.js +19 -4
  121. package/dist/esm/components/List/styled.js +4 -4
  122. package/dist/esm/components/Margin/Margin.js +2 -3
  123. package/dist/esm/components/NavHeader/NavHeader.js +26 -30
  124. package/dist/esm/components/NavHeader/NavHeader.styles.js +17 -16
  125. package/dist/esm/components/Notification/Notification.js +18 -15
  126. package/dist/esm/components/P/P.js +3 -2
  127. package/dist/esm/components/PasswordInput/PasswordInput.styled.js +2 -1
  128. package/dist/esm/components/ProductCarousel/ProductCarousel.js +98 -0
  129. package/dist/esm/components/ProductCarousel/anchor-point.js +49 -0
  130. package/dist/esm/components/ProductCarousel/index.js +1 -0
  131. package/dist/esm/components/Radio/Radio.js +5 -4
  132. package/dist/esm/components/RadioCard/RadioCard.js +66 -0
  133. package/dist/esm/components/RadioCard/index.js +1 -0
  134. package/dist/esm/components/SelectField/Select.js +8 -7
  135. package/dist/esm/components/SkeletonCTA/SkeletonCTA.js +2 -1
  136. package/dist/esm/components/SkeletonCircle/SkeletonCircle.js +1 -1
  137. package/dist/esm/components/SkeletonText/SkeletonText.js +4 -1
  138. package/dist/esm/components/Small/Small.js +2 -1
  139. package/dist/esm/components/Stack/Stack.js +2 -1
  140. package/dist/esm/components/SubLabelText/SubLabelText.js +2 -1
  141. package/dist/esm/components/Tabs/Tab.js +9 -8
  142. package/dist/esm/components/Tabs/TabList.js +2 -1
  143. package/dist/esm/components/Tabs/TabPanel.js +2 -1
  144. package/dist/esm/components/Tabs/Tabs.js +2 -1
  145. package/dist/esm/components/TextareaInput/TextareaInput.js +2 -2
  146. package/dist/esm/components/Toast/Toast.js +3 -2
  147. package/dist/esm/components/Toggle/Toggle.js +2 -2
  148. package/dist/esm/components/Toggle/styles.js +5 -4
  149. package/dist/esm/components/index.js +2 -0
  150. package/dist/esm/utils/utils.js +1 -7
  151. package/dist/styled.native.d.ts +2523 -1041
  152. package/dist/utils/utils.d.ts +1 -3
  153. package/dist/utils/utils.js +1 -9
  154. package/package.json +5 -4
  155. package/dist/components/HorizontalCarousel/HorizontalCarousel.js +0 -92
  156. package/dist/components/HorizontalCarousel/index.d.ts +0 -1
  157. package/dist/components/HorizontalCarousel/index.js +0 -17
  158. package/dist/esm/components/HorizontalCarousel/HorizontalCarousel.js +0 -62
  159. package/dist/esm/components/HorizontalCarousel/index.js +0 -1
  160. /package/dist/components/{HorizontalCarousel → ProductCarousel}/NavigationDots.d.ts +0 -0
  161. /package/dist/components/{HorizontalCarousel → ProductCarousel}/NavigationDots.js +0 -0
  162. /package/dist/esm/components/{HorizontalCarousel → ProductCarousel}/NavigationDots.js +0 -0
@@ -4,15 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.StyledToggleDot = exports.StyledToggleInput = exports.StyledToggleInputWrapper = exports.StyledWrapper = void 0;
7
+ var element_core_1 = require("@ovotech/element-core");
7
8
  var react_native_1 = require("react-native");
8
9
  var styled_native_1 = __importDefault(require("../../styled.native"));
9
10
  exports.StyledWrapper = styled_native_1.default.TouchableOpacity(function (_a) {
10
11
  var core = _a.theme.core, hasLabel = _a.hasLabel, labelPosition = _a.labelPosition;
11
- return "\n width: ".concat(hasLabel ? '100%' : core.space[11], ";\n display: flex;\n flex-direction: row").concat(labelPosition === 'left' ? '' : '-reverse', ";\n justify-content: space-between;\n position: relative;\n ");
12
+ return "\n width: ".concat(hasLabel ? '100%' : (0, element_core_1.numToPx)(core.space[11]), ";\n display: flex;\n flex-direction: row").concat(labelPosition === 'left' ? '' : '-reverse', ";\n justify-content: space-between;\n position: relative;\n ");
12
13
  });
13
14
  exports.StyledToggleInputWrapper = styled_native_1.default.View(function (_a) {
14
15
  var core = _a.theme.core, labelPosition = _a.labelPosition;
15
- return "\n width: ".concat(core.space[11], ";\n height: ").concat(core.space[6], ";\n ").concat(labelPosition
16
+ return "\n width: ".concat((0, element_core_1.numToPx)(core.space[11]), ";\n height: ").concat((0, element_core_1.numToPx)(core.space[6]), ";\n ").concat(labelPosition
16
17
  ? labelPosition === 'left'
17
18
  ? 'margin-left: 10px;'
18
19
  : 'margin-right: 10px;'
@@ -20,9 +21,9 @@ exports.StyledToggleInputWrapper = styled_native_1.default.View(function (_a) {
20
21
  });
21
22
  exports.StyledToggleInput = styled_native_1.default.View(function (_a) {
22
23
  var core = _a.theme.core, checked = _a.checked;
23
- return "\n width: ".concat(core.space[11], ";\n height: ").concat(core.space[6], ";\n justify-content: center;\n border-radius: ").concat(core.radius.large, ";\n background: ").concat(checked ? core.color.brand.ovo : core.color.neutral.lighter, ";\n ");
24
+ return "\n width: ".concat((0, element_core_1.numToPx)(core.space[11]), ";\n height: ").concat((0, element_core_1.numToPx)(core.space[6]), ";\n justify-content: center;\n border-radius: ").concat((0, element_core_1.numToPx)(core.radius.large), ";\n background: ").concat(checked ? core.color.brand.ovo : core.color.neutral.lighter, ";\n ");
24
25
  });
25
26
  exports.StyledToggleDot = (0, styled_native_1.default)(react_native_1.Animated.View)(function (_a) {
26
27
  var core = _a.theme.core, checked = _a.checked;
27
- return "\n position: absolute;\n width: ".concat(core.space[4], ";\n height: ").concat(core.space[4], ";\n border-radius: ").concat(core.space[4], ";\n background-color: ").concat(checked ? core.color.brand.white : core.color.neutral.dark, ";\n");
28
+ return "\n position: absolute;\n width: ".concat((0, element_core_1.numToPx)(core.space[4]), ";\n height: ").concat((0, element_core_1.numToPx)(core.space[4]), ";\n border-radius: ").concat((0, element_core_1.numToPx)(core.space[4]), ";\n background-color: ").concat(checked ? core.color.brand.white : core.color.neutral.dark, ";\n");
28
29
  });
@@ -58,3 +58,5 @@ export * from './TextInput';
58
58
  export * from './TextLink';
59
59
  export * from './Toggle';
60
60
  export * from './Toast';
61
+ export * from './ProductCarousel';
62
+ export * from './RadioCard';
@@ -74,3 +74,5 @@ __exportStar(require("./TextInput"), exports);
74
74
  __exportStar(require("./TextLink"), exports);
75
75
  __exportStar(require("./Toggle"), exports);
76
76
  __exportStar(require("./Toast"), exports);
77
+ __exportStar(require("./ProductCarousel"), exports);
78
+ __exportStar(require("./RadioCard"), exports);
@@ -29,7 +29,6 @@ import { Component, useCallback, useContext, useEffect, useMemo, useState, } fro
29
29
  import Animated, { interpolateColor, runOnUI, useAnimatedStyle, useDerivedValue, useSharedValue, withTiming, } from 'react-native-reanimated';
30
30
  import { useLayout } from '../../hooks/use-layout';
31
31
  import { ThemeContext } from '../../styled.native';
32
- import { pxToNumber } from '../../utils';
33
32
  import { Heading4 } from '../Heading4';
34
33
  import { AccordionGroupContext } from './Group';
35
34
  import { AccordionIcon } from './Icon';
@@ -55,14 +54,10 @@ export var Accordion = function (_a) {
55
54
  var _c = useContext(ThemeContext), core = _c.core, semantic = _c.semantic;
56
55
  var Header = useContext(AccordionGroupContext).Header;
57
56
  var AccordionHeading = Header !== null && Header !== void 0 ? Header : Heading4;
58
- var AnimatedHeading = useMemo(function () { return withAnimated(AccordionHeading); }, [
59
- AccordionHeading,
60
- ]);
57
+ var AnimatedHeading = useMemo(function () { return withAnimated(AccordionHeading); }, [AccordionHeading]);
61
58
  var _d = useLayout(0), layout = _d[0], onLayout = _d[1];
62
59
  var _e = useState(expanded), open = _e[0], setOpen = _e[1];
63
- var handleHeightContent = useMemo(function () { return layout.height || 100; }, [
64
- layout.height,
65
- ]);
60
+ var handleHeightContent = useMemo(function () { return layout.height || 100; }, [layout.height]);
66
61
  var size = useSharedValue(handleHeightContent);
67
62
  useEffect(function () {
68
63
  runOnUI(function () {
@@ -101,8 +96,8 @@ export var Accordion = function (_a) {
101
96
  return (_jsxs(StyledAccordion, __assign({ first: first, last: last, isExpanded: open }, { children: [_jsxs(StyledAccordionHeader, __assign({ accessibilityState: { expanded: open }, onPress: toggleOpen, testID: "accordionTitle" }, { children: [_jsx(AnimatedHeading, __assign({ style: [
102
97
  headerStyle,
103
98
  {
104
- paddingTop: pxToNumber(core.space[1]),
105
- paddingRight: pxToNumber(core.space[3]),
99
+ paddingTop: core.space[1],
100
+ paddingRight: core.space[3],
106
101
  marginTop: 0,
107
102
  marginBottom: 0,
108
103
  flexShrink: 1,
@@ -2,11 +2,12 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
2
2
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
3
  return cooked;
4
4
  };
5
+ import { numToPx } from '@ovotech/element-core';
5
6
  import Animated from 'react-native-reanimated';
6
7
  import styled, { css } from '../../styled.native';
7
8
  export var StyledAccordion = styled(Animated.View)(function (_a) {
8
9
  var _b = _a.theme, semantic = _b.semantic, core = _b.core, first = _a.first, last = _a.last, isExpanded = _a.isExpanded;
9
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "], ["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "])), core.borderWidth.small, semantic.border.differentiated, isExpanded ? core.color.brand.white : 'transparent', core.transition.fast, first
10
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "], ["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "])), numToPx(core.borderWidth.small), semantic.border.differentiated, isExpanded ? core.color.brand.white : 'transparent', core.transition.fast, first
10
11
  ? {
11
12
  borderTopLeftRadius: core.radius.small,
12
13
  borderTopRightRadius: core.radius.small,
@@ -21,10 +22,10 @@ export var StyledAccordion = styled(Animated.View)(function (_a) {
21
22
  });
22
23
  export var StyledAccordionHeader = styled.TouchableOpacity(function (_a) {
23
24
  var core = _a.theme.core;
24
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "], ["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "])), core.space[5], core.space[3]);
25
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "], ["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "])), numToPx(core.space[5]), numToPx(core.space[3]));
25
26
  });
26
27
  export var StyledContainer = styled.View(function (_a) {
27
28
  var core = _a.theme.core;
28
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "])), core.space[12], core.space[6], core.space[3]);
29
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "])), numToPx(core.space[12]), numToPx(core.space[6]), numToPx(core.space[3]));
29
30
  });
30
31
  var templateObject_1, templateObject_2, templateObject_3;
@@ -10,6 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { numToPx } from '@ovotech/element-core';
13
14
  import MaskedView from '@react-native-masked-view/masked-view';
14
15
  import { useContext, useEffect } from 'react';
15
16
  import { Image, Pressable, View } from 'react-native';
@@ -22,7 +23,7 @@ var StyledCard = styled.Pressable(function (_a) {
22
23
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
23
24
  var paddingVal = inline ? core.space[4] : core.space[6];
24
25
  var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
25
- return "\n border-radius: ".concat(inline ? core.space[6] : 0, ";\n background-color: ").concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat(paddingVal, ";\n padding-bottom: ").concat(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal, ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
26
+ return "\n border-radius: ".concat(inline ? numToPx(core.space[6]) : 0, ";\n background-color: ").concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat(numToPx(paddingVal), ";\n padding-bottom: ").concat(numToPx(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal), ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
26
27
  });
27
28
  var StyledP = styled(P)(function (_a) {
28
29
  var semantic = _a.theme.semantic, inverted = _a.inverted;
@@ -37,7 +38,7 @@ export var ActionCard = function (_a) {
37
38
  }
38
39
  }, []);
39
40
  var Heading = inline ? Heading3 : Heading2;
40
- var cardPadding = parseInt(core.space[inline ? 4 : 6]);
41
+ var cardPadding = core.space[inline ? 4 : 6];
41
42
  var negativeMarginAdjustment = -cardPadding;
42
43
  return (_jsx(StyledCard, __assign({ onPress: onPressIndicator, inline: inline, inverted: inverted, reducedBottomPadding: Boolean(buttonTitle && !ctaVariant), testID: "".concat(testID, "-card") }, { children: _jsxs(View, __assign({ style: { flexDirection: 'row' } }, { children: [_jsx(View, __assign({ style: { flex: 1 } }, { children: _jsxs(Stack, __assign({ spaceBetween: 2 }, { children: [_jsx(Heading, __assign({ style: {
43
44
  color: inverted
@@ -46,7 +47,7 @@ export var ActionCard = function (_a) {
46
47
  paddingRight: image || !onPressCloseButton ? 0 : cardPadding,
47
48
  }, testID: "".concat(testID, "-heading") }, { children: title })), _jsxs(View, { children: [typeof body === 'string' ? (_jsx(View, __assign({ style: {
48
49
  paddingRight: !image && !title && onPressCloseButton ? cardPadding : 0,
49
- } }, { children: _jsx(StyledP, __assign({ inverted: inverted }, { children: body })) }))) : (body), buttonTitle && onPressActionButton && !onPressIndicator ? (!ctaVariant ? (_jsx(Margin, __assign({ top: 2 }, { children: _jsx(Action, __assign({ inverted: inverted, inline: true, onPress: onPressActionButton, testID: "".concat(testID, "-button") }, { children: buttonTitle })) }))) : (_jsx(Margin, __assign({ top: 4 }, { children: _jsx(CTAButton, __assign({ onPress: onPressActionButton, testID: "".concat(testID, "-button"), variant: ctaVariant }, { children: buttonTitle })) })))) : null] })] })) })), image ? (_jsx(MaskedView, __assign({ style: {
50
+ } }, { children: _jsx(StyledP, __assign({ inverted: inverted }, { children: body })) }))) : (body), buttonTitle && onPressActionButton && !onPressIndicator ? (!ctaVariant ? (_jsx(Margin, __assign({ top: 2 }, { children: _jsx(Action, __assign({ inverted: inverted, inline: true, onPress: onPressActionButton, testID: "".concat(testID, "-button"), iconRight: "chevron-right-small" }, { children: buttonTitle })) }))) : (_jsx(Margin, __assign({ top: 4 }, { children: _jsx(CTAButton, __assign({ onPress: onPressActionButton, testID: "".concat(testID, "-button"), variant: ctaVariant }, { children: buttonTitle })) })))) : null] })] })) })), image ? (_jsx(MaskedView, __assign({ style: {
50
51
  flex: 1,
51
52
  flexDirection: 'row',
52
53
  height: '100%',
@@ -29,13 +29,14 @@ var ActionList = function (_a) {
29
29
  var children = _a.children, inverted = _a.inverted, rest = __rest(_a, ["children", "inverted"]);
30
30
  var childCount = children.length;
31
31
  return (_jsx(StyledActionList, __assign({}, rest, { children: Children.map(children, function (child, index) {
32
- var _a;
32
+ var _a, _b;
33
33
  return cloneElement(child, {
34
34
  fullWidth: 'always',
35
35
  index: index,
36
36
  hasBorder: childCount > 1 && index !== childCount - 1,
37
37
  inverted: (_a = child.props.inverted) !== null && _a !== void 0 ? _a : inverted,
38
38
  inList: true,
39
+ iconRight: (_b = child.props.iconRight) !== null && _b !== void 0 ? _b : 'chevron-right-small',
39
40
  });
40
41
  }) })));
41
42
  };
@@ -2,17 +2,18 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
2
2
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
3
  return cooked;
4
4
  };
5
+ import { numToPx } from '@ovotech/element-core';
5
6
  import styled, { css } from '../../styled.native';
6
7
  import { styledComponentWithBreakpoints } from '../../utils';
7
8
  import { Icon } from '../Icon';
8
9
  var StyledList = styled.View(function (_a) {
9
10
  var core = _a.theme.core, smallAndUp = _a.smallAndUp;
10
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "])), smallAndUp ? core.space[3] : core.space[2], smallAndUp ? core.space[3] : core.space[2]);
11
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "])), numToPx(smallAndUp ? core.space[3] : core.space[2]), numToPx(smallAndUp ? core.space[3] : core.space[2]));
11
12
  });
12
13
  export var StyledActionList = styledComponentWithBreakpoints(StyledList);
13
14
  export var StyledActionWrapper = styled.View(function (_a) {
14
15
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBorder = _a.hasBorder, inverted = _a.inverted;
15
- return "\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ".concat(hasBorder ? core.borderWidth.small : 0, ";\n border-bottom-style: solid;\n border-bottom-color: ").concat(inverted ? semantic.inverted.border : semantic.border.graphic, ";\n");
16
+ return "\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ".concat(hasBorder ? numToPx(core.borderWidth.small) : 0, ";\n border-bottom-style: solid;\n border-bottom-color: ").concat(inverted ? semantic.inverted.border : semantic.border.graphic, ";\n");
16
17
  });
17
18
  export var StyledActionInner = styled.View(function (_a) {
18
19
  var fullWidth = _a.fullWidth, inline = _a.inline;
@@ -25,14 +26,14 @@ export var StyledActionText = styled.Text(function (_a) {
25
26
  : core.fontSize.body.small;
26
27
  return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n flex: ", ";\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n flex: ", ";\n "])), inverted
27
28
  ? semantic.inverted.message.base
28
- : semantic.message.base, core.fontFamily.bodyBold.native, fontSize, core.lineHeight.body.small, inList ? 1 : 'none');
29
+ : semantic.message.base, core.fontFamily.bodyBold.native, numToPx(fontSize), numToPx(core.lineHeight.body.small), inList ? 1 : 'none');
29
30
  });
30
31
  export var StyledRightIcon = styled(Icon)(function (_a) {
31
32
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, inverted = _a.inverted, marginTop = _a.marginTop;
32
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n margin-left: ", ";\n margin-top: ", ";\n "], ["\n color: ", ";\n margin-left: ", ";\n margin-top: ", ";\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.space[1], core.space[marginTop]);
33
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n margin-left: ", ";\n margin-top: ", ";\n "], ["\n color: ", ";\n margin-left: ", ";\n margin-top: ", ";\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, numToPx(core.space[1]), numToPx(core.space[marginTop]));
33
34
  });
34
35
  export var StyledLeftIcon = styled(Icon)(function (_a) {
35
36
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, inverted = _a.inverted;
36
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n margin-right: ", ";\n margin-top: ", ";\n align-self: start;\n "], ["\n color: ", ";\n margin-right: ", ";\n margin-top: ", ";\n align-self: start;\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.space[1], core.space[1]);
37
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n margin-right: ", ";\n margin-top: ", ";\n align-self: start;\n "], ["\n color: ", ";\n margin-right: ", ";\n margin-top: ", ";\n align-self: start;\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, numToPx(core.space[1]), numToPx(core.space[1]));
37
38
  });
38
39
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -25,6 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) {
25
25
  return t;
26
26
  };
27
27
  import { jsx as _jsx } from "react/jsx-runtime";
28
+ import { numToPx } from '@ovotech/element-core';
28
29
  import styled, { css } from '../../styled.native';
29
30
  var StyledBadge = styled.View(function (_a) {
30
31
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, component = _b.component, _c = _a.variant, variant = _c === void 0 ? 'info' : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, customVariant = _a.customVariant;
@@ -42,7 +43,7 @@ var StyledBadge = styled.View(function (_a) {
42
43
  surface = customVariant.backgroundColor;
43
44
  message = customVariant.foregroundColor;
44
45
  }
45
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0 ", ";\n border-radius: 16px;\n border: ", " solid ", ";\n background-color: ", ";\n align-self: flex-start;\n "], ["\n padding: 0 ", ";\n border-radius: 16px;\n border: ", " solid ", ";\n background-color: ", ";\n align-self: flex-start;\n "])), core.space[2], core.borderWidth.medium, core.color.brand.white, inverted ? message : surface);
46
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0 ", ";\n border-radius: 16px;\n border: ", " solid\n ", ";\n background-color: ", ";\n align-self: flex-start;\n "], ["\n padding: 0 ", ";\n border-radius: 16px;\n border: ", " solid\n ", ";\n background-color: ", ";\n align-self: flex-start;\n "])), numToPx(core.space[2]), numToPx(core.borderWidth.medium), core.color.brand.white, inverted ? message : surface);
46
47
  });
47
48
  var StyledBadgeText = styled.Text(function (_a) {
48
49
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, component = _b.component, _c = _a.variant, variant = _c === void 0 ? 'info' : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, customVariant = _a.customVariant;
@@ -60,7 +61,7 @@ var StyledBadgeText = styled.Text(function (_a) {
60
61
  surface = customVariant.backgroundColor;
61
62
  message = customVariant.foregroundColor;
62
63
  }
63
- return css(templateObject_2 || (templateObject_2 = __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 "])), core.fontFamily.bodyBold.native, core.lineHeight.body.small, inverted ? surface : message, core.fontSize.body.small);
64
+ return css(templateObject_2 || (templateObject_2 = __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 "])), core.fontFamily.bodyBold.native, numToPx(core.lineHeight.body.small), inverted ? surface : message, numToPx(core.fontSize.body.small));
64
65
  });
65
66
  export var Badge = function (_a) {
66
67
  var children = _a.children, variant = _a.variant, inverted = _a.inverted, rest = __rest(_a, ["children", "variant", "inverted"]);
@@ -25,6 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) {
25
25
  return t;
26
26
  };
27
27
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ import { numToPx } from '@ovotech/element-core';
28
29
  import { forwardRef } from 'react';
29
30
  import { useBreakpoint } from '../../hooks';
30
31
  import styled, { css } from '../../styled.native';
@@ -37,21 +38,21 @@ var CTAButtonWrapper = function (_a) {
37
38
  var StyledInner = styled.View(function (_a) {
38
39
  var _b = _a.theme, core = _b.core, component = _b.component, fullWidth = _a.fullWidth, variant = _a.variant;
39
40
  var currentVariant = component.cta[variant];
40
- var borderRadius = parseFloat(core.space[11]) / 2 + 'px';
41
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: ", " ", ";\n background-color: ", ";\n border-radius: ", ";\n min-height: ", ";\n border: ", ";\n justify-content: center;\n align-items: center;\n flex-direction: row;\n flex-grow: 1;\n\n ", ";\n "], ["\n padding: ", " ", ";\n background-color: ", ";\n border-radius: ", ";\n min-height: ", ";\n border: ", ";\n justify-content: center;\n align-items: center;\n flex-direction: row;\n flex-grow: 1;\n\n ", ";\n "])), core.space[2], core.space[4], currentVariant.surface, borderRadius, core.space[11], variant === 'secondary'
42
- ? "solid ".concat(core.borderWidth.small, " ").concat(core.color.brand.forest)
41
+ var borderRadius = core.space[11] / 2 + 'px';
42
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: ", " ", ";\n background-color: ", ";\n border-radius: ", ";\n min-height: ", ";\n border: ", ";\n justify-content: center;\n align-items: center;\n flex-direction: row;\n flex-grow: 1;\n\n ", ";\n "], ["\n padding: ", " ", ";\n background-color: ", ";\n border-radius: ", ";\n min-height: ", ";\n border: ", ";\n justify-content: center;\n align-items: center;\n flex-direction: row;\n flex-grow: 1;\n\n ", ";\n "])), numToPx(core.space[2]), numToPx(core.space[4]), currentVariant.surface, borderRadius, numToPx(core.space[11]), variant === 'secondary'
43
+ ? "solid ".concat(numToPx(core.borderWidth.small), " ").concat(core.color.brand.forest)
43
44
  : 'none', fullWidth === 'never'
44
45
  ? css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex-grow: 0;\n "], ["\n flex-grow: 0;\n "]))) : '');
45
46
  });
46
47
  var StyledRightIcon = styled(Icon)(function (_a) {
47
48
  var _b = _a.theme, core = _b.core, component = _b.component, variant = _a.variant;
48
49
  var currentVariant = component.cta[variant];
49
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-left: ", ";\n color: ", ";\n "], ["\n margin-left: ", ";\n color: ", ";\n "])), core.space[1], currentVariant.message);
50
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-left: ", ";\n color: ", ";\n "], ["\n margin-left: ", ";\n color: ", ";\n "])), numToPx(core.space[1]), currentVariant.message);
50
51
  });
51
52
  var StyledLeftIcon = styled(Icon)(function (_a) {
52
53
  var _b = _a.theme, core = _b.core, component = _b.component, variant = _a.variant;
53
54
  var currentVariant = component.cta[variant];
54
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-right: ", ";\n color: ", ";\n "], ["\n margin-right: ", ";\n color: ", ";\n "])), core.space[1], currentVariant.message);
55
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-right: ", ";\n color: ", ";\n "], ["\n margin-right: ", ";\n color: ", ";\n "])), numToPx(core.space[1]), currentVariant.message);
55
56
  });
56
57
  var StyledCTAButtonText = styled.Text(function (_a) {
57
58
  var _b = _a.theme, core = _b.core, component = _b.component, smallAndUp = _a.smallAndUp, variant = _a.variant;
@@ -59,7 +60,7 @@ var StyledCTAButtonText = styled.Text(function (_a) {
59
60
  ? core.fontSize.body.large
60
61
  : core.fontSize.body.small;
61
62
  var currentVariant = component.cta[variant];
62
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-align: center;\n flex-shrink: 2;\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-align: center;\n flex-shrink: 2;\n "])), currentVariant.message, core.fontFamily.bodyBold.native, fontSize, core.lineHeight.body.small);
63
+ return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-align: center;\n flex-shrink: 2;\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-align: center;\n flex-shrink: 2;\n "])), currentVariant.message, core.fontFamily.bodyBold.native, numToPx(fontSize), numToPx(core.lineHeight.body.small));
63
64
  });
64
65
  var CTAButton = function (_a) {
65
66
  var _b = _a.iconLeft, iconLeft = _b === void 0 ? 'off' : _b, _c = _a.iconRight, iconRight = _c === void 0 ? 'off' : _c, children = _a.children, _d = _a.fullWidth, fullWidth = _d === void 0 ? 'small' : _d, _e = _a.variant, variant = _e === void 0 ? 'primary' : _e, rest = __rest(_a, ["iconLeft", "iconRight", "children", "fullWidth", "variant"]);
@@ -1,7 +1,8 @@
1
+ import { numToPx } from '@ovotech/element-core';
1
2
  import styled from '../../styled.native';
2
3
  export var Card = styled.View(function (_a) {
3
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, _c = _a.inline, inline = _c === void 0 ? false : _c;
4
- return "\n background: ".concat(semantic.surface.elevated, ";\n border: ").concat(inline
5
- ? "".concat(core.borderWidth.small, " solid ").concat(semantic.border.differentiated)
6
- : 'none', ";\n padding: ").concat(core.space[4], ";\n border-radius: ").concat(core.radius.small, ";\n ");
4
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, _c = _a.inline, inline = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, smallAndUp = _a.smallAndUp;
5
+ return "\n background: ".concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat(inline
6
+ ? numToPx(core.space[smallAndUp ? 6 : 4])
7
+ : numToPx(core.space[smallAndUp ? 9 : 6]), ";\n border-radius: ").concat(inline ? numToPx(core.radius.max) : 0, ";\n ");
7
8
  });
@@ -25,6 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) {
25
25
  return t;
26
26
  };
27
27
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ import { numToPx } from '@ovotech/element-core';
28
29
  import { forwardRef } from 'react';
29
30
  import { TouchableOpacity, View, } from 'react-native';
30
31
  import styled from '../../styled.native';
@@ -38,11 +39,11 @@ var StyledCheckboxInputWrapper = styled.View(function (_a) {
38
39
  var core = _a.theme.core;
39
40
  var checkboxSize = core.space[6];
40
41
  var gap = core.space[2];
41
- return "\n width: ".concat(parseInt(checkboxSize) + parseInt(gap), "px;\n height: ").concat(core.space[11], ";\n ");
42
+ return "\n width: ".concat(numToPx(checkboxSize + gap), ";\n height: ").concat(numToPx(core.space[11]), ";\n ");
42
43
  });
43
44
  var StyledCheckboxInput = styled.View(function (_a) {
44
45
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, invalid = _a.invalid, checked = _a.checked;
45
- return "\n width: ".concat(core.space[6], ";\n height: ").concat(core.space[6], ";\n border: ").concat(core.borderWidth.small, " solid;\n margin-top: 10px;\n border-radius: ").concat(core.radius.small, ";\n border-color: ").concat(invalid
46
+ return "\n width: ".concat(numToPx(core.space[6]), ";\n height: ").concat(numToPx(core.space[6]), ";\n border: ").concat(numToPx(core.borderWidth.small), " solid;\n margin-top: 10px;\n border-radius: ").concat(numToPx(core.radius.small), ";\n border-color: ").concat(invalid
46
47
  ? semantic.message.error
47
48
  : checked
48
49
  ? core.color.blue.dark
@@ -61,7 +62,7 @@ var Input = function (_a) {
61
62
  };
62
63
  var CheckLabelText = styled(LabelText)(function (_a) {
63
64
  var core = _a.theme.core;
64
- return "\n padding-top: ".concat(core.space[3], ";\n ");
65
+ return "\n padding-top: ".concat(numToPx(core.space[3]), ";\n ");
65
66
  });
66
67
  var StyledWrapper = styled.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n"], ["\n flex-direction: row;\n"])));
67
68
  var Checkbox = forwardRef(function (_a, ref) {
@@ -2,61 +2,60 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
2
2
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
3
  return cooked;
4
4
  };
5
+ import { numToPx } from '@ovotech/element-core';
5
6
  import styled, { css } from '../../styled.native';
6
7
  export var StyledTableContainer = styled.View(function (_a) {
7
8
  var _b = _a.theme, core = _b.core, semantic = _b.semantic;
8
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "], ["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), core.borderWidth.small, semantic.border.differentiated);
9
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "], ["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), numToPx(core.borderWidth.small), semantic.border.differentiated);
9
10
  });
10
11
  export var TableHeader = styled.View(function (_a) {
11
12
  var core = _a.theme.core, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
12
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: ", " ", ";\n flex: ", ";\n align-self: stretch;\n flex-direction: row;\n width: ", ";\n "], ["\n padding: ", " ", ";\n flex: ", ";\n align-self: stretch;\n flex-direction: row;\n width: ", ";\n "])), core.space[smallAndUp ? 3 : 2], core.space[1], cellWidth === 'auto' ? 1 : 0, cellWidth);
13
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: ", "\n ", ";\n flex: ", ";\n align-self: stretch;\n flex-direction: row;\n width: ", ";\n "], ["\n padding: ", "\n ", ";\n flex: ", ";\n align-self: stretch;\n flex-direction: row;\n width: ", ";\n "])), numToPx(core.space[smallAndUp ? 3 : 2]), numToPx(core.space[1]), cellWidth === 'auto' ? 1 : 0, cellWidth);
13
14
  });
14
15
  export var TableHeaderText = styled.Text(function (_a) {
15
16
  var _b = _a.theme, semantic = _b.semantic, core = _b.core, smallAndUp = _a.smallAndUp;
16
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n text-align: left;\n\n flex-wrap: wrap;\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n text-align: left;\n\n flex-wrap: wrap;\n "])), core.fontFamily.bodyBold.native, core.lineHeight.body[smallAndUp ? 'large' : 'small'], core.fontSize.body[smallAndUp ? 'large' : 'small'], semantic.message.base);
17
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n text-align: left;\n\n flex-wrap: wrap;\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n text-align: left;\n\n flex-wrap: wrap;\n "])), core.fontFamily.bodyBold.native, numToPx(core.lineHeight.body[smallAndUp ? 'large' : 'small']), numToPx(core.fontSize.body[smallAndUp ? 'large' : 'small']), semantic.message.base);
17
18
  });
18
19
  export var TableCaptionText = styled.Text(function (_a) {
19
20
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
20
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-align: left;\n\n flex-wrap: wrap;\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-align: left;\n\n flex-wrap: wrap;\n "])), core.fontFamily.bodyBold.native, core.fontSize.heading4[smallAndUp ? 'large' : 'small'], core.lineHeight.heading4[smallAndUp ? 'large' : 'small'], semantic.message.branded);
21
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "])), core.fontFamily.bodyBold.native, numToPx(core.fontSize.heading4[smallAndUp ? 'large' : 'small']), numToPx(core.lineHeight.heading4[smallAndUp ? 'large' : 'small']), semantic.message.branded);
21
22
  });
22
23
  export var CellText = styled.Text(function (_a) {
23
24
  var core = _a.theme.core, smallAndUp = _a.smallAndUp;
24
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "])), core.fontFamily.body.native, core.lineHeight.body.large, core.fontSize.body[smallAndUp ? 'large' : 'small']);
25
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "])), core.fontFamily.body.native, numToPx(core.lineHeight.body.large), numToPx(core.fontSize.body[smallAndUp ? 'large' : 'small']));
25
26
  });
26
27
  export var TableCaption = styled.View(function (_a) {
27
28
  var core = _a.theme.core;
28
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), core.space[4], core.space[2]);
29
+ return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), numToPx(core.space[4]), numToPx(core.space[2]));
29
30
  });
30
31
  export var TableRow = styled.View(function (_a) {
31
32
  var _b = _a.theme, semantic = _b.semantic, core = _b.core, stripe = _a.stripe;
32
33
  return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n flex-direction: row;\n align-items: stretch;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "], ["\n background-color: ", ";\n flex-direction: row;\n align-items: stretch;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), stripe
33
34
  ? semantic.surface.cutout
34
- : semantic.surface.base, stripe ? '0px' : "".concat(core.borderWidth.small), stripe
35
+ : semantic.surface.base, stripe ? '0px' : numToPx(core.borderWidth.small), stripe
35
36
  ? 'transparent'
36
37
  : "".concat(semantic.border.differentiated));
37
38
  });
38
39
  export var TableRowHeading = styled.View(function (_a) {
39
40
  var _b = _a.theme, semantic = _b.semantic, core = _b.core;
40
- return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "], ["\n background-color: ", ";\n\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "])), semantic.surface.base, core.borderWidth.small, semantic.border.functional);
41
+ return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "], ["\n background-color: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "])), semantic.surface.base, numToPx(core.borderWidth.small), semantic.border.functional);
41
42
  });
42
43
  export var TableBody = styled.View(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n flex-direction: column;\n flex-wrap: nowrap;\n"], ["\n flex-direction: column;\n flex-wrap: nowrap;\n"])));
43
44
  export var TableCell = styled.View(function (_a) {
44
45
  var core = _a.theme.core, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
45
- return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "])), core.space[smallAndUp ? 3 : 2], core.space[2], cellWidth, cellWidth === 'auto' ? 1 : 0);
46
+ return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n padding: ", "\n ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding: ", "\n ", ";\n width: ", ";\n flex: ", ";\n "])), numToPx(core.space[smallAndUp ? 3 : 2]), numToPx(core.space[2]), cellWidth, cellWidth === 'auto' ? 1 : 0);
46
47
  });
47
48
  export var RowHeading = styled.View(function (_a) {
48
49
  var core = _a.theme.core, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
49
- return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding: ", " ", ";\n width: ", ";\n flex: ", ";\n "])), core.space[smallAndUp ? 3 : 2], core.space[2], cellWidth, cellWidth === 'auto' ? 1 : 0);
50
+ return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding: ", "\n ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding: ", "\n ", ";\n width: ", ";\n flex: ", ";\n "])), numToPx(core.space[smallAndUp ? 3 : 2]), numToPx(core.space[2]), cellWidth, cellWidth === 'auto' ? 1 : 0);
50
51
  });
51
52
  export var StyledSeparatorRow = styled.View(function (_a) {
52
53
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, width = _a.width;
53
- var minWidth = width
54
- ? "".concat(width - parseInt(core.space[2]) * 2, "px")
55
- : '100%';
56
- return "\n min-width: ".concat(minWidth, ";\n flex: 1;\n flex-direction: row;\n background-color: ").concat(semantic.surface.elevated, ";\n padding: ").concat(core.space[1], " ").concat(core.space[2], ";\n ");
54
+ var minWidth = width ? "".concat(width - core.space[2] * 2, "px") : '100%';
55
+ return "\n min-width: ".concat(minWidth, ";\n flex: 1;\n flex-direction: row;\n background-color: ").concat(semantic.surface.elevated, ";\n padding: ").concat(numToPx(core.space[1]), " ").concat(numToPx(core.space[2]), ";\n ");
57
56
  });
58
57
  export var SeparatorRowText = styled.Text(function (_a) {
59
58
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
60
- return "\n flex: 1;\n font-family: ".concat(core.fontFamily.body.native, ";\n font-size: ").concat(core.fontSize.small[smallAndUp ? 'large' : 'small'], ";\n line-height: ").concat(core.lineHeight.small[smallAndUp ? 'large' : 'small'], ";\n color: ").concat(semantic.message.secondary, ";\n");
59
+ return "\n flex: 1;\n font-family: ".concat(core.fontFamily.body.native, ";\n font-size: ").concat(numToPx(core.fontSize.small[smallAndUp ? 'large' : 'small']), ";\n line-height: ").concat(numToPx(core.lineHeight.small[smallAndUp ? 'large' : 'small']), ";\n color: ").concat(semantic.message.secondary, ";\n");
61
60
  });
62
61
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
@@ -14,6 +14,7 @@ var __assign = (this && this.__assign) || function () {
14
14
  return __assign.apply(this, arguments);
15
15
  };
16
16
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
17
+ import { numToPx } from '@ovotech/element-core';
17
18
  import { forwardRef, createRef } from 'react';
18
19
  import { TouchableWithoutFeedback, View } from 'react-native';
19
20
  import { useFullWidth } from '../../hooks';
@@ -22,18 +23,18 @@ import { mergeRefs, getText } from '../../utils';
22
23
  import { ErrorText } from '../ErrorText';
23
24
  import { FormGroup } from '../FormGroup';
24
25
  import { HintText } from '../HintText';
25
- import { NumberInput } from '../NumberInput';
26
26
  import { LabelText } from '../LabelText';
27
+ import { NumberInput } from '../NumberInput';
27
28
  import { Stack } from '../Stack';
28
29
  import { SubLabelText } from '../SubLabelText';
29
30
  var InlineFields = styled.View(function (_a) {
30
31
  var stretch = _a.stretch, core = _a.theme.core;
31
- var margin = core.space[1];
32
+ var margin = numToPx(core.space[1]);
32
33
  return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-left: -", ";\n margin-right: -", ";\n flex-direction: row;\n ", "\n "], ["\n margin-left: -", ";\n margin-right: -", ";\n flex-direction: row;\n ", "\n "])), margin, margin, stretch ? '' : "width: 265px;");
33
34
  });
34
35
  var SubField = styled(Stack)(function (_a) {
35
36
  var core = _a.theme.core;
36
- var padding = core.space[1];
37
+ var padding = numToPx(core.space[1]);
37
38
  return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-right: ", ";\n padding-left: ", ";\n "], ["\n padding-right: ", ";\n padding-left: ", ";\n "])), padding, padding);
38
39
  });
39
40
  var DayField = styled(SubField)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 25%;\n"], ["\n width: 25%;\n"])));
@@ -25,21 +25,22 @@ var __rest = (this && this.__rest) || function (s, e) {
25
25
  return t;
26
26
  };
27
27
  import { jsx as _jsx } from "react/jsx-runtime";
28
+ import { numToPx } from '@ovotech/element-core';
28
29
  import { View } from 'react-native';
29
30
  import styled, { css } from '../../styled.native';
30
31
  import { styledComponentWithBreakpoints } from '../../utils';
31
32
  export var Dl = styled.View(function (_a) {
32
33
  var core = _a.theme.core, smallAndUp = _a.smallAndUp;
33
- return "\n flex-direction: column;\n flex: 1;\n margin-vertical: ".concat(smallAndUp ? core.space[3] : core.space[2], ";\n");
34
+ return "\n flex-direction: column;\n flex: 1;\n margin-vertical: ".concat(smallAndUp ? numToPx(core.space[3]) : numToPx(core.space[2]), ";\n");
34
35
  });
35
36
  var StyledDtText = styled.Text(function (_a) {
36
37
  var _b = _a.theme, core = _b.core, semantic = _b.semantic;
37
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n\n flex: 1;\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n\n flex: 1;\n "])), core.fontFamily.bodyBold.native, core.lineHeight.body.small, core.fontSize.body.small, semantic.message.base);
38
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n\n flex: 1;\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n\n flex: 1;\n "])), core.fontFamily.bodyBold.native, numToPx(core.lineHeight.body.small), numToPx(core.fontSize.body.small), semantic.message.base);
38
39
  });
39
40
  var DtText = styledComponentWithBreakpoints(StyledDtText);
40
41
  var StyledDtItem = styled.View(function (_a) {
41
42
  var core = _a.theme.core, smallAndUp = _a.smallAndUp;
42
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-top: ", ";\n flex-direction: row;\n "], ["\n margin-top: ", ";\n flex-direction: row;\n "])), core.space[smallAndUp ? 4 : 3]);
43
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-top: ", ";\n flex-direction: row;\n "], ["\n margin-top: ", ";\n flex-direction: row;\n "])), numToPx(core.space[smallAndUp ? 4 : 3]));
43
44
  });
44
45
  var DtItem = styledComponentWithBreakpoints(StyledDtItem);
45
46
  export var Dt = function (_a) {
@@ -48,7 +49,7 @@ export var Dt = function (_a) {
48
49
  };
49
50
  var StyledDdText = styled.Text(function (_a) {
50
51
  var _b = _a.theme, core = _b.core, semantic = _b.semantic;
51
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n flex: 1;\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n flex: 1;\n "])), core.fontFamily.body.native, core.lineHeight.body.small, semantic.message.secondary, core.fontSize.body.small);
52
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n flex: 1;\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n flex: 1;\n "])), core.fontFamily.body.native, numToPx(core.lineHeight.body.small), semantic.message.secondary, numToPx(core.fontSize.body.small));
52
53
  });
53
54
  export var Dd = function (_a) {
54
55
  var children = _a.children, rest = __rest(_a, ["children"]);
@@ -25,6 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) {
25
25
  return t;
26
26
  };
27
27
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
28
+ import { numToPx } from '@ovotech/element-core';
28
29
  import { forwardRef, useState } from 'react';
29
30
  import { useBreakpoint } from '../../hooks';
30
31
  import styled, { css } from '../../styled.native';
@@ -32,15 +33,15 @@ import { Icon } from '../Icon';
32
33
  var DisclosureButton = styled.TouchableOpacity(function () { return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n "], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n "]))); });
33
34
  var DisclosureButtonIcon = styled(Icon)(function (_a) {
34
35
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, expanded = _a.expanded, smallAndUp = _a.smallAndUp;
35
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transform: ", ";\n margin-right: ", ";\n color: ", ";\n "], ["\n transform: ", ";\n margin-right: ", ";\n color: ", ";\n "])), expanded ? 'rotate(0deg)' : 'rotate(-90deg)', core.space[smallAndUp ? 2 : 1], semantic.message.link);
36
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transform: ", ";\n margin-right: ", ";\n color: ", ";\n "], ["\n transform: ", ";\n margin-right: ", ";\n color: ", ";\n "])), expanded ? 'rotate(0deg)' : 'rotate(-90deg)', numToPx(core.space[smallAndUp ? 2 : 1]), semantic.message.link);
36
37
  });
37
38
  var DisclosureButtonText = styled.Text(function (_a) {
38
39
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
39
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, core.fontSize.body[smallAndUp ? 'large' : 'small'], core.lineHeight.body[smallAndUp ? 'large' : 'small'], semantic.message.link, semantic.message.link);
40
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, numToPx(core.fontSize.body[smallAndUp ? 'large' : 'small']), numToPx(core.lineHeight.body[smallAndUp ? 'large' : 'small']), semantic.message.link, semantic.message.link);
40
41
  });
41
42
  var DisclosurePanel = styled.View(function (_a) {
42
43
  var core = _a.theme.core, smallAndUp = _a.smallAndUp;
43
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-top: ", ";\n padding-left: ", ";\n "], ["\n margin-top: ", ";\n padding-left: ", ";\n "])), core.space[smallAndUp ? 3 : 2], core.space[smallAndUp ? 2 : 1]);
44
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-top: ", ";\n padding-left: ", ";\n "], ["\n margin-top: ", ";\n padding-left: ", ";\n "])), numToPx(core.space[smallAndUp ? 3 : 2]), numToPx(core.space[smallAndUp ? 2 : 1]));
44
45
  });
45
46
  export var Disclosure = forwardRef(function (_a, ref) {
46
47
  var children = _a.children, title = _a.title, _b = _a.expanded, expanded = _b === void 0 ? false : _b, onToggle = _a.onToggle, rest = __rest(_a, ["children", "title", "expanded", "onToggle"]);
@@ -2,6 +2,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
2
2
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
3
  return cooked;
4
4
  };
5
+ import { numToPx } from '@ovotech/element-core';
5
6
  import styled, { css } from '../../styled.native';
6
7
  import { styledComponentWithBreakpoints } from '../../utils';
7
8
  var StyledErrorText = styled.Text(function (_a) {
@@ -9,9 +10,7 @@ var StyledErrorText = styled.Text(function (_a) {
9
10
  var fontSize = smallAndUp
10
11
  ? core.fontSize.body.large
11
12
  : core.fontSize.body.small;
12
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, smallAndUp
13
- ? core.lineHeight.body.large
14
- : core.lineHeight.body.small, fontSize, semantic.message.error);
13
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, numToPx(smallAndUp ? core.lineHeight.body.large : core.lineHeight.body.small), numToPx(fontSize), semantic.message.error);
15
14
  });
16
15
  var ErrorText = styledComponentWithBreakpoints(StyledErrorText);
17
16
  export { ErrorText };
@@ -14,6 +14,7 @@ var __assign = (this && this.__assign) || function () {
14
14
  return __assign.apply(this, arguments);
15
15
  };
16
16
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
17
+ import { numToPx } from '@ovotech/element-core';
17
18
  import { Fragment, useRef, useState } from 'react';
18
19
  import { Modal, ScrollView, View } from 'react-native';
19
20
  import styled, { css } from '../../styled.native';
@@ -24,19 +25,19 @@ import { P } from '../P';
24
25
  import { Strong } from '../Strong';
25
26
  var SelectInput = styled.TouchableOpacity(function (_a) {
26
27
  var core = _a.theme.core;
27
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), core.color.brand.white, core.radius.max, core.space[2], core.space[1]);
28
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), core.color.brand.white, numToPx(core.radius.max), numToPx(core.space[2]), numToPx(core.space[1]));
28
29
  });
29
30
  var DropdownWrapper = styled.View(function (_a) {
30
31
  var core = _a.theme.core;
31
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n // 40 is an opacity for hex https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4\n background-color: ", "40;\n "], ["\n width: 100%;\n height: 100%;\n // 40 is an opacity for hex https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4\n background-color: ", "40;\n "])), core.color.neutral.darkest);
32
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n /* 40 is an opacity for hex https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4 */\n background-color: ", "40;\n "], ["\n width: 100%;\n height: 100%;\n /* 40 is an opacity for hex https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4 */\n background-color: ", "40;\n "])), core.color.neutral.darkest);
32
33
  });
33
34
  var DropdownContainer = styled.View(function (_a) {
34
35
  var core = _a.theme.core;
35
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: 1;\n min-width: 25%;\n max-height: 100%;\n border-radius: ", ";\n background-color: ", ";\n position: absolute;\n "], ["\n flex: 1;\n min-width: 25%;\n max-height: 100%;\n border-radius: ", ";\n background-color: ", ";\n position: absolute;\n "])), core.radius.large, core.color.brand.white);
36
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: 1;\n min-width: 25%;\n max-height: 100%;\n border-radius: ", ";\n background-color: ", ";\n position: absolute;\n "], ["\n flex: 1;\n min-width: 25%;\n max-height: 100%;\n border-radius: ", ";\n background-color: ", ";\n position: absolute;\n "])), numToPx(core.radius.large), core.color.brand.white);
36
37
  });
37
38
  var SelectOption = styled.TouchableOpacity(function (_a) {
38
39
  var core = _a.theme.core;
39
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n padding-horizontal: ", ";\n "], ["\n flex-direction: row;\n align-items: center;\n padding-horizontal: ", ";\n "])), core.space[2]);
40
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n padding-horizontal: ", ";\n "], ["\n flex-direction: row;\n align-items: center;\n padding-horizontal: ", ";\n "])), numToPx(core.space[2]));
40
41
  });
41
42
  export var FilterSelect = function (_a) {
42
43
  var _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.defaultSelected, defaultSelected = _c === void 0 ? { label: '', value: 'default' } : _c, _d = _a.onSelected, onSelected = _d === void 0 ? function () { return null; } : _d, _e = _a.testID, testID = _e === void 0 ? 'select' : _e, rightText = _a.rightText, leftText = _a.leftText;