@sincpro/mobile-ui 0.7.2 → 1.0.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.
Files changed (270) hide show
  1. package/README.md +7 -5
  2. package/dist/Actions/Actions.Button.d.ts +91 -91
  3. package/dist/Actions/Actions.Button.js +36 -43
  4. package/dist/Actions/Actions.FAB.js +5 -5
  5. package/dist/Actions/Actions.FilterButton.js +3 -3
  6. package/dist/Actions/Actions.IconButton.d.ts +31 -31
  7. package/dist/Actions/Actions.IconButton.js +4 -4
  8. package/dist/Actions/index.d.ts +11 -11
  9. package/dist/Actions/index.js +5 -5
  10. package/dist/Dialog/BottomSheet/BottomSheet.Root.js +1 -1
  11. package/dist/Dialog/BottomSheet/index.d.ts +1 -1
  12. package/dist/Dialog/BottomSheet/index.js +1 -1
  13. package/dist/Dialog/Confirmation.context.js +3 -3
  14. package/dist/Dialog/Dialog.ActionSheet.js +6 -6
  15. package/dist/Dialog/Dialog.Confirmation.js +4 -4
  16. package/dist/Dialog/Dialog.EditValue.js +4 -4
  17. package/dist/Dialog/Dialog.Sheet.js +6 -4
  18. package/dist/Dialog/index.d.ts +5 -5
  19. package/dist/Dialog/index.js +5 -5
  20. package/dist/Display/Display.Accordion.js +5 -5
  21. package/dist/Display/Display.Avatar.d.ts +30 -30
  22. package/dist/Display/Display.Avatar.js +2 -2
  23. package/dist/Display/Display.AvatarGroup.js +3 -3
  24. package/dist/Display/Display.Badge.d.ts +3 -3
  25. package/dist/Display/Display.Badge.js +1 -1
  26. package/dist/Display/Display.Card.d.ts +15 -15
  27. package/dist/Display/Display.Card.js +4 -4
  28. package/dist/Display/Display.Carousel.js +2 -2
  29. package/dist/Display/Display.Chip.d.ts +3 -3
  30. package/dist/Display/Display.Chip.js +12 -12
  31. package/dist/Display/Display.CircleButton.d.ts +1 -1
  32. package/dist/Display/Display.CircleButton.js +3 -3
  33. package/dist/Display/Display.CopyableText.js +2 -2
  34. package/dist/Display/Display.CountRecords.js +2 -2
  35. package/dist/Display/Display.DataTable.js +2 -2
  36. package/dist/Display/Display.Date.d.ts +1 -1
  37. package/dist/Display/Display.Date.js +5 -5
  38. package/dist/Display/Display.Divider.d.ts +24 -24
  39. package/dist/Display/Display.Divider.js +1 -1
  40. package/dist/Display/Display.GradientSurface.d.ts +58 -39
  41. package/dist/Display/Display.GradientSurface.js +31 -15
  42. package/dist/Display/Display.Icon.d.ts +1 -1
  43. package/dist/Display/Display.Icon.js +1 -1
  44. package/dist/Display/Display.IconBadge.js +3 -3
  45. package/dist/Display/Display.Image.js +4 -4
  46. package/dist/Display/Display.KeyValue.js +2 -2
  47. package/dist/Display/Display.ListItem.js +5 -5
  48. package/dist/Display/Display.Logo.d.ts +3 -3
  49. package/dist/Display/Display.Logo.js +2 -2
  50. package/dist/Display/Display.MediaCard.js +4 -4
  51. package/dist/Display/Display.MediaEmbed.js +7 -7
  52. package/dist/Display/Display.MenuButton.d.ts +4 -4
  53. package/dist/Display/Display.MenuButton.js +6 -6
  54. package/dist/Display/Display.MenuCard.d.ts +1 -1
  55. package/dist/Display/Display.MenuCard.js +3 -3
  56. package/dist/Display/Display.MenuGrid.d.ts +1 -1
  57. package/dist/Display/Display.MenuGrid.js +1 -1
  58. package/dist/Display/Display.Monetary.d.ts +1 -1
  59. package/dist/Display/Display.Monetary.js +2 -2
  60. package/dist/Display/Display.Pattern.d.ts +33 -12
  61. package/dist/Display/Display.Pattern.js +60 -14
  62. package/dist/Display/Display.PriceTag.js +2 -2
  63. package/dist/Display/Display.ProductCard.js +7 -7
  64. package/dist/Display/Display.Rating.js +3 -3
  65. package/dist/Display/Display.SearchHistory.js +6 -6
  66. package/dist/Display/Display.SectionHeader.js +4 -4
  67. package/dist/Display/Display.Stat.js +2 -2
  68. package/dist/Display/Display.StatCard.js +4 -4
  69. package/dist/Display/Display.StatusDot.js +3 -3
  70. package/dist/Display/Display.Story.js +3 -3
  71. package/dist/Display/Display.StoryTray.js +5 -5
  72. package/dist/Display/Display.StoryViewer.js +4 -4
  73. package/dist/Display/Display.SwipeableRow.js +4 -4
  74. package/dist/Display/Display.Tag.js +2 -2
  75. package/dist/Display/Display.Timeline.js +4 -4
  76. package/dist/Display/Display.Tooltip.js +3 -3
  77. package/dist/Display/index.d.ts +45 -45
  78. package/dist/Display/index.js +42 -42
  79. package/dist/Feedback/ErrorBoundary.d.ts +1 -1
  80. package/dist/Feedback/ErrorBoundary.js +1 -1
  81. package/dist/Feedback/Feedback.Banner.d.ts +3 -3
  82. package/dist/Feedback/Feedback.Banner.js +5 -5
  83. package/dist/Feedback/Feedback.DomainSplashScreen.js +5 -4
  84. package/dist/Feedback/Feedback.Empty.js +3 -3
  85. package/dist/Feedback/Feedback.EmptyState.js +5 -5
  86. package/dist/Feedback/Feedback.Error.js +4 -4
  87. package/dist/Feedback/Feedback.Loading.d.ts +1 -1
  88. package/dist/Feedback/Feedback.Loading.js +2 -2
  89. package/dist/Feedback/Feedback.PermissionCard.js +5 -5
  90. package/dist/Feedback/Feedback.Progress.js +2 -2
  91. package/dist/Feedback/Feedback.ProgressCircle.js +1 -1
  92. package/dist/Feedback/Feedback.Skeleton.js +2 -2
  93. package/dist/Feedback/Feedback.Spinner.js +3 -3
  94. package/dist/Feedback/Feedback.Splash.d.ts +1 -1
  95. package/dist/Feedback/Feedback.Splash.js +7 -6
  96. package/dist/Feedback/Toast.context.js +7 -7
  97. package/dist/Feedback/index.d.ts +13 -13
  98. package/dist/Feedback/index.js +13 -13
  99. package/dist/Form/Form.Button.d.ts +2 -2
  100. package/dist/Form/Form.Button.js +1 -1
  101. package/dist/Form/Form.Checkbox.js +4 -4
  102. package/dist/Form/Form.ControlledCheckbox.js +1 -1
  103. package/dist/Form/Form.ControlledInput.js +1 -1
  104. package/dist/Form/Form.ControlledMonetaryInput.js +1 -1
  105. package/dist/Form/Form.ControlledRadioButton.js +1 -1
  106. package/dist/Form/Form.DatePicker.js +5 -5
  107. package/dist/Form/Form.Dropdown.js +7 -7
  108. package/dist/Form/Form.FAB.d.ts +2 -2
  109. package/dist/Form/Form.FAB.js +1 -1
  110. package/dist/Form/Form.FilterButton.d.ts +2 -2
  111. package/dist/Form/Form.FilterButton.js +1 -1
  112. package/dist/Form/Form.FractionalQuantityInput.js +4 -4
  113. package/dist/Form/Form.IconButton.d.ts +2 -2
  114. package/dist/Form/Form.IconButton.js +1 -1
  115. package/dist/Form/Form.Input.js +4 -4
  116. package/dist/Form/Form.InputField.d.ts +1 -1
  117. package/dist/Form/Form.InputField.js +3 -3
  118. package/dist/Form/Form.MonetaryInput.js +5 -4
  119. package/dist/Form/Form.PasswordInput.d.ts +1 -1
  120. package/dist/Form/Form.PasswordInput.js +3 -3
  121. package/dist/Form/Form.PinInput.js +5 -5
  122. package/dist/Form/Form.QuantitySelector.js +3 -3
  123. package/dist/Form/Form.RadioButton.js +4 -4
  124. package/dist/Form/Form.SearchBar.js +4 -4
  125. package/dist/Form/Form.Select.js +6 -6
  126. package/dist/Form/Form.Slider.js +3 -3
  127. package/dist/Form/Form.Switch.js +4 -4
  128. package/dist/Form/Form.TextInput.js +3 -3
  129. package/dist/Form/index.d.ts +27 -27
  130. package/dist/Form/index.js +25 -25
  131. package/dist/Navigation/Navigation.AppBar.d.ts +5 -4
  132. package/dist/Navigation/Navigation.AppBar.js +10 -10
  133. package/dist/Navigation/Navigation.BottomNav.d.ts +1 -1
  134. package/dist/Navigation/Navigation.BottomNav.js +25 -16
  135. package/dist/Navigation/Navigation.CollapsingHeader.d.ts +1 -1
  136. package/dist/Navigation/Navigation.CollapsingHeader.js +3 -3
  137. package/dist/Navigation/Navigation.FloatingBar.js +2 -2
  138. package/dist/Navigation/Navigation.Header.js +6 -6
  139. package/dist/Navigation/Navigation.HeaderToolbar.js +5 -5
  140. package/dist/Navigation/Navigation.Menu.js +6 -6
  141. package/dist/Navigation/Navigation.MenuSection.js +2 -2
  142. package/dist/Navigation/Navigation.RowItem.d.ts +1 -1
  143. package/dist/Navigation/Navigation.RowItem.js +2 -2
  144. package/dist/Navigation/Navigation.SearchBar.js +6 -6
  145. package/dist/Navigation/Navigation.SegmentedControl.js +4 -4
  146. package/dist/Navigation/Navigation.Steps.js +5 -5
  147. package/dist/Navigation/Navigation.TabIcon.js +2 -2
  148. package/dist/Navigation/Navigation.TabItem.js +2 -2
  149. package/dist/Navigation/Navigation.Tabs.js +5 -5
  150. package/dist/Navigation/index.d.ts +19 -19
  151. package/dist/Navigation/index.js +15 -15
  152. package/dist/Typography/Typography.Heading.d.ts +1 -1
  153. package/dist/Typography/Typography.Heading.js +1 -1
  154. package/dist/Typography/Typography.Text.d.ts +2 -2
  155. package/dist/Typography/Typography.Text.js +8 -6
  156. package/dist/Typography/index.d.ts +2 -2
  157. package/dist/Typography/index.js +2 -2
  158. package/dist/branding.d.ts +22 -0
  159. package/dist/branding.js +20 -3
  160. package/dist/icons/AddItemIcon.d.ts +1 -1
  161. package/dist/icons/ArrangeCircle.d.ts +1 -1
  162. package/dist/icons/ArrowDownIcon.d.ts +1 -1
  163. package/dist/icons/ArrowUpIcon.d.ts +1 -1
  164. package/dist/icons/BoxIcon.d.ts +1 -1
  165. package/dist/icons/BoxTimeIcon.d.ts +1 -1
  166. package/dist/icons/CalendarIcon.d.ts +1 -1
  167. package/dist/icons/CardIcon.d.ts +1 -1
  168. package/dist/icons/CashierIcon.d.ts +1 -1
  169. package/dist/icons/DuoIcon.d.ts +1 -1
  170. package/dist/icons/HomeIcon.d.ts +1 -1
  171. package/dist/icons/HomeIconOutlined.d.ts +1 -1
  172. package/dist/icons/LogoIcon.d.ts +1 -1
  173. package/dist/icons/MoneyReceiveIcon.d.ts +1 -1
  174. package/dist/icons/PinIcon.d.ts +1 -1
  175. package/dist/icons/PrinterIcon.d.ts +1 -1
  176. package/dist/icons/ProfileIcon.d.ts +1 -1
  177. package/dist/icons/SettingsIcon.d.ts +1 -1
  178. package/dist/icons/SinpeIcon.d.ts +1 -1
  179. package/dist/icons/ToggleOffIcon.d.ts +1 -1
  180. package/dist/icons/WalletMoneyIcon.d.ts +1 -1
  181. package/dist/index.d.ts +24 -23
  182. package/dist/index.js +26 -24
  183. package/dist/layouts/AuthContainer.d.ts +5 -2
  184. package/dist/layouts/AuthContainer.js +6 -6
  185. package/dist/layouts/Container.js +1 -1
  186. package/dist/layouts/GradientContainer.js +1 -1
  187. package/dist/layouts/ScrollContainer.js +1 -1
  188. package/dist/layouts/TabNavigatorLayout.js +4 -4
  189. package/dist/primitives/AspectRatio.js +1 -1
  190. package/dist/primitives/BaseButton.d.ts +85 -85
  191. package/dist/primitives/BaseButton.js +34 -50
  192. package/dist/primitives/Box.js +1 -1
  193. package/dist/primitives/Pressable.js +1 -1
  194. package/dist/primitives/Row.js +1 -1
  195. package/dist/primitives/Stack.js +1 -1
  196. package/dist/primitives/index.d.ts +6 -6
  197. package/dist/primitives/index.js +6 -6
  198. package/dist/theme/active.d.ts +1 -1
  199. package/dist/theme/active.js +14 -1
  200. package/dist/theme/build.d.ts +33 -0
  201. package/dist/theme/build.js +118 -0
  202. package/dist/theme/color.d.ts +26 -0
  203. package/dist/theme/color.js +109 -0
  204. package/dist/theme/components/index.d.ts +1 -1
  205. package/dist/theme/components/index.js +1 -1
  206. package/dist/theme/contrast.d.ts +29 -0
  207. package/dist/theme/contrast.js +57 -0
  208. package/dist/theme/css-vars.d.ts +3 -1
  209. package/dist/theme/css-vars.js +29 -3
  210. package/dist/theme/dark.d.ts +3 -4
  211. package/dist/theme/dark.js +91 -48
  212. package/dist/theme/default.d.ts +5 -1
  213. package/dist/theme/default.js +89 -41
  214. package/dist/theme/define.d.ts +4 -1
  215. package/dist/theme/define.js +4 -1
  216. package/dist/theme/globals.css +61 -46
  217. package/dist/theme/index.d.ts +14 -10
  218. package/dist/theme/index.js +13 -9
  219. package/dist/theme/theme.d.ts +1 -1
  220. package/dist/theme/theme.js +2 -2
  221. package/dist/theme/types.d.ts +77 -16
  222. package/dist/theme/types.js +13 -3
  223. package/dist/theme/typography.d.ts +4 -4
  224. package/dist/theme/typography.js +26 -28
  225. package/dist/theme/useTheme.d.ts +1 -1
  226. package/dist/theme/useTheme.js +1 -1
  227. package/dist/theme/validate.d.ts +16 -0
  228. package/dist/theme/validate.js +200 -0
  229. package/dist/tokens/index.d.ts +2 -2
  230. package/dist/tokens/index.js +2 -2
  231. package/dist/views/AppSplashView.d.ts +2 -2
  232. package/dist/views/AppSplashView.js +3 -3
  233. package/dist/views/AuthFormView.d.ts +1 -1
  234. package/dist/views/AuthFormView.js +3 -3
  235. package/dist/views/FormViewV2.d.ts +2 -2
  236. package/dist/views/FormViewV2.js +9 -9
  237. package/dist/views/ListViewV2.d.ts +3 -3
  238. package/dist/views/ListViewV2.js +16 -16
  239. package/dist/views/Wizard/Wizard.context.js +1 -1
  240. package/dist/views/Wizard/Wizard.d.ts +1 -1
  241. package/dist/views/Wizard/Wizard.js +1 -1
  242. package/dist/views/Wizard/index.d.ts +4 -4
  243. package/dist/views/Wizard/index.js +2 -2
  244. package/dist/views/types/IFormView.d.ts +1 -1
  245. package/dist/views/types/IListView.d.ts +1 -1
  246. package/dist/widgets/CircleButton.d.ts +2 -2
  247. package/dist/widgets/CircleButton.js +1 -1
  248. package/dist/widgets/GeoPermissionCard.js +3 -3
  249. package/dist/widgets/HomeHeader.js +3 -3
  250. package/dist/widgets/JSONViewer.js +2 -2
  251. package/dist/widgets/MenuCard.d.ts +2 -2
  252. package/dist/widgets/MenuCard.js +1 -1
  253. package/dist/widgets/MenuGrid.d.ts +3 -3
  254. package/dist/widgets/MenuGrid.js +1 -1
  255. package/dist/widgets/MenuSection.d.ts +2 -2
  256. package/dist/widgets/MenuSection.js +1 -1
  257. package/dist/widgets/PromoBanner.js +3 -3
  258. package/dist/widgets/PromoModal.js +3 -3
  259. package/dist/widgets/QuickActions.js +3 -3
  260. package/dist/widgets/ScreenHeader.js +2 -2
  261. package/dist/widgets/TimeZoneSelector.d.ts +1 -1
  262. package/dist/widgets/TimeZoneSelector.js +4 -4
  263. package/dist/widgets/TimeZoneSelectorModal.d.ts +1 -1
  264. package/dist/widgets/TimeZoneSelectorModal.js +5 -5
  265. package/dist/widgets/index.d.ts +16 -16
  266. package/dist/widgets/index.js +10 -10
  267. package/package.json +56 -50
  268. package/tailwind.preset.js +19 -0
  269. package/dist/icons/icon_getters.d.ts +0 -6
  270. package/dist/icons/icon_getters.js +0 -23
