@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
|
@@ -0,0 +1,745 @@
|
|
|
1
|
+
import { n as e, r as t } from "./_useFieldValidation-CvZnZfl-.js";
|
|
2
|
+
import { r as n, t as r } from "./MIcon-BSsJZhK7.js";
|
|
3
|
+
import { i } from "./useLocale-ybIju59R.js";
|
|
4
|
+
import { Fragment as a, Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as ee, createVNode as te, defineComponent as f, normalizeClass as p, normalizeStyle as m, onBeforeUnmount as ne, onMounted as re, openBlock as h, ref as g, renderList as ie, toDisplayString as _, unref as v, 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__ */ f({
|
|
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(f, { expose: me, emit: he }) {
|
|
78
|
+
let y = f, b = he, ge = i(), x = g(), _e = g([]), ve = g(null), S = e({
|
|
79
|
+
value: () => y.modelValue,
|
|
80
|
+
rules: () => y.rules,
|
|
81
|
+
required: () => y.required,
|
|
82
|
+
error: () => y.error,
|
|
83
|
+
errorLabel: () => y.errorLabel,
|
|
84
|
+
name: () => y.name,
|
|
85
|
+
validateOn: () => y.validateOn,
|
|
86
|
+
validateDebounce: () => y.validateDebounce,
|
|
87
|
+
disabled: () => y.disabled,
|
|
88
|
+
focus: () => {
|
|
89
|
+
(k.value ? _e.value[0] : x.value)?.focus();
|
|
90
|
+
},
|
|
91
|
+
el: () => ve.value,
|
|
92
|
+
setValue: (e) => b("update:modelValue", e)
|
|
93
|
+
}), C = S.disabled, { hasError: ye, message: be, messageId: xe } = S, Se = t(() => ve.value, () => {
|
|
94
|
+
S.onBlur(), b("blur");
|
|
95
|
+
}), w = g(!1), Ce = g(!1), T = g(null), E = g(null), D = !1;
|
|
96
|
+
function we(e) {
|
|
97
|
+
D = !0, _e.value[e]?.focus({ preventScroll: !0 }), D = !1;
|
|
98
|
+
}
|
|
99
|
+
function Te(e) {
|
|
100
|
+
T.value = e, E.value = D ? null : e;
|
|
101
|
+
}
|
|
102
|
+
function Ee() {
|
|
103
|
+
T.value = null, E.value = null;
|
|
104
|
+
}
|
|
105
|
+
let O = s(() => y.orientation === "vertical"), k = s(() => y.variant === "range");
|
|
106
|
+
s(() => y.variant === "centered");
|
|
107
|
+
let A = s(() => {
|
|
108
|
+
if (k.value) {
|
|
109
|
+
let e = y.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: y.modelValue,
|
|
117
|
+
hi: y.modelValue
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
function j(e) {
|
|
121
|
+
let t = y.max - y.min;
|
|
122
|
+
return t === 0 ? 0 : (e - y.min) / t * 100;
|
|
123
|
+
}
|
|
124
|
+
let M = g(null), De = s(() => !y.stops && w.value !== !1 && M.value !== null ? M.value * 100 : null), N = s(() => {
|
|
125
|
+
let e = De.value;
|
|
126
|
+
return e !== null && (w.value === "single" || w.value === 0) ? k.value ? Math.min(e, j(A.value.hi)) : e : j(A.value.lo);
|
|
127
|
+
}), P = s(() => {
|
|
128
|
+
let e = De.value;
|
|
129
|
+
return e !== null && w.value === 1 ? Math.max(e, j(A.value.lo)) : j(A.value.hi);
|
|
130
|
+
}), F = s(() => j(0)), Oe = s(() => je.value < B.value.dotInset + B.value.dot / 2 ? !0 : y.variant === "centered" ? Math.min(N.value, F.value) <= 0 : y.variant !== "range" || N.value <= 0), ke = s(() => Me.value < B.value.dotInset + B.value.dot / 2 ? !0 : y.variant === "centered" ? Math.max(N.value, F.value) >= 100 : y.variant === "range" ? P.value >= 100 : N.value >= 100), I = g(0), L, Ae = () => {
|
|
131
|
+
let e = x.value;
|
|
132
|
+
e && (I.value = O.value ? e.offsetHeight : e.offsetWidth);
|
|
133
|
+
};
|
|
134
|
+
re(() => {
|
|
135
|
+
Ae(), typeof ResizeObserver < "u" && x.value && (L = new ResizeObserver(Ae), L.observe(x.value));
|
|
136
|
+
}), ne(() => L?.disconnect());
|
|
137
|
+
let R = (e) => {
|
|
138
|
+
let t = B.value.thumbInset;
|
|
139
|
+
return Math.min(Math.max(e / 100 * I.value, t), I.value - t);
|
|
140
|
+
}, je = s(() => I.value && (y.variant === "range" || y.variant === "centered" && N.value <= F.value) ? R(N.value) - V.value : Infinity), Me = s(() => I.value ? y.variant === "range" ? I.value - R(P.value) - V.value : y.variant === "centered" && N.value < F.value ? Infinity : I.value - R(N.value) - V.value : Infinity), Ne = s(() => je.value <= Y.value), z = s(() => Me.value <= Y.value), Pe = {
|
|
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
|
+
}, B = s(() => Pe[y.size] ?? Pe.xs), Fe = s(() => B.value.thumbInset + B.value.thumbW / 2 + B.value.iconSize / 2 + 3), V = s(() => y.thumbIcon ? Math.max(B.value.gap, B.value.thumbIconSize / 2 + 4) : B.value.gap), Ie = {
|
|
207
|
+
primary: "var(--color-primary)",
|
|
208
|
+
secondary: "var(--color-secondary)",
|
|
209
|
+
tertiary: "var(--color-tertiary)",
|
|
210
|
+
error: "var(--color-error)"
|
|
211
|
+
};
|
|
212
|
+
function Le(e, t) {
|
|
213
|
+
let n = e ?? t;
|
|
214
|
+
return Ie[n] ?? n;
|
|
215
|
+
}
|
|
216
|
+
let H = s(() => C.value ? {
|
|
217
|
+
active: fe,
|
|
218
|
+
inactive: pe
|
|
219
|
+
} : {
|
|
220
|
+
active: Le(y.fillColor, y.color),
|
|
221
|
+
inactive: "var(--color-secondary-container)"
|
|
222
|
+
}), U = s(() => C.value ? {
|
|
223
|
+
active: fe,
|
|
224
|
+
inactive: pe
|
|
225
|
+
} : {
|
|
226
|
+
active: Le(y.thumbColor, y.color),
|
|
227
|
+
inactive: "var(--color-secondary-container)"
|
|
228
|
+
});
|
|
229
|
+
function W(e) {
|
|
230
|
+
let t = Math.round((e - y.min) / y.step) * y.step + y.min;
|
|
231
|
+
return Math.max(y.min, Math.min(y.max, +t.toFixed(10)));
|
|
232
|
+
}
|
|
233
|
+
function G(e) {
|
|
234
|
+
if (!x.value) return 0;
|
|
235
|
+
let t = x.value.getBoundingClientRect();
|
|
236
|
+
if (O.value) return 1 - Math.max(0, Math.min(1, (e.clientY - t.top) / t.height));
|
|
237
|
+
let r = n(x.value) ? t.right - e.clientX : e.clientX - t.left;
|
|
238
|
+
return Math.max(0, Math.min(1, r / t.width));
|
|
239
|
+
}
|
|
240
|
+
function Re(e) {
|
|
241
|
+
return W(y.min + G(e) * (y.max - y.min));
|
|
242
|
+
}
|
|
243
|
+
let K = !1;
|
|
244
|
+
function ze(e, t) {
|
|
245
|
+
let { lo: n, hi: r } = A.value;
|
|
246
|
+
return e === 0 ? [Math.min(t, r), r] : [n, Math.max(t, n)];
|
|
247
|
+
}
|
|
248
|
+
function Be(e) {
|
|
249
|
+
if (C.value) return;
|
|
250
|
+
e.preventDefault();
|
|
251
|
+
let t = Re(e);
|
|
252
|
+
if (k.value) {
|
|
253
|
+
let { lo: e, hi: n } = A.value;
|
|
254
|
+
K = !1;
|
|
255
|
+
let r;
|
|
256
|
+
t <= e && t < n ? r = 0 : t >= n && t > e ? r = 1 : e === n ? (r = 0, K = !0) : r = Math.abs(t - e) <= Math.abs(t - n) ? 0 : 1, w.value = r, we(r), K || b("update:modelValue", ze(r, t));
|
|
257
|
+
} else w.value = "single", b("update:modelValue", t);
|
|
258
|
+
M.value = K ? null : G(e), window.addEventListener("pointermove", Ve), window.addEventListener("pointerup", q), window.addEventListener("pointercancel", q);
|
|
259
|
+
}
|
|
260
|
+
function Ve(e) {
|
|
261
|
+
if (w.value === !1) return;
|
|
262
|
+
let t = Re(e);
|
|
263
|
+
if (k.value) {
|
|
264
|
+
if (K) {
|
|
265
|
+
if (t === A.value.lo) return;
|
|
266
|
+
K = !1, w.value = +(t > A.value.lo), we(w.value);
|
|
267
|
+
}
|
|
268
|
+
M.value = G(e), b("update:modelValue", ze(w.value, t));
|
|
269
|
+
} else M.value = G(e), b("update:modelValue", t);
|
|
270
|
+
}
|
|
271
|
+
function q() {
|
|
272
|
+
w.value = !1, M.value = null, K = !1, window.removeEventListener("pointermove", Ve), window.removeEventListener("pointerup", q), window.removeEventListener("pointercancel", q);
|
|
273
|
+
}
|
|
274
|
+
let He = {
|
|
275
|
+
ArrowRight: 1,
|
|
276
|
+
ArrowUp: 1,
|
|
277
|
+
ArrowLeft: -1,
|
|
278
|
+
ArrowDown: -1
|
|
279
|
+
};
|
|
280
|
+
function Ue(e) {
|
|
281
|
+
let t = He[e.key];
|
|
282
|
+
if (t !== void 0) return (e.key === "ArrowLeft" || e.key === "ArrowRight") && !O.value && n(x.value) ? -t : t;
|
|
283
|
+
}
|
|
284
|
+
function We(e) {
|
|
285
|
+
if (C.value) return;
|
|
286
|
+
let t = Ue(e);
|
|
287
|
+
t !== void 0 && (e.preventDefault(), b("update:modelValue", W(y.modelValue + t * y.step))), e.key === "Home" && (e.preventDefault(), b("update:modelValue", y.min)), e.key === "End" && (e.preventDefault(), b("update:modelValue", y.max));
|
|
288
|
+
}
|
|
289
|
+
function Ge(e, t) {
|
|
290
|
+
if (C.value) return;
|
|
291
|
+
let { lo: n, hi: r } = A.value, i = e === 0 ? n : r, a = Ue(t), o;
|
|
292
|
+
a === void 0 ? t.key === "Home" ? o = e === 0 ? y.min : n : t.key === "End" && (o = e === 0 ? r : y.max) : o = W(i + a * y.step), o !== void 0 && (t.preventDefault(), E.value = e, b("update:modelValue", ze(e, o)));
|
|
293
|
+
}
|
|
294
|
+
ne(() => {
|
|
295
|
+
window.removeEventListener("pointermove", Ve), window.removeEventListener("pointerup", q), window.removeEventListener("pointercancel", q);
|
|
296
|
+
});
|
|
297
|
+
let Ke = s(() => {
|
|
298
|
+
if (!y.stops) return [];
|
|
299
|
+
let e = [], t = y.max - y.min, n = y.icon ? (B.value.iconSize + B.value.radius) / 2 : 0;
|
|
300
|
+
for (let r = y.min + y.step; r < y.max; r += y.step) {
|
|
301
|
+
let i = (r - y.min) / t * 100;
|
|
302
|
+
y.icon && i < n || e.push(i);
|
|
303
|
+
}
|
|
304
|
+
return e.length <= 28 ? e : [];
|
|
305
|
+
});
|
|
306
|
+
function qe(e) {
|
|
307
|
+
return `calc(${$(e)} - ${V.value}px)`;
|
|
308
|
+
}
|
|
309
|
+
function Je(e) {
|
|
310
|
+
return z.value ? "0px" : `calc(100% - ${$(e)} - ${V.value}px)`;
|
|
311
|
+
}
|
|
312
|
+
function Ye() {
|
|
313
|
+
return Ne.value ? "0px" : `calc(${$(N.value)} - ${V.value}px)`;
|
|
314
|
+
}
|
|
315
|
+
function Xe() {
|
|
316
|
+
return `calc(${$(N.value)} + ${V.value}px)`;
|
|
317
|
+
}
|
|
318
|
+
function Ze() {
|
|
319
|
+
return `calc(${$(P.value)} - ${$(N.value)} - ${V.value * 2}px)`;
|
|
320
|
+
}
|
|
321
|
+
function Qe() {
|
|
322
|
+
return z.value ? "0px" : `calc(100% - ${$(P.value)} - ${V.value}px)`;
|
|
323
|
+
}
|
|
324
|
+
function $e() {
|
|
325
|
+
return N.value >= F.value ? `${F.value}%` : `calc(${$(N.value)} + ${V.value}px)`;
|
|
326
|
+
}
|
|
327
|
+
function et() {
|
|
328
|
+
return N.value >= F.value ? `calc(${$(N.value)} - ${F.value}% - ${V.value}px)` : `calc(${F.value}% - ${$(N.value)} - ${V.value}px)`;
|
|
329
|
+
}
|
|
330
|
+
function tt() {
|
|
331
|
+
return z.value ? "0px" : N.value >= F.value ? `calc(100% - ${$(N.value)} - ${V.value}px)` : `calc(100% - ${F.value}% - ${V.value}px)`;
|
|
332
|
+
}
|
|
333
|
+
function nt() {
|
|
334
|
+
return Ne.value ? "0px" : N.value <= F.value ? `calc(${$(N.value)} - ${V.value}px)` : `calc(${F.value}% - ${V.value}px)`;
|
|
335
|
+
}
|
|
336
|
+
let rt = s(() => B.value.radius), J = s(() => Math.max(2, rt.value / 4)), Y = s(() => rt.value * 1.3);
|
|
337
|
+
function it() {
|
|
338
|
+
return `${J.value}px`;
|
|
339
|
+
}
|
|
340
|
+
function X() {
|
|
341
|
+
return O.value ? `${J.value}px ${J.value}px ${Y.value}px ${Y.value}px` : `${Y.value}px ${J.value}px ${J.value}px ${Y.value}px`;
|
|
342
|
+
}
|
|
343
|
+
function at() {
|
|
344
|
+
return O.value ? `${Y.value}px ${Y.value}px ${J.value}px ${J.value}px` : `${J.value}px ${Y.value}px ${Y.value}px ${J.value}px`;
|
|
345
|
+
}
|
|
346
|
+
let Z = s(() => w.value === !1), Q = s(() => Z.value ? "75ms ease" : "0s");
|
|
347
|
+
function $(e) {
|
|
348
|
+
let t = B.value.thumbInset;
|
|
349
|
+
return `clamp(${t}px, ${e}%, calc(100% - ${t}px))`;
|
|
350
|
+
}
|
|
351
|
+
function ot(e, t = 0) {
|
|
352
|
+
let n = O.value ? B.value.thumbH : B.value.thumbW, r = O.value ? B.value.thumbW : B.value.thumbH, i = Math.min(n, r) / 2, a = w.value !== !1, o = {
|
|
353
|
+
position: "absolute",
|
|
354
|
+
width: `${n}px`,
|
|
355
|
+
height: `${r}px`,
|
|
356
|
+
borderRadius: `${i}px`,
|
|
357
|
+
backgroundColor: U.value.active,
|
|
358
|
+
"--tw-ring-color": U.value.active,
|
|
359
|
+
zIndex: "2",
|
|
360
|
+
transition: Z.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
|
|
361
|
+
}, s = k.value ? w.value === t || T.value === t : a || Ce.value, c = (k.value ? w.value === t : a) ? 1.08 : 1, l = s ? .5 : 1;
|
|
362
|
+
return O.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;
|
|
363
|
+
}
|
|
364
|
+
function st(e) {
|
|
365
|
+
let t = w.value === !1 ? 1 : 1.15, n = {
|
|
366
|
+
position: "absolute",
|
|
367
|
+
color: U.value.active,
|
|
368
|
+
"--tw-ring-color": U.value.active,
|
|
369
|
+
zIndex: "2",
|
|
370
|
+
transition: Z.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
|
|
371
|
+
};
|
|
372
|
+
return O.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;
|
|
373
|
+
}
|
|
374
|
+
function ct(e) {
|
|
375
|
+
let t = B.value.track / 2 + 36, n = B.value.track / 2 + 40;
|
|
376
|
+
return O.value ? {
|
|
377
|
+
left: `calc(50% - ${n}px)`,
|
|
378
|
+
bottom: $(e),
|
|
379
|
+
transform: "translateY(50%)",
|
|
380
|
+
transition: Z.value ? "bottom " + Q.value : "none"
|
|
381
|
+
} : {
|
|
382
|
+
left: $(e),
|
|
383
|
+
top: `calc(50% - ${t}px)`,
|
|
384
|
+
transform: "translateX(-50%)",
|
|
385
|
+
transition: Z.value ? "left " + Q.value : "none"
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
let lt = s(() => k.value ? `${A.value.lo} – ${A.value.hi}` : String(y.modelValue)), ut = s(() => k.value && typeof w.value == "number" ? w.value === 0 ? A.value.lo : A.value.hi : y.modelValue), dt = s(() => k.value && typeof w.value == "number" ? w.value === 0 ? N.value : P.value : N.value);
|
|
389
|
+
return me({
|
|
390
|
+
validate: S.validate,
|
|
391
|
+
resetValidation: S.resetValidation
|
|
392
|
+
}), (e, t) => (h(), u("div", {
|
|
393
|
+
ref_key: "rootEl",
|
|
394
|
+
ref: ve,
|
|
395
|
+
class: p(["flex select-none", O.value ? "h-full flex-col items-center" : "flex-col gap-1"]),
|
|
396
|
+
onFocusout: t[3] ||= (...e) => v(Se) && v(Se)(...e)
|
|
397
|
+
}, [
|
|
398
|
+
f.label || f.showValue ? (h(), u("div", oe, [f.label ? (h(), u("span", {
|
|
399
|
+
key: 0,
|
|
400
|
+
class: p(["text-label-large", v(ye) ? "text-error" : "text-on-surface"])
|
|
401
|
+
}, [ee(_(f.label), 1), f.required ? (h(), u("span", se, "\xA0*")) : l("", !0)], 2)) : l("", !0), f.showValue ? (h(), u("span", ce, _(lt.value), 1)) : l("", !0)])) : l("", !0),
|
|
402
|
+
d("div", { class: p(["flex items-center", O.value ? "flex-1 flex-col" : ""]) }, [d("div", {
|
|
403
|
+
ref_key: "trackEl",
|
|
404
|
+
ref: x,
|
|
405
|
+
role: k.value ? "group" : "slider",
|
|
406
|
+
tabindex: k.value ? void 0 : 0,
|
|
407
|
+
"aria-label": k.value ? f.label : void 0,
|
|
408
|
+
"aria-valuenow": k.value ? void 0 : f.modelValue,
|
|
409
|
+
"aria-valuemin": k.value ? void 0 : f.min,
|
|
410
|
+
"aria-valuemax": k.value ? void 0 : f.max,
|
|
411
|
+
"aria-disabled": v(C) || void 0,
|
|
412
|
+
"aria-invalid": v(ye) || void 0,
|
|
413
|
+
"aria-describedby": v(be) ? v(xe) : void 0,
|
|
414
|
+
"aria-orientation": k.value ? void 0 : f.orientation,
|
|
415
|
+
class: p(["group relative touch-none cursor-pointer outline-none", [v(C) && "cursor-not-allowed", !O.value && "m3-rtl:-scale-x-100"]]),
|
|
416
|
+
style: m(O.value ? {
|
|
417
|
+
width: `${B.value.hitArea}px`,
|
|
418
|
+
minHeight: "160px",
|
|
419
|
+
height: "100%"
|
|
420
|
+
} : {
|
|
421
|
+
height: `${B.value.hitArea}px`,
|
|
422
|
+
width: "100%"
|
|
423
|
+
}),
|
|
424
|
+
onPointerdown: Be,
|
|
425
|
+
onKeydown: t[0] ||= (e) => !k.value && We(e),
|
|
426
|
+
onFocus: t[1] ||= (e) => Ce.value = !k.value,
|
|
427
|
+
onBlur: t[2] ||= (e) => Ce.value = !1
|
|
428
|
+
}, [
|
|
429
|
+
d("div", {
|
|
430
|
+
class: "absolute",
|
|
431
|
+
style: m(O.value ? {
|
|
432
|
+
left: "50%",
|
|
433
|
+
top: "0",
|
|
434
|
+
bottom: "0",
|
|
435
|
+
width: `${B.value.track}px`,
|
|
436
|
+
transform: "translateX(-50%)",
|
|
437
|
+
borderRadius: `${Y.value}px`
|
|
438
|
+
} : {
|
|
439
|
+
top: "50%",
|
|
440
|
+
left: "0",
|
|
441
|
+
right: "0",
|
|
442
|
+
height: `${B.value.track}px`,
|
|
443
|
+
transform: "translateY(-50%)",
|
|
444
|
+
borderRadius: `${Y.value}px`
|
|
445
|
+
})
|
|
446
|
+
}, [
|
|
447
|
+
f.variant === "standard" ? (h(), u(a, { key: 0 }, [d("div", {
|
|
448
|
+
class: "absolute",
|
|
449
|
+
style: m({
|
|
450
|
+
...O.value ? {
|
|
451
|
+
left: 0,
|
|
452
|
+
right: 0,
|
|
453
|
+
bottom: 0,
|
|
454
|
+
height: qe(N.value)
|
|
455
|
+
} : {
|
|
456
|
+
top: 0,
|
|
457
|
+
bottom: 0,
|
|
458
|
+
left: 0,
|
|
459
|
+
width: qe(N.value)
|
|
460
|
+
},
|
|
461
|
+
borderRadius: X(),
|
|
462
|
+
backgroundColor: H.value.active,
|
|
463
|
+
transition: `all ${Q.value}`
|
|
464
|
+
})
|
|
465
|
+
}, null, 4), d("div", {
|
|
466
|
+
class: "absolute",
|
|
467
|
+
style: m({
|
|
468
|
+
...O.value ? {
|
|
469
|
+
left: 0,
|
|
470
|
+
right: 0,
|
|
471
|
+
top: 0,
|
|
472
|
+
height: Je(N.value)
|
|
473
|
+
} : {
|
|
474
|
+
top: 0,
|
|
475
|
+
bottom: 0,
|
|
476
|
+
right: 0,
|
|
477
|
+
width: Je(N.value)
|
|
478
|
+
},
|
|
479
|
+
borderRadius: at(),
|
|
480
|
+
backgroundColor: H.value.inactive,
|
|
481
|
+
transition: `all ${Q.value}`
|
|
482
|
+
})
|
|
483
|
+
}, null, 4)], 64)) : f.variant === "centered" ? (h(), u(a, { key: 1 }, [
|
|
484
|
+
d("div", {
|
|
485
|
+
class: "absolute",
|
|
486
|
+
style: m({
|
|
487
|
+
...O.value ? {
|
|
488
|
+
left: 0,
|
|
489
|
+
right: 0,
|
|
490
|
+
bottom: $e(),
|
|
491
|
+
height: et()
|
|
492
|
+
} : {
|
|
493
|
+
top: 0,
|
|
494
|
+
bottom: 0,
|
|
495
|
+
left: $e(),
|
|
496
|
+
width: et()
|
|
497
|
+
},
|
|
498
|
+
borderRadius: it(),
|
|
499
|
+
backgroundColor: H.value.active,
|
|
500
|
+
transition: `all ${Q.value}`
|
|
501
|
+
})
|
|
502
|
+
}, null, 4),
|
|
503
|
+
d("div", {
|
|
504
|
+
class: "absolute",
|
|
505
|
+
style: m({
|
|
506
|
+
...O.value ? {
|
|
507
|
+
left: 0,
|
|
508
|
+
right: 0,
|
|
509
|
+
top: 0,
|
|
510
|
+
height: tt()
|
|
511
|
+
} : {
|
|
512
|
+
top: 0,
|
|
513
|
+
bottom: 0,
|
|
514
|
+
right: 0,
|
|
515
|
+
width: tt()
|
|
516
|
+
},
|
|
517
|
+
borderRadius: at(),
|
|
518
|
+
backgroundColor: H.value.inactive,
|
|
519
|
+
transition: `all ${Q.value}`
|
|
520
|
+
})
|
|
521
|
+
}, null, 4),
|
|
522
|
+
d("div", {
|
|
523
|
+
class: "absolute",
|
|
524
|
+
style: m({
|
|
525
|
+
...O.value ? {
|
|
526
|
+
left: 0,
|
|
527
|
+
right: 0,
|
|
528
|
+
bottom: 0,
|
|
529
|
+
height: nt()
|
|
530
|
+
} : {
|
|
531
|
+
top: 0,
|
|
532
|
+
bottom: 0,
|
|
533
|
+
left: 0,
|
|
534
|
+
width: nt()
|
|
535
|
+
},
|
|
536
|
+
borderRadius: X(),
|
|
537
|
+
backgroundColor: H.value.inactive,
|
|
538
|
+
transition: `all ${Q.value}`
|
|
539
|
+
})
|
|
540
|
+
}, null, 4)
|
|
541
|
+
], 64)) : f.variant === "range" ? (h(), u(a, { key: 2 }, [
|
|
542
|
+
d("div", {
|
|
543
|
+
class: "absolute",
|
|
544
|
+
style: m({
|
|
545
|
+
...O.value ? {
|
|
546
|
+
left: 0,
|
|
547
|
+
right: 0,
|
|
548
|
+
bottom: 0,
|
|
549
|
+
height: Ye()
|
|
550
|
+
} : {
|
|
551
|
+
top: 0,
|
|
552
|
+
bottom: 0,
|
|
553
|
+
left: 0,
|
|
554
|
+
width: Ye()
|
|
555
|
+
},
|
|
556
|
+
borderRadius: X(),
|
|
557
|
+
backgroundColor: H.value.inactive,
|
|
558
|
+
transition: `all ${Q.value}`
|
|
559
|
+
})
|
|
560
|
+
}, null, 4),
|
|
561
|
+
d("div", {
|
|
562
|
+
class: "absolute",
|
|
563
|
+
style: m({
|
|
564
|
+
...O.value ? {
|
|
565
|
+
left: 0,
|
|
566
|
+
right: 0,
|
|
567
|
+
bottom: Xe(),
|
|
568
|
+
height: Ze()
|
|
569
|
+
} : {
|
|
570
|
+
top: 0,
|
|
571
|
+
bottom: 0,
|
|
572
|
+
left: Xe(),
|
|
573
|
+
width: Ze()
|
|
574
|
+
},
|
|
575
|
+
borderRadius: it(),
|
|
576
|
+
backgroundColor: H.value.active,
|
|
577
|
+
transition: `all ${Q.value}`
|
|
578
|
+
})
|
|
579
|
+
}, null, 4),
|
|
580
|
+
d("div", {
|
|
581
|
+
class: "absolute",
|
|
582
|
+
style: m({
|
|
583
|
+
...O.value ? {
|
|
584
|
+
left: 0,
|
|
585
|
+
right: 0,
|
|
586
|
+
top: 0,
|
|
587
|
+
height: Qe()
|
|
588
|
+
} : {
|
|
589
|
+
top: 0,
|
|
590
|
+
bottom: 0,
|
|
591
|
+
right: 0,
|
|
592
|
+
width: Qe()
|
|
593
|
+
},
|
|
594
|
+
borderRadius: at(),
|
|
595
|
+
backgroundColor: H.value.inactive,
|
|
596
|
+
transition: `all ${Q.value}`
|
|
597
|
+
})
|
|
598
|
+
}, null, 4)
|
|
599
|
+
], 64)) : l("", !0),
|
|
600
|
+
f.icon ? (h(), c(r, {
|
|
601
|
+
key: 3,
|
|
602
|
+
name: f.icon,
|
|
603
|
+
size: B.value.iconSize,
|
|
604
|
+
class: "absolute z-[1]",
|
|
605
|
+
style: m({
|
|
606
|
+
color: f.variant === "standard" && N.value > 0 || f.variant === "range" && N.value > 0 ? H.value.inactive : H.value.active,
|
|
607
|
+
...O.value ? {
|
|
608
|
+
left: "50%",
|
|
609
|
+
bottom: `${Fe.value}px`,
|
|
610
|
+
transform: "translateX(-50%)"
|
|
611
|
+
} : {
|
|
612
|
+
top: "50%",
|
|
613
|
+
left: `${Fe.value}px`,
|
|
614
|
+
transform: "translateY(-50%)"
|
|
615
|
+
},
|
|
616
|
+
transition: "color 150ms ease"
|
|
617
|
+
})
|
|
618
|
+
}, null, 8, [
|
|
619
|
+
"name",
|
|
620
|
+
"size",
|
|
621
|
+
"style"
|
|
622
|
+
])) : f.stops ? l("", !0) : (h(), u("div", {
|
|
623
|
+
key: 4,
|
|
624
|
+
class: "absolute rounded-full",
|
|
625
|
+
style: m({
|
|
626
|
+
width: `${B.value.dot}px`,
|
|
627
|
+
height: `${B.value.dot}px`,
|
|
628
|
+
backgroundColor: H.value.active,
|
|
629
|
+
opacity: +!Oe.value,
|
|
630
|
+
...O.value ? {
|
|
631
|
+
left: "50%",
|
|
632
|
+
bottom: `${B.value.dotInset}px`,
|
|
633
|
+
transform: "translateX(-50%)"
|
|
634
|
+
} : {
|
|
635
|
+
top: "50%",
|
|
636
|
+
left: `${B.value.dotInset}px`,
|
|
637
|
+
transform: "translateY(-50%)"
|
|
638
|
+
},
|
|
639
|
+
transition: "opacity 150ms ease"
|
|
640
|
+
})
|
|
641
|
+
}, null, 4)),
|
|
642
|
+
f.stops ? l("", !0) : (h(), u("div", {
|
|
643
|
+
key: 5,
|
|
644
|
+
class: "absolute rounded-full",
|
|
645
|
+
style: m({
|
|
646
|
+
width: `${B.value.dot}px`,
|
|
647
|
+
height: `${B.value.dot}px`,
|
|
648
|
+
backgroundColor: H.value.active,
|
|
649
|
+
opacity: +!ke.value,
|
|
650
|
+
...O.value ? {
|
|
651
|
+
left: "50%",
|
|
652
|
+
top: `${B.value.dotInset}px`,
|
|
653
|
+
transform: "translateX(-50%)"
|
|
654
|
+
} : {
|
|
655
|
+
top: "50%",
|
|
656
|
+
right: `${B.value.dotInset}px`,
|
|
657
|
+
transform: "translateY(-50%)"
|
|
658
|
+
},
|
|
659
|
+
transition: "opacity 150ms ease"
|
|
660
|
+
})
|
|
661
|
+
}, null, 4)),
|
|
662
|
+
f.stops ? (h(!0), u(a, { key: 6 }, ie(Ke.value, (e, t) => (h(), u("div", {
|
|
663
|
+
key: t,
|
|
664
|
+
class: "absolute rounded-full",
|
|
665
|
+
style: m({
|
|
666
|
+
width: `${B.value.dot}px`,
|
|
667
|
+
height: `${B.value.dot}px`,
|
|
668
|
+
backgroundColor: e <= N.value ? H.value.inactive : H.value.active,
|
|
669
|
+
opacity: Math.abs(e - N.value) < .01 || k.value && Math.abs(e - P.value) < .01 ? 0 : 1,
|
|
670
|
+
...O.value ? {
|
|
671
|
+
left: "50%",
|
|
672
|
+
bottom: `${e}%`,
|
|
673
|
+
transform: "translateX(-50%) translateY(50%)"
|
|
674
|
+
} : {
|
|
675
|
+
top: "50%",
|
|
676
|
+
left: `${e}%`,
|
|
677
|
+
transform: "translateX(-50%) translateY(-50%)"
|
|
678
|
+
}
|
|
679
|
+
})
|
|
680
|
+
}, null, 4))), 128)) : l("", !0)
|
|
681
|
+
], 4),
|
|
682
|
+
k.value ? (h(), u(a, { key: 1 }, ie([0, 1], (e) => d("div", {
|
|
683
|
+
key: e,
|
|
684
|
+
ref_for: !0,
|
|
685
|
+
ref: (t) => {
|
|
686
|
+
t && (_e.value[e] = t);
|
|
687
|
+
},
|
|
688
|
+
role: "slider",
|
|
689
|
+
tabindex: f.disabled ? -1 : 0,
|
|
690
|
+
"aria-label": e === 0 ? v(ge).sliderRangeStart : v(ge).sliderRangeEnd,
|
|
691
|
+
"aria-valuenow": e === 0 ? A.value.lo : A.value.hi,
|
|
692
|
+
"aria-valuemin": e === 0 ? f.min : A.value.lo,
|
|
693
|
+
"aria-valuemax": e === 0 ? A.value.hi : f.max,
|
|
694
|
+
"aria-disabled": f.disabled || void 0,
|
|
695
|
+
"aria-orientation": f.orientation,
|
|
696
|
+
class: p(["pointer-events-none flex items-center justify-center rounded-full outline-none", E.value === e && "ring-2 ring-offset-2 ring-offset-surface"]),
|
|
697
|
+
style: m(f.thumbIcon ? st(e === 0 ? N.value : P.value) : ot(e === 0 ? N.value : P.value, e)),
|
|
698
|
+
onKeydown: (t) => Ge(e, t),
|
|
699
|
+
onFocus: (t) => Te(e),
|
|
700
|
+
onBlur: Ee
|
|
701
|
+
}, [f.thumbIcon ? (h(), c(r, {
|
|
702
|
+
key: 0,
|
|
703
|
+
name: f.thumbIcon,
|
|
704
|
+
size: B.value.thumbIconSize
|
|
705
|
+
}, null, 8, ["name", "size"])) : l("", !0)], 46, ue)), 64)) : (h(), u(a, { key: 0 }, [f.thumbIcon ? (h(), c(r, {
|
|
706
|
+
key: 0,
|
|
707
|
+
name: f.thumbIcon,
|
|
708
|
+
size: B.value.thumbIconSize,
|
|
709
|
+
class: "pointer-events-none rounded-full group-focus-visible:ring-2 group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-surface",
|
|
710
|
+
style: m(st(N.value))
|
|
711
|
+
}, null, 8, [
|
|
712
|
+
"name",
|
|
713
|
+
"size",
|
|
714
|
+
"style"
|
|
715
|
+
])) : (h(), u("div", {
|
|
716
|
+
key: 1,
|
|
717
|
+
class: "pointer-events-none group-focus-visible:ring-2 group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-surface",
|
|
718
|
+
style: m(ot(N.value))
|
|
719
|
+
}, null, 4))], 64)),
|
|
720
|
+
te(o, {
|
|
721
|
+
"enter-active-class": "transition-opacity duration-100",
|
|
722
|
+
"enter-from-class": "opacity-0",
|
|
723
|
+
"leave-active-class": "transition-opacity duration-75",
|
|
724
|
+
"leave-to-class": "opacity-0"
|
|
725
|
+
}, {
|
|
726
|
+
default: ae(() => [f.showTooltip && w.value !== !1 ? (h(), u("div", {
|
|
727
|
+
key: 0,
|
|
728
|
+
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",
|
|
729
|
+
style: m(ct(dt.value))
|
|
730
|
+
}, [d("span", { class: p(["inline-block", !O.value && "m3-rtl:-scale-x-100"]) }, _(ut.value), 3)], 4)) : l("", !0)]),
|
|
731
|
+
_: 1
|
|
732
|
+
})
|
|
733
|
+
], 46, le)], 2),
|
|
734
|
+
v(be) ? (h(), u("p", {
|
|
735
|
+
key: 1,
|
|
736
|
+
id: v(xe),
|
|
737
|
+
role: "alert",
|
|
738
|
+
class: "text-body-small text-error"
|
|
739
|
+
}, _(v(be)), 9, de)) : l("", !0)
|
|
740
|
+
], 34));
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
export { me as t };
|
|
744
|
+
|
|
745
|
+
//# sourceMappingURL=MSlider-B7dIcHVn.js.map
|