@m3ui-vue/m3ui-vue 1.10.2 → 1.11.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/README.md +19 -4
- package/dist/API.md +195 -56
- package/dist/MButton-gWoOzFWf.js +284 -0
- package/dist/MButton-gWoOzFWf.js.map +1 -0
- package/dist/MColorPickerModal-CJYMvlgK.js +466 -0
- package/dist/MColorPickerModal-CJYMvlgK.js.map +1 -0
- package/dist/MDialog-CU8EYgCC.js +226 -0
- package/dist/MDialog-CU8EYgCC.js.map +1 -0
- package/dist/{MIcon-BSsJZhK7.js → MIcon-CkUc9kuQ.js} +10 -4
- package/dist/MIcon-CkUc9kuQ.js.map +1 -0
- package/dist/MIconButton-DTFOfsTy.js +317 -0
- package/dist/MIconButton-DTFOfsTy.js.map +1 -0
- package/dist/MListItem-Cdw2FqCT.js +1306 -0
- package/dist/MListItem-Cdw2FqCT.js.map +1 -0
- package/dist/MLoadingIndicator-BxAy2x7P.js +115 -0
- package/dist/MLoadingIndicator-BxAy2x7P.js.map +1 -0
- package/dist/{MMenuItem-US0Zbglq.js → MMenuItem-CEIKYvaX.js} +216 -214
- package/dist/MMenuItem-CEIKYvaX.js.map +1 -0
- package/dist/{MPdfViewer-DL9mRsd2.js → MPdfViewer-CEfyXGq2.js} +674 -671
- package/dist/MPdfViewer-CEfyXGq2.js.map +1 -0
- package/dist/MProgressBar-BzZMxq7M.js.map +1 -1
- package/dist/MSeekBar-B3_D-PwH.js +435 -0
- package/dist/MSeekBar-B3_D-PwH.js.map +1 -0
- package/dist/{MSegmentedButton-DMou-8sG.js → MSegmentedButton-Dg07j-4r.js} +4 -4
- package/dist/{MSegmentedButton-DMou-8sG.js.map → MSegmentedButton-Dg07j-4r.js.map} +1 -1
- package/dist/{MSignaturePad-WuvE_Cyl.js → MSignaturePad-3nddtLKI.js} +2 -2
- package/dist/{MSignaturePad-WuvE_Cyl.js.map → MSignaturePad-3nddtLKI.js.map} +1 -1
- package/dist/{MSlider-7TzhFHKS.js → MSlider-BrpLbqwt.js} +4 -4
- package/dist/{MSlider-7TzhFHKS.js.map → MSlider-BrpLbqwt.js.map} +1 -1
- package/dist/{MSpinner-CkIVBuGE.js → MSpinner-CLwzDH33.js} +2 -2
- package/dist/{MSpinner-CkIVBuGE.js.map → MSpinner-CLwzDH33.js.map} +1 -1
- package/dist/{MTextField-B6_iOczK.js → MTextField-CZRizAwA.js} +136 -134
- package/dist/MTextField-CZRizAwA.js.map +1 -0
- package/dist/{_useFieldValidation-COBJ1tWr.js → _useFieldValidation-DVcqyy9g.js} +2 -2
- package/dist/{_useFieldValidation-COBJ1tWr.js.map → _useFieldValidation-DVcqyy9g.js.map} +1 -1
- package/dist/api.json +1 -1
- package/dist/chart.js +1 -1
- package/dist/code-editor.js +3 -3
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MAlert.vue.d.ts +1 -1
- package/dist/components/MAudioPlayer.vue.d.ts +3 -3
- package/dist/components/MAvatar.vue.d.ts +19 -1
- package/dist/components/MButton.vue.d.ts +2 -1
- package/dist/components/MChatBubble.vue.d.ts +2 -0
- package/dist/components/MCheckbox.vue.d.ts +2 -0
- package/dist/components/MDataTable.vue.d.ts +31 -3
- package/dist/components/MFlow.vue.d.ts +1 -1
- package/dist/components/MHotkeys.vue.d.ts +1 -0
- package/dist/components/MIcon.vue.d.ts +6 -0
- package/dist/components/MIconButton.vue.d.ts +5 -0
- package/dist/components/MKanban.vue.d.ts +1 -1
- package/dist/components/MLink.vue.d.ts +59 -0
- package/dist/components/MListItem.vue.d.ts +3 -1
- package/dist/components/MMapControl.vue.d.ts +1 -1
- package/dist/components/MNotificationCenter.vue.d.ts +1 -1
- package/dist/components/MNumberField.vue.d.ts +1 -1
- package/dist/components/MPagination.vue.d.ts +14 -1
- package/dist/components/MPdfSigner.vue.d.ts +2 -2
- package/dist/components/MRadio.vue.d.ts +2 -0
- package/dist/components/MRadioGroup.vue.d.ts +2 -0
- package/dist/components/MStatCard.vue.d.ts +2 -2
- package/dist/components/MSwitch.vue.d.ts +2 -0
- package/dist/components/MText.vue.d.ts +4 -2
- package/dist/components/MTextField.vue.d.ts +2 -0
- package/dist/components/_MDrawerItemList.vue.d.ts +6 -0
- package/dist/composables/_menuGroups.d.ts +10 -1
- package/dist/composables/_splitAttrs.d.ts +6 -0
- package/dist/composables/_springAnimation.d.ts +2 -2
- package/dist/composables/_useFocusTrap.d.ts +15 -0
- package/dist/composables/_usePaneResize.d.ts +1 -1
- package/dist/composables/_useSpring.d.ts +4 -4
- package/dist/composables/dynamicColor.d.ts +9 -1
- package/dist/composables/motion.d.ts +63 -0
- package/dist/composables/useConfirm.d.ts +28 -0
- package/dist/composables/useDevice.d.ts +8 -1
- package/dist/composables/useLocale.d.ts +14 -0
- package/dist/composables/useScrollReveal.d.ts +1 -1
- package/dist/composables/useTheme.d.ts +1 -0
- package/dist/composables/useToast.d.ts +7 -0
- package/dist/draw.js +556 -556
- package/dist/draw.js.map +1 -1
- package/dist/flow.js +854 -851
- package/dist/flow.js.map +1 -1
- package/dist/gantt.js +1118 -1096
- package/dist/gantt.js.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/locales/index.d.ts +1 -0
- package/dist/locales/index.js +833 -1
- package/dist/locales/index.js.map +1 -1
- package/dist/locales/pl.d.ts +2 -0
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +10327 -9796
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +860 -860
- package/dist/map.js.map +1 -1
- package/dist/{material-color-utilities-CEFytLsr.js → material-color-utilities-BZsBNIhi.js} +276 -217
- package/dist/material-color-utilities-BZsBNIhi.js.map +1 -0
- package/dist/media.js +7 -7
- package/dist/{motion-BcejVTeX.js → motion-BqYcqcim.js} +15 -5
- package/dist/motion-BqYcqcim.js.map +1 -0
- package/dist/pdf-sign.js +140 -137
- package/dist/pdf-sign.js.map +1 -1
- package/dist/pdf.js +1 -1
- package/dist/plugin.d.ts +11 -0
- package/dist/rich-text-editor.js +7 -7
- package/dist/styles/theme.css +40 -0
- package/dist/styles.css +1 -1
- package/dist/terminal.js +1 -1
- package/dist/{useLocale-YRaOT12S.js → useLocale-BjcYauXr.js} +60 -4
- package/dist/useLocale-BjcYauXr.js.map +1 -0
- package/dist/{useThemeTokens-DyAdPQB0.js → useThemeTokens-D5nr5KHf.js} +28 -27
- package/dist/useThemeTokens-D5nr5KHf.js.map +1 -0
- package/package.json +17 -2
- package/src/__tests__/MAvatarImage.test.ts +37 -0
- package/src/__tests__/MDataTableControlled.test.ts +68 -0
- package/src/__tests__/MHotkeysSequence.test.ts +53 -0
- package/src/__tests__/MIconAxes.test.ts +16 -0
- package/src/__tests__/MIconButtonWidth.test.ts +22 -0
- package/src/__tests__/MLink.test.ts +46 -0
- package/src/__tests__/MPaginationPages.test.ts +43 -0
- package/src/__tests__/MTextEmphasized.test.ts +14 -0
- package/src/__tests__/controlDescription.test.ts +34 -0
- package/src/__tests__/customColor.test.ts +27 -0
- package/src/__tests__/dynamicColor.test.ts +3 -2
- package/src/__tests__/focusTrap.test.ts +124 -0
- package/src/__tests__/formatMessage.test.ts +20 -0
- package/src/__tests__/inputAttrs.test.ts +103 -0
- package/src/__tests__/localePresets.test.ts +2 -0
- package/src/__tests__/menuGroupsRemount.test.ts +40 -0
- package/src/__tests__/menuHydration.test.ts +41 -0
- package/src/__tests__/motionPrefs.test.ts +28 -0
- package/src/__tests__/ssr.test.ts +11 -0
- package/src/__tests__/ssrToast.test.ts +20 -0
- package/src/__tests__/toastDetails.test.ts +39 -0
- package/src/__tests__/useConfirm.test.ts +47 -0
- package/src/__tests__/useTheme.test.ts +14 -0
- package/src/__tests__/warningRole.test.ts +22 -0
- package/src/components/MAlert.vue +2 -2
- package/src/components/MAnimatedNumber.vue +9 -3
- package/src/components/MAutocomplete.vue +16 -4
- package/src/components/MAvailabilityCalendar.vue +3 -3
- package/src/components/MAvatar.vue +32 -5
- package/src/components/MAvatarGroup.vue +7 -2
- package/src/components/MBottomSheet.vue +18 -2
- package/src/components/MButton.vue +18 -5
- package/src/components/MCarousel.vue +3 -3
- package/src/components/MChatBubble.vue +14 -1
- package/src/components/MCheckbox.vue +21 -4
- package/src/components/MChip.vue +4 -2
- package/src/components/MCollapse.vue +7 -1
- package/src/components/MCommandPalette.vue +6 -2
- package/src/components/MContextMenu.vue +4 -4
- package/src/components/MCreditCardInput.vue +5 -0
- package/src/components/MDashboardGrid.vue +2 -1
- package/src/components/MDataTable.vue +63 -16
- package/src/components/MDialog.vue +21 -3
- package/src/components/MDiffViewer.vue +3 -3
- package/src/components/MDrawLayers.vue +3 -3
- package/src/components/MFabMenu.vue +7 -0
- package/src/components/MFloorPlan.vue +3 -3
- package/src/components/MFloorPlanInspector.vue +3 -3
- package/src/components/MFlow.vue +9 -5
- package/src/components/MFlowControls.vue +6 -0
- package/src/components/MFormBuilder.vue +1 -1
- package/src/components/MGantt.vue +10 -10
- package/src/components/MHotkeys.vue +61 -16
- package/src/components/MIcon.vue +17 -1
- package/src/components/MIconButton.vue +29 -6
- package/src/components/MImageCropper.vue +1 -1
- package/src/components/MKanban.vue +2 -1
- package/src/components/MLightbox.vue +5 -4
- package/src/components/MLink.vue +136 -0
- package/src/components/MListDetail.vue +7 -0
- package/src/components/MListItem.vue +7 -4
- package/src/components/MLoadingIndicator.vue +2 -1
- package/src/components/MMap.vue +3 -0
- package/src/components/MMapCluster.vue +2 -2
- package/src/components/MMapControl.vue +2 -2
- package/src/components/MMapMeasure.vue +1 -1
- package/src/components/MMaskField.vue +16 -3
- package/src/components/MMenu.vue +4 -4
- package/src/components/MMenuItem.vue +2 -2
- package/src/components/MMeterGroup.vue +3 -2
- package/src/components/MMortgageCalculator.vue +3 -3
- package/src/components/MMultiAutocomplete.vue +19 -7
- package/src/components/MMultiSelect.vue +19 -7
- package/src/components/MNavigationDrawer.vue +10 -3
- package/src/components/MNavigationRail.vue +5 -1
- package/src/components/MNotificationCenter.vue +2 -1
- package/src/components/MNotificationHost.vue +3 -3
- package/src/components/MNumberField.vue +23 -6
- package/src/components/MOdontogram.vue +4 -4
- package/src/components/MOrderBook.vue +4 -0
- package/src/components/MPagination.vue +91 -12
- package/src/components/MPdfSigner.vue +3 -3
- package/src/components/MPdfViewer.vue +7 -7
- package/src/components/MPhoneInput.vue +17 -4
- package/src/components/MProductConfigurator.vue +4 -4
- package/src/components/MProgressBar.vue +5 -0
- package/src/components/MQuiz.vue +8 -5
- package/src/components/MRadio.vue +24 -5
- package/src/components/MRadioGroup.vue +3 -0
- package/src/components/MReactions.vue +2 -2
- package/src/components/MResourceTimeline.vue +3 -3
- package/src/components/MResult.vue +1 -1
- package/src/components/MScrollField.vue +1 -1
- package/src/components/MSearchField.vue +6 -5
- package/src/components/MSeatMap.vue +5 -0
- package/src/components/MSeekBar.vue +3 -2
- package/src/components/MSelect.vue +16 -4
- package/src/components/MSideSheet.vue +25 -3
- package/src/components/MSimpleCarousel.vue +2 -2
- package/src/components/MSnackbar.vue +16 -13
- package/src/components/MSparkline.vue +2 -1
- package/src/components/MSpinner.vue +8 -0
- package/src/components/MSplitter.vue +1 -1
- package/src/components/MSpotlightSearch.vue +6 -2
- package/src/components/MSpreadsheet.vue +1 -1
- package/src/components/MStatCard.vue +2 -1
- package/src/components/MSwitch.vue +21 -4
- package/src/components/MTabs.vue +2 -1
- package/src/components/MTagInput.vue +19 -6
- package/src/components/MText.vue +23 -4
- package/src/components/MTextField.vue +25 -6
- package/src/components/MTimeline.vue +5 -5
- package/src/components/MToolbar.vue +2 -2
- package/src/components/MTour.vue +3 -0
- package/src/components/MTrackingTimeline.vue +6 -0
- package/src/components/MTypewriter.vue +7 -1
- package/src/components/MWindow.vue +10 -1
- package/src/components/_MColorPanel.vue +4 -4
- package/src/components/_MComment.vue +3 -2
- package/src/components/_MFlowNodeShell.vue +1 -1
- package/src/components/_MPdfPage.vue +1 -1
- package/src/components/_MTransferPane.vue +10 -0
- package/src/composables/_effectCanvas.ts +2 -1
- package/src/composables/_menuGroups.ts +10 -1
- package/src/composables/_splitAttrs.ts +29 -0
- package/src/composables/_springAnimation.ts +3 -3
- package/src/composables/_themeTransition.ts +3 -2
- package/src/composables/_useFocusTrap.ts +142 -0
- package/src/composables/_useMenuNav.ts +3 -3
- package/src/composables/_usePaneResize.ts +2 -1
- package/src/composables/_useSheetMotion.ts +3 -4
- package/src/composables/_useSpring.ts +16 -10
- package/src/composables/cron.ts +7 -6
- package/src/composables/dynamicColor.ts +21 -2
- package/src/composables/motion.ts +27 -0
- package/src/composables/useConfirm.ts +116 -0
- package/src/composables/useDevice.ts +23 -3
- package/src/composables/useFieldBg.ts +4 -0
- package/src/composables/useLocale.ts +74 -0
- package/src/composables/useNotification.ts +3 -0
- package/src/composables/useScrollReveal.ts +3 -3
- package/src/composables/useTheme.ts +8 -2
- package/src/composables/useToast.ts +27 -4
- package/src/directives/vSparkle.ts +2 -1
- package/src/index.ts +8 -5
- package/src/locales/ar.ts +7 -0
- package/src/locales/de.ts +7 -0
- package/src/locales/es.ts +7 -0
- package/src/locales/fr.ts +7 -0
- package/src/locales/index.ts +1 -0
- package/src/locales/ja.ts +7 -0
- package/src/locales/ko.ts +7 -0
- package/src/locales/pl.ts +807 -0
- package/src/locales/pt.ts +7 -0
- package/src/locales/zh.ts +7 -0
- package/src/plugin.ts +16 -0
- package/src/styles/theme.css +40 -0
- package/dist/MButton-B9RCM06i.js +0 -171
- package/dist/MButton-B9RCM06i.js.map +0 -1
- package/dist/MColorPickerModal-ChRtcZOo.js +0 -577
- package/dist/MColorPickerModal-ChRtcZOo.js.map +0 -1
- package/dist/MDialog-dk07tify.js +0 -167
- package/dist/MDialog-dk07tify.js.map +0 -1
- package/dist/MIcon-BSsJZhK7.js.map +0 -1
- package/dist/MIconButton-CrBPZidd.js +0 -288
- package/dist/MIconButton-CrBPZidd.js.map +0 -1
- package/dist/MListItem-h9H223vx.js +0 -1239
- package/dist/MListItem-h9H223vx.js.map +0 -1
- package/dist/MLoadingIndicator-YTV1Ov5w.js +0 -114
- package/dist/MLoadingIndicator-YTV1Ov5w.js.map +0 -1
- package/dist/MMenuItem-US0Zbglq.js.map +0 -1
- package/dist/MPdfViewer-DL9mRsd2.js.map +0 -1
- package/dist/MSeekBar-JFZcoJ8y.js +0 -434
- package/dist/MSeekBar-JFZcoJ8y.js.map +0 -1
- package/dist/MTextField-B6_iOczK.js.map +0 -1
- package/dist/material-color-utilities-CEFytLsr.js.map +0 -1
- package/dist/motion-BcejVTeX.js.map +0 -1
- package/dist/useLocale-YRaOT12S.js.map +0 -1
- package/dist/useThemeTokens-DyAdPQB0.js.map +0 -1
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
import { i as e } from "./useLocale-YRaOT12S.js";
|
|
2
|
-
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as ee, openBlock as u, ref as d, renderList as te, renderSlot as ne, toDisplayString as f, unref as p, watch as m } from "vue";
|
|
3
|
-
// src/components/MSeekBar.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var re = [
|
|
5
|
-
"tabindex",
|
|
6
|
-
"aria-label",
|
|
7
|
-
"aria-valuemax",
|
|
8
|
-
"aria-valuenow",
|
|
9
|
-
"aria-valuetext",
|
|
10
|
-
"aria-disabled"
|
|
11
|
-
], ie = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "absolute inset-x-0 -top-3 -bottom-1"
|
|
14
|
-
}, ae = ["width", "height"], oe = ["stroke", "stroke-width"], se = { class: "flex h-7 max-w-60 items-center gap-1 rounded-full bg-inverse-surface px-2.5 text-label-medium whitespace-nowrap text-inverse-on-surface tabular-nums" }, ce = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "truncate"
|
|
17
|
-
}, le = ["aria-label"], ue = ["aria-label"], de = /* @__PURE__ */ o({
|
|
18
|
-
__name: "MSeekBar",
|
|
19
|
-
props: {
|
|
20
|
-
modelValue: {},
|
|
21
|
-
duration: {},
|
|
22
|
-
buffered: {},
|
|
23
|
-
chapters: {},
|
|
24
|
-
playing: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: !1
|
|
27
|
-
},
|
|
28
|
-
playbackRate: { default: 1 },
|
|
29
|
-
live: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: !1
|
|
32
|
-
},
|
|
33
|
-
variant: { default: "slider" },
|
|
34
|
-
size: { default: "md" },
|
|
35
|
-
time: { default: "below" },
|
|
36
|
-
remaining: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: !1
|
|
39
|
-
},
|
|
40
|
-
format: {},
|
|
41
|
-
keyStep: { default: 5 },
|
|
42
|
-
preview: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: !0
|
|
45
|
-
},
|
|
46
|
-
color: { default: "primary" },
|
|
47
|
-
trackColor: {},
|
|
48
|
-
timeColor: {},
|
|
49
|
-
disabled: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: !1
|
|
52
|
-
},
|
|
53
|
-
label: {}
|
|
54
|
-
},
|
|
55
|
-
emits: [
|
|
56
|
-
"update:modelValue",
|
|
57
|
-
"seek",
|
|
58
|
-
"scrub-start",
|
|
59
|
-
"scrub",
|
|
60
|
-
"update:remaining"
|
|
61
|
-
],
|
|
62
|
-
setup(o, { emit: de }) {
|
|
63
|
-
let h = o, g = de, _ = e(), fe = {
|
|
64
|
-
xs: {
|
|
65
|
-
track: 4,
|
|
66
|
-
thumbH: 16,
|
|
67
|
-
dot: 21,
|
|
68
|
-
dotIdle: 10,
|
|
69
|
-
gap: 4,
|
|
70
|
-
hit: 32,
|
|
71
|
-
wave: 4,
|
|
72
|
-
amp: 2.5,
|
|
73
|
-
length: 18
|
|
74
|
-
},
|
|
75
|
-
sm: {
|
|
76
|
-
track: 8,
|
|
77
|
-
thumbH: 28,
|
|
78
|
-
dot: 20,
|
|
79
|
-
dotIdle: 14,
|
|
80
|
-
gap: 5,
|
|
81
|
-
hit: 40,
|
|
82
|
-
wave: 6,
|
|
83
|
-
amp: 3,
|
|
84
|
-
length: 22
|
|
85
|
-
},
|
|
86
|
-
md: {
|
|
87
|
-
track: 16,
|
|
88
|
-
thumbH: 44,
|
|
89
|
-
dot: 28,
|
|
90
|
-
dotIdle: 21,
|
|
91
|
-
gap: 6,
|
|
92
|
-
hit: 46,
|
|
93
|
-
wave: 8,
|
|
94
|
-
amp: 4,
|
|
95
|
-
length: 26
|
|
96
|
-
}
|
|
97
|
-
}, v = n(() => fe[h.size] ?? fe.md), y = n(() => Number.isFinite(h.duration) && h.duration > 0 ? h.duration : 0), b = n(() => h.disabled || !y.value), pe = {
|
|
98
|
-
primary: "var(--color-primary)",
|
|
99
|
-
secondary: "var(--color-secondary)",
|
|
100
|
-
tertiary: "var(--color-tertiary)",
|
|
101
|
-
error: "var(--color-error)",
|
|
102
|
-
"secondary-container": "var(--color-secondary-container)"
|
|
103
|
-
}, x = n(() => {
|
|
104
|
-
if (h.disabled) return {
|
|
105
|
-
active: "color-mix(in srgb, var(--color-on-surface) 38%, transparent)",
|
|
106
|
-
inactive: "color-mix(in srgb, var(--color-on-surface) 12%, transparent)",
|
|
107
|
-
buffered: "color-mix(in srgb, var(--color-on-surface) 20%, transparent)"
|
|
108
|
-
};
|
|
109
|
-
let e = pe[h.color] ?? h.color, t = h.trackColor ? pe[h.trackColor] ?? h.trackColor : "var(--color-secondary-container)";
|
|
110
|
-
return {
|
|
111
|
-
active: e,
|
|
112
|
-
inactive: t,
|
|
113
|
-
buffered: `color-mix(in srgb, ${e} 35%, ${t})`
|
|
114
|
-
};
|
|
115
|
-
}), me = (e) => String(e).padStart(2, "0");
|
|
116
|
-
function S(e) {
|
|
117
|
-
if (h.format) return h.format(e);
|
|
118
|
-
let t = Math.max(0, Math.floor(e)), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60);
|
|
119
|
-
return (y.value >= 3600 ? `${n}:${me(r)}` : String(n * 60 + r)) + ":" + me(t % 60);
|
|
120
|
-
}
|
|
121
|
-
let C = d(null), w = d(h.modelValue), T = n(() => Math.min(y.value || Infinity, Math.max(0, C.value ?? w.value))), E = d(h.remaining);
|
|
122
|
-
m(() => h.remaining, (e) => {
|
|
123
|
-
E.value = e;
|
|
124
|
-
});
|
|
125
|
-
function he() {
|
|
126
|
-
E.value = !E.value, g("update:remaining", E.value);
|
|
127
|
-
}
|
|
128
|
-
let D = n(() => h.timeColor ? { color: h.timeColor } : void 0), ge = n(() => S(T.value)), _e = n(() => y.value ? E.value ? `-${S(y.value - T.value)}` : S(y.value) : "--:--"), ve = n(() => _.seekBarValue.replace("{position}", S(T.value)).replace("{duration}", y.value ? S(y.value) : "--:--")), ye = (e) => {
|
|
129
|
-
let t = null;
|
|
130
|
-
for (let n of h.chapters ?? []) n.start <= e && (!t || n.start >= t.start) && (t = n);
|
|
131
|
-
return t;
|
|
132
|
-
}, O = d(), k = d(0), A = (e) => y.value ? k.value * Math.min(1, Math.max(0, e / y.value)) : 0, j = n(() => {
|
|
133
|
-
let e = A(T.value);
|
|
134
|
-
if (h.variant === "line") return e;
|
|
135
|
-
let t = Math.max(2, v.value.track * .3);
|
|
136
|
-
return Math.min(k.value - t, Math.max(t, e));
|
|
137
|
-
}), be = n(() => {
|
|
138
|
-
let e = h.buffered;
|
|
139
|
-
return e === void 0 ? [] : typeof e == "number" ? [[0, e]] : e;
|
|
140
|
-
}), xe = n(() => {
|
|
141
|
-
let e = k.value;
|
|
142
|
-
if (!e) return [];
|
|
143
|
-
let { gap: t } = v.value, n = Ce.value, r = j.value, i = h.size === "md" ? 4 : 2, a = [];
|
|
144
|
-
for (let e of h.chapters ?? []) {
|
|
145
|
-
if (e.start <= 0 || e.start >= y.value) continue;
|
|
146
|
-
let t = A(e.start);
|
|
147
|
-
a.push([t - i / 2, t + i / 2]);
|
|
148
|
-
}
|
|
149
|
-
h.variant === "slider" && a.push([r - t, r + t]), h.variant === "wavy" && a.push([-Infinity, r + t]), a.sort((e, t) => e[0] - t[0]);
|
|
150
|
-
let o = [], s = 0;
|
|
151
|
-
for (let [t, n] of a) t > s && o.push([s, Math.min(t, e)]), s = Math.max(s, n);
|
|
152
|
-
s < e && o.push([s, e]);
|
|
153
|
-
let c = n / 2, l = Math.min(c, Math.max(1, n / 8)), ee = h.variant === "line" ? A(T.value) : r;
|
|
154
|
-
return o.filter(([e, t]) => t - e >= .5).map(([t, n]) => {
|
|
155
|
-
let r = [];
|
|
156
|
-
for (let [e, i] of be.value) {
|
|
157
|
-
let a = Math.max(t, A(e)), o = Math.min(n, A(i));
|
|
158
|
-
o > a && r.push({
|
|
159
|
-
left: a - t,
|
|
160
|
-
width: o - a,
|
|
161
|
-
color: x.value.buffered
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
return ee > t && r.push({
|
|
165
|
-
left: 0,
|
|
166
|
-
width: Math.min(n, ee) - t,
|
|
167
|
-
color: x.value.active
|
|
168
|
-
}), {
|
|
169
|
-
a: t,
|
|
170
|
-
b: n,
|
|
171
|
-
rl: t <= .01 ? c : l,
|
|
172
|
-
rr: n >= e - .01 ? c : l,
|
|
173
|
-
fills: r
|
|
174
|
-
};
|
|
175
|
-
});
|
|
176
|
-
}), Se = n(() => h.variant === "slider" && h.size === "md" && j.value < k.value - 12 - v.value.gap), M = d(!1), N = d(!1), P = d(!1), Ce = n(() => {
|
|
177
|
-
if (h.variant === "wavy") return v.value.wave;
|
|
178
|
-
let e = v.value.track;
|
|
179
|
-
return h.variant === "line" && !b.value && (P.value || M.value) ? e + Math.max(2, e / 4) : e;
|
|
180
|
-
}), we = n(() => {
|
|
181
|
-
let e = {
|
|
182
|
-
left: `${j.value}px`,
|
|
183
|
-
backgroundColor: x.value.active
|
|
184
|
-
};
|
|
185
|
-
if (h.variant === "line") {
|
|
186
|
-
let { dot: t, dotIdle: n } = v.value, r = M.value || P.value || N.value ? 1 : n / t;
|
|
187
|
-
return {
|
|
188
|
-
...e,
|
|
189
|
-
width: `${t}px`,
|
|
190
|
-
height: `${t}px`,
|
|
191
|
-
borderRadius: "50%",
|
|
192
|
-
transform: `translate(-50%, -50%) scale(${r})`
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
let t = M.value || N.value ? .5 : 1;
|
|
196
|
-
return {
|
|
197
|
-
...e,
|
|
198
|
-
width: "4px",
|
|
199
|
-
height: `${v.value.thumbH}px`,
|
|
200
|
-
borderRadius: "2px",
|
|
201
|
-
transform: `translate(-50%, -50%) scaleX(${t})`
|
|
202
|
-
};
|
|
203
|
-
}), F = d(null), I = n(() => h.preview && !b.value ? C.value ?? F.value : null), L = n(() => I.value === null ? null : ye(I.value)), Te = d(), R = d(0), z = null;
|
|
204
|
-
m(Te, (e) => {
|
|
205
|
-
z?.disconnect(), e && typeof ResizeObserver < "u" && (R.value = e.offsetWidth, z = new ResizeObserver(() => {
|
|
206
|
-
R.value = e.offsetWidth;
|
|
207
|
-
}), z.observe(e));
|
|
208
|
-
});
|
|
209
|
-
let Ee = n(() => {
|
|
210
|
-
let e = I.value === null ? 0 : A(I.value), t = R.value / 2;
|
|
211
|
-
return t * 2 >= k.value ? k.value / 2 : Math.min(k.value - t, Math.max(t, e));
|
|
212
|
-
}), B = null;
|
|
213
|
-
function V(e) {
|
|
214
|
-
let t = O.value;
|
|
215
|
-
if (!t || !y.value) return 0;
|
|
216
|
-
let n = t.getBoundingClientRect();
|
|
217
|
-
return Math.min(1, Math.max(0, (e - n.left) / (n.width || 1))) * y.value;
|
|
218
|
-
}
|
|
219
|
-
function De(e) {
|
|
220
|
-
C.value = e, g("scrub", e), h.live && g("update:modelValue", e);
|
|
221
|
-
}
|
|
222
|
-
function Oe(e) {
|
|
223
|
-
if (!B) return;
|
|
224
|
-
B.started = !0, M.value = !0;
|
|
225
|
-
let t = V(e.clientX);
|
|
226
|
-
g("scrub-start", t), De(t);
|
|
227
|
-
}
|
|
228
|
-
function H(e) {
|
|
229
|
-
g("update:modelValue", e), g("seek", e), w.value = e, G = e, K = W();
|
|
230
|
-
}
|
|
231
|
-
function ke(e) {
|
|
232
|
-
b.value || e.button !== 0 || (B = {
|
|
233
|
-
id: e.pointerId,
|
|
234
|
-
x: e.clientX,
|
|
235
|
-
y: e.clientY,
|
|
236
|
-
touch: e.pointerType === "touch",
|
|
237
|
-
started: !1
|
|
238
|
-
}, window.addEventListener("pointermove", Ae), window.addEventListener("pointerup", je), window.addEventListener("pointercancel", Me), B.touch || (e.preventDefault(), O.value?.focus({ preventScroll: !0 }), Oe(e)));
|
|
239
|
-
}
|
|
240
|
-
function Ae(e) {
|
|
241
|
-
if (B && e.pointerId === B.id) {
|
|
242
|
-
if (!B.started) {
|
|
243
|
-
let t = Math.abs(e.clientX - B.x), n = Math.abs(e.clientY - B.y);
|
|
244
|
-
if (n > 8 && n > t) return U();
|
|
245
|
-
if (t < 4) return;
|
|
246
|
-
Oe(e);
|
|
247
|
-
}
|
|
248
|
-
De(V(e.clientX));
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
function je(e) {
|
|
252
|
-
if (!B || e.pointerId !== B.id) return;
|
|
253
|
-
let t = B.started ? C.value ?? V(e.clientX) : V(e.clientX);
|
|
254
|
-
U(), H(t);
|
|
255
|
-
}
|
|
256
|
-
function Me(e) {
|
|
257
|
-
if (!B || e.pointerId !== B.id) return;
|
|
258
|
-
let t = B.started ? C.value : null;
|
|
259
|
-
U(), t !== null && H(t);
|
|
260
|
-
}
|
|
261
|
-
function U() {
|
|
262
|
-
B = null, M.value = !1, C.value = null, window.removeEventListener("pointermove", Ae), window.removeEventListener("pointerup", je), window.removeEventListener("pointercancel", Me);
|
|
263
|
-
}
|
|
264
|
-
function Ne(e) {
|
|
265
|
-
e.pointerType !== "touch" && (P.value = !0, F.value = V(e.clientX));
|
|
266
|
-
}
|
|
267
|
-
function Pe() {
|
|
268
|
-
P.value = !1, F.value = null;
|
|
269
|
-
}
|
|
270
|
-
function Fe(e) {
|
|
271
|
-
if (b.value) return;
|
|
272
|
-
let t = y.value, n = {
|
|
273
|
-
ArrowRight: h.keyStep,
|
|
274
|
-
ArrowUp: h.keyStep,
|
|
275
|
-
ArrowLeft: -h.keyStep,
|
|
276
|
-
ArrowDown: -h.keyStep,
|
|
277
|
-
PageUp: t / 10,
|
|
278
|
-
PageDown: -t / 10
|
|
279
|
-
}, r = null;
|
|
280
|
-
e.key in n ? r = T.value + n[e.key] : e.key === "Home" ? r = 0 : e.key === "End" && (r = t), r !== null && (e.preventDefault(), H(Math.min(t, Math.max(0, r))));
|
|
281
|
-
}
|
|
282
|
-
let W = () => typeof performance < "u" ? performance.now() : 0, G = h.modelValue, K = W(), q = 0, J = 0, Y = 0, Ie = 0, Le = d(), Re = n(() => v.value.wave + 2 * v.value.amp + 2), ze = typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, X = () => h.variant === "wavy" && h.playing && C.value === null ? v.value.amp : 0;
|
|
283
|
-
Y = X();
|
|
284
|
-
function Be() {
|
|
285
|
-
return h.playing && C.value === null && !!y.value;
|
|
286
|
-
}
|
|
287
|
-
function Ve(e) {
|
|
288
|
-
let t = k.value, n = y.value;
|
|
289
|
-
(Math.floor(e) !== Math.floor(w.value) || n && Math.abs(e - w.value) * t / n >= .5) && (w.value = e);
|
|
290
|
-
}
|
|
291
|
-
function Z() {
|
|
292
|
-
let e = Le.value;
|
|
293
|
-
if (!e) return;
|
|
294
|
-
let { wave: t, length: n, gap: r } = v.value, i = t / 2, a = j.value - r - i;
|
|
295
|
-
if (a <= i) return e.setAttribute("d", "");
|
|
296
|
-
let o = Re.value / 2, s = 2 * Math.PI / n, c = "";
|
|
297
|
-
for (let e = i;; e += 2) {
|
|
298
|
-
let t = Math.min(e, a);
|
|
299
|
-
if (c += `${c ? "L" : "M"}${t.toFixed(1)},${(o + Y * Math.sin(s * t + Ie)).toFixed(2)}`, t >= a) break;
|
|
300
|
-
}
|
|
301
|
-
e.setAttribute("d", c);
|
|
302
|
-
}
|
|
303
|
-
function He(e) {
|
|
304
|
-
let t = J ? Math.min(.1, (e - J) / 1e3) : 0;
|
|
305
|
-
J = e, Be() && Ve(Math.min(y.value, G + (e - K) / 1e3 * h.playbackRate)), h.variant === "wavy" && (Y += (X() - Y) * (1 - Math.exp(-t / .12)), Math.abs(X() - Y) < .01 && (Y = X()), h.playing && !ze && (Ie -= t * 2 * Math.PI / 1.25), Z()), Be() || h.variant === "wavy" && (Y !== X() || h.playing && !ze) ? q = requestAnimationFrame(He) : (q = 0, J = 0);
|
|
306
|
-
}
|
|
307
|
-
function Q() {
|
|
308
|
-
q || typeof requestAnimationFrame > "u" || (q = requestAnimationFrame(He));
|
|
309
|
-
}
|
|
310
|
-
m(() => h.modelValue, (e) => {
|
|
311
|
-
G = e, K = W(), w.value = e, Q();
|
|
312
|
-
}), m(() => h.playing, () => {
|
|
313
|
-
G = w.value, K = W(), Q();
|
|
314
|
-
}), m(C, (e) => {
|
|
315
|
-
e === null && (G = w.value, K = W()), Q();
|
|
316
|
-
}), m([
|
|
317
|
-
j,
|
|
318
|
-
() => h.variant,
|
|
319
|
-
() => h.size
|
|
320
|
-
], () => {
|
|
321
|
-
h.variant === "wavy" && Z();
|
|
322
|
-
}, { flush: "post" });
|
|
323
|
-
let $ = null;
|
|
324
|
-
return ee(() => {
|
|
325
|
-
let e = O.value;
|
|
326
|
-
k.value = e.clientWidth, typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
327
|
-
k.value = e.clientWidth;
|
|
328
|
-
}), $.observe(e)), Z(), Q();
|
|
329
|
-
}), l(() => {
|
|
330
|
-
cancelAnimationFrame(q), $?.disconnect(), z?.disconnect(), U();
|
|
331
|
-
}), (e, n) => (u(), i("div", { class: s(["flex min-w-0 select-none", o.time === "sides" ? "items-center gap-3" : "flex-col"]) }, [
|
|
332
|
-
o.time === "sides" ? (u(), i("span", {
|
|
333
|
-
key: 0,
|
|
334
|
-
class: s(["min-w-[4ch] shrink-0 text-right text-label-medium tabular-nums", !o.timeColor && "text-on-surface-variant"]),
|
|
335
|
-
style: c(D.value)
|
|
336
|
-
}, f(ge.value), 7)) : r("", !0),
|
|
337
|
-
a("div", {
|
|
338
|
-
ref_key: "trackEl",
|
|
339
|
-
ref: O,
|
|
340
|
-
role: "slider",
|
|
341
|
-
tabindex: b.value ? -1 : 0,
|
|
342
|
-
"aria-label": o.label ?? p(_).seekBar,
|
|
343
|
-
"aria-valuemin": "0",
|
|
344
|
-
"aria-valuemax": Math.round(y.value),
|
|
345
|
-
"aria-valuenow": Math.round(T.value),
|
|
346
|
-
"aria-valuetext": ve.value,
|
|
347
|
-
"aria-disabled": b.value || void 0,
|
|
348
|
-
class: s(["group relative min-w-0 shrink-0 touch-pan-y outline-none", [b.value ? "cursor-default" : "cursor-pointer", o.time === "sides" && "flex-1"]]),
|
|
349
|
-
style: c({ height: `${v.value.hit}px` }),
|
|
350
|
-
onPointerdown: ke,
|
|
351
|
-
onPointermove: Ne,
|
|
352
|
-
onPointerleave: Pe,
|
|
353
|
-
onKeydown: Fe,
|
|
354
|
-
onFocus: n[0] ||= (e) => N.value = !0,
|
|
355
|
-
onBlur: n[1] ||= (e) => N.value = !1
|
|
356
|
-
}, [
|
|
357
|
-
b.value ? r("", !0) : (u(), i("div", ie)),
|
|
358
|
-
(u(!0), i(t, null, te(xe.value, (e, n) => (u(), i("div", {
|
|
359
|
-
key: n,
|
|
360
|
-
class: "absolute top-1/2 -translate-y-1/2 overflow-hidden transition-[height] duration-100",
|
|
361
|
-
style: c({
|
|
362
|
-
left: `${e.a}px`,
|
|
363
|
-
width: `${e.b - e.a}px`,
|
|
364
|
-
height: `${Ce.value}px`,
|
|
365
|
-
borderRadius: `${e.rl}px ${e.rr}px ${e.rr}px ${e.rl}px`,
|
|
366
|
-
backgroundColor: x.value.inactive
|
|
367
|
-
})
|
|
368
|
-
}, [(u(!0), i(t, null, te(e.fills, (e, t) => (u(), i("div", {
|
|
369
|
-
key: t,
|
|
370
|
-
class: "absolute inset-y-0",
|
|
371
|
-
style: c({
|
|
372
|
-
left: `${e.left}px`,
|
|
373
|
-
width: `${e.width}px`,
|
|
374
|
-
backgroundColor: e.color
|
|
375
|
-
})
|
|
376
|
-
}, null, 4))), 128))], 4))), 128)),
|
|
377
|
-
o.variant === "wavy" ? (u(), i("svg", {
|
|
378
|
-
key: 1,
|
|
379
|
-
class: "pointer-events-none absolute top-1/2 left-0 -translate-y-1/2 overflow-visible",
|
|
380
|
-
width: k.value,
|
|
381
|
-
height: Re.value,
|
|
382
|
-
"aria-hidden": "true"
|
|
383
|
-
}, [a("path", {
|
|
384
|
-
ref_key: "wavePathEl",
|
|
385
|
-
ref: Le,
|
|
386
|
-
fill: "none",
|
|
387
|
-
stroke: x.value.active,
|
|
388
|
-
"stroke-width": v.value.wave,
|
|
389
|
-
"stroke-linecap": "round"
|
|
390
|
-
}, null, 8, oe)], 8, ae)) : r("", !0),
|
|
391
|
-
Se.value ? (u(), i("div", {
|
|
392
|
-
key: 2,
|
|
393
|
-
class: "pointer-events-none absolute top-1/2 right-3 size-1 -translate-y-1/2 rounded-full",
|
|
394
|
-
style: c({ backgroundColor: x.value.active })
|
|
395
|
-
}, null, 4)) : r("", !0),
|
|
396
|
-
a("div", {
|
|
397
|
-
class: "pointer-events-none absolute top-1/2 transition-transform duration-75 group-focus-visible:ring-2 group-focus-visible:ring-primary group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-surface",
|
|
398
|
-
style: c(we.value)
|
|
399
|
-
}, null, 4),
|
|
400
|
-
I.value === null ? r("", !0) : (u(), i("div", {
|
|
401
|
-
key: 3,
|
|
402
|
-
ref_key: "bubbleEl",
|
|
403
|
-
ref: Te,
|
|
404
|
-
class: "pointer-events-none absolute bottom-full z-10 mb-1 -translate-x-1/2",
|
|
405
|
-
style: c({ left: `${Ee.value}px` })
|
|
406
|
-
}, [ne(e.$slots, "preview", {
|
|
407
|
-
time: I.value,
|
|
408
|
-
formatted: S(I.value),
|
|
409
|
-
chapter: L.value
|
|
410
|
-
}, () => [a("div", se, [L.value?.title ? (u(), i("span", ce, f(L.value.title) + " ·", 1)) : r("", !0), a("span", null, f(S(I.value)), 1)])])], 4))
|
|
411
|
-
], 46, re),
|
|
412
|
-
o.time === "below" ? (u(), i("div", {
|
|
413
|
-
key: 1,
|
|
414
|
-
class: s(["flex items-center justify-between text-label-medium tabular-nums", !o.timeColor && "text-on-surface-variant"]),
|
|
415
|
-
style: c(D.value)
|
|
416
|
-
}, [a("span", null, f(ge.value), 1), a("button", {
|
|
417
|
-
type: "button",
|
|
418
|
-
class: "cursor-pointer rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-secondary",
|
|
419
|
-
"aria-label": E.value ? p(_).seekBarShowDuration : p(_).seekBarShowRemaining,
|
|
420
|
-
onClick: he
|
|
421
|
-
}, f(_e.value), 9, le)], 6)) : o.time === "sides" ? (u(), i("button", {
|
|
422
|
-
key: 2,
|
|
423
|
-
type: "button",
|
|
424
|
-
class: s(["min-w-[4ch] shrink-0 cursor-pointer rounded-sm text-left text-label-medium tabular-nums outline-none focus-visible:ring-2 focus-visible:ring-secondary", !o.timeColor && "text-on-surface-variant"]),
|
|
425
|
-
style: c(D.value),
|
|
426
|
-
"aria-label": E.value ? p(_).seekBarShowDuration : p(_).seekBarShowRemaining,
|
|
427
|
-
onClick: he
|
|
428
|
-
}, f(_e.value), 15, ue)) : r("", !0)
|
|
429
|
-
], 2));
|
|
430
|
-
}
|
|
431
|
-
});
|
|
432
|
-
export { de as t };
|
|
433
|
-
|
|
434
|
-
//# sourceMappingURL=MSeekBar-JFZcoJ8y.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MSeekBar-JFZcoJ8y.js","names":["_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_toDisplayString","_createElementVNode","_unref","_Fragment","_renderList","_renderSlot","useLocale","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","MSeekBar_default","defineComponent","__emit","props","__props","emit","locale","SIZES","s","computed","dur","inactive","ROLES","colors","active","pad","n","fmt","t","sec","h","m","scrubTime","ref","pos","current","showRemaining","v","toggleRemaining","timeStyle","startText","endText","valueText","chapterAt","found","c","trackEl","width","toPx","thumbX","x","inset","bufferedRanges","b","pieces","W","track","trackH","chapterGap","cuts","cx","gap","p","q","spans","at","c0","c1","full","small","playedTo","a","fills","t0","t1","l","r","stopDot","pressed","focused","hovered","thumbStyle","base","d","scale","dotIdle","narrow","hoverTime","previewTime","previewChapter","bubbleEl","bubbleW","bubbleObserver","el","previewX","half","press","timeAt","clientX","scrubTo","begin","commit","now","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","dx","dy","end","onHover","onLeave","onKeyDown","steps","baseAt","raf","last","amp","phase","wavePathEl","svgH","reducedMotion","ampTarget","advancing","syncPos","drawWave","path","wave","mid","k","length","px","frame","dt","kick","watch","resizeObserver","onMounted","onBeforeUnmount","openBlock","createElementBlock","normalizeClass","normalizeStyle","toDisplayString","createCommentVNode","createElementVNode","unref","_cache","Fragment","renderList","i","j","f","renderSlot","_ctx"],"sources":["../src/components/MSeekBar.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface SeekBarChapter {\n /** Where the chapter starts, in seconds */\n start: number\n /** Shown in the preview while the pointer is over it */\n title?: string\n}\n</script>\n\n<script setup lang=\"ts\">\n/**\n * A media seek bar (not an M3 spec component; Media3's ProgressSlider is a plain M3 Slider, which this follows in\n * its default look): the playback position on a track with the buffered part, optional chapters, elapsed and\n * total (or remaining) time, and a preview of the time under the pointer. Dragging scrubs locally and seeks once\n * on release (or live, with `live`); a tap or click seeks to that point. While `playing`, it advances on its own\n * between `modelValue` updates, so a 4Hz `timeupdate` still moves it smoothly.\n *\n * @slot preview Replaces the bubble shown above the pointer while hovering or dragging (a frame preview, say).\n * Props: `{ time, formatted, chapter }`\n * @event update:modelValue Emitted on a seek (and continuously while dragging with `live`) — powers v-model\n * @event seek Emitted once per seek with its time: on release of a drag, a tap or click, or a key press\n * @event scrub-start Emitted when a drag starts, with its time\n * @event scrub Emitted while dragging, with the time under the pointer\n * @event update:remaining Emitted when the end label is clicked to switch between total and remaining time\n */\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport { useLocale } from '../composables/useLocale'\n\nconst props = withDefaults(defineProps<{\n /** Playback position in seconds (v-model) */\n modelValue: number\n /** Media length in seconds; 0, NaN or Infinity (not loaded yet, a live stream) disables seeking */\n duration: number\n /** How much is loaded: up to a time, or time ranges (`[[start, end], …]`, like a media element's `buffered`) */\n buffered?: number | [number, number][]\n /** Chapter starts, drawn as gaps in the track; their titles show in the preview */\n chapters?: SeekBarChapter[]\n /** The media is playing: the bar moves on its own between updates, and the wavy line waves */\n playing?: boolean\n /** Playback speed, for that motion between updates */\n playbackRate?: number\n /** Updates the v-model continuously while dragging (the media follows the thumb), not only on release */\n live?: boolean\n /** `slider`: the M3 slider (bar thumb with a gap around it). `line`: a plain line with a round thumb. `wavy`: the played part waves while playing */\n variant?: 'slider' | 'line' | 'wavy'\n /** Track thickness: `md` (16px, the smallest M3 slider), `sm` (8px) or `xs` (4px, over a video) */\n size?: 'xs' | 'sm' | 'md'\n /** Where the elapsed and total time go */\n time?: 'below' | 'sides' | 'none'\n /** The end label shows the remaining time (`-1:23`) instead of the total; clicking it switches (v-model:remaining) */\n remaining?: boolean\n /** Formats a time in seconds. Default `m:ss`, or `h:mm:ss` for media an hour or longer */\n format?: (seconds: number) => string\n /** Seconds the arrow keys move; Page Up/Down move 10% */\n keyStep?: number\n /** Shows the time (and chapter) above the pointer while hovering or dragging */\n preview?: boolean\n /** Played part and thumb: an M3 role (`primary`, `secondary`, `tertiary`, `error`) or any CSS color */\n color?: string\n /** Unplayed track: an M3 role or any CSS color. Default secondary-container */\n trackColor?: string\n /** The time labels' color, as a CSS color (white over a video, say). Default on-surface-variant */\n timeColor?: string\n /** Disables seeking */\n disabled?: boolean\n /** Accessible name. Default the locale's `seekBar` */\n label?: string\n}>(), {\n playing: false,\n playbackRate: 1,\n live: false,\n variant: 'slider',\n size: 'md',\n time: 'below',\n remaining: false,\n keyStep: 5,\n preview: true,\n color: 'primary',\n disabled: false,\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [number]\n seek: [number]\n 'scrub-start': [number]\n scrub: [number]\n 'update:remaining': [boolean]\n}>()\n\nconst locale = useLocale()\n\n// track: thickness; thumbH: the bar thumb's height (md = MSlider xs, SliderTokens.HandleHeight); dot: the line\n// variant's round thumb under the pointer, dotIdle at rest (the thinner the line, the more it grows, as a\n// video player's does); gap: around the bar thumb; hit: the pointer target's height; wave/amp/length: the wavy line\nconst SIZES = {\n xs: { track: 4, thumbH: 16, dot: 21, dotIdle: 10, gap: 4, hit: 32, wave: 4, amp: 2.5, length: 18 },\n sm: { track: 8, thumbH: 28, dot: 20, dotIdle: 14, gap: 5, hit: 40, wave: 6, amp: 3, length: 22 },\n md: { track: 16, thumbH: 44, dot: 28, dotIdle: 21, gap: 6, hit: 46, wave: 8, amp: 4, length: 26 },\n}\nconst s = computed(() => SIZES[props.size] ?? SIZES.md)\n\nconst dur = computed(() => (Number.isFinite(props.duration) && props.duration > 0 ? props.duration : 0))\nconst inactive = computed(() => props.disabled || !dur.value)\n\n// ── Colors (as in MSlider: a role name or any CSS color; disabled per SliderTokens) ─────────────────────\nconst ROLES: Record<string, string> = {\n primary: 'var(--color-primary)',\n secondary: 'var(--color-secondary)',\n tertiary: 'var(--color-tertiary)',\n error: 'var(--color-error)',\n 'secondary-container': 'var(--color-secondary-container)',\n}\nconst colors = computed(() => {\n if (props.disabled) {\n return {\n active: 'color-mix(in srgb, var(--color-on-surface) 38%, transparent)',\n inactive: 'color-mix(in srgb, var(--color-on-surface) 12%, transparent)',\n buffered: 'color-mix(in srgb, var(--color-on-surface) 20%, transparent)',\n }\n }\n const active = ROLES[props.color] ?? props.color\n const inactive = props.trackColor ? ROLES[props.trackColor] ?? props.trackColor : 'var(--color-secondary-container)'\n return { active, inactive, buffered: `color-mix(in srgb, ${active} 35%, ${inactive})` }\n})\n\n// ── Time ────────────────────────────────────────────────────────────────────────────────────────────────\nconst pad = (n: number) => String(n).padStart(2, '0')\nfunction fmt(t: number) {\n if (props.format) return props.format(t)\n const sec = Math.max(0, Math.floor(t))\n const h = Math.floor(sec / 3600)\n const m = Math.floor((sec % 3600) / 60)\n return (dur.value >= 3600 ? `${h}:${pad(m)}` : String(h * 60 + m)) + ':' + pad(sec % 60)\n}\n\n// The shown position: the drag's while scrubbing, else `pos`, which follows modelValue and, while playing,\n// advances on its own (only written when it moves half a pixel or crosses a second, so it re-renders rarely)\nconst scrubTime = ref<number | null>(null)\nconst pos = ref(props.modelValue)\nconst current = computed(() => Math.min(dur.value || Infinity, Math.max(0, scrubTime.value ?? pos.value)))\n\nconst showRemaining = ref(props.remaining)\nwatch(() => props.remaining, (v) => { showRemaining.value = v })\nfunction toggleRemaining() {\n showRemaining.value = !showRemaining.value\n emit('update:remaining', showRemaining.value)\n}\nconst timeStyle = computed(() => (props.timeColor ? { color: props.timeColor } : undefined))\nconst startText = computed(() => fmt(current.value))\nconst endText = computed(() => {\n if (!dur.value) return '--:--'\n return showRemaining.value ? `-${fmt(dur.value - current.value)}` : fmt(dur.value)\n})\nconst valueText = computed(() =>\n locale.seekBarValue.replace('{position}', fmt(current.value)).replace('{duration}', dur.value ? fmt(dur.value) : '--:--'),\n)\n\nconst chapterAt = (t: number) => {\n let found: SeekBarChapter | null = null\n for (const c of props.chapters ?? []) if (c.start <= t && (!found || c.start >= found.start)) found = c\n return found\n}\n\n// ── Geometry (px, from the measured track width) ────────────────────────────────────────────────────────\nconst trackEl = ref<HTMLElement>()\nconst width = ref(0)\nconst toPx = (t: number) => (dur.value ? (width.value * Math.min(1, Math.max(0, t / dur.value))) : 0)\n\n// The bar thumb keeps clear of the track's ends, as MSlider's thumbInset; the round one may overhang them\nconst thumbX = computed(() => {\n const x = toPx(current.value)\n if (props.variant === 'line') return x\n const inset = Math.max(2, s.value.track * 0.3)\n return Math.min(width.value - inset, Math.max(inset, x))\n})\n\nconst bufferedRanges = computed<[number, number][]>(() => {\n const b = props.buffered\n if (b === undefined) return []\n return typeof b === 'number' ? [[0, b]] : b\n})\n\ninterface Piece { a: number; b: number; rl: number; rr: number; fills: { left: number; width: number; color: string }[] }\n\n// The track is drawn as pieces between cuts: chapter boundaries, the gap around the bar thumb and, for the wavy\n// line, everything before the thumb (drawn by the SVG). Outer ends get a full radius, cut ends a small one, as\n// the M3 slider's segments.\nconst pieces = computed<Piece[]>(() => {\n const W = width.value\n if (!W) return []\n const { gap } = s.value\n const track = trackH.value\n const x = thumbX.value\n const chapterGap = props.size === 'md' ? 4 : 2\n const cuts: [number, number][] = []\n for (const c of props.chapters ?? []) {\n if (c.start <= 0 || c.start >= dur.value) continue\n const cx = toPx(c.start)\n cuts.push([cx - chapterGap / 2, cx + chapterGap / 2])\n }\n if (props.variant === 'slider') cuts.push([x - gap, x + gap])\n if (props.variant === 'wavy') cuts.push([-Infinity, x + gap])\n cuts.sort((p, q) => p[0] - q[0])\n const spans: [number, number][] = []\n let at = 0\n for (const [c0, c1] of cuts) {\n if (c0 > at) spans.push([at, Math.min(c0, W)])\n at = Math.max(at, c1)\n }\n if (at < W) spans.push([at, W])\n\n const full = track / 2\n const small = Math.min(full, Math.max(1, track / 8))\n const playedTo = props.variant === 'line' ? toPx(current.value) : x\n return spans.filter(([a, b]) => b - a >= 0.5).map(([a, b]) => {\n const fills: Piece['fills'] = []\n for (const [t0, t1] of bufferedRanges.value) {\n const l = Math.max(a, toPx(t0))\n const r = Math.min(b, toPx(t1))\n if (r > l) fills.push({ left: l - a, width: r - l, color: colors.value.buffered })\n }\n if (playedTo > a) fills.push({ left: 0, width: Math.min(b, playedTo) - a, color: colors.value.active })\n return { a, b, rl: a <= 0.01 ? full : small, rr: b >= W - 0.01 ? full : small, fills }\n })\n})\n\n// M3's stop indicator at the far end of a (md) slider track, while the thumb hasn't reached it\nconst stopDot = computed(() => props.variant === 'slider' && props.size === 'md' && thumbX.value < width.value - 12 - s.value.gap)\n\n// ── Thumb ───────────────────────────────────────────────────────────────────────────────────────────────\nconst pressed = ref(false)\nconst focused = ref(false)\nconst hovered = ref(false)\n\n// The line thickens under the pointer, as a video player's does; the wavy line's unplayed part is as thick as the\n// wave's stroke (WavyProgressIndicatorDefaults: the same stroke for indicator and track)\nconst trackH = computed(() => {\n if (props.variant === 'wavy') return s.value.wave\n const t = s.value.track\n return props.variant === 'line' && !inactive.value && (hovered.value || pressed.value) ? t + Math.max(2, t / 4) : t\n})\nconst thumbStyle = computed(() => {\n const base = { left: `${thumbX.value}px`, backgroundColor: colors.value.active }\n if (props.variant === 'line') {\n const { dot: d, dotIdle } = s.value\n const scale = pressed.value || hovered.value || focused.value ? 1 : dotIdle / d\n return { ...base, width: `${d}px`, height: `${d}px`, borderRadius: '50%', transform: `translate(-50%, -50%) scale(${scale})` }\n }\n // Pinches to half its width while pressed or focused, as MSlider (SliderTokens.PressedHandleWidth)\n const narrow = pressed.value || focused.value ? 0.5 : 1\n return { ...base, width: '4px', height: `${s.value.thumbH}px`, borderRadius: '2px', transform: `translate(-50%, -50%) scaleX(${narrow})` }\n})\n\n// ── Preview bubble ──────────────────────────────────────────────────────────────────────────────────────\nconst hoverTime = ref<number | null>(null)\nconst previewTime = computed(() => (props.preview && !inactive.value ? scrubTime.value ?? hoverTime.value : null))\nconst previewChapter = computed(() => (previewTime.value === null ? null : chapterAt(previewTime.value)))\nconst bubbleEl = ref<HTMLElement>()\nconst bubbleW = ref(0)\nlet bubbleObserver: ResizeObserver | null = null\nwatch(bubbleEl, (el) => {\n bubbleObserver?.disconnect()\n if (!el || typeof ResizeObserver === 'undefined') return\n bubbleW.value = el.offsetWidth\n bubbleObserver = new ResizeObserver(() => { bubbleW.value = el.offsetWidth })\n bubbleObserver.observe(el)\n})\n// Centered over the time, but kept within the track\nconst previewX = computed(() => {\n const x = previewTime.value === null ? 0 : toPx(previewTime.value)\n const half = bubbleW.value / 2\n return half * 2 >= width.value ? width.value / 2 : Math.min(width.value - half, Math.max(half, x))\n})\n\n// ── Pointer: mouse/pen scrub from the press; a touch waits to see a horizontal move (touch-action pan-y leaves a\n// vertical one to the page), and a touch that doesn't move is a tap that seeks there ────────────────────────\nlet press: { id: number; x: number; y: number; touch: boolean; started: boolean } | null = null\n\nfunction timeAt(clientX: number) {\n const el = trackEl.value\n if (!el || !dur.value) return 0\n const r = el.getBoundingClientRect()\n return (Math.min(1, Math.max(0, (clientX - r.left) / (r.width || 1)))) * dur.value\n}\n\nfunction scrubTo(t: number) {\n scrubTime.value = t\n emit('scrub', t)\n if (props.live) emit('update:modelValue', t)\n}\n\nfunction begin(e: PointerEvent) {\n if (!press) return\n press.started = true\n pressed.value = true\n const t = timeAt(e.clientX)\n emit('scrub-start', t)\n scrubTo(t)\n}\n\nfunction commit(t: number) {\n emit('update:modelValue', t)\n emit('seek', t)\n // Show it at once; a later modelValue resyncs\n pos.value = t\n base = t\n baseAt = now()\n}\n\nfunction onPointerDown(e: PointerEvent) {\n if (inactive.value || e.button !== 0) return\n press = { id: e.pointerId, x: e.clientX, y: e.clientY, touch: e.pointerType === 'touch', started: false }\n window.addEventListener('pointermove', onPointerMove)\n window.addEventListener('pointerup', onPointerUp)\n window.addEventListener('pointercancel', onPointerCancel)\n if (!press.touch) {\n e.preventDefault()\n trackEl.value?.focus({ preventScroll: true })\n begin(e)\n }\n}\n\nfunction onPointerMove(e: PointerEvent) {\n if (!press || e.pointerId !== press.id) return\n if (!press.started) {\n const dx = Math.abs(e.clientX - press.x)\n const dy = Math.abs(e.clientY - press.y)\n if (dy > 8 && dy > dx) return end()\n if (dx < 4) return\n begin(e)\n }\n scrubTo(timeAt(e.clientX))\n}\n\nfunction onPointerUp(e: PointerEvent) {\n if (!press || e.pointerId !== press.id) return\n const t = press.started ? scrubTime.value ?? timeAt(e.clientX) : timeAt(e.clientX)\n end()\n commit(t)\n}\n\n// The browser took the touch (a scroll): a drag in progress still lands where it was\nfunction onPointerCancel(e: PointerEvent) {\n if (!press || e.pointerId !== press.id) return\n const t = press.started ? scrubTime.value : null\n end()\n if (t !== null) commit(t)\n}\n\nfunction end() {\n press = null\n pressed.value = false\n scrubTime.value = null\n window.removeEventListener('pointermove', onPointerMove)\n window.removeEventListener('pointerup', onPointerUp)\n window.removeEventListener('pointercancel', onPointerCancel)\n}\n\nfunction onHover(e: PointerEvent) {\n if (e.pointerType === 'touch') return\n hovered.value = true\n hoverTime.value = timeAt(e.clientX)\n}\nfunction onLeave() {\n hovered.value = false\n hoverTime.value = null\n}\n\nfunction onKeyDown(e: KeyboardEvent) {\n if (inactive.value) return\n const d = dur.value\n const steps: Record<string, number> = {\n ArrowRight: props.keyStep, ArrowUp: props.keyStep, ArrowLeft: -props.keyStep, ArrowDown: -props.keyStep,\n PageUp: d / 10, PageDown: -d / 10,\n }\n let t: number | null = null\n if (e.key in steps) t = current.value + steps[e.key]!\n else if (e.key === 'Home') t = 0\n else if (e.key === 'End') t = d\n if (t === null) return\n e.preventDefault()\n commit(Math.min(d, Math.max(0, t)))\n}\n\n// ── Motion between updates, and the wave (a rAF loop, only while either needs frames) ───────────────────\nconst now = () => (typeof performance !== 'undefined' ? performance.now() : 0)\nlet base = props.modelValue\nlet baseAt = now()\nlet raf = 0\nlet last = 0\nlet amp = 0\nlet phase = 0\nconst wavePathEl = ref<SVGPathElement>()\nconst svgH = computed(() => s.value.wave + 2 * s.value.amp + 2)\nconst reducedMotion = typeof window !== 'undefined' && !!window.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n\nconst ampTarget = () => (props.variant === 'wavy' && props.playing && scrubTime.value === null ? s.value.amp : 0)\namp = ampTarget()\n\nfunction advancing() {\n return props.playing && scrubTime.value === null && !!dur.value\n}\n\nfunction syncPos(t: number) {\n const W = width.value\n const d = dur.value\n if (Math.floor(t) !== Math.floor(pos.value) || (d && (Math.abs(t - pos.value) * W) / d >= 0.5)) pos.value = t\n}\n\nfunction drawWave() {\n const path = wavePathEl.value\n if (!path) return\n const { wave, length, gap } = s.value\n const half = wave / 2\n const end = thumbX.value - gap - half\n if (end <= half) return path.setAttribute('d', '')\n const mid = svgH.value / 2\n const k = (2 * Math.PI) / length\n let d = ''\n for (let x = half; ; x += 2) {\n const px = Math.min(x, end)\n d += `${d ? 'L' : 'M'}${px.toFixed(1)},${(mid + amp * Math.sin(k * px + phase)).toFixed(2)}`\n if (px >= end) break\n }\n path.setAttribute('d', d)\n}\n\nfunction frame(t: number) {\n const dt = last ? Math.min(0.1, (t - last) / 1000) : 0\n last = t\n if (advancing()) syncPos(Math.min(dur.value, base + ((t - baseAt) / 1000) * props.playbackRate))\n if (props.variant === 'wavy') {\n amp += (ampTarget() - amp) * (1 - Math.exp(-dt / 0.12))\n if (Math.abs(ampTarget() - amp) < 0.01) amp = ampTarget()\n // The wave travels with the playback, one length every 1.25s\n if (props.playing && !reducedMotion) phase -= (dt * 2 * Math.PI) / 1.25\n drawWave()\n }\n if (advancing() || (props.variant === 'wavy' && (amp !== ampTarget() || (props.playing && !reducedMotion)))) {\n raf = requestAnimationFrame(frame)\n } else {\n raf = 0\n last = 0\n }\n}\n\nfunction kick() {\n if (raf || typeof requestAnimationFrame === 'undefined') return\n raf = requestAnimationFrame(frame)\n}\n\nwatch(() => props.modelValue, (v) => {\n base = v\n baseAt = now()\n pos.value = v\n kick()\n})\nwatch(() => props.playing, () => {\n base = pos.value\n baseAt = now()\n kick()\n})\nwatch(scrubTime, (v) => {\n if (v === null) {\n base = pos.value\n baseAt = now()\n }\n kick()\n})\n// Paused, the (flat) wave still follows the thumb\nwatch([thumbX, () => props.variant, () => props.size], () => {\n if (props.variant === 'wavy') drawWave()\n}, { flush: 'post' })\n\nlet resizeObserver: ResizeObserver | null = null\nonMounted(() => {\n const el = trackEl.value!\n width.value = el.clientWidth\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(() => { width.value = el.clientWidth })\n resizeObserver.observe(el)\n }\n drawWave()\n kick()\n})\nonBeforeUnmount(() => {\n cancelAnimationFrame(raf)\n resizeObserver?.disconnect()\n bubbleObserver?.disconnect()\n end()\n})\n</script>\n\n<template>\n <div class=\"flex min-w-0 select-none\" :class=\"time === 'sides' ? 'items-center gap-3' : 'flex-col'\">\n <span v-if=\"time === 'sides'\" class=\"min-w-[4ch] shrink-0 text-right text-label-medium tabular-nums\" :class=\"!timeColor && 'text-on-surface-variant'\" :style=\"timeStyle\">{{ startText }}</span>\n\n <div\n ref=\"trackEl\"\n role=\"slider\"\n :tabindex=\"inactive ? -1 : 0\"\n :aria-label=\"label ?? locale.seekBar\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"Math.round(dur)\"\n :aria-valuenow=\"Math.round(current)\"\n :aria-valuetext=\"valueText\"\n :aria-disabled=\"inactive || undefined\"\n class=\"group relative min-w-0 shrink-0 touch-pan-y outline-none\"\n :class=\"[inactive ? 'cursor-default' : 'cursor-pointer', time === 'sides' && 'flex-1']\"\n :style=\"{ height: `${s.hit}px` }\"\n @pointerdown=\"onPointerDown\"\n @pointermove=\"onHover\"\n @pointerleave=\"onLeave\"\n @keydown=\"onKeyDown\"\n @focus=\"focused = true\"\n @blur=\"focused = false\"\n >\n <!-- A grace zone past the hit area (mostly above, where the preview opens), so the pointer doesn't have to\n land exactly on a thin line: its events reach the track like the track's own -->\n <div v-if=\"!inactive\" class=\"absolute inset-x-0 -top-3 -bottom-1\" />\n <div\n v-for=\"(p, i) in pieces\"\n :key=\"i\"\n class=\"absolute top-1/2 -translate-y-1/2 overflow-hidden transition-[height] duration-100\"\n :style=\"{\n left: `${p.a}px`, width: `${p.b - p.a}px`, height: `${trackH}px`,\n borderRadius: `${p.rl}px ${p.rr}px ${p.rr}px ${p.rl}px`, backgroundColor: colors.inactive,\n }\"\n >\n <div\n v-for=\"(f, j) in p.fills\"\n :key=\"j\"\n class=\"absolute inset-y-0\"\n :style=\"{ left: `${f.left}px`, width: `${f.width}px`, backgroundColor: f.color }\"\n />\n </div>\n\n <svg\n v-if=\"variant === 'wavy'\"\n class=\"pointer-events-none absolute top-1/2 left-0 -translate-y-1/2 overflow-visible\"\n :width=\"width\"\n :height=\"svgH\"\n aria-hidden=\"true\"\n >\n <path ref=\"wavePathEl\" fill=\"none\" :stroke=\"colors.active\" :stroke-width=\"s.wave\" stroke-linecap=\"round\" />\n </svg>\n\n <div\n v-if=\"stopDot\"\n class=\"pointer-events-none absolute top-1/2 right-3 size-1 -translate-y-1/2 rounded-full\"\n :style=\"{ backgroundColor: colors.active }\"\n />\n\n <div\n class=\"pointer-events-none absolute top-1/2 transition-transform duration-75 group-focus-visible:ring-2 group-focus-visible:ring-primary group-focus-visible:ring-offset-2 group-focus-visible:ring-offset-surface\"\n :style=\"thumbStyle\"\n />\n\n <div\n v-if=\"previewTime !== null\"\n ref=\"bubbleEl\"\n class=\"pointer-events-none absolute bottom-full z-10 mb-1 -translate-x-1/2\"\n :style=\"{ left: `${previewX}px` }\"\n >\n <slot name=\"preview\" :time=\"previewTime\" :formatted=\"fmt(previewTime)\" :chapter=\"previewChapter\">\n <div class=\"flex h-7 max-w-60 items-center gap-1 rounded-full bg-inverse-surface px-2.5 text-label-medium whitespace-nowrap text-inverse-on-surface tabular-nums\">\n <span v-if=\"previewChapter?.title\" class=\"truncate\">{{ previewChapter.title }} ·</span>\n <span>{{ fmt(previewTime) }}</span>\n </div>\n </slot>\n </div>\n </div>\n\n <div v-if=\"time === 'below'\" class=\"flex items-center justify-between text-label-medium tabular-nums\" :class=\"!timeColor && 'text-on-surface-variant'\" :style=\"timeStyle\">\n <span>{{ startText }}</span>\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-secondary\"\n :aria-label=\"showRemaining ? locale.seekBarShowDuration : locale.seekBarShowRemaining\"\n @click=\"toggleRemaining\"\n >{{ endText }}</button>\n </div>\n <button\n v-else-if=\"time === 'sides'\"\n type=\"button\"\n class=\"min-w-[4ch] shrink-0 cursor-pointer rounded-sm text-left text-label-medium tabular-nums outline-none focus-visible:ring-2 focus-visible:ring-secondary\"\n :class=\"!timeColor && 'text-on-surface-variant'\"\n :style=\"timeStyle\"\n :aria-label=\"showRemaining ? locale.seekBarShowDuration : locale.seekBarShowRemaining\"\n @click=\"toggleRemaining\"\n >{{ endText }}</button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BA,IAAMsB,IAAQC,GAqDRC,IAAOH,IAQPI,IAASf,EAAU,GAKnBgB,KAAQ;GACZ,IAAI;IAAE,OAAO;IAAG,QAAQ;IAAI,KAAK;IAAI,SAAS;IAAI,KAAK;IAAG,KAAK;IAAI,MAAM;IAAG,KAAK;IAAK,QAAQ;GAAG;GACjG,IAAI;IAAE,OAAO;IAAG,QAAQ;IAAI,KAAK;IAAI,SAAS;IAAI,KAAK;IAAG,KAAK;IAAI,MAAM;IAAG,KAAK;IAAG,QAAQ;GAAG;GAC/F,IAAI;IAAE,OAAO;IAAI,QAAQ;IAAI,KAAK;IAAI,SAAS;IAAI,KAAK;IAAG,KAAK;IAAI,MAAM;IAAG,KAAK;IAAG,QAAQ;GAAG;EAClG,GACMC,IAAIC,QAAeF,GAAMJ,EAAM,SAASI,GAAM,EAAE,GAEhDG,IAAMD,QAAgB,OAAO,SAASN,EAAM,QAAQ,KAAKA,EAAM,WAAW,IAAIA,EAAM,WAAW,CAAE,GACjGQ,IAAWF,QAAeN,EAAM,YAAY,CAACO,EAAI,KAAK,GAGtDE,KAAgC;GACpC,SAAS;GACT,WAAW;GACX,UAAU;GACV,OAAO;GACP,uBAAuB;EACzB,GACMC,IAASJ,QAAe;GAC5B,IAAIN,EAAM,UACR,OAAO;IACL,QAAQ;IACR,UAAU;IACV,UAAU;GACZ;GAEF,IAAMW,IAASF,GAAMT,EAAM,UAAUA,EAAM,OACrCQ,IAAWR,EAAM,aAAaS,GAAMT,EAAM,eAAeA,EAAM,aAAa;GAClF,OAAO;IAAE;IAAQ;IAAU,UAAU,sBAAsBW,EAAO,QAAQH,EAAS;GAAG;EACxF,CAAC,GAGKI,MA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WAAA;KALe,MAAMlE,EAAA;KAAc,WAAW7D,EAAI6D,EAAA,KAAW;KAAI,SAASC,EAAA;IAAjF,SAKO,CAJL7F,EAGM,OAHNU,IAGM,CAFQmF,EAAA,OAAgB,SAA5BlG,EAAA,GAAAC,EAAuF,QAAvFe,IAAuFZ,EAAhC8F,EAAA,MAAe,KAAK,IAAG,MAAE,CAAA,K,WAChF7F,EAAmC,QAAA,MAAAD,EAA1BgC,EAAI6D,EAAA,KAAW,CAAA,GAAA,CAAA,C;;GAMrB1E,EAAA,SAAI,WAAfvB,EAAA,GAAAC,EAQM,OAAA;;IARuB,OAAKC,EAAA,CAAC,oEAAkE,CAAUqB,EAAA,aAAS,yBAAA,CAAA;IAAgC,OAAKpB,EAAE6C,EAAA,KAAS;G,IACtK3C,EAA4B,QAAA,MAAAD,EAAnB6C,GAAA,KAAS,GAAA,CAAA,GAClB5C,EAKuB,UAAA;IAJrB,MAAK;IACL,OAAM;IACL,cAAYwC,EAAA,QAAgBvC,EAAAmB,CAAA,CAAM,CAAC,sBAAsBnB,EAAAmB,CAAA,CAAM,CAAC;IAChE,SAAOsB;GACN,GAAA3C,EAAA8C,GAAA,KAAO,GAAA,GAAAjC,EAAA,C,SAGAM,EAAA,SAAI,WADjBvB,EAAA,GAAAC,EAQuB,UAAA;;IANrB,MAAK;IACL,OAAKC,EAAA,CAAC,0JAAwJ,CACrJqB,EAAA,aAAS,yBAAA,CAAA;IACjB,OAAKpB,EAAE6C,EAAA,KAAS;IAChB,cAAYH,EAAA,QAAgBvC,EAAAmB,CAAA,CAAM,CAAC,sBAAsBnB,EAAAmB,CAAA,CAAM,CAAC;IAChE,SAAOsB;GACN,GAAA3C,EAAA8C,GAAA,KAAO,GAAA,IAAAhC,EAAA,K"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MTextField-B6_iOczK.js","names":["$slots","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","_normalizeStyle","_unref","_createVNode","MIcon","_withDirectives","_createTextVNode","_toDisplayString","_renderSlot","MIcon_default","useLocale","M3_BG_CLASSES","findM3BgVar","cls","el","isTransparent","color","m","parts","s","useFieldBg","detectedBg","ref","applyFieldBg","value","containerEl","fieldBgProp","resolveBg","cssVar","bg","observer","onMounted","onBeforeUnmount","computed","useAutoGrow","lastWidth","resize","cs","px","v","lineHeight","padding","border","extra","min","toValue","options","maxRows","max","content","height","attach","next","entry","w","watch","target","getCurrentInstance","useDebounce","timer","debounced","args","fn","ms","cancel","FIELD_PADDING_END","FIELD_VALUE","fieldLabelClasses","outlined","o","base","rest","floatedPeer","floated","OUTLINED_FLOATED_LABEL","fullText","updateTitle","text","hoverHandlers","vOverflowTitle","handler","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","MTextField_default","defineComponent","__expose","__emit","locale","props","__props","emit","id","useId","slots","useSlots","fieldBgEl","emitDebounced","cancelDebounce","textareaEl","inputOnlyEl","fieldEl","validation","useFieldValidation","errorMessage","isDisabled","onBlur","event","showClear","rightInset","inputClasses","pl","pr","size","hasError","labelClasses","onInput","start","end","direction","openBlock","createElementBlock","createElementVNode","normalizeClass","normalizeStyle","unref","resolvedFieldBg","createVNode","createCommentVNode","messageId","_cache","$event","withDirectives","createTextVNode","toDisplayString","_ctx","renderSlot"],"sources":["../src/composables/useFieldBg.ts","../src/composables/useAutoGrow.ts","../src/composables/useDebounce.ts","../src/composables/_fieldLayout.ts","../src/components/MTextField.vue"],"sourcesContent":["import { ref, computed, onMounted, onBeforeUnmount, type Ref } from 'vue'\n\nconst M3_BG_CLASSES = [\n 'bg-surface-container-highest',\n 'bg-surface-container-high',\n 'bg-surface-container-low',\n 'bg-surface-container-lowest',\n 'bg-surface-container',\n 'bg-surface-variant',\n 'bg-surface-bright',\n 'bg-surface-dim',\n 'bg-surface',\n 'bg-background',\n 'bg-inverse-surface',\n 'bg-primary-container',\n 'bg-secondary-container',\n 'bg-tertiary-container',\n 'bg-error-container',\n 'bg-primary-fixed',\n 'bg-primary-fixed-dim',\n 'bg-secondary-fixed',\n 'bg-secondary-fixed-dim',\n 'bg-tertiary-fixed',\n 'bg-tertiary-fixed-dim',\n 'bg-primary',\n 'bg-secondary',\n 'bg-tertiary',\n 'bg-error',\n] as const\n\nfunction findM3BgVar(el: HTMLElement): string | null {\n for (const cls of M3_BG_CLASSES) {\n if (el.classList.contains(cls)) return `var(--color-${cls.slice(3)})`\n }\n return null\n}\n\nfunction isTransparent(color: string): boolean {\n if (!color || color === 'transparent') return true\n const m = color.match(/^rgba?\\(([^)]+)\\)$/)\n if (m) {\n const parts = m[1]!.split(',').map((s) => s.trim())\n if (parts.length === 4 && parseFloat(parts[3]!) === 0) return true\n }\n return false\n}\n\n/**\n * Auto-detects the background behind `containerEl` and exposes it as `--field-bg`.\n * Prefers a CSS variable reference (e.g. var(--color-surface-container-low)) over a\n * raw computed color so the outlined label cutout transitions in sync with the rest\n * of the theme switch instead of lagging behind.\n *\n * @param containerEl The element that receives `--field-bg` as an inline style.\n * @param fieldBgProp Getter for the explicit `fieldBg` prop (overrides auto-detect).\n */\nexport function useFieldBg(\n containerEl: Ref<HTMLElement | null>,\n fieldBgProp: () => string | undefined,\n) {\n const detectedBg = ref<string>('var(--color-surface)')\n\n function applyFieldBg(value: string) {\n detectedBg.value = value\n containerEl.value?.style.setProperty('--field-bg', fieldBgProp() ?? value)\n }\n\n function resolveBg() {\n let el: HTMLElement | null = containerEl.value?.parentElement ?? null\n while (el) {\n const cssVar = findM3BgVar(el)\n if (cssVar) { applyFieldBg(cssVar); return }\n if (el === document.body) { applyFieldBg('var(--color-surface)'); return }\n const bg = getComputedStyle(el).backgroundColor\n if (!isTransparent(bg)) { applyFieldBg(bg); return }\n el = el.parentElement\n }\n applyFieldBg('var(--color-surface)')\n }\n\n let observer: MutationObserver | null = null\n\n onMounted(() => {\n resolveBg()\n observer = new MutationObserver(() => resolveBg())\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class', 'style', 'data-theme'],\n })\n })\n\n onBeforeUnmount(() => observer?.disconnect())\n\n const resolvedFieldBg = computed(() => fieldBgProp() ?? detectedBg.value)\n\n return { resolvedFieldBg }\n}\n","import { getCurrentInstance, onBeforeUnmount, toValue, watch, type MaybeRefOrGetter, type WatchSource } from 'vue'\n\nexport interface AutoGrowOptions {\n /** Fewest rows it shrinks to (default 1) */\n minRows?: MaybeRefOrGetter<number | undefined>\n /** Most rows it grows to; past them it scrolls. Unset grows without limit */\n maxRows?: MaybeRefOrGetter<number | undefined>\n /**\n * The text, when it can change without typing (cleared after sending, an emoji inserted…): a ref or getter, so the\n * height follows. Typing is followed on its own\n */\n value?: WatchSource<unknown>\n}\n\n/**\n * Makes a `<textarea>` grow with its text, between `minRows` and `maxRows` rows, scrolling past the last one: a chat\n * composer, a comment box. Works on any textarea, styled however you like (rows are measured from its computed line\n * height, padding and border). It also follows width changes, which rewrap the text. Returns `resize()` for anything\n * else that changes the text.\n */\nexport function useAutoGrow(target: MaybeRefOrGetter<HTMLTextAreaElement | null | undefined>, options: AutoGrowOptions = {}) {\n let el: HTMLTextAreaElement | null = null\n let observer: ResizeObserver | null = null\n let lastWidth = 0\n\n function resize() {\n if (!el) return\n const cs = getComputedStyle(el)\n const px = (v: string) => parseFloat(v) || 0\n // `normal` line height has no number: about 1.5× the font size\n const lineHeight = px(cs.lineHeight) || px(cs.fontSize) * 1.5 || 24\n const padding = px(cs.paddingTop) + px(cs.paddingBottom)\n const border = cs.boxSizing === 'border-box' ? px(cs.borderTopWidth) + px(cs.borderBottomWidth) : 0\n const extra = (cs.boxSizing === 'border-box' ? padding : 0) + border\n const min = (toValue(options.minRows) ?? 1) * lineHeight + extra\n const maxRows = toValue(options.maxRows)\n const max = maxRows ? maxRows * lineHeight + extra : Infinity\n\n // Collapse first so scrollHeight measures the text, not the current height\n el.style.height = 'auto'\n const content = el.scrollHeight + border + (cs.boxSizing === 'border-box' ? 0 : -padding)\n const height = Math.min(max, Math.max(min, content))\n el.style.height = `${height}px`\n el.style.overflowY = content > max ? 'auto' : 'hidden'\n }\n\n function attach(next: HTMLTextAreaElement | null | undefined) {\n if (el) {\n el.removeEventListener('input', resize)\n observer?.disconnect()\n // Released (autoGrow turned off, another element): back to its own height\n el.style.height = ''\n el.style.overflowY = ''\n }\n el = next ?? null\n if (!el) return\n el.addEventListener('input', resize)\n if (typeof ResizeObserver !== 'undefined') {\n // Only width changes rewrap the text; our own height writes would otherwise loop\n observer ??= new ResizeObserver(([entry]) => {\n const w = entry!.contentRect.width\n if (w !== lastWidth) {\n lastWidth = w\n resize()\n }\n })\n observer.observe(el)\n }\n resize()\n }\n\n watch(() => toValue(target), attach, { immediate: true, flush: 'post' })\n watch([() => toValue(options.minRows), () => toValue(options.maxRows)], () => resize(), { flush: 'post' })\n if (options.value) watch(options.value, () => resize(), { flush: 'post' })\n if (getCurrentInstance()) onBeforeUnmount(() => attach(null))\n\n return { resize }\n}\n","import { onBeforeUnmount } from 'vue'\n\nexport function useDebounce(fn: (...args: any[]) => void, ms: number) {\n let timer: ReturnType<typeof setTimeout> | null = null\n\n function debounced(...args: any[]) {\n if (timer) clearTimeout(timer)\n timer = setTimeout(() => {\n timer = null\n fn(...args)\n }, ms)\n }\n\n function cancel() {\n if (timer) {\n clearTimeout(timer)\n timer = null\n }\n }\n\n onBeforeUnmount(cancel)\n\n return { debounced, cancel }\n}\n","import type { Directive } from 'vue'\n\n/**\n * Shared layout of the M3 text-field shell (internal, not exported from the package).\n *\n * Every field draws the same pieces: a 56px box, a label that floats from the middle of the box to its top\n * edge (filled) or onto the border (outlined), an optional leading icon and trailing buttons. The rules that\n * keep long content from running over those pieces live here, so a new field gets them by reusing this:\n *\n * - The label is inset from the end by as much as the box's own end padding (`right`), so it never runs\n * under a trailing button, floated (filled) or not. Floated on an outlined border, it shrinks to its own\n * text but stops 12px before the far corner, whatever its left offset (a leading icon moves it to 44px).\n * - A value shown as text in a fixed-height box (`FIELD_VALUE`) stays on one line and ends in \"…\", and\n * `vOverflowTitle` puts the whole of it in a tooltip only when it's cut. Screen readers get the full text\n * either way: the ellipsis is only visual.\n */\n\nexport type FieldVariant = 'filled' | 'outlined'\n\n/**\n * End inset of the label (right in LTR, left in RTL), which must equal the field's end padding: `end-4` with nothing trailing,\n * `end-10` with a dropdown arrow, `end-12` with one trailing button, `end-16` with a clear button and\n * an arrow, `end-24` with two 32px buttons (MNumberField's stepper).\n */\nexport type FieldEndInset = 'end-4' | 'end-10' | 'end-12' | 'end-16' | 'end-24'\n\n/** Padding matching each inset, for the box itself */\nexport const FIELD_PADDING_END: Record<FieldEndInset, string> = {\n 'end-4': 'pe-4',\n 'end-10': 'pe-10',\n 'end-12': 'pe-12',\n 'end-16': 'pe-16',\n 'end-24': 'pe-24',\n}\n\n/** One line, cut with \"…\", allowed to shrink inside its flex row */\nexport const FIELD_VALUE = 'block min-w-0 flex-1 truncate'\n\nexport interface FieldLabelOptions {\n variant: FieldVariant\n /** There is a leading icon (the label starts after it) */\n leading?: boolean\n right: FieldEndInset\n /**\n * `true`/`false` when the component knows whether the label floats; `'peer'` to float it with CSS from\n * the preceding `.peer` input (focused, or its `placeholder=\" \"` not shown because it has a value)\n */\n floated: boolean | 'peer'\n /** Color classes (they depend on each component's notion of focus / error / disabled) */\n color: string\n}\n\nexport function fieldLabelClasses(o: FieldLabelOptions): string {\n const outlined = o.variant === 'outlined'\n const left = o.leading ? (outlined ? 'start-11' : 'start-12') : outlined ? 'start-3' : 'start-4'\n const base = ['pointer-events-none absolute truncate transition-all duration-200', left, o.right]\n const rest = outlined ? 'top-1/2 -translate-y-1/2 text-body-large' : 'top-[53%] -translate-y-1/2 text-body-large'\n\n if (o.floated === 'peer') {\n // Literal class names (Tailwind only sees complete strings)\n const floatedPeer = outlined\n ? o.leading\n ? 'peer-focus:-top-2.5 peer-focus:translate-y-0 peer-focus:text-label-small peer-focus:end-auto peer-focus:max-w-[calc(100%-3.5rem)] peer-focus:bg-[var(--field-bg)] peer-focus:px-1 ' +\n 'peer-[&:not(:placeholder-shown)]:-top-2.5 peer-[&:not(:placeholder-shown)]:translate-y-0 peer-[&:not(:placeholder-shown)]:text-label-small peer-[&:not(:placeholder-shown)]:end-auto peer-[&:not(:placeholder-shown)]:max-w-[calc(100%-3.5rem)] peer-[&:not(:placeholder-shown)]:bg-[var(--field-bg)] peer-[&:not(:placeholder-shown)]:px-1'\n : 'peer-focus:-top-2.5 peer-focus:translate-y-0 peer-focus:text-label-small peer-focus:end-auto peer-focus:max-w-[calc(100%-1.5rem)] peer-focus:bg-[var(--field-bg)] peer-focus:px-1 ' +\n 'peer-[&:not(:placeholder-shown)]:-top-2.5 peer-[&:not(:placeholder-shown)]:translate-y-0 peer-[&:not(:placeholder-shown)]:text-label-small peer-[&:not(:placeholder-shown)]:end-auto peer-[&:not(:placeholder-shown)]:max-w-[calc(100%-1.5rem)] peer-[&:not(:placeholder-shown)]:bg-[var(--field-bg)] peer-[&:not(:placeholder-shown)]:px-1'\n : 'peer-focus:top-2 peer-focus:translate-y-0 peer-focus:text-label-small ' +\n 'peer-[&:not(:placeholder-shown)]:top-2 peer-[&:not(:placeholder-shown)]:translate-y-0 peer-[&:not(:placeholder-shown)]:text-label-small'\n return [...base, rest, floatedPeer, o.color].join(' ')\n }\n\n const floated = outlined\n ? `-top-2.5 translate-y-0 text-label-small bg-[var(--field-bg)] px-1 end-auto ${o.leading ? 'max-w-[calc(100%-3.5rem)]' : 'max-w-[calc(100%-1.5rem)]'}`\n : 'top-2 translate-y-0 text-label-small'\n return [...base, o.floated ? floated : rest, o.color].join(' ')\n}\n\n/** A label always floated on an outlined border (the picker triggers): cut before the far corner */\nexport const OUTLINED_FLOATED_LABEL =\n 'pointer-events-none absolute -top-2.5 start-3 max-w-[calc(100%-1.5rem)] truncate bg-(--field-bg) px-1 text-label-small'\n\nfunction fullText(el: HTMLElement): string {\n // By tag, not instanceof: the element may come from another realm (an iframe, a test DOM)\n return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA'\n ? (el as HTMLInputElement).value\n : (el.textContent ?? '').trim()\n}\n\nfunction updateTitle(el: HTMLElement) {\n const cut = el.scrollWidth > el.clientWidth\n const text = cut ? fullText(el) : ''\n if (text) el.title = text\n else el.removeAttribute('title')\n}\n\nconst hoverHandlers = new WeakMap<HTMLElement, () => void>()\n\n/**\n * Puts the element's whole text (an input's value, or its text content) in `title` while it's cut by\n * overflow, measured when the pointer comes in, so a value that fits gets no redundant tooltip.\n */\nexport const vOverflowTitle: Directive<HTMLElement> = {\n mounted(el) {\n const handler = () => updateTitle(el)\n hoverHandlers.set(el, handler)\n el.addEventListener('pointerenter', handler)\n },\n updated(el) {\n // A value changed while hovered: keep the tooltip in step\n if (el.hasAttribute('title')) updateTitle(el)\n },\n beforeUnmount(el) {\n const handler = hoverHandlers.get(el)\n if (handler) el.removeEventListener('pointerenter', handler)\n hoverHandlers.delete(el)\n },\n}\n","<script setup lang=\"ts\">\n/**\n * The standard single- or multi-line text input, filled or outlined, with floating label.\n *\n * @slot trailing Custom trailing content (e.g. an icon button) — replaces the built-in clear button when\n * present\n * @event update:modelValue Emitted on every keystroke — powers v-model\n * @event debounced Emitted debounce ms after the user stops typing (only when debounce > 0)\n * @event blur Emitted when the field loses focus (wire vee-validate's `handleBlur` / Vuelidate's `$touch` here)\n * @event focus Emitted when the field gains focus\n */\nimport { computed, ref, useId, useSlots } from \"vue\";\nimport MIcon from \"./MIcon.vue\";\nimport { useAutoGrow } from \"../composables/useAutoGrow\";\nimport { useFieldBg } from \"../composables/useFieldBg\";\nimport { useDebounce } from \"../composables/useDebounce\";\nimport { useLocale } from '../composables/useLocale'\nimport { useFieldValidation } from '../composables/_useFieldValidation'\nimport type { ValidateOn, ValidationRule } from '../composables/validation'\nimport { FIELD_PADDING_END, fieldLabelClasses, vOverflowTitle, type FieldEndInset } from '../composables/_fieldLayout'\n\nconst locale = useLocale()\nconst props = withDefaults(\n defineProps<{\n /** Bound value (v-model) */\n modelValue: string | number;\n /** Field label */\n label: string;\n /** HTML input type */\n type?: string;\n /** Visual style */\n variant?: \"filled\" | \"outlined\";\n /**\n * Puts the field in error state (red border and label). A string is also the message, so a validation\n * library's error plugs straight in: `:error=\"errors.email\"`\n */\n error?: boolean | string;\n /** Error message shown below the field (only visible when error is true) */\n errorLabel?: string;\n /**\n * Validation rules: functions `(value, ctx) => true | 'message'` (may be async; see the built-in `required`,\n * `email`, `minLength`…) or a Standard Schema (zod, valibot…). Checked in order; the first failure is shown\n */\n rules?: ValidationRule | ValidationRule[];\n /** When the rules are checked and shown: on leaving the field (default; live after that), while typing, or only on submit (`MForm`) */\n validateOn?: ValidateOn;\n /** Wait this long (ms) after the value stops changing before re-checking (one request for an async rule, not one per key). Defaults to its `MForm`'s */\n validateDebounce?: number;\n /** Native `name`; also the key of this field in its `MForm`'s values, errors and schema */\n name?: string;\n /** Hint text shown below the field */\n hint?: string;\n /** Disables the field */\n disabled?: boolean;\n /** Marks as required — adds a red asterisk after the label; inside an `MForm` or with `rules`, also validates it */\n required?: boolean;\n /** Renders a textarea instead of an input */\n multiline?: boolean;\n /** Textarea rows (when multiline); with autoGrow, the fewest it shrinks to */\n rows?: number;\n /** Multiline only: grows with the text from `rows` up to `maxRows`, instead of a fixed height with a drag handle */\n autoGrow?: boolean;\n /** With autoGrow, the most rows it grows to before scrolling. Unset grows without limit */\n maxRows?: number;\n /** Passed through to the native autocomplete attribute */\n autocomplete?: string;\n /** Material Symbol shown before the input */\n leadingIcon?: string;\n /** Show a clear button when the field has a value */\n clearable?: boolean;\n /**\n * Overrides the auto-detected background color used to cut the floating label out of the outlined border\n */\n fieldBg?: string;\n /** Delay (ms) before firing the @debounced event. v-model always updates immediately */\n debounce?: number;\n }>(),\n {\n type: \"text\",\n variant: \"filled\",\n rows: 3,\n clearable: false,\n debounce: 0,\n },\n);\n\nconst emit = defineEmits<{ \"update:modelValue\": [string]; debounced: [string]; blur: [FocusEvent]; focus: [FocusEvent] }>();\n\nconst id = useId();\nconst slots = useSlots();\n\nconst fieldBgEl = ref<HTMLElement | null>(null);\nconst { resolvedFieldBg } = useFieldBg(fieldBgEl, () => props.fieldBg);\n\nconst { debounced: emitDebounced, cancel: cancelDebounce } = useDebounce((v: string) => emit(\"debounced\", v), props.debounce)\n\nconst textareaEl = ref<HTMLTextAreaElement | null>(null);\nconst inputOnlyEl = ref<HTMLInputElement | null>(null);\nconst fieldEl = computed(() => textareaEl.value ?? inputOnlyEl.value);\n\nconst validation = useFieldValidation({\n value: () => props.modelValue,\n rules: () => props.rules,\n required: () => props.required,\n error: () => props.error,\n errorLabel: () => props.errorLabel,\n name: () => props.name,\n validateOn: () => props.validateOn,\n validateDebounce: () => props.validateDebounce,\n disabled: () => props.disabled,\n focus: () => fieldEl.value?.focus(),\n el: () => fieldEl.value,\n setValue: (v) => emit(\"update:modelValue\", v as string),\n});\nconst { hasError, message: errorMessage, messageId } = validation;\nconst isDisabled = validation.disabled;\n\nfunction onBlur(event: FocusEvent) {\n validation.onBlur();\n emit(\"blur\", event);\n}\nuseAutoGrow(() => (props.multiline && props.autoGrow ? textareaEl.value : null), {\n minRows: () => props.rows,\n maxRows: () => props.maxRows,\n value: () => props.modelValue,\n});\n\nconst showClear = computed(() => props.clearable && String(props.modelValue).length > 0 && !isDisabled.value)\n\n// The label and the text both stop before a trailing button (the #trailing slot or the clear button)\nconst rightInset = computed<FieldEndInset>(() => (slots.trailing || props.clearable ? \"end-12\" : \"end-4\"));\n\nconst inputClasses = computed(() => {\n const pl = props.leadingIcon ? \"ps-12\" : \"ps-4\";\n const pr = FIELD_PADDING_END[rightInset.value];\n const size = props.multiline ? (props.autoGrow ? \"resize-none min-h-[56px]\" : \"resize-y min-h-[56px]\") : \"h-14\";\n const base = [\n \"peer block w-full text-body-large text-on-surface outline-none placeholder:text-transparent\",\n \"transition-[border-color,border-width] duration-150\",\n \"disabled:cursor-not-allowed disabled:text-on-surface/38\",\n hasError.value ? \"caret-error\" : \"caret-primary\",\n size,\n pl,\n pr,\n ];\n\n if (props.variant === \"outlined\") {\n return [\n ...base,\n \"rounded-xs border bg-transparent py-4\",\n hasError.value\n ? \"border-error focus:border-2 focus:border-error\"\n : \"border-outline hover:border-on-surface focus:border-2 focus:border-primary\",\n \"disabled:border-on-surface/12\",\n ].join(\" \");\n }\n\n return [\n ...base,\n // Multiline: the label's 24px band is a transparent top border rather than padding, so text scrolled up is\n // clipped below the label (at the padding box) instead of running behind it; the background still fills it\n props.multiline\n ? \"rounded-t-xs bg-surface-container-highest border-b border-t-24 border-t-transparent pb-2\"\n : \"rounded-t-xs bg-surface-container-highest border-b pt-6 pb-2\",\n hasError.value\n ? \"border-b-error focus:border-b-2 focus:border-b-error\"\n : \"border-b-on-surface-variant hover:border-b-on-surface focus:border-b-2 focus:border-b-primary\",\n \"disabled:border-b-on-surface/38 disabled:bg-[color-mix(in_srgb,var(--color-on-surface)_4%,var(--color-surface-container-highest))]\",\n ].join(\" \");\n});\n\nconst labelClasses = computed(() =>\n fieldLabelClasses({\n variant: props.variant,\n leading: !!props.leadingIcon,\n right: rightInset.value,\n floated: 'peer',\n color: [\n hasError.value ? 'text-error peer-focus:text-error' : 'text-on-surface-variant peer-focus:text-primary',\n 'peer-disabled:text-on-surface/38',\n ].join(' '),\n }),\n);\n\nfunction onInput(event: Event) {\n const target = event.target as HTMLInputElement | HTMLTextAreaElement;\n emit(\"update:modelValue\", target.value);\n if (props.debounce > 0) emitDebounced(target.value)\n}\n\ndefineExpose({\n /** The `<input>` (or `<textarea>`) element */\n inputEl: fieldEl,\n /** Focuses the field */\n focus: (options?: FocusOptions) => fieldEl.value?.focus(options),\n /** Takes focus away from the field */\n blur: () => fieldEl.value?.blur(),\n /** Selects all its text */\n select: () => fieldEl.value?.select(),\n /** Checks its rules and shows the result; resolves to whether they pass */\n validate: validation.validate,\n /** Hides its validation error (until the next check) */\n resetValidation: validation.resetValidation,\n /** Selects part of its text (e.g. a file name without its extension) */\n setSelectionRange: (start: number, end: number, direction?: 'forward' | 'backward' | 'none') => fieldEl.value?.setSelectionRange(start, end, direction),\n})\n</script>\n\n<template>\n <div class=\"flex flex-col gap-1\">\n <!--\n --field-bg: background behind the floating label in outlined mode, so it\n \"cuts through\" the border. Auto-detected from the nearest opaque ancestor\n (see resolveBg); overridable via the fieldBg prop; falls back to surface.\n -->\n <div\n ref=\"fieldBgEl\"\n class=\"relative\"\n :class=\"variant === 'outlined' ? 'mt-2' : ''\"\n :style=\"variant === 'outlined' ? { '--field-bg': resolvedFieldBg } : undefined\"\n >\n <div\n v-if=\"leadingIcon\"\n class=\"pointer-events-none absolute start-3.5\"\n :class=\"[\n multiline ? 'top-[55%] -translate-y-1/2' : variant === 'filled' ? 'top-4.5' : 'top-4',\n isDisabled ? 'text-on-surface/38' : 'text-on-surface-variant',\n ]\"\n >\n <MIcon :name=\"leadingIcon\" :size=\"24\" />\n </div>\n\n <textarea\n v-if=\"multiline\"\n ref=\"textareaEl\"\n :id=\"id\"\n :value=\"String(modelValue)\"\n :rows=\"rows\"\n :name=\"name\"\n :disabled=\"isDisabled\"\n :required=\"required\"\n :aria-invalid=\"hasError || undefined\"\n :aria-describedby=\"errorMessage || hint ? messageId : undefined\"\n placeholder=\" \"\n :class=\"inputClasses\"\n @input=\"onInput\"\n @blur=\"onBlur\"\n @focus=\"emit('focus', $event)\"\n />\n <input\n v-else\n ref=\"inputOnlyEl\"\n :id=\"id\"\n :type=\"type\"\n :value=\"modelValue\"\n :name=\"name\"\n :disabled=\"isDisabled\"\n :required=\"required\"\n :aria-invalid=\"hasError || undefined\"\n :aria-describedby=\"errorMessage || hint ? messageId : undefined\"\n :autocomplete=\"autocomplete\"\n placeholder=\" \"\n :class=\"inputClasses\"\n v-overflow-title\n @input=\"onInput\"\n @blur=\"onBlur\"\n @focus=\"emit('focus', $event)\"\n />\n\n <label :for=\"id\" :class=\"labelClasses\">\n {{ label }}<span v-if=\"required\" class=\"text-error\"> *</span>\n </label>\n\n <div v-if=\"$slots.trailing\" class=\"absolute end-2 top-1/2 -translate-y-1/2\">\n <slot name=\"trailing\" />\n </div>\n <button\n :aria-label=\"locale.clear\"\n v-else-if=\"showClear\"\n type=\"button\"\n class=\"absolute end-3 top-1/2 -translate-y-1/2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full text-on-surface-variant transition-colors hover:bg-on-surface/8 hover:text-on-surface\"\n @click=\"cancelDebounce(); emit('update:modelValue', '')\"\n >\n <MIcon name=\"close\" :size=\"18\" />\n </button>\n </div>\n\n <p v-if=\"errorMessage\" :id=\"messageId\" role=\"alert\" class=\"px-4 text-body-small text-error\">{{ errorMessage }}</p>\n <p v-else-if=\"hint\" :id=\"messageId\" class=\"px-4 text-body-small text-on-surface-variant\">{{ hint }}</p>\n </div>\n</template>\n"],"mappings":";;;;;AAEA,IAAMe,IAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,SAASC,EAAY,GAAgC;CACnD,KAAK,IAAMC,KAAOF,GAChB,IAAIG,EAAG,UAAU,SAASD,CAAG,GAAG,OAAO,eAAeA,EAAI,MAAM,CAAC,EAAE;CAErE,OAAO;AACT;AAEA,SAASE,EAAc,GAAwB;CAC7C,IAAI,CAACC,KAASA,MAAU,eAAe,OAAO;CAC9C,IAAMC,IAAID,EAAM,MAAM,oBAAoB;CAC1C,IAAIC,GAAG;EACL,IAAMC,IAAQD,EAAE,EAAE,CAAE,MAAM,GAAG,CAAC,CAAC,KAAK,MAAME,EAAE,KAAK,CAAC;EAClD,IAAID,EAAM,WAAW,KAAK,WAAWA,EAAM,EAAG,MAAM,GAAG,OAAO;CAChE;CACA,OAAO;AACT;AAWA,SAAgBE,EACd,GACA,GACA;CACA,IAAMC,IAAaC,EAAY,sBAAsB;CAErD,SAASC,EAAa,GAAe;EAEnC,AADA,EAAW,QAAQC,GACnBC,EAAY,OAAO,MAAM,YAAY,cAAcC,EAAY,KAAKF,CAA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