@coreui/vue-pro 5.7.0 → 5.8.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 (70) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/components/date-picker/CDatePicker.d.ts +19 -0
  3. package/dist/cjs/components/date-picker/CDatePicker.js +9 -0
  4. package/dist/cjs/components/date-picker/CDatePicker.js.map +1 -1
  5. package/dist/cjs/components/date-range-picker/CDateRangePicker.d.ts +19 -0
  6. package/dist/cjs/components/date-range-picker/CDateRangePicker.js +26 -1
  7. package/dist/cjs/components/date-range-picker/CDateRangePicker.js.map +1 -1
  8. package/dist/cjs/components/index.d.ts +1 -0
  9. package/dist/cjs/components/index.js +28 -24
  10. package/dist/cjs/components/index.js.map +1 -1
  11. package/dist/cjs/components/picker/CPicker.d.ts +19 -0
  12. package/dist/cjs/components/picker/CPicker.js +32 -7
  13. package/dist/cjs/components/picker/CPicker.js.map +1 -1
  14. package/dist/cjs/components/range-slider/CRangeSlider.d.ts +241 -0
  15. package/dist/cjs/components/range-slider/CRangeSlider.js +311 -0
  16. package/dist/cjs/components/range-slider/CRangeSlider.js.map +1 -0
  17. package/dist/cjs/components/range-slider/index.d.ts +6 -0
  18. package/dist/cjs/components/range-slider/index.js +13 -0
  19. package/dist/cjs/components/range-slider/index.js.map +1 -0
  20. package/dist/cjs/components/range-slider/types.d.ts +11 -0
  21. package/dist/cjs/components/range-slider/utils.d.ts +38 -0
  22. package/dist/cjs/components/range-slider/utils.js +172 -0
  23. package/dist/cjs/components/range-slider/utils.js.map +1 -0
  24. package/dist/cjs/components/sidebar/CSidebar.js +0 -1
  25. package/dist/cjs/components/sidebar/CSidebar.js.map +1 -1
  26. package/dist/cjs/components/time-picker/CTimePicker.d.ts +19 -0
  27. package/dist/cjs/components/time-picker/CTimePicker.js +26 -1
  28. package/dist/cjs/components/time-picker/CTimePicker.js.map +1 -1
  29. package/dist/cjs/index.js +34 -30
  30. package/dist/cjs/index.js.map +1 -1
  31. package/dist/esm/components/date-picker/CDatePicker.d.ts +19 -0
  32. package/dist/esm/components/date-picker/CDatePicker.js +9 -0
  33. package/dist/esm/components/date-picker/CDatePicker.js.map +1 -1
  34. package/dist/esm/components/date-range-picker/CDateRangePicker.d.ts +19 -0
  35. package/dist/esm/components/date-range-picker/CDateRangePicker.js +26 -1
  36. package/dist/esm/components/date-range-picker/CDateRangePicker.js.map +1 -1
  37. package/dist/esm/components/index.d.ts +1 -0
  38. package/dist/esm/components/index.js +2 -0
  39. package/dist/esm/components/index.js.map +1 -1
  40. package/dist/esm/components/picker/CPicker.d.ts +19 -0
  41. package/dist/esm/components/picker/CPicker.js +32 -7
  42. package/dist/esm/components/picker/CPicker.js.map +1 -1
  43. package/dist/esm/components/range-slider/CRangeSlider.d.ts +241 -0
  44. package/dist/esm/components/range-slider/CRangeSlider.js +309 -0
  45. package/dist/esm/components/range-slider/CRangeSlider.js.map +1 -0
  46. package/dist/esm/components/range-slider/index.d.ts +6 -0
  47. package/dist/esm/components/range-slider/index.js +10 -0
  48. package/dist/esm/components/range-slider/index.js.map +1 -0
  49. package/dist/esm/components/range-slider/types.d.ts +11 -0
  50. package/dist/esm/components/range-slider/utils.d.ts +38 -0
  51. package/dist/esm/components/range-slider/utils.js +157 -0
  52. package/dist/esm/components/range-slider/utils.js.map +1 -0
  53. package/dist/esm/components/sidebar/CSidebar.js +0 -1
  54. package/dist/esm/components/sidebar/CSidebar.js.map +1 -1
  55. package/dist/esm/components/time-picker/CTimePicker.d.ts +19 -0
  56. package/dist/esm/components/time-picker/CTimePicker.js +26 -1
  57. package/dist/esm/components/time-picker/CTimePicker.js.map +1 -1
  58. package/dist/esm/index.js +2 -0
  59. package/dist/esm/index.js.map +1 -1
  60. package/package.json +3 -3
  61. package/src/components/date-picker/CDatePicker.ts +9 -0
  62. package/src/components/date-range-picker/CDateRangePicker.ts +26 -2
  63. package/src/components/index.ts +1 -0
  64. package/src/components/picker/CPicker.ts +43 -7
  65. package/src/components/range-slider/CRangeSlider.ts +420 -0
  66. package/src/components/range-slider/index.ts +10 -0
  67. package/src/components/range-slider/types.ts +16 -0
  68. package/src/components/range-slider/utils.ts +241 -0
  69. package/src/components/sidebar/CSidebar.ts +0 -1
  70. package/src/components/time-picker/CTimePicker.ts +26 -1
