@ovotech/element-native 2.0.4 → 2.2.0-canary-1cac2ba-73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.js +23 -22
- 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/Accordion/types.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +238 -8
- package/dist/components/Badge/Badge.js +35 -14
- 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 -4
- package/dist/components/Card/Card.d.ts +228 -5
- package/dist/components/Card/Card.js +5 -25
- package/dist/components/Checkbox/Checkbox.js +19 -26
- 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/Divider/Divider.d.ts +5 -0
- package/dist/components/Divider/Divider.js +45 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Divider/index.js +5 -0
- 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 +229 -2
- 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/CurrencyInput.d.ts +2 -1
- package/dist/components/Input/EmailInput.d.ts +2 -1
- package/dist/components/Input/Input.d.ts +4 -2
- package/dist/components/Input/Input.js +16 -18
- package/dist/components/Input/NumberInput.d.ts +2 -1
- package/dist/components/Input/PasswordInput.d.ts +4 -1
- package/dist/components/Input/PasswordInput.js +4 -2
- package/dist/components/Input/PasswordInput.styled.d.ts +231 -0
- package/dist/components/Input/PasswordInput.styled.js +37 -0
- package/dist/components/Input/PasswordVisibilityToggle.d.ts +11 -0
- package/dist/components/Input/PasswordVisibilityToggle.js +51 -0
- package/dist/components/Input/{TelInput.d.ts → PhoneInput.d.ts} +3 -2
- package/dist/components/Input/{TelInput.js → PhoneInput.js} +3 -3
- package/dist/components/Input/TextInput.d.ts +2 -1
- package/dist/components/Input/TextareaInput.d.ts +2 -1
- 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.d.ts +1 -0
- package/dist/components/NavHeader/NavHeader.js +11 -13
- package/dist/components/Notification/Notification.d.ts +466 -20
- package/dist/components/Notification/Notification.js +32 -44
- package/dist/components/Radio/Radio.js +18 -36
- 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/SkeletonLoading/SkeletonAnimation.d.ts +6 -0
- package/dist/components/SkeletonLoading/SkeletonAnimation.js +57 -0
- package/dist/components/SkeletonLoading/SkeletonCTA.js +3 -1
- package/dist/components/SkeletonLoading/SkeletonCircle.js +4 -2
- package/dist/components/SkeletonLoading/SkeletonHeading.js +3 -1
- package/dist/components/SkeletonLoading/SkeletonText.js +2 -2
- 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/CurrencyField.d.ts +2 -1
- package/dist/components/TextField/EmailField.d.ts +2 -1
- package/dist/components/TextField/NumberField.d.ts +2 -1
- package/dist/components/TextField/PasswordField.d.ts +4 -1
- package/dist/components/TextField/PasswordField.js +2 -2
- package/dist/components/TextField/PhoneField.d.ts +10 -0
- package/dist/components/TextField/PhoneField.js +56 -0
- package/dist/components/TextField/TelField.d.ts +6 -1
- package/dist/components/TextField/TelField.js +7 -2
- package/dist/components/TextField/TextField.d.ts +2 -1
- package/dist/components/TextField/TextareaField.d.ts +2 -1
- 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 +3 -0
- package/dist/components/index.js +3 -0
- package/dist/esm/components/Accordion/Accordion.js +26 -25
- 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 -14
- 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 +17 -27
- 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/Divider/Divider.js +15 -0
- package/dist/esm/components/Divider/index.js +1 -0
- 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 +18 -20
- package/dist/esm/components/Input/PasswordInput.js +4 -2
- package/dist/esm/components/Input/PasswordInput.styled.js +11 -0
- package/dist/esm/components/Input/PasswordVisibilityToggle.js +23 -0
- 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 +12 -14
- package/dist/esm/components/Notification/Notification.js +34 -46
- package/dist/esm/components/Radio/Radio.js +18 -36
- 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/SkeletonLoading/SkeletonAnimation.js +30 -0
- package/dist/esm/components/SkeletonLoading/SkeletonCTA.js +3 -1
- package/dist/esm/components/SkeletonLoading/SkeletonCircle.js +4 -2
- package/dist/esm/components/SkeletonLoading/SkeletonHeading.js +3 -1
- package/dist/esm/components/SkeletonLoading/SkeletonText.js +2 -2
- 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/PasswordField.js +2 -2
- 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 +3 -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 +12 -10
|
@@ -1 +1,228 @@
|
|
|
1
|
-
export declare const Skeleton: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme
|
|
1
|
+
export declare const Skeleton: import("styled-components").StyledComponent<typeof import("react-native").View, import("../../theme/theme").Theme & {
|
|
2
|
+
core: {
|
|
3
|
+
radius: Record<"small" | "medium" | "large" | "max", string>;
|
|
4
|
+
borderWidth: Record<"small" | "medium" | "large", string>;
|
|
5
|
+
breakpoint: Record<"small" | "medium" | "large", string | number>;
|
|
6
|
+
mediaQuery: Record<"small" | "medium" | "large", string>;
|
|
7
|
+
space: Record<0 | 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15, string>;
|
|
8
|
+
transition: Record<"medium" | "slow" | "fast", string>;
|
|
9
|
+
opacity: Record<"solid" | "transparent" | "translucent", string | number>;
|
|
10
|
+
color: Record<"neutral" | "red" | "orange" | "yellow" | "green" | "blue", {
|
|
11
|
+
lightest: string;
|
|
12
|
+
lighter: string;
|
|
13
|
+
light: string;
|
|
14
|
+
base: string;
|
|
15
|
+
dark: string;
|
|
16
|
+
darker: string;
|
|
17
|
+
darkest: string;
|
|
18
|
+
}> & {
|
|
19
|
+
brand: Record<string, string>;
|
|
20
|
+
};
|
|
21
|
+
fontFamily: Record<"heading" | "body" | "mono" | "bodyBold", {
|
|
22
|
+
native: string;
|
|
23
|
+
web: string;
|
|
24
|
+
}>;
|
|
25
|
+
fontWeight: Record<"bold" | "book" | "black", string | number>;
|
|
26
|
+
fontSize: Record<"small" | "body" | "label" | "lead" | "heading1" | "heading2" | "heading3" | "heading4", {
|
|
27
|
+
small: string | number;
|
|
28
|
+
large: string | number;
|
|
29
|
+
}>;
|
|
30
|
+
lineHeight: Record<"small" | "body" | "label" | "lead" | "heading1" | "heading2" | "heading3" | "heading4", {
|
|
31
|
+
small: string | number;
|
|
32
|
+
large: string | number;
|
|
33
|
+
}>;
|
|
34
|
+
letterSpacing: Record<"base" | "compressed" | "extraCompressed", number>;
|
|
35
|
+
};
|
|
36
|
+
semantic: {
|
|
37
|
+
surface: Record<"base" | "cutout" | "elevated", string>;
|
|
38
|
+
message: Record<"base" | "link" | "error" | "secondary" | "branded", string>;
|
|
39
|
+
border: Record<"graphic" | "differentiated" | "functional", string>;
|
|
40
|
+
focus: Record<"surface" | "outline" | "hover", string>;
|
|
41
|
+
inverted: Record<"border" | "surface", string> & {
|
|
42
|
+
message: Record<"base" | "link" | "secondary" | "branded", string>;
|
|
43
|
+
};
|
|
44
|
+
success: {
|
|
45
|
+
border: string;
|
|
46
|
+
surface: string;
|
|
47
|
+
surfaceEmphasis: string;
|
|
48
|
+
message: string;
|
|
49
|
+
messageOnEmphasis: string;
|
|
50
|
+
};
|
|
51
|
+
warning: {
|
|
52
|
+
border: string;
|
|
53
|
+
surface: string;
|
|
54
|
+
surfaceEmphasis: string;
|
|
55
|
+
message: string;
|
|
56
|
+
messageOnEmphasis: string;
|
|
57
|
+
};
|
|
58
|
+
error: {
|
|
59
|
+
border: string;
|
|
60
|
+
surface: string;
|
|
61
|
+
surfaceEmphasis: string;
|
|
62
|
+
message: string;
|
|
63
|
+
messageOnEmphasis: string;
|
|
64
|
+
};
|
|
65
|
+
info: {
|
|
66
|
+
border: string;
|
|
67
|
+
surface: string;
|
|
68
|
+
surfaceEmphasis: string;
|
|
69
|
+
message: string;
|
|
70
|
+
messageOnEmphasis: string;
|
|
71
|
+
};
|
|
72
|
+
data: Record<"gas" | "branded" | "electric", Record<2 | 1 | 3 | 4, string>>;
|
|
73
|
+
};
|
|
74
|
+
component: {
|
|
75
|
+
heading1: {
|
|
76
|
+
fontFamily: string;
|
|
77
|
+
fontWeight: string | number;
|
|
78
|
+
fontSize: {
|
|
79
|
+
small: string | number;
|
|
80
|
+
large: string | number;
|
|
81
|
+
};
|
|
82
|
+
lineHeight: {
|
|
83
|
+
small: string | number;
|
|
84
|
+
large: string | number;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
heading2: {
|
|
88
|
+
fontFamily: string;
|
|
89
|
+
fontWeight: string | number;
|
|
90
|
+
fontSize: {
|
|
91
|
+
small: string | number;
|
|
92
|
+
large: string | number;
|
|
93
|
+
};
|
|
94
|
+
lineHeight: {
|
|
95
|
+
small: string | number;
|
|
96
|
+
large: string | number;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
heading3: {
|
|
100
|
+
fontFamily: string;
|
|
101
|
+
fontWeight: string | number;
|
|
102
|
+
fontSize: {
|
|
103
|
+
small: string | number;
|
|
104
|
+
large: string | number;
|
|
105
|
+
};
|
|
106
|
+
lineHeight: {
|
|
107
|
+
small: string | number;
|
|
108
|
+
large: string | number;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
heading4: {
|
|
112
|
+
fontFamily: string;
|
|
113
|
+
fontWeight: string | number;
|
|
114
|
+
fontSize: {
|
|
115
|
+
small: string | number;
|
|
116
|
+
large: string | number;
|
|
117
|
+
};
|
|
118
|
+
lineHeight: {
|
|
119
|
+
small: string | number;
|
|
120
|
+
large: string | number;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
lead: {
|
|
124
|
+
fontFamily: string;
|
|
125
|
+
fontWeight: string | number;
|
|
126
|
+
fontSize: {
|
|
127
|
+
small: string | number;
|
|
128
|
+
large: string | number;
|
|
129
|
+
};
|
|
130
|
+
lineHeight: {
|
|
131
|
+
small: string | number;
|
|
132
|
+
large: string | number;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
body: {
|
|
136
|
+
fontFamily: string;
|
|
137
|
+
fontWeight: string | number;
|
|
138
|
+
fontSize: {
|
|
139
|
+
small: string | number;
|
|
140
|
+
large: string | number;
|
|
141
|
+
};
|
|
142
|
+
lineHeight: {
|
|
143
|
+
small: string | number;
|
|
144
|
+
large: string | number;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
small: {
|
|
148
|
+
fontFamily: string;
|
|
149
|
+
fontWeight: string | number;
|
|
150
|
+
fontSize: {
|
|
151
|
+
small: string | number;
|
|
152
|
+
large: string | number;
|
|
153
|
+
};
|
|
154
|
+
lineHeight: {
|
|
155
|
+
small: string | number;
|
|
156
|
+
large: string | number;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
label: {
|
|
160
|
+
fontFamily: string;
|
|
161
|
+
fontWeight: string | number;
|
|
162
|
+
fontSize: {
|
|
163
|
+
small: string | number;
|
|
164
|
+
large: string | number;
|
|
165
|
+
};
|
|
166
|
+
lineHeight: {
|
|
167
|
+
small: string | number;
|
|
168
|
+
large: string | number;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
cta: {
|
|
172
|
+
primary: {
|
|
173
|
+
message: string;
|
|
174
|
+
surface: string;
|
|
175
|
+
messageHover: string;
|
|
176
|
+
surfaceHover: string;
|
|
177
|
+
messageFocused: string;
|
|
178
|
+
surfaceFocused: string;
|
|
179
|
+
outlineFocused: string;
|
|
180
|
+
backgroundFocused: string;
|
|
181
|
+
};
|
|
182
|
+
secondary: {
|
|
183
|
+
message: string;
|
|
184
|
+
surface: string;
|
|
185
|
+
messageHover: string;
|
|
186
|
+
surfaceHover: string;
|
|
187
|
+
messageFocused: string;
|
|
188
|
+
surfaceFocused: string;
|
|
189
|
+
outlineFocused: string;
|
|
190
|
+
backgroundFocused: string;
|
|
191
|
+
};
|
|
192
|
+
destructive: {
|
|
193
|
+
message: string;
|
|
194
|
+
surface: string;
|
|
195
|
+
messageHover: string;
|
|
196
|
+
surfaceHover: string;
|
|
197
|
+
messageFocused: string;
|
|
198
|
+
surfaceFocused: string;
|
|
199
|
+
outlineFocused: string;
|
|
200
|
+
backgroundFocused: string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
badge: {
|
|
204
|
+
variants: {
|
|
205
|
+
red: {
|
|
206
|
+
foreground: string;
|
|
207
|
+
background: string;
|
|
208
|
+
};
|
|
209
|
+
orange: {
|
|
210
|
+
foreground: string;
|
|
211
|
+
background: string;
|
|
212
|
+
};
|
|
213
|
+
yellow: {
|
|
214
|
+
foreground: string;
|
|
215
|
+
background: string;
|
|
216
|
+
};
|
|
217
|
+
green: {
|
|
218
|
+
foreground: string;
|
|
219
|
+
background: string;
|
|
220
|
+
};
|
|
221
|
+
blue: {
|
|
222
|
+
foreground: string;
|
|
223
|
+
background: string;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
}, {}, never>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.SkeletonAnimation = void 0;
|
|
27
|
+
var react_1 = __importStar(require("react"));
|
|
28
|
+
var react_native_1 = require("react-native");
|
|
29
|
+
var SkeletonAnimation = function (_a) {
|
|
30
|
+
var children = _a.children, _b = _a.animation, animation = _b === void 0 ? 'pulse' : _b, testID = _a.testID;
|
|
31
|
+
var animationRef = (0, react_1.useRef)(new react_native_1.Animated.Value(0));
|
|
32
|
+
var animationLoop = (0, react_1.useRef)();
|
|
33
|
+
(0, react_1.useEffect)(function () {
|
|
34
|
+
animationLoop.current = react_native_1.Animated.timing(animationRef.current, {
|
|
35
|
+
toValue: 2,
|
|
36
|
+
delay: 400,
|
|
37
|
+
duration: 1500,
|
|
38
|
+
useNativeDriver: !!react_native_1.Platform.select({
|
|
39
|
+
web: false,
|
|
40
|
+
native: true,
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
animationRef.current.setValue(0);
|
|
44
|
+
react_native_1.Animated.loop(animationLoop.current).start();
|
|
45
|
+
}, []);
|
|
46
|
+
return (react_1.default.createElement(react_native_1.View, { accessibilityRole: "none", accessibilityLabel: "loading...", accessible: false, testID: testID }, animation === 'pulse' ? (react_1.default.createElement(react_native_1.Animated.View, { style: [
|
|
47
|
+
{
|
|
48
|
+
height: '100%',
|
|
49
|
+
width: '100%',
|
|
50
|
+
opacity: animationRef.current.interpolate({
|
|
51
|
+
inputRange: [0.25, 1, 2],
|
|
52
|
+
outputRange: [1, 0.25, 1],
|
|
53
|
+
}),
|
|
54
|
+
},
|
|
55
|
+
] }, children)) : (react_1.default.createElement(react_native_1.View, null, children))));
|
|
56
|
+
};
|
|
57
|
+
exports.SkeletonAnimation = SkeletonAnimation;
|
|
@@ -30,12 +30,14 @@ var react_1 = __importDefault(require("react"));
|
|
|
30
30
|
var styled_native_1 = __importDefault(require("../../styled.native"));
|
|
31
31
|
var Text_1 = require("../Text");
|
|
32
32
|
var Skeleton_1 = require("./Skeleton");
|
|
33
|
+
var SkeletonAnimation_1 = require("./SkeletonAnimation");
|
|
33
34
|
var StyledSkeletonCTA = (0, styled_native_1.default)(Skeleton_1.Skeleton)(function (_a) {
|
|
34
35
|
var _b = _a.theme, colors = _b.colors, space = _b.space, size = _a.size;
|
|
35
36
|
return "\n background-color: ".concat(colors.borderMuted, ";\n width: ").concat(size, ";\n height: ").concat(space[12], ";\n ");
|
|
36
37
|
});
|
|
37
38
|
var SkeletonCTA = function (_a) {
|
|
38
39
|
var _b = _a.size, size = _b === void 0 ? '250px' : _b, rest = __rest(_a, ["size"]);
|
|
39
|
-
return (react_1.default.createElement(
|
|
40
|
+
return (react_1.default.createElement(SkeletonAnimation_1.SkeletonAnimation, null,
|
|
41
|
+
react_1.default.createElement(StyledSkeletonCTA, __assign({ as: Text_1.P, size: size }, rest))));
|
|
40
42
|
};
|
|
41
43
|
exports.SkeletonCTA = SkeletonCTA;
|
|
@@ -30,6 +30,7 @@ var react_1 = __importDefault(require("react"));
|
|
|
30
30
|
var styled_native_1 = __importDefault(require("../../styled.native"));
|
|
31
31
|
var utils_1 = require("../../utils");
|
|
32
32
|
var Skeleton_1 = require("./Skeleton");
|
|
33
|
+
var SkeletonAnimation_1 = require("./SkeletonAnimation");
|
|
33
34
|
var StyledSkeletonCircleWrapper = (0, styled_native_1.default)(Skeleton_1.Skeleton)(function (_a) {
|
|
34
35
|
var size = _a.size;
|
|
35
36
|
return "width: ".concat(size, "; max-width: 100%;");
|
|
@@ -40,7 +41,8 @@ var StyledSkeletonCircle = (0, styled_native_1.default)(Skeleton_1.Skeleton)(fun
|
|
|
40
41
|
});
|
|
41
42
|
var SkeletonCircle = function (_a) {
|
|
42
43
|
var _b = _a.size, size = _b === void 0 ? '120px' : _b, rest = __rest(_a, ["size"]);
|
|
43
|
-
return (react_1.default.createElement(
|
|
44
|
-
react_1.default.createElement(
|
|
44
|
+
return (react_1.default.createElement(SkeletonAnimation_1.SkeletonAnimation, null,
|
|
45
|
+
react_1.default.createElement(StyledSkeletonCircleWrapper, __assign({ size: size }, rest),
|
|
46
|
+
react_1.default.createElement(StyledSkeletonCircle, { size: size }))));
|
|
45
47
|
};
|
|
46
48
|
exports.SkeletonCircle = SkeletonCircle;
|
|
@@ -30,12 +30,14 @@ var react_1 = __importDefault(require("react"));
|
|
|
30
30
|
var styled_native_1 = __importDefault(require("../../styled.native"));
|
|
31
31
|
var Heading_1 = require("../Heading");
|
|
32
32
|
var Skeleton_1 = require("./Skeleton");
|
|
33
|
+
var SkeletonAnimation_1 = require("./SkeletonAnimation");
|
|
33
34
|
var StyledSkeletonHeading = (0, styled_native_1.default)(Skeleton_1.Skeleton)(function (_a) {
|
|
34
35
|
var colors = _a.theme.colors, size = _a.size;
|
|
35
36
|
return "\n background-color: ".concat(colors.borderMuted, ";\n width: ").concat(size, ";\n ");
|
|
36
37
|
});
|
|
37
38
|
var SkeletonHeading = function (_a) {
|
|
38
39
|
var _b = _a.size, size = _b === void 0 ? '70%' : _b, _c = _a.headingComponent, Heading = _c === void 0 ? Heading_1.Heading3 : _c, rest = __rest(_a, ["size", "headingComponent"]);
|
|
39
|
-
return (react_1.default.createElement(
|
|
40
|
+
return (react_1.default.createElement(SkeletonAnimation_1.SkeletonAnimation, null,
|
|
41
|
+
react_1.default.createElement(StyledSkeletonHeading, __assign({ "aria-hidden": "true", size: size, as: Heading }, rest), "\u00A0")));
|
|
40
42
|
};
|
|
41
43
|
exports.SkeletonHeading = SkeletonHeading;
|
|
@@ -27,12 +27,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.SkeletonText = void 0;
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
|
-
var react_native_1 = require("react-native");
|
|
31
30
|
var hooks_1 = require("../../hooks");
|
|
32
31
|
var styled_native_1 = __importDefault(require("../../styled.native"));
|
|
33
32
|
var utils_1 = require("../../utils");
|
|
34
33
|
var Text_1 = require("../Text");
|
|
35
34
|
var Skeleton_1 = require("./Skeleton");
|
|
35
|
+
var SkeletonAnimation_1 = require("./SkeletonAnimation");
|
|
36
36
|
var StyledSkeletonText = (0, styled_native_1.default)(Skeleton_1.Skeleton)(function (_a) {
|
|
37
37
|
var _b = _a.theme, colors = _b.colors, space = _b.space, responsiveFontSizes = _b.responsiveFontSizes, short = _a.short, breakpoints = _a.breakpoints;
|
|
38
38
|
return "\n background-color: ".concat(colors.borderMuted, ";\n margin-bottom: ").concat(space[2], ";\n ").concat((0, utils_1.responsiveStyle)('height', responsiveFontSizes.body, breakpoints), "\n\n ").concat(short ? 'width: 50%' : '', ";\n ");
|
|
@@ -44,6 +44,6 @@ var SkeletonText = function (_a) {
|
|
|
44
44
|
for (var i = 1; i <= lines; i++) {
|
|
45
45
|
generatedLines.push(react_1.default.createElement(StyledSkeletonText, { key: "line-".concat(i), short: i === lines, breakpoints: breakpoints }));
|
|
46
46
|
}
|
|
47
|
-
return (react_1.default.createElement(Text_1.P, __assign({ as:
|
|
47
|
+
return (react_1.default.createElement(Text_1.P, __assign({ as: SkeletonAnimation_1.SkeletonAnimation }, rest), generatedLines));
|
|
48
48
|
};
|
|
49
49
|
exports.SkeletonText = SkeletonText;
|
|
@@ -5,7 +5,234 @@ declare const SubLabelText: 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 StyledSubLabelText = 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.fontFamily, (0, theme_1.calculateLineHeight)(fontSize, field.lineHeight), field.subLabel.color, fontSize);
|
|
38
38
|
});
|
|
39
39
|
var SubLabelText = (0, utils_1.styledComponentWithBreakpoints)(StyledSubLabelText);
|
|
40
40
|
exports.SubLabelText = SubLabelText;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { Dd, Dl } from '../List';
|
|
3
3
|
declare type SummaryListProps = ComponentProps<typeof Dl>;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated This component has been deprecated and will be removed in a future release.
|
|
6
|
+
* Please use the Description List (List/Dl) component instead.
|
|
7
|
+
* */
|
|
4
8
|
declare const SummaryList: ({ children, ...rest }: SummaryListProps) => JSX.Element;
|
|
5
9
|
declare type SummaryItemProps = ComponentProps<typeof Dd> & {
|
|
6
10
|
label: ReactNode;
|
|
@@ -48,8 +48,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
48
48
|
exports.SummaryItem = exports.SummaryList = void 0;
|
|
49
49
|
var react_1 = __importStar(require("react"));
|
|
50
50
|
var List_1 = require("../List");
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated This component has been deprecated and will be removed in a future release.
|
|
53
|
+
* Please use the Description List (List/Dl) component instead.
|
|
54
|
+
* */
|
|
51
55
|
var SummaryList = function (_a) {
|
|
52
56
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
57
|
+
console.warn('SummaryList component has been deprecated and will be removed in a future release. Please use the DescriptionList component instead.');
|
|
53
58
|
return (react_1.default.createElement(List_1.Dl, __assign({}, rest), react_1.Children.map(children, function (child, index) {
|
|
54
59
|
return (0, react_1.cloneElement)(child, {
|
|
55
60
|
index: index,
|