@onereach/ui-components 8.8.2-beta.3728.0 → 8.8.2-beta.3729.0

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.
Files changed (40) hide show
  1. package/dist/bundled/v2/components/OrRangeSliderV3/OrRangeSlider.js +1 -1
  2. package/dist/bundled/v2/components/OrRangeSliderV3/index.js +2 -2
  3. package/dist/bundled/v2/components/OrRangeSliderV3/props.js +1 -1
  4. package/dist/bundled/v2/components/OrRangeSliderV3/styles.js +2 -2
  5. package/dist/bundled/v2/components/{OrRangeSliderV3-35dd8e74.js → OrRangeSliderV3-8deed393.js} +18 -3
  6. package/dist/bundled/v2/components/OrSliderV3/OrSlider.js +1 -1
  7. package/dist/bundled/v2/components/OrSliderV3/index.js +1 -1
  8. package/dist/bundled/v2/components/OrSliderV3/props.js +1 -1
  9. package/dist/bundled/v2/components/OrSliderV3/styles.js +1 -1
  10. package/dist/bundled/v2/components/{OrSliderV3-f27deb17.js → OrSliderV3-e4d640d4.js} +17 -2
  11. package/dist/bundled/v2/components/index.js +2 -2
  12. package/dist/bundled/v2/index.js +2 -2
  13. package/dist/bundled/v3/components/OrRangeSliderV3/OrRangeSlider.js +1 -1
  14. package/dist/bundled/v3/components/OrRangeSliderV3/index.js +2 -2
  15. package/dist/bundled/v3/components/OrRangeSliderV3/props.js +1 -1
  16. package/dist/bundled/v3/components/OrRangeSliderV3/styles.js +2 -2
  17. package/dist/bundled/v3/components/{OrRangeSliderV3-ac10db3d.js → OrRangeSliderV3-0f16ba45.js} +18 -3
  18. package/dist/bundled/v3/components/OrSliderV3/OrSlider.js +1 -1
  19. package/dist/bundled/v3/components/OrSliderV3/index.js +1 -1
  20. package/dist/bundled/v3/components/OrSliderV3/props.js +1 -1
  21. package/dist/bundled/v3/components/OrSliderV3/styles.js +1 -1
  22. package/dist/bundled/v3/components/{OrSliderV3-eb606ea7.js → OrSliderV3-9c2f3e42.js} +17 -2
  23. package/dist/bundled/v3/components/index.js +2 -2
  24. package/dist/bundled/v3/index.js +2 -2
  25. package/dist/esm/v2/{OrRangeSlider-43dee9e8.js → OrRangeSlider-255a259f.js} +18 -3
  26. package/dist/esm/v2/{OrSlider-7184e800.js → OrSlider-f90faadb.js} +1 -1
  27. package/dist/esm/v2/{OrSlider.vue_rollup-plugin-vue_script-d9ba1c84.js → OrSlider.vue_rollup-plugin-vue_script-19fd485e.js} +17 -2
  28. package/dist/esm/v2/components/index.js +3 -3
  29. package/dist/esm/v2/components/or-range-slider-v3/index.js +2 -2
  30. package/dist/esm/v2/components/or-slider-v3/index.js +2 -2
  31. package/dist/esm/v2/index.js +3 -3
  32. package/dist/esm/v3/{OrRangeSlider-6364e907.js → OrRangeSlider-5a611a12.js} +18 -3
  33. package/dist/esm/v3/{OrSlider-7cdc7ed5.js → OrSlider-8d4a54af.js} +17 -2
  34. package/dist/esm/v3/components/index.js +2 -2
  35. package/dist/esm/v3/components/or-range-slider-v3/index.js +2 -2
  36. package/dist/esm/v3/components/or-slider-v3/index.js +1 -1
  37. package/dist/esm/v3/index.js +2 -2
  38. package/package.json +2 -2
  39. package/src/components/or-range-slider-v3/OrRangeSlider.vue +16 -3
  40. package/src/components/or-slider-v3/OrSlider.vue +16 -3
@@ -1,2 +1,2 @@
1
- export { _ as default } from '../OrRangeSliderV3-35dd8e74.js';
1
+ export { _ as default } from '../OrRangeSliderV3-8deed393.js';
2
2
  import '../OrAvatar-aa94cbf7.js';
