@hero-design/rn 8.125.0 → 8.127.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,24 @@
1
1
  # @hero-design/rn
2
2
 
3
+ ## 8.127.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#5062](https://github.com/Thinkei/hero-design/pull/5062) [`94e95b9b964949e2ad8da6f071ac0aae7b8879ae`](https://github.com/Thinkei/hero-design/commit/94e95b9b964949e2ad8da6f071ac0aae7b8879ae) Thanks [@phucdph](https://github.com/phucdph)! - [Tag] Change label font weight to medium and add neutral intent
8
+
9
+ - Tag string label font weight changed from semi-bold (600) to medium (500) across all intents.
10
+ - New `intent="neutral"`
11
+
12
+ ## 8.126.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#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
17
+
18
+ - Both `medium` and `small` badge sizes now use `BeVietnamPro-Medium` (weight 500). Previously `medium` used Regular (400) and `small` used SemiBold (600).
19
+ - New `intent="neutral"` renders a light grey background (`neutralGlobalSurface`) with near-black text (`onDefaultGlobalSurface`), suitable for inactive or default-state labels.
20
+ - `Badge.Status` with `intent="neutral"` renders with `mutedOnDefaultGlobalSurface` as the dot color.
21
+
3
22
  ## 8.125.0
4
23
 
5
24
  ### 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,
@@ -7178,10 +7181,12 @@ var getTagTheme = function getTagTheme(theme) {
7178
7181
  dangerBackground: theme.colors.errorSurface,
7179
7182
  archived: theme.colors.onArchivedSurface,
7180
7183
  archivedBackground: theme.colors.archivedSurface,
7181
- text: theme.colors.onDefaultGlobalSurface
7184
+ text: theme.colors.onDefaultGlobalSurface,
7185
+ neutral: theme.colors.onDefaultGlobalSurface,
7186
+ neutralBackground: theme.colors.neutralGlobalSurface
7182
7187
  };
7183
7188
  var fonts = {
7184
- "default": theme.fonts.neutral.semiBold
7189
+ "default": theme.fonts.neutral.medium
7185
7190
  };
7186
7191
  var fontSizes = {
7187
7192
  "default": theme.fontSizes.small
@@ -28686,7 +28691,7 @@ var Tag = function Tag(_ref) {
28686
28691
  testID: testID !== undefined ? "".concat(testID, "-left-icon") : undefined
28687
28692
  }), typeof content === 'string' ? /*#__PURE__*/React__default.createElement(StyledText$1, {
28688
28693
  themeIntent: intent,
28689
- fontWeight: "semi-bold"
28694
+ fontWeight: "medium"
28690
28695
  }, content) : content, rightIcon !== undefined && /*#__PURE__*/React__default.createElement(StyledTagIcon, {
28691
28696
  icon: rightIcon,
28692
28697
  size: "xsmall",
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,
@@ -7208,10 +7211,12 @@ var getTagTheme = function getTagTheme(theme) {
7208
7211
  dangerBackground: theme.colors.errorSurface,
7209
7212
  archived: theme.colors.onArchivedSurface,
7210
7213
  archivedBackground: theme.colors.archivedSurface,
7211
- text: theme.colors.onDefaultGlobalSurface
7214
+ text: theme.colors.onDefaultGlobalSurface,
7215
+ neutral: theme.colors.onDefaultGlobalSurface,
7216
+ neutralBackground: theme.colors.neutralGlobalSurface
7212
7217
  };
7213
7218
  var fonts = {
7214
- "default": theme.fonts.neutral.semiBold
7219
+ "default": theme.fonts.neutral.medium
7215
7220
  };
7216
7221
  var fontSizes = {
7217
7222
  "default": theme.fontSizes.small
@@ -28716,7 +28721,7 @@ var Tag = function Tag(_ref) {
28716
28721
  testID: testID !== undefined ? "".concat(testID, "-left-icon") : undefined
28717
28722
  }), typeof content === 'string' ? /*#__PURE__*/React__namespace.default.createElement(StyledText$1, {
28718
28723
  themeIntent: intent,
28719
- fontWeight: "semi-bold"
28724
+ fontWeight: "medium"
28720
28725
  }, content) : content, rightIcon !== undefined && /*#__PURE__*/React__namespace.default.createElement(StyledTagIcon, {
28721
28726
  icon: rightIcon,
28722
28727
  size: "xsmall",
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.125.0",
3
+ "version": "8.127.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,7 +9,8 @@ type ThemeIntent =
9
9
  | 'success'
10
10
  | 'warning'
11
11
  | 'danger'
12
- | 'archived';
12
+ | 'archived'
13
+ | 'neutral';
13
14
 
14
15
  const StyledView = styled(View)<{
15
16
  themeIntent: ThemeIntent;
@@ -17,7 +17,14 @@ interface TagProps extends ViewProps {
17
17
  /**
18
18
  * Visual intent color to apply to Tag.
19
19
  */
20
- intent?: 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
20
+ intent?:
21
+ | 'primary'
22
+ | 'info'
23
+ | 'success'
24
+ | 'warning'
25
+ | 'danger'
26
+ | 'archived'
27
+ | 'neutral';
21
28
  /**
22
29
  * Places an icon within the tag, after the content.
23
30
  */
@@ -70,7 +77,7 @@ const Tag = ({
70
77
  />
71
78
  )}
72
79
  {typeof content === 'string' ? (
73
- <StyledText themeIntent={intent} fontWeight="semi-bold">
80
+ <StyledText themeIntent={intent} fontWeight="medium">
74
81
  {content}
75
82
  </StyledText>
76
83
  ) : (
@@ -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 = {
@@ -19,10 +19,12 @@ const getTagTheme = (theme: GlobalTheme) => {
19
19
  archived: theme.colors.onArchivedSurface,
20
20
  archivedBackground: theme.colors.archivedSurface,
21
21
  text: theme.colors.onDefaultGlobalSurface,
22
+ neutral: theme.colors.onDefaultGlobalSurface,
23
+ neutralBackground: theme.colors.neutralGlobalSurface,
22
24
  };
23
25
 
24
26
  const fonts = {
25
- default: theme.fonts.neutral.semiBold,
27
+ default: theme.fonts.neutral.medium,
26
28
  };
27
29
 
28
30
  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
  */
@@ -1,5 +1,5 @@
1
1
  import { View } from 'react-native';
2
- type ThemeIntent = 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
2
+ type ThemeIntent = 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived' | 'neutral';
3
3
  declare const StyledView: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
4
  theme?: import("@emotion/react").Theme;
5
5
  as?: React.ElementType;
@@ -13,7 +13,7 @@ interface TagProps extends ViewProps {
13
13
  /**
14
14
  * Visual intent color to apply to Tag.
15
15
  */
16
- intent?: 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
16
+ intent?: 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived' | 'neutral';
17
17
  /**
18
18
  * Places an icon within the tag, after the content.
19
19
  */
@@ -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: {
@@ -17,6 +17,8 @@ declare const getTagTheme: (theme: GlobalTheme) => {
17
17
  archived: string;
18
18
  archivedBackground: string;
19
19
  text: string;
20
+ neutral: string;
21
+ neutralBackground: string;
20
22
  };
21
23
  fonts: {
22
24
  default: string;