@ovotech/element-native 3.7.0 → 3.8.0-canary-9bfdab2-202

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 (72) hide show
  1. package/dist/components/Accordion/styles.d.ts +33 -6
  2. package/dist/components/ActionCard/ActionCard.js +1 -1
  3. package/dist/components/ActionList/ActionList.d.ts +1 -1
  4. package/dist/components/ActionList/ActionList.js +2 -1
  5. package/dist/components/ActionList/styled.d.ts +66 -12
  6. package/dist/components/Badge/Badge.d.ts +12 -3
  7. package/dist/components/Card/Card.d.ts +14 -3
  8. package/dist/components/Card/Card.js +2 -4
  9. package/dist/components/DataTable/styles.d.ts +143 -26
  10. package/dist/components/DescriptionList/styled.d.ts +11 -2
  11. package/dist/components/Em/Em.d.ts +11 -2
  12. package/dist/components/ErrorText/ErrorText.d.ts +11 -2
  13. package/dist/components/Grid/Col.d.ts +11 -2
  14. package/dist/components/Grid/Row.d.ts +11 -2
  15. package/dist/components/Heading1/Heading1.d.ts +3 -1
  16. package/dist/components/Heading1/Heading1.js +4 -2
  17. package/dist/components/Heading2/Heading2.d.ts +3 -1
  18. package/dist/components/Heading2/Heading2.js +4 -2
  19. package/dist/components/Heading3/Heading3.d.ts +3 -1
  20. package/dist/components/Heading3/Heading3.js +4 -2
  21. package/dist/components/Heading4/Heading4.d.ts +3 -1
  22. package/dist/components/Heading4/Heading4.js +4 -2
  23. package/dist/components/HintText/HintText.d.ts +11 -2
  24. package/dist/components/HorizontalCarousel/HorizontalCarousel.d.ts +13 -0
  25. package/dist/components/HorizontalCarousel/HorizontalCarousel.js +92 -0
  26. package/dist/components/HorizontalCarousel/NavigationDots.d.ts +5 -0
  27. package/dist/components/HorizontalCarousel/NavigationDots.js +88 -0
  28. package/dist/components/HorizontalCarousel/index.d.ts +1 -0
  29. package/dist/components/HorizontalCarousel/index.js +17 -0
  30. package/dist/components/Label/Label.d.ts +5 -241
  31. package/dist/components/Label/Label.js +16 -4
  32. package/dist/components/LabelText/LabelText.d.ts +11 -2
  33. package/dist/components/Lead/Lead.d.ts +5 -241
  34. package/dist/components/Lead/Lead.js +18 -4
  35. package/dist/components/LineThrough/LineThrough.d.ts +11 -2
  36. package/dist/components/List/styled.d.ts +44 -8
  37. package/dist/components/Margin/Margin.d.ts +11 -2
  38. package/dist/components/NavHeader/NavHeader.styles.d.ts +88 -16
  39. package/dist/components/Notification/Notification.d.ts +23 -5
  40. package/dist/components/Notification/Notification.js +14 -14
  41. package/dist/components/P/P.d.ts +2 -0
  42. package/dist/components/P/P.js +2 -2
  43. package/dist/components/PasswordInput/PasswordInput.styled.d.ts +11 -2
  44. package/dist/components/SelectField/Select.d.ts +11 -2
  45. package/dist/components/Small/Small.d.ts +11 -2
  46. package/dist/components/Strong/Strong.d.ts +11 -2
  47. package/dist/components/SubLabelText/SubLabelText.d.ts +11 -2
  48. package/dist/components/Tabs/Tab.js +6 -6
  49. package/dist/components/Toggle/styles.d.ts +44 -8
  50. package/dist/esm/components/ActionCard/ActionCard.js +1 -1
  51. package/dist/esm/components/ActionList/ActionList.js +2 -1
  52. package/dist/esm/components/Card/Card.js +2 -4
  53. package/dist/esm/components/Heading1/Heading1.js +4 -2
  54. package/dist/esm/components/Heading2/Heading2.js +4 -2
  55. package/dist/esm/components/Heading3/Heading3.js +4 -2
  56. package/dist/esm/components/Heading4/Heading4.js +4 -2
  57. package/dist/esm/components/HorizontalCarousel/HorizontalCarousel.js +62 -0
  58. package/dist/esm/components/HorizontalCarousel/NavigationDots.js +61 -0
  59. package/dist/esm/components/HorizontalCarousel/index.js +1 -0
  60. package/dist/esm/components/Label/Label.js +16 -4
  61. package/dist/esm/components/Lead/Lead.js +18 -4
  62. package/dist/esm/components/Notification/Notification.js +14 -14
  63. package/dist/esm/components/P/P.js +2 -2
  64. package/dist/esm/components/Tabs/Tab.js +7 -7
  65. package/dist/esm/index.js +1 -0
  66. package/dist/esm/theme/index.js +1 -0
  67. package/dist/index.d.ts +1 -0
  68. package/dist/index.js +1 -0
  69. package/dist/styled.native.d.ts +66 -12
  70. package/dist/theme/index.d.ts +1 -0
  71. package/dist/theme/index.js +17 -0
  72. package/package.json +4 -3
