@audira/carbon-react-native 1.0.1 → 1.0.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 (53) hide show
  1. package/lib/commonjs/carbon-style-sheet/color.js +174 -6
  2. package/lib/commonjs/carbon-style-sheet/color.js.map +1 -1
  3. package/lib/commonjs/carbon-style-sheet/create.js +58 -21
  4. package/lib/commonjs/carbon-style-sheet/create.js.map +1 -1
  5. package/lib/commonjs/carbon-style-sheet/g/font.js +1 -1
  6. package/lib/commonjs/carbon-style-sheet/g/spacing.js +1 -1
  7. package/lib/commonjs/carbon-style-sheet/g/typography.js +1 -1
  8. package/lib/commonjs/carbon-style-sheet/g-object/font.js +1 -1
  9. package/lib/commonjs/carbon-style-sheet/g-object/spacing.js +1 -1
  10. package/lib/commonjs/carbon-style-sheet/g-object/typography.js +1 -1
  11. package/lib/commonjs/carbon-style-sheet/index.js +4 -13
  12. package/lib/commonjs/carbon-style-sheet/index.js.map +1 -1
  13. package/lib/module/carbon-style-sheet/color.js +172 -5
  14. package/lib/module/carbon-style-sheet/color.js.map +1 -1
  15. package/lib/module/carbon-style-sheet/create.js +58 -21
  16. package/lib/module/carbon-style-sheet/create.js.map +1 -1
  17. package/lib/module/carbon-style-sheet/g/font.js +1 -1
  18. package/lib/module/carbon-style-sheet/g/spacing.js +1 -1
  19. package/lib/module/carbon-style-sheet/g/typography.js +1 -1
  20. package/lib/module/carbon-style-sheet/g-object/font.js +1 -1
  21. package/lib/module/carbon-style-sheet/g-object/spacing.js +1 -1
  22. package/lib/module/carbon-style-sheet/g-object/typography.js +1 -1
  23. package/lib/module/carbon-style-sheet/index.js +2 -2
  24. package/lib/module/carbon-style-sheet/index.js.map +1 -1
  25. package/lib/typescript/commonjs/carbon-style-sheet/color.d.ts +169 -2
  26. package/lib/typescript/commonjs/carbon-style-sheet/color.d.ts.map +1 -1
  27. package/lib/typescript/commonjs/carbon-style-sheet/create.d.ts +3 -3
  28. package/lib/typescript/commonjs/carbon-style-sheet/create.d.ts.map +1 -1
  29. package/lib/typescript/commonjs/carbon-style-sheet/g/text.d.ts +16 -10
  30. package/lib/typescript/commonjs/carbon-style-sheet/g/text.d.ts.map +1 -1
  31. package/lib/typescript/commonjs/carbon-style-sheet/index.d.ts +2 -2
  32. package/lib/typescript/commonjs/carbon-style-sheet/index.d.ts.map +1 -1
  33. package/lib/typescript/module/carbon-style-sheet/color.d.ts +169 -2
  34. package/lib/typescript/module/carbon-style-sheet/color.d.ts.map +1 -1
  35. package/lib/typescript/module/carbon-style-sheet/create.d.ts +3 -3
  36. package/lib/typescript/module/carbon-style-sheet/create.d.ts.map +1 -1
  37. package/lib/typescript/module/carbon-style-sheet/g/text.d.ts +16 -10
  38. package/lib/typescript/module/carbon-style-sheet/g/text.d.ts.map +1 -1
  39. package/lib/typescript/module/carbon-style-sheet/index.d.ts +2 -2
  40. package/lib/typescript/module/carbon-style-sheet/index.d.ts.map +1 -1
  41. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +1 -1
  43. package/src/carbon-style-sheet/color.ts +171 -12
  44. package/src/carbon-style-sheet/create.ts +93 -53
  45. package/src/carbon-style-sheet/g/font.ts +1 -1
  46. package/src/carbon-style-sheet/g/spacing.ts +1 -1
  47. package/src/carbon-style-sheet/g/text.ts +10 -10
  48. package/src/carbon-style-sheet/g/typography.ts +1 -1
  49. package/src/carbon-style-sheet/g-object/font.ts +1 -1
  50. package/src/carbon-style-sheet/g-object/spacing.ts +1 -1
  51. package/src/carbon-style-sheet/g-object/text.ts +11 -11
  52. package/src/carbon-style-sheet/g-object/typography.ts +1 -1
  53. package/src/carbon-style-sheet/index.ts +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audira/carbon-react-native",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "license": "MIT",
