@hero-design/rn 7.27.0 → 7.27.1

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.
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from 'react';
2
- import { useTheme } from '../../../theme';
2
+ import { mobileVisualisationPalette } from '@hero-design/colors';
3
3
 
4
4
  const shuffleArray = <T>(array: Array<T>): Array<T> =>
5
5
  array
@@ -11,12 +11,9 @@ const shuffleArray = <T>(array: Array<T>): Array<T> =>
11
11
  * Hook that returns a memoized and shuffled array of visualisation colors for Avatar.
12
12
  */
13
13
  export const useAvatarColors = () => {
14
- const theme = useTheme();
15
- const visualisationColors = theme.__hd__.avatar.colors.visualisation;
16
14
  const shuffledColors = useMemo(
17
- () => shuffleArray(visualisationColors),
18
- [visualisationColors]
15
+ () => shuffleArray(Object.values(mobileVisualisationPalette)),
16
+ []
19
17
  );
20
-
21
18
  return shuffledColors;
22
19
  };
@@ -65,28 +65,6 @@ Object {
65
65
  "primary": "#401960",
66
66
  "success": "#5ace7d",
67
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
- ],
90
68
  "warning": "#ffbe71",
91
69
  },
92
70
  "fontSizes": Object {
@@ -1,4 +1,3 @@
1
- import { defaultMobilePalette as palette } from '@hero-design/colors';
2
1
  import type { GlobalTheme } from '../global';
3
2
 
4
3
  const getAvatarTheme = (theme: GlobalTheme) => {
@@ -9,28 +8,6 @@ const getAvatarTheme = (theme: GlobalTheme) => {
9
8
  success: theme.colors.success,
10
9
  warning: theme.colors.warning,
11
10
  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
- ],
34
11
  };
35
12
 
36
13
  const sizes = {
@@ -3,13 +3,13 @@ import swag from './swag';
3
3
  import type { SystemPalette, BrandSystemPalette } from './types';
4
4
 
5
5
  const workBrandSystemPallete: BrandSystemPalette = {
6
- primary: palette.violet,
6
+ primary: palette.policeBlue,
7
7
  onPrimary: palette.white,
8
- secondary: palette.violetLight30,
8
+ secondary: palette.policeBlueLight25,
9
9
  onSecondary: palette.white,
10
10
  defaultSurface: palette.white,
11
- highlightedSurface: palette.violetLight90,
12
- pressedSurface: palette.violetLight20,
11
+ highlightedSurface: palette.policeBlueLight90,
12
+ pressedSurface: palette.policeBlueLight20,
13
13
 
14
14
  decorativePrimary: palette.gold,
15
15
  decorativePrimarySurface: palette.goldLight80,
@@ -7,7 +7,6 @@ declare const getAvatarTheme: (theme: GlobalTheme) => {
7
7
  success: string;
8
8
  warning: string;
9
9
  text: string;
10
- visualisation: string[];
11
10
  };
12
11
  sizes: {
13
12
  small: number;