@ovotech/element-native 5.5.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.
- package/dist/components/Accordion/styles.d.ts +3 -1725
- package/dist/components/ActionList/Action.d.ts +23 -0
- package/dist/components/ActionList/Action.js +29 -0
- package/dist/components/ActionList/ActionList.d.ts +11 -27
- package/dist/components/ActionList/ActionList.js +9 -25
- package/dist/components/ActionList/ActionListItems/DataListItem.d.ts +23 -0
- package/dist/components/ActionList/ActionListItems/DataListItem.js +23 -0
- package/dist/components/ActionList/ActionListItems/EditableListItem.d.ts +43 -0
- package/dist/components/ActionList/ActionListItems/EditableListItem.js +134 -0
- package/dist/components/ActionList/ActionListItems/NavigationListItem.d.ts +16 -0
- package/dist/components/ActionList/ActionListItems/NavigationListItem.js +30 -0
- package/dist/components/ActionList/ActionListItems/ProgressRing.d.ts +7 -0
- package/dist/components/ActionList/ActionListItems/ProgressRing.js +66 -0
- package/dist/components/ActionList/ActionListItems/ToggleListItem.d.ts +9 -0
- package/dist/components/ActionList/ActionListItems/ToggleListItem.js +12 -0
- package/dist/components/ActionList/ActionListItems/styles.d.ts +51 -0
- package/dist/components/ActionList/ActionListItems/styles.js +173 -0
- package/dist/components/ActionList/components/ActionListHeading.d.ts +9 -0
- package/dist/components/ActionList/components/ActionListHeading.js +11 -0
- package/dist/components/ActionList/index.d.ts +6 -1
- package/dist/components/ActionList/index.js +11 -2
- package/dist/components/ActionList/styled.d.ts +12 -5756
- package/dist/components/ActionList/styled.js +24 -9
- package/dist/components/Badge/Badge.d.ts +1 -575
- package/dist/components/BottomActionBar/BottomActionBar.d.ts +12 -0
- package/dist/components/BottomActionBar/BottomActionBar.js +80 -0
- package/dist/components/BottomActionBar/OverlayProvider.d.ts +8 -0
- package/dist/components/BottomActionBar/OverlayProvider.js +38 -0
- package/dist/components/BottomActionBar/index.d.ts +2 -0
- package/dist/components/BottomActionBar/index.js +7 -0
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.styles.d.ts +5 -2300
- package/dist/components/Card/Card.d.ts +7 -4
- package/dist/components/Card/Card.js +44 -22
- package/dist/components/Card/Card.styles.d.ts +4 -1725
- package/dist/components/Card/Card.styles.js +7 -11
- package/dist/components/Cards/AccountCard/AccountCard.styles.d.ts +8 -4600
- package/dist/components/Cards/BalanceCard/BalanceCard.styles.d.ts +15 -8625
- package/dist/components/Cards/BalanceCard/BalanceCard.styles.js +2 -2
- package/dist/components/Cards/DisruptiveCard/DisruptiveCard.d.ts +13 -0
- package/dist/components/Cards/DisruptiveCard/DisruptiveCard.js +45 -0
- package/dist/components/Cards/DisruptiveCard/DisruptiveCard.styles.d.ts +3 -0
- package/dist/components/Cards/DisruptiveCard/DisruptiveCard.styles.js +11 -0
- package/dist/components/Cards/DisruptiveCard/index.d.ts +1 -0
- package/dist/components/Cards/DisruptiveCard/index.js +17 -0
- package/dist/components/Cards/HeroImageCard/HeroImageCard.d.ts +12 -0
- package/dist/components/Cards/HeroImageCard/HeroImageCard.js +65 -0
- package/dist/components/Cards/HeroImageCard/HeroImageCard.styles.d.ts +10 -0
- package/dist/components/Cards/HeroImageCard/HeroImageCard.styles.js +27 -0
- package/dist/components/Cards/HeroImageCard/index.d.ts +1 -0
- package/dist/components/Cards/HeroImageCard/index.js +17 -0
- package/dist/components/Cards/IconDataCard/IconDataCard.styles.d.ts +4 -2300
- package/dist/components/Cards/IconTextCard/IconTextCard.js +3 -16
- package/dist/components/Cards/IconTextCard/IconTextCard.styles.d.ts +3 -2300
- package/dist/components/Cards/IconTextCard/IconTextCard.styles.js +1 -6
- package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.d.ts +14 -0
- package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.js +26 -0
- package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.d.ts +18 -0
- package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.js +33 -0
- package/dist/components/Cards/IllustrationTextCard/index.d.ts +1 -0
- package/dist/components/Cards/IllustrationTextCard/index.js +17 -0
- package/dist/components/Cards/LinkTextCard/LinkTextCard.d.ts +2 -2
- package/dist/components/Cards/LinkTextCard/LinkTextCard.js +7 -6
- package/dist/components/Cards/LinkTextCard/LinkTextCard.styles.d.ts +8 -2875
- package/dist/components/Cards/LinkTextCard/LinkTextCard.styles.js +9 -6
- package/dist/components/Cards/OfferCard/OfferCard.d.ts +22 -0
- package/dist/components/Cards/OfferCard/OfferCard.js +36 -0
- package/dist/components/Cards/OfferCard/OfferCard.styles.d.ts +34 -0
- package/dist/components/Cards/OfferCard/OfferCard.styles.js +61 -0
- package/dist/components/Cards/OfferCard/index.d.ts +1 -0
- package/dist/components/Cards/OfferCard/index.js +17 -0
- package/dist/components/Cards/ProgressBarCard/ProgressBarCard.styles.d.ts +9 -5175
- package/dist/components/Cards/QuickLinkCard/QuickLinkCard.d.ts +12 -0
- package/dist/components/Cards/QuickLinkCard/QuickLinkCard.js +27 -0
- package/dist/components/Cards/QuickLinkCard/QuickLinkCard.styles.d.ts +12 -0
- package/dist/components/Cards/QuickLinkCard/QuickLinkCard.styles.js +31 -0
- package/dist/components/Cards/QuickLinkCard/index.d.ts +1 -0
- package/dist/components/Cards/QuickLinkCard/index.js +17 -0
- package/dist/components/Cards/ServicesImageCard/ServicesImageCard.d.ts +12 -0
- package/dist/components/Cards/ServicesImageCard/ServicesImageCard.js +24 -0
- package/dist/components/Cards/ServicesImageCard/ServicesImageCard.styles.d.ts +17 -0
- package/dist/components/Cards/ServicesImageCard/ServicesImageCard.styles.js +38 -0
- package/dist/components/Cards/ServicesImageCard/index.d.ts +1 -0
- package/dist/components/Cards/ServicesImageCard/index.js +17 -0
- package/dist/components/Cards/components.d.ts +15 -0
- package/dist/components/Cards/components.js +24 -0
- package/dist/components/Cards/index.d.ts +5 -0
- package/dist/components/Cards/index.js +11 -1
- package/dist/components/Cards/shared.styles.d.ts +11 -3451
- package/dist/components/Cards/shared.styles.js +18 -2
- package/dist/components/Cards/utils.d.ts +1 -0
- package/dist/components/Cards/utils.js +13 -1
- package/dist/components/Checkbox/Checkbox.d.ts +2 -13
- package/dist/components/Checkbox/Checkbox.js +3 -49
- package/dist/components/Checkbox/styled.d.ts +21 -0
- package/dist/components/Checkbox/styled.js +52 -0
- package/dist/components/Checkbox/types.d.ts +16 -0
- package/dist/components/Checkbox/types.js +2 -0
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +2 -1
- package/dist/components/CurrencyInput/CurrencyInput.js +11 -4
- package/dist/components/CurrencyInput/styled.d.ts +10 -0
- package/dist/components/CurrencyInput/styled.js +39 -0
- package/dist/components/DataTable/styles.d.ts +13 -7475
- package/dist/components/Disclosure/Disclosure.d.ts +1 -575
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/Divider/Divider.js +3 -1
- package/dist/components/Em/Em.d.ts +1 -575
- package/dist/components/EmailInput/EmailInput.d.ts +4 -1
- package/dist/components/EmailInput/EmailInput.js +18 -2
- package/dist/components/EmptyState/EmptyState.d.ts +2 -0
- package/dist/components/EmptyState/EmptyState.js +17 -0
- package/dist/components/EmptyState/EmptyState.test.d.ts +1 -0
- package/dist/components/EmptyState/EmptyState.test.js +92 -0
- package/dist/components/EmptyState/index.d.ts +1 -0
- package/dist/components/EmptyState/index.js +17 -0
- package/dist/components/EmptyState/styles.d.ts +2 -0
- package/dist/components/EmptyState/styles.js +23 -0
- package/dist/components/EmptyState/types.d.ts +18 -0
- package/dist/components/EmptyState/types.js +2 -0
- package/dist/components/ErrorText/ErrorText.d.ts +1 -575
- package/dist/components/Field/Field.d.ts +3 -2
- package/dist/components/Field/Field.js +3 -2
- package/dist/components/Grid/Col.d.ts +1 -575
- package/dist/components/HintText/HintText.d.ts +1 -575
- package/dist/components/Input/Input.d.ts +2 -1
- package/dist/components/Input/Input.js +6 -97
- package/dist/components/Input/styled.d.ts +16 -0
- package/dist/components/Input/styled.js +96 -0
- package/dist/components/LabelText/LabelText.d.ts +1 -575
- package/dist/components/LargeValueReference/LargeValueReference.d.ts +11 -0
- package/dist/components/LargeValueReference/LargeValueReference.js +49 -0
- package/dist/components/LargeValueReference/index.d.ts +1 -0
- package/dist/components/LargeValueReference/index.js +17 -0
- package/dist/components/LargeValueReference/styles.d.ts +10 -0
- package/dist/components/LargeValueReference/styles.js +29 -0
- package/dist/components/LineThrough/LineThrough.d.ts +1 -575
- package/dist/components/List/styled.d.ts +4 -2300
- package/dist/components/Margin/Margin.d.ts +1 -575
- package/dist/components/NavHeader/NavHeader.styles.d.ts +11 -6325
- package/dist/components/Notification/Notification.d.ts +2 -2
- package/dist/components/Notification/Notification.js +20 -12
- package/dist/components/Notification/Notification.styles.d.ts +13 -5175
- package/dist/components/Notification/Notification.styles.js +21 -2
- package/dist/components/PasswordInput/PasswordInput.styled.d.ts +1 -577
- package/dist/components/PasswordInput/PasswordInput.styled.js +5 -3
- package/dist/components/PasswordInput/PasswordVisibilityToggle.js +2 -8
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/Radio/Radio.js +5 -43
- package/dist/components/Radio/Radio.styles.d.ts +9 -0
- package/dist/components/Radio/Radio.styles.js +74 -0
- package/dist/components/RadioCard/RadioCard.d.ts +2 -1
- package/dist/components/RadioCard/RadioCard.js +7 -57
- package/dist/components/RadioCard/RadioCard.styles.d.ts +16 -0
- package/dist/components/RadioCard/RadioCard.styles.js +97 -0
- package/dist/components/Rail/Rail.d.ts +12 -0
- package/dist/components/Rail/Rail.js +58 -0
- package/dist/components/Rail/RailIndicator.d.ts +7 -0
- package/dist/components/Rail/RailIndicator.js +81 -0
- package/dist/components/Rail/index.d.ts +1 -0
- package/dist/components/Rail/index.js +5 -0
- package/dist/components/Rail/styles.d.ts +13 -0
- package/dist/components/Rail/styles.js +55 -0
- package/dist/components/Rail/useRailPaging.d.ts +13 -0
- package/dist/components/Rail/useRailPaging.js +95 -0
- package/dist/components/SelectField/Select.d.ts +5 -579
- package/dist/components/SelectField/Select.js +7 -107
- package/dist/components/SelectField/SelectField.d.ts +2 -2
- package/dist/components/SelectField/SelectField.js +2 -2
- package/dist/components/SelectField/styled.d.ts +26 -0
- package/dist/components/SelectField/styled.js +118 -0
- package/dist/components/SkeletonText/SkeletonText.js +4 -4
- package/dist/components/Strong/Strong.d.ts +1 -575
- package/dist/components/SubLabelText/SubLabelText.d.ts +1 -575
- package/dist/components/Tabs/Tab.d.ts +1 -575
- package/dist/components/TextareaInput/TextareaInput.js +12 -6
- package/dist/components/Toast/Toast.d.ts +10 -4
- package/dist/components/Toast/Toast.js +40 -27
- package/dist/components/Toggle/Toggle.d.ts +3 -1
- package/dist/components/Toggle/Toggle.js +4 -6
- package/dist/components/Toggle/styles.d.ts +5 -2300
- package/dist/components/Toggle/styles.js +3 -3
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.js +5 -0
- package/dist/esm/components/ActionList/Action.js +26 -0
- package/dist/esm/components/ActionList/ActionList.js +12 -28
- package/dist/esm/components/ActionList/ActionListItems/DataListItem.js +19 -0
- package/dist/esm/components/ActionList/ActionListItems/EditableListItem.js +131 -0
- package/dist/esm/components/ActionList/ActionListItems/NavigationListItem.js +26 -0
- package/dist/esm/components/ActionList/ActionListItems/ProgressRing.js +29 -0
- package/dist/esm/components/ActionList/ActionListItems/ToggleListItem.js +8 -0
- package/dist/esm/components/ActionList/ActionListItems/styles.js +137 -0
- package/dist/esm/components/ActionList/components/ActionListHeading.js +7 -0
- package/dist/esm/components/ActionList/index.js +6 -1
- package/dist/esm/components/ActionList/styled.js +23 -8
- package/dist/esm/components/BottomActionBar/BottomActionBar.js +40 -0
- package/dist/esm/components/BottomActionBar/OverlayProvider.js +30 -0
- package/dist/esm/components/BottomActionBar/index.js +2 -0
- package/dist/esm/components/Button/Button.js +1 -1
- package/dist/esm/components/Card/Card.js +45 -23
- package/dist/esm/components/Card/Card.styles.js +8 -12
- package/dist/esm/components/Cards/BalanceCard/BalanceCard.styles.js +2 -2
- package/dist/esm/components/Cards/DisruptiveCard/DisruptiveCard.js +41 -0
- package/dist/esm/components/Cards/DisruptiveCard/DisruptiveCard.styles.js +5 -0
- package/dist/esm/components/Cards/DisruptiveCard/index.js +1 -0
- package/dist/esm/components/Cards/HeroImageCard/HeroImageCard.js +28 -0
- package/dist/esm/components/Cards/HeroImageCard/HeroImageCard.styles.js +21 -0
- package/dist/esm/components/Cards/HeroImageCard/index.js +1 -0
- package/dist/esm/components/Cards/IconTextCard/IconTextCard.js +5 -18
- package/dist/esm/components/Cards/IconTextCard/IconTextCard.styles.js +0 -5
- package/dist/esm/components/Cards/IllustrationTextCard/IllustrationTextCard.js +22 -0
- package/dist/esm/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.js +27 -0
- package/dist/esm/components/Cards/IllustrationTextCard/index.js +1 -0
- package/dist/esm/components/Cards/LinkTextCard/LinkTextCard.js +7 -6
- package/dist/esm/components/Cards/LinkTextCard/LinkTextCard.styles.js +9 -6
- package/dist/esm/components/Cards/OfferCard/OfferCard.js +32 -0
- package/dist/esm/components/Cards/OfferCard/OfferCard.styles.js +55 -0
- package/dist/esm/components/Cards/OfferCard/index.js +1 -0
- package/dist/esm/components/Cards/QuickLinkCard/QuickLinkCard.js +23 -0
- package/dist/esm/components/Cards/QuickLinkCard/QuickLinkCard.styles.js +25 -0
- package/dist/esm/components/Cards/QuickLinkCard/index.js +1 -0
- package/dist/esm/components/Cards/ServicesImageCard/ServicesImageCard.js +20 -0
- package/dist/esm/components/Cards/ServicesImageCard/ServicesImageCard.styles.js +32 -0
- package/dist/esm/components/Cards/ServicesImageCard/index.js +1 -0
- package/dist/esm/components/Cards/components.js +19 -0
- package/dist/esm/components/Cards/index.js +5 -0
- package/dist/esm/components/Cards/shared.styles.js +17 -1
- package/dist/esm/components/Cards/utils.js +11 -0
- package/dist/esm/components/Checkbox/Checkbox.js +2 -45
- package/dist/esm/components/Checkbox/styled.js +46 -0
- package/dist/esm/components/Checkbox/types.js +1 -0
- package/dist/esm/components/CurrencyInput/CurrencyInput.js +12 -5
- package/dist/esm/components/CurrencyInput/styled.js +33 -0
- package/dist/esm/components/Divider/Divider.js +3 -1
- package/dist/esm/components/EmailInput/EmailInput.js +18 -2
- package/dist/esm/components/EmptyState/EmptyState.js +13 -0
- package/dist/esm/components/EmptyState/EmptyState.test.js +90 -0
- package/dist/esm/components/EmptyState/index.js +1 -0
- package/dist/esm/components/EmptyState/styles.js +17 -0
- package/dist/esm/components/EmptyState/types.js +1 -0
- package/dist/esm/components/Field/Field.js +3 -2
- package/dist/esm/components/Input/Input.js +6 -64
- package/dist/esm/components/Input/styled.js +60 -0
- package/dist/esm/components/LargeValueReference/LargeValueReference.js +45 -0
- package/dist/esm/components/LargeValueReference/index.js +1 -0
- package/dist/esm/components/LargeValueReference/styles.js +23 -0
- package/dist/esm/components/Notification/Notification.js +21 -13
- package/dist/esm/components/Notification/Notification.styles.js +20 -1
- package/dist/esm/components/PasswordInput/PasswordInput.styled.js +5 -3
- package/dist/esm/components/PasswordInput/PasswordVisibilityToggle.js +2 -8
- package/dist/esm/components/Radio/Radio.js +4 -39
- package/dist/esm/components/Radio/Radio.styles.js +38 -0
- package/dist/esm/components/RadioCard/RadioCard.js +5 -52
- package/dist/esm/components/RadioCard/RadioCard.styles.js +61 -0
- package/dist/esm/components/Rail/Rail.js +21 -0
- package/dist/esm/components/Rail/RailIndicator.js +44 -0
- package/dist/esm/components/Rail/index.js +1 -0
- package/dist/esm/components/Rail/styles.js +49 -0
- package/dist/esm/components/Rail/useRailPaging.js +92 -0
- package/dist/esm/components/SelectField/Select.js +7 -74
- package/dist/esm/components/SelectField/SelectField.js +3 -3
- package/dist/esm/components/SelectField/styled.js +82 -0
- package/dist/esm/components/SkeletonText/SkeletonText.js +4 -4
- package/dist/esm/components/TextareaInput/TextareaInput.js +12 -6
- package/dist/esm/components/Toast/Toast.js +40 -27
- package/dist/esm/components/Toggle/Toggle.js +4 -6
- package/dist/esm/components/Toggle/styles.js +3 -3
- package/dist/esm/components/index.js +5 -0
- package/dist/esm/hooks/use-font-scaling.js +32 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/test/utils.js +12 -0
- package/dist/esm/utils/utils.js +12 -1
- package/dist/hooks/use-font-scaling.d.ts +26 -0
- package/dist/hooks/use-font-scaling.js +35 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/styled.native.d.ts +1 -3445
- package/dist/test/utils.d.ts +4 -0
- package/dist/test/utils.js +28 -0
- package/dist/utils/utils.d.ts +11 -1
- package/dist/utils/utils.js +12 -0
- package/package.json +5 -5
- package/dist/components/ErrorWrapper/styles.d.ts +0 -0
- package/dist/components/ErrorWrapper/styles.js +0 -1
- package/dist/esm/components/ErrorWrapper/styles.js +0 -1
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SubHeading = exports.
|
|
6
|
+
exports.SubHeading = exports.TextContainer = exports.CardWithIconText = void 0;
|
|
7
7
|
const react_native_1 = require("react-native");
|
|
8
8
|
const styled_native_1 = __importDefault(require("../../../styled.native"));
|
|
9
9
|
const shared_styles_1 = require("../shared.styles");
|
|
@@ -14,11 +14,6 @@ exports.TextContainer = (0, styled_native_1.default)(react_native_1.View)(({ isS
|
|
|
14
14
|
flex: isSmall ? 1 : undefined,
|
|
15
15
|
justifyContent: 'flex-end',
|
|
16
16
|
}));
|
|
17
|
-
exports.TitleContainer = (0, styled_native_1.default)(react_native_1.View)(({ theme }) => ({
|
|
18
|
-
marginRight: theme.space[50],
|
|
19
|
-
flexDirection: 'row',
|
|
20
|
-
flexWrap: 'wrap',
|
|
21
|
-
}));
|
|
22
17
|
exports.SubHeading = (0, styled_native_1.default)(react_native_1.View)(({ theme }) => ({
|
|
23
18
|
marginTop: theme.space[200],
|
|
24
19
|
}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageSourcePropType } from 'react-native';
|
|
3
|
+
import { TitleSegment } from '../types';
|
|
4
|
+
type Props = {
|
|
5
|
+
badgeText?: string;
|
|
6
|
+
illustration: ImageSourcePropType | string;
|
|
7
|
+
heading: TitleSegment[] | string;
|
|
8
|
+
subHeading?: string;
|
|
9
|
+
size?: 'default' | 'small';
|
|
10
|
+
backgroundColor?: 'default' | 'brand';
|
|
11
|
+
onPress: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const IllustrationTextCard: React.FC<Props>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IllustrationTextCard = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
const styled_native_1 = require("../../../styled.native");
|
|
7
|
+
const P_1 = require("../../P");
|
|
8
|
+
const components_1 = require("../components");
|
|
9
|
+
const utils_1 = require("../utils");
|
|
10
|
+
const IllustrationTextCard_styles_1 = require("./IllustrationTextCard.styles");
|
|
11
|
+
const IllustrationTextCard = ({ badgeText, illustration, heading, subHeading, size = 'default', backgroundColor, onPress, }) => {
|
|
12
|
+
const theme = (0, styled_native_1.useTheme)();
|
|
13
|
+
const hasBadge = !!badgeText;
|
|
14
|
+
const CardContent = ((0, jsx_runtime_1.jsxs)(IllustrationTextCard_styles_1.CardWithIllustrationText, { isSmall: (0, utils_1.checkIsSmall)(size), hasBadge: hasBadge, onPress: onPress, background: backgroundColor
|
|
15
|
+
? backgroundColor === 'brand'
|
|
16
|
+
? theme.color.brand.accessible
|
|
17
|
+
: undefined
|
|
18
|
+
: undefined, children: [(0, jsx_runtime_1.jsxs)(IllustrationTextCard_styles_1.TextContent, { isSmall: (0, utils_1.checkIsSmall)(size), children: [(0, jsx_runtime_1.jsx)(IllustrationTextCard_styles_1.HeadingContainer, { isSmall: (0, utils_1.checkIsSmall)(size), children: (0, jsx_runtime_1.jsx)(components_1.ResponsiveHeading, { heading: heading, size: size }) }), !(0, utils_1.checkIsSmall)(size) && subHeading && ((0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(P_1.P, { inverted: backgroundColor === 'brand', children: subHeading }) }))] }), (0, jsx_runtime_1.jsx)(IllustrationTextCard_styles_1.ImageContent, { hasBadge: hasBadge, isSmall: (0, utils_1.checkIsSmall)(size), children: (0, jsx_runtime_1.jsx)(IllustrationTextCard_styles_1.CardImage, { source: typeof illustration === 'string'
|
|
19
|
+
? { uri: illustration }
|
|
20
|
+
: illustration, resizeMode: "contain" }) })] }));
|
|
21
|
+
if (!hasBadge) {
|
|
22
|
+
return CardContent;
|
|
23
|
+
}
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(components_1.ContainerWithCardBadge, { badgeText: badgeText, children: CardContent }));
|
|
25
|
+
};
|
|
26
|
+
exports.IllustrationTextCard = IllustrationTextCard;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Image, View } from 'react-native';
|
|
2
|
+
export declare const CardWithIllustrationText: import("styled-components").StyledComponent<({ children, displayStyle, background, onPress, onSelect, ...rest }: import("../../Card/Card").CardProps) => import("react/jsx-runtime").JSX.Element, import("@ovotech/element-core/dist/tokens-build/theme-native.types").ThemeNative, {
|
|
3
|
+
isSmall?: boolean;
|
|
4
|
+
} & {
|
|
5
|
+
isSmall?: boolean;
|
|
6
|
+
hasBadge?: boolean;
|
|
7
|
+
}, never>;
|
|
8
|
+
export declare const TextContent: import("styled-components").StyledComponent<typeof View, import("@ovotech/element-core/dist/tokens-build/theme-native.types").ThemeNative, {
|
|
9
|
+
isSmall?: boolean;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const HeadingContainer: import("styled-components").StyledComponent<typeof View, import("@ovotech/element-core/dist/tokens-build/theme-native.types").ThemeNative, {
|
|
12
|
+
isSmall?: boolean;
|
|
13
|
+
}, never>;
|
|
14
|
+
export declare const ImageContent: import("styled-components").StyledComponent<typeof View, import("@ovotech/element-core/dist/tokens-build/theme-native.types").ThemeNative, {
|
|
15
|
+
isSmall?: boolean;
|
|
16
|
+
hasBadge?: boolean;
|
|
17
|
+
}, never>;
|
|
18
|
+
export declare const CardImage: import("styled-components").StyledComponent<typeof Image, import("@ovotech/element-core/dist/tokens-build/theme-native.types").ThemeNative, {}, never>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CardImage = exports.ImageContent = exports.HeadingContainer = exports.TextContent = exports.CardWithIllustrationText = void 0;
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const styled_native_1 = __importDefault(require("../../../styled.native"));
|
|
9
|
+
const shared_styles_1 = require("../shared.styles");
|
|
10
|
+
exports.CardWithIllustrationText = (0, styled_native_1.default)(shared_styles_1.CardWithMinHeight)(({ theme, isSmall, hasBadge }) => ({
|
|
11
|
+
paddingTop: hasBadge ? theme.space[800] : theme.space[400],
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: isSmall ? 'column-reverse' : 'row',
|
|
14
|
+
justifyContent: 'space-between',
|
|
15
|
+
}));
|
|
16
|
+
exports.TextContent = (0, styled_native_1.default)(react_native_1.View)(({ isSmall, theme }) => ({
|
|
17
|
+
flex: isSmall ? undefined : 1,
|
|
18
|
+
paddingRight: isSmall ? 0 : theme.space[100],
|
|
19
|
+
alignSelf: isSmall ? undefined : 'flex-end',
|
|
20
|
+
}));
|
|
21
|
+
exports.HeadingContainer = (0, styled_native_1.default)(react_native_1.View)(({ theme, isSmall }) => ({
|
|
22
|
+
marginBottom: isSmall ? 0 : theme.space[200],
|
|
23
|
+
}));
|
|
24
|
+
exports.ImageContent = (0, styled_native_1.default)(react_native_1.View)(({ theme, isSmall, hasBadge }) => ({
|
|
25
|
+
width: isSmall ? theme.space[1600] : theme.space[3000],
|
|
26
|
+
height: isSmall ? theme.space[1600] : theme.space[3000],
|
|
27
|
+
alignSelf: isSmall ? undefined : 'center',
|
|
28
|
+
marginTop: hasBadge && !isSmall ? -theme.space[400] : 0,
|
|
29
|
+
}));
|
|
30
|
+
exports.CardImage = (0, styled_native_1.default)(react_native_1.Image)({
|
|
31
|
+
width: '100%',
|
|
32
|
+
height: '100%',
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IllustrationTextCard';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./IllustrationTextCard"), exports);
|
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { ImageSourcePropType } from 'react-native';
|
|
3
3
|
type Props = {
|
|
4
4
|
image?: ImageSourcePropType;
|
|
5
|
-
|
|
5
|
+
badgeText?: string;
|
|
6
6
|
heading: string;
|
|
7
7
|
subHeading?: string;
|
|
8
8
|
size?: 'default' | 'small';
|
|
9
|
-
onPress
|
|
9
|
+
onPress: () => void;
|
|
10
10
|
};
|
|
11
11
|
export declare const LinkTextCard: React.FC<Props>;
|
|
12
12
|
export {};
|
|
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LinkTextCard = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_native_1 = require("react-native");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const P_1 = require("../../P");
|
|
7
|
+
const Strong_1 = require("../../Strong");
|
|
8
|
+
const components_1 = require("../components");
|
|
8
9
|
const utils_1 = require("../utils");
|
|
9
10
|
const LinkTextCard_styles_1 = require("./LinkTextCard.styles");
|
|
10
|
-
const LinkTextCard = ({ image,
|
|
11
|
-
const hasBadge = !!
|
|
12
|
-
const CardContent = ((0, jsx_runtime_1.jsxs)(LinkTextCard_styles_1.CardWithLinkText, { isSmall: (0, utils_1.checkIsSmall)(size), hasBadge: hasBadge, onPress: onPress, children: [(0, jsx_runtime_1.jsxs)(LinkTextCard_styles_1.TextContent, { isSmall: (0, utils_1.checkIsSmall)(size), children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(LinkTextCard_styles_1.Heading, { isSmall: (0, utils_1.checkIsSmall)(size), children: (0, jsx_runtime_1.jsx)(
|
|
11
|
+
const LinkTextCard = ({ image, badgeText, heading, subHeading, size, onPress, }) => {
|
|
12
|
+
const hasBadge = !!badgeText;
|
|
13
|
+
const CardContent = ((0, jsx_runtime_1.jsxs)(LinkTextCard_styles_1.CardWithLinkText, { isSmall: (0, utils_1.checkIsSmall)(size), hasBadge: hasBadge, onPress: onPress, children: [(0, jsx_runtime_1.jsxs)(LinkTextCard_styles_1.TextContent, { isSmall: (0, utils_1.checkIsSmall)(size), children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(LinkTextCard_styles_1.Heading, { isSmall: (0, utils_1.checkIsSmall)(size), children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: heading }) }) }), !(0, utils_1.checkIsSmall)(size) && !!subHeading && ((0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(P_1.P, { children: subHeading }) }))] }), (0, jsx_runtime_1.jsx)(LinkTextCard_styles_1.ImageContent, { isSmall: (0, utils_1.checkIsSmall)(size), hasBadge: hasBadge, children: (0, jsx_runtime_1.jsx)(LinkTextCard_styles_1.CardImage, { source: image
|
|
13
14
|
? image
|
|
14
15
|
: {
|
|
15
16
|
uri: 'https://www.ovobyus.com/transform/eed55bf8-f059-4acb-a043-2d0a6d12537f/homepage-supporting-house-image',
|
|
@@ -17,6 +18,6 @@ const LinkTextCard = ({ image, badge, heading, subHeading, size, onPress, }) =>
|
|
|
17
18
|
if (!hasBadge) {
|
|
18
19
|
return CardContent;
|
|
19
20
|
}
|
|
20
|
-
return ((0, jsx_runtime_1.
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(components_1.ContainerWithCardBadge, { badgeText: badgeText, children: CardContent }));
|
|
21
22
|
};
|
|
22
23
|
exports.LinkTextCard = LinkTextCard;
|