@@ -1,2 +1,2 @@
1
- export { _ as OrRangeSliderV3 } from '../OrRangeSliderV3-35dd8e74.js';
2
- export { S as RangeSliderColor, a as RangeSliderOrientation } from '../OrSliderV3-f27deb17.js';
1
+ export { _ as OrRangeSliderV3 } from '../OrRangeSliderV3-8deed393.js';
2
+ export { S as RangeSliderColor, a as RangeSliderOrientation } from '../OrSliderV3-e4d640d4.js';
@@ -1 +1 @@
1
- export { S as RangeSliderColor, a as RangeSliderOrientation } from '../OrSliderV3-f27deb17.js';
1
+ export { S as RangeSliderColor, a as RangeSliderOrientation } from '../OrSliderV3-e4d640d4.js';
@@ -1,2 +1,2 @@
1
- import '../OrSliderV3-f27deb17.js';
2
- export { R as RangeSlider, j as RangeSliderLabel, l as RangeSliderLabelMark, k as RangeSliderLabelOrientations, d as RangeSliderOffset, e as RangeSliderOffsetOrientations, a as RangeSliderOrientations, b as RangeSliderRail, c as RangeSliderRailOrientations, h as RangeSliderThumb, i as RangeSliderThumbColors, f as RangeSliderTrack, g as RangeSliderTrackColors } from '../OrRangeSliderV3-35dd8e74.js';
1
+ import '../OrSliderV3-e4d640d4.js';
2
+ export { R as RangeSlider, j as RangeSliderLabel, l as RangeSliderLabelMark, k as RangeSliderLabelOrientations, d as RangeSliderOffset, e as RangeSliderOffsetOrientations, a as RangeSliderOrientations, b as RangeSliderRail, c as RangeSliderRailOrientations, h as RangeSliderThumb, i as RangeSliderThumbColors, f as RangeSliderTrack, g as RangeSliderTrackColors } from '../OrRangeSliderV3-8deed393.js';
@@ -1,6 +1,6 @@
1
- import { a as SliderOrientation, S as SliderColor } from './OrSliderV3-f27deb17.js';
1
+ import { a as SliderOrientation, S as SliderColor } from './OrSliderV3-e4d640d4.js';
2
2
  import { u as useProxyModelValue, $ as useElementBounding, d as useElementHover, a1 as useDraggable, a2 as clamp } from './OrBottomSheetV3-1f68afd8.js';
3
- import { defineComponent, ref, computed, toRef } from 'vue-demi';
3
+ import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
4
4
  import { _ as __vue_component__$1 } from './OrTooltipV3-4d64efcf.js';
5
5
  import { n as normalizeComponent } from './OrAvatar-aa94cbf7.js';
6
6
 
@@ -192,7 +192,7 @@ var script = defineComponent({
192
192
  if (!props.step) {
193
193
  return [props.minValue, ...props.breakpoints, props.maxValue];
194
194
  }
195
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(props.breakpoints).sort((a, b) => a - b);
195
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step)).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(...props.breakpoints, props.maxValue).sort((a, b) => a - b);
196
196
  });
197
197
  const railBoundingBox = useElementBounding(rail);
198
198
  const selectedControl = ref();
@@ -230,6 +230,21 @@ var script = defineComponent({
230
230
  onMove: onDrag,
231
231
  onEnd: onDrag
232
232
  });
233
+ // Constraints
234
+ watch(toRef(props, 'minValue'), value => {
235
+ if (value >= props.maxValue) {
236
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
237
+ }
238
+ }, {
239
+ immediate: true
240
+ });
241
+ watch(toRef(props, 'maxValue'), value => {
242
+ if (value <= props.minValue) {
243
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
244
+ }
245
+ }, {
246
+ immediate: true
247
+ });
233
248
  return {
234
249
  root,
235
250
  rail,
@@ -1,2 +1,2 @@
1
- export { _ as default } from '../OrSliderV3-f27deb17.js';
1
+ export { _ as default } from '../OrSliderV3-e4d640d4.js';
2
2
  import '../OrAvatar-aa94cbf7.js';
@@ -1 +1 @@
1
- export { _ as OrSliderV3, S as SliderColor, a as SliderOrientation } from '../OrSliderV3-f27deb17.js';
1
+ export { _ as OrSliderV3, S as SliderColor, a as SliderOrientation } from '../OrSliderV3-e4d640d4.js';
@@ -1 +1 @@
1
- export { S as SliderColor, a as SliderOrientation } from '../OrSliderV3-f27deb17.js';
1
+ export { S as SliderColor, a as SliderOrientation } from '../OrSliderV3-e4d640d4.js';
@@ -1 +1 @@
1
- export { b as Slider, j as SliderLabel, l as SliderLabelMark, k as SliderLabelOrientations, c as SliderOrientations, d as SliderRail, e as SliderRailOrientations, h as SliderThumb, i as SliderThumbColors, f as SliderTrack, g as SliderTrackColors } from '../OrSliderV3-f27deb17.js';
1
+ export { b as Slider, j as SliderLabel, l as SliderLabelMark, k as SliderLabelOrientations, c as SliderOrientations, d as SliderRail, e as SliderRailOrientations, h as SliderThumb, i as SliderThumbColors, f as SliderTrack, g as SliderTrackColors } from '../OrSliderV3-e4d640d4.js';
@@ -1,5 +1,5 @@
1
1
  import { u as useProxyModelValue, $ as useElementBounding, d as useElementHover, a1 as useDraggable, a2 as clamp } from './OrBottomSheetV3-1f68afd8.js';
2
- import { defineComponent, ref, computed, toRef } from 'vue-demi';
2
+ import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
3
3
  import { _ as __vue_component__$1 } from './OrTooltipV3-4d64efcf.js';
4
4
  import { n as normalizeComponent } from './OrAvatar-aa94cbf7.js';
5
5
 
@@ -181,7 +181,7 @@ var script = defineComponent({
181
181
  if (!props.step) {
182
182
  return [props.minValue, ...props.breakpoints, props.maxValue];
183
183
  }
184
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(props.breakpoints).sort((a, b) => a - b);
184
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step)).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(...props.breakpoints, props.maxValue).sort((a, b) => a - b);
185
185
  });
186
186
  const railBoundingBox = useElementBounding(rail);
187
187
  // Handlers
