@ovotech/element-native 4.4.2 → 4.4.3-canary-a2e1e61-317
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/ActionList/ActionList.js +1 -1
- package/dist/components/Stretch/Stretch.js +1 -1
- package/dist/esm/components/ActionList/ActionList.js +1 -1
- package/dist/esm/components/Stretch/Stretch.js +1 -1
- package/package.json +3 -3
- package/dist/components/Accordion/hooks.d.ts +0 -9
- package/dist/components/Accordion/hooks.js +0 -20
- package/dist/components/Heading/Heading.d.ts +0 -18
- package/dist/components/Heading/Heading.js +0 -104
- package/dist/components/Heading/index.d.ts +0 -1
- package/dist/components/Heading/index.js +0 -8
- package/dist/components/HorizontalCarousel/HorizontalCarousel.d.ts +0 -23
- package/dist/components/HorizontalCarousel/HorizontalCarousel.js +0 -92
- package/dist/components/HorizontalCarousel/NavigationDots.d.ts +0 -8
- package/dist/components/HorizontalCarousel/NavigationDots.js +0 -88
- package/dist/components/HorizontalCarousel/index.d.ts +0 -1
- package/dist/components/HorizontalCarousel/index.js +0 -17
- package/dist/components/Input/CurrencyInput.d.ts +0 -18
- package/dist/components/Input/CurrencyInput.js +0 -37
- package/dist/components/Input/EmailInput.d.ts +0 -12
- package/dist/components/Input/EmailInput.js +0 -19
- package/dist/components/Input/NumberInput.d.ts +0 -12
- package/dist/components/Input/NumberInput.js +0 -19
- package/dist/components/Input/PasswordInput.d.ts +0 -14
- package/dist/components/Input/PasswordInput.js +0 -35
- package/dist/components/Input/PasswordInput.styled.d.ts +0 -274
- package/dist/components/Input/PasswordInput.styled.js +0 -37
- package/dist/components/Input/PasswordVisibilityToggle.d.ts +0 -16
- package/dist/components/Input/PasswordVisibilityToggle.js +0 -39
- package/dist/components/Input/PhoneInput.d.ts +0 -12
- package/dist/components/Input/PhoneInput.js +0 -19
- package/dist/components/Input/TelInput.d.ts +0 -12
- package/dist/components/Input/TelInput.js +0 -41
- package/dist/components/Input/TextInput.d.ts +0 -12
- package/dist/components/Input/TextInput.js +0 -19
- package/dist/components/Input/TextareaInput.d.ts +0 -18
- package/dist/components/Input/TextareaInput.js +0 -67
- package/dist/components/Input/index.d.ts +0 -7
- package/dist/components/Input/index.js +0 -17
- package/dist/components/SegmentedControls/constants.d.ts +0 -28
- package/dist/components/SegmentedControls/constants.js +0 -2
- package/dist/components/SkeletonLoading/Skeleton.d.ts +0 -268
- package/dist/components/SkeletonLoading/Skeleton.js +0 -13
- package/dist/components/SkeletonLoading/SkeletonAnimation.d.ts +0 -10
- package/dist/components/SkeletonLoading/SkeletonAnimation.js +0 -46
- package/dist/components/SkeletonLoading/SkeletonCTA.d.ts +0 -6
- package/dist/components/SkeletonLoading/SkeletonCTA.js +0 -42
- package/dist/components/SkeletonLoading/SkeletonCircle.d.ts +0 -6
- package/dist/components/SkeletonLoading/SkeletonCircle.js +0 -46
- package/dist/components/SkeletonLoading/SkeletonHeading.d.ts +0 -12
- package/dist/components/SkeletonLoading/SkeletonHeading.js +0 -42
- package/dist/components/SkeletonLoading/SkeletonText.d.ts +0 -6
- package/dist/components/SkeletonLoading/SkeletonText.js +0 -48
- package/dist/components/SkeletonLoading/index.d.ts +0 -5
- package/dist/components/SkeletonLoading/index.js +0 -21
- package/dist/components/SummaryList/SummaryList.d.ts +0 -22
- package/dist/components/SummaryList/SummaryList.js +0 -47
- package/dist/components/SummaryList/index.d.ts +0 -1
- package/dist/components/SummaryList/index.js +0 -6
- package/dist/components/Text/Text.d.ts +0 -1436
- package/dist/components/Text/Text.js +0 -93
- package/dist/components/Text/index.d.ts +0 -1
- package/dist/components/Text/index.js +0 -10
- package/dist/components/TextField/CurrencyField.d.ts +0 -15
- package/dist/components/TextField/CurrencyField.js +0 -33
- package/dist/components/TextField/EmailField.d.ts +0 -13
- package/dist/components/TextField/EmailField.js +0 -33
- package/dist/components/TextField/NumberField.d.ts +0 -13
- package/dist/components/TextField/NumberField.js +0 -33
- package/dist/components/TextField/PasswordField.d.ts +0 -15
- package/dist/components/TextField/PasswordField.js +0 -33
- package/dist/components/TextField/PhoneField.d.ts +0 -13
- package/dist/components/TextField/PhoneField.js +0 -33
- package/dist/components/TextField/TelField.d.ts +0 -17
- package/dist/components/TextField/TelField.js +0 -38
- package/dist/components/TextField/TextareaField.d.ts +0 -15
- package/dist/components/TextField/TextareaField.js +0 -33
- package/dist/esm/components/Accordion/hooks.js +0 -16
- package/dist/esm/components/Heading/Heading.js +0 -74
- package/dist/esm/components/Heading/index.js +0 -1
- package/dist/esm/components/HorizontalCarousel/HorizontalCarousel.js +0 -62
- package/dist/esm/components/HorizontalCarousel/NavigationDots.js +0 -61
- package/dist/esm/components/HorizontalCarousel/index.js +0 -1
- package/dist/esm/components/Input/CurrencyInput.js +0 -34
- package/dist/esm/components/Input/EmailInput.js +0 -16
- package/dist/esm/components/Input/NumberInput.js +0 -16
- package/dist/esm/components/Input/PasswordInput.js +0 -32
- package/dist/esm/components/Input/PasswordInput.styled.js +0 -11
- package/dist/esm/components/Input/PasswordVisibilityToggle.js +0 -34
- package/dist/esm/components/Input/PhoneInput.js +0 -16
- package/dist/esm/components/Input/TelInput.js +0 -15
- package/dist/esm/components/Input/TextInput.js +0 -16
- package/dist/esm/components/Input/TextareaInput.js +0 -41
- package/dist/esm/components/Input/index.js +0 -7
- package/dist/esm/components/SegmentedControls/constants.js +0 -1
- package/dist/esm/components/SkeletonLoading/Skeleton.js +0 -7
- package/dist/esm/components/SkeletonLoading/SkeletonAnimation.js +0 -42
- package/dist/esm/components/SkeletonLoading/SkeletonCTA.js +0 -35
- package/dist/esm/components/SkeletonLoading/SkeletonCircle.js +0 -39
- package/dist/esm/components/SkeletonLoading/SkeletonHeading.js +0 -35
- package/dist/esm/components/SkeletonLoading/SkeletonText.js +0 -41
- package/dist/esm/components/SkeletonLoading/index.js +0 -5
- package/dist/esm/components/SummaryList/SummaryList.js +0 -43
- package/dist/esm/components/SummaryList/index.js +0 -1
- package/dist/esm/components/Text/Text.js +0 -66
- package/dist/esm/components/Text/index.js +0 -1
- package/dist/esm/components/TextField/CurrencyField.js +0 -30
- package/dist/esm/components/TextField/EmailField.js +0 -30
- package/dist/esm/components/TextField/NumberField.js +0 -30
- package/dist/esm/components/TextField/PasswordField.js +0 -30
- package/dist/esm/components/TextField/PhoneField.js +0 -30
- package/dist/esm/components/TextField/TelField.js +0 -35
- package/dist/esm/components/TextField/TextareaField.js +0 -30
- package/dist/esm/providers/icons/HidePassword.js +0 -15
- package/dist/esm/providers/icons/Payment.js +0 -15
- package/dist/esm/providers/icons/ShowPassword.js +0 -15
- package/dist/esm/providers/icons/Usage.js +0 -15
- package/dist/esm/theme/create-theme.js +0 -330
- package/dist/esm/theme/theme.js +0 -1
- package/dist/providers/icons/HidePassword.d.ts +0 -2
- package/dist/providers/icons/HidePassword.js +0 -22
- package/dist/providers/icons/Payment.d.ts +0 -2
- package/dist/providers/icons/Payment.js +0 -22
- package/dist/providers/icons/ShowPassword.d.ts +0 -2
- package/dist/providers/icons/ShowPassword.js +0 -22
- package/dist/providers/icons/Usage.d.ts +0 -2
- package/dist/providers/icons/Usage.js +0 -22
- package/dist/theme/create-theme.d.ts +0 -34
- package/dist/theme/create-theme.js +0 -337
- package/dist/theme/theme.d.ts +0 -235
- package/dist/theme/theme.js +0 -2
|
@@ -53,6 +53,6 @@ var ActionWrapper = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
53
53
|
var Action = (0, react_1.forwardRef)(function (_a, ref) {
|
|
54
54
|
var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, children = _a.children, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, onPress = _a.onPress, testID = _a.testID, iconLeft = _a.iconLeft, iconRight = _a.iconRight, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["accessibilityRole", "children", "fullWidth", "inverted", "inline", "onPress", "testID", "iconLeft", "iconRight", "standalone"]);
|
|
55
55
|
var smallAndUp = (0, hooks_1.useBreakpoint)().smallAndUp;
|
|
56
|
-
return ((0, jsx_runtime_1.jsxs)(ActionWrapper, __assign({ ref: ref,
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)(ActionWrapper, __assign({ ref: ref, accessibilityRole: accessibilityRole, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID, standalone: standalone }, rest, { children: [iconLeft ? ((0, jsx_runtime_1.jsx)(styled_1.StyledLeftIcon, { inverted: inverted, name: iconLeft, size: 16 })) : null, typeof children === 'string' ? ((0, jsx_runtime_1.jsx)(styled_1.StyledActionText, { smallAndUp: smallAndUp, inverted: inverted, inList: rest === null || rest === void 0 ? void 0 : rest.inList, children: children })) : ((0, jsx_runtime_1.jsx)(styled_1.StyledActionNodeWrapper, { children: children })), iconRight ? ((0, jsx_runtime_1.jsx)(styled_1.StyledRightIcon, { inverted: inverted, name: iconRight, size: 16 })) : null] })));
|
|
57
57
|
});
|
|
58
58
|
exports.Action = Action;
|
|
@@ -46,7 +46,7 @@ var StyledStretch = styled_native_1.default.View(
|
|
|
46
46
|
// full width on small, default width on tablet or if fullWidth is false
|
|
47
47
|
function (_a) {
|
|
48
48
|
var smallAndUp = _a.smallAndUp, _b = _a.fullWidth, fullWidth = _b === void 0 ? true : _b, defaultWidth = _a.defaultWidth;
|
|
49
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n "], ["\n width: ", ";\n "])), !fullWidth || smallAndUp ? defaultWidth : '100%');
|
|
49
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n ", "\n "], ["\n width: ", ";\n ", "\n "])), !fullWidth || smallAndUp ? defaultWidth : '100%', defaultWidth && !fullWidth ? 'max-width: 100%;' : '');
|
|
50
50
|
});
|
|
51
51
|
var Stretch = function (props) {
|
|
52
52
|
var smallAndUp = (0, hooks_1.useBreakpoint)().smallAndUp;
|
|
@@ -49,6 +49,6 @@ var ActionWrapper = forwardRef(function (_a, ref) {
|
|
|
49
49
|
var Action = forwardRef(function (_a, ref) {
|
|
50
50
|
var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, children = _a.children, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, onPress = _a.onPress, testID = _a.testID, iconLeft = _a.iconLeft, iconRight = _a.iconRight, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["accessibilityRole", "children", "fullWidth", "inverted", "inline", "onPress", "testID", "iconLeft", "iconRight", "standalone"]);
|
|
51
51
|
var smallAndUp = useBreakpoint().smallAndUp;
|
|
52
|
-
return (_jsxs(ActionWrapper, __assign({ ref: ref,
|
|
52
|
+
return (_jsxs(ActionWrapper, __assign({ ref: ref, accessibilityRole: accessibilityRole, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID, standalone: standalone }, rest, { children: [iconLeft ? (_jsx(StyledLeftIcon, { inverted: inverted, name: iconLeft, size: 16 })) : null, typeof children === 'string' ? (_jsx(StyledActionText, { smallAndUp: smallAndUp, inverted: inverted, inList: rest === null || rest === void 0 ? void 0 : rest.inList, children: children })) : (_jsx(StyledActionNodeWrapper, { children: children })), iconRight ? (_jsx(StyledRightIcon, { inverted: inverted, name: iconRight, size: 16 })) : null] })));
|
|
53
53
|
});
|
|
54
54
|
export { ActionList, Action };
|
|
@@ -20,7 +20,7 @@ var StyledStretch = styled.View(
|
|
|
20
20
|
// full width on small, default width on tablet or if fullWidth is false
|
|
21
21
|
function (_a) {
|
|
22
22
|
var smallAndUp = _a.smallAndUp, _b = _a.fullWidth, fullWidth = _b === void 0 ? true : _b, defaultWidth = _a.defaultWidth;
|
|
23
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n "], ["\n width: ", ";\n "])), !fullWidth || smallAndUp ? defaultWidth : '100%');
|
|
23
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n ", "\n "], ["\n width: ", ";\n ", "\n "])), !fullWidth || smallAndUp ? defaultWidth : '100%', defaultWidth && !fullWidth ? 'max-width: 100%;' : '');
|
|
24
24
|
});
|
|
25
25
|
export var Stretch = function (props) {
|
|
26
26
|
var smallAndUp = useBreakpoint().smallAndUp;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ovotech/element-native",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.3-canary-a2e1e61-317",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@backpackapp-io/react-native-toast": "^0.10.0",
|
|
17
|
+
"@ovotech/element-core": "3.2.0-canary-a2e1e61-317",
|
|
17
18
|
"deepmerge": "^4.2.2",
|
|
18
19
|
"lodash.groupby": "^4.6.0",
|
|
19
|
-
"react-native-reanimated-carousel": "^3.5.1"
|
|
20
|
-
"@ovotech/element-core": "3.2.0"
|
|
20
|
+
"react-native-reanimated-carousel": "^3.5.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/core": "^7.11.5",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useLayout = void 0;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
var useLayout = function (defaultHeight) {
|
|
6
|
-
var _a = (0, react_1.useState)({ height: defaultHeight || 0, width: 0, measured: false }), layout = _a[0], setLayout = _a[1];
|
|
7
|
-
var onLayout = (0, react_1.useCallback)(function (e) {
|
|
8
|
-
var _a = e.nativeEvent.layout, height = _a.height, width = _a.width;
|
|
9
|
-
if (height === layout.height && width === layout.width) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
setLayout({
|
|
13
|
-
height: height,
|
|
14
|
-
width: width,
|
|
15
|
-
measured: true,
|
|
16
|
-
});
|
|
17
|
-
}, [layout.height, layout.width]);
|
|
18
|
-
return [layout, onLayout];
|
|
19
|
-
};
|
|
20
|
-
exports.useLayout = useLayout;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { TextProps } from 'react-native';
|
|
3
|
-
export declare const Heading1: ({
|
|
4
|
-
accessibilityRole,
|
|
5
|
-
...rest
|
|
6
|
-
}: PropsWithChildren<TextProps>) => JSX.Element;
|
|
7
|
-
export declare const Heading2: ({
|
|
8
|
-
accessibilityRole,
|
|
9
|
-
...rest
|
|
10
|
-
}: PropsWithChildren<TextProps>) => JSX.Element;
|
|
11
|
-
export declare const Heading3: ({
|
|
12
|
-
accessibilityRole,
|
|
13
|
-
...rest
|
|
14
|
-
}: PropsWithChildren<TextProps>) => JSX.Element;
|
|
15
|
-
export declare const Heading4: ({
|
|
16
|
-
accessibilityRole,
|
|
17
|
-
...rest
|
|
18
|
-
}: PropsWithChildren<TextProps>) => JSX.Element;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
41
|
-
var t = {};
|
|
42
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
43
|
-
t[p] = s[p];
|
|
44
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
45
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
46
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
47
|
-
t[p[i]] = s[p[i]];
|
|
48
|
-
}
|
|
49
|
-
return t;
|
|
50
|
-
};
|
|
51
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
-
exports.Heading4 = exports.Heading3 = exports.Heading2 = exports.Heading1 = void 0;
|
|
53
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
54
|
-
var hooks_1 = require("../../hooks");
|
|
55
|
-
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
56
|
-
var utils_1 = require("../../utils");
|
|
57
|
-
var calculateLetterSpacing = function (fontSize, letterSpacing) {
|
|
58
|
-
return (0, utils_1.numToPx)((0, utils_1.pxToNumber)(fontSize) * letterSpacing);
|
|
59
|
-
};
|
|
60
|
-
var StyledHeading1 = styled_native_1.default.Text(function (_a) {
|
|
61
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
62
|
-
var fontSize = core.fontSize.heading1[smallAndUp ? 'large' : 'small'];
|
|
63
|
-
return (0, styled_native_1.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);
|
|
64
|
-
});
|
|
65
|
-
var Heading1 = function (_a) {
|
|
66
|
-
var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
|
|
67
|
-
var breakpoints = (0, hooks_1.useBreakpoint)();
|
|
68
|
-
return ((0, jsx_runtime_1.jsx)(StyledHeading1, __assign({ accessibilityRole: accessibilityRole }, breakpoints, rest)));
|
|
69
|
-
};
|
|
70
|
-
exports.Heading1 = Heading1;
|
|
71
|
-
var StyledHeading2 = styled_native_1.default.Text(function (_a) {
|
|
72
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
73
|
-
var fontSize = core.fontSize.heading2[smallAndUp ? 'large' : 'small'];
|
|
74
|
-
return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __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);
|
|
75
|
-
});
|
|
76
|
-
var Heading2 = function (_a) {
|
|
77
|
-
var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
|
|
78
|
-
var breakpoints = (0, hooks_1.useBreakpoint)();
|
|
79
|
-
return ((0, jsx_runtime_1.jsx)(StyledHeading2, __assign({ accessibilityRole: accessibilityRole }, breakpoints, rest)));
|
|
80
|
-
};
|
|
81
|
-
exports.Heading2 = Heading2;
|
|
82
|
-
var StyledHeading3 = styled_native_1.default.Text(function (_a) {
|
|
83
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
84
|
-
var fontSize = core.fontSize.heading3[smallAndUp ? 'large' : 'small'];
|
|
85
|
-
return (0, styled_native_1.css)(templateObject_3 || (templateObject_3 = __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);
|
|
86
|
-
});
|
|
87
|
-
var Heading3 = function (_a) {
|
|
88
|
-
var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
|
|
89
|
-
var breakpoints = (0, hooks_1.useBreakpoint)();
|
|
90
|
-
return ((0, jsx_runtime_1.jsx)(StyledHeading3, __assign({ accessibilityRole: accessibilityRole }, breakpoints, rest)));
|
|
91
|
-
};
|
|
92
|
-
exports.Heading3 = Heading3;
|
|
93
|
-
var StyledHeading4 = styled_native_1.default.Text(function (_a) {
|
|
94
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
95
|
-
var fontSize = core.fontSize.heading4[smallAndUp ? 'large' : 'small'];
|
|
96
|
-
return (0, styled_native_1.css)(templateObject_4 || (templateObject_4 = __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);
|
|
97
|
-
});
|
|
98
|
-
var Heading4 = function (_a) {
|
|
99
|
-
var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'header' : _b, rest = __rest(_a, ["accessibilityRole"]);
|
|
100
|
-
var breakpoints = (0, hooks_1.useBreakpoint)();
|
|
101
|
-
return ((0, jsx_runtime_1.jsx)(StyledHeading4, __assign({ accessibilityRole: accessibilityRole }, breakpoints, rest)));
|
|
102
|
-
};
|
|
103
|
-
exports.Heading4 = Heading4;
|
|
104
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Heading1, Heading2, Heading3, Heading4 } from './Heading';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Heading4 = exports.Heading3 = exports.Heading2 = exports.Heading1 = void 0;
|
|
4
|
-
var Heading_1 = require("./Heading");
|
|
5
|
-
Object.defineProperty(exports, "Heading1", { enumerable: true, get: function () { return Heading_1.Heading1; } });
|
|
6
|
-
Object.defineProperty(exports, "Heading2", { enumerable: true, get: function () { return Heading_1.Heading2; } });
|
|
7
|
-
Object.defineProperty(exports, "Heading3", { enumerable: true, get: function () { return Heading_1.Heading3; } });
|
|
8
|
-
Object.defineProperty(exports, "Heading4", { enumerable: true, get: function () { return Heading_1.Heading4; } });
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface HorizontalCarouselProps<T> {
|
|
2
|
-
data: T[];
|
|
3
|
-
children: (item: T) => JSX.Element;
|
|
4
|
-
width?: number;
|
|
5
|
-
height: number;
|
|
6
|
-
fullWidth?: boolean;
|
|
7
|
-
showArrows?: boolean;
|
|
8
|
-
showDots?: boolean;
|
|
9
|
-
loop?: boolean;
|
|
10
|
-
arrowsDistanceFromTop?: number;
|
|
11
|
-
}
|
|
12
|
-
export declare function HorizontalCarousel<T>({
|
|
13
|
-
data,
|
|
14
|
-
children,
|
|
15
|
-
width,
|
|
16
|
-
height,
|
|
17
|
-
fullWidth,
|
|
18
|
-
showArrows,
|
|
19
|
-
showDots,
|
|
20
|
-
loop,
|
|
21
|
-
arrowsDistanceFromTop,
|
|
22
|
-
}: HorizontalCarouselProps<T>): JSX.Element;
|
|
23
|
-
export {};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
-
};
|
|
43
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
exports.HorizontalCarousel = void 0;
|
|
45
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
46
|
-
var react_1 = require("react");
|
|
47
|
-
var react_native_1 = require("react-native");
|
|
48
|
-
var react_native_reanimated_1 = require("react-native-reanimated");
|
|
49
|
-
var react_native_reanimated_carousel_1 = __importDefault(require("react-native-reanimated-carousel"));
|
|
50
|
-
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
51
|
-
var Icon_1 = require("../Icon");
|
|
52
|
-
var NavigationDots_1 = require("./NavigationDots");
|
|
53
|
-
function HorizontalCarousel(_a) {
|
|
54
|
-
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;
|
|
55
|
-
var theme = (0, styled_native_1.useTheme)();
|
|
56
|
-
var carouselRef = (0, react_1.useRef)(null);
|
|
57
|
-
var progressValue = (0, react_native_reanimated_1.useSharedValue)(0);
|
|
58
|
-
var windowWidth = (0, react_native_1.useWindowDimensions)().width;
|
|
59
|
-
var carouselWidth = fullWidth ? windowWidth : width || windowWidth;
|
|
60
|
-
return ((0, jsx_runtime_1.jsxs)(SCarouselContainer, { children: [(0, jsx_runtime_1.jsx)(react_native_reanimated_carousel_1.default, { ref: carouselRef, data: data, renderItem: function (_a) {
|
|
61
|
-
var item = _a.item;
|
|
62
|
-
return ((0, jsx_runtime_1.jsx)(SItemContainer, __assign({ "$itemWidth": carouselWidth }, { children: children(item) })));
|
|
63
|
-
}, vertical: false, width: carouselWidth, height: height, onProgressChange: function (_, absoluteProgress) {
|
|
64
|
-
return (progressValue.value = absoluteProgress);
|
|
65
|
-
}, panGestureHandlerProps: {
|
|
66
|
-
activeOffsetX: [-20, 20],
|
|
67
|
-
}, loop: loop, testID: "carousel" }), showArrows && data.length > 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SActionPressable, __assign({ onPress: function () { var _a; return (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.prev(); }, "$top": arrowsDistanceFromTop, hitSlop: {
|
|
68
|
-
top: 32,
|
|
69
|
-
bottom: 32,
|
|
70
|
-
left: 16,
|
|
71
|
-
right: 16,
|
|
72
|
-
} }, { children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "arrow-left", size: 16, color: theme.core.color.brand.white }) })), (0, jsx_runtime_1.jsx)(SActionPressable, __assign({ "$next": true, onPress: function () { var _a; return (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.next(); }, "$top": arrowsDistanceFromTop, hitSlop: {
|
|
73
|
-
top: 32,
|
|
74
|
-
bottom: 32,
|
|
75
|
-
left: 16,
|
|
76
|
-
right: 16,
|
|
77
|
-
} }, { children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "arrow-right", size: 16, color: theme.core.color.brand.white }) }))] })), showDots && data.length > 1 && ((0, jsx_runtime_1.jsx)(NavigationDots_1.NavigationDots, { data: data, animatedValue: progressValue }))] }));
|
|
78
|
-
}
|
|
79
|
-
exports.HorizontalCarousel = HorizontalCarousel;
|
|
80
|
-
var SCarouselContainer = styled_native_1.default.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n"], ["\n align-items: center;\n"])));
|
|
81
|
-
var SItemContainer = styled_native_1.default.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) {
|
|
82
|
-
var $itemWidth = _a.$itemWidth;
|
|
83
|
-
return $itemWidth;
|
|
84
|
-
});
|
|
85
|
-
var SActionPressable = styled_native_1.default.Pressable(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: ", ";\n ", ";\n"], ["\n position: absolute;\n top: ", ";\n ", ";\n"])), function (_a) {
|
|
86
|
-
var $top = _a.$top;
|
|
87
|
-
return ($top ? "".concat($top, "px") : '50%');
|
|
88
|
-
}, function (_a) {
|
|
89
|
-
var theme = _a.theme, $next = _a.$next;
|
|
90
|
-
return $next ? "right: ".concat(theme.core.space[6]) : "left: ".concat(theme.core.space[6]);
|
|
91
|
-
});
|
|
92
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.NavigationDots = void 0;
|
|
42
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
43
|
-
var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
44
|
-
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
45
|
-
function NavigationDots(_a) {
|
|
46
|
-
var data = _a.data, animatedValue = _a.animatedValue;
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(SDotsContainer, { children: data.map(function (_, index) { return ((0, jsx_runtime_1.jsx)(Dot, { index: index, length: data.length, animatedValue: animatedValue }, index)); }) }));
|
|
48
|
-
}
|
|
49
|
-
exports.NavigationDots = NavigationDots;
|
|
50
|
-
var Dot = function (_a) {
|
|
51
|
-
var animatedValue = _a.animatedValue, index = _a.index, length = _a.length, _b = _a.width, width = _b === void 0 ? 10 : _b;
|
|
52
|
-
var theme = (0, styled_native_1.useTheme)();
|
|
53
|
-
var animatedStyle = (0, react_native_reanimated_1.useAnimatedStyle)(function () {
|
|
54
|
-
var inputRange = [index - 1, index, index + 1];
|
|
55
|
-
var outputRange = [-width, 0, width];
|
|
56
|
-
if (index === 0 && (animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value) > length - 1) {
|
|
57
|
-
inputRange = [length - 1, length, length + 1];
|
|
58
|
-
outputRange = [-width, 0, width];
|
|
59
|
-
}
|
|
60
|
-
var backgroundColor = (0, react_native_reanimated_1.interpolateColor)(animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value, inputRange, [
|
|
61
|
-
theme.core.color.brand.forest,
|
|
62
|
-
theme.core.color.brand.energised,
|
|
63
|
-
theme.core.color.brand.forest,
|
|
64
|
-
]);
|
|
65
|
-
return {
|
|
66
|
-
transform: [
|
|
67
|
-
{
|
|
68
|
-
translateX: (0, react_native_reanimated_1.interpolate)(animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value, inputRange, outputRange, react_native_reanimated_1.Extrapolate.CLAMP),
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
backgroundColor: backgroundColor,
|
|
72
|
-
};
|
|
73
|
-
}, [animatedValue, index, length]);
|
|
74
|
-
return ((0, jsx_runtime_1.jsx)(SDot, __assign({ "$width": width }, { children: (0, jsx_runtime_1.jsx)(SAnimatedDot, { style: animatedStyle }) })));
|
|
75
|
-
};
|
|
76
|
-
var SDotsContainer = styled_native_1.default.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"])));
|
|
77
|
-
var SDot = styled_native_1.default.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) {
|
|
78
|
-
var theme = _a.theme;
|
|
79
|
-
return theme.core.color.brand.forest;
|
|
80
|
-
}, function (_a) {
|
|
81
|
-
var $width = _a.$width;
|
|
82
|
-
return $width;
|
|
83
|
-
}, function (_a) {
|
|
84
|
-
var $width = _a.$width;
|
|
85
|
-
return $width;
|
|
86
|
-
});
|
|
87
|
-
var SAnimatedDot = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 20px;\n flex: 1;\n"], ["\n border-radius: 20px;\n flex: 1;\n"])));
|
|
88
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './HorizontalCarousel';
|
|
@@ -1,17 +0,0 @@
|
|
|
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("./HorizontalCarousel"), exports);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TextInput } from 'react-native';
|
|
3
|
-
import { InputProps } from './Input';
|
|
4
|
-
export declare type CurrencyInputProps = InputProps & {
|
|
5
|
-
currency?: 'GBP' | 'EUR' | 'AUD' | 'USD';
|
|
6
|
-
};
|
|
7
|
-
declare const CurrencyInput: import('react').ForwardRefExoticComponent<
|
|
8
|
-
import('react-native/types').TextInputProps & {
|
|
9
|
-
invalid?: boolean | undefined;
|
|
10
|
-
stretch?: boolean | undefined;
|
|
11
|
-
iconLeft?: string | undefined;
|
|
12
|
-
iconRight?: string | undefined;
|
|
13
|
-
rightSlot?: import('react').ReactNode;
|
|
14
|
-
} & {
|
|
15
|
-
currency?: 'GBP' | 'EUR' | 'AUD' | 'USD' | undefined;
|
|
16
|
-
} & import('react').RefAttributes<TextInput>
|
|
17
|
-
>;
|
|
18
|
-
export { CurrencyInput };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.CurrencyInput = void 0;
|
|
26
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
-
var react_1 = require("react");
|
|
28
|
-
var utils_1 = require("../../utils");
|
|
29
|
-
var NumberInput_1 = require("./NumberInput");
|
|
30
|
-
var CurrencyInput = (0, react_1.forwardRef)(function (_a, ref) {
|
|
31
|
-
var _b = _a.currency, currency = _b === void 0 ? 'GBP' : _b, invalid = _a.invalid, _c = _a.accessibilityLabel, accessibilityLabel = _c === void 0 ? '' : _c, rest = __rest(_a, ["currency", "invalid", "accessibilityLabel"]);
|
|
32
|
-
var inputRef = (0, react_1.createRef)();
|
|
33
|
-
var updatedAccessibilityLabel = "".concat(accessibilityLabel, " ").concat(currency === 'GBP' ? 'pounds' : currency === 'EUR' ? 'euro' : 'dollar').trim();
|
|
34
|
-
var iconName = currency === 'GBP' ? 'pound' : currency === 'EUR' ? 'euro' : 'dollar';
|
|
35
|
-
return ((0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, __assign({}, rest, { invalid: invalid, accessibilityLabel: updatedAccessibilityLabel, ref: (0, utils_1.mergeRefs)(ref, inputRef), iconLeft: iconName })));
|
|
36
|
-
});
|
|
37
|
-
exports.CurrencyInput = CurrencyInput;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TextInput } from 'react-native';
|
|
3
|
-
declare const EmailInput: import('react').ForwardRefExoticComponent<
|
|
4
|
-
import('react-native/types').TextInputProps & {
|
|
5
|
-
invalid?: boolean | undefined;
|
|
6
|
-
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?: string | undefined;
|
|
8
|
-
iconRight?: string | undefined;
|
|
9
|
-
rightSlot?: import('react').ReactNode;
|
|
10
|
-
} & import('react').RefAttributes<TextInput>
|
|
11
|
-
>;
|
|
12
|
-
export { EmailInput };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.EmailInput = void 0;
|
|
15
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var react_1 = require("react");
|
|
17
|
-
var Input_1 = require("./Input");
|
|
18
|
-
var EmailInput = (0, react_1.forwardRef)(function (props, ref) { return ((0, jsx_runtime_1.jsx)(Input_1.Input, __assign({}, props, { keyboardType: "email-address", autoCapitalize: "none", autoCorrect: false, ref: ref }))); });
|
|
19
|
-
exports.EmailInput = EmailInput;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TextInput as RNTextInput } from 'react-native';
|
|
3
|
-
declare const NumberInput: import('react').ForwardRefExoticComponent<
|
|
4
|
-
import('react-native/types').TextInputProps & {
|
|
5
|
-
invalid?: boolean | undefined;
|
|
6
|
-
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?: string | undefined;
|
|
8
|
-
iconRight?: string | undefined;
|
|
9
|
-
rightSlot?: import('react').ReactNode;
|
|
10
|
-
} & import('react').RefAttributes<RNTextInput>
|
|
11
|
-
>;
|
|
12
|
-
export { NumberInput };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.NumberInput = void 0;
|
|
15
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var react_1 = require("react");
|
|
17
|
-
var Input_1 = require("./Input");
|
|
18
|
-
var NumberInput = (0, react_1.forwardRef)(function (props, ref) { return ((0, jsx_runtime_1.jsx)(Input_1.Input, __assign({}, props, { keyboardType: "numeric", autoCapitalize: "none", autoCorrect: false, ref: ref }))); });
|
|
19
|
-
exports.NumberInput = NumberInput;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TextInput as RNTextInput } from 'react-native';
|
|
3
|
-
declare const PasswordInput: import('react').ForwardRefExoticComponent<
|
|
4
|
-
import('react-native/types').TextInputProps & {
|
|
5
|
-
invalid?: boolean | undefined;
|
|
6
|
-
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?: string | undefined;
|
|
8
|
-
iconRight?: string | undefined;
|
|
9
|
-
rightSlot?: import('react').ReactNode;
|
|
10
|
-
} & {
|
|
11
|
-
hasVisibilityToggle?: boolean | undefined;
|
|
12
|
-
} & import('react').RefAttributes<RNTextInput>
|
|
13
|
-
>;
|
|
14
|
-
export { PasswordInput };
|