@sit-onyx/headless 0.3.0 → 0.4.0-dev-20251106171054

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.
@@ -206,7 +206,13 @@ export declare const _unstableCreateSlider: <TValue extends number | number[] =
206
206
  value: number;
207
207
  label?: string;
208
208
  }[]>;
209
+ /**
210
+ * Step size when holding shift key or using Page Up/Page Down keys.
211
+ */
209
212
  shiftStep: import('vue').ComputedRef<number>;
213
+ /**
214
+ * Normalized slider values (clamped to min/max and rounded to nearest step/mark).
215
+ */
210
216
  normalizedValues: import('vue').ComputedRef<number[]>;
211
217
  }, {
212
218
  /**
package/dist/index.js CHANGED
@@ -1001,9 +1001,15 @@ const _unstableCreateSlider = createBuilder(
1001
1001
  return stepMultiple * step.value;
1002
1002
  });
1003
1003
  const isDisabled = computed(() => unref(options.disabled) ?? false);
1004
- const marks = computed(() => unref(options.marks) ?? false);
1005
- const label = computed(() => unref(options.label));
1006
1004
  const isDiscrete = computed(() => unref(options.discrete) ?? false);
1005
+ const marks = computed(() => {
1006
+ const rawMarks = unref(options.marks);
1007
+ if (isDiscrete.value && !rawMarks) {
1008
+ return true;
1009
+ }
1010
+ return rawMarks ?? false;
1011
+ });
1012
+ const label = computed(() => unref(options.label));
1007
1013
  let touchId = null;
1008
1014
  let movesSinceStart = 0;
1009
1015
  let lastChangedValue = null;
@@ -1436,7 +1442,13 @@ const _unstableCreateSlider = createBuilder(
1436
1442
  * - If marks option is `false`, no marks are shown.
1437
1443
  */
1438
1444
  marksList,
1445
+ /**
1446
+ * Step size when holding shift key or using Page Up/Page Down keys.
1447
+ */
1439
1448
  shiftStep,
1449
+ /**
1450
+ * Normalized slider values (clamped to min/max and rounded to nearest step/mark).
1451
+ */
1440
1452
  normalizedValues
1441
1453
  },
1442
1454
  internals: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sit-onyx/headless",
3
3
  "description": "Headless composables for Vue",
4
- "version": "0.3.0",
4
+ "version": "0.4.0-dev-20251106171054",
5
5
  "type": "module",
6
6
  "author": "Schwarz IT KG",
7
7
  "license": "Apache-2.0",
@@ -38,8 +38,8 @@
38
38
  "vue": ">= 3.5.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@vue/compiler-dom": "3.5.22",
42
- "vue": "3.5.22",
41
+ "@vue/compiler-dom": "3.5.23",
42
+ "vue": "3.5.23",
43
43
  "@sit-onyx/shared": "^0.1.0"
44
44
  },
45
45
  "scripts": {