@@ -6,6 +6,7 @@ export declare const StyledWrapper: import("styled-components").StyledComponent<
6
6
  borderWidth: Record<"small" | "medium" | "large", string>;
7
7
  breakpoint: Record<"small" | "medium" | "large", string | number>;
8
8
  mediaQuery: Record<"small" | "medium" | "large", string>;
9
+ customMediaQuery: Record<"small-and-up" | "medium-and-up" | "large-and-up", string>;
9
10
  space: Record<0 | 2 | 1 | 3 | 4 | 5 | 10 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
10
11
  transition: Record<"medium" | "slow" | "fast", string>;
11
12
  opacity: Record<"solid" | "transparent" | "translucent", string | number>;
@@ -37,12 +38,20 @@ export declare const StyledWrapper: import("styled-components").StyledComponent<
37
38
  };
38
39
  semantic: {
39
40
  surface: Record<"base" | "cutout" | "elevated", string>;
40
- message: Record<"base" | "link" | "secondary" | "error" | "branded", string>;
41
+ message: Record<"base" | "link" | "secondary" | "branded" | "error", string>;
42
+ branded: Record<"message" | "heading" | "surface", string>;
41
43
  border: Record<"graphic" | "differentiated" | "functional", string>;
42
44
  focus: Record<"surface" | "outline" | "hover", string>;
43
- inverted: Record<"surface" | "border", string> & {
45
+ inverted: Record<"surface" | "surfaceAlt" | "border" | "borderAlt", string> & {
44
46
  message: Record<"base" | "link" | "secondary" | "branded", string>;
45
47
  };
48
+ neutral: {
49
+ border: string;
50
+ surface: string;
51
+ surfaceEmphasis: string;
52
+ message: string;
53
+ messageOnEmphasis: string;
54
+ };
46
55
  success: {
47
56
  border: string;
48
57
  surface: string;
@@ -241,6 +250,7 @@ export declare const StyledToggleInputWrapper: import("styled-components").Style
241
250
  borderWidth: Record<"small" | "medium" | "large", string>;
242
251
  breakpoint: Record<"small" | "medium" | "large", string | number>;
243
252
  mediaQuery: Record<"small" | "medium" | "large", string>;
253
+ customMediaQuery: Record<"small-and-up" | "medium-and-up" | "large-and-up", string>;
244
254
  space: Record<0 | 2 | 1 | 3 | 4 | 5 | 10 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
245
255
  transition: Record<"medium" | "slow" | "fast", string>;
246
256
  opacity: Record<"solid" | "transparent" | "translucent", string | number>;
@@ -272,12 +282,20 @@ export declare const StyledToggleInputWrapper: import("styled-components").Style
272
282
  };
273
283
  semantic: {
274
284
  surface: Record<"base" | "cutout" | "elevated", string>;
275
- message: Record<"base" | "link" | "secondary" | "error" | "branded", string>;
285
+ message: Record<"base" | "link" | "secondary" | "branded" | "error", string>;
286
+ branded: Record<"message" | "heading" | "surface", string>;
276
287
  border: Record<"graphic" | "differentiated" | "functional", string>;
277
288
  focus: Record<"surface" | "outline" | "hover", string>;
278
- inverted: Record<"surface" | "border", string> & {
289
+ inverted: Record<"surface" | "surfaceAlt" | "border" | "borderAlt", string> & {
279
290
  message: Record<"base" | "link" | "secondary" | "branded", string>;
280
291
  };
292
+ neutral: {
293
+ border: string;
294
+ surface: string;
295
+ surfaceEmphasis: string;
296
+ message: string;
297
+ messageOnEmphasis: string;
298
+ };
281
299
  success: {
282
300
  border: string;
283
301
  surface: string;
@@ -475,6 +493,7 @@ export declare const StyledToggleInput: import("styled-components").StyledCompon
475
493
  borderWidth: Record<"small" | "medium" | "large", string>;
476
494
  breakpoint: Record<"small" | "medium" | "large", string | number>;
477
495
  mediaQuery: Record<"small" | "medium" | "large", string>;
496
+ customMediaQuery: Record<"small-and-up" | "medium-and-up" | "large-and-up", string>;
478
497
  space: Record<0 | 2 | 1 | 3 | 4 | 5 | 10 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
479
498
  transition: Record<"medium" | "slow" | "fast", string>;
480
499
  opacity: Record<"solid" | "transparent" | "translucent", string | number>;
@@ -506,12 +525,20 @@ export declare const StyledToggleInput: import("styled-components").StyledCompon
506
525
  };
507
526
  semantic: {
508
527
  surface: Record<"base" | "cutout" | "elevated", string>;
509
- message: Record<"base" | "link" | "secondary" | "error" | "branded", string>;
528
+ message: Record<"base" | "link" | "secondary" | "branded" | "error", string>;
529
+ branded: Record<"message" | "heading" | "surface", string>;
510
530
  border: Record<"graphic" | "differentiated" | "functional", string>;
511
531
  focus: Record<"surface" | "outline" | "hover", string>;
512
- inverted: Record<"surface" | "border", string> & {
532
+ inverted: Record<"surface" | "surfaceAlt" | "border" | "borderAlt", string> & {
513
533
  message: Record<"base" | "link" | "secondary" | "branded", string>;
514
534
  };
535
+ neutral: {
536
+ border: string;
537
+ surface: string;
538
+ surfaceEmphasis: string;
539
+ message: string;
540
+ messageOnEmphasis: string;
541
+ };
515
542
  success: {
516
543
  border: string;
517
544
  surface: string;
@@ -709,6 +736,7 @@ export declare const StyledToggleDot: import("styled-components").StyledComponen
709
736
  borderWidth: Record<"small" | "medium" | "large", string>;
710
737
  breakpoint: Record<"small" | "medium" | "large", string | number>;
711
738
  mediaQuery: Record<"small" | "medium" | "large", string>;
739
+ customMediaQuery: Record<"small-and-up" | "medium-and-up" | "large-and-up", string>;
712
740
  space: Record<0 | 2 | 1 | 3 | 4 | 5 | 10 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
713
741
  transition: Record<"medium" | "slow" | "fast", string>;
714
742
  opacity: Record<"solid" | "transparent" | "translucent", string | number>;
@@ -740,12 +768,20 @@ export declare const StyledToggleDot: import("styled-components").StyledComponen
740
768
  };
741
769
  semantic: {
742
770
  surface: Record<"base" | "cutout" | "elevated", string>;
743
- message: Record<"base" | "link" | "secondary" | "error" | "branded", string>;
771
+ message: Record<"base" | "link" | "secondary" | "branded" | "error", string>;
772
+ branded: Record<"message" | "heading" | "surface", string>;
744
773
  border: Record<"graphic" | "differentiated" | "functional", string>;
745
774
  focus: Record<"surface" | "outline" | "hover", string>;
746
- inverted: Record<"surface" | "border", string> & {
775
+ inverted: Record<"surface" | "surfaceAlt" | "border" | "borderAlt", string> & {
747
776
  message: Record<"base" | "link" | "secondary" | "branded", string>;
748
777
  };
778
+ neutral: {
779
+ border: string;
780
+ surface: string;
781
+ surfaceEmphasis: string;
782
+ message: string;
783
+ messageOnEmphasis: string;
784
+ };
749
785
  success: {
750
786
  border: string;
751
787
  surface: string;
@@ -46,7 +46,7 @@ export var ActionCard = function (_a) {
46
46
  paddingRight: image || !onPressCloseButton ? 0 : cardPadding,
47
47
  }, testID: "".concat(testID, "-heading") }, { children: title })), _jsxs(View, { children: [typeof body === 'string' ? (_jsx(View, __assign({ style: {
48
48
  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: {
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"), 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
50
  flex: 1,
51
51
  flexDirection: 'row',
52
52
  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
  };
@@ -1,7 +1,5 @@
1
1
  import styled from '../../styled.native';
2
2
  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 ");
3
+ 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;
4
+ return "\n background: ".concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat(inline ? core.space[smallAndUp ? 6 : 4] : core.space[smallAndUp ? 9 : 6], ";\n border-radius: ").concat(inline ? core.radius.max : 0, ";\n ");
7
5
  });
@@ -32,9 +32,11 @@ var calculateLetterSpacing = function (fontSize, letterSpacing) {
32
32
  return numToPx(pxToNumber(fontSize) * letterSpacing);
33
33
  };
34
34
  var StyledHeading1 = styled.Text(function (_a) {
35
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
35
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
36
36
  var fontSize = core.fontSize.heading1[smallAndUp ? 'large' : 'small'];
37
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.heading.native, fontSize, core.lineHeight.heading1[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.extraCompressed), semantic.message.branded);
37
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.heading.native, fontSize, core.lineHeight.heading1[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.extraCompressed), inverted
38
+ ? semantic.inverted.message.link
39
+ : semantic.message.branded);
38
40
  });
39
41
  export var Heading1 = function (_a) {
40
42
  var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
@@ -32,9 +32,11 @@ var calculateLetterSpacing = function (fontSize, letterSpacing) {
32
32
  return numToPx(pxToNumber(fontSize) * letterSpacing);
33
33
  };
34
34
  var StyledHeading2 = styled.Text(function (_a) {
35
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
35
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
36
36
  var fontSize = core.fontSize.heading2[smallAndUp ? 'large' : 'small'];
37
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.heading.native, fontSize, core.lineHeight.heading2[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.extraCompressed), semantic.message.branded);
37
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.heading.native, fontSize, core.lineHeight.heading2[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.extraCompressed), inverted
38
+ ? semantic.inverted.message.link
39
+ : semantic.message.branded);
38
40
  });
39
41
  export var Heading2 = function (_a) {
40
42
  var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
@@ -32,9 +32,11 @@ var calculateLetterSpacing = function (fontSize, letterSpacing) {
32
32
  return numToPx(pxToNumber(fontSize) * letterSpacing);
33
33
  };
34
34
  var StyledHeading3 = styled.Text(function (_a) {
35
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
35
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
36
36
  var fontSize = core.fontSize.heading3[smallAndUp ? 'large' : 'small'];
37
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading3[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed), semantic.message.branded);
37
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading3[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed), inverted
38
+ ? semantic.inverted.message.link
39
+ : semantic.message.branded);
38
40
  });
39
41
  export var Heading3 = function (_a) {
40
42
  var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
@@ -32,9 +32,11 @@ var calculateLetterSpacing = function (fontSize, letterSpacing) {
32
32
  return numToPx(pxToNumber(fontSize) * letterSpacing);
33
33
  };
34
34
  var StyledHeading4 = styled.Text(function (_a) {
35
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
35
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
36
36
  var fontSize = core.fontSize.heading4[smallAndUp ? 'large' : 'small'];
37
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading4[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed), semantic.message.branded);
37
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n letter-spacing: ", ";\n color: ", ";\n "])), core.fontFamily.bodyBold.native, fontSize, core.lineHeight.heading4[smallAndUp ? 'large' : 'small'], calculateLetterSpacing(fontSize, core.letterSpacing.compressed), inverted
38
+ ? semantic.inverted.message.link
39
+ : semantic.message.branded);
38
40
  });
39
41
  export var Heading4 = function (_a) {
40
42
  var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
@@ -0,0 +1,62 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { useRef } from 'react';
18
+ import { useWindowDimensions } from 'react-native';
19
+ import { useSharedValue } from 'react-native-reanimated';
20
+ import Carousel from 'react-native-reanimated-carousel';
21
+ import styled, { useTheme } from '../../styled.native';
22
+ import { Icon } from '../Icon';
23
+ import { NavigationDots } from './NavigationDots';
24
+ export function HorizontalCarousel(_a) {
25
+ var data = _a.data, children = _a.children, width = _a.width, height = _a.height, fullWidth = _a.fullWidth, _b = _a.showArrows, showArrows = _b === void 0 ? true : _b, _c = _a.showDots, showDots = _c === void 0 ? true : _c, _d = _a.loop, loop = _d === void 0 ? true : _d, arrowsDistanceFromTop = _a.arrowsDistanceFromTop;
26
+ var theme = useTheme();
27
+ var carouselRef = useRef(null);
28
+ var progressValue = useSharedValue(0);
29
+ var windowWidth = useWindowDimensions().width;
30
+ var carouselWidth = fullWidth ? windowWidth : width || windowWidth;
31
+ return (_jsxs(SCarouselContainer, { children: [_jsx(Carousel, { ref: carouselRef, data: data, renderItem: function (_a) {
32
+ var item = _a.item;
33
+ return (_jsx(SItemContainer, __assign({ "$itemWidth": carouselWidth }, { children: children(item) })));
34
+ }, vertical: false, width: carouselWidth, height: height, onProgressChange: function (_, absoluteProgress) {
35
+ return (progressValue.value = absoluteProgress);
36
+ }, panGestureHandlerProps: {
37
+ activeOffsetX: [-20, 20],
38
+ }, loop: loop, testID: "carousel" }), showArrows && data.length > 1 && (_jsxs(_Fragment, { children: [_jsx(SActionPressable, __assign({ onPress: function () { var _a; return (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.prev(); }, "$top": arrowsDistanceFromTop, hitSlop: {
39
+ top: 32,
40
+ bottom: 32,
41
+ left: 16,
42
+ right: 16,
43
+ } }, { children: _jsx(Icon, { name: "arrow-left", size: 16, color: theme.core.color.brand.white }) })), _jsx(SActionPressable, __assign({ "$next": true, onPress: function () { var _a; return (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.next(); }, "$top": arrowsDistanceFromTop, hitSlop: {
44
+ top: 32,
45
+ bottom: 32,
46
+ left: 16,
47
+ right: 16,
48
+ } }, { children: _jsx(Icon, { name: "arrow-right", size: 16, color: theme.core.color.brand.white }) }))] })), showDots && data.length > 1 && (_jsx(NavigationDots, { data: data, animatedValue: progressValue }))] }));
49
+ }
50
+ var SCarouselContainer = styled.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n"], ["\n align-items: center;\n"])));
51
+ var SItemContainer = styled.View(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n width: ", "px;\n height: 100%;\n justify-content: center;\n align-items: center;\n"], ["\n position: relative;\n width: ", "px;\n height: 100%;\n justify-content: center;\n align-items: center;\n"])), function (_a) {
52
+ var $itemWidth = _a.$itemWidth;
53
+ return $itemWidth;
54
+ });
55
+ var SActionPressable = styled.Pressable(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: ", ";\n ", ";\n"], ["\n position: absolute;\n top: ", ";\n ", ";\n"])), function (_a) {
56
+ var $top = _a.$top;
57
+ return ($top ? "".concat($top, "px") : '50%');
58
+ }, function (_a) {
59
+ var theme = _a.theme, $next = _a.$next;
60
+ return $next ? "right: ".concat(theme.core.space[6]) : "left: ".concat(theme.core.space[6]);
61
+ });
62
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -0,0 +1,61 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import Animated, { Extrapolate, interpolate, interpolateColor, useAnimatedStyle, } from 'react-native-reanimated';
18
+ import styled, { useTheme } from '../../styled.native';
19
+ export function NavigationDots(_a) {
20
+ var data = _a.data, animatedValue = _a.animatedValue;
21
+ return (_jsx(SDotsContainer, { children: data.map(function (_, index) { return (_jsx(Dot, { index: index, length: data.length, animatedValue: animatedValue }, index)); }) }));
22
+ }
23
+ var Dot = function (_a) {
24
+ var animatedValue = _a.animatedValue, index = _a.index, length = _a.length, _b = _a.width, width = _b === void 0 ? 10 : _b;
25
+ var theme = useTheme();
26
+ var animatedStyle = useAnimatedStyle(function () {
27
+ var inputRange = [index - 1, index, index + 1];
28
+ var outputRange = [-width, 0, width];
29
+ if (index === 0 && (animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value) > length - 1) {
30
+ inputRange = [length - 1, length, length + 1];
31
+ outputRange = [-width, 0, width];
32
+ }
33
+ var backgroundColor = interpolateColor(animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value, inputRange, [
34
+ theme.core.color.brand.forest,
35
+ theme.core.color.brand.energised,
36
+ theme.core.color.brand.forest,
37
+ ]);
38
+ return {
39
+ transform: [
40
+ {
41
+ translateX: interpolate(animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value, inputRange, outputRange, Extrapolate.CLAMP),
42
+ },
43
+ ],
44
+ backgroundColor: backgroundColor,
45
+ };
46
+ }, [animatedValue, index, length]);
47
+ return (_jsx(SDot, __assign({ "$width": width }, { children: _jsx(SAnimatedDot, { style: animatedStyle }) })));
48
+ };
49
+ var SDotsContainer = styled.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n bottom: 20px;\n flex-direction: row;\n gap: 10px;\n"], ["\n position: absolute;\n bottom: 20px;\n flex-direction: row;\n gap: 10px;\n"])));
50
+ var SDot = styled.View(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n border-radius: 50px;\n overflow: hidden;\n"], ["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n border-radius: 50px;\n overflow: hidden;\n"])), function (_a) {
51
+ var theme = _a.theme;
52
+ return theme.core.color.brand.forest;
53
+ }, function (_a) {
54
+ var $width = _a.$width;
55
+ return $width;
56
+ }, function (_a) {
57
+ var $width = _a.$width;
58
+ return $width;
59
+ });
60
+ var SAnimatedDot = styled(Animated.View)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 20px;\n flex: 1;\n"], ["\n border-radius: 20px;\n flex: 1;\n"])));
61
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -0,0 +1 @@
1
+ export * from './HorizontalCarousel';
@@ -2,11 +2,23 @@ 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
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { forwardRef } from 'react';
5
18
  import styled, { css } from '../../styled.native';
6
- import { styledComponentWithBreakpoints } from '../../utils';
7
19
  var StyledLabel = styled.Text(function (_a) {
8
- var core = _a.theme.core, smallAndUp = _a.smallAndUp;
9
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "])), core.fontFamily.body.native, core.fontSize.label[smallAndUp ? 'large' : 'small'], core.lineHeight.label[smallAndUp ? 'large' : 'small']);
20
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
21
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, core.fontSize.label[smallAndUp ? 'large' : 'small'], core.lineHeight.label[smallAndUp ? 'large' : 'small'], inverted ? semantic.inverted.message.base : semantic.message.base);
10
22
  });
11
- export var Label = styledComponentWithBreakpoints(StyledLabel);
23
+ export var Label = forwardRef(function (props, ref) { return (_jsx(StyledLabel, __assign({}, props, { ref: ref }))); });
12
24
  var templateObject_1;
@@ -2,11 +2,25 @@ 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
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { forwardRef } from 'react';
5
18
  import styled, { css } from '../../styled.native';
6
- import { styledComponentWithBreakpoints } from '../../utils';
7
19
  var StyledLead = styled.Text(function (_a) {
8
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
9
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, core.fontSize.lead[smallAndUp ? 'large' : 'small'], core.lineHeight.lead[smallAndUp ? 'large' : 'small'], semantic.message.branded);
20
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
21
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, core.fontSize.lead[smallAndUp ? 'large' : 'small'], core.lineHeight.lead[smallAndUp ? 'large' : 'small'], inverted
22
+ ? semantic.inverted.message.link
23
+ : semantic.message.branded);
10
24
  });
11
- export var Lead = styledComponentWithBreakpoints(StyledLead);
25
+ export var Lead = forwardRef(function (props, ref) { return (_jsx(StyledLead, __assign({}, props, { ref: ref }))); });
12
26
  var templateObject_1;
@@ -30,46 +30,46 @@ import { View } from 'react-native';
30
30
  import styled, { css } from '../../styled.native';
31
31
  import { Icon } from '../Icon';
32
32
  var NotificationBox = styled.View(function (_a) {
33
- var core = _a.theme.core, noMargin = _a.noMargin;
34
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n border: ", " solid ", ";\n border-radius: ", ";\n margin-bottom: ", ";\n overflow: hidden;\n "], ["\n position: relative;\n border: ", " solid ", ";\n border-radius: ", ";\n margin-bottom: ", ";\n overflow: hidden;\n "])), core.borderWidth.medium, core.color.brand.white, core.radius.small, noMargin ? 0 : core.space[4]);
33
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, noMargin = _a.noMargin;
34
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n margin-bottom: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n overflow: hidden;\n "], ["\n position: relative;\n margin-bottom: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n overflow: hidden;\n "])), noMargin ? 0 : core.space[4], core.borderWidth.small, semantic.surface.elevated, core.radius.max);
35
35
  });
36
36
  export var NotificationContentBox = styled.View(function (_a) {
37
- var core = _a.theme.core;
38
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), core.color.brand.white, core.space[2], core.space[3], core.space[4], core.space[4]);
37
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic;
38
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), semantic.surface.elevated, core.space[2], core.space[3], core.space[4], core.space[4]);
39
39
  });
