@onereach/ui-components 8.24.1 → 8.24.2-beta.4156.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.
- package/dist/bundled/v2/components/OrRangeSliderV3/OrRangeSlider.js +18 -11
- package/dist/bundled/v2/components/OrRangeSliderV3/styles.d.ts +1 -0
- package/dist/bundled/v2/components/OrRangeSliderV3/styles.js +24 -4
- package/dist/bundled/v2/components/OrSliderV3/OrSlider.js +18 -11
- package/dist/bundled/v2/components/OrSliderV3/styles.d.ts +1 -0
- package/dist/bundled/v2/components/OrSliderV3/styles.js +24 -4
- package/dist/bundled/v2/index.js +1 -1
- package/dist/bundled/v3/components/OrRangeSliderV3/OrRangeSlider.js +1 -1
- package/dist/bundled/v3/components/OrRangeSliderV3/index.js +2 -2
- package/dist/bundled/v3/components/OrRangeSliderV3/props.js +1 -1
- package/dist/bundled/v3/components/OrRangeSliderV3/styles.d.ts +1 -0
- package/dist/bundled/v3/components/OrRangeSliderV3/styles.js +2 -2
- package/dist/bundled/v3/components/{OrRangeSliderV3-f3efc232.js → OrRangeSliderV3-37003ca8.js} +42 -18
- package/dist/bundled/v3/components/OrSliderV3/OrSlider.js +1 -1
- package/dist/bundled/v3/components/OrSliderV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSliderV3/props.js +1 -1
- package/dist/bundled/v3/components/OrSliderV3/styles.d.ts +1 -0
- package/dist/bundled/v3/components/OrSliderV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrSliderV3-8b81d47a.js → OrSliderV3-8912e4bc.js} +41 -17
- package/dist/bundled/v3/components/index.js +2 -2
- package/dist/bundled/v3/index.js +3 -3
- package/dist/esm/v2/{OrRangeSlider-45474510.js → OrRangeSlider-d2340af6.js} +41 -14
- package/dist/esm/v2/{OrSlider-c8b79715.js → OrSlider-8b597ea6.js} +17 -10
- package/dist/esm/v2/{OrSlider.vue_rollup-plugin-vue_script-43f26d1a.js → OrSlider.vue_rollup-plugin-vue_script-2d2013f9.js} +24 -4
- package/dist/esm/v2/components/index.js +3 -3
- package/dist/esm/v2/components/or-range-slider-v3/index.js +2 -2
- package/dist/esm/v2/components/or-range-slider-v3/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-slider-v3/index.js +2 -2
- package/dist/esm/v2/components/or-slider-v3/styles.d.ts +1 -0
- package/dist/esm/v2/index.js +3 -3
- package/dist/esm/v3/{OrRangeSlider-c9947eb2.js → OrRangeSlider-8b2688e5.js} +41 -17
- package/dist/esm/v3/{OrSlider-a5903a40.js → OrSlider-bb98a511.js} +40 -16
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-range-slider-v3/index.js +2 -2
- package/dist/esm/v3/components/or-range-slider-v3/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-slider-v3/index.js +1 -1
- package/dist/esm/v3/components/or-slider-v3/styles.d.ts +1 -0
- package/dist/esm/v3/index.js +2 -2
- package/package.json +2 -3
- package/src/components/or-range-slider-v3/OrRangeSlider.vue +24 -16
- package/src/components/or-range-slider-v3/styles.ts +40 -4
- package/src/components/or-slider-v3/OrSlider.vue +24 -16
- package/src/components/or-slider-v3/styles.ts +40 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as useElementBounding, u as useElementHover, e as useDraggable } from '../../index-76f2ac63.js';
|
|
2
2
|
import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
|
|
3
|
-
import { RangeSlider, RangeSliderOrientations, RangeSliderRail, RangeSliderRailOrientations, RangeSliderOffset, RangeSliderOffsetOrientations, RangeSliderTrack, RangeSliderTrackColors, RangeSliderThumb, RangeSliderThumbColors, RangeSliderBreakpointMark, RangeSliderBreakpointMarkColors, RangeSliderLabel, RangeSliderLabelOrientations, RangeSliderLabelMark } from './styles.js';
|
|
3
|
+
import { RangeSlider, RangeSliderOrientations, RangeSliderRail, RangeSliderRailOrientations, RangeSliderOffset, RangeSliderOffsetOrientations, RangeSliderTrack, RangeSliderTrackColors, RangeSliderThumb, RangeSliderThumbColors, RangeSliderBreakpointMark, RangeSliderBreakpointMarkColors, RangeSliderLabel, RangeSliderLabelOrientations, RangeSliderLabelMark, RangeSliderLabelMarkOrientations } from './styles.js';
|
|
4
4
|
import __vue_component__$1 from '../OrTooltipV3/OrTooltip.js';
|
|
5
5
|
import { SliderColor, SliderOrientation } from '../OrSliderV3/props.js';
|
|
6
6
|
import { useProxyModelValue } from '../../hooks/useProxyModelValue.js';
|
|
@@ -100,7 +100,7 @@ var script = defineComponent({
|
|
|
100
100
|
const thumbStyles = computed(() => ['or-range-slider-thumb-v3', ...RangeSliderThumb, ...RangeSliderThumbColors[props.color]]);
|
|
101
101
|
const breakpointMarkStyles = computed(() => [...RangeSliderBreakpointMark, ...RangeSliderBreakpointMarkColors[props.color]]);
|
|
102
102
|
const labelStyles = computed(() => [...RangeSliderLabel, ...RangeSliderLabelOrientations[props.orientation]]);
|
|
103
|
-
const labelMarkStyles = computed(() => [...RangeSliderLabelMark]);
|
|
103
|
+
const labelMarkStyles = computed(() => [...RangeSliderLabelMark, ...RangeSliderLabelMarkOrientations[props.orientation]]);
|
|
104
104
|
// State
|
|
105
105
|
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit, {
|
|
106
106
|
defaultValue: computed(() => [props.minValue, props.maxValue])
|
|
@@ -417,7 +417,7 @@ var __vue_render__ = function () {
|
|
|
417
417
|
attrs: {
|
|
418
418
|
"disabled": _vm.disabled
|
|
419
419
|
}
|
|
420
|
-
}), _vm._v(" "), _vm._l(_vm.breakpoints, function (breakpoint) {
|
|
420
|
+
}), _vm._v(" "), _vm.breakpoints.length > 0 ? _vm._l([_vm.minValue].concat(_vm.breakpoints, [_vm.maxValue]), function (breakpoint) {
|
|
421
421
|
return _c('div', {
|
|
422
422
|
key: breakpoint,
|
|
423
423
|
class: _vm.breakpointMarkStyles,
|
|
@@ -427,15 +427,22 @@ var __vue_render__ = function () {
|
|
|
427
427
|
"disabled": _vm.disabled
|
|
428
428
|
}
|
|
429
429
|
});
|
|
430
|
-
})], 2), _vm._v(" "), _c('div', {
|
|
430
|
+
}) : _vm._e()], 2), _vm._v(" "), _c('div', {
|
|
431
431
|
class: _vm.labelStyles
|
|
432
|
-
}, [
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
432
|
+
}, _vm._l([_vm.minValue].concat(_vm.breakpoints, [_vm.maxValue]), function (breakpoint) {
|
|
433
|
+
return _c('div', {
|
|
434
|
+
key: breakpoint,
|
|
435
|
+
class: _vm.labelMarkStyles,
|
|
436
|
+
style: _vm.getBreakpointMarkComputedStyles(breakpoint),
|
|
437
|
+
attrs: {
|
|
438
|
+
"disabled": _vm.disabled
|
|
439
|
+
}
|
|
440
|
+
}, [_vm._t(breakpoint + "-label", function () {
|
|
441
|
+
return [_vm._v("\n " + _vm._s(breakpoint) + "\n ")];
|
|
442
|
+
}, {
|
|
443
|
+
"value": breakpoint
|
|
444
|
+
})], 2);
|
|
445
|
+
}), 0)]);
|
|
439
446
|
};
|
|
440
447
|
var __vue_staticRenderFns__ = [];
|
|
441
448
|
|
|
@@ -14,3 +14,4 @@ export declare const RangeSliderBreakpointMarkColors: Record<RangeSliderColor, s
|
|
|
14
14
|
export declare const RangeSliderLabel: string[];
|
|
15
15
|
export declare const RangeSliderLabelOrientations: Record<RangeSliderOrientation, string[]>;
|
|
16
16
|
export declare const RangeSliderLabelMark: string[];
|
|
17
|
+
export declare const RangeSliderLabelMarkOrientations: Record<RangeSliderOrientation, string[]>;
|
|
@@ -144,7 +144,9 @@ const RangeSliderBreakpointMarkColors = {
|
|
|
144
144
|
// Theme (disabled)
|
|
145
145
|
'disabled:!bg-on-disabled', 'dark:disabled:!bg-on-disabled-dark']
|
|
146
146
|
};
|
|
147
|
-
const RangeSliderLabel = [
|
|
147
|
+
const RangeSliderLabel = [
|
|
148
|
+
// Position
|
|
149
|
+
'relative'];
|
|
148
150
|
const RangeSliderLabelOrientations = {
|
|
149
151
|
[SliderOrientation.Horizontal]: [
|
|
150
152
|
// Layout
|
|
@@ -168,9 +170,27 @@ const RangeSliderLabelOrientations = {
|
|
|
168
170
|
'h-full']
|
|
169
171
|
};
|
|
170
172
|
const RangeSliderLabelMark = [
|
|
173
|
+
// Position
|
|
174
|
+
'absolute',
|
|
171
175
|
// Typography
|
|
172
|
-
'typography-caption-regular',
|
|
176
|
+
'typography-caption-regular whitespace-nowrap',
|
|
173
177
|
// Theme
|
|
174
|
-
'theme-foreground-
|
|
178
|
+
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
179
|
+
// Theme (hover)
|
|
180
|
+
'hover:theme-foreground-default', 'dark:hover:theme-foreground-default-dark'];
|
|
181
|
+
const RangeSliderLabelMarkOrientations = {
|
|
182
|
+
[SliderOrientation.Horizontal]: [
|
|
183
|
+
// Position
|
|
184
|
+
'-translate-x-1/2', 'translate-y-1/2'],
|
|
185
|
+
[SliderOrientation.HorizontalReversed]: [
|
|
186
|
+
// Position
|
|
187
|
+
'translate-x-1/2', 'translate-y-1/2'],
|
|
188
|
+
[SliderOrientation.Vertical]: [
|
|
189
|
+
// Position
|
|
190
|
+
'translate-x-1/2', 'translate-y-1/2'],
|
|
191
|
+
[SliderOrientation.VerticalReversed]: [
|
|
192
|
+
// Position
|
|
193
|
+
'translate-x-1/2', '-translate-y-1/2']
|
|
194
|
+
};
|
|
175
195
|
|
|
176
|
-
export { RangeSlider, RangeSliderBreakpointMark, RangeSliderBreakpointMarkColors, RangeSliderLabel, RangeSliderLabelMark, RangeSliderLabelOrientations, RangeSliderOffset, RangeSliderOffsetOrientations, RangeSliderOrientations, RangeSliderRail, RangeSliderRailOrientations, RangeSliderThumb, RangeSliderThumbColors, RangeSliderTrack, RangeSliderTrackColors };
|
|
196
|
+
export { RangeSlider, RangeSliderBreakpointMark, RangeSliderBreakpointMarkColors, RangeSliderLabel, RangeSliderLabelMark, RangeSliderLabelMarkOrientations, RangeSliderLabelOrientations, RangeSliderOffset, RangeSliderOffsetOrientations, RangeSliderOrientations, RangeSliderRail, RangeSliderRailOrientations, RangeSliderThumb, RangeSliderThumbColors, RangeSliderTrack, RangeSliderTrackColors };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as useElementBounding, u as useElementHover, e as useDraggable } from '../../index-76f2ac63.js';
|
|
2
2
|
import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
|
|
3
3
|
import { SliderColor, SliderOrientation } from './props.js';
|
|
4
|
-
import { Slider, SliderOrientations, SliderRail, SliderRailOrientations, SliderTrack, SliderTrackColors, SliderThumb, SliderThumbColors, SliderBreakpointMark, SliderBreakpointMarkColors, SliderLabel, SliderLabelOrientations, SliderLabelMark } from './styles.js';
|
|
4
|
+
import { Slider, SliderOrientations, SliderRail, SliderRailOrientations, SliderTrack, SliderTrackColors, SliderThumb, SliderThumbColors, SliderBreakpointMark, SliderBreakpointMarkColors, SliderLabel, SliderLabelOrientations, SliderLabelMark, SliderLabelMarkOrientations } from './styles.js';
|
|
5
5
|
import __vue_component__$1 from '../OrTooltipV3/OrTooltip.js';
|
|
6
6
|
import { c as clamp } from '../../index-1612099e.js';
|
|
7
7
|
import { useProxyModelValue } from '../../hooks/useProxyModelValue.js';
|
|
@@ -81,7 +81,7 @@ var script = defineComponent({
|
|
|
81
81
|
const thumbStyles = computed(() => ['or-slider-thumb-v3', ...SliderThumb, ...SliderThumbColors[props.color]]);
|
|
82
82
|
const breakpointMarkStyles = computed(() => [...SliderBreakpointMark, ...SliderBreakpointMarkColors[props.color]]);
|
|
83
83
|
const labelStyles = computed(() => [...SliderLabel, ...SliderLabelOrientations[props.orientation]]);
|
|
84
|
-
const labelMarkStyles = computed(() => [...SliderLabelMark]);
|
|
84
|
+
const labelMarkStyles = computed(() => [...SliderLabelMark, ...SliderLabelMarkOrientations[props.orientation]]);
|
|
85
85
|
// State
|
|
86
86
|
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit, {
|
|
87
87
|
defaultValue: toRef(props, 'minValue')
|
|
@@ -257,7 +257,7 @@ var __vue_render__ = function () {
|
|
|
257
257
|
attrs: {
|
|
258
258
|
"disabled": _vm.disabled
|
|
259
259
|
}
|
|
260
|
-
})]), _vm._v(" "), _vm._l(_vm.breakpoints, function (breakpoint) {
|
|
260
|
+
})]), _vm._v(" "), _vm.breakpoints.length > 0 ? _vm._l([_vm.minValue].concat(_vm.breakpoints, [_vm.maxValue]), function (breakpoint) {
|
|
261
261
|
return _c('div', {
|
|
262
262
|
key: breakpoint,
|
|
263
263
|
class: _vm.breakpointMarkStyles,
|
|
@@ -267,15 +267,22 @@ var __vue_render__ = function () {
|
|
|
267
267
|
"disabled": _vm.disabled
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
|
-
})], 2), _vm._v(" "), _c('div', {
|
|
270
|
+
}) : _vm._e()], 2), _vm._v(" "), _c('div', {
|
|
271
271
|
class: _vm.labelStyles
|
|
272
|
-
}, [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
272
|
+
}, _vm._l([_vm.minValue].concat(_vm.breakpoints, [_vm.maxValue]), function (breakpoint) {
|
|
273
|
+
return _c('div', {
|
|
274
|
+
key: breakpoint,
|
|
275
|
+
class: _vm.labelMarkStyles,
|
|
276
|
+
style: _vm.getBreakpointMarkComputedStyles(breakpoint),
|
|
277
|
+
attrs: {
|
|
278
|
+
"disabled": _vm.disabled
|
|
279
|
+
}
|
|
280
|
+
}, [_vm._t(breakpoint + "-label", function () {
|
|
281
|
+
return [_vm._v("\n " + _vm._s(breakpoint) + "\n ")];
|
|
282
|
+
}, {
|
|
283
|
+
"value": breakpoint
|
|
284
|
+
})], 2);
|
|
285
|
+
}), 0)]);
|
|
279
286
|
};
|
|
280
287
|
var __vue_staticRenderFns__ = [];
|
|
281
288
|
|
|
@@ -12,3 +12,4 @@ export declare const SliderBreakpointMarkColors: Record<SliderColor, string[]>;
|
|
|
12
12
|
export declare const SliderLabel: string[];
|
|
13
13
|
export declare const SliderLabelOrientations: Record<SliderOrientation, string[]>;
|
|
14
14
|
export declare const SliderLabelMark: string[];
|
|
15
|
+
export declare const SliderLabelMarkOrientations: Record<SliderOrientation, string[]>;
|
|
@@ -129,7 +129,9 @@ const SliderBreakpointMarkColors = {
|
|
|
129
129
|
// Theme (disabled)
|
|
130
130
|
'disabled:!bg-on-disabled', 'dark:disabled:!bg-on-disabled-dark']
|
|
131
131
|
};
|
|
132
|
-
const SliderLabel = [
|
|
132
|
+
const SliderLabel = [
|
|
133
|
+
// Position
|
|
134
|
+
'relative'];
|
|
133
135
|
const SliderLabelOrientations = {
|
|
134
136
|
[SliderOrientation.Horizontal]: [
|
|
135
137
|
// Layout
|
|
@@ -153,9 +155,27 @@ const SliderLabelOrientations = {
|
|
|
153
155
|
'h-full']
|
|
154
156
|
};
|
|
155
157
|
const SliderLabelMark = [
|
|
158
|
+
// Position
|
|
159
|
+
'absolute',
|
|
156
160
|
// Typography
|
|
157
|
-
'typography-caption-regular',
|
|
161
|
+
'typography-caption-regular whitespace-nowrap',
|
|
158
162
|
// Theme
|
|
159
|
-
'theme-foreground-
|
|
163
|
+
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
164
|
+
// Theme (hover)
|
|
165
|
+
'hover:theme-foreground-default', 'dark:hover:theme-foreground-default-dark'];
|
|
166
|
+
const SliderLabelMarkOrientations = {
|
|
167
|
+
[SliderOrientation.Horizontal]: [
|
|
168
|
+
// Position
|
|
169
|
+
'-translate-x-1/2', 'translate-y-1/2'],
|
|
170
|
+
[SliderOrientation.HorizontalReversed]: [
|
|
171
|
+
// Position
|
|
172
|
+
'translate-x-1/2', 'translate-y-1/2'],
|
|
173
|
+
[SliderOrientation.Vertical]: [
|
|
174
|
+
// Position
|
|
175
|
+
'translate-x-1/2', 'translate-y-1/2'],
|
|
176
|
+
[SliderOrientation.VerticalReversed]: [
|
|
177
|
+
// Position
|
|
178
|
+
'translate-x-1/2', '-translate-y-1/2']
|
|
179
|
+
};
|
|
160
180
|
|
|
161
|
-
export { Slider, SliderBreakpointMark, SliderBreakpointMarkColors, SliderLabel, SliderLabelMark, SliderLabelOrientations, SliderOrientations, SliderRail, SliderRailOrientations, SliderThumb, SliderThumbColors, SliderTrack, SliderTrackColors };
|
|
181
|
+
export { Slider, SliderBreakpointMark, SliderBreakpointMarkColors, SliderLabel, SliderLabelMark, SliderLabelMarkOrientations, SliderLabelOrientations, SliderOrientations, SliderRail, SliderRailOrientations, SliderThumb, SliderThumbColors, SliderTrack, SliderTrackColors };
|