@hero-design/rn 8.92.2 → 8.93.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.
Files changed (72) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +28 -0
  3. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  4. package/es/index.js +689 -752
  5. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  6. package/lib/index.js +690 -752
  7. package/package.json +4 -2
  8. package/rollup.config.mjs +1 -0
  9. package/src/components/Badge/Count.tsx +60 -0
  10. package/src/components/Badge/StyledBadge.tsx +33 -2
  11. package/src/components/Badge/__tests__/Count.spec.tsx +38 -0
  12. package/src/components/Badge/__tests__/__snapshots__/Count.spec.tsx.snap +310 -0
  13. package/src/components/Badge/constants.ts +1 -0
  14. package/src/components/Badge/index.tsx +3 -2
  15. package/src/components/Button/StyledButton.tsx +15 -8
  16. package/src/components/Button/UtilityButton/StyledUtilityButton.tsx +5 -3
  17. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  18. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +61 -4
  19. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +26 -0
  20. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
  21. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +2 -0
  22. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  23. package/src/components/Icon/IconList.ts +2 -0
  24. package/src/components/MapPin/StyledMapPin.tsx +1 -9
  25. package/src/components/Progress/ProgressCircle.tsx +53 -109
  26. package/src/components/Progress/StyledProgressBar.tsx +4 -1
  27. package/src/components/Progress/StyledProgressCircle.tsx +1 -57
  28. package/src/components/Progress/StyledStep.tsx +1 -1
  29. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +299 -647
  30. package/src/components/Search/SearchOneLine.tsx +2 -2
  31. package/src/components/Search/SearchTwoLine.tsx +1 -1
  32. package/src/components/Search/StyledSearch.tsx +20 -35
  33. package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +51 -51
  34. package/src/components/Search/__tests__/__snapshots__/SearchSuffixIcon.spec.tsx.snap +2 -2
  35. package/src/components/Search/__tests__/__snapshots__/SearchTwoLine.spec.tsx.snap +13 -15
  36. package/src/components/Search/__tests__/__snapshots__/utils.spec.tsx.snap +4 -4
  37. package/src/components/Search/utils.tsx +2 -2
  38. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  39. package/src/components/Tabs/TabWithBadge.tsx +1 -1
  40. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +15 -9
  41. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +6 -6
  42. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +3 -3
  43. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +15 -9
  44. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
  45. package/src/components/Toolbar/StyledToolbar.tsx +1 -0
  46. package/src/components/Toolbar/ToolbarMessage.tsx +3 -0
  47. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarMessage.spec.tsx.snap +8 -0
  48. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +31 -23
  49. package/src/theme/components/badge.ts +26 -1
  50. package/src/theme/components/button.ts +10 -0
  51. package/src/theme/components/progress.ts +21 -26
  52. package/src/theme/components/search.ts +2 -10
  53. package/src/theme/components/toolbar.ts +2 -0
  54. package/src/utils/helpers.ts +9 -0
  55. package/stats/8.92.3/rn-stats.html +4842 -0
  56. package/types/components/Badge/Count.d.ts +27 -0
  57. package/types/components/Badge/StyledBadge.d.ts +14 -4
  58. package/types/components/Badge/constants.d.ts +1 -0
  59. package/types/components/Badge/index.d.ts +1 -0
  60. package/types/components/Button/StyledButton.d.ts +2 -2
  61. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +1 -1
  62. package/types/components/Icon/IconList.d.ts +1 -1
  63. package/types/components/Icon/index.d.ts +1 -1
  64. package/types/components/Progress/StyledProgressCircle.d.ts +1 -32
  65. package/types/components/Search/StyledSearch.d.ts +0 -1
  66. package/types/components/TextInput/index.d.ts +1 -1
  67. package/types/theme/components/badge.d.ts +11 -0
  68. package/types/theme/components/button.d.ts +3 -0
  69. package/types/theme/components/progress.d.ts +6 -6
  70. package/types/theme/components/search.d.ts +2 -10
  71. package/types/theme/components/toolbar.d.ts +2 -0
  72. package/types/utils/helpers.d.ts +1 -0