40
40
  export var NotificationTitleBox = styled.View(function (_a) {
41
41
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, variant = _a.variant, dismissible = _a.dismissible;
42
42
  var currentVariant = semantic[variant];
43
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), currentVariant.surface, core.space[2], core.space[2], core.space[4], dismissible ? core.space[3] : core.space[4]);
43
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n min-height: 44px;\n "], ["\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n min-height: 44px;\n "])), currentVariant.surface, core.space[2], core.space[2], core.space[4], dismissible ? core.space[3] : core.space[4]);
44
44
  });
45
45
  var NotificationTitleText = styled.Text(function (_a) {
46
46
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, variant = _a.variant;
47
47
  var currentVariant = semantic[variant];
48
48
  return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: ", ";\n font-family: ", ";\n color: ", ";\n "], ["\n font-size: ", ";\n font-family: ", ";\n color: ", ";\n "])), core.fontSize.body.small, core.fontFamily.bodyBold.native, currentVariant.message);
49
49
  });
50
- var DismissButton = styled.TouchableOpacity(function () {
51
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 16px;\n height: 16px;\n margin-left: auto;\n "], ["\n width: 16px;\n height: 16px;\n margin-left: auto;\n "])));
50
+ var DismissButton = styled.TouchableOpacity(function (_a) {
51
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic;
52
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n "], ["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n "])), semantic.inverted.surface, core.borderWidth.small, core.color.brand.forest, core.radius.max);
52
53
  });
53
54
  var StyledIcon = styled(Icon)(function (_a) {
54
- var semantic = _a.theme.semantic, variant = _a.variant;
55
- var currentVariant = semantic[variant];
56
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), currentVariant.message);
55
+ var semantic = _a.theme.semantic;
56
+ return "\n color: ".concat(semantic.inverted.message.base, ";\n ");
57
57
  });
