@molecule/app-price-range-slider-react 3.0.0 → 4.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.
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-10-27T23:36:32.744Z
6
+ Generated: 2026-11-21T12:46:58.191Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-price-range-slider-react
@@ -110,9 +110,9 @@ function PriceRangeSlider({
110
110
 
111
111
  Peer dependencies:
112
112
 
113
- - `@molecule/app-react` ^3.0.0
113
+ - `@molecule/app-react` ^4.0.0
114
114
  - `@molecule/app-ui` ^1.0.1
115
- - `@molecule/app-ui-react` ^3.0.0
115
+ - `@molecule/app-ui-react` ^4.0.0
116
116
  - `react` ^18.0.0 || ^19.0.0
117
117
 
118
118
  ### Runtime Dependencies
@@ -123,6 +123,11 @@ Peer dependencies:
123
123
  - `react`
124
124
 
125
125
  The default `formatValue` renders US-style dollars (`$1,000`) — always pass
126
- your own formatter for non-USD apps. The two sliders carry fixed English
127
- aria-labels ("Minimum"/"Maximum"); there is no locale bond. Requires a
128
- wired ClassMap bond (`getClassMap()`).
126
+ your own formatter for non-USD apps. The two sliders' aria-labels
127
+ ("Minimum"/"Maximum") translate through `t()`
128
+ (`priceRangeSlider.aria.minimum`/`priceRangeSlider.aria.maximum`), so they
129
+ follow the active locale. Requires a wired ClassMap bond (`getClassMap()`).
130
+
131
+ ## Translations
132
+
133
+ Translation strings are provided by `@molecule/app-locales-price-range-slider`.
@@ -1 +1 @@
1
- {"version":3,"file":"PriceRangeSlider.d.ts","sourceRoot":"","sources":["../src/PriceRangeSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,K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E,MAAM,CAAA;IACb,kFAAkF;IAClF,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IACnC,4BAA4B;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,GAAG,EACH,KAAK,EACL,QAAQ,EACR,IAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAS,GACV,EAAE,qBAAqB,GAAG,KAAK,CAAC,YAAY,CAoC5C"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useTranslation } from '@molecule/app-react';
2
3
  import { getClassMap } from '@molecule/app-ui';
3
4
  /**
4
5
  * Dual-handle numeric range slider using two native `<input type="range">`
@@ -8,7 +9,8 @@ import { getClassMap } from '@molecule/app-ui';
8
9
  */
9
10
  export function PriceRangeSlider({ min, max, value, onChange, step = 1, formatValue, label, className, }) {
10
11
  const cm = getClassMap();
12
+ const { t } = useTranslation();
11
13
  const [low, high] = value;
12
14
  const fmt = formatValue ?? ((n) => `$${n.toLocaleString()}`);
13
- return (_jsxs("div", { className: cm.cn(cm.stack(2), className), children: [label && (_jsx("span", { className: cm.cn(cm.textSize('xs'), cm.fontWeight('semibold')), children: label })), _jsxs("div", { className: cm.flex({ align: 'center', gap: 'sm' }), children: [_jsx("span", { className: cm.textSize('sm'), children: fmt(low) }), _jsx("input", { type: "range", min: min, max: max, step: step, value: low, onChange: (e) => onChange([Math.min(Number(e.target.value), high), high]), className: cm.flex1, "aria-label": "Minimum" }), _jsx("input", { type: "range", min: min, max: max, step: step, value: high, onChange: (e) => onChange([low, Math.max(Number(e.target.value), low)]), className: cm.flex1, "aria-label": "Maximum" }), _jsx("span", { className: cm.textSize('sm'), children: fmt(high) })] })] }));
15
+ return (_jsxs("div", { className: cm.cn(cm.stack(2), className), children: [label && (_jsx("span", { className: cm.cn(cm.textSize('xs'), cm.fontWeight('semibold')), children: label })), _jsxs("div", { className: cm.flex({ align: 'center', gap: 'sm' }), children: [_jsx("span", { className: cm.textSize('sm'), children: fmt(low) }), _jsx("input", { type: "range", min: min, max: max, step: step, value: low, onChange: (e) => onChange([Math.min(Number(e.target.value), high), high]), className: cm.flex1, "aria-label": t('priceRangeSlider.aria.minimum', undefined, { defaultValue: 'Minimum' }) }), _jsx("input", { type: "range", min: min, max: max, step: step, value: high, onChange: (e) => onChange([low, Math.max(Number(e.target.value), low)]), className: cm.flex1, "aria-label": t('priceRangeSlider.aria.maximum', undefined, { defaultValue: 'Maximum' }) }), _jsx("span", { className: cm.textSize('sm'), children: fmt(high) })] })] }));
14
16
  }
package/dist/index.d.ts CHANGED
@@ -29,9 +29,10 @@
29
29
  *
30
30
  * @remarks
31
31
  * The default `formatValue` renders US-style dollars (`$1,000`) — always pass
32
- * your own formatter for non-USD apps. The two sliders carry fixed English
33
- * aria-labels ("Minimum"/"Maximum"); there is no locale bond. Requires a
34
- * wired ClassMap bond (`getClassMap()`).
32
+ * your own formatter for non-USD apps. The two sliders' aria-labels
33
+ * ("Minimum"/"Maximum") translate through `t()`
34
+ * (`priceRangeSlider.aria.minimum`/`priceRangeSlider.aria.maximum`), so they
35
+ * follow the active locale. Requires a wired ClassMap bond (`getClassMap()`).
35
36
  *
36
37
  * @module
37
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,cAAc,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,cAAc,uBAAuB,CAAA"}
package/dist/index.js CHANGED
@@ -29,9 +29,10 @@
29
29
  *
30
30
  * @remarks
31
31
  * The default `formatValue` renders US-style dollars (`$1,000`) — always pass
32
- * your own formatter for non-USD apps. The two sliders carry fixed English
33
- * aria-labels ("Minimum"/"Maximum"); there is no locale bond. Requires a
34
- * wired ClassMap bond (`getClassMap()`).
32
+ * your own formatter for non-USD apps. The two sliders' aria-labels
33
+ * ("Minimum"/"Maximum") translate through `t()`
34
+ * (`priceRangeSlider.aria.minimum`/`priceRangeSlider.aria.maximum`), so they
35
+ * follow the active locale. Requires a wired ClassMap bond (`getClassMap()`).
35
36
  *
36
37
  * @module
37
38
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@molecule/app-price-range-slider-react",
3
- "version": "3.0.0",
4
- "description": "Single- or dual-handle range slider with formatted labels",
3
+ "version": "4.0.1",
4
+ "description": "Price range slider — two clamped min/max range inputs with formatted labels (low always ≤ high)",
5
5
  "homepage": "https://www.molecule.dev/packages/app-price-range-slider-react",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -33,15 +33,15 @@
33
33
  "directory": "packages/app/features/price-range-slider-react"
34
34
  },
35
35
  "peerDependencies": {
36
- "@molecule/app-react": "^3.0.0",
36
+ "@molecule/app-react": "^4.0.0",
37
37
  "@molecule/app-ui": "^1.0.1",
38
- "@molecule/app-ui-react": "^3.0.0",
38
+ "@molecule/app-ui-react": "^4.0.0",
39
39
  "react": "^18.0.0 || ^19.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@molecule/app-react": "3.0.0",
43
- "@molecule/app-ui": "1.3.8",
44
- "@molecule/app-ui-react": "3.0.0",
42
+ "@molecule/app-react": "4.10.1",
43
+ "@molecule/app-ui": "1.5.0",
44
+ "@molecule/app-ui-react": "4.2.0",
45
45
  "@types/node": "26.6.5",
46
46
  "@types/react": "19.3.0",
47
47
  "@types/react-dom": "19.3.0",