@molecule/app-comparison-row-solid 0.0.1-stage → 1.1.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.
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-15T07:09:17.203Z
6
+ Generated: 2026-11-16T20:21:19.617Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-comparison-row-solid
@@ -98,7 +98,7 @@ function ComparisonRow(props: ComparisonRowProps): JSX.Element
98
98
  Peer dependencies:
99
99
 
100
100
  - `@molecule/app-solid` ^3.5.0
101
- - `@molecule/app-ui` ^1.0.1
101
+ - `@molecule/app-ui` ^1.4.0
102
102
  - `@molecule/app-ui-solid` ^1.1.0
103
103
  - `solid-js` ^1.8.0
104
104
 
@@ -1 +1 @@
1
- {"version":3,"file":"ComparisonRow.d.ts","sourceRoot":"","sources":["../src/ComparisonRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAIzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAKpD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,kBAAkB,CAqCvD,CAAA"}
1
+ {"version":3,"file":"ComparisonRow.d.ts","sourceRoot":"","sources":["../src/ComparisonRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAKzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAUpD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,kBAAkB,CAwCvD,CAAA"}
@@ -9,7 +9,11 @@
9
9
  */
10
10
  import { getClassMap } from '@molecule/app-ui';
11
11
  const ARROW = (n) => (n > 0 ? '▲' : n < 0 ? '▼' : '–');
12
- const COLOR = (n) => (n > 0 ? '#22c55e' : n < 0 ? '#ef4444' : '#94a3b8');
12
+ /**
13
+ * The semantic tone colouring the delta: the theme's success green for a
14
+ * rise, its error red for a fall, its secondary grey for no change.
15
+ */
16
+ const TONE = (n) => (n > 0 ? 'success' : n < 0 ? 'error' : 'secondary');
13
17
  /**
14
18
  * Period-over-period stat comparison row — current value, optional previous
15
19
  * value, and a coloured delta% chip. Used in dashboards, report summaries,
@@ -30,7 +34,7 @@ export const ComparisonRow = (props) => {
30
34
  {props.previous !== undefined && (<span class={cm.cn(cm.textSize('xs'))} style={{ 'text-decoration': 'line-through', opacity: 0.6 }}>
31
35
  {props.previous}
32
36
  </span>)}
33
- {props.deltaPct !== undefined && (<span class={cm.cn(cm.textSize('xs'), cm.fontWeight('semibold'))} style={{ color: COLOR(props.deltaPct) }}>
37
+ {props.deltaPct !== undefined && (<span class={cm.cn(cm.textSize('xs'), cm.fontWeight('semibold'), cm.textTone(TONE(props.deltaPct)))}>
34
38
  {props.formatDelta ? (props.formatDelta(props.deltaPct)) : (<>
35
39
  {ARROW(props.deltaPct)} {Math.abs(props.deltaPct).toFixed(1)}%
36
40
  </>)}
@@ -1 +1 @@
1
- {"version":3,"file":"ComparisonRow.jsx","sourceRoot":"","sources":["../src/ComparisonRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAI9C,MAAM,KAAK,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CA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KAAK,CAAC,QAAQ,CAAC,CAClC,CAAC,CAAC,CAAC,CACF,EACE;gBAAA,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAE,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;cAC/D,GAAG,CACJ,CACH;UAAA,EAAE,IAAI,CAAC,CACR,CACH;MAAA,EAAE,GAAG,CACP;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;AACH,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-comparison-row-solid",
3
- "version": "0.0.1-stage",
3
+ "version": "1.1.1",
4
4
  "description": "Period-over-period stat comparison (\"$X vs $Y\", with delta)",
5
5
  "homepage": "https://www.molecule.dev/packages/app-comparison-row-solid",
6
6
  "type": "module",
@@ -43,17 +43,17 @@
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@molecule/app-solid": "^3.5.0",
46
- "@molecule/app-ui": "^1.0.1",
46
+ "@molecule/app-ui": "^1.4.0",
47
47
  "@molecule/app-ui-solid": "^1.1.0",
48
48
  "solid-js": "^1.8.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@molecule/app-framework-conformance": "0.0.0",
52
- "@molecule/app-i18n": "1.2.1",
52
+ "@molecule/app-i18n": "1.2.2",
53
53
  "@molecule/app-icons": "1.0.4",
54
- "@molecule/app-solid": "3.6.0",
55
- "@molecule/app-ui": "1.3.11",
56
- "@molecule/app-ui-solid": "1.1.2",
54
+ "@molecule/app-solid": "3.7.1",
55
+ "@molecule/app-ui": "1.4.0",
56
+ "@molecule/app-ui-solid": "1.1.4",
57
57
  "@types/node": "26.6.5",
58
58
  "jsdom": "30.1.3",
59
59
  "solid-js": "1.9.17",