@@ -1,67 +1,82 @@
1
- /**
2
- * AUTO-GENERATED from apk/domains/index.ts
3
- * Active Domain: distribution
4
- */
5
-
6
1
  @tailwind base;
7
2
  @tailwind components;
8
3
  @tailwind utilities;
9
4
 
10
5
  :root {
11
- /* Primary Colors */
12
- --primary: 37 99 235;
13
- --secondary: 107 114 128;
14
- --accent: 249 115 22;
6
+ /* Fallback CSS vars — runtime source of truth is themeToVars(activeTheme). */
7
+ --primary: 42 74 133;
8
+ --secondary: 28 55 101;
9
+ --accent: 200 155 60;
15
10
 
16
- /* Backgrounds */
17
- --bg-page: 249 250 251;
11
+ --bg-page: 250 249 247;
18
12
  --bg-card: 255 255 255;
19
13
  --bg-popover: 255 255 255;
20
- --bg-muted: 243 244 246;
21
- --bg-accent: 219 234 254;
22
- --bg-hover: 243 244 246;
23
- --bg-disabled: 249 250 251;
14
+ --bg-muted: 243 240 234;
15
+ --bg-accent: 232 236 245;
16
+ --bg-hover: 235 230 222;
17
+ --bg-disabled: 228 223 215;
18
+ --bg-container-lowest: 250 249 247;
19
+ --bg-container: 243 240 234;
20
+ --bg-container-high: 228 223 215;
24
21
 
25
- /* Text */
26
- --text-primary: 17 24 39;
27
- --text-secondary: 107 114 128;
28
- --text-tertiary: 156 163 175;
29
- --text-muted: 107 114 128;
30
- --text-accent: 30 64 175;
22
+ --text-primary: 26 23 20;
23
+ --text-secondary: 107 100 89;
24
+ --text-tertiary: 163 155 144;
25
+ --text-muted: 107 100 89;
26
+ --text-accent: 42 74 133;
31
27
  --text-inverse: 255 255 255;
32
- --text-disabled: 209 213 219;
28
+ --text-disabled: 163 155 144;
33
29
  --text-on-primary: 255 255 255;
34
30
  --text-on-secondary: 255 255 255;
35
- --text-on-accent: 255 255 255;
31
+ --text-on-accent: 26 23 20;
36
32
  --text-on-danger: 255 255 255;
37
33
  --text-on-success: 255 255 255;
38
34
 
39
- /* Icons */
40
- --icon-primary: 17 24 39;
41
- --icon-secondary: 107 114 128;
42
- --icon-tertiary: 156 163 175;
35
+ --icon-primary: 26 23 20;
36
+ --icon-secondary: 107 100 89;
37
+ --icon-tertiary: 163 155 144;
43
38
  --icon-inverse: 255 255 255;
44
- --icon-disabled: 209 213 219;
39
+ --icon-disabled: 163 155 144;
40
+
41
+ --border-default: 228 223 215;
42
+ --border-light: 243 240 234;
43
+ --border-strong: 213 206 194;
44
+ --border-focus: 42 74 133;
45
+
46
+ --ring: 42 74 133;
47
+ --input: 228 223 215;
48
+
49
+ --success: 47 107 60;
50
+ --warning: 126 94 18;
51
+ --danger: 155 59 48;
52
+ --info: 15 92 110;
45
53
 
46
- /* Borders */
47
- --border-default: 229 231 235;
48
- --border-light: 243 244 246;
49
- --border-strong: 209 213 219;
50
- --border-focus: 37 99 235;
54
+ --success-light: 232 240 234;
55
+ --warning-light: 245 236 214;
56
+ --danger-light: 246 232 229;
57
+ --info-light: 226 238 241;
51
58
 
52
- /* Focus & Input */
53
- --ring: 37 99 235;
54
- --input: 229 231 235;
59
+ --container-primary: 232 236 245;
60
+ --container-on-primary: 28 55 101;
61
+ --container-secondary: 226 232 242;
62
+ --container-on-secondary: 26 23 20;
63
+ --container-accent: 248 240 220;
64
+ --container-on-accent: 26 23 20;
65
+ --container-success: 232 240 234;
66
+ --container-on-success: 47 107 60;
67
+ --container-warning: 245 236 214;
68
+ --container-on-warning: 126 94 18;
69
+ --container-danger: 246 232 229;
70
+ --container-on-danger: 155 59 48;
71
+ --container-info: 226 238 241;
72
+ --container-on-info: 15 92 110;
55
73
 
56
- /* Semantic */
57
- --success: 16 185 129;
58
- --warning: 249 115 22;
59
- --danger: 239 68 68;
60
- --info: 37 99 235;
74
+ --state-hover: 0.08;
75
+ --state-press: 0.12;
76
+ --state-focus: 0.12;
77
+ --state-drag: 0.16;
61
78
 
62
- /* Semantic Light */
63
- --success-light: 209 250 229;
64
- --warning-light: 255 237 213;
65
- --danger-light: 254 226 226;
66
- --info-light: 219 234 254;
79
+ --material-blur: 24;
80
+ --material-opacity: 0.78;
81
+ --material-border-opacity: 0.18;
67
82
  }
