@m3ui-vue/m3ui-vue 1.2.2 → 1.3.1
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/API.md +3010 -376
- package/dist/MButton-Bl_BSUep.js +172 -0
- package/dist/MButton-Bl_BSUep.js.map +1 -0
- package/dist/MDialog-D_Yik8ou.js +173 -0
- package/dist/MDialog-D_Yik8ou.js.map +1 -0
- package/dist/MIconButton-DoNotQ9v.js +282 -0
- package/dist/MIconButton-DoNotQ9v.js.map +1 -0
- package/dist/MListItem-BxifHJdU.js +824 -0
- package/dist/MListItem-BxifHJdU.js.map +1 -0
- package/dist/MLoadingIndicator-BxbFhSX6.js +115 -0
- package/dist/MLoadingIndicator-BxbFhSX6.js.map +1 -0
- package/dist/MMenuItem-Bih0h4-n.js +604 -0
- package/dist/MMenuItem-Bih0h4-n.js.map +1 -0
- package/dist/MProgressBar-BCoruxA-.js +184 -0
- package/dist/MProgressBar-BCoruxA-.js.map +1 -0
- package/dist/MSeekBar-BeN9QcB3.js +435 -0
- package/dist/MSeekBar-BeN9QcB3.js.map +1 -0
- package/dist/MSegmentedButton-DL9JtJFX.js +65 -0
- package/dist/MSegmentedButton-DL9JtJFX.js.map +1 -0
- package/dist/MSlider-BVSbJlGS.js +691 -0
- package/dist/MSlider-BVSbJlGS.js.map +1 -0
- package/dist/MSpinner-C2SUnWk4.js +65 -0
- package/dist/MSpinner-C2SUnWk4.js.map +1 -0
- package/dist/MTextField-CEkWSZ2v.js +296 -0
- package/dist/MTextField-CEkWSZ2v.js.map +1 -0
- package/dist/MTooltip-CodJGEO-.js +756 -0
- package/dist/MTooltip-CodJGEO-.js.map +1 -0
- package/dist/_storageKeys-CYXsUBwK.js +18 -0
- package/dist/_storageKeys-CYXsUBwK.js.map +1 -0
- package/dist/_useEscapeStack-CjndQhqg.js +19 -0
- package/dist/_useEscapeStack-CjndQhqg.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/chart.js +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/components/MAudioPlayer.vue.d.ts +115 -0
- package/dist/components/MBadge.vue.d.ts +1 -1
- package/dist/components/MBottomSheetScaffold.vue.d.ts +1 -1
- package/dist/components/MBox.vue.d.ts +1 -1
- package/dist/components/MButton.vue.d.ts +1 -1
- package/dist/components/MConfirmDialog.vue.d.ts +1 -1
- package/dist/components/MCopyButton.vue.d.ts +2 -2
- package/dist/components/MDataTable.vue.d.ts +2 -2
- package/dist/components/MDialog.vue.d.ts +2 -2
- package/dist/components/MDivider.vue.d.ts +1 -1
- package/dist/components/MDragHandle.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +150 -0
- package/dist/components/MDrawLayers.vue.d.ts +3 -0
- package/dist/components/MDrawToolbar.vue.d.ts +34 -0
- package/dist/components/MExportButton.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +2 -2
- package/dist/components/MFabMenu.vue.d.ts +2 -2
- package/dist/components/MFixed.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +2 -2
- package/dist/components/MFloorPlan.vue.d.ts +248 -0
- package/dist/components/MFloorPlanInspector.vue.d.ts +56 -0
- package/dist/components/MFloorPlanToolbar.vue.d.ts +51 -0
- package/dist/components/MFlow.vue.d.ts +318 -0
- package/dist/components/MFlowControls.vue.d.ts +33 -0
- package/dist/components/MFlowHandle.vue.d.ts +16 -0
- package/dist/components/MFlowMinimap.vue.d.ts +22 -0
- package/dist/components/MFlowNode.vue.d.ts +35 -0
- package/dist/components/MGantt.vue.d.ts +141 -0
- package/dist/components/MGanttControls.vue.d.ts +32 -0
- package/dist/components/MIconButton.vue.d.ts +3 -1
- package/dist/components/MImageCropper.vue.d.ts +110 -0
- package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
- package/dist/components/MLightbox.vue.d.ts +2 -2
- package/dist/components/MList.vue.d.ts +1 -1
- package/dist/components/MLoadingOverlay.vue.d.ts +1 -1
- package/dist/components/MMapControl.vue.d.ts +1 -1
- package/dist/components/MMapSearch.vue.d.ts +1 -1
- package/dist/components/MMaskField.vue.d.ts +12 -1
- package/dist/components/MMenu.vue.d.ts +1 -1
- package/dist/components/MNavigationDrawer.vue.d.ts +1 -1
- package/dist/components/MNumberField.vue.d.ts +11 -2
- package/dist/components/MPdfViewer.vue.d.ts +174 -0
- package/dist/components/MPullToRefresh.vue.d.ts +1 -1
- package/dist/components/MResourceTimeline.vue.d.ts +149 -0
- package/dist/components/MScheduler.vue.d.ts +3 -3
- package/dist/components/MScheme.vue.d.ts +1 -1
- package/dist/components/MSearchField.vue.d.ts +1 -1
- package/dist/components/MSeekBar.vue.d.ts +1 -1
- package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +1 -1
- package/dist/components/MSlider.vue.d.ts +2 -2
- package/dist/components/MSparkline.vue.d.ts +1 -1
- package/dist/components/MSplitter.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +2 -2
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTable.vue.d.ts +1 -1
- package/dist/components/MTagInput.vue.d.ts +12 -1
- package/dist/components/MTextField.vue.d.ts +13 -2
- package/dist/components/MToolbar.vue.d.ts +1 -1
- package/dist/components/MTree.vue.d.ts +2 -2
- package/dist/components/MVideoPlayer.vue.d.ts +253 -0
- package/dist/components/MVirtualTable.vue.d.ts +1 -1
- package/dist/components/MWindow.vue.d.ts +3 -3
- package/dist/components/_MFlowEdge.vue.d.ts +9 -0
- package/dist/components/_MFlowEdgeLabel.vue.d.ts +9 -0
- package/dist/components/_MFlowNodeShell.vue.d.ts +9 -0
- package/dist/components/_MPdfPage.vue.d.ts +76 -0
- package/dist/components/_MTimeBackground.vue.d.ts +14 -0
- package/dist/components/_MTimeHeader.vue.d.ts +20 -0
- package/dist/composables/_flowPanel.d.ts +2 -0
- package/dist/composables/_flowSlot.d.ts +5 -0
- package/dist/composables/_ganttTime.d.ts +41 -0
- package/dist/composables/_useTimeAxis.d.ts +90 -0
- package/dist/composables/drawGeometry.d.ts +119 -0
- package/dist/composables/flowFormats.d.ts +79 -0
- package/dist/composables/flowLayout.d.ts +45 -0
- package/dist/composables/flowPaths.d.ts +53 -0
- package/dist/composables/ganttFormats.d.ts +52 -0
- package/dist/composables/ganttSchedule.d.ts +99 -0
- package/dist/composables/useDrawing.d.ts +44 -0
- package/dist/composables/useFloorPlan.d.ts +58 -0
- package/dist/composables/useFlow.d.ts +266 -0
- package/dist/composables/useGantt.d.ts +87 -0
- package/dist/composables/useLocale.d.ts +204 -0
- package/dist/composables/useMediaPlayer.d.ts +101 -0
- package/dist/composables/usePdf.d.ts +119 -0
- package/dist/composables/useResourceTimeline.d.ts +70 -0
- package/dist/draw.d.ts +7 -0
- package/dist/draw.js +1702 -0
- package/dist/draw.js.map +1 -0
- package/dist/flow.d.ts +14 -0
- package/dist/flow.js +3547 -0
- package/dist/flow.js.map +1 -0
- package/dist/flowPaths-CUc6X373.js +161 -0
- package/dist/flowPaths-CUc6X373.js.map +1 -0
- package/dist/gantt.d.ts +12 -0
- package/dist/gantt.js +3575 -0
- package/dist/gantt.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/locales/index.js +1435 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +8248 -7637
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +113 -108
- package/dist/map.js.map +1 -1
- package/dist/media.d.ts +5 -0
- package/dist/media.js +1311 -0
- package/dist/media.js.map +1 -0
- package/dist/pdf.d.ts +4 -0
- package/dist/pdf.js +1871 -0
- package/dist/pdf.js.map +1 -0
- package/dist/rich-text-editor.js +28 -26
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{useLocale-JYxDDeXC.js → useLocale-CaWwi-b6.js} +206 -2
- package/dist/useLocale-CaWwi-b6.js.map +1 -0
- package/dist/{useThemeTokens-y0HZpyhL.js → useThemeTokens-DQQcaWbE.js} +40 -54
- package/dist/useThemeTokens-DQQcaWbE.js.map +1 -0
- package/package.json +29 -5
- package/src/__tests__/MAudioPlayer.test.ts +75 -0
- package/src/__tests__/MDrawCanvas.test.ts +118 -0
- package/src/__tests__/MFloorPlan.test.ts +299 -0
- package/src/__tests__/MFlow.test.ts +590 -0
- package/src/__tests__/MGantt.test.ts +130 -0
- package/src/__tests__/MImageCropper.test.ts +89 -0
- package/src/__tests__/MPdfViewer.test.ts +235 -0
- package/src/__tests__/MResourceTimeline.test.ts +102 -0
- package/src/__tests__/MVideoPlayer.test.ts +201 -0
- package/src/__tests__/drawGeometry.test.ts +58 -0
- package/src/__tests__/fieldExpose.test.ts +30 -0
- package/src/__tests__/flowFormats.test.ts +185 -0
- package/src/__tests__/flowLayout.test.ts +113 -0
- package/src/__tests__/ganttFormats.test.ts +76 -0
- package/src/__tests__/ganttSchedule.test.ts +136 -0
- package/src/__tests__/pdfMock.ts +83 -0
- package/src/__tests__/useMediaPlayer.test.ts +182 -0
- package/src/__tests__/usePdf.test.ts +102 -0
- package/src/components/MAudioPlayer.vue +319 -0
- package/src/components/MDrawCanvas.vue +819 -0
- package/src/components/MDrawLayers.vue +114 -0
- package/src/components/MDrawToolbar.vue +171 -0
- package/src/components/MFloorPlan.vue +1080 -0
- package/src/components/MFloorPlanInspector.vue +169 -0
- package/src/components/MFloorPlanToolbar.vue +128 -0
- package/src/components/MFlow.vue +2060 -0
- package/src/components/MFlowControls.vue +110 -0
- package/src/components/MFlowHandle.vue +60 -0
- package/src/components/MFlowMinimap.vue +134 -0
- package/src/components/MFlowNode.vue +98 -0
- package/src/components/MGantt.vue +1609 -0
- package/src/components/MGanttControls.vue +77 -0
- package/src/components/MIconButton.vue +3 -1
- package/src/components/MImageCropper.vue +507 -0
- package/src/components/MMaskField.vue +13 -0
- package/src/components/MNumberField.vue +13 -0
- package/src/components/MPdfViewer.vue +1270 -0
- package/src/components/MResourceTimeline.vue +1020 -0
- package/src/components/MTagInput.vue +13 -0
- package/src/components/MTextField.vue +16 -0
- package/src/components/MVideoPlayer.vue +839 -0
- package/src/components/_MFlowEdge.vue +100 -0
- package/src/components/_MFlowEdgeLabel.vue +56 -0
- package/src/components/_MFlowNodeShell.vue +111 -0
- package/src/components/_MPdfPage.vue +456 -0
- package/src/components/_MTimeBackground.vue +16 -0
- package/src/components/_MTimeHeader.vue +31 -0
- package/src/composables/_flowPanel.ts +13 -0
- package/src/composables/_flowSlot.ts +6 -0
- package/src/composables/_ganttTime.ts +200 -0
- package/src/composables/_useTimeAxis.ts +224 -0
- package/src/composables/drawGeometry.ts +405 -0
- package/src/composables/flowFormats.ts +916 -0
- package/src/composables/flowLayout.ts +297 -0
- package/src/composables/flowPaths.ts +239 -0
- package/src/composables/ganttFormats.ts +366 -0
- package/src/composables/ganttSchedule.ts +403 -0
- package/src/composables/useDrawing.ts +53 -0
- package/src/composables/useFloorPlan.ts +73 -0
- package/src/composables/useFlow.ts +250 -0
- package/src/composables/useGantt.ts +92 -0
- package/src/composables/useLocale.ts +410 -0
- package/src/composables/useMediaPlayer.ts +406 -0
- package/src/composables/usePdf.ts +456 -0
- package/src/composables/useResourceTimeline.ts +76 -0
- package/src/draw.ts +25 -0
- package/src/flow.ts +26 -0
- package/src/gantt.ts +12 -0
- package/src/index.ts +9 -0
- package/src/locales/de.ts +204 -0
- package/src/locales/es.ts +204 -0
- package/src/locales/fr.ts +204 -0
- package/src/locales/ja.ts +204 -0
- package/src/locales/ko.ts +204 -0
- package/src/locales/pt.ts +204 -0
- package/src/locales/zh.ts +204 -0
- package/src/media.ts +5 -0
- package/src/pdf.ts +15 -0
- package/dist/MMenuItem-D4Gx_l3F.js +0 -929
- package/dist/MMenuItem-D4Gx_l3F.js.map +0 -1
- package/dist/MSlider-Dx_S3vJ9.js +0 -1506
- package/dist/MSlider-Dx_S3vJ9.js.map +0 -1
- package/dist/MTextField-Bz8JIsnl.js +0 -633
- package/dist/MTextField-Bz8JIsnl.js.map +0 -1
- package/dist/useLocale-JYxDDeXC.js.map +0 -1
- package/dist/useThemeTokens-y0HZpyhL.js.map +0 -1
|
@@ -0,0 +1,691 @@
|
|
|
1
|
+
import { i as e } from "./useLocale-CaWwi-b6.js";
|
|
2
|
+
import { t } from "./MIcon-Bxh9j135.js";
|
|
3
|
+
import { Fragment as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as ee, onMounted as te, openBlock as p, ref as m, renderList as ne, toDisplayString as h, unref as re, withCtx as ie } from "vue";
|
|
4
|
+
//#region src/components/MSlider.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var ae = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "flex items-center justify-between"
|
|
8
|
+
}, oe = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "text-label-large text-on-surface"
|
|
11
|
+
}, se = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "tabular-nums text-label-large text-on-surface-variant"
|
|
14
|
+
}, ce = [
|
|
15
|
+
"role",
|
|
16
|
+
"tabindex",
|
|
17
|
+
"aria-label",
|
|
18
|
+
"aria-valuenow",
|
|
19
|
+
"aria-valuemin",
|
|
20
|
+
"aria-valuemax",
|
|
21
|
+
"aria-disabled",
|
|
22
|
+
"aria-orientation"
|
|
23
|
+
], le = [
|
|
24
|
+
"tabindex",
|
|
25
|
+
"aria-label",
|
|
26
|
+
"aria-valuenow",
|
|
27
|
+
"aria-valuemin",
|
|
28
|
+
"aria-valuemax",
|
|
29
|
+
"aria-disabled",
|
|
30
|
+
"aria-orientation",
|
|
31
|
+
"onKeydown",
|
|
32
|
+
"onFocus"
|
|
33
|
+
], ue = "color-mix(in srgb, var(--color-on-surface) 38%, transparent)", de = "color-mix(in srgb, var(--color-on-surface) 12%, transparent)", fe = /* @__PURE__ */ u({
|
|
34
|
+
__name: "MSlider",
|
|
35
|
+
props: {
|
|
36
|
+
modelValue: {},
|
|
37
|
+
min: { default: 0 },
|
|
38
|
+
max: { default: 100 },
|
|
39
|
+
step: { default: 1 },
|
|
40
|
+
disabled: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
label: {},
|
|
45
|
+
showValue: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
},
|
|
49
|
+
showTooltip: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1
|
|
52
|
+
},
|
|
53
|
+
orientation: { default: "horizontal" },
|
|
54
|
+
size: { default: "xs" },
|
|
55
|
+
variant: { default: "standard" },
|
|
56
|
+
stops: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
},
|
|
60
|
+
icon: {},
|
|
61
|
+
color: { default: "primary" },
|
|
62
|
+
fillColor: {},
|
|
63
|
+
thumbIcon: {},
|
|
64
|
+
thumbColor: {}
|
|
65
|
+
},
|
|
66
|
+
emits: ["update:modelValue"],
|
|
67
|
+
setup(u, { emit: fe }) {
|
|
68
|
+
let g = u, _ = fe, pe = e(), v = m(), me = m([]), y = m(!1), b = m(!1), x = m(null), S = m(null), C = !1;
|
|
69
|
+
function he(e) {
|
|
70
|
+
C = !0, me.value[e]?.focus({ preventScroll: !0 }), C = !1;
|
|
71
|
+
}
|
|
72
|
+
function ge(e) {
|
|
73
|
+
x.value = e, S.value = C ? null : e;
|
|
74
|
+
}
|
|
75
|
+
function _e() {
|
|
76
|
+
x.value = null, S.value = null;
|
|
77
|
+
}
|
|
78
|
+
let w = i(() => g.orientation === "vertical"), T = i(() => g.variant === "range");
|
|
79
|
+
i(() => g.variant === "centered");
|
|
80
|
+
let E = i(() => {
|
|
81
|
+
if (T.value) {
|
|
82
|
+
let e = g.modelValue;
|
|
83
|
+
return {
|
|
84
|
+
lo: Math.min(e[0], e[1]),
|
|
85
|
+
hi: Math.max(e[0], e[1])
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
lo: g.modelValue,
|
|
90
|
+
hi: g.modelValue
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
function D(e) {
|
|
94
|
+
let t = g.max - g.min;
|
|
95
|
+
return t === 0 ? 0 : (e - g.min) / t * 100;
|
|
96
|
+
}
|
|
97
|
+
let O = m(null), ve = i(() => !g.stops && y.value !== !1 && O.value !== null ? O.value * 100 : null), k = i(() => {
|
|
98
|
+
let e = ve.value;
|
|
99
|
+
return e !== null && (y.value === "single" || y.value === 0) ? T.value ? Math.min(e, D(E.value.hi)) : e : D(E.value.lo);
|
|
100
|
+
}), A = i(() => {
|
|
101
|
+
let e = ve.value;
|
|
102
|
+
return e !== null && y.value === 1 ? Math.max(e, D(E.value.lo)) : D(E.value.hi);
|
|
103
|
+
}), j = i(() => D(0)), ye = i(() => Se.value < I.value.dotInset + I.value.dot / 2 ? !0 : g.variant === "centered" ? Math.min(k.value, j.value) <= 0 : g.variant !== "range" || k.value <= 0), be = i(() => Ce.value < I.value.dotInset + I.value.dot / 2 ? !0 : g.variant === "centered" ? Math.max(k.value, j.value) >= 100 : g.variant === "range" ? A.value >= 100 : k.value >= 100), M = m(0), N, xe = () => {
|
|
104
|
+
let e = v.value;
|
|
105
|
+
e && (M.value = w.value ? e.offsetHeight : e.offsetWidth);
|
|
106
|
+
};
|
|
107
|
+
te(() => {
|
|
108
|
+
xe(), !(typeof ResizeObserver > "u" || !v.value) && (N = new ResizeObserver(xe), N.observe(v.value));
|
|
109
|
+
}), ee(() => N?.disconnect());
|
|
110
|
+
let P = (e) => {
|
|
111
|
+
let t = I.value.thumbInset;
|
|
112
|
+
return Math.min(Math.max(e / 100 * M.value, t), M.value - t);
|
|
113
|
+
}, Se = i(() => M.value && (g.variant === "range" || g.variant === "centered" && k.value <= j.value) ? P(k.value) - L.value : Infinity), Ce = i(() => M.value ? g.variant === "range" ? M.value - P(A.value) - L.value : g.variant === "centered" && k.value < j.value ? Infinity : M.value - P(k.value) - L.value : Infinity), we = i(() => Se.value <= J.value), F = i(() => Ce.value <= J.value), Te = {
|
|
114
|
+
xs: {
|
|
115
|
+
track: 16,
|
|
116
|
+
thumbW: 4,
|
|
117
|
+
thumbH: 44,
|
|
118
|
+
dot: 4,
|
|
119
|
+
gap: 6,
|
|
120
|
+
hitArea: 46,
|
|
121
|
+
radius: 6,
|
|
122
|
+
dotInset: 12,
|
|
123
|
+
thumbInset: 5,
|
|
124
|
+
iconSize: 14,
|
|
125
|
+
thumbIconSize: 22
|
|
126
|
+
},
|
|
127
|
+
sm: {
|
|
128
|
+
track: 28,
|
|
129
|
+
thumbW: 4,
|
|
130
|
+
thumbH: 40,
|
|
131
|
+
dot: 5,
|
|
132
|
+
gap: 7,
|
|
133
|
+
hitArea: 46,
|
|
134
|
+
radius: 8,
|
|
135
|
+
dotInset: 13,
|
|
136
|
+
thumbInset: 6,
|
|
137
|
+
iconSize: 16,
|
|
138
|
+
thumbIconSize: 28
|
|
139
|
+
},
|
|
140
|
+
md: {
|
|
141
|
+
track: 54,
|
|
142
|
+
thumbW: 5,
|
|
143
|
+
thumbH: 62,
|
|
144
|
+
dot: 5,
|
|
145
|
+
gap: 8,
|
|
146
|
+
hitArea: 66,
|
|
147
|
+
radius: 12,
|
|
148
|
+
dotInset: 15,
|
|
149
|
+
thumbInset: 7,
|
|
150
|
+
iconSize: 20,
|
|
151
|
+
thumbIconSize: 42
|
|
152
|
+
},
|
|
153
|
+
lg: {
|
|
154
|
+
track: 72,
|
|
155
|
+
thumbW: 5,
|
|
156
|
+
thumbH: 78,
|
|
157
|
+
dot: 6,
|
|
158
|
+
gap: 10,
|
|
159
|
+
hitArea: 82,
|
|
160
|
+
radius: 14,
|
|
161
|
+
dotInset: 17,
|
|
162
|
+
thumbInset: 8,
|
|
163
|
+
iconSize: 24,
|
|
164
|
+
thumbIconSize: 52
|
|
165
|
+
},
|
|
166
|
+
xl: {
|
|
167
|
+
track: 96,
|
|
168
|
+
thumbW: 6,
|
|
169
|
+
thumbH: 98,
|
|
170
|
+
dot: 7,
|
|
171
|
+
gap: 10,
|
|
172
|
+
hitArea: 100,
|
|
173
|
+
radius: 18,
|
|
174
|
+
dotInset: 19,
|
|
175
|
+
thumbInset: 9,
|
|
176
|
+
iconSize: 28,
|
|
177
|
+
thumbIconSize: 66
|
|
178
|
+
}
|
|
179
|
+
}, I = i(() => Te[g.size] ?? Te.xs), Ee = i(() => I.value.thumbInset + I.value.thumbW / 2 + I.value.iconSize / 2 + 3), L = i(() => g.thumbIcon ? Math.max(I.value.gap, I.value.thumbIconSize / 2 + 4) : I.value.gap), De = {
|
|
180
|
+
primary: "var(--color-primary)",
|
|
181
|
+
secondary: "var(--color-secondary)",
|
|
182
|
+
tertiary: "var(--color-tertiary)",
|
|
183
|
+
error: "var(--color-error)"
|
|
184
|
+
};
|
|
185
|
+
function Oe(e, t) {
|
|
186
|
+
let n = e ?? t;
|
|
187
|
+
return De[n] ?? n;
|
|
188
|
+
}
|
|
189
|
+
let R = i(() => g.disabled ? {
|
|
190
|
+
active: ue,
|
|
191
|
+
inactive: de
|
|
192
|
+
} : {
|
|
193
|
+
active: Oe(g.fillColor, g.color),
|
|
194
|
+
inactive: "var(--color-secondary-container)"
|
|
195
|
+
}), z = i(() => g.disabled ? {
|
|
196
|
+
active: ue,
|
|
197
|
+
inactive: de
|
|
198
|
+
} : {
|
|
199
|
+
active: Oe(g.thumbColor, g.color),
|
|
200
|
+
inactive: "var(--color-secondary-container)"
|
|
201
|
+
});
|
|
202
|
+
function B(e) {
|
|
203
|
+
let t = Math.round((e - g.min) / g.step) * g.step + g.min;
|
|
204
|
+
return Math.max(g.min, Math.min(g.max, +t.toFixed(10)));
|
|
205
|
+
}
|
|
206
|
+
function V(e) {
|
|
207
|
+
if (!v.value) return 0;
|
|
208
|
+
let t = v.value.getBoundingClientRect();
|
|
209
|
+
return w.value ? 1 - Math.max(0, Math.min(1, (e.clientY - t.top) / t.height)) : Math.max(0, Math.min(1, (e.clientX - t.left) / t.width));
|
|
210
|
+
}
|
|
211
|
+
function ke(e) {
|
|
212
|
+
return B(g.min + V(e) * (g.max - g.min));
|
|
213
|
+
}
|
|
214
|
+
let H = !1;
|
|
215
|
+
function U(e, t) {
|
|
216
|
+
let { lo: n, hi: r } = E.value;
|
|
217
|
+
return e === 0 ? [Math.min(t, r), r] : [n, Math.max(t, n)];
|
|
218
|
+
}
|
|
219
|
+
function Ae(e) {
|
|
220
|
+
if (g.disabled) return;
|
|
221
|
+
e.preventDefault();
|
|
222
|
+
let t = ke(e);
|
|
223
|
+
if (T.value) {
|
|
224
|
+
let { lo: e, hi: n } = E.value;
|
|
225
|
+
H = !1;
|
|
226
|
+
let r;
|
|
227
|
+
t <= e && t < n ? r = 0 : t >= n && t > e ? r = 1 : e === n ? (r = 0, H = !0) : r = Math.abs(t - e) <= Math.abs(t - n) ? 0 : 1, y.value = r, he(r), H || _("update:modelValue", U(r, t));
|
|
228
|
+
} else y.value = "single", _("update:modelValue", t);
|
|
229
|
+
O.value = H ? null : V(e), window.addEventListener("pointermove", W), window.addEventListener("pointerup", G), window.addEventListener("pointercancel", G);
|
|
230
|
+
}
|
|
231
|
+
function W(e) {
|
|
232
|
+
if (y.value === !1) return;
|
|
233
|
+
let t = ke(e);
|
|
234
|
+
if (T.value) {
|
|
235
|
+
if (H) {
|
|
236
|
+
if (t === E.value.lo) return;
|
|
237
|
+
H = !1, y.value = +(t > E.value.lo), he(y.value);
|
|
238
|
+
}
|
|
239
|
+
O.value = V(e), _("update:modelValue", U(y.value, t));
|
|
240
|
+
} else O.value = V(e), _("update:modelValue", t);
|
|
241
|
+
}
|
|
242
|
+
function G() {
|
|
243
|
+
y.value = !1, O.value = null, H = !1, window.removeEventListener("pointermove", W), window.removeEventListener("pointerup", G), window.removeEventListener("pointercancel", G);
|
|
244
|
+
}
|
|
245
|
+
let K = {
|
|
246
|
+
ArrowRight: 1,
|
|
247
|
+
ArrowUp: 1,
|
|
248
|
+
ArrowLeft: -1,
|
|
249
|
+
ArrowDown: -1
|
|
250
|
+
};
|
|
251
|
+
function je(e) {
|
|
252
|
+
if (g.disabled) return;
|
|
253
|
+
let t = K[e.key];
|
|
254
|
+
t !== void 0 && (e.preventDefault(), _("update:modelValue", B(g.modelValue + t * g.step))), e.key === "Home" && (e.preventDefault(), _("update:modelValue", g.min)), e.key === "End" && (e.preventDefault(), _("update:modelValue", g.max));
|
|
255
|
+
}
|
|
256
|
+
function Me(e, t) {
|
|
257
|
+
if (g.disabled) return;
|
|
258
|
+
let { lo: n, hi: r } = E.value, i = e === 0 ? n : r, a = K[t.key], o;
|
|
259
|
+
a === void 0 ? t.key === "Home" ? o = e === 0 ? g.min : n : t.key === "End" && (o = e === 0 ? r : g.max) : o = B(i + a * g.step), o !== void 0 && (t.preventDefault(), S.value = e, _("update:modelValue", U(e, o)));
|
|
260
|
+
}
|
|
261
|
+
ee(() => {
|
|
262
|
+
window.removeEventListener("pointermove", W), window.removeEventListener("pointerup", G), window.removeEventListener("pointercancel", G);
|
|
263
|
+
});
|
|
264
|
+
let Ne = i(() => {
|
|
265
|
+
if (!g.stops) return [];
|
|
266
|
+
let e = [], t = g.max - g.min, n = g.icon ? (I.value.iconSize + I.value.radius) / 2 : 0;
|
|
267
|
+
for (let r = g.min + g.step; r < g.max; r += g.step) {
|
|
268
|
+
let i = (r - g.min) / t * 100;
|
|
269
|
+
g.icon && i < n || e.push(i);
|
|
270
|
+
}
|
|
271
|
+
return e.length <= 28 ? e : [];
|
|
272
|
+
});
|
|
273
|
+
function Pe(e) {
|
|
274
|
+
return `calc(${$(e)} - ${L.value}px)`;
|
|
275
|
+
}
|
|
276
|
+
function Fe(e) {
|
|
277
|
+
return F.value ? "0px" : `calc(100% - ${$(e)} - ${L.value}px)`;
|
|
278
|
+
}
|
|
279
|
+
function Ie() {
|
|
280
|
+
return we.value ? "0px" : `calc(${$(k.value)} - ${L.value}px)`;
|
|
281
|
+
}
|
|
282
|
+
function Le() {
|
|
283
|
+
return `calc(${$(k.value)} + ${L.value}px)`;
|
|
284
|
+
}
|
|
285
|
+
function Re() {
|
|
286
|
+
return `calc(${$(A.value)} - ${$(k.value)} - ${L.value * 2}px)`;
|
|
287
|
+
}
|
|
288
|
+
function ze() {
|
|
289
|
+
return F.value ? "0px" : `calc(100% - ${$(A.value)} - ${L.value}px)`;
|
|
290
|
+
}
|
|
291
|
+
function Be() {
|
|
292
|
+
return k.value >= j.value ? `${j.value}%` : `calc(${$(k.value)} + ${L.value}px)`;
|
|
293
|
+
}
|
|
294
|
+
function Ve() {
|
|
295
|
+
return k.value >= j.value ? `calc(${$(k.value)} - ${j.value}% - ${L.value}px)` : `calc(${j.value}% - ${$(k.value)} - ${L.value}px)`;
|
|
296
|
+
}
|
|
297
|
+
function He() {
|
|
298
|
+
return F.value ? "0px" : k.value >= j.value ? `calc(100% - ${$(k.value)} - ${L.value}px)` : `calc(100% - ${j.value}% - ${L.value}px)`;
|
|
299
|
+
}
|
|
300
|
+
function Ue() {
|
|
301
|
+
return we.value ? "0px" : k.value <= j.value ? `calc(${$(k.value)} - ${L.value}px)` : `calc(${j.value}% - ${L.value}px)`;
|
|
302
|
+
}
|
|
303
|
+
let We = i(() => I.value.radius), q = i(() => Math.max(2, We.value / 4)), J = i(() => We.value * 1.3);
|
|
304
|
+
function Ge() {
|
|
305
|
+
return `${q.value}px`;
|
|
306
|
+
}
|
|
307
|
+
function Y() {
|
|
308
|
+
return w.value ? `${q.value}px ${q.value}px ${J.value}px ${J.value}px` : `${J.value}px ${q.value}px ${q.value}px ${J.value}px`;
|
|
309
|
+
}
|
|
310
|
+
function X() {
|
|
311
|
+
return w.value ? `${J.value}px ${J.value}px ${q.value}px ${q.value}px` : `${q.value}px ${J.value}px ${J.value}px ${q.value}px`;
|
|
312
|
+
}
|
|
313
|
+
let Z = i(() => y.value === !1), Q = i(() => Z.value ? "75ms ease" : "0s");
|
|
314
|
+
function $(e) {
|
|
315
|
+
let t = I.value.thumbInset;
|
|
316
|
+
return `clamp(${t}px, ${e}%, calc(100% - ${t}px))`;
|
|
317
|
+
}
|
|
318
|
+
function Ke(e, t = 0) {
|
|
319
|
+
let n = w.value ? I.value.thumbH : I.value.thumbW, r = w.value ? I.value.thumbW : I.value.thumbH, i = Math.min(n, r) / 2, a = y.value !== !1, o = {
|
|
320
|
+
position: "absolute",
|
|
321
|
+
width: `${n}px`,
|
|
322
|
+
height: `${r}px`,
|
|
323
|
+
borderRadius: `${i}px`,
|
|
324
|
+
backgroundColor: z.value.active,
|
|
325
|
+
"--tw-ring-color": z.value.active,
|
|
326
|
+
zIndex: "2",
|
|
327
|
+
transition: Z.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
|
|
328
|
+
}, s = T.value ? y.value === t || x.value === t : a || b.value, c = (T.value ? y.value === t : a) ? 1.08 : 1, l = s ? .5 : 1;
|
|
329
|
+
return w.value ? (o.left = "50%", o.bottom = $(e), o.transform = `translateX(-50%) translateY(50%) scaleX(${c}) scaleY(${l})`) : (o.left = $(e), o.top = "50%", o.transform = `translateX(-50%) translateY(-50%) scaleY(${c}) scaleX(${l})`), o;
|
|
330
|
+
}
|
|
331
|
+
function qe(e) {
|
|
332
|
+
let t = y.value === !1 ? 1 : 1.15, n = {
|
|
333
|
+
position: "absolute",
|
|
334
|
+
color: z.value.active,
|
|
335
|
+
"--tw-ring-color": z.value.active,
|
|
336
|
+
zIndex: "2",
|
|
337
|
+
transition: Z.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
|
|
338
|
+
};
|
|
339
|
+
return w.value ? (n.left = "50%", n.bottom = $(e), n.transform = `translateX(-50%) translateY(50%) scale(${t})`) : (n.left = $(e), n.top = "50%", n.transform = `translateX(-50%) translateY(-50%) scale(${t})`), n;
|
|
340
|
+
}
|
|
341
|
+
function Je(e) {
|
|
342
|
+
let t = I.value.track / 2 + 36, n = I.value.track / 2 + 40;
|
|
343
|
+
return w.value ? {
|
|
344
|
+
left: `calc(50% - ${n}px)`,
|
|
345
|
+
bottom: $(e),
|
|
346
|
+
transform: "translateY(50%)",
|
|
347
|
+
transition: Z.value ? "bottom " + Q.value : "none"
|
|
348
|
+
} : {
|
|
349
|
+
left: $(e),
|
|
350
|
+
top: `calc(50% - ${t}px)`,
|
|
351
|
+
transform: "translateX(-50%)",
|
|
352
|
+
transition: Z.value ? "left " + Q.value : "none"
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
let Ye = i(() => T.value ? `${E.value.lo} – ${E.value.hi}` : String(g.modelValue)), Xe = i(() => T.value && typeof y.value == "number" ? y.value === 0 ? E.value.lo : E.value.hi : g.modelValue), Ze = i(() => T.value && typeof y.value == "number" ? y.value === 0 ? k.value : A.value : k.value);
|
|
356
|
+
return (e, i) => (p(), s("div", { class: d(["flex select-none", w.value ? "h-full flex-col items-center" : "flex-col gap-1"]) }, [u.label || u.showValue ? (p(), s("div", ae, [u.label ? (p(), s("span", oe, h(u.label), 1)) : o("", !0), u.showValue ? (p(), s("span", se, h(Ye.value), 1)) : o("", !0)])) : o("", !0), c("div", { class: d(["flex items-center", w.value ? "flex-1 flex-col" : ""]) }, [c("div", {
|
|
357
|
+
ref_key: "trackEl",
|
|
358
|
+
ref: v,
|
|
359
|
+
role: T.value ? "group" : "slider",
|
|
360
|
+
tabindex: T.value ? void 0 : 0,
|
|
361
|
+
"aria-label": T.value ? u.label : void 0,
|
|
362
|
+
"aria-valuenow": T.value ? void 0 : u.modelValue,
|
|
363
|
+
"aria-valuemin": T.value ? void 0 : u.min,
|
|
364
|
+
"aria-valuemax": T.value ? void 0 : u.max,
|
|
365
|
+
"aria-disabled": u.disabled || void 0,
|
|
366
|
+
"aria-orientation": T.value ? void 0 : u.orientation,
|
|
367
|
+
class: d(["group relative touch-none cursor-pointer outline-none", u.disabled && "cursor-not-allowed"]),
|
|
368
|
+
style: f(w.value ? {
|
|
369
|
+
width: `${I.value.hitArea}px`,
|
|
370
|
+
minHeight: "160px",
|
|
371
|
+
height: "100%"
|
|
372
|
+
} : {
|
|
373
|
+
height: `${I.value.hitArea}px`,
|
|
374
|
+
width: "100%"
|
|
375
|
+
}),
|
|
376
|
+
onPointerdown: Ae,
|
|
377
|
+
onKeydown: i[0] ||= (e) => !T.value && je(e),
|
|
378
|
+
onFocus: i[1] ||= (e) => b.value = !T.value,
|
|
379
|
+
onBlur: i[2] ||= (e) => b.value = !1
|
|
380
|
+
}, [
|
|
381
|
+
c("div", {
|
|
382
|
+
class: "absolute",
|
|
383
|
+
style: f(w.value ? {
|
|
384
|
+
left: "50%",
|
|
385
|
+
top: "0",
|
|
386
|
+
bottom: "0",
|
|
387
|
+
width: `${I.value.track}px`,
|
|
388
|
+
transform: "translateX(-50%)",
|
|
389
|
+
borderRadius: `${J.value}px`
|
|
390
|
+
} : {
|
|
391
|
+
top: "50%",
|
|
392
|
+
left: "0",
|
|
393
|
+
right: "0",
|
|
394
|
+
height: `${I.value.track}px`,
|
|
395
|
+
transform: "translateY(-50%)",
|
|
396
|
+
borderRadius: `${J.value}px`
|
|
397
|
+
})
|
|
398
|
+
}, [
|
|
399
|
+
u.variant === "standard" ? (p(), s(n, { key: 0 }, [c("div", {
|
|
400
|
+
class: "absolute",
|
|
401
|
+
style: f({
|
|
402
|
+
...w.value ? {
|
|
403
|
+
left: 0,
|
|
404
|
+
right: 0,
|
|
405
|
+
bottom: 0,
|
|
406
|
+
height: Pe(k.value)
|
|
407
|
+
} : {
|
|
408
|
+
top: 0,
|
|
409
|
+
bottom: 0,
|
|
410
|
+
left: 0,
|
|
411
|
+
width: Pe(k.value)
|
|
412
|
+
},
|
|
413
|
+
borderRadius: Y(),
|
|
414
|
+
backgroundColor: R.value.active,
|
|
415
|
+
transition: `all ${Q.value}`
|
|
416
|
+
})
|
|
417
|
+
}, null, 4), c("div", {
|
|
418
|
+
class: "absolute",
|
|
419
|
+
style: f({
|
|
420
|
+
...w.value ? {
|
|
421
|
+
left: 0,
|
|
422
|
+
right: 0,
|
|
423
|
+
top: 0,
|
|
424
|
+
height: Fe(k.value)
|
|
425
|
+
} : {
|
|
426
|
+
top: 0,
|
|
427
|
+
bottom: 0,
|
|
428
|
+
right: 0,
|
|
429
|
+
width: Fe(k.value)
|
|
430
|
+
},
|
|
431
|
+
borderRadius: X(),
|
|
432
|
+
backgroundColor: R.value.inactive,
|
|
433
|
+
transition: `all ${Q.value}`
|
|
434
|
+
})
|
|
435
|
+
}, null, 4)], 64)) : u.variant === "centered" ? (p(), s(n, { key: 1 }, [
|
|
436
|
+
c("div", {
|
|
437
|
+
class: "absolute",
|
|
438
|
+
style: f({
|
|
439
|
+
...w.value ? {
|
|
440
|
+
left: 0,
|
|
441
|
+
right: 0,
|
|
442
|
+
bottom: Be(),
|
|
443
|
+
height: Ve()
|
|
444
|
+
} : {
|
|
445
|
+
top: 0,
|
|
446
|
+
bottom: 0,
|
|
447
|
+
left: Be(),
|
|
448
|
+
width: Ve()
|
|
449
|
+
},
|
|
450
|
+
borderRadius: Ge(),
|
|
451
|
+
backgroundColor: R.value.active,
|
|
452
|
+
transition: `all ${Q.value}`
|
|
453
|
+
})
|
|
454
|
+
}, null, 4),
|
|
455
|
+
c("div", {
|
|
456
|
+
class: "absolute",
|
|
457
|
+
style: f({
|
|
458
|
+
...w.value ? {
|
|
459
|
+
left: 0,
|
|
460
|
+
right: 0,
|
|
461
|
+
top: 0,
|
|
462
|
+
height: He()
|
|
463
|
+
} : {
|
|
464
|
+
top: 0,
|
|
465
|
+
bottom: 0,
|
|
466
|
+
right: 0,
|
|
467
|
+
width: He()
|
|
468
|
+
},
|
|
469
|
+
borderRadius: X(),
|
|
470
|
+
backgroundColor: R.value.inactive,
|
|
471
|
+
transition: `all ${Q.value}`
|
|
472
|
+
})
|
|
473
|
+
}, null, 4),
|
|
474
|
+
c("div", {
|
|
475
|
+
class: "absolute",
|
|
476
|
+
style: f({
|
|
477
|
+
...w.value ? {
|
|
478
|
+
left: 0,
|
|
479
|
+
right: 0,
|
|
480
|
+
bottom: 0,
|
|
481
|
+
height: Ue()
|
|
482
|
+
} : {
|
|
483
|
+
top: 0,
|
|
484
|
+
bottom: 0,
|
|
485
|
+
left: 0,
|
|
486
|
+
width: Ue()
|
|
487
|
+
},
|
|
488
|
+
borderRadius: Y(),
|
|
489
|
+
backgroundColor: R.value.inactive,
|
|
490
|
+
transition: `all ${Q.value}`
|
|
491
|
+
})
|
|
492
|
+
}, null, 4)
|
|
493
|
+
], 64)) : u.variant === "range" ? (p(), s(n, { key: 2 }, [
|
|
494
|
+
c("div", {
|
|
495
|
+
class: "absolute",
|
|
496
|
+
style: f({
|
|
497
|
+
...w.value ? {
|
|
498
|
+
left: 0,
|
|
499
|
+
right: 0,
|
|
500
|
+
bottom: 0,
|
|
501
|
+
height: Ie()
|
|
502
|
+
} : {
|
|
503
|
+
top: 0,
|
|
504
|
+
bottom: 0,
|
|
505
|
+
left: 0,
|
|
506
|
+
width: Ie()
|
|
507
|
+
},
|
|
508
|
+
borderRadius: Y(),
|
|
509
|
+
backgroundColor: R.value.inactive,
|
|
510
|
+
transition: `all ${Q.value}`
|
|
511
|
+
})
|
|
512
|
+
}, null, 4),
|
|
513
|
+
c("div", {
|
|
514
|
+
class: "absolute",
|
|
515
|
+
style: f({
|
|
516
|
+
...w.value ? {
|
|
517
|
+
left: 0,
|
|
518
|
+
right: 0,
|
|
519
|
+
bottom: Le(),
|
|
520
|
+
height: Re()
|
|
521
|
+
} : {
|
|
522
|
+
top: 0,
|
|
523
|
+
bottom: 0,
|
|
524
|
+
left: Le(),
|
|
525
|
+
width: Re()
|
|
526
|
+
},
|
|
527
|
+
borderRadius: Ge(),
|
|
528
|
+
backgroundColor: R.value.active,
|
|
529
|
+
transition: `all ${Q.value}`
|
|
530
|
+
})
|
|
531
|
+
}, null, 4),
|
|
532
|
+
c("div", {
|
|
533
|
+
class: "absolute",
|
|
534
|
+
style: f({
|
|
535
|
+
...w.value ? {
|
|
536
|
+
left: 0,
|
|
537
|
+
right: 0,
|
|
538
|
+
top: 0,
|
|
539
|
+
height: ze()
|
|
540
|
+
} : {
|
|
541
|
+
top: 0,
|
|
542
|
+
bottom: 0,
|
|
543
|
+
right: 0,
|
|
544
|
+
width: ze()
|
|
545
|
+
},
|
|
546
|
+
borderRadius: X(),
|
|
547
|
+
backgroundColor: R.value.inactive,
|
|
548
|
+
transition: `all ${Q.value}`
|
|
549
|
+
})
|
|
550
|
+
}, null, 4)
|
|
551
|
+
], 64)) : o("", !0),
|
|
552
|
+
u.icon ? (p(), a(t, {
|
|
553
|
+
key: 3,
|
|
554
|
+
name: u.icon,
|
|
555
|
+
size: I.value.iconSize,
|
|
556
|
+
class: "absolute z-[1]",
|
|
557
|
+
style: f({
|
|
558
|
+
color: u.variant === "standard" && k.value > 0 || u.variant === "range" && k.value > 0 ? R.value.inactive : R.value.active,
|
|
559
|
+
...w.value ? {
|
|
560
|
+
left: "50%",
|
|
561
|
+
bottom: `${Ee.value}px`,
|
|
562
|
+
transform: "translateX(-50%)"
|
|
563
|
+
} : {
|
|
564
|
+
top: "50%",
|
|
565
|
+
left: `${Ee.value}px`,
|
|
566
|
+
transform: "translateY(-50%)"
|
|
567
|
+
},
|
|
568
|
+
transition: "color 150ms ease"
|
|
569
|
+
})
|
|
570
|
+
}, null, 8, [
|
|
571
|
+
"name",
|
|
572
|
+
"size",
|
|
573
|
+
"style"
|
|
574
|
+
])) : u.stops ? o("", !0) : (p(), s("div", {
|
|
575
|
+
key: 4,
|
|
576
|
+
class: "absolute rounded-full",
|
|
577
|
+
style: f({
|
|
578
|
+
width: `${I.value.dot}px`,
|
|
579
|
+
height: `${I.value.dot}px`,
|
|
580
|
+
backgroundColor: R.value.active,
|
|
581
|
+
opacity: +!ye.value,
|
|
582
|
+
...w.value ? {
|
|
583
|
+
left: "50%",
|
|
584
|
+
bottom: `${I.value.dotInset}px`,
|
|
585
|
+
transform: "translateX(-50%)"
|
|
586
|
+
} : {
|
|
587
|
+
top: "50%",
|
|
588
|
+
left: `${I.value.dotInset}px`,
|
|
589
|
+
transform: "translateY(-50%)"
|
|
590
|
+
},
|
|
591
|
+
transition: "opacity 150ms ease"
|
|
592
|
+
})
|
|
593
|
+
}, null, 4)),
|
|
594
|
+
u.stops ? o("", !0) : (p(), s("div", {
|
|
595
|
+
key: 5,
|
|
596
|
+
class: "absolute rounded-full",
|
|
597
|
+
style: f({
|
|
598
|
+
width: `${I.value.dot}px`,
|
|
599
|
+
height: `${I.value.dot}px`,
|
|
600
|
+
backgroundColor: R.value.active,
|
|
601
|
+
opacity: +!be.value,
|
|
602
|
+
...w.value ? {
|
|
603
|
+
left: "50%",
|
|
604
|
+
top: `${I.value.dotInset}px`,
|
|
605
|
+
transform: "translateX(-50%)"
|
|
606
|
+
} : {
|
|
607
|
+
top: "50%",
|
|
608
|
+
right: `${I.value.dotInset}px`,
|
|
609
|
+
transform: "translateY(-50%)"
|
|
610
|
+
},
|
|
611
|
+
transition: "opacity 150ms ease"
|
|
612
|
+
})
|
|
613
|
+
}, null, 4)),
|
|
614
|
+
u.stops ? (p(!0), s(n, { key: 6 }, ne(Ne.value, (e, t) => (p(), s("div", {
|
|
615
|
+
key: t,
|
|
616
|
+
class: "absolute rounded-full",
|
|
617
|
+
style: f({
|
|
618
|
+
width: `${I.value.dot}px`,
|
|
619
|
+
height: `${I.value.dot}px`,
|
|
620
|
+
backgroundColor: e <= k.value ? R.value.inactive : R.value.active,
|
|
621
|
+
opacity: Math.abs(e - k.value) < .01 || T.value && Math.abs(e - A.value) < .01 ? 0 : 1,
|
|
622
|
+
...w.value ? {
|
|
623
|
+
left: "50%",
|
|
624
|
+
bottom: `${e}%`,
|
|
625
|
+
transform: "translateX(-50%) translateY(50%)"
|
|
626
|
+
} : {
|
|
627
|
+
top: "50%",
|
|
628
|
+
left: `${e}%`,
|
|
629
|
+
transform: "translateX(-50%) translateY(-50%)"
|
|
630
|
+
}
|
|
631
|
+
})
|
|
632
|
+
}, null, 4))), 128)) : o("", !0)
|
|
633
|
+
], 4),
|
|
634
|
+
T.value ? (p(), s(n, { key: 1 }, ne([0, 1], (e) => c("div", {
|
|
635
|
+
key: e,
|
|
636
|
+
ref_for: !0,
|
|
637
|
+
ref: (t) => {
|
|
638
|
+
t && (me.value[e] = t);
|
|
639
|
+
},
|
|
640
|
+
role: "slider",
|
|
641
|
+
tabindex: u.disabled ? -1 : 0,
|
|
642
|
+
"aria-label": e === 0 ? re(pe).sliderRangeStart : re(pe).sliderRangeEnd,
|
|
643
|
+
"aria-valuenow": e === 0 ? E.value.lo : E.value.hi,
|
|
644
|
+
"aria-valuemin": e === 0 ? u.min : E.value.lo,
|
|
645
|
+
"aria-valuemax": e === 0 ? E.value.hi : u.max,
|
|
646
|
+
"aria-disabled": u.disabled || void 0,
|
|
647
|
+
"aria-orientation": u.orientation,
|
|
648
|
+
class: d(["pointer-events-none flex items-center justify-center rounded-full outline-none", S.value === e && "ring-2 ring-offset-2 ring-offset-surface"]),
|
|
649
|
+
style: f(u.thumbIcon ? qe(e === 0 ? k.value : A.value) : Ke(e === 0 ? k.value : A.value, e)),
|
|
650
|
+
onKeydown: (t) => Me(e, t),
|
|
651
|
+
onFocus: (t) => ge(e),
|
|
652
|
+
onBlur: _e
|
|
653
|
+
}, [u.thumbIcon ? (p(), a(t, {
|
|
654
|
+
key: 0,
|
|
655
|
+
name: u.thumbIcon,
|
|
656
|
+
size: I.value.thumbIconSize
|
|
657
|
+
}, null, 8, ["name", "size"])) : o("", !0)], 46, le)), 64)) : (p(), s(n, { key: 0 }, [u.thumbIcon ? (p(), a(t, {
|
|
658
|
+
key: 0,
|
|
659
|
+
name: u.thumbIcon,
|
|
660
|
+
size: I.value.thumbIconSize,
|
|
661
|
+
class: "pointer-events-none rounded-full group-focus-visible:ring-2 group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-surface",
|
|
662
|
+
style: f(qe(k.value))
|
|
663
|
+
}, null, 8, [
|
|
664
|
+
"name",
|
|
665
|
+
"size",
|
|
666
|
+
"style"
|
|
667
|
+
])) : (p(), s("div", {
|
|
668
|
+
key: 1,
|
|
669
|
+
class: "pointer-events-none group-focus-visible:ring-2 group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-surface",
|
|
670
|
+
style: f(Ke(k.value))
|
|
671
|
+
}, null, 4))], 64)),
|
|
672
|
+
l(r, {
|
|
673
|
+
"enter-active-class": "transition-opacity duration-100",
|
|
674
|
+
"enter-from-class": "opacity-0",
|
|
675
|
+
"leave-active-class": "transition-opacity duration-75",
|
|
676
|
+
"leave-to-class": "opacity-0"
|
|
677
|
+
}, {
|
|
678
|
+
default: ie(() => [u.showTooltip && y.value !== !1 ? (p(), s("div", {
|
|
679
|
+
key: 0,
|
|
680
|
+
class: "pointer-events-none absolute z-10 flex h-7 min-w-7 items-center justify-center rounded-full bg-inverse-surface px-2 text-label-small tabular-nums text-inverse-on-surface",
|
|
681
|
+
style: f(Je(Ze.value))
|
|
682
|
+
}, h(Xe.value), 5)) : o("", !0)]),
|
|
683
|
+
_: 1
|
|
684
|
+
})
|
|
685
|
+
], 46, ce)], 2)], 2));
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
//#endregion
|
|
689
|
+
export { fe as t };
|
|
690
|
+
|
|
691
|
+
//# sourceMappingURL=MSlider-BVSbJlGS.js.map
|