@molecule/app-color-swatch-picker-react 4.0.1 → 4.1.0

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-16T01:05:08.054Z
6
+ Generated: 2026-11-25T00:25:43.843Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-color-swatch-picker-react
@@ -120,7 +120,7 @@ Peer dependencies:
120
120
 
121
121
  - `@molecule/app-react` ^4.0.0
122
122
  - `@molecule/app-ui` ^1.1.0
123
- - `@molecule/app-ui-react` ^4.0.0
123
+ - `@molecule/app-ui-react` ^4.4.0
124
124
  - `react` ^18.0.0 || ^19.0.0
125
125
 
126
126
  ### Runtime Dependencies
@@ -1 +1 @@
1
- {"version":3,"file":"ColorSwatchPicker.d.ts","sourceRoot":"","sources":["../src/ColorSwatchPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAI3C,gGAAgG;AAChG,MAAM,WAAW,WAAW;IAC1B,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,iDAAiD;IACjD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ClB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,IAAS,EACT,GAAU,EACV,OAAO,EACP,SAAS,EACT,SAAS,GACV,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CA2CtC"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getClassMap } from '@molecule/app-ui';
3
+ import { Box, Pressable } from '@molecule/app-ui-react/elements';
3
4
  /**
4
5
  * Grid of colored circles with single-select state. Used for tag
5
6
  * colors, label colors, theme accent swatches, etc.
@@ -7,14 +8,14 @@ import { getClassMap } from '@molecule/app-ui';
7
8
  */
8
9
  export function ColorSwatchPicker({ swatches, value, onChange, size = 28, gap = 'sm', preview, className, ariaLabel, }) {
9
10
  const cm = getClassMap();
10
- return (_jsxs("div", { className: cm.cn(cm.stack(2), className), children: [_jsx("div", { role: "radiogroup", "aria-label": ariaLabel, className: cm.flex({ align: 'center', gap, wrap: 'wrap' }), children: swatches.map((s) => {
11
+ return (_jsxs(Box, { as: "div", className: cm.cn(cm.stack(2), className), children: [_jsx(Box, { as: "div", role: "radiogroup", "aria-label": ariaLabel, className: cm.flex({ align: 'center', gap, wrap: 'wrap' }), children: swatches.map((s) => {
11
12
  const selected = s.value === value;
12
- return (_jsx("button", { type: "button", role: "radio", "aria-checked": selected, "aria-label": s.label ?? s.value, "data-mol-id": `color-swatch-${s.value}`, "data-selected": selected ? 'true' : 'false', onClick: () => onChange(s.value),
13
+ return (_jsx(Pressable, { as: "button", type: "button", role: "radio", "aria-checked": selected, "aria-label": s.label ?? s.value, "data-mol-id": `color-swatch-${s.value}`, "data-selected": selected ? 'true' : 'false', onClick: () => onChange(s.value),
13
14
  /* mol-bespoke-button: colour swatch, no label — the inline
14
15
  background IS the caller's data (the colour being picked), not
15
16
  a design token, and a `cm.button()` fill would hide it. Cursor
16
17
  and the compact touch floor come from the ClassMap. */
17
- className: cm.cn(cm.roundedFull, cm.cursorPointer, cm.touchTargetCompact), style: {
18
+ className: cm.cn(cm.roundedFull, cm.cursorPointer, cm.touchTargetCompact), webStyle: {
18
19
  width: size,
19
20
  height: size,
20
21
  background: s.color,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-color-swatch-picker-react",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "Grid of colored circle swatches with single-select state, for tag colors / labels / themes",
5
5
  "homepage": "https://www.molecule.dev/packages/app-color-swatch-picker-react",
6
6
  "type": "module",
@@ -35,13 +35,13 @@
35
35
  "peerDependencies": {
36
36
  "@molecule/app-react": "^4.0.0",
37
37
  "@molecule/app-ui": "^1.1.0",
38
- "@molecule/app-ui-react": "^4.0.0",
38
+ "@molecule/app-ui-react": "^4.4.0",
39
39
  "react": "^18.0.0 || ^19.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@molecule/app-react": "4.7.1",
43
- "@molecule/app-ui": "1.4.0",
44
- "@molecule/app-ui-react": "4.1.4",
42
+ "@molecule/app-react": "4.17.0",
43
+ "@molecule/app-ui": "1.13.0",
44
+ "@molecule/app-ui-react": "4.11.0",
45
45
  "@types/node": "26.6.5",
46
46
  "@types/react": "19.3.0",
47
47
  "@types/react-dom": "19.3.0",