@hero-design/rn 7.25.0 → 7.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +9 -9
- package/assets/fonts/BeVietnamPro-Bold.ttf +0 -0
- package/assets/fonts/{be-vietnam-pro-light.ttf → BeVietnamPro-Light.ttf} +0 -0
- package/assets/fonts/{be-vietnam-pro-regular.ttf → BeVietnamPro-Regular.ttf} +0 -0
- package/assets/fonts/{be-vietnam-pro-semibold.ttf → BeVietnamPro-SemiBold.ttf} +0 -0
- package/assets/fonts/RebondGrotesque-Light.otf +0 -0
- package/assets/fonts/RebondGrotesque-Regular.otf +0 -0
- package/assets/fonts/RebondGrotesque-SemiBold.otf +0 -0
- package/{lib/assets/fonts/hero-icons.ttf → assets/fonts/hero-icons-mobile.ttf} +0 -0
- package/es/index.js +9154 -12299
- package/jest.config.js +6 -2
- package/{assets/fonts/hero-icons.ttf → lib/assets/fonts/hero-icons-mobile.ttf} +0 -0
- package/lib/index.js +9154 -12298
- package/package.json +4 -4
- package/rollup.config.js +1 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -0
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +11 -0
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Avatar/{index.tsx → Avatar.tsx} +33 -18
- package/src/components/Avatar/AvatarStack/StyledAvatarStack.tsx +29 -0
- package/src/components/Avatar/AvatarStack/__tests__/StyledAvatarStack.spec.tsx +33 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +80 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +552 -0
- package/src/components/Avatar/AvatarStack/__tests__/index.spec.tsx +59 -0
- package/src/components/Avatar/AvatarStack/index.tsx +61 -0
- package/src/components/Avatar/AvatarStack/utils.ts +22 -0
- package/src/components/Avatar/StyledAvatar.tsx +6 -25
- package/src/components/Avatar/__tests__/StyledAvatar.spec.tsx +3 -19
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -24
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +118 -20
- package/src/components/Avatar/__tests__/index.spec.tsx +25 -8
- package/src/components/Avatar/index.ts +6 -0
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +1 -0
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +11 -0
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +1 -1
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/ContentNavigator/index.tsx +8 -12
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +3 -0
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -0
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/HeroIcon/index.tsx +5 -1
- package/src/components/Icon/IconList.ts +11 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +54 -31
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +5 -1
- package/src/components/Progress/ProgressBar.tsx +19 -2
- package/src/components/Progress/ProgressCircle.tsx +30 -9
- package/src/components/Progress/StyledProgressBar.tsx +14 -7
- package/src/components/Progress/StyledProgressCircle.tsx +35 -24
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +337 -30
- package/src/components/Progress/__tests__/index.spec.js +15 -0
- package/src/components/Progress/constants.ts +16 -0
- package/src/components/Progress/types.ts +7 -1
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -0
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +3 -0
- package/src/components/RichTextEditor/RichTextEditor.tsx +1 -1
- package/src/components/RichTextEditor/__mocks__/heroEditorApp.ts +2 -0
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +36 -25
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +8 -4
- package/src/components/RichTextEditor/heroEditorApp.ts +3 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +22 -0
- package/src/components/Select/MultiSelect/index.tsx +35 -13
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +46 -0
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -0
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +3 -0
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +2 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +22 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +31 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +3 -0
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +13 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +6 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -0
- package/src/components/Typography/Text/StyledText.tsx +6 -2
- package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +22 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +63 -0
- package/src/components/Typography/Text/index.tsx +8 -0
- package/src/index.ts +2 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +84 -21
- package/src/theme/components/avatar.ts +29 -5
- package/src/theme/components/badge.ts +1 -1
- package/src/theme/components/button.ts +2 -2
- package/src/theme/components/empty.ts +2 -2
- package/src/theme/components/fab.ts +3 -3
- package/src/theme/components/pinInput.ts +2 -2
- package/src/theme/components/progress.ts +37 -9
- package/src/theme/components/tag.ts +1 -1
- package/src/theme/components/typography.ts +1 -7
- package/src/theme/global/colors/global.ts +12 -3
- package/src/theme/global/colors/types.ts +5 -0
- package/src/theme/global/scale.ts +6 -2
- package/src/theme/global/typography.ts +23 -5
- package/types/components/Avatar/Avatar.d.ts +33 -0
- package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +17 -0
- package/types/components/Avatar/AvatarStack/index.d.ts +23 -0
- package/types/components/Avatar/AvatarStack/utils.d.ts +4 -0
- package/types/components/Avatar/StyledAvatar.d.ts +2 -12
- package/types/components/Avatar/index.d.ts +6 -25
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/Progress/ProgressBar.d.ts +1 -1
- package/types/components/Progress/ProgressCircle.d.ts +4 -2
- package/types/components/Progress/StyledProgressBar.d.ts +2 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +2 -0
- package/types/components/Progress/constants.d.ts +15 -0
- package/types/components/Progress/index.d.ts +1 -1
- package/types/components/Progress/types.d.ts +1 -1
- package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +2 -0
- package/types/components/RichTextEditor/heroEditorApp.d.ts +2 -0
- package/types/components/Select/MultiSelect/index.d.ts +4 -1
- package/types/components/Typography/Text/StyledText.d.ts +1 -0
- package/types/components/Typography/Text/index.d.ts +7 -1
- package/types/index.d.ts +2 -2
- package/types/theme/components/avatar.d.ts +4 -2
- package/types/theme/components/progress.d.ts +30 -9
- package/types/theme/components/typography.d.ts +1 -5
- package/types/theme/global/colors/types.d.ts +5 -0
- package/types/theme/global/index.d.ts +5 -0
- package/types/theme/global/scale.d.ts +4 -1
- package/types/theme/global/typography.d.ts +9 -2
- package/src/components/Icon/HeroIcon/fonts/hero-icons.ttf +0 -0
|
@@ -17,6 +17,7 @@ exports[`StyledText has body intent style 1`] = `
|
|
|
17
17
|
themeFontSize="medium"
|
|
18
18
|
themeFontWeight="regular"
|
|
19
19
|
themeIntent="body"
|
|
20
|
+
themeTypeface="neutral"
|
|
20
21
|
>
|
|
21
22
|
This is a test
|
|
22
23
|
</Text>
|
|
@@ -39,6 +40,7 @@ exports[`StyledText has danger intent style 1`] = `
|
|
|
39
40
|
themeFontSize="medium"
|
|
40
41
|
themeFontWeight="regular"
|
|
41
42
|
themeIntent="danger"
|
|
43
|
+
themeTypeface="neutral"
|
|
42
44
|
>
|
|
43
45
|
This is a test
|
|
44
46
|
</Text>
|
|
@@ -61,6 +63,7 @@ exports[`StyledText has info intent style 1`] = `
|
|
|
61
63
|
themeFontSize="medium"
|
|
62
64
|
themeFontWeight="regular"
|
|
63
65
|
themeIntent="info"
|
|
66
|
+
themeTypeface="neutral"
|
|
64
67
|
>
|
|
65
68
|
This is a test
|
|
66
69
|
</Text>
|
|
@@ -83,6 +86,7 @@ exports[`StyledText has inverted intent style 1`] = `
|
|
|
83
86
|
themeFontSize="medium"
|
|
84
87
|
themeFontWeight="regular"
|
|
85
88
|
themeIntent="inverted"
|
|
89
|
+
themeTypeface="neutral"
|
|
86
90
|
>
|
|
87
91
|
This is a test
|
|
88
92
|
</Text>
|
|
@@ -105,6 +109,7 @@ exports[`StyledText has large fontSize style 1`] = `
|
|
|
105
109
|
themeFontSize="large"
|
|
106
110
|
themeFontWeight="regular"
|
|
107
111
|
themeIntent="body"
|
|
112
|
+
themeTypeface="neutral"
|
|
108
113
|
>
|
|
109
114
|
This is a test
|
|
110
115
|
</Text>
|
|
@@ -127,6 +132,7 @@ exports[`StyledText has light fontWeight style 1`] = `
|
|
|
127
132
|
themeFontSize="medium"
|
|
128
133
|
themeFontWeight="light"
|
|
129
134
|
themeIntent="body"
|
|
135
|
+
themeTypeface="neutral"
|
|
130
136
|
>
|
|
131
137
|
This is a test
|
|
132
138
|
</Text>
|
|
@@ -149,6 +155,53 @@ exports[`StyledText has medium fontSize style 1`] = `
|
|
|
149
155
|
themeFontSize="medium"
|
|
150
156
|
themeFontWeight="regular"
|
|
151
157
|
themeIntent="body"
|
|
158
|
+
themeTypeface="neutral"
|
|
159
|
+
>
|
|
160
|
+
This is a test
|
|
161
|
+
</Text>
|
|
162
|
+
`;
|
|
163
|
+
|
|
164
|
+
exports[`StyledText has neutral typeface style 1`] = `
|
|
165
|
+
<Text
|
|
166
|
+
style={
|
|
167
|
+
Array [
|
|
168
|
+
Object {
|
|
169
|
+
"color": "#001f23",
|
|
170
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
171
|
+
"fontSize": 14,
|
|
172
|
+
"letterSpacing": 0.42,
|
|
173
|
+
"lineHeight": 22,
|
|
174
|
+
},
|
|
175
|
+
undefined,
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
themeFontSize="medium"
|
|
179
|
+
themeFontWeight="regular"
|
|
180
|
+
themeIntent="body"
|
|
181
|
+
themeTypeface="neutral"
|
|
182
|
+
>
|
|
183
|
+
This is a test
|
|
184
|
+
</Text>
|
|
185
|
+
`;
|
|
186
|
+
|
|
187
|
+
exports[`StyledText has playful typeface style 1`] = `
|
|
188
|
+
<Text
|
|
189
|
+
style={
|
|
190
|
+
Array [
|
|
191
|
+
Object {
|
|
192
|
+
"color": "#001f23",
|
|
193
|
+
"fontFamily": "DarkerGrotesque-Regular",
|
|
194
|
+
"fontSize": 14,
|
|
195
|
+
"letterSpacing": 0.42,
|
|
196
|
+
"lineHeight": 22,
|
|
197
|
+
},
|
|
198
|
+
undefined,
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
themeFontSize="medium"
|
|
202
|
+
themeFontWeight="regular"
|
|
203
|
+
themeIntent="body"
|
|
204
|
+
themeTypeface="playful"
|
|
152
205
|
>
|
|
153
206
|
This is a test
|
|
154
207
|
</Text>
|
|
@@ -171,6 +224,7 @@ exports[`StyledText has primary intent style 1`] = `
|
|
|
171
224
|
themeFontSize="medium"
|
|
172
225
|
themeFontWeight="regular"
|
|
173
226
|
themeIntent="primary"
|
|
227
|
+
themeTypeface="neutral"
|
|
174
228
|
>
|
|
175
229
|
This is a test
|
|
176
230
|
</Text>
|
|
@@ -193,6 +247,7 @@ exports[`StyledText has regular fontWeight style 1`] = `
|
|
|
193
247
|
themeFontSize="medium"
|
|
194
248
|
themeFontWeight="regular"
|
|
195
249
|
themeIntent="body"
|
|
250
|
+
themeTypeface="neutral"
|
|
196
251
|
>
|
|
197
252
|
This is a test
|
|
198
253
|
</Text>
|
|
@@ -215,6 +270,7 @@ exports[`StyledText has semi-bold fontWeight style 1`] = `
|
|
|
215
270
|
themeFontSize="medium"
|
|
216
271
|
themeFontWeight="semi-bold"
|
|
217
272
|
themeIntent="body"
|
|
273
|
+
themeTypeface="neutral"
|
|
218
274
|
>
|
|
219
275
|
This is a test
|
|
220
276
|
</Text>
|
|
@@ -237,6 +293,7 @@ exports[`StyledText has small fontSize style 1`] = `
|
|
|
237
293
|
themeFontSize="small"
|
|
238
294
|
themeFontWeight="regular"
|
|
239
295
|
themeIntent="body"
|
|
296
|
+
themeTypeface="neutral"
|
|
240
297
|
>
|
|
241
298
|
This is a test
|
|
242
299
|
</Text>
|
|
@@ -259,6 +316,7 @@ exports[`StyledText has subdued intent style 1`] = `
|
|
|
259
316
|
themeFontSize="medium"
|
|
260
317
|
themeFontWeight="regular"
|
|
261
318
|
themeIntent="subdued"
|
|
319
|
+
themeTypeface="neutral"
|
|
262
320
|
>
|
|
263
321
|
This is a test
|
|
264
322
|
</Text>
|
|
@@ -281,6 +339,7 @@ exports[`StyledText has success intent style 1`] = `
|
|
|
281
339
|
themeFontSize="medium"
|
|
282
340
|
themeFontWeight="regular"
|
|
283
341
|
themeIntent="success"
|
|
342
|
+
themeTypeface="neutral"
|
|
284
343
|
>
|
|
285
344
|
This is a test
|
|
286
345
|
</Text>
|
|
@@ -303,6 +362,7 @@ exports[`StyledText has warning intent style 1`] = `
|
|
|
303
362
|
themeFontSize="medium"
|
|
304
363
|
themeFontWeight="regular"
|
|
305
364
|
themeIntent="warning"
|
|
365
|
+
themeTypeface="neutral"
|
|
306
366
|
>
|
|
307
367
|
This is a test
|
|
308
368
|
</Text>
|
|
@@ -325,6 +385,7 @@ exports[`StyledText has xlarge fontSize style 1`] = `
|
|
|
325
385
|
themeFontSize="xlarge"
|
|
326
386
|
themeFontWeight="regular"
|
|
327
387
|
themeIntent="body"
|
|
388
|
+
themeTypeface="neutral"
|
|
328
389
|
>
|
|
329
390
|
This is a test
|
|
330
391
|
</Text>
|
|
@@ -347,6 +408,7 @@ exports[`StyledText has xxxlarge fontSize style 1`] = `
|
|
|
347
408
|
themeFontSize="xxxlarge"
|
|
348
409
|
themeFontWeight="regular"
|
|
349
410
|
themeIntent="body"
|
|
411
|
+
themeTypeface="neutral"
|
|
350
412
|
>
|
|
351
413
|
This is a test
|
|
352
414
|
</Text>
|
|
@@ -369,6 +431,7 @@ exports[`StyledText has xxxxxlarge fontSize style 1`] = `
|
|
|
369
431
|
themeFontSize="xxxxxlarge"
|
|
370
432
|
themeFontWeight="regular"
|
|
371
433
|
themeIntent="body"
|
|
434
|
+
themeTypeface="neutral"
|
|
372
435
|
>
|
|
373
436
|
This is a test
|
|
374
437
|
</Text>
|
|
@@ -47,6 +47,12 @@ export interface TextProps extends NativeTextProps {
|
|
|
47
47
|
* Testing id of the component.
|
|
48
48
|
*/
|
|
49
49
|
testID?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The typeface to render the text in:
|
|
52
|
+
* - `neutral`: The default typeface for the platform.
|
|
53
|
+
* - `playful`: To visualise a playful content.
|
|
54
|
+
*/
|
|
55
|
+
typeface?: 'neutral' | 'playful';
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
const Text = ({
|
|
@@ -54,6 +60,7 @@ const Text = ({
|
|
|
54
60
|
fontSize = 'medium',
|
|
55
61
|
fontWeight = 'regular',
|
|
56
62
|
intent = 'body',
|
|
63
|
+
typeface = 'neutral',
|
|
57
64
|
...nativeProps
|
|
58
65
|
}: TextProps) => (
|
|
59
66
|
<StyledText
|
|
@@ -61,6 +68,7 @@ const Text = ({
|
|
|
61
68
|
themeFontSize={fontSize}
|
|
62
69
|
themeFontWeight={fontWeight}
|
|
63
70
|
themeIntent={intent}
|
|
71
|
+
themeTypeface={typeface}
|
|
64
72
|
>
|
|
65
73
|
{children}
|
|
66
74
|
</StyledText>
|
package/src/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { scale } from './utils/scale';
|
|
|
14
14
|
import Accordion from './components/Accordion';
|
|
15
15
|
import Alert from './components/Alert';
|
|
16
16
|
import Attachment from './components/Attachment';
|
|
17
|
-
import Avatar from './components/Avatar';
|
|
17
|
+
import Avatar, { useAvatarColors } from './components/Avatar';
|
|
18
18
|
import Badge from './components/Badge';
|
|
19
19
|
import BottomNavigation from './components/BottomNavigation';
|
|
20
20
|
import BottomSheet from './components/BottomSheet';
|
|
@@ -68,6 +68,7 @@ export {
|
|
|
68
68
|
Alert,
|
|
69
69
|
Attachment,
|
|
70
70
|
Avatar,
|
|
71
|
+
useAvatarColors,
|
|
71
72
|
Badge,
|
|
72
73
|
BottomNavigation,
|
|
73
74
|
BottomSheet,
|
|
@@ -59,14 +59,34 @@ Object {
|
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
61
|
"avatar": Object {
|
|
62
|
-
"borderWidths": Object {
|
|
63
|
-
"default": 1,
|
|
64
|
-
},
|
|
65
62
|
"colors": Object {
|
|
66
63
|
"danger": "#f46363",
|
|
67
64
|
"info": "#b5c3fd",
|
|
68
65
|
"primary": "#401960",
|
|
69
66
|
"success": "#5ace7d",
|
|
67
|
+
"text": "#ffffff",
|
|
68
|
+
"visualisation": Array [
|
|
69
|
+
"#48000a",
|
|
70
|
+
"#737479",
|
|
71
|
+
"#001f23",
|
|
72
|
+
"#353957",
|
|
73
|
+
"#25006e",
|
|
74
|
+
"#4568fb",
|
|
75
|
+
"#5a68e2",
|
|
76
|
+
"#4853b5",
|
|
77
|
+
"#48a564",
|
|
78
|
+
"#017d6d",
|
|
79
|
+
"#cc822a",
|
|
80
|
+
"#998000",
|
|
81
|
+
"#e3602a",
|
|
82
|
+
"#f46363",
|
|
83
|
+
"#de350b",
|
|
84
|
+
"#c38cee",
|
|
85
|
+
"#9f64e3",
|
|
86
|
+
"#8505a2",
|
|
87
|
+
"#7622d7",
|
|
88
|
+
"#401960",
|
|
89
|
+
],
|
|
70
90
|
"warning": "#ffbe71",
|
|
71
91
|
},
|
|
72
92
|
"fontSizes": Object {
|
|
@@ -79,6 +99,9 @@ Object {
|
|
|
79
99
|
"xxxxlarge": 48,
|
|
80
100
|
"xxxxxlarge": 60,
|
|
81
101
|
},
|
|
102
|
+
"fonts": Object {
|
|
103
|
+
"default": "BeVietnamPro-Regular",
|
|
104
|
+
},
|
|
82
105
|
"radii": Object {
|
|
83
106
|
"rounded": 999,
|
|
84
107
|
},
|
|
@@ -238,7 +261,7 @@ Object {
|
|
|
238
261
|
},
|
|
239
262
|
"card": Object {
|
|
240
263
|
"colors": Object {
|
|
241
|
-
"archived": "#
|
|
264
|
+
"archived": "#abacaf",
|
|
242
265
|
"danger": "#f46363",
|
|
243
266
|
"dataCardIndicator": "#401960",
|
|
244
267
|
"info": "#b5c3fd",
|
|
@@ -431,7 +454,7 @@ Object {
|
|
|
431
454
|
"colors": Object {
|
|
432
455
|
"checkedListItemContainerBackground": "#ece8ef",
|
|
433
456
|
"leadingStatus": Object {
|
|
434
|
-
"archived": "#
|
|
457
|
+
"archived": "#abacaf",
|
|
435
458
|
"danger": "#f46363",
|
|
436
459
|
"info": "#b5c3fd",
|
|
437
460
|
"success": "#5ace7d",
|
|
@@ -502,21 +525,42 @@ Object {
|
|
|
502
525
|
},
|
|
503
526
|
"progress": Object {
|
|
504
527
|
"colors": Object {
|
|
505
|
-
"
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
528
|
+
"completeness": Object {
|
|
529
|
+
"archived": "#737479",
|
|
530
|
+
"archivedInverted": "#ffffff",
|
|
531
|
+
"danger": "#de350b",
|
|
532
|
+
"dangerInverted": "#ffffff",
|
|
533
|
+
"info": "#4568fb",
|
|
534
|
+
"infoInverted": "#ffffff",
|
|
535
|
+
"primary": "#401960",
|
|
536
|
+
"primaryInverted": "#ffffff",
|
|
537
|
+
"success": "#017d6d",
|
|
538
|
+
"successInverted": "#ffffff",
|
|
539
|
+
"warning": "#ffa234",
|
|
540
|
+
"warningInverted": "#ffffff",
|
|
541
|
+
},
|
|
542
|
+
"incompleteness": Object {
|
|
543
|
+
"archived": "#e8e9ea",
|
|
544
|
+
"archivedInverted": "#bcbdbf",
|
|
545
|
+
"danger": "#e8e9ea",
|
|
546
|
+
"dangerInverted": "#f68282",
|
|
547
|
+
"info": "#e8e9ea",
|
|
548
|
+
"infoInverted": "#c4cffd",
|
|
549
|
+
"primary": "#e8e9ea",
|
|
550
|
+
"primaryInverted": "#664780",
|
|
551
|
+
"success": "#e8e9ea",
|
|
552
|
+
"successInverted": "#7bd897",
|
|
553
|
+
"warning": "#e8e9ea",
|
|
554
|
+
"warningInverted": "#ffcb8d",
|
|
555
|
+
},
|
|
513
556
|
},
|
|
514
557
|
"radii": Object {
|
|
515
558
|
"default": 999,
|
|
516
559
|
},
|
|
517
560
|
"sizes": Object {
|
|
518
561
|
"barHeight": 4,
|
|
519
|
-
"
|
|
562
|
+
"circleCompletenessHeight": 4,
|
|
563
|
+
"circleDiameter": 72,
|
|
520
564
|
},
|
|
521
565
|
},
|
|
522
566
|
"radio": Object {
|
|
@@ -894,9 +938,16 @@ Object {
|
|
|
894
938
|
"xxxxxlarge": 32,
|
|
895
939
|
},
|
|
896
940
|
"fonts": Object {
|
|
897
|
-
"
|
|
898
|
-
|
|
899
|
-
|
|
941
|
+
"neutral": Object {
|
|
942
|
+
"light": "BeVietnamPro-Light",
|
|
943
|
+
"regular": "BeVietnamPro-Regular",
|
|
944
|
+
"semiBold": "BeVietnamPro-SemiBold",
|
|
945
|
+
},
|
|
946
|
+
"playful": Object {
|
|
947
|
+
"light": "DarkerGrotesque-Light",
|
|
948
|
+
"regular": "DarkerGrotesque-Regular",
|
|
949
|
+
"semiBold": "DarkerGrotesque-SemiBold",
|
|
950
|
+
},
|
|
900
951
|
},
|
|
901
952
|
"lineHeights": Object {
|
|
902
953
|
"large": 24,
|
|
@@ -913,7 +964,7 @@ Object {
|
|
|
913
964
|
"medium": 2,
|
|
914
965
|
},
|
|
915
966
|
"colors": Object {
|
|
916
|
-
"archived": "#
|
|
967
|
+
"archived": "#abacaf",
|
|
917
968
|
"archivedBackground": "#f6f6f7",
|
|
918
969
|
"archivedDark": "#737479",
|
|
919
970
|
"archivedLight": "#bfc1c5",
|
|
@@ -955,10 +1006,15 @@ Object {
|
|
|
955
1006
|
"infoSurface": "#ecf0ff",
|
|
956
1007
|
"invertedText": "#ffffff",
|
|
957
1008
|
"lightHighlightedSurface": "#ece8ef",
|
|
1009
|
+
"mutedArchived": "#bcbdbf",
|
|
1010
|
+
"mutedError": "#f68282",
|
|
958
1011
|
"mutedGlobalPrimary": "#4d6265",
|
|
1012
|
+
"mutedInfo": "#c4cffd",
|
|
959
1013
|
"mutedOnDefaultGlobalSurface": "#4d6265",
|
|
960
1014
|
"mutedPrimary": "#e6e9e9",
|
|
961
1015
|
"mutedSecondary": "#808f91",
|
|
1016
|
+
"mutedSuccess": "#7bd897",
|
|
1017
|
+
"mutedWarning": "#ffcb8d",
|
|
962
1018
|
"neutralGlobalSurface": "#f6f6f7",
|
|
963
1019
|
"onArchivedSurface": "#737479",
|
|
964
1020
|
"onDarkGlobalSurface": "#ffffff",
|
|
@@ -1009,9 +1065,16 @@ Object {
|
|
|
1009
1065
|
"xxxxxlarge": 32,
|
|
1010
1066
|
},
|
|
1011
1067
|
"fonts": Object {
|
|
1012
|
-
"
|
|
1013
|
-
|
|
1014
|
-
|
|
1068
|
+
"neutral": Object {
|
|
1069
|
+
"light": "BeVietnamPro-Light",
|
|
1070
|
+
"regular": "BeVietnamPro-Regular",
|
|
1071
|
+
"semiBold": "BeVietnamPro-SemiBold",
|
|
1072
|
+
},
|
|
1073
|
+
"playful": Object {
|
|
1074
|
+
"light": "DarkerGrotesque-Light",
|
|
1075
|
+
"regular": "DarkerGrotesque-Regular",
|
|
1076
|
+
"semiBold": "DarkerGrotesque-SemiBold",
|
|
1077
|
+
},
|
|
1015
1078
|
},
|
|
1016
1079
|
"lineHeights": Object {
|
|
1017
1080
|
"large": 24,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defaultMobilePalette as palette } from '@hero-design/colors';
|
|
1
2
|
import type { GlobalTheme } from '../global';
|
|
2
3
|
|
|
3
4
|
const getAvatarTheme = (theme: GlobalTheme) => {
|
|
@@ -7,6 +8,29 @@ const getAvatarTheme = (theme: GlobalTheme) => {
|
|
|
7
8
|
danger: theme.colors.error,
|
|
8
9
|
success: theme.colors.success,
|
|
9
10
|
warning: theme.colors.warning,
|
|
11
|
+
text: theme.colors.invertedText,
|
|
12
|
+
visualisation: [
|
|
13
|
+
palette.currant,
|
|
14
|
+
palette.sonicSilver,
|
|
15
|
+
palette.maasstrichtBlue,
|
|
16
|
+
palette.nightBlue,
|
|
17
|
+
palette.darkBlue,
|
|
18
|
+
palette.ultramarineBlue,
|
|
19
|
+
palette.royalBlue,
|
|
20
|
+
palette.royalBlueDark20,
|
|
21
|
+
palette.emeraldDark20,
|
|
22
|
+
palette.pineGreen,
|
|
23
|
+
palette.deepSaffronDark20,
|
|
24
|
+
palette.goldDark40,
|
|
25
|
+
palette.apple,
|
|
26
|
+
palette.pastelRed,
|
|
27
|
+
palette.vermilion,
|
|
28
|
+
palette.mauve,
|
|
29
|
+
palette.violetLight30,
|
|
30
|
+
palette.violet1,
|
|
31
|
+
palette.violet,
|
|
32
|
+
palette.scarletGum,
|
|
33
|
+
],
|
|
10
34
|
};
|
|
11
35
|
|
|
12
36
|
const sizes = {
|
|
@@ -20,6 +44,10 @@ const getAvatarTheme = (theme: GlobalTheme) => {
|
|
|
20
44
|
xxxxxlarge: theme.sizes['14xlarge'],
|
|
21
45
|
};
|
|
22
46
|
|
|
47
|
+
const fonts = {
|
|
48
|
+
default: theme.fonts.neutral.regular,
|
|
49
|
+
};
|
|
50
|
+
|
|
23
51
|
const fontSizes = {
|
|
24
52
|
small: theme.fontSizes.large,
|
|
25
53
|
medium: theme.fontSizes.xlarge,
|
|
@@ -35,11 +63,7 @@ const getAvatarTheme = (theme: GlobalTheme) => {
|
|
|
35
63
|
rounded: theme.radii.rounded,
|
|
36
64
|
};
|
|
37
65
|
|
|
38
|
-
|
|
39
|
-
default: theme.borderWidths.base,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return { colors, sizes, radii, borderWidths, fontSizes };
|
|
66
|
+
return { colors, sizes, radii, fonts, fontSizes };
|
|
43
67
|
};
|
|
44
68
|
|
|
45
69
|
export default getAvatarTheme;
|
|
@@ -2,8 +2,8 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getButtonTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const fonts = {
|
|
5
|
-
default: theme.fonts.semiBold,
|
|
6
|
-
utility: theme.fonts.regular,
|
|
5
|
+
default: theme.fonts.neutral.semiBold,
|
|
6
|
+
utility: theme.fonts.neutral.regular,
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
const fontSize = {
|
|
@@ -23,8 +23,8 @@ const getEmptyTheme = (theme: GlobalTheme) => {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const fonts = {
|
|
26
|
-
title: theme.fonts.semiBold,
|
|
27
|
-
description: theme.fonts.light,
|
|
26
|
+
title: theme.fonts.neutral.semiBold,
|
|
27
|
+
description: theme.fonts.neutral.light,
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
return { fontSizes, colors, sizes, space, fonts };
|
|
@@ -17,9 +17,9 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const fonts = {
|
|
20
|
-
header: theme.fonts.semiBold,
|
|
21
|
-
actionItemText: theme.fonts.regular,
|
|
22
|
-
title: theme.fonts.semiBold,
|
|
20
|
+
header: theme.fonts.neutral.semiBold,
|
|
21
|
+
actionItemText: theme.fonts.neutral.regular,
|
|
22
|
+
title: theme.fonts.neutral.semiBold,
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const fontSizes = {
|
|
@@ -14,8 +14,8 @@ const getPinInputTheme = (theme: GlobalTheme) => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const fonts = {
|
|
17
|
-
cellText: theme.fonts.semiBold,
|
|
18
|
-
errorMessage: theme.fonts.regular,
|
|
17
|
+
cellText: theme.fonts.neutral.semiBold,
|
|
18
|
+
errorMessage: theme.fonts.neutral.regular,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const fontSizes = {
|
|
@@ -1,19 +1,47 @@
|
|
|
1
|
+
import { mixColor } from '@hero-design/colors';
|
|
1
2
|
import type { GlobalTheme } from '../global';
|
|
2
3
|
|
|
3
4
|
const getProgressTheme = (theme: GlobalTheme) => {
|
|
5
|
+
const lightenScaleOnInverted = 20;
|
|
6
|
+
|
|
4
7
|
const colors = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
completeness: {
|
|
9
|
+
primary: theme.colors.primary,
|
|
10
|
+
success: theme.colors.onSuccessSurface, // should be emerald dark 15
|
|
11
|
+
warning: theme.colors.onWarningSurface,
|
|
12
|
+
danger: theme.colors.onErrorSurface,
|
|
13
|
+
info: theme.colors.onInfoSurface,
|
|
14
|
+
archived: theme.colors.onArchivedSurface,
|
|
15
|
+
|
|
16
|
+
primaryInverted: theme.colors.onDarkGlobalSurface,
|
|
17
|
+
successInverted: theme.colors.onDarkGlobalSurface,
|
|
18
|
+
warningInverted: theme.colors.onDarkGlobalSurface,
|
|
19
|
+
dangerInverted: theme.colors.onDarkGlobalSurface,
|
|
20
|
+
infoInverted: theme.colors.onDarkGlobalSurface,
|
|
21
|
+
archivedInverted: theme.colors.onDarkGlobalSurface,
|
|
22
|
+
},
|
|
23
|
+
incompleteness: {
|
|
24
|
+
primary: theme.colors.secondaryOutline,
|
|
25
|
+
success: theme.colors.secondaryOutline,
|
|
26
|
+
warning: theme.colors.secondaryOutline,
|
|
27
|
+
danger: theme.colors.secondaryOutline,
|
|
28
|
+
info: theme.colors.secondaryOutline,
|
|
29
|
+
archived: theme.colors.secondaryOutline,
|
|
30
|
+
|
|
31
|
+
primaryInverted: mixColor(theme.colors.primary).tint(
|
|
32
|
+
lightenScaleOnInverted
|
|
33
|
+
),
|
|
34
|
+
successInverted: theme.colors.mutedSuccess,
|
|
35
|
+
warningInverted: theme.colors.mutedWarning,
|
|
36
|
+
dangerInverted: theme.colors.mutedError,
|
|
37
|
+
infoInverted: theme.colors.mutedInfo,
|
|
38
|
+
archivedInverted: theme.colors.mutedArchived,
|
|
39
|
+
},
|
|
13
40
|
};
|
|
14
41
|
|
|
15
42
|
const sizes = {
|
|
16
|
-
|
|
43
|
+
circleDiameter: theme.sizes['6xlarge'],
|
|
44
|
+
circleCompletenessHeight: theme.sizes.xsmall,
|
|
17
45
|
barHeight: theme.sizes.xsmall,
|
|
18
46
|
};
|
|
19
47
|
|
|
@@ -13,12 +13,6 @@ const getTypographyTheme = (theme: GlobalTheme) => {
|
|
|
13
13
|
inverted: theme.colors.onDarkGlobalSurface,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
const fonts = {
|
|
17
|
-
light: theme.fonts.light,
|
|
18
|
-
regular: theme.fonts.regular,
|
|
19
|
-
semiBold: theme.fonts.semiBold,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
16
|
const fontSizes = {
|
|
23
17
|
small: theme.fontSizes.small,
|
|
24
18
|
medium: theme.fontSizes.medium,
|
|
@@ -37,7 +31,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
|
|
|
37
31
|
xxxxxlarge: theme.lineHeights.xxxxxlarge,
|
|
38
32
|
};
|
|
39
33
|
|
|
40
|
-
return { colors, fonts, fontSizes, lineHeights };
|
|
34
|
+
return { colors, fonts: theme.fonts, fontSizes, lineHeights };
|
|
41
35
|
};
|
|
42
36
|
|
|
43
37
|
export default getTypographyTheme;
|
|
@@ -2,7 +2,7 @@ import { defaultMobilePalette as palette } from '@hero-design/colors';
|
|
|
2
2
|
import type { GlobalSystemPalette } from './types';
|
|
3
3
|
|
|
4
4
|
const globalPalette: GlobalSystemPalette = {
|
|
5
|
-
// Updated
|
|
5
|
+
// Updated 21 / Nov / 22
|
|
6
6
|
// Surfaces
|
|
7
7
|
defaultGlobalSurface: palette.white,
|
|
8
8
|
onDefaultGlobalSurface: palette.maasstrichtBlue,
|
|
@@ -21,21 +21,30 @@ const globalPalette: GlobalSystemPalette = {
|
|
|
21
21
|
|
|
22
22
|
// Accents
|
|
23
23
|
error: palette.pastelRed,
|
|
24
|
+
mutedError: palette.pastelRedLight20,
|
|
24
25
|
errorSurface: palette.linen,
|
|
25
26
|
onErrorSurface: palette.vermilion,
|
|
27
|
+
|
|
26
28
|
warning: palette.mellowApricot,
|
|
29
|
+
mutedWarning: palette.mellowApricotLight20,
|
|
27
30
|
warningSurface: palette.seashell,
|
|
28
31
|
onWarningSurface: palette.deepSaffron,
|
|
32
|
+
|
|
29
33
|
success: palette.emerald,
|
|
34
|
+
mutedSuccess: palette.emeraldLight20,
|
|
30
35
|
successSurface: palette.honeydew,
|
|
31
36
|
onSuccessSurface: palette.pineGreen,
|
|
37
|
+
|
|
32
38
|
info: palette.vodka,
|
|
39
|
+
mutedInfo: palette.vodkaLight20,
|
|
33
40
|
infoSurface: palette.aliceBlue,
|
|
34
41
|
onInfoSurface: palette.ultramarineBlue,
|
|
35
|
-
|
|
42
|
+
|
|
43
|
+
archived: palette.silverChalice,
|
|
44
|
+
mutedArchived: palette.silverChaliceLight20,
|
|
36
45
|
archivedSurface: palette.antiFlashWhite,
|
|
37
46
|
onArchivedSurface: palette.sonicSilver,
|
|
38
|
-
// End of Updated
|
|
47
|
+
// End of Updated 21 / Nov / 22
|
|
39
48
|
};
|
|
40
49
|
|
|
41
50
|
export default globalPalette;
|
|
@@ -18,18 +18,23 @@ export type GlobalSystemPalette = {
|
|
|
18
18
|
|
|
19
19
|
// Accents
|
|
20
20
|
error: string;
|
|
21
|
+
mutedError: string;
|
|
21
22
|
errorSurface: string;
|
|
22
23
|
onErrorSurface: string;
|
|
23
24
|
warning: string;
|
|
25
|
+
mutedWarning: string;
|
|
24
26
|
warningSurface: string;
|
|
25
27
|
onWarningSurface: string;
|
|
26
28
|
success: string;
|
|
29
|
+
mutedSuccess: string;
|
|
27
30
|
successSurface: string;
|
|
28
31
|
onSuccessSurface: string;
|
|
29
32
|
info: string;
|
|
33
|
+
mutedInfo: string;
|
|
30
34
|
infoSurface: string;
|
|
31
35
|
onInfoSurface: string;
|
|
32
36
|
archived: string;
|
|
37
|
+
mutedArchived: string;
|
|
33
38
|
archivedSurface: string;
|
|
34
39
|
onArchivedSurface: string;
|
|
35
40
|
// End of Updated 14 / Nov / 22
|