@@ -202,6 +202,21 @@ var script = defineComponent({
202
202
  onMove: onDrag,
203
203
  onEnd: onDrag
204
204
  });
205
+ // Constraints
206
+ watch(toRef(props, 'minValue'), value => {
207
+ if (value >= props.maxValue) {
208
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
209
+ }
210
+ }, {
211
+ immediate: true
212
+ });
213
+ watch(toRef(props, 'maxValue'), value => {
214
+ if (value <= props.minValue) {
215
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
216
+ }
217
+ }, {
218
+ immediate: true
219
+ });
205
220
  return {
206
221
  root,
207
222
  rail,
@@ -76,8 +76,8 @@ export { default as OrRadio } from './OrRadio/OrRadio.js';
76
76
  export { default as OrRadioGroup } from './OrRadioGroup/OrRadioGroup.js';
77
77
  export { default as OrRadioGroupV3 } from './OrRadioGroupV3/OrRadioGroup.js';
78
78
  export { _ as OrRadioV3 } from './OrRadioV3-eed57712.js';
79
- export { _ as OrRangeSliderV3 } from './OrRangeSliderV3-35dd8e74.js';
80
- export { _ as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSliderV3-f27deb17.js';
79
+ export { _ as OrRangeSliderV3 } from './OrRangeSliderV3-8deed393.js';
80
+ export { _ as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSliderV3-e4d640d4.js';
81
81
  export { _ as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from './OrResizeablePanelV3-4f00ebc0.js';
82
82
  export { F as Formats, _ as OrRichTextEditorV3 } from './OrRichTextEditorV3-0a5cd060.js';
83
83
  export { default as OrSearch } from './OrSearch/OrSearch.js';
@@ -41,7 +41,7 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from './comp
41
41
  export { default as OrRadio } from './components/OrRadio/OrRadio.js';
42
42
  export { default as OrRadioGroup } from './components/OrRadioGroup/OrRadioGroup.js';
43
43
  export { default as OrRadioGroupV3 } from './components/OrRadioGroupV3/OrRadioGroup.js';
44
- export { _ as OrRangeSliderV3 } from './components/OrRangeSliderV3-35dd8e74.js';
44
+ export { _ as OrRangeSliderV3 } from './components/OrRangeSliderV3-8deed393.js';
45
45
  export { F as Formats, _ as OrRichTextEditorV3 } from './components/OrRichTextEditorV3-0a5cd060.js';
46
46
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './components/OrSegmentedControlV3-73e66842.js';
47
47
  export { _ as OrSelect } from './components/OrSelect-228372b9.js';
@@ -51,7 +51,7 @@ export { S as OrSidebarPlacement, _ as OrSidebarV3, S as SidebarPlacement } from
51
51
  export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './components/OrSkeleton-34e51588.js';
52
52
  export { _ as OrSkeletonCircleV3, a as OrSkeletonRectV3, b as OrSkeletonTextV3 } from './components/OrSkeletonV3-9cb7dce4.js';
53
53
  export { default as OrSlider } from './components/OrSlider/OrSlider.js';
54
- export { _ as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './components/OrSliderV3-f27deb17.js';
54
+ export { _ as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './components/OrSliderV3-e4d640d4.js';
55
55
  export { _ as OrStatusV3, a as StatusSize, S as StatusVariant } from './components/OrStatusV3-20770985.js';
56
56
  export { default as OrStepper } from './components/OrStepper/OrStepper.js';
57
57
  export { default as OrSwitch } from './components/OrSwitch/OrSwitch.js';
@@ -1 +1 @@
1
- export { s as default } from '../OrRangeSliderV3-ac10db3d.js';
1
+ export { s as default } from '../OrRangeSliderV3-0f16ba45.js';
@@ -1,2 +1,2 @@
1
- export { s as OrRangeSliderV3 } from '../OrRangeSliderV3-ac10db3d.js';
2
- export { S as RangeSliderColor, a as RangeSliderOrientation } from '../OrSliderV3-eb606ea7.js';
1
+ export { s as OrRangeSliderV3 } from '../OrRangeSliderV3-0f16ba45.js';
2
+ export { S as RangeSliderColor, a as RangeSliderOrientation } from '../OrSliderV3-9c2f3e42.js';
@@ -1 +1 @@
1
- export { S as RangeSliderColor, a as RangeSliderOrientation } from '../OrSliderV3-eb606ea7.js';
1
+ export { S as RangeSliderColor, a as RangeSliderOrientation } from '../OrSliderV3-9c2f3e42.js';
@@ -1,2 +1,2 @@
1
- import '../OrSliderV3-eb606ea7.js';
2
- export { R as RangeSlider, j as RangeSliderLabel, l as RangeSliderLabelMark, k as RangeSliderLabelOrientations, d as RangeSliderOffset, e as RangeSliderOffsetOrientations, a as RangeSliderOrientations, b as RangeSliderRail, c as RangeSliderRailOrientations, h as RangeSliderThumb, i as RangeSliderThumbColors, f as RangeSliderTrack, g as RangeSliderTrackColors } from '../OrRangeSliderV3-ac10db3d.js';
1
+ import '../OrSliderV3-9c2f3e42.js';
2
+ export { R as RangeSlider, j as RangeSliderLabel, l as RangeSliderLabelMark, k as RangeSliderLabelOrientations, d as RangeSliderOffset, e as RangeSliderOffsetOrientations, a as RangeSliderOrientations, b as RangeSliderRail, c as RangeSliderRailOrientations, h as RangeSliderThumb, i as RangeSliderThumbColors, f as RangeSliderTrack, g as RangeSliderTrackColors } from '../OrRangeSliderV3-0f16ba45.js';
@@ -1,7 +1,7 @@
1
- import { a as SliderOrientation, S as SliderColor } from './OrSliderV3-eb606ea7.js';
1
+ import { a as SliderOrientation, S as SliderColor } from './OrSliderV3-9c2f3e42.js';
2
2
  import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createVNode, withCtx, toDisplayString } from 'vue';
3
3
  import { u as useProxyModelValue, $ as useElementBounding, d as useElementHover, a1 as useDraggable, a2 as clamp } from './OrBottomSheetV3-dc89f856.js';
4
- import { defineComponent, ref, computed, toRef } from 'vue-demi';
4
+ import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
5
5
  import { s as script$1 } from './OrTooltipV3-ffe1652f.js';
6
6
 
7
7
  const RangeSlider = [
@@ -192,7 +192,7 @@ var script = defineComponent({
192
192
  if (!props.step) {
193
193
  return [props.minValue, ...props.breakpoints, props.maxValue];
194
194
  }
195
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(props.breakpoints).sort((a, b) => a - b);
195
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step)).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(...props.breakpoints, props.maxValue).sort((a, b) => a - b);
196
196
  });
197
197
  const railBoundingBox = useElementBounding(rail);
198
198
  const selectedControl = ref();
@@ -230,6 +230,21 @@ var script = defineComponent({
230
230
  onMove: onDrag,
231
231
  onEnd: onDrag
232
232
  });
233
+ // Constraints
234
+ watch(toRef(props, 'minValue'), value => {
235
+ if (value >= props.maxValue) {
236
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
237
+ }
238
+ }, {
239
+ immediate: true
240
+ });
241
+ watch(toRef(props, 'maxValue'), value => {
242
+ if (value <= props.minValue) {
243
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
244
+ }
245
+ }, {
246
+ immediate: true
247
+ });
233
248
  return {
234
249
  root,
235
250
  rail,
@@ -1 +1 @@
1
- export { s as default } from '../OrSliderV3-eb606ea7.js';
1
+ export { s as default } from '../OrSliderV3-9c2f3e42.js';
@@ -1 +1 @@
1
- export { s as OrSliderV3, S as SliderColor, a as SliderOrientation } from '../OrSliderV3-eb606ea7.js';
1
+ export { s as OrSliderV3, S as SliderColor, a as SliderOrientation } from '../OrSliderV3-9c2f3e42.js';
@@ -1 +1 @@
1
- export { S as SliderColor, a as SliderOrientation } from '../OrSliderV3-eb606ea7.js';
1
+ export { S as SliderColor, a as SliderOrientation } from '../OrSliderV3-9c2f3e42.js';
@@ -1 +1 @@
1
- export { b as Slider, j as SliderLabel, l as SliderLabelMark, k as SliderLabelOrientations, c as SliderOrientations, d as SliderRail, e as SliderRailOrientations, h as SliderThumb, i as SliderThumbColors, f as SliderTrack, g as SliderTrackColors } from '../OrSliderV3-eb606ea7.js';
1
+ export { b as Slider, j as SliderLabel, l as SliderLabelMark, k as SliderLabelOrientations, c as SliderOrientations, d as SliderRail, e as SliderRailOrientations, h as SliderThumb, i as SliderThumbColors, f as SliderTrack, g as SliderTrackColors } from '../OrSliderV3-9c2f3e42.js';
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createVNode, withCtx, toDisplayString } from 'vue';
2
2
  import { u as useProxyModelValue, $ as useElementBounding, d as useElementHover, a1 as useDraggable, a2 as clamp } from './OrBottomSheetV3-dc89f856.js';
3
- import { defineComponent, ref, computed, toRef } from 'vue-demi';
3
+ import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
4
4
  import { s as script$1 } from './OrTooltipV3-ffe1652f.js';
5
5
 
6
6
  var SliderColor;
@@ -181,7 +181,7 @@ var script = defineComponent({
181
181
  if (!props.step) {
182
182
  return [props.minValue, ...props.breakpoints, props.maxValue];
183
183
  }
184
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(props.breakpoints).sort((a, b) => a - b);
184
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step)).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(...props.breakpoints, props.maxValue).sort((a, b) => a - b);
185
185
  });
186
186
  const railBoundingBox = useElementBounding(rail);
187
187
  // Handlers
@@ -202,6 +202,21 @@ var script = defineComponent({
202
202
  onMove: onDrag,
203
203
  onEnd: onDrag
204
204
  });
205
+ // Constraints
206
+ watch(toRef(props, 'minValue'), value => {
207
+ if (value >= props.maxValue) {
208
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
209
+ }
210
+ }, {
211
+ immediate: true
212
+ });
213
+ watch(toRef(props, 'maxValue'), value => {
214
+ if (value <= props.minValue) {
215
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
216
+ }
217
+ }, {
218
+ immediate: true
219
+ });
205
220
  return {
206
221
  root,
207
222
  rail,
@@ -76,8 +76,8 @@ export { default as OrRadio } from './OrRadio/OrRadio.js';
76
76
  export { default as OrRadioGroup } from './OrRadioGroup/OrRadioGroup.js';
77
77
  export { default as OrRadioGroupV3 } from './OrRadioGroupV3/OrRadioGroup.js';
78
78
  export { s as OrRadioV3 } from './OrRadioV3-b45d1e8b.js';
79
- export { s as OrRangeSliderV3 } from './OrRangeSliderV3-ac10db3d.js';
80
- export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSliderV3-eb606ea7.js';
79
+ export { s as OrRangeSliderV3 } from './OrRangeSliderV3-0f16ba45.js';
80
+ export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSliderV3-9c2f3e42.js';
81
81
  export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from './OrResizeablePanelV3-4a43855d.js';
82
82
  export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditorV3-d23669da.js';
83
83
  export { default as OrSearch } from './OrSearch/OrSearch.js';
@@ -40,7 +40,7 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from './comp
40
40
  export { default as OrRadio } from './components/OrRadio/OrRadio.js';
41
41
  export { default as OrRadioGroup } from './components/OrRadioGroup/OrRadioGroup.js';
42
42
  export { default as OrRadioGroupV3 } from './components/OrRadioGroupV3/OrRadioGroup.js';
43
- export { s as OrRangeSliderV3 } from './components/OrRangeSliderV3-ac10db3d.js';
43
+ export { s as OrRangeSliderV3 } from './components/OrRangeSliderV3-0f16ba45.js';
44
44
  export { F as Formats, s as OrRichTextEditorV3 } from './components/OrRichTextEditorV3-d23669da.js';
45
45
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './components/OrSegmentedControlV3-6dd2c796.js';
46
46
  export { s as OrSelect } from './components/OrSelect-fc318cc4.js';
@@ -50,7 +50,7 @@ export { S as OrSidebarPlacement, s as OrSidebarV3, S as SidebarPlacement } from
50
50
  export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './components/OrSkeleton-7c81d12c.js';
51
51
  export { s as OrSkeletonCircleV3, a as OrSkeletonRectV3, b as OrSkeletonTextV3 } from './components/OrSkeletonV3-fddfdcee.js';
52
52
  export { default as OrSlider } from './components/OrSlider/OrSlider.js';
53
- export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './components/OrSliderV3-eb606ea7.js';
53
+ export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './components/OrSliderV3-9c2f3e42.js';
54
54
  export { s as OrStatusV3, a as StatusSize, S as StatusVariant } from './components/OrStatusV3-b5dfd90a.js';
55
55
  export { default as OrStepper } from './components/OrStepper/OrStepper.js';
56
56
  export { default as OrSwitch } from './components/OrSwitch/OrSwitch.js';
@@ -1,12 +1,12 @@
1
1
  import { useElementBounding, useElementHover, useDraggable, clamp } from '@vueuse/core';
2
- import { defineComponent, ref, computed, toRef } from 'vue-demi';
2
+ import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
3
3
  import './dom-aecadd9a.js';
4
4
  import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
5
5
  import '@onereach/styles/tailwind/plugins/core';
6
6
  import '@onereach/styles/tailwind.config.json';
7
7
  import { _ as __vue_component__$1 } from './OrTooltip-43ed75fe.js';
8
8
  import './OrPopover-7820b4af.js';
9
- import { a as SliderOrientation, S as SliderColor } from './OrSlider.vue_rollup-plugin-vue_script-d9ba1c84.js';
9
+ import { a as SliderOrientation, S as SliderColor } from './OrSlider.vue_rollup-plugin-vue_script-19fd485e.js';
10
10
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
11
11
 
12
12
  const RangeSlider = [
@@ -197,7 +197,7 @@ var script = defineComponent({
197
197
  if (!props.step) {
198
198
  return [props.minValue, ...props.breakpoints, props.maxValue];
199
199
  }
200
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(props.breakpoints).sort((a, b) => a - b);
200
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step)).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(...props.breakpoints, props.maxValue).sort((a, b) => a - b);
201
201
  });
202
202
  const railBoundingBox = useElementBounding(rail);
203
203
  const selectedControl = ref();
@@ -235,6 +235,21 @@ var script = defineComponent({
235
235
  onMove: onDrag,
236
236
  onEnd: onDrag
237
237
  });
238
+ // Constraints
239
+ watch(toRef(props, 'minValue'), value => {
240
+ if (value >= props.maxValue) {
241
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
242
+ }
243
+ }, {
244
+ immediate: true
245
+ });
246
+ watch(toRef(props, 'maxValue'), value => {
247
+ if (value <= props.minValue) {
248
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
249
+ }
250
+ }, {
251
+ immediate: true
252
+ });
238
253
  return {
239
254
  root,
240
255
  rail,
@@ -1,4 +1,4 @@
1
- import { s as script } from './OrSlider.vue_rollup-plugin-vue_script-d9ba1c84.js';
1
+ import { s as script } from './OrSlider.vue_rollup-plugin-vue_script-19fd485e.js';
2
2
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
3
3
 
4
4
  /* script */
@@ -1,5 +1,5 @@
1
1
  import { useElementBounding, useElementHover, useDraggable, clamp } from '@vueuse/core';
2
- import { defineComponent, ref, computed, toRef } from 'vue-demi';
2
+ import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
3
3
  import './dom-aecadd9a.js';
4
4
  import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
5
5
  import '@onereach/styles/tailwind/plugins/core';
@@ -185,7 +185,7 @@ var script = defineComponent({
185
185
  if (!props.step) {
186
186
  return [props.minValue, ...props.breakpoints, props.maxValue];
187
187
  }
188
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(props.breakpoints).sort((a, b) => a - b);
188
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step)).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(...props.breakpoints, props.maxValue).sort((a, b) => a - b);
189
189
  });
190
190
  const railBoundingBox = useElementBounding(rail);
191
191
  // Handlers
@@ -206,6 +206,21 @@ var script = defineComponent({
206
206
  onMove: onDrag,
207
207
  onEnd: onDrag
208
208
  });
209
+ // Constraints
210
+ watch(toRef(props, 'minValue'), value => {
211
+ if (value >= props.maxValue) {
212
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
213
+ }
214
+ }, {
215
+ immediate: true
216
+ });
217
+ watch(toRef(props, 'maxValue'), value => {
218
+ if (value <= props.minValue) {
219
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
220
+ }
221
+ }, {
222
+ immediate: true
223
+ });
209
224
  return {
210
225
  root,
211
226
  rail,
@@ -92,9 +92,9 @@ export { _ as OrRadio } from '../OrRadio-811ad5a4.js';
92
92
  export { _ as OrRadioGroup } from '../OrRadioGroup-11424644.js';
93
93
  export { _ as OrRadioGroupV3 } from '../OrRadioGroup-c0ad9bf3.js';
94
94
  export { _ as OrRadioV3 } from '../OrRadio-81a1263e.js';
95
- export { _ as OrRangeSliderV3 } from '../OrRangeSlider-43dee9e8.js';
96
- export { _ as OrSliderV3 } from '../OrSlider-7184e800.js';
97
- export { S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from '../OrSlider.vue_rollup-plugin-vue_script-d9ba1c84.js';
95
+ export { _ as OrRangeSliderV3 } from '../OrRangeSlider-255a259f.js';
96
+ export { _ as OrSliderV3 } from '../OrSlider-f90faadb.js';
97
+ export { S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from '../OrSlider.vue_rollup-plugin-vue_script-19fd485e.js';
98
98
  export { _ as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from '../OrResizeablePanel-0888f196.js';
99
99
  export { F as Formats, _ as OrRichTextEditorV3 } from '../OrRichTextEditor-63faaf79.js';
100
100
  export { _ as OrSearch } from '../OrSearch-ac542dd6.js';
@@ -1,5 +1,5 @@
1
- export { _ as OrRangeSliderV3 } from '../../OrRangeSlider-43dee9e8.js';
2
- export { S as RangeSliderColor, a as RangeSliderOrientation } from '../../OrSlider.vue_rollup-plugin-vue_script-d9ba1c84.js';
1
+ export { _ as OrRangeSliderV3 } from '../../OrRangeSlider-255a259f.js';
2
+ export { S as RangeSliderColor, a as RangeSliderOrientation } from '../../OrSlider.vue_rollup-plugin-vue_script-19fd485e.js';
3
3
  import '@vueuse/core';
4
4
  import 'vue-demi';
5
5
  import '../../dom-aecadd9a.js';
@@ -1,5 +1,5 @@
1
- export { _ as OrSliderV3 } from '../../OrSlider-7184e800.js';
2
- export { S as SliderColor, a as SliderOrientation } from '../../OrSlider.vue_rollup-plugin-vue_script-d9ba1c84.js';
1
+ export { _ as OrSliderV3 } from '../../OrSlider-f90faadb.js';
2
+ export { S as SliderColor, a as SliderOrientation } from '../../OrSlider.vue_rollup-plugin-vue_script-19fd485e.js';
3
3
  import '../../normalize-component-6e8e3d80.js';
4
4
  import '@vueuse/core';
5
5
  import 'vue-demi';
@@ -92,9 +92,9 @@ export { _ as OrRadio } from './OrRadio-811ad5a4.js';
92
92
  export { _ as OrRadioGroup } from './OrRadioGroup-11424644.js';
93
93
  export { _ as OrRadioGroupV3 } from './OrRadioGroup-c0ad9bf3.js';
94
94
  export { _ as OrRadioV3 } from './OrRadio-81a1263e.js';
95
- export { _ as OrRangeSliderV3 } from './OrRangeSlider-43dee9e8.js';
96
- export { _ as OrSliderV3 } from './OrSlider-7184e800.js';
97
- export { S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSlider.vue_rollup-plugin-vue_script-d9ba1c84.js';
95
+ export { _ as OrRangeSliderV3 } from './OrRangeSlider-255a259f.js';
96
+ export { _ as OrSliderV3 } from './OrSlider-f90faadb.js';
97
+ export { S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSlider.vue_rollup-plugin-vue_script-19fd485e.js';
98
98
  export { _ as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from './OrResizeablePanel-0888f196.js';
99
99
  export { F as Formats, _ as OrRichTextEditorV3 } from './OrRichTextEditor-63faaf79.js';
100
100
  export { _ as OrSearch } from './OrSearch-ac542dd6.js';
@@ -1,12 +1,12 @@
1
1
  import { useElementBounding, useElementHover, useDraggable, clamp } from '@vueuse/core';
2
- import { defineComponent, ref, computed, toRef } from 'vue-demi';
2
+ import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
3
3
  import './dom-aecadd9a.js';
4
4
  import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
5
5
  import '@onereach/styles/tailwind/plugins/core';
6
6
  import '@onereach/styles/tailwind.config.json';
7
7
  import { s as script$1 } from './OrTooltip-ac2555b8.js';
8
8
  import './OrPopover-062e78f6.js';
9
- import { a as SliderOrientation, S as SliderColor } from './OrSlider-7cdc7ed5.js';
9
+ import { a as SliderOrientation, S as SliderColor } from './OrSlider-8d4a54af.js';
10
10
  import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createVNode, withCtx, toDisplayString } from 'vue';
11
11
 
12
12
  const RangeSlider = [
@@ -197,7 +197,7 @@ var script = defineComponent({
197
197
  if (!props.step) {
198
198
  return [props.minValue, ...props.breakpoints, props.maxValue];
199
199
  }
200
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(props.breakpoints).sort((a, b) => a - b);
200
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step)).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(...props.breakpoints, props.maxValue).sort((a, b) => a - b);
201
201
  });
202
202
  const railBoundingBox = useElementBounding(rail);
203
203
  const selectedControl = ref();
@@ -235,6 +235,21 @@ var script = defineComponent({
235
235
  onMove: onDrag,
236
236
  onEnd: onDrag
237
237
  });
238
+ // Constraints
239
+ watch(toRef(props, 'minValue'), value => {
240
+ if (value >= props.maxValue) {
241
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
242
+ }
243
+ }, {
244
+ immediate: true
245
+ });
246
+ watch(toRef(props, 'maxValue'), value => {
247
+ if (value <= props.minValue) {
248
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
249
+ }
250
+ }, {
251
+ immediate: true
252
+ });
238
253
  return {
239
254
  root,
240
255
  rail,
@@ -1,5 +1,5 @@
1
1
  import { useElementBounding, useElementHover, useDraggable, clamp } from '@vueuse/core';
2
- import { defineComponent, ref, computed, toRef } from 'vue-demi';
2
+ import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
3
3
  import './dom-aecadd9a.js';
4
4
  import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
5
5
  import '@onereach/styles/tailwind/plugins/core';
@@ -186,7 +186,7 @@ var script = defineComponent({
186
186
  if (!props.step) {
187
187
  return [props.minValue, ...props.breakpoints, props.maxValue];
188
188
  }
189
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(props.breakpoints).sort((a, b) => a - b);
189
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step)).fill(null).map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000).concat(...props.breakpoints, props.maxValue).sort((a, b) => a - b);
190
190
  });
191
191
  const railBoundingBox = useElementBounding(rail);
192
192
  // Handlers
@@ -207,6 +207,21 @@ var script = defineComponent({
207
207
  onMove: onDrag,
208
208
  onEnd: onDrag
209
209
  });
210
+ // Constraints
211
+ watch(toRef(props, 'minValue'), value => {
212
+ if (value >= props.maxValue) {
213
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
214
+ }
215
+ }, {
216
+ immediate: true
217
+ });
218
+ watch(toRef(props, 'maxValue'), value => {
219
+ if (value <= props.minValue) {
220
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
221
+ }
222
+ }, {
223
+ immediate: true
224
+ });
210
225
  return {
211
226
  root,
212
227
  rail,
@@ -89,8 +89,8 @@ export { s as OrRadio } from '../OrRadio-40bf2c87.js';
89
89
  export { s as OrRadioGroup } from '../OrRadioGroup-00785e41.js';
90
90
  export { s as OrRadioGroupV3 } from '../OrRadioGroup-b4b6d364.js';
91
91
  export { s as OrRadioV3 } from '../OrRadio-50b0ead5.js';
92
- export { s as OrRangeSliderV3 } from '../OrRangeSlider-6364e907.js';
93
- export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from '../OrSlider-7cdc7ed5.js';
92
+ export { s as OrRangeSliderV3 } from '../OrRangeSlider-5a611a12.js';
93
+ export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from '../OrSlider-8d4a54af.js';
94
94
  export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from '../OrResizeablePanel-5dfd3f6d.js';
95
95
  export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditor-155c8006.js';
96
96
  export { s as OrSearch } from '../OrSearch-2800e9bf.js';
@@ -1,5 +1,5 @@
1
- export { s as OrRangeSliderV3 } from '../../OrRangeSlider-6364e907.js';
2
- export { S as RangeSliderColor, a as RangeSliderOrientation } from '../../OrSlider-7cdc7ed5.js';
1
+ export { s as OrRangeSliderV3 } from '../../OrRangeSlider-5a611a12.js';
2
+ export { S as RangeSliderColor, a as RangeSliderOrientation } from '../../OrSlider-8d4a54af.js';
3
3
  import '@vueuse/core';
4
4
  import 'vue-demi';
5
5
  import '../../dom-aecadd9a.js';
@@ -1,4 +1,4 @@
1
- export { s as OrSliderV3, S as SliderColor, a as SliderOrientation } from '../../OrSlider-7cdc7ed5.js';
1
+ export { s as OrSliderV3, S as SliderColor, a as SliderOrientation } from '../../OrSlider-8d4a54af.js';
2
2
  import '@vueuse/core';
3
3
  import 'vue-demi';
4
4
  import '../../dom-aecadd9a.js';
@@ -89,8 +89,8 @@ export { s as OrRadio } from './OrRadio-40bf2c87.js';
89
89
  export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
90
90
  export { s as OrRadioGroupV3 } from './OrRadioGroup-b4b6d364.js';
91
91
  export { s as OrRadioV3 } from './OrRadio-50b0ead5.js';
92
- export { s as OrRangeSliderV3 } from './OrRangeSlider-6364e907.js';
93
- export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSlider-7cdc7ed5.js';
92
+ export { s as OrRangeSliderV3 } from './OrRangeSlider-5a611a12.js';
93
+ export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSlider-8d4a54af.js';
94
94
  export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from './OrResizeablePanel-5dfd3f6d.js';
95
95
  export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditor-155c8006.js';
96
96
  export { s as OrSearch } from './OrSearch-2800e9bf.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "8.8.2-beta.3728.0",
3
+ "version": "8.8.2-beta.3729.0",
4
4
  "npmUnpacked": "4.15.2",
5
5
  "description": "Vue components library for v2/3",
6
6
  "sideEffects": false,
@@ -40,7 +40,7 @@
40
40
  "@codemirror/lang-json": "6.0.1",
41
41
  "@codemirror/lang-markdown": "6.1.1",
42
42
  "@floating-ui/dom": "1.4.2",
43
- "@onereach/styles": "^6.4.1-beta.3728.0",
43
+ "@onereach/styles": "^6.4.1-beta.3729.0",
44
44
  "@splidejs/splide": "4.0.6",
45
45
  "@tiptap/core": "2.0.3",
46
46
  "@tiptap/extension-blockquote": "2.0.3",
@@ -68,7 +68,7 @@
68
68
 
69
69
  <script lang="ts">
70
70
  import { Position, clamp, useDraggable, useElementBounding, useElementHover } from '@vueuse/core';
71
- import { PropType, computed, defineComponent, ref, toRef } from 'vue-demi';
71
+ import { PropType, computed, defineComponent, ref, toRef, watch } from 'vue-demi';
72
72
  import { useProxyModelValue } from '../../hooks';
73
73
  import { OrTooltipV3 as OrTooltip } from '../or-tooltip-v3';
74
74
  import { RangeSliderColor, RangeSliderOrientation } from './props';
@@ -231,10 +231,10 @@ export default defineComponent({
231
231
  return [props.minValue, ...props.breakpoints, props.maxValue];
232
232
  }
233
233
 
234
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1)
234
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step))
235
235
  .fill(null)
236
236
  .map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000)
237
- .concat(props.breakpoints)
237
+ .concat(...props.breakpoints, props.maxValue)
238
238
  .sort((a, b) => a - b);
239
239
  });