@@ -1508,6 +1508,7 @@ exports[`rendering allows custom renderer 1`] = `
1508
1508
  "flexShrink": 1,
1509
1509
  "lineHeight": 22,
1510
1510
  "textAlign": "center",
1511
+ "textAlignVertical": "center",
1511
1512
  },
1512
1513
  undefined,
1513
1514
  ],
@@ -3250,6 +3251,7 @@ exports[`rendering renders correct floating bottom sheet variant 1`] = `
3250
3251
  "flexShrink": 1,
3251
3252
  "lineHeight": 22,
3252
3253
  "textAlign": "center",
3254
+ "textAlignVertical": "center",
3253
3255
  },
3254
3256
  undefined,
3255
3257
  ],
@@ -5315,6 +5317,7 @@ exports[`rendering renders correctly when bottom sheet is visible 1`] = `
5315
5317
  "flexShrink": 1,
5316
5318
  "lineHeight": 22,
5317
5319
  "textAlign": "center",
5320
+ "textAlignVertical": "center",
5318
5321
  },
5319
5322
  undefined,
5320
5323
  ],
@@ -6972,6 +6975,7 @@ exports[`rendering renders correctly when receives sections 1`] = `
6972
6975
  "flexShrink": 1,
6973
6976
  "lineHeight": 22,
6974
6977
  "textAlign": "center",
6978
+ "textAlignVertical": "center",
6975
6979
  },
6976
6980
  undefined,
6977
6981
  ],
@@ -8281,6 +8285,7 @@ exports[`rendering renders correctly when receives sections 2`] = `
8281
8285
  "flexShrink": 1,
8282
8286
  "lineHeight": 22,
8283
8287
  "textAlign": "center",
8288
+ "textAlignVertical": "center",
8284
8289
  },
8285
8290
  undefined,
8286
8291
  ],
@@ -41,7 +41,7 @@ const TabWithBadge = ({ config, tabItem }: TabWithBadgeProps) => {
41
41
  <Badge
42
42
  content={config.value}
43
43
  max={config.max}
44
- intent="info"
44
+ intent="primary"
45
45
  style={{ marginLeft: theme.space.xsmall }}
46
46
  />
47
47
  </StyledBadgeWrapper>
@@ -100,7 +100,9 @@ exports[`Tabs.Scroll lazy not render lazy screen: xxx 1`] = `
100
100
  [
101
101
  {
102
102
  "flexShrink": 1,
103
+ "lineHeight": undefined,
103
104
  "textAlign": "center",
105
+ "textAlignVertical": "center",
104
106
  },
105
107
  undefined,
106
108
  ],
@@ -693,8 +695,8 @@ exports[`Tabs.Scroll lazy not render lazy screen: xxx 1`] = `
693
695
  style={
694
696
  {
695
697
  "alignItems": "center",
696
- "backgroundColor": "#355bfb",
697
- "borderColor": "#355bfb",
698
+ "backgroundColor": "#401960",
699
+ "borderColor": "#401960",
698
700
  "borderRadius": 999,
699
701
  "borderWidth": 2,
700
702
  "height": 24,
@@ -710,7 +712,7 @@ exports[`Tabs.Scroll lazy not render lazy screen: xxx 1`] = `
710
712
  ],
711
713
  }
712
714
  }
713
- themeIntent="info"
715
+ themeIntent="primary"
714
716
  themePadding="wideContent"
715
717
  themeSize="medium"
716
718
  themeVariant="filled"
