@molecule/app-price-range-slider-svelte 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:56.916Z
6
+ Generated: 2026-11-21T12:46:58.491Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-price-range-slider-svelte
@@ -110,6 +110,12 @@ Peer dependencies:
110
110
  - `svelte`
111
111
 
112
112
  The default `formatValue` renders US-style dollars (`$1,000`) — always pass
113
- your own formatter for non-USD apps. The two sliders carry fixed English
114
- aria-labels ("Minimum"/"Maximum"); there is no locale bond. Requires a
115
- wired ClassMap bond (`getClassMap()`). The optional `label` is a snippet.
113
+ your own formatter for non-USD apps. The two sliders' aria-labels
114
+ ("Minimum"/"Maximum") translate through `t()`
115
+ (`priceRangeSlider.aria.minimum`/`priceRangeSlider.aria.maximum`), so they
116
+ follow the active locale. Requires a wired ClassMap bond (`getClassMap()`).
117
+ The optional `label` is a snippet.
118
+
119
+ ## Translations
120
+
121
+ Translation strings are provided by `@molecule/app-locales-price-range-slider`.
@@ -6,6 +6,7 @@
6
6
  `low <= high` always holds. The optional `label` is a snippet.
7
7
  -->
8
8
  <script lang="ts">
9
+ import { useTranslation } from '@molecule/app-svelte'
9
10
  import { getClassMap } from '@molecule/app-ui'
10
11
 
11
12
  import type { PriceRangeSliderProps } from './types.js'
@@ -22,8 +23,15 @@
22
23
  }: PriceRangeSliderProps = $props()
23
24
 
24
25
  const cm = $derived(getClassMap())
26
+ const { t } = useTranslation()
25
27
  const low = $derived(value[0])
26
28
  const high = $derived(value[1])
29
+ const minLabel = $derived(
30
+ t('priceRangeSlider.aria.minimum', undefined, { defaultValue: 'Minimum' }),
31
+ )
32
+ const maxLabel = $derived(
33
+ t('priceRangeSlider.aria.maximum', undefined, { defaultValue: 'Maximum' }),
34
+ )
27
35
 
28
36
  /**
29
37
  * Formats an endpoint label: the caller's `formatValue`, else the USD
@@ -79,7 +87,7 @@
79
87
  use:rangeValue={low}
80
88
  oninput={handleMin}
81
89
  class={cm.flex1}
82
- aria-label="Minimum"
90
+ aria-label={minLabel}
83
91
  />
84
92
  <input
85
93
  type="range"
@@ -89,7 +97,7 @@
89
97
  use:rangeValue={high}
90
98
  oninput={handleMax}
91
99
  class={cm.flex1}
92
- aria-label="Maximum"
100
+ aria-label={maxLabel}
93
101
  />
94
102
  <span class={cm.textSize('sm')}>{fmt(high)}</span>
95
103
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"PriceRangeSlider.svelte.d.ts","sourceRoot":"","sources":["../src/PriceRangeSlider.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA6ExD,QAAA,MAAM,gBAAgB,2DAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"PriceRangeSlider.svelte.d.ts","sourceRoot":"","sources":["../src/PriceRangeSlider.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAqFxD,QAAA,MAAM,gBAAgB,2DAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -32,9 +32,11 @@
32
32
  *
33
33
  * @remarks
34
34
  * The default `formatValue` renders US-style dollars (`$1,000`) — always pass
35
- * your own formatter for non-USD apps. The two sliders carry fixed English
36
- * aria-labels ("Minimum"/"Maximum"); there is no locale bond. Requires a
37
- * wired ClassMap bond (`getClassMap()`). The optional `label` is a snippet.
35
+ * your own formatter for non-USD apps. The two sliders' aria-labels
36
+ * ("Minimum"/"Maximum") translate through `t()`
37
+ * (`priceRangeSlider.aria.minimum`/`priceRangeSlider.aria.maximum`), so they
38
+ * follow the active locale. Requires a wired ClassMap bond (`getClassMap()`).
39
+ * The optional `label` is a snippet.
38
40
  *
39
41
  * @module
40
42
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -32,9 +32,11 @@
32
32
  *
33
33
  * @remarks
34
34
  * The default `formatValue` renders US-style dollars (`$1,000`) — always pass
35
- * your own formatter for non-USD apps. The two sliders carry fixed English
36
- * aria-labels ("Minimum"/"Maximum"); there is no locale bond. Requires a
37
- * wired ClassMap bond (`getClassMap()`). The optional `label` is a snippet.
35
+ * your own formatter for non-USD apps. The two sliders' aria-labels
36
+ * ("Minimum"/"Maximum") translate through `t()`
37
+ * (`priceRangeSlider.aria.minimum`/`priceRangeSlider.aria.maximum`), so they
38
+ * follow the active locale. Requires a wired ClassMap bond (`getClassMap()`).
39
+ * The optional `label` is a snippet.
38
40
  *
39
41
  * @module
40
42
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-price-range-slider-svelte",
3
- "version": "0.0.1-stage",
3
+ "version": "1.1.1",
4
4
  "description": "Single- or dual-handle range slider with formatted labels",
5
5
  "homepage": "https://www.molecule.dev/packages/app-price-range-slider-svelte",
6
6
  "type": "module",
@@ -55,11 +55,11 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@molecule/app-framework-conformance": "0.0.0",
58
- "@molecule/app-i18n": "1.2.1",
58
+ "@molecule/app-i18n": "1.2.2",
59
59
  "@molecule/app-icons": "1.0.4",
60
- "@molecule/app-svelte": "3.6.0",
61
- "@molecule/app-ui": "1.3.11",
62
- "@molecule/app-ui-svelte": "1.1.3",
60
+ "@molecule/app-svelte": "3.9.0",
61
+ "@molecule/app-ui": "1.5.0",
62
+ "@molecule/app-ui-svelte": "1.2.1",
63
63
  "@sveltejs/package": "3.0.2",
64
64
  "@sveltejs/vite-plugin-svelte": "7.1.2",
65
65
  "@types/node": "26.6.5",