@ovotech/element-native 5.6.0 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/components/Accordion/styles.d.ts +3 -1734
  2. package/dist/components/ActionList/ActionListItems/DataListItem.js +3 -1
  3. package/dist/components/ActionList/ActionListItems/ToggleListItem.js +3 -4
  4. package/dist/components/ActionList/ActionListItems/styles.d.ts +22 -10404
  5. package/dist/components/ActionList/ActionListItems/styles.js +18 -16
  6. package/dist/components/ActionList/styled.d.ts +12 -6936
  7. package/dist/components/Badge/Badge.d.ts +1 -578
  8. package/dist/components/BottomActionBar/BottomActionBar.d.ts +12 -0
  9. package/dist/components/BottomActionBar/BottomActionBar.js +80 -0
  10. package/dist/components/BottomActionBar/OverlayProvider.d.ts +8 -0
  11. package/dist/components/BottomActionBar/OverlayProvider.js +38 -0
  12. package/dist/components/BottomActionBar/index.d.ts +2 -0
  13. package/dist/components/BottomActionBar/index.js +7 -0
  14. package/dist/components/Button/Button.styles.d.ts +5 -2312
  15. package/dist/components/Card/Card.styles.d.ts +3 -1734
  16. package/dist/components/Cards/AccountCard/AccountCard.styles.d.ts +8 -4624
  17. package/dist/components/Cards/BalanceCard/BalanceCard.styles.d.ts +15 -8670
  18. package/dist/components/Cards/DisruptiveCard/DisruptiveCard.styles.d.ts +1 -578
  19. package/dist/components/Cards/HeroImageCard/HeroImageCard.styles.d.ts +3 -1734
  20. package/dist/components/Cards/IconDataCard/IconDataCard.styles.d.ts +4 -2312
  21. package/dist/components/Cards/IconTextCard/IconTextCard.styles.d.ts +3 -1734
  22. package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.d.ts +5 -2890
  23. package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.js +1 -2
  24. package/dist/components/Cards/LinkTextCard/LinkTextCard.styles.d.ts +5 -2890
  25. package/dist/components/Cards/OfferCard/OfferCard.d.ts +22 -0
  26. package/dist/components/Cards/OfferCard/OfferCard.js +36 -0
  27. package/dist/components/Cards/OfferCard/OfferCard.styles.d.ts +34 -0
  28. package/dist/components/Cards/OfferCard/OfferCard.styles.js +61 -0
  29. package/dist/components/Cards/OfferCard/index.d.ts +1 -0
  30. package/dist/components/Cards/OfferCard/index.js +17 -0
  31. package/dist/components/Cards/ProgressBarCard/ProgressBarCard.styles.d.ts +9 -5202
  32. package/dist/components/Cards/QuickLinkCard/QuickLinkCard.styles.d.ts +5 -2890
  33. package/dist/components/Cards/ServicesImageCard/ServicesImageCard.styles.d.ts +5 -2890
  34. package/dist/components/Cards/shared.styles.d.ts +10 -5780
  35. package/dist/components/Checkbox/styled.d.ts +6 -3468
  36. package/dist/components/CurrencyInput/styled.d.ts +4 -2312
  37. package/dist/components/DataTable/styles.d.ts +13 -7514
  38. package/dist/components/Disclosure/Disclosure.d.ts +1 -578
  39. package/dist/components/Em/Em.d.ts +1 -578
  40. package/dist/components/EmptyState/styles.d.ts +2 -1156
  41. package/dist/components/ErrorText/ErrorText.d.ts +1 -578
  42. package/dist/components/Grid/Col.d.ts +1 -578
  43. package/dist/components/HintText/HintText.d.ts +1 -578
  44. package/dist/components/Input/styled.d.ts +3 -1734
  45. package/dist/components/LabelText/LabelText.d.ts +1 -578
  46. package/dist/components/LargeValueReference/styles.d.ts +3 -1734
  47. package/dist/components/LineThrough/LineThrough.d.ts +1 -578
  48. package/dist/components/List/styled.d.ts +4 -2312
  49. package/dist/components/Margin/Margin.d.ts +1 -578
  50. package/dist/components/NavHeader/NavHeader.styles.d.ts +11 -6358
  51. package/dist/components/Notification/Notification.d.ts +2 -2
  52. package/dist/components/Notification/Notification.js +20 -12
  53. package/dist/components/Notification/Notification.styles.d.ts +13 -5202
  54. package/dist/components/Notification/Notification.styles.js +21 -2
  55. package/dist/components/PasswordInput/PasswordInput.styled.d.ts +1 -578
  56. package/dist/components/Radio/Radio.d.ts +2 -2
  57. package/dist/components/Radio/Radio.js +5 -43
  58. package/dist/components/Radio/Radio.styles.d.ts +9 -0
  59. package/dist/components/Radio/Radio.styles.js +74 -0
  60. package/dist/components/RadioCard/RadioCard.styles.d.ts +5 -2890
  61. package/dist/components/Rail/Rail.d.ts +12 -0
  62. package/dist/components/Rail/Rail.js +58 -0
  63. package/dist/components/Rail/RailIndicator.d.ts +7 -0
  64. package/dist/components/Rail/RailIndicator.js +81 -0
  65. package/dist/components/Rail/index.d.ts +1 -0
  66. package/dist/components/Rail/index.js +5 -0
  67. package/dist/components/Rail/styles.d.ts +13 -0
  68. package/dist/components/Rail/styles.js +55 -0
  69. package/dist/components/Rail/useRailPaging.d.ts +13 -0
  70. package/dist/components/Rail/useRailPaging.js +95 -0
  71. package/dist/components/SelectField/styled.d.ts +8 -4624
  72. package/dist/components/Strong/Strong.d.ts +1 -578
  73. package/dist/components/SubLabelText/SubLabelText.d.ts +1 -578
  74. package/dist/components/Tabs/Tab.d.ts +1 -578
  75. package/dist/components/Toast/Toast.d.ts +10 -4
  76. package/dist/components/Toast/Toast.js +40 -27
  77. package/dist/components/Toggle/styles.d.ts +4 -2312
  78. package/dist/components/index.d.ts +2 -0
  79. package/dist/components/index.js +2 -0
  80. package/dist/esm/components/ActionList/ActionListItems/DataListItem.js +3 -1
  81. package/dist/esm/components/ActionList/ActionListItems/ToggleListItem.js +5 -6
  82. package/dist/esm/components/ActionList/ActionListItems/styles.js +17 -15
  83. package/dist/esm/components/BottomActionBar/BottomActionBar.js +40 -0
  84. package/dist/esm/components/BottomActionBar/OverlayProvider.js +30 -0
  85. package/dist/esm/components/BottomActionBar/index.js +2 -0
  86. package/dist/esm/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.js +1 -2
  87. package/dist/esm/components/Cards/OfferCard/OfferCard.js +32 -0
  88. package/dist/esm/components/Cards/OfferCard/OfferCard.styles.js +55 -0
  89. package/dist/esm/components/Cards/OfferCard/index.js +1 -0
  90. package/dist/esm/components/Notification/Notification.js +21 -13
  91. package/dist/esm/components/Notification/Notification.styles.js +20 -1
  92. package/dist/esm/components/Radio/Radio.js +4 -39
  93. package/dist/esm/components/Radio/Radio.styles.js +38 -0
  94. package/dist/esm/components/Rail/Rail.js +21 -0
  95. package/dist/esm/components/Rail/RailIndicator.js +44 -0
  96. package/dist/esm/components/Rail/index.js +1 -0
  97. package/dist/esm/components/Rail/styles.js +49 -0
  98. package/dist/esm/components/Rail/useRailPaging.js +92 -0
  99. package/dist/esm/components/Toast/Toast.js +40 -27
  100. package/dist/esm/components/index.js +2 -0
  101. package/dist/styled.native.d.ts +1 -3463
  102. package/package.json +2 -2
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataListItem = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const use_font_scaling_1 = require("../../../hooks/use-font-scaling");
5
6
  const styled_native_1 = require("../../../styled.native");