58
58
  export var Notification = forwardRef(function (_a, ref) {
59
- var _b = _a.variant, variant = _b === void 0 ? 'info' : _b, children = _a.children, title = _a.title, noMargin = _a.noMargin, dismissible = _a.dismissible, onDismiss = _a.onDismiss, rest = __rest(_a, ["variant", "children", "title", "noMargin", "dismissible", "onDismiss"]);
59
+ var _b = _a.variant, variant = _b === void 0 ? 'neutral' : _b, children = _a.children, title = _a.title, noMargin = _a.noMargin, dismissible = _a.dismissible, onDismiss = _a.onDismiss, rest = __rest(_a, ["variant", "children", "title", "noMargin", "dismissible", "onDismiss"]);
60
60
  var _c = useState(false), dismissed = _c[0], setDismissed = _c[1];
61
61
  if (dismissed || (!title && !children)) {
62
62
  return null;
63
63
  }
64
- return (_jsx(View, __assign({ ref: ref }, rest, { children: _jsxs(NotificationBox, __assign({ noMargin: noMargin, testID: "nb-notification" }, { children: [_jsxs(NotificationTitleBox, __assign({ variant: variant, dismissible: dismissible }, { children: [_jsx(NotificationTitleText, __assign({ variant: variant }, { children: title })), dismissible ? (_jsx(DismissButton, __assign({ accessibilityLabel: "Dismiss", testID: "nb-notification-dismiss", onPress: function () {
64
+ return (_jsx(View, __assign({ ref: ref }, rest, { children: _jsxs(NotificationBox, __assign({ noMargin: noMargin, testID: "nb-notification" }, { children: [_jsxs(NotificationTitleBox, __assign({ variant: variant, dismissible: dismissible }, { children: [_jsx(NotificationTitleText, __assign({ variant: variant }, { children: title })), dismissible ? (_jsx(DismissButton, __assign({ accessible: true, accessibilityLabel: "Dismiss", testID: "nb-notification-dismiss", onPress: function () {
65
65
  setDismissed(true);
66
66
  if (onDismiss) {
67
67
  onDismiss();
68
68
  }
69
- } }, { children: _jsx(StyledIcon, { variant: variant, name: "cross", size: "16" }) }))) : null] })), children ? (_jsx(NotificationContentBox, __assign({ "data-testid": "el-notification-box" }, { children: children }))) : null] })) })));
69
+ } }, { children: _jsx(StyledIcon, { name: "cross", size: "16" }) }))) : null] })), children ? (_jsx(NotificationContentBox, __assign({ "data-testid": "el-notification-box" }, { children: children }))) : null] })) })));
70
70
  });
