@hero-design/rn 8.125.0 → 8.126.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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @hero-design/rn
2
2
 
3
+ ## 8.126.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#5059](https://github.com/Thinkei/hero-design/pull/5059) [`9f52a1a805000630192556c35dede41fbd91cc0a`](https://github.com/Thinkei/hero-design/commit/9f52a1a805000630192556c35dede41fbd91cc0a) Thanks [@phucdph](https://github.com/phucdph)! - **Badge:** standardise font weight to Medium (500) across all sizes; add `neutral` intent
8
+
9
+ - Both `medium` and `small` badge sizes now use `BeVietnamPro-Medium` (weight 500). Previously `medium` used Regular (400) and `small` used SemiBold (600).
10
+ - New `intent="neutral"` renders a light grey background (`neutralGlobalSurface`) with near-black text (`onDefaultGlobalSurface`), suitable for inactive or default-state labels.
11
+ - `Badge.Status` with `intent="neutral"` renders with `mutedOnDefaultGlobalSurface` as the dot color.
12
+
3
13
  ## 8.125.0
4
14
 
5
15
  ### Minor Changes
package/es/index.js CHANGED
@@ -5682,6 +5682,7 @@ var getBadgeTheme = function getBadgeTheme(theme) {
5682
5682
  success: theme.colors.onSuccessSurface,
5683
5683
  warning: theme.colors.onWarningSurface,
5684
5684
  archived: theme.colors.onArchivedSurface,
5685
+ neutral: theme.colors.mutedOnDefaultGlobalSurface,
5685
5686
  text: theme.colors.onDarkGlobalSurface,
5686
5687
  border: theme.colors.defaultGlobalSurface,
5687
5688
  countText: theme.colors.onDarkGlobalSurface,
@@ -5691,7 +5692,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
5691
5692
  info: theme.colors.infoSurface,
5692
5693
  success: theme.colors.successSurface,
5693
5694
  warning: theme.colors.warningSurface,
5694
- archived: theme.colors.archivedSurface
5695
+ archived: theme.colors.archivedSurface,
5696
+ neutral: theme.colors.neutralGlobalSurface
5695
5697
  },
5696
5698
  stringText: {
5697
5699
  primary: theme.colors.primary,
@@ -5699,12 +5701,13 @@ var getBadgeTheme = function getBadgeTheme(theme) {
5699
5701
  info: theme.colors.onInfoSurface,
5700
5702
  success: theme.colors.onSuccessSurface,
5701
5703
  warning: theme.colors.onWarningSurface,
5702
- archived: theme.colors.onArchivedSurface
5704
+ archived: theme.colors.onArchivedSurface,
5705
+ neutral: theme.colors.onDefaultGlobalSurface
5703
5706
  }
5704
5707
  };
5705
5708
  var fonts = {
5706
- medium: theme.fonts.neutral.regular,
5707
- small: theme.fonts.neutral.semiBold
5709
+ medium: theme.fonts.neutral.medium,
5710
+ small: theme.fonts.neutral.medium
5708
5711
  };