5
5
  "homepage": "https://rakadoank.github.io/carbon-react-native",
6
6
  "repository": "https://github.com/RakaDoank/carbon-react-native",
@@ -1,13 +1,172 @@
1
- import {
2
- Color,
3
- type ColorToken,
4
- } from "@audira/carbon-react-native-elements"
1
+ // Generated
2
+ // Sun, 29 Mar 2026 10:05:23 GMT
5
3
 
6
- export const color =
7
- Object
8
- .keys(Color.Token.gray_10)
9
- .reduce<Record<ColorToken, ColorToken>>((acc, key) => {
10
- acc[key as ColorToken] = key as ColorToken
11
- return acc
12
- }, {
13
- } as Record<ColorToken, ColorToken>)
4
+ export const background = "#f4f4f4|#000000"
5
+ export const background_active = "rgba(141,141,141,0.5)|rgba(141,141,141,0.4)"
6
+ export const background_brand = "#0f62fe|#0f62fe"
7
+ export const background_hover = "rgba(141,141,141,0.12)|rgba(141,141,141,0.16)"
8
+ export const background_inverse = "#393939|#f4f4f4"
9
+ export const background_inverse_hover = "#474747|#e8e8e8"
10
+ export const background_selected = "rgba(141,141,141,0.2)|rgba(141,141,141,0.24)"
11
+ export const background_selected_hover = "rgba(141,141,141,0.32)|rgba(141,141,141,0.32)"
12
+ export const border_disabled = "#c6c6c6|rgba(141,141,141,0.5)"
13
+ export const border_interactive = "#0f62fe|#4589ff"
14
+ export const border_inverse = "#161616|#f4f4f4"
15
+ export const border_strong_01 = "#8d8d8d|#6f6f6f"
16
+ export const border_strong_02 = "#8d8d8d|#8d8d8d"
17
+ export const border_strong_03 = "#8d8d8d|#a8a8a8"
18
+ export const border_subtle_00 = "#c6c6c6|#393939"
19
+ export const border_subtle_01 = "#e0e0e0|#393939"
20
+ export const border_subtle_02 = "#c6c6c6|#525252"
21
+ export const border_subtle_03 = "#e0e0e0|#6f6f6f"
22
+ export const border_subtle_selected_01 = "#c6c6c6|#525252"
23
+ export const border_subtle_selected_02 = "#c6c6c6|#6f6f6f"
24
+ export const border_subtle_selected_03 = "#c6c6c6|#8d8d8d"
25
+ export const border_tile_01 = "#a8a8a8|#525252"
26
+ export const border_tile_02 = "#c6c6c6|#6f6f6f"
27
+ export const border_tile_03 = "#a8a8a8|#8d8d8d"
28
+ export const button_danger_active = "#750e13|#750e13"
29
+ export const button_danger_hover = "#b81922|#b81922"
30
+ export const button_danger_primary = "#da1e28|#da1e28"
31
+ export const button_danger_secondary = "#da1e28|#fa4d56"
32
+ export const button_disabled = "#c6c6c6|#525252"
33
+ export const button_primary = "#0f62fe|#0f62fe"
34
+ export const button_primary_active = "#002d9c|#002d9c"
35
+ export const button_primary_hover = "#0050e6|#0050e6"
36
+ export const button_secondary = "#393939|#6f6f6f"
37
+ export const button_secondary_active = "#6f6f6f|#393939"
38
+ export const button_secondary_hover = "#474747|#5e5e5e"
39
+ export const button_separator = "#e0e0e0|#161616"
40
+ export const button_tertiary = "#0f62fe|#ffffff"
41
+ export const button_tertiary_active = "#002d9c|#c6c6c6"
42
+ export const button_tertiary_hover = "#0050e6|#f4f4f4"
43
+ export const field_01 = "#ffffff|#262626"
44
+ export const field_02 = "#f4f4f4|#393939"
45
+ export const field_03 = "#ffffff|#525252"
46
+ export const field_hover_01 = "#e8e8e8|#333333"
47
+ export const field_hover_02 = "#e8e8e8|#474747"
48
+ export const field_hover_03 = "#e8e8e8|#636363"
49
+ export const focus = "#0f62fe|#ffffff"
50
+ export const focus_inset = "#ffffff|#161616"
51
+ export const focus_inverse = "#ffffff|#0f62fe"
52
+ export const highlight = "#d0e2ff|#001d6c"
53
+ export const icon_disabled = "rgba(22,22,22,0.25)|rgba(244,244,244,0.25)"
54
+ export const icon_interactive = "#0f62fe|#ffffff"
55
+ export const icon_inverse = "#ffffff|#161616"
56
+ export const icon_on_color = "#ffffff|#ffffff"
57
+ export const icon_on_color_disabled = "#8d8d8d|rgba(255,255,255,0.25)"
58
+ export const icon_primary = "#161616|#f4f4f4"
59
+ export const icon_secondary = "#525252|#c6c6c6"
60
+ export const interactive = "#0f62fe|#4589ff"
61
+ export const layer_01 = "#ffffff|#262626"
62
+ export const layer_02 = "#f4f4f4|#393939"
63
+ export const layer_03 = "#ffffff|#525252"
64
+ export const layer_accent_01 = "#e0e0e0|#393939"
65
+ export const layer_accent_02 = "#e0e0e0|#525252"
66
+ export const layer_accent_03 = "#e0e0e0|#6f6f6f"
67
+ export const layer_accent_active_01 = "#a8a8a8|#525252"
68
+ export const layer_accent_active_02 = "#a8a8a8|#8d8d8d"
69
+ export const layer_accent_active_03 = "#a8a8a8|#393939"
70
+ export const layer_accent_hover_01 = "#d1d1d1|#474747"
71
+ export const layer_accent_hover_02 = "#d1d1d1|#636363"
72
+ export const layer_accent_hover_03 = "#d1d1d1|#5e5e5e"
73
+ export const layer_active_01 = "#c6c6c6|#525252"
74
+ export const layer_active_02 = "#c6c6c6|#6f6f6f"
75
+ export const layer_active_03 = "#c6c6c6|#8d8d8d"
76
+ export const layer_hover_01 = "#e8e8e8|#333333"
77
+ export const layer_hover_02 = "#e8e8e8|#474747"
78
+ export const layer_hover_03 = "#e8e8e8|#636363"
79
+ export const layer_selected_01 = "#e0e0e0|#393939"
80
+ export const layer_selected_02 = "#e0e0e0|#525252"
81
+ export const layer_selected_03 = "#e0e0e0|#6f6f6f"
82
+ export const layer_selected_disabled = "#8d8d8d|#6f6f6f"
83
+ export const layer_selected_hover_01 = "#d1d1d1|#474747"
84
+ export const layer_selected_hover_02 = "#d1d1d1|#636363"
85
+ export const layer_selected_hover_03 = "#d1d1d1|#5e5e5e"
86
+ export const layer_selected_inverse = "#161616|#f4f4f4"
87
+ export const link_inverse = "#78a9ff|#0f62fe"
88
+ export const link_inverse_active = "#f4f4f4|#161616"
89
+ export const link_inverse_hover = "#a6c8ff|#0043ce"
90
+ export const link_inverse_visited = "#be95ff|#8a3ffc"
91
+ export const link_primary = "#0f62fe|#78a9ff"
92
+ export const link_primary_hover = "#0043ce|#a6c8ff"
93
+ export const link_secondary = "#0043ce|#a6c8ff"
94
+ export const link_visited = "#8a3ffc|#be95ff"
95
+ export const notification_action_hover = "#ffffff|#333333"
96
+ export const notification_action_tertiary_inverse = "#ffffff|#0f62fe"
97
+ export const notification_action_tertiary_inverse_active = "#ffffff|#161616"
98
+ export const notification_action_tertiary_inverse_hover = "#c6c6c6|#002d9c"
99
+ export const notification_action_tertiary_inverse_text = "#161616|#ffffff"
100
+ export const notification_action_tertiary_inverse_text_on_color_disabled = "#ffffff|#ffffff"
101
+ export const notification_error_background = "#fff1f1|#262626"
102
+ export const notification_error_border = "rgba(218,30,40,0.3)|rgba(255,131,137,0.5)"
103
+ export const notification_info_background = "#edf5ff|#262626"
104
+ export const notification_info_border = "rgba(0,67,206,0.3)|rgba(69,137,255,0.5)"
105
+ export const notification_success_background = "#defbe6|#262626"
106
+ export const notification_success_border = "rgba(36,161,72,0.3)|rgba(66,190,101,0.5)"
107
+ export const notification_warning_background = "#fcf4d6|#262626"
108
+ export const notification_warning_border = "rgba(241,194,27,0.3)|rgba(178,134,0,0.5)"
109
+ export const overlay = "rgba(22,22,22,0.5)|rgba(22,22,22,0.7)"
110
+ export const skeleton_background = "#e8e8e8|#474747"
111
+ export const skeleton_element = "#c6c6c6|#525252"
112
+ export const support_caution_major = "#ff832b|#ff832b"
113
+ export const support_caution_minor = "#f1c21b|#f1c21b"
114
+ export const support_caution_undefined = "#8a3ffc|#a56eff"
115
+ export const support_error = "#da1e28|#fa4d56"
116
+ export const support_error_inverse = "#fa4d56|#da1e28"
117
+ export const support_info = "#0043ce|#4589ff"
118
+ export const support_info_inverse = "#4589ff|#0043ce"
119
+ export const support_success = "#24a148|#42be65"
120
+ export const support_success_inverse = "#42be65|#24a148"
121
+ export const support_warning = "#f1c21b|#f1c21b"
122
+ export const support_warning_inverse = "#f1c21b|#f1c21b"
123
+ export const tag_background_blue = "#d0e2ff|#0043ce"
124
+ export const tag_background_cool_gray = "#dde1e6|#4d5358"
125
+ export const tag_background_cyan = "#bae6ff|#00539a"
126
+ export const tag_background_gray = "#e0e0e0|#525252"
127
+ export const tag_background_green = "#a7f0ba|#0e6027"
128
+ export const tag_background_magenta = "#ffd6e8|#9f1853"
129
+ export const tag_background_purple = "#e8daff|#6929c4"
130
+ export const tag_background_red = "#ffd7d9|#a2191f"
131
+ export const tag_background_teal = "#9ef0f0|#005d5d"
132
+ export const tag_background_warm_gray = "#e5e0df|#565151"
133
+ export const tag_border_blue = "#78a9ff|#4589ff"
134
+ export const tag_border_cool_gray = "#a2a9b0|#878d96"
135
+ export const tag_border_cyan = "#33b1ff|#1192e8"
136
+ export const tag_border_gray = "#a8a8a8|#8d8d8d"
137
+ export const tag_border_green = "#42be65|#24a148"
138
+ export const tag_border_magenta = "#ff7eb6|#ee5396"
139
+ export const tag_border_purple = "#be95ff|#a56eff"
140
+ export const tag_border_red = "#ff8389|#fa4d56"
141
+ export const tag_border_teal = "#08bdba|#009d9a"
142
+ export const tag_border_warm_gray = "#ada8a8|#8f8b8b"
143
+ export const tag_color_blue = "#0043ce|#d0e2ff"
144
+ export const tag_color_cool_gray = "#121619|#dde1e6"
145
+ export const tag_color_cyan = "#00539a|#bae6ff"
146
+ export const tag_color_gray = "#161616|#e0e0e0"
147
+ export const tag_color_green = "#0e6027|#a7f0ba"
148
+ export const tag_color_magenta = "#9f1853|#ffd6e8"
149
+ export const tag_color_purple = "#6929c4|#e8daff"
150
+ export const tag_color_red = "#a2191f|#ffd7d9"
151
+ export const tag_color_teal = "#005d5d|#9ef0f0"
152
+ export const tag_color_warm_gray = "#171414|#e5e0df"
153
+ export const tag_hover_blue = "#b8d3ff|#0053ff"
154
+ export const tag_hover_cool_gray = "#cdd3da|#5d646a"
155
+ export const tag_hover_cyan = "#99daff|#0066bd"
156
+ export const tag_hover_gray = "#d1d1d1|#636363"
157
+ export const tag_hover_green = "#74e792|#11742f"
158
+ export const tag_hover_magenta = "#ffbdda|#bf1d63"
159
+ export const tag_hover_purple = "#dcc7ff|#7c3dd6"
160
+ export const tag_hover_red = "#ffc2c5|#c21e25"
161
+ export const tag_hover_teal = "#57e5e5|#007070"
162
+ export const tag_hover_warm_gray = "#d8d0cf|#696363"
163
+ export const text_disabled = "rgba(22,22,22,0.25)|rgba(244,244,244,0.25)"
164
+ export const text_error = "#da1e28|#ff8389"
165
+ export const text_helper = "#6f6f6f|#8d8d8d"
166
+ export const text_inverse = "#ffffff|#161616"
167
+ export const text_on_color = "#ffffff|#ffffff"
168
+ export const text_on_color_disabled = "#8d8d8d|rgba(255,255,255,0.25)"
169
+ export const text_placeholder = "#a8a8a8|#6f6f6f"
170
+ export const text_primary = "#161616|#f4f4f4"
171
+ export const text_secondary = "#525252|#c6c6c6"
172
+ export const toggle_off = "#8d8d8d|#6f6f6f"
@@ -5,10 +5,8 @@ import {
5
5
  type ViewStyle,
6
6
  } from "react-native"