@@ -1030,7 +1032,9 @@ exports[`Tabs.Scroll renders correctly 1`] = `
1030
1032
  [
1031
1033
  {
1032
1034
  "flexShrink": 1,
1035
+ "lineHeight": undefined,
1033
1036
  "textAlign": "center",
1037
+ "textAlignVertical": "center",
1034
1038
  },
1035
1039
  undefined,
1036
1040
  ],
@@ -1623,8 +1627,8 @@ exports[`Tabs.Scroll renders correctly 1`] = `
1623
1627
  style={
1624
1628
  {
1625
1629
  "alignItems": "center",
1626
- "backgroundColor": "#355bfb",
1627
- "borderColor": "#355bfb",
1630
+ "backgroundColor": "#401960",
1631
+ "borderColor": "#401960",
1628
1632
  "borderRadius": 999,
1629
1633
  "borderWidth": 2,
1630
1634
  "height": 24,
@@ -1640,7 +1644,7 @@ exports[`Tabs.Scroll renders correctly 1`] = `
1640
1644
  ],
1641
1645
  }
1642
1646
  }
1643
- themeIntent="info"
1647
+ themeIntent="primary"
1644
1648
  themePadding="wideContent"
1645
1649
  themeSize="medium"
1646
1650
  themeVariant="filled"
@@ -1960,7 +1964,9 @@ exports[`useIsFocused renders correctly 1`] = `
1960
1964
  [
1961
1965
  {
1962
1966
  "flexShrink": 1,
1967
+ "lineHeight": undefined,
1963
1968
  "textAlign": "center",
1969
+ "textAlignVertical": "center",
1964
1970
  },
1965
1971
  undefined,
1966
1972
  ],
@@ -2553,8 +2559,8 @@ exports[`useIsFocused renders correctly 1`] = `
2553
2559
  style={
2554
2560
  {
2555
2561
  "alignItems": "center",
2556
- "backgroundColor": "#355bfb",
2557
- "borderColor": "#355bfb",
2562
+ "backgroundColor": "#401960",
2563
+ "borderColor": "#401960",
2558
2564
  "borderRadius": 999,
2559
2565
  "borderWidth": 2,
2560
2566
  "height": 24,
@@ -2570,7 +2576,7 @@ exports[`useIsFocused renders correctly 1`] = `
2570
2576
  ],
2571
2577
  }
2572
2578
  }
2573
- themeIntent="info"
2579
+ themeIntent="primary"
2574
2580
  themePadding="wideContent"
2575
2581
  themeSize="medium"
2576
2582
  themeVariant="filled"
@@ -588,8 +588,8 @@ exports[`ScrollableTabsHeader highlighted variant renders correctly 1`] = `
588
588
  style={
589
589
  {
590
590
  "alignItems": "center",
591
- "backgroundColor": "#355bfb",
592
- "borderColor": "#355bfb",
591
+ "backgroundColor": "#401960",
592
+ "borderColor": "#401960",
593
593
  "borderRadius": 999,
594
594
  "borderWidth": 2,
595
595
  "height": 24,
@@ -605,7 +605,7 @@ exports[`ScrollableTabsHeader highlighted variant renders correctly 1`] = `
605
605
  ],
606
606
  }
607
607
  }
608
- themeIntent="info"
608
+ themeIntent="primary"
609
609
  themePadding="wideContent"
610
610
  themeSize="medium"
611
611
  themeVariant="filled"
@@ -1190,8 +1190,8 @@ exports[`ScrollableTabsHeader underlined variant renders correctly 1`] = `
1190
1190
  style={
1191
1191
  {
1192
1192
  "alignItems": "center",
1193
- "backgroundColor": "#355bfb",
1194
- "borderColor": "#355bfb",
1193
+ "backgroundColor": "#401960",
1194
+ "borderColor": "#401960",
1195
1195
  "borderRadius": 999,
1196
1196
  "borderWidth": 2,
1197
1197
  "height": 24,
@@ -1207,7 +1207,7 @@ exports[`ScrollableTabsHeader underlined variant renders correctly 1`] = `
1207
1207
  ],
