@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
|
-
|
|
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(
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
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
|
-
|
|
1184
|
-
"aria-hidden": true,
|
|
1185
|
-
style: { left: position }
|
|
1186
|
-
};
|
|
1187
|
-
}),
|
|
1185
|
+
),
|
|
1188
1186
|
/**
|
|
1189
1187
|
* Label for each mark
|
|
1190
1188
|
*/
|