@ovotech/element-native 4.4.9 → 5.0.0-canary-bcb1788-338
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 +11 -9
- package/dist/components/Accordion/Icon.d.ts +2 -1
- package/dist/components/Accordion/Icon.js +9 -6
- package/dist/components/Accordion/styles.d.ts +1520 -1525
- package/dist/components/Accordion/styles.js +17 -11
- package/dist/components/Accordion/types.d.ts +2 -1
- package/dist/components/ActionCard/ActionCard.d.ts +2 -2
- package/dist/components/ActionCard/ActionCard.js +21 -21
- package/dist/components/ActionCard/CloseIconShape.js +2 -2
- package/dist/components/ActionCard/IndicatorIconShape.js +2 -2
- package/dist/components/ActionList/ActionList.d.ts +9 -3
- package/dist/components/ActionList/ActionList.js +7 -6
- package/dist/components/ActionList/styled.d.ts +5116 -3430
- package/dist/components/ActionList/styled.js +36 -19
- package/dist/components/Badge/Badge.d.ts +511 -508
- package/dist/components/Badge/Badge.js +24 -34
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Card/Card.d.ts +9 -1
- package/dist/components/Card/Card.js +5 -6
- package/dist/components/Checkbox/Checkbox.js +13 -13
- package/dist/components/DataTable/styles.d.ts +6527 -6553
- package/dist/components/DataTable/styles.js +27 -27
- package/dist/components/DateField/DateField.d.ts +5 -4
- package/dist/components/DateField/DateField.js +20 -10
- package/dist/components/Disclosure/Disclosure.js +6 -6
- package/dist/components/Divider/Divider.js +3 -3
- package/dist/components/Em/Em.d.ts +493 -495
- package/dist/components/Em/Em.js +1 -1
- package/dist/components/ErrorText/ErrorText.d.ts +493 -495
- package/dist/components/ErrorText/ErrorText.js +6 -4
- package/dist/components/Field/Field.js +1 -1
- package/dist/components/Grid/Col.d.ts +493 -495
- package/dist/components/Grid/Col.js +10 -16
- package/dist/components/Grid/Row.d.ts +493 -495
- package/dist/components/Grid/Row.js +7 -6
- package/dist/components/HintText/HintText.d.ts +493 -495
- package/dist/components/HintText/HintText.js +6 -4
- package/dist/components/Icon/Icon.d.ts +1 -3
- package/dist/components/Icon/Icon.js +3 -5
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +16 -11
- package/dist/components/LabelText/LabelText.d.ts +493 -495
- package/dist/components/LabelText/LabelText.js +7 -4
- package/dist/components/LineThrough/LineThrough.d.ts +493 -495
- package/dist/components/List/styled.d.ts +2017 -2025
- package/dist/components/List/styled.js +11 -11
- package/dist/components/Margin/Margin.d.ts +493 -495
- package/dist/components/Margin/Margin.js +4 -2
- package/dist/components/NavHeader/NavHeader.d.ts +7 -1
- package/dist/components/NavHeader/NavHeader.js +2 -12
- package/dist/components/NavHeader/NavHeader.styles.d.ts +3489 -4636
- package/dist/components/NavHeader/NavHeader.styles.js +22 -32
- package/dist/components/Notification/Notification.d.ts +987 -991
- package/dist/components/Notification/Notification.js +18 -18
- package/dist/components/P/P.d.ts +7 -3
- package/dist/components/P/P.js +4 -2
- package/dist/components/PasswordInput/PasswordInput.styled.d.ts +493 -495
- package/dist/components/PasswordInput/PasswordInput.styled.js +2 -2
- package/dist/components/ProductCarousel/NavigationDots.js +4 -4
- package/dist/components/ProductCarousel/ProductCarousel.js +4 -4
- package/dist/components/Radio/Radio.js +11 -11
- package/dist/components/RadioCard/RadioCard.d.ts +0 -1
- package/dist/components/RadioCard/RadioCard.js +15 -15
- package/dist/components/SegmentedControls/SegmentedControls.js +5 -5
- package/dist/components/SegmentedControls/components/SegmentButton.js +4 -4
- package/dist/components/SelectField/Select.d.ts +493 -495
- package/dist/components/SelectField/Select.js +22 -24
- package/dist/components/SkeletonCircle/SkeletonCircle.d.ts +2 -2
- package/dist/components/SkeletonCircle/SkeletonCircle.js +6 -6
- package/dist/components/SkeletonHeading/SkeletonHeading.js +4 -4
- package/dist/components/SkeletonText/SkeletonText.js +4 -4
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Stack/Stack.js +4 -2
- package/dist/components/Strong/Strong.d.ts +493 -495
- package/dist/components/Strong/Strong.js +2 -2
- package/dist/components/SubLabelText/SubLabelText.d.ts +493 -495
- package/dist/components/SubLabelText/SubLabelText.js +4 -4
- package/dist/components/Tabs/Tab.js +8 -13
- package/dist/components/Tabs/TabList.d.ts +1 -2
- package/dist/components/Tabs/TabList.js +3 -6
- package/dist/components/Tabs/TabPanel.js +2 -2
- package/dist/components/Tabs/Tabs.d.ts +1 -2
- package/dist/components/Tabs/Tabs.js +4 -7
- package/dist/components/TextareaInput/TextareaInput.js +2 -2
- package/dist/components/Toast/Toast.js +16 -24
- package/dist/components/Toggle/Toggle.js +5 -9
- package/dist/components/Toggle/styles.d.ts +2023 -2031
- package/dist/components/Toggle/styles.js +10 -8
- package/dist/components/index.d.ts +6 -20
- package/dist/components/index.js +6 -20
- package/dist/esm/components/Accordion/Accordion.js +10 -8
- package/dist/esm/components/Accordion/Icon.js +9 -6
- package/dist/esm/components/Accordion/styles.js +17 -11
- package/dist/esm/components/ActionCard/ActionCard.js +22 -22
- package/dist/esm/components/ActionCard/CloseIconShape.js +2 -2
- package/dist/esm/components/ActionCard/IndicatorIconShape.js +2 -2
- package/dist/esm/components/ActionList/ActionList.js +9 -8
- package/dist/esm/components/ActionList/styled.js +35 -18
- package/dist/esm/components/Badge/Badge.js +25 -35
- package/dist/esm/components/Card/Card.js +5 -6
- package/dist/esm/components/Checkbox/Checkbox.js +13 -13
- package/dist/esm/components/DataTable/styles.js +27 -27
- package/dist/esm/components/DateField/DateField.js +20 -10
- package/dist/esm/components/Disclosure/Disclosure.js +6 -6
- package/dist/esm/components/Divider/Divider.js +3 -3
- package/dist/esm/components/Em/Em.js +1 -1
- package/dist/esm/components/ErrorText/ErrorText.js +6 -4
- package/dist/esm/components/Field/Field.js +1 -1
- package/dist/esm/components/Grid/Col.js +10 -16
- package/dist/esm/components/Grid/Row.js +7 -6
- package/dist/esm/components/HintText/HintText.js +6 -4
- package/dist/esm/components/Icon/Icon.js +3 -5
- package/dist/esm/components/Input/Input.js +16 -11
- package/dist/esm/components/LabelText/LabelText.js +7 -4
- package/dist/esm/components/List/styled.js +11 -11
- package/dist/esm/components/Margin/Margin.js +4 -2
- package/dist/esm/components/NavHeader/NavHeader.js +3 -13
- package/dist/esm/components/NavHeader/NavHeader.styles.js +21 -31
- package/dist/esm/components/Notification/Notification.js +18 -18
- package/dist/esm/components/P/P.js +4 -2
- package/dist/esm/components/PasswordInput/PasswordInput.styled.js +2 -2
- package/dist/esm/components/ProductCarousel/NavigationDots.js +4 -4
- package/dist/esm/components/ProductCarousel/ProductCarousel.js +4 -4
- package/dist/esm/components/Radio/Radio.js +11 -11
- package/dist/esm/components/RadioCard/RadioCard.js +15 -15
- package/dist/esm/components/SegmentedControls/SegmentedControls.js +5 -5
- package/dist/esm/components/SegmentedControls/components/SegmentButton.js +4 -4
- package/dist/esm/components/SelectField/Select.js +23 -25
- package/dist/esm/components/SkeletonCircle/SkeletonCircle.js +6 -6
- package/dist/esm/components/SkeletonHeading/SkeletonHeading.js +3 -3
- package/dist/esm/components/SkeletonText/SkeletonText.js +4 -4
- package/dist/esm/components/Spinner/Spinner.js +2 -2
- package/dist/esm/components/Stack/Stack.js +4 -2
- package/dist/esm/components/Strong/Strong.js +2 -2
- package/dist/esm/components/SubLabelText/SubLabelText.js +4 -4
- package/dist/esm/components/Tabs/Tab.js +8 -13
- package/dist/esm/components/Tabs/TabList.js +3 -6
- package/dist/esm/components/Tabs/TabPanel.js +2 -2
- package/dist/esm/components/Tabs/Tabs.js +4 -7
- package/dist/esm/components/TextareaInput/TextareaInput.js +2 -2
- package/dist/esm/components/Toast/Toast.js +16 -24
- package/dist/esm/components/Toggle/Toggle.js +5 -9
- package/dist/esm/components/Toggle/styles.js +10 -8
- package/dist/esm/components/index.js +6 -20
- package/dist/esm/hooks/use-breakpoint.js +1 -1
- package/dist/esm/providers/IconsProvider.js +1 -1
- package/dist/esm/providers/index.js +3 -1
- package/dist/hooks/use-breakpoint.js +1 -1
- package/dist/providers/IconsProvider.d.ts +1 -1
- package/dist/providers/index.d.ts +3 -1
- package/dist/providers/index.js +3 -1
- package/dist/styled.native.d.ts +3012 -3023
- package/package.json +3 -3
- package/dist/components/CTAButton/CTAButton.d.ts +0 -20
- package/dist/components/CTAButton/CTAButton.js +0 -119
- package/dist/components/CTAButton/index.d.ts +0 -1
- package/dist/components/CTAButton/index.js +0 -8
- package/dist/components/CTALink/CTALink.d.ts +0 -11
- package/dist/components/CTALink/CTALink.js +0 -23
- package/dist/components/CTALink/index.d.ts +0 -1
- package/dist/components/CTALink/index.js +0 -7
- package/dist/components/DescriptionList/DescriptionList.d.ts +0 -10
- package/dist/components/DescriptionList/DescriptionList.js +0 -44
- package/dist/components/DescriptionList/index.d.ts +0 -1
- package/dist/components/DescriptionList/index.js +0 -6
- package/dist/components/DescriptionList/styled.d.ts +0 -570
- package/dist/components/DescriptionList/styled.js +0 -86
- package/dist/components/Display0/Display0.d.ts +0 -5
- package/dist/components/Display0/Display0.js +0 -73
- package/dist/components/Display0/index.d.ts +0 -1
- package/dist/components/Display0/index.js +0 -5
- package/dist/components/Display1/Display1.d.ts +0 -5
- package/dist/components/Display1/Display1.js +0 -73
- package/dist/components/Display1/index.d.ts +0 -1
- package/dist/components/Display1/index.js +0 -5
- package/dist/components/Display2/Display2.d.ts +0 -5
- package/dist/components/Display2/Display2.js +0 -73
- package/dist/components/Display2/index.d.ts +0 -1
- package/dist/components/Display2/index.js +0 -5
- package/dist/components/Display3/Display3.d.ts +0 -5
- package/dist/components/Display3/Display3.js +0 -73
- package/dist/components/Display3/index.d.ts +0 -1
- package/dist/components/Display3/index.js +0 -5
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +0 -18
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.js +0 -52
- package/dist/components/ErrorSummaryNotification/index.d.ts +0 -1
- package/dist/components/ErrorSummaryNotification/index.js +0 -5
- package/dist/components/FilterSelect/FilterSelect.d.ts +0 -17
- package/dist/components/FilterSelect/FilterSelect.js +0 -88
- package/dist/components/FilterSelect/index.d.ts +0 -1
- package/dist/components/FilterSelect/index.js +0 -5
- package/dist/components/Heading1/Heading1.d.ts +0 -5
- package/dist/components/Heading1/Heading1.js +0 -73
- package/dist/components/Heading1/index.d.ts +0 -1
- package/dist/components/Heading1/index.js +0 -5
- package/dist/components/Heading2/Heading2.d.ts +0 -5
- package/dist/components/Heading2/Heading2.js +0 -73
- package/dist/components/Heading2/index.d.ts +0 -1
- package/dist/components/Heading2/index.js +0 -5
- package/dist/components/Heading3/Heading3.d.ts +0 -5
- package/dist/components/Heading3/Heading3.js +0 -73
- package/dist/components/Heading3/index.d.ts +0 -1
- package/dist/components/Heading3/index.js +0 -5
- package/dist/components/Heading4/Heading4.d.ts +0 -5
- package/dist/components/Heading4/Heading4.js +0 -73
- package/dist/components/Heading4/index.d.ts +0 -1
- package/dist/components/Heading4/index.js +0 -5
- package/dist/components/Label/Label.d.ts +0 -7
- package/dist/components/Label/Label.js +0 -51
- package/dist/components/Label/index.d.ts +0 -1
- package/dist/components/Label/index.js +0 -5
- package/dist/components/Lead/Lead.d.ts +0 -7
- package/dist/components/Lead/Lead.js +0 -53
- package/dist/components/Lead/index.d.ts +0 -1
- package/dist/components/Lead/index.js +0 -5
- package/dist/components/NavHeader/IconButton.d.ts +0 -15
- package/dist/components/NavHeader/IconButton.js +0 -21
- package/dist/components/SkeletonCTA/SkeletonCTA.d.ts +0 -6
- package/dist/components/SkeletonCTA/SkeletonCTA.js +0 -42
- package/dist/components/SkeletonCTA/index.d.ts +0 -1
- package/dist/components/SkeletonCTA/index.js +0 -5
- package/dist/components/Small/Small.d.ts +0 -576
- package/dist/components/Small/Small.js +0 -39
- package/dist/components/Small/index.d.ts +0 -1
- package/dist/components/Small/index.js +0 -5
- package/dist/components/TextGroup/TextGroup.d.ts +0 -3
- package/dist/components/TextGroup/TextGroup.js +0 -43
- package/dist/components/TextGroup/index.d.ts +0 -1
- package/dist/components/TextGroup/index.js +0 -5
- package/dist/components/TextLink/TextLink.d.ts +0 -8
- package/dist/components/TextLink/TextLink.js +0 -75
- package/dist/components/TextLink/index.d.ts +0 -1
- package/dist/components/TextLink/index.js +0 -5
- package/dist/esm/components/CTAButton/CTAButton.js +0 -90
- package/dist/esm/components/CTAButton/index.js +0 -1
- package/dist/esm/components/CTALink/CTALink.js +0 -18
- package/dist/esm/components/CTALink/index.js +0 -1
- package/dist/esm/components/DescriptionList/DescriptionList.js +0 -40
- package/dist/esm/components/DescriptionList/index.js +0 -1
- package/dist/esm/components/DescriptionList/styled.js +0 -58
- package/dist/esm/components/Display0/Display0.js +0 -46
- package/dist/esm/components/Display0/index.js +0 -1
- package/dist/esm/components/Display1/Display1.js +0 -46
- package/dist/esm/components/Display1/index.js +0 -1
- package/dist/esm/components/Display2/Display2.js +0 -46
- package/dist/esm/components/Display2/index.js +0 -1
- package/dist/esm/components/Display3/Display3.js +0 -46
- package/dist/esm/components/Display3/index.js +0 -1
- package/dist/esm/components/ErrorSummaryNotification/ErrorSummaryNotification.js +0 -49
- package/dist/esm/components/ErrorSummaryNotification/index.js +0 -1
- package/dist/esm/components/FilterSelect/FilterSelect.js +0 -61
- package/dist/esm/components/FilterSelect/index.js +0 -1
- package/dist/esm/components/Heading1/Heading1.js +0 -46
- package/dist/esm/components/Heading1/index.js +0 -1
- package/dist/esm/components/Heading2/Heading2.js +0 -46
- package/dist/esm/components/Heading2/index.js +0 -1
- package/dist/esm/components/Heading3/Heading3.js +0 -46
- package/dist/esm/components/Heading3/index.js +0 -1
- package/dist/esm/components/Heading4/Heading4.js +0 -46
- package/dist/esm/components/Heading4/index.js +0 -1
- package/dist/esm/components/Label/Label.js +0 -25
- package/dist/esm/components/Label/index.js +0 -1
- package/dist/esm/components/Lead/Lead.js +0 -27
- package/dist/esm/components/Lead/index.js +0 -1
- package/dist/esm/components/NavHeader/IconButton.js +0 -17
- package/dist/esm/components/SkeletonCTA/SkeletonCTA.js +0 -35
- package/dist/esm/components/SkeletonCTA/index.js +0 -1
- package/dist/esm/components/Small/Small.js +0 -13
- package/dist/esm/components/Small/index.js +0 -1
- package/dist/esm/components/TextGroup/TextGroup.js +0 -39
- package/dist/esm/components/TextGroup/index.js +0 -1
- package/dist/esm/components/TextLink/TextLink.js +0 -49
- package/dist/esm/components/TextLink/index.js +0 -1
- package/dist/esm/providers/types.js +0 -1
- package/dist/providers/types.d.ts +0 -5
- package/dist/providers/types.js +0 -2
|
@@ -26,45 +26,35 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
26
26
|
};
|
|
27
27
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
28
|
import { numToPx } from '@ovotech/element-core';
|
|
29
|
-
import styled, { css } from '../../styled.native';
|
|
29
|
+
import styled, { css, useTheme } from '../../styled.native';
|
|
30
30
|
var StyledBadge = styled.View(function (_a) {
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
var message;
|
|
34
|
-
if (variant in semantic) {
|
|
35
|
-
surface = semantic[variant].surface;
|
|
36
|
-
message = semantic[variant].message;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
surface = component.badge.variants[variant].background;
|
|
40
|
-
message = component.badge.variants[variant].foreground;
|
|
41
|
-
}
|
|
42
|
-
if ((customVariant === null || customVariant === void 0 ? void 0 : customVariant.foregroundColor) && (customVariant === null || customVariant === void 0 ? void 0 : customVariant.backgroundColor)) {
|
|
43
|
-
surface = customVariant.backgroundColor;
|
|
44
|
-
message = customVariant.foregroundColor;
|
|
45
|
-
}
|
|
46
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 2px ", ";\n border-radius: 16px;\n border: ", " solid\n ", ";\n background-color: ", ";\n align-self: flex-start;\n "], ["\n padding: 2px ", ";\n border-radius: 16px;\n border: ", " solid\n ", ";\n background-color: ", ";\n align-self: flex-start;\n "])), numToPx(core.space[2]), numToPx(core.borderWidth.medium), core.color.brand.white, inverted ? message : surface);
|
|
31
|
+
var inverted = _a.inverted, theme = _a.theme, $surface = _a.$surface, $message = _a.$message;
|
|
32
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", " ", "\n ", " ", ";\n border-radius: 16px;\n border: ", " solid ", ";\n background-color: ", ";\n align-self: flex-start;\n "], ["\n padding: ", " ", "\n ", " ", ";\n border-radius: 16px;\n border: ", " solid ", ";\n background-color: ", ";\n align-self: flex-start;\n "])), numToPx(theme.space[50]), numToPx(theme.space[200]), numToPx(theme.space[100]), numToPx(theme.space[200]), numToPx(theme.border.width.md), theme.color.brand.onBrand, inverted ? $message : $surface);
|
|
47
33
|
});
|
|
48
34
|
var StyledBadgeText = styled.Text(function (_a) {
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
var message;
|
|
52
|
-
if (variant in semantic) {
|
|
53
|
-
surface = semantic[variant].surface;
|
|
54
|
-
message = semantic[variant].message;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
surface = component.badge.variants[variant].background;
|
|
58
|
-
message = component.badge.variants[variant].foreground;
|
|
59
|
-
}
|
|
60
|
-
if ((customVariant === null || customVariant === void 0 ? void 0 : customVariant.foregroundColor) && (customVariant === null || customVariant === void 0 ? void 0 : customVariant.backgroundColor)) {
|
|
61
|
-
surface = customVariant.backgroundColor;
|
|
62
|
-
message = customVariant.foregroundColor;
|
|
63
|
-
}
|
|
64
|
-
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n "])), core.fontFamily.bodyBold.native, numToPx(core.lineHeight.body.small), inverted ? surface : message, numToPx(core.fontSize.body.small));
|
|
35
|
+
var inverted = _a.inverted, theme = _a.theme, $surface = _a.$surface, $message = _a.$message;
|
|
36
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n "])), theme.native.font.family.bold, numToPx(theme.font.lineHeight.md.mediaQuery.sm), inverted ? $surface : $message, numToPx(theme.font.size.md.mediaQuery.sm));
|
|
65
37
|
});
|
|
66
38
|
export var Badge = function (_a) {
|
|
67
|
-
var children = _a.children,
|
|
68
|
-
|
|
39
|
+
var children = _a.children, _b = _a.variant, variant = _b === void 0 ? 'neutral' : _b, _c = _a.inverted, inverted = _c === void 0 ? false : _c, customVariant = _a.customVariant, rest = __rest(_a, ["children", "variant", "inverted", "customVariant"]);
|
|
40
|
+
var theme = useTheme();
|
|
41
|
+
// check if variant is primitive, otherwise use alert colours
|
|
42
|
+
var isPrimitive = Object.keys(theme.color).includes(variant);
|
|
43
|
+
var message = isPrimitive
|
|
44
|
+
? // @ts-ignore we're checking the variants above...
|
|
45
|
+
theme.color[variant]['70']
|
|
46
|
+
: // @ts-ignore we're checking the variants above...
|
|
47
|
+
theme.color.alert[variant];
|
|
48
|
+
var surface = isPrimitive
|
|
49
|
+
? // @ts-ignore we're checking the variants above...
|
|
50
|
+
theme.color[variant]['20']
|
|
51
|
+
: // @ts-ignore we're checking the variants above...
|
|
52
|
+
theme.color.alert["".concat(variant, "Tint")];
|
|
53
|
+
if ((customVariant === null || customVariant === void 0 ? void 0 : customVariant.backgroundColor) !== undefined &&
|
|
54
|
+
(customVariant === null || customVariant === void 0 ? void 0 : customVariant.color) !== undefined) {
|
|
55
|
+
message = customVariant.color;
|
|
56
|
+
surface = customVariant.backgroundColor;
|
|
57
|
+
}
|
|
58
|
+
return (_jsx(StyledBadge, __assign({ inverted: inverted, "$surface": surface, "$message": message }, rest, { children: _jsx(StyledBadgeText, { inverted: inverted, "$surface": surface, "$message": message, children: children }) })));
|
|
69
59
|
};
|
|
70
60
|
var templateObject_1, templateObject_2;
|
|
@@ -25,13 +25,12 @@ import { numToPx } from '@ovotech/element-core';
|
|
|
25
25
|
import { useBreakpoint } from '../../hooks';
|
|
26
26
|
import styled from '../../styled.native';
|
|
27
27
|
var CardWrapper = styled.View(function (_a) {
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
: numToPx(core.space[smallAndUp ? 9 : 6]), ";\n border-radius: ").concat(inline ? numToPx(core.radius.max) : 0, ";\n ");
|
|
28
|
+
var theme = _a.theme, displayStyle = _a.displayStyle, _b = _a.smallAndUp, smallAndUp = _b === void 0 ? false : _b;
|
|
29
|
+
var isSolid = displayStyle === 'solid';
|
|
30
|
+
return "\n position: relative;\n background: ".concat(isSolid ? theme.color.surface.bright : 'transparent', ";\n padding: ").concat(numToPx(theme.space[smallAndUp ? 900 : 600]), ";\n border-width: ").concat(numToPx(theme.border.width.md), ";\n border-style: solid;\n border-color: ").concat(isSolid ? 'transparent' : theme.color.surface.bright, ";\n border-radius: ").concat(numToPx(theme.border.radius['2xl']), ";\n ");
|
|
32
31
|
});
|
|
33
32
|
export var Card = function (_a) {
|
|
34
|
-
var children = _a.children,
|
|
33
|
+
var children = _a.children, _b = _a.displayStyle, displayStyle = _b === void 0 ? 'solid' : _b, rest = __rest(_a, ["children", "displayStyle"]);
|
|
35
34
|
var smallAndUp = useBreakpoint().smallAndUp;
|
|
36
|
-
return (_jsx(CardWrapper, __assign({
|
|
35
|
+
return (_jsx(CardWrapper, __assign({ smallAndUp: smallAndUp, displayStyle: displayStyle }, rest, { children: children })));
|
|
37
36
|
};
|
|
@@ -36,33 +36,33 @@ import { Icon } from '../Icon/Icon';
|
|
|
36
36
|
import { LabelText } from '../LabelText';
|
|
37
37
|
import { Stack } from '../Stack';
|
|
38
38
|
var StyledCheckboxInputWrapper = styled.View(function (_a) {
|
|
39
|
-
var
|
|
40
|
-
var checkboxSize =
|
|
41
|
-
var gap =
|
|
42
|
-
return "\n width: ".concat(numToPx(checkboxSize + gap), ";\n height: ").concat(numToPx(
|
|
39
|
+
var theme = _a.theme;
|
|
40
|
+
var checkboxSize = theme.space[600];
|
|
41
|
+
var gap = theme.space[200];
|
|
42
|
+
return "\n width: ".concat(numToPx(checkboxSize + gap), ";\n height: ").concat(numToPx(theme.space[1100]), ";\n ");
|
|
43
43
|
});
|
|
44
44
|
var StyledCheckboxInput = styled.View(function (_a) {
|
|
45
|
-
var
|
|
46
|
-
return "\n width: ".concat(numToPx(
|
|
47
|
-
?
|
|
45
|
+
var theme = _a.theme, invalid = _a.invalid, checked = _a.checked;
|
|
46
|
+
return "\n width: ".concat(numToPx(theme.space[600]), ";\n height: ").concat(numToPx(theme.space[600]), ";\n border: ").concat(numToPx(theme.border.width.md), " solid;\n margin-top: 10px;\n border-radius: ").concat(numToPx(theme.border.radius.xs), ";\n border-color: ").concat(invalid
|
|
47
|
+
? theme.input.color.borderError
|
|
48
48
|
: checked
|
|
49
|
-
?
|
|
50
|
-
:
|
|
49
|
+
? theme.input.color.selected
|
|
50
|
+
: theme.input.color.border, ";\n background: ").concat(checked ? theme.input.color.selectedTint : 'transparent', ";\n ");
|
|
51
51
|
});
|
|
52
52
|
var CheckboxCheck = function (props) {
|
|
53
53
|
return _jsx(Icon, __assign({ name: "check", size: 16 }, props));
|
|
54
54
|
};
|
|
55
55
|
var StyledCheckboxInputCheck = styled(CheckboxCheck)(function (_a) {
|
|
56
|
-
var
|
|
57
|
-
return "\n margin-top:
|
|
56
|
+
var theme = _a.theme, checked = _a.checked;
|
|
57
|
+
return "\n margin-top: ".concat(numToPx(theme.space[50]), ";\n margin-left: ").concat(numToPx(theme.space[50]), ";\n color: ").concat(theme.color.alert.info, ";\n opacity: ").concat(checked ? 1 : 0, ";\n ");
|
|
58
58
|
});
|
|
59
59
|
var Input = function (_a) {
|
|
60
60
|
var checked = _a.checked, invalid = _a.invalid, testID = _a.testID, rest = __rest(_a, ["checked", "invalid", "testID"]);
|
|
61
61
|
return (_jsx(StyledCheckboxInputWrapper, __assign({}, rest, { children: _jsx(StyledCheckboxInput, { invalid: invalid, checked: checked, testID: testID, children: _jsx(StyledCheckboxInputCheck, { checked: checked }) }) })));
|
|
62
62
|
};
|
|
63
63
|
var CheckLabelText = styled(LabelText)(function (_a) {
|
|
64
|
-
var
|
|
65
|
-
return "\n padding-top: ".concat(numToPx(
|
|
64
|
+
var theme = _a.theme;
|
|
65
|
+
return "\n padding-top: ".concat(numToPx(theme.space[300]), ";\n ");
|
|
66
66
|
});
|
|
67
67
|
var StyledWrapper = styled.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n"], ["\n flex-direction: row;\n"])));
|
|
68
68
|
var Checkbox = forwardRef(function (_a, ref) {
|
|
@@ -5,57 +5,57 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import { numToPx } from '@ovotech/element-core';
|
|
6
6
|
import styled, { css } from '../../styled.native';
|
|
7
7
|
export var StyledTableContainer = styled.View(function (_a) {
|
|
8
|
-
var
|
|
9
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "], ["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), numToPx(
|
|
8
|
+
var theme = _a.theme;
|
|
9
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "], ["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), numToPx(theme.border.width.sm), theme.color.surface.borderDim);
|
|
10
10
|
});
|
|
11
11
|
export var TableHeader = styled.View(function (_a) {
|
|
12
|
-
var
|
|
13
|
-
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n flex: ", ";\n align-self: stretch;\n flex-direction: row;\n width: ", ";\n "], ["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n flex: ", ";\n align-self: stretch;\n flex-direction: row;\n width: ", ";\n "])), numToPx(
|
|
12
|
+
var theme = _a.theme, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
|
|
13
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n flex: ", ";\n align-self: stretch;\n flex-direction: row;\n width: ", ";\n "], ["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n flex: ", ";\n align-self: stretch;\n flex-direction: row;\n width: ", ";\n "])), numToPx(theme.space[smallAndUp ? 300 : 200]), numToPx(theme.space[smallAndUp ? 300 : 200]), numToPx(theme.space[200]), numToPx(theme.space[200]), cellWidth === 'auto' ? 1 : 0, cellWidth);
|
|
14
14
|
});
|
|
15
15
|
export var TableHeaderText = styled.Text(function (_a) {
|
|
16
|
-
var
|
|
17
|
-
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "])),
|
|
16
|
+
var theme = _a.theme, smallAndUp = _a.smallAndUp;
|
|
17
|
+
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "])), theme.native.font.family.bold, numToPx(theme.font.lineHeight.md.mediaQuery[smallAndUp ? 'lg' : 'sm']), numToPx(theme.font.size.md.mediaQuery[smallAndUp ? 'lg' : 'sm']), theme.color.surface.onSurface);
|
|
18
18
|
});
|
|
19
19
|
export var TableCaptionText = styled.Text(function (_a) {
|
|
20
|
-
var
|
|
21
|
-
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "])),
|
|
20
|
+
var theme = _a.theme, smallAndUp = _a.smallAndUp;
|
|
21
|
+
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-align: left;\n flex-wrap: wrap;\n "])), theme.native.font.family.bold, numToPx(theme.font.size.xl.mediaQuery[smallAndUp ? 'lg' : 'sm']), numToPx(theme.font.lineHeight.xl.mediaQuery[smallAndUp ? 'lg' : 'sm']), theme.color.brand.brand);
|
|
22
22
|
});
|
|
23
23
|
export var CellText = styled.Text(function (_a) {
|
|
24
|
-
var
|
|
25
|
-
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "])),
|
|
24
|
+
var theme = _a.theme, smallAndUp = _a.smallAndUp;
|
|
25
|
+
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "])), theme.native.font.family.book, numToPx(theme.font.lineHeight.md.mediaQuery.lg), numToPx(theme.font.size.md.mediaQuery[smallAndUp ? 'lg' : 'sm']));
|
|
26
26
|
});
|
|
27
27
|
export var TableCaption = styled.View(function (_a) {
|
|
28
|
-
var
|
|
29
|
-
return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), numToPx(
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), numToPx(theme.space[400]), numToPx(theme.space[200]));
|
|
30
30
|
});
|
|
31
31
|
export var TableRow = styled.View(function (_a) {
|
|
32
|
-
var
|
|
32
|
+
var theme = _a.theme, stripe = _a.stripe;
|
|
33
33
|
return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n flex-direction: row;\n align-items: stretch;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "], ["\n background-color: ", ";\n flex-direction: row;\n align-items: stretch;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), stripe
|
|
34
|
-
?
|
|
35
|
-
:
|
|
34
|
+
? theme.color.surface.dim
|
|
35
|
+
: theme.color.surface.surface, stripe ? '0px' : numToPx(theme.border.width.sm), stripe
|
|
36
36
|
? 'transparent'
|
|
37
|
-
: "".concat(
|
|
37
|
+
: "".concat(theme.color.surface.borderDim));
|
|
38
38
|
});
|
|
39
39
|
export var TableRowHeading = styled.View(function (_a) {
|
|
40
|
-
var
|
|
41
|
-
return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "], ["\n background-color: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "])),
|
|
40
|
+
var theme = _a.theme;
|
|
41
|
+
return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "], ["\n background-color: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "])), theme.color.surface.surface, numToPx(theme.border.width.sm), theme.color.surface.border);
|
|
42
42
|
});
|
|
43
43
|
export var TableBody = styled.View(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n flex-direction: column;\n flex-wrap: nowrap;\n"], ["\n flex-direction: column;\n flex-wrap: nowrap;\n"])));
|
|
44
44
|
export var TableCell = styled.View(function (_a) {
|
|
45
|
-
var
|
|
46
|
-
return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "])), numToPx(
|
|
45
|
+
var theme = _a.theme, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
|
|
46
|
+
return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "])), numToPx(theme.space[smallAndUp ? 300 : 200]), numToPx(theme.space[smallAndUp ? 300 : 200]), numToPx(theme.space[200]), numToPx(theme.space[200]), cellWidth, cellWidth === 'auto' ? 1 : 0);
|
|
47
47
|
});
|
|
48
48
|
export var RowHeading = styled.View(function (_a) {
|
|
49
|
-
var
|
|
50
|
-
return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "])), numToPx(
|
|
49
|
+
var theme = _a.theme, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
|
|
50
|
+
return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "])), numToPx(theme.space[smallAndUp ? 300 : 200]), numToPx(theme.space[smallAndUp ? 300 : 200]), numToPx(theme.space[200]), numToPx(theme.space[200]), cellWidth, cellWidth === 'auto' ? 1 : 0);
|
|
51
51
|
});
|
|
52
52
|
export var StyledSeparatorRow = styled.View(function (_a) {
|
|
53
|
-
var
|
|
54
|
-
var minWidth = width ? "".concat(width -
|
|
55
|
-
return "\n min-width: ".concat(minWidth, ";\n flex: 1;\n flex-direction: row;\n background-color: ").concat(
|
|
53
|
+
var theme = _a.theme, width = _a.width;
|
|
54
|
+
var minWidth = width ? "".concat(width - theme.space[200] * 2, "px") : '100%';
|
|
55
|
+
return "\n min-width: ".concat(minWidth, ";\n flex: 1;\n flex-direction: row;\n background-color: ").concat(theme.color.surface.bright, ";\n padding: ").concat(numToPx(theme.space[100]), " ").concat(numToPx(theme.space[200]), ";\n ");
|
|
56
56
|
});
|
|
57
57
|
export var SeparatorRowText = styled.Text(function (_a) {
|
|
58
|
-
var
|
|
59
|
-
return "\n flex: 1;\n font-family: ".concat(
|
|
58
|
+
var theme = _a.theme, smallAndUp = _a.smallAndUp;
|
|
59
|
+
return "\n flex: 1;\n font-family: ".concat(theme.native.font.family.book, ";\n font-size: ").concat(numToPx(theme.font.size.sm.mediaQuery[smallAndUp ? 'lg' : 'sm']), ";\n line-height: ").concat(numToPx(theme.font.lineHeight.sm.mediaQuery[smallAndUp ? 'lg' : 'sm']), ";\n color: ").concat(theme.color.surface.onSurfaceVariant, ";\n");
|
|
60
60
|
});
|
|
61
61
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
|
|
@@ -27,29 +27,39 @@ import { NumberInput } from '../NumberInput';
|
|
|
27
27
|
import { Stack } from '../Stack';
|
|
28
28
|
import { SubLabelText } from '../SubLabelText';
|
|
29
29
|
var InlineFields = styled.View(function (_a) {
|
|
30
|
-
var stretch = _a.stretch,
|
|
31
|
-
var margin = numToPx(
|
|
32
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n
|
|
30
|
+
var stretch = _a.stretch, theme = _a.theme;
|
|
31
|
+
var margin = numToPx(theme.space[100]);
|
|
32
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-left: -", ";\n margin-right: -", ";\n flex-direction: row;\n ", "\n "], ["\n margin-left: -", ";\n margin-right: -", ";\n flex-direction: row;\n ", "\n "])), margin, margin, stretch ? '' : "width: 265px;");
|
|
33
33
|
});
|
|
34
34
|
var SubField = styled(Stack)(function (_a) {
|
|
35
|
-
var
|
|
36
|
-
var padding = numToPx(
|
|
35
|
+
var theme = _a.theme;
|
|
36
|
+
var padding = numToPx(theme.space[100]);
|
|
37
37
|
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-right: ", ";\n padding-left: ", ";\n "], ["\n padding-right: ", ";\n padding-left: ", ";\n "])), padding, padding);
|
|
38
38
|
});
|
|
39
39
|
var DayField = styled(SubField)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 25%;\n"], ["\n width: 25%;\n"])));
|
|
40
40
|
var MonthField = styled(SubField)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 25%;\n"], ["\n width: 25%;\n"])));
|
|
41
41
|
var YearField = styled(SubField)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 50%;\n"], ["\n width: 50%;\n"])));
|
|
42
42
|
export var DateField = forwardRef(function (_a, ref) {
|
|
43
|
-
var label = _a.label, hint = _a.hint, error = _a.error, _b = _a.optional, optional = _b === void 0 ? false : _b, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, onChange = _a.onChange, value = _a.value, testID = _a.testID, _d = _a.editable, editable = _d === void 0 ?
|
|
43
|
+
var label = _a.label, hint = _a.hint, error = _a.error, _b = _a.optional, optional = _b === void 0 ? false : _b, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, onChange = _a.onChange, value = _a.value, testID = _a.testID, _d = _a.editable, editable = _d === void 0 ? true : _d, _e = _a.autoFocusNext, autoFocusNext = _e === void 0 ? true : _e;
|
|
44
44
|
var hasError = !!error;
|
|
45
|
+
var dayRef = createRef();
|
|
46
|
+
var monthRef = createRef();
|
|
47
|
+
var yearRef = createRef();
|
|
48
|
+
var nextFieldRef = {
|
|
49
|
+
day: monthRef,
|
|
50
|
+
month: yearRef,
|
|
51
|
+
};
|
|
45
52
|
var handleChange = function (key) { return function (datePartValue) {
|
|
46
53
|
var _a;
|
|
47
54
|
onChange &&
|
|
48
55
|
onChange(__assign(__assign({}, value), (_a = {}, _a[key] = datePartValue, _a)));
|
|
56
|
+
if (key !== 'year' && autoFocusNext) {
|
|
57
|
+
var nextField = nextFieldRef[key].current;
|
|
58
|
+
if (nextField && datePartValue.length === 2) {
|
|
59
|
+
nextField.focus();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
49
62
|
}; };
|
|
50
|
-
var dayRef = createRef();
|
|
51
|
-
var monthRef = createRef();
|
|
52
|
-
var yearRef = createRef();
|
|
53
63
|
var accessibilityLabel = function (labelText) {
|
|
54
64
|
return [labelText, getText(hint), getText(error)].filter(Boolean).join(', ');
|
|
55
65
|
};
|
|
@@ -58,6 +68,6 @@ export var DateField = forwardRef(function (_a, ref) {
|
|
|
58
68
|
internalRef.current.focus();
|
|
59
69
|
}
|
|
60
70
|
}; };
|
|
61
|
-
return (_jsx(FormGroup, { error: hasError, children: _jsxs(Stack, { spaceBetween: 1, children: [_jsxs(View, { children: [_jsxs(LabelText, { children: [label, optional ? ' (optional)' : null] }), hint ? _jsx(HintText, { children: hint }) : null, error ? _jsx(ErrorText, { children: error }) : null] }), _jsxs(InlineFields, { stretch: fullWidth, children: [_jsxs(DayField, { spaceBetween: 1, children: [_jsx(TouchableWithoutFeedback, { onPress: focusRef(dayRef), accessible: false, children: _jsx(SubLabelText, { children: "Day" }) }), _jsx(NumberInput, { ref: mergeRefs(dayRef, ref), accessibilityLabel: accessibilityLabel('Day'), invalid: hasError, value: value.day, onChangeText: handleChange('day'), testID: testID, stretch: true, editable: editable })] }), _jsxs(MonthField, { spaceBetween: 1, children: [_jsx(TouchableWithoutFeedback, { onPress: focusRef(monthRef), accessible: false, children: _jsx(SubLabelText, { children: "Month" }) }), _jsx(NumberInput, { ref: monthRef, accessibilityLabel: accessibilityLabel('Month'), invalid: hasError, value: value.month, onChangeText: handleChange('month'), testID: "".concat(testID, "-month"), stretch: true, editable: editable })] }), _jsxs(YearField, { spaceBetween: 1, children: [_jsx(TouchableWithoutFeedback, { onPress: focusRef(yearRef), accessible: false, children: _jsx(SubLabelText, { children: "Year" }) }), _jsx(NumberInput, { ref: yearRef, accessibilityLabel: accessibilityLabel('Year'), invalid: hasError, value: value.year, onChangeText: handleChange('year'), testID: "".concat(testID, "-year"), stretch: true, editable: editable })] })] })] }) }));
|
|
71
|
+
return (_jsx(FormGroup, { error: hasError, children: _jsxs(Stack, { spaceBetween: 1, children: [_jsxs(View, { children: [_jsxs(LabelText, { children: [label, optional ? ' (optional)' : null] }), hint ? _jsx(HintText, { children: hint }) : null, error ? _jsx(ErrorText, { children: error }) : null] }), _jsxs(InlineFields, { stretch: fullWidth, children: [_jsxs(DayField, { spaceBetween: 1, children: [_jsx(TouchableWithoutFeedback, { onPress: focusRef(dayRef), accessible: false, children: _jsx(SubLabelText, { children: "Day" }) }), _jsx(NumberInput, { ref: mergeRefs(dayRef, ref), accessibilityLabel: accessibilityLabel('Day'), invalid: hasError, value: value.day, onChangeText: handleChange('day'), testID: testID, stretch: true, editable: editable, maxLength: 2 })] }), _jsxs(MonthField, { spaceBetween: 1, children: [_jsx(TouchableWithoutFeedback, { onPress: focusRef(monthRef), accessible: false, children: _jsx(SubLabelText, { children: "Month" }) }), _jsx(NumberInput, { ref: monthRef, accessibilityLabel: accessibilityLabel('Month'), invalid: hasError, value: value.month, onChangeText: handleChange('month'), testID: "".concat(testID, "-month"), stretch: true, editable: editable, maxLength: 2 })] }), _jsxs(YearField, { spaceBetween: 1, children: [_jsx(TouchableWithoutFeedback, { onPress: focusRef(yearRef), accessible: false, children: _jsx(SubLabelText, { children: "Year" }) }), _jsx(NumberInput, { ref: yearRef, accessibilityLabel: accessibilityLabel('Year'), invalid: hasError, value: value.year, onChangeText: handleChange('year'), testID: "".concat(testID, "-year"), stretch: true, editable: editable, maxLength: 4 })] })] })] }) }));
|
|
62
72
|
});
|
|
63
73
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -32,16 +32,16 @@ import styled, { css } from '../../styled.native';
|
|
|
32
32
|
import { Icon } from '../Icon';
|
|
33
33
|
var DisclosureButton = styled.TouchableOpacity(function () { return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n "], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n "]))); });
|
|
34
34
|
var DisclosureButtonIcon = styled(Icon)(function (_a) {
|
|
35
|
-
var
|
|
36
|
-
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transform: ", ";\n margin-right: ", ";\n color: ", ";\n "], ["\n transform: ", ";\n margin-right: ", ";\n color: ", ";\n "])), expanded ? 'rotate(0deg)' : 'rotate(-90deg)', numToPx(
|
|
35
|
+
var theme = _a.theme, expanded = _a.expanded, smallAndUp = _a.smallAndUp;
|
|
36
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transform: ", ";\n margin-right: ", ";\n color: ", ";\n "], ["\n transform: ", ";\n margin-right: ", ";\n color: ", ";\n "])), expanded ? 'rotate(0deg)' : 'rotate(-90deg)', numToPx(theme.space[smallAndUp ? 200 : 100]), theme.color.surface.link);
|
|
37
37
|
});
|
|
38
38
|
var DisclosureButtonText = styled.Text(function (_a) {
|
|
39
|
-
var
|
|
40
|
-
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n color: ", ";\n "])),
|
|
39
|
+
var theme = _a.theme, smallAndUp = _a.smallAndUp;
|
|
40
|
+
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n color: ", ";\n padding-left: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n text-decoration: underline;\n text-decoration-color: ", ";\n color: ", ";\n padding-left: ", ";\n "])), theme.native.font.family.book, numToPx(theme.font.size.md.mediaQuery[smallAndUp ? 'lg' : 'sm']), numToPx(theme.font.lineHeight.md.mediaQuery[smallAndUp ? 'lg' : 'sm']), theme.color.surface.link, theme.color.surface.link, numToPx(theme.space[200]));
|
|
41
41
|
});
|
|
42
42
|
var DisclosurePanel = styled.View(function (_a) {
|
|
43
|
-
var
|
|
44
|
-
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-top: ", ";\n padding-left: ", ";\n "], ["\n margin-top: ", ";\n padding-left: ", ";\n "])), numToPx(
|
|
43
|
+
var theme = _a.theme;
|
|
44
|
+
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-top: ", ";\n padding-left: ", ";\n "], ["\n margin-top: ", ";\n padding-left: ", ";\n "])), numToPx(theme.space[300]), numToPx(theme.space[600]));
|
|
45
45
|
});
|
|
46
46
|
export var Disclosure = forwardRef(function (_a, ref) {
|
|
47
47
|
var children = _a.children, title = _a.title, _b = _a.expanded, expanded = _b === void 0 ? false : _b, onToggle = _a.onToggle, rest = __rest(_a, ["children", "title", "expanded", "onToggle"]);
|
|
@@ -5,10 +5,10 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import styled, { css } from '../../styled.native';
|
|
7
7
|
var StyledDivider = styled.View(function (_a) {
|
|
8
|
-
var
|
|
8
|
+
var theme = _a.theme, _b = _a.type, type = _b === void 0 ? 'default' : _b, _c = _a.width, width = _c === void 0 ? '100%' : _c;
|
|
9
9
|
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 1px;\n background: ", ";\n width: ", ";\n "], ["\n height: 1px;\n background: ", ";\n width: ", ";\n "])), type === 'default'
|
|
10
|
-
?
|
|
11
|
-
:
|
|
10
|
+
? theme.color.surface.border
|
|
11
|
+
: theme.color.surface.borderDim, width);
|
|
12
12
|
});
|
|
13
13
|
export var Divider = function (_a) {
|
|
14
14
|
var type = _a.type, width = _a.width;
|
|
@@ -3,5 +3,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
5
|
import styled from '../../styled.native';
|
|
6
|
-
export var Em = styled.Text(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */\n font-family:
|
|
6
|
+
export var Em = styled.Text(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */\n font-family: System;\n font-style: italic;\n"], ["\n /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */\n font-family: System;\n font-style: italic;\n"])));
|
|
7
7
|
var templateObject_1;
|
|
@@ -6,11 +6,13 @@ import { numToPx } from '@ovotech/element-core';
|
|
|
6
6
|
import styled, { css } from '../../styled.native';
|
|
7
7
|
import { styledComponentWithBreakpoints } from '../../utils';
|
|
8
8
|
var StyledErrorText = styled.Text(function (_a) {
|
|
9
|
-
var
|
|
9
|
+
var theme = _a.theme, smallAndUp = _a.smallAndUp;
|
|
10
10
|
var fontSize = smallAndUp
|
|
11
|
-
?
|
|
12
|
-
:
|
|
13
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n
|
|
11
|
+
? theme.font.size.md.mediaQuery.lg
|
|
12
|
+
: theme.font.size.md.mediaQuery.sm;
|
|
13
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-top: ", ";\n margin-bottom: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n margin-top: ", ";\n margin-bottom: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), numToPx(theme.space[100]), numToPx(theme.space[100]), theme.native.font.family.bold, numToPx(fontSize), numToPx(smallAndUp
|
|
14
|
+
? theme.font.lineHeight.md.mediaQuery.lg
|
|
15
|
+
: theme.font.lineHeight.md.mediaQuery.sm), theme.color.alert.error);
|
|
14
16
|
});
|
|
15
17
|
var ErrorText = styledComponentWithBreakpoints(StyledErrorText);
|
|
16
18
|
export { ErrorText };
|
|
@@ -38,7 +38,7 @@ export var Field = forwardRef(function (_a, ref) {
|
|
|
38
38
|
var accessibilityLabel = [labelText, getText(hint), getText(error)]
|
|
39
39
|
.filter(Boolean)
|
|
40
40
|
.join(', ');
|
|
41
|
-
return (_jsx(FormGroup, { error: hasError || undefined, testID: "nb-field-form-group", children: _jsxs(Stack, { spaceBetween:
|
|
41
|
+
return (_jsx(FormGroup, { error: hasError || undefined, testID: "nb-field-form-group", children: _jsxs(Stack, { spaceBetween: 2, children: [_jsx(TouchableWithoutFeedback, { onPress: function () {
|
|
42
42
|
if (inputRef.current) {
|
|
43
43
|
// @ts-ignore. Toggle picker if this is a select menu.
|
|
44
44
|
if (inputRef.current.togglePicker) {
|
|
@@ -6,27 +6,21 @@ import { numToPx } from '@ovotech/element-core';
|
|
|
6
6
|
import styled, { css } from '../../styled.native';
|
|
7
7
|
import { styledComponentWithBreakpoints } from '../../utils';
|
|
8
8
|
var StyledCol = styled.View(function (_a) {
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex: 0 0 auto;\n flex-basis: ", "%;\n max-width: ", "%;\n padding-left: ", ";\n padding-right: ", ";\n margin-bottom: ", ";\n width: 100%;\n "], ["\n flex: 0 0 auto;\n flex-basis: ", "%;\n max-width: ", "%;\n padding-left: ", ";\n padding-right: ", ";\n margin-bottom: ", ";\n width: 100%;\n "])), largeAndUp
|
|
9
|
+
var theme = _a.theme, _b = _a.span, span = _b === void 0 ? 12 : _b, small = _a.small, medium = _a.medium, large = _a.large, smallAndUp = _a.smallAndUp, mediumAndUp = _a.mediumAndUp, largeAndUp = _a.largeAndUp;
|
|
10
|
+
var COLS = 12;
|
|
11
|
+
var gutter = mediumAndUp ? theme.space[800] : theme.space[400];
|
|
12
|
+
var percentage = (span / COLS) * 100;
|
|
13
|
+
var smallPercentage = small ? (small / COLS) * 100 : percentage;
|
|
14
|
+
var mediumPercentage = medium ? (medium / COLS) * 100 : smallPercentage;
|
|
15
|
+
var largePercentage = large ? (large / COLS) * 100 : mediumPercentage;
|
|
16
|
+
var maxWidth = largeAndUp
|
|
18
17
|
? largePercentage
|
|
19
18
|
: mediumAndUp
|
|
20
19
|
? mediumPercentage
|
|
21
20
|
: smallAndUp
|
|
22
21
|
? smallPercentage
|
|
23
|
-
: percentage
|
|
24
|
-
|
|
25
|
-
: mediumAndUp
|
|
26
|
-
? mediumPercentage
|
|
27
|
-
: smallAndUp
|
|
28
|
-
? smallPercentage
|
|
29
|
-
: percentage, numToPx(smallScreen ? halfGutter[0] : halfGutter[1]), numToPx(smallScreen ? halfGutter[0] : halfGutter[1]), numToPx(smallScreen ? gutter[0] : gutter[1]));
|
|
22
|
+
: percentage;
|
|
23
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex: 0 0 auto;\n padding-left: ", ";\n padding-right: ", ";\n margin-bottom: ", ";\n max-width: ", "%;\n width: 100%;\n "], ["\n flex: 0 0 auto;\n padding-left: ", ";\n padding-right: ", ";\n margin-bottom: ", ";\n max-width: ", "%;\n width: 100%;\n "])), numToPx(gutter / 2), numToPx(gutter / 2), numToPx(gutter), maxWidth);
|
|
30
24
|
});
|
|
31
25
|
var Col = styledComponentWithBreakpoints(StyledCol);
|
|
32
26
|
export { Col };
|
|
@@ -29,12 +29,13 @@ import { numToPx } from '@ovotech/element-core';
|
|
|
29
29
|
import styled, { css } from '../../styled.native';
|
|
30
30
|
import { styledComponentWithBreakpoints } from '../../utils';
|
|
31
31
|
var StyledRow = styled.View(function (_a) {
|
|
32
|
-
var
|
|
33
|
-
var gutter =
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
var theme = _a.theme, isNested = _a.isNested, smallAndUp = _a.smallAndUp, mediumAndUp = _a.mediumAndUp;
|
|
33
|
+
var gutter = mediumAndUp ? theme.space[800] : theme.space[400];
|
|
34
|
+
var margin = smallAndUp ? theme.space[800] : theme.space[400];
|
|
35
|
+
/* We need to make up for the half gutter that is added to the left and right of a column, between the small and medium breakpoints */
|
|
36
|
+
var additionalMargin = smallAndUp ? (margin - gutter) / 2 : 0;
|
|
37
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n margin: 0 auto;\n max-width: ", "px;\n width: 100%;\n\n ", "\n "], ["\n padding-left: ", ";\n padding-right: ", ";\n margin: 0 auto;\n max-width: ", "px;\n width: 100%;\n\n ", "\n "])), numToPx(margin / 2 + additionalMargin), numToPx(margin / 2 + additionalMargin), theme.breakpoint.large + margin, isNested
|
|
38
|
+
? "\n margin-left: -".concat(numToPx(margin / 2), ";\n margin-right: -").concat(numToPx(margin / 2), ";\n width: auto;\n max-width: 200%; /* max width none not supported in RN */\n ")
|
|
38
39
|
: null);
|
|
39
40
|
});
|
|
40
41
|
var WidthRow = styledComponentWithBreakpoints(StyledRow);
|
|
@@ -6,11 +6,13 @@ import { numToPx } from '@ovotech/element-core';
|
|
|
6
6
|
import styled, { css } from '../../styled.native';
|
|
7
7
|
import { styledComponentWithBreakpoints } from '../../utils';
|
|
8
8
|
var StyledHintText = styled.Text(function (_a) {
|
|
9
|
-
var
|
|
9
|
+
var theme = _a.theme, smallAndUp = _a.smallAndUp;
|
|
10
10
|
var fontSize = smallAndUp
|
|
11
|
-
?
|
|
12
|
-
:
|
|
13
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n
|
|
11
|
+
? theme.font.size.md.mediaQuery.lg
|
|
12
|
+
: theme.font.size.md.mediaQuery.sm;
|
|
13
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-top: ", ";\n margin-bottom: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n margin-top: ", ";\n margin-bottom: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), numToPx(theme.space[100]), numToPx(theme.space[100]), theme.native.font.family.book, numToPx(fontSize), numToPx(smallAndUp
|
|
14
|
+
? theme.font.lineHeight.md.mediaQuery.lg
|
|
15
|
+
: theme.font.lineHeight.md.mediaQuery.sm), theme.color.surface.onSurfaceVariant);
|
|
14
16
|
});
|
|
15
17
|
var HintText = styledComponentWithBreakpoints(StyledHintText);
|
|
16
18
|
export { HintText };
|
|
@@ -25,12 +25,10 @@ import { useContext } from 'react';
|
|
|
25
25
|
import { useIcons } from '../../providers';
|
|
26
26
|
import { ThemeContext } from '../../styled.native';
|
|
27
27
|
export var Icon = function (_a) {
|
|
28
|
-
var name = _a.name,
|
|
28
|
+
var name = _a.name, _b = _a.size, size = _b === void 0 ? '16' : _b, color = _a.color, testID = _a.testID, rest = __rest(_a, ["name", "size", "color", "testID"]);
|
|
29
29
|
var icons = useIcons();
|
|
30
|
-
var
|
|
30
|
+
var theme = useContext(ThemeContext);
|
|
31
31
|
// @ts-ignore to support additional icons.
|
|
32
32
|
var Svg = name && icons[name];
|
|
33
|
-
return Svg ? (_jsx(Svg, __assign({ testID: testID ? testID : "element-icon".concat(name ? "-".concat(name) : ''),
|
|
34
|
-
// @ts-ignore this is valid.
|
|
35
|
-
color: color !== null && color !== void 0 ? color : semantic.message.base, width: size, height: size }, rest))) : null;
|
|
33
|
+
return Svg ? (_jsx(Svg, __assign({ testID: testID ? testID : "element-icon".concat(name ? "-".concat(name) : ''), color: color !== null && color !== void 0 ? color : theme.color.surface.onSurface, width: size, height: size }, rest))) : null;
|
|
36
34
|
};
|
|
@@ -31,8 +31,13 @@ import { useBreakpoint } from '../../hooks';
|
|
|
31
31
|
import styled, { css } from '../../styled.native';
|
|
32
32
|
import { Icon } from '../Icon/Icon';
|
|
33
33
|
var StyledIcon = styled(Icon)(function (_a) {
|
|
34
|
-
var
|
|
35
|
-
|
|
34
|
+
var theme = _a.theme, side = _a.side, focused = _a.focused;
|
|
35
|
+
var focusCompensation = focused ? theme.space[50] : 0;
|
|
36
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n z-index: 1;\n top: ", ";\n ", ";\n ", ";\n "], ["\n position: absolute;\n z-index: 1;\n top: ", ";\n ", ";\n ", ";\n "])), numToPx(theme.space[350] + focusCompensation), side === 'left'
|
|
37
|
+
? "left: ".concat(numToPx(theme.space[200] + focusCompensation))
|
|
38
|
+
: '', side === 'right'
|
|
39
|
+
? "right: ".concat(numToPx(theme.space[200] + focusCompensation))
|
|
40
|
+
: '');
|
|
36
41
|
});
|
|
37
42
|
var Input = forwardRef(function (_a, ref) {
|
|
38
43
|
var onFocus = _a.onFocus, onBlur = _a.onBlur, style = _a.style, iconLeft = _a.iconLeft, iconRight = _a.iconRight, rightSlot = _a.rightSlot, rest = __rest(_a, ["onFocus", "onBlur", "style", "iconLeft", "iconRight", "rightSlot"]);
|
|
@@ -53,21 +58,21 @@ var Input = forwardRef(function (_a, ref) {
|
|
|
53
58
|
} })), iconRight && !rightSlot ? (_jsx(StyledIcon, { name: iconRight, size: 16, focused: focused, pointerEvents: "none", side: "right" })) : null, rightSlot] }));
|
|
54
59
|
});
|
|
55
60
|
var InputWrapper = styled.View(function (_a) {
|
|
56
|
-
var
|
|
57
|
-
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-self: stretch;\n border-radius: ", ";\n border-width: 0;\n border-style: solid;\n border-color: ", ";\n flex-direction: row;\n\n ", "\n "], ["\n align-self: stretch;\n border-radius: ", ";\n border-width: 0;\n border-style: solid;\n border-color: ", ";\n flex-direction: row;\n\n ", "\n "])), numToPx(
|
|
58
|
-
? "\n border-width: ".concat(numToPx(
|
|
61
|
+
var theme = _a.theme, focused = _a.focused;
|
|
62
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-self: stretch;\n border-radius: ", ";\n border-width: 0;\n border-style: solid;\n border-color: ", ";\n flex-direction: row;\n\n ", "\n "], ["\n align-self: stretch;\n border-radius: ", ";\n border-width: 0;\n border-style: solid;\n border-color: ", ";\n flex-direction: row;\n\n ", "\n "])), numToPx(theme.border.radius.md), theme.input.color.border, focused
|
|
63
|
+
? "\n border-width: ".concat(numToPx(theme.border.width.md), ";\n border-color: ").concat(theme.color.outline.outer, ";\n padding: 2px;\n margin: -4px;")
|
|
59
64
|
: null);
|
|
60
65
|
});
|
|
61
66
|
var StyledInput = styled.TextInput(function (_a) {
|
|
62
|
-
var
|
|
67
|
+
var theme = _a.theme, invalid = _a.invalid, smallAndUp = _a.smallAndUp, iconLeft = _a.iconLeft, iconRight = _a.iconRight, hasRightSlot = _a.hasRightSlot;
|
|
63
68
|
var fontSize = smallAndUp
|
|
64
|
-
?
|
|
65
|
-
:
|
|
69
|
+
? theme.font.size.md.mediaQuery.lg
|
|
70
|
+
: theme.font.size.md.mediaQuery.sm;
|
|
66
71
|
var errorStyles = invalid
|
|
67
|
-
? "\n border-color: ".concat(
|
|
72
|
+
? "\n border-color: ".concat(theme.color.alert.error, ";\n ")
|
|
68
73
|
: '';
|
|
69
|
-
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n
|
|
70
|
-
? "padding-right: ".concat(numToPx(
|
|
74
|
+
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n color: ", ";\n font-size: ", ";\n height: ", ";\n line-height: 18px; /* Corrects for responsive line height in fixed height input */\n border: ", " solid ", ";\n border-radius: ", ";\n padding: ", ";\n flex: 1;\n\n ", "\n ", "\n\n ", "\n "], ["\n font-family: ", ";\n color: ", ";\n font-size: ", ";\n height: ", ";\n line-height: 18px; /* Corrects for responsive line height in fixed height input */\n border: ", " solid ", ";\n border-radius: ", ";\n padding: ", ";\n flex: 1;\n\n ", "\n ", "\n\n ", "\n "])), theme.native.font.family.book, theme.color.surface.onSurface, numToPx(fontSize), numToPx(theme.space[1100]), numToPx(theme.border.width.md), theme.input.color.border, numToPx(theme.border.radius.sm), numToPx(theme.space[200]), iconLeft ? "padding-left: ".concat(numToPx(theme.space[800]), ";") : '', iconRight || hasRightSlot
|
|
75
|
+
? "padding-right: ".concat(numToPx(theme.space[800]), ";")
|
|
71
76
|
: '', errorStyles);
|
|
72
77
|
});
|
|
73
78
|
export { Input };
|