@@ -1,10 +1,14 @@
1
- export { getActiveTheme, setActiveTheme, subscribeTheme, } from "../theme/active";
2
- export { ThemedActivityIndicator } from "../theme/components";
3
- export { themeToVars } from "../theme/css-vars";
4
- export { DEFAULT_DARK_THEME } from "../theme/dark";
5
- export { DEFAULT_THEME } from "../theme/default";
6
- export { type DeepPartial, defineTheme, extendTheme, mergeTheme, } from "../theme/define";
7
- export { theme } from "../theme/theme";
8
- export type { ShadowStyle, ThemeTokens } from "../theme/types";
9
- export { configureFonts, fontFamilies, type FontRole, resetFonts, useAppFonts, variantFontRole, } from "../theme/typography";
10
- export { useTheme } from "../theme/useTheme";
1
+ export { getActiveTheme, setActiveTheme, subscribeTheme, } from "./active.js";
2
+ export { type BrandThemeMode, buildThemeFromBrand, type BuildThemeFromBrandOptions, } from "./build.js";
3
+ export { containerPair, hexToHsl, hexToRgb, type Hsl, hslToHex, mixHex, rgbToHex, shiftLightness, } from "./color.js";
4
+ export { ThemedActivityIndicator } from "./components/index.js";
5
+ export { contrastRatio, relativeLuminance, resolveOnColor, type ResolveOnColorOptions, } from "./contrast.js";
6
+ export { themeToVars } from "./css-vars.js";
7
+ export { DEFAULT_DARK_THEME } from "./dark.js";
8
+ export { DEFAULT_THEME } from "./default.js";
9
+ export { type DeepPartial, defineTheme, extendTheme, mergeTheme, } from "./define.js";
10
+ export { theme } from "./theme.js";
11
+ export type { PatternMode, ShadowStyle, ThemeTokens } from "./types.js";
12
+ export { configureFonts, fontFamilies, type FontRole, resetFonts, useAppFonts, variantFontRole, } from "./typography.js";
13
+ export { useTheme } from "./useTheme.js";
14
+ export { validateTheme } from "./validate.js";
@@ -1,9 +1,13 @@
1
- export { getActiveTheme, setActiveTheme, subscribeTheme, } from "../theme/active";
2
- export { ThemedActivityIndicator } from "../theme/components";
3
- export { themeToVars } from "../theme/css-vars";
4
- export { DEFAULT_DARK_THEME } from "../theme/dark";
5
- export { DEFAULT_THEME } from "../theme/default";
6
- export { defineTheme, extendTheme, mergeTheme, } from "../theme/define";
7
- export { theme } from "../theme/theme";
8
- export { configureFonts, fontFamilies, resetFonts, useAppFonts, variantFontRole, } from "../theme/typography";
9
- export { useTheme } from "../theme/useTheme";
1
+ export { getActiveTheme, setActiveTheme, subscribeTheme, } from "./active.js";
2
+ export { buildThemeFromBrand, } from "./build.js";
3
+ export { containerPair, hexToHsl, hexToRgb, hslToHex, mixHex, rgbToHex, shiftLightness, } from "./color.js";
4
+ export { ThemedActivityIndicator } from "./components/index.js";
5
+ export { contrastRatio, relativeLuminance, resolveOnColor, } from "./contrast.js";
6
+ export { themeToVars } from "./css-vars.js";
7
+ export { DEFAULT_DARK_THEME } from "./dark.js";
8
+ export { DEFAULT_THEME } from "./default.js";
9
+ export { defineTheme, extendTheme, mergeTheme, } from "./define.js";
10
+ export { theme } from "./theme.js";
11
+ export { configureFonts, fontFamilies, resetFonts, useAppFonts, variantFontRole, } from "./typography.js";
12
+ export { useTheme } from "./useTheme.js";
13
+ export { validateTheme } from "./validate.js";
@@ -7,7 +7,7 @@
7
7
  * SOLO usar cuando className no es suficiente (RefreshControl, placeholderColor, etc.)