1208
1208
  }
1209
1209
  }
1210
- themeIntent="info"
1210
+ themeIntent="primary"
1211
1211
  themePadding="wideContent"
1212
1212
  themeSize="medium"
1213
1213
  themeVariant="filled"
@@ -25,8 +25,8 @@ exports[`TabWithBadge renders correctly with counter badge config 1`] = `
25
25
  style={
26
26
  {
27
27
  "alignItems": "center",
28
- "backgroundColor": "#355bfb",
29
- "borderColor": "#355bfb",
28
+ "backgroundColor": "#401960",
29
+ "borderColor": "#401960",
30
30
  "borderRadius": 999,
31
31
  "borderWidth": 2,
32
32
  "height": 24,
@@ -42,7 +42,7 @@ exports[`TabWithBadge renders correctly with counter badge config 1`] = `
42
42
  ],
43
43
  }
44
44
  }
45
- themeIntent="info"
45
+ themeIntent="primary"
46
46
  themePadding="wideContent"
47
47
  themeSize="medium"
48
48
  themeVariant="filled"
@@ -100,7 +100,9 @@ exports[`Tabs renders correctly 1`] = `
100
100
  [
101
101
  {
102
102
  "flexShrink": 1,
103
+ "lineHeight": undefined,
103
104
  "textAlign": "center",
105
+ "textAlignVertical": "center",
104
106
  },
105
107
  undefined,
106
108
  ],
@@ -421,8 +423,8 @@ exports[`Tabs renders correctly 1`] = `
421
423
  style={
422
424
  {
423
425
  "alignItems": "center",
424
- "backgroundColor": "#355bfb",
425
- "borderColor": "#355bfb",
426
+ "backgroundColor": "#401960",
427
+ "borderColor": "#401960",
426
428
  "borderRadius": 999,
427
429
  "borderWidth": 2,
428
430
  "height": 24,
@@ -438,7 +440,7 @@ exports[`Tabs renders correctly 1`] = `
438
440
  ],
439
441
  }
440
442
  }
441
- themeIntent="info"
443
+ themeIntent="primary"
442
444
  themePadding="wideContent"
443
445
  themeSize="medium"
444
446
  themeVariant="filled"
@@ -774,7 +776,9 @@ exports[`useIsFocused renders correctly 1`] = `
774
776
  [
775
777
  {
776
778
  "flexShrink": 1,
779
+ "lineHeight": undefined,
777
780
  "textAlign": "center",
781
+ "textAlignVertical": "center",
778
782
  },
779
783
  undefined,
780
784
  ],
@@ -1095,8 +1099,8 @@ exports[`useIsFocused renders correctly 1`] = `
1095
1099
  style={
1096
1100
  {
1097
1101
  "alignItems": "center",
1098
- "backgroundColor": "#355bfb",
1099
- "borderColor": "#355bfb",
1102
+ "backgroundColor": "#401960",
1103
+ "borderColor": "#401960",
1100
1104
  "borderRadius": 999,
1101
1105
  "borderWidth": 2,
1102
1106
  "height": 24,
@@ -1112,7 +1116,7 @@ exports[`useIsFocused renders correctly 1`] = `
1112
1116
  ],
1113
1117
  }
1114
1118
  }
1115
- themeIntent="info"
1119
+ themeIntent="primary"
1116
1120
  themePadding="wideContent"
1117
1121
  themeSize="medium"
1118
1122
  themeVariant="filled"