@@ -0,0 +1,309 @@
1
+ import { defineComponent, ref, watch, onMounted, h } from 'vue';
2
+ import { getThumbSize, calculateMoveValue, updateValue, calculateTooltipPosition, updateGradient, calculateLabelPosition, getLabelValue, calculateClickValue, getNearestValueIndex, validateValue } from './utils.js';
3
+ import isRTL from '../../utils/isRTL.js';
4
+
5
+ const CRangeSlider = defineComponent({
6
+ name: 'CRangeSlider',
7
+ props: {
8
+ /**
9
+ * Enable or disable clickable labels in the Vue Range Slider.
10
+ * When set to `true`, users can click on labels to adjust the slider's value directly, enhancing interactivity and user experience.
11
+ */
12
+ clickableLabels: {
13
+ type: Boolean,
14
+ default: true,
15
+ },
16
+ /**
17
+ * Control the interactive state of the Vue Range Slider with the `disabled` prop.
18
+ * Setting it to `true` will disable all slider functionalities, preventing user interaction and visually indicating a non-interactive state.
19
+ */
20
+ disabled: {
21
+ type: Boolean,
22
+ default: false,
23
+ },
24
+ /**
25
+ * Define the minimum distance between slider handles using the `distance` prop in the Vue Range Slider.
26
+ * This ensures that the handles maintain a specified separation, preventing overlap and maintaining clear value distinctions.
27
+ */
28
+ distance: {
29
+ type: Number,
30
+ default: 0,
31
+ },
32
+ /**
33
+ * Add descriptive labels to your Vue Range Slider by providing an array of `labels`.
34
+ * These labels enhance the slider's usability by clearly indicating key values and providing contextual information to users.
35
+ */
36
+ labels: {
37
+ type: Array,
38
+ default: () => [],
39
+ },
40
+ /**
41
+ * Specify the maximum value for the Vue Range Slider with the `max` prop.
42
+ * This determines the upper limit of the slider's range, enabling precise control over the highest selectable value.
43
+ */
44
+ max: {
45
+ type: Number,
46
+ default: 100,
47
+ },
48
+ /**
49
+ * Set the minimum value for the Vue Range Slider using the `min` prop.
50
+ * This defines the lower bound of the slider's range, allowing you to control the starting point of user selection.
51
+ */
52
+ min: {
53
+ type: Number,
54
+ default: 0,
55
+ },
56
+ /**
57
+ * The default name for a value passed using v-model.
58
+ */
59
+ modelValue: [Number, Array],
60
+ /**
61
+ * Assign a `name` to the Vue Range Slider for form integration.
62
+ * Whether using a single string or an array of strings, this prop ensures that the slider's values are correctly identified when submitting forms.
63
+ */
64
+ name: {
65
+ type: [String, Array],
66
+ default: '',
67
+ },
68
+ /**
69
+ * Control the granularity of the Vue Range Slider by setting the `step` prop.
70
+ * This defines the increment intervals between selectable values, allowing for precise adjustments based on your application's requirements.
71
+ */
72
+ step: {
73
+ type: Number,
74
+ default: 1,
75
+ },
76
+ /**
77
+ * Toggle the visibility of tooltips in the Vue Range Slider with the `tooltips` prop.
78
+ * When enabled, tooltips display the current value of the slider handles, providing real-time feedback to users.
79
+ */
80
+ tooltips: {
81
+ type: Boolean,
82
+ default: true,
83
+ },
84
+ /**
85
+ * Customize the display format of tooltips in the Vue Range Slider using the `tooltipsFormat` function.
86
+ * This allows you to format the tooltip values according to your specific requirements, enhancing the clarity and presentation of information.
87
+ */
88
+ tooltipsFormat: {
89
+ type: Function,
90
+ default: null,
91
+ },
92
+ /**
93
+ * Controls the visual representation of the slider's track. When set to `'fill'`, the track is dynamically filled based on the slider's value(s). Setting it to `false` disables the filled track.
94
+ */
95
+ track: {
96
+ type: [Boolean, String],
97
+ default: 'fill',
98
+ validator: (value) => {
99
+ return typeof value === 'boolean' || value === 'fill';
100
+ },
101
+ },
102
+ /**
103
+ * Set the current value(s) of the Vue Range Slider using the `value` prop.
104
+ * Whether you're using a single value or an array for multi-handle sliders, this prop controls the slider's position and ensures it reflects the desired state.
105
+ */
106
+ value: {
107
+ type: [Number, Array],
108
+ default: () => [0],
109
+ },
110
+ /**
111
+ * Orient the Vue Range Slider vertically by setting the `vertical` prop to `true`.
112
+ * This changes the slider's layout from horizontal to vertical, providing a different aesthetic and fitting various UI designs.
113
+ */
114
+ vertical: {
115
+ type: Boolean,
116
+ default: false,
117
+ },
118
+ },
119
+ emits: [
120
+ 'change',
121
+ /**
122
+ * Emit the new value whenever there’s a change event.
123
+ */
124
+ 'update:modelValue',
125
+ ],
126
+ setup(props, { emit }) {
127
+ const rangeSliderRef = ref(null);
128
+ const inputsRef = ref([]);
129
+ const labelsContainerRef = ref(null);
130
+ const labelsRef = ref([]);
131
+ const trackRef = ref(null);
132
+ const currentValue = ref(props.modelValue
133
+ ? Array.isArray(props.modelValue)
134
+ ? props.modelValue
135
+ : [props.modelValue]
136
+ : Array.isArray(props.value)
137
+ ? props.value
138
+ : [props.value]);
139
+ const isDragging = ref(false);
140
+ const dragIndex = ref(0);
141
+ const thumbSize = ref();
142
+ watch(() => props.value, (newVal) => {
143
+ currentValue.value = Array.isArray(newVal) ? newVal : [newVal];
144
+ });
145
+ watch(() => props.modelValue, (newVal) => {
146
+ if (newVal !== undefined) {
147
+ currentValue.value = Array.isArray(newVal) ? newVal : [newVal];
148
+ }
149
+ });
150
+ // Adjust labels container size based on labels
151
+ onMounted(() => {
152
+ const maxSize = Math.max(...labelsRef.value.map((label) => props.vertical ? label.offsetWidth : label.offsetHeight));
153
+ if (labelsContainerRef.value) {
154
+ labelsContainerRef.value.style[props.vertical ? 'width' : 'height'] = `${maxSize}px`;
155
+ }
156
+ if (rangeSliderRef.value) {
157
+ thumbSize.value = getThumbSize(rangeSliderRef.value, props.vertical);
158
+ }
159
+ });
160
+ watch(isDragging, (newVal) => {
161
+ if (newVal) {
162
+ window.addEventListener('mousemove', handleMouseMove);
163
+ window.addEventListener('mouseup', handleMouseUp);
164
+ }
165
+ else {
166
+ window.removeEventListener('mousemove', handleMouseMove);
167
+ window.removeEventListener('mouseup', handleMouseUp);
168
+ }
169
+ });
170
+ const updateNearestValue = (value) => {
171
+ const nearestIndex = getNearestValueIndex(value, currentValue.value);
172
+ const newCurrentValue = [...currentValue.value];
173
+ newCurrentValue[nearestIndex] = validateValue(value, currentValue.value, props.distance, nearestIndex);
174
+ setTimeout(() => {
175
+ if (inputsRef.value[nearestIndex]) {
176
+ inputsRef.value[nearestIndex].focus();
177
+ }
178
+ }, 0);
179
+ currentValue.value = newCurrentValue;
180
+ emit('change', newCurrentValue);
181
+ emit('update:modelValue', newCurrentValue);
182
+ };
183
+ const handleInputChange = (event, index) => {
184
+ if (props.disabled)
185
+ return;
186
+ const target = event.target;
187
+ const value = Number(target.value);
188
+ const newCurrentValue = updateValue(value, currentValue.value, props.distance, index);
189
+ currentValue.value = newCurrentValue;
190
+ emit('change', newCurrentValue);
191
+ emit('update:modelValue', newCurrentValue);
192
+ };
193
+ const handleInputsContainerMouseDown = (event) => {
194
+ if (!trackRef.value)
195
+ return;
196
+ const clickValue = calculateClickValue(event, trackRef.value, props.min, props.max, props.step, props.vertical, isRTL(rangeSliderRef.value));
197
+ const index = getNearestValueIndex(clickValue, currentValue.value);
198
+ isDragging.value = true;
199
+ dragIndex.value = index;
200
+ updateNearestValue(clickValue);
201
+ };
202
+ const handleLabelClick = (value) => {
203
+ if (!props.clickableLabels || props.disabled)
204
+ return;
205
+ updateNearestValue(value);
206
+ };
207
+ const handleMouseMove = (event) => {
208
+ if (!isDragging.value || !trackRef.value)
209
+ return;
210
+ const moveValue = calculateMoveValue(event, trackRef.value, props.min, props.max, props.step, props.vertical, isRTL(rangeSliderRef.value));
211
+ const newCurrentValue = updateValue(moveValue, currentValue.value, props.distance, dragIndex.value);
212
+ currentValue.value = newCurrentValue;
213
+ emit('change', newCurrentValue);
214
+ emit('update:modelValue', newCurrentValue);
215
+ };
216
+ const handleMouseUp = () => {
217
+ isDragging.value = false;
218
+ };
219
+ return () => h('div', {
220
+ class: [
221
+ 'range-slider',
222
+ {
223
+ 'range-slider-vertical': props.vertical,
224
+ disabled: props.disabled,
225
+ },
226
+ ],
227
+ ref: rangeSliderRef,
228
+ }, [
229
+ h('div', {
230
+ class: 'range-slider-inputs-container',
231
+ onMousedown: handleInputsContainerMouseDown,
232
+ }, [
233
+ currentValue.value.map((value, index) => [
234
+ h('input', {
235
+ class: 'range-slider-input',
236
+ type: 'range',
237
+ min: props.min,
238
+ max: props.max,
239
+ step: props.step,
240
+ value: value,
241
+ name: Array.isArray(props.name)
242
+ ? props.name[index]
243
+ : `${props.name || ''}-${index}`,
244
+ role: 'slider',
245
+ 'aria-valuemin': props.min,
246
+ 'aria-valuemax': props.max,
247
+ 'aria-valuenow': value,
248
+ 'aria-orientation': props.vertical ? 'vertical' : 'horizontal',
249
+ disabled: props.disabled,
250
+ onInput: (e) => handleInputChange(e, index),
251
+ ref: (el) => {
252
+ inputsRef.value[index] = el;
253
+ },
254
+ }),
255
+ props.tooltips &&
256
+ h('div', {
257
+ class: 'range-slider-tooltip',
258
+ ...(thumbSize.value && {
259
+ style: calculateTooltipPosition(props.min, props.max, value, thumbSize.value, props.vertical, isRTL(rangeSliderRef.value)),
260
+ }),
261
+ }, [
262
+ h('div', { class: 'range-slider-tooltip-inner' }, [
263
+ props.tooltipsFormat ? props.tooltipsFormat(value) : value,
264
+ ]),
265
+ h('div', { class: 'range-slider-tooltip-arrow' }),
266
+ ]),
267
+ ]),
268
+ h('div', {
269
+ class: 'range-slider-track',
270
+ ...(props.track && {
271
+ style: updateGradient(props.min, props.max, currentValue.value, props.vertical),
272
+ }),
273
+ ref: trackRef,
274
+ }),
275
+ ]),
276
+ Array.isArray(props.labels) &&
277
+ props.labels.length > 0 &&
278
+ h('div', {
279
+ class: 'range-slider-labels-container',
280
+ ref: labelsContainerRef,
281
+ }, props.labels.map((label, index) => {
282
+ const labelPosition = calculateLabelPosition(props.min, props.max, props.labels, label, index);
283
+ const labelValue = getLabelValue(props.min, props.max, props.labels, label, index);
284
+ const labelStyle = {
285
+ ...(props.vertical ? { bottom: labelPosition } : { left: labelPosition }),
286
+ ...(typeof label === 'object' && 'style' in label ? label.style : {}),
287
+ };
288
+ return h('div', {
289
+ class: [
290
+ 'range-slider-label',
291
+ {
292
+ clickable: props.clickableLabels,
293
+ },
294
+ typeof label === 'object' && 'className' in label ? label.className : '',
295
+ ],
296
+ style: labelStyle,
297
+ onMousedown: () => handleLabelClick(labelValue),
298
+ key: index,
299
+ ref: (el) => {
300
+ labelsRef.value[index] = el;
301
+ },
302
+ }, typeof label === 'object' && 'label' in label ? label.label : label);
303
+ })),
304
+ ]);
305
+ },
306
+ });
307
+
308
+ export { CRangeSlider };
309
+ //# sourceMappingURL=CRangeSlider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CRangeSlider.js","sources":["../../../../src/components/range-slider/CRangeSlider.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAmBM,MAAA,YAAY,GAAG,eAAe,CAAC;AACnC,IAAA,IAAI,EAAE,cAAc;AACpB,IAAA,KAAK,EAAE;AACL;;;AAGG;AACH,QAAA,eAAe,EAAE;AACf,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD;;;AAGG;AACH,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,KAAK;AACf,SAAA;AACD;;;AAGG;AACH,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,CAAC;AACX,SAAA;AACD;;;AAGG;AACH,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,KAA0B;AAChC,YAAA,OAAO,EAAE,MAAM,EAAE;AAClB,SAAA;AACD;;;AAGG;AACH,QAAA,GAAG,EAAE;AACH,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,GAAG;AACb,SAAA;AACD;;;AAGG;AACH,QAAA,GAAG,EAAE;AACH,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,CAAC;AACX,SAAA;AACD;;AAEG;AACH,QAAA,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,CAAgC;AAC1D;;;AAGG;AACH,QAAA,IAAI,EAAE;AACJ,YAA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OAAO,CAAC,CACN,KAAK,EACL;AACE,wBAAA,KAAK,EAAE;4BACL,oBAAoB;AACpB,4BAAA;gCACE,SAAS,EAAE,KAAK,CAAC,eAAe;AACjC,6BAAA;AACD,4BAAA,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,IAAI,KAAK,GAAG,KAAK,CAAC,SAAS,GAAG,EAAE;AACzE,yBAAA;AACD,wBAAA,KAAK,EAAE,UAAU;AACjB,wBAAA,WAAW,EAAE,MAAM,gBAAgB,CAAC,UAAU,CAAC;AAC/C,wBAAA,GAAG,EAAE,KAAK;AACV,wBAAA,GAAG,EAAE,CAAC,EAAE,KAAI;AACV,4BAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAoB;yBAC9C;AACF,qBAAA,EACD,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CACpE;AACH,iBAAC,CAAC,CACH;AACJ,SAAA,CACF;KACJ;AACF,CAAA;;;;"}
@@ -0,0 +1,6 @@
1
+ import { App } from 'vue';
2
+ import { CRangeSlider } from './CRangeSlider';
3
+ declare const CRangeSliderPlugin: {
4
+ install: (app: App) => void;
5
+ };
6
+ export { CRangeSliderPlugin, CRangeSlider };
@@ -0,0 +1,10 @@
1
+ import { CRangeSlider } from './CRangeSlider.js';
2
+
3
+ const CRangeSliderPlugin = {
4
+ install: (app) => {
5
+ app.component(CRangeSlider.name, CRangeSlider);
6
+ },
7
+ };
8
+
9
+ export { CRangeSlider, CRangeSliderPlugin };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/range-slider/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA,MAAM,kBAAkB,GAAG;AACzB,IAAA,OAAO,EAAE,CAAC,GAAQ,KAAU;QAC1B,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,IAAc,EAAE,YAAY,CAAC;KACzD;;;;;"}
@@ -0,0 +1,11 @@
1
+ import type { VNode } from 'vue';
2
+ export type Label = {
3
+ label: number | string | VNode;
4
+ value: number;
5
+ className?: string | string[] | Record<string, boolean>;
6
+ style?: Record<string, any>;
7
+ } | VNode | string;
8
+ export type ThumbSize = {
9
+ value: number;
10
+ unit: string | null;
11
+ };
@@ -0,0 +1,38 @@
1
+ import type { Label, ThumbSize } from './types';
2
+ export declare const calculateClickValue: (event: MouseEvent, container: HTMLDivElement, min: number, max: number, step: number, vertical: boolean, rtl: boolean) => number;
3
+ export declare const calculateMoveValue: (event: MouseEvent, container: HTMLDivElement, min: number, max: number, step: number, vertical: boolean, rtl: boolean) => number;
4
+ export declare const calculateVerticalPosition: (mouseY: number, rect: DOMRect) => number | "max" | "min";
5
+ export declare const calculateHorizontalPosition: (mouseX: number, rect: DOMRect, rtl: boolean) => number | "max" | "min";
6
+ export declare const calculateLabelPosition: (min: number, max: number, labels: Label[], label: Label, index: number) => string;
7
+ export declare const calculateTooltipPosition: (min: number, max: number, value: number, thumbSize: ThumbSize, vertical: boolean, rtl: boolean) => {
8
+ bottom: string;
9
+ marginBottom: string;
10
+ right?: undefined;
11
+ marginRight?: undefined;
12
+ left?: undefined;
13
+ marginLeft?: undefined;
14
+ } | {
15
+ right: string;
16
+ marginRight: string;
17
+ bottom?: undefined;
18
+ marginBottom?: undefined;
19
+ left?: undefined;
20
+ marginLeft?: undefined;
21
+ } | {
22
+ left: string;
23
+ marginLeft: string;
24
+ bottom?: undefined;
25
+ marginBottom?: undefined;
26
+ right?: undefined;
27
+ marginRight?: undefined;
28
+ };
29
+ export declare const getClickPosition: (event: MouseEvent, container: HTMLDivElement, vertical: boolean, rtl: boolean) => number;
30
+ export declare const getLabelValue: (min: number, max: number, labels: Label[], label: Label, index: number) => number;
31
+ export declare const getNearestValueIndex: (value: number, values: number[]) => number;
32
+ export declare const getThumbSize: (element: HTMLDivElement, vertical: boolean) => ThumbSize | null;
33
+ export declare const roundToStep: (number: number, step: number) => number;
34
+ export declare const updateGradient: (min: number, max: number, values: number[], vertical: boolean) => {
35
+ backgroundImage: string;
36
+ };
37
+ export declare const updateValue: (value: number, values: number[], distance: number, index: number) => number[];
38
+ export declare const validateValue: (value: number, values: number[], distance: number, index: number) => number;
@@ -0,0 +1,157 @@
1
+ const calculateClickValue = (event, container, min, max, step, vertical, rtl) => {
2
+ const clickPosition = getClickPosition(event, container, vertical, rtl);
3
+ const value = min + clickPosition * (max - min);
4
+ return roundToStep(value, step);
5
+ };
6
+ const calculateMoveValue = (event, container, min, max, step, vertical, rtl) => {
7
+ const rect = container.getBoundingClientRect();
8
+ const position = vertical
9
+ ? calculateVerticalPosition(event.clientY, rect)
10
+ : calculateHorizontalPosition(event.clientX, rect, rtl);
11
+ if (typeof position === 'string') {
12
+ return position === 'max' ? max : min;
13
+ }
14
+ const value = min + position * (max - min);
15
+ return roundToStep(value, step);
16
+ };
17
+ const calculateVerticalPosition = (mouseY, rect) => {
18
+ if (mouseY < rect.top) {
19
+ return 'max';
20
+ }
21
+ if (mouseY > rect.bottom) {
22
+ return 'min';
23
+ }
24
+ return Math.min(Math.max((rect.bottom - mouseY) / rect.height, 0), 1);
25
+ };
26
+ const calculateHorizontalPosition = (mouseX, rect, rtl) => {
27
+ if (mouseX < rect.left) {
28
+ return rtl ? 'max' : 'min';
29
+ }
30
+ if (mouseX > rect.right) {
31
+ return rtl ? 'min' : 'max';
32
+ }
33
+ const relativeX = rtl ? rect.right - mouseX : mouseX - rect.left;
34
+ return Math.min(Math.max(relativeX / rect.width, 0), 1);
35
+ };
36
+ const calculateLabelPosition = (min, max, labels, label, index) => {
37
+ if (typeof label === 'object' && 'value' in label) {
38
+ return `${((label.value - min) / (max - min)) * 100}%`;
39
+ }
40
+ return `${(index / (labels.length - 1)) * 100}%`;
41
+ };
42
+ const calculateTooltipPosition = (min, max, value, thumbSize, vertical, rtl) => {
43
+ const percent = (value - min) / (max - min);
44
+ const margin = percent > 0.5
45
+ ? `-${(percent - 0.5) * thumbSize.value}${thumbSize.unit}`
46
+ : `${(0.5 - percent) * thumbSize.value}${thumbSize.unit}`;
47
+ if (vertical) {
48
+ return {
49
+ bottom: `${percent * 100}%`,
50
+ marginBottom: margin,
51
+ };
52
+ }
53
+ return rtl
54
+ ? { right: `${percent * 100}%`, marginRight: margin }
55
+ : { left: `${percent * 100}%`, marginLeft: margin };
56
+ };
57
+ const getClickPosition = (event, container, vertical, rtl) => {
58
+ const { offsetX, offsetY } = event;
59
+ const { offsetWidth, offsetHeight } = container;
60
+ if (vertical) {
61
+ return 1 - offsetY / offsetHeight;
62
+ }
63
+ return rtl ? 1 - offsetX / offsetWidth : offsetX / offsetWidth;
64
+ };
65
+ const getLabelValue = (min, max, labels, label, index) => typeof label === 'object' && 'value' in label
66
+ ? label.value
67
+ : min + (index / (labels.length - 1)) * (max - min);
68
+ const getNearestValueIndex = (value, values) => {
69
+ const valuesLength = values.length;
70
+ if (value < values[0]) {
71
+ return 0;
72
+ }
73
+ if (value > values[valuesLength - 1]) {
74
+ return valuesLength - 1;
75
+ }
76
+ const distances = values.map((v) => Math.abs(v - value));
77
+ const min = Math.min(...distances);
78
+ const firstIndex = distances.indexOf(min);
79
+ return value < values[firstIndex] ? firstIndex : distances.lastIndexOf(min);
80
+ };
81
+ const getThumbSize = (element, vertical) => {
82
+ const value = globalThis
83
+ .getComputedStyle(element, null)
84
+ .getPropertyValue(vertical ? '--cui-range-slider-thumb-height' : '--cui-range-slider-thumb-width');
85
+ const regex = /^(\d+\.?\d*)([%a-z]*)$/i;
86
+ const match = value.match(regex);
87
+ if (match) {
88
+ return {
89
+ value: Number.parseFloat(match[1]),
90
+ unit: match[2] || null,
91
+ };
92
+ }
93
+ return null;
94
+ };
95
+ const roundToStep = (number, step) => {
96
+ const _step = step === 0 ? 1 : step;
97
+ return Math.round(number / _step) * _step;
98
+ };
99
+ const updateGradient = (min, max, values, vertical) => {
100
+ const minVal = Math.min(...values);
101
+ const maxVal = Math.max(...values);
102
+ const from = ((minVal - min) / (max - min)) * 100;
103
+ const to = ((maxVal - min) / (max - min)) * 100;
104
+ const direction = vertical ? 'to top' : 'to right';
105
+ return {
106
+ backgroundImage: values.length === 1
107
+ ? `linear-gradient(
108
+ ${direction},
109
+ var(--cui-range-slider-track-in-range-bg) 0%,
110
+ var(--cui-range-slider-track-in-range-bg) ${to}%,
111
+ transparent ${to}%,
112
+ transparent 100%
113
+ )`
114
+ : `linear-gradient(
115
+ ${direction},
116
+ transparent 0%,
117
+ transparent ${from}%,
118
+ var(--cui-range-slider-track-in-range-bg) ${from}%,
119
+ var(--cui-range-slider-track-in-range-bg) ${to}%,
120
+ transparent ${to}%,
121
+ transparent 100%
122
+ )`,
123
+ };
124
+ };
125
+ const updateValue = (value, values, distance, index) => {
126
+ const newValue = [...values];
127
+ newValue[index] = validateValue(value, values, distance, index);
128
+ return newValue;
129
+ };
130
+ const validateValue = (value, values, distance, index) => {
131
+ // If there's only one value, return it as is
132
+ if (values.length === 1) {
133
+ return value;
134
+ }
135
+ // Determine previous and next values if they exist
136
+ const prevValue = index > 0 ? values[index - 1] : undefined;
137
+ const nextValue = index < values.length - 1 ? values[index + 1] : undefined;
138
+ // If it's the first element, ensure it's not too close to the next value
139
+ if (index === 0 && nextValue !== undefined) {
140
+ return Math.min(value, nextValue - distance);
141
+ }
142
+ // If it's the last element, ensure it's not too close to the previous value
143
+ if (index === values.length - 1 && prevValue !== undefined) {
144
+ return Math.max(value, prevValue + distance);
145
+ }
146
+ // For middle elements, ensure the value is within the allowed distance from both neighbors
147
+ if (prevValue !== undefined && nextValue !== undefined) {
148
+ const minVal = prevValue + distance;
149
+ const maxVal = nextValue - distance;
150
+ return Math.min(Math.max(value, minVal), maxVal);
151
+ }
152
+ // Fallback: If for some reason prevValue or nextValue is undefined, return the original value
153
+ return value;
154
+ };
155
+
156
+ export { calculateClickValue, calculateHorizontalPosition, calculateLabelPosition, calculateMoveValue, calculateTooltipPosition, calculateVerticalPosition, getClickPosition, getLabelValue, getNearestValueIndex, getThumbSize, roundToStep, updateGradient, updateValue, validateValue };
157
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../src/components/range-slider/utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEa,MAAA,mBAAmB,GAAG,CACjC,KAAiB,EACjB,SAAyB,EACzB,GAAW,EACX,GAAW,EACX,IAAY,EACZ,QAAiB,EACjB,GAAY,KACV;AACF,IAAA,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC;IACvE,MAAM,KAAK,GAAG,GAAG,GAAG,aAAa,IAAI,GAAG,GAAG,GAAG,CAAC;AAC/C,IAAA,OAAO,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC;AACjC;AAEa,MAAA,kBAAkB,GAAG,CAChC,KAAiB,EACjB,SAAyB,EACzB,GAAW,EACX,GAAW,EACX,IAAY,EACZ,QAAiB,EACjB,GAAY,KACV;AACF,IAAA,MAAM,IAAI,GAAG,SAAS,CAAC,qBAAqB,EAAE;IAC9C,MAAM,QAAQ,GAAG;UACb,yBAAyB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI;UAC7C,2BAA2B,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC;AAEzD,IAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,OAAO,QAAQ,KAAK,KAAK,GAAG,GAAG,GAAG,GAAG;;IAGvC,MAAM,KAAK,GAAG,GAAG,GAAG,QAAQ,IAAI,GAAG,GAAG,GAAG,CAAC;AAE1C,IAAA,OAAO,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC;AACjC;MAEa,yBAAyB,GAAG,CAAC,MAAc,EAAE,IAAa,KAAI;AACzE,IAAA,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE;AACrB,QAAA,OAAO,KAAK;;AAGd,IAAA,IAAI,MAAM,GAAG,IAA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Aa,GAAG,CAAC,KAAa,EAAE,MAAgB,EAAE,QAAgB,EAAE,KAAa,KAAI;;AAEhG,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;AACvB,QAAA,OAAO,KAAK;;;AAId,IAAA,MAAM,SAAS,GAAuB,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,SAAS;IAC/E,MAAM,SAAS,GAAuB,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,SAAS;;IAG/F,IAAI,KAAK,KAAK,CAAC,IAAI,SAAS,KAAK,SAAS,EAAE;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;;;AAI9C,IAAA,IAAI,KAAK,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,KAAK,SAAS,EAAE;QAC1D,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;;;IAI9C,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS,EAAE;AACtD,QAAA,MAAM,MAAM,GAAG,SAAS,GAAG,QAAQ;AACnC,QAAA,MAAM,MAAM,GAAG,SAAS,GAAG,QAAQ;AACnC,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC;;;AAIlD,IAAA,OAAO,KAAK;AACd;;;;"}
@@ -99,7 +99,6 @@ const CSidebar = defineComponent({
99
99
  watch(() => props.visible, () => props.visible !== undefined && handleVisibleChange(props.visible));
100
100
  watch(mobile, () => {
101
101
  if (mobile.value) {
102
- console.log('mobile');
103
102
  visibleMobile.value = false;
104
103
  }
105
104
  });
@@ -1 +1 @@
1
- {"version":3,"file":"CSidebar.js","sources":["../../../../src/components/sidebar/CSidebar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AC,CAAA,QAAA,EAAW,KAAK,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI;wBACrC,2BAA2B,EAAE,KAAK,CAAC,UAAU;AAC7C,wBAAA,IAAI,EACF,CAAC,MAAM,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,MAAM,KAAK,CAAC,QAAQ,IAAI,cAAc,CAAC,KAAK,CAAC;AACnF,wBAAA,IAAI,EAAE,cAAc,CAAC,KAAK,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ;AACzE,qBAAA;AACD,oBAAA,KAAK,CAAC,KAAK;AACZ,iBAAA;AACD,gBAAA,GAAG,EAAE,UAAU;aAChB,EACD,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,CACjC;AACD,YAAA,MAAM,CAAC,KAAK;gBACV,CAAC,CAAC,SAAS,EAAE;AACX,oBAAA,KAAK,EAAE,kBAAkB;oBACzB,OAAO,EAAE,aAAa,CAAC,KAAK;AAC5B,oBAAA,OAAO,EAAE,MAAM,UAAU,EAAE;iBAC5B,CAAC;SACL;KACF;AACF,CAAA;;;;"}
@@ -220,6 +220,15 @@ declare const CTimePicker: import("vue").DefineComponent<import("vue").ExtractPr
220
220
  default: undefined;
221
221
  validator: (value: string) => boolean;
222
222
  };
223
+ /**
224
+ * Generates dropdown menu using Teleport.
225
+ *
226
+ * @since 5.8.0
227
+ */
228
+ teleport: {
229
+ type: BooleanConstructor[];
230
+ default: boolean;
231
+ };
223
232
  /**
224
233
  * Add helper text to the component.
225
234
  *
@@ -482,6 +491,15 @@ declare const CTimePicker: import("vue").DefineComponent<import("vue").ExtractPr
482
491
  default: undefined;
483
492
  validator: (value: string) => boolean;
484
493
  };
494
+ /**
495
+ * Generates dropdown menu using Teleport.
496
+ *
497
+ * @since 5.8.0
498
+ */
499
+ teleport: {
500
+ type: BooleanConstructor[];
501
+ default: boolean;
502
+ };
485
503
  /**
486
504
  * Add helper text to the component.
487
505
  *
@@ -535,6 +553,7 @@ declare const CTimePicker: import("vue").DefineComponent<import("vue").ExtractPr
535
553
  required: boolean;
536
554
  locale: string;
537
555
  container: "dropdown" | "inline";
556
+ teleport: boolean;
538
557
  valid: boolean;
539
558
  tooltipFeedback: boolean;
540
559
  inputReadOnly: boolean;