@ovotech/element-native 3.0.0 → 3.1.0-canary-9ecd91d-105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.js +9 -6
- package/dist/components/Accordion/Group.d.ts +4 -1
- package/dist/components/Accordion/Group.js +24 -10
- package/dist/components/Accordion/styles.d.ts +3 -3
- package/dist/components/Accordion/types.d.ts +3 -3
- package/dist/components/ActionList/ActionList.d.ts +22 -0
- package/dist/components/ActionList/ActionList.js +60 -0
- package/dist/components/ActionList/index.d.ts +1 -0
- package/dist/components/ActionList/index.js +17 -0
- package/dist/components/ActionList/styled.d.ts +1155 -0
- package/dist/components/ActionList/styled.js +57 -0
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/CTAButton/CTAButton.d.ts +3 -3
- package/dist/components/CTALink/CTALink.d.ts +3 -3
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/DataTable/styles.d.ts +11 -11
- package/dist/components/DescriptionList/styled.d.ts +1 -1
- package/dist/components/Divider/Divider.js +3 -1
- package/dist/components/ErrorText/ErrorText.d.ts +1 -1
- package/dist/components/FormGroup/FormGroup.js +1 -0
- package/dist/components/Grid/Col.d.ts +1 -1
- package/dist/components/Grid/Row.d.ts +1 -1
- package/dist/components/HintText/HintText.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Input/CurrencyInput.d.ts +2 -2
- package/dist/components/Input/EmailInput.d.ts +2 -2
- package/dist/components/Input/Input.d.ts +5 -5
- package/dist/components/Input/NumberInput.d.ts +2 -2
- package/dist/components/Input/PasswordInput.d.ts +2 -2
- package/dist/components/Input/PasswordInput.styled.d.ts +1 -1
- package/dist/components/Input/PasswordVisibilityToggle.d.ts +2 -1
- package/dist/components/Input/PhoneInput.d.ts +2 -2
- package/dist/components/Input/TextInput.d.ts +2 -2
- package/dist/components/Input/TextareaInput.d.ts +2 -2
- package/dist/components/LabelText/LabelText.d.ts +1 -1
- package/dist/components/List/List.d.ts +3 -3
- package/dist/components/Margin/Margin.d.ts +4 -1
- package/dist/components/Notification/Notification.d.ts +2 -2
- package/dist/components/Radio/Radio.js +2 -2
- package/dist/components/SelectField/Select.d.ts +2 -1
- package/dist/components/SelectField/Select.js +15 -14
- package/dist/components/SkeletonLoading/Skeleton.d.ts +1 -1
- package/dist/components/SubLabelText/SubLabelText.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +5 -5
- package/dist/components/TextField/CurrencyField.d.ts +2 -2
- package/dist/components/TextField/EmailField.d.ts +2 -2
- package/dist/components/TextField/NumberField.d.ts +2 -2
- package/dist/components/TextField/PasswordField.d.ts +2 -2
- package/dist/components/TextField/PhoneField.d.ts +2 -2
- package/dist/components/TextField/TelField.d.ts +2 -2
- package/dist/components/TextField/TextField.d.ts +2 -2
- package/dist/components/TextField/TextareaField.d.ts +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/esm/components/Accordion/Accordion.js +9 -6
- package/dist/esm/components/Accordion/Group.js +24 -10
- package/dist/esm/components/ActionList/ActionList.js +56 -0
- package/dist/esm/components/ActionList/index.js +1 -0
- package/dist/esm/components/ActionList/styled.js +31 -0
- package/dist/esm/components/Divider/Divider.js +3 -1
- package/dist/esm/components/FormGroup/FormGroup.js +1 -0
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/SelectField/Select.js +14 -16
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/utils/utils.js +1 -0
- package/dist/providers/IconsProvider.d.ts +1 -1
- package/dist/providers/types.d.ts +1 -0
- package/dist/styled.native.d.ts +6 -6
- package/dist/theme/create-theme.d.ts +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/dist/utils/utils.js +1 -0
- package/package.json +4 -2
- package/dist/components/Input/TelInput.d.ts +0 -10
- package/dist/components/Input/TelInput.js +0 -41
- package/dist/esm/components/Input/TelInput.js +0 -15
- 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/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
|
@@ -0,0 +1,57 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.StyledLeftIcon = exports.StyledRightIcon = exports.StyledActionText = exports.StyledActionInner = exports.StyledActionWrapper = exports.StyledActionList = void 0;
|
|
31
|
+
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
32
|
+
var Icon_1 = require("../Icon");
|
|
33
|
+
var List_1 = require("../List/List");
|
|
34
|
+
exports.StyledActionList = List_1.ListWrapper;
|
|
35
|
+
exports.StyledActionWrapper = styled_native_1.default.View(function (_a) {
|
|
36
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBorder = _a.hasBorder, inList = _a.inList, inverted = _a.inverted;
|
|
37
|
+
return "\n width: ".concat(inList ? '100%' : 'auto', ";\n align-self: ").concat(inList ? 'center' : 'flex-start', ";\n border-bottom-width: ").concat(hasBorder ? core.borderWidth.small : 0, ";\n border-bottom-style: solid;\n border-bottom-color: ").concat(inverted ? semantic.inverted.border : semantic.border.graphic, ";\n");
|
|
38
|
+
});
|
|
39
|
+
exports.StyledActionInner = styled_native_1.default.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n min-height: 44px;\n"], ["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n min-height: 44px;\n"])));
|
|
40
|
+
exports.StyledActionText = styled_native_1.default.Text(function (_a) {
|
|
41
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, _c = _a.inverted, inverted = _c === void 0 ? false : _c;
|
|
42
|
+
var fontSize = smallAndUp
|
|
43
|
+
? core.fontSize.body.large
|
|
44
|
+
: core.fontSize.body.small;
|
|
45
|
+
return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "], ["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.fontFamily.bodyBold.native, fontSize, core.lineHeight.body.small);
|
|
46
|
+
});
|
|
47
|
+
exports.StyledRightIcon = (0, styled_native_1.default)(Icon_1.Icon)(function (_a) {
|
|
48
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, inverted = _a.inverted, marginTop = _a.marginTop;
|
|
49
|
+
return (0, styled_native_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n margin-left: ", ";\n margin-top: ", ";\n "], ["\n color: ", ";\n margin-left: ", ";\n margin-top: ", ";\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.space[1], core.space[marginTop]);
|
|
50
|
+
});
|
|
51
|
+
exports.StyledLeftIcon = (0, styled_native_1.default)(Icon_1.Icon)(function (_a) {
|
|
52
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, inverted = _a.inverted;
|
|
53
|
+
return (0, styled_native_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n margin-right: ", ";\n "], ["\n color: ", ";\n margin-right: ", ";\n "])), inverted
|
|
54
|
+
? semantic.inverted.message.base
|
|
55
|
+
: semantic.message.base, core.space[1]);
|
|
56
|
+
});
|
|
57
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -13,7 +13,7 @@ declare const CTAButton: ({ iconLeft, iconRight, children, fullWidth, variant, .
|
|
|
13
13
|
declare type CTAProps = Omit<ComponentProps<typeof CTAButton>, 'variant' | 'ref'> & {
|
|
14
14
|
ref: Ref<TouchableOpacity>;
|
|
15
15
|
};
|
|
16
|
-
declare const PrimaryCTAButton: import("react").ForwardRefExoticComponent<Pick<CTAProps,
|
|
17
|
-
declare const SecondaryCTAButton: import("react").ForwardRefExoticComponent<Pick<CTAProps,
|
|
18
|
-
declare const DestructiveCTAButton: import("react").ForwardRefExoticComponent<Pick<CTAProps,
|
|
16
|
+
declare const PrimaryCTAButton: import("react").ForwardRefExoticComponent<Pick<CTAProps, "iconLeft" | "iconRight" | "fullWidth" | keyof TouchableOpacityProps> & import("react").RefAttributes<TouchableOpacity>>;
|
|
17
|
+
declare const SecondaryCTAButton: import("react").ForwardRefExoticComponent<Pick<CTAProps, "iconLeft" | "iconRight" | "fullWidth" | keyof TouchableOpacityProps> & import("react").RefAttributes<TouchableOpacity>>;
|
|
18
|
+
declare const DestructiveCTAButton: import("react").ForwardRefExoticComponent<Pick<CTAProps, "iconLeft" | "iconRight" | "fullWidth" | keyof TouchableOpacityProps> & import("react").RefAttributes<TouchableOpacity>>;
|
|
19
19
|
export { CTAButton, PrimaryCTAButton, SecondaryCTAButton, DestructiveCTAButton, };
|
|
@@ -4,8 +4,8 @@ import { CTAButton } from '../CTAButton';
|
|
|
4
4
|
declare type CTALinkProps = Omit<ComponentProps<typeof CTAButton>, 'ref'> & {
|
|
5
5
|
ref: Ref<TouchableOpacity>;
|
|
6
6
|
};
|
|
7
|
-
declare const CTALink: import("react").ForwardRefExoticComponent<Pick<CTALinkProps, "
|
|
7
|
+
declare const CTALink: import("react").ForwardRefExoticComponent<Pick<CTALinkProps, "iconLeft" | "iconRight" | "fullWidth" | keyof import("react-native/types").TouchableOpacityProps | "variant"> & import("react").RefAttributes<TouchableOpacity>>;
|
|
8
8
|
declare type CTAProps = Omit<ComponentProps<typeof CTALink>, 'variant'>;
|
|
9
|
-
declare const PrimaryCTALink: import("react").ForwardRefExoticComponent<Pick<CTAProps, "key" |
|
|
10
|
-
declare const SecondaryCTALink: import("react").ForwardRefExoticComponent<Pick<CTAProps, "key" |
|
|
9
|
+
declare const PrimaryCTALink: import("react").ForwardRefExoticComponent<Pick<CTAProps, "key" | "iconLeft" | "iconRight" | "fullWidth" | keyof import("react-native/types").TouchableOpacityProps> & import("react").RefAttributes<TouchableOpacity>>;
|
|
10
|
+
declare const SecondaryCTALink: import("react").ForwardRefExoticComponent<Pick<CTAProps, "key" | "iconLeft" | "iconRight" | "fullWidth" | keyof import("react-native/types").TouchableOpacityProps> & import("react").RefAttributes<TouchableOpacity>>;
|
|
11
11
|
export { CTALink, PrimaryCTALink, SecondaryCTALink };
|
|
@@ -226,7 +226,7 @@ export declare const StyledTableContainer: import("styled-components").StyledCom
|
|
|
226
226
|
};
|
|
227
227
|
};
|
|
228
228
|
};
|
|
229
|
-
}, {}, never>;
|
|
229
|
+
} & object, {}, never>;
|
|
230
230
|
export declare const TableHeader: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme & {
|
|
231
231
|
core: {
|
|
232
232
|
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
@@ -454,7 +454,7 @@ export declare const TableHeader: import("styled-components").StyledComponent<ty
|
|
|
454
454
|
};
|
|
455
455
|
};
|
|
456
456
|
};
|
|
457
|
-
}, {
|
|
457
|
+
} & object, {
|
|
458
458
|
cellWidth: string;
|
|
459
459
|
} & Breakpoints, never>;
|
|
460
460
|
export declare const TableHeaderText: import("styled-components").StyledComponent<typeof import("react-native").Text, import("../../theme/theme").Theme & {
|
|
@@ -684,7 +684,7 @@ export declare const TableHeaderText: import("styled-components").StyledComponen
|
|
|
684
684
|
};
|
|
685
685
|
};
|
|
686
686
|
};
|
|
687
|
-
}, Breakpoints, never>;
|
|
687
|
+
} & object, Breakpoints, never>;
|
|
688
688
|
export declare const TableCaptionText: import("styled-components").StyledComponent<typeof import("react-native").Text, import("../../theme/theme").Theme & {
|
|
689
689
|
core: {
|
|
690
690
|
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
@@ -912,7 +912,7 @@ export declare const TableCaptionText: import("styled-components").StyledCompone
|
|
|
912
912
|
};
|
|
913
913
|
};
|
|
914
914
|
};
|
|
915
|
-
}, Breakpoints, never>;
|
|
915
|
+
} & object, Breakpoints, never>;
|
|
916
916
|
export declare const CellText: import("styled-components").StyledComponent<typeof import("react-native").Text, import("../../theme/theme").Theme & {
|
|
917
917
|
core: {
|
|
918
918
|
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
@@ -1140,7 +1140,7 @@ export declare const CellText: import("styled-components").StyledComponent<typeo
|
|
|
1140
1140
|
};
|
|
1141
1141
|
};
|
|
1142
1142
|
};
|
|
1143
|
-
}, Breakpoints, never>;
|
|
1143
|
+
} & object, Breakpoints, never>;
|
|
1144
1144
|
export declare const TableCaption: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme & {
|
|
1145
1145
|
core: {
|
|
1146
1146
|
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
@@ -1368,7 +1368,7 @@ export declare const TableCaption: import("styled-components").StyledComponent<t
|
|
|
1368
1368
|
};
|
|
1369
1369
|
};
|
|
1370
1370
|
};
|
|
1371
|
-
}, Breakpoints, never>;
|
|
1371
|
+
} & object, Breakpoints, never>;
|
|
1372
1372
|
export declare const TableRow: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme & {
|
|
1373
1373
|
core: {
|
|
1374
1374
|
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
@@ -1596,7 +1596,7 @@ export declare const TableRow: import("styled-components").StyledComponent<typeo
|
|
|
1596
1596
|
};
|
|
1597
1597
|
};
|
|
1598
1598
|
};
|
|
1599
|
-
}, {
|
|
1599
|
+
} & object, {
|
|
1600
1600
|
stripe: boolean;
|
|
1601
1601
|
}, never>;
|
|
1602
1602
|
export declare const TableRowHeading: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme & {
|
|
@@ -1826,7 +1826,7 @@ export declare const TableRowHeading: import("styled-components").StyledComponen
|
|
|
1826
1826
|
};
|
|
1827
1827
|
};
|
|
1828
1828
|
};
|
|
1829
|
-
}, {}, never>;
|
|
1829
|
+
} & object, {}, never>;
|
|
1830
1830
|
export declare const TableBody: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme & {
|
|
1831
1831
|
core: {
|
|
1832
1832
|
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
@@ -2054,7 +2054,7 @@ export declare const TableBody: import("styled-components").StyledComponent<type
|
|
|
2054
2054
|
};
|
|
2055
2055
|
};
|
|
2056
2056
|
};
|
|
2057
|
-
}, {}, never>;
|
|
2057
|
+
} & object, {}, never>;
|
|
2058
2058
|
export declare const TableCell: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme & {
|
|
2059
2059
|
core: {
|
|
2060
2060
|
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
@@ -2282,7 +2282,7 @@ export declare const TableCell: import("styled-components").StyledComponent<type
|
|
|
2282
2282
|
};
|
|
2283
2283
|
};
|
|
2284
2284
|
};
|
|
2285
|
-
}, {
|
|
2285
|
+
} & object, {
|
|
2286
2286
|
cellWidth: string;
|
|
2287
2287
|
} & Breakpoints, never>;
|
|
2288
2288
|
export declare const RowHeading: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme & {
|
|
@@ -2512,6 +2512,6 @@ export declare const RowHeading: import("styled-components").StyledComponent<typ
|
|
|
2512
2512
|
};
|
|
2513
2513
|
};
|
|
2514
2514
|
};
|
|
2515
|
-
}, {
|
|
2515
|
+
} & object, {
|
|
2516
2516
|
cellWidth: string;
|
|
2517
2517
|
} & Breakpoints, never>;
|
|
@@ -232,7 +232,7 @@ export declare const Dl: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
232
232
|
};
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
|
-
}) | undefined;
|
|
235
|
+
} & object) | undefined;
|
|
236
236
|
} & {
|
|
237
237
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
238
238
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
@@ -32,7 +32,9 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
32
32
|
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
33
33
|
var StyledDivider = styled_native_1.default.View(function (_a) {
|
|
34
34
|
var semantic = _a.theme.semantic, _b = _a.type, type = _b === void 0 ? 'default' : _b, _c = _a.width, width = _c === void 0 ? '100%' : _c;
|
|
35
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 1px;\n background: ", ";\n width: ", ";\n "], ["\n height: 1px;\n background: ", ";\n width: ", ";\n "])), type === 'default'
|
|
35
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 1px;\n background: ", ";\n width: ", ";\n "], ["\n height: 1px;\n background: ", ";\n width: ", ";\n "])), type === 'default'
|
|
36
|
+
? semantic.border.graphic
|
|
37
|
+
: semantic.border.differentiated, width);
|
|
36
38
|
});
|
|
37
39
|
var Divider = function (_a) {
|
|
38
40
|
var type = _a.type, width = _a.width;
|
|
@@ -232,7 +232,7 @@ declare const ErrorText: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
232
232
|
};
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
|
-
}) | undefined;
|
|
235
|
+
} & object) | undefined;
|
|
236
236
|
} & {
|
|
237
237
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
238
238
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
@@ -34,6 +34,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
34
34
|
var react_native_1 = require("react-native");
|
|
35
35
|
var styled_native_1 = __importDefault(require("../../styled.native"));
|
|
36
36
|
var FormGroupWrapper = styled_native_1.default.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n"], ["\n flex-direction: row;\n"])));
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
38
|
var FormGroup = function (_a) {
|
|
38
39
|
var children = _a.children, error = _a.error, rest = __rest(_a, ["children", "error"]);
|
|
39
40
|
return ((0, jsx_runtime_1.jsx)(FormGroupWrapper, __assign({}, rest, { children: (0, jsx_runtime_1.jsx)(react_native_1.View, __assign({ style: { flex: 1 } }, { children: children })) })));
|
|
@@ -231,7 +231,7 @@ declare const Col: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
231
231
|
};
|
|
232
232
|
};
|
|
233
233
|
};
|
|
234
|
-
}) | undefined;
|
|
234
|
+
} & object) | undefined;
|
|
235
235
|
} & {
|
|
236
236
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
237
237
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
@@ -232,7 +232,7 @@ declare const HintText: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
232
232
|
};
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
|
-
}) | undefined;
|
|
235
|
+
} & object) | undefined;
|
|
236
236
|
} & {
|
|
237
237
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
238
238
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SvgProps } from 'react-native-svg';
|
|
3
|
-
import {
|
|
3
|
+
import { IconNameExtended } from '../../providers';
|
|
4
4
|
export declare type IconBase = React.FunctionComponent<SvgProps>;
|
|
5
5
|
export declare type IconProps = SvgProps & {
|
|
6
|
-
name:
|
|
6
|
+
name: IconNameExtended;
|
|
7
7
|
color?: string;
|
|
8
8
|
size: string | number;
|
|
9
9
|
};
|
|
@@ -7,8 +7,8 @@ export declare type CurrencyInputProps = InputProps & {
|
|
|
7
7
|
declare const CurrencyInput: import("react").ForwardRefExoticComponent<import("react-native/types").TextInputProps & {
|
|
8
8
|
invalid?: boolean | undefined;
|
|
9
9
|
stretch?: boolean | undefined;
|
|
10
|
-
iconLeft?:
|
|
11
|
-
iconRight?:
|
|
10
|
+
iconLeft?: string | undefined;
|
|
11
|
+
iconRight?: string | undefined;
|
|
12
12
|
rightSlot?: import("react").ReactNode;
|
|
13
13
|
} & {
|
|
14
14
|
currency?: "GBP" | "EUR" | "AUD" | "USD" | undefined;
|
|
@@ -3,8 +3,8 @@ import { TextInput } from 'react-native';
|
|
|
3
3
|
declare const EmailInput: import("react").ForwardRefExoticComponent<import("react-native/types").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: string | undefined;
|
|
7
|
+
iconRight?: string | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & import("react").RefAttributes<TextInput>>;
|
|
10
10
|
export { EmailInput };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { TextInput, TextInputProps } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { IconNameExtended } from '../../providers/types';
|
|
4
4
|
export declare type InputProps = TextInputProps & {
|
|
5
5
|
invalid?: boolean;
|
|
6
6
|
stretch?: boolean;
|
|
7
|
-
iconLeft?:
|
|
8
|
-
iconRight?:
|
|
7
|
+
iconLeft?: IconNameExtended;
|
|
8
|
+
iconRight?: IconNameExtended;
|
|
9
9
|
rightSlot?: ReactNode;
|
|
10
10
|
};
|
|
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?: string | undefined;
|
|
15
|
+
iconRight?: string | undefined;
|
|
16
16
|
rightSlot?: ReactNode;
|
|
17
17
|
} & import("react").RefAttributes<TextInput>>;
|
|
18
18
|
export { Input };
|
|
@@ -3,8 +3,8 @@ import { TextInput as RNTextInput } from 'react-native';
|
|
|
3
3
|
declare const NumberInput: import("react").ForwardRefExoticComponent<import("react-native/types").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: string | undefined;
|
|
7
|
+
iconRight?: string | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & import("react").RefAttributes<RNTextInput>>;
|
|
10
10
|
export { NumberInput };
|
|
@@ -3,8 +3,8 @@ import { TextInput as RNTextInput } from 'react-native';
|
|
|
3
3
|
declare const PasswordInput: import("react").ForwardRefExoticComponent<import("react-native/types").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: string | undefined;
|
|
7
|
+
iconRight?: string | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & {
|
|
10
10
|
hasVisibilityToggle?: boolean | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { IconNameExtended } from '../../providers';
|
|
1
2
|
export declare const useTogglePasswordVisibility: () => {
|
|
2
3
|
isPasswordVisible: boolean;
|
|
3
4
|
handlePasswordVisibility: () => void;
|
|
4
5
|
};
|
|
5
6
|
declare type PasswordVisibilityToggleProps = {
|
|
6
|
-
iconName:
|
|
7
|
+
iconName: IconNameExtended;
|
|
7
8
|
visibilityToggleLabel: string;
|
|
8
9
|
handlePasswordVisibility: () => void;
|
|
9
10
|
};
|
|
@@ -3,8 +3,8 @@ import { TextInput } from 'react-native';
|
|
|
3
3
|
declare const PhoneInput: import("react").ForwardRefExoticComponent<import("react-native/types").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: string | undefined;
|
|
7
|
+
iconRight?: string | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & import("react").RefAttributes<TextInput>>;
|
|
10
10
|
export { PhoneInput };
|
|
@@ -3,8 +3,8 @@ import { TextInput as RNTextInput } from 'react-native';
|
|
|
3
3
|
declare const TextInput: import("react").ForwardRefExoticComponent<import("react-native/types").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
|
-
iconLeft?:
|
|
7
|
-
iconRight?:
|
|
6
|
+
iconLeft?: string | undefined;
|
|
7
|
+
iconRight?: string | undefined;
|
|
8
8
|
rightSlot?: import("react").ReactNode;
|
|
9
9
|
} & import("react").RefAttributes<RNTextInput>>;
|
|
10
10
|
export { TextInput };
|
|
@@ -7,8 +7,8 @@ declare type TextareaInputProps = InputProps & {
|
|
|
7
7
|
declare const TextareaInput: import("react").ForwardRefExoticComponent<import("react-native/types").TextInputProps & {
|
|
8
8
|
invalid?: boolean | undefined;
|
|
9
9
|
stretch?: boolean | undefined;
|
|
10
|
-
iconLeft?:
|
|
11
|
-
iconRight?:
|
|
10
|
+
iconLeft?: string | undefined;
|
|
11
|
+
iconRight?: string | undefined;
|
|
12
12
|
rightSlot?: import("react").ReactNode;
|
|
13
13
|
} & {
|
|
14
14
|
rows?: number | undefined;
|
|
@@ -232,7 +232,7 @@ declare const LabelText: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
232
232
|
};
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
|
-
}) | undefined;
|
|
235
|
+
} & object) | undefined;
|
|
236
236
|
} & {
|
|
237
237
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
238
238
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
@@ -232,7 +232,7 @@ declare const ListWrapper: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
232
232
|
};
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
|
-
}) | undefined;
|
|
235
|
+
} & object) | undefined;
|
|
236
236
|
} & {
|
|
237
237
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
238
238
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
@@ -473,7 +473,7 @@ declare const Li: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
473
473
|
};
|
|
474
474
|
};
|
|
475
475
|
};
|
|
476
|
-
}) | undefined;
|
|
476
|
+
} & object) | undefined;
|
|
477
477
|
} & {
|
|
478
478
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
479
479
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
@@ -714,7 +714,7 @@ declare const Dl: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
714
714
|
};
|
|
715
715
|
};
|
|
716
716
|
};
|
|
717
|
-
}) | undefined;
|
|
717
|
+
} & object) | undefined;
|
|
718
718
|
} & {
|
|
719
719
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
720
720
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
@@ -239,12 +239,15 @@ declare const StyledMargin: import("styled-components").StyledComponent<typeof i
|
|
|
239
239
|
};
|
|
240
240
|
};
|
|
241
241
|
};
|
|
242
|
-
}, MProps, never>;
|
|
242
|
+
} & object, MProps, never>;
|
|
243
243
|
declare type Props = Omit<ComponentProps<typeof StyledMargin>, 'mTop' | 'mBottom' | 'mLeft' | 'mRight' | 'breakpoints'> & {
|
|
244
244
|
top?: SpaceKey | SpaceKey[];
|
|
245
245
|
bottom?: SpaceKey | SpaceKey[];
|
|
246
246
|
left?: SpaceKey | SpaceKey[];
|
|
247
247
|
right?: SpaceKey | SpaceKey[];
|
|
248
|
+
horizontal?: SpaceKey | SpaceKey[];
|
|
249
|
+
vertical?: SpaceKey | SpaceKey[];
|
|
250
|
+
all?: SpaceKey | SpaceKey[];
|
|
248
251
|
};
|
|
249
252
|
declare const Margin: ({ top, bottom, left, right, ...rest }: Props) => JSX.Element;
|
|
250
253
|
export { Margin };
|
|
@@ -229,7 +229,7 @@ export declare const NotificationContentBox: import("styled-components").StyledC
|
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
231
|
};
|
|
232
|
-
}, {}, never>;
|
|
232
|
+
} & object, {}, never>;
|
|
233
233
|
export declare const NotificationTitleBox: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme & {
|
|
234
234
|
core: {
|
|
235
235
|
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
@@ -457,7 +457,7 @@ export declare const NotificationTitleBox: import("styled-components").StyledCom
|
|
|
457
457
|
};
|
|
458
458
|
};
|
|
459
459
|
};
|
|
460
|
-
}, {
|
|
460
|
+
} & object, {
|
|
461
461
|
variant: NotificationVariantName;
|
|
462
462
|
noMargin?: boolean | undefined;
|
|
463
463
|
dismissible: boolean;
|
|
@@ -38,7 +38,7 @@ var StyledRadioInputWrapper = styled_native_1.default.View(function (_a) {
|
|
|
38
38
|
});
|
|
39
39
|
var StyledRadioInput = styled_native_1.default.View(function (_a) {
|
|
40
40
|
var _b = _a.theme, core = _b.core, semantic = _b.semantic, invalid = _a.invalid, checked = _a.checked;
|
|
41
|
-
return "\n width: ".concat(core.space[6], ";\n height: ").concat(core.space[6], ";\n border: ").concat(core.borderWidth.small, " solid;\n align-items: center;\n justify-content: center;\n border-radius:
|
|
41
|
+
return "\n width: ".concat(core.space[6], ";\n height: ").concat(core.space[6], ";\n border: ").concat(core.borderWidth.small, " solid;\n align-items: center;\n justify-content: center;\n border-radius: ").concat(core.space[6], ";\n border-color: ").concat(invalid
|
|
42
42
|
? semantic.error.border
|
|
43
43
|
: checked
|
|
44
44
|
? core.color.blue.dark
|
|
@@ -46,7 +46,7 @@ var StyledRadioInput = styled_native_1.default.View(function (_a) {
|
|
|
46
46
|
});
|
|
47
47
|
var StyledRadioInputDot = styled_native_1.default.View(function (_a) {
|
|
48
48
|
var core = _a.theme.core, checked = _a.checked;
|
|
49
|
-
return "\n width: ".concat(core.space[3], ";\n height: ").concat(core.space[3], ";\n border-radius:
|
|
49
|
+
return "\n width: ".concat(core.space[3], ";\n height: ").concat(core.space[3], ";\n border-radius: ").concat(core.space[3], ";\n background: ").concat(core.color.blue.dark, ";\n opacity: ").concat(checked ? 1 : 0, ";\n ");
|
|
50
50
|
});
|
|
51
51
|
var Input = function (_a) {
|
|
52
52
|
var checked = _a.checked, invalid = _a.invalid, testID = _a.testID, rest = __rest(_a, ["checked", "invalid", "testID"]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare type SelectOption = {
|
|
2
2
|
label: string;
|
|
3
3
|
value: string;
|
|
4
|
+
category?: string;
|
|
4
5
|
};
|
|
5
6
|
export declare type SelectProps = {
|
|
6
7
|
defaultSelected?: SelectOption;
|
|
@@ -237,7 +238,7 @@ declare const SelectOption: import("styled-components").StyledComponent<typeof i
|
|
|
237
238
|
};
|
|
238
239
|
};
|
|
239
240
|
};
|
|
240
|
-
}, {
|
|
241
|
+
} & object, {
|
|
241
242
|
isLastOption: boolean;
|
|
242
243
|
}, never>;
|
|
243
244
|
export declare const Select: ({ options, defaultSelected, noOptionMessage, onSelected, hasError, testID, }: SelectProps) => JSX.Element;
|
|
@@ -37,18 +37,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
37
37
|
__setModuleDefault(result, mod);
|
|
38
38
|
return result;
|
|
39
39
|
};
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
if (ar || !(i in from)) {
|
|
43
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
44
|
-
ar[i] = from[i];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
42
|
};
|
|
49
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
44
|
exports.Select = void 0;
|
|
51
45
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
46
|
+
var lodash_groupby_1 = __importDefault(require("lodash.groupby"));
|
|
52
47
|
var react_1 = require("react");
|
|
53
48
|
var react_native_1 = require("react-native");
|
|
54
49
|
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
@@ -82,7 +77,11 @@ var RadioDot = styled_native_1.default.View(function (_a) {
|
|
|
82
77
|
});
|
|
83
78
|
var StyledP = (0, styled_native_1.default)(Text_1.P)(function (_a) {
|
|
84
79
|
var core = _a.theme.core;
|
|
85
|
-
return (0, styled_native_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-top: ", ";\n "], ["\n margin-top: ", ";\n "])), core.space[3]);
|
|
80
|
+
return (0, styled_native_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n margin-top: ", ";\n margin-bottom: ", ";\n "])), core.space[3], core.space[3]);
|
|
81
|
+
});
|
|
82
|
+
var StyledCategory = (0, styled_native_1.default)(Text_1.P)(function (_a) {
|
|
83
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
84
|
+
return (0, styled_native_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n font-size: ", ";\n color: ", "\n background-color: ", ";\n padding-horizontal: ", ";\n padding-vertical: ", ";\n "], ["\n font-size: ", ";\n color: ", "\n background-color: ", ";\n padding-horizontal: ", ";\n padding-vertical: ", ";\n "])), core.fontSize.label.large, semantic.message.secondary, semantic.surface.cutout, core.space[4], core.space[1]);
|
|
86
85
|
});
|
|
87
86
|
var Select = function (_a) {
|
|
88
87
|
var _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.defaultSelected, defaultSelected = _c === void 0 ? { label: '', value: 'default' } : _c, _d = _a.noOptionMessage, noOptionMessage = _d === void 0 ? 'No option selected' : _d, _e = _a.onSelected, onSelected = _e === void 0 ? function () { return null; } : _e, _f = _a.hasError, hasError = _f === void 0 ? false : _f, _g = _a.testID, testID = _g === void 0 ? 'select' : _g;
|
|
@@ -93,10 +92,12 @@ var Select = function (_a) {
|
|
|
93
92
|
setOpen(false);
|
|
94
93
|
setSelected(val);
|
|
95
94
|
};
|
|
96
|
-
var
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
var optionsByCategories = (0, lodash_groupby_1.default)(options, 'category');
|
|
96
|
+
var requiredOption = {
|
|
97
|
+
label: "-- ".concat(noOptionMessage, " --"),
|
|
98
|
+
value: 'default',
|
|
99
|
+
};
|
|
100
|
+
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { children: [(0, jsx_runtime_1.jsxs)(SelectInput, __assign({ testID: testID, hasError: hasError, onPress: function () { return setOpen(!isOpen); } }, { children: [(0, jsx_runtime_1.jsx)(Text_1.P, __assign({ 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, __assign({ 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, __assign({ nestedScrollEnabled: true }, { children: [(0, jsx_runtime_1.jsxs)(SelectOption, __assign({ accessibilityRole: "radio", onPress: function () { return handleOptionPress(requiredOption); } }, { children: [(0, jsx_runtime_1.jsx)(StyledP, { children: (0, jsx_runtime_1.jsx)(Text_1.Strong, { children: requiredOption.label }) }), (0, jsx_runtime_1.jsx)(Radio, __assign({ 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, __assign({ 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)(Text_1.Strong, { children: option.label }) }), (0, jsx_runtime_1.jsx)(Radio, __assign({ isChecked: selected.value === option.value }, { children: (0, jsx_runtime_1.jsx)(RadioDot, { isChecked: selected.value === option.value }) }))] }), option.label)); })] }, category)); })] })) }) }) }))] }));
|
|
100
101
|
};
|
|
101
102
|
exports.Select = Select;
|
|
102
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
103
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
@@ -232,7 +232,7 @@ declare const SubLabelText: import("react").ForwardRefExoticComponent<Pick<Omit<
|
|
|
232
232
|
};
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
|
-
}) | undefined;
|
|
235
|
+
} & object) | undefined;
|
|
236
236
|
} & {
|
|
237
237
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
238
238
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|