7
7
 
8
- import {
9
- Color,
10
- type BreakpointToken,
11
- type ColorToken,
8
+ import type {
9
+ BreakpointToken,
12
10
  } from "@audira/carbon-react-native-elements"
13
11
 
14
12
  import {
@@ -25,17 +23,40 @@ import {
25
23
  } from "./breakpoint"
26
24
 
27
25
  type Style = ViewStyle | TextStyle | ImageStyle
26
+
28
27
  type StyleBreakpoint =
29
28
  Partial<
30
29
  Record<
31
30
  BreakpointToken,
32
31
  Omit<
33
32
  ViewStyle | TextStyle | ImageStyle,
34
- (typeof colorStyleProps)[number]
33
+ ColorStyleAttr
35
34
  >
36
35
  >
37
36
  >
38
37
 
38
+ type ColorStyleAttr = Extract<
39
+ (keyof ViewStyle) | (keyof TextStyle) | (keyof ImageStyle),
40
+ | "backgroundColor"
41
+ | "borderColor"
42
+ | "borderEndColor"
43
+ | "borderStartColor"
44
+ | "borderTopColor"
45
+ | "borderBottomColor"
46
+ | "borderLeftColor"
47
+ | "borderRightColor"
48
+ | "borderBlockColor"
49
+ | "borderBlockEndColor"
50
+ | "borderBlockStartColor"
51
+ | "color"
52
+ | "outlineColor"
53
+ | "overlayColor"
54
+ | "textDecorationColor"
55
+ | "textShadowColor"
56
+ | "tintColor"
57
+ | "shadowColor"
58
+ >
59
+
39
60
  /**
40
61
  * Create style sheet to help using color token of current color scheme and current breakpoint declaratively.
41
62
  * It makes your code way more shorter which doesn't need to create conditional of current color scheme or current breakpoint in the style prop implementation
@@ -79,7 +100,7 @@ export function create<Styles extends Record<string, Style | StyleBreakpoint> =
79
100
  normalStyle: Record<string, Style> =
80
101
  {},
81
102
 
82
- coloredStyle: Record<string, Style> =
103
+ carbonColoredStyle: Record<string, Partial<Record<ColorStyleAttr, string>>> =
83
104
  {},
84
105
 
85
106
  breakpointStyle: Record<string, Style> =
@@ -90,45 +111,62 @@ export function create<Styles extends Record<string, Style | StyleBreakpoint> =
90
111
  for(const name in styles) {
91
112
  const style = styles[name]
92
113
 
93
- for(const styleProp in style) {
94
- if((breakpointStyleProps as Record<string, string>)[styleProp]) {
114
+ for(const styleAttr in style) {
115
+ if((breakpointStyleProps as Record<string, string>)[styleAttr]) {
95
116
 
96
117
  containBreakpointStyle = true
97
- breakpointStyle[`${styleProp}${name}`] = (style as StyleBreakpoint)[styleProp] as Style
118
+ breakpointStyle[`${styleAttr}${name}`] = (style as StyleBreakpoint)[styleAttr] as Style
119
+
120
+ } else if(colorStyleAttrs[styleAttr as ColorStyleAttr]) {
121
+
122
+ // Resolve color string to the Carbon color (if any) for style prop or attribute that contain 'color'
123
+ // in the name like 'color', 'backgroundColor', 'borderColor', etc.,
124
+ // and the color value contains "|"
125
+ // If it does, it's a color token references that formatted in `gray_10|gray_100`
126
+
127
+ // For instance,
128
+ // if user want to modify `backgroundColor` with `CarbonStyleSheet.create` and using
129
+ // `CarbonStyleSheet.color.background`
130
+ // The `CarbonStyleSheet.color.background` itself is storing two color for gray_10 and gray_100
131
+ // in single string, which is `#f4f4f4|#000000`
132
+ // So we need to split them and make correct React Native StyleSheet
133
+ // with the same style attribute, for gray_10 and gray_100
98
134
 
99
- } else if(colorStyleProps.indexOf(styleProp as keyof Style) > -1) {
135
+ const colorStr = (style as Record<ColorStyleAttr, string>)[styleAttr as ColorStyleAttr]
100
136
 
101
137
  /**
102
- * Resolve color string to the Carbon color (if any) for style prop or attribute that contain 'color' in the name like 'color', 'backgroundColor', 'borderColor', etc
103
- * @see {@link colorStyleProps}
138
+ * It's color token references
139
+ *
140
+ * For instance,
141
+ * `#f4f4f4|#000000`. It's formatted in `gray_10|gray_100`.
104
142
  */
143
+ const carbonColorToken = colorStr.split("|")
105
144
 
106
- const
107
- coloredStyleName_G10 =
108
- `${prefixColorStyleName.gray_10}${name}`,
145
+ if(carbonColorToken.length > 1) {
146
+ const
147
+ coloredStyleName_G10 =
148
+ `${prefixColorStyleName.gray_10}${name}`,
109
149
 
110
- coloredStyleName_G100 =
111
- `${prefixColorStyleName.gray_100}${name}`
150
+ coloredStyleName_G100 =
151
+ `${prefixColorStyleName.gray_100}${name}`
112
152
 
113
- if(!coloredStyle[coloredStyleName_G10]) {
114
- coloredStyle[coloredStyleName_G10] = {
153
+ if(!carbonColoredStyle[coloredStyleName_G10]) {
154
+ carbonColoredStyle[coloredStyleName_G10] = {
155
+ }
115
156
  }
116
- }
117
- if(!coloredStyle[coloredStyleName_G100]) {
118
- coloredStyle[coloredStyleName_G100] = {
157
+ if(!carbonColoredStyle[coloredStyleName_G100]) {
158
+ carbonColoredStyle[coloredStyleName_G100] = {
159
+ }
119
160
  }
120
- }
121
-
122
- const colorStr = (style as Record<(typeof colorStyleProps)[number], string>)[styleProp as (typeof colorStyleProps)[number]]
123
161
 
124
- coloredStyle[coloredStyleName_G10][styleProp as keyof Style] =
125
- Color.Token.gray_10.all[colorStr as ColorToken] as never ||
126
- colorStr
162
+ const colorStyleAttr = styleAttr as ColorStyleAttr
127
163
 
128
- coloredStyle[coloredStyleName_G100][styleProp as keyof Style] =
129
- Color.Token.gray_100.all[colorStr as ColorToken] as never ||
130
- colorStr
164
+ carbonColoredStyle[coloredStyleName_G10][colorStyleAttr] =
165
+ carbonColorToken[0]
131
166
 
167
+ carbonColoredStyle[coloredStyleName_G100][colorStyleAttr] =
168
+ carbonColorToken[1]
169
+ }
132
170
  } else {
133
171
 
134
172
  normalStyle[name] = style as Style
@@ -142,7 +180,7 @@ export function create<Styles extends Record<string, Style | StyleBreakpoint> =
142
180
  StyleSheet.create<Record<string, Style>>(normalStyle),
143
181
 
144
182
  coloredStyleSheet =
145
- StyleSheet.create<Record<string, Style>>(coloredStyle),
183
+ StyleSheet.create<Record<string, Style>>(carbonColoredStyle),
146
184
 
147
185
  breakpointStyleSheet =
148
186
  StyleSheet.create<Record<string, Style>>(breakpointStyle)
@@ -181,27 +219,29 @@ export function create<Styles extends Record<string, Style | StyleBreakpoint> =
181
219
  }
182
220
 
183
221
  const
184
- colorStyleProps: ((keyof ViewStyle) | (keyof TextStyle) | (keyof ImageStyle))[] =
185
- [
186
- "backgroundColor",
187
- "borderColor",
188
- "borderEndColor",
189
- "borderStartColor",
190
- "borderTopColor",
191
- "borderBottomColor",
192
- "borderLeftColor",
193
- "borderRightColor",
194
- "borderBlockColor",
195
- "borderBlockEndColor",
196
- "borderBlockStartColor",
197
- "color",
198
- "outlineColor",
199
- "overlayColor",
200
- "textDecorationColor",
201
- "textShadowColor",
202
- "tintColor",
203
- "shadowColor",
204
- ] as const,
222
+ colorStyleAttrs =
223
+ {
224
+ backgroundColor: "backgroundColor",
225
+ borderColor: "borderColor",
226
+ borderEndColor: "borderEndColor",
227
+ borderStartColor: "borderStartColor",
228
+ borderTopColor: "borderTopColor",
229
+ borderBottomColor: "borderBottomColor",
230
+ borderLeftColor: "borderLeftColor",
231
+ borderRightColor: "borderRightColor",
232
+ borderBlockColor: "borderBlockColor",
233
+ borderBlockEndColor: "borderBlockEndColor",
234
+ borderBlockStartColor: "borderBlockStartColor",
235
+ color: "color",
236
+ outlineColor: "outlineColor",
237
+ overlayColor: "overlayColor",
238
+ textDecorationColor: "textDecorationColor",
239
+ textShadowColor: "textShadowColor",
240
+ tintColor: "tintColor",
241
+ shadowColor: "shadowColor",
242
+ } as const satisfies {
243
+ [Attr in ColorStyleAttr]: Attr
244
+ },
205
245
 
206
246
  prefixColorStyleName: Record<ThemeType.ColorScheme, string> =
207
247
  {
@@ -1,5 +1,5 @@
1
1
  // Generated
2
- // Fri, 13 Mar 2026 18:42:02 GMT
2
+ // Sun, 29 Mar 2026 10:05:23 GMT
3
3
 
4
4
  // To support cross platforms, we are mapping the `fontFamily` value to its PostScript name,
5
5
  // instead of the `fontWeight` number with a single font family name like in Web// Giving a `fontWeight` number will not work.
@@ -1,5 +1,5 @@
1
1
  // Generated
2
- // Fri, 13 Mar 2026 18:42:02 GMT
2
+ // Sun, 29 Mar 2026 10:05:23 GMT
3
3
 
4
4
  import {
5
5
  StyleSheet,
@@ -5,59 +5,59 @@ import {
5
5
  export const { text_center } = StyleSheet.create({
6
6
  text_center: {
7
7
  textAlign: "center",
8
- },
8
+ } as const,
9
9
  })
10
10
 
11
11
  export const { text_left } = StyleSheet.create({
12
12
  text_left: {
13
13
  textAlign: "left",
14
- },
14
+ } as const,
15
15
  })
16
16
 
17
17
  export const { text_right } = StyleSheet.create({
18
18
  text_right: {
19
19
  textAlign: "right",
20
- },
20
+ } as const,
21
21
  })
22
22
 
23
23
  export const { underline } = StyleSheet.create({
24
24
  underline: {
25
25
  textDecorationLine: "underline",
26
- },
26
+ } as const,
27
27
  })
28
28
 
29
29
  export const { line_through } = StyleSheet.create({
30
30
  line_through: {
31
31
  textDecorationLine: "line-through",
32
- },
32
+ } as const,
33
33
  })
34
34
 
35
35
  export const { no_underline } = StyleSheet.create({
36
36
  no_underline: {
37
37
  textDecorationLine: "none",
38
- },
38
+ } as const,
39
39
  })
