@sit-onyx/headless 0.6.0 → 0.7.0-dev-20260204103758

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.
@@ -474,7 +474,8 @@ export declare const createSlider: <TValue extends SliderValue>(options: CreateS
474
474
  mark: import('vue').ComputedRef<(data: {
475
475
  value: number;
476
476
  label?: string;
477
- positionOffset?: string;
477
+ padding: string;
478
+ markWidth: string;
478
479
  }) => {
479
480
  "aria-hidden": true;
480
481
  style: {
package/dist/index.js CHANGED
@@ -1171,20 +1171,18 @@ const createSlider = createBuilder(
1171
1171
  /**
1172
1172
  * Single Mark element inside the rail
1173
1173
  */
1174
- mark: computed(() => (data) => {
1175
- const percentage = getValueInPercentage.value(data.value);
1176
- let position = `${percentage}%`;
1177
- if (data.positionOffset && percentage <= 0) {
1178
- position = data.positionOffset;
1179
- }
1180
- if (data.positionOffset && percentage >= 100) {
1181
- position = `calc(100% - ${data.positionOffset})`;
1174
+ mark: computed(
1175
+ () => (data) => {
1176
+ const percentage = getValueInPercentage.value(data.value);
1177
+ return {
1178
+ "aria-hidden": true,
1179
+ style: {
1180
+ // adjusting the position for the marks with consideration to their width and a padding/safe-zone.
1181
+ left: `calc(${data.padding} + (100% - 2 * ${data.padding} - ${data.markWidth}) * ${percentage} / 100)`
1182
+ }
1183
+ };
1182
1184
  }
1183
- return {
1184
- "aria-hidden": true,
1185
- style: { left: position }
1186
- };
1187
- }),
1185
+ ),
1188
1186
  /**
1189
1187
  * Label for each mark
1190
1188
  */
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.6.0",
4
+ "version": "0.7.0-dev-20260204103758",
5
5
  "type": "module",
6
6
  "author": "Schwarz IT KG",
7
7
  "license": "Apache-2.0",