71
71
  export var ErrorNotification = forwardRef(function (props, ref) { return _jsx(Notification, __assign({ ref: ref, variant: "error" }, props)); });
72
72
  export var SuccessNotification = forwardRef(function (props, ref) { return (_jsx(Notification, __assign({ ref: ref, variant: "success" }, props))); });
73
73
  export var InfoNotification = forwardRef(function (props, ref) { return _jsx(Notification, __assign({ ref: ref, variant: "info" }, props)); });
74
74
  export var WarningNotification = forwardRef(function (props, ref) { return _jsx(Notification, __assign({ ref: ref, variant: "warning" }, props)); });
75
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
75
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -18,8 +18,8 @@ import { forwardRef } from 'react';
18
18
  import { useBreakpoint } from '../../hooks';
19
19
  import styled, { css } from '../../styled.native';
20
20
  var StyledP = styled.Text(function (_a) {
21
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
22
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, core.fontSize.body[smallAndUp ? 'large' : 'small'], core.lineHeight.body[smallAndUp ? 'large' : 'small'], semantic.message.base);
21
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
22
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, core.fontSize.body[smallAndUp ? 'large' : 'small'], core.lineHeight.body[smallAndUp ? 'large' : 'small'], inverted ? semantic.inverted.message.base : semantic.message.base);
23
23
  });
