@ovotech/element-native 2.1.0 → 2.2.0-canary-1cac2ba-73
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.js +20 -19
- package/dist/components/Accordion/Icon.js +7 -10
- package/dist/components/Accordion/styles.d.ts +688 -46
- package/dist/components/Accordion/styles.js +56 -49
- package/dist/components/Badge/Badge.d.ts +237 -8
- package/dist/components/Badge/Badge.js +35 -16
- package/dist/components/CTAButton/CTAButton.d.ts +7 -12
- package/dist/components/CTAButton/CTAButton.js +18 -19
- package/dist/components/CTALink/CTALink.d.ts +3 -3
- package/dist/components/Card/Card.d.ts +228 -5
- package/dist/components/Card/Card.js +5 -25
- package/dist/components/Checkbox/Checkbox.js +14 -19
- package/dist/components/DataTable/DataTable.d.ts +3 -12
- package/dist/components/DataTable/DataTable.js +8 -71
- package/dist/components/DataTable/TableRow.d.ts +2 -0
- package/dist/components/DataTable/TableRow.js +33 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +16 -0
- package/dist/components/DataTable/styles.d.ts +2517 -0
- package/dist/components/DataTable/styles.js +77 -0
- package/dist/components/DataTable/types.d.ts +15 -0
- package/dist/components/DataTable/types.js +2 -0
- package/dist/components/DateField/DateField.js +9 -9
- package/dist/components/DescriptionList/DescriptionList.d.ts +10 -0
- package/dist/components/DescriptionList/DescriptionList.js +66 -0
- package/dist/components/DescriptionList/index.d.ts +1 -0
- package/dist/components/DescriptionList/index.js +6 -0
- package/dist/components/DescriptionList/styled.d.ts +241 -0
- package/dist/components/DescriptionList/styled.js +88 -0
- package/dist/components/Disclosure/Disclosure.js +7 -10
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +1 -1
- package/dist/components/ErrorText/ErrorText.d.ts +228 -1
- package/dist/components/ErrorText/ErrorText.js +1 -1
- package/dist/components/Field/Field.js +3 -3
- package/dist/components/Grid/Col.d.ts +228 -1
- package/dist/components/Grid/Row.d.ts +228 -1
- package/dist/components/Heading/Heading.js +8 -24
- package/dist/components/HintText/HintText.d.ts +228 -1
- package/dist/components/HintText/HintText.js +1 -1
- package/dist/components/Icon/Icon.d.ts +2 -3
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +13 -16
- package/dist/components/Input/PasswordInput.styled.d.ts +228 -1
- package/dist/components/Input/PasswordInput.styled.js +2 -5
- package/dist/components/Input/PasswordVisibilityToggle.js +2 -5
- package/dist/components/Input/{TelInput.d.ts → PhoneInput.d.ts} +2 -2
- package/dist/components/Input/{TelInput.js → PhoneInput.js} +3 -3
- package/dist/components/Input/TextareaInput.js +11 -9
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.js +3 -3
- package/dist/components/LabelText/LabelText.d.ts +228 -1
- package/dist/components/LabelText/LabelText.js +1 -1
- package/dist/components/List/List.d.ts +706 -3
- package/dist/components/List/List.js +18 -5
- package/dist/components/Margin/Margin.d.ts +228 -1
- package/dist/components/NavHeader/NavHeader.js +4 -4
- package/dist/components/Notification/Notification.d.ts +466 -20
- package/dist/components/Notification/Notification.js +32 -44
- package/dist/components/Radio/Radio.js +13 -29
- package/dist/components/SelectField/Select.d.ts +244 -0
- package/dist/components/SelectField/Select.js +101 -0
- package/dist/components/SelectField/SelectField.d.ts +7 -0
- package/dist/components/SelectField/SelectField.js +38 -0
- package/dist/components/SelectField/index.d.ts +1 -0
- package/dist/components/SelectField/index.js +5 -0
- package/dist/components/SkeletonLoading/Skeleton.d.ts +228 -1
- package/dist/components/SubLabelText/SubLabelText.d.ts +228 -1
- package/dist/components/SubLabelText/SubLabelText.js +1 -1
- package/dist/components/SummaryList/SummaryList.d.ts +4 -0
- package/dist/components/SummaryList/SummaryList.js +5 -0
- package/dist/components/Tabs/Tab.js +22 -19
- package/dist/components/Tabs/TabList.d.ts +11 -1
- package/dist/components/Tabs/TabList.js +19 -16
- package/dist/components/Tabs/TabPanel.js +32 -6
- package/dist/components/Tabs/Tabs.d.ts +8 -6
- package/dist/components/Tabs/Tabs.js +10 -6
- package/dist/components/Text/Text.d.ts +1140 -5
- package/dist/components/Text/Text.js +6 -10
- package/dist/components/TextField/PhoneField.d.ts +10 -0
- package/dist/components/TextField/PhoneField.js +56 -0
- package/dist/components/TextField/TelField.d.ts +4 -0
- package/dist/components/TextField/TelField.js +7 -2
- package/dist/components/TextField/index.d.ts +1 -0
- package/dist/components/TextField/index.js +3 -1
- package/dist/components/TextLink/TextLink.js +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/esm/components/Accordion/Accordion.js +23 -22
- package/dist/esm/components/Accordion/Icon.js +8 -8
- package/dist/esm/components/Accordion/styles.js +29 -48
- package/dist/esm/components/Badge/Badge.js +35 -16
- package/dist/esm/components/CTAButton/CTAButton.js +20 -21
- package/dist/esm/components/Card/Card.js +5 -25
- package/dist/esm/components/Checkbox/Checkbox.js +12 -20
- package/dist/esm/components/DataTable/DataTable.js +3 -66
- package/dist/esm/components/DataTable/TableRow.js +26 -0
- package/dist/esm/components/DataTable/index.js +2 -0
- package/dist/esm/components/DataTable/styles.js +51 -0
- package/dist/esm/components/DataTable/types.js +1 -0
- package/dist/esm/components/DateField/DateField.js +9 -9
- package/dist/esm/components/DescriptionList/DescriptionList.js +39 -0
- package/dist/esm/components/DescriptionList/index.js +1 -0
- package/dist/esm/components/DescriptionList/styled.js +57 -0
- package/dist/esm/components/Disclosure/Disclosure.js +9 -12
- package/dist/esm/components/ErrorText/ErrorText.js +1 -1
- package/dist/esm/components/Field/Field.js +3 -3
- package/dist/esm/components/Heading/Heading.js +8 -24
- package/dist/esm/components/HintText/HintText.js +1 -1
- package/dist/esm/components/Icon/Icon.js +2 -2
- package/dist/esm/components/Input/Input.js +15 -18
- package/dist/esm/components/Input/PasswordInput.styled.js +2 -5
- package/dist/esm/components/Input/PasswordVisibilityToggle.js +3 -6
- package/dist/esm/components/Input/{TelInput.js → PhoneInput.js} +2 -2
- package/dist/esm/components/Input/TextareaInput.js +11 -9
- package/dist/esm/components/Input/index.js +1 -1
- package/dist/esm/components/LabelText/LabelText.js +1 -1
- package/dist/esm/components/List/List.js +17 -5
- package/dist/esm/components/NavHeader/NavHeader.js +4 -4
- package/dist/esm/components/Notification/Notification.js +34 -46
- package/dist/esm/components/Radio/Radio.js +13 -29
- package/dist/esm/components/SelectField/Select.js +74 -0
- package/dist/esm/components/SelectField/SelectField.js +31 -0
- package/dist/esm/components/SelectField/index.js +1 -0
- package/dist/esm/components/SubLabelText/SubLabelText.js +1 -1
- package/dist/esm/components/SummaryList/SummaryList.js +5 -0
- package/dist/esm/components/Tabs/Tab.js +22 -16
- package/dist/esm/components/Tabs/TabList.js +18 -16
- package/dist/esm/components/Tabs/TabPanel.js +9 -6
- package/dist/esm/components/Tabs/Tabs.js +9 -6
- package/dist/esm/components/Text/Text.js +6 -10
- package/dist/esm/components/TextField/PhoneField.js +30 -0
- package/dist/esm/components/TextField/TelField.js +7 -2
- package/dist/esm/components/TextField/index.js +1 -0
- package/dist/esm/components/TextLink/TextLink.js +2 -2
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/providers/icons/Logo.js +6 -3
- package/dist/esm/theme/create-theme.js +2 -176
- package/dist/esm/theme/index.js +13 -2
- package/dist/providers/icons/Logo.js +5 -2
- package/dist/styled.native.d.ts +1363 -1
- package/dist/theme/create-theme.d.ts +1 -1
- package/dist/theme/create-theme.js +2 -176
- package/dist/theme/index.d.ts +228 -2
- package/dist/theme/index.js +13 -2
- package/dist/theme/theme.d.ts +1 -110
- package/package.json +9 -6
|
@@ -22,8 +22,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import React, { Children, cloneElement, } from 'react';
|
|
24
24
|
import { Dd, Dl, Dt } from '../List';
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated This component has been deprecated and will be removed in a future release.
|
|
27
|
+
* Please use the Description List (List/Dl) component instead.
|
|
28
|
+
* */
|
|
25
29
|
var SummaryList = function (_a) {
|
|
26
30
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
31
|
+
console.warn('SummaryList component has been deprecated and will be removed in a future release. Please use the DescriptionList component instead.');
|
|
27
32
|
return (React.createElement(Dl, __assign({}, rest), Children.map(children, function (child, index) {
|
|
28
33
|
return cloneElement(child, {
|
|
29
34
|
index: index,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
1
5
|
var __assign = (this && this.__assign) || function () {
|
|
2
6
|
__assign = Object.assign || function(t) {
|
|
3
7
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -22,24 +26,26 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
26
|
};
|
|
23
27
|
import React, { forwardRef } from 'react';
|
|
24
28
|
import { useBreakpoint, useFullWidth, } from '../../hooks';
|
|
25
|
-
import styled from '../../styled.native';
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
return "\n font-size: ".concat(tabs.tab.fontSize[smallAndUp ? 1 : 0], ";\n font-family: ").concat(tabs.tab.fontFamily, ";\n font-weight: ").concat(tabs.tab.fontWeight, ";\n background-color: ").concat(active ? tabs.tab.active.backgroundColor : tabs.tab.inactive.backgroundColor, ";\n line-height: ").concat("".concat(tabs.tab.lineHeight * 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");
|
|
29
|
+
import styled, { css } from '../../styled.native';
|
|
30
|
+
var TabText = styled.Text(function (_a) {
|
|
31
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
32
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-align: center;\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-align: center;\n padding: ", " ", ";\n "])), core.fontSize.body.small, core.fontFamily.bodyBold.native, core.lineHeight.body.small, semantic.message.base, core.space[3], core.space[smallAndUp ? 3 : 2]);
|
|
30
33
|
});
|
|
31
|
-
var
|
|
32
|
-
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,
|
|
33
|
-
return "flex-grow: "
|
|
34
|
+
var TabTouchable = styled.TouchableOpacity(function (_a) {
|
|
35
|
+
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, core = _f.core, semantic = _f.semantic, inline = _a.inline;
|
|
36
|
+
return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n flex-grow: ", ";\n border: ", " solid ", ";\n ", "\n ", "\n ", "\n ", "\n "], ["\n flex-grow: ", ";\n border: ", " solid ", ";\n ", "\n ", "\n ", "\n ", "\n "])), stretch ? 1 : 0, core.borderWidth.small, semantic.border.differentiated, active
|
|
37
|
+
? 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
|
|
38
|
+
? 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
|
|
39
|
+
? ''
|
|
40
|
+
: 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
|
|
41
|
+
? ''
|
|
42
|
+
: 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 "]))));
|
|
34
43
|
});
|
|
35
|
-
export var Tab = forwardRef(function (
|
|
36
|
-
|
|
37
|
-
_a, ref) {
|
|
38
|
-
var active = _a.active, fullWidth = _a.fullWidth, children = _a.children, rest = __rest(_a,
|
|
39
|
-
// eslint-disable-next-line
|
|
40
|
-
["active", "fullWidth", "children"]);
|
|
44
|
+
export var Tab = forwardRef(function (_a, ref) {
|
|
45
|
+
var active = _a.active, fullWidth = _a.fullWidth, children = _a.children, rest = __rest(_a, ["active", "fullWidth", "children"]);
|
|
41
46
|
var stretch = useFullWidth(fullWidth);
|
|
42
47
|
var breakpoints = useBreakpoint();
|
|
43
|
-
return (React.createElement(
|
|
44
|
-
React.createElement(
|
|
48
|
+
return (React.createElement(TabTouchable, __assign({ accessibilityRole: "tab", accessibilityState: { selected: active }, active: active, stretch: stretch, ref: ref }, rest),
|
|
49
|
+
React.createElement(TabText, __assign({ active: active }, breakpoints), children)));
|
|
45
50
|
});
|
|
51
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -25,24 +25,26 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
27
|
import React, { Children, cloneElement } from 'react';
|
|
28
|
-
import { View } from 'react-native';
|
|
29
28
|
import styled, { css } from '../../styled.native';
|
|
30
29
|
import { callAll } from '../../utils';
|
|
31
|
-
|
|
30
|
+
var StyledTabList = styled.View(function (_a) {
|
|
31
|
+
var core = _a.theme.core;
|
|
32
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n margin: -", ";\n "], ["\n flex-direction: row;\n margin: -", ";\n "])), core.borderWidth.small);
|
|
33
|
+
});
|
|
34
|
+
export var TabList = function (_a) {
|
|
32
35
|
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"]);
|
|
33
|
-
return (React.createElement(
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
return (React.createElement(StyledTabList, __assign({ accessibilityRole: "tablist" }, rest), Children.map(children, function (child, i) {
|
|
37
|
+
return child
|
|
38
|
+
? cloneElement(child, {
|
|
39
|
+
onPress: callAll(function () { return setActiveTab && setActiveTab(i); }, child.props.onPress),
|
|
40
|
+
active: activeTab === i,
|
|
41
|
+
fullWidth: fullWidth,
|
|
42
|
+
ref: tabRefs === null || tabRefs === void 0 ? void 0 : tabRefs[i],
|
|
43
|
+
first: i === 0,
|
|
44
|
+
last: Children.count(children) - 1 === i,
|
|
45
|
+
inline: inline,
|
|
46
|
+
})
|
|
47
|
+
: null;
|
|
43
48
|
})));
|
|
44
|
-
}
|
|
45
|
-
var card = _a.theme.card;
|
|
46
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n margin: -", ";\n "], ["\n flex-direction: row;\n margin: -", ";\n "])), card.borderWidth);
|
|
47
|
-
});
|
|
49
|
+
};
|
|
48
50
|
var templateObject_1;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
1
5
|
var __assign = (this && this.__assign) || function () {
|
|
2
6
|
__assign = Object.assign || function(t) {
|
|
3
7
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -21,14 +25,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
25
|
return t;
|
|
22
26
|
};
|
|
23
27
|
import React from 'react';
|
|
24
|
-
import {
|
|
25
|
-
import styled from '../../styled.native';
|
|
28
|
+
import styled, { css } from '../../styled.native';
|
|
26
29
|
var StyledView = styled.View(function (_a) {
|
|
27
|
-
var
|
|
28
|
-
return "\n padding: "
|
|
30
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
31
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", ";\n border-top-width: ", ";\n border-style: solid;\n border-color: ", ";\n z-index: -1;\n "], ["\n padding: ", ";\n border-top-width: ", ";\n border-style: solid;\n border-color: ", ";\n z-index: -1;\n "])), core.space[4], core.borderWidth.small, semantic.border.differentiated);
|
|
29
32
|
});
|
|
30
33
|
export var TabPanel = function (_a) {
|
|
31
34
|
var rest = __rest(_a, []);
|
|
32
|
-
|
|
33
|
-
return React.createElement(StyledView, __assign({}, breakpoints, rest));
|
|
35
|
+
return React.createElement(StyledView, __assign({}, rest));
|
|
34
36
|
};
|
|
37
|
+
var templateObject_1;
|
|
@@ -30,9 +30,15 @@ import { filterChildrenByType } from '../../utils';
|
|
|
30
30
|
import { Card } from '../Card';
|
|
31
31
|
import { TabList } from './TabList';
|
|
32
32
|
import { TabPanel } from './TabPanel';
|
|
33
|
-
|
|
33
|
+
var TabsCard = styled(Card)(function (_a) {
|
|
34
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, inline = _a.inline;
|
|
35
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0;\n border: ", " solid\n ", ";\n "], ["\n padding: 0;\n border: ", " solid\n ", ";\n "])), core.borderWidth.small, inline ? semantic.border.differentiated : 'transparent');
|
|
36
|
+
});
|
|
37
|
+
export var Tabs = function (_a) {
|
|
34
38
|
var children = _a.children, _b = _a.defaultSelected, defaultSelected = _b === void 0 ? 0 : _b, onSelected = _a.onSelected, fullWidth = _a.fullWidth, inline = _a.inline, rest = __rest(_a, ["children", "defaultSelected", "onSelected", "fullWidth", "inline"]);
|
|
35
39
|
var _c = useState(defaultSelected), activeTab = _c[0], setActiveTab = _c[1];
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
41
|
+
// @ts-ignore there is no way to properly type it
|
|
36
42
|
var tabList = filterChildrenByType(children, TabList);
|
|
37
43
|
var tabPanels = filterChildrenByType(children, TabPanel);
|
|
38
44
|
var tabRefs = tabPanels.map(function () { return createRef(); });
|
|
@@ -45,7 +51,7 @@ export var Tabs = styled(function (_a) {
|
|
|
45
51
|
loaded.current = true;
|
|
46
52
|
}
|
|
47
53
|
}, [onSelected, activeTab]);
|
|
48
|
-
return (React.createElement(
|
|
54
|
+
return (React.createElement(TabsCard, __assign({ inline: inline }, rest),
|
|
49
55
|
tabList.map(function (child) {
|
|
50
56
|
return cloneElement(child, {
|
|
51
57
|
setActiveTab: setActiveTab,
|
|
@@ -62,8 +68,5 @@ export var Tabs = styled(function (_a) {
|
|
|
62
68
|
hidden: activeTab !== index,
|
|
63
69
|
});
|
|
64
70
|
})));
|
|
65
|
-
}
|
|
66
|
-
var _b = _a.theme, card = _b.card, tabs = _b.tabs, inline = _a.inline;
|
|
67
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0;\n border: ", " solid\n ", ";\n "], ["\n padding: 0;\n border: ", " solid\n ", ";\n "])), card.borderWidth, inline ? card.borderColor : tabs.tab.borderColor);
|
|
68
|
-
});
|
|
71
|
+
};
|
|
69
72
|
var templateObject_1;
|
|
@@ -29,22 +29,18 @@ import { View } from 'react-native';
|
|
|
29
29
|
import styled, { css } from '../../styled.native';
|
|
30
30
|
import { styledComponentWithBreakpoints } from '../../utils';
|
|
31
31
|
var StyledP = styled.Text(function (_a) {
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
var lineHeight = smallAndUp ? text.p.lineHeight[1] : text.p.lineHeight[0];
|
|
35
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n "])), text.fontFamily, text.fontWeight, fontSize, lineHeight, text.color, smallAndUp ? text.p.marginTop[1] : text.p.marginTop[0], smallAndUp
|
|
36
|
-
? text.p.marginBottom[1]
|
|
37
|
-
: text.p.marginBottom[0]);
|
|
32
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
33
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-bottom: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-bottom: ", ";\n "])), core.fontFamily.body.native, core.fontSize.body[smallAndUp ? 'large' : 'small'], core.lineHeight.body[smallAndUp ? 'large' : 'small'], semantic.message.base, core.space[3]);
|
|
38
34
|
});
|
|
39
35
|
export var P = styledComponentWithBreakpoints(StyledP);
|
|
40
36
|
var StyledSmall = styled.Text(function (_a) {
|
|
41
|
-
var
|
|
42
|
-
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n "], ["\n font-size: ", ";\n "])), smallAndUp ?
|
|
37
|
+
var core = _a.theme.core, smallAndUp = _a.smallAndUp;
|
|
38
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n "])), core.fontSize.small[smallAndUp ? 'large' : 'small'], core.lineHeight.small[smallAndUp ? 'large' : 'small']);
|
|
43
39
|
});
|
|
44
40
|
export var Small = styledComponentWithBreakpoints(StyledSmall);
|
|
45
41
|
export var Strong = styled.Text(function (_a) {
|
|
46
|
-
var
|
|
47
|
-
return "\n font-family: ".concat(
|
|
42
|
+
var core = _a.theme.core;
|
|
43
|
+
return "\n font-family: ".concat(core.fontFamily.bodyBold.native, ";\n ");
|
|
48
44
|
});
|
|
49
45
|
export var Em = styled.Text(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: 'System font';\n font-style: italic;\n"], ["\n font-family: 'System font';\n font-style: italic;\n"])));
|
|
50
46
|
export var LineThrough = styled.Text(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n text-decoration: line-through;\n"], ["\n text-decoration: line-through;\n"])));
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React, { forwardRef } from 'react';
|
|
24
|
+
import { Field } from '../Field';
|
|
25
|
+
import { PhoneInput } from '../Input/PhoneInput';
|
|
26
|
+
export var PhoneField = forwardRef(function (_a, ref) {
|
|
27
|
+
var rest = __rest(_a, []);
|
|
28
|
+
return (React.createElement(Field, __assign({}, rest, { ref: ref }),
|
|
29
|
+
React.createElement(PhoneInput, null)));
|
|
30
|
+
});
|
|
@@ -22,9 +22,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import React, { forwardRef } from 'react';
|
|
24
24
|
import { Field } from '../Field';
|
|
25
|
-
import {
|
|
25
|
+
import { PhoneInput } from '../Input/PhoneInput';
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated This component has been deprecated and will be removed in a future release.
|
|
28
|
+
* Please use the PhoneField component instead.
|
|
29
|
+
* */
|
|
26
30
|
export var TelField = forwardRef(function (_a, ref) {
|
|
27
31
|
var rest = __rest(_a, []);
|
|
32
|
+
console.warn('TelField component has been deprecated and will be removed in a future release. Please use the PhoneField component instead.');
|
|
28
33
|
return (React.createElement(Field, __assign({}, rest, { ref: ref }),
|
|
29
|
-
React.createElement(
|
|
34
|
+
React.createElement(PhoneInput, null)));
|
|
30
35
|
});
|
|
@@ -2,6 +2,7 @@ export { CurrencyField } from './CurrencyField';
|
|
|
2
2
|
export { TextField } from './TextField';
|
|
3
3
|
export { NumberField } from './NumberField';
|
|
4
4
|
export { TelField } from './TelField';
|
|
5
|
+
export { PhoneField } from './PhoneField';
|
|
5
6
|
export { EmailField } from './EmailField';
|
|
6
7
|
export { PasswordField } from './PasswordField';
|
|
7
8
|
export { TextareaField } from './TextareaField';
|
|
@@ -30,8 +30,8 @@ import styled, { css, ThemeContext } from '../../styled.native';
|
|
|
30
30
|
import { getText } from '../../utils/utils';
|
|
31
31
|
import { Icon } from '../Icon';
|
|
32
32
|
var StyledText = styled.Text(function (_a) {
|
|
33
|
-
var
|
|
34
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n font-
|
|
33
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
34
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n color: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n "], ["\n font-family: ", ";\n color: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n "])), core.fontFamily.body.native, semantic.message.link, semantic.message.link);
|
|
35
35
|
});
|
|
36
36
|
var TextLink = forwardRef(function (_a, ref) {
|
|
37
37
|
var children = _a.children, _b = _a.opensInNewWindow, opensInNewWindow = _b === void 0 ? false : _b, accessibilityLabel = _a.accessibilityLabel, rest = __rest(_a, ["children", "opensInNewWindow", "accessibilityLabel"]);
|
|
@@ -5,6 +5,7 @@ export * from './Checkbox';
|
|
|
5
5
|
export * from './CTAButton';
|
|
6
6
|
export * from './CTALink';
|
|
7
7
|
export * from './DateField';
|
|
8
|
+
export * from './DescriptionList';
|
|
8
9
|
export * from './Disclosure';
|
|
9
10
|
export * from './Divider';
|
|
10
11
|
export * from './ErrorSummaryNotification';
|
|
@@ -26,3 +27,4 @@ export * from './TextField';
|
|
|
26
27
|
export * from './TextLink';
|
|
27
28
|
export * from './DataTable';
|
|
28
29
|
export * from './SkeletonLoading';
|
|
30
|
+
export * from './SelectField';
|
|
@@ -10,6 +10,9 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { Path, Svg } from 'react-native-svg';
|
|
14
|
-
export var Logo = function (props) { return (React.createElement(Svg, __assign({ viewBox: "0 0
|
|
15
|
-
React.createElement(Path, { fill: "#
|
|
13
|
+
import { Path, Svg, ClipPath, Defs } from 'react-native-svg';
|
|
14
|
+
export var Logo = function (props) { return (React.createElement(Svg, __assign({ viewBox: "0 0 48 48", width: 48, height: 48 }, props),
|
|
15
|
+
React.createElement(Path, { fill: "#0A9828", d: "M14.316 16.104c-1.837-1.34-4.186-2.084-6.733-2.084-2.262 0-4.364.589-6.1 1.66L0 10.143 37.861 0l3.767 14.063a12.37 12.37 0 00-1.054-.045c-2.562 0-4.924.752-6.771 2.109l.697-1.803h-7.311l-2.562 8.771c-.278.95-.565 1.982-.565 1.982l-.557-1.982-2.56-8.77h-7.316l.687 1.779zm22.654 8.023c0-2.05 1.382-3.76 3.606-3.76 1.711 0 2.919 1.013 3.387 2.414l.127.472c.058.28.092.57.092.873 0 2.2-1.484 3.71-3.606 3.71s-3.606-1.51-3.606-3.71zm-25.781 0c0-2.05-1.384-3.76-3.606-3.76-2.224 0-3.61 1.71-3.61 3.76 0 2.2 1.489 3.71 3.61 3.71 2.122 0 3.606-1.51 3.606-3.71zm18.866 1.69c.835 5.104 5.232 8.101 10.521 8.101 2.209 0 4.265-.52 5.972-1.5l1.456 5.44L10.143 48 6.357 33.865c.401.036.814.055 1.226.055 5.27 0 9.659-2.98 10.515-8.057l3 7.753h5.934l3.023-7.8z" }),
|
|
16
|
+
React.createElement(Defs, null,
|
|
17
|
+
React.createElement(ClipPath, { id: "a" },
|
|
18
|
+
React.createElement(Path, { fill: "#fff", d: "M0 0h48v48H0z" }))))); };
|
|
@@ -84,12 +84,6 @@ export var defaultTokens = {
|
|
|
84
84
|
standard: 1.5,
|
|
85
85
|
},
|
|
86
86
|
fontSizes: ['12px', '14px', '16px', '20px', '24px', '28px', '32px', '48px'],
|
|
87
|
-
fontWeights: {
|
|
88
|
-
normal: 400,
|
|
89
|
-
bold: 700,
|
|
90
|
-
semiBold: 600,
|
|
91
|
-
heading: 900,
|
|
92
|
-
},
|
|
93
87
|
colors: {
|
|
94
88
|
primary: brand.primary.base,
|
|
95
89
|
primaryAlt: brand.primary.darker,
|
|
@@ -150,7 +144,7 @@ export function createTheme(customTheme, additional) {
|
|
|
150
144
|
var mergeOptions = { arrayMerge: function (_, source) { return source; } };
|
|
151
145
|
var customThemeWithAdditional = deepMerge(customTheme, additional || {}, mergeOptions);
|
|
152
146
|
var theme = deepMerge(defaultTokens, customThemeWithAdditional, mergeOptions);
|
|
153
|
-
var fontSizes = theme.fontSizes, breakpoints = theme.breakpoints, colors = theme.colors,
|
|
147
|
+
var fontSizes = theme.fontSizes, breakpoints = theme.breakpoints, colors = theme.colors, fonts = theme.fonts, lineHeights = theme.lineHeights, space = theme.space, radii = theme.radii, shadows = theme.shadows, borderWidths = theme.borderWidths, responsiveFontSizes = theme.responsiveFontSizes, responsiveLineHeights = theme.responsiveLineHeights;
|
|
154
148
|
return deepMerge({
|
|
155
149
|
field: {
|
|
156
150
|
fontFamily: fonts.body,
|
|
@@ -160,21 +154,17 @@ export function createTheme(customTheme, additional) {
|
|
|
160
154
|
gap: space[2],
|
|
161
155
|
error: {
|
|
162
156
|
color: colors.error,
|
|
163
|
-
fontWeight: fontWeights.bold,
|
|
164
157
|
fontFamily: fonts.bold,
|
|
165
158
|
},
|
|
166
159
|
hint: {
|
|
167
|
-
fontWeight: fontWeights.normal,
|
|
168
160
|
color: colors.border,
|
|
169
161
|
},
|
|
170
162
|
label: {
|
|
171
163
|
color: colors.heading,
|
|
172
|
-
fontWeight: fontWeights.bold,
|
|
173
164
|
fontFamily: fonts.bold,
|
|
174
165
|
},
|
|
175
166
|
subLabel: {
|
|
176
167
|
color: colors.border,
|
|
177
|
-
fontWeight: fontWeights.normal,
|
|
178
168
|
},
|
|
179
169
|
legend: {
|
|
180
170
|
marginBottom: space[1],
|
|
@@ -194,7 +184,6 @@ export function createTheme(customTheme, additional) {
|
|
|
194
184
|
fontSize: responsiveFontSizes.body,
|
|
195
185
|
color: colors.body,
|
|
196
186
|
lineHeight: lineHeights.standard,
|
|
197
|
-
fontWeight: fontWeights.normal,
|
|
198
187
|
height: space[11],
|
|
199
188
|
borderColor: colors.border,
|
|
200
189
|
borderWidth: borderWidths.standard,
|
|
@@ -215,75 +204,6 @@ export function createTheme(customTheme, additional) {
|
|
|
215
204
|
borderColor: colors.borderMuted,
|
|
216
205
|
padding: [space[3], space[6], space[9]],
|
|
217
206
|
},
|
|
218
|
-
badge: {
|
|
219
|
-
fontWeight: fontWeights.bold,
|
|
220
|
-
fontFamily: fonts.bold,
|
|
221
|
-
lineHeight: lineHeights.standard,
|
|
222
|
-
paddingHorizontal: space[2],
|
|
223
|
-
borderRadius: radii.small,
|
|
224
|
-
fontSize: responsiveFontSizes.body,
|
|
225
|
-
variants: {
|
|
226
|
-
default: {
|
|
227
|
-
background: colors.primaryMuted,
|
|
228
|
-
foreground: colors.primaryAlt,
|
|
229
|
-
},
|
|
230
|
-
error: {
|
|
231
|
-
background: colors.errorMuted,
|
|
232
|
-
foreground: colors.errorAlt,
|
|
233
|
-
},
|
|
234
|
-
success: {
|
|
235
|
-
background: colors.successMuted,
|
|
236
|
-
foreground: colors.successAlt,
|
|
237
|
-
},
|
|
238
|
-
info: {
|
|
239
|
-
background: colors.infoMuted,
|
|
240
|
-
foreground: colors.infoAlt,
|
|
241
|
-
},
|
|
242
|
-
warning: {
|
|
243
|
-
background: colors.warningMuted,
|
|
244
|
-
foreground: colors.warningAlt,
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
},
|
|
248
|
-
cta: {
|
|
249
|
-
fontSize: responsiveFontSizes.body,
|
|
250
|
-
fontWeight: fontWeights.bold,
|
|
251
|
-
fontFamily: fonts.bold,
|
|
252
|
-
lineHeight: lineHeights.standard,
|
|
253
|
-
paddingVertical: space[2],
|
|
254
|
-
paddingHorizontal: space[3],
|
|
255
|
-
borderRadius: radii.small,
|
|
256
|
-
borderWidth: borderWidths.standard,
|
|
257
|
-
iconGap: space[1],
|
|
258
|
-
minHeight: space[11],
|
|
259
|
-
variants: {
|
|
260
|
-
primary: {
|
|
261
|
-
background: colors.primary,
|
|
262
|
-
foreground: colors.primaryContrast,
|
|
263
|
-
border: colors.primary,
|
|
264
|
-
},
|
|
265
|
-
secondary: {
|
|
266
|
-
background: colors.primaryContrast,
|
|
267
|
-
foreground: colors.primary,
|
|
268
|
-
border: colors.primary,
|
|
269
|
-
},
|
|
270
|
-
destructive: {
|
|
271
|
-
background: colors.error,
|
|
272
|
-
foreground: colors.errorContrast,
|
|
273
|
-
border: colors.error,
|
|
274
|
-
},
|
|
275
|
-
missionPrimary: {
|
|
276
|
-
background: colors.mission,
|
|
277
|
-
foreground: colors.missionContrast,
|
|
278
|
-
border: colors.mission,
|
|
279
|
-
},
|
|
280
|
-
missionSecondary: {
|
|
281
|
-
background: colors.primaryContrast,
|
|
282
|
-
foreground: colors.primary,
|
|
283
|
-
border: colors.primary,
|
|
284
|
-
},
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
207
|
checkbox: {
|
|
288
208
|
touchSize: space[11],
|
|
289
209
|
size: space[6],
|
|
@@ -298,44 +218,8 @@ export function createTheme(customTheme, additional) {
|
|
|
298
218
|
checkColor: colors.info,
|
|
299
219
|
errorColor: colors.error,
|
|
300
220
|
},
|
|
301
|
-
notification: {
|
|
302
|
-
borderRadius: radii.small,
|
|
303
|
-
borderWidth: borderWidths.heavy,
|
|
304
|
-
borderColor: colors.error,
|
|
305
|
-
background: colors.errorMuted,
|
|
306
|
-
paddingX: [space[2], space[2]],
|
|
307
|
-
paddingY: [space[3], space[6]],
|
|
308
|
-
dismiss: {
|
|
309
|
-
touchSize: space[6],
|
|
310
|
-
size: space[4],
|
|
311
|
-
icon: 'cross',
|
|
312
|
-
},
|
|
313
|
-
variants: {
|
|
314
|
-
error: {
|
|
315
|
-
borderColor: colors.errorMuted,
|
|
316
|
-
background: colors.errorMuted,
|
|
317
|
-
textColor: colors.errorAlt,
|
|
318
|
-
},
|
|
319
|
-
success: {
|
|
320
|
-
borderColor: colors.successMuted,
|
|
321
|
-
background: colors.successMuted,
|
|
322
|
-
textColor: colors.successAlt,
|
|
323
|
-
},
|
|
324
|
-
info: {
|
|
325
|
-
borderColor: colors.infoMuted,
|
|
326
|
-
background: colors.infoMuted,
|
|
327
|
-
textColor: colors.infoAlt,
|
|
328
|
-
},
|
|
329
|
-
warning: {
|
|
330
|
-
borderColor: colors.warningMuted,
|
|
331
|
-
background: colors.warningMuted,
|
|
332
|
-
textColor: colors.warningAlt,
|
|
333
|
-
},
|
|
334
|
-
},
|
|
335
|
-
},
|
|
336
221
|
text: {
|
|
337
222
|
fontFamily: fonts.body,
|
|
338
|
-
fontWeight: fontWeights.normal,
|
|
339
223
|
lineHeight: 1,
|
|
340
224
|
color: colors.body,
|
|
341
225
|
p: {
|
|
@@ -349,7 +233,6 @@ export function createTheme(customTheme, additional) {
|
|
|
349
233
|
lineHeight: responsiveLineHeights.small,
|
|
350
234
|
},
|
|
351
235
|
strong: {
|
|
352
|
-
fontWeight: fontWeights.bold,
|
|
353
236
|
fontFamily: fonts.bold,
|
|
354
237
|
},
|
|
355
238
|
},
|
|
@@ -366,19 +249,17 @@ export function createTheme(customTheme, additional) {
|
|
|
366
249
|
},
|
|
367
250
|
descriptionTerm: {
|
|
368
251
|
color: colors.heading,
|
|
369
|
-
fontWeight: fontWeights.bold,
|
|
370
252
|
fontFamily: fonts.bold,
|
|
371
253
|
marginTop: [space[3], space[4]],
|
|
372
254
|
marginBottom: [space[1], space[1]],
|
|
373
255
|
},
|
|
374
256
|
},
|
|
375
257
|
textLink: {
|
|
258
|
+
fontFamily: fonts.body,
|
|
376
259
|
color: colors.primary,
|
|
377
|
-
fontWeight: fontWeights.normal,
|
|
378
260
|
},
|
|
379
261
|
heading: {
|
|
380
262
|
fontFamily: fonts.heading,
|
|
381
|
-
fontWeight: fontWeights.heading,
|
|
382
263
|
color: colors.heading,
|
|
383
264
|
heading1: {
|
|
384
265
|
fontSize: responsiveFontSizes.level1,
|
|
@@ -420,7 +301,6 @@ export function createTheme(customTheme, additional) {
|
|
|
420
301
|
checkedBackground: colors.infoMuted,
|
|
421
302
|
errorColor: colors.error,
|
|
422
303
|
},
|
|
423
|
-
fontWeights: fontWeights,
|
|
424
304
|
fontSizes: fontSizes,
|
|
425
305
|
fonts: fonts,
|
|
426
306
|
responsiveFontSizes: responsiveFontSizes,
|
|
@@ -438,35 +318,6 @@ export function createTheme(customTheme, additional) {
|
|
|
438
318
|
iconGap: [space[1], space[2]],
|
|
439
319
|
panelGap: [space[2], space[3]],
|
|
440
320
|
},
|
|
441
|
-
dataTable: {
|
|
442
|
-
borderWidth: borderWidths.standard,
|
|
443
|
-
borderRadius: radii.small,
|
|
444
|
-
borderColor: colors.canvasMuted,
|
|
445
|
-
responsivePadding: {
|
|
446
|
-
vertical: [space[2], space[3]],
|
|
447
|
-
horizontal: [space[1], space[1]],
|
|
448
|
-
},
|
|
449
|
-
tableHeader: {
|
|
450
|
-
color: colors.heading,
|
|
451
|
-
backgroundColor: colors.canvas,
|
|
452
|
-
borderWidth: borderWidths.standard,
|
|
453
|
-
borderColor: colors.border,
|
|
454
|
-
fontWeight: fontWeights.bold,
|
|
455
|
-
fontFamily: fonts.bold,
|
|
456
|
-
},
|
|
457
|
-
tableCaption: {
|
|
458
|
-
color: colors.heading,
|
|
459
|
-
fontWeight: fontWeights.bold,
|
|
460
|
-
fontFamily: fonts.bold,
|
|
461
|
-
},
|
|
462
|
-
tableCell: {
|
|
463
|
-
color: colors.body,
|
|
464
|
-
},
|
|
465
|
-
tableRow: {
|
|
466
|
-
backgroundColor: colors.canvas,
|
|
467
|
-
stripeColor: colors.canvasMuted,
|
|
468
|
-
},
|
|
469
|
-
},
|
|
470
321
|
accordion: {
|
|
471
322
|
header: {
|
|
472
323
|
color: colors.primary,
|
|
@@ -475,30 +326,5 @@ export function createTheme(customTheme, additional) {
|
|
|
475
326
|
iconGap: space[3],
|
|
476
327
|
},
|
|
477
328
|
},
|
|
478
|
-
tabs: {
|
|
479
|
-
tab: {
|
|
480
|
-
borderTopWidth: borderWidths.heavy,
|
|
481
|
-
borderBottomWidth: borderWidths.heavy,
|
|
482
|
-
borderColor: colors.canvas,
|
|
483
|
-
fontSize: responsiveFontSizes.body,
|
|
484
|
-
fontWeight: fontWeights.bold,
|
|
485
|
-
fontFamily: fonts.bold,
|
|
486
|
-
lineHeight: lineHeights.standard,
|
|
487
|
-
paddingHorizontal: [space[4], space[4]],
|
|
488
|
-
paddingVertical: [space[3], space[3]],
|
|
489
|
-
active: {
|
|
490
|
-
borderColor: colors.primary,
|
|
491
|
-
foregroundColor: colors.primary,
|
|
492
|
-
backgroundColor: colors.canvas,
|
|
493
|
-
},
|
|
494
|
-
inactive: {
|
|
495
|
-
foregroundColor: colors.heading,
|
|
496
|
-
backgroundColor: colors.canvas,
|
|
497
|
-
},
|
|
498
|
-
hover: {
|
|
499
|
-
foregroundColor: colors.primaryAlt,
|
|
500
|
-
},
|
|
501
|
-
},
|
|
502
|
-
},
|
|
503
329
|
}, theme, mergeOptions);
|
|
504
330
|
}
|
package/dist/esm/theme/index.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
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 { themeNative } from '@ovotech/element-core';
|
|
1
13
|
import { pxToNumber } from '../utils';
|
|
2
14
|
import { createTheme } from './create-theme';
|
|
3
|
-
export * from './theme';
|
|
4
15
|
export * from './create-theme';
|
|
5
|
-
export var theme = createTheme({});
|
|
16
|
+
export var theme = createTheme(__assign({}, themeNative));
|
|
6
17
|
export var calculateLineHeight = function (size, lineHeight) {
|
|
7
18
|
return pxToNumber(size) * (lineHeight || 1) + 'px';
|
|
8
19
|
};
|