@ovotech/element-native 4.2.0 → 4.3.0-canary-3908de8-301
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/ActionCard/ActionCard.js +23 -3
- package/dist/components/ActionList/ActionList.d.ts +2 -1
- package/dist/components/ActionList/ActionList.js +4 -4
- package/dist/components/ActionList/styled.d.ts +1 -0
- package/dist/components/ActionList/styled.js +2 -2
- package/dist/components/CurrencyField/CurrencyField.d.ts +2 -2
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +2 -2
- package/dist/components/EmailField/EmailField.d.ts +2 -2
- package/dist/components/EmailInput/EmailInput.d.ts +2 -2
- package/dist/components/FilterSelect/FilterSelect.js +1 -1
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/NavHeader/IconButton.d.ts +2 -0
- package/dist/components/NavHeader/IconButton.js +1 -1
- package/dist/components/NumberField/NumberField.d.ts +2 -2
- package/dist/components/NumberInput/NumberInput.d.ts +2 -2
- package/dist/components/PasswordField/PasswordField.d.ts +2 -2
- package/dist/components/PasswordInput/PasswordInput.d.ts +2 -2
- package/dist/components/PhoneField/PhoneField.d.ts +2 -2
- package/dist/components/PhoneInput/PhoneInput.d.ts +2 -2
- package/dist/components/SelectField/Select.js +1 -1
- package/dist/components/Strong/Strong.d.ts +3 -1
- package/dist/components/Strong/Strong.js +2 -2
- package/dist/components/TextField/TextField.d.ts +2 -2
- package/dist/components/TextInput/TextInput.d.ts +2 -2
- package/dist/components/TextareaField/TextareaField.d.ts +2 -2
- package/dist/components/TextareaInput/TextareaInput.d.ts +2 -2
- package/dist/esm/components/ActionCard/ActionCard.js +23 -3
- package/dist/esm/components/ActionList/ActionList.js +4 -4
- package/dist/esm/components/ActionList/styled.js +2 -2
- package/dist/esm/components/FilterSelect/FilterSelect.js +1 -1
- package/dist/esm/components/NavHeader/IconButton.js +1 -1
- package/dist/esm/components/SelectField/Select.js +1 -1
- package/dist/esm/components/Strong/Strong.js +2 -2
- package/dist/esm/providers/IconsProvider.js +2 -2
- package/dist/esm/providers/icons/Circle.js +2 -2
- package/dist/esm/providers/icons/PricingFilled.js +14 -0
- package/dist/esm/providers/icons/index.js +16 -16
- package/dist/providers/IconsProvider.js +1 -1
- package/dist/providers/icons/Circle.js +25 -2
- package/dist/providers/icons/PricingFilled.d.ts +2 -0
- package/dist/providers/icons/PricingFilled.js +41 -0
- package/dist/providers/icons/index.d.ts +16 -16
- package/dist/providers/icons/index.js +16 -16
- package/dist/providers/types.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,4 +1,15 @@
|
|
|
1
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
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -36,7 +47,13 @@ var __1 = require("../");
|
|
|
36
47
|
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
37
48
|
var P_1 = require("../P");
|
|
38
49
|
var IndicatorIconShape_1 = require("./IndicatorIconShape");
|
|
39
|
-
var
|
|
50
|
+
var StyledPressableCard = styled_native_1.default.Pressable(function (_a) {
|
|
51
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
|
|
52
|
+
var paddingVal = inline ? core.space[4] : core.space[6];
|
|
53
|
+
var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
|
|
54
|
+
return "\n border-radius: ".concat(inline ? (0, element_core_1.numToPx)(core.space[6]) : 0, ";\n background-color: ").concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat((0, element_core_1.numToPx)(paddingVal), ";\n padding-bottom: ").concat((0, element_core_1.numToPx)(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal), ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
|
|
55
|
+
});
|
|
56
|
+
var StyledCard = styled_native_1.default.View(function (_a) {
|
|
40
57
|
var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
|
|
41
58
|
var paddingVal = inline ? core.space[4] : core.space[6];
|
|
42
59
|
var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
|
|
@@ -58,6 +75,9 @@ var ActionCard = function (_a) {
|
|
|
58
75
|
var cardAction = hasSingleAction
|
|
59
76
|
? onPressActionButton || onPressIndicator
|
|
60
77
|
: null;
|
|
78
|
+
var RootContainer = hasSingleAction
|
|
79
|
+
? StyledPressableCard
|
|
80
|
+
: StyledCard;
|
|
61
81
|
(0, react_1.useEffect)(function () {
|
|
62
82
|
if (onMount) {
|
|
63
83
|
onMount();
|
|
@@ -66,7 +86,7 @@ var ActionCard = function (_a) {
|
|
|
66
86
|
var Heading = inline ? __1.Heading3 : __1.Heading2;
|
|
67
87
|
var cardPadding = core.space[inline ? 4 : 6];
|
|
68
88
|
var negativeMarginAdjustment = -cardPadding;
|
|
69
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
89
|
+
return ((0, jsx_runtime_1.jsxs)(RootContainer, __assign({}, (cardAction ? { onPress: cardAction } : {}), { inline: inline, inverted: inverted, reducedBottomPadding: Boolean(buttonTitle && !ctaVariant), testID: "".concat(testID, "-card"), accessibilityRole: cardAction ? 'button' : 'none', children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flexDirection: 'row' }, children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: { flex: 1 }, children: (0, jsx_runtime_1.jsxs)(__1.Stack, { spaceBetween: 2, children: [(0, jsx_runtime_1.jsx)(Heading, { style: {
|
|
70
90
|
color: inverted
|
|
71
91
|
? semantic.inverted.message.link
|
|
72
92
|
: semantic.message.branded,
|
|
@@ -106,6 +126,6 @@ var ActionCard = function (_a) {
|
|
|
106
126
|
position: 'absolute',
|
|
107
127
|
right: core.space[2],
|
|
108
128
|
top: core.space[2],
|
|
109
|
-
}, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: (0, jsx_runtime_1.jsx)(CloseIconWrapper, { inverted: inverted, children: (0, jsx_runtime_1.jsx)(__1.Icon, { name: "cross", size: "16", color: semantic.message.base }) }) })) : null] }));
|
|
129
|
+
}, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: (0, jsx_runtime_1.jsx)(CloseIconWrapper, { inverted: inverted, children: (0, jsx_runtime_1.jsx)(__1.Icon, { name: "cross", size: "16", color: semantic.message.base }) }) })) : null] })));
|
|
110
130
|
};
|
|
111
131
|
exports.ActionCard = ActionCard;
|
|
@@ -14,7 +14,8 @@ type ActionProps = PropsWithChildren<ViewProps & {
|
|
|
14
14
|
ref?: Ref<View>;
|
|
15
15
|
testID?: string;
|
|
16
16
|
inList?: boolean;
|
|
17
|
+
standalone?: boolean;
|
|
17
18
|
}>;
|
|
18
19
|
declare const ActionList: ({ children, inverted, ...rest }: ActionListProps) => JSX.Element;
|
|
19
|
-
declare const Action: import("react").ForwardRefExoticComponent<Pick<ActionProps, "onPress" | "inverted" | "inline" | keyof ViewProps | "fullWidth" | "iconLeft" | "iconRight" | "inList"> & import("react").RefAttributes<View>>;
|
|
20
|
+
declare const Action: import("react").ForwardRefExoticComponent<Pick<ActionProps, "onPress" | "inverted" | "inline" | keyof ViewProps | "fullWidth" | "iconLeft" | "iconRight" | "standalone" | "inList"> & import("react").RefAttributes<View>>;
|
|
20
21
|
export { ActionList, Action };
|
|
@@ -47,12 +47,12 @@ var ActionList = function (_a) {
|
|
|
47
47
|
};
|
|
48
48
|
exports.ActionList = ActionList;
|
|
49
49
|
var ActionWrapper = (0, react_1.forwardRef)(function (_a, ref) {
|
|
50
|
-
var children = _a.children, accessibilityRole = _a.accessibilityRole, _b = _a.activeOpacity, activeOpacity = _b === void 0 ? 0.75 : _b, fullWidth = _a.fullWidth, _c = _a.hasBorder, hasBorder = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, inList = _a.inList, onPress = _a.onPress, testID = _a.testID, rest = __rest(_a, ["children", "accessibilityRole", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inline", "inList", "onPress", "testID"]);
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)(styled_1.StyledActionWrapper, __assign({ ref: ref, hasBorder: hasBorder, inverted: inverted, testID: testID }, rest, { children: (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { hitSlop: inline ? 14 : null, activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, onPress: onPress, children: (0, jsx_runtime_1.jsx)(styled_1.StyledActionInner, { fullWidth: fullWidth, inList: inList, inline: inline, children: children }) }) })));
|
|
50
|
+
var children = _a.children, accessibilityRole = _a.accessibilityRole, _b = _a.activeOpacity, activeOpacity = _b === void 0 ? 0.75 : _b, fullWidth = _a.fullWidth, _c = _a.hasBorder, hasBorder = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, inList = _a.inList, onPress = _a.onPress, testID = _a.testID, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["children", "accessibilityRole", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inline", "inList", "onPress", "testID", "standalone"]);
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(styled_1.StyledActionWrapper, __assign({ ref: ref, hasBorder: hasBorder, inverted: inverted, testID: testID }, rest, { children: (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { hitSlop: inline ? 14 : null, activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, onPress: onPress, children: (0, jsx_runtime_1.jsx)(styled_1.StyledActionInner, { fullWidth: fullWidth, inList: inList, inline: inline, standalone: standalone, children: children }) }) })));
|
|
52
52
|
});
|
|
53
53
|
var Action = (0, react_1.forwardRef)(function (_a, ref) {
|
|
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, rest = __rest(_a, ["accessibilityRole", "children", "fullWidth", "inverted", "inline", "onPress", "testID", "iconLeft", "iconRight"]);
|
|
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, accessible: true, accessibilityRole: accessibilityRole, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID }, 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] })));
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)(ActionWrapper, __assign({ ref: ref, accessible: true, 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;
|
|
@@ -1708,6 +1708,7 @@ export declare const StyledActionInner: import("styled-components").StyledCompon
|
|
|
1708
1708
|
}, {
|
|
1709
1709
|
fullWidth?: boolean | undefined;
|
|
1710
1710
|
inline?: boolean | undefined;
|
|
1711
|
+
standalone?: boolean | undefined;
|
|
1711
1712
|
}, never>;
|
|
1712
1713
|
export declare const StyledActionText: import("styled-components").StyledComponent<typeof import("react-native").Text, {
|
|
1713
1714
|
core: {
|
|
@@ -42,8 +42,8 @@ exports.StyledActionWrapper = styled_native_1.default.View(function (_a) {
|
|
|
42
42
|
return "\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ".concat(hasBorder ? (0, element_core_1.numToPx)(core.borderWidth.small) : 0, ";\n border-bottom-style: solid;\n border-bottom-color: ").concat(inverted ? semantic.inverted.border : semantic.border.graphic, ";\n");
|
|
43
43
|
});
|
|
44
44
|
exports.StyledActionInner = styled_native_1.default.View(function (_a) {
|
|
45
|
-
var fullWidth = _a.fullWidth, inline = _a.inline;
|
|
46
|
-
return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n ", ";\n "])), fullWidth ? 'space-between' : 'flex-start',
|
|
45
|
+
var fullWidth = _a.fullWidth, inline = _a.inline, standalone = _a.standalone;
|
|
46
|
+
return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "])), fullWidth ? 'space-between' : 'flex-start', inline || standalone ? '' : '44px');
|
|
47
47
|
});
|
|
48
48
|
exports.StyledActionText = styled_native_1.default.Text(function (_a) {
|
|
49
49
|
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.inList, inList = _d === void 0 ? false : _d;
|
|
@@ -4,8 +4,8 @@ import { FieldProps } from '../Field';
|
|
|
4
4
|
export declare const CurrencyField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
|
|
5
5
|
invalid?: boolean | undefined;
|
|
6
6
|
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?:
|
|
8
|
-
iconRight?:
|
|
7
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
8
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
9
9
|
rightSlot?: import("react").ReactNode;
|
|
10
10
|
} & {
|
|
11
11
|
currency?: "GBP" | "EUR" | "AUD" | "USD" | undefined;
|
|
@@ -7,8 +7,8 @@ export type CurrencyInputProps = InputProps & {
|
|
|
7
7
|
declare const CurrencyInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
|
|
8
8
|
invalid?: boolean | undefined;
|
|
9
9
|
stretch?: boolean | undefined;
|
|
10
|
-
iconLeft?:
|
|
11
|
-
iconRight?:
|
|
10
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
11
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
12
12
|
rightSlot?: import("react").ReactNode;
|
|
13
13
|
} & {
|
|
14
14
|
currency?: "GBP" | "EUR" | "AUD" | "USD" | undefined;
|
|
@@ -4,7 +4,7 @@ import { FieldProps } from '../Field';
|
|
|
4
4
|
export declare const EmailField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
|
|
5
5
|
invalid?: boolean | undefined;
|
|
6
6
|
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?:
|
|
8
|
-
iconRight?:
|
|
7
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
8
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
9
9
|
rightSlot?: import("react").ReactNode;
|
|
10
10
|
} & import("react").RefAttributes<NativeTextInput>>;
|
|
@@ -3,8 +3,8 @@ import { TextInput } from 'react-native';
|
|
|
3
3
|
declare const EmailInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
7
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & import("react").RefAttributes<TextInput>>;
|
|
10
10
|
export { EmailInput };
|
|
@@ -76,7 +76,7 @@ var FilterSelect = function (_a) {
|
|
|
76
76
|
right: react_native_1.Dimensions.get('window').width - (x + width),
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
|
-
}, children: [(0, jsx_runtime_1.jsx)(P_1.P, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: selected.value === 'default'
|
|
79
|
+
}, accessibilityRole: "combobox", children: [(0, jsx_runtime_1.jsx)(P_1.P, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: selected.value === 'default'
|
|
80
80
|
? ''
|
|
81
81
|
: (_b = selected.collapsedLabel) !== null && _b !== void 0 ? _b : selected.label }) }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "caret-arrow-down", size: 14, style: { marginLeft: 2 } })] }, String(isOpen)), rightText ? (0, jsx_runtime_1.jsxs)(P_1.P, { children: [" ", rightText] }) : null, (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(DropdownWrapper, { children: (0, jsx_runtime_1.jsx)(DropdownContainer, { style: {
|
|
82
82
|
top: measure === null || measure === void 0 ? void 0 : measure.top,
|
|
@@ -11,8 +11,8 @@ export type InputProps = TextInputProps & {
|
|
|
11
11
|
declare const Input: import("react").ForwardRefExoticComponent<TextInputProps & {
|
|
12
12
|
invalid?: boolean | undefined;
|
|
13
13
|
stretch?: boolean | undefined;
|
|
14
|
-
iconLeft?:
|
|
15
|
-
iconRight?:
|
|
14
|
+
iconLeft?: IconNameExtended | undefined;
|
|
15
|
+
iconRight?: IconNameExtended | undefined;
|
|
16
16
|
rightSlot?: ReactNode;
|
|
17
17
|
} & import("react").RefAttributes<TextInput>>;
|
|
18
18
|
export { Input };
|
|
@@ -3,6 +3,8 @@ import { IconNameExtended } from '../../providers';
|
|
|
3
3
|
export type RightActionConfig = {
|
|
4
4
|
iconName?: IconNameExtended;
|
|
5
5
|
onActionPress?: () => void;
|
|
6
|
+
accessibilityLabel?: string;
|
|
7
|
+
accessibilityHint?: string;
|
|
6
8
|
};
|
|
7
9
|
type IconButtonProps = {
|
|
8
10
|
size: 'small' | 'large';
|
|
@@ -13,7 +13,7 @@ var IconButton = function (_a) {
|
|
|
13
13
|
if (!rightActionConfig || !(rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.iconName)) {
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { hitSlop: theme.core.space[2], pressRetentionOffset: theme.core.space[2], onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, children: function (_a) {
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { hitSlop: theme.core.space[2], pressRetentionOffset: theme.core.space[2], onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, accessibilityRole: "button", accessibilityLabel: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.accessibilityLabel, accessibilityHint: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.accessibilityHint, children: function (_a) {
|
|
17
17
|
var pressed = _a.pressed;
|
|
18
18
|
return ((0, jsx_runtime_1.jsx)(ButtonStyled, { entering: animation, "$pressed": pressed, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: rightActionConfig.iconName, size: size === 'small' ? 16 : 18, color: theme.semantic.inverted.message.base }) }));
|
|
19
19
|
} }));
|
|
@@ -4,7 +4,7 @@ import { FieldProps } from '../Field';
|
|
|
4
4
|
export declare const NumberField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
|
|
5
5
|
invalid?: boolean | undefined;
|
|
6
6
|
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?:
|
|
8
|
-
iconRight?:
|
|
7
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
8
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
9
9
|
rightSlot?: import("react").ReactNode;
|
|
10
10
|
} & import("react").RefAttributes<NativeTextInput>>;
|
|
@@ -3,8 +3,8 @@ import { TextInput as RNTextInput } from 'react-native';
|
|
|
3
3
|
declare const NumberInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
7
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & import("react").RefAttributes<RNTextInput>>;
|
|
10
10
|
export { NumberInput };
|
|
@@ -4,8 +4,8 @@ import { FieldProps } from '../Field';
|
|
|
4
4
|
export declare const PasswordField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
|
|
5
5
|
invalid?: boolean | undefined;
|
|
6
6
|
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?:
|
|
8
|
-
iconRight?:
|
|
7
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
8
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
9
9
|
rightSlot?: import("react").ReactNode;
|
|
10
10
|
} & {
|
|
11
11
|
hasVisibilityToggle?: boolean | undefined;
|
|
@@ -3,8 +3,8 @@ import { TextInput as RNTextInput } from 'react-native';
|
|
|
3
3
|
declare const PasswordInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
7
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & {
|
|
10
10
|
hasVisibilityToggle?: boolean | undefined;
|
|
@@ -4,7 +4,7 @@ import { FieldProps } from '../Field';
|
|
|
4
4
|
export declare const PhoneField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
|
|
5
5
|
invalid?: boolean | undefined;
|
|
6
6
|
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?:
|
|
8
|
-
iconRight?:
|
|
7
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
8
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
9
9
|
rightSlot?: import("react").ReactNode;
|
|
10
10
|
} & import("react").RefAttributes<NativeTextInput>>;
|
|
@@ -3,7 +3,7 @@ import { TextInput } from 'react-native';
|
|
|
3
3
|
export declare const PhoneInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
7
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & import("react").RefAttributes<TextInput>>;
|
|
@@ -90,7 +90,7 @@ var Select = function (_a) {
|
|
|
90
90
|
label: "-- ".concat(noOptionMessage, " --"),
|
|
91
91
|
value: 'default',
|
|
92
92
|
};
|
|
93
|
-
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsxs)(SelectInput, { testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); }, children: [(0, jsx_runtime_1.jsx)(P_1.P, { style: { marginTop: 0, marginBottom: 0 }, children: selected.value === 'default' ? '' : selected.label }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "chevron-down", size: 16, style: { marginLeft: 'auto' } })] }), (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(DropdownWrapper, { children: (0, jsx_runtime_1.jsx)(DropdownContainer, { children: (0, jsx_runtime_1.jsxs)(react_native_1.ScrollView, { nestedScrollEnabled: true, children: [(0, jsx_runtime_1.jsxs)(SelectOption, { accessible: true, accessibilityRole: "radio", onPress: function () { return handleOptionPress(requiredOption); }, children: [(0, jsx_runtime_1.jsx)(StyledP, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: requiredOption.label }) }), (0, jsx_runtime_1.jsx)(Radio, { isChecked: selected.value === requiredOption.value, children: (0, jsx_runtime_1.jsx)(RadioDot, { isChecked: selected.value === requiredOption.value }) })] }), Object.keys(optionsByCategories).map(function (category) { return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [category !== 'undefined' ? ((0, jsx_runtime_1.jsx)(StyledCategory, { children: category })) : null, optionsByCategories[category].map(function (option, i) { return ((0, jsx_runtime_1.jsxs)(SelectOption, { accessible: true, accessibilityRole: "radio", isLastOption: i === optionsByCategories[category].length - 1, onPress: function () { return handleOptionPress(option); }, children: [(0, jsx_runtime_1.jsx)(StyledP, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: option.label }) }), (0, jsx_runtime_1.jsx)(Radio, { isChecked: selected.value === option.value, children: (0, jsx_runtime_1.jsx)(RadioDot, { isChecked: selected.value === option.value }) })] }, option.label)); })] }, category)); })] }) }) }) })] }));
|
|
93
|
+
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsxs)(SelectInput, { testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); }, children: [(0, jsx_runtime_1.jsx)(P_1.P, { style: { marginTop: 0, marginBottom: 0 }, children: selected.value === 'default' ? '' : selected.label }), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "chevron-down", size: 16, style: { marginLeft: 'auto' } })] }), (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(DropdownWrapper, { children: (0, jsx_runtime_1.jsx)(DropdownContainer, { children: (0, jsx_runtime_1.jsxs)(react_native_1.ScrollView, { nestedScrollEnabled: true, testID: "".concat(testID, "-OptionsScrollView"), children: [(0, jsx_runtime_1.jsxs)(SelectOption, { accessible: true, accessibilityRole: "radio", onPress: function () { return handleOptionPress(requiredOption); }, children: [(0, jsx_runtime_1.jsx)(StyledP, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: requiredOption.label }) }), (0, jsx_runtime_1.jsx)(Radio, { isChecked: selected.value === requiredOption.value, children: (0, jsx_runtime_1.jsx)(RadioDot, { isChecked: selected.value === requiredOption.value }) })] }), Object.keys(optionsByCategories).map(function (category) { return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [category !== 'undefined' ? ((0, jsx_runtime_1.jsx)(StyledCategory, { children: category })) : null, optionsByCategories[category].map(function (option, i) { return ((0, jsx_runtime_1.jsxs)(SelectOption, { accessible: true, accessibilityRole: "radio", isLastOption: i === optionsByCategories[category].length - 1, onPress: function () { return handleOptionPress(option); }, children: [(0, jsx_runtime_1.jsx)(StyledP, { children: (0, jsx_runtime_1.jsx)(Strong_1.Strong, { children: option.label }) }), (0, jsx_runtime_1.jsx)(Radio, { isChecked: selected.value === option.value, children: (0, jsx_runtime_1.jsx)(RadioDot, { isChecked: selected.value === option.value }) })] }, option.label)); })] }, category)); })] }) }) }) })] }));
|
|
94
94
|
};
|
|
95
95
|
exports.Select = Select;
|
|
96
96
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Strong = void 0;
|
|
7
7
|
var styled_native_1 = __importDefault(require("../../styled.native"));
|
|
8
8
|
exports.Strong = styled_native_1.default.Text(function (_a) {
|
|
9
|
-
var
|
|
10
|
-
return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n ");
|
|
9
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
10
|
+
return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n color: color ?? ").concat(semantic.message.base, "\n ");
|
|
11
11
|
});
|
|
@@ -4,7 +4,7 @@ import { FieldProps } from '../Field';
|
|
|
4
4
|
export declare const TextField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
|
|
5
5
|
invalid?: boolean | undefined;
|
|
6
6
|
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?:
|
|
8
|
-
iconRight?:
|
|
7
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
8
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
9
9
|
rightSlot?: import("react").ReactNode;
|
|
10
10
|
} & import("react").RefAttributes<NativeTextInput>>;
|
|
@@ -3,8 +3,8 @@ import { TextInput as RNTextInput } from 'react-native';
|
|
|
3
3
|
declare const TextInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
7
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & import("react").RefAttributes<RNTextInput>>;
|
|
10
10
|
export { TextInput };
|
|
@@ -4,8 +4,8 @@ import { FieldProps } from '../Field';
|
|
|
4
4
|
export declare const TextareaField: import("react").ForwardRefExoticComponent<Omit<FieldProps, "children"> & import("react-native").TextInputProps & {
|
|
5
5
|
invalid?: boolean | undefined;
|
|
6
6
|
stretch?: boolean | undefined;
|
|
7
|
-
iconLeft?:
|
|
8
|
-
iconRight?:
|
|
7
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
8
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
9
9
|
rightSlot?: import("react").ReactNode;
|
|
10
10
|
} & {
|
|
11
11
|
rows?: number | undefined;
|
|
@@ -7,8 +7,8 @@ type TextareaInputProps = InputProps & {
|
|
|
7
7
|
declare const TextareaInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
|
|
8
8
|
invalid?: boolean | undefined;
|
|
9
9
|
stretch?: boolean | undefined;
|
|
10
|
-
iconLeft?:
|
|
11
|
-
iconRight?:
|
|
10
|
+
iconLeft?: import("../../providers").IconNameExtended | undefined;
|
|
11
|
+
iconRight?: import("../../providers").IconNameExtended | undefined;
|
|
12
12
|
rightSlot?: import("react").ReactNode;
|
|
13
13
|
} & {
|
|
14
14
|
rows?: number | undefined;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
13
|
import { numToPx } from '@ovotech/element-core';
|
|
3
14
|
import MaskedView from '@react-native-masked-view/masked-view';
|
|
@@ -7,7 +18,13 @@ import { Action, CTAButton, Heading2, Heading3, Icon, Margin, Stack, } from '../
|
|
|
7
18
|
import styled, { ThemeContext } from '../../styled.native';
|
|
8
19
|
import { P } from '../P';
|
|
9
20
|
import { IndicatorIconShape } from './IndicatorIconShape';
|
|
10
|
-
var
|
|
21
|
+
var StyledPressableCard = styled.Pressable(function (_a) {
|
|
22
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
|
|
23
|
+
var paddingVal = inline ? core.space[4] : core.space[6];
|
|
24
|
+
var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
|
|
25
|
+
return "\n border-radius: ".concat(inline ? numToPx(core.space[6]) : 0, ";\n background-color: ").concat(inverted ? semantic.inverted.surface : semantic.surface.elevated, ";\n padding: ").concat(numToPx(paddingVal), ";\n padding-bottom: ").concat(numToPx(reducedBottomPadding ? reducedBottomPaddingVal : paddingVal), ";\n overflow: hidden;\n border-width: 0;\n width: 100%;\n ");
|
|
26
|
+
});
|
|
27
|
+
var StyledCard = styled.View(function (_a) {
|
|
11
28
|
var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline, inverted = _a.inverted, reducedBottomPadding = _a.reducedBottomPadding;
|
|
12
29
|
var paddingVal = inline ? core.space[4] : core.space[6];
|
|
13
30
|
var reducedBottomPaddingVal = inline ? core.space[3] : core.space[5];
|
|
@@ -29,6 +46,9 @@ export var ActionCard = function (_a) {
|
|
|
29
46
|
var cardAction = hasSingleAction
|
|
30
47
|
? onPressActionButton || onPressIndicator
|
|
31
48
|
: null;
|
|
49
|
+
var RootContainer = hasSingleAction
|
|
50
|
+
? StyledPressableCard
|
|
51
|
+
: StyledCard;
|
|
32
52
|
useEffect(function () {
|
|
33
53
|
if (onMount) {
|
|
34
54
|
onMount();
|
|
@@ -37,7 +57,7 @@ export var ActionCard = function (_a) {
|
|
|
37
57
|
var Heading = inline ? Heading3 : Heading2;
|
|
38
58
|
var cardPadding = core.space[inline ? 4 : 6];
|
|
39
59
|
var negativeMarginAdjustment = -cardPadding;
|
|
40
|
-
return (_jsxs(
|
|
60
|
+
return (_jsxs(RootContainer, __assign({}, (cardAction ? { onPress: cardAction } : {}), { inline: inline, inverted: inverted, reducedBottomPadding: Boolean(buttonTitle && !ctaVariant), testID: "".concat(testID, "-card"), accessibilityRole: cardAction ? 'button' : 'none', children: [_jsxs(View, { style: { flexDirection: 'row' }, children: [_jsx(View, { style: { flex: 1 }, children: _jsxs(Stack, { spaceBetween: 2, children: [_jsx(Heading, { style: {
|
|
41
61
|
color: inverted
|
|
42
62
|
? semantic.inverted.message.link
|
|
43
63
|
: semantic.message.branded,
|
|
@@ -77,5 +97,5 @@ export var ActionCard = function (_a) {
|
|
|
77
97
|
position: 'absolute',
|
|
78
98
|
right: core.space[2],
|
|
79
99
|
top: core.space[2],
|
|
80
|
-
}, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: _jsx(CloseIconWrapper, { inverted: inverted, children: _jsx(Icon, { name: "cross", size: "16", color: semantic.message.base }) }) })) : null] }));
|
|
100
|
+
}, onPress: onPressCloseButton, testID: "".concat(testID, "-close-button"), children: _jsx(CloseIconWrapper, { inverted: inverted, children: _jsx(Icon, { name: "cross", size: "16", color: semantic.message.base }) }) })) : null] })));
|
|
81
101
|
};
|
|
@@ -43,12 +43,12 @@ var ActionList = function (_a) {
|
|
|
43
43
|
}) })));
|
|
44
44
|
};
|
|
45
45
|
var ActionWrapper = forwardRef(function (_a, ref) {
|
|
46
|
-
var children = _a.children, accessibilityRole = _a.accessibilityRole, _b = _a.activeOpacity, activeOpacity = _b === void 0 ? 0.75 : _b, fullWidth = _a.fullWidth, _c = _a.hasBorder, hasBorder = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, inList = _a.inList, onPress = _a.onPress, testID = _a.testID, rest = __rest(_a, ["children", "accessibilityRole", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inline", "inList", "onPress", "testID"]);
|
|
47
|
-
return (_jsx(StyledActionWrapper, __assign({ ref: ref, hasBorder: hasBorder, inverted: inverted, testID: testID }, rest, { children: _jsx(TouchableOpacity, { hitSlop: inline ? 14 : null, activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, onPress: onPress, children: _jsx(StyledActionInner, { fullWidth: fullWidth, inList: inList, inline: inline, children: children }) }) })));
|
|
46
|
+
var children = _a.children, accessibilityRole = _a.accessibilityRole, _b = _a.activeOpacity, activeOpacity = _b === void 0 ? 0.75 : _b, fullWidth = _a.fullWidth, _c = _a.hasBorder, hasBorder = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, inList = _a.inList, onPress = _a.onPress, testID = _a.testID, _f = _a.standalone, standalone = _f === void 0 ? false : _f, rest = __rest(_a, ["children", "accessibilityRole", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inline", "inList", "onPress", "testID", "standalone"]);
|
|
47
|
+
return (_jsx(StyledActionWrapper, __assign({ ref: ref, hasBorder: hasBorder, inverted: inverted, testID: testID }, rest, { children: _jsx(TouchableOpacity, { hitSlop: inline ? 14 : null, activeOpacity: activeOpacity, accessible: true, accessibilityRole: accessibilityRole, onPress: onPress, children: _jsx(StyledActionInner, { fullWidth: fullWidth, inList: inList, inline: inline, standalone: standalone, children: children }) }) })));
|
|
48
48
|
});
|
|
49
49
|
var Action = forwardRef(function (_a, ref) {
|
|
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, rest = __rest(_a, ["accessibilityRole", "children", "fullWidth", "inverted", "inline", "onPress", "testID", "iconLeft", "iconRight"]);
|
|
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, accessible: true, accessibilityRole: accessibilityRole, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID }, 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] })));
|
|
52
|
+
return (_jsxs(ActionWrapper, __assign({ ref: ref, accessible: true, 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 };
|
|
@@ -16,8 +16,8 @@ export var StyledActionWrapper = styled.View(function (_a) {
|
|
|
16
16
|
return "\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ".concat(hasBorder ? numToPx(core.borderWidth.small) : 0, ";\n border-bottom-style: solid;\n border-bottom-color: ").concat(inverted ? semantic.inverted.border : semantic.border.graphic, ";\n");
|
|
17
17
|
});
|
|
18
18
|
export var StyledActionInner = styled.View(function (_a) {
|
|
19
|
-
var fullWidth = _a.fullWidth, inline = _a.inline;
|
|
20
|
-
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n ", ";\n "])), fullWidth ? 'space-between' : 'flex-start',
|
|
19
|
+
var fullWidth = _a.fullWidth, inline = _a.inline, standalone = _a.standalone;
|
|
20
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "])), fullWidth ? 'space-between' : 'flex-start', inline || standalone ? '' : '44px');
|
|
21
21
|
});
|
|
22
22
|
export var StyledActionText = styled.Text(function (_a) {
|
|
23
23
|
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.inList, inList = _d === void 0 ? false : _d;
|
|
@@ -50,7 +50,7 @@ export var FilterSelect = function (_a) {
|
|
|
50
50
|
right: Dimensions.get('window').width - (x + width),
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
|
-
}, children: [_jsx(P, { children: _jsx(Strong, { children: selected.value === 'default'
|
|
53
|
+
}, accessibilityRole: "combobox", children: [_jsx(P, { children: _jsx(Strong, { children: selected.value === 'default'
|
|
54
54
|
? ''
|
|
55
55
|
: (_b = selected.collapsedLabel) !== null && _b !== void 0 ? _b : selected.label }) }), _jsx(Icon, { name: "caret-arrow-down", size: 14, style: { marginLeft: 2 } })] }, String(isOpen)), rightText ? _jsxs(P, { children: [" ", rightText] }) : null, _jsx(Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: _jsx(DropdownWrapper, { children: _jsx(DropdownContainer, { style: {
|
|
56
56
|
top: measure === null || measure === void 0 ? void 0 : measure.top,
|
|
@@ -10,7 +10,7 @@ export var IconButton = function (_a) {
|
|
|
10
10
|
if (!rightActionConfig || !(rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.iconName)) {
|
|
11
11
|
return null;
|
|
12
12
|
}
|
|
13
|
-
return (_jsx(Pressable, { hitSlop: theme.core.space[2], pressRetentionOffset: theme.core.space[2], onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, children: function (_a) {
|
|
13
|
+
return (_jsx(Pressable, { hitSlop: theme.core.space[2], pressRetentionOffset: theme.core.space[2], onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, accessibilityRole: "button", accessibilityLabel: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.accessibilityLabel, accessibilityHint: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.accessibilityHint, children: function (_a) {
|
|
14
14
|
var pressed = _a.pressed;
|
|
15
15
|
return (_jsx(ButtonStyled, { entering: animation, "$pressed": pressed, children: _jsx(Icon, { name: rightActionConfig.iconName, size: size === 'small' ? 16 : 18, color: theme.semantic.inverted.message.base }) }));
|
|
16
16
|
} }));
|
|
@@ -61,6 +61,6 @@ export var Select = function (_a) {
|
|
|
61
61
|
label: "-- ".concat(noOptionMessage, " --"),
|
|
62
62
|
value: 'default',
|
|
63
63
|
};
|
|
64
|
-
return (_jsxs(View, { children: [_jsxs(SelectInput, { testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); }, children: [_jsx(P, { style: { marginTop: 0, marginBottom: 0 }, children: selected.value === 'default' ? '' : selected.label }), _jsx(Icon, { name: "chevron-down", size: 16, style: { marginLeft: 'auto' } })] }), _jsx(Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: _jsx(DropdownWrapper, { children: _jsx(DropdownContainer, { children: _jsxs(ScrollView, { nestedScrollEnabled: true, children: [_jsxs(SelectOption, { accessible: true, accessibilityRole: "radio", onPress: function () { return handleOptionPress(requiredOption); }, children: [_jsx(StyledP, { children: _jsx(Strong, { children: requiredOption.label }) }), _jsx(Radio, { isChecked: selected.value === requiredOption.value, children: _jsx(RadioDot, { isChecked: selected.value === requiredOption.value }) })] }), Object.keys(optionsByCategories).map(function (category) { return (_jsxs(Fragment, { children: [category !== 'undefined' ? (_jsx(StyledCategory, { children: category })) : null, optionsByCategories[category].map(function (option, i) { return (_jsxs(SelectOption, { accessible: true, accessibilityRole: "radio", isLastOption: i === optionsByCategories[category].length - 1, onPress: function () { return handleOptionPress(option); }, children: [_jsx(StyledP, { children: _jsx(Strong, { children: option.label }) }), _jsx(Radio, { isChecked: selected.value === option.value, children: _jsx(RadioDot, { isChecked: selected.value === option.value }) })] }, option.label)); })] }, category)); })] }) }) }) })] }));
|
|
64
|
+
return (_jsxs(View, { children: [_jsxs(SelectInput, { testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); }, children: [_jsx(P, { style: { marginTop: 0, marginBottom: 0 }, children: selected.value === 'default' ? '' : selected.label }), _jsx(Icon, { name: "chevron-down", size: 16, style: { marginLeft: 'auto' } })] }), _jsx(Modal, { transparent: true, visible: isOpen, animationType: "fade", onRequestClose: function () { return setOpen(false); }, children: _jsx(DropdownWrapper, { children: _jsx(DropdownContainer, { children: _jsxs(ScrollView, { nestedScrollEnabled: true, testID: "".concat(testID, "-OptionsScrollView"), children: [_jsxs(SelectOption, { accessible: true, accessibilityRole: "radio", onPress: function () { return handleOptionPress(requiredOption); }, children: [_jsx(StyledP, { children: _jsx(Strong, { children: requiredOption.label }) }), _jsx(Radio, { isChecked: selected.value === requiredOption.value, children: _jsx(RadioDot, { isChecked: selected.value === requiredOption.value }) })] }), Object.keys(optionsByCategories).map(function (category) { return (_jsxs(Fragment, { children: [category !== 'undefined' ? (_jsx(StyledCategory, { children: category })) : null, optionsByCategories[category].map(function (option, i) { return (_jsxs(SelectOption, { accessible: true, accessibilityRole: "radio", isLastOption: i === optionsByCategories[category].length - 1, onPress: function () { return handleOptionPress(option); }, children: [_jsx(StyledP, { children: _jsx(Strong, { children: option.label }) }), _jsx(Radio, { isChecked: selected.value === option.value, children: _jsx(RadioDot, { isChecked: selected.value === option.value }) })] }, option.label)); })] }, category)); })] }) }) }) })] }));
|
|
65
65
|
};
|
|
66
66
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from '../../styled.native';
|
|
2
2
|
export var Strong = styled.Text(function (_a) {
|
|
3
|
-
var
|
|
4
|
-
return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n ");
|
|
3
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
4
|
+
return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n color: color ?? ").concat(semantic.message.base, "\n ");
|
|
5
5
|
});
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { createContext, useContext } from 'react';
|
|
14
|
-
import { Address, Advice, Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Award, Battery,
|
|
14
|
+
import { Address, Advice, Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Award, Battery, CalBook, Cal, CaretArrowDown, CaretArrowLeft, CaretArrowRight, CaretArrowUp, CaretDown, CaretLeft, CaretRight, CaretUp, ChartFilled, Chart, CheckCircle, Check, ChevronDown, ChevronLeftSmallFirst, ChevronLeftSmall, ChevronLeft, ChevronRightSmallLast, ChevronRightSmall, ChevronRight, ChevronUp, Circle, CloseCircle, Cross, Doc, Dollar, Download, EcoHome, Eco, Edit, ElectricCar, ElectricHome, Electricity, EnergyAdvice, Equals, Euro, Gas, GlobeAddress, HelpFilled, Help, Hide, HomeFilled, Home, HydroPower, Info, Link, Logo, MailOpen, Mail, Menu, MessageFilled, Message, Minus, Mobile, NewWindow, PaymentCardFilled, PaymentCard, Phone, Plus, Pound, PricingFilled, Pricing, Search, Security, ShopFilled, Shop, Show, SmartHome, SmartMeter, Solar, StarFilled, Star, Sun, Torch, Trees, Tune, UserFilled, User, Wallet, WarmHome, Warning, WebAddress, WindPower, } from './icons';
|
|
15
15
|
var defaultIcons = {
|
|
16
16
|
address: Address,
|
|
17
17
|
advice: Advice,
|
|
@@ -83,6 +83,7 @@ var defaultIcons = {
|
|
|
83
83
|
phone: Phone,
|
|
84
84
|
plus: Plus,
|
|
85
85
|
pound: Pound,
|
|
86
|
+
'pricing-filled': PricingFilled,
|
|
86
87
|
pricing: Pricing,
|
|
87
88
|
search: Search,
|
|
88
89
|
security: Security,
|
|
@@ -101,7 +102,6 @@ var defaultIcons = {
|
|
|
101
102
|
'user-filled': UserFilled,
|
|
102
103
|
user: User,
|
|
103
104
|
wallet: Wallet,
|
|
104
|
-
'wallet-filled': WalletFilled,
|
|
105
105
|
'warm-home': WarmHome,
|
|
106
106
|
warning: Warning,
|
|
107
107
|
'web-address': WebAddress,
|
|
@@ -10,5 +10,5 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
14
|
-
export var Circle = function (props) { return (_jsx(Svg, __assign({ viewBox: "0 0 16 16" }, props, { children: _jsx(
|
|
13
|
+
import Svg, { Path } from 'react-native-svg';
|
|
14
|
+
export var Circle = function (props) { return (_jsx(Svg, __assign({ viewBox: "0 0 16 16" }, props, { children: _jsx(Path, { fill: "currentColor", d: "M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z" }) }))); };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import Svg, { Path } from 'react-native-svg';
|
|
14
|
+
export var PricingFilled = function (props) { return (_jsx(Svg, __assign({ viewBox: "0 0 16 16" }, props, { children: _jsx(Path, { fill: "currentColor", d: "m12.294 9.853 1.67-.447-5.912-5.913-3.128.408-2.355-2.354-1.06 1.06 2.355 2.355-.409 3.127 6.364 6.364 2.924-2.924-.449-1.676Z" }) }))); };
|
|
@@ -7,8 +7,8 @@ export * from './ArrowRight';
|
|
|
7
7
|
export * from './ArrowUp';
|
|
8
8
|
export * from './Award';
|
|
9
9
|
export * from './Battery';
|
|
10
|
-
export * from './Cal';
|
|
11
10
|
export * from './CalBook';
|
|
11
|
+
export * from './Cal';
|
|
12
12
|
export * from './CaretArrowDown';
|
|
13
13
|
export * from './CaretArrowLeft';
|
|
14
14
|
export * from './CaretArrowRight';
|
|
@@ -17,17 +17,17 @@ export * from './CaretDown';
|
|
|
17
17
|
export * from './CaretLeft';
|
|
18
18
|
export * from './CaretRight';
|
|
19
19
|
export * from './CaretUp';
|
|
20
|
-
export * from './Chart';
|
|
21
20
|
export * from './ChartFilled';
|
|
22
|
-
export * from './
|
|
21
|
+
export * from './Chart';
|
|
23
22
|
export * from './CheckCircle';
|
|
23
|
+
export * from './Check';
|
|
24
24
|
export * from './ChevronDown';
|
|
25
|
-
export * from './ChevronLeft';
|
|
26
|
-
export * from './ChevronLeftSmall';
|
|
27
25
|
export * from './ChevronLeftSmallFirst';
|
|
28
|
-
export * from './
|
|
29
|
-
export * from './
|
|
26
|
+
export * from './ChevronLeftSmall';
|
|
27
|
+
export * from './ChevronLeft';
|
|
30
28
|
export * from './ChevronRightSmallLast';
|
|
29
|
+
export * from './ChevronRightSmall';
|
|
30
|
+
export * from './ChevronRight';
|
|
31
31
|
export * from './ChevronUp';
|
|
32
32
|
export * from './Circle';
|
|
33
33
|
export * from './CloseCircle';
|
|
@@ -46,47 +46,47 @@ export * from './Equals';
|
|
|
46
46
|
export * from './Euro';
|
|
47
47
|
export * from './Gas';
|
|
48
48
|
export * from './GlobeAddress';
|
|
49
|
-
export * from './Help';
|
|
50
49
|
export * from './HelpFilled';
|
|
50
|
+
export * from './Help';
|
|
51
51
|
export * from './Hide';
|
|
52
|
-
export * from './Home';
|
|
53
52
|
export * from './HomeFilled';
|
|
53
|
+
export * from './Home';
|
|
54
54
|
export * from './HydroPower';
|
|
55
55
|
export * from './Info';
|
|
56
56
|
export * from './Link';
|
|
57
57
|
export * from './Logo';
|
|
58
|
-
export * from './Mail';
|
|
59
58
|
export * from './MailOpen';
|
|
59
|
+
export * from './Mail';
|
|
60
60
|
export * from './Menu';
|
|
61
|
-
export * from './Message';
|
|
62
61
|
export * from './MessageFilled';
|
|
62
|
+
export * from './Message';
|
|
63
63
|
export * from './Minus';
|
|
64
64
|
export * from './Mobile';
|
|
65
65
|
export * from './NewWindow';
|
|
66
|
-
export * from './PaymentCard';
|
|
67
66
|
export * from './PaymentCardFilled';
|
|
67
|
+
export * from './PaymentCard';
|
|
68
68
|
export * from './Phone';
|
|
69
69
|
export * from './Plus';
|
|
70
70
|
export * from './Pound';
|
|
71
|
+
export * from './PricingFilled';
|
|
71
72
|
export * from './Pricing';
|
|
72
73
|
export * from './Search';
|
|
73
74
|
export * from './Security';
|
|
74
|
-
export * from './Shop';
|
|
75
75
|
export * from './ShopFilled';
|
|
76
|
+
export * from './Shop';
|
|
76
77
|
export * from './Show';
|
|
77
78
|
export * from './SmartHome';
|
|
78
79
|
export * from './SmartMeter';
|
|
79
80
|
export * from './Solar';
|
|
80
|
-
export * from './Star';
|
|
81
81
|
export * from './StarFilled';
|
|
82
|
+
export * from './Star';
|
|
82
83
|
export * from './Sun';
|
|
83
84
|
export * from './Torch';
|
|
84
85
|
export * from './Trees';
|
|
85
86
|
export * from './Tune';
|
|
86
|
-
export * from './User';
|
|
87
87
|
export * from './UserFilled';
|
|
88
|
+
export * from './User';
|
|
88
89
|
export * from './Wallet';
|
|
89
|
-
export * from './WalletFilled';
|
|
90
90
|
export * from './WarmHome';
|
|
91
91
|
export * from './Warning';
|
|
92
92
|
export * from './WebAddress';
|
|
@@ -86,6 +86,7 @@ var defaultIcons = {
|
|
|
86
86
|
phone: icons_1.Phone,
|
|
87
87
|
plus: icons_1.Plus,
|
|
88
88
|
pound: icons_1.Pound,
|
|
89
|
+
'pricing-filled': icons_1.PricingFilled,
|
|
89
90
|
pricing: icons_1.Pricing,
|
|
90
91
|
search: icons_1.Search,
|
|
91
92
|
security: icons_1.Security,
|
|
@@ -104,7 +105,6 @@ var defaultIcons = {
|
|
|
104
105
|
'user-filled': icons_1.UserFilled,
|
|
105
106
|
user: icons_1.User,
|
|
106
107
|
wallet: icons_1.Wallet,
|
|
107
|
-
'wallet-filled': icons_1.WalletFilled,
|
|
108
108
|
'warm-home': icons_1.WarmHome,
|
|
109
109
|
warning: icons_1.Warning,
|
|
110
110
|
'web-address': icons_1.WebAddress,
|
|
@@ -10,9 +10,32 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
13
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
37
|
exports.Circle = void 0;
|
|
15
38
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var react_native_svg_1 = require("react-native-svg");
|
|
17
|
-
var Circle = function (props) { return ((0, jsx_runtime_1.jsx)(react_native_svg_1.
|
|
39
|
+
var react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
40
|
+
var Circle = function (props) { return ((0, jsx_runtime_1.jsx)(react_native_svg_1.default, __assign({ viewBox: "0 0 16 16" }, props, { children: (0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "currentColor", d: "M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z" }) }))); };
|
|
18
41
|
exports.Circle = Circle;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.PricingFilled = void 0;
|
|
38
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
+
var react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
40
|
+
var PricingFilled = function (props) { return ((0, jsx_runtime_1.jsx)(react_native_svg_1.default, __assign({ viewBox: "0 0 16 16" }, props, { children: (0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "currentColor", d: "m12.294 9.853 1.67-.447-5.912-5.913-3.128.408-2.355-2.354-1.06 1.06 2.355 2.355-.409 3.127 6.364 6.364 2.924-2.924-.449-1.676Z" }) }))); };
|
|
41
|
+
exports.PricingFilled = PricingFilled;
|
|
@@ -7,8 +7,8 @@ export * from './ArrowRight';
|
|
|
7
7
|
export * from './ArrowUp';
|
|
8
8
|
export * from './Award';
|
|
9
9
|
export * from './Battery';
|
|
10
|
-
export * from './Cal';
|
|
11
10
|
export * from './CalBook';
|
|
11
|
+
export * from './Cal';
|
|
12
12
|
export * from './CaretArrowDown';
|
|
13
13
|
export * from './CaretArrowLeft';
|
|
14
14
|
export * from './CaretArrowRight';
|
|
@@ -17,17 +17,17 @@ export * from './CaretDown';
|
|
|
17
17
|
export * from './CaretLeft';
|
|
18
18
|
export * from './CaretRight';
|
|
19
19
|
export * from './CaretUp';
|
|
20
|
-
export * from './Chart';
|
|
21
20
|
export * from './ChartFilled';
|
|
22
|
-
export * from './
|
|
21
|
+
export * from './Chart';
|
|
23
22
|
export * from './CheckCircle';
|
|
23
|
+
export * from './Check';
|
|
24
24
|
export * from './ChevronDown';
|
|
25
|
-
export * from './ChevronLeft';
|
|
26
|
-
export * from './ChevronLeftSmall';
|
|
27
25
|
export * from './ChevronLeftSmallFirst';
|
|
28
|
-
export * from './
|
|
29
|
-
export * from './
|
|
26
|
+
export * from './ChevronLeftSmall';
|
|
27
|
+
export * from './ChevronLeft';
|
|
30
28
|
export * from './ChevronRightSmallLast';
|
|
29
|
+
export * from './ChevronRightSmall';
|
|
30
|
+
export * from './ChevronRight';
|
|
31
31
|
export * from './ChevronUp';
|
|
32
32
|
export * from './Circle';
|
|
33
33
|
export * from './CloseCircle';
|
|
@@ -46,47 +46,47 @@ export * from './Equals';
|
|
|
46
46
|
export * from './Euro';
|
|
47
47
|
export * from './Gas';
|
|
48
48
|
export * from './GlobeAddress';
|
|
49
|
-
export * from './Help';
|
|
50
49
|
export * from './HelpFilled';
|
|
50
|
+
export * from './Help';
|
|
51
51
|
export * from './Hide';
|
|
52
|
-
export * from './Home';
|
|
53
52
|
export * from './HomeFilled';
|
|
53
|
+
export * from './Home';
|
|
54
54
|
export * from './HydroPower';
|
|
55
55
|
export * from './Info';
|
|
56
56
|
export * from './Link';
|
|
57
57
|
export * from './Logo';
|
|
58
|
-
export * from './Mail';
|
|
59
58
|
export * from './MailOpen';
|
|
59
|
+
export * from './Mail';
|
|
60
60
|
export * from './Menu';
|
|
61
|
-
export * from './Message';
|
|
62
61
|
export * from './MessageFilled';
|
|
62
|
+
export * from './Message';
|
|
63
63
|
export * from './Minus';
|
|
64
64
|
export * from './Mobile';
|
|
65
65
|
export * from './NewWindow';
|
|
66
|
-
export * from './PaymentCard';
|
|
67
66
|
export * from './PaymentCardFilled';
|
|
67
|
+
export * from './PaymentCard';
|
|
68
68
|
export * from './Phone';
|
|
69
69
|
export * from './Plus';
|
|
70
70
|
export * from './Pound';
|
|
71
|
+
export * from './PricingFilled';
|
|
71
72
|
export * from './Pricing';
|
|
72
73
|
export * from './Search';
|
|
73
74
|
export * from './Security';
|
|
74
|
-
export * from './Shop';
|
|
75
75
|
export * from './ShopFilled';
|
|
76
|
+
export * from './Shop';
|
|
76
77
|
export * from './Show';
|
|
77
78
|
export * from './SmartHome';
|
|
78
79
|
export * from './SmartMeter';
|
|
79
80
|
export * from './Solar';
|
|
80
|
-
export * from './Star';
|
|
81
81
|
export * from './StarFilled';
|
|
82
|
+
export * from './Star';
|
|
82
83
|
export * from './Sun';
|
|
83
84
|
export * from './Torch';
|
|
84
85
|
export * from './Trees';
|
|
85
86
|
export * from './Tune';
|
|
86
|
-
export * from './User';
|
|
87
87
|
export * from './UserFilled';
|
|
88
|
+
export * from './User';
|
|
88
89
|
export * from './Wallet';
|
|
89
|
-
export * from './WalletFilled';
|
|
90
90
|
export * from './WarmHome';
|
|
91
91
|
export * from './Warning';
|
|
92
92
|
export * from './WebAddress';
|
|
@@ -23,8 +23,8 @@ __exportStar(require("./ArrowRight"), exports);
|
|
|
23
23
|
__exportStar(require("./ArrowUp"), exports);
|
|
24
24
|
__exportStar(require("./Award"), exports);
|
|
25
25
|
__exportStar(require("./Battery"), exports);
|
|
26
|
-
__exportStar(require("./Cal"), exports);
|
|
27
26
|
__exportStar(require("./CalBook"), exports);
|
|
27
|
+
__exportStar(require("./Cal"), exports);
|
|
28
28
|
__exportStar(require("./CaretArrowDown"), exports);
|
|
29
29
|
__exportStar(require("./CaretArrowLeft"), exports);
|
|
30
30
|
__exportStar(require("./CaretArrowRight"), exports);
|
|
@@ -33,17 +33,17 @@ __exportStar(require("./CaretDown"), exports);
|
|
|
33
33
|
__exportStar(require("./CaretLeft"), exports);
|
|
34
34
|
__exportStar(require("./CaretRight"), exports);
|
|
35
35
|
__exportStar(require("./CaretUp"), exports);
|
|
36
|
-
__exportStar(require("./Chart"), exports);
|
|
37
36
|
__exportStar(require("./ChartFilled"), exports);
|
|
38
|
-
__exportStar(require("./
|
|
37
|
+
__exportStar(require("./Chart"), exports);
|
|
39
38
|
__exportStar(require("./CheckCircle"), exports);
|
|
39
|
+
__exportStar(require("./Check"), exports);
|
|
40
40
|
__exportStar(require("./ChevronDown"), exports);
|
|
41
|
-
__exportStar(require("./ChevronLeft"), exports);
|
|
42
|
-
__exportStar(require("./ChevronLeftSmall"), exports);
|
|
43
41
|
__exportStar(require("./ChevronLeftSmallFirst"), exports);
|
|
44
|
-
__exportStar(require("./
|
|
45
|
-
__exportStar(require("./
|
|
42
|
+
__exportStar(require("./ChevronLeftSmall"), exports);
|
|
43
|
+
__exportStar(require("./ChevronLeft"), exports);
|
|
46
44
|
__exportStar(require("./ChevronRightSmallLast"), exports);
|
|
45
|
+
__exportStar(require("./ChevronRightSmall"), exports);
|
|
46
|
+
__exportStar(require("./ChevronRight"), exports);
|
|
47
47
|
__exportStar(require("./ChevronUp"), exports);
|
|
48
48
|
__exportStar(require("./Circle"), exports);
|
|
49
49
|
__exportStar(require("./CloseCircle"), exports);
|
|
@@ -62,47 +62,47 @@ __exportStar(require("./Equals"), exports);
|
|
|
62
62
|
__exportStar(require("./Euro"), exports);
|
|
63
63
|
__exportStar(require("./Gas"), exports);
|
|
64
64
|
__exportStar(require("./GlobeAddress"), exports);
|
|
65
|
-
__exportStar(require("./Help"), exports);
|
|
66
65
|
__exportStar(require("./HelpFilled"), exports);
|
|
66
|
+
__exportStar(require("./Help"), exports);
|
|
67
67
|
__exportStar(require("./Hide"), exports);
|
|
68
|
-
__exportStar(require("./Home"), exports);
|
|
69
68
|
__exportStar(require("./HomeFilled"), exports);
|
|
69
|
+
__exportStar(require("./Home"), exports);
|
|
70
70
|
__exportStar(require("./HydroPower"), exports);
|
|
71
71
|
__exportStar(require("./Info"), exports);
|
|
72
72
|
__exportStar(require("./Link"), exports);
|
|
73
73
|
__exportStar(require("./Logo"), exports);
|
|
74
|
-
__exportStar(require("./Mail"), exports);
|
|
75
74
|
__exportStar(require("./MailOpen"), exports);
|
|
75
|
+
__exportStar(require("./Mail"), exports);
|
|
76
76
|
__exportStar(require("./Menu"), exports);
|
|
77
|
-
__exportStar(require("./Message"), exports);
|
|
78
77
|
__exportStar(require("./MessageFilled"), exports);
|
|
78
|
+
__exportStar(require("./Message"), exports);
|
|
79
79
|
__exportStar(require("./Minus"), exports);
|
|
80
80
|
__exportStar(require("./Mobile"), exports);
|
|
81
81
|
__exportStar(require("./NewWindow"), exports);
|
|
82
|
-
__exportStar(require("./PaymentCard"), exports);
|
|
83
82
|
__exportStar(require("./PaymentCardFilled"), exports);
|
|
83
|
+
__exportStar(require("./PaymentCard"), exports);
|
|
84
84
|
__exportStar(require("./Phone"), exports);
|
|
85
85
|
__exportStar(require("./Plus"), exports);
|
|
86
86
|
__exportStar(require("./Pound"), exports);
|
|
87
|
+
__exportStar(require("./PricingFilled"), exports);
|
|
87
88
|
__exportStar(require("./Pricing"), exports);
|
|
88
89
|
__exportStar(require("./Search"), exports);
|
|
89
90
|
__exportStar(require("./Security"), exports);
|
|
90
|
-
__exportStar(require("./Shop"), exports);
|
|
91
91
|
__exportStar(require("./ShopFilled"), exports);
|
|
92
|
+
__exportStar(require("./Shop"), exports);
|
|
92
93
|
__exportStar(require("./Show"), exports);
|
|
93
94
|
__exportStar(require("./SmartHome"), exports);
|
|
94
95
|
__exportStar(require("./SmartMeter"), exports);
|
|
95
96
|
__exportStar(require("./Solar"), exports);
|
|
96
|
-
__exportStar(require("./Star"), exports);
|
|
97
97
|
__exportStar(require("./StarFilled"), exports);
|
|
98
|
+
__exportStar(require("./Star"), exports);
|
|
98
99
|
__exportStar(require("./Sun"), exports);
|
|
99
100
|
__exportStar(require("./Torch"), exports);
|
|
100
101
|
__exportStar(require("./Trees"), exports);
|
|
101
102
|
__exportStar(require("./Tune"), exports);
|
|
102
|
-
__exportStar(require("./User"), exports);
|
|
103
103
|
__exportStar(require("./UserFilled"), exports);
|
|
104
|
+
__exportStar(require("./User"), exports);
|
|
104
105
|
__exportStar(require("./Wallet"), exports);
|
|
105
|
-
__exportStar(require("./WalletFilled"), exports);
|
|
106
106
|
__exportStar(require("./WarmHome"), exports);
|
|
107
107
|
__exportStar(require("./Warning"), exports);
|
|
108
108
|
__exportStar(require("./WebAddress"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { SvgProps } from 'react-native-svg';
|
|
3
|
-
export type IconName = 'address' | 'advice' | 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'award' | 'battery' | 'cal-book' | 'cal' | 'caret-arrow-down' | 'caret-arrow-left' | 'caret-arrow-right' | 'caret-arrow-up' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'chart-filled' | 'chart' | 'check-circle' | 'check' | 'chevron-down' | 'chevron-left-small-first' | 'chevron-left-small' | 'chevron-left' | 'chevron-right-small-last' | 'chevron-right-small' | 'chevron-right' | 'chevron-up' | 'circle' | 'close-circle' | 'cross' | 'doc' | 'dollar' | 'download' | 'eco-home' | 'eco' | 'edit' | 'electric-car' | 'electric-home' | 'electricity' | 'energy-advice' | 'equals' | 'euro' | 'gas' | 'globe-address' | 'help-filled' | 'help' | 'hide' | 'home-filled' | 'home' | 'hydro-power' | 'info' | 'link' | 'logo' | 'mail-open' | 'mail' | 'menu' | 'message-filled' | 'message' | 'minus' | 'mobile' | 'new-window' | 'payment-card-filled' | 'payment-card' | 'phone' | 'plus' | 'pound' | 'pricing' | 'search' | 'security' | 'shop-filled' | 'shop' | 'show' | 'smart-home' | 'smart-meter' | 'solar' | 'star-filled' | 'star' | 'sun' | 'torch' | 'trees' | 'tune' | 'user-filled' | 'user' | 'wallet' | 'warm-home' | 'warning' | 'web-address' | 'wind-power';
|
|
4
|
-
export type IconNameExtended = IconName | string;
|
|
3
|
+
export type IconName = 'address' | 'advice' | 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'award' | 'battery' | 'cal-book' | 'cal' | 'caret-arrow-down' | 'caret-arrow-left' | 'caret-arrow-right' | 'caret-arrow-up' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'chart-filled' | 'chart' | 'check-circle' | 'check' | 'chevron-down' | 'chevron-left-small-first' | 'chevron-left-small' | 'chevron-left' | 'chevron-right-small-last' | 'chevron-right-small' | 'chevron-right' | 'chevron-up' | 'circle' | 'close-circle' | 'cross' | 'doc' | 'dollar' | 'download' | 'eco-home' | 'eco' | 'edit' | 'electric-car' | 'electric-home' | 'electricity' | 'energy-advice' | 'equals' | 'euro' | 'gas' | 'globe-address' | 'help-filled' | 'help' | 'hide' | 'home-filled' | 'home' | 'hydro-power' | 'info' | 'link' | 'logo' | 'mail-open' | 'mail' | 'menu' | 'message-filled' | 'message' | 'minus' | 'mobile' | 'new-window' | 'payment-card-filled' | 'payment-card' | 'phone' | 'plus' | 'pound' | 'pricing-filled' | 'pricing' | 'search' | 'security' | 'shop-filled' | 'shop' | 'show' | 'smart-home' | 'smart-meter' | 'solar' | 'star-filled' | 'star' | 'sun' | 'torch' | 'trees' | 'tune' | 'user-filled' | 'user' | 'wallet' | 'warm-home' | 'warning' | 'web-address' | 'wind-power';
|
|
4
|
+
export type IconNameExtended = IconName | (string & {});
|
|
5
5
|
export type IconsType = Record<string, FunctionComponent<SvgProps>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ovotech/element-native",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0-canary-3908de8-301",
|
|
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.1.0-canary-3908de8-301",
|
|
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.1.0"
|
|
20
|
+
"react-native-reanimated-carousel": "^3.5.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/core": "^7.11.5",
|