24
24
  export var P = forwardRef(function (props, ref) {
25
25
  var breakpoints = useBreakpoint();
@@ -26,21 +26,21 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  };
27
27
  import { jsx as _jsx } from "react/jsx-runtime";
28
28
  import { forwardRef } from 'react';
29
- import { useBreakpoint, useFullWidth, } from '../../hooks';
29
+ import { useBreakpoint, useFullWidth } from '../../hooks';
30
30
  import styled, { css } from '../../styled.native';
31
31
  var TabText = styled.Text(function (_a) {
32
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
33
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-align: center;\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-align: center;\n padding: ", " ", ";\n "])), core.fontSize.body.small, core.fontFamily.bodyBold.native, core.lineHeight.body.small, semantic.message.base, core.space[3], core.space[smallAndUp ? 3 : 2]);
32
+ var _b = _a.theme, core = _b.core, semantic = _b.semantic, _c = _a.active, active = _c === void 0 ? false : _c;
33
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-align: center;\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-align: center;\n padding: ", " ", ";\n "])), core.fontSize.body.small, core.fontFamily.bodyBold.native, core.lineHeight.body.small, active ? semantic.focus.outline : semantic.message.base, core.space[3], core.space[2]);
34
34
  });
35
35
  var TabTouchable = styled.TouchableOpacity(function (_a) {
36
36
  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;
37
37
  return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n flex-grow: ", ";\n border: ", " solid ", ";\n ", "\n ", "\n ", "\n ", "\n "], ["\n flex-grow: ", ";\n border: ", " solid ", ";\n ", "\n ", "\n ", "\n ", "\n "])), stretch ? 1 : 0, core.borderWidth.small, semantic.border.differentiated, active
38
- ? 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
39
- ? 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
38
+ ? 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.focus.outline, core.borderWidth.medium) : '', !inline
39
+ ? 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
40
40
  ? ''
41
- : css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border-right-color: transparent;\n border-right-width: 0;\n "], ["\n border-right-color: transparent;\n border-right-width: 0;\n "]))), first && inline
41
+ : 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
42
42
  ? ''
43
- : 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 "]))));
43
+ : 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 "]))));
44
44
  });
45
45
  export var Tab = forwardRef(function (_a, ref) {
46
46
  var active = _a.active, fullWidth = _a.fullWidth, children = _a.children, rest = __rest(_a, ["active", "fullWidth", "children"]);
package/dist/esm/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './components';
2
2
  export * from './utils';
3
+ export * from './theme';
@@ -0,0 +1 @@
1
+ export * from '@ovotech/element-core';
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './components';
2
2
  export * from './utils';
3
+ export * from './theme';
package/dist/index.js CHANGED
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./components"), exports);
18
18
  __exportStar(require("./utils"), exports);
19
+ __exportStar(require("./theme"), exports);