@selfhelp/shared 1.14.6 → 1.14.7

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
@@ -9,6 +9,20 @@ All notable changes to `@selfhelp/shared` will be documented in this file.
9
9
 
10
10
  This project follows semantic versioning.
11
11
 
12
+ ## v1.14.7
13
+
14
+ Mobile button authored-colour parity. Patch bump: one additive optional prop on
15
+ the mobile button adapter contract.
16
+
17
+ ### Added
18
+
19
+ - **`IMobileButtonProps.accentColor`:** optional resolved hex that overrides the
20
+ HeroUI variant fill so a CMS style can colour the mobile button for
21
+ cross-platform parity with the web Mantine `color` prop (e.g. `login`'s
22
+ `shared_color`). The adapter keeps the variant's readable foreground (white
23
+ label on a filled button); leave undefined to use the variant's themed colour.
24
+ Resolve it through `resolveMantineVariant(...).accent`, never a hard-coded hex.
25
+
12
26
  ## v1.14.6
13
27
 
14
28
  Style polish wave (alert/badge/avatar/button/login) — align the typed contracts
package/dist/index.d.mts CHANGED
@@ -1192,6 +1192,16 @@ interface IMobileButtonProps extends IMobileAdapterBaseProps {
1192
1192
  isLoading?: boolean;
1193
1193
  isIconOnly?: boolean;
1194
1194
  fullWidth?: boolean;
1195
+ /**
1196
+ * Optional concrete background colour (resolved hex) that overrides the
1197
+ * variant's themed fill, used for cross-platform parity when a CMS style
1198
+ * exposes an authored colour (e.g. `login`'s `shared_color`, which Mantine
1199
+ * applies to the web button via `color`). The adapter keeps the variant's
1200
+ * readable foreground (white on a filled button). Leave undefined to use the
1201
+ * variant's default themed colour. Resolve it through the shared mapper
1202
+ * (`resolveMantineVariant(...).accent`), never a hard-coded hex in a renderer.
1203
+ */
1204
+ accentColor?: string;
1195
1205
  children?: ReactNode;
1196
1206
  }
1197
1207
  interface IMobileTextProps extends IMobileAdapterBaseProps {
package/dist/index.d.ts CHANGED
@@ -1192,6 +1192,16 @@ interface IMobileButtonProps extends IMobileAdapterBaseProps {
1192
1192
  isLoading?: boolean;
1193
1193
  isIconOnly?: boolean;
1194
1194
  fullWidth?: boolean;
1195
+ /**
1196
+ * Optional concrete background colour (resolved hex) that overrides the
1197
+ * variant's themed fill, used for cross-platform parity when a CMS style
1198
+ * exposes an authored colour (e.g. `login`'s `shared_color`, which Mantine
1199
+ * applies to the web button via `color`). The adapter keeps the variant's
1200
+ * readable foreground (white on a filled button). Leave undefined to use the
1201
+ * variant's default themed colour. Resolve it through the shared mapper
1202
+ * (`resolveMantineVariant(...).accent`), never a hard-coded hex in a renderer.
1203
+ */
1204
+ accentColor?: string;
1195
1205
  children?: ReactNode;
1196
1206
  }
1197
1207
  interface IMobileTextProps extends IMobileAdapterBaseProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selfhelp/shared",
3
- "version": "1.14.6",
3
+ "version": "1.14.7",
4
4
  "description": "Shared TypeScript package for SelfHelp web frontend and mobile app: style registry, types, API contracts, Mantine theme tokens, condition + interpolation engines, CMS class allow-list.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -56,6 +56,15 @@ const _exhaustiveBackward: ContractKey = '' as ListedKey;
56
56
  void _exhaustiveForward;
57
57
  void _exhaustiveBackward;
58
58
 
59
+ /**
60
+ * Compile-time lock for the authored-colour button passthrough: `MobileButton`
61
+ * accepts an optional `accentColor` (resolved hex) so a CMS style can colour the
62
+ * button for cross-platform parity (e.g. `login`'s `shared_color`). If the prop
63
+ * is removed or retyped, this assignment fails to type-check.
64
+ */
65
+ const _buttonAcceptsAccentColor: IMobileButtonProps = { accentColor: '#fab005' };
66
+ void _buttonAcceptsAccentColor;
67
+
59
68
  describe('mobile UI adapter contract', () => {
60
69
  it('exposes exactly the milestone-one capability set', () => {
61
70
  // A trivial component every capability key can hold; proves a complete
@@ -45,6 +45,16 @@ export interface IMobileButtonProps extends IMobileAdapterBaseProps {
45
45
  isLoading?: boolean;
46
46
  isIconOnly?: boolean;
47
47
  fullWidth?: boolean;
48
+ /**
49
+ * Optional concrete background colour (resolved hex) that overrides the
50
+ * variant's themed fill, used for cross-platform parity when a CMS style
51
+ * exposes an authored colour (e.g. `login`'s `shared_color`, which Mantine
52
+ * applies to the web button via `color`). The adapter keeps the variant's
53
+ * readable foreground (white on a filled button). Leave undefined to use the
54
+ * variant's default themed colour. Resolve it through the shared mapper
55
+ * (`resolveMantineVariant(...).accent`), never a hard-coded hex in a renderer.
56
+ */
57
+ accentColor?: string;
48
58
  children?: ReactNode;
49
59
  }
50
60