8
8
  *
9
9
  * @example
10
- * import { theme } from "../theme";
10
+ * import { theme } from "./index.js";
11
11
  * const color = theme.primary;
12
12
  */
13
13
  export declare const theme: import("./types").ThemeTokens;
@@ -7,8 +7,8 @@
7
7
  * SOLO usar cuando className no es suficiente (RefreshControl, placeholderColor, etc.)
8
8
  *
9
9
  * @example
10
- * import { theme } from "../theme";
10
+ * import { theme } from "./index.js";
11
11
  * const color = theme.primary;
12
12
  */
13
- import { getActiveTheme } from "../theme/active";
13
+ import { getActiveTheme } from "./active.js";
14
14
  export const theme = getActiveTheme();
@@ -1,11 +1,22 @@
1
1
  /**
2
2
  * ============================================================================
3
- * THEME SYSTEM - SIMPLE & SEMANTIC
3
+ * THEME SYSTEM — semantic + container (M3-era) tokens
4
4
  * ============================================================================
5
5
  *
6
- * Simplified theming system without hooks or context.
7
- * Tokens are read directly from the active theme.
6
+ * Layers (framework contract, mid-2026):
7
+ * 1. Semantic fills — `primary` / `accent` / `secondary` / state hues (chrome, CTAs).
8
+ * 2. Containers — soft tonal surfaces + `on*` ink (badges, chips, tonal buttons).
9
+ * 3. Surfaces — `bg.*` including tonal `containerLowest|container|containerHigh`.
10
+ * 4. State layers — opacity overlays for press/hover/focus (Material state layers).
11
+ * 5. Material — nav-chrome hints for Liquid Glass / blur peers (optional usage).
12
+ *
13
+ * Color roles:
14
+ * - Fills/borders/tracks → `primary` / `accent` (never body text).
15
+ * - Brand text/links → `text.accent` (AA on `bg.page` / `bg.card`).
16
+ * - Ink on filled brand → `text.onPrimary` via `resolveOnColor`.
17
+ * - Ink on soft containers → `container.onPrimary` / `container.onSuccess` / …
8
18
  */