6
7
  const Icon_1 = require("../../Icon");
7
8
  const LabelText_1 = require("../../LabelText");
@@ -12,10 +13,11 @@ const DataListItem = ({ testID, graphic, progressRingPercentage, heading, subHea
12
13
  const theme = (0, styled_native_1.useTheme)();
13
14
  const isError = statusText === 'Error';
14
15
  const hasProgressRing = progressRingPercentage !== undefined;
16
+ const { isFontScalingLarge } = (0, use_font_scaling_1.useFontScaling)();
15
17
  const IconContent = (graphic === null || graphic === void 0 ? void 0 : graphic.type) === 'icon' ? ((0, jsx_runtime_1.jsx)(styles_1.GraphicContainer, { isIcon: true, hasProgress: hasProgressRing, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: graphic.icon, size: 24, color: graphic.iconColor ? graphic.iconColor : theme.color.brand.brand }) })) : null;
16
18
  return ((0, jsx_runtime_1.jsxs)(styles_1.ActionListItemWrapper, { testID: testID, children: [(graphic === null || graphic === void 0 ? void 0 : graphic.type) === 'icon' &&
17
19
  (hasProgressRing ? ((0, jsx_runtime_1.jsx)(ProgressRing_1.ProgressRing, { percentage: progressRingPercentage, children: IconContent })) : (IconContent)), (graphic === null || graphic === void 0 ? void 0 : graphic.type) === 'image' && ((0, jsx_runtime_1.jsx)(styles_1.GraphicContainer, { children: (0, jsx_runtime_1.jsx)(styles_1.StyledImage, { source: typeof graphic.image === 'string'
18
20
  ? { uri: graphic.image }
19
- : graphic.image, resizeMode: "cover", accessibilityLabel: 'Data List Image' }) })), (0, jsx_runtime_1.jsxs)(styles_1.LeftTextContainer, { children: [heading && (0, jsx_runtime_1.jsx)(LabelText_1.LabelText, { children: heading }), subHeading && (0, jsx_runtime_1.jsx)(P_1.P, { size: "sm", children: subHeading }), statusText && ((0, jsx_runtime_1.jsx)(styles_1.StatusText, { size: "sm", isError: isError, children: statusText }))] }), (0, jsx_runtime_1.jsxs)(styles_1.RightTextContainer, { children: [(0, jsx_runtime_1.jsxs)(styles_1.DirectionAndValueTextContainer, { children: [directionLabel && ((0, jsx_runtime_1.jsx)(styles_1.DirectionLabelContainer, { children: (0, jsx_runtime_1.jsx)(styles_1.OnSurfaceP, { size: "sm", children: directionLabel }) })), valueText && ((0, jsx_runtime_1.jsx)(styles_1.ValueTextContainer, { children: (0, jsx_runtime_1.jsx)(styles_1.DataValueText, { isError: isError, size: "lg", children: valueText }) }))] }), valueSubText && (0, jsx_runtime_1.jsx)(styles_1.OnSurfaceP, { size: "sm", children: valueSubText })] })] }));
21
+ : graphic.image, resizeMode: "cover", accessibilityLabel: 'Data List Image' }) })), (0, jsx_runtime_1.jsxs)(styles_1.LeftTextContainer, { children: [heading && (0, jsx_runtime_1.jsx)(LabelText_1.LabelText, { children: heading }), subHeading && (0, jsx_runtime_1.jsx)(P_1.P, { size: "sm", children: subHeading }), statusText && ((0, jsx_runtime_1.jsx)(styles_1.StatusText, { size: "sm", isError: isError, children: statusText }))] }), (0, jsx_runtime_1.jsxs)(styles_1.RightTextContainer, { children: [(0, jsx_runtime_1.jsxs)(styles_1.DirectionAndValueTextContainer, { children: [directionLabel && ((0, jsx_runtime_1.jsx)(styles_1.DirectionLabelContainer, { scaledUpFont: isFontScalingLarge, children: (0, jsx_runtime_1.jsx)(styles_1.OnSurfaceP, { size: "sm", children: directionLabel }) })), valueText && ((0, jsx_runtime_1.jsx)(styles_1.ValueTextContainer, { scaledUpFont: isFontScalingLarge, children: (0, jsx_runtime_1.jsx)(styles_1.DataValueText, { isError: isError, size: "lg", children: valueText }) }))] }), valueSubText && (0, jsx_runtime_1.jsx)(styles_1.OnSurfaceP, { size: "sm", children: valueSubText })] })] }));
20
22
  };
