@ovotech/element-native 2.2.0-canary-668a0ee-91 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.d.ts +2 -2
- package/dist/components/Accordion/Accordion.js +24 -21
- package/dist/components/Accordion/Group.js +32 -10
- package/dist/components/Accordion/Icon.js +14 -19
- package/dist/components/Accordion/hooks.d.ts +1 -1
- package/dist/components/Accordion/hooks.js +26 -3
- package/dist/components/Accordion/styles.d.ts +46 -688
- package/dist/components/Accordion/styles.js +49 -56
- package/dist/components/Badge/Badge.d.ts +46 -54
- package/dist/components/Badge/Badge.js +20 -35
- package/dist/components/CTAButton/CTAButton.d.ts +12 -7
- package/dist/components/CTAButton/CTAButton.js +27 -23
- package/dist/components/CTALink/CTALink.d.ts +4 -4
- package/dist/components/CTALink/CTALink.js +27 -5
- package/dist/components/Card/Card.d.ts +45 -47
- package/dist/components/Card/Card.js +25 -5
- package/dist/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.js +57 -18
- package/dist/components/Checkbox/CheckboxField.js +37 -7
- package/dist/components/DataTable/DataTable.d.ts +12 -3
- package/dist/components/DataTable/DataTable.js +98 -11
- package/dist/components/DataTable/index.d.ts +0 -2
- package/dist/components/DataTable/index.js +0 -16
- package/dist/components/DateField/DateField.d.ts +2 -2
- package/dist/components/DateField/DateField.js +28 -9
- package/dist/components/DescriptionList/DescriptionList.js +32 -8
- package/dist/components/DescriptionList/styled.d.ts +44 -50
- package/dist/components/DescriptionList/styled.js +34 -9
- package/dist/components/Disclosure/Disclosure.d.ts +3 -3
- package/dist/components/Disclosure/Disclosure.js +18 -12
- package/dist/components/Divider/Divider.js +7 -4
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +1 -1
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.js +28 -6
- package/dist/components/ErrorText/ErrorText.d.ts +39 -45
- package/dist/components/ErrorText/ErrorText.js +4 -7
- package/dist/components/Field/Field.d.ts +2 -2
- package/dist/components/Field/Field.js +49 -18
- package/dist/components/FormGroup/FormGroup.js +3 -2
- package/dist/components/Grid/Col.d.ts +39 -45
- package/dist/components/Grid/Col.js +3 -4
- package/dist/components/Grid/Row.d.ts +41 -47
- package/dist/components/Grid/Row.js +10 -7
- package/dist/components/Heading/Heading.js +32 -21
- package/dist/components/HintText/HintText.d.ts +39 -45
- package/dist/components/HintText/HintText.js +4 -7
- package/dist/components/Icon/Icon.d.ts +4 -3
- package/dist/components/Icon/Icon.js +27 -5
- package/dist/components/Input/CurrencyInput.d.ts +6 -6
- package/dist/components/Input/CurrencyInput.js +25 -3
- package/dist/components/Input/EmailInput.d.ts +6 -6
- package/dist/components/Input/EmailInput.js +25 -3
- package/dist/components/Input/Input.d.ts +8 -8
- package/dist/components/Input/Input.js +32 -26
- package/dist/components/Input/NumberInput.d.ts +6 -6
- package/dist/components/Input/NumberInput.js +25 -3
- package/dist/components/Input/PasswordInput.d.ts +6 -6
- package/dist/components/Input/PasswordInput.js +25 -3
- package/dist/components/Input/PasswordInput.styled.d.ts +39 -45
- package/dist/components/Input/PasswordInput.styled.js +5 -2
- package/dist/components/Input/PasswordVisibilityToggle.js +29 -14
- package/dist/components/Input/TelInput.d.ts +10 -0
- package/dist/components/Input/TelInput.js +41 -0
- package/dist/components/Input/TextInput.d.ts +6 -6
- package/dist/components/Input/TextInput.js +25 -3
- package/dist/components/Input/TextareaInput.d.ts +6 -6
- package/dist/components/Input/TextareaInput.js +10 -13
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.js +3 -3
- package/dist/components/LabelText/LabelText.d.ts +39 -45
- package/dist/components/LabelText/LabelText.js +4 -5
- package/dist/components/List/List.d.ts +131 -149
- package/dist/components/List/List.js +44 -30
- package/dist/components/Margin/Margin.d.ts +39 -45
- package/dist/components/Margin/Margin.js +3 -3
- package/dist/components/NavHeader/NavHeader.d.ts +1 -1
- package/dist/components/NavHeader/NavHeader.js +35 -34
- package/dist/components/Notification/Notification.d.ts +100 -104
- package/dist/components/Notification/Notification.js +49 -32
- package/dist/components/Radio/Radio.d.ts +3 -3
- package/dist/components/Radio/Radio.js +61 -16
- package/dist/components/Radio/RadioField.js +41 -11
- package/dist/components/SkeletonLoading/Skeleton.d.ts +39 -45
- package/dist/components/SkeletonLoading/SkeletonAnimation.js +33 -22
- package/dist/components/SkeletonLoading/SkeletonCTA.js +5 -4
- package/dist/components/SkeletonLoading/SkeletonCircle.js +6 -4
- package/dist/components/SkeletonLoading/SkeletonHeading.js +5 -4
- package/dist/components/SkeletonLoading/SkeletonText.js +5 -5
- package/dist/components/Stack/Stack.js +28 -6
- package/dist/components/Stretch/Stretch.js +2 -2
- package/dist/components/SubLabelText/SubLabelText.d.ts +39 -45
- package/dist/components/SubLabelText/SubLabelText.js +4 -5
- package/dist/components/SummaryList/SummaryList.js +32 -8
- package/dist/components/Tabs/Tab.d.ts +4 -4
- package/dist/components/Tabs/Tab.js +20 -23
- package/dist/components/Tabs/TabList.d.ts +222 -11
- package/dist/components/Tabs/TabList.js +18 -22
- package/dist/components/Tabs/TabPanel.js +10 -33
- package/dist/components/Tabs/Tabs.d.ts +227 -8
- package/dist/components/Tabs/Tabs.js +23 -26
- package/dist/components/Text/Text.d.ts +204 -234
- package/dist/components/Text/Text.js +20 -17
- package/dist/components/TextField/CurrencyField.d.ts +6 -6
- package/dist/components/TextField/CurrencyField.js +26 -3
- package/dist/components/TextField/EmailField.d.ts +6 -6
- package/dist/components/TextField/EmailField.js +26 -3
- package/dist/components/TextField/NumberField.d.ts +6 -6
- package/dist/components/TextField/NumberField.js +26 -3
- package/dist/components/TextField/PasswordField.d.ts +6 -6
- package/dist/components/TextField/PasswordField.js +26 -3
- package/dist/components/TextField/TelField.d.ts +6 -10
- package/dist/components/TextField/TelField.js +27 -9
- package/dist/components/TextField/TextField.d.ts +6 -6
- package/dist/components/TextField/TextField.js +26 -3
- package/dist/components/TextField/TextareaField.d.ts +6 -6
- package/dist/components/TextField/TextareaField.js +26 -3
- package/dist/components/TextField/index.d.ts +0 -1
- package/dist/components/TextField/index.js +1 -3
- package/dist/components/TextLink/TextLink.d.ts +4 -4
- package/dist/components/TextLink/TextLink.js +8 -5
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -1
- package/dist/esm/components/Accordion/Accordion.js +26 -23
- package/dist/esm/components/Accordion/Group.js +9 -10
- package/dist/esm/components/Accordion/Icon.js +12 -20
- package/dist/esm/components/Accordion/hooks.js +3 -3
- package/dist/esm/components/Accordion/styles.js +48 -29
- package/dist/esm/components/Badge/Badge.js +17 -35
- package/dist/esm/components/CTAButton/CTAButton.js +28 -24
- package/dist/esm/components/CTALink/CTALink.js +4 -5
- package/dist/esm/components/Card/Card.js +25 -5
- package/dist/esm/components/Checkbox/Checkbox.js +34 -15
- package/dist/esm/components/Checkbox/CheckboxField.js +14 -7
- package/dist/esm/components/DataTable/DataTable.js +74 -10
- package/dist/esm/components/DataTable/index.js +0 -2
- package/dist/esm/components/DateField/DateField.js +28 -9
- package/dist/esm/components/DescriptionList/DescriptionList.js +9 -8
- package/dist/esm/components/DescriptionList/styled.js +31 -9
- package/dist/esm/components/Disclosure/Disclosure.js +19 -13
- package/dist/esm/components/Divider/Divider.js +4 -4
- package/dist/esm/components/ErrorSummaryNotification/ErrorSummaryNotification.js +5 -6
- package/dist/esm/components/ErrorText/ErrorText.js +4 -7
- package/dist/esm/components/Field/Field.js +26 -18
- package/dist/esm/components/FormGroup/FormGroup.js +3 -2
- package/dist/esm/components/Grid/Col.js +3 -4
- package/dist/esm/components/Grid/Row.js +7 -7
- package/dist/esm/components/Heading/Heading.js +29 -21
- package/dist/esm/components/HintText/HintText.js +4 -7
- package/dist/esm/components/Icon/Icon.js +4 -5
- package/dist/esm/components/Input/CurrencyInput.js +2 -3
- package/dist/esm/components/Input/EmailInput.js +2 -3
- package/dist/esm/components/Input/Input.js +33 -27
- package/dist/esm/components/Input/NumberInput.js +2 -3
- package/dist/esm/components/Input/PasswordInput.js +2 -3
- package/dist/esm/components/Input/PasswordInput.styled.js +5 -2
- package/dist/esm/components/Input/PasswordVisibilityToggle.js +7 -15
- package/dist/esm/components/Input/{PhoneInput.js → TelInput.js} +3 -4
- package/dist/esm/components/Input/TextInput.js +2 -3
- package/dist/esm/components/Input/TextareaInput.js +10 -13
- package/dist/esm/components/Input/index.js +1 -1
- package/dist/esm/components/LabelText/LabelText.js +4 -5
- package/dist/esm/components/List/List.js +45 -31
- package/dist/esm/components/Margin/Margin.js +3 -3
- package/dist/esm/components/NavHeader/NavHeader.js +32 -34
- package/dist/esm/components/Notification/Notification.js +50 -33
- package/dist/esm/components/Radio/Radio.js +38 -16
- package/dist/esm/components/Radio/RadioField.js +18 -11
- package/dist/esm/components/SkeletonLoading/SkeletonAnimation.js +11 -23
- package/dist/esm/components/SkeletonLoading/SkeletonCTA.js +5 -4
- package/dist/esm/components/SkeletonLoading/SkeletonCircle.js +6 -4
- package/dist/esm/components/SkeletonLoading/SkeletonHeading.js +5 -4
- package/dist/esm/components/SkeletonLoading/SkeletonText.js +5 -5
- package/dist/esm/components/Stack/Stack.js +5 -6
- package/dist/esm/components/Stretch/Stretch.js +2 -2
- package/dist/esm/components/SubLabelText/SubLabelText.js +4 -5
- package/dist/esm/components/SummaryList/SummaryList.js +9 -8
- package/dist/esm/components/Tabs/Tab.js +17 -23
- package/dist/esm/components/Tabs/TabList.js +18 -21
- package/dist/esm/components/Tabs/TabPanel.js +7 -10
- package/dist/esm/components/Tabs/Tabs.js +23 -25
- package/dist/esm/components/Text/Text.js +20 -17
- package/dist/esm/components/TextField/CurrencyField.js +3 -3
- package/dist/esm/components/TextField/EmailField.js +3 -3
- package/dist/esm/components/TextField/NumberField.js +3 -3
- package/dist/esm/components/TextField/PasswordField.js +3 -3
- package/dist/esm/components/TextField/TelField.js +4 -9
- package/dist/esm/components/TextField/TextField.js +3 -3
- package/dist/esm/components/TextField/TextareaField.js +3 -3
- package/dist/esm/components/TextField/index.js +0 -1
- package/dist/esm/components/TextLink/TextLink.js +8 -5
- package/dist/esm/components/index.js +0 -1
- package/dist/esm/hooks/use-breakpoint.js +4 -4
- package/dist/esm/providers/IconsProvider.js +2 -3
- package/dist/esm/providers/icons/ArrowDown.js +3 -2
- package/dist/esm/providers/icons/ArrowLeft.js +3 -2
- package/dist/esm/providers/icons/ArrowRight.js +3 -2
- package/dist/esm/providers/icons/ArrowUp.js +3 -2
- package/dist/esm/providers/icons/CaretDown.js +3 -2
- package/dist/esm/providers/icons/CaretLeft.js +3 -2
- package/dist/esm/providers/icons/CaretRight.js +3 -2
- package/dist/esm/providers/icons/CaretUp.js +3 -2
- package/dist/esm/providers/icons/Chart.js +3 -2
- package/dist/esm/providers/icons/Check.js +3 -2
- package/dist/esm/providers/icons/ChevronDown.js +3 -2
- package/dist/esm/providers/icons/ChevronLeft.js +3 -2
- package/dist/esm/providers/icons/ChevronLeftSmall.js +3 -2
- package/dist/esm/providers/icons/ChevronLeftSmallFirst.js +3 -2
- package/dist/esm/providers/icons/ChevronRight.js +3 -2
- package/dist/esm/providers/icons/ChevronRightSmall.js +3 -2
- package/dist/esm/providers/icons/ChevronRightSmallLast.js +3 -2
- package/dist/esm/providers/icons/ChevronUp.js +3 -2
- package/dist/esm/providers/icons/Cross.js +3 -2
- package/dist/esm/providers/icons/Dollar.js +3 -2
- package/dist/esm/providers/icons/Download.js +3 -2
- package/dist/esm/providers/icons/Electricity.js +3 -2
- package/dist/esm/providers/icons/Euro.js +3 -2
- package/dist/esm/providers/icons/Gas.js +4 -2
- package/dist/esm/providers/icons/Help.js +3 -2
- package/dist/esm/providers/icons/Hide.js +3 -2
- package/dist/esm/providers/icons/Home.js +3 -2
- package/dist/esm/providers/icons/Info.js +3 -2
- package/dist/esm/providers/icons/Link.js +4 -2
- package/dist/esm/providers/icons/Logo.js +4 -3
- package/dist/esm/providers/icons/Minus.js +3 -2
- package/dist/esm/providers/icons/NewWindow.js +3 -2
- package/dist/esm/providers/icons/PaymentCard.js +3 -2
- package/dist/esm/providers/icons/Plus.js +3 -2
- package/dist/esm/providers/icons/Pound.js +3 -2
- package/dist/esm/providers/icons/Search.js +3 -2
- package/dist/esm/providers/icons/Show.js +3 -2
- package/dist/esm/providers/icons/User.js +3 -2
- package/dist/esm/theme/create-theme.js +153 -0
- package/dist/esm/utils/utils.js +3 -7
- package/dist/hooks/use-breakpoint.js +4 -4
- package/dist/providers/IconsProvider.js +25 -3
- package/dist/providers/icons/ArrowDown.js +6 -2
- package/dist/providers/icons/ArrowLeft.js +6 -2
- package/dist/providers/icons/ArrowRight.js +6 -2
- package/dist/providers/icons/ArrowUp.js +6 -2
- package/dist/providers/icons/CaretDown.js +6 -2
- package/dist/providers/icons/CaretLeft.js +6 -2
- package/dist/providers/icons/CaretRight.js +6 -2
- package/dist/providers/icons/CaretUp.js +6 -2
- package/dist/providers/icons/Chart.js +6 -2
- package/dist/providers/icons/Check.js +6 -2
- package/dist/providers/icons/ChevronDown.js +6 -2
- package/dist/providers/icons/ChevronLeft.js +6 -2
- package/dist/providers/icons/ChevronLeftSmall.js +6 -2
- package/dist/providers/icons/ChevronLeftSmallFirst.js +6 -2
- package/dist/providers/icons/ChevronRight.js +6 -2
- package/dist/providers/icons/ChevronRightSmall.js +6 -2
- package/dist/providers/icons/ChevronRightSmallLast.js +6 -2
- package/dist/providers/icons/ChevronUp.js +6 -2
- package/dist/providers/icons/Cross.js +6 -2
- package/dist/providers/icons/Dollar.js +6 -2
- package/dist/providers/icons/Download.js +6 -2
- package/dist/providers/icons/Electricity.js +6 -2
- package/dist/providers/icons/Euro.js +6 -2
- package/dist/providers/icons/Gas.js +7 -2
- package/dist/providers/icons/Help.js +6 -2
- package/dist/providers/icons/Hide.js +6 -2
- package/dist/providers/icons/Home.js +6 -2
- package/dist/providers/icons/Info.js +6 -2
- package/dist/providers/icons/Link.js +7 -2
- package/dist/providers/icons/Logo.js +6 -2
- package/dist/providers/icons/Minus.js +6 -2
- package/dist/providers/icons/NewWindow.js +6 -2
- package/dist/providers/icons/PaymentCard.js +6 -2
- package/dist/providers/icons/Plus.js +6 -2
- package/dist/providers/icons/Pound.js +6 -2
- package/dist/providers/icons/Search.js +6 -2
- package/dist/providers/icons/Show.js +6 -2
- package/dist/providers/icons/User.js +6 -2
- package/dist/styled.native.d.ts +234 -270
- package/dist/theme/create-theme.js +153 -0
- package/dist/theme/index.d.ts +39 -45
- package/dist/theme/theme.d.ts +90 -0
- package/dist/utils/utils.d.ts +4 -5
- package/dist/utils/utils.js +26 -8
- package/package.json +5 -6
- package/dist/components/DataTable/TableRow.d.ts +0 -2
- package/dist/components/DataTable/TableRow.js +0 -31
- package/dist/components/DataTable/styles.d.ts +0 -2517
- package/dist/components/DataTable/styles.js +0 -77
- package/dist/components/DataTable/types.d.ts +0 -15
- package/dist/components/DataTable/types.js +0 -2
- package/dist/components/Input/PhoneInput.d.ts +0 -10
- package/dist/components/Input/PhoneInput.js +0 -19
- package/dist/components/SelectField/Select.d.ts +0 -244
- package/dist/components/SelectField/Select.js +0 -102
- package/dist/components/SelectField/SelectField.d.ts +0 -7
- package/dist/components/SelectField/SelectField.js +0 -33
- package/dist/components/SelectField/index.d.ts +0 -1
- package/dist/components/SelectField/index.js +0 -5
- package/dist/components/TextField/PhoneField.d.ts +0 -10
- package/dist/components/TextField/PhoneField.js +0 -33
- package/dist/esm/components/DataTable/TableRow.js +0 -27
- package/dist/esm/components/DataTable/styles.js +0 -51
- package/dist/esm/components/DataTable/types.js +0 -1
- package/dist/esm/components/SelectField/Select.js +0 -75
- package/dist/esm/components/SelectField/SelectField.js +0 -29
- package/dist/esm/components/SelectField/index.js +0 -1
- package/dist/esm/components/TextField/PhoneField.js +0 -30
|
@@ -10,6 +10,29 @@ 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
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
37
|
var t = {};
|
|
15
38
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -23,8 +46,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
46
|
};
|
|
24
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
48
|
exports.SummaryItem = exports.SummaryList = void 0;
|
|
26
|
-
var
|
|
27
|
-
var react_1 = require("react");
|
|
49
|
+
var react_1 = __importStar(require("react"));
|
|
28
50
|
var List_1 = require("../List");
|
|
29
51
|
/**
|
|
30
52
|
* @deprecated This component has been deprecated and will be removed in a future release.
|
|
@@ -33,15 +55,17 @@ var List_1 = require("../List");
|
|
|
33
55
|
var SummaryList = function (_a) {
|
|
34
56
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
35
57
|
console.warn('SummaryList component has been deprecated and will be removed in a future release. Please use the DescriptionList component instead.');
|
|
36
|
-
return (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
58
|
+
return (react_1.default.createElement(List_1.Dl, __assign({}, rest), react_1.Children.map(children, function (child, index) {
|
|
59
|
+
return (0, react_1.cloneElement)(child, {
|
|
60
|
+
index: index,
|
|
61
|
+
});
|
|
62
|
+
})));
|
|
41
63
|
};
|
|
42
64
|
exports.SummaryList = SummaryList;
|
|
43
65
|
var SummaryItem = function (_a) {
|
|
44
66
|
var label = _a.label, children = _a.children, index = _a.index, rest = __rest(_a, ["label", "children", "index"]);
|
|
45
|
-
return (
|
|
67
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
68
|
+
react_1.default.createElement(List_1.Dt, { style: index === 0 ? { marginTop: 0 } : undefined }, label),
|
|
69
|
+
react_1.default.createElement(List_1.Dd, __assign({}, rest), children)));
|
|
46
70
|
};
|
|
47
71
|
exports.SummaryItem = SummaryItem;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TouchableOpacity, GestureResponderEvent } from 'react-native';
|
|
3
3
|
import { FullWidthOptions } from '../../hooks';
|
|
4
|
-
export declare const Tab:
|
|
4
|
+
export declare const Tab: React.ForwardRefExoticComponent<{
|
|
5
5
|
active?: boolean | undefined;
|
|
6
6
|
fullWidth?: FullWidthOptions | undefined;
|
|
7
7
|
onPress?: ((event: GestureResponderEvent) => void) | undefined;
|
|
8
8
|
testID?: string | undefined;
|
|
9
9
|
} & {
|
|
10
|
-
children?:
|
|
11
|
-
} &
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
} & React.RefAttributes<TouchableOpacity>>;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
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
2
|
var __assign = (this && this.__assign) || function () {
|
|
7
3
|
__assign = Object.assign || function(t) {
|
|
8
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -48,30 +44,31 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
48
44
|
}
|
|
49
45
|
return t;
|
|
50
46
|
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
51
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
51
|
exports.Tab = void 0;
|
|
53
|
-
var
|
|
54
|
-
var react_1 = require("react");
|
|
52
|
+
var react_1 = __importStar(require("react"));
|
|
55
53
|
var hooks_1 = require("../../hooks");
|
|
56
|
-
var styled_native_1 =
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
var styled_native_1 = __importDefault(require("../../styled.native"));
|
|
55
|
+
var utils_1 = require("../../utils");
|
|
56
|
+
var StyledText = styled_native_1.default.Text(function (_a) {
|
|
57
|
+
var tabs = _a.theme.tabs, smallAndUp = _a.smallAndUp, active = _a.active;
|
|
58
|
+
return "\n font-size: ".concat(tabs.tab.fontSize[smallAndUp ? 1 : 0], ";\n font-family: ").concat(tabs.tab.fontFamily, ";\n background-color: ").concat(active ? tabs.tab.active.backgroundColor : tabs.tab.inactive.backgroundColor, ";\n line-height: ").concat("".concat(tabs.tab.lineHeight * (0, utils_1.pxToNumber)(tabs.tab.fontSize[0]), "px"), ";\n color: ").concat(active ? tabs.tab.active.foregroundColor : tabs.tab.inactive.foregroundColor, ";\n text-align: center;\n padding: ").concat("".concat(tabs.tab.paddingVertical[smallAndUp ? 1 : 0], " ").concat(tabs.tab.paddingHorizontal[smallAndUp ? 1 : 0]), ";\n");
|
|
60
59
|
});
|
|
61
|
-
var
|
|
62
|
-
var _b = _a.active, active = _b === void 0 ? false : _b, _c = _a.first, first = _c === void 0 ? false : _c, _d = _a.last, last = _d === void 0 ? false : _d, _e = _a.stretch, stretch = _e === void 0 ? false : _e, _f = _a.theme,
|
|
63
|
-
return
|
|
64
|
-
? (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-bottom-color: ", ";\n border-bottom-width: ", ";\n "], ["\n border-bottom-color: ", ";\n border-bottom-width: ", ";\n "])), semantic.message.branded, core.borderWidth.medium) : '', !inline
|
|
65
|
-
? (0, styled_native_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-top-color: transparent;\n border-top-width: 0;\n "], ["\n border-top-color: transparent;\n border-top-width: 0;\n "]))) : '', last && inline
|
|
66
|
-
? ''
|
|
67
|
-
: (0, styled_native_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border-right-color: transparent;\n border-right-width: 0;\n "], ["\n border-right-color: transparent;\n border-right-width: 0;\n "]))), first && inline
|
|
68
|
-
? ''
|
|
69
|
-
: (0, styled_native_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n border-left-color: transparent;\n border-left-width: 0;\n "], ["\n border-left-color: transparent;\n border-left-width: 0;\n "]))));
|
|
60
|
+
var StyledTouchableOpacity = styled_native_1.default.TouchableOpacity(function (_a) {
|
|
61
|
+
var _b = _a.active, active = _b === void 0 ? false : _b, _c = _a.first, first = _c === void 0 ? false : _c, _d = _a.last, last = _d === void 0 ? false : _d, _e = _a.stretch, stretch = _e === void 0 ? false : _e, _f = _a.theme, card = _f.card, tabs = _f.tabs, inline = _a.inline;
|
|
62
|
+
return "flex-grow: ".concat(stretch ? 1 : 0, ";\n border: ").concat(card.borderWidth, " solid ").concat(tabs.tab.borderColor, ";\n border-bottom-color: ").concat(active ? tabs.tab.active.backgroundColor : card.borderColor, ";\n border-top-color: ").concat(inline ? card.borderColor : tabs.tab.borderColor, ";\n border-right-color: ").concat(last && inline ? card.borderColor : tabs.tab.borderColor, "};\n border-left-color: ").concat(first && inline ? card.borderColor : tabs.tab.borderColor, "};\n border-right-width: ").concat(card.borderWidth, ";\n border-left-width: ").concat(first ? card.borderWidth : 0, ";\n background-color: ").concat(active ? tabs.tab.active.borderColor : tabs.tab.inactive.backgroundColor, ";\n padding-bottom: ").concat(tabs.tab.borderBottomWidth, ";\n");
|
|
70
63
|
});
|
|
71
|
-
exports.Tab = (0, react_1.forwardRef)(function (
|
|
72
|
-
|
|
64
|
+
exports.Tab = (0, react_1.forwardRef)(function (
|
|
65
|
+
// eslint-disable-next-line
|
|
66
|
+
_a, ref) {
|
|
67
|
+
var active = _a.active, fullWidth = _a.fullWidth, children = _a.children, rest = __rest(_a,
|
|
68
|
+
// eslint-disable-next-line
|
|
69
|
+
["active", "fullWidth", "children"]);
|
|
73
70
|
var stretch = (0, hooks_1.useFullWidth)(fullWidth);
|
|
74
71
|
var breakpoints = (0, hooks_1.useBreakpoint)();
|
|
75
|
-
return (
|
|
72
|
+
return (react_1.default.createElement(StyledTouchableOpacity, __assign({ accessibilityRole: "tab", accessibilityState: { selected: active }, active: active, stretch: stretch, ref: ref }, rest),
|
|
73
|
+
react_1.default.createElement(StyledText, __assign({ active: active }, breakpoints), children)));
|
|
76
74
|
});
|
|
77
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -1,11 +1,222 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
export declare const TabList: import("styled-components").StyledComponent<({ children, setActiveTab, activeTab, tabRefs, fullWidth, inline, ...rest }: any) => JSX.Element, import("../../theme/theme").Theme & {
|
|
2
|
+
core: {
|
|
3
|
+
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
4
|
+
borderWidth: Record<"small" | "medium" | "large", string>;
|
|
5
|
+
breakpoint: Record<"small" | "medium" | "large", string | number>;
|
|
6
|
+
mediaQuery: Record<"small" | "medium" | "large", string>;
|
|
7
|
+
space: Record<0 | 2 | 1 | 10 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
|
|
8
|
+
transition: Record<"medium" | "slow" | "fast", string>;
|
|
9
|
+
opacity: Record<"transparent" | "translucent" | "solid", string | number>;
|
|
10
|
+
color: Record<"sand" | "red" | "orange" | "yellow" | "lime" | "green" | "teal" | "blue" | "purple", {
|
|
11
|
+
lightest: string;
|
|
12
|
+
lighter: string;
|
|
13
|
+
light: string;
|
|
14
|
+
base: string;
|
|
15
|
+
dark: string;
|
|
16
|
+
darker: string;
|
|
17
|
+
darkest: string;
|
|
18
|
+
}> & {
|
|
19
|
+
brand: Record<string, string>;
|
|
20
|
+
};
|
|
21
|
+
fontFamily: Record<"heading" | "body" | "mono" | "bodyBold", {
|
|
22
|
+
native: string;
|
|
23
|
+
web: string;
|
|
24
|
+
}>;
|
|
25
|
+
fontWeight: Record<"bold" | "book" | "black", string | number>;
|
|
26
|
+
fontSize: Record<"small" | "body" | "label" | "heading1" | "heading2" | "heading3" | "heading4" | "lead", {
|
|
27
|
+
small: string | number;
|
|
28
|
+
large: string | number;
|
|
29
|
+
}>;
|
|
30
|
+
lineHeight: Record<"small" | "body" | "label" | "heading1" | "heading2" | "heading3" | "heading4" | "lead", {
|
|
31
|
+
small: string | number;
|
|
32
|
+
large: string | number;
|
|
33
|
+
}>;
|
|
34
|
+
};
|
|
35
|
+
semantic: {
|
|
36
|
+
surface: Record<"base" | "cutout" | "elevated", string>;
|
|
37
|
+
message: Record<"base" | "link" | "error" | "secondary" | "branded", string>;
|
|
38
|
+
border: Record<"graphic" | "differentiated" | "functional", string>;
|
|
39
|
+
focus: Record<"outline" | "surface", string>;
|
|
40
|
+
inverted: Record<"surface" | "border", string> & {
|
|
41
|
+
message: Record<"base" | "link" | "secondary" | "branded", string>;
|
|
42
|
+
};
|
|
43
|
+
success: {
|
|
44
|
+
border: string;
|
|
45
|
+
surface: string;
|
|
46
|
+
message: {
|
|
47
|
+
base: string;
|
|
48
|
+
secondary: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
warning: {
|
|
52
|
+
border: string;
|
|
53
|
+
surface: string;
|
|
54
|
+
message: {
|
|
55
|
+
base: string;
|
|
56
|
+
secondary: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
error: {
|
|
60
|
+
border: string;
|
|
61
|
+
surface: string;
|
|
62
|
+
message: {
|
|
63
|
+
base: string;
|
|
64
|
+
secondary: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
info: {
|
|
68
|
+
border: string;
|
|
69
|
+
surface: string;
|
|
70
|
+
message: {
|
|
71
|
+
base: string;
|
|
72
|
+
secondary: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
electricity: {
|
|
76
|
+
border: string;
|
|
77
|
+
surface: string;
|
|
78
|
+
message: {
|
|
79
|
+
base: string;
|
|
80
|
+
secondary: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
gas: {
|
|
84
|
+
border: string;
|
|
85
|
+
surface: string;
|
|
86
|
+
message: {
|
|
87
|
+
base: string;
|
|
88
|
+
secondary: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
component: {
|
|
93
|
+
heading1: {
|
|
94
|
+
fontFamily: string;
|
|
95
|
+
fontWeight: string | number;
|
|
96
|
+
fontSize: {
|
|
97
|
+
small: string | number;
|
|
98
|
+
large: string | number;
|
|
99
|
+
};
|
|
100
|
+
lineHeight: {
|
|
101
|
+
small: string | number;
|
|
102
|
+
large: string | number;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
heading2: {
|
|
106
|
+
fontFamily: string;
|
|
107
|
+
fontWeight: string | number;
|
|
108
|
+
fontSize: {
|
|
109
|
+
small: string | number;
|
|
110
|
+
large: string | number;
|
|
111
|
+
};
|
|
112
|
+
lineHeight: {
|
|
113
|
+
small: string | number;
|
|
114
|
+
large: string | number;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
heading3: {
|
|
118
|
+
fontFamily: string;
|
|
119
|
+
fontWeight: string | number;
|
|
120
|
+
fontSize: {
|
|
121
|
+
small: string | number;
|
|
122
|
+
large: string | number;
|
|
123
|
+
};
|
|
124
|
+
lineHeight: {
|
|
125
|
+
small: string | number;
|
|
126
|
+
large: string | number;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
heading4: {
|
|
130
|
+
fontFamily: string;
|
|
131
|
+
fontWeight: string | number;
|
|
132
|
+
fontSize: {
|
|
133
|
+
small: string | number;
|
|
134
|
+
large: string | number;
|
|
135
|
+
};
|
|
136
|
+
lineHeight: {
|
|
137
|
+
small: string | number;
|
|
138
|
+
large: string | number;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
lead: {
|
|
142
|
+
fontFamily: string;
|
|
143
|
+
fontWeight: string | number;
|
|
144
|
+
fontSize: {
|
|
145
|
+
small: string | number;
|
|
146
|
+
large: string | number;
|
|
147
|
+
};
|
|
148
|
+
lineHeight: {
|
|
149
|
+
small: string | number;
|
|
150
|
+
large: string | number;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
body: {
|
|
154
|
+
fontFamily: string;
|
|
155
|
+
fontWeight: string | number;
|
|
156
|
+
fontSize: {
|
|
157
|
+
small: string | number;
|
|
158
|
+
large: string | number;
|
|
159
|
+
};
|
|
160
|
+
lineHeight: {
|
|
161
|
+
small: string | number;
|
|
162
|
+
large: string | number;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
small: {
|
|
166
|
+
fontFamily: string;
|
|
167
|
+
fontWeight: string | number;
|
|
168
|
+
fontSize: {
|
|
169
|
+
small: string | number;
|
|
170
|
+
large: string | number;
|
|
171
|
+
};
|
|
172
|
+
lineHeight: {
|
|
173
|
+
small: string | number;
|
|
174
|
+
large: string | number;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
label: {
|
|
178
|
+
fontFamily: string;
|
|
179
|
+
fontWeight: string | number;
|
|
180
|
+
fontSize: {
|
|
181
|
+
small: string | number;
|
|
182
|
+
large: string | number;
|
|
183
|
+
};
|
|
184
|
+
lineHeight: {
|
|
185
|
+
small: string | number;
|
|
186
|
+
large: string | number;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
cta: {
|
|
190
|
+
primary: {
|
|
191
|
+
message: string;
|
|
192
|
+
surface: string;
|
|
193
|
+
messageHover: string;
|
|
194
|
+
surfaceHover: string;
|
|
195
|
+
messageFocused: string;
|
|
196
|
+
surfaceFocused: string;
|
|
197
|
+
outlineFocused: string;
|
|
198
|
+
backgroundFocused: string;
|
|
199
|
+
};
|
|
200
|
+
secondary: {
|
|
201
|
+
message: string;
|
|
202
|
+
surface: string;
|
|
203
|
+
messageHover: string;
|
|
204
|
+
surfaceHover: string;
|
|
205
|
+
messageFocused: string;
|
|
206
|
+
surfaceFocused: string;
|
|
207
|
+
outlineFocused: string;
|
|
208
|
+
backgroundFocused: string;
|
|
209
|
+
};
|
|
210
|
+
destructive: {
|
|
211
|
+
message: string;
|
|
212
|
+
surface: string;
|
|
213
|
+
messageHover: string;
|
|
214
|
+
surfaceHover: string;
|
|
215
|
+
messageFocused: string;
|
|
216
|
+
surfaceFocused: string;
|
|
217
|
+
outlineFocused: string;
|
|
218
|
+
backgroundFocused: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
}, {}, never>;
|
|
@@ -50,29 +50,25 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
50
50
|
};
|
|
51
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
52
|
exports.TabList = void 0;
|
|
53
|
-
var
|
|
54
|
-
var
|
|
53
|
+
var react_1 = __importStar(require("react"));
|
|
54
|
+
var react_native_1 = require("react-native");
|
|
55
55
|
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
56
56
|
var utils_1 = require("../../utils");
|
|
57
|
-
|
|
58
|
-
var core = _a.theme.core;
|
|
59
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n margin: -", ";\n "], ["\n flex-direction: row;\n margin: -", ";\n "])), core.borderWidth.small);
|
|
60
|
-
});
|
|
61
|
-
var TabList = function (_a) {
|
|
57
|
+
exports.TabList = (0, styled_native_1.default)(function (_a) {
|
|
62
58
|
var children = _a.children, setActiveTab = _a.setActiveTab, activeTab = _a.activeTab, tabRefs = _a.tabRefs, fullWidth = _a.fullWidth, inline = _a.inline, rest = __rest(_a, ["children", "setActiveTab", "activeTab", "tabRefs", "fullWidth", "inline"]);
|
|
63
|
-
return ((
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
59
|
+
return (react_1.default.createElement(react_native_1.View, __assign({ accessibilityRole: "tablist" }, rest), react_1.Children.map(children, function (child, i) {
|
|
60
|
+
return (0, react_1.cloneElement)(child, {
|
|
61
|
+
onPress: (0, utils_1.callAll)(function () { return setActiveTab && setActiveTab(i); }, child.props.onPress),
|
|
62
|
+
active: activeTab === i,
|
|
63
|
+
fullWidth: fullWidth,
|
|
64
|
+
ref: tabRefs[i],
|
|
65
|
+
first: i === 0,
|
|
66
|
+
last: react_1.Children.count(children) - 1 === i,
|
|
67
|
+
inline: inline,
|
|
68
|
+
});
|
|
69
|
+
})));
|
|
70
|
+
})(function (_a) {
|
|
71
|
+
var card = _a.theme.card;
|
|
72
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n margin: -", ";\n "], ["\n flex-direction: row;\n margin: -", ";\n "])), card.borderWidth);
|
|
73
|
+
});
|
|
78
74
|
var templateObject_1;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
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
2
|
var __assign = (this && this.__assign) || function () {
|
|
7
3
|
__assign = Object.assign || function(t) {
|
|
8
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -14,29 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
14
10
|
};
|
|
15
11
|
return __assign.apply(this, arguments);
|
|
16
12
|
};
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
13
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
41
14
|
var t = {};
|
|
42
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -48,17 +21,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
48
21
|
}
|
|
49
22
|
return t;
|
|
50
23
|
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
51
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
28
|
exports.TabPanel = void 0;
|
|
53
|
-
var
|
|
54
|
-
var
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var hooks_1 = require("../../hooks");
|
|
31
|
+
var styled_native_1 = __importDefault(require("../../styled.native"));
|
|
55
32
|
var StyledView = styled_native_1.default.View(function (_a) {
|
|
56
|
-
var
|
|
57
|
-
return
|
|
33
|
+
var card = _a.theme.card, smallAndUp = _a.smallAndUp;
|
|
34
|
+
return "\n padding: ".concat(card.padding[smallAndUp ? 1 : 0], ";\n border-top-width: ").concat(card.borderWidth, ";\n border-style: solid;\n border-color: ").concat(card.borderColor, ";\n z-index: -1;\n ");
|
|
58
35
|
});
|
|
59
36
|
var TabPanel = function (_a) {
|
|
60
37
|
var rest = __rest(_a, []);
|
|
61
|
-
|
|
38
|
+
var breakpoints = (0, hooks_1.useBreakpoint)();
|
|
39
|
+
return react_1.default.createElement(StyledView, __assign({}, breakpoints, rest));
|
|
62
40
|
};
|
|
63
41
|
exports.TabPanel = TabPanel;
|
|
64
|
-
var templateObject_1;
|