40
40
 
41
41
  export const { align_auto } = StyleSheet.create({
42
42
  align_auto: {
43
43
  verticalAlign: "auto",
44
- },
44
+ } as const,
45
45
  })
46
46
 
47
47
  export const { align_top } = StyleSheet.create({
48
48
  align_top: {
49
49
  verticalAlign: "top",
50
- },
50
+ } as const,
51
51
  })
52
52
 
53
53
  export const { align_middle } = StyleSheet.create({
54
54
  align_middle: {
55
55
  verticalAlign: "middle",
56
- },
56
+ } as const,
57
57
  })
58
58
 
59
59
  export const { align_bottom } = StyleSheet.create({
60
60
  align_bottom: {
61
61
  verticalAlign: "bottom",
62
- },
62
+ } as const,
63
63
  })
@@ -1,5 +1,5 @@
1
1
  // Generated
2
- // Fri, 13 Mar 2026 18:42:02 GMT
2
+ // Sun, 29 Mar 2026 10:05:23 GMT
3
3
 
4
4
  import {
5
5
  StyleSheet,
@@ -1,5 +1,5 @@
1
1
  // Generated
2
- // Fri, 13 Mar 2026 18:42:02 GMT
2
+ // Sun, 29 Mar 2026 10:05:23 GMT
3
3
 
4
4
  // To support cross platforms, we are mapping the `fontFamily` value to its PostScript name,
5
5
  // instead of the `fontWeight` number with a single font family name like in Web// Giving a `fontWeight` number will not work.
@@ -1,5 +1,5 @@
1
1
  // Generated
2
- // Fri, 13 Mar 2026 18:42:02 GMT
2
+ // Sun, 29 Mar 2026 10:05:23 GMT
3
3
 
4
4
  import type {
5
5
  ViewStyle,
@@ -1,43 +1,43 @@
1
1
  import type {
2
- ViewStyle,
2
+ TextStyle,
3
3
  } from "react-native"
4
4
 
5
5
  export const text_center = {
6
6
  textAlign: "center",
7
- } as const satisfies ViewStyle
7
+ } as const satisfies TextStyle
8
8
 
9
9
  export const text_left = {
10
10
  textAlign: "left",
11
- } as const satisfies ViewStyle
11
+ } as const satisfies TextStyle
12
12
 
