@hero-design/rn 8.92.2 → 8.92.3

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 (60) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +18 -0
  3. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  4. package/es/index.js +588 -720
  5. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  6. package/lib/index.js +589 -720
  7. package/package.json +4 -2
  8. package/rollup.config.mjs +1 -0
  9. package/src/components/Button/StyledButton.tsx +15 -8
  10. package/src/components/Button/UtilityButton/StyledUtilityButton.tsx +5 -3
  11. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  12. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +61 -4
  13. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +26 -0
  14. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
  15. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +2 -0
  16. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  17. package/src/components/Icon/IconList.ts +1 -0
  18. package/src/components/MapPin/StyledMapPin.tsx +1 -9
  19. package/src/components/Progress/ProgressCircle.tsx +53 -109
  20. package/src/components/Progress/StyledProgressBar.tsx +4 -1
  21. package/src/components/Progress/StyledProgressCircle.tsx +1 -57
  22. package/src/components/Progress/StyledStep.tsx +1 -1
  23. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +299 -647
  24. package/src/components/Search/SearchOneLine.tsx +2 -2
  25. package/src/components/Search/SearchTwoLine.tsx +1 -1
  26. package/src/components/Search/StyledSearch.tsx +20 -35
  27. package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +51 -51
  28. package/src/components/Search/__tests__/__snapshots__/SearchSuffixIcon.spec.tsx.snap +2 -2
  29. package/src/components/Search/__tests__/__snapshots__/SearchTwoLine.spec.tsx.snap +13 -15
  30. package/src/components/Search/__tests__/__snapshots__/utils.spec.tsx.snap +4 -4
  31. package/src/components/Search/utils.tsx +2 -2
  32. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  33. package/src/components/Tabs/TabWithBadge.tsx +1 -1
  34. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +15 -9
  35. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +6 -6
  36. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +3 -3
  37. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +15 -9
  38. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
  39. package/src/components/Toolbar/StyledToolbar.tsx +1 -0
  40. package/src/components/Toolbar/ToolbarMessage.tsx +3 -0
  41. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarMessage.spec.tsx.snap +8 -0
  42. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +20 -23
  43. package/src/theme/components/button.ts +10 -0
  44. package/src/theme/components/progress.ts +21 -26
  45. package/src/theme/components/search.ts +2 -10
  46. package/src/theme/components/toolbar.ts +2 -0
  47. package/src/utils/helpers.ts +9 -0
  48. package/stats/8.92.3/rn-stats.html +4842 -0
  49. package/types/components/Button/StyledButton.d.ts +2 -2
  50. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +1 -1
  51. package/types/components/Icon/IconList.d.ts +1 -1
  52. package/types/components/Icon/index.d.ts +1 -1
  53. package/types/components/Progress/StyledProgressCircle.d.ts +1 -32
  54. package/types/components/Search/StyledSearch.d.ts +0 -1
  55. package/types/components/TextInput/index.d.ts +1 -1
  56. package/types/theme/components/button.d.ts +3 -0
  57. package/types/theme/components/progress.d.ts +6 -6
  58. package/types/theme/components/search.d.ts +2 -10
  59. package/types/theme/components/toolbar.d.ts +2 -0
  60. 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",
@@ -296,7 +296,10 @@ exports[`theme returns correct theme object 1`] = `
296
296
  "utility": "BeVietnamPro-Regular",
297
297
  },
298
298
  "lineHeights": {
299
+ "buttonText": undefined,
300
+ "compactButtonText": undefined,
299
301
  "titleOfTextVariant": 22,
302
+ "utilityButtonText": undefined,
300
303
  },
301
304
  "radii": {
302
305
  "default": 32,
@@ -871,22 +874,22 @@ exports[`theme returns correct theme object 1`] = `
871
874
  "warningInverted": "#ffffff",
872
875
  },
873
876
  "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",
877
+ "archived": "#000000",
878
+ "archivedInverted": "#000000",
879
+ "danger": "#000000",
880
+ "dangerInverted": "#000000",
881
+ "info": "#000000",
882
+ "infoInverted": "#000000",
883
+ "primary": "#000000",
884
+ "primaryInverted": "#000000",
885
+ "success": "#000000",
886
+ "successInverted": "#000000",
887
+ "warning": "#000000",
888
+ "warningInverted": "#000000",
886
889
  },