@@ -1448,7 +1452,9 @@ exports[`useIsFocused renders correctly: xxxxxx 1`] = `
1448
1452
  [
1449
1453
  {
1450
1454
  "flexShrink": 1,
1455
+ "lineHeight": undefined,
1451
1456
  "textAlign": "center",
1457
+ "textAlignVertical": "center",
1452
1458
  },
1453
1459
  undefined,
1454
1460
  ],
@@ -1769,8 +1775,8 @@ exports[`useIsFocused renders correctly: xxxxxx 1`] = `
1769
1775
  style={
1770
1776
  {
1771
1777
  "alignItems": "center",
1772
- "backgroundColor": "#355bfb",
1773
- "borderColor": "#355bfb",
1778
+ "backgroundColor": "#401960",
1779
+ "borderColor": "#401960",
1774
1780
  "borderRadius": 999,
1775
1781
  "borderWidth": 2,
1776
1782
  "height": 24,
@@ -1786,7 +1792,7 @@ exports[`useIsFocused renders correctly: xxxxxx 1`] = `
1786
1792
  ],
1787
1793
  }
1788
1794
  }
1789
- themeIntent="info"
1795
+ themeIntent="primary"
1790
1796
  themePadding="wideContent"
1791
1797
  themeSize="medium"
1792
1798
  themeVariant="filled"
@@ -941,6 +941,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
941
941
  "flexShrink": 1,
942
942
  "lineHeight": 22,
943
943
  "textAlign": "center",
944
+ "textAlignVertical": "center",
944
945
  },
945
946
  undefined,
946
947
  ],
@@ -101,6 +101,7 @@ export const StyledInput = styled(TextInput)(({ theme }) => ({
101
101
  flexGrow: 1,
102
102
  flexShrink: 1,
103
103
  fontFamily: theme.__hd__.toolbar.fonts.text,
104
+ color: theme.__hd__.toolbar.colors.text,
104
105
  }));
105
106
 
106
107
  export const StyledPrefix = styled(View)(({ theme }) => ({
@@ -16,6 +16,7 @@ import {
16
16
  ToolbarMessageState,
17
17
  ToolbarMessageWrapper,
18
18
  } from './StyledToolbar';
19
+ import { useTheme } from '../../theme';
19
20
 
20
21
  export type ToolbarMessageHandles = Pick<
21
22
  RNTextInput,
@@ -105,6 +106,7 @@ const ToolbarMessage = forwardRef<ToolbarMessageHandles, ToolbarMessageProps>(
105
106
  textStyle,
106
107
  ...nativeProps
107
108
  } = props;
109
+ const theme = useTheme();
108
110
 
109
111
  const innerTextInput = React.useRef<RNTextInput | undefined | null>();
110
112
 
@@ -154,6 +156,7 @@ const ToolbarMessage = forwardRef<ToolbarMessageHandles, ToolbarMessageProps>(
154
156
  innerTextInput.current = rnTextInputRef;
155
157
  }}
156
158
  style={textStyle}
159
+ placeholderTextColor={theme.__hd__.toolbar.colors.placeholder}
157
160
  />
158
161
  </StyledInputContainer>
159
162
  {suffix && (
@@ -48,10 +48,12 @@ exports[`ToolbarMessage disabled renders correctly 1`] = `
48
48
  editable={true}
49
49
  onChangeText={[MockFunction]}
50
50
  placeholder="Message"
51
+ placeholderTextColor="#4d6265"
51
52
  style={
52
53
  [
53
54
  {
54
55
  "alignSelf": "stretch",
56
+ "color": "#001f23",
55
57
  "flexGrow": 1,
56
58
  "flexShrink": 1,
57
59
  "fontFamily": "BeVietnamPro-Regular",
@@ -136,10 +138,12 @@ exports[`ToolbarMessage filled renders correctly 1`] = `
136
138
  <TextInput
137
139
  editable={true}
138
140
  placeholder="Message"
141
+ placeholderTextColor="#4d6265"
139
142
  style={
140
143
  [
141
144
  {
142
145
  "alignSelf": "stretch",
146
+ "color": "#001f23",
143
147
  "flexGrow": 1,
144
148
  "flexShrink": 1,
145
149
  "fontFamily": "BeVietnamPro-Regular",
@@ -238,10 +242,12 @@ exports[`ToolbarMessage idle renders correctly 1`] = `
238
242
  <TextInput
239
243
  editable={true}
240
244
  placeholder="Message"
245
+ placeholderTextColor="#4d6265"
241
246
  style={
242
247
  [
243
248
  {
244
249
  "alignSelf": "stretch",
250
+ "color": "#001f23",
245
251
  "flexGrow": 1,
246
252
  "flexShrink": 1,
247
253
  "fontFamily": "BeVietnamPro-Regular",
@@ -340,10 +346,12 @@ exports[`ToolbarMessage readonly renders correctly 1`] = `
340
346
  editable={true}
341
347
  onChangeText={[MockFunction]}
342
348
  placeholder="Message"
349
+ placeholderTextColor="#4d6265"
343
350
  style={
344
351
  [
345
352
  {
346
353
  "alignSelf": "stretch",
354
+ "color": "#001f23",
347
355
  "flexGrow": 1,
348
356
  "flexShrink": 1,
349
357
  "fontFamily": "BeVietnamPro-Regular",
@@ -148,6 +148,7 @@ exports[`theme returns correct theme object 1`] = `
148
148
  "colors": {
149
149
  "archived": "#606065",
150
150
  "border": "#ffffff",
151
+ "countText": "#ffffff",
151
152
  "danger": "#cb300a",
152
153
  "info": "#355bfb",
153
154
  "primary": "#401960",
@@ -156,6 +157,7 @@ exports[`theme returns correct theme object 1`] = `
156
157
  "warning": "#ac5d00",
157
158
  },
158
159
  "fontSizes": {
160
+ "count": 6,
159
161
  "icon": {
160
162
  "medium": 12,
161
163
  "small": 8,
@@ -168,10 +170,18 @@ exports[`theme returns correct theme object 1`] = `
168
170
  "small": "BeVietnamPro-SemiBold",
169
171
  },
170
172
  "lineHeights": {
173
+ "count": 12,
171
174
  "medium": 16,
172
175
  "small": 10,
173
176
  },
177
+ "radii": {
178
+ "count": 999,
179
+ },
174
180
  "sizes": {
181
+ "count": {
182
+ "height": 12,
183
+ "width": 12,
184
+ },
175
185
  "medium": {
176
186
  "height": 24,
177
187
  "minWidth": 24,
@@ -184,6 +194,7 @@ exports[`theme returns correct theme object 1`] = `
184
194
  "statusWidth": 8,
185
195
  },
186
196
  "space": {
197
+ "countPaddingHorizontal": 2,
187
198
  "medium": {
188
199
  "horizontalPadding": 8,
189
200
  },
@@ -296,7 +307,10 @@ exports[`theme returns correct theme object 1`] = `
296
307
  "utility": "BeVietnamPro-Regular",
297
308
  },
298
309
  "lineHeights": {
310
+ "buttonText": undefined,
311
+ "compactButtonText": undefined,
299
312
  "titleOfTextVariant": 22,
313
+ "utilityButtonText": undefined,
300
314
  },
301
315
  "radii": {
302
316
  "default": 32,
@@ -871,22 +885,22 @@ exports[`theme returns correct theme object 1`] = `
871
885
  "warningInverted": "#ffffff",
872
886
  },
873
887
  "incompleteness": {
874
- "archived": "#e8e9ea",
875
- "archivedInverted": "#bcbdbf",
876
- "danger": "#e8e9ea",
877
- "dangerInverted": "#f68282",
878
- "info": "#e8e9ea",
879
- "infoInverted": "#c4cffd",
880
- "primary": "#e8e9ea",
881
- "primaryInverted": "#664780",
882
- "success": "#e8e9ea",
883
- "successInverted": "#7bd897",
884
- "warning": "#e8e9ea",
885
- "warningInverted": "#ffcb8d",
888
+ "archived": "#000000",
889
+ "archivedInverted": "#000000",
890
+ "danger": "#000000",
891
+ "dangerInverted": "#000000",
892
+ "info": "#000000",
893
+ "infoInverted": "#000000",
894
+ "primary": "#000000",
895
+ "primaryInverted": "#000000",
896
+ "success": "#000000",
897
+ "successInverted": "#000000",
898
+ "warning": "#000000",
899
+ "warningInverted": "#000000",
886
900
  },
887
901
  "step": {
888
902
  "complete": "#401960",
889
- "current": "#DACCE4",
903
+ "current": "#ccd2d3",
890
904
  "incomplete": "#dadbde",
891
905
  },
892
906
  },
@@ -968,26 +982,18 @@ exports[`theme returns correct theme object 1`] = `
968
982
  "search": {
969
983
  "borderWidths": {
970
984
  "container": {
971
- "basic": {
972
- "focused": 2,
973
- "normal": 2,
974
- },
975
- "reversed": {
976
- "focused": 2,
977
- "normal": 1,
978
- },
985
+ "default": 1,
979
986
  },
980
987
  },
981
988
  "colors": {
982
989
  "basic": {
983
990
  "border": "#f6f6f7",
984
991
  "containerBackground": "#f6f6f7",
985
- "focusedBorder": "#001f23",
986
992
  },
993
+ "placeholder": "#4d6265",
987
994
  "reversed": {
988
995
  "border": "#e8e9ea",
989
996
  "containerBackground": "#ffffff",
990
- "focusedBorder": "#001f23",
991
997
  },
992
998
  "shadow": "#001f23",
993
999
  "suffixBackground": "#ffffff",
@@ -1426,9 +1432,11 @@ exports[`theme returns correct theme object 1`] = `
1426
1432
  "iconButtonBackground": "#ece8ef",
1427
1433
  "info": "#b5c3fd",
1428
1434
  "inputContainerBackground": "#f6f6f7",
1435
+ "placeholder": "#4d6265",
1429
1436
  "primary": "#401960",
1430
1437
  "secondary": "#4d6265",
1431
1438
  "success": "#5ace7d",
1439
+ "text": "#001f23",
1432
1440
  },
1433
1441
  "fontSizes": {
1434
1442
  "text": 16,
@@ -1,3 +1,4 @@
1
+ import { Platform } from 'react-native';
1
2
  import type { GlobalTheme } from '../global';
2
3
 
3
4
  const getBadgeTheme = (theme: GlobalTheme) => {
@@ -10,6 +11,7 @@ const getBadgeTheme = (theme: GlobalTheme) => {
10
11
  archived: theme.colors.onArchivedSurface,
11
12
  text: theme.colors.onDarkGlobalSurface,
12
13
  border: theme.colors.defaultGlobalSurface,
14
+ countText: theme.colors.onDarkGlobalSurface,
13
15
  };
14
16
 
15
17
  const fonts = {
@@ -24,11 +26,20 @@ const getBadgeTheme = (theme: GlobalTheme) => {
24
26
  medium: theme.fontSizes.small,
25
27
  small: 8,
26
28
  },
29
+ count: 6,
27
30
  };
28
31
 
29
32
  const lineHeights = {
30
33
  medium: theme.lineHeights.small,
31
34
  small: 10,
35
+ count: Platform.select({
36
+ android: 11, // vertical alignment
37
+ default: 12,
38
+ }),
39
+ };
40
+
41
+ const radii = {
42
+ count: theme.radii.rounded,
32
43
  };
33
44
 
34
45
  const sizes = {
@@ -42,6 +53,10 @@ const getBadgeTheme = (theme: GlobalTheme) => {
42
53
  },
43
54
  statusHeight: theme.sizes.small,
44
55
  statusWidth: theme.sizes.small,
56
+ count: {
57
+ width: theme.sizes.smallMedium,
58
+ height: theme.sizes.smallMedium,
59
+ },
45
60
  };
46
61
 
47
62
  const borderWidths = {
@@ -57,9 +72,19 @@ const getBadgeTheme = (theme: GlobalTheme) => {
57
72
  },
58
73
  statusPositionTop: -theme.space.xxsmall,
59
74
  statusPositionRight: -theme.space.xxsmall,
75
+ countPaddingHorizontal: theme.space.xxsmall,
60
76
  };
61
77
 
62
- return { colors, fonts, fontSizes, sizes, space, lineHeights, borderWidths };
78
+ return {
79
+ colors,
80
+ fonts,
81
+ fontSizes,
82
+ sizes,
83
+ space,
84
+ lineHeights,
85
+ borderWidths,
86
+ radii,
87
+ };
63
88
  };
64
89
 
65
90
  export type BadgeThemeType = ReturnType<typeof getBadgeTheme>;
@@ -1,3 +1,4 @@
1
+ import { Platform } from 'react-native';
1
2
  import type { GlobalTheme } from '../global';
2
3
 
3
4
  const getButtonTheme = (theme: GlobalTheme) => {
@@ -79,6 +80,15 @@ const getButtonTheme = (theme: GlobalTheme) => {
79
80
 
80
81
  const lineHeights = {
81
82
  titleOfTextVariant: theme.lineHeights.medium,
83
+ buttonText: Platform.select({
84
+ android: theme.lineHeights.medium + theme.space.xxsmall,
85
+ }),
86
+ utilityButtonText: Platform.select({
87
+ android: theme.lineHeights.small + theme.space.xxsmall,
88
+ }),
89
+ compactButtonText: Platform.select({
90
+ android: theme.lineHeights.small + theme.space.xxsmall,
91
+ }),
82
92
  };
83
93
 
84
94
  return {
@@ -1,46 +1,41 @@
1
- import { mixColor } from '@hero-design/colors';
2
1
  import type { GlobalTheme } from '../global';
3
2
 
4
3
  const getProgressTheme = (theme: GlobalTheme) => {
5
- const lightenScaleOnInverted = 20;
6
-
7
4
  const colors = {
8
5
  completeness: {
9
6
  primary: theme.colors.primary,
10
- success: theme.colors.success, // should be emerald dark 15
7
+ success: theme.colors.success,
11
8
  warning: theme.colors.warning,
12
9
  danger: theme.colors.error,
13
10
  info: theme.colors.info,
14
11
  archived: theme.colors.onArchivedSurface,
15
12
 
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,
13
+ primaryInverted: theme.colors.white,
14
+ successInverted: theme.colors.white,
15
+ warningInverted: theme.colors.white,
16
+ dangerInverted: theme.colors.white,
17
+ infoInverted: theme.colors.white,
18
+ archivedInverted: theme.colors.white,
22
19
  },
23
20
  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,
21
+ primary: theme.colors.overlayGlobalSurface,
22
+ success: theme.colors.overlayGlobalSurface,
23
+ warning: theme.colors.overlayGlobalSurface,
24
+ danger: theme.colors.overlayGlobalSurface,
25
+ info: theme.colors.overlayGlobalSurface,
26
+ archived: theme.colors.overlayGlobalSurface,
27
+
28
+ primaryInverted: theme.colors.overlayGlobalSurface,
29
+ successInverted: theme.colors.overlayGlobalSurface,
30
+ warningInverted: theme.colors.overlayGlobalSurface,
31
+ dangerInverted: theme.colors.overlayGlobalSurface,
32
+ infoInverted: theme.colors.overlayGlobalSurface,
33
+ archivedInverted: theme.colors.overlayGlobalSurface,
39
34
  },
40
35
  step: {
41
36
  complete: theme.colors.primary,
42
37
  incomplete: theme.colors.archivedSurface,
43
- current: '#DACCE4',
38
+ current: theme.colors.decorativePrimarySurface,
44
39
  },
45
40
  };
46
41