19
+ import type { ImageSourcePropType } from "react-native";
9
20
  export interface ShadowStyle {
10
21
  shadowColor: string;
11
22
  shadowOffset: {
@@ -17,15 +28,13 @@ export interface ShadowStyle {
17
28
  elevation: number;
18
29
  }
19
30
  export interface ThemeTokens {
20
- /** Theme name */
21
31
  name: string;
22
- /** Primary color - main buttons, links, active states */
32
+ /** Primary fill — CTA surfaces, active tracks, decorative borders. Not for body text. */
23
33
  primary: string;
24
- /** Secondary color - secondary buttons, low-profile elements (gray) */
34
+ /** Secondary fill — low-profile surfaces and secondary actions. */
25
35
  secondary: string;
26
- /** Accent color - highlights, important badges, secondary CTAs (orange/indigo) */
36
+ /** Accent fill — highlights, secondary CTAs, decorative chrome. Not for body text. */
27
37
  accent: string;
28
- /** Backgrounds */
29
38
  bg: {
30
39
  page: string;
31
40
  card: string;
@@ -34,9 +43,16 @@ export interface ThemeTokens {
34
43
  accent: string;
35
44
  hover: string;
36
45
  disabled: string;
46
+ /** Opposite / hero surface (AppBar tone="dark"). Light themes: dark; dark themes: light. */
37
47
  inverse?: string;
48
+ /**
49
+ * Tonal elevation ladder (M3 surfaceContainer*). Prefer these over stacking
50
+ * shadows for hierarchy on mobile.
51
+ */
52
+ containerLowest: string;
53
+ container: string;
54
+ containerHigh: string;
38
55
  };
39
- /** Text */
40
56
  text: {
41
57
  primary: string;
42
58
  secondary: string;
@@ -51,7 +67,6 @@ export interface ThemeTokens {
51
67
  onDanger: string;
52
68
  onSuccess: string;
53
69
  };
54
- /** Icons */
55
70
  icon: {
56
71
  primary: string;
57
72
  secondary: string;
@@ -59,35 +74,81 @@ export interface ThemeTokens {
59
74
  inverse: string;
60
75
  disabled: string;
61
76
  };
62
- /** Borders */
63
77
  border: {
64
78
  default: string;
65
79
  light: string;
66
80
  strong: string;
67
81
  focus: string;
68
82
  };
69
- /** Semantic states */
70
83
  success: string;
71
84
  warning: string;
72
85
  danger: string;
73
86
  info: string;
74
- /** Semantic states - light variants */
87
+ /**
88
+ * @deprecated Prefer `container.success`. Kept for NativeWind `bg-success-light`
89
+ * back-compat; defaults stay in sync with container fills.
90
+ */
75
91
  successLight: string;
92
+ /** @deprecated Prefer `container.warning`. */
76
93
  warningLight: string;
94
+ /** @deprecated Prefer `container.danger`. */
77
95
  dangerLight: string;
96
+ /** @deprecated Prefer `container.info`. */
78
97
  infoLight: string;
79
- /** Focus & Input */
98
+ /**
99
+ * Soft tonal fills + on-colors — badges, chips, tonal CTAs, selected rows.
100
+ * Prefer these over saturated `success` + white for body-sized labels.
101
+ */
102
+ container: {
103
+ primary: string;
104
+ onPrimary: string;
105
+ secondary: string;
106
+ onSecondary: string;
107
+ accent: string;
108
+ onAccent: string;
109
+ success: string;
110
+ onSuccess: string;
111
+ warning: string;
112
+ onWarning: string;
113
+ danger: string;
114
+ onDanger: string;
115
+ info: string;
116
+ onInfo: string;
117
+ };
118
+ /**
119
+ * State-layer opacities (Material 3). Overlay brand/on-surface at this alpha
120
+ * for press/hover/focus — do not invent per-component opacities.
121
+ */
122
+ state: {
123
+ hover: number;
124
+ press: number;
125
+ focus: number;
126
+ drag: number;
127
+ };
128
+ /**
129
+ * Nav-chrome material hints (iOS Liquid Glass / frosted bars). Opt-in peers
130
+ * (`expo-glass-effect`) read these; content layers stay solid `bg.*`.
131
+ */
132
+ material: {
133
+ blur: number;
134
+ opacity: number;
135
+ borderOpacity: number;
136
+ };
80
137
  ring: string;
81
138
  input: string;
82
- /** Gradients (for LinearGradient) */
83
139
  gradient: {
84
140
  primary: readonly [string, string];
85
141
  accent: readonly [string, string];
86
142
  };
87
- /** Shadows (React Native) */
88
143
  shadow: {
89
144
  sm: ShadowStyle;
90
145
  md: ShadowStyle;
91
146
  lg: ShadowStyle;
92
147
  };
148
+ pattern?: {
149
+ mode: PatternMode;
150
+ size: number;
151
+ source?: ImageSourcePropType;
152
+ };
93
153
  }
154
+ export type PatternMode = "light-pattern" | "dark-pattern" | "dark-full";
@@ -1,9 +1,19 @@
1
1
  /**
2
2
  * ============================================================================
3
- * THEME SYSTEM - SIMPLE & SEMANTIC
3
+ * THEME SYSTEM — semantic + container (M3-era) tokens
4
4
  * ============================================================================
5
5
  *
6
- * Simplified theming system without hooks or context.
7
- * Tokens are read directly from the active theme.
6
+ * Layers (framework contract, mid-2026):
7
+ * 1. Semantic fills — `primary` / `accent` / `secondary` / state hues (chrome, CTAs).
8
+ * 2. Containers — soft tonal surfaces + `on*` ink (badges, chips, tonal buttons).
9
+ * 3. Surfaces — `bg.*` including tonal `containerLowest|container|containerHigh`.
10
+ * 4. State layers — opacity overlays for press/hover/focus (Material state layers).
11
+ * 5. Material — nav-chrome hints for Liquid Glass / blur peers (optional usage).
12
+ *
13
+ * Color roles:
14
+ * - Fills/borders/tracks → `primary` / `accent` (never body text).
15
+ * - Brand text/links → `text.accent` (AA on `bg.page` / `bg.card`).
16
+ * - Ink on filled brand → `text.onPrimary` via `resolveOnColor`.
17
+ * - Ink on soft containers → `container.onPrimary` / `container.onSuccess` / …
8
18
  */
9
19
  export {};
@@ -1,14 +1,14 @@
1
- import { useFonts } from "@expo-google-fonts/inter";
1
+ import { useFonts } from "@expo-google-fonts/ibm-plex-sans";
2
2
  import type { TextStyle } from "react-native";
3
3
  export type FontRole = "light" | "regular" | "medium" | "semiBold" | "extraBold" | "mono" | "monoMedium" | "titleRegular" | "titleMedium" | "title" | "titleBlack";
4
4
  export declare const fontFamilies: Record<FontRole, string>;
5
5
  /**
6
6
  * Override DS font family names (role → already-loaded family name).
7
7
  * Mutates the singleton in-place so components pick up the change at render time.
8
- * Example: `configureFonts({ title: "Satoshi-Bold", titleBlack: "Satoshi-Black" })`.
8
+ * Example: `configureFonts({ title: "YourBrandTitle-Bold", titleBlack: "YourBrandDisplay-Black" })`.
9
9
  */
10
10
  export declare function configureFonts(overrides: Partial<Record<FontRole, string>>): void;
11
- /** Reset all font roles to the defaults (Inter + Fira Code). Useful in tests and stories. */
11
+ /** Reset all font roles to the defaults (IBM Plex Sans + IBM Plex Mono). Useful in tests and stories. */
12
12
  export declare function resetFonts(): void;
13
13
  export declare const fontWeights: {
14
14
  readonly light: "300";
@@ -421,7 +421,7 @@ export declare const Typography: {
421
421
  readonly letterSpacing: 0;
422
422
  };
423
423
  };
424
- readonly variantFontRole: Record<"button" | "title" | "display" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "bodyLarge" | "body" | "bodySmall" | "label" | "labelSmall" | "data" | "dataLarge" | "overline" | "caption" | "captionSmall" | "buttonSmall" | "buttonLarge" | "subtitle", FontRole>;
424
+ readonly variantFontRole: Record<"label" | "button" | "title" | "display" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "bodyLarge" | "body" | "bodySmall" | "labelSmall" | "data" | "dataLarge" | "overline" | "caption" | "captionSmall" | "buttonSmall" | "buttonLarge" | "subtitle", FontRole>;
425
425
  readonly createTextStyle: (variant: keyof typeof typographyVariants, overrides?: Partial<TextStyle>) => TextStyle;
426
426
  readonly createCustomTextStyle: (fontSize: keyof typeof fontSizes, fontFamily: keyof typeof fontFamilies, options?: {
427
427
  lineHeight?: keyof typeof lineHeights;
@@ -1,29 +1,28 @@
1
- import { FiraCode_400Regular, FiraCode_500Medium } from "@expo-google-fonts/fira-code";
2
- import { Inter_300Light, Inter_400Regular, Inter_500Medium, Inter_600SemiBold, Inter_800ExtraBold, useFonts, } from "@expo-google-fonts/inter";
1
+ import { IBMPlexMono_400Regular, IBMPlexMono_500Medium, } from "@expo-google-fonts/ibm-plex-mono";
2
+ import { IBMPlexSans_300Light, IBMPlexSans_400Regular, IBMPlexSans_500Medium, IBMPlexSans_600SemiBold, IBMPlexSans_700Bold, useFonts, } from "@expo-google-fonts/ibm-plex-sans";
3
3
  const DEFAULT_FONT_FAMILIES = {
4
- light: "Inter_300Light",
5
- regular: "Inter_400Regular",
6
- medium: "Inter_500Medium",
7
- semiBold: "Inter_600SemiBold",
8
- extraBold: "Inter_800ExtraBold",
9
- mono: "FiraCode_400Regular",
10
- monoMedium: "FiraCode_500Medium",
11
- // Title roles default to Inter until the app wires its brand typeface via configureFonts.
12
- titleRegular: "Inter_400Regular",
13
- titleMedium: "Inter_500Medium",
14
- title: "Inter_600SemiBold",
15
- titleBlack: "Inter_800ExtraBold",
4
+ light: "IBMPlexSans_300Light",
5
+ regular: "IBMPlexSans_400Regular",
6
+ medium: "IBMPlexSans_500Medium",
7
+ semiBold: "IBMPlexSans_600SemiBold",
8
+ extraBold: "IBMPlexSans_700Bold",
9
+ mono: "IBMPlexMono_400Regular",
10
+ monoMedium: "IBMPlexMono_500Medium",
11
+ titleRegular: "IBMPlexSans_400Regular",
12
+ titleMedium: "IBMPlexSans_500Medium",
13
+ title: "IBMPlexSans_600SemiBold",
14
+ titleBlack: "IBMPlexSans_700Bold",
16
15
  };
17
16
  export const fontFamilies = { ...DEFAULT_FONT_FAMILIES };
18
17
  /**
19
18
  * Override DS font family names (role → already-loaded family name).
20
19
  * Mutates the singleton in-place so components pick up the change at render time.
21
- * Example: `configureFonts({ title: "Satoshi-Bold", titleBlack: "Satoshi-Black" })`.
20
+ * Example: `configureFonts({ title: "YourBrandTitle-Bold", titleBlack: "YourBrandDisplay-Black" })`.
22
21
  */
23
22
  export function configureFonts(overrides) {
24
23
  Object.assign(fontFamilies, overrides);
25
24
  }
26
- /** Reset all font roles to the defaults (Inter + Fira Code). Useful in tests and stories. */
25
+ /** Reset all font roles to the defaults (IBM Plex Sans + IBM Plex Mono). Useful in tests and stories. */
27
26
  export function resetFonts() {
28
27
  Object.assign(fontFamilies, DEFAULT_FONT_FAMILIES);
29
28
  }
@@ -75,7 +74,7 @@ export const letterSpacing = {
75
74
  };
76
75
  /* -------------------- Typography Variants -------------------- */
77
76
  export const typographyVariants = {
78
- // Display (Satoshi Black — brand character)
77
+ // Display (titleBlack role — typically the brand display typeface)
79
78
  display: {
80
79
  fontSize: fontSizes["7xl"],
81
80
  fontFamily: fontFamilies.titleBlack,
@@ -83,7 +82,7 @@ export const typographyVariants = {
83
82
  lineHeight: fontSizes["7xl"] * lineHeights.tight,
84
83
  letterSpacing: letterSpacing.tight,
85
84
  },
86
- // Headings (Satoshi Bold)
85
+ // Headings (title role)
87
86
  h1: {
88
87
  fontSize: fontSizes["5xl"],
89
88
  fontFamily: fontFamilies.title,
@@ -290,18 +289,17 @@ export const createCustomTextStyle = (fontSize, fontFamily, options) => {
290
289
  * depending directly on expo-font — it's already a transitive dep via this package. */
291
290
  export { useFonts };
292
291
  /* -------------------- Font Loader (optional, convenience) ------------------
293
- * Loads the recommended base fonts (Inter + Fira Code) declared as peer deps.
294
- * The "title" role (e.g. Satoshi) is loaded and wired by the app/Storybook
295
- * via `configureFonts` — the DS never bundles font files. */
292
+ * Loads IBM Plex Sans and IBM Plex Mono, the same faces web UI uses.
293
+ * An app can still point a role at another loaded family with `configureFonts`. */
296
294
  export const useAppFonts = () => {
297
295
  const [loaded] = useFonts({
298
- FiraCode_400Regular,
299
- FiraCode_500Medium,
300
- Inter_300Light,
301
- Inter_400Regular,
302
- Inter_500Medium,
303
- Inter_600SemiBold,
304
- Inter_800ExtraBold,
296
+ IBMPlexMono_400Regular,
297
+ IBMPlexMono_500Medium,
298
+ IBMPlexSans_300Light,
299
+ IBMPlexSans_400Regular,
300
+ IBMPlexSans_500Medium,
301
+ IBMPlexSans_600SemiBold,
302
+ IBMPlexSans_700Bold,
305
303
  });
306
304
  return loaded;
307
305
  };
@@ -1,3 +1,3 @@
1
- import type { ThemeTokens } from "../theme/types";
1
+ import type { ThemeTokens } from "./types.js";
2
2
  export declare function useTheme(): ThemeTokens;
3
3
  export declare const theme: ThemeTokens;
@@ -1,4 +1,4 @@
1
- import { getActiveTheme, getThemeVersion, subscribeTheme, } from "../theme/active";
1
+ import { getActiveTheme, getThemeVersion, subscribeTheme, } from "./active.js";
2
2
  import { useSyncExternalStore } from "react";
3
3
  export function useTheme() {
4
4
  useSyncExternalStore(subscribeTheme, getThemeVersion, getThemeVersion);
@@ -0,0 +1,16 @@
1
+ import type { ThemeTokens } from "./types.js";
2
+ type Issue = {
3
+ path: string;
4
+ message: string;
5
+ };
6
+ /**
7
+ * Lightweight sanity checks on a theme. Returns a list of issues; empty array means OK.
8
+ * Not a hard validator — we don't want to over-constrain creative themes — just guards
9
+ * against the common silent failures (typos in hex, negative sizes, missing primary,
10
+ * WCAG P0 contrast violations on the key on-color pairs, semantic token collisions).
11
+ *
12
+ * Triggered automatically by `setActiveTheme` in dev mode (skipped under Node, since
13
+ * tests intentionally pass partial themes). Can also be called directly.
14
+ */
15
+ export declare function validateTheme(theme: Partial<ThemeTokens>): Issue[];
16
+ export {};