@m3ui-vue/m3ui-vue 1.8.0 → 1.9.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/API.md +34 -19
- package/dist/MButton-LiZRRP4h.js +171 -0
- package/dist/MButton-LiZRRP4h.js.map +1 -0
- package/dist/{MColorPickerModal-H8nuX0Wu.js → MColorPickerModal-IjciC8zh.js} +185 -184
- package/dist/MColorPickerModal-IjciC8zh.js.map +1 -0
- package/dist/MDialog-BLpfgIA3.js +167 -0
- package/dist/MDialog-BLpfgIA3.js.map +1 -0
- package/dist/MIcon-BSsJZhK7.js +116 -0
- package/dist/MIcon-BSsJZhK7.js.map +1 -0
- package/dist/{MIconButton-BBggVwBV.js → MIconButton-CNjN0xwW.js} +18 -18
- package/dist/{MIconButton-BBggVwBV.js.map → MIconButton-CNjN0xwW.js.map} +1 -1
- package/dist/{MListItem-DiOAxaN7.js → MListItem-BBQ-6i3v.js} +139 -139
- package/dist/MListItem-BBQ-6i3v.js.map +1 -0
- package/dist/{MLoadingIndicator-CuTZYFFj.js → MLoadingIndicator-dejdXpu8.js} +2 -2
- package/dist/{MLoadingIndicator-CuTZYFFj.js.map → MLoadingIndicator-dejdXpu8.js.map} +1 -1
- package/dist/MMenuItem-E31tMzOt.js +577 -0
- package/dist/MMenuItem-E31tMzOt.js.map +1 -0
- package/dist/MPdfViewer-B5Q9Xs9d.js +1866 -0
- package/dist/MPdfViewer-B5Q9Xs9d.js.map +1 -0
- package/dist/MProgressBar-CPrZhQbA.js +179 -0
- package/dist/MProgressBar-CPrZhQbA.js.map +1 -0
- package/dist/{MSeekBar-BCDQTx2t.js → MSeekBar-NwkuAzx-.js} +2 -2
- package/dist/{MSeekBar-BCDQTx2t.js.map → MSeekBar-NwkuAzx-.js.map} +1 -1
- package/dist/{MSegmentedButton-BXzRsg1S.js → MSegmentedButton-DZuZLBML.js} +4 -4
- package/dist/{MSegmentedButton-BXzRsg1S.js.map → MSegmentedButton-DZuZLBML.js.map} +1 -1
- package/dist/MSignaturePad-Bqr-1R9f.js +140 -0
- package/dist/MSignaturePad-Bqr-1R9f.js.map +1 -0
- package/dist/MSlider-B7dIcHVn.js +745 -0
- package/dist/MSlider-B7dIcHVn.js.map +1 -0
- package/dist/{MSpinner-UCdtSOHP.js → MSpinner-CXLY7lWw.js} +2 -2
- package/dist/{MSpinner-UCdtSOHP.js.map → MSpinner-CXLY7lWw.js.map} +1 -1
- package/dist/{MTextField-CYk9yFvi.js → MTextField-CryHMs8-.js} +18 -18
- package/dist/MTextField-CryHMs8-.js.map +1 -0
- package/dist/MTooltip-Cn_DYm9M.js +90 -0
- package/dist/MTooltip-Cn_DYm9M.js.map +1 -0
- package/dist/{_popupPosition-nL8SVKPK.js → _popupPosition-C_lxj9qU.js} +7 -7
- package/dist/_popupPosition-C_lxj9qU.js.map +1 -0
- package/dist/{_useFieldValidation-B0B44M_t.js → _useFieldValidation-CvZnZfl-.js} +2 -2
- package/dist/{_useFieldValidation-B0B44M_t.js.map → _useFieldValidation-CvZnZfl-.js.map} +1 -1
- package/dist/api.json +1 -1
- package/dist/code-editor.js +129 -128
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MAddressField.vue.d.ts +1 -1
- package/dist/components/MAudioPlayer.vue.d.ts +1 -1
- package/dist/components/MAutocomplete.vue.d.ts +1 -1
- package/dist/components/MAvailabilityCalendar.vue.d.ts +3 -3
- package/dist/components/MBadge.vue.d.ts +2 -2
- package/dist/components/MBar.vue.d.ts +1 -1
- package/dist/components/MBeforeAfter.vue.d.ts +3 -3
- package/dist/components/MButton.vue.d.ts +1 -1
- package/dist/components/MCalendarHeatmap.vue.d.ts +1 -1
- package/dist/components/MChatBubble.vue.d.ts +1 -1
- package/dist/components/MCodeEditor.vue.d.ts +1 -1
- package/dist/components/MContainerTransform.vue.d.ts +1 -1
- package/dist/components/MCopyButton.vue.d.ts +2 -2
- package/dist/components/MCountrySelect.vue.d.ts +1 -1
- package/dist/components/MCreditCardInput.vue.d.ts +2 -2
- package/dist/components/MDiffViewer.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +2 -2
- package/dist/components/MExpansionPanel.vue.d.ts +1 -1
- package/dist/components/MExportButton.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +1 -1
- package/dist/components/MFilterBuilder.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +2 -2
- package/dist/components/MFloorPlan.vue.d.ts +2 -2
- package/dist/components/MFlow.vue.d.ts +2 -2
- package/dist/components/MFormRenderer.vue.d.ts +2 -2
- package/dist/components/MGantt.vue.d.ts +2 -2
- package/dist/components/MGanttControls.vue.d.ts +1 -1
- package/dist/components/MGrid.vue.d.ts +1 -1
- package/dist/components/MIcon.vue.d.ts +3 -5
- package/dist/components/MIconButton.vue.d.ts +1 -1
- package/dist/components/MLightbox.vue.d.ts +2 -2
- package/dist/components/MMapMeasure.vue.d.ts +2 -2
- package/dist/components/MMenu.vue.d.ts +6 -3
- package/dist/components/MMortgageCalculator.vue.d.ts +2 -2
- package/dist/components/MMultiAutocomplete.vue.d.ts +1 -1
- package/dist/components/MMultiSelect.vue.d.ts +1 -1
- package/dist/components/MNavigationDrawer.vue.d.ts +5 -4
- package/dist/components/MNavigationRail.vue.d.ts +1 -1
- package/dist/components/MNumberField.vue.d.ts +1 -1
- package/dist/components/MOdontogram.vue.d.ts +2 -2
- package/dist/components/MPdfSigner.vue.d.ts +1 -1
- package/dist/components/MPhoneInput.vue.d.ts +2 -2
- package/dist/components/MPinInput.vue.d.ts +3 -3
- package/dist/components/MPosKeypad.vue.d.ts +1 -1
- package/dist/components/MProductConfigurator.vue.d.ts +1 -1
- package/dist/components/MResourceTimeline.vue.d.ts +2 -2
- package/dist/components/MRichTextEditor.vue.d.ts +1 -1
- package/dist/components/MScheme.vue.d.ts +1 -1
- package/dist/components/MSearchBar.vue.d.ts +2 -2
- package/dist/components/MSearchField.vue.d.ts +1 -1
- package/dist/components/MSeatMap.vue.d.ts +1 -1
- package/dist/components/MSeekBar.vue.d.ts +2 -2
- package/dist/components/MSelect.vue.d.ts +1 -1
- package/dist/components/MShortNavigationBar.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +1 -1
- package/dist/components/MSpreadsheet.vue.d.ts +2 -2
- package/dist/components/MStack.vue.d.ts +2 -2
- package/dist/components/MSubtitle.vue.d.ts +1 -1
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTagInput.vue.d.ts +1 -1
- package/dist/components/MText.vue.d.ts +1 -1
- package/dist/components/MTextField.vue.d.ts +3 -3
- package/dist/components/MTimeScroll.vue.d.ts +1 -1
- package/dist/components/MTimezoneSelect.vue.d.ts +1 -1
- package/dist/components/MTitle.vue.d.ts +1 -1
- package/dist/components/MToolbar.vue.d.ts +1 -1
- package/dist/components/MTooltip.vue.d.ts +1 -1
- package/dist/components/MTopAppBar.vue.d.ts +2 -2
- package/dist/components/MVitalsChart.vue.d.ts +1 -1
- package/dist/components/MWindow.vue.d.ts +3 -3
- package/dist/components/_MDrawerItemList.vue.d.ts +8 -1
- package/dist/composables/_fieldLayout.d.ts +8 -8
- package/dist/composables/_popupPosition.d.ts +3 -2
- package/dist/composables/_rtl.d.ts +26 -0
- package/dist/composables/useColorPalette.d.ts +1 -1
- package/dist/composables/useLocale.d.ts +4 -0
- package/dist/draw.js +5 -5
- package/dist/flow.js +2 -2
- package/dist/gantt.js +3 -3
- package/dist/locales/ar.d.ts +6 -0
- package/dist/locales/index.d.ts +1 -0
- package/dist/locales/index.js +768 -1
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +11962 -12039
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +1127 -1149
- package/dist/map.js.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/media.js +7 -7
- package/dist/pdf-sign.d.ts +3 -0
- package/dist/pdf-sign.js +548 -0
- package/dist/pdf-sign.js.map +1 -0
- package/dist/pdf.d.ts +0 -3
- package/dist/pdf.js +1 -2400
- package/dist/plugin.d.ts +8 -0
- package/dist/rich-text-editor.js +79 -77
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles/theme.css +13 -0
- package/dist/styles.css +1 -1
- package/dist/terminal.js +5 -2
- package/dist/terminal.js.map +1 -1
- package/dist/{useLocale-DL96OFgr.js → useLocale-ybIju59R.js} +3 -1
- package/dist/useLocale-ybIju59R.js.map +1 -0
- package/dist/vTooltip-xESB2YOb.js +154 -0
- package/dist/vTooltip-xESB2YOb.js.map +1 -0
- package/package.json +5 -1
- package/src/__tests__/MAddressField.test.ts +1 -1
- package/src/__tests__/MChip.test.ts +3 -3
- package/src/__tests__/MFab.test.ts +6 -6
- package/src/__tests__/MListItemNestedControl.test.ts +2 -2
- package/src/__tests__/MScheduler.test.ts +1 -1
- package/src/__tests__/MTrackingTimeline.test.ts +1 -1
- package/src/__tests__/MWindow.test.ts +16 -0
- package/src/__tests__/fieldOverflow.test.ts +9 -9
- package/src/__tests__/hydration.test.ts +39 -0
- package/src/__tests__/localePresets.test.ts +2 -0
- package/src/__tests__/rtl.test.ts +167 -0
- package/src/__tests__/ssr.test.ts +6 -0
- package/src/components/MAlert.vue +1 -1
- package/src/components/MAutocomplete.vue +7 -7
- package/src/components/MAvailabilityCalendar.vue +5 -3
- package/src/components/MBadge.vue +12 -3
- package/src/components/MBar.vue +1 -1
- package/src/components/MBottomAppBar.vue +1 -1
- package/src/components/MCalendar.vue +3 -3
- package/src/components/MCalendarHeatmap.vue +3 -3
- package/src/components/MChatBubble.vue +3 -3
- package/src/components/MChip.vue +6 -6
- package/src/components/MCodeEditor.vue +7 -3
- package/src/components/MColorPicker.vue +1 -1
- package/src/components/MCommandPalette.vue +1 -1
- package/src/components/MContainerTransform.vue +1 -1
- package/src/components/MContextMenu.vue +1 -1
- package/src/components/MDataTable.vue +5 -5
- package/src/components/MDatePicker.vue +3 -2
- package/src/components/MDateRangePicker.vue +3 -2
- package/src/components/MDialog.vue +5 -5
- package/src/components/MDiffViewer.vue +1 -1
- package/src/components/MDivider.vue +1 -1
- package/src/components/MDragDropList.vue +1 -1
- package/src/components/MEmojiSelector.vue +11 -7
- package/src/components/MExpansionPanel.vue +1 -1
- package/src/components/MFab.vue +5 -5
- package/src/components/MFormBuilder.vue +3 -3
- package/src/components/MIcon.vue +14 -2
- package/src/components/MJsonEditor.vue +1 -3
- package/src/components/MJsonViewer.vue +1 -1
- package/src/components/MKanban.vue +2 -1
- package/src/components/MListDetail.vue +2 -2
- package/src/components/MListGroup.vue +1 -1
- package/src/components/MListItem.vue +5 -5
- package/src/components/MListSubheader.vue +1 -1
- package/src/components/MMapDraw.vue +3 -2
- package/src/components/MMapHover.vue +2 -1
- package/src/components/MMapMeasure.vue +2 -1
- package/src/components/MMapRoute.vue +2 -1
- package/src/components/MMarkdown.vue +9 -6
- package/src/components/MMaskField.vue +6 -6
- package/src/components/MMenu.vue +13 -6
- package/src/components/MMenuItem.vue +8 -6
- package/src/components/MMultiAutocomplete.vue +9 -8
- package/src/components/MMultiSelect.vue +9 -8
- package/src/components/MNavigationDrawer.vue +39 -27
- package/src/components/MNavigationRail.vue +28 -19
- package/src/components/MNavigationSuite.vue +1 -1
- package/src/components/MNotificationCenter.vue +1 -1
- package/src/components/MNotificationHost.vue +1 -1
- package/src/components/MNumberField.vue +6 -6
- package/src/components/MOrderTicket.vue +1 -1
- package/src/components/MPageProgress.vue +1 -1
- package/src/components/MPdfSigner.vue +1 -1
- package/src/components/MPhoneInput.vue +5 -4
- package/src/components/MPinInput.vue +3 -2
- package/src/components/MPosKeypad.vue +2 -1
- package/src/components/MProductConfigurator.vue +2 -1
- package/src/components/MProgressBar.vue +2 -2
- package/src/components/MRichTextEditor.vue +8 -4
- package/src/components/MScheduler.vue +14 -14
- package/src/components/MSearchField.vue +1 -1
- package/src/components/MSeatMap.vue +2 -1
- package/src/components/MSegmentedButton.vue +1 -1
- package/src/components/MSelect.vue +7 -7
- package/src/components/MSideSheet.vue +3 -2
- package/src/components/MSimpleCarousel.vue +20 -11
- package/src/components/MSlider.vue +15 -5
- package/src/components/MSnackbar.vue +2 -2
- package/src/components/MSplitButton.vue +3 -2
- package/src/components/MSplitter.vue +6 -3
- package/src/components/MSpotlightSearch.vue +1 -1
- package/src/components/MSwitch.vue +5 -5
- package/src/components/MTable.vue +3 -3
- package/src/components/MTabs.vue +4 -1
- package/src/components/MTagInput.vue +6 -6
- package/src/components/MTerminal.vue +1 -1
- package/src/components/MText.vue +1 -1
- package/src/components/MTextField.vue +7 -7
- package/src/components/MTimePicker.vue +3 -2
- package/src/components/MTimePickerModal.vue +2 -2
- package/src/components/MTimeScroll.vue +1 -1
- package/src/components/MTimeline.vue +12 -12
- package/src/components/MToolbar.vue +3 -3
- package/src/components/MTrackingTimeline.vue +3 -2
- package/src/components/MTransition.vue +8 -3
- package/src/components/MTreeTable.vue +1 -1
- package/src/components/MTypewriter.vue +1 -1
- package/src/components/MVirtualTable.vue +2 -2
- package/src/components/MWindow.vue +4 -3
- package/src/components/_MColorPanel.vue +5 -4
- package/src/components/_MDrawerItemList.vue +9 -5
- package/src/components/_MMapAttribution.vue +2 -1
- package/src/components/_MMonthYearButton.vue +1 -1
- package/src/components/_MTransferPane.vue +8 -1
- package/src/components/_MTreeNode.vue +3 -3
- package/src/components/_MYearGrid.vue +4 -2
- package/src/composables/_fieldLayout.ts +19 -19
- package/src/composables/_popupPosition.ts +5 -3
- package/src/composables/_rtl.ts +76 -0
- package/src/composables/_useMenuNav.ts +24 -17
- package/src/composables/_useSheetMotion.ts +10 -3
- package/src/composables/pdfSign.ts +2 -2
- package/src/composables/useLocale.ts +6 -0
- package/src/locales/ar.ts +798 -0
- package/src/locales/de.ts +2 -0
- package/src/locales/es.ts +2 -0
- package/src/locales/fr.ts +2 -0
- package/src/locales/index.ts +1 -0
- package/src/locales/ja.ts +2 -0
- package/src/locales/ko.ts +2 -0
- package/src/locales/pt.ts +2 -0
- package/src/locales/zh.ts +2 -0
- package/src/pdf-sign.ts +5 -0
- package/src/pdf.ts +0 -3
- package/src/plugin.ts +10 -0
- package/src/styles/theme.css +13 -0
- package/dist/MColorPickerModal-H8nuX0Wu.js.map +0 -1
- package/dist/MDialog-B42Mhn8W.js +0 -331
- package/dist/MDialog-B42Mhn8W.js.map +0 -1
- package/dist/MIcon-DpajuUTJ.js +0 -33
- package/dist/MIcon-DpajuUTJ.js.map +0 -1
- package/dist/MListItem-DiOAxaN7.js.map +0 -1
- package/dist/MMenuItem-BuxYoASE.js +0 -574
- package/dist/MMenuItem-BuxYoASE.js.map +0 -1
- package/dist/MSignaturePad-BTqGaPXA.js +0 -313
- package/dist/MSignaturePad-BTqGaPXA.js.map +0 -1
- package/dist/MSlider-D_O8J9YH.js +0 -739
- package/dist/MSlider-D_O8J9YH.js.map +0 -1
- package/dist/MTextField-CYk9yFvi.js.map +0 -1
- package/dist/MTooltip-CK39Zon4.js +0 -183
- package/dist/MTooltip-CK39Zon4.js.map +0 -1
- package/dist/_popupPosition-nL8SVKPK.js.map +0 -1
- package/dist/pdf.js.map +0 -1
- package/dist/useLocale-DL96OFgr.js.map +0 -1
package/dist/MSlider-D_O8J9YH.js
DELETED
|
@@ -1,739 +0,0 @@
|
|
|
1
|
-
import { n as e, r as t } from "./_useFieldValidation-B0B44M_t.js";
|
|
2
|
-
import { t as n } from "./MIcon-DpajuUTJ.js";
|
|
3
|
-
import { i as r } from "./useLocale-DL96OFgr.js";
|
|
4
|
-
import { Fragment as i, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as ee, createVNode as te, defineComponent as d, normalizeClass as f, normalizeStyle as p, onBeforeUnmount as ne, onMounted as re, openBlock as m, ref as h, renderList as ie, toDisplayString as g, unref as _, withCtx as ae } from "vue";
|
|
5
|
-
// src/components/MSlider.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var oe = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "flex items-center justify-between"
|
|
9
|
-
}, se = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "text-error"
|
|
12
|
-
}, ce = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "tabular-nums text-label-large text-on-surface-variant"
|
|
15
|
-
}, le = [
|
|
16
|
-
"role",
|
|
17
|
-
"tabindex",
|
|
18
|
-
"aria-label",
|
|
19
|
-
"aria-valuenow",
|
|
20
|
-
"aria-valuemin",
|
|
21
|
-
"aria-valuemax",
|
|
22
|
-
"aria-disabled",
|
|
23
|
-
"aria-invalid",
|
|
24
|
-
"aria-describedby",
|
|
25
|
-
"aria-orientation"
|
|
26
|
-
], ue = [
|
|
27
|
-
"tabindex",
|
|
28
|
-
"aria-label",
|
|
29
|
-
"aria-valuenow",
|
|
30
|
-
"aria-valuemin",
|
|
31
|
-
"aria-valuemax",
|
|
32
|
-
"aria-disabled",
|
|
33
|
-
"aria-orientation",
|
|
34
|
-
"onKeydown",
|
|
35
|
-
"onFocus"
|
|
36
|
-
], de = ["id"], fe = "color-mix(in srgb, var(--color-on-surface) 38%, transparent)", pe = "color-mix(in srgb, var(--color-on-surface) 12%, transparent)", me = /* @__PURE__ */ d({
|
|
37
|
-
__name: "MSlider",
|
|
38
|
-
props: {
|
|
39
|
-
modelValue: {},
|
|
40
|
-
min: { default: 0 },
|
|
41
|
-
max: { default: 100 },
|
|
42
|
-
step: { default: 1 },
|
|
43
|
-
disabled: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: !1
|
|
46
|
-
},
|
|
47
|
-
label: {},
|
|
48
|
-
error: { type: [Boolean, String] },
|
|
49
|
-
errorLabel: {},
|
|
50
|
-
required: { type: Boolean },
|
|
51
|
-
rules: {},
|
|
52
|
-
validateOn: {},
|
|
53
|
-
validateDebounce: {},
|
|
54
|
-
name: {},
|
|
55
|
-
showValue: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
default: !1
|
|
58
|
-
},
|
|
59
|
-
showTooltip: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: !1
|
|
62
|
-
},
|
|
63
|
-
orientation: { default: "horizontal" },
|
|
64
|
-
size: { default: "xs" },
|
|
65
|
-
variant: { default: "standard" },
|
|
66
|
-
stops: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: !1
|
|
69
|
-
},
|
|
70
|
-
icon: {},
|
|
71
|
-
color: { default: "primary" },
|
|
72
|
-
fillColor: {},
|
|
73
|
-
thumbIcon: {},
|
|
74
|
-
thumbColor: {}
|
|
75
|
-
},
|
|
76
|
-
emits: ["update:modelValue", "blur"],
|
|
77
|
-
setup(d, { expose: me, emit: he }) {
|
|
78
|
-
let v = d, y = he, ge = r(), b = h(), x = h([]), S = h(null), C = e({
|
|
79
|
-
value: () => v.modelValue,
|
|
80
|
-
rules: () => v.rules,
|
|
81
|
-
required: () => v.required,
|
|
82
|
-
error: () => v.error,
|
|
83
|
-
errorLabel: () => v.errorLabel,
|
|
84
|
-
name: () => v.name,
|
|
85
|
-
validateOn: () => v.validateOn,
|
|
86
|
-
validateDebounce: () => v.validateDebounce,
|
|
87
|
-
disabled: () => v.disabled,
|
|
88
|
-
focus: () => {
|
|
89
|
-
(j.value ? x.value[0] : b.value)?.focus();
|
|
90
|
-
},
|
|
91
|
-
el: () => S.value,
|
|
92
|
-
setValue: (e) => y("update:modelValue", e)
|
|
93
|
-
}), w = C.disabled, { hasError: _e, message: T, messageId: ve } = C, ye = t(() => S.value, () => {
|
|
94
|
-
C.onBlur(), y("blur");
|
|
95
|
-
}), E = h(!1), be = h(!1), D = h(null), O = h(null), k = !1;
|
|
96
|
-
function xe(e) {
|
|
97
|
-
k = !0, x.value[e]?.focus({ preventScroll: !0 }), k = !1;
|
|
98
|
-
}
|
|
99
|
-
function Se(e) {
|
|
100
|
-
D.value = e, O.value = k ? null : e;
|
|
101
|
-
}
|
|
102
|
-
function Ce() {
|
|
103
|
-
D.value = null, O.value = null;
|
|
104
|
-
}
|
|
105
|
-
let A = o(() => v.orientation === "vertical"), j = o(() => v.variant === "range");
|
|
106
|
-
o(() => v.variant === "centered");
|
|
107
|
-
let M = o(() => {
|
|
108
|
-
if (j.value) {
|
|
109
|
-
let e = v.modelValue;
|
|
110
|
-
return {
|
|
111
|
-
lo: Math.min(e[0], e[1]),
|
|
112
|
-
hi: Math.max(e[0], e[1])
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
return {
|
|
116
|
-
lo: v.modelValue,
|
|
117
|
-
hi: v.modelValue
|
|
118
|
-
};
|
|
119
|
-
});
|
|
120
|
-
function N(e) {
|
|
121
|
-
let t = v.max - v.min;
|
|
122
|
-
return t === 0 ? 0 : (e - v.min) / t * 100;
|
|
123
|
-
}
|
|
124
|
-
let P = h(null), we = o(() => !v.stops && E.value !== !1 && P.value !== null ? P.value * 100 : null), F = o(() => {
|
|
125
|
-
let e = we.value;
|
|
126
|
-
return e !== null && (E.value === "single" || E.value === 0) ? j.value ? Math.min(e, N(M.value.hi)) : e : N(M.value.lo);
|
|
127
|
-
}), I = o(() => {
|
|
128
|
-
let e = we.value;
|
|
129
|
-
return e !== null && E.value === 1 ? Math.max(e, N(M.value.lo)) : N(M.value.hi);
|
|
130
|
-
}), L = o(() => N(0)), Te = o(() => Oe.value < H.value.dotInset + H.value.dot / 2 ? !0 : v.variant === "centered" ? Math.min(F.value, L.value) <= 0 : v.variant !== "range" || F.value <= 0), Ee = o(() => ke.value < H.value.dotInset + H.value.dot / 2 ? !0 : v.variant === "centered" ? Math.max(F.value, L.value) >= 100 : v.variant === "range" ? I.value >= 100 : F.value >= 100), R = h(0), z, De = () => {
|
|
131
|
-
let e = b.value;
|
|
132
|
-
e && (R.value = A.value ? e.offsetHeight : e.offsetWidth);
|
|
133
|
-
};
|
|
134
|
-
re(() => {
|
|
135
|
-
De(), typeof ResizeObserver < "u" && b.value && (z = new ResizeObserver(De), z.observe(b.value));
|
|
136
|
-
}), ne(() => z?.disconnect());
|
|
137
|
-
let B = (e) => {
|
|
138
|
-
let t = H.value.thumbInset;
|
|
139
|
-
return Math.min(Math.max(e / 100 * R.value, t), R.value - t);
|
|
140
|
-
}, Oe = o(() => R.value && (v.variant === "range" || v.variant === "centered" && F.value <= L.value) ? B(F.value) - U.value : Infinity), ke = o(() => R.value ? v.variant === "range" ? R.value - B(I.value) - U.value : v.variant === "centered" && F.value < L.value ? Infinity : R.value - B(F.value) - U.value : Infinity), Ae = o(() => Oe.value <= X.value), V = o(() => ke.value <= X.value), je = {
|
|
141
|
-
xs: {
|
|
142
|
-
track: 16,
|
|
143
|
-
thumbW: 4,
|
|
144
|
-
thumbH: 44,
|
|
145
|
-
dot: 4,
|
|
146
|
-
gap: 6,
|
|
147
|
-
hitArea: 46,
|
|
148
|
-
radius: 6,
|
|
149
|
-
dotInset: 12,
|
|
150
|
-
thumbInset: 5,
|
|
151
|
-
iconSize: 14,
|
|
152
|
-
thumbIconSize: 22
|
|
153
|
-
},
|
|
154
|
-
sm: {
|
|
155
|
-
track: 28,
|
|
156
|
-
thumbW: 4,
|
|
157
|
-
thumbH: 40,
|
|
158
|
-
dot: 5,
|
|
159
|
-
gap: 7,
|
|
160
|
-
hitArea: 46,
|
|
161
|
-
radius: 8,
|
|
162
|
-
dotInset: 13,
|
|
163
|
-
thumbInset: 6,
|
|
164
|
-
iconSize: 16,
|
|
165
|
-
thumbIconSize: 28
|
|
166
|
-
},
|
|
167
|
-
md: {
|
|
168
|
-
track: 54,
|
|
169
|
-
thumbW: 5,
|
|
170
|
-
thumbH: 62,
|
|
171
|
-
dot: 5,
|
|
172
|
-
gap: 8,
|
|
173
|
-
hitArea: 66,
|
|
174
|
-
radius: 12,
|
|
175
|
-
dotInset: 15,
|
|
176
|
-
thumbInset: 7,
|
|
177
|
-
iconSize: 20,
|
|
178
|
-
thumbIconSize: 42
|
|
179
|
-
},
|
|
180
|
-
lg: {
|
|
181
|
-
track: 72,
|
|
182
|
-
thumbW: 5,
|
|
183
|
-
thumbH: 78,
|
|
184
|
-
dot: 6,
|
|
185
|
-
gap: 10,
|
|
186
|
-
hitArea: 82,
|
|
187
|
-
radius: 14,
|
|
188
|
-
dotInset: 17,
|
|
189
|
-
thumbInset: 8,
|
|
190
|
-
iconSize: 24,
|
|
191
|
-
thumbIconSize: 52
|
|
192
|
-
},
|
|
193
|
-
xl: {
|
|
194
|
-
track: 96,
|
|
195
|
-
thumbW: 6,
|
|
196
|
-
thumbH: 98,
|
|
197
|
-
dot: 7,
|
|
198
|
-
gap: 10,
|
|
199
|
-
hitArea: 100,
|
|
200
|
-
radius: 18,
|
|
201
|
-
dotInset: 19,
|
|
202
|
-
thumbInset: 9,
|
|
203
|
-
iconSize: 28,
|
|
204
|
-
thumbIconSize: 66
|
|
205
|
-
}
|
|
206
|
-
}, H = o(() => je[v.size] ?? je.xs), Me = o(() => H.value.thumbInset + H.value.thumbW / 2 + H.value.iconSize / 2 + 3), U = o(() => v.thumbIcon ? Math.max(H.value.gap, H.value.thumbIconSize / 2 + 4) : H.value.gap), Ne = {
|
|
207
|
-
primary: "var(--color-primary)",
|
|
208
|
-
secondary: "var(--color-secondary)",
|
|
209
|
-
tertiary: "var(--color-tertiary)",
|
|
210
|
-
error: "var(--color-error)"
|
|
211
|
-
};
|
|
212
|
-
function Pe(e, t) {
|
|
213
|
-
let n = e ?? t;
|
|
214
|
-
return Ne[n] ?? n;
|
|
215
|
-
}
|
|
216
|
-
let W = o(() => w.value ? {
|
|
217
|
-
active: fe,
|
|
218
|
-
inactive: pe
|
|
219
|
-
} : {
|
|
220
|
-
active: Pe(v.fillColor, v.color),
|
|
221
|
-
inactive: "var(--color-secondary-container)"
|
|
222
|
-
}), G = o(() => w.value ? {
|
|
223
|
-
active: fe,
|
|
224
|
-
inactive: pe
|
|
225
|
-
} : {
|
|
226
|
-
active: Pe(v.thumbColor, v.color),
|
|
227
|
-
inactive: "var(--color-secondary-container)"
|
|
228
|
-
});
|
|
229
|
-
function Fe(e) {
|
|
230
|
-
let t = Math.round((e - v.min) / v.step) * v.step + v.min;
|
|
231
|
-
return Math.max(v.min, Math.min(v.max, +t.toFixed(10)));
|
|
232
|
-
}
|
|
233
|
-
function K(e) {
|
|
234
|
-
if (!b.value) return 0;
|
|
235
|
-
let t = b.value.getBoundingClientRect();
|
|
236
|
-
return A.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));
|
|
237
|
-
}
|
|
238
|
-
function Ie(e) {
|
|
239
|
-
return Fe(v.min + K(e) * (v.max - v.min));
|
|
240
|
-
}
|
|
241
|
-
let q = !1;
|
|
242
|
-
function Le(e, t) {
|
|
243
|
-
let { lo: n, hi: r } = M.value;
|
|
244
|
-
return e === 0 ? [Math.min(t, r), r] : [n, Math.max(t, n)];
|
|
245
|
-
}
|
|
246
|
-
function Re(e) {
|
|
247
|
-
if (w.value) return;
|
|
248
|
-
e.preventDefault();
|
|
249
|
-
let t = Ie(e);
|
|
250
|
-
if (j.value) {
|
|
251
|
-
let { lo: e, hi: n } = M.value;
|
|
252
|
-
q = !1;
|
|
253
|
-
let r;
|
|
254
|
-
t <= e && t < n ? r = 0 : t >= n && t > e ? r = 1 : e === n ? (r = 0, q = !0) : r = Math.abs(t - e) <= Math.abs(t - n) ? 0 : 1, E.value = r, xe(r), q || y("update:modelValue", Le(r, t));
|
|
255
|
-
} else E.value = "single", y("update:modelValue", t);
|
|
256
|
-
P.value = q ? null : K(e), window.addEventListener("pointermove", ze), window.addEventListener("pointerup", J), window.addEventListener("pointercancel", J);
|
|
257
|
-
}
|
|
258
|
-
function ze(e) {
|
|
259
|
-
if (E.value === !1) return;
|
|
260
|
-
let t = Ie(e);
|
|
261
|
-
if (j.value) {
|
|
262
|
-
if (q) {
|
|
263
|
-
if (t === M.value.lo) return;
|
|
264
|
-
q = !1, E.value = +(t > M.value.lo), xe(E.value);
|
|
265
|
-
}
|
|
266
|
-
P.value = K(e), y("update:modelValue", Le(E.value, t));
|
|
267
|
-
} else P.value = K(e), y("update:modelValue", t);
|
|
268
|
-
}
|
|
269
|
-
function J() {
|
|
270
|
-
E.value = !1, P.value = null, q = !1, window.removeEventListener("pointermove", ze), window.removeEventListener("pointerup", J), window.removeEventListener("pointercancel", J);
|
|
271
|
-
}
|
|
272
|
-
let Be = {
|
|
273
|
-
ArrowRight: 1,
|
|
274
|
-
ArrowUp: 1,
|
|
275
|
-
ArrowLeft: -1,
|
|
276
|
-
ArrowDown: -1
|
|
277
|
-
};
|
|
278
|
-
function Ve(e) {
|
|
279
|
-
if (w.value) return;
|
|
280
|
-
let t = Be[e.key];
|
|
281
|
-
t !== void 0 && (e.preventDefault(), y("update:modelValue", Fe(v.modelValue + t * v.step))), e.key === "Home" && (e.preventDefault(), y("update:modelValue", v.min)), e.key === "End" && (e.preventDefault(), y("update:modelValue", v.max));
|
|
282
|
-
}
|
|
283
|
-
function He(e, t) {
|
|
284
|
-
if (w.value) return;
|
|
285
|
-
let { lo: n, hi: r } = M.value, i = e === 0 ? n : r, a = Be[t.key], o;
|
|
286
|
-
a === void 0 ? t.key === "Home" ? o = e === 0 ? v.min : n : t.key === "End" && (o = e === 0 ? r : v.max) : o = Fe(i + a * v.step), o !== void 0 && (t.preventDefault(), O.value = e, y("update:modelValue", Le(e, o)));
|
|
287
|
-
}
|
|
288
|
-
ne(() => {
|
|
289
|
-
window.removeEventListener("pointermove", ze), window.removeEventListener("pointerup", J), window.removeEventListener("pointercancel", J);
|
|
290
|
-
});
|
|
291
|
-
let Ue = o(() => {
|
|
292
|
-
if (!v.stops) return [];
|
|
293
|
-
let e = [], t = v.max - v.min, n = v.icon ? (H.value.iconSize + H.value.radius) / 2 : 0;
|
|
294
|
-
for (let r = v.min + v.step; r < v.max; r += v.step) {
|
|
295
|
-
let i = (r - v.min) / t * 100;
|
|
296
|
-
v.icon && i < n || e.push(i);
|
|
297
|
-
}
|
|
298
|
-
return e.length <= 28 ? e : [];
|
|
299
|
-
});
|
|
300
|
-
function We(e) {
|
|
301
|
-
return `calc(${$(e)} - ${U.value}px)`;
|
|
302
|
-
}
|
|
303
|
-
function Ge(e) {
|
|
304
|
-
return V.value ? "0px" : `calc(100% - ${$(e)} - ${U.value}px)`;
|
|
305
|
-
}
|
|
306
|
-
function Ke() {
|
|
307
|
-
return Ae.value ? "0px" : `calc(${$(F.value)} - ${U.value}px)`;
|
|
308
|
-
}
|
|
309
|
-
function qe() {
|
|
310
|
-
return `calc(${$(F.value)} + ${U.value}px)`;
|
|
311
|
-
}
|
|
312
|
-
function Je() {
|
|
313
|
-
return `calc(${$(I.value)} - ${$(F.value)} - ${U.value * 2}px)`;
|
|
314
|
-
}
|
|
315
|
-
function Ye() {
|
|
316
|
-
return V.value ? "0px" : `calc(100% - ${$(I.value)} - ${U.value}px)`;
|
|
317
|
-
}
|
|
318
|
-
function Xe() {
|
|
319
|
-
return F.value >= L.value ? `${L.value}%` : `calc(${$(F.value)} + ${U.value}px)`;
|
|
320
|
-
}
|
|
321
|
-
function Ze() {
|
|
322
|
-
return F.value >= L.value ? `calc(${$(F.value)} - ${L.value}% - ${U.value}px)` : `calc(${L.value}% - ${$(F.value)} - ${U.value}px)`;
|
|
323
|
-
}
|
|
324
|
-
function Qe() {
|
|
325
|
-
return V.value ? "0px" : F.value >= L.value ? `calc(100% - ${$(F.value)} - ${U.value}px)` : `calc(100% - ${L.value}% - ${U.value}px)`;
|
|
326
|
-
}
|
|
327
|
-
function $e() {
|
|
328
|
-
return Ae.value ? "0px" : F.value <= L.value ? `calc(${$(F.value)} - ${U.value}px)` : `calc(${L.value}% - ${U.value}px)`;
|
|
329
|
-
}
|
|
330
|
-
let et = o(() => H.value.radius), Y = o(() => Math.max(2, et.value / 4)), X = o(() => et.value * 1.3);
|
|
331
|
-
function tt() {
|
|
332
|
-
return `${Y.value}px`;
|
|
333
|
-
}
|
|
334
|
-
function nt() {
|
|
335
|
-
return A.value ? `${Y.value}px ${Y.value}px ${X.value}px ${X.value}px` : `${X.value}px ${Y.value}px ${Y.value}px ${X.value}px`;
|
|
336
|
-
}
|
|
337
|
-
function rt() {
|
|
338
|
-
return A.value ? `${X.value}px ${X.value}px ${Y.value}px ${Y.value}px` : `${Y.value}px ${X.value}px ${X.value}px ${Y.value}px`;
|
|
339
|
-
}
|
|
340
|
-
let Z = o(() => E.value === !1), Q = o(() => Z.value ? "75ms ease" : "0s");
|
|
341
|
-
function $(e) {
|
|
342
|
-
let t = H.value.thumbInset;
|
|
343
|
-
return `clamp(${t}px, ${e}%, calc(100% - ${t}px))`;
|
|
344
|
-
}
|
|
345
|
-
function it(e, t = 0) {
|
|
346
|
-
let n = A.value ? H.value.thumbH : H.value.thumbW, r = A.value ? H.value.thumbW : H.value.thumbH, i = Math.min(n, r) / 2, a = E.value !== !1, o = {
|
|
347
|
-
position: "absolute",
|
|
348
|
-
width: `${n}px`,
|
|
349
|
-
height: `${r}px`,
|
|
350
|
-
borderRadius: `${i}px`,
|
|
351
|
-
backgroundColor: G.value.active,
|
|
352
|
-
"--tw-ring-color": G.value.active,
|
|
353
|
-
zIndex: "2",
|
|
354
|
-
transition: Z.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
|
|
355
|
-
}, s = j.value ? E.value === t || D.value === t : a || be.value, c = (j.value ? E.value === t : a) ? 1.08 : 1, l = s ? .5 : 1;
|
|
356
|
-
return A.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;
|
|
357
|
-
}
|
|
358
|
-
function at(e) {
|
|
359
|
-
let t = E.value === !1 ? 1 : 1.15, n = {
|
|
360
|
-
position: "absolute",
|
|
361
|
-
color: G.value.active,
|
|
362
|
-
"--tw-ring-color": G.value.active,
|
|
363
|
-
zIndex: "2",
|
|
364
|
-
transition: Z.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
|
|
365
|
-
};
|
|
366
|
-
return A.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;
|
|
367
|
-
}
|
|
368
|
-
function ot(e) {
|
|
369
|
-
let t = H.value.track / 2 + 36, n = H.value.track / 2 + 40;
|
|
370
|
-
return A.value ? {
|
|
371
|
-
left: `calc(50% - ${n}px)`,
|
|
372
|
-
bottom: $(e),
|
|
373
|
-
transform: "translateY(50%)",
|
|
374
|
-
transition: Z.value ? "bottom " + Q.value : "none"
|
|
375
|
-
} : {
|
|
376
|
-
left: $(e),
|
|
377
|
-
top: `calc(50% - ${t}px)`,
|
|
378
|
-
transform: "translateX(-50%)",
|
|
379
|
-
transition: Z.value ? "left " + Q.value : "none"
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
let st = o(() => j.value ? `${M.value.lo} – ${M.value.hi}` : String(v.modelValue)), ct = o(() => j.value && typeof E.value == "number" ? E.value === 0 ? M.value.lo : M.value.hi : v.modelValue), lt = o(() => j.value && typeof E.value == "number" ? E.value === 0 ? F.value : I.value : F.value);
|
|
383
|
-
return me({
|
|
384
|
-
validate: C.validate,
|
|
385
|
-
resetValidation: C.resetValidation
|
|
386
|
-
}), (e, t) => (m(), l("div", {
|
|
387
|
-
ref_key: "rootEl",
|
|
388
|
-
ref: S,
|
|
389
|
-
class: f(["flex select-none", A.value ? "h-full flex-col items-center" : "flex-col gap-1"]),
|
|
390
|
-
onFocusout: t[3] ||= (...e) => _(ye) && _(ye)(...e)
|
|
391
|
-
}, [
|
|
392
|
-
d.label || d.showValue ? (m(), l("div", oe, [d.label ? (m(), l("span", {
|
|
393
|
-
key: 0,
|
|
394
|
-
class: f(["text-label-large", _(_e) ? "text-error" : "text-on-surface"])
|
|
395
|
-
}, [ee(g(d.label), 1), d.required ? (m(), l("span", se, "\xA0*")) : c("", !0)], 2)) : c("", !0), d.showValue ? (m(), l("span", ce, g(st.value), 1)) : c("", !0)])) : c("", !0),
|
|
396
|
-
u("div", { class: f(["flex items-center", A.value ? "flex-1 flex-col" : ""]) }, [u("div", {
|
|
397
|
-
ref_key: "trackEl",
|
|
398
|
-
ref: b,
|
|
399
|
-
role: j.value ? "group" : "slider",
|
|
400
|
-
tabindex: j.value ? void 0 : 0,
|
|
401
|
-
"aria-label": j.value ? d.label : void 0,
|
|
402
|
-
"aria-valuenow": j.value ? void 0 : d.modelValue,
|
|
403
|
-
"aria-valuemin": j.value ? void 0 : d.min,
|
|
404
|
-
"aria-valuemax": j.value ? void 0 : d.max,
|
|
405
|
-
"aria-disabled": _(w) || void 0,
|
|
406
|
-
"aria-invalid": _(_e) || void 0,
|
|
407
|
-
"aria-describedby": _(T) ? _(ve) : void 0,
|
|
408
|
-
"aria-orientation": j.value ? void 0 : d.orientation,
|
|
409
|
-
class: f(["group relative touch-none cursor-pointer outline-none", _(w) && "cursor-not-allowed"]),
|
|
410
|
-
style: p(A.value ? {
|
|
411
|
-
width: `${H.value.hitArea}px`,
|
|
412
|
-
minHeight: "160px",
|
|
413
|
-
height: "100%"
|
|
414
|
-
} : {
|
|
415
|
-
height: `${H.value.hitArea}px`,
|
|
416
|
-
width: "100%"
|
|
417
|
-
}),
|
|
418
|
-
onPointerdown: Re,
|
|
419
|
-
onKeydown: t[0] ||= (e) => !j.value && Ve(e),
|
|
420
|
-
onFocus: t[1] ||= (e) => be.value = !j.value,
|
|
421
|
-
onBlur: t[2] ||= (e) => be.value = !1
|
|
422
|
-
}, [
|
|
423
|
-
u("div", {
|
|
424
|
-
class: "absolute",
|
|
425
|
-
style: p(A.value ? {
|
|
426
|
-
left: "50%",
|
|
427
|
-
top: "0",
|
|
428
|
-
bottom: "0",
|
|
429
|
-
width: `${H.value.track}px`,
|
|
430
|
-
transform: "translateX(-50%)",
|
|
431
|
-
borderRadius: `${X.value}px`
|
|
432
|
-
} : {
|
|
433
|
-
top: "50%",
|
|
434
|
-
left: "0",
|
|
435
|
-
right: "0",
|
|
436
|
-
height: `${H.value.track}px`,
|
|
437
|
-
transform: "translateY(-50%)",
|
|
438
|
-
borderRadius: `${X.value}px`
|
|
439
|
-
})
|
|
440
|
-
}, [
|
|
441
|
-
d.variant === "standard" ? (m(), l(i, { key: 0 }, [u("div", {
|
|
442
|
-
class: "absolute",
|
|
443
|
-
style: p({
|
|
444
|
-
...A.value ? {
|
|
445
|
-
left: 0,
|
|
446
|
-
right: 0,
|
|
447
|
-
bottom: 0,
|
|
448
|
-
height: We(F.value)
|
|
449
|
-
} : {
|
|
450
|
-
top: 0,
|
|
451
|
-
bottom: 0,
|
|
452
|
-
left: 0,
|
|
453
|
-
width: We(F.value)
|
|
454
|
-
},
|
|
455
|
-
borderRadius: nt(),
|
|
456
|
-
backgroundColor: W.value.active,
|
|
457
|
-
transition: `all ${Q.value}`
|
|
458
|
-
})
|
|
459
|
-
}, null, 4), u("div", {
|
|
460
|
-
class: "absolute",
|
|
461
|
-
style: p({
|
|
462
|
-
...A.value ? {
|
|
463
|
-
left: 0,
|
|
464
|
-
right: 0,
|
|
465
|
-
top: 0,
|
|
466
|
-
height: Ge(F.value)
|
|
467
|
-
} : {
|
|
468
|
-
top: 0,
|
|
469
|
-
bottom: 0,
|
|
470
|
-
right: 0,
|
|
471
|
-
width: Ge(F.value)
|
|
472
|
-
},
|
|
473
|
-
borderRadius: rt(),
|
|
474
|
-
backgroundColor: W.value.inactive,
|
|
475
|
-
transition: `all ${Q.value}`
|
|
476
|
-
})
|
|
477
|
-
}, null, 4)], 64)) : d.variant === "centered" ? (m(), l(i, { key: 1 }, [
|
|
478
|
-
u("div", {
|
|
479
|
-
class: "absolute",
|
|
480
|
-
style: p({
|
|
481
|
-
...A.value ? {
|
|
482
|
-
left: 0,
|
|
483
|
-
right: 0,
|
|
484
|
-
bottom: Xe(),
|
|
485
|
-
height: Ze()
|
|
486
|
-
} : {
|
|
487
|
-
top: 0,
|
|
488
|
-
bottom: 0,
|
|
489
|
-
left: Xe(),
|
|
490
|
-
width: Ze()
|
|
491
|
-
},
|
|
492
|
-
borderRadius: tt(),
|
|
493
|
-
backgroundColor: W.value.active,
|
|
494
|
-
transition: `all ${Q.value}`
|
|
495
|
-
})
|
|
496
|
-
}, null, 4),
|
|
497
|
-
u("div", {
|
|
498
|
-
class: "absolute",
|
|
499
|
-
style: p({
|
|
500
|
-
...A.value ? {
|
|
501
|
-
left: 0,
|
|
502
|
-
right: 0,
|
|
503
|
-
top: 0,
|
|
504
|
-
height: Qe()
|
|
505
|
-
} : {
|
|
506
|
-
top: 0,
|
|
507
|
-
bottom: 0,
|
|
508
|
-
right: 0,
|
|
509
|
-
width: Qe()
|
|
510
|
-
},
|
|
511
|
-
borderRadius: rt(),
|
|
512
|
-
backgroundColor: W.value.inactive,
|
|
513
|
-
transition: `all ${Q.value}`
|
|
514
|
-
})
|
|
515
|
-
}, null, 4),
|
|
516
|
-
u("div", {
|
|
517
|
-
class: "absolute",
|
|
518
|
-
style: p({
|
|
519
|
-
...A.value ? {
|
|
520
|
-
left: 0,
|
|
521
|
-
right: 0,
|
|
522
|
-
bottom: 0,
|
|
523
|
-
height: $e()
|
|
524
|
-
} : {
|
|
525
|
-
top: 0,
|
|
526
|
-
bottom: 0,
|
|
527
|
-
left: 0,
|
|
528
|
-
width: $e()
|
|
529
|
-
},
|
|
530
|
-
borderRadius: nt(),
|
|
531
|
-
backgroundColor: W.value.inactive,
|
|
532
|
-
transition: `all ${Q.value}`
|
|
533
|
-
})
|
|
534
|
-
}, null, 4)
|
|
535
|
-
], 64)) : d.variant === "range" ? (m(), l(i, { key: 2 }, [
|
|
536
|
-
u("div", {
|
|
537
|
-
class: "absolute",
|
|
538
|
-
style: p({
|
|
539
|
-
...A.value ? {
|
|
540
|
-
left: 0,
|
|
541
|
-
right: 0,
|
|
542
|
-
bottom: 0,
|
|
543
|
-
height: Ke()
|
|
544
|
-
} : {
|
|
545
|
-
top: 0,
|
|
546
|
-
bottom: 0,
|
|
547
|
-
left: 0,
|
|
548
|
-
width: Ke()
|
|
549
|
-
},
|
|
550
|
-
borderRadius: nt(),
|
|
551
|
-
backgroundColor: W.value.inactive,
|
|
552
|
-
transition: `all ${Q.value}`
|
|
553
|
-
})
|
|
554
|
-
}, null, 4),
|
|
555
|
-
u("div", {
|
|
556
|
-
class: "absolute",
|
|
557
|
-
style: p({
|
|
558
|
-
...A.value ? {
|
|
559
|
-
left: 0,
|
|
560
|
-
right: 0,
|
|
561
|
-
bottom: qe(),
|
|
562
|
-
height: Je()
|
|
563
|
-
} : {
|
|
564
|
-
top: 0,
|
|
565
|
-
bottom: 0,
|
|
566
|
-
left: qe(),
|
|
567
|
-
width: Je()
|
|
568
|
-
},
|
|
569
|
-
borderRadius: tt(),
|
|
570
|
-
backgroundColor: W.value.active,
|
|
571
|
-
transition: `all ${Q.value}`
|
|
572
|
-
})
|
|
573
|
-
}, null, 4),
|
|
574
|
-
u("div", {
|
|
575
|
-
class: "absolute",
|
|
576
|
-
style: p({
|
|
577
|
-
...A.value ? {
|
|
578
|
-
left: 0,
|
|
579
|
-
right: 0,
|
|
580
|
-
top: 0,
|
|
581
|
-
height: Ye()
|
|
582
|
-
} : {
|
|
583
|
-
top: 0,
|
|
584
|
-
bottom: 0,
|
|
585
|
-
right: 0,
|
|
586
|
-
width: Ye()
|
|
587
|
-
},
|
|
588
|
-
borderRadius: rt(),
|
|
589
|
-
backgroundColor: W.value.inactive,
|
|
590
|
-
transition: `all ${Q.value}`
|
|
591
|
-
})
|
|
592
|
-
}, null, 4)
|
|
593
|
-
], 64)) : c("", !0),
|
|
594
|
-
d.icon ? (m(), s(n, {
|
|
595
|
-
key: 3,
|
|
596
|
-
name: d.icon,
|
|
597
|
-
size: H.value.iconSize,
|
|
598
|
-
class: "absolute z-[1]",
|
|
599
|
-
style: p({
|
|
600
|
-
color: d.variant === "standard" && F.value > 0 || d.variant === "range" && F.value > 0 ? W.value.inactive : W.value.active,
|
|
601
|
-
...A.value ? {
|
|
602
|
-
left: "50%",
|
|
603
|
-
bottom: `${Me.value}px`,
|
|
604
|
-
transform: "translateX(-50%)"
|
|
605
|
-
} : {
|
|
606
|
-
top: "50%",
|
|
607
|
-
left: `${Me.value}px`,
|
|
608
|
-
transform: "translateY(-50%)"
|
|
609
|
-
},
|
|
610
|
-
transition: "color 150ms ease"
|
|
611
|
-
})
|
|
612
|
-
}, null, 8, [
|
|
613
|
-
"name",
|
|
614
|
-
"size",
|
|
615
|
-
"style"
|
|
616
|
-
])) : d.stops ? c("", !0) : (m(), l("div", {
|
|
617
|
-
key: 4,
|
|
618
|
-
class: "absolute rounded-full",
|
|
619
|
-
style: p({
|
|
620
|
-
width: `${H.value.dot}px`,
|
|
621
|
-
height: `${H.value.dot}px`,
|
|
622
|
-
backgroundColor: W.value.active,
|
|
623
|
-
opacity: +!Te.value,
|
|
624
|
-
...A.value ? {
|
|
625
|
-
left: "50%",
|
|
626
|
-
bottom: `${H.value.dotInset}px`,
|
|
627
|
-
transform: "translateX(-50%)"
|
|
628
|
-
} : {
|
|
629
|
-
top: "50%",
|
|
630
|
-
left: `${H.value.dotInset}px`,
|
|
631
|
-
transform: "translateY(-50%)"
|
|
632
|
-
},
|
|
633
|
-
transition: "opacity 150ms ease"
|
|
634
|
-
})
|
|
635
|
-
}, null, 4)),
|
|
636
|
-
d.stops ? c("", !0) : (m(), l("div", {
|
|
637
|
-
key: 5,
|
|
638
|
-
class: "absolute rounded-full",
|
|
639
|
-
style: p({
|
|
640
|
-
width: `${H.value.dot}px`,
|
|
641
|
-
height: `${H.value.dot}px`,
|
|
642
|
-
backgroundColor: W.value.active,
|
|
643
|
-
opacity: +!Ee.value,
|
|
644
|
-
...A.value ? {
|
|
645
|
-
left: "50%",
|
|
646
|
-
top: `${H.value.dotInset}px`,
|
|
647
|
-
transform: "translateX(-50%)"
|
|
648
|
-
} : {
|
|
649
|
-
top: "50%",
|
|
650
|
-
right: `${H.value.dotInset}px`,
|
|
651
|
-
transform: "translateY(-50%)"
|
|
652
|
-
},
|
|
653
|
-
transition: "opacity 150ms ease"
|
|
654
|
-
})
|
|
655
|
-
}, null, 4)),
|
|
656
|
-
d.stops ? (m(!0), l(i, { key: 6 }, ie(Ue.value, (e, t) => (m(), l("div", {
|
|
657
|
-
key: t,
|
|
658
|
-
class: "absolute rounded-full",
|
|
659
|
-
style: p({
|
|
660
|
-
width: `${H.value.dot}px`,
|
|
661
|
-
height: `${H.value.dot}px`,
|
|
662
|
-
backgroundColor: e <= F.value ? W.value.inactive : W.value.active,
|
|
663
|
-
opacity: Math.abs(e - F.value) < .01 || j.value && Math.abs(e - I.value) < .01 ? 0 : 1,
|
|
664
|
-
...A.value ? {
|
|
665
|
-
left: "50%",
|
|
666
|
-
bottom: `${e}%`,
|
|
667
|
-
transform: "translateX(-50%) translateY(50%)"
|
|
668
|
-
} : {
|
|
669
|
-
top: "50%",
|
|
670
|
-
left: `${e}%`,
|
|
671
|
-
transform: "translateX(-50%) translateY(-50%)"
|
|
672
|
-
}
|
|
673
|
-
})
|
|
674
|
-
}, null, 4))), 128)) : c("", !0)
|
|
675
|
-
], 4),
|
|
676
|
-
j.value ? (m(), l(i, { key: 1 }, ie([0, 1], (e) => u("div", {
|
|
677
|
-
key: e,
|
|
678
|
-
ref_for: !0,
|
|
679
|
-
ref: (t) => {
|
|
680
|
-
t && (x.value[e] = t);
|
|
681
|
-
},
|
|
682
|
-
role: "slider",
|
|
683
|
-
tabindex: d.disabled ? -1 : 0,
|
|
684
|
-
"aria-label": e === 0 ? _(ge).sliderRangeStart : _(ge).sliderRangeEnd,
|
|
685
|
-
"aria-valuenow": e === 0 ? M.value.lo : M.value.hi,
|
|
686
|
-
"aria-valuemin": e === 0 ? d.min : M.value.lo,
|
|
687
|
-
"aria-valuemax": e === 0 ? M.value.hi : d.max,
|
|
688
|
-
"aria-disabled": d.disabled || void 0,
|
|
689
|
-
"aria-orientation": d.orientation,
|
|
690
|
-
class: f(["pointer-events-none flex items-center justify-center rounded-full outline-none", O.value === e && "ring-2 ring-offset-2 ring-offset-surface"]),
|
|
691
|
-
style: p(d.thumbIcon ? at(e === 0 ? F.value : I.value) : it(e === 0 ? F.value : I.value, e)),
|
|
692
|
-
onKeydown: (t) => He(e, t),
|
|
693
|
-
onFocus: (t) => Se(e),
|
|
694
|
-
onBlur: Ce
|
|
695
|
-
}, [d.thumbIcon ? (m(), s(n, {
|
|
696
|
-
key: 0,
|
|
697
|
-
name: d.thumbIcon,
|
|
698
|
-
size: H.value.thumbIconSize
|
|
699
|
-
}, null, 8, ["name", "size"])) : c("", !0)], 46, ue)), 64)) : (m(), l(i, { key: 0 }, [d.thumbIcon ? (m(), s(n, {
|
|
700
|
-
key: 0,
|
|
701
|
-
name: d.thumbIcon,
|
|
702
|
-
size: H.value.thumbIconSize,
|
|
703
|
-
class: "pointer-events-none rounded-full group-focus-visible:ring-2 group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-surface",
|
|
704
|
-
style: p(at(F.value))
|
|
705
|
-
}, null, 8, [
|
|
706
|
-
"name",
|
|
707
|
-
"size",
|
|
708
|
-
"style"
|
|
709
|
-
])) : (m(), l("div", {
|
|
710
|
-
key: 1,
|
|
711
|
-
class: "pointer-events-none group-focus-visible:ring-2 group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-surface",
|
|
712
|
-
style: p(it(F.value))
|
|
713
|
-
}, null, 4))], 64)),
|
|
714
|
-
te(a, {
|
|
715
|
-
"enter-active-class": "transition-opacity duration-100",
|
|
716
|
-
"enter-from-class": "opacity-0",
|
|
717
|
-
"leave-active-class": "transition-opacity duration-75",
|
|
718
|
-
"leave-to-class": "opacity-0"
|
|
719
|
-
}, {
|
|
720
|
-
default: ae(() => [d.showTooltip && E.value !== !1 ? (m(), l("div", {
|
|
721
|
-
key: 0,
|
|
722
|
-
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",
|
|
723
|
-
style: p(ot(lt.value))
|
|
724
|
-
}, g(ct.value), 5)) : c("", !0)]),
|
|
725
|
-
_: 1
|
|
726
|
-
})
|
|
727
|
-
], 46, le)], 2),
|
|
728
|
-
_(T) ? (m(), l("p", {
|
|
729
|
-
key: 1,
|
|
730
|
-
id: _(ve),
|
|
731
|
-
role: "alert",
|
|
732
|
-
class: "text-body-small text-error"
|
|
733
|
-
}, g(_(T)), 9, de)) : c("", !0)
|
|
734
|
-
], 34));
|
|
735
|
-
}
|
|
736
|
-
});
|
|
737
|
-
export { me as t };
|
|
738
|
-
|
|
739
|
-
//# sourceMappingURL=MSlider-D_O8J9YH.js.map
|