21
23
  exports.DataListItem = DataListItem;
@@ -2,12 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ToggleListItem = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const styled_native_1 = require("../../../styled.native");
5
+ const react_native_1 = require("react-native");
6
+ const HintText_1 = require("../../HintText");
6
7
  const P_1 = require("../../P");
7
- const Toggle_1 = require("../../Toggle");
8
8
  const styles_1 = require("./styles");
9
9
  const ToggleListItem = ({ testID, heading, hintText, checked, onToggle, }) => {
10
- const theme = (0, styled_native_1.useTheme)();
11
- return ((0, jsx_runtime_1.jsx)(styles_1.ActionListItemWrapper, { testID: testID ? `${testID}-toggle` : undefined, children: (0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { checked: checked, onPress: onToggle, accessibilityLabel: typeof heading === 'string' ? heading : undefined, label: (0, jsx_runtime_1.jsx)(P_1.P, { children: heading }), hint: hintText, toggleBackgroundColor: theme.color.brand.brand }) }));
10
+ return ((0, jsx_runtime_1.jsxs)(styles_1.ActionListItemWrapper, { testID: testID ? `${testID}-toggle` : undefined, children: [(0, jsx_runtime_1.jsxs)(styles_1.TextContainer, { children: [(0, jsx_runtime_1.jsx)(P_1.P, { children: heading }), hintText && (0, jsx_runtime_1.jsx)(HintText_1.HintText, { children: hintText })] }), (0, jsx_runtime_1.jsx)(react_native_1.Switch, { value: checked, onValueChange: onToggle, accessibilityRole: "switch", accessibilityLabel: heading, accessibilityState: { checked } })] }));
12
11
  };
13
12
  exports.ToggleListItem = ToggleListItem;