887
890
  "step": {
888
891
  "complete": "#401960",
889
- "current": "#DACCE4",
892
+ "current": "#ccd2d3",
890
893
  "incomplete": "#dadbde",
891
894
  },
892
895
  },
@@ -968,26 +971,18 @@ exports[`theme returns correct theme object 1`] = `
968
971
  "search": {
969
972
  "borderWidths": {
970
973
  "container": {
971
- "basic": {
972
- "focused": 2,
973
- "normal": 2,
974
- },
975
- "reversed": {
976
- "focused": 2,
977
- "normal": 1,
978
- },
974
+ "default": 1,
979
975
  },
980
976
  },
981
977
  "colors": {
982
978
  "basic": {
983
979
  "border": "#f6f6f7",
984
980
  "containerBackground": "#f6f6f7",
985
- "focusedBorder": "#001f23",
986
981
  },
982
+ "placeholder": "#4d6265",
987
983
  "reversed": {
988
984
  "border": "#e8e9ea",
989
985
  "containerBackground": "#ffffff",
990
- "focusedBorder": "#001f23",
991
986
  },
992
987
  "shadow": "#001f23",
993
988
  "suffixBackground": "#ffffff",
@@ -1426,9 +1421,11 @@ exports[`theme returns correct theme object 1`] = `
1426
1421
  "iconButtonBackground": "#ece8ef",
1427
1422
  "info": "#b5c3fd",
1428
1423
  "inputContainerBackground": "#f6f6f7",
1424
+ "placeholder": "#4d6265",
1429
1425
  "primary": "#401960",
1430
1426
  "secondary": "#4d6265",
1431
1427
  "success": "#5ace7d",
1428
+ "text": "#001f23",
1432
1429
  },
1433
1430
  "fontSizes": {
1434
1431
  "text": 16,
@@ -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
 
@@ -5,16 +5,15 @@ const getSearchTheme = (theme: GlobalTheme) => {
5
5
  basic: {
6
6
  containerBackground: theme.colors.neutralGlobalSurface,
7
7
  border: theme.colors.neutralGlobalSurface,
8
- focusedBorder: theme.colors.primaryOutline,
9
8
  },
10
9
  reversed: {
11
10
  containerBackground: theme.colors.defaultGlobalSurface,
12
11
  border: theme.colors.secondaryOutline,
13
- focusedBorder: theme.colors.primaryOutline,
14
12
  },
15
13
  suffixBackground: theme.colors.defaultGlobalSurface,
16
14
  text: theme.colors.onDefaultGlobalSurface,
17
15
  shadow: theme.colors.primaryOutline,
16
+ placeholder: theme.colors.mutedOnDefaultGlobalSurface,
18
17
  };
19
18
 
20
19
  const shadows = {
@@ -42,14 +41,7 @@ const getSearchTheme = (theme: GlobalTheme) => {
42
41
 
43
42
  const borderWidths = {
44
43
  container: {
45
- basic: {
46
- normal: theme.borderWidths.medium,
47
- focused: theme.borderWidths.medium,
48
- },
49
- reversed: {
50
- normal: theme.borderWidths.base,
51
- focused: theme.borderWidths.medium,
52
- },
44
+ default: theme.borderWidths.base,
53
45
  },
54
46
  };
55
47
 
@@ -13,6 +13,8 @@ const getToolbarTheme = (theme: GlobalTheme) => {
13
13
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
14
14
  iconButtonBackground: theme.colors.highlightedSurface,
15
15
  inputContainerBackground: theme.colors.neutralGlobalSurface,
16
+ text: theme.colors.onDefaultGlobalSurface,
17
+ placeholder: theme.colors.mutedOnDefaultGlobalSurface,
16
18
  };
17
19
 
18
20
  const space = {
@@ -27,3 +27,12 @@ export function omit<O, T extends keyof O>(keys: T[], obj: O): Omit<O, T> {
27
27
 
28
28
  return result;
29
29
  }
30
+
31
+ export function hexToRgba(hex: string, a: number) {
32
+ const arrBuff = new ArrayBuffer(4);
33
+ const vw = new DataView(arrBuff);
34
+ vw.setUint32(0, parseInt(hex, 16), false);
35
+ const arrByte = new Uint8Array(arrBuff);
36
+ const [r, g, b] = arrByte;
37
+ return `rgba(${r},${g},${b},${a})`;
38
+ }