@ovotech/element-native 2.1.0 → 2.2.0-canary-ea79e4d-74
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
|
@@ -1,4 +1,231 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledPressable: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react-native/types").PressableProps & import("react").RefAttributes<import("react-native/types").View>>, import("../../theme/theme").Theme
|
|
2
|
+
export declare const StyledPressable: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react-native/types").PressableProps & import("react").RefAttributes<import("react-native/types").View>>, import("../../theme/theme").Theme & {
|
|
3
|
+
core: {
|
|
4
|
+
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
5
|
+
borderWidth: Record<"small" | "medium" | "large", string>;
|
|
6
|
+
breakpoint: Record<"small" | "medium" | "large", string | number>;
|
|
7
|
+
mediaQuery: Record<"small" | "medium" | "large", string>;
|
|
8
|
+
space: Record<0 | 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15, string>;
|
|
9
|
+
transition: Record<"medium" | "slow" | "fast", string>;
|
|
10
|
+
opacity: Record<"solid" | "transparent" | "translucent", string | number>;
|
|
11
|
+
color: Record<"neutral" | "red" | "orange" | "yellow" | "green" | "blue", {
|
|
12
|
+
lightest: string;
|
|
13
|
+
lighter: string;
|
|
14
|
+
light: string;
|
|
15
|
+
base: string;
|
|
16
|
+
dark: string;
|
|
17
|
+
darker: string;
|
|
18
|
+
darkest: string;
|
|
19
|
+
}> & {
|
|
20
|
+
brand: Record<string, string>;
|
|
21
|
+
};
|
|
22
|
+
fontFamily: Record<"heading" | "body" | "mono" | "bodyBold", {
|
|
23
|
+
native: string;
|
|
24
|
+
web: string;
|
|
25
|
+
}>;
|
|
26
|
+
fontWeight: Record<"bold" | "book" | "black", string | number>;
|
|
27
|
+
fontSize: Record<"small" | "body" | "label" | "lead" | "heading1" | "heading2" | "heading3" | "heading4", {
|
|
28
|
+
small: string | number;
|
|
29
|
+
large: string | number;
|
|
30
|
+
}>;
|
|
31
|
+
lineHeight: Record<"small" | "body" | "label" | "lead" | "heading1" | "heading2" | "heading3" | "heading4", {
|
|
32
|
+
small: string | number;
|
|
33
|
+
large: string | number;
|
|
34
|
+
}>;
|
|
35
|
+
letterSpacing: Record<"base" | "compressed" | "extraCompressed", number>;
|
|
36
|
+
};
|
|
37
|
+
semantic: {
|
|
38
|
+
surface: Record<"base" | "cutout" | "elevated", string>;
|
|
39
|
+
message: Record<"base" | "link" | "error" | "secondary" | "branded", string>;
|
|
40
|
+
border: Record<"graphic" | "differentiated" | "functional", string>;
|
|
41
|
+
focus: Record<"surface" | "outline" | "hover", string>;
|
|
42
|
+
inverted: Record<"border" | "surface", string> & {
|
|
43
|
+
message: Record<"base" | "link" | "secondary" | "branded", string>;
|
|
44
|
+
};
|
|
45
|
+
success: {
|
|
46
|
+
border: string;
|
|
47
|
+
surface: string;
|
|
48
|
+
surfaceEmphasis: string;
|
|
49
|
+
message: string;
|
|
50
|
+
messageOnEmphasis: string;
|
|
51
|
+
};
|
|
52
|
+
warning: {
|
|
53
|
+
border: string;
|
|
54
|
+
surface: string;
|
|
55
|
+
surfaceEmphasis: string;
|
|
56
|
+
message: string;
|
|
57
|
+
messageOnEmphasis: string;
|
|
58
|
+
};
|
|
59
|
+
error: {
|
|
60
|
+
border: string;
|
|
61
|
+
surface: string;
|
|
62
|
+
surfaceEmphasis: string;
|
|
63
|
+
message: string;
|
|
64
|
+
messageOnEmphasis: string;
|
|
65
|
+
};
|
|
66
|
+
info: {
|
|
67
|
+
border: string;
|
|
68
|
+
surface: string;
|
|
69
|
+
surfaceEmphasis: string;
|
|
70
|
+
message: string;
|
|
71
|
+
messageOnEmphasis: string;
|
|
72
|
+
};
|
|
73
|
+
data: Record<"gas" | "branded" | "electric", Record<2 | 1 | 3 | 4, string>>;
|
|
74
|
+
};
|
|
75
|
+
component: {
|
|
76
|
+
heading1: {
|
|
77
|
+
fontFamily: string;
|
|
78
|
+
fontWeight: string | number;
|
|
79
|
+
fontSize: {
|
|
80
|
+
small: string | number;
|
|
81
|
+
large: string | number;
|
|
82
|
+
};
|
|
83
|
+
lineHeight: {
|
|
84
|
+
small: string | number;
|
|
85
|
+
large: string | number;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
heading2: {
|
|
89
|
+
fontFamily: string;
|
|
90
|
+
fontWeight: string | number;
|
|
91
|
+
fontSize: {
|
|
92
|
+
small: string | number;
|
|
93
|
+
large: string | number;
|
|
94
|
+
};
|
|
95
|
+
lineHeight: {
|
|
96
|
+
small: string | number;
|
|
97
|
+
large: string | number;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
heading3: {
|
|
101
|
+
fontFamily: string;
|
|
102
|
+
fontWeight: string | number;
|
|
103
|
+
fontSize: {
|
|
104
|
+
small: string | number;
|
|
105
|
+
large: string | number;
|
|
106
|
+
};
|
|
107
|
+
lineHeight: {
|
|
108
|
+
small: string | number;
|
|
109
|
+
large: string | number;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
heading4: {
|
|
113
|
+
fontFamily: string;
|
|
114
|
+
fontWeight: string | number;
|
|
115
|
+
fontSize: {
|
|
116
|
+
small: string | number;
|
|
117
|
+
large: string | number;
|
|
118
|
+
};
|
|
119
|
+
lineHeight: {
|
|
120
|
+
small: string | number;
|
|
121
|
+
large: string | number;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
lead: {
|
|
125
|
+
fontFamily: string;
|
|
126
|
+
fontWeight: string | number;
|
|
127
|
+
fontSize: {
|
|
128
|
+
small: string | number;
|
|
129
|
+
large: string | number;
|
|
130
|
+
};
|
|
131
|
+
lineHeight: {
|
|
132
|
+
small: string | number;
|
|
133
|
+
large: string | number;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
body: {
|
|
137
|
+
fontFamily: string;
|
|
138
|
+
fontWeight: string | number;
|
|
139
|
+
fontSize: {
|
|
140
|
+
small: string | number;
|
|
141
|
+
large: string | number;
|
|
142
|
+
};
|
|
143
|
+
lineHeight: {
|
|
144
|
+
small: string | number;
|
|
145
|
+
large: string | number;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
small: {
|
|
149
|
+
fontFamily: string;
|
|
150
|
+
fontWeight: string | number;
|
|
151
|
+
fontSize: {
|
|
152
|
+
small: string | number;
|
|
153
|
+
large: string | number;
|
|
154
|
+
};
|
|
155
|
+
lineHeight: {
|
|
156
|
+
small: string | number;
|
|
157
|
+
large: string | number;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
label: {
|
|
161
|
+
fontFamily: string;
|
|
162
|
+
fontWeight: string | number;
|
|
163
|
+
fontSize: {
|
|
164
|
+
small: string | number;
|
|
165
|
+
large: string | number;
|
|
166
|
+
};
|
|
167
|
+
lineHeight: {
|
|
168
|
+
small: string | number;
|
|
169
|
+
large: string | number;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
cta: {
|
|
173
|
+
primary: {
|
|
174
|
+
message: string;
|
|
175
|
+
surface: string;
|
|
176
|
+
messageHover: string;
|
|
177
|
+
surfaceHover: string;
|
|
178
|
+
messageFocused: string;
|
|
179
|
+
surfaceFocused: string;
|
|
180
|
+
outlineFocused: string;
|
|
181
|
+
backgroundFocused: string;
|
|
182
|
+
};
|
|
183
|
+
secondary: {
|
|
184
|
+
message: string;
|
|
185
|
+
surface: string;
|
|
186
|
+
messageHover: string;
|
|
187
|
+
surfaceHover: string;
|
|
188
|
+
messageFocused: string;
|
|
189
|
+
surfaceFocused: string;
|
|
190
|
+
outlineFocused: string;
|
|
191
|
+
backgroundFocused: string;
|
|
192
|
+
};
|
|
193
|
+
destructive: {
|
|
194
|
+
message: string;
|
|
195
|
+
surface: string;
|
|
196
|
+
messageHover: string;
|
|
197
|
+
surfaceHover: string;
|
|
198
|
+
messageFocused: string;
|
|
199
|
+
surfaceFocused: string;
|
|
200
|
+
outlineFocused: string;
|
|
201
|
+
backgroundFocused: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
badge: {
|
|
205
|
+
variants: {
|
|
206
|
+
red: {
|
|
207
|
+
foreground: string;
|
|
208
|
+
background: string;
|
|
209
|
+
};
|
|
210
|
+
orange: {
|
|
211
|
+
foreground: string;
|
|
212
|
+
background: string;
|
|
213
|
+
};
|
|
214
|
+
yellow: {
|
|
215
|
+
foreground: string;
|
|
216
|
+
background: string;
|
|
217
|
+
};
|
|
218
|
+
green: {
|
|
219
|
+
foreground: string;
|
|
220
|
+
background: string;
|
|
221
|
+
};
|
|
222
|
+
blue: {
|
|
223
|
+
foreground: string;
|
|
224
|
+
background: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
}, {
|
|
3
230
|
focused: boolean;
|
|
4
231
|
}, never>;
|
|
@@ -30,11 +30,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
30
30
|
exports.StyledPressable = void 0;
|
|
31
31
|
var react_native_1 = require("react-native");
|
|
32
32
|
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
33
|
-
var utils_1 = require("../../utils");
|
|
34
33
|
exports.StyledPressable = (0, styled_native_1.default)(react_native_1.Pressable)(function (_a) {
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
(focused ? (0, utils_1.pxToNumber)(focusRing.distance) : 0);
|
|
38
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n position: absolute;\n width: ", ";\n z-index: 1;\n top: ", "px;\n right: ", "px;\n "], ["\n display: flex;\n align-items: center;\n position: absolute;\n width: ", ";\n z-index: 1;\n top: ", "px;\n right: ", "px;\n "])), input.icon.size, distance, distance);
|
|
34
|
+
var core = _a.theme.core, focused = _a.focused;
|
|
35
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n position: absolute;\n width: ", ";\n z-index: 1;\n top: ", ";\n right: ", ";\n "], ["\n display: flex;\n align-items: center;\n position: absolute;\n width: ", ";\n z-index: 1;\n top: ", ";\n right: ", ";\n "])), core.space[4], focused ? '16px' : '14px', core.space[3]);
|
|
39
36
|
});
|
|
40
37
|
var templateObject_1;
|
|
@@ -25,8 +25,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.PasswordVisibilityToggle = exports.useTogglePasswordVisibility = void 0;
|
|
27
27
|
var react_1 = __importStar(require("react"));
|
|
28
|
-
var styled_native_1 = require("../../styled.native");
|
|
29
|
-
var utils_1 = require("../../utils");
|
|
30
28
|
var Icon_1 = require("../Icon");
|
|
31
29
|
var PasswordInput_styled_1 = require("./PasswordInput.styled");
|
|
32
30
|
var useTogglePasswordVisibility = function () {
|
|
@@ -42,13 +40,12 @@ var useTogglePasswordVisibility = function () {
|
|
|
42
40
|
exports.useTogglePasswordVisibility = useTogglePasswordVisibility;
|
|
43
41
|
var PasswordVisibilityToggle = function (_a) {
|
|
44
42
|
var iconName = _a.iconName, visibilityToggleLabel = _a.visibilityToggleLabel, handlePasswordVisibility = _a.handlePasswordVisibility;
|
|
45
|
-
var input = (0, react_1.useContext)(styled_native_1.ThemeContext).input;
|
|
46
43
|
var _b = (0, react_1.useState)(false), focused = _b[0], setFocused = _b[1];
|
|
47
|
-
return (react_1.default.createElement(PasswordInput_styled_1.StyledPressable, { testID: "password-input-visibility-toggle", focused: focused, accessibilityRole: "button", accessibilityLabel: visibilityToggleLabel, onPress: handlePasswordVisibility, hitSlop:
|
|
44
|
+
return (react_1.default.createElement(PasswordInput_styled_1.StyledPressable, { testID: "password-input-visibility-toggle", focused: focused, accessibilityRole: "button", accessibilityLabel: visibilityToggleLabel, onPress: handlePasswordVisibility, hitSlop: 16, onFocus: function () {
|
|
48
45
|
setFocused(true);
|
|
49
46
|
}, onBlur: function () {
|
|
50
47
|
setFocused(false);
|
|
51
48
|
} },
|
|
52
|
-
react_1.default.createElement(Icon_1.Icon, { name: iconName, size:
|
|
49
|
+
react_1.default.createElement(Icon_1.Icon, { name: iconName, size: 16, pointerEvents: "none" })));
|
|
53
50
|
};
|
|
54
51
|
exports.PasswordVisibilityToggle = PasswordVisibilityToggle;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextInput } from 'react-native';
|
|
3
|
-
declare const
|
|
3
|
+
declare const PhoneInput: React.ForwardRefExoticComponent<import("react-native/types").TextInputProps & {
|
|
4
4
|
invalid?: boolean | undefined;
|
|
5
5
|
stretch?: boolean | undefined;
|
|
6
6
|
iconLeft?: (string & {}) | import("../../providers").IconName | undefined;
|
|
7
7
|
iconRight?: (string & {}) | import("../../providers").IconName | undefined;
|
|
8
8
|
rightSlot?: React.ReactNode;
|
|
9
9
|
} & React.RefAttributes<TextInput>>;
|
|
10
|
-
export {
|
|
10
|
+
export { PhoneInput };
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.
|
|
37
|
+
exports.PhoneInput = void 0;
|
|
38
38
|
var react_1 = __importStar(require("react"));
|
|
39
39
|
var Input_1 = require("./Input");
|
|
40
|
-
var
|
|
41
|
-
exports.
|
|
40
|
+
var PhoneInput = (0, react_1.forwardRef)(function (props, ref) { return (react_1.default.createElement(Input_1.Input, __assign({}, props, { keyboardType: "phone-pad", autoCapitalize: "none", autoCorrect: false, ref: ref }))); });
|
|
41
|
+
exports.PhoneInput = PhoneInput;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __assign = (this && this.__assign) || function () {
|
|
3
7
|
__assign = Object.assign || function(t) {
|
|
4
8
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -47,18 +51,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
47
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
52
|
exports.TextareaInput = void 0;
|
|
49
53
|
var react_1 = __importStar(require("react"));
|
|
50
|
-
var
|
|
51
|
-
var styled_native_1 = require("../../styled.native");
|
|
52
|
-
var theme_1 = require("../../theme");
|
|
54
|
+
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
53
55
|
var utils_1 = require("../../utils");
|
|
54
56
|
var Input_1 = require("./Input");
|
|
57
|
+
var StyledInput = (0, styled_native_1.default)(Input_1.Input)(function (_a) {
|
|
58
|
+
var core = _a.theme.core, rows = _a.rows;
|
|
59
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", " ", " ", " ", ";\n height: ", "px;\n "], ["\n padding: ", " ", " ", " ", ";\n height: ", "px;\n "])), core.space[3], core.space[2], core.space[2], core.space[2], (0, utils_1.pxToNumber)(core.space[8]) * rows);
|
|
60
|
+
});
|
|
55
61
|
var TextareaInput = (0, react_1.forwardRef)(function (_a, ref) {
|
|
56
62
|
var _b = _a.rows, rows = _b === void 0 ? 3 : _b, rest = __rest(_a, ["rows"]);
|
|
57
|
-
|
|
58
|
-
var smallAndUp = (0, hooks_1.useBreakpoint)().smallAndUp;
|
|
59
|
-
var height = (0, utils_1.pxToNumber)(input.padding) * 2 +
|
|
60
|
-
(0, utils_1.pxToNumber)((0, theme_1.calculateLineHeight)(smallAndUp ? input.fontSize[1] : input.fontSize[0], input.lineHeight)) *
|
|
61
|
-
rows;
|
|
62
|
-
return (react_1.default.createElement(Input_1.Input, __assign({}, rest, { keyboardType: "default", multiline: true, textAlignVertical: "top", style: { height: height }, ref: ref })));
|
|
63
|
+
return (react_1.default.createElement(StyledInput, __assign({}, rest, { keyboardType: "default", multiline: true, textAlignVertical: "top", rows: rows, ref: ref })));
|
|
63
64
|
});
|
|
64
65
|
exports.TextareaInput = TextareaInput;
|
|
66
|
+
var templateObject_1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CurrencyInput } from './CurrencyInput';
|
|
2
2
|
export { EmailInput } from './EmailInput';
|
|
3
3
|
export { NumberInput } from './NumberInput';
|
|
4
|
-
export {
|
|
4
|
+
export { PhoneInput } from './PhoneInput';
|
|
5
5
|
export { TextInput } from './TextInput';
|
|
6
6
|
export { PasswordInput } from './PasswordInput';
|
|
7
7
|
export { TextareaInput } from './TextareaInput';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextareaInput = exports.PasswordInput = exports.TextInput = exports.
|
|
3
|
+
exports.TextareaInput = exports.PasswordInput = exports.TextInput = exports.PhoneInput = exports.NumberInput = exports.EmailInput = exports.CurrencyInput = void 0;
|
|
4
4
|
var CurrencyInput_1 = require("./CurrencyInput");
|
|
5
5
|
Object.defineProperty(exports, "CurrencyInput", { enumerable: true, get: function () { return CurrencyInput_1.CurrencyInput; } });
|
|
6
6
|
var EmailInput_1 = require("./EmailInput");
|
|
7
7
|
Object.defineProperty(exports, "EmailInput", { enumerable: true, get: function () { return EmailInput_1.EmailInput; } });
|
|
8
8
|
var NumberInput_1 = require("./NumberInput");
|
|
9
9
|
Object.defineProperty(exports, "NumberInput", { enumerable: true, get: function () { return NumberInput_1.NumberInput; } });
|
|
10
|
-
var
|
|
11
|
-
Object.defineProperty(exports, "
|
|
10
|
+
var PhoneInput_1 = require("./PhoneInput");
|
|
11
|
+
Object.defineProperty(exports, "PhoneInput", { enumerable: true, get: function () { return PhoneInput_1.PhoneInput; } });
|
|
12
12
|
var TextInput_1 = require("./TextInput");
|
|
13
13
|
Object.defineProperty(exports, "TextInput", { enumerable: true, get: function () { return TextInput_1.TextInput; } });
|
|
14
14
|
var PasswordInput_1 = require("./PasswordInput");
|
|
@@ -5,7 +5,234 @@ declare const LabelText: import("react").ForwardRefExoticComponent<Pick<Omit<{
|
|
|
5
5
|
[x: number]: any;
|
|
6
6
|
[x: symbol]: any;
|
|
7
7
|
} & {
|
|
8
|
-
theme?: import("../../theme/theme").Theme
|
|
8
|
+
theme?: (import("../../theme/theme").Theme & {
|
|
9
|
+
core: {
|
|
10
|
+
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
11
|
+
borderWidth: Record<"small" | "medium" | "large", string>;
|
|
12
|
+
breakpoint: Record<"small" | "medium" | "large", string | number>;
|
|
13
|
+
mediaQuery: Record<"small" | "medium" | "large", string>;
|
|
14
|
+
space: Record<0 | 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15, string>;
|
|
15
|
+
transition: Record<"medium" | "slow" | "fast", string>;
|
|
16
|
+
opacity: Record<"solid" | "transparent" | "translucent", string | number>;
|
|
17
|
+
color: Record<"neutral" | "red" | "orange" | "yellow" | "green" | "blue", {
|
|
18
|
+
lightest: string;
|
|
19
|
+
lighter: string;
|
|
20
|
+
light: string;
|
|
21
|
+
base: string;
|
|
22
|
+
dark: string;
|
|
23
|
+
darker: string;
|
|
24
|
+
darkest: string;
|
|
25
|
+
}> & {
|
|
26
|
+
brand: Record<string, string>;
|
|
27
|
+
};
|
|
28
|
+
fontFamily: Record<"heading" | "body" | "mono" | "bodyBold", {
|
|
29
|
+
native: string;
|
|
30
|
+
web: string;
|
|
31
|
+
}>;
|
|
32
|
+
fontWeight: Record<"bold" | "book" | "black", string | number>;
|
|
33
|
+
fontSize: Record<"small" | "body" | "label" | "lead" | "heading1" | "heading2" | "heading3" | "heading4", {
|
|
34
|
+
small: string | number;
|
|
35
|
+
large: string | number;
|
|
36
|
+
}>;
|
|
37
|
+
lineHeight: Record<"small" | "body" | "label" | "lead" | "heading1" | "heading2" | "heading3" | "heading4", {
|
|
38
|
+
small: string | number;
|
|
39
|
+
large: string | number;
|
|
40
|
+
}>;
|
|
41
|
+
letterSpacing: Record<"base" | "compressed" | "extraCompressed", number>;
|
|
42
|
+
};
|
|
43
|
+
semantic: {
|
|
44
|
+
surface: Record<"base" | "cutout" | "elevated", string>;
|
|
45
|
+
message: Record<"base" | "link" | "error" | "secondary" | "branded", string>;
|
|
46
|
+
border: Record<"graphic" | "differentiated" | "functional", string>;
|
|
47
|
+
focus: Record<"surface" | "outline" | "hover", string>;
|
|
48
|
+
inverted: Record<"border" | "surface", string> & {
|
|
49
|
+
message: Record<"base" | "link" | "secondary" | "branded", string>;
|
|
50
|
+
};
|
|
51
|
+
success: {
|
|
52
|
+
border: string;
|
|
53
|
+
surface: string;
|
|
54
|
+
surfaceEmphasis: string;
|
|
55
|
+
message: string;
|
|
56
|
+
messageOnEmphasis: string;
|
|
57
|
+
};
|
|
58
|
+
warning: {
|
|
59
|
+
border: string;
|
|
60
|
+
surface: string;
|
|
61
|
+
surfaceEmphasis: string;
|
|
62
|
+
message: string;
|
|
63
|
+
messageOnEmphasis: string;
|
|
64
|
+
};
|
|
65
|
+
error: {
|
|
66
|
+
border: string;
|
|
67
|
+
surface: string;
|
|
68
|
+
surfaceEmphasis: string;
|
|
69
|
+
message: string;
|
|
70
|
+
messageOnEmphasis: string;
|
|
71
|
+
};
|
|
72
|
+
info: {
|
|
73
|
+
border: string;
|
|
74
|
+
surface: string;
|
|
75
|
+
surfaceEmphasis: string;
|
|
76
|
+
message: string;
|
|
77
|
+
messageOnEmphasis: string;
|
|
78
|
+
};
|
|
79
|
+
data: Record<"gas" | "branded" | "electric", Record<2 | 1 | 3 | 4, string>>;
|
|
80
|
+
};
|
|
81
|
+
component: {
|
|
82
|
+
heading1: {
|
|
83
|
+
fontFamily: string;
|
|
84
|
+
fontWeight: string | number;
|
|
85
|
+
fontSize: {
|
|
86
|
+
small: string | number;
|
|
87
|
+
large: string | number;
|
|
88
|
+
};
|
|
89
|
+
lineHeight: {
|
|
90
|
+
small: string | number;
|
|
91
|
+
large: string | number;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
heading2: {
|
|
95
|
+
fontFamily: string;
|
|
96
|
+
fontWeight: string | number;
|
|
97
|
+
fontSize: {
|
|
98
|
+
small: string | number;
|
|
99
|
+
large: string | number;
|
|
100
|
+
};
|
|
101
|
+
lineHeight: {
|
|
102
|
+
small: string | number;
|
|
103
|
+
large: string | number;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
heading3: {
|
|
107
|
+
fontFamily: string;
|
|
108
|
+
fontWeight: string | number;
|
|
109
|
+
fontSize: {
|
|
110
|
+
small: string | number;
|
|
111
|
+
large: string | number;
|
|
112
|
+
};
|
|
113
|
+
lineHeight: {
|
|
114
|
+
small: string | number;
|
|
115
|
+
large: string | number;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
heading4: {
|
|
119
|
+
fontFamily: string;
|
|
120
|
+
fontWeight: string | number;
|
|
121
|
+
fontSize: {
|
|
122
|
+
small: string | number;
|
|
123
|
+
large: string | number;
|
|
124
|
+
};
|
|
125
|
+
lineHeight: {
|
|
126
|
+
small: string | number;
|
|
127
|
+
large: string | number;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
lead: {
|
|
131
|
+
fontFamily: string;
|
|
132
|
+
fontWeight: string | number;
|
|
133
|
+
fontSize: {
|
|
134
|
+
small: string | number;
|
|
135
|
+
large: string | number;
|
|
136
|
+
};
|
|
137
|
+
lineHeight: {
|
|
138
|
+
small: string | number;
|
|
139
|
+
large: string | number;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
body: {
|
|
143
|
+
fontFamily: string;
|
|
144
|
+
fontWeight: string | number;
|
|
145
|
+
fontSize: {
|
|
146
|
+
small: string | number;
|
|
147
|
+
large: string | number;
|
|
148
|
+
};
|
|
149
|
+
lineHeight: {
|
|
150
|
+
small: string | number;
|
|
151
|
+
large: string | number;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
small: {
|
|
155
|
+
fontFamily: string;
|
|
156
|
+
fontWeight: string | number;
|
|
157
|
+
fontSize: {
|
|
158
|
+
small: string | number;
|
|
159
|
+
large: string | number;
|
|
160
|
+
};
|
|
161
|
+
lineHeight: {
|
|
162
|
+
small: string | number;
|
|
163
|
+
large: string | number;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
label: {
|
|
167
|
+
fontFamily: string;
|
|
168
|
+
fontWeight: string | number;
|
|
169
|
+
fontSize: {
|
|
170
|
+
small: string | number;
|
|
171
|
+
large: string | number;
|
|
172
|
+
};
|
|
173
|
+
lineHeight: {
|
|
174
|
+
small: string | number;
|
|
175
|
+
large: string | number;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
cta: {
|
|
179
|
+
primary: {
|
|
180
|
+
message: string;
|
|
181
|
+
surface: string;
|
|
182
|
+
messageHover: string;
|
|
183
|
+
surfaceHover: string;
|
|
184
|
+
messageFocused: string;
|
|
185
|
+
surfaceFocused: string;
|
|
186
|
+
outlineFocused: string;
|
|
187
|
+
backgroundFocused: string;
|
|
188
|
+
};
|
|
189
|
+
secondary: {
|
|
190
|
+
message: string;
|
|
191
|
+
surface: string;
|
|
192
|
+
messageHover: string;
|
|
193
|
+
surfaceHover: string;
|
|
194
|
+
messageFocused: string;
|
|
195
|
+
surfaceFocused: string;
|
|
196
|
+
outlineFocused: string;
|
|
197
|
+
backgroundFocused: string;
|
|
198
|
+
};
|
|
199
|
+
destructive: {
|
|
200
|
+
message: string;
|
|
201
|
+
surface: string;
|
|
202
|
+
messageHover: string;
|
|
203
|
+
surfaceHover: string;
|
|
204
|
+
messageFocused: string;
|
|
205
|
+
surfaceFocused: string;
|
|
206
|
+
outlineFocused: string;
|
|
207
|
+
backgroundFocused: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
badge: {
|
|
211
|
+
variants: {
|
|
212
|
+
red: {
|
|
213
|
+
foreground: string;
|
|
214
|
+
background: string;
|
|
215
|
+
};
|
|
216
|
+
orange: {
|
|
217
|
+
foreground: string;
|
|
218
|
+
background: string;
|
|
219
|
+
};
|
|
220
|
+
yellow: {
|
|
221
|
+
foreground: string;
|
|
222
|
+
background: string;
|
|
223
|
+
};
|
|
224
|
+
green: {
|
|
225
|
+
foreground: string;
|
|
226
|
+
background: string;
|
|
227
|
+
};
|
|
228
|
+
blue: {
|
|
229
|
+
foreground: string;
|
|
230
|
+
background: string;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
}) | undefined;
|
|
9
236
|
} & {
|
|
10
237
|
as?: string | import("react").ComponentType<any> | undefined;
|
|
11
238
|
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
@@ -34,7 +34,7 @@ var utils_1 = require("../../utils");
|
|
|
34
34
|
var StyledLabelText = styled_native_1.default.Text(function (_a) {
|
|
35
35
|
var field = _a.theme.field, smallAndUp = _a.smallAndUp;
|
|
36
36
|
var fontSize = smallAndUp ? field.fontSize[1] : field.fontSize[0];
|
|
37
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n
|
|
37
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __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 "])), field.label.fontFamily, (0, theme_1.calculateLineHeight)(fontSize, field.lineHeight), field.label.color, fontSize);
|
|
38
38
|
});
|
|
39
39
|
var LabelText = (0, utils_1.styledComponentWithBreakpoints)(StyledLabelText);
|
|
40
40
|
exports.LabelText = LabelText;
|