13
13
  export const text_right = {
14
14
  textAlign: "right",
15
- } as const satisfies ViewStyle
15
+ } as const satisfies TextStyle
16
16
 
17
17
  export const underline = {
18
18
  textDecorationLine: "underline",
19
- } as const satisfies ViewStyle
19
+ } as const satisfies TextStyle
20
20
 
21
21
  export const line_through = {
22
22
  textDecorationLine: "line-through",
23
- } as const satisfies ViewStyle
23
+ } as const satisfies TextStyle
24
24
 
25
25
  export const no_underline = {
26
26
  textDecorationLine: "none",
27
- } as const satisfies ViewStyle
27
+ } as const satisfies TextStyle
28
28
 
29
29
  export const align_auto = {
30
30
  verticalAlign: "auto",
31
- } as const satisfies ViewStyle
31
+ } as const satisfies TextStyle
32
32
 
33
33
  export const align_top = {
34
34
  verticalAlign: "top",
35
- } as const satisfies ViewStyle
35
+ } as const satisfies TextStyle
36
36
 
37
37
  export const align_middle = {
38
38
  verticalAlign: "middle",
39
- } as const satisfies ViewStyle
39
+ } as const satisfies TextStyle
40
40
 
41
41
  export const align_bottom = {
42
42
  verticalAlign: "bottom",
43
- } as const satisfies ViewStyle
43
+ } as const satisfies TextStyle
@@ -1,5 +1,5 @@
1
1
  // Generated
2
- // Fri, 13 Mar 2026 18:42:02 GMT
2
+ // Sun, 29 Mar 2026 10:05:23 GMT
3
3
 
4
4
  import type {
5
5
  TextStyle,
@@ -2,6 +2,8 @@ import {
2
2
  StyleSheet as RNStyleSheet,
3
3
  } from "react-native"
4
4
 
5
+ import * as color from "./color"
6
+
5
7
  import * as g from "./g"
6
8
  import * as gObject from "./g-object"
7
9
 
@@ -12,11 +14,11 @@ export const hairlineWidth = RNStyleSheet.hairlineWidth
12
14
  export const setStyleAttributePreprocessor = RNStyleSheet.setStyleAttributePreprocessor
13
15
 
14
16
  export {
17
+ color,
15
18
  g,
16
19
  gObject,
17
20
  }
18
21
 
19
22
  export * from "./breakpoint"
20
- export * from "./color"
21
23
  export * from "./create"
22
24
  export * from "./use"