240
240
 
@@ -287,6 +287,19 @@ export default defineComponent({
287
287
  onEnd: onDrag,
288
288
  });
289
289
 
290
+ // Constraints
291
+ watch(toRef(props, 'minValue'), (value) => {
292
+ if (value >= props.maxValue) {
293
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
294
+ }
295
+ }, { immediate: true });
296
+
297
+ watch(toRef(props, 'maxValue'), (value) => {
298
+ if (value <= props.minValue) {
299
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
300
+ }
301
+ }, { immediate: true });
302
+
290
303
  return {
291
304
  root,
292
305
  rail,
@@ -47,7 +47,7 @@
47
47
 
48
48
  <script lang="ts">
49
49
  import { Position, clamp, useDraggable, useElementBounding, useElementHover } from '@vueuse/core';
50
- import { PropType, computed, defineComponent, ref, toRef } from 'vue-demi';
50
+ import { PropType, computed, defineComponent, ref, toRef, watch } from 'vue-demi';
51
51
  import { useProxyModelValue } from '../../hooks';
52
52
  import { OrTooltipV3 as OrTooltip } from '../or-tooltip-v3';
53
53
  import { SliderColor, SliderOrientation } from './props';
@@ -178,10 +178,10 @@ export default defineComponent({
178
178
  return [props.minValue, ...props.breakpoints, props.maxValue];
179
179
  }
180
180
 
181
- return Array(Math.abs(props.maxValue - props.minValue) / props.step + 1)
181
+ return Array(Math.ceil(Math.abs(props.maxValue - props.minValue) / props.step))
182
182
  .fill(null)
183
183
  .map((value, index) => Math.floor((props.minValue + props.step * index) * 1000) / 1000)
184
- .concat(props.breakpoints)
184
+ .concat(...props.breakpoints, props.maxValue)
185
185
  .sort((a, b) => a - b);
186
186
  });
187
187
 
@@ -210,6 +210,19 @@ export default defineComponent({
210
210
  onEnd: onDrag,
211
211
  });
212
212
 
213
+ // Constraints
214
+ watch(toRef(props, 'minValue'), (value) => {
215
+ if (value >= props.maxValue) {
216
+ throw new Error('OrRangeSlider: `minValue` cannot be greater or equal to `maxValue`.');
217
+ }
218
+ }, { immediate: true });
219
+
220
+ watch(toRef(props, 'maxValue'), (value) => {
221
+ if (value <= props.minValue) {
222
+ throw new Error('OrRangeSlider: `maxValue` cannot be lesser or equal to `minValue`.');
223
+ }
224
+ }, { immediate: true });
225
+
213
226
  return {
214
227
  root,
215
228
  rail,