@m3ui-vue/m3ui-vue 1.12.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/API.md +57 -2
  2. package/dist/{MButton-BpsqEnrZ.js → MButton-hekekm82.js} +2 -2
  3. package/dist/{MButton-BpsqEnrZ.js.map → MButton-hekekm82.js.map} +1 -1
  4. package/dist/{MColorPickerModal--1smY7Xd.js → MColorPickerModal-BTnrUTiZ.js} +4 -4
  5. package/dist/{MColorPickerModal--1smY7Xd.js.map → MColorPickerModal-BTnrUTiZ.js.map} +1 -1
  6. package/dist/{MDialog-BByDHo7n.js → MDialog-DUh4Fyfb.js} +2 -2
  7. package/dist/{MDialog-BByDHo7n.js.map → MDialog-DUh4Fyfb.js.map} +1 -1
  8. package/dist/{MListItem-BpblBJbK.js → MListItem-Cjplh1_M.js} +4 -4
  9. package/dist/{MListItem-BpblBJbK.js.map → MListItem-Cjplh1_M.js.map} +1 -1
  10. package/dist/{MLoadingIndicator-MGhvPkvl.js → MLoadingIndicator-DlYVoeWY.js} +2 -2
  11. package/dist/{MLoadingIndicator-MGhvPkvl.js.map → MLoadingIndicator-DlYVoeWY.js.map} +1 -1
  12. package/dist/{MPdfViewer-C_LzSv6W.js → MPdfViewer-DJorNRkv.js} +5 -5
  13. package/dist/{MPdfViewer-C_LzSv6W.js.map → MPdfViewer-DJorNRkv.js.map} +1 -1
  14. package/dist/{MSeekBar-CFNWK7la.js → MSeekBar-DKHFGhpU.js} +2 -2
  15. package/dist/{MSeekBar-CFNWK7la.js.map → MSeekBar-DKHFGhpU.js.map} +1 -1
  16. package/dist/{MSegmentedButton-B4jBl8KM.js → MSegmentedButton-By8ki_DJ.js} +2 -2
  17. package/dist/{MSegmentedButton-B4jBl8KM.js.map → MSegmentedButton-By8ki_DJ.js.map} +1 -1
  18. package/dist/{MSignaturePad-CZFerYFU.js → MSignaturePad-CsaMzx-3.js} +2 -2
  19. package/dist/{MSignaturePad-CZFerYFU.js.map → MSignaturePad-CsaMzx-3.js.map} +1 -1
  20. package/dist/{MSlider-CKv427qo.js → MSlider-DCIgfpgW.js} +3 -3
  21. package/dist/{MSlider-CKv427qo.js.map → MSlider-DCIgfpgW.js.map} +1 -1
  22. package/dist/{MSpinner-CUpMz5C4.js → MSpinner-DTN8M5lT.js} +2 -2
  23. package/dist/{MSpinner-CUpMz5C4.js.map → MSpinner-DTN8M5lT.js.map} +1 -1
  24. package/dist/{MTextField-CjrgERTk.js → MTextField-Bz2v_3YK.js} +3 -3
  25. package/dist/{MTextField-CjrgERTk.js.map → MTextField-Bz2v_3YK.js.map} +1 -1
  26. package/dist/{_useFieldValidation-Cw8-UGjy.js → _useFieldValidation-DdWwciSz.js} +2 -2
  27. package/dist/{_useFieldValidation-Cw8-UGjy.js.map → _useFieldValidation-DdWwciSz.js.map} +1 -1
  28. package/dist/api.json +1 -1
  29. package/dist/code-editor.js +2 -2
  30. package/dist/components/MMenuBar.vue.d.ts +53 -0
  31. package/dist/components/MSpinWheel.vue.d.ts +18 -0
  32. package/dist/components/_MMenuBarItems.vue.d.ts +11 -0
  33. package/dist/composables/useLocale.d.ts +4 -0
  34. package/dist/draw.js +2 -2
  35. package/dist/flow.js +1 -1
  36. package/dist/gantt.js +2 -2
  37. package/dist/index.d.ts +2 -0
  38. package/dist/locales/index.js +18 -0
  39. package/dist/locales/index.js.map +1 -1
  40. package/dist/m3ui-vue.css +1 -1
  41. package/dist/m3ui.js +2915 -2654
  42. package/dist/m3ui.js.map +1 -1
  43. package/dist/map.js +6 -6
  44. package/dist/media.js +4 -4
  45. package/dist/pdf-sign.js +7 -7
  46. package/dist/pdf.js +1 -1
  47. package/dist/rich-text-editor.js +5 -5
  48. package/dist/styles.css +1 -1
  49. package/dist/{useLocale-DDY523xo.js → useLocale-2c8sWeq9.js} +3 -1
  50. package/dist/useLocale-2c8sWeq9.js.map +1 -0
  51. package/package.json +1 -1
  52. package/src/__tests__/MMenuBar.test.ts +82 -0
  53. package/src/__tests__/games.test.ts +33 -0
  54. package/src/components/MCoinFlip.vue +15 -1
  55. package/src/components/MMenuBar.vue +189 -0
  56. package/src/components/MSpinWheel.vue +201 -48
  57. package/src/components/_MMenuBarItems.vue +43 -0
  58. package/src/composables/useLocale.ts +6 -0
  59. package/src/index.ts +2 -0
  60. package/src/locales/ar.ts +2 -0
  61. package/src/locales/de.ts +2 -0
  62. package/src/locales/es.ts +2 -0
  63. package/src/locales/fr.ts +2 -0
  64. package/src/locales/ja.ts +2 -0
  65. package/src/locales/ko.ts +2 -0
  66. package/src/locales/pl.ts +2 -0
  67. package/src/locales/pt.ts +2 -0
  68. package/src/locales/zh.ts +2 -0
  69. package/dist/useLocale-DDY523xo.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MDialog-BByDHo7n.js","names":["$attrs","$slots","_openBlock","_createBlock","_Teleport","_Transition","_withCtx","_createElementBlock","_withModifiers","_createElementVNode","_mergeProps","_renderSlot","_Fragment","_createVNode","MIconButton","_unref","_normalizeClass","_createTextVNode","_toDisplayString","MIconButton_default","useLocale","useEscapeStack","_plugin_vue_export_helper_default","count","previous","lock","unlock","useScrollLock","held","set","on","active","watch","getCurrentInstance","onBeforeUnmount","FOCUSABLE","focusableIn","root","el","stack","listening","handlers","onKeydown","useFocusTrap","key","lastRoot","trapTab","container","items","current","e","first","last","focusInitial","target","options","start","nextTick","stop","i","back","now","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","MDialog_default","defineComponent","__emit","props","__props","locale","isCssValue","v","sizeClasses","computed","sizeStyle","emit","close","contentEl","ref","contentInnerEl","showDivider","resizeObserver","updateDividerVisibility","titleId","useId","surfaceEl","open","onUnmounted","openBlock","createBlock","Teleport","Transition","withCtx","createElementBlock","mergeProps","_ctx","renderSlot","createCommentVNode","unref","createElementVNode","createTextVNode","toDisplayString","withModifiers","Fragment","createVNode","normalizeClass"],"sources":["../src/composables/_useScrollLock.ts","../src/composables/_useFocusTrap.ts","../src/components/MDialog.vue"],"sourcesContent":["import { getCurrentInstance, onBeforeUnmount, watch, type WatchSource } from 'vue'\n\n/*\n * Internal (not exported from index.ts): locks the page's scroll (body overflow hidden) while a modal surface is\n * open, shared by every component that does it. Counted, so overlays stacked on each other (a select's modal or a\n * date picker inside an MDialog) release it only when the last one closes: each component used to write\n * `overflow = ''` on its own, so closing the inner one let the page under the outer one scroll again. Each\n * instance also releases what it holds when it unmounts (a dialog removed while open left the page locked for good)\n * and nothing when it holds nothing (a select unmounting inside an open dialog used to unlock it).\n */\n\nlet count = 0\nlet previous = ''\n\nfunction lock() {\n if (count++ === 0) {\n previous = document.body.style.overflow\n document.body.style.overflow = 'hidden'\n }\n}\n\nfunction unlock() {\n if (count > 0 && --count === 0) document.body.style.overflow = previous\n}\n\n/**\n * Locks the page's scroll while `active` is true (from the start too: a dialog mounted open locks it), and releases\n * it when it turns false or the component unmounts. Without `active`, drive it with the returned `set`.\n */\nexport function useScrollLock(active?: WatchSource<boolean>) {\n let held = false\n function set(on: boolean) {\n if (typeof document === 'undefined' || on === held) return\n held = on\n if (on) lock()\n else unlock()\n }\n if (active) watch(active, (on) => set(!!on), { immediate: true })\n if (getCurrentInstance()) onBeforeUnmount(() => set(false))\n return { set }\n}\n","import { getCurrentInstance, nextTick, onBeforeUnmount, watch } from 'vue'\n\n/*\n * Internal (not exported from index.ts): keyboard focus for modal surfaces (dialogs, modal sheets and drawers), as\n * the ARIA dialog pattern asks:\n * - on open, focus moves inside: to an element marked `autofocus` / `data-autofocus`, else the first focusable\n * one, else the surface itself (made focusable with tabindex -1);\n * - while open, Tab and Shift+Tab cycle inside it (only the top-most surface traps, so a select's modal or a\n * confirm opened from a dialog takes over and hands back);\n * - on close, focus returns to what had it before (the button that opened it), unless the user already moved it\n * somewhere else.\n */\n\nconst FOCUSABLE = [\n 'a[href]', 'area[href]', 'button:not([disabled])', 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])', 'textarea:not([disabled])', 'iframe', 'audio[controls]', 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])', '[tabindex]:not([tabindex=\"-1\"])',\n].join(',')\n\n/** The elements Tab reaches inside `root`, in order (skipping inert, hidden and disabled ones) */\nexport function focusableIn(root: HTMLElement): HTMLElement[] {\n return Array.from(root.querySelectorAll<HTMLElement>(FOCUSABLE)).filter(\n (el) => el.tabIndex >= 0 && !el.closest('[inert], [hidden]') && getComputedStyle(el).visibility !== 'hidden',\n )\n}\n\nconst stack: symbol[] = []\nlet listening = false\nconst handlers = new Map<symbol, (e: KeyboardEvent) => void>()\n\nfunction onKeydown(e: KeyboardEvent) {\n if (e.key !== 'Tab' || !stack.length) return\n handlers.get(stack[stack.length - 1]!)?.(e)\n}\n\nexport interface FocusTrapOptions {\n /** What gets focus on open, instead of the first autofocus / focusable element */\n initialFocus?: () => HTMLElement | null | undefined\n /** Return focus to the element that had it before opening (default true) */\n restoreFocus?: boolean\n}\n\n/**\n * Traps keyboard focus in `container()` while `active()` is true; see the file comment. `container` is read after\n * the DOM updates, so a surface rendered by the same `v-if` that `active` drives is already there.\n */\nexport function useFocusTrap(\n container: () => HTMLElement | null | undefined,\n active: () => boolean,\n options: FocusTrapOptions = {},\n) {\n const key = Symbol('focus-trap')\n let previous: HTMLElement | null = null\n let held = false\n // The surface as it was while open: on close its ref is already cleared while a leave animation still shows it\n let lastRoot: HTMLElement | null = null\n\n function trapTab(e: KeyboardEvent) {\n const root = container()\n if (root) lastRoot = root\n if (!root) return\n const items = focusableIn(root)\n const current = document.activeElement as HTMLElement | null\n if (!items.length) {\n e.preventDefault()\n root.focus()\n return\n }\n const first = items[0]!\n const last = items[items.length - 1]!\n if (!current || !root.contains(current)) {\n // Focus had escaped (a click on the scrim, a teleported popup that closed): bring it back\n e.preventDefault()\n ;(e.shiftKey ? last : first).focus()\n } else if (e.shiftKey && (current === first || current === root)) {\n e.preventDefault()\n last.focus()\n } else if (!e.shiftKey && current === last) {\n e.preventDefault()\n first.focus()\n }\n }\n\n function focusInitial() {\n const root = container()\n if (!root) return\n lastRoot = root\n // Something inside already took focus while mounting (an input focusing itself): leave it\n if (root.contains(document.activeElement)) return\n const target =\n options.initialFocus?.() ??\n root.querySelector<HTMLElement>('[autofocus], [data-autofocus]') ??\n focusableIn(root)[0]\n if (target) target.focus({ preventScroll: true })\n else {\n if (!root.hasAttribute('tabindex')) root.setAttribute('tabindex', '-1')\n root.focus({ preventScroll: true })\n }\n }\n\n function start() {\n if (held || typeof document === 'undefined') return\n held = true\n previous = document.activeElement as HTMLElement | null\n stack.push(key)\n handlers.set(key, trapTab)\n if (!listening) {\n document.addEventListener('keydown', onKeydown)\n listening = true\n }\n nextTick(focusInitial)\n }\n\n function stop() {\n if (!held) return\n held = false\n const i = stack.lastIndexOf(key)\n if (i >= 0) stack.splice(i, 1)\n handlers.delete(key)\n if (!stack.length && listening) {\n document.removeEventListener('keydown', onKeydown)\n listening = false\n }\n const back = previous\n previous = null\n if (options.restoreFocus === false || !back) return\n // Restore only when focus is still ours to give: inside the closing surface, or dropped on <body> because the\n // surface was removed. A click that closed it by landing on another control keeps that control focused.\n nextTick(() => {\n const now = document.activeElement\n const root = container() ?? lastRoot\n lastRoot = null\n const ours = !now || now === document.body || !now.isConnected || (root && root.contains(now))\n if (ours && back.isConnected) back.focus({ preventScroll: true })\n })\n }\n\n watch(() => !!active(), (on) => (on ? start() : stop()), { immediate: true, flush: 'post' })\n if (getCurrentInstance()) onBeforeUnmount(stop)\n\n return { focusFirst: focusInitial }\n}\n","<script setup lang=\"ts\">\n/**\n * The generic M3 modal shell — Escape, scroll lock, focus and Teleport are handled internally. Supports a centered\n * card, a full-screen variant, and an optional icon that centers the title per spec.\n *\n * Focus follows the ARIA dialog pattern: on open it moves to an element with `autofocus` (or `data-autofocus`), else\n * the first control that isn't the close button; Tab and Shift+Tab stay inside; closing returns focus to the\n * element that opened it.\n *\n * @slot icon M3 AlertDialog's optional icon (Secondary color, 24dp expected). Its presence also centers the\n * title, per spec.\n * @slot title Overrides the title prop with custom markup\n * @slot default Dialog body content — scrolls independently when taller than maxHeight. With `bare`, the whole\n * dialog: it fills the box (no title, padding, close button or actions row)\n * @slot actions Row of action buttons — wraps to a new line instead of overflowing when labels are long\n * @event update:modelValue Emitted when the dialog should open/close — powers v-model\n */\nimport { computed, nextTick, onUnmounted, ref, useId, watch } from 'vue'\nimport MIconButton from './MIconButton.vue'\nimport { useLocale } from '../composables/useLocale'\nimport { useScrollLock } from '../composables/_useScrollLock'\nimport { useEscapeStack } from '../composables/_useEscapeStack'\nimport { focusableIn, useFocusTrap } from '../composables/_useFocusTrap'\n\nconst props = withDefaults(\n defineProps<{\n /** Open/closed state (v-model) */\n modelValue: boolean\n /** Dialog title (overridable via the #title slot) */\n title?: string\n /** A Tailwind class (`max-w-sm`) or a CSS value (`420px`, `min(90vw, 40rem)`). */\n maxWidth?: string\n /**\n * Maximum height: a Tailwind class (`max-h-[60vh]`) or a CSS value (`480px`, `calc(100dvh - 4rem)`). When the\n * content is taller, the body scrolls and a divider appears above the actions.\n */\n // A Tailwind class (`max-h-[80vh]`) or a CSS value (`600px`). M3's `AlertDialogDefaults` has\n // no max-height token at all (only `DialogMaxWidth`) — the default here is a library-chosen\n // viewport-relative cap, not a spec value.\n maxHeight?: string\n /** Prevent closing by clicking the scrim, pressing Escape, or the X button */\n persistent?: boolean\n /** Full-screen variant — slides up from the bottom, covers the entire viewport */\n fullscreen?: boolean\n /** Aria label for the close (X) button — falls back to the locale string when omitted */\n closeLabel?: string\n /**\n * Show the header close (X) button — a library addition, not part of the M3 AlertDialog spec, so it can be\n * turned off\n */\n // Whether the header shows a close (\"X\") icon button. M3's `AlertDialog` spec has no such\n // button — it expects only a Cancel/Confirm text button in the actions row — so this is a\n // deliberate library extension on top of the spec, kept opt-out (default `true`, matching\n // this component's existing behavior) rather than added unconditionally.\n closable?: boolean\n /**\n * Just the dialog's box (surface, shape, elevation), scrim, Escape, scroll lock and animation, with the default\n * slot filling it: no title row, padding, close button or actions. For dialogs that draw everything themselves\n * (the date and time pickers). With `fullscreen`, the slot fills the screen and draws its own top bar. `title`\n * then only names it for assistive technology\n */\n bare?: boolean\n }>(),\n {\n // AlertDialogDefaults.DialogMaxWidth = 560dp\n maxWidth: 'max-w-[560px]',\n maxHeight: 'max-h-[90vh]',\n persistent: false,\n fullscreen: false,\n closable: true,\n bare: false,\n },\n)\n\n// The root is a Teleport, which can't take the consumer's class/style/attrs: they go on the dialog's surface\ndefineOptions({ inheritAttrs: false })\n\nconst locale = useLocale()\n\n// maxWidth/maxHeight take either a Tailwind class or a CSS value: a bare length or a CSS function\n// can't be a class, so those go to inline style instead.\nconst isCssValue = (v: string) => /^-?[\\d.]+[a-z%]*$|^(calc|min|max|clamp|var)\\(/i.test(v.trim())\nconst sizeClasses = computed(() => [props.maxWidth, props.maxHeight].filter((v) => !isCssValue(v)))\nconst sizeStyle = computed(() => ({\n ...(isCssValue(props.maxWidth) ? { maxWidth: props.maxWidth } : {}),\n ...(isCssValue(props.maxHeight) ? { maxHeight: props.maxHeight } : {}),\n}))\n\nconst emit = defineEmits<{ 'update:modelValue': [boolean] }>()\n\nfunction close() {\n if (props.persistent) return\n emit('update:modelValue', false)\n}\n\n\n// M3's dialog anatomy lists an optional divider between the (scrollable) content and the\n// actions row — Compose's own AlertDialog.kt has no built-in implementation of it at all, so\n// this shows it only when the content actually has more to scroll to, above the actions row.\nconst contentEl = ref<HTMLElement>()\nconst contentInnerEl = ref<HTMLElement>()\nconst showDivider = ref(false)\nlet resizeObserver: ResizeObserver | undefined\n\nfunction updateDividerVisibility() {\n const el = contentEl.value\n if (!el) { showDivider.value = false; return }\n showDivider.value = el.scrollHeight - el.scrollTop - el.clientHeight > 1\n}\n\nuseScrollLock(() => props.modelValue)\n// Escape closes the dialog on top only, when several are stacked\nuseEscapeStack(() => props.modelValue, close)\n\nconst titleId = `m3-dialog-${useId()}`\n\n// Focus moves into the dialog when it opens (an `autofocus` element, else the first control that isn't the close\n// button, else the close button, else the surface), Tab stays inside, and closing returns focus to the opener\nconst surfaceEl = ref<HTMLElement>()\nuseFocusTrap(() => surfaceEl.value, () => props.modelValue, {\n initialFocus: () => {\n const root = surfaceEl.value\n if (!root) return null\n return root.querySelector<HTMLElement>('[autofocus], [data-autofocus]') ?? focusableIn(root).find((el) => !el.closest('[data-dialog-close]'))\n },\n})\n\nwatch(\n () => props.modelValue,\n async (open) => {\n // Server rendering (a dialog open on load runs this immediately): nothing to measure or observe\n if (typeof window === 'undefined') return\n if (open) {\n await nextTick()\n updateDividerVisibility()\n // Observing contentEl alone only catches viewport-driven resizes (e.g. window resize\n // changing the maxHeight cap) — its own box stays put when the *slotted* content\n // changes height, since overflow doesn't affect the scroll container's own size. The\n // inner wrapper around the slot grows/shrinks with the actual content, so that's what\n // needs observing to catch dynamic content (reactive text, async-loaded content, etc).\n resizeObserver = new ResizeObserver(updateDividerVisibility)\n if (contentEl.value) resizeObserver.observe(contentEl.value)\n if (contentInnerEl.value) resizeObserver.observe(contentInnerEl.value)\n } else {\n resizeObserver?.disconnect()\n resizeObserver = undefined\n }\n },\n { immediate: true },\n)\n\nonUnmounted(() => {\n resizeObserver?.disconnect()\n})\n</script>\n\n<template>\n <Teleport to=\"body\">\n <!-- Basic dialog -->\n <!-- appear: a dialog mounted already open (v-if + modelValue in the same tick) animates in too -->\n <Transition v-if=\"!fullscreen\" name=\"m3-dialog\" appear>\n <div\n v-if=\"modelValue\"\n class=\"fixed inset-0 z-50 flex items-center justify-center bg-scrim/32 p-4\"\n @click.self=\"close\"\n >\n <div\n ref=\"surfaceEl\"\n v-bind=\"$attrs\"\n class=\"dialog-box m3-dialog-surface flex min-w-[280px] w-full flex-col\"\n :class=\"sizeClasses\"\n :style=\"sizeStyle\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-labelledby=\"!bare && ($slots.title || title) ? titleId : undefined\"\n :aria-label=\"bare ? title : undefined\"\n >\n <!-- Bare: the content is the whole dialog (scrolling if taller than maxHeight), clipped to the box's\n corners (rounded-[inherit]) so content reaching its edges, like a full-bleed image, keeps them -->\n <div v-if=\"bare\" class=\"min-h-0 overflow-y-auto rounded-[inherit]\">\n <slot />\n </div>\n <template v-else>\n <!--\n AlertDialogDefaults.dialogPadding is 24dp on all four sides of the whole content\n column, with per-element bottom paddings (IconPadding/TitlePadding/textPadding)\n providing the gaps BETWEEN elements — not a single wrapping padding, since this\n template uses separate divs per section instead of one padded Column. Each\n section's own top/bottom classes are chosen so the combined gaps still land on\n the right dp value: title-to-body is 16dp (8px here + 8px there), body-to-actions\n is 24dp (8px here + 16px there), and the outermost edges (top of title, bottom of\n whichever section is last) are the full 24dp on their own.\n -->\n <div class=\"relative px-6 pt-6 pb-2\">\n <!--\n Wrapped in a plain div rather than passing `absolute end-4 top-4` straight to\n MIconButton: its root already carries its own `relative` (for the ripple span),\n and Tailwind resolves conflicting position utilities by source order in the\n compiled CSS, not by order in the class attribute — so an external `absolute`\n can silently lose to that internal `relative` instead of overriding it.\n -->\n <div v-if=\"closable && !persistent\" class=\"absolute end-4 top-4\">\n <MIconButton icon=\"close\" :label=\"closeLabel ?? locale.close\" data-dialog-close @click=\"close\" />\n </div>\n <!--\n Icon slot: M3 AlertDialog's optional `icon` param (IconColor=Secondary,\n IconSize=24dp expected from the slot content, IconPadding bottom=16dp below it),\n which per spec also centers the title (\"Align the title to the center when an\n icon is present\") — reserving `pe-10` on the title only when the close button is\n also showing, so a centered title doesn't collide with it.\n -->\n <div v-if=\"$slots.icon\" class=\"mb-4 flex justify-center text-secondary\">\n <slot name=\"icon\" />\n </div>\n <h2\n :id=\"titleId\"\n class=\"text-headline-small text-on-surface\"\n :class=\"[\n $slots.icon ? 'text-center' : 'text-start',\n closable && !persistent ? ($slots.icon ? 'px-10' : 'pe-10') : '',\n ]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n </div>\n <div\n ref=\"contentEl\"\n class=\"overflow-y-auto px-6 pt-2 text-body-medium text-on-surface-variant\"\n :class=\"$slots.actions ? 'pb-2' : 'pb-6'\"\n @scroll=\"updateDividerVisibility\"\n >\n <div ref=\"contentInnerEl\">\n <slot />\n </div>\n </div>\n <!-- Divider: M3 dialog anatomy's optional divider, shown only while the content has more to scroll to -->\n <div v-if=\"showDivider && $slots.actions\" class=\"shrink-0 border-t border-outline-variant\" />\n <!-- flex-wrap approximates AlertDialogFlowRow: buttons wrap to a new line instead of overflowing when labels are too long to fit on one -->\n <div v-if=\"$slots.actions\" class=\"flex flex-wrap justify-end gap-2 px-6 pt-4 pb-6\">\n <slot name=\"actions\" />\n </div>\n </template>\n </div>\n </div>\n </Transition>\n\n <!-- Fullscreen dialog -->\n <Transition v-else name=\"m3-dialog-fs\" appear>\n <div\n v-if=\"modelValue\"\n ref=\"surfaceEl\"\n v-bind=\"$attrs\"\n class=\"dialog-fs m3-dialog-fs-surface fixed inset-0 z-50 flex flex-col\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-labelledby=\"!bare && ($slots.title || title) ? titleId : undefined\"\n :aria-label=\"bare ? title : undefined\"\n >\n <!-- Bare: the content is the whole screen, top bar included, in whatever colors it draws -->\n <div v-if=\"bare\" class=\"min-h-0 flex-1 overflow-y-auto\">\n <slot />\n </div>\n <div v-else class=\"flex h-14 shrink-0 items-center gap-2 px-2\">\n <MIconButton v-if=\"!persistent\" icon=\"close\" :label=\"closeLabel ?? locale.close\" data-dialog-close @click=\"close\" />\n <h2 :id=\"titleId\" class=\"flex-1 text-title-large font-medium text-on-surface\">\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n <div v-if=\"$slots.actions\" class=\"flex items-center gap-2\">\n <slot name=\"actions\" />\n </div>\n </div>\n <div v-if=\"!bare\" class=\"flex-1 overflow-y-auto px-6 py-4 text-body-medium text-on-surface-variant\">\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.m3-dialog-enter-active,\n.m3-dialog-leave-active {\n transition: opacity 0.15s ease;\n}\n.m3-dialog-enter-from,\n.m3-dialog-leave-to {\n opacity: 0;\n}\n.m3-dialog-enter-active .dialog-box,\n.m3-dialog-leave-active .dialog-box {\n transition: transform 0.15s ease;\n}\n.m3-dialog-enter-from .dialog-box,\n.m3-dialog-leave-to .dialog-box {\n transform: scale(0.95);\n}\n\n.m3-dialog-fs-enter-active,\n.m3-dialog-fs-leave-active {\n transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), opacity 0.15s ease;\n}\n.m3-dialog-fs-enter-from {\n transform: translateY(100%);\n opacity: 0;\n}\n.m3-dialog-fs-leave-to {\n transform: translateY(100%);\n opacity: 0;\n}\n</style>\n\n<style>\n/* The surfaces' look, in the base layer so the consumer's classes on MDialog win (see MShape) */\n@layer base {\n .m3-dialog-surface {\n background-color: var(--color-surface-container-high);\n border-radius: var(--radius-xl);\n box-shadow: var(--shadow-elevation-3);\n }\n .m3-dialog-fs-surface {\n background-color: var(--color-surface);\n }\n}\n</style>\n"],"mappings":";;;;;;AAWA,IAAIuB,IAAQ,GACRC,IAAW;AAEf,SAASC,IAAO;CACd,AAAI,QAAY,MACd,IAAW,SAAS,KAAK,MAAM,UAC/B,SAAS,KAAK,MAAM,WAAW;AAEnC;AAEA,SAASC,IAAS;CAChB,AAAIH,IAAQ,KAAK,EAAEA,MAAU,MAAG,SAAS,KAAK,MAAM,WAAWC;AACjE;AAMA,SAAgBG,EAAc,GAA+B;CAC3D,IAAIC,IAAO;CACX,SAASC,EAAI,GAAa;EACxB,AAAI,OAAO,WAAa,OAAeC,MAAOF,MAC9C,IAAOE,GACHA,IAAIL,EAAK,IACRC,EAAO;CACd;CAGA,OAFIK,KAAQC,EAAMD,IAAS,MAAOF,EAAI,CAAC,CAACC,CAAE,GAAG,EAAE,WAAW,GAAK,CAAC,GAC5DG,EAAmB,KAAGC,QAAsBL,EAAI,EAAK,CAAC,GACnD,EAAE,OAAI;AACf;;AC3BA,IAAMM,IA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AA,KAAA,GAAA,EAAA,C;KAEtBhG,EASK,MAAA;MARF,IAAIoF;MACL,OAAK7E,EAAA,CAAC,uCAAqC,CACff,EAAAA,OAAO,OAAI,gBAAA,cAAmD6E,EAAA,YAAQ,CAAKA,EAAA,aAAc7E,EAAAA,OAAO,OAAI,UAAA,UAAA,E;K,IAKhIU,EAAqC8F,EAAA,QAAA,SAAA,CAAA,SAAA,CAAfxF,EAAAC,EAAA4D,EAAA,KAAK,GAAA,CAAA,C;;IAG/BrE,EASM,OAAA;KARA,SAAA;KAAJ,KAAI8E;KACJ,OAAKvE,EAAA,CAAC,sEACEf,EAAAA,OAAO,UAAO,SAAA,MAAA,CAAA;KACrB,UAAQ2F;I,IAETnF,EAEM,OAAA;KAFG,SAAA;KAAJ,KAAIgF;I,IACP9E,EAAQ8F,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C;IAIDf,EAAA,SAAezF,EAAAA,OAAO,WAAjCC,EAAA,GAAAK,EAA6F,OAA7F4D,CAA6F,K;IAElFlE,EAAAA,OAAO,WAAlBC,EAAA,GAAAK,EAEM,OAFN6D,GAEM,CADJzD,EAAuB8F,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C"}
1
+ {"version":3,"file":"MDialog-DUh4Fyfb.js","names":["$attrs","$slots","_openBlock","_createBlock","_Teleport","_Transition","_withCtx","_createElementBlock","_withModifiers","_createElementVNode","_mergeProps","_renderSlot","_Fragment","_createVNode","MIconButton","_unref","_normalizeClass","_createTextVNode","_toDisplayString","MIconButton_default","useLocale","useEscapeStack","_plugin_vue_export_helper_default","count","previous","lock","unlock","useScrollLock","held","set","on","active","watch","getCurrentInstance","onBeforeUnmount","FOCUSABLE","focusableIn","root","el","stack","listening","handlers","onKeydown","useFocusTrap","key","lastRoot","trapTab","container","items","current","e","first","last","focusInitial","target","options","start","nextTick","stop","i","back","now","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","MDialog_default","defineComponent","__emit","props","__props","locale","isCssValue","v","sizeClasses","computed","sizeStyle","emit","close","contentEl","ref","contentInnerEl","showDivider","resizeObserver","updateDividerVisibility","titleId","useId","surfaceEl","open","onUnmounted","openBlock","createBlock","Teleport","Transition","withCtx","createElementBlock","mergeProps","_ctx","renderSlot","createCommentVNode","unref","createElementVNode","createTextVNode","toDisplayString","withModifiers","Fragment","createVNode","normalizeClass"],"sources":["../src/composables/_useScrollLock.ts","../src/composables/_useFocusTrap.ts","../src/components/MDialog.vue"],"sourcesContent":["import { getCurrentInstance, onBeforeUnmount, watch, type WatchSource } from 'vue'\n\n/*\n * Internal (not exported from index.ts): locks the page's scroll (body overflow hidden) while a modal surface is\n * open, shared by every component that does it. Counted, so overlays stacked on each other (a select's modal or a\n * date picker inside an MDialog) release it only when the last one closes: each component used to write\n * `overflow = ''` on its own, so closing the inner one let the page under the outer one scroll again. Each\n * instance also releases what it holds when it unmounts (a dialog removed while open left the page locked for good)\n * and nothing when it holds nothing (a select unmounting inside an open dialog used to unlock it).\n */\n\nlet count = 0\nlet previous = ''\n\nfunction lock() {\n if (count++ === 0) {\n previous = document.body.style.overflow\n document.body.style.overflow = 'hidden'\n }\n}\n\nfunction unlock() {\n if (count > 0 && --count === 0) document.body.style.overflow = previous\n}\n\n/**\n * Locks the page's scroll while `active` is true (from the start too: a dialog mounted open locks it), and releases\n * it when it turns false or the component unmounts. Without `active`, drive it with the returned `set`.\n */\nexport function useScrollLock(active?: WatchSource<boolean>) {\n let held = false\n function set(on: boolean) {\n if (typeof document === 'undefined' || on === held) return\n held = on\n if (on) lock()\n else unlock()\n }\n if (active) watch(active, (on) => set(!!on), { immediate: true })\n if (getCurrentInstance()) onBeforeUnmount(() => set(false))\n return { set }\n}\n","import { getCurrentInstance, nextTick, onBeforeUnmount, watch } from 'vue'\n\n/*\n * Internal (not exported from index.ts): keyboard focus for modal surfaces (dialogs, modal sheets and drawers), as\n * the ARIA dialog pattern asks:\n * - on open, focus moves inside: to an element marked `autofocus` / `data-autofocus`, else the first focusable\n * one, else the surface itself (made focusable with tabindex -1);\n * - while open, Tab and Shift+Tab cycle inside it (only the top-most surface traps, so a select's modal or a\n * confirm opened from a dialog takes over and hands back);\n * - on close, focus returns to what had it before (the button that opened it), unless the user already moved it\n * somewhere else.\n */\n\nconst FOCUSABLE = [\n 'a[href]', 'area[href]', 'button:not([disabled])', 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])', 'textarea:not([disabled])', 'iframe', 'audio[controls]', 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])', '[tabindex]:not([tabindex=\"-1\"])',\n].join(',')\n\n/** The elements Tab reaches inside `root`, in order (skipping inert, hidden and disabled ones) */\nexport function focusableIn(root: HTMLElement): HTMLElement[] {\n return Array.from(root.querySelectorAll<HTMLElement>(FOCUSABLE)).filter(\n (el) => el.tabIndex >= 0 && !el.closest('[inert], [hidden]') && getComputedStyle(el).visibility !== 'hidden',\n )\n}\n\nconst stack: symbol[] = []\nlet listening = false\nconst handlers = new Map<symbol, (e: KeyboardEvent) => void>()\n\nfunction onKeydown(e: KeyboardEvent) {\n if (e.key !== 'Tab' || !stack.length) return\n handlers.get(stack[stack.length - 1]!)?.(e)\n}\n\nexport interface FocusTrapOptions {\n /** What gets focus on open, instead of the first autofocus / focusable element */\n initialFocus?: () => HTMLElement | null | undefined\n /** Return focus to the element that had it before opening (default true) */\n restoreFocus?: boolean\n}\n\n/**\n * Traps keyboard focus in `container()` while `active()` is true; see the file comment. `container` is read after\n * the DOM updates, so a surface rendered by the same `v-if` that `active` drives is already there.\n */\nexport function useFocusTrap(\n container: () => HTMLElement | null | undefined,\n active: () => boolean,\n options: FocusTrapOptions = {},\n) {\n const key = Symbol('focus-trap')\n let previous: HTMLElement | null = null\n let held = false\n // The surface as it was while open: on close its ref is already cleared while a leave animation still shows it\n let lastRoot: HTMLElement | null = null\n\n function trapTab(e: KeyboardEvent) {\n const root = container()\n if (root) lastRoot = root\n if (!root) return\n const items = focusableIn(root)\n const current = document.activeElement as HTMLElement | null\n if (!items.length) {\n e.preventDefault()\n root.focus()\n return\n }\n const first = items[0]!\n const last = items[items.length - 1]!\n if (!current || !root.contains(current)) {\n // Focus had escaped (a click on the scrim, a teleported popup that closed): bring it back\n e.preventDefault()\n ;(e.shiftKey ? last : first).focus()\n } else if (e.shiftKey && (current === first || current === root)) {\n e.preventDefault()\n last.focus()\n } else if (!e.shiftKey && current === last) {\n e.preventDefault()\n first.focus()\n }\n }\n\n function focusInitial() {\n const root = container()\n if (!root) return\n lastRoot = root\n // Something inside already took focus while mounting (an input focusing itself): leave it\n if (root.contains(document.activeElement)) return\n const target =\n options.initialFocus?.() ??\n root.querySelector<HTMLElement>('[autofocus], [data-autofocus]') ??\n focusableIn(root)[0]\n if (target) target.focus({ preventScroll: true })\n else {\n if (!root.hasAttribute('tabindex')) root.setAttribute('tabindex', '-1')\n root.focus({ preventScroll: true })\n }\n }\n\n function start() {\n if (held || typeof document === 'undefined') return\n held = true\n previous = document.activeElement as HTMLElement | null\n stack.push(key)\n handlers.set(key, trapTab)\n if (!listening) {\n document.addEventListener('keydown', onKeydown)\n listening = true\n }\n nextTick(focusInitial)\n }\n\n function stop() {\n if (!held) return\n held = false\n const i = stack.lastIndexOf(key)\n if (i >= 0) stack.splice(i, 1)\n handlers.delete(key)\n if (!stack.length && listening) {\n document.removeEventListener('keydown', onKeydown)\n listening = false\n }\n const back = previous\n previous = null\n if (options.restoreFocus === false || !back) return\n // Restore only when focus is still ours to give: inside the closing surface, or dropped on <body> because the\n // surface was removed. A click that closed it by landing on another control keeps that control focused.\n nextTick(() => {\n const now = document.activeElement\n const root = container() ?? lastRoot\n lastRoot = null\n const ours = !now || now === document.body || !now.isConnected || (root && root.contains(now))\n if (ours && back.isConnected) back.focus({ preventScroll: true })\n })\n }\n\n watch(() => !!active(), (on) => (on ? start() : stop()), { immediate: true, flush: 'post' })\n if (getCurrentInstance()) onBeforeUnmount(stop)\n\n return { focusFirst: focusInitial }\n}\n","<script setup lang=\"ts\">\n/**\n * The generic M3 modal shell — Escape, scroll lock, focus and Teleport are handled internally. Supports a centered\n * card, a full-screen variant, and an optional icon that centers the title per spec.\n *\n * Focus follows the ARIA dialog pattern: on open it moves to an element with `autofocus` (or `data-autofocus`), else\n * the first control that isn't the close button; Tab and Shift+Tab stay inside; closing returns focus to the\n * element that opened it.\n *\n * @slot icon M3 AlertDialog's optional icon (Secondary color, 24dp expected). Its presence also centers the\n * title, per spec.\n * @slot title Overrides the title prop with custom markup\n * @slot default Dialog body content — scrolls independently when taller than maxHeight. With `bare`, the whole\n * dialog: it fills the box (no title, padding, close button or actions row)\n * @slot actions Row of action buttons — wraps to a new line instead of overflowing when labels are long\n * @event update:modelValue Emitted when the dialog should open/close — powers v-model\n */\nimport { computed, nextTick, onUnmounted, ref, useId, watch } from 'vue'\nimport MIconButton from './MIconButton.vue'\nimport { useLocale } from '../composables/useLocale'\nimport { useScrollLock } from '../composables/_useScrollLock'\nimport { useEscapeStack } from '../composables/_useEscapeStack'\nimport { focusableIn, useFocusTrap } from '../composables/_useFocusTrap'\n\nconst props = withDefaults(\n defineProps<{\n /** Open/closed state (v-model) */\n modelValue: boolean\n /** Dialog title (overridable via the #title slot) */\n title?: string\n /** A Tailwind class (`max-w-sm`) or a CSS value (`420px`, `min(90vw, 40rem)`). */\n maxWidth?: string\n /**\n * Maximum height: a Tailwind class (`max-h-[60vh]`) or a CSS value (`480px`, `calc(100dvh - 4rem)`). When the\n * content is taller, the body scrolls and a divider appears above the actions.\n */\n // A Tailwind class (`max-h-[80vh]`) or a CSS value (`600px`). M3's `AlertDialogDefaults` has\n // no max-height token at all (only `DialogMaxWidth`) — the default here is a library-chosen\n // viewport-relative cap, not a spec value.\n maxHeight?: string\n /** Prevent closing by clicking the scrim, pressing Escape, or the X button */\n persistent?: boolean\n /** Full-screen variant — slides up from the bottom, covers the entire viewport */\n fullscreen?: boolean\n /** Aria label for the close (X) button — falls back to the locale string when omitted */\n closeLabel?: string\n /**\n * Show the header close (X) button — a library addition, not part of the M3 AlertDialog spec, so it can be\n * turned off\n */\n // Whether the header shows a close (\"X\") icon button. M3's `AlertDialog` spec has no such\n // button — it expects only a Cancel/Confirm text button in the actions row — so this is a\n // deliberate library extension on top of the spec, kept opt-out (default `true`, matching\n // this component's existing behavior) rather than added unconditionally.\n closable?: boolean\n /**\n * Just the dialog's box (surface, shape, elevation), scrim, Escape, scroll lock and animation, with the default\n * slot filling it: no title row, padding, close button or actions. For dialogs that draw everything themselves\n * (the date and time pickers). With `fullscreen`, the slot fills the screen and draws its own top bar. `title`\n * then only names it for assistive technology\n */\n bare?: boolean\n }>(),\n {\n // AlertDialogDefaults.DialogMaxWidth = 560dp\n maxWidth: 'max-w-[560px]',\n maxHeight: 'max-h-[90vh]',\n persistent: false,\n fullscreen: false,\n closable: true,\n bare: false,\n },\n)\n\n// The root is a Teleport, which can't take the consumer's class/style/attrs: they go on the dialog's surface\ndefineOptions({ inheritAttrs: false })\n\nconst locale = useLocale()\n\n// maxWidth/maxHeight take either a Tailwind class or a CSS value: a bare length or a CSS function\n// can't be a class, so those go to inline style instead.\nconst isCssValue = (v: string) => /^-?[\\d.]+[a-z%]*$|^(calc|min|max|clamp|var)\\(/i.test(v.trim())\nconst sizeClasses = computed(() => [props.maxWidth, props.maxHeight].filter((v) => !isCssValue(v)))\nconst sizeStyle = computed(() => ({\n ...(isCssValue(props.maxWidth) ? { maxWidth: props.maxWidth } : {}),\n ...(isCssValue(props.maxHeight) ? { maxHeight: props.maxHeight } : {}),\n}))\n\nconst emit = defineEmits<{ 'update:modelValue': [boolean] }>()\n\nfunction close() {\n if (props.persistent) return\n emit('update:modelValue', false)\n}\n\n\n// M3's dialog anatomy lists an optional divider between the (scrollable) content and the\n// actions row — Compose's own AlertDialog.kt has no built-in implementation of it at all, so\n// this shows it only when the content actually has more to scroll to, above the actions row.\nconst contentEl = ref<HTMLElement>()\nconst contentInnerEl = ref<HTMLElement>()\nconst showDivider = ref(false)\nlet resizeObserver: ResizeObserver | undefined\n\nfunction updateDividerVisibility() {\n const el = contentEl.value\n if (!el) { showDivider.value = false; return }\n showDivider.value = el.scrollHeight - el.scrollTop - el.clientHeight > 1\n}\n\nuseScrollLock(() => props.modelValue)\n// Escape closes the dialog on top only, when several are stacked\nuseEscapeStack(() => props.modelValue, close)\n\nconst titleId = `m3-dialog-${useId()}`\n\n// Focus moves into the dialog when it opens (an `autofocus` element, else the first control that isn't the close\n// button, else the close button, else the surface), Tab stays inside, and closing returns focus to the opener\nconst surfaceEl = ref<HTMLElement>()\nuseFocusTrap(() => surfaceEl.value, () => props.modelValue, {\n initialFocus: () => {\n const root = surfaceEl.value\n if (!root) return null\n return root.querySelector<HTMLElement>('[autofocus], [data-autofocus]') ?? focusableIn(root).find((el) => !el.closest('[data-dialog-close]'))\n },\n})\n\nwatch(\n () => props.modelValue,\n async (open) => {\n // Server rendering (a dialog open on load runs this immediately): nothing to measure or observe\n if (typeof window === 'undefined') return\n if (open) {\n await nextTick()\n updateDividerVisibility()\n // Observing contentEl alone only catches viewport-driven resizes (e.g. window resize\n // changing the maxHeight cap) — its own box stays put when the *slotted* content\n // changes height, since overflow doesn't affect the scroll container's own size. The\n // inner wrapper around the slot grows/shrinks with the actual content, so that's what\n // needs observing to catch dynamic content (reactive text, async-loaded content, etc).\n resizeObserver = new ResizeObserver(updateDividerVisibility)\n if (contentEl.value) resizeObserver.observe(contentEl.value)\n if (contentInnerEl.value) resizeObserver.observe(contentInnerEl.value)\n } else {\n resizeObserver?.disconnect()\n resizeObserver = undefined\n }\n },\n { immediate: true },\n)\n\nonUnmounted(() => {\n resizeObserver?.disconnect()\n})\n</script>\n\n<template>\n <Teleport to=\"body\">\n <!-- Basic dialog -->\n <!-- appear: a dialog mounted already open (v-if + modelValue in the same tick) animates in too -->\n <Transition v-if=\"!fullscreen\" name=\"m3-dialog\" appear>\n <div\n v-if=\"modelValue\"\n class=\"fixed inset-0 z-50 flex items-center justify-center bg-scrim/32 p-4\"\n @click.self=\"close\"\n >\n <div\n ref=\"surfaceEl\"\n v-bind=\"$attrs\"\n class=\"dialog-box m3-dialog-surface flex min-w-[280px] w-full flex-col\"\n :class=\"sizeClasses\"\n :style=\"sizeStyle\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-labelledby=\"!bare && ($slots.title || title) ? titleId : undefined\"\n :aria-label=\"bare ? title : undefined\"\n >\n <!-- Bare: the content is the whole dialog (scrolling if taller than maxHeight), clipped to the box's\n corners (rounded-[inherit]) so content reaching its edges, like a full-bleed image, keeps them -->\n <div v-if=\"bare\" class=\"min-h-0 overflow-y-auto rounded-[inherit]\">\n <slot />\n </div>\n <template v-else>\n <!--\n AlertDialogDefaults.dialogPadding is 24dp on all four sides of the whole content\n column, with per-element bottom paddings (IconPadding/TitlePadding/textPadding)\n providing the gaps BETWEEN elements — not a single wrapping padding, since this\n template uses separate divs per section instead of one padded Column. Each\n section's own top/bottom classes are chosen so the combined gaps still land on\n the right dp value: title-to-body is 16dp (8px here + 8px there), body-to-actions\n is 24dp (8px here + 16px there), and the outermost edges (top of title, bottom of\n whichever section is last) are the full 24dp on their own.\n -->\n <div class=\"relative px-6 pt-6 pb-2\">\n <!--\n Wrapped in a plain div rather than passing `absolute end-4 top-4` straight to\n MIconButton: its root already carries its own `relative` (for the ripple span),\n and Tailwind resolves conflicting position utilities by source order in the\n compiled CSS, not by order in the class attribute — so an external `absolute`\n can silently lose to that internal `relative` instead of overriding it.\n -->\n <div v-if=\"closable && !persistent\" class=\"absolute end-4 top-4\">\n <MIconButton icon=\"close\" :label=\"closeLabel ?? locale.close\" data-dialog-close @click=\"close\" />\n </div>\n <!--\n Icon slot: M3 AlertDialog's optional `icon` param (IconColor=Secondary,\n IconSize=24dp expected from the slot content, IconPadding bottom=16dp below it),\n which per spec also centers the title (\"Align the title to the center when an\n icon is present\") — reserving `pe-10` on the title only when the close button is\n also showing, so a centered title doesn't collide with it.\n -->\n <div v-if=\"$slots.icon\" class=\"mb-4 flex justify-center text-secondary\">\n <slot name=\"icon\" />\n </div>\n <h2\n :id=\"titleId\"\n class=\"text-headline-small text-on-surface\"\n :class=\"[\n $slots.icon ? 'text-center' : 'text-start',\n closable && !persistent ? ($slots.icon ? 'px-10' : 'pe-10') : '',\n ]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n </div>\n <div\n ref=\"contentEl\"\n class=\"overflow-y-auto px-6 pt-2 text-body-medium text-on-surface-variant\"\n :class=\"$slots.actions ? 'pb-2' : 'pb-6'\"\n @scroll=\"updateDividerVisibility\"\n >\n <div ref=\"contentInnerEl\">\n <slot />\n </div>\n </div>\n <!-- Divider: M3 dialog anatomy's optional divider, shown only while the content has more to scroll to -->\n <div v-if=\"showDivider && $slots.actions\" class=\"shrink-0 border-t border-outline-variant\" />\n <!-- flex-wrap approximates AlertDialogFlowRow: buttons wrap to a new line instead of overflowing when labels are too long to fit on one -->\n <div v-if=\"$slots.actions\" class=\"flex flex-wrap justify-end gap-2 px-6 pt-4 pb-6\">\n <slot name=\"actions\" />\n </div>\n </template>\n </div>\n </div>\n </Transition>\n\n <!-- Fullscreen dialog -->\n <Transition v-else name=\"m3-dialog-fs\" appear>\n <div\n v-if=\"modelValue\"\n ref=\"surfaceEl\"\n v-bind=\"$attrs\"\n class=\"dialog-fs m3-dialog-fs-surface fixed inset-0 z-50 flex flex-col\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-labelledby=\"!bare && ($slots.title || title) ? titleId : undefined\"\n :aria-label=\"bare ? title : undefined\"\n >\n <!-- Bare: the content is the whole screen, top bar included, in whatever colors it draws -->\n <div v-if=\"bare\" class=\"min-h-0 flex-1 overflow-y-auto\">\n <slot />\n </div>\n <div v-else class=\"flex h-14 shrink-0 items-center gap-2 px-2\">\n <MIconButton v-if=\"!persistent\" icon=\"close\" :label=\"closeLabel ?? locale.close\" data-dialog-close @click=\"close\" />\n <h2 :id=\"titleId\" class=\"flex-1 text-title-large font-medium text-on-surface\">\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n <div v-if=\"$slots.actions\" class=\"flex items-center gap-2\">\n <slot name=\"actions\" />\n </div>\n </div>\n <div v-if=\"!bare\" class=\"flex-1 overflow-y-auto px-6 py-4 text-body-medium text-on-surface-variant\">\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.m3-dialog-enter-active,\n.m3-dialog-leave-active {\n transition: opacity 0.15s ease;\n}\n.m3-dialog-enter-from,\n.m3-dialog-leave-to {\n opacity: 0;\n}\n.m3-dialog-enter-active .dialog-box,\n.m3-dialog-leave-active .dialog-box {\n transition: transform 0.15s ease;\n}\n.m3-dialog-enter-from .dialog-box,\n.m3-dialog-leave-to .dialog-box {\n transform: scale(0.95);\n}\n\n.m3-dialog-fs-enter-active,\n.m3-dialog-fs-leave-active {\n transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), opacity 0.15s ease;\n}\n.m3-dialog-fs-enter-from {\n transform: translateY(100%);\n opacity: 0;\n}\n.m3-dialog-fs-leave-to {\n transform: translateY(100%);\n opacity: 0;\n}\n</style>\n\n<style>\n/* The surfaces' look, in the base layer so the consumer's classes on MDialog win (see MShape) */\n@layer base {\n .m3-dialog-surface {\n background-color: var(--color-surface-container-high);\n border-radius: var(--radius-xl);\n box-shadow: var(--shadow-elevation-3);\n }\n .m3-dialog-fs-surface {\n background-color: var(--color-surface);\n }\n}\n</style>\n"],"mappings":";;;;;;AAWA,IAAIuB,IAAQ,GACRC,IAAW;AAEf,SAASC,IAAO;CACd,AAAI,QAAY,MACd,IAAW,SAAS,KAAK,MAAM,UAC/B,SAAS,KAAK,MAAM,WAAW;AAEnC;AAEA,SAASC,IAAS;CAChB,AAAIH,IAAQ,KAAK,EAAEA,MAAU,MAAG,SAAS,KAAK,MAAM,WAAWC;AACjE;AAMA,SAAgBG,EAAc,GAA+B;CAC3D,IAAIC,IAAO;CACX,SAASC,E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,CAAKA,EAAA,cAAxB5E,EAAA,GAAAK,EAEM,OAFN0D,GAEM,CADJpD,EAAiGC,GAAA;MAApF,MAAK;MAAS,OAAOgE,EAAA,cAAc/D,EAAAgE,CAAA,CAAM,CAAC;MAAO,qBAAA;MAAmB,SAAOO;;KAS/ErF,EAAAA,OAAO,QAAlBC,EAAA,GAAAK,EAEM,OAFN2D,GAEM,CADJvD,EAAoB8F,EAAA,QAAA,QAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C;KAEtBhG,EASK,MAAA;MARF,IAAIoF;MACL,OAAK7E,EAAA,CAAC,uCAAqC,CACff,EAAAA,OAAO,OAAI,gBAAA,cAAmD6E,EAAA,YAAQ,CAAKA,EAAA,aAAc7E,EAAAA,OAAO,OAAI,UAAA,UAAA,E;K,IAKhIU,EAAqC8F,EAAA,QAAA,SAAA,CAAA,SAAA,CAAfxF,EAAAC,EAAA4D,EAAA,KAAK,GAAA,CAAA,C;;IAG/BrE,EASM,OAAA;KARA,SAAA;KAAJ,KAAI8E;KACJ,OAAKvE,EAAA,CAAC,sEACEf,EAAAA,OAAO,UAAO,SAAA,MAAA,CAAA;KACrB,UAAQ2F;I,IAETnF,EAEM,OAAA;KAFG,SAAA;KAAJ,KAAIgF;I,IACP9E,EAAQ8F,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C;IAIDf,EAAA,SAAezF,EAAAA,OAAO,WAAjCC,EAAA,GAAAK,EAA6F,OAA7F4D,CAA6F,K;IAElFlE,EAAAA,OAAO,WAAlBC,EAAA,GAAAK,EAEM,OAFN6D,GAEM,CADJzD,EAAuB8F,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C"}
@@ -1,8 +1,8 @@
1
1
  import { r as e, t } from "./MIcon-CkUc9kuQ.js";
2
- import { a as n } from "./useLocale-DDY523xo.js";
2
+ import { a as n } from "./useLocale-2c8sWeq9.js";
3
3
  import { a as r, i, p as a, s as o } from "./MIconButton-DTFOfsTy.js";
4
- import { s } from "./MTextField-CjrgERTk.js";
5
- import { n as c } from "./_useFieldValidation-Cw8-UGjy.js";
4
+ import { s } from "./MTextField-Bz2v_3YK.js";
5
+ import { n as c } from "./_useFieldValidation-DdWwciSz.js";
6
6
  import { Transition as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, getCurrentInstance as v, h as y, inject as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onBeforeUnmount as T, onMounted as E, onUnmounted as D, onUpdated as O, openBlock as k, provide as A, ref as j, renderSlot as M, resolveDynamicComponent as ee, shallowRef as N, toDisplayString as P, unref as F, useId as I, useSlots as L, watch as R, withCtx as z, withDirectives as B, withModifiers as V } from "vue";
7
7
  // src/composables/_useFollowAnchor.ts
8
8
  var H = /(auto|scroll|hidden|clip)/;
@@ -1303,4 +1303,4 @@ var ke = ["role", "aria-multiselectable"], Ae = 400, je = 8, Me = /* @__PURE__ *
1303
1303
  });
1304
1304
  export { _e as a, te as c, De as i, W as l, Me as n, fe as o, Oe as r, oe as s, Ge as t };
1305
1305
 
1306
- //# sourceMappingURL=MListItem-BpblBJbK.js.map
1306
+ //# sourceMappingURL=MListItem-Cjplh1_M.js.map