@molecule/app-vote-cluster-react 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.
@@ -1 +1 @@
1
- {"version":3,"file":"VoteCluster.d.ts","sourceRoot":"","sources":["../src/VoteCluster.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,GAAG,EAAE,MAAM,OAAO,CAAA;AAM/C,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,YAAY,CAAA;AAoD7D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,MAAM,EACN,WAAe,EACf,MAAM,EACN,QAAQ,EACR,SAAsB,EACtB,SAAS,EACT,SAAS,EACT,SAAS,GACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAkHhC"}
1
+ {"version":3,"file":"VoteCluster.d.ts","sourceRoot":"","sources":["../src/VoteCluster.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,GAAG,EAAE,MAAM,OAAO,CAAA;AAM/C,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,YAAY,CAAA;AAoD7D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,MAAM,EACN,WAAe,EACf,MAAM,EACN,QAAQ,EACR,SAAsB,EACtB,SAAS,EACT,SAAS,EACT,SAAS,GACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA0HhC"}
@@ -123,5 +123,11 @@ export function VoteCluster({ score, myVote, defaultVote = 0, onVote, disabled,
123
123
  const wrapperClass = cm.cn(direction === 'vertical'
124
124
  ? cm.flex({ direction: 'col', align: 'center', justify: 'center', gap: 'xs' })
125
125
  : cm.flex({ align: 'center', justify: 'center', gap: 'xs' }), className);
126
- return (_jsxs("div", { className: wrapperClass, role: "group", "aria-label": groupLabel, "data-mol-id": dataMolId, children: [_jsx("button", { type: "button", onClick: () => emit(1), disabled: disabled, "aria-label": upLabel, "aria-pressed": upPressed, "data-vote": "up", style: upStyle, children: _jsx(UpArrow, { size: 20 }) }), _jsx("span", { className: cm.cn(cm.textSize('sm'), cm.fontWeight('semibold')), "aria-label": scoreLabel, "aria-live": "polite", "data-vote": "score", style: scoreStyle, children: score }), _jsx("button", { type: "button", onClick: () => emit(-1), disabled: disabled, "aria-label": downLabel, "aria-pressed": downPressed, "data-vote": "down", style: downStyle, children: _jsx(DownArrow, { size: 20 }) })] }));
126
+ return (_jsxs("div", { className: wrapperClass, role: "group", "aria-label": groupLabel, "data-mol-id": dataMolId, children: [_jsx("button", { type: "button", onClick: () => emit(1), disabled: disabled, "aria-label": upLabel, "aria-pressed": upPressed, "data-vote": "up", "data-mol-id": "vote-cluster-up",
127
+ // Icon-only arrow: bespoke by design (the arrow IS the control, with no
128
+ // button surface) and already themed via `--mol-color-*`; the 44px
129
+ // floor is the one thing it was missing.
130
+ className: cm.touchTarget, style: upStyle, children: _jsx(UpArrow, { size: 20 }) }), _jsx("span", { className: cm.cn(cm.textSize('sm'), cm.fontWeight('semibold')), "aria-label": scoreLabel, "aria-live": "polite", "data-vote": "score", style: scoreStyle, children: score }), _jsx("button", { type: "button", onClick: () => emit(-1), disabled: disabled, "aria-label": downLabel, "aria-pressed": downPressed, "data-vote": "down", "data-mol-id": "vote-cluster-down",
131
+ // Same icon-only arrow as the up vote above.
132
+ className: cm.touchTarget, style: downStyle, children: _jsx(DownArrow, { size: 20 }) })] }));
127
133
  }
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@molecule/app-vote-cluster-react",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Up/down arrows + score; HN/Reddit-style voter cluster",
5
+ "homepage": "https://www.molecule.dev/packages/app-vote-cluster-react",
5
6
  "type": "module",
6
7
  "main": "dist/index.js",
7
8
  "types": "dist/index.d.ts",
@@ -39,10 +40,10 @@
39
40
  "react": "^18.0.0 || ^19.0.0"
40
41
  },
41
42
  "devDependencies": {
42
- "@molecule/app-i18n": "1.0.1",
43
- "@molecule/app-react": "1.0.1",
44
- "@molecule/app-ui": "1.0.1",
45
- "@molecule/app-ui-tailwind": "1.0.1",
43
+ "@molecule/app-i18n": "1.0.2",
44
+ "@molecule/app-react": "1.6.0",
45
+ "@molecule/app-ui": "1.1.1",
46
+ "@molecule/app-ui-tailwind": "1.1.3",
46
47
  "@testing-library/react": "16.3.2",
47
48
  "@types/node": "26.1.2",
48
49
  "@types/react": "19.2.17",
@@ -51,6 +52,6 @@
51
52
  "react": "19.2.8",
52
53
  "react-dom": "19.2.8",
53
54
  "typescript": "6.0.3",
54
- "vitest": "4.1.10"
55
+ "vitest": "4.1.11"
55
56
  }
56
57
  }