5709
5712
  var fontSizes = {
5710
5713
  medium: theme.fontSizes.small,
package/lib/index.js CHANGED
@@ -5712,6 +5712,7 @@ var getBadgeTheme = function getBadgeTheme(theme) {
5712
5712
  success: theme.colors.onSuccessSurface,
5713
5713
  warning: theme.colors.onWarningSurface,
5714
5714
  archived: theme.colors.onArchivedSurface,
5715
+ neutral: theme.colors.mutedOnDefaultGlobalSurface,
5715
5716
  text: theme.colors.onDarkGlobalSurface,
5716
5717
  border: theme.colors.defaultGlobalSurface,
5717
5718
  countText: theme.colors.onDarkGlobalSurface,
@@ -5721,7 +5722,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
5721
5722
  info: theme.colors.infoSurface,
5722
5723
  success: theme.colors.successSurface,
5723
5724
  warning: theme.colors.warningSurface,
5724
- archived: theme.colors.archivedSurface
5725
+ archived: theme.colors.archivedSurface,
5726
+ neutral: theme.colors.neutralGlobalSurface
5725
5727
  },
5726
5728
  stringText: {
5727
5729
  primary: theme.colors.primary,
@@ -5729,12 +5731,13 @@ var getBadgeTheme = function getBadgeTheme(theme) {
5729
5731
  info: theme.colors.onInfoSurface,
5730
5732
  success: theme.colors.onSuccessSurface,
5731
5733
  warning: theme.colors.onWarningSurface,
5732
- archived: theme.colors.onArchivedSurface
5734
+ archived: theme.colors.onArchivedSurface,
5735
+ neutral: theme.colors.onDefaultGlobalSurface
5733
5736
  }
5734
5737
  };
5735
5738
  var fonts = {
5736
- medium: theme.fonts.neutral.regular,
5737
- small: theme.fonts.neutral.semiBold
5739
+ medium: theme.fonts.neutral.medium,
5740
+ small: theme.fonts.neutral.medium
5738
5741
  };
5739
5742
  var fontSizes = {
5740
5743
  medium: theme.fontSizes.small,
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.125.0",
3
+ "version": "8.126.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
7
- "react-native": "src/index.ts",
8
7
  "types": "types/index.d.ts",
8
+ "react-native": "src/index.ts",
9
9
  "scripts": {
10
10
  "lint": "eslint src --quiet",
11
11
  "type-check": "tsc --noEmit",
@@ -16,7 +16,14 @@ export interface StatusProps extends ViewProps {
16
16
  /**
17
17
  * Visual intent color to apply to Status Badge.
18
18
  */
19
- intent?: 'success' | 'warning' | 'danger' | 'info' | 'archived' | 'primary';
19
+ intent?:
20
+ | 'success'
21
+ | 'warning'
22
+ | 'danger'
23
+ | 'info'
24
+ | 'archived'
25
+ | 'primary'
26
+ | 'neutral';
20
27
  /**
21
28
  * Additional style.
22
29
  */
@@ -9,7 +9,8 @@ type ThemeIntent =
9
9
  | 'warning'
10
10
  | 'danger'
11
11
  | 'info'
12
- | 'archived';
12
+ | 'archived'
13
+ | 'neutral';
13
14
 
14
15
  type ThemePadding = 'narrowContent' | 'wideContent';
15
16
 
@@ -13,7 +13,14 @@ interface BaseBadgeProps extends React.ComponentProps<typeof Animated.View> {
13
13
  /**
14
14
  * Visual intent color to apply to Badge.
15
15
  */
16
- intent?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived';
16
+ intent?:
17
+ | 'primary'
18
+ | 'success'
19
+ | 'warning'
20
+ | 'danger'
21
+ | 'info'
22
+ | 'archived'
23
+ | 'neutral';
17
24
  /**
18
25
  * Additional style.
19
26
  */
@@ -9,6 +9,7 @@ const getBadgeTheme = (theme: GlobalTheme) => {
9
9
  success: theme.colors.onSuccessSurface,
10
10
  warning: theme.colors.onWarningSurface,
11
11
  archived: theme.colors.onArchivedSurface,
12
+ neutral: theme.colors.mutedOnDefaultGlobalSurface,
12
13
  text: theme.colors.onDarkGlobalSurface,
13
14
  border: theme.colors.defaultGlobalSurface,
14
15
  countText: theme.colors.onDarkGlobalSurface,
@@ -19,6 +20,7 @@ const getBadgeTheme = (theme: GlobalTheme) => {
19
20
  success: theme.colors.successSurface,
20
21
  warning: theme.colors.warningSurface,
21
22
  archived: theme.colors.archivedSurface,
23
+ neutral: theme.colors.neutralGlobalSurface,
22
24
  },
23
25
  stringText: {
24
26
  primary: theme.colors.primary,
@@ -27,12 +29,13 @@ const getBadgeTheme = (theme: GlobalTheme) => {
27
29
  success: theme.colors.onSuccessSurface,
28
30
  warning: theme.colors.onWarningSurface,
29
31
  archived: theme.colors.onArchivedSurface,
32
+ neutral: theme.colors.onDefaultGlobalSurface,
30
33
  },
31
34
  };
32
35
 
33
36
  const fonts = {
34
- medium: theme.fonts.neutral.regular,
35
- small: theme.fonts.neutral.semiBold,
37
+ medium: theme.fonts.neutral.medium,
38
+ small: theme.fonts.neutral.medium,
36
39
  };
37
40
 
38
41
  const fontSizes = {
@@ -9,7 +9,7 @@ export interface StatusProps extends ViewProps {
9
9
  /**
10
10
  * Visual intent color to apply to Status Badge.
11
11
  */
12
- intent?: 'success' | 'warning' | 'danger' | 'info' | 'archived' | 'primary';
12
+ intent?: 'success' | 'warning' | 'danger' | 'info' | 'archived' | 'primary' | 'neutral';
13
13
  /**
14
14
  * Additional style.
15
15
  */
@@ -1,5 +1,5 @@
1
1
  import { Animated, View } from 'react-native';
2
- type ThemeIntent = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived';
2
+ type ThemeIntent = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived' | 'neutral';
3
3
  type ThemePadding = 'narrowContent' | 'wideContent';
4
4
  type ThemeSize = 'medium' | 'small';
5
5
  type ThemeVariant = 'filled' | 'outlined';
@@ -12,7 +12,7 @@ interface BaseBadgeProps extends React.ComponentProps<typeof Animated.View> {
12
12
  /**
13
13
  * Visual intent color to apply to Badge.
14
14
  */
15
- intent?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived';
15
+ intent?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived' | 'neutral';
16
16
  /**
17
17
  * Additional style.
18
18
  */
@@ -7,6 +7,7 @@ declare const getBadgeTheme: (theme: GlobalTheme) => {
7
7
  success: string;
8
8
  warning: string;
9
9
  archived: string;
10
+ neutral: string;
10
11
  text: string;
11
12
  border: string;
12
13
  countText: string;
@@ -17,6 +18,7 @@ declare const getBadgeTheme: (theme: GlobalTheme) => {
17
18
  success: string;
18
19
  warning: string;
19
20
  archived: string;
21
+ neutral: string;
20
22
  };
21
23
  stringText: {
22
24
  primary: string;
@@ -25,6 +27,7 @@ declare const getBadgeTheme: (theme: GlobalTheme) => {
25
27
  success: string;
26
28
  warning: string;
27
29
  archived: string;
30
+ neutral: string;
28
31
  };
29
32
  };
30
33
  fonts: {