@zag-js/slider 0.2.8 → 0.2.9
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.
|
@@ -78,7 +78,7 @@ function connect(state, send, normalize) {
|
|
|
78
78
|
const isDisabled = state.context.disabled;
|
|
79
79
|
const isInteractive = state.context.isInteractive;
|
|
80
80
|
const isInvalid = state.context.invalid;
|
|
81
|
-
|
|
81
|
+
const api = {
|
|
82
82
|
isFocused,
|
|
83
83
|
isDragging,
|
|
84
84
|
value: state.context.value,
|
|
@@ -266,7 +266,7 @@ function connect(state, send, normalize) {
|
|
|
266
266
|
style: dom.getMarkerGroupStyle()
|
|
267
267
|
}),
|
|
268
268
|
getMarkerProps({ value }) {
|
|
269
|
-
const percent =
|
|
269
|
+
const percent = api.getValuePercent(value);
|
|
270
270
|
const style = dom.getMarkerStyle(state.context, percent);
|
|
271
271
|
const markerState = value > state.context.value ? "over-value" : value < state.context.value ? "under-value" : "at-value";
|
|
272
272
|
return normalize.element({
|
|
@@ -281,6 +281,7 @@ function connect(state, send, normalize) {
|
|
|
281
281
|
});
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
|
+
return api;
|
|
284
285
|
}
|
|
285
286
|
|
|
286
287
|
export {
|
package/dist/index.js
CHANGED
|
@@ -650,7 +650,7 @@ function connect(state2, send, normalize) {
|
|
|
650
650
|
const isDisabled = state2.context.disabled;
|
|
651
651
|
const isInteractive = state2.context.isInteractive;
|
|
652
652
|
const isInvalid = state2.context.invalid;
|
|
653
|
-
|
|
653
|
+
const api = {
|
|
654
654
|
isFocused,
|
|
655
655
|
isDragging,
|
|
656
656
|
value: state2.context.value,
|
|
@@ -838,7 +838,7 @@ function connect(state2, send, normalize) {
|
|
|
838
838
|
style: dom.getMarkerGroupStyle()
|
|
839
839
|
}),
|
|
840
840
|
getMarkerProps({ value }) {
|
|
841
|
-
const percent =
|
|
841
|
+
const percent = api.getValuePercent(value);
|
|
842
842
|
const style = dom.getMarkerStyle(state2.context, percent);
|
|
843
843
|
const markerState = value > state2.context.value ? "over-value" : value < state2.context.value ? "under-value" : "at-value";
|
|
844
844
|
return normalize.element({
|
|
@@ -853,6 +853,7 @@ function connect(state2, send, normalize) {
|
|
|
853
853
|
});
|
|
854
854
|
}
|
|
855
855
|
};
|
|
856
|
+
return api;
|
|
856
857
|
}
|
|
857
858
|
|
|
858
859
|
// src/slider.machine.ts
|
package/dist/index.mjs
CHANGED
package/dist/slider.connect.js
CHANGED
|
@@ -391,7 +391,7 @@ function connect(state, send, normalize) {
|
|
|
391
391
|
const isDisabled = state.context.disabled;
|
|
392
392
|
const isInteractive = state.context.isInteractive;
|
|
393
393
|
const isInvalid = state.context.invalid;
|
|
394
|
-
|
|
394
|
+
const api = {
|
|
395
395
|
isFocused,
|
|
396
396
|
isDragging,
|
|
397
397
|
value: state.context.value,
|
|
@@ -579,7 +579,7 @@ function connect(state, send, normalize) {
|
|
|
579
579
|
style: dom.getMarkerGroupStyle()
|
|
580
580
|
}),
|
|
581
581
|
getMarkerProps({ value }) {
|
|
582
|
-
const percent =
|
|
582
|
+
const percent = api.getValuePercent(value);
|
|
583
583
|
const style = dom.getMarkerStyle(state.context, percent);
|
|
584
584
|
const markerState = value > state.context.value ? "over-value" : value < state.context.value ? "under-value" : "at-value";
|
|
585
585
|
return normalize.element({
|
|
@@ -594,6 +594,7 @@ function connect(state, send, normalize) {
|
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
|
+
return api;
|
|
597
598
|
}
|
|
598
599
|
// Annotate the CommonJS export names for ESM import in node:
|
|
599
600
|
0 && (module.exports = {
|
package/dist/slider.connect.mjs
CHANGED