@m3ui-vue/m3ui-vue 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/API.md +2776 -351
- package/dist/MButton-CuNzpoxm.js +172 -0
- package/dist/MButton-CuNzpoxm.js.map +1 -0
- package/dist/MDialog-HxEL-m58.js +173 -0
- package/dist/MDialog-HxEL-m58.js.map +1 -0
- package/dist/MIconButton-DoNotQ9v.js +282 -0
- package/dist/MIconButton-DoNotQ9v.js.map +1 -0
- package/dist/MListItem-DnPtv-hY.js +824 -0
- package/dist/MListItem-DnPtv-hY.js.map +1 -0
- package/dist/MLoadingIndicator-BQMNX6Dx.js +115 -0
- package/dist/MLoadingIndicator-BQMNX6Dx.js.map +1 -0
- package/dist/MMenuItem-Bih0h4-n.js +604 -0
- package/dist/MMenuItem-Bih0h4-n.js.map +1 -0
- package/dist/MProgressBar-BCoruxA-.js +184 -0
- package/dist/MProgressBar-BCoruxA-.js.map +1 -0
- package/dist/MSeekBar-LURE1Ah7.js +435 -0
- package/dist/MSeekBar-LURE1Ah7.js.map +1 -0
- package/dist/MSegmentedButton-DL9JtJFX.js +65 -0
- package/dist/MSegmentedButton-DL9JtJFX.js.map +1 -0
- package/dist/MSlider-_J4IS2_z.js +691 -0
- package/dist/MSlider-_J4IS2_z.js.map +1 -0
- package/dist/MSpinner-BhkMYKOM.js +65 -0
- package/dist/MSpinner-BhkMYKOM.js.map +1 -0
- package/dist/MTextField-CkzwNBWS.js +296 -0
- package/dist/MTextField-CkzwNBWS.js.map +1 -0
- package/dist/MTooltip-B67ZDSGp.js +756 -0
- package/dist/MTooltip-B67ZDSGp.js.map +1 -0
- package/dist/_storageKeys-CYXsUBwK.js +18 -0
- package/dist/_storageKeys-CYXsUBwK.js.map +1 -0
- package/dist/_useEscapeStack-CjndQhqg.js +19 -0
- package/dist/_useEscapeStack-CjndQhqg.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/chart.js +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/components/MAudioPlayer.vue.d.ts +115 -0
- package/dist/components/MBadge.vue.d.ts +1 -1
- package/dist/components/MBottomSheetScaffold.vue.d.ts +1 -1
- package/dist/components/MBox.vue.d.ts +1 -1
- package/dist/components/MButton.vue.d.ts +1 -1
- package/dist/components/MConfirmDialog.vue.d.ts +1 -1
- package/dist/components/MCopyButton.vue.d.ts +2 -2
- package/dist/components/MDataTable.vue.d.ts +2 -2
- package/dist/components/MDialog.vue.d.ts +2 -2
- package/dist/components/MDivider.vue.d.ts +1 -1
- package/dist/components/MDragHandle.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +148 -0
- package/dist/components/MDrawLayers.vue.d.ts +3 -0
- package/dist/components/MDrawToolbar.vue.d.ts +34 -0
- package/dist/components/MExportButton.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +2 -2
- package/dist/components/MFabMenu.vue.d.ts +2 -2
- package/dist/components/MFixed.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +2 -2
- package/dist/components/MFloorPlan.vue.d.ts +160 -0
- package/dist/components/MFlow.vue.d.ts +305 -0
- package/dist/components/MFlowControls.vue.d.ts +33 -0
- package/dist/components/MFlowHandle.vue.d.ts +16 -0
- package/dist/components/MFlowMinimap.vue.d.ts +22 -0
- package/dist/components/MFlowNode.vue.d.ts +35 -0
- package/dist/components/MGantt.vue.d.ts +141 -0
- package/dist/components/MGanttControls.vue.d.ts +32 -0
- package/dist/components/MIconButton.vue.d.ts +3 -1
- package/dist/components/MImageCropper.vue.d.ts +110 -0
- package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
- package/dist/components/MLightbox.vue.d.ts +2 -2
- package/dist/components/MList.vue.d.ts +1 -1
- package/dist/components/MLoadingOverlay.vue.d.ts +1 -1
- package/dist/components/MMapControl.vue.d.ts +1 -1
- package/dist/components/MMapSearch.vue.d.ts +1 -1
- package/dist/components/MMaskField.vue.d.ts +12 -1
- package/dist/components/MMenu.vue.d.ts +1 -1
- package/dist/components/MNavigationDrawer.vue.d.ts +1 -1
- package/dist/components/MNumberField.vue.d.ts +11 -2
- package/dist/components/MPdfViewer.vue.d.ts +174 -0
- package/dist/components/MPullToRefresh.vue.d.ts +1 -1
- package/dist/components/MResourceTimeline.vue.d.ts +149 -0
- package/dist/components/MScheduler.vue.d.ts +3 -3
- package/dist/components/MScheme.vue.d.ts +1 -1
- package/dist/components/MSearchField.vue.d.ts +1 -1
- package/dist/components/MSeekBar.vue.d.ts +1 -1
- package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +1 -1
- package/dist/components/MSlider.vue.d.ts +2 -2
- package/dist/components/MSparkline.vue.d.ts +1 -1
- package/dist/components/MSplitter.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +2 -2
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTable.vue.d.ts +1 -1
- package/dist/components/MTagInput.vue.d.ts +12 -1
- package/dist/components/MTextField.vue.d.ts +13 -2
- package/dist/components/MToolbar.vue.d.ts +1 -1
- package/dist/components/MTree.vue.d.ts +2 -2
- package/dist/components/MVideoPlayer.vue.d.ts +253 -0
- package/dist/components/MVirtualTable.vue.d.ts +1 -1
- package/dist/components/MWindow.vue.d.ts +3 -3
- package/dist/components/_MFlowEdge.vue.d.ts +9 -0
- package/dist/components/_MFlowEdgeLabel.vue.d.ts +9 -0
- package/dist/components/_MFlowNodeShell.vue.d.ts +9 -0
- package/dist/components/_MPdfPage.vue.d.ts +76 -0
- package/dist/components/_MTimeBackground.vue.d.ts +14 -0
- package/dist/components/_MTimeHeader.vue.d.ts +20 -0
- package/dist/composables/_flowPanel.d.ts +2 -0
- package/dist/composables/_flowSlot.d.ts +5 -0
- package/dist/composables/_ganttTime.d.ts +41 -0
- package/dist/composables/_useTimeAxis.d.ts +90 -0
- package/dist/composables/drawGeometry.d.ts +119 -0
- package/dist/composables/flowFormats.d.ts +79 -0
- package/dist/composables/flowLayout.d.ts +45 -0
- package/dist/composables/flowPaths.d.ts +53 -0
- package/dist/composables/ganttFormats.d.ts +52 -0
- package/dist/composables/ganttSchedule.d.ts +99 -0
- package/dist/composables/useDrawing.d.ts +44 -0
- package/dist/composables/useFlow.d.ts +266 -0
- package/dist/composables/useGantt.d.ts +87 -0
- package/dist/composables/useLocale.d.ts +163 -0
- package/dist/composables/useMediaPlayer.d.ts +101 -0
- package/dist/composables/usePdf.d.ts +119 -0
- package/dist/composables/useResourceTimeline.d.ts +70 -0
- package/dist/draw.d.ts +7 -0
- package/dist/draw.js +1700 -0
- package/dist/draw.js.map +1 -0
- package/dist/flow.d.ts +14 -0
- package/dist/flow.js +3542 -0
- package/dist/flow.js.map +1 -0
- package/dist/flowPaths-CUc6X373.js +161 -0
- package/dist/flowPaths-CUc6X373.js.map +1 -0
- package/dist/gantt.d.ts +12 -0
- package/dist/gantt.js +3575 -0
- package/dist/gantt.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/locales/index.js +1148 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +7286 -7654
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +113 -108
- package/dist/map.js.map +1 -1
- package/dist/media.d.ts +5 -0
- package/dist/media.js +1311 -0
- package/dist/media.js.map +1 -0
- package/dist/pdf.d.ts +4 -0
- package/dist/pdf.js +1871 -0
- package/dist/pdf.js.map +1 -0
- package/dist/rich-text-editor.js +28 -26
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{useLocale-JYxDDeXC.js → useLocale-BpGxplLV.js} +165 -2
- package/dist/useLocale-BpGxplLV.js.map +1 -0
- package/dist/{useThemeTokens-y0HZpyhL.js → useThemeTokens-DQQcaWbE.js} +40 -54
- package/dist/useThemeTokens-DQQcaWbE.js.map +1 -0
- package/package.json +29 -5
- package/src/__tests__/MAudioPlayer.test.ts +75 -0
- package/src/__tests__/MDrawCanvas.test.ts +110 -0
- package/src/__tests__/MFloorPlan.test.ts +97 -0
- package/src/__tests__/MFlow.test.ts +575 -0
- package/src/__tests__/MGantt.test.ts +130 -0
- package/src/__tests__/MImageCropper.test.ts +89 -0
- package/src/__tests__/MPdfViewer.test.ts +235 -0
- package/src/__tests__/MResourceTimeline.test.ts +102 -0
- package/src/__tests__/MVideoPlayer.test.ts +201 -0
- package/src/__tests__/drawGeometry.test.ts +58 -0
- package/src/__tests__/fieldExpose.test.ts +30 -0
- package/src/__tests__/flowFormats.test.ts +185 -0
- package/src/__tests__/flowLayout.test.ts +113 -0
- package/src/__tests__/ganttFormats.test.ts +76 -0
- package/src/__tests__/ganttSchedule.test.ts +136 -0
- package/src/__tests__/pdfMock.ts +83 -0
- package/src/__tests__/useMediaPlayer.test.ts +182 -0
- package/src/__tests__/usePdf.test.ts +102 -0
- package/src/components/MAudioPlayer.vue +319 -0
- package/src/components/MDrawCanvas.vue +813 -0
- package/src/components/MDrawLayers.vue +114 -0
- package/src/components/MDrawToolbar.vue +171 -0
- package/src/components/MFloorPlan.vue +581 -0
- package/src/components/MFlow.vue +2049 -0
- package/src/components/MFlowControls.vue +110 -0
- package/src/components/MFlowHandle.vue +60 -0
- package/src/components/MFlowMinimap.vue +134 -0
- package/src/components/MFlowNode.vue +98 -0
- package/src/components/MGantt.vue +1609 -0
- package/src/components/MGanttControls.vue +77 -0
- package/src/components/MIconButton.vue +3 -1
- package/src/components/MImageCropper.vue +507 -0
- package/src/components/MMaskField.vue +13 -0
- package/src/components/MNumberField.vue +13 -0
- package/src/components/MPdfViewer.vue +1269 -0
- package/src/components/MResourceTimeline.vue +1020 -0
- package/src/components/MTagInput.vue +13 -0
- package/src/components/MTextField.vue +16 -0
- package/src/components/MVideoPlayer.vue +839 -0
- package/src/components/_MFlowEdge.vue +100 -0
- package/src/components/_MFlowEdgeLabel.vue +56 -0
- package/src/components/_MFlowNodeShell.vue +111 -0
- package/src/components/_MPdfPage.vue +456 -0
- package/src/components/_MTimeBackground.vue +16 -0
- package/src/components/_MTimeHeader.vue +31 -0
- package/src/composables/_flowPanel.ts +13 -0
- package/src/composables/_flowSlot.ts +6 -0
- package/src/composables/_ganttTime.ts +200 -0
- package/src/composables/_useTimeAxis.ts +224 -0
- package/src/composables/drawGeometry.ts +405 -0
- package/src/composables/flowFormats.ts +916 -0
- package/src/composables/flowLayout.ts +297 -0
- package/src/composables/flowPaths.ts +239 -0
- package/src/composables/ganttFormats.ts +366 -0
- package/src/composables/ganttSchedule.ts +403 -0
- package/src/composables/useDrawing.ts +53 -0
- package/src/composables/useFlow.ts +250 -0
- package/src/composables/useGantt.ts +92 -0
- package/src/composables/useLocale.ts +328 -0
- package/src/composables/useMediaPlayer.ts +406 -0
- package/src/composables/usePdf.ts +456 -0
- package/src/composables/useResourceTimeline.ts +76 -0
- package/src/draw.ts +25 -0
- package/src/flow.ts +26 -0
- package/src/gantt.ts +12 -0
- package/src/index.ts +4 -0
- package/src/locales/de.ts +163 -0
- package/src/locales/es.ts +163 -0
- package/src/locales/fr.ts +163 -0
- package/src/locales/ja.ts +163 -0
- package/src/locales/ko.ts +163 -0
- package/src/locales/pt.ts +163 -0
- package/src/locales/zh.ts +163 -0
- package/src/media.ts +5 -0
- package/src/pdf.ts +15 -0
- package/dist/MMenuItem-D4Gx_l3F.js +0 -929
- package/dist/MMenuItem-D4Gx_l3F.js.map +0 -1
- package/dist/MSlider-Dx_S3vJ9.js +0 -1506
- package/dist/MSlider-Dx_S3vJ9.js.map +0 -1
- package/dist/MTextField-Bz8JIsnl.js +0 -633
- package/dist/MTextField-Bz8JIsnl.js.map +0 -1
- package/dist/useLocale-JYxDDeXC.js.map +0 -1
- package/dist/useThemeTokens-y0HZpyhL.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MListItem-DnPtv-hY.js","names":["$slots","$slots","$attrs"],"sources":["../src/components/MAvatar.vue","../src/components/MAvatar.vue","../src/components/MCard.vue","../src/components/MCard.vue","../src/components/MCheckbox.vue","../src/components/MCheckbox.vue","../src/components/MChip.vue","../src/components/MChip.vue","../src/composables/_useSegmentRuns.ts","../src/components/MList.vue","../src/components/MList.vue","../src/components/MSwitch.vue","../src/components/MSwitch.vue","../src/components/MListItem.vue","../src/components/MListItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A circular initials avatar. There's no image-source prop — it always renders extracted initials or a fallback\n * string, never a photo.\n */\nimport { computed } from 'vue'\n\nconst props = withDefaults(defineProps<{\n /** Full name — initials are extracted automatically (first + last). Takes priority over fallback */\n name?: string\n /** Custom text shown when name is not provided (e.g. 'AJ'). Falls back to '?' if neither is set */\n fallback?: string\n /** Avatar size in px — also scales the font size proportionally (40%) */\n size?: number\n}>(), { size: 40 })\n\nconst initials = computed(() => {\n if (props.name) {\n const parts = props.name.trim().split(/\\s+/).filter(Boolean)\n const first = parts[0]?.[0] ?? ''\n const last = parts.length > 1 ? (parts[parts.length - 1]?.[0] ?? '') : ''\n return (first + last).toUpperCase() || props.fallback || '?'\n }\n return props.fallback || '?'\n})\n</script>\n\n<template>\n <div\n class=\"inline-flex shrink-0 items-center justify-center rounded-full bg-primary-container font-medium text-on-primary-container\"\n :style=\"{ width: `${size}px`, height: `${size}px`, fontSize: `${Math.round(size * 0.4)}px` }\"\n >\n {{ initials }}\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A circular initials avatar. There's no image-source prop — it always renders extracted initials or a fallback\n * string, never a photo.\n */\nimport { computed } from 'vue'\n\nconst props = withDefaults(defineProps<{\n /** Full name — initials are extracted automatically (first + last). Takes priority over fallback */\n name?: string\n /** Custom text shown when name is not provided (e.g. 'AJ'). Falls back to '?' if neither is set */\n fallback?: string\n /** Avatar size in px — also scales the font size proportionally (40%) */\n size?: number\n}>(), { size: 40 })\n\nconst initials = computed(() => {\n if (props.name) {\n const parts = props.name.trim().split(/\\s+/).filter(Boolean)\n const first = parts[0]?.[0] ?? ''\n const last = parts.length > 1 ? (parts[parts.length - 1]?.[0] ?? '') : ''\n return (first + last).toUpperCase() || props.fallback || '?'\n }\n return props.fallback || '?'\n})\n</script>\n\n<template>\n <div\n class=\"inline-flex shrink-0 items-center justify-center rounded-full bg-primary-container font-medium text-on-primary-container\"\n :style=\"{ width: `${size}px`, height: `${size}px`, fontSize: `${Math.round(size * 0.4)}px` }\"\n >\n {{ initials }}\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A flexible surface for grouping related content — three variants following the M3 elevation system, with\n * optional header image, structured title/subtitle, and action buttons.\n *\n * @slot media Custom media content (alternative to the image prop)\n * @slot header Custom header content (overrides title/subtitle props)\n * @slot default Main content area (raw, no wrapper)\n * @slot actions Bottom action buttons (flex row, right-aligned)\n */\nimport { computed } from 'vue'\n\nconst props = withDefaults(\n defineProps<{\n /** Card surface style */\n variant?: 'elevated' | 'filled' | 'outlined'\n /**\n * Makes the card an interactive element — hover/press elevation (varies by variant per M3), a focus\n * ring/border on keyboard focus, and reachable/activatable via Tab + Enter/Space, not just mouse\n */\n clickable?: boolean\n /**\n * Shortcut that forces the elevated variant regardless of variant — true is equivalent to\n * variant='elevated'\n */\n elevated?: boolean\n /**\n * Disabled visual state (own per-variant color, not just a dimmed one) and, when combined with clickable,\n * blocks interaction entirely\n */\n disabled?: boolean\n /** src URL for a full-bleed header image */\n image?: string\n /** Alt text for the header image */\n imageAlt?: string\n /** Tailwind height class for the image */\n imageHeight?: string\n /** Card title text */\n title?: string\n /** Supporting text below the title */\n subtitle?: string\n }>(),\n { variant: 'elevated', clickable: false, elevated: false, disabled: false },\n)\n\nconst resolvedVariant = computed(() => (props.elevated ? 'elevated' : props.variant))\n\n// Expose the card's background as --field-bg so outlined text-field labels\n// inside the card automatically match without needing the fieldBg prop.\nconst fieldBgByVariant: Record<string, string> = {\n elevated: 'var(--color-surface-container-low)',\n filled: 'var(--color-surface-container-highest)',\n outlined: 'var(--color-surface)',\n}\n\n/*\n * M3 Card{Filled,Elevated,Outlined}Tokens: all three variants share ContainerShape =\n * CornerMedium (12px), so a flat `rounded-md` on the wrapper (below) is correct for all of\n * them already — no per-variant shape difference. Container color/border IS mutually\n * exclusive between the disabled and enabled cases on purpose (a single computed picking\n * ONE class set, never both at once): two competing `bg-*`/`border-*` utilities for the\n * same CSS property risk losing to each other based on Tailwind's compiled-CSS source\n * order rather than which one appears later in this class list — bit us for real on\n * MIconButton's `relative`/`absolute` and would bite here too with `bg-surface-variant`\n * vs `bg-surface-container-highest` fighting over `background-color`.\n *\n * Disabled colors are real per-variant token overrides (elevated swaps to plain `surface`,\n * filled to `surface-variant`), not just a dimmed version of the resting color, all at 38%\n * container opacity EXCEPT outlined, which keeps its background as-is and only dims the\n * border — to a *different* color too (`outline` at 12%, not the resting `outline-variant`).\n * The opacity is applied via Tailwind's `/38` color-opacity modifier on the background\n * color itself (`bg-surface/38`), not a `opacity-*` utility on the whole element — the\n * real Compose Card only dims the container color, not its content/text, and a plain\n * `opacity-*` class would incorrectly wash out the card's text/icons along with it.\n */\nconst containerClasses = computed(() => {\n const map = props.disabled\n ? {\n elevated: 'bg-surface/38 shadow-none',\n filled: 'bg-surface-variant/38',\n outlined: 'bg-surface border border-outline/12',\n }\n : {\n elevated: 'bg-surface-container-low shadow-elevation-1',\n filled: 'bg-surface-container-highest',\n outlined: 'bg-surface border border-outline-variant',\n }\n return map[resolvedVariant.value]\n})\n\n/*\n * Hover/pressed elevation differ per variant — only `elevated` goes up to Level2 on hover\n * and stays at Level1 while pressed; `filled`/`outlined` only reach Level1 on hover and\n * drop back to flat (Level0/`shadow-none`) while pressed, they never match elevated's\n * pressed-but-still-elevated Level1. Focus indicator also differs: elevated/filled get a\n * `secondary` ring (FocusIndicatorColor) since they have no border to repurpose; outlined\n * instead darkens its own border to `on-surface` (FocusOutlineColor) rather than adding a\n * separate ring on top of the border it already has.\n */\nconst clickableClasses: Record<string, string> = {\n elevated: 'hover:shadow-elevation-2 active:shadow-elevation-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-secondary',\n filled: 'hover:shadow-elevation-1 active:shadow-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-secondary',\n outlined: 'hover:shadow-elevation-1 active:shadow-none focus-visible:outline-none focus-visible:border-on-surface',\n}\n\n// State layer (8% hover / 12% active), same before:-pseudo pattern as MButton/MFab.\n// Needed because the card has a real background to preserve underneath — unlike\n// MListItem, a plain hover:bg-on-surface/8 here would replace the card's own tone.\nconst stateLayerClasses =\n 'relative ' +\n \"before:content-[''] before:pointer-events-none before:absolute before:inset-0 \" +\n 'before:bg-on-surface before:opacity-0 before:transition-opacity before:duration-150 ' +\n 'hover:before:opacity-[0.08] active:before:opacity-[0.12]'\n\nconst isInteractive = computed(() => props.clickable && !props.disabled)\n\n// A plain div has no native :disabled/keyboard behavior — role=\"button\" + tabindex make it\n// reachable and identifiable, and Enter/Space here replicate a real button's activation\n// keys by just triggering a native click on the root, so whatever @click listener the\n// consumer attached (via plain attribute fallthrough, since MCard doesn't declare an emit\n// for this) fires exactly as it would for a mouse click, with no separate code path needed.\nfunction onKeydown(event: KeyboardEvent) {\n if (!isInteractive.value) return\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n ;(event.currentTarget as HTMLElement).click()\n }\n}\n</script>\n\n<template>\n <div\n class=\"overflow-hidden rounded-md transition-shadow duration-150\"\n :class=\"[\n containerClasses,\n isInteractive ? ['cursor-pointer', clickableClasses[resolvedVariant], stateLayerClasses] : '',\n disabled ? 'cursor-not-allowed pointer-events-none' : '',\n ]\"\n :style=\"{ '--field-bg': fieldBgByVariant[resolvedVariant] }\"\n :role=\"clickable ? 'button' : undefined\"\n :tabindex=\"isInteractive ? 0 : undefined\"\n :aria-disabled=\"clickable && disabled ? 'true' : undefined\"\n @keydown=\"onKeydown\"\n >\n <!-- Optional header image -->\n <div v-if=\"image || $slots.media\" :class=\"['w-full overflow-hidden', imageHeight ?? 'h-48']\">\n <img\n v-if=\"image\"\n :src=\"image\"\n :alt=\"imageAlt ?? ''\"\n class=\"h-full w-full object-cover\"\n />\n <slot v-else name=\"media\" />\n </div>\n\n <div v-if=\"$slots.header\" class=\"px-4 pt-4 pb-2\">\n <slot name=\"header\" />\n </div>\n <div v-else-if=\"title\" class=\"px-4 pt-4 pb-2\">\n <h3 class=\"text-title-large font-medium text-on-surface\">{{ title }}</h3>\n <p v-if=\"subtitle\" class=\"mt-1 text-body-medium text-on-surface-variant\">{{ subtitle }}</p>\n </div>\n\n <slot />\n\n <div v-if=\"$slots.actions\" class=\"flex justify-end gap-2 px-4 pt-2 pb-4\">\n <slot name=\"actions\" />\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A flexible surface for grouping related content — three variants following the M3 elevation system, with\n * optional header image, structured title/subtitle, and action buttons.\n *\n * @slot media Custom media content (alternative to the image prop)\n * @slot header Custom header content (overrides title/subtitle props)\n * @slot default Main content area (raw, no wrapper)\n * @slot actions Bottom action buttons (flex row, right-aligned)\n */\nimport { computed } from 'vue'\n\nconst props = withDefaults(\n defineProps<{\n /** Card surface style */\n variant?: 'elevated' | 'filled' | 'outlined'\n /**\n * Makes the card an interactive element — hover/press elevation (varies by variant per M3), a focus\n * ring/border on keyboard focus, and reachable/activatable via Tab + Enter/Space, not just mouse\n */\n clickable?: boolean\n /**\n * Shortcut that forces the elevated variant regardless of variant — true is equivalent to\n * variant='elevated'\n */\n elevated?: boolean\n /**\n * Disabled visual state (own per-variant color, not just a dimmed one) and, when combined with clickable,\n * blocks interaction entirely\n */\n disabled?: boolean\n /** src URL for a full-bleed header image */\n image?: string\n /** Alt text for the header image */\n imageAlt?: string\n /** Tailwind height class for the image */\n imageHeight?: string\n /** Card title text */\n title?: string\n /** Supporting text below the title */\n subtitle?: string\n }>(),\n { variant: 'elevated', clickable: false, elevated: false, disabled: false },\n)\n\nconst resolvedVariant = computed(() => (props.elevated ? 'elevated' : props.variant))\n\n// Expose the card's background as --field-bg so outlined text-field labels\n// inside the card automatically match without needing the fieldBg prop.\nconst fieldBgByVariant: Record<string, string> = {\n elevated: 'var(--color-surface-container-low)',\n filled: 'var(--color-surface-container-highest)',\n outlined: 'var(--color-surface)',\n}\n\n/*\n * M3 Card{Filled,Elevated,Outlined}Tokens: all three variants share ContainerShape =\n * CornerMedium (12px), so a flat `rounded-md` on the wrapper (below) is correct for all of\n * them already — no per-variant shape difference. Container color/border IS mutually\n * exclusive between the disabled and enabled cases on purpose (a single computed picking\n * ONE class set, never both at once): two competing `bg-*`/`border-*` utilities for the\n * same CSS property risk losing to each other based on Tailwind's compiled-CSS source\n * order rather than which one appears later in this class list — bit us for real on\n * MIconButton's `relative`/`absolute` and would bite here too with `bg-surface-variant`\n * vs `bg-surface-container-highest` fighting over `background-color`.\n *\n * Disabled colors are real per-variant token overrides (elevated swaps to plain `surface`,\n * filled to `surface-variant`), not just a dimmed version of the resting color, all at 38%\n * container opacity EXCEPT outlined, which keeps its background as-is and only dims the\n * border — to a *different* color too (`outline` at 12%, not the resting `outline-variant`).\n * The opacity is applied via Tailwind's `/38` color-opacity modifier on the background\n * color itself (`bg-surface/38`), not a `opacity-*` utility on the whole element — the\n * real Compose Card only dims the container color, not its content/text, and a plain\n * `opacity-*` class would incorrectly wash out the card's text/icons along with it.\n */\nconst containerClasses = computed(() => {\n const map = props.disabled\n ? {\n elevated: 'bg-surface/38 shadow-none',\n filled: 'bg-surface-variant/38',\n outlined: 'bg-surface border border-outline/12',\n }\n : {\n elevated: 'bg-surface-container-low shadow-elevation-1',\n filled: 'bg-surface-container-highest',\n outlined: 'bg-surface border border-outline-variant',\n }\n return map[resolvedVariant.value]\n})\n\n/*\n * Hover/pressed elevation differ per variant — only `elevated` goes up to Level2 on hover\n * and stays at Level1 while pressed; `filled`/`outlined` only reach Level1 on hover and\n * drop back to flat (Level0/`shadow-none`) while pressed, they never match elevated's\n * pressed-but-still-elevated Level1. Focus indicator also differs: elevated/filled get a\n * `secondary` ring (FocusIndicatorColor) since they have no border to repurpose; outlined\n * instead darkens its own border to `on-surface` (FocusOutlineColor) rather than adding a\n * separate ring on top of the border it already has.\n */\nconst clickableClasses: Record<string, string> = {\n elevated: 'hover:shadow-elevation-2 active:shadow-elevation-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-secondary',\n filled: 'hover:shadow-elevation-1 active:shadow-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-secondary',\n outlined: 'hover:shadow-elevation-1 active:shadow-none focus-visible:outline-none focus-visible:border-on-surface',\n}\n\n// State layer (8% hover / 12% active), same before:-pseudo pattern as MButton/MFab.\n// Needed because the card has a real background to preserve underneath — unlike\n// MListItem, a plain hover:bg-on-surface/8 here would replace the card's own tone.\nconst stateLayerClasses =\n 'relative ' +\n \"before:content-[''] before:pointer-events-none before:absolute before:inset-0 \" +\n 'before:bg-on-surface before:opacity-0 before:transition-opacity before:duration-150 ' +\n 'hover:before:opacity-[0.08] active:before:opacity-[0.12]'\n\nconst isInteractive = computed(() => props.clickable && !props.disabled)\n\n// A plain div has no native :disabled/keyboard behavior — role=\"button\" + tabindex make it\n// reachable and identifiable, and Enter/Space here replicate a real button's activation\n// keys by just triggering a native click on the root, so whatever @click listener the\n// consumer attached (via plain attribute fallthrough, since MCard doesn't declare an emit\n// for this) fires exactly as it would for a mouse click, with no separate code path needed.\nfunction onKeydown(event: KeyboardEvent) {\n if (!isInteractive.value) return\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n ;(event.currentTarget as HTMLElement).click()\n }\n}\n</script>\n\n<template>\n <div\n class=\"overflow-hidden rounded-md transition-shadow duration-150\"\n :class=\"[\n containerClasses,\n isInteractive ? ['cursor-pointer', clickableClasses[resolvedVariant], stateLayerClasses] : '',\n disabled ? 'cursor-not-allowed pointer-events-none' : '',\n ]\"\n :style=\"{ '--field-bg': fieldBgByVariant[resolvedVariant] }\"\n :role=\"clickable ? 'button' : undefined\"\n :tabindex=\"isInteractive ? 0 : undefined\"\n :aria-disabled=\"clickable && disabled ? 'true' : undefined\"\n @keydown=\"onKeydown\"\n >\n <!-- Optional header image -->\n <div v-if=\"image || $slots.media\" :class=\"['w-full overflow-hidden', imageHeight ?? 'h-48']\">\n <img\n v-if=\"image\"\n :src=\"image\"\n :alt=\"imageAlt ?? ''\"\n class=\"h-full w-full object-cover\"\n />\n <slot v-else name=\"media\" />\n </div>\n\n <div v-if=\"$slots.header\" class=\"px-4 pt-4 pb-2\">\n <slot name=\"header\" />\n </div>\n <div v-else-if=\"title\" class=\"px-4 pt-4 pb-2\">\n <h3 class=\"text-title-large font-medium text-on-surface\">{{ title }}</h3>\n <p v-if=\"subtitle\" class=\"mt-1 text-body-medium text-on-surface-variant\">{{ subtitle }}</p>\n </div>\n\n <slot />\n\n <div v-if=\"$slots.actions\" class=\"flex justify-end gap-2 px-4 pt-2 pb-4\">\n <slot name=\"actions\" />\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A checkbox with checked, indeterminate, and disabled states, and 4 semantic color options.\n *\n * @slot default Custom label content — overrides the label prop when provided\n * @event update:modelValue Emitted with the new checked state.\n */\nimport MIcon from \"./MIcon.vue\";\n\nwithDefaults(\n defineProps<{\n /** Checked state (v-model) */\n modelValue: boolean;\n /** Indeterminate state */\n indeterminate?: boolean;\n /** Disables the checkbox */\n disabled?: boolean;\n /** Label text — overridden by the default slot when present */\n label?: string;\n /** Checked/indeterminate color */\n color?: \"primary\" | \"secondary\" | \"tertiary\" | \"error\";\n /** Accessible name for the input when there's no visible label (e.g. a list row's checkbox). */\n ariaLabel?: string;\n }>(),\n { indeterminate: false, disabled: false, color: \"primary\" },\n);\n\nconst emit = defineEmits<{ \"update:modelValue\": [boolean] }>();\n\n// Same 4 named colors + fallback shape as MRadio's checkedColor map. M3's real\n// CheckboxTokens only define Primary (SelectedContainerColor) and Error (as an error\n// STATE, not a color variant) — secondary/tertiary are a deliberate library extension on\n// top of the spec, same status as MSlider's `color`/`icon` props.\nconst checkedClasses: Record<string, string> = {\n primary: \"border-primary bg-primary text-on-primary\",\n secondary: \"border-secondary bg-secondary text-on-secondary\",\n tertiary: \"border-tertiary bg-tertiary text-on-tertiary\",\n error: \"border-error bg-error text-on-error\",\n};\n\n// Just the fill color, reused for the hover/press state layer's tint below.\nconst checkedBgClasses: Record<string, string> = {\n primary: \"bg-primary\",\n secondary: \"bg-secondary\",\n tertiary: \"bg-tertiary\",\n error: \"bg-error\",\n};\n</script>\n\n<template>\n <label\n class=\"group inline-flex items-center gap-2 select-none\"\n :class=\"disabled ? 'cursor-not-allowed' : 'cursor-pointer'\"\n >\n <!--\n CheckboxTokens.StateLayerSize = 40dp (was 48px), StateLayerShape = CornerFull. The\n negative margin cancels the touch target's own overhang past the visible 18px box\n (40-18)/2 = 11px per side, so it doesn't push the label text over.\n -->\n <span class=\"relative -m-[11px] inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full\">\n <!--\n Input must stay nested INSIDE this `relative` span (a true sibling of the state-layer\n /focus-ring spans below, satisfying `peer-*`'s sibling-combinator requirement, but not\n hoisted all the way up to be a direct child of <label>): a sr-only, `position: absolute`\n input with no nearby positioned ancestor made the browser's native focus-scroll\n algorithm treat a distant `overflow: hidden` ancestor as the thing to scroll into view\n on click, which — since that ancestor wasn't meant to scroll at all — blew out to its\n max scrollTop and pushed the entire page off-screen. Real bug, found by testing in the\n docs site; MSwitch's input, nested the same way this one now is again, never had it.\n -->\n <input\n type=\"checkbox\"\n class=\"peer sr-only\"\n :checked=\"modelValue\"\n :disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n @change=\"emit('update:modelValue', !modelValue)\"\n />\n <!--\n Hover/press state layer (8%/12%), tinted with the checkbox's own indicator color\n (primary/color prop when checked, on-surface when not) — same `before:`-overlay\n spirit as MButton/MCard/MIconButton, just a real sibling span here since the parent\n span is already used for centering/sizing. `group-*` (not a plain `hover:`) so\n hovering anywhere over the row (including the label text) triggers it, not just\n the small 18px glyph itself.\n -->\n <span\n v-if=\"!disabled\"\n class=\"pointer-events-none absolute inset-0 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12]\"\n :class=\"modelValue || indeterminate ? checkedBgClasses[color] : 'bg-on-surface'\"\n />\n <!-- Keyboard-focus ring (FocusIndicatorColor = secondary) -->\n <span\n v-if=\"!disabled\"\n class=\"pointer-events-none absolute inset-0 rounded-full ring-0 ring-secondary transition-[box-shadow] duration-150 peer-focus-visible:ring-2\"\n />\n\n <span\n class=\"relative inline-flex h-4.5 w-4.5 items-center justify-center rounded-[2px] border-2 transition-colors\"\n :class=\"\n disabled\n ? (modelValue || indeterminate ? 'border-on-surface/38 bg-on-surface/38 text-surface' : 'border-on-surface/38 text-transparent')\n : (modelValue || indeterminate ? checkedClasses[color] : 'border-on-surface-variant text-transparent group-hover:border-on-surface group-active:border-on-surface')\n \"\n >\n <MIcon\n :name=\"indeterminate ? 'remove' : 'check'\"\n :size=\"18\"\n class=\"transition-[opacity,transform] duration-150\"\n :class=\"modelValue || indeterminate ? 'scale-100 opacity-100' : 'scale-0 opacity-0'\"\n />\n </span>\n </span>\n <span\n v-if=\"label || $slots.default\"\n class=\"text-body-large\"\n :class=\"disabled ? 'text-on-surface/38' : 'text-on-surface'\"\n >\n <slot>{{ label }}</slot>\n </span>\n </label>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A checkbox with checked, indeterminate, and disabled states, and 4 semantic color options.\n *\n * @slot default Custom label content — overrides the label prop when provided\n * @event update:modelValue Emitted with the new checked state.\n */\nimport MIcon from \"./MIcon.vue\";\n\nwithDefaults(\n defineProps<{\n /** Checked state (v-model) */\n modelValue: boolean;\n /** Indeterminate state */\n indeterminate?: boolean;\n /** Disables the checkbox */\n disabled?: boolean;\n /** Label text — overridden by the default slot when present */\n label?: string;\n /** Checked/indeterminate color */\n color?: \"primary\" | \"secondary\" | \"tertiary\" | \"error\";\n /** Accessible name for the input when there's no visible label (e.g. a list row's checkbox). */\n ariaLabel?: string;\n }>(),\n { indeterminate: false, disabled: false, color: \"primary\" },\n);\n\nconst emit = defineEmits<{ \"update:modelValue\": [boolean] }>();\n\n// Same 4 named colors + fallback shape as MRadio's checkedColor map. M3's real\n// CheckboxTokens only define Primary (SelectedContainerColor) and Error (as an error\n// STATE, not a color variant) — secondary/tertiary are a deliberate library extension on\n// top of the spec, same status as MSlider's `color`/`icon` props.\nconst checkedClasses: Record<string, string> = {\n primary: \"border-primary bg-primary text-on-primary\",\n secondary: \"border-secondary bg-secondary text-on-secondary\",\n tertiary: \"border-tertiary bg-tertiary text-on-tertiary\",\n error: \"border-error bg-error text-on-error\",\n};\n\n// Just the fill color, reused for the hover/press state layer's tint below.\nconst checkedBgClasses: Record<string, string> = {\n primary: \"bg-primary\",\n secondary: \"bg-secondary\",\n tertiary: \"bg-tertiary\",\n error: \"bg-error\",\n};\n</script>\n\n<template>\n <label\n class=\"group inline-flex items-center gap-2 select-none\"\n :class=\"disabled ? 'cursor-not-allowed' : 'cursor-pointer'\"\n >\n <!--\n CheckboxTokens.StateLayerSize = 40dp (was 48px), StateLayerShape = CornerFull. The\n negative margin cancels the touch target's own overhang past the visible 18px box\n (40-18)/2 = 11px per side, so it doesn't push the label text over.\n -->\n <span class=\"relative -m-[11px] inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full\">\n <!--\n Input must stay nested INSIDE this `relative` span (a true sibling of the state-layer\n /focus-ring spans below, satisfying `peer-*`'s sibling-combinator requirement, but not\n hoisted all the way up to be a direct child of <label>): a sr-only, `position: absolute`\n input with no nearby positioned ancestor made the browser's native focus-scroll\n algorithm treat a distant `overflow: hidden` ancestor as the thing to scroll into view\n on click, which — since that ancestor wasn't meant to scroll at all — blew out to its\n max scrollTop and pushed the entire page off-screen. Real bug, found by testing in the\n docs site; MSwitch's input, nested the same way this one now is again, never had it.\n -->\n <input\n type=\"checkbox\"\n class=\"peer sr-only\"\n :checked=\"modelValue\"\n :disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n @change=\"emit('update:modelValue', !modelValue)\"\n />\n <!--\n Hover/press state layer (8%/12%), tinted with the checkbox's own indicator color\n (primary/color prop when checked, on-surface when not) — same `before:`-overlay\n spirit as MButton/MCard/MIconButton, just a real sibling span here since the parent\n span is already used for centering/sizing. `group-*` (not a plain `hover:`) so\n hovering anywhere over the row (including the label text) triggers it, not just\n the small 18px glyph itself.\n -->\n <span\n v-if=\"!disabled\"\n class=\"pointer-events-none absolute inset-0 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12]\"\n :class=\"modelValue || indeterminate ? checkedBgClasses[color] : 'bg-on-surface'\"\n />\n <!-- Keyboard-focus ring (FocusIndicatorColor = secondary) -->\n <span\n v-if=\"!disabled\"\n class=\"pointer-events-none absolute inset-0 rounded-full ring-0 ring-secondary transition-[box-shadow] duration-150 peer-focus-visible:ring-2\"\n />\n\n <span\n class=\"relative inline-flex h-4.5 w-4.5 items-center justify-center rounded-[2px] border-2 transition-colors\"\n :class=\"\n disabled\n ? (modelValue || indeterminate ? 'border-on-surface/38 bg-on-surface/38 text-surface' : 'border-on-surface/38 text-transparent')\n : (modelValue || indeterminate ? checkedClasses[color] : 'border-on-surface-variant text-transparent group-hover:border-on-surface group-active:border-on-surface')\n \"\n >\n <MIcon\n :name=\"indeterminate ? 'remove' : 'check'\"\n :size=\"18\"\n class=\"transition-[opacity,transform] duration-150\"\n :class=\"modelValue || indeterminate ? 'scale-100 opacity-100' : 'scale-0 opacity-0'\"\n />\n </span>\n </span>\n <span\n v-if=\"label || $slots.default\"\n class=\"text-body-large\"\n :class=\"disabled ? 'text-on-surface/38' : 'text-on-surface'\"\n >\n <slot>{{ label }}</slot>\n </span>\n </label>\n</template>\n","<script setup lang=\"ts\">\n/**\n * Compact elements for filters, input, or actions — named semantic tones or any CSS color, with optional icon,\n * click, selection, and removal support. With `type` it's one of M3's four chips instead (assist, filter,\n * input, suggestion), styled by the spec and always interactive; `tone` then doesn't apply.\n *\n * @slot default The chip's label.\n * @slot avatar Input chips only: a 24px round avatar before the label (e.g. an MAvatar or an img)\n * @event click Emitted when a clickable (or typed), non-disabled chip is clicked\n * @event remove Emitted when the remove (X) button is clicked (removable only)\n * @event update:selected Filter and input chips: emitted on click with the new selected state — powers\n * v-model:selected\n */\nimport { computed, ref, useSlots } from 'vue'\nimport MIcon from './MIcon.vue'\nimport { useLocale } from '../composables/useLocale'\nimport { FAST_EFFECTS, FAST_SPATIAL, useSpring } from '../composables/_useSpring'\n\nconst NAMED_TONES = ['neutral', 'primary', 'success', 'error', 'tertiary', 'secondary'] as const\ntype NamedTone = (typeof NAMED_TONES)[number]\n\nconst props = withDefaults(\n defineProps<{\n /** Color tone or any CSS color string */\n tone?: string // named tone OR CSS color string\n /** Selected/active state — the chip's shape morphs from a rounded rect to a full pill when selected */\n selected?: boolean\n /** Show a remove (X) button */\n removable?: boolean\n /**\n * Makes the chip an interactive `<button>` with hover/press/focus feedback (otherwise renders as a plain\n * `<span>`)\n */\n clickable?: boolean\n /** Disables interaction */\n disabled?: boolean\n /** Leading Material Symbol icon */\n icon?: string\n /**\n * One of M3's chips: `assist` (an action), `filter` (on/off, v-model:selected; a check slides in while\n * selected), `input` (a piece of user input, with an optional #avatar and `removable`), `suggestion`.\n * Leave unset for the generic tone-colored chip\n */\n type?: 'assist' | 'filter' | 'input' | 'suggestion'\n /** Typed assist, filter and suggestion chips: surface-container-low with elevation 1 instead of an outline */\n elevated?: boolean\n /** Typed chips: a trailing Material Symbol icon (e.g. arrow_drop_down on a filter chip that opens a menu) */\n trailingIcon?: string\n }>(),\n {\n tone: 'neutral',\n selected: false,\n removable: false,\n clickable: false,\n disabled: false,\n elevated: false,\n },\n)\n\nconst emit = defineEmits<{ click: []; remove: []; 'update:selected': [boolean] }>()\nconst locale = useLocale()\nconst slots = useSlots()\n\nconst isCustomColor = computed(\n () => !!props.tone && !(NAMED_TONES as readonly string[]).includes(props.tone),\n)\n\n// When a CSS color is passed, apply it via CSS variables\nconst customStyle = computed(() => {\n if (!isCustomColor.value) return undefined\n return {\n '--chip-bg': props.tone + '22',\n '--chip-color': props.tone,\n }\n})\n\n// M3 disabled tokens: label/icon always at 38% on-surface. Container: neutral/unselected\n// chips are outline-only (no fill), so the outline fades to 10% (UnselectedDisabledOutlineOpacity);\n// every other tone/selected chip has a filled container, so the fill fades to 12%\n// (SelectedDisabledContainerOpacity) instead, with any border dropped.\nconst toneClasses = computed(() => {\n if (props.disabled) {\n if (props.tone === 'neutral' && !props.selected && !isCustomColor.value) {\n return 'border border-on-surface/10 bg-transparent text-on-surface/38'\n }\n return 'border border-transparent bg-on-surface/12 text-on-surface/38'\n }\n if (isCustomColor.value) {\n return 'border border-transparent bg-[var(--chip-bg)] text-[var(--chip-color)]'\n }\n if (props.tone === 'neutral' && !props.selected) {\n // ChipsTokens.UnselectedOutlineColor = OutlineVariant, not Outline\n return 'border border-outline-variant bg-transparent text-on-surface-variant'\n }\n const map: Record<string, string> = {\n neutral: 'border border-transparent bg-secondary-container text-on-secondary-container',\n primary: 'border border-transparent bg-primary-container text-on-primary-container',\n secondary: 'border border-transparent bg-secondary-container text-on-secondary-container',\n success: 'border border-transparent bg-success-container text-on-success-container',\n error: 'border border-transparent bg-error-container text-on-error-container',\n tertiary: 'border border-transparent bg-tertiary-container text-on-tertiary-container',\n }\n return map[props.tone ?? 'neutral'] ?? map.neutral\n})\n\n// ChipsTokens: UnselectedShape = CornerMedium (12dp), SelectedShape = CornerFull — a chip\n// becomes a full pill once selected, it doesn't keep the same small corner radius.\nconst shapeClass = computed(() => props.selected ? 'rounded-full' : 'rounded-md')\n\n// Hover/press state layer (8%/12%, ChipsTokens has no dedicated token but this matches the\n// universal M3 state-layer convention used everywhere else in this library) via the same\n// `before:`-overlay technique as MButton/MCard/MIconButton — a plain `hover:bg-*` would just\n// replace a filled/selected chip's own background outright instead of overlaying on top of\n// it. `ring-inset` on the focus ring (FocusedIndicatorColor = secondary) because `overflow-\n// hidden` on this same element (needed to clip the state-layer to the chip's shape) would\n// otherwise clip an outset ring's box-shadow too.\n// ── Typed chips (Compose's AssistChip / FilterChip / InputChip / SuggestionChip) ─────────────────────\n// 32dp, label-large, 18dp icons. Assist and suggestion keep CornerSmall (8dp); filter and input use the\n// Expressive ChipShapes (CornerMedium 12dp, CornerFull while selected, CornerSmall while pressed) and the\n// unified ChipsTokens colors.\nconst selectable = computed(() => props.type === 'filter' || props.type === 'input')\nconst hasAvatar = computed(() => props.type === 'input' && !!slots.avatar)\nconst hasTrailing = computed(() => !!props.trailingIcon || (props.type === 'input' && props.removable))\n\nconst typedContainer = computed(() => {\n const on = selectable.value && props.selected\n if (props.disabled) {\n if (on) return 'bg-on-surface/12 text-on-surface/38'\n return props.elevated && props.type !== 'input'\n ? 'bg-on-surface/12 text-on-surface/38'\n : 'border border-on-surface/12 text-on-surface/38'\n }\n if (on) return ['bg-secondary-container text-on-secondary-container', props.elevated ? 'shadow-elevation-1 hover:shadow-elevation-2' : '']\n const label = props.type === 'assist' ? 'text-on-surface' : 'text-on-surface-variant'\n return props.elevated && props.type !== 'input'\n ? ['bg-surface-container-low shadow-elevation-1 hover:shadow-elevation-2', label]\n : ['border border-outline-variant', label]\n})\n\nconst leadingIconClass = computed(() => {\n if (props.disabled) return ''\n if (props.type === 'assist' || props.type === 'suggestion') return 'text-primary'\n return props.selected ? 'text-on-secondary-container' : 'text-on-surface-variant'\n})\n\n// Compose's chip paddings: 8dp next to a leading/trailing icon, 16dp otherwise; an input chip 4dp next to an\n// avatar, 8dp next to an icon, 12dp (4 + the label's 8) otherwise\nconst typedPadding = computed(() => {\n if (props.type === 'input') {\n return [hasAvatar.value ? 'pl-1' : props.icon ? 'pl-2' : 'pl-3', hasTrailing.value ? 'pr-2' : 'pr-3']\n }\n // A filter chip's sliding check carries its own spacing (see checkEl), so its padding stays put\n return [props.icon || slidingCheck.value ? 'pl-2' : 'pl-4', hasTrailing.value ? 'pr-2' : 'pr-4']\n})\n\nconst pressed = ref(false)\nconst typedEl = ref<HTMLElement>()\nconst checkEl = ref<HTMLElement>()\n// Filter chip without its own icon: the check expands in (FastSpatial) and fades in (FastEffects) as it gets\n// selected, like Compose's animated chip content. Its slot runs from 8px (with the 8px padding: the label at\n// 16px, an iconless chip's padding) to 26px (the check at 8px, the label 8px after it).\nconst slidingCheck = computed(() => props.type === 'filter' && !props.icon)\nuseSpring(\n () => (props.type === 'filter' || props.type === 'input'\n ? [pressed.value ? 8 : props.selected ? 16 : 12, slidingCheck.value ? (props.selected ? 26 : 8) : 0]\n : []),\n ([radius, width]) => {\n if (typedEl.value && radius !== undefined) typedEl.value.style.borderRadius = `${radius}px`\n if (checkEl.value && width !== undefined) checkEl.value.style.width = `${width}px`\n },\n FAST_SPATIAL,\n)\nuseSpring(\n () => (slidingCheck.value ? [props.selected ? 1 : 0] : []),\n ([opacity]) => { if (checkEl.value && opacity !== undefined) checkEl.value.style.opacity = String(opacity) },\n FAST_EFFECTS,\n)\n\nfunction onTypedClick() {\n if (props.disabled) return\n if (selectable.value) emit('update:selected', !props.selected)\n emit('click')\n}\n\nconst interactiveClasses =\n \"relative cursor-pointer before:content-[''] before:pointer-events-none before:absolute before:inset-0 \" +\n 'before:bg-current before:opacity-0 before:transition-opacity before:duration-150 ' +\n 'hover:before:opacity-[0.08] active:before:opacity-[0.12] ' +\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary'\n</script>\n\n<template>\n <span\n v-if=\"type\"\n ref=\"typedEl\"\n class=\"relative inline-flex h-8 items-center overflow-hidden align-middle text-label-large transition-[background-color,box-shadow,color] has-[button:focus-visible]:ring-2 has-[button:focus-visible]:ring-inset has-[button:focus-visible]:ring-secondary\"\n :class=\"[typedContainer, type === 'assist' || type === 'suggestion' ? 'rounded-sm' : 'rounded-md']\"\n >\n <!-- Typed chip: the container is a span so an input chip's remove button can sit beside (not inside) the\n main button; the main button's state layer (before:) covers the whole chip -->\n <button\n type=\"button\"\n class=\"flex h-full items-center gap-2 outline-none before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity\"\n :class=\"[typedPadding, disabled ? 'cursor-not-allowed' : 'cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]']\"\n :disabled=\"disabled\"\n :aria-pressed=\"selectable ? selected : undefined\"\n @pointerdown=\"pressed = true\"\n @pointerup=\"pressed = false\"\n @pointerleave=\"pressed = false\"\n @pointercancel=\"pressed = false\"\n @click=\"onTypedClick\"\n >\n <span v-if=\"hasAvatar\" class=\"-my-1 flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full\" :class=\"disabled ? 'opacity-38' : ''\">\n <slot name=\"avatar\" />\n </span>\n <MIcon v-else-if=\"icon\" :name=\"icon\" :size=\"18\" :filled=\"type === 'filter' && selected\" class=\"shrink-0\" :class=\"leadingIconClass\" />\n <!-- -mr-2 cancels the gap while the check is closed -->\n <span v-else-if=\"slidingCheck\" ref=\"checkEl\" class=\"-mr-2 flex shrink-0 overflow-hidden\" style=\"width: 8px; opacity: 0\" aria-hidden=\"true\">\n <MIcon name=\"check\" :size=\"18\" class=\"shrink-0\" :class=\"leadingIconClass\" />\n </span>\n <span class=\"whitespace-nowrap\"><slot /></span>\n <MIcon v-if=\"trailingIcon\" :name=\"trailingIcon\" :size=\"18\" class=\"shrink-0\" :class=\"disabled ? '' : selected && selectable ? 'text-on-secondary-container' : 'text-on-surface-variant'\" />\n </button>\n <button\n v-if=\"type === 'input' && removable\"\n type=\"button\"\n class=\"relative -ml-1 mr-2 flex h-6 w-6 shrink-0 items-center justify-center rounded-full outline-none hover:bg-on-surface/8 focus-visible:ring-2 focus-visible:ring-secondary\"\n :class=\"disabled ? 'cursor-not-allowed' : 'cursor-pointer'\"\n :aria-label=\"locale.remove\"\n :disabled=\"disabled\"\n @click.stop=\"emit('remove')\"\n >\n <MIcon name=\"close\" :size=\"18\" />\n </button>\n </span>\n\n <component\n :is=\"clickable ? 'button' : 'span'\"\n v-else\n :type=\"clickable ? 'button' : undefined\"\n :disabled=\"clickable && disabled ? true : undefined\"\n class=\"inline-flex h-8 items-center gap-1.5 overflow-hidden px-3 text-label-large transition-colors\"\n :class=\"[\n shapeClass,\n toneClasses,\n clickable && !disabled ? interactiveClasses : '',\n disabled ? 'cursor-not-allowed' : '',\n ]\"\n :style=\"customStyle\"\n @click=\"clickable && !disabled && emit('click')\"\n >\n <MIcon v-if=\"icon\" :name=\"icon\" :size=\"18\" />\n <slot />\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"-mr-1 ml-0.5 inline-flex items-center justify-center rounded-full hover:bg-on-surface/12\"\n :aria-label=\"locale.remove\"\n :disabled=\"disabled\"\n @click.stop=\"emit('remove')\"\n >\n <MIcon name=\"close\" :size=\"16\" />\n </button>\n </component>\n</template>\n","<script setup lang=\"ts\">\n/**\n * Compact elements for filters, input, or actions — named semantic tones or any CSS color, with optional icon,\n * click, selection, and removal support. With `type` it's one of M3's four chips instead (assist, filter,\n * input, suggestion), styled by the spec and always interactive; `tone` then doesn't apply.\n *\n * @slot default The chip's label.\n * @slot avatar Input chips only: a 24px round avatar before the label (e.g. an MAvatar or an img)\n * @event click Emitted when a clickable (or typed), non-disabled chip is clicked\n * @event remove Emitted when the remove (X) button is clicked (removable only)\n * @event update:selected Filter and input chips: emitted on click with the new selected state — powers\n * v-model:selected\n */\nimport { computed, ref, useSlots } from 'vue'\nimport MIcon from './MIcon.vue'\nimport { useLocale } from '../composables/useLocale'\nimport { FAST_EFFECTS, FAST_SPATIAL, useSpring } from '../composables/_useSpring'\n\nconst NAMED_TONES = ['neutral', 'primary', 'success', 'error', 'tertiary', 'secondary'] as const\ntype NamedTone = (typeof NAMED_TONES)[number]\n\nconst props = withDefaults(\n defineProps<{\n /** Color tone or any CSS color string */\n tone?: string // named tone OR CSS color string\n /** Selected/active state — the chip's shape morphs from a rounded rect to a full pill when selected */\n selected?: boolean\n /** Show a remove (X) button */\n removable?: boolean\n /**\n * Makes the chip an interactive `<button>` with hover/press/focus feedback (otherwise renders as a plain\n * `<span>`)\n */\n clickable?: boolean\n /** Disables interaction */\n disabled?: boolean\n /** Leading Material Symbol icon */\n icon?: string\n /**\n * One of M3's chips: `assist` (an action), `filter` (on/off, v-model:selected; a check slides in while\n * selected), `input` (a piece of user input, with an optional #avatar and `removable`), `suggestion`.\n * Leave unset for the generic tone-colored chip\n */\n type?: 'assist' | 'filter' | 'input' | 'suggestion'\n /** Typed assist, filter and suggestion chips: surface-container-low with elevation 1 instead of an outline */\n elevated?: boolean\n /** Typed chips: a trailing Material Symbol icon (e.g. arrow_drop_down on a filter chip that opens a menu) */\n trailingIcon?: string\n }>(),\n {\n tone: 'neutral',\n selected: false,\n removable: false,\n clickable: false,\n disabled: false,\n elevated: false,\n },\n)\n\nconst emit = defineEmits<{ click: []; remove: []; 'update:selected': [boolean] }>()\nconst locale = useLocale()\nconst slots = useSlots()\n\nconst isCustomColor = computed(\n () => !!props.tone && !(NAMED_TONES as readonly string[]).includes(props.tone),\n)\n\n// When a CSS color is passed, apply it via CSS variables\nconst customStyle = computed(() => {\n if (!isCustomColor.value) return undefined\n return {\n '--chip-bg': props.tone + '22',\n '--chip-color': props.tone,\n }\n})\n\n// M3 disabled tokens: label/icon always at 38% on-surface. Container: neutral/unselected\n// chips are outline-only (no fill), so the outline fades to 10% (UnselectedDisabledOutlineOpacity);\n// every other tone/selected chip has a filled container, so the fill fades to 12%\n// (SelectedDisabledContainerOpacity) instead, with any border dropped.\nconst toneClasses = computed(() => {\n if (props.disabled) {\n if (props.tone === 'neutral' && !props.selected && !isCustomColor.value) {\n return 'border border-on-surface/10 bg-transparent text-on-surface/38'\n }\n return 'border border-transparent bg-on-surface/12 text-on-surface/38'\n }\n if (isCustomColor.value) {\n return 'border border-transparent bg-[var(--chip-bg)] text-[var(--chip-color)]'\n }\n if (props.tone === 'neutral' && !props.selected) {\n // ChipsTokens.UnselectedOutlineColor = OutlineVariant, not Outline\n return 'border border-outline-variant bg-transparent text-on-surface-variant'\n }\n const map: Record<string, string> = {\n neutral: 'border border-transparent bg-secondary-container text-on-secondary-container',\n primary: 'border border-transparent bg-primary-container text-on-primary-container',\n secondary: 'border border-transparent bg-secondary-container text-on-secondary-container',\n success: 'border border-transparent bg-success-container text-on-success-container',\n error: 'border border-transparent bg-error-container text-on-error-container',\n tertiary: 'border border-transparent bg-tertiary-container text-on-tertiary-container',\n }\n return map[props.tone ?? 'neutral'] ?? map.neutral\n})\n\n// ChipsTokens: UnselectedShape = CornerMedium (12dp), SelectedShape = CornerFull — a chip\n// becomes a full pill once selected, it doesn't keep the same small corner radius.\nconst shapeClass = computed(() => props.selected ? 'rounded-full' : 'rounded-md')\n\n// Hover/press state layer (8%/12%, ChipsTokens has no dedicated token but this matches the\n// universal M3 state-layer convention used everywhere else in this library) via the same\n// `before:`-overlay technique as MButton/MCard/MIconButton — a plain `hover:bg-*` would just\n// replace a filled/selected chip's own background outright instead of overlaying on top of\n// it. `ring-inset` on the focus ring (FocusedIndicatorColor = secondary) because `overflow-\n// hidden` on this same element (needed to clip the state-layer to the chip's shape) would\n// otherwise clip an outset ring's box-shadow too.\n// ── Typed chips (Compose's AssistChip / FilterChip / InputChip / SuggestionChip) ─────────────────────\n// 32dp, label-large, 18dp icons. Assist and suggestion keep CornerSmall (8dp); filter and input use the\n// Expressive ChipShapes (CornerMedium 12dp, CornerFull while selected, CornerSmall while pressed) and the\n// unified ChipsTokens colors.\nconst selectable = computed(() => props.type === 'filter' || props.type === 'input')\nconst hasAvatar = computed(() => props.type === 'input' && !!slots.avatar)\nconst hasTrailing = computed(() => !!props.trailingIcon || (props.type === 'input' && props.removable))\n\nconst typedContainer = computed(() => {\n const on = selectable.value && props.selected\n if (props.disabled) {\n if (on) return 'bg-on-surface/12 text-on-surface/38'\n return props.elevated && props.type !== 'input'\n ? 'bg-on-surface/12 text-on-surface/38'\n : 'border border-on-surface/12 text-on-surface/38'\n }\n if (on) return ['bg-secondary-container text-on-secondary-container', props.elevated ? 'shadow-elevation-1 hover:shadow-elevation-2' : '']\n const label = props.type === 'assist' ? 'text-on-surface' : 'text-on-surface-variant'\n return props.elevated && props.type !== 'input'\n ? ['bg-surface-container-low shadow-elevation-1 hover:shadow-elevation-2', label]\n : ['border border-outline-variant', label]\n})\n\nconst leadingIconClass = computed(() => {\n if (props.disabled) return ''\n if (props.type === 'assist' || props.type === 'suggestion') return 'text-primary'\n return props.selected ? 'text-on-secondary-container' : 'text-on-surface-variant'\n})\n\n// Compose's chip paddings: 8dp next to a leading/trailing icon, 16dp otherwise; an input chip 4dp next to an\n// avatar, 8dp next to an icon, 12dp (4 + the label's 8) otherwise\nconst typedPadding = computed(() => {\n if (props.type === 'input') {\n return [hasAvatar.value ? 'pl-1' : props.icon ? 'pl-2' : 'pl-3', hasTrailing.value ? 'pr-2' : 'pr-3']\n }\n // A filter chip's sliding check carries its own spacing (see checkEl), so its padding stays put\n return [props.icon || slidingCheck.value ? 'pl-2' : 'pl-4', hasTrailing.value ? 'pr-2' : 'pr-4']\n})\n\nconst pressed = ref(false)\nconst typedEl = ref<HTMLElement>()\nconst checkEl = ref<HTMLElement>()\n// Filter chip without its own icon: the check expands in (FastSpatial) and fades in (FastEffects) as it gets\n// selected, like Compose's animated chip content. Its slot runs from 8px (with the 8px padding: the label at\n// 16px, an iconless chip's padding) to 26px (the check at 8px, the label 8px after it).\nconst slidingCheck = computed(() => props.type === 'filter' && !props.icon)\nuseSpring(\n () => (props.type === 'filter' || props.type === 'input'\n ? [pressed.value ? 8 : props.selected ? 16 : 12, slidingCheck.value ? (props.selected ? 26 : 8) : 0]\n : []),\n ([radius, width]) => {\n if (typedEl.value && radius !== undefined) typedEl.value.style.borderRadius = `${radius}px`\n if (checkEl.value && width !== undefined) checkEl.value.style.width = `${width}px`\n },\n FAST_SPATIAL,\n)\nuseSpring(\n () => (slidingCheck.value ? [props.selected ? 1 : 0] : []),\n ([opacity]) => { if (checkEl.value && opacity !== undefined) checkEl.value.style.opacity = String(opacity) },\n FAST_EFFECTS,\n)\n\nfunction onTypedClick() {\n if (props.disabled) return\n if (selectable.value) emit('update:selected', !props.selected)\n emit('click')\n}\n\nconst interactiveClasses =\n \"relative cursor-pointer before:content-[''] before:pointer-events-none before:absolute before:inset-0 \" +\n 'before:bg-current before:opacity-0 before:transition-opacity before:duration-150 ' +\n 'hover:before:opacity-[0.08] active:before:opacity-[0.12] ' +\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary'\n</script>\n\n<template>\n <span\n v-if=\"type\"\n ref=\"typedEl\"\n class=\"relative inline-flex h-8 items-center overflow-hidden align-middle text-label-large transition-[background-color,box-shadow,color] has-[button:focus-visible]:ring-2 has-[button:focus-visible]:ring-inset has-[button:focus-visible]:ring-secondary\"\n :class=\"[typedContainer, type === 'assist' || type === 'suggestion' ? 'rounded-sm' : 'rounded-md']\"\n >\n <!-- Typed chip: the container is a span so an input chip's remove button can sit beside (not inside) the\n main button; the main button's state layer (before:) covers the whole chip -->\n <button\n type=\"button\"\n class=\"flex h-full items-center gap-2 outline-none before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity\"\n :class=\"[typedPadding, disabled ? 'cursor-not-allowed' : 'cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]']\"\n :disabled=\"disabled\"\n :aria-pressed=\"selectable ? selected : undefined\"\n @pointerdown=\"pressed = true\"\n @pointerup=\"pressed = false\"\n @pointerleave=\"pressed = false\"\n @pointercancel=\"pressed = false\"\n @click=\"onTypedClick\"\n >\n <span v-if=\"hasAvatar\" class=\"-my-1 flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full\" :class=\"disabled ? 'opacity-38' : ''\">\n <slot name=\"avatar\" />\n </span>\n <MIcon v-else-if=\"icon\" :name=\"icon\" :size=\"18\" :filled=\"type === 'filter' && selected\" class=\"shrink-0\" :class=\"leadingIconClass\" />\n <!-- -mr-2 cancels the gap while the check is closed -->\n <span v-else-if=\"slidingCheck\" ref=\"checkEl\" class=\"-mr-2 flex shrink-0 overflow-hidden\" style=\"width: 8px; opacity: 0\" aria-hidden=\"true\">\n <MIcon name=\"check\" :size=\"18\" class=\"shrink-0\" :class=\"leadingIconClass\" />\n </span>\n <span class=\"whitespace-nowrap\"><slot /></span>\n <MIcon v-if=\"trailingIcon\" :name=\"trailingIcon\" :size=\"18\" class=\"shrink-0\" :class=\"disabled ? '' : selected && selectable ? 'text-on-secondary-container' : 'text-on-surface-variant'\" />\n </button>\n <button\n v-if=\"type === 'input' && removable\"\n type=\"button\"\n class=\"relative -ml-1 mr-2 flex h-6 w-6 shrink-0 items-center justify-center rounded-full outline-none hover:bg-on-surface/8 focus-visible:ring-2 focus-visible:ring-secondary\"\n :class=\"disabled ? 'cursor-not-allowed' : 'cursor-pointer'\"\n :aria-label=\"locale.remove\"\n :disabled=\"disabled\"\n @click.stop=\"emit('remove')\"\n >\n <MIcon name=\"close\" :size=\"18\" />\n </button>\n </span>\n\n <component\n :is=\"clickable ? 'button' : 'span'\"\n v-else\n :type=\"clickable ? 'button' : undefined\"\n :disabled=\"clickable && disabled ? true : undefined\"\n class=\"inline-flex h-8 items-center gap-1.5 overflow-hidden px-3 text-label-large transition-colors\"\n :class=\"[\n shapeClass,\n toneClasses,\n clickable && !disabled ? interactiveClasses : '',\n disabled ? 'cursor-not-allowed' : '',\n ]\"\n :style=\"customStyle\"\n @click=\"clickable && !disabled && emit('click')\"\n >\n <MIcon v-if=\"icon\" :name=\"icon\" :size=\"18\" />\n <slot />\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"-mr-1 ml-0.5 inline-flex items-center justify-center rounded-full hover:bg-on-surface/12\"\n :aria-label=\"locale.remove\"\n :disabled=\"disabled\"\n @click.stop=\"emit('remove')\"\n >\n <MIcon name=\"close\" :size=\"16\" />\n </button>\n </component>\n</template>\n","/**\n * Internal (not exported from index.ts): where each item of a segmented list sits in its run, for\n * SegmentedListItem's segmentedShapes(index, count). A run is consecutive `role=\"listitem\"` children of `el`;\n * anything else (a subheader, an MListGroup) ends it. Used by MList and by MListGroup for its own items.\n */\nimport { onMounted, onUnmounted, shallowRef, type Ref } from 'vue'\n\nexport type SegmentPosition = 'single' | 'first' | 'middle' | 'last'\n\nexport function useSegmentRuns(el: Ref<HTMLElement | undefined>) {\n const positions = shallowRef(new Map<Element, SegmentPosition>())\n\n function measure() {\n const map = new Map<Element, SegmentPosition>()\n let run: Element[] = []\n const flush = () => {\n run.forEach((item, i) => map.set(item, run.length === 1 ? 'single' : i === 0 ? 'first' : i === run.length - 1 ? 'last' : 'middle'))\n run = []\n }\n for (const child of el.value?.children ?? []) {\n if (child.getAttribute('role') === 'listitem') run.push(child)\n else flush()\n }\n flush()\n positions.value = map\n }\n\n let observer: MutationObserver | undefined\n onMounted(() => {\n measure()\n if (el.value) {\n observer = new MutationObserver(measure)\n observer.observe(el.value, { childList: true })\n }\n })\n onUnmounted(() => observer?.disconnect())\n\n return (item: Element | null | undefined) => (item ? positions.value.get(item) : undefined)\n}\n","<script setup lang=\"ts\">\n/**\n * A vertical list container (MList) with rich, flexible rows (MListItem) and optional section headers\n * (MListSubheader) — one-line to three-line items, leading/trailing elements, selection, navigation, segmented,\n * and expandable variants. MListGroup splits a list into groups (separate rounded runs in a segmented list).\n *\n * @slot default MListItem / MListSubheader / MListGroup children\n * @event update:selected Fires when a selectable item is clicked (via v-model:selected)\n */\nimport { computed, nextTick, onMounted, onUpdated, provide, ref } from 'vue'\nimport { useSegmentRuns } from '../composables/_useSegmentRuns'\n\nconst props = withDefaults(\n defineProps<{\n /** Compact vertical padding on child items */\n dense?: boolean\n /** Show separators between items — 'inset' aligns the line past a leading icon/avatar */\n dividers?: boolean | 'inset'\n /** Navigation variant with rounded (pill) active items, ideal for drawers */\n nav?: boolean\n /** Segmented style — items each get an individual rounded background instead of a flat list */\n segmented?: boolean\n /** Enable single-item selection — items compare their value prop against selected */\n selectable?: boolean\n /** Currently selected item value (v-model:selected) */\n selected?: string | number | null\n /** Default line count for child items that don't set their own lines prop */\n lines?: 1 | 2 | 3\n }>(),\n { dense: false, dividers: false, nav: false, segmented: false, selectable: false },\n)\n\nconst emit = defineEmits<{\n 'update:selected': [value: string | number | null]\n}>()\n\n// Segmented items need to know whether they open or close their run of items. A subheader, an MListGroup\n// or any other non-item child starts a new run.\nconst listEl = ref<HTMLElement>()\nconst segmentPosition = useSegmentRuns(listEl)\n\nprovide('m-list', {\n segmentPosition,\n dense: computed(() => props.dense),\n nav: computed(() => props.nav),\n segmented: computed(() => props.segmented),\n selectable: computed(() => props.selectable),\n selected: computed(() => props.selected),\n dividers: computed(() => props.dividers),\n lines: computed(() => props.lines),\n select: (value: string | number) => emit('update:selected', value),\n})\n\n// A selectable list is a listbox: its items are options, one Tab stop (the selected one, else the first), the\n// arrows, Home and End move between them, Enter/Space select (MListItem)\nconst options = () => [...(listEl.value?.querySelectorAll<HTMLElement>('[role=\"option\"]') ?? [])]\n .filter((o) => o.getAttribute('aria-disabled') !== 'true')\nfunction onKeydown(e: KeyboardEvent) {\n if (!props.selectable) return\n const all = options()\n const i = all.indexOf(document.activeElement as HTMLElement)\n if (i < 0) return\n const next = e.key === 'ArrowDown' ? all[i + 1] : e.key === 'ArrowUp' ? all[i - 1] : e.key === 'Home' ? all[0] : e.key === 'End' ? all[all.length - 1] : undefined\n if (!next) return\n e.preventDefault()\n next.focus()\n}\n// With nothing selected (or a selection not in the list), the first option takes the Tab stop. Bound tabindexes\n// only patch when they change, so this one stays until the selection moves it.\nfunction keepTabStop() {\n if (!props.selectable) return\n const all = options()\n if (all.length && !all.some((o) => o.tabIndex === 0)) all[0]!.tabIndex = 0\n}\nonMounted(keepTabStop)\nonUpdated(() => nextTick(keepTabStop))\n\nconst classes = computed(() => [\n 'flex flex-col',\n // ListTokens.SegmentedGap = 2dp\n props.segmented ? 'gap-0.5 p-2' : 'py-2',\n props.nav && !props.segmented && 'gap-0.5 px-3',\n])\n</script>\n\n<template>\n <ul ref=\"listEl\" :role=\"selectable ? 'listbox' : 'list'\" :class=\"classes\" @keydown=\"onKeydown\">\n <slot />\n </ul>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A vertical list container (MList) with rich, flexible rows (MListItem) and optional section headers\n * (MListSubheader) — one-line to three-line items, leading/trailing elements, selection, navigation, segmented,\n * and expandable variants. MListGroup splits a list into groups (separate rounded runs in a segmented list).\n *\n * @slot default MListItem / MListSubheader / MListGroup children\n * @event update:selected Fires when a selectable item is clicked (via v-model:selected)\n */\nimport { computed, nextTick, onMounted, onUpdated, provide, ref } from 'vue'\nimport { useSegmentRuns } from '../composables/_useSegmentRuns'\n\nconst props = withDefaults(\n defineProps<{\n /** Compact vertical padding on child items */\n dense?: boolean\n /** Show separators between items — 'inset' aligns the line past a leading icon/avatar */\n dividers?: boolean | 'inset'\n /** Navigation variant with rounded (pill) active items, ideal for drawers */\n nav?: boolean\n /** Segmented style — items each get an individual rounded background instead of a flat list */\n segmented?: boolean\n /** Enable single-item selection — items compare their value prop against selected */\n selectable?: boolean\n /** Currently selected item value (v-model:selected) */\n selected?: string | number | null\n /** Default line count for child items that don't set their own lines prop */\n lines?: 1 | 2 | 3\n }>(),\n { dense: false, dividers: false, nav: false, segmented: false, selectable: false },\n)\n\nconst emit = defineEmits<{\n 'update:selected': [value: string | number | null]\n}>()\n\n// Segmented items need to know whether they open or close their run of items. A subheader, an MListGroup\n// or any other non-item child starts a new run.\nconst listEl = ref<HTMLElement>()\nconst segmentPosition = useSegmentRuns(listEl)\n\nprovide('m-list', {\n segmentPosition,\n dense: computed(() => props.dense),\n nav: computed(() => props.nav),\n segmented: computed(() => props.segmented),\n selectable: computed(() => props.selectable),\n selected: computed(() => props.selected),\n dividers: computed(() => props.dividers),\n lines: computed(() => props.lines),\n select: (value: string | number) => emit('update:selected', value),\n})\n\n// A selectable list is a listbox: its items are options, one Tab stop (the selected one, else the first), the\n// arrows, Home and End move between them, Enter/Space select (MListItem)\nconst options = () => [...(listEl.value?.querySelectorAll<HTMLElement>('[role=\"option\"]') ?? [])]\n .filter((o) => o.getAttribute('aria-disabled') !== 'true')\nfunction onKeydown(e: KeyboardEvent) {\n if (!props.selectable) return\n const all = options()\n const i = all.indexOf(document.activeElement as HTMLElement)\n if (i < 0) return\n const next = e.key === 'ArrowDown' ? all[i + 1] : e.key === 'ArrowUp' ? all[i - 1] : e.key === 'Home' ? all[0] : e.key === 'End' ? all[all.length - 1] : undefined\n if (!next) return\n e.preventDefault()\n next.focus()\n}\n// With nothing selected (or a selection not in the list), the first option takes the Tab stop. Bound tabindexes\n// only patch when they change, so this one stays until the selection moves it.\nfunction keepTabStop() {\n if (!props.selectable) return\n const all = options()\n if (all.length && !all.some((o) => o.tabIndex === 0)) all[0]!.tabIndex = 0\n}\nonMounted(keepTabStop)\nonUpdated(() => nextTick(keepTabStop))\n\nconst classes = computed(() => [\n 'flex flex-col',\n // ListTokens.SegmentedGap = 2dp\n props.segmented ? 'gap-0.5 p-2' : 'py-2',\n props.nav && !props.segmented && 'gap-0.5 px-3',\n])\n</script>\n\n<template>\n <ul ref=\"listEl\" :role=\"selectable ? 'listbox' : 'list'\" :class=\"classes\" @keydown=\"onKeydown\">\n <slot />\n </ul>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A toggle switch with an optional label, 4 semantic colors, and both M3 icon variants.\n *\n * @event update:modelValue Emitted with the new on/off state.\n */\nimport { computed, ref } from 'vue'\nimport MIcon from './MIcon.vue'\n\nconst props = withDefaults(\n defineProps<{\n /** Toggle state (v-model) */\n modelValue: boolean\n /** Disables the switch */\n disabled?: boolean\n /** Label text */\n label?: string\n /** Track/thumb color when on */\n color?: 'primary' | 'secondary' | 'tertiary' | 'error'\n /** Shows a check icon in the thumb while on. Set to `false` for M3's plain switch without an icon. */\n // M3 officially has two Switch variants: with a check icon inside the thumb (the\n // `thumbContent` slot filled), and without (Compose's actual default — `thumbContent`\n // defaults to `null`). Defaults to `true` here to keep this component's existing look;\n // pass `false` for the plain/no-icon variant.\n icon?: boolean\n }>(),\n { disabled: false, color: 'primary', icon: true },\n)\n\nconst emit = defineEmits<{ 'update:modelValue': [boolean] }>()\n\n// Same 4 named colors as MRadio/MCheckbox's color prop.\nconst trackClasses: Record<string, string> = {\n primary: 'border-primary bg-primary',\n secondary: 'border-secondary bg-secondary',\n tertiary: 'border-tertiary bg-tertiary',\n error: 'border-error bg-error',\n}\n// Selected handle: resting = on-{color} (OnPrimary etc.), hover/focus/press = {color}-container\n// (SwitchTokens.Selected{Hover,Focus,Pressed}HandleColor = PrimaryContainer, NOT OnPrimary —\n// the handle itself recolors on interaction, distinct from the track staying put).\nconst thumbClasses: Record<string, string> = {\n primary: 'bg-on-primary group-hover:bg-primary-container group-active:bg-primary-container peer-focus-visible:bg-primary-container',\n secondary: 'bg-on-secondary group-hover:bg-secondary-container group-active:bg-secondary-container peer-focus-visible:bg-secondary-container',\n tertiary: 'bg-on-tertiary group-hover:bg-tertiary-container group-active:bg-tertiary-container peer-focus-visible:bg-tertiary-container',\n error: 'bg-on-error group-hover:bg-error-container group-active:bg-error-container peer-focus-visible:bg-error-container',\n}\n// Unselected handle: resting = outline, hover/focus/press = on-surface-variant — a fixed\n// color regardless of the `color` prop, since the unselected state never carries it.\nconst unselectedThumbClasses =\n 'bg-outline group-hover:bg-on-surface-variant group-active:bg-on-surface-variant peer-focus-visible:bg-on-surface-variant'\n\n// Icon-on-handle color is a DIFFERENT role from the handle's own fill (SelectedIconColor =\n// OnPrimaryContainer, not OnPrimary) — it needs to read against whatever the handle is\n// currently showing (on-primary at rest, primary-container on hover/press), and\n// on-primary-container works against both.\nconst iconClasses: Record<string, string> = {\n primary: 'text-on-primary-container',\n secondary: 'text-on-secondary-container',\n tertiary: 'text-on-tertiary-container',\n error: 'text-on-error-container',\n}\n\n// State layer + focus ring tint, same idea as the handle color map above but for the\n// larger 40px circle that trails the thumb (see stateLayerStyle below) rather than the\n// handle itself — reuses the selected color's own base tone (bg-primary etc.), not the\n// container variant, matching StateLayerShape's plain-color state-layer convention used\n// for MCheckbox/MChip/MRadio elsewhere in this library.\nconst stateLayerBg: Record<string, string> = {\n primary: 'bg-primary',\n secondary: 'bg-secondary',\n tertiary: 'bg-tertiary',\n error: 'bg-error',\n}\n\n// Real handle grows from 24dp (selected) / 16dp (unselected) to a shared 28dp while\n// pressed (SwitchTokens.Pressed{Handle}Width/Height) — via `scale()` on the same fixed-size\n// box the 16dp unselected state already uses `scale(0.667)` for, not by changing width/\n// height directly (which would fight the JS-computed inline `transform` below on\n// specificity, the same class-vs-inline-style trap already hit once this session).\n// Needs real pointerdown/up tracking (not a CSS `active:` utility) because that transform\n// is computed in JS, not a plain class, so CSS pseudo-classes can't reach into it.\nconst isPressed = ref(false)\nfunction onPointerDown() {\n if (!props.disabled) isPressed.value = true\n}\nfunction onPointerEnd() {\n isPressed.value = false\n}\n\nconst thumbScale = computed(() => {\n if (isPressed.value) return 28 / 24\n return props.modelValue ? 1 : 16 / 24\n})\n\n// All thumb transforms live here so each direction can use its own easing curve.\n// translateY(-50%) vertically centres the thumb in the 32px track.\n// ON → spring cubic-bezier: overshoots ~2px then settles → satisfying \"click\"\n// OFF → M3 standard decelerate: clean snap back, no undershoot\nconst thumbStyle = computed(() => ({\n transform: `translateY(-50%) translateX(${props.modelValue ? 18 : 0}px) scale(${thumbScale.value})`,\n transition: props.modelValue\n ? 'transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 280ms ease'\n : 'transform 240ms cubic-bezier(0.2, 0, 0, 1), background-color 240ms ease',\n}))\n\n// StateLayerSize/StateLayerShape = 40dp circle, CornerFull — positioned to trail the\n// thumb's own translateX so it's centered on the thumb at both ends of the track, not a\n// static overlay covering the whole switch the way MCheckbox/MRadio's does (those don't\n// have a moving part). Base offset -4px accounts for the 40px circle being 8px taller/wider\n// than the 32px track and 24px thumb it's centered on.\nconst stateLayerStyle = computed(() => ({\n transform: `translateX(${props.modelValue ? 18 : 0}px)`,\n transition: props.modelValue\n ? 'transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1)'\n : 'transform 240ms cubic-bezier(0.2, 0, 0, 1)',\n}))\n</script>\n\n<template>\n <label\n class=\"group inline-flex items-center gap-3 select-none\"\n :class=\"disabled ? 'cursor-not-allowed opacity-[0.38]' : 'cursor-pointer'\"\n @pointerdown=\"onPointerDown\"\n @pointerup=\"onPointerEnd\"\n @pointerleave=\"onPointerEnd\"\n @pointercancel=\"onPointerEnd\"\n >\n <span class=\"relative -my-2 inline-flex h-12 shrink-0 items-center\">\n <span\n class=\"relative inline-flex h-8 w-[52px] items-center rounded-full border-2 transition-colors duration-200\"\n :class=\"modelValue ? trackClasses[color] : 'border-outline bg-surface-container-highest'\"\n >\n <input\n type=\"checkbox\"\n class=\"peer sr-only\"\n :checked=\"modelValue\"\n :disabled=\"disabled\"\n @change=\"emit('update:modelValue', !modelValue)\"\n />\n\n <!-- Hover/press/focus state layer + focus ring, both tracking the thumb's position (see stateLayerStyle doc above) -->\n <span\n v-if=\"!disabled\"\n class=\"pointer-events-none absolute top-1/2 -left-1 h-10 w-10 -translate-y-1/2 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12] peer-focus-visible:opacity-[0.08]\"\n :class=\"modelValue ? stateLayerBg[color] : 'bg-on-surface-variant'\"\n :style=\"stateLayerStyle\"\n />\n <span\n v-if=\"!disabled\"\n class=\"pointer-events-none absolute top-1/2 -left-1 h-10 w-10 -translate-y-1/2 rounded-full ring-0 ring-secondary transition-[box-shadow] duration-150 peer-focus-visible:ring-2\"\n :style=\"stateLayerStyle\"\n />\n\n <!-- Thumb: position + size animated via inline style (allows per-direction easing) -->\n <span\n class=\"absolute left-1 top-1/2 flex h-6 w-6 items-center justify-center rounded-full will-change-transform\"\n :class=\"modelValue ? [thumbClasses[color], 'shadow-sm'] : unselectedThumbClasses\"\n :style=\"thumbStyle\"\n >\n <Transition\n enter-active-class=\"transition-opacity duration-150 delay-[120ms]\"\n enter-from-class=\"opacity-0\"\n enter-to-class=\"opacity-100\"\n leave-active-class=\"transition-opacity duration-75\"\n leave-from-class=\"opacity-100\"\n leave-to-class=\"opacity-0\"\n >\n <MIcon v-if=\"modelValue && icon\" name=\"check\" :size=\"14\" :class=\"iconClasses[color]\" />\n </Transition>\n </span>\n </span>\n </span>\n <span v-if=\"label\" class=\"text-body-large text-on-surface\">{{ label }}</span>\n </label>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A toggle switch with an optional label, 4 semantic colors, and both M3 icon variants.\n *\n * @event update:modelValue Emitted with the new on/off state.\n */\nimport { computed, ref } from 'vue'\nimport MIcon from './MIcon.vue'\n\nconst props = withDefaults(\n defineProps<{\n /** Toggle state (v-model) */\n modelValue: boolean\n /** Disables the switch */\n disabled?: boolean\n /** Label text */\n label?: string\n /** Track/thumb color when on */\n color?: 'primary' | 'secondary' | 'tertiary' | 'error'\n /** Shows a check icon in the thumb while on. Set to `false` for M3's plain switch without an icon. */\n // M3 officially has two Switch variants: with a check icon inside the thumb (the\n // `thumbContent` slot filled), and without (Compose's actual default — `thumbContent`\n // defaults to `null`). Defaults to `true` here to keep this component's existing look;\n // pass `false` for the plain/no-icon variant.\n icon?: boolean\n }>(),\n { disabled: false, color: 'primary', icon: true },\n)\n\nconst emit = defineEmits<{ 'update:modelValue': [boolean] }>()\n\n// Same 4 named colors as MRadio/MCheckbox's color prop.\nconst trackClasses: Record<string, string> = {\n primary: 'border-primary bg-primary',\n secondary: 'border-secondary bg-secondary',\n tertiary: 'border-tertiary bg-tertiary',\n error: 'border-error bg-error',\n}\n// Selected handle: resting = on-{color} (OnPrimary etc.), hover/focus/press = {color}-container\n// (SwitchTokens.Selected{Hover,Focus,Pressed}HandleColor = PrimaryContainer, NOT OnPrimary —\n// the handle itself recolors on interaction, distinct from the track staying put).\nconst thumbClasses: Record<string, string> = {\n primary: 'bg-on-primary group-hover:bg-primary-container group-active:bg-primary-container peer-focus-visible:bg-primary-container',\n secondary: 'bg-on-secondary group-hover:bg-secondary-container group-active:bg-secondary-container peer-focus-visible:bg-secondary-container',\n tertiary: 'bg-on-tertiary group-hover:bg-tertiary-container group-active:bg-tertiary-container peer-focus-visible:bg-tertiary-container',\n error: 'bg-on-error group-hover:bg-error-container group-active:bg-error-container peer-focus-visible:bg-error-container',\n}\n// Unselected handle: resting = outline, hover/focus/press = on-surface-variant — a fixed\n// color regardless of the `color` prop, since the unselected state never carries it.\nconst unselectedThumbClasses =\n 'bg-outline group-hover:bg-on-surface-variant group-active:bg-on-surface-variant peer-focus-visible:bg-on-surface-variant'\n\n// Icon-on-handle color is a DIFFERENT role from the handle's own fill (SelectedIconColor =\n// OnPrimaryContainer, not OnPrimary) — it needs to read against whatever the handle is\n// currently showing (on-primary at rest, primary-container on hover/press), and\n// on-primary-container works against both.\nconst iconClasses: Record<string, string> = {\n primary: 'text-on-primary-container',\n secondary: 'text-on-secondary-container',\n tertiary: 'text-on-tertiary-container',\n error: 'text-on-error-container',\n}\n\n// State layer + focus ring tint, same idea as the handle color map above but for the\n// larger 40px circle that trails the thumb (see stateLayerStyle below) rather than the\n// handle itself — reuses the selected color's own base tone (bg-primary etc.), not the\n// container variant, matching StateLayerShape's plain-color state-layer convention used\n// for MCheckbox/MChip/MRadio elsewhere in this library.\nconst stateLayerBg: Record<string, string> = {\n primary: 'bg-primary',\n secondary: 'bg-secondary',\n tertiary: 'bg-tertiary',\n error: 'bg-error',\n}\n\n// Real handle grows from 24dp (selected) / 16dp (unselected) to a shared 28dp while\n// pressed (SwitchTokens.Pressed{Handle}Width/Height) — via `scale()` on the same fixed-size\n// box the 16dp unselected state already uses `scale(0.667)` for, not by changing width/\n// height directly (which would fight the JS-computed inline `transform` below on\n// specificity, the same class-vs-inline-style trap already hit once this session).\n// Needs real pointerdown/up tracking (not a CSS `active:` utility) because that transform\n// is computed in JS, not a plain class, so CSS pseudo-classes can't reach into it.\nconst isPressed = ref(false)\nfunction onPointerDown() {\n if (!props.disabled) isPressed.value = true\n}\nfunction onPointerEnd() {\n isPressed.value = false\n}\n\nconst thumbScale = computed(() => {\n if (isPressed.value) return 28 / 24\n return props.modelValue ? 1 : 16 / 24\n})\n\n// All thumb transforms live here so each direction can use its own easing curve.\n// translateY(-50%) vertically centres the thumb in the 32px track.\n// ON → spring cubic-bezier: overshoots ~2px then settles → satisfying \"click\"\n// OFF → M3 standard decelerate: clean snap back, no undershoot\nconst thumbStyle = computed(() => ({\n transform: `translateY(-50%) translateX(${props.modelValue ? 18 : 0}px) scale(${thumbScale.value})`,\n transition: props.modelValue\n ? 'transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 280ms ease'\n : 'transform 240ms cubic-bezier(0.2, 0, 0, 1), background-color 240ms ease',\n}))\n\n// StateLayerSize/StateLayerShape = 40dp circle, CornerFull — positioned to trail the\n// thumb's own translateX so it's centered on the thumb at both ends of the track, not a\n// static overlay covering the whole switch the way MCheckbox/MRadio's does (those don't\n// have a moving part). Base offset -4px accounts for the 40px circle being 8px taller/wider\n// than the 32px track and 24px thumb it's centered on.\nconst stateLayerStyle = computed(() => ({\n transform: `translateX(${props.modelValue ? 18 : 0}px)`,\n transition: props.modelValue\n ? 'transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1)'\n : 'transform 240ms cubic-bezier(0.2, 0, 0, 1)',\n}))\n</script>\n\n<template>\n <label\n class=\"group inline-flex items-center gap-3 select-none\"\n :class=\"disabled ? 'cursor-not-allowed opacity-[0.38]' : 'cursor-pointer'\"\n @pointerdown=\"onPointerDown\"\n @pointerup=\"onPointerEnd\"\n @pointerleave=\"onPointerEnd\"\n @pointercancel=\"onPointerEnd\"\n >\n <span class=\"relative -my-2 inline-flex h-12 shrink-0 items-center\">\n <span\n class=\"relative inline-flex h-8 w-[52px] items-center rounded-full border-2 transition-colors duration-200\"\n :class=\"modelValue ? trackClasses[color] : 'border-outline bg-surface-container-highest'\"\n >\n <input\n type=\"checkbox\"\n class=\"peer sr-only\"\n :checked=\"modelValue\"\n :disabled=\"disabled\"\n @change=\"emit('update:modelValue', !modelValue)\"\n />\n\n <!-- Hover/press/focus state layer + focus ring, both tracking the thumb's position (see stateLayerStyle doc above) -->\n <span\n v-if=\"!disabled\"\n class=\"pointer-events-none absolute top-1/2 -left-1 h-10 w-10 -translate-y-1/2 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12] peer-focus-visible:opacity-[0.08]\"\n :class=\"modelValue ? stateLayerBg[color] : 'bg-on-surface-variant'\"\n :style=\"stateLayerStyle\"\n />\n <span\n v-if=\"!disabled\"\n class=\"pointer-events-none absolute top-1/2 -left-1 h-10 w-10 -translate-y-1/2 rounded-full ring-0 ring-secondary transition-[box-shadow] duration-150 peer-focus-visible:ring-2\"\n :style=\"stateLayerStyle\"\n />\n\n <!-- Thumb: position + size animated via inline style (allows per-direction easing) -->\n <span\n class=\"absolute left-1 top-1/2 flex h-6 w-6 items-center justify-center rounded-full will-change-transform\"\n :class=\"modelValue ? [thumbClasses[color], 'shadow-sm'] : unselectedThumbClasses\"\n :style=\"thumbStyle\"\n >\n <Transition\n enter-active-class=\"transition-opacity duration-150 delay-[120ms]\"\n enter-from-class=\"opacity-0\"\n enter-to-class=\"opacity-100\"\n leave-active-class=\"transition-opacity duration-75\"\n leave-from-class=\"opacity-100\"\n leave-to-class=\"opacity-0\"\n >\n <MIcon v-if=\"modelValue && icon\" name=\"check\" :size=\"14\" :class=\"iconClasses[color]\" />\n </Transition>\n </span>\n </span>\n </span>\n <span v-if=\"label\" class=\"text-body-large text-on-surface\">{{ label }}</span>\n </label>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A row of an MList: headline with optional overline, supporting text, a leading icon, avatar or image, and\n * trailing text, icon, checkbox or switch. It can be a link, be clickable or expand to show nested items.\n *\n * @slot leading Custom leading element, replacing the icon/avatar/image/icon-container\n * @slot overline Custom overline content, replacing the overline prop\n * @slot default Custom content replacing the title/subtitle/description text block\n * @slot children Nested content revealed when expandable is set and the item is expanded\n * @slot trailing Custom trailing element, replacing the icon/text/switch/checkbox\n * @event click Fires on any click, including on an expandable item (right before it toggles)\n * @event update:trailingValue Fires when a trailing switch/checkbox is toggled (trailing='switch' | 'checkbox')\n * @event update:expanded Fires when an expandable item is toggled open/closed\n */\nimport { computed, getCurrentInstance, h, inject, ref, useId, watch, type FunctionalComponent } from 'vue'\nimport type { ComponentPublicInstance } from 'vue'\nimport type { ComputedRef } from 'vue'\nimport MIcon from './MIcon.vue'\nimport MAvatar from './MAvatar.vue'\nimport MCheckbox from './MCheckbox.vue'\nimport MSwitch from './MSwitch.vue'\nimport { useSpring } from '../composables/_useSpring'\n\nexport type ListItemLeading = 'icon' | 'avatar' | 'checkbox' | 'radio' | 'image' | 'icon-container'\nexport type ListItemTrailing = 'icon' | 'text' | 'switch' | 'checkbox'\n\nconst props = withDefaults(\n defineProps<{\n /** Primary text (headline) */\n title?: string\n /** Small label above the title */\n overline?: string\n /** Secondary text (line 2) */\n subtitle?: string\n /** Tertiary text (line 3) */\n description?: string\n /** Number of text lines — auto-detected from which text props/parent MList lines are set when omitted */\n lines?: 1 | 2 | 3\n /** Leading Material Symbol icon */\n icon?: string\n /**\n * Leading element type — auto-resolves to 'icon'/'avatar'/'image' from icon/avatarName/image when omitted\n */\n leading?: ListItemLeading\n /** Name for the avatar (when leading='avatar') */\n avatarName?: string\n /** Image URL (when leading='image') */\n image?: string\n /** Icon container background color (when leading='icon-container') */\n iconContainerColor?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'success'\n /** Trailing icon name */\n trailingIcon?: string\n /** Trailing text label */\n trailingText?: string\n /** Trailing element type — auto-resolves from trailingIcon/trailingText when omitted */\n trailing?: ListItemTrailing\n /** Value for a trailing switch/checkbox (v-model:trailingValue) */\n trailingValue?: boolean\n /** Selection value — compared against the parent MList selected prop */\n value?: string | number\n /** Force the active/highlighted state regardless of parent list selection */\n active?: boolean\n /** Disabled state (38% opacity, blocks interaction) */\n disabled?: boolean\n /** Force interactive styling/behavior (auto-true when href, to, @click, selectable, or expandable apply) */\n clickable?: boolean\n /** Link URL — renders the item as an `<a>` */\n href?: string\n /** Vue Router destination — renders the item as a router-link */\n to?: string | object\n /** Show an expand/collapse chevron revealing the #children slot */\n expandable?: boolean\n /** Control the expanded state (v-model:expanded) — otherwise managed internally */\n expanded?: boolean\n }>(),\n { active: false, disabled: false, expandable: false },\n)\n\nconst emit = defineEmits<{\n click: [e: MouseEvent]\n 'update:trailingValue': [value: boolean]\n 'update:expanded': [value: boolean]\n}>()\n\n// Root attrs go on the row (the element that looks like the item), which is wrapped in an <li> for links and buttons\ndefineOptions({ inheritAttrs: false })\n// `click` is a declared emit, so a listener for it never shows up in attrs: read it off the vnode\nconst instance = getCurrentInstance()\nconst hasClickListener = () => !!instance?.vnode.props?.onClick\n\nconst internalExpanded = ref(props.expanded ?? false)\nwatch(() => props.expanded, (v) => { if (v !== undefined) internalExpanded.value = v })\nconst isExpanded = computed(() => internalExpanded.value)\n\nconst list = inject<{\n segmentPosition: (el: Element | null | undefined) => 'single' | 'first' | 'middle' | 'last' | undefined\n dense: ComputedRef<boolean>\n nav: ComputedRef<boolean>\n segmented: ComputedRef<boolean>\n selectable: ComputedRef<boolean>\n selected: ComputedRef<string | number | null | undefined>\n dividers: ComputedRef<boolean | 'inset'>\n lines: ComputedRef<1 | 2 | 3 | undefined>\n select: (value: string | number) => void\n} | null>('m-list', null)\n\nconst resolvedLines = computed(() => {\n if (props.lines) return props.lines\n if (list?.lines.value) return list.lines.value\n if (props.description || (props.overline && props.subtitle)) return 3\n if (props.subtitle || props.overline) return 2\n return 1\n})\n\nconst isClickable = computed(() =>\n props.clickable || props.href || props.to || hasClickListener() || list?.selectable.value || props.expandable,\n)\n\n// What the row is for assistive technology and the keyboard. In a selectable list, an option of its listbox\n// (MList moves focus between them with the arrows); a link stays a link and a clickable row is a button, each\n// inside an <li> since a list can only hold list items; anything else is a plain list item.\nconst isOption = computed(() => !!list?.selectable.value && props.value != null && !props.href && !props.to && !props.expandable)\nconst isLink = computed(() => !!(props.href || props.to))\nconst isButton = computed(() => !isOption.value && !isLink.value && !props.expandable && (props.clickable || hasClickListener()))\nconst wrapped = computed(() => isLink.value || isButton.value)\nconst rowRole = computed(() => (isOption.value ? 'option' : isButton.value ? 'button' : isLink.value ? undefined : 'listitem'))\nconst rowTabindex = computed(() => {\n if (isOption.value) return isActive.value && !props.disabled ? 0 : -1\n if (isButton.value) return props.disabled ? -1 : 0\n return undefined\n})\nfunction onRowKeyDown(e: KeyboardEvent) {\n if (!isOption.value && !isButton.value) return\n if ((e.key !== 'Enter' && e.key !== ' ') || e.target !== e.currentTarget) return\n e.preventDefault()\n handleClick(e as unknown as MouseEvent)\n}\n\nconst isActive = computed(() => {\n if (props.active) return true\n if (list?.selectable.value && props.value != null) return list.selected.value === props.value\n return false\n})\n\nconst resolvedLeading = computed(() => {\n if (props.leading) return props.leading\n if (props.icon) return 'icon'\n if (props.avatarName) return 'avatar'\n if (props.image) return 'image'\n return null\n})\n\nconst resolvedTrailing = computed(() => {\n if (props.expandable) return 'expand'\n if (props.trailing) return props.trailing\n if (props.trailingIcon) return 'icon'\n if (props.trailingText) return 'text'\n return null\n})\n\nconst iconContainerClasses: Record<string, string> = {\n primary: 'bg-primary-container text-on-primary-container',\n secondary: 'bg-secondary-container text-on-secondary-container',\n tertiary: 'bg-tertiary-container text-on-tertiary-container',\n error: 'bg-error-container text-on-error-container',\n success: 'bg-success-container text-on-success-container',\n}\n\nconst isDense = computed(() => list?.dense.value ?? false)\nconst isNav = computed(() => list?.nav.value ?? false)\nconst isSegmented = computed(() => list?.segmented.value ?? false)\nconst hasDivider = computed(() => list?.dividers.value ?? false)\n\n// ListTokens: ItemSelectedLabelTextColor/ItemSelectedLeadingIconColor/etc = OnSecondaryContainer\nconst activeTextClass = computed(() => (isActive.value ? 'text-on-secondary-container' : 'text-on-surface'))\nconst activeIconClass = computed(() => (isActive.value ? 'text-on-secondary-container' : 'text-on-surface-variant'))\n\n// ListTokens: ItemOneLineContainerHeight/TwoLine/ThreeLine = 56/72/88dp; dense is a library\n// extension with no spec token, so it keeps its own compact padding instead of this floor.\nconst minHeightClass = computed(() => {\n if (isDense.value) return ''\n return resolvedLines.value === 3 ? 'min-h-22' : resolvedLines.value === 2 ? 'min-h-18' : 'min-h-14'\n})\n\nconst containerClasses = computed(() => [\n 'mli-row relative flex w-full items-center gap-4 text-left',\n // Corner radius: a pill in nav lists, otherwise sprung by expressiveRadii below\n isSegmented.value ? 'bg-surface-container px-4' : isNav.value ? 'rounded-full px-4' : 'px-4',\n isDense.value\n ? 'py-1'\n : resolvedLines.value === 3 ? 'py-3' : 'py-2',\n minHeightClass.value,\n isClickable.value && !props.disabled && 'cursor-pointer transition-colors duration-150 hover:bg-on-surface/8 active:bg-on-surface/12',\n // ListTokens: ItemSelectedContainerColor = SecondaryContainer, applies to any selected list\n // item, not just nav/segmented contexts.\n isActive.value && 'bg-secondary-container text-on-secondary-container',\n props.disabled && 'opacity-[0.38] pointer-events-none',\n])\n\n// ── Expressive shape morph ──────────────────────────────────────────────────────────────────\n// The current (non-deprecated) ListItem overloads morph the container's corners by interaction, with\n// ListItemDefaults.shapes(): ListTokens.ItemContainerExpressiveShape CornerExtraSmall (4dp) at rest,\n// ItemHovered… CornerMedium (8dp), ItemPressed/Focused/Selected… CornerLarge (16dp), priority\n// pressed > selected > focused > hovered (shapeForInteraction). SegmentedListItem's segmentedShapes() swaps\n// only the resting shape's outer corners for ListTokens.ContainerShape (CornerLarge) on the first and last\n// item of a run; the interaction shapes stay the same. Animated with MotionSchemeKeyTokens.FastSpatial.\n// Nav lists keep their pill (that's NavigationDrawerItem's shape, which doesn't morph).\nconst rootEl = ref<Element | ComponentPublicInstance | null>(null)\n// The <li> around a link or button row (the list's child, for segment runs); other rows are the <li> themselves\nconst wrapperEl = ref<Element | null>(null)\nconst RowWrapper: FunctionalComponent = (_, { slots }) =>\n wrapped.value\n ? h('li', { role: 'listitem', ref: (e) => { wrapperEl.value = e as Element | null } }, slots.default?.())\n : slots.default?.()\nconst shapeEl = ref<HTMLElement | null>(null)\nconst el = (r: Element | ComponentPublicInstance | null) => (r && '$el' in r ? (r.$el as Element) : r)\nconst hovered = ref(false)\nconst pressed = ref(false)\nconst focused = ref(false)\n\nconst REST = 4\nconst HOVERED = 8\nconst LARGE = 16\n\nconst segmentPosition = computed(() => (isSegmented.value ? list?.segmentPosition(wrapped.value ? wrapperEl.value : el(rootEl.value)) : undefined))\n\nconst expressiveRadii = computed<number[]>(() => {\n if (isNav.value) return []\n const interactive = isClickable.value && !props.disabled\n const r = interactive && pressed.value ? LARGE\n : isActive.value ? LARGE\n : interactive && focused.value ? LARGE\n : interactive && hovered.value ? HOVERED\n : null\n if (r !== null) return [r, r, r, r]\n const pos = segmentPosition.value\n const top = pos === 'first' || pos === 'single' ? LARGE : REST\n const bottom = pos === 'last' || pos === 'single' ? LARGE : REST\n return [top, top, bottom, bottom]\n})\n\nconst { snap } = useSpring(() => expressiveRadii.value, (v) => {\n const target = shapeEl.value ?? (el(rootEl.value) as HTMLElement | null)\n if (!target) return\n target.style.borderRadius = v.length ? v.map((n) => `${n}px`).join(' ') : ''\n})\n// A change of place in the list (or of list style) isn't an interaction: jump there\nwatch([segmentPosition, isNav], () => snap())\n\nfunction onPointerEnter(e: PointerEvent) { if (e.pointerType !== 'touch') hovered.value = true }\nfunction onPointerLeave() { hovered.value = false; pressed.value = false }\nfunction onPointerDown(e: PointerEvent) { if (e.button === 0) pressed.value = true }\nfunction onPointerUp() { pressed.value = false }\nfunction onFocus(e: FocusEvent) { focused.value = (e.currentTarget as Element).matches(':focus-visible') }\nfunction onBlur() { focused.value = false }\n\nconst tag = computed(() => {\n if (props.href) return 'a'\n if (props.to) return 'router-link'\n if (isButton.value) return 'div'\n return 'li'\n})\n\nconst linkProps = computed(() => {\n if (props.href) return { href: props.href }\n if (props.to) return { to: props.to }\n return {}\n})\n\n// An expandable item's header is a button (the row stays the list item): reachable and operable from the\n// keyboard, telling assistive technology whether its children are shown\nconst childrenId = useId()\nfunction onHeaderKeyDown(e: KeyboardEvent) {\n if (e.key !== 'Enter' && e.key !== ' ') return\n if (e.target !== e.currentTarget) return\n e.preventDefault()\n handleClick(e as unknown as MouseEvent)\n}\n\nfunction toggleExpand(e: MouseEvent) {\n if (props.disabled) return\n internalExpanded.value = !internalExpanded.value\n emit('update:expanded', internalExpanded.value)\n emit('click', e)\n}\n\nfunction handleClick(e: MouseEvent) {\n if (props.disabled) return\n if (props.expandable) {\n toggleExpand(e)\n return\n }\n if (list?.selectable.value && props.value != null) {\n list.select(props.value)\n }\n emit('click', e)\n}\n\nfunction handleTrailingToggle() {\n emit('update:trailingValue', !props.trailingValue)\n}\n</script>\n\n<template>\n <li v-if=\"expandable\" ref=\"rootEl\" v-bind=\"$attrs\" role=\"listitem\">\n <div\n ref=\"shapeEl\"\n role=\"button\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-expanded=\"isExpanded\"\n :aria-controls=\"childrenId\"\n :aria-disabled=\"disabled || undefined\"\n class=\"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary\"\n :class=\"containerClasses\"\n @click=\"handleClick\"\n @keydown=\"onHeaderKeyDown\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @pointerenter=\"onPointerEnter\"\n @pointerleave=\"onPointerLeave\"\n @pointerdown=\"onPointerDown\"\n @pointerup=\"onPointerUp\"\n @pointercancel=\"onPointerUp\"\n >\n <!-- Leading -->\n <slot name=\"leading\">\n <MIcon v-if=\"resolvedLeading === 'icon'\" :name=\"icon!\" :size=\"24\" class=\"shrink-0\" :class=\"activeIconClass\" />\n </slot>\n\n <!-- Content -->\n <div class=\"min-w-0 flex-1\">\n <slot name=\"overline\">\n <p v-if=\"overline\" class=\"truncate text-label-small\" :class=\"activeIconClass\">{{ overline }}</p>\n </slot>\n <slot>\n <p class=\"truncate text-body-large\" :class=\"activeTextClass\">{{ title }}</p>\n <p v-if=\"subtitle && resolvedLines >= 2\" class=\"text-body-medium\" :class=\"[activeIconClass, resolvedLines === 2 && 'truncate']\">\n {{ subtitle }}\n </p>\n </slot>\n </div>\n\n <!-- Expand icon -->\n <MIcon\n :name=\"isExpanded ? 'expand_less' : 'expand_more'\"\n :size=\"20\"\n class=\"shrink-0\"\n :class=\"activeIconClass\"\n />\n </div>\n\n <!-- Children with collapse animation -->\n <Transition name=\"mli-expand\">\n <div v-if=\"isExpanded\" :id=\"childrenId\" class=\"mli-expand-grid\">\n <div class=\"mli-expand-body\">\n <slot name=\"children\" />\n </div>\n </div>\n </Transition>\n </li>\n\n <RowWrapper v-else>\n <component\n :is=\"tag\"\n :class=\"containerClasses\"\n ref=\"rootEl\"\n v-bind=\"{ ...linkProps, ...$attrs }\"\n :role=\"rowRole\"\n :tabindex=\"rowTabindex\"\n :aria-selected=\"isOption ? isActive : undefined\"\n :aria-disabled=\"(isOption || isButton) && disabled ? 'true' : undefined\"\n @click=\"handleClick\"\n @keydown=\"onRowKeyDown\"\n @pointerenter=\"onPointerEnter\"\n @pointerleave=\"onPointerLeave\"\n @pointerdown=\"onPointerDown\"\n @pointerup=\"onPointerUp\"\n @pointercancel=\"onPointerUp\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n >\n <!-- Divider -->\n <div\n v-if=\"hasDivider\"\n class=\"absolute top-0 right-0 h-px bg-outline-variant\"\n :class=\"hasDivider === 'inset' ? 'left-16' : 'left-0'\"\n />\n\n <!-- Leading -->\n <slot name=\"leading\">\n <template v-if=\"resolvedLeading === 'icon'\">\n <MIcon :name=\"icon!\" :size=\"24\" class=\"shrink-0\" :class=\"activeIconClass\" />\n </template>\n <template v-else-if=\"resolvedLeading === 'icon-container'\">\n <div\n class=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-full\"\n :class=\"iconContainerClasses[iconContainerColor || 'primary']\"\n >\n <MIcon :name=\"icon!\" :size=\"24\" />\n </div>\n </template>\n <template v-else-if=\"resolvedLeading === 'avatar'\">\n <MAvatar :name=\"avatarName!\" :size=\"40\" class=\"shrink-0\" />\n </template>\n <template v-else-if=\"resolvedLeading === 'image'\">\n <img :src=\"image\" alt=\"\" class=\"h-14 w-14 shrink-0 rounded-md object-cover\">\n </template>\n <template v-else-if=\"resolvedLeading === 'checkbox'\">\n <MCheckbox :model-value=\"isActive\" class=\"shrink-0\" />\n </template>\n </slot>\n\n <!-- Content -->\n <div class=\"min-w-0 flex-1\">\n <slot name=\"overline\">\n <p v-if=\"overline\" class=\"truncate text-label-small\" :class=\"activeIconClass\">{{ overline }}</p>\n </slot>\n <slot>\n <p class=\"truncate text-body-large\" :class=\"activeTextClass\">{{ title }}</p>\n <p v-if=\"subtitle && resolvedLines >= 2\" class=\"text-body-medium\" :class=\"[activeIconClass, resolvedLines === 2 && 'truncate']\">\n {{ subtitle }}\n </p>\n <p v-if=\"description && resolvedLines >= 3\" class=\"line-clamp-2 text-body-small\" :class=\"activeIconClass\">\n {{ description }}\n </p>\n </slot>\n </div>\n\n <!-- Trailing -->\n <slot name=\"trailing\">\n <template v-if=\"resolvedTrailing === 'icon'\">\n <MIcon :name=\"trailingIcon!\" :size=\"24\" class=\"shrink-0\" :class=\"activeIconClass\" />\n </template>\n <template v-else-if=\"resolvedTrailing === 'text'\">\n <span class=\"shrink-0 text-label-small\" :class=\"activeIconClass\">{{ trailingText }}</span>\n </template>\n <template v-else-if=\"resolvedTrailing === 'switch'\">\n <MSwitch :model-value=\"!!trailingValue\" @update:model-value=\"handleTrailingToggle\" />\n </template>\n <template v-else-if=\"resolvedTrailing === 'checkbox'\">\n <MCheckbox :model-value=\"!!trailingValue\" @update:model-value=\"handleTrailingToggle\" />\n </template>\n </slot>\n </component>\n </RowWrapper>\n</template>\n\n<style>\n.mli-expand-grid {\n display: grid;\n grid-template-rows: 1fr;\n}\n.mli-expand-body {\n min-height: 0;\n overflow: hidden;\n padding-left: 2rem;\n}\n\n.mli-expand-enter-active {\n transition: grid-template-rows 300ms cubic-bezier(0.2, 0, 0, 1);\n}\n.mli-expand-enter-active > .mli-expand-body {\n transition: opacity 200ms 80ms cubic-bezier(0.2, 0, 0, 1);\n}\n.mli-expand-enter-from {\n grid-template-rows: 0fr;\n}\n.mli-expand-enter-from > .mli-expand-body {\n opacity: 0;\n}\n\n.mli-expand-leave-active {\n transition: grid-template-rows 250ms cubic-bezier(0.4, 0, 1, 1);\n}\n.mli-expand-leave-active > .mli-expand-body {\n transition: opacity 120ms cubic-bezier(0.4, 0, 1, 1);\n}\n.mli-expand-leave-to {\n grid-template-rows: 0fr;\n}\n.mli-expand-leave-to > .mli-expand-body {\n opacity: 0;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * A row of an MList: headline with optional overline, supporting text, a leading icon, avatar or image, and\n * trailing text, icon, checkbox or switch. It can be a link, be clickable or expand to show nested items.\n *\n * @slot leading Custom leading element, replacing the icon/avatar/image/icon-container\n * @slot overline Custom overline content, replacing the overline prop\n * @slot default Custom content replacing the title/subtitle/description text block\n * @slot children Nested content revealed when expandable is set and the item is expanded\n * @slot trailing Custom trailing element, replacing the icon/text/switch/checkbox\n * @event click Fires on any click, including on an expandable item (right before it toggles)\n * @event update:trailingValue Fires when a trailing switch/checkbox is toggled (trailing='switch' | 'checkbox')\n * @event update:expanded Fires when an expandable item is toggled open/closed\n */\nimport { computed, getCurrentInstance, h, inject, ref, useId, watch, type FunctionalComponent } from 'vue'\nimport type { ComponentPublicInstance } from 'vue'\nimport type { ComputedRef } from 'vue'\nimport MIcon from './MIcon.vue'\nimport MAvatar from './MAvatar.vue'\nimport MCheckbox from './MCheckbox.vue'\nimport MSwitch from './MSwitch.vue'\nimport { useSpring } from '../composables/_useSpring'\n\nexport type ListItemLeading = 'icon' | 'avatar' | 'checkbox' | 'radio' | 'image' | 'icon-container'\nexport type ListItemTrailing = 'icon' | 'text' | 'switch' | 'checkbox'\n\nconst props = withDefaults(\n defineProps<{\n /** Primary text (headline) */\n title?: string\n /** Small label above the title */\n overline?: string\n /** Secondary text (line 2) */\n subtitle?: string\n /** Tertiary text (line 3) */\n description?: string\n /** Number of text lines — auto-detected from which text props/parent MList lines are set when omitted */\n lines?: 1 | 2 | 3\n /** Leading Material Symbol icon */\n icon?: string\n /**\n * Leading element type — auto-resolves to 'icon'/'avatar'/'image' from icon/avatarName/image when omitted\n */\n leading?: ListItemLeading\n /** Name for the avatar (when leading='avatar') */\n avatarName?: string\n /** Image URL (when leading='image') */\n image?: string\n /** Icon container background color (when leading='icon-container') */\n iconContainerColor?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'success'\n /** Trailing icon name */\n trailingIcon?: string\n /** Trailing text label */\n trailingText?: string\n /** Trailing element type — auto-resolves from trailingIcon/trailingText when omitted */\n trailing?: ListItemTrailing\n /** Value for a trailing switch/checkbox (v-model:trailingValue) */\n trailingValue?: boolean\n /** Selection value — compared against the parent MList selected prop */\n value?: string | number\n /** Force the active/highlighted state regardless of parent list selection */\n active?: boolean\n /** Disabled state (38% opacity, blocks interaction) */\n disabled?: boolean\n /** Force interactive styling/behavior (auto-true when href, to, @click, selectable, or expandable apply) */\n clickable?: boolean\n /** Link URL — renders the item as an `<a>` */\n href?: string\n /** Vue Router destination — renders the item as a router-link */\n to?: string | object\n /** Show an expand/collapse chevron revealing the #children slot */\n expandable?: boolean\n /** Control the expanded state (v-model:expanded) — otherwise managed internally */\n expanded?: boolean\n }>(),\n { active: false, disabled: false, expandable: false },\n)\n\nconst emit = defineEmits<{\n click: [e: MouseEvent]\n 'update:trailingValue': [value: boolean]\n 'update:expanded': [value: boolean]\n}>()\n\n// Root attrs go on the row (the element that looks like the item), which is wrapped in an <li> for links and buttons\ndefineOptions({ inheritAttrs: false })\n// `click` is a declared emit, so a listener for it never shows up in attrs: read it off the vnode\nconst instance = getCurrentInstance()\nconst hasClickListener = () => !!instance?.vnode.props?.onClick\n\nconst internalExpanded = ref(props.expanded ?? false)\nwatch(() => props.expanded, (v) => { if (v !== undefined) internalExpanded.value = v })\nconst isExpanded = computed(() => internalExpanded.value)\n\nconst list = inject<{\n segmentPosition: (el: Element | null | undefined) => 'single' | 'first' | 'middle' | 'last' | undefined\n dense: ComputedRef<boolean>\n nav: ComputedRef<boolean>\n segmented: ComputedRef<boolean>\n selectable: ComputedRef<boolean>\n selected: ComputedRef<string | number | null | undefined>\n dividers: ComputedRef<boolean | 'inset'>\n lines: ComputedRef<1 | 2 | 3 | undefined>\n select: (value: string | number) => void\n} | null>('m-list', null)\n\nconst resolvedLines = computed(() => {\n if (props.lines) return props.lines\n if (list?.lines.value) return list.lines.value\n if (props.description || (props.overline && props.subtitle)) return 3\n if (props.subtitle || props.overline) return 2\n return 1\n})\n\nconst isClickable = computed(() =>\n props.clickable || props.href || props.to || hasClickListener() || list?.selectable.value || props.expandable,\n)\n\n// What the row is for assistive technology and the keyboard. In a selectable list, an option of its listbox\n// (MList moves focus between them with the arrows); a link stays a link and a clickable row is a button, each\n// inside an <li> since a list can only hold list items; anything else is a plain list item.\nconst isOption = computed(() => !!list?.selectable.value && props.value != null && !props.href && !props.to && !props.expandable)\nconst isLink = computed(() => !!(props.href || props.to))\nconst isButton = computed(() => !isOption.value && !isLink.value && !props.expandable && (props.clickable || hasClickListener()))\nconst wrapped = computed(() => isLink.value || isButton.value)\nconst rowRole = computed(() => (isOption.value ? 'option' : isButton.value ? 'button' : isLink.value ? undefined : 'listitem'))\nconst rowTabindex = computed(() => {\n if (isOption.value) return isActive.value && !props.disabled ? 0 : -1\n if (isButton.value) return props.disabled ? -1 : 0\n return undefined\n})\nfunction onRowKeyDown(e: KeyboardEvent) {\n if (!isOption.value && !isButton.value) return\n if ((e.key !== 'Enter' && e.key !== ' ') || e.target !== e.currentTarget) return\n e.preventDefault()\n handleClick(e as unknown as MouseEvent)\n}\n\nconst isActive = computed(() => {\n if (props.active) return true\n if (list?.selectable.value && props.value != null) return list.selected.value === props.value\n return false\n})\n\nconst resolvedLeading = computed(() => {\n if (props.leading) return props.leading\n if (props.icon) return 'icon'\n if (props.avatarName) return 'avatar'\n if (props.image) return 'image'\n return null\n})\n\nconst resolvedTrailing = computed(() => {\n if (props.expandable) return 'expand'\n if (props.trailing) return props.trailing\n if (props.trailingIcon) return 'icon'\n if (props.trailingText) return 'text'\n return null\n})\n\nconst iconContainerClasses: Record<string, string> = {\n primary: 'bg-primary-container text-on-primary-container',\n secondary: 'bg-secondary-container text-on-secondary-container',\n tertiary: 'bg-tertiary-container text-on-tertiary-container',\n error: 'bg-error-container text-on-error-container',\n success: 'bg-success-container text-on-success-container',\n}\n\nconst isDense = computed(() => list?.dense.value ?? false)\nconst isNav = computed(() => list?.nav.value ?? false)\nconst isSegmented = computed(() => list?.segmented.value ?? false)\nconst hasDivider = computed(() => list?.dividers.value ?? false)\n\n// ListTokens: ItemSelectedLabelTextColor/ItemSelectedLeadingIconColor/etc = OnSecondaryContainer\nconst activeTextClass = computed(() => (isActive.value ? 'text-on-secondary-container' : 'text-on-surface'))\nconst activeIconClass = computed(() => (isActive.value ? 'text-on-secondary-container' : 'text-on-surface-variant'))\n\n// ListTokens: ItemOneLineContainerHeight/TwoLine/ThreeLine = 56/72/88dp; dense is a library\n// extension with no spec token, so it keeps its own compact padding instead of this floor.\nconst minHeightClass = computed(() => {\n if (isDense.value) return ''\n return resolvedLines.value === 3 ? 'min-h-22' : resolvedLines.value === 2 ? 'min-h-18' : 'min-h-14'\n})\n\nconst containerClasses = computed(() => [\n 'mli-row relative flex w-full items-center gap-4 text-left',\n // Corner radius: a pill in nav lists, otherwise sprung by expressiveRadii below\n isSegmented.value ? 'bg-surface-container px-4' : isNav.value ? 'rounded-full px-4' : 'px-4',\n isDense.value\n ? 'py-1'\n : resolvedLines.value === 3 ? 'py-3' : 'py-2',\n minHeightClass.value,\n isClickable.value && !props.disabled && 'cursor-pointer transition-colors duration-150 hover:bg-on-surface/8 active:bg-on-surface/12',\n // ListTokens: ItemSelectedContainerColor = SecondaryContainer, applies to any selected list\n // item, not just nav/segmented contexts.\n isActive.value && 'bg-secondary-container text-on-secondary-container',\n props.disabled && 'opacity-[0.38] pointer-events-none',\n])\n\n// ── Expressive shape morph ──────────────────────────────────────────────────────────────────\n// The current (non-deprecated) ListItem overloads morph the container's corners by interaction, with\n// ListItemDefaults.shapes(): ListTokens.ItemContainerExpressiveShape CornerExtraSmall (4dp) at rest,\n// ItemHovered… CornerMedium (8dp), ItemPressed/Focused/Selected… CornerLarge (16dp), priority\n// pressed > selected > focused > hovered (shapeForInteraction). SegmentedListItem's segmentedShapes() swaps\n// only the resting shape's outer corners for ListTokens.ContainerShape (CornerLarge) on the first and last\n// item of a run; the interaction shapes stay the same. Animated with MotionSchemeKeyTokens.FastSpatial.\n// Nav lists keep their pill (that's NavigationDrawerItem's shape, which doesn't morph).\nconst rootEl = ref<Element | ComponentPublicInstance | null>(null)\n// The <li> around a link or button row (the list's child, for segment runs); other rows are the <li> themselves\nconst wrapperEl = ref<Element | null>(null)\nconst RowWrapper: FunctionalComponent = (_, { slots }) =>\n wrapped.value\n ? h('li', { role: 'listitem', ref: (e) => { wrapperEl.value = e as Element | null } }, slots.default?.())\n : slots.default?.()\nconst shapeEl = ref<HTMLElement | null>(null)\nconst el = (r: Element | ComponentPublicInstance | null) => (r && '$el' in r ? (r.$el as Element) : r)\nconst hovered = ref(false)\nconst pressed = ref(false)\nconst focused = ref(false)\n\nconst REST = 4\nconst HOVERED = 8\nconst LARGE = 16\n\nconst segmentPosition = computed(() => (isSegmented.value ? list?.segmentPosition(wrapped.value ? wrapperEl.value : el(rootEl.value)) : undefined))\n\nconst expressiveRadii = computed<number[]>(() => {\n if (isNav.value) return []\n const interactive = isClickable.value && !props.disabled\n const r = interactive && pressed.value ? LARGE\n : isActive.value ? LARGE\n : interactive && focused.value ? LARGE\n : interactive && hovered.value ? HOVERED\n : null\n if (r !== null) return [r, r, r, r]\n const pos = segmentPosition.value\n const top = pos === 'first' || pos === 'single' ? LARGE : REST\n const bottom = pos === 'last' || pos === 'single' ? LARGE : REST\n return [top, top, bottom, bottom]\n})\n\nconst { snap } = useSpring(() => expressiveRadii.value, (v) => {\n const target = shapeEl.value ?? (el(rootEl.value) as HTMLElement | null)\n if (!target) return\n target.style.borderRadius = v.length ? v.map((n) => `${n}px`).join(' ') : ''\n})\n// A change of place in the list (or of list style) isn't an interaction: jump there\nwatch([segmentPosition, isNav], () => snap())\n\nfunction onPointerEnter(e: PointerEvent) { if (e.pointerType !== 'touch') hovered.value = true }\nfunction onPointerLeave() { hovered.value = false; pressed.value = false }\nfunction onPointerDown(e: PointerEvent) { if (e.button === 0) pressed.value = true }\nfunction onPointerUp() { pressed.value = false }\nfunction onFocus(e: FocusEvent) { focused.value = (e.currentTarget as Element).matches(':focus-visible') }\nfunction onBlur() { focused.value = false }\n\nconst tag = computed(() => {\n if (props.href) return 'a'\n if (props.to) return 'router-link'\n if (isButton.value) return 'div'\n return 'li'\n})\n\nconst linkProps = computed(() => {\n if (props.href) return { href: props.href }\n if (props.to) return { to: props.to }\n return {}\n})\n\n// An expandable item's header is a button (the row stays the list item): reachable and operable from the\n// keyboard, telling assistive technology whether its children are shown\nconst childrenId = useId()\nfunction onHeaderKeyDown(e: KeyboardEvent) {\n if (e.key !== 'Enter' && e.key !== ' ') return\n if (e.target !== e.currentTarget) return\n e.preventDefault()\n handleClick(e as unknown as MouseEvent)\n}\n\nfunction toggleExpand(e: MouseEvent) {\n if (props.disabled) return\n internalExpanded.value = !internalExpanded.value\n emit('update:expanded', internalExpanded.value)\n emit('click', e)\n}\n\nfunction handleClick(e: MouseEvent) {\n if (props.disabled) return\n if (props.expandable) {\n toggleExpand(e)\n return\n }\n if (list?.selectable.value && props.value != null) {\n list.select(props.value)\n }\n emit('click', e)\n}\n\nfunction handleTrailingToggle() {\n emit('update:trailingValue', !props.trailingValue)\n}\n</script>\n\n<template>\n <li v-if=\"expandable\" ref=\"rootEl\" v-bind=\"$attrs\" role=\"listitem\">\n <div\n ref=\"shapeEl\"\n role=\"button\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-expanded=\"isExpanded\"\n :aria-controls=\"childrenId\"\n :aria-disabled=\"disabled || undefined\"\n class=\"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary\"\n :class=\"containerClasses\"\n @click=\"handleClick\"\n @keydown=\"onHeaderKeyDown\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @pointerenter=\"onPointerEnter\"\n @pointerleave=\"onPointerLeave\"\n @pointerdown=\"onPointerDown\"\n @pointerup=\"onPointerUp\"\n @pointercancel=\"onPointerUp\"\n >\n <!-- Leading -->\n <slot name=\"leading\">\n <MIcon v-if=\"resolvedLeading === 'icon'\" :name=\"icon!\" :size=\"24\" class=\"shrink-0\" :class=\"activeIconClass\" />\n </slot>\n\n <!-- Content -->\n <div class=\"min-w-0 flex-1\">\n <slot name=\"overline\">\n <p v-if=\"overline\" class=\"truncate text-label-small\" :class=\"activeIconClass\">{{ overline }}</p>\n </slot>\n <slot>\n <p class=\"truncate text-body-large\" :class=\"activeTextClass\">{{ title }}</p>\n <p v-if=\"subtitle && resolvedLines >= 2\" class=\"text-body-medium\" :class=\"[activeIconClass, resolvedLines === 2 && 'truncate']\">\n {{ subtitle }}\n </p>\n </slot>\n </div>\n\n <!-- Expand icon -->\n <MIcon\n :name=\"isExpanded ? 'expand_less' : 'expand_more'\"\n :size=\"20\"\n class=\"shrink-0\"\n :class=\"activeIconClass\"\n />\n </div>\n\n <!-- Children with collapse animation -->\n <Transition name=\"mli-expand\">\n <div v-if=\"isExpanded\" :id=\"childrenId\" class=\"mli-expand-grid\">\n <div class=\"mli-expand-body\">\n <slot name=\"children\" />\n </div>\n </div>\n </Transition>\n </li>\n\n <RowWrapper v-else>\n <component\n :is=\"tag\"\n :class=\"containerClasses\"\n ref=\"rootEl\"\n v-bind=\"{ ...linkProps, ...$attrs }\"\n :role=\"rowRole\"\n :tabindex=\"rowTabindex\"\n :aria-selected=\"isOption ? isActive : undefined\"\n :aria-disabled=\"(isOption || isButton) && disabled ? 'true' : undefined\"\n @click=\"handleClick\"\n @keydown=\"onRowKeyDown\"\n @pointerenter=\"onPointerEnter\"\n @pointerleave=\"onPointerLeave\"\n @pointerdown=\"onPointerDown\"\n @pointerup=\"onPointerUp\"\n @pointercancel=\"onPointerUp\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n >\n <!-- Divider -->\n <div\n v-if=\"hasDivider\"\n class=\"absolute top-0 right-0 h-px bg-outline-variant\"\n :class=\"hasDivider === 'inset' ? 'left-16' : 'left-0'\"\n />\n\n <!-- Leading -->\n <slot name=\"leading\">\n <template v-if=\"resolvedLeading === 'icon'\">\n <MIcon :name=\"icon!\" :size=\"24\" class=\"shrink-0\" :class=\"activeIconClass\" />\n </template>\n <template v-else-if=\"resolvedLeading === 'icon-container'\">\n <div\n class=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-full\"\n :class=\"iconContainerClasses[iconContainerColor || 'primary']\"\n >\n <MIcon :name=\"icon!\" :size=\"24\" />\n </div>\n </template>\n <template v-else-if=\"resolvedLeading === 'avatar'\">\n <MAvatar :name=\"avatarName!\" :size=\"40\" class=\"shrink-0\" />\n </template>\n <template v-else-if=\"resolvedLeading === 'image'\">\n <img :src=\"image\" alt=\"\" class=\"h-14 w-14 shrink-0 rounded-md object-cover\">\n </template>\n <template v-else-if=\"resolvedLeading === 'checkbox'\">\n <MCheckbox :model-value=\"isActive\" class=\"shrink-0\" />\n </template>\n </slot>\n\n <!-- Content -->\n <div class=\"min-w-0 flex-1\">\n <slot name=\"overline\">\n <p v-if=\"overline\" class=\"truncate text-label-small\" :class=\"activeIconClass\">{{ overline }}</p>\n </slot>\n <slot>\n <p class=\"truncate text-body-large\" :class=\"activeTextClass\">{{ title }}</p>\n <p v-if=\"subtitle && resolvedLines >= 2\" class=\"text-body-medium\" :class=\"[activeIconClass, resolvedLines === 2 && 'truncate']\">\n {{ subtitle }}\n </p>\n <p v-if=\"description && resolvedLines >= 3\" class=\"line-clamp-2 text-body-small\" :class=\"activeIconClass\">\n {{ description }}\n </p>\n </slot>\n </div>\n\n <!-- Trailing -->\n <slot name=\"trailing\">\n <template v-if=\"resolvedTrailing === 'icon'\">\n <MIcon :name=\"trailingIcon!\" :size=\"24\" class=\"shrink-0\" :class=\"activeIconClass\" />\n </template>\n <template v-else-if=\"resolvedTrailing === 'text'\">\n <span class=\"shrink-0 text-label-small\" :class=\"activeIconClass\">{{ trailingText }}</span>\n </template>\n <template v-else-if=\"resolvedTrailing === 'switch'\">\n <MSwitch :model-value=\"!!trailingValue\" @update:model-value=\"handleTrailingToggle\" />\n </template>\n <template v-else-if=\"resolvedTrailing === 'checkbox'\">\n <MCheckbox :model-value=\"!!trailingValue\" @update:model-value=\"handleTrailingToggle\" />\n </template>\n </slot>\n </component>\n </RowWrapper>\n</template>\n\n<style>\n.mli-expand-grid {\n display: grid;\n grid-template-rows: 1fr;\n}\n.mli-expand-body {\n min-height: 0;\n overflow: hidden;\n padding-left: 2rem;\n}\n\n.mli-expand-enter-active {\n transition: grid-template-rows 300ms cubic-bezier(0.2, 0, 0, 1);\n}\n.mli-expand-enter-active > .mli-expand-body {\n transition: opacity 200ms 80ms cubic-bezier(0.2, 0, 0, 1);\n}\n.mli-expand-enter-from {\n grid-template-rows: 0fr;\n}\n.mli-expand-enter-from > .mli-expand-body {\n opacity: 0;\n}\n\n.mli-expand-leave-active {\n transition: grid-template-rows 250ms cubic-bezier(0.4, 0, 1, 1);\n}\n.mli-expand-leave-active > .mli-expand-body {\n transition: opacity 120ms cubic-bezier(0.4, 0, 1, 1);\n}\n.mli-expand-leave-to {\n grid-template-rows: 0fr;\n}\n.mli-expand-leave-to > .mli-expand-body {\n opacity: 0;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAOA,IAAM,IAAQ,GASR,IAAW,QAAe;GAC9B,IAAI,EAAM,MAAM;IACd,IAAM,IAAQ,EAAM,KAAK,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO;IAG3D,SAFc,EAAM,EAAE,GAAG,MAAM,OAClB,EAAM,SAAS,IAAK,EAAM,EAAM,SAAS,EAAE,GAAG,MAAM,KAAM,IAAA,CACjD,YAAY,KAAK,EAAM,YAAY;GAC3D;GACA,OAAO,EAAM,YAAY;EAC3B,CAAC;oBAIC,EAAA,GAAA,EAKM,OAAA;GAJJ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;OAFwC,OAAK,EAAA,CAAC,gCAAuC,EAAA,KAAe,CAAA;MACnG,GAAA,EAAA,EAAA,WAAW,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA;;KAMpB,EAaO,EAAA,QAAA,YAAA,CAAA,SAAA,CAZW,EAAA,UAAgB,UAC9B,EAAA,GAAA,EAAoF,GAAA;;MAA5E,MAAM,EAAA;MAAgB,MAAM;MAAI,OAAK,EAAA,CAAC,YAAmB,EAAA,KAAe,CAAA;KAE7D,GAAA,MAAA,GAAA,CAAA,QAAA,OAAA,CAAA,KAAA,EAAA,UAAgB,UACnC,EAAA,GAAA,EAA0F,QAAA;;MAApF,OAAK,EAAA,CAAC,6BAAoC,EAAA,KAAe,CAAA;KAAK,GAAA,EAAA,EAAA,YAAY,GAAA,CAAA,KAE7D,EAAA,UAAgB,YACnC,EAAA,GAAA,EAAqF,IAAA;;MAA3E,eAAW,CAAA,CAAI,EAAA;MAAgB,uBAAoB;KAE1C,GAAA,MAAA,GAAA,CAAA,aAAA,CAAA,KAAA,EAAA,UAAgB,cACnC,EAAA,GAAA,EAAuF,GAAA;;MAA3E,eAAW,CAAA,CAAI,EAAA;MAAgB,uBAAoB"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { i as e } from "./useLocale-BpGxplLV.js";
|
|
2
|
+
import { computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, onMounted as s, onUnmounted as c, openBlock as l, ref as u, unref as d } from "vue";
|
|
3
|
+
//#region src/components/MLoadingIndicator.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var f = ["aria-label"], p = ["width", "height"], m = 38 / 48, h = 120, g = 36, _ = 47, v = 650, y = 4666, b = .6, x = /* @__PURE__ */ i({
|
|
5
|
+
__name: "MLoadingIndicator",
|
|
6
|
+
props: {
|
|
7
|
+
size: { default: 48 },
|
|
8
|
+
contained: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: !1
|
|
11
|
+
},
|
|
12
|
+
color: { default: "primary" },
|
|
13
|
+
label: {}
|
|
14
|
+
},
|
|
15
|
+
setup(i) {
|
|
16
|
+
let x = i, S = e(), C = {
|
|
17
|
+
primary: {
|
|
18
|
+
active: "var(--color-primary)",
|
|
19
|
+
containedActive: "var(--color-on-primary-container)",
|
|
20
|
+
container: "var(--color-primary-container)"
|
|
21
|
+
},
|
|
22
|
+
secondary: {
|
|
23
|
+
active: "var(--color-secondary)",
|
|
24
|
+
containedActive: "var(--color-on-secondary-container)",
|
|
25
|
+
container: "var(--color-secondary-container)"
|
|
26
|
+
},
|
|
27
|
+
tertiary: {
|
|
28
|
+
active: "var(--color-tertiary)",
|
|
29
|
+
containedActive: "var(--color-on-tertiary-container)",
|
|
30
|
+
container: "var(--color-tertiary-container)"
|
|
31
|
+
},
|
|
32
|
+
error: {
|
|
33
|
+
active: "var(--color-error)",
|
|
34
|
+
containedActive: "var(--color-on-error-container)",
|
|
35
|
+
container: "var(--color-error-container)"
|
|
36
|
+
}
|
|
37
|
+
}, w = t(() => C[x.color]), T = t(() => x.contained ? w.value.containedActive : w.value.active), E = t(() => Math.round(x.size * (x.contained ? .55 : m))), D = [], O = [], k = [];
|
|
38
|
+
for (let e = 0; e < h; e++) {
|
|
39
|
+
let t = 2 * Math.PI * e / h - Math.PI / 2;
|
|
40
|
+
D.push(t), O.push(Math.cos(t)), k.push(Math.sin(t));
|
|
41
|
+
}
|
|
42
|
+
function A(e, t) {
|
|
43
|
+
return (n) => e * t / Math.sqrt((t * Math.cos(n)) ** 2 + (e * Math.sin(n)) ** 2);
|
|
44
|
+
}
|
|
45
|
+
let j = [
|
|
46
|
+
(e) => 1 + .07 * Math.cos(10 * e),
|
|
47
|
+
(e) => 1 + .15 * Math.cos(9 * e),
|
|
48
|
+
(e) => 1 + .1 * Math.cos(5 * e) + .02 * Math.cos(10 * e),
|
|
49
|
+
A(1.3, .7),
|
|
50
|
+
(e) => 1 + .22 * Math.cos(8 * e),
|
|
51
|
+
(e) => 1 + .16 * Math.cos(4 * e),
|
|
52
|
+
A(1.2, .8)
|
|
53
|
+
].map((e) => D.map(e)), M = j.length, N = Math.sqrt(200), P = N * Math.sqrt(1 - b * b);
|
|
54
|
+
function F(e) {
|
|
55
|
+
return e <= 0 ? 0 : 1 - Math.exp(-.6 * N * e) * (Math.cos(P * e) + b * N / P * Math.sin(P * e));
|
|
56
|
+
}
|
|
57
|
+
function I(e) {
|
|
58
|
+
return e < .5 ? 2 * e * e : 1 - (-2 * e + 2) ** 2 / 2;
|
|
59
|
+
}
|
|
60
|
+
let L = new Float64Array(h), R = new Float64Array(h);
|
|
61
|
+
function z(e, t, n) {
|
|
62
|
+
for (let r = 0; r < h; r++) {
|
|
63
|
+
let i = Math.min(g * (e[r] + (t[r] - e[r]) * n), _);
|
|
64
|
+
L[r] = 50 + i * O[r], R[r] = 50 + i * k[r];
|
|
65
|
+
}
|
|
66
|
+
let r = `M${L[0].toFixed(2)},${R[0].toFixed(2)}`;
|
|
67
|
+
for (let e = 0; e < h; e++) {
|
|
68
|
+
let t = (e - 1 + h) % h, n = e, i = (e + 1) % h, a = (e + 2) % h, o = L[n] + (L[i] - L[t]) / 6, s = R[n] + (R[i] - R[t]) / 6, c = L[i] - (L[a] - L[n]) / 6, l = R[i] - (R[a] - R[n]) / 6;
|
|
69
|
+
r += `C${o.toFixed(2)},${s.toFixed(2)},${c.toFixed(2)},${l.toFixed(2)},${L[i].toFixed(2)},${R[i].toFixed(2)}`;
|
|
70
|
+
}
|
|
71
|
+
return r + "Z";
|
|
72
|
+
}
|
|
73
|
+
let B = u(null), V = u(null), H = u(!1), U = 0, W = -1, G = 0, K = -1, q = 90;
|
|
74
|
+
function J(e) {
|
|
75
|
+
W < 0 && (W = e), K < 0 && (K = e);
|
|
76
|
+
let t = H.value, n = t ? v * 1.8 : v, r = e - K;
|
|
77
|
+
r >= n && (G = (G + 1) % M, q = (q + 90) % 360, K = e, r = 0);
|
|
78
|
+
let i = t ? I(r / n) : F(r / 1e3), a = j[G], o = j[(G + 1) % M];
|
|
79
|
+
if (B.value?.setAttribute("d", z(a, o, i)), !t && V.value) {
|
|
80
|
+
let t = (e - W) / y * 360 % 360;
|
|
81
|
+
V.value.style.transform = `rotate(${(i * 90 + q + t).toFixed(2)}deg)`;
|
|
82
|
+
}
|
|
83
|
+
U = requestAnimationFrame(J);
|
|
84
|
+
}
|
|
85
|
+
return s(() => {
|
|
86
|
+
H.value = window.matchMedia("(prefers-reduced-motion: reduce)").matches, B.value?.setAttribute("d", z(j[0], j[0], 0)), U = requestAnimationFrame(J);
|
|
87
|
+
}), c(() => cancelAnimationFrame(U)), (e, t) => (l(), n("span", {
|
|
88
|
+
class: a(["inline-flex shrink-0 items-center justify-center", i.contained ? "rounded-full" : void 0]),
|
|
89
|
+
style: o({
|
|
90
|
+
width: `${i.size}px`,
|
|
91
|
+
height: `${i.size}px`,
|
|
92
|
+
backgroundColor: i.contained ? w.value.container : void 0
|
|
93
|
+
}),
|
|
94
|
+
role: "status",
|
|
95
|
+
"aria-label": i.label ?? d(S).loading
|
|
96
|
+
}, [(l(), n("svg", {
|
|
97
|
+
ref_key: "svgEl",
|
|
98
|
+
ref: V,
|
|
99
|
+
width: E.value,
|
|
100
|
+
height: E.value,
|
|
101
|
+
viewBox: "0 0 100 100",
|
|
102
|
+
"shape-rendering": "geometricPrecision",
|
|
103
|
+
style: { "transform-origin": "50% 50%" }
|
|
104
|
+
}, [r("path", {
|
|
105
|
+
ref_key: "pathEl",
|
|
106
|
+
ref: B,
|
|
107
|
+
"shape-rendering": "geometricPrecision",
|
|
108
|
+
style: o({ fill: T.value })
|
|
109
|
+
}, null, 4)], 8, p))], 14, f));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
//#endregion
|
|
113
|
+
export { x as t };
|
|
114
|
+
|
|
115
|
+
//# sourceMappingURL=MLoadingIndicator-BQMNX6Dx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MLoadingIndicator-BQMNX6Dx.js","names":[],"sources":["../src/components/MLoadingIndicator.vue","../src/components/MLoadingIndicator.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The M3 Expressive loading indicator — continuously morphs between rounded shapes (soft burst, cookie,\n * pentagon, pill, sunny, oval) via an underdamped spring while slowly rotating. Comes in a plain and a\n * contained (circle-backed) variant.\n */\nimport { computed, onMounted, onUnmounted, ref } from \"vue\";\nimport { useLocale } from '../composables/useLocale';\n\nconst props = withDefaults(\n defineProps<{\n /**\n * Overall footprint in px. The active shape sits inset within it (38/48 ratio) unless contained, where it\n * scales to 55% of size.\n */\n size?: number;\n /**\n * Wraps the shape in a filled container circle, and recolors the shape to the OnXContainer role instead of\n * the bare X role\n */\n contained?: boolean;\n /** Active shape (and container, when contained) color */\n color?: \"primary\" | \"secondary\" | \"tertiary\" | \"error\";\n /** Aria label for the indicator's status role — falls back to the locale string ('Loading') when omitted */\n label?: string;\n }>(),\n { size: 48, contained: false, color: \"primary\" },\n);\n\nconst locale = useLocale();\n\n// ContainedActiveColor is a different role (OnXContainer) from the bare\n// ActiveIndicatorColor (X) — the shape recolors when it gains the contained\n// circle behind it, it's not just the same tone on a new background.\nconst colorMap: Record<\"primary\" | \"secondary\" | \"tertiary\" | \"error\", { active: string; containedActive: string; container: string }> = {\n primary: { active: \"var(--color-primary)\", containedActive: \"var(--color-on-primary-container)\", container: \"var(--color-primary-container)\" },\n secondary: { active: \"var(--color-secondary)\", containedActive: \"var(--color-on-secondary-container)\", container: \"var(--color-secondary-container)\" },\n tertiary: { active: \"var(--color-tertiary)\", containedActive: \"var(--color-on-tertiary-container)\", container: \"var(--color-tertiary-container)\" },\n error: { active: \"var(--color-error)\", containedActive: \"var(--color-on-error-container)\", container: \"var(--color-error-container)\" },\n};\nconst svgColor = computed(() => colorMap[props.color]);\nconst activeColor = computed(() => (props.contained ? svgColor.value.containedActive : svgColor.value.active));\n\n// LoadingIndicatorTokens: ActiveSize=38dp against ContainerHeight/Width=48dp\n// — the bare shape doesn't fill its container, it sits inset within it.\nconst BARE_RATIO = 38 / 48;\nconst innerSize = computed(() => Math.round(props.size * (props.contained ? 0.55 : BARE_RATIO)));\n\n// ── Shape morph geometry ───────────────────────────────────────────────────\n// Every shape is sampled as a radius multiplier at the same K angles, so any\n// two shapes can be linearly interpolated point-by-point into a smooth\n// in-between silhouette — the same trick as MSpinner's wavy path, applied to\n// a rotating cast of shapes instead of a single fixed waveform.\nconst K = 120;\nconst R = 36;\n// Hard ceiling on the sampled radius: the spring's overshoot can transiently\n// push a point's interpolated radius past both shapes' own peaks, and the\n// most eccentric shape (pill) already sits close to the viewBox edge — this\n// keeps every shape's silhouette fully inside the 0..100 viewBox at all times.\nconst MAX_R = 47;\nconst angles: number[] = [];\nconst cosT: number[] = [];\nconst sinT: number[] = [];\nfor (let i = 0; i < K; i++) {\n const theta = (2 * Math.PI * i) / K - Math.PI / 2;\n angles.push(theta);\n cosT.push(Math.cos(theta));\n sinT.push(Math.sin(theta));\n}\n\n// Same seven-shape sequence (and rough proportions) as Google's own\n// androidx.compose.material3.LoadingIndicator: SoftBurst → Cookie9Sided →\n// Pentagon → Pill → Sunny → Cookie4Sided → Oval → (loops back to SoftBurst).\n// Exact vertex data isn't public outside the Kotlin source, so each is\n// approximated as a radius multiplier at the same K angles as the rest.\ntype ShapeFn = (theta: number) => number;\nfunction ellipse(a: number, b: number): ShapeFn {\n return (t) => (a * b) / Math.sqrt((b * Math.cos(t)) ** 2 + (a * Math.sin(t)) ** 2);\n}\nconst shapeFns: ShapeFn[] = [\n (t) => 1 + 0.07 * Math.cos(10 * t), // soft burst\n (t) => 1 + 0.15 * Math.cos(9 * t), // cookie (9 lobes)\n (t) => 1 + 0.1 * Math.cos(5 * t) + 0.02 * Math.cos(10 * t), // pentagon\n ellipse(1.3, 0.7), // pill\n (t) => 1 + 0.22 * Math.cos(8 * t), // sunny (8-point burst)\n (t) => 1 + 0.16 * Math.cos(4 * t), // cookie (4 lobes)\n ellipse(1.2, 0.8), // oval\n];\nconst shapes: number[][] = shapeFns.map((fn) => angles.map(fn));\nconst SHAPE_COUNT = shapes.length;\n\n// Timing/physics mirror the real component: ~650ms per shape, morphed by an\n// underdamped spring (dampingRatio 0.6, stiffness 200) rather than a fixed\n// easing curve — it overshoots slightly and settles, which is what reads as\n// a \"bounce\". The exact same progress value drives a synced +90° rotation\n// swing on top of a slow constant spin, so the turn is what visually carries\n// the shape change instead of the two feeling like separate animations.\nconst MORPH_INTERVAL_MS = 650;\nconst GLOBAL_ROTATION_MS = 4666;\nconst DAMPING = 0.6;\nconst OMEGA_N = Math.sqrt(200);\nconst OMEGA_D = OMEGA_N * Math.sqrt(1 - DAMPING * DAMPING);\n\nfunction springProgress(tSec: number): number {\n if (tSec <= 0) return 0;\n const decay = Math.exp(-DAMPING * OMEGA_N * tSec);\n return 1 - decay * (Math.cos(OMEGA_D * tSec) + ((DAMPING * OMEGA_N) / OMEGA_D) * Math.sin(OMEGA_D * tSec));\n}\n\nfunction easeInOut(t: number) {\n return t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2;\n}\n\nconst ptX = new Float64Array(K);\nconst ptY = new Float64Array(K);\n\n// Straight segments between the K sampled points would facet visibly on the\n// more eccentric shapes (the pill/oval's tips are high-curvature and get\n// under-sampled by uniform angle steps) — a closed Catmull-Rom spline\n// (converted to cubic Béziers) keeps every edge tangent-smooth regardless.\nfunction buildPath(from: number[], to: number[], f: number): string {\n for (let i = 0; i < K; i++) {\n const r = Math.min(R * (from[i]! + (to[i]! - from[i]!) * f), MAX_R);\n ptX[i] = 50 + r * cosT[i]!;\n ptY[i] = 50 + r * sinT[i]!;\n }\n let d = `M${ptX[0]!.toFixed(2)},${ptY[0]!.toFixed(2)}`;\n for (let i = 0; i < K; i++) {\n const i0 = (i - 1 + K) % K;\n const i1 = i;\n const i2 = (i + 1) % K;\n const i3 = (i + 2) % K;\n const c1x = ptX[i1]! + (ptX[i2]! - ptX[i0]!) / 6;\n const c1y = ptY[i1]! + (ptY[i2]! - ptY[i0]!) / 6;\n const c2x = ptX[i2]! - (ptX[i3]! - ptX[i1]!) / 6;\n const c2y = ptY[i2]! - (ptY[i3]! - ptY[i1]!) / 6;\n d += `C${c1x.toFixed(2)},${c1y.toFixed(2)},${c2x.toFixed(2)},${c2y.toFixed(2)},${ptX[i2]!.toFixed(2)},${ptY[i2]!.toFixed(2)}`;\n }\n return d + \"Z\";\n}\n\nconst pathEl = ref<SVGPathElement | null>(null);\nconst svgEl = ref<SVGSVGElement | null>(null);\nconst prefersReducedMotion = ref(false);\n\nlet rafId = 0;\nlet mountTime = -1;\nlet shapeIndex = 0;\nlet segStart = -1;\nlet morphRotationTarget = 90; // starts at a quarter turn, like the source component\n\nfunction tick(now: number) {\n if (mountTime < 0) mountTime = now;\n if (segStart < 0) segStart = now;\n\n const reduced = prefersReducedMotion.value;\n const interval = reduced ? MORPH_INTERVAL_MS * 1.8 : MORPH_INTERVAL_MS;\n let elapsed = now - segStart;\n if (elapsed >= interval) {\n shapeIndex = (shapeIndex + 1) % SHAPE_COUNT;\n morphRotationTarget = (morphRotationTarget + 90) % 360;\n segStart = now;\n elapsed = 0;\n }\n\n const p = reduced ? easeInOut(elapsed / interval) : springProgress(elapsed / 1000);\n const from = shapes[shapeIndex]!;\n const to = shapes[(shapeIndex + 1) % SHAPE_COUNT]!;\n pathEl.value?.setAttribute(\"d\", buildPath(from, to, p));\n\n if (!reduced && svgEl.value) {\n const globalDeg = (((now - mountTime) / GLOBAL_ROTATION_MS) * 360) % 360;\n svgEl.value.style.transform = `rotate(${(p * 90 + morphRotationTarget + globalDeg).toFixed(2)}deg)`;\n }\n\n rafId = requestAnimationFrame(tick);\n}\n\nonMounted(() => {\n prefersReducedMotion.value = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n pathEl.value?.setAttribute(\"d\", buildPath(shapes[0]!, shapes[0]!, 0));\n rafId = requestAnimationFrame(tick);\n});\nonUnmounted(() => cancelAnimationFrame(rafId));\n</script>\n\n<template>\n <span\n class=\"inline-flex shrink-0 items-center justify-center\"\n :class=\"contained ? 'rounded-full' : undefined\"\n :style=\"{ width: `${size}px`, height: `${size}px`, backgroundColor: contained ? svgColor.container : undefined }\"\n role=\"status\"\n :aria-label=\"label ?? locale.loading\"\n >\n <svg\n ref=\"svgEl\"\n :width=\"innerSize\"\n :height=\"innerSize\"\n viewBox=\"0 0 100 100\"\n shape-rendering=\"geometricPrecision\"\n style=\"transform-origin: 50% 50%\"\n >\n <path ref=\"pathEl\" shape-rendering=\"geometricPrecision\" :style=\"{ fill: activeColor }\" />\n </svg>\n </span>\n</template>\n","<script setup lang=\"ts\">\n/**\n * The M3 Expressive loading indicator — continuously morphs between rounded shapes (soft burst, cookie,\n * pentagon, pill, sunny, oval) via an underdamped spring while slowly rotating. Comes in a plain and a\n * contained (circle-backed) variant.\n */\nimport { computed, onMounted, onUnmounted, ref } from \"vue\";\nimport { useLocale } from '../composables/useLocale';\n\nconst props = withDefaults(\n defineProps<{\n /**\n * Overall footprint in px. The active shape sits inset within it (38/48 ratio) unless contained, where it\n * scales to 55% of size.\n */\n size?: number;\n /**\n * Wraps the shape in a filled container circle, and recolors the shape to the OnXContainer role instead of\n * the bare X role\n */\n contained?: boolean;\n /** Active shape (and container, when contained) color */\n color?: \"primary\" | \"secondary\" | \"tertiary\" | \"error\";\n /** Aria label for the indicator's status role — falls back to the locale string ('Loading') when omitted */\n label?: string;\n }>(),\n { size: 48, contained: false, color: \"primary\" },\n);\n\nconst locale = useLocale();\n\n// ContainedActiveColor is a different role (OnXContainer) from the bare\n// ActiveIndicatorColor (X) — the shape recolors when it gains the contained\n// circle behind it, it's not just the same tone on a new background.\nconst colorMap: Record<\"primary\" | \"secondary\" | \"tertiary\" | \"error\", { active: string; containedActive: string; container: string }> = {\n primary: { active: \"var(--color-primary)\", containedActive: \"var(--color-on-primary-container)\", container: \"var(--color-primary-container)\" },\n secondary: { active: \"var(--color-secondary)\", containedActive: \"var(--color-on-secondary-container)\", container: \"var(--color-secondary-container)\" },\n tertiary: { active: \"var(--color-tertiary)\", containedActive: \"var(--color-on-tertiary-container)\", container: \"var(--color-tertiary-container)\" },\n error: { active: \"var(--color-error)\", containedActive: \"var(--color-on-error-container)\", container: \"var(--color-error-container)\" },\n};\nconst svgColor = computed(() => colorMap[props.color]);\nconst activeColor = computed(() => (props.contained ? svgColor.value.containedActive : svgColor.value.active));\n\n// LoadingIndicatorTokens: ActiveSize=38dp against ContainerHeight/Width=48dp\n// — the bare shape doesn't fill its container, it sits inset within it.\nconst BARE_RATIO = 38 / 48;\nconst innerSize = computed(() => Math.round(props.size * (props.contained ? 0.55 : BARE_RATIO)));\n\n// ── Shape morph geometry ───────────────────────────────────────────────────\n// Every shape is sampled as a radius multiplier at the same K angles, so any\n// two shapes can be linearly interpolated point-by-point into a smooth\n// in-between silhouette — the same trick as MSpinner's wavy path, applied to\n// a rotating cast of shapes instead of a single fixed waveform.\nconst K = 120;\nconst R = 36;\n// Hard ceiling on the sampled radius: the spring's overshoot can transiently\n// push a point's interpolated radius past both shapes' own peaks, and the\n// most eccentric shape (pill) already sits close to the viewBox edge — this\n// keeps every shape's silhouette fully inside the 0..100 viewBox at all times.\nconst MAX_R = 47;\nconst angles: number[] = [];\nconst cosT: number[] = [];\nconst sinT: number[] = [];\nfor (let i = 0; i < K; i++) {\n const theta = (2 * Math.PI * i) / K - Math.PI / 2;\n angles.push(theta);\n cosT.push(Math.cos(theta));\n sinT.push(Math.sin(theta));\n}\n\n// Same seven-shape sequence (and rough proportions) as Google's own\n// androidx.compose.material3.LoadingIndicator: SoftBurst → Cookie9Sided →\n// Pentagon → Pill → Sunny → Cookie4Sided → Oval → (loops back to SoftBurst).\n// Exact vertex data isn't public outside the Kotlin source, so each is\n// approximated as a radius multiplier at the same K angles as the rest.\ntype ShapeFn = (theta: number) => number;\nfunction ellipse(a: number, b: number): ShapeFn {\n return (t) => (a * b) / Math.sqrt((b * Math.cos(t)) ** 2 + (a * Math.sin(t)) ** 2);\n}\nconst shapeFns: ShapeFn[] = [\n (t) => 1 + 0.07 * Math.cos(10 * t), // soft burst\n (t) => 1 + 0.15 * Math.cos(9 * t), // cookie (9 lobes)\n (t) => 1 + 0.1 * Math.cos(5 * t) + 0.02 * Math.cos(10 * t), // pentagon\n ellipse(1.3, 0.7), // pill\n (t) => 1 + 0.22 * Math.cos(8 * t), // sunny (8-point burst)\n (t) => 1 + 0.16 * Math.cos(4 * t), // cookie (4 lobes)\n ellipse(1.2, 0.8), // oval\n];\nconst shapes: number[][] = shapeFns.map((fn) => angles.map(fn));\nconst SHAPE_COUNT = shapes.length;\n\n// Timing/physics mirror the real component: ~650ms per shape, morphed by an\n// underdamped spring (dampingRatio 0.6, stiffness 200) rather than a fixed\n// easing curve — it overshoots slightly and settles, which is what reads as\n// a \"bounce\". The exact same progress value drives a synced +90° rotation\n// swing on top of a slow constant spin, so the turn is what visually carries\n// the shape change instead of the two feeling like separate animations.\nconst MORPH_INTERVAL_MS = 650;\nconst GLOBAL_ROTATION_MS = 4666;\nconst DAMPING = 0.6;\nconst OMEGA_N = Math.sqrt(200);\nconst OMEGA_D = OMEGA_N * Math.sqrt(1 - DAMPING * DAMPING);\n\nfunction springProgress(tSec: number): number {\n if (tSec <= 0) return 0;\n const decay = Math.exp(-DAMPING * OMEGA_N * tSec);\n return 1 - decay * (Math.cos(OMEGA_D * tSec) + ((DAMPING * OMEGA_N) / OMEGA_D) * Math.sin(OMEGA_D * tSec));\n}\n\nfunction easeInOut(t: number) {\n return t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2;\n}\n\nconst ptX = new Float64Array(K);\nconst ptY = new Float64Array(K);\n\n// Straight segments between the K sampled points would facet visibly on the\n// more eccentric shapes (the pill/oval's tips are high-curvature and get\n// under-sampled by uniform angle steps) — a closed Catmull-Rom spline\n// (converted to cubic Béziers) keeps every edge tangent-smooth regardless.\nfunction buildPath(from: number[], to: number[], f: number): string {\n for (let i = 0; i < K; i++) {\n const r = Math.min(R * (from[i]! + (to[i]! - from[i]!) * f), MAX_R);\n ptX[i] = 50 + r * cosT[i]!;\n ptY[i] = 50 + r * sinT[i]!;\n }\n let d = `M${ptX[0]!.toFixed(2)},${ptY[0]!.toFixed(2)}`;\n for (let i = 0; i < K; i++) {\n const i0 = (i - 1 + K) % K;\n const i1 = i;\n const i2 = (i + 1) % K;\n const i3 = (i + 2) % K;\n const c1x = ptX[i1]! + (ptX[i2]! - ptX[i0]!) / 6;\n const c1y = ptY[i1]! + (ptY[i2]! - ptY[i0]!) / 6;\n const c2x = ptX[i2]! - (ptX[i3]! - ptX[i1]!) / 6;\n const c2y = ptY[i2]! - (ptY[i3]! - ptY[i1]!) / 6;\n d += `C${c1x.toFixed(2)},${c1y.toFixed(2)},${c2x.toFixed(2)},${c2y.toFixed(2)},${ptX[i2]!.toFixed(2)},${ptY[i2]!.toFixed(2)}`;\n }\n return d + \"Z\";\n}\n\nconst pathEl = ref<SVGPathElement | null>(null);\nconst svgEl = ref<SVGSVGElement | null>(null);\nconst prefersReducedMotion = ref(false);\n\nlet rafId = 0;\nlet mountTime = -1;\nlet shapeIndex = 0;\nlet segStart = -1;\nlet morphRotationTarget = 90; // starts at a quarter turn, like the source component\n\nfunction tick(now: number) {\n if (mountTime < 0) mountTime = now;\n if (segStart < 0) segStart = now;\n\n const reduced = prefersReducedMotion.value;\n const interval = reduced ? MORPH_INTERVAL_MS * 1.8 : MORPH_INTERVAL_MS;\n let elapsed = now - segStart;\n if (elapsed >= interval) {\n shapeIndex = (shapeIndex + 1) % SHAPE_COUNT;\n morphRotationTarget = (morphRotationTarget + 90) % 360;\n segStart = now;\n elapsed = 0;\n }\n\n const p = reduced ? easeInOut(elapsed / interval) : springProgress(elapsed / 1000);\n const from = shapes[shapeIndex]!;\n const to = shapes[(shapeIndex + 1) % SHAPE_COUNT]!;\n pathEl.value?.setAttribute(\"d\", buildPath(from, to, p));\n\n if (!reduced && svgEl.value) {\n const globalDeg = (((now - mountTime) / GLOBAL_ROTATION_MS) * 360) % 360;\n svgEl.value.style.transform = `rotate(${(p * 90 + morphRotationTarget + globalDeg).toFixed(2)}deg)`;\n }\n\n rafId = requestAnimationFrame(tick);\n}\n\nonMounted(() => {\n prefersReducedMotion.value = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n pathEl.value?.setAttribute(\"d\", buildPath(shapes[0]!, shapes[0]!, 0));\n rafId = requestAnimationFrame(tick);\n});\nonUnmounted(() => cancelAnimationFrame(rafId));\n</script>\n\n<template>\n <span\n class=\"inline-flex shrink-0 items-center justify-center\"\n :class=\"contained ? 'rounded-full' : undefined\"\n :style=\"{ width: `${size}px`, height: `${size}px`, backgroundColor: contained ? svgColor.container : undefined }\"\n role=\"status\"\n :aria-label=\"label ?? locale.loading\"\n >\n <svg\n ref=\"svgEl\"\n :width=\"innerSize\"\n :height=\"innerSize\"\n viewBox=\"0 0 100 100\"\n shape-rendering=\"geometricPrecision\"\n style=\"transform-origin: 50% 50%\"\n >\n <path ref=\"pathEl\" shape-rendering=\"geometricPrecision\" :style=\"{ fill: activeColor }\" />\n </svg>\n </span>\n</template>\n"],"mappings":";;;iDA6CM,IAAa,KAAK,IAQlB,IAAI,KACJ,IAAI,IAKJ,IAAQ,IAsCR,IAAoB,KACpB,IAAqB,MACrB,IAAU;;;;;;;;;;;;EA1FhB,IAAM,IAAQ,GAoBR,IAAS,EAAU,GAKnB,IAAmI;GACvI,SAAW;IAAE,QAAQ;IAA0B,iBAAiB;IAAuC,WAAW;GAAmC;GACrJ,WAAW;IAAE,QAAQ;IAA0B,iBAAiB;IAAuC,WAAW;GAAmC;GACrJ,UAAW;IAAE,QAAQ;IAA0B,iBAAiB;IAAuC,WAAW;GAAmC;GACrJ,OAAW;IAAE,QAAQ;IAA0B,iBAAiB;IAAuC,WAAW;GAAmC;EACvJ,GACM,IAAW,QAAe,EAAS,EAAM,MAAM,GAC/C,IAAc,QAAgB,EAAM,YAAY,EAAS,MAAM,kBAAkB,EAAS,MAAM,MAAO,GA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