@m3ui-vue/m3ui-vue 1.10.2 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/README.md +19 -4
  2. package/dist/API.md +195 -56
  3. package/dist/MButton-gWoOzFWf.js +284 -0
  4. package/dist/MButton-gWoOzFWf.js.map +1 -0
  5. package/dist/MColorPickerModal-CJYMvlgK.js +466 -0
  6. package/dist/MColorPickerModal-CJYMvlgK.js.map +1 -0
  7. package/dist/MDialog-CU8EYgCC.js +226 -0
  8. package/dist/MDialog-CU8EYgCC.js.map +1 -0
  9. package/dist/{MIcon-BSsJZhK7.js → MIcon-CkUc9kuQ.js} +10 -4
  10. package/dist/MIcon-CkUc9kuQ.js.map +1 -0
  11. package/dist/MIconButton-DTFOfsTy.js +317 -0
  12. package/dist/MIconButton-DTFOfsTy.js.map +1 -0
  13. package/dist/MListItem-Cdw2FqCT.js +1306 -0
  14. package/dist/MListItem-Cdw2FqCT.js.map +1 -0
  15. package/dist/MLoadingIndicator-BxAy2x7P.js +115 -0
  16. package/dist/MLoadingIndicator-BxAy2x7P.js.map +1 -0
  17. package/dist/{MMenuItem-US0Zbglq.js → MMenuItem-CEIKYvaX.js} +216 -214
  18. package/dist/MMenuItem-CEIKYvaX.js.map +1 -0
  19. package/dist/{MPdfViewer-DL9mRsd2.js → MPdfViewer-CEfyXGq2.js} +674 -671
  20. package/dist/MPdfViewer-CEfyXGq2.js.map +1 -0
  21. package/dist/MProgressBar-BzZMxq7M.js.map +1 -1
  22. package/dist/MSeekBar-B3_D-PwH.js +435 -0
  23. package/dist/MSeekBar-B3_D-PwH.js.map +1 -0
  24. package/dist/{MSegmentedButton-DMou-8sG.js → MSegmentedButton-Dg07j-4r.js} +4 -4
  25. package/dist/{MSegmentedButton-DMou-8sG.js.map → MSegmentedButton-Dg07j-4r.js.map} +1 -1
  26. package/dist/{MSignaturePad-WuvE_Cyl.js → MSignaturePad-3nddtLKI.js} +2 -2
  27. package/dist/{MSignaturePad-WuvE_Cyl.js.map → MSignaturePad-3nddtLKI.js.map} +1 -1
  28. package/dist/{MSlider-7TzhFHKS.js → MSlider-BrpLbqwt.js} +4 -4
  29. package/dist/{MSlider-7TzhFHKS.js.map → MSlider-BrpLbqwt.js.map} +1 -1
  30. package/dist/{MSpinner-CkIVBuGE.js → MSpinner-CLwzDH33.js} +2 -2
  31. package/dist/{MSpinner-CkIVBuGE.js.map → MSpinner-CLwzDH33.js.map} +1 -1
  32. package/dist/{MTextField-B6_iOczK.js → MTextField-CZRizAwA.js} +136 -134
  33. package/dist/MTextField-CZRizAwA.js.map +1 -0
  34. package/dist/{_useFieldValidation-COBJ1tWr.js → _useFieldValidation-DVcqyy9g.js} +2 -2
  35. package/dist/{_useFieldValidation-COBJ1tWr.js.map → _useFieldValidation-DVcqyy9g.js.map} +1 -1
  36. package/dist/api.json +1 -1
  37. package/dist/chart.js +1 -1
  38. package/dist/code-editor.js +3 -3
  39. package/dist/code-editor.js.map +1 -1
  40. package/dist/components/MAlert.vue.d.ts +1 -1
  41. package/dist/components/MAudioPlayer.vue.d.ts +3 -3
  42. package/dist/components/MAvatar.vue.d.ts +19 -1
  43. package/dist/components/MButton.vue.d.ts +2 -1
  44. package/dist/components/MChatBubble.vue.d.ts +2 -0
  45. package/dist/components/MCheckbox.vue.d.ts +2 -0
  46. package/dist/components/MDataTable.vue.d.ts +31 -3
  47. package/dist/components/MFlow.vue.d.ts +1 -1
  48. package/dist/components/MHotkeys.vue.d.ts +1 -0
  49. package/dist/components/MIcon.vue.d.ts +6 -0
  50. package/dist/components/MIconButton.vue.d.ts +5 -0
  51. package/dist/components/MKanban.vue.d.ts +1 -1
  52. package/dist/components/MLink.vue.d.ts +59 -0
  53. package/dist/components/MListItem.vue.d.ts +3 -1
  54. package/dist/components/MMapControl.vue.d.ts +1 -1
  55. package/dist/components/MNotificationCenter.vue.d.ts +1 -1
  56. package/dist/components/MNumberField.vue.d.ts +1 -1
  57. package/dist/components/MPagination.vue.d.ts +14 -1
  58. package/dist/components/MPdfSigner.vue.d.ts +2 -2
  59. package/dist/components/MRadio.vue.d.ts +2 -0
  60. package/dist/components/MRadioGroup.vue.d.ts +2 -0
  61. package/dist/components/MStatCard.vue.d.ts +2 -2
  62. package/dist/components/MSwitch.vue.d.ts +2 -0
  63. package/dist/components/MText.vue.d.ts +4 -2
  64. package/dist/components/MTextField.vue.d.ts +2 -0
  65. package/dist/components/_MDrawerItemList.vue.d.ts +6 -0
  66. package/dist/composables/_menuGroups.d.ts +10 -1
  67. package/dist/composables/_splitAttrs.d.ts +6 -0
  68. package/dist/composables/_springAnimation.d.ts +2 -2
  69. package/dist/composables/_useFocusTrap.d.ts +15 -0
  70. package/dist/composables/_usePaneResize.d.ts +1 -1
  71. package/dist/composables/_useSpring.d.ts +4 -4
  72. package/dist/composables/dynamicColor.d.ts +9 -1
  73. package/dist/composables/motion.d.ts +63 -0
  74. package/dist/composables/useConfirm.d.ts +28 -0
  75. package/dist/composables/useDevice.d.ts +8 -1
  76. package/dist/composables/useLocale.d.ts +14 -0
  77. package/dist/composables/useScrollReveal.d.ts +1 -1
  78. package/dist/composables/useTheme.d.ts +1 -0
  79. package/dist/composables/useToast.d.ts +7 -0
  80. package/dist/draw.js +556 -556
  81. package/dist/draw.js.map +1 -1
  82. package/dist/flow.js +854 -851
  83. package/dist/flow.js.map +1 -1
  84. package/dist/gantt.js +1118 -1096
  85. package/dist/gantt.js.map +1 -1
  86. package/dist/index.d.ts +8 -5
  87. package/dist/locales/index.d.ts +1 -0
  88. package/dist/locales/index.js +833 -1
  89. package/dist/locales/index.js.map +1 -1
  90. package/dist/locales/pl.d.ts +2 -0
  91. package/dist/m3ui-vue.css +1 -1
  92. package/dist/m3ui.js +10327 -9796
  93. package/dist/m3ui.js.map +1 -1
  94. package/dist/map.js +860 -860
  95. package/dist/map.js.map +1 -1
  96. package/dist/{material-color-utilities-CEFytLsr.js → material-color-utilities-BZsBNIhi.js} +276 -217
  97. package/dist/material-color-utilities-BZsBNIhi.js.map +1 -0
  98. package/dist/media.js +7 -7
  99. package/dist/{motion-BcejVTeX.js → motion-BqYcqcim.js} +15 -5
  100. package/dist/motion-BqYcqcim.js.map +1 -0
  101. package/dist/pdf-sign.js +140 -137
  102. package/dist/pdf-sign.js.map +1 -1
  103. package/dist/pdf.js +1 -1
  104. package/dist/plugin.d.ts +11 -0
  105. package/dist/rich-text-editor.js +7 -7
  106. package/dist/styles/theme.css +40 -0
  107. package/dist/styles.css +1 -1
  108. package/dist/terminal.js +1 -1
  109. package/dist/{useLocale-YRaOT12S.js → useLocale-BjcYauXr.js} +60 -4
  110. package/dist/useLocale-BjcYauXr.js.map +1 -0
  111. package/dist/{useThemeTokens-DyAdPQB0.js → useThemeTokens-D5nr5KHf.js} +28 -27
  112. package/dist/useThemeTokens-D5nr5KHf.js.map +1 -0
  113. package/package.json +17 -2
  114. package/src/__tests__/MAvatarImage.test.ts +37 -0
  115. package/src/__tests__/MDataTableControlled.test.ts +68 -0
  116. package/src/__tests__/MHotkeysSequence.test.ts +53 -0
  117. package/src/__tests__/MIconAxes.test.ts +16 -0
  118. package/src/__tests__/MIconButtonWidth.test.ts +22 -0
  119. package/src/__tests__/MLink.test.ts +46 -0
  120. package/src/__tests__/MPaginationPages.test.ts +43 -0
  121. package/src/__tests__/MTextEmphasized.test.ts +14 -0
  122. package/src/__tests__/controlDescription.test.ts +34 -0
  123. package/src/__tests__/customColor.test.ts +27 -0
  124. package/src/__tests__/dynamicColor.test.ts +3 -2
  125. package/src/__tests__/focusTrap.test.ts +124 -0
  126. package/src/__tests__/formatMessage.test.ts +20 -0
  127. package/src/__tests__/inputAttrs.test.ts +103 -0
  128. package/src/__tests__/localePresets.test.ts +2 -0
  129. package/src/__tests__/menuGroupsRemount.test.ts +40 -0
  130. package/src/__tests__/menuHydration.test.ts +41 -0
  131. package/src/__tests__/motionPrefs.test.ts +28 -0
  132. package/src/__tests__/ssr.test.ts +11 -0
  133. package/src/__tests__/ssrToast.test.ts +20 -0
  134. package/src/__tests__/toastDetails.test.ts +39 -0
  135. package/src/__tests__/useConfirm.test.ts +47 -0
  136. package/src/__tests__/useTheme.test.ts +14 -0
  137. package/src/__tests__/warningRole.test.ts +22 -0
  138. package/src/components/MAlert.vue +2 -2
  139. package/src/components/MAnimatedNumber.vue +9 -3
  140. package/src/components/MAutocomplete.vue +16 -4
  141. package/src/components/MAvailabilityCalendar.vue +3 -3
  142. package/src/components/MAvatar.vue +32 -5
  143. package/src/components/MAvatarGroup.vue +7 -2
  144. package/src/components/MBottomSheet.vue +18 -2
  145. package/src/components/MButton.vue +18 -5
  146. package/src/components/MCarousel.vue +3 -3
  147. package/src/components/MChatBubble.vue +14 -1
  148. package/src/components/MCheckbox.vue +21 -4
  149. package/src/components/MChip.vue +4 -2
  150. package/src/components/MCollapse.vue +7 -1
  151. package/src/components/MCommandPalette.vue +6 -2
  152. package/src/components/MContextMenu.vue +4 -4
  153. package/src/components/MCreditCardInput.vue +5 -0
  154. package/src/components/MDashboardGrid.vue +2 -1
  155. package/src/components/MDataTable.vue +63 -16
  156. package/src/components/MDialog.vue +21 -3
  157. package/src/components/MDiffViewer.vue +3 -3
  158. package/src/components/MDrawLayers.vue +3 -3
  159. package/src/components/MFabMenu.vue +7 -0
  160. package/src/components/MFloorPlan.vue +3 -3
  161. package/src/components/MFloorPlanInspector.vue +3 -3
  162. package/src/components/MFlow.vue +9 -5
  163. package/src/components/MFlowControls.vue +6 -0
  164. package/src/components/MFormBuilder.vue +1 -1
  165. package/src/components/MGantt.vue +10 -10
  166. package/src/components/MHotkeys.vue +61 -16
  167. package/src/components/MIcon.vue +17 -1
  168. package/src/components/MIconButton.vue +29 -6
  169. package/src/components/MImageCropper.vue +1 -1
  170. package/src/components/MKanban.vue +2 -1
  171. package/src/components/MLightbox.vue +5 -4
  172. package/src/components/MLink.vue +136 -0
  173. package/src/components/MListDetail.vue +7 -0
  174. package/src/components/MListItem.vue +7 -4
  175. package/src/components/MLoadingIndicator.vue +2 -1
  176. package/src/components/MMap.vue +3 -0
  177. package/src/components/MMapCluster.vue +2 -2
  178. package/src/components/MMapControl.vue +2 -2
  179. package/src/components/MMapMeasure.vue +1 -1
  180. package/src/components/MMaskField.vue +16 -3
  181. package/src/components/MMenu.vue +4 -4
  182. package/src/components/MMenuItem.vue +2 -2
  183. package/src/components/MMeterGroup.vue +3 -2
  184. package/src/components/MMortgageCalculator.vue +3 -3
  185. package/src/components/MMultiAutocomplete.vue +19 -7
  186. package/src/components/MMultiSelect.vue +19 -7
  187. package/src/components/MNavigationDrawer.vue +10 -3
  188. package/src/components/MNavigationRail.vue +5 -1
  189. package/src/components/MNotificationCenter.vue +2 -1
  190. package/src/components/MNotificationHost.vue +3 -3
  191. package/src/components/MNumberField.vue +23 -6
  192. package/src/components/MOdontogram.vue +4 -4
  193. package/src/components/MOrderBook.vue +4 -0
  194. package/src/components/MPagination.vue +91 -12
  195. package/src/components/MPdfSigner.vue +3 -3
  196. package/src/components/MPdfViewer.vue +7 -7
  197. package/src/components/MPhoneInput.vue +17 -4
  198. package/src/components/MProductConfigurator.vue +4 -4
  199. package/src/components/MProgressBar.vue +5 -0
  200. package/src/components/MQuiz.vue +8 -5
  201. package/src/components/MRadio.vue +24 -5
  202. package/src/components/MRadioGroup.vue +3 -0
  203. package/src/components/MReactions.vue +2 -2
  204. package/src/components/MResourceTimeline.vue +3 -3
  205. package/src/components/MResult.vue +1 -1
  206. package/src/components/MScrollField.vue +1 -1
  207. package/src/components/MSearchField.vue +6 -5
  208. package/src/components/MSeatMap.vue +5 -0
  209. package/src/components/MSeekBar.vue +3 -2
  210. package/src/components/MSelect.vue +16 -4
  211. package/src/components/MSideSheet.vue +25 -3
  212. package/src/components/MSimpleCarousel.vue +2 -2
  213. package/src/components/MSnackbar.vue +16 -13
  214. package/src/components/MSparkline.vue +2 -1
  215. package/src/components/MSpinner.vue +8 -0
  216. package/src/components/MSplitter.vue +1 -1
  217. package/src/components/MSpotlightSearch.vue +6 -2
  218. package/src/components/MSpreadsheet.vue +1 -1
  219. package/src/components/MStatCard.vue +2 -1
  220. package/src/components/MSwitch.vue +21 -4
  221. package/src/components/MTabs.vue +2 -1
  222. package/src/components/MTagInput.vue +19 -6
  223. package/src/components/MText.vue +23 -4
  224. package/src/components/MTextField.vue +25 -6
  225. package/src/components/MTimeline.vue +5 -5
  226. package/src/components/MToolbar.vue +2 -2
  227. package/src/components/MTour.vue +3 -0
  228. package/src/components/MTrackingTimeline.vue +6 -0
  229. package/src/components/MTypewriter.vue +7 -1
  230. package/src/components/MWindow.vue +10 -1
  231. package/src/components/_MColorPanel.vue +4 -4
  232. package/src/components/_MComment.vue +3 -2
  233. package/src/components/_MFlowNodeShell.vue +1 -1
  234. package/src/components/_MPdfPage.vue +1 -1
  235. package/src/components/_MTransferPane.vue +10 -0
  236. package/src/composables/_effectCanvas.ts +2 -1
  237. package/src/composables/_menuGroups.ts +10 -1
  238. package/src/composables/_splitAttrs.ts +29 -0
  239. package/src/composables/_springAnimation.ts +3 -3
  240. package/src/composables/_themeTransition.ts +3 -2
  241. package/src/composables/_useFocusTrap.ts +142 -0
  242. package/src/composables/_useMenuNav.ts +3 -3
  243. package/src/composables/_usePaneResize.ts +2 -1
  244. package/src/composables/_useSheetMotion.ts +3 -4
  245. package/src/composables/_useSpring.ts +16 -10
  246. package/src/composables/cron.ts +7 -6
  247. package/src/composables/dynamicColor.ts +21 -2
  248. package/src/composables/motion.ts +27 -0
  249. package/src/composables/useConfirm.ts +116 -0
  250. package/src/composables/useDevice.ts +23 -3
  251. package/src/composables/useFieldBg.ts +4 -0
  252. package/src/composables/useLocale.ts +74 -0
  253. package/src/composables/useNotification.ts +3 -0
  254. package/src/composables/useScrollReveal.ts +3 -3
  255. package/src/composables/useTheme.ts +8 -2
  256. package/src/composables/useToast.ts +27 -4
  257. package/src/directives/vSparkle.ts +2 -1
  258. package/src/index.ts +8 -5
  259. package/src/locales/ar.ts +7 -0
  260. package/src/locales/de.ts +7 -0
  261. package/src/locales/es.ts +7 -0
  262. package/src/locales/fr.ts +7 -0
  263. package/src/locales/index.ts +1 -0
  264. package/src/locales/ja.ts +7 -0
  265. package/src/locales/ko.ts +7 -0
  266. package/src/locales/pl.ts +807 -0
  267. package/src/locales/pt.ts +7 -0
  268. package/src/locales/zh.ts +7 -0
  269. package/src/plugin.ts +16 -0
  270. package/src/styles/theme.css +40 -0
  271. package/dist/MButton-B9RCM06i.js +0 -171
  272. package/dist/MButton-B9RCM06i.js.map +0 -1
  273. package/dist/MColorPickerModal-ChRtcZOo.js +0 -577
  274. package/dist/MColorPickerModal-ChRtcZOo.js.map +0 -1
  275. package/dist/MDialog-dk07tify.js +0 -167
  276. package/dist/MDialog-dk07tify.js.map +0 -1
  277. package/dist/MIcon-BSsJZhK7.js.map +0 -1
  278. package/dist/MIconButton-CrBPZidd.js +0 -288
  279. package/dist/MIconButton-CrBPZidd.js.map +0 -1
  280. package/dist/MListItem-h9H223vx.js +0 -1239
  281. package/dist/MListItem-h9H223vx.js.map +0 -1
  282. package/dist/MLoadingIndicator-YTV1Ov5w.js +0 -114
  283. package/dist/MLoadingIndicator-YTV1Ov5w.js.map +0 -1
  284. package/dist/MMenuItem-US0Zbglq.js.map +0 -1
  285. package/dist/MPdfViewer-DL9mRsd2.js.map +0 -1
  286. package/dist/MSeekBar-JFZcoJ8y.js +0 -434
  287. package/dist/MSeekBar-JFZcoJ8y.js.map +0 -1
  288. package/dist/MTextField-B6_iOczK.js.map +0 -1
  289. package/dist/material-color-utilities-CEFytLsr.js.map +0 -1
  290. package/dist/motion-BcejVTeX.js.map +0 -1
  291. package/dist/useLocale-YRaOT12S.js.map +0 -1
  292. package/dist/useThemeTokens-DyAdPQB0.js.map +0 -1
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import { computed, inject, nextTick, onMounted, onUnmounted, provide, ref, useSlots, watch, type VNode } from 'vue'
10
10
  import MIcon from './MIcon.vue'
11
- import { splitMenuGroups } from '../composables/_menuGroups'
11
+ import { splitMenuGroups, RenderNodes } from '../composables/_menuGroups'
12
12
  import { useEscapeStack } from '../composables/_useEscapeStack'
13
13
  import { useMenuNav } from '../composables/_useMenuNav'
14
14
  import { POPUP_MARGIN, dropdownX } from '../composables/_popupPosition'
@@ -427,16 +427,16 @@ const origin = computed(() => `${originX.value} ${openAbove.value ? 'bottom' : '
427
427
  @click="popNav"
428
428
  >
429
429
  <MIcon name="arrow_back" :size="20" class="shrink-0" />
430
- <span class="flex-1 truncate"><component :is="() => currentNav?.header?.()" /></span>
430
+ <span class="flex-1 truncate"><RenderNodes :nodes="() => currentNav?.header?.()" /></span>
431
431
  </button>
432
432
  <hr class="my-1 border-outline-variant" />
433
- <component :is="() => currentNav?.content?.()" />
433
+ <RenderNodes :nodes="() => currentNav?.content?.()" />
434
434
  </div>
435
435
  <div v-else key="root">
436
436
  <div v-if="isGrouped" class="flex flex-col gap-1 px-1.5">
437
437
  <div v-for="(group, i) in groups" :key="i" class="rounded-lg shadow-elevation-2">
438
438
  <div class="overflow-hidden rounded-lg" :class="panelBg">
439
- <component :is="() => group" />
439
+ <RenderNodes :nodes="() => group" />
440
440
  </div>
441
441
  </div>
442
442
  </div>
@@ -17,7 +17,7 @@
17
17
  */
18
18
  import { vRipple } from '../directives/vRipple'
19
19
  import { computed, inject, nextTick, onMounted, onUnmounted, ref, useSlots, watch, type VNode } from 'vue'
20
- import { splitMenuGroups } from '../composables/_menuGroups'
20
+ import { splitMenuGroups, RenderNodes } from '../composables/_menuGroups'
21
21
  import MIcon from './MIcon.vue'
22
22
  import { isRtl } from '../composables/_rtl'
23
23
  import { FAST_EFFECTS, FAST_SPATIAL, useSpring } from '../composables/_useSpring'
@@ -314,7 +314,7 @@ function onSubPointerLeave(e: PointerEvent) {
314
314
  <div v-if="subGrouped" class="flex flex-col gap-1 px-1.5">
315
315
  <div v-for="(group, i) in subGroups" :key="i" class="rounded-lg shadow-elevation-2">
316
316
  <div class="overflow-hidden rounded-lg" :class="panelBg">
317
- <component :is="() => group" />
317
+ <RenderNodes :nodes="() => group" />
318
318
  </div>
319
319
  </div>
320
320
  </div>
@@ -23,6 +23,7 @@ export interface MeterItem {
23
23
  * @event select Emitted with the item (and its index) when a segment or legend entry is clicked
24
24
  */
25
25
  import { computed, onMounted, ref } from 'vue'
26
+ import { shouldReduceMotion } from '../composables/motion'
26
27
  import MIcon from './MIcon.vue'
27
28
  import { useLocale } from '../composables/useLocale'
28
29
 
@@ -64,7 +65,7 @@ const emit = defineEmits<{ select: [item: MeterItem, index: number] }>()
64
65
  const t = useLocale()
65
66
  const lang = computed(() => props.locale ?? t.lang)
66
67
 
67
- const ROLES = new Set(['primary', 'secondary', 'tertiary', 'error', 'success', 'on-surface', 'on-surface-variant', 'outline', 'inverse-primary', 'primary-container', 'secondary-container', 'tertiary-container'])
68
+ const ROLES = new Set(['primary', 'secondary', 'tertiary', 'error', 'success', 'warning', 'on-surface', 'on-surface-variant', 'outline', 'inverse-primary', 'primary-container', 'secondary-container', 'tertiary-container'])
68
69
  const CYCLE = ['primary', 'tertiary', 'secondary', 'error', 'success']
69
70
  const colorOf = (item: MeterItem, i: number) => {
70
71
  const c = item.color ?? CYCLE[i % CYCLE.length]!
@@ -98,7 +99,7 @@ const totalGap = computed(() => Math.max(0, segments.value.length + (hasTrack.va
98
99
  const widthOf = (share: number) => `calc((100% - ${totalGap.value}px) * ${share})`
99
100
 
100
101
  // Grows in from zero on mount: the segments render at 0 and get their width one frame later
101
- const reduced = typeof window !== 'undefined' && !!window.matchMedia?.('(prefers-reduced-motion: reduce)').matches
102
+ const reduced = shouldReduceMotion()
102
103
  const shown = ref(!props.animate || reduced)
103
104
  onMounted(() => {
104
105
  if (!shown.value) requestAnimationFrame(() => requestAnimationFrame(() => { shown.value = true }))
@@ -27,7 +27,7 @@ import MNumberField from './MNumberField.vue'
27
27
  import MSlider from './MSlider.vue'
28
28
  import MButton from './MButton.vue'
29
29
  import { amortize } from '../composables/mortgage'
30
- import { useLocale } from '../composables/useLocale'
30
+ import { useLocale, formatMessage } from '../composables/useLocale'
31
31
  import { vRipple } from '../directives/vRipple'
32
32
 
33
33
  const locale = useLocale()
@@ -174,7 +174,7 @@ defineExpose({ loan, monthly, schedule })
174
174
  :data-term="t"
175
175
  @click="update({ years: t })"
176
176
  >
177
- {{ locale.mortgageYears.replace('{n}', String(t)) }}
177
+ {{ formatMessage(locale.mortgageYears, { n: String(t) }, locale.lang) }}
178
178
  </button>
179
179
  </div>
180
180
  </div>
@@ -228,7 +228,7 @@ defineExpose({ loan, monthly, schedule })
228
228
  </MButton>
229
229
  <div v-if="showSchedule" class="mt-2 max-h-80 overflow-auto rounded-md border border-outline-variant">
230
230
  <table class="w-full text-body-medium tabular-nums" data-schedule>
231
- <thead class="sticky top-0 bg-surface-container-high text-label-large text-on-surface-variant">
231
+ <thead class="sticky top-0 z-10 bg-surface-container-high text-label-large text-on-surface-variant">
232
232
  <tr>
233
233
  <th class="px-3 py-2 text-start font-medium">{{ locale.mortgageYear }}</th>
234
234
  <th class="px-3 py-2 text-end font-medium">{{ locale.mortgagePrincipal }}</th>
@@ -2,6 +2,9 @@
2
2
  /**
3
3
  * Multi-value autocomplete with inline search. Type to filter, Enter to toggle, Backspace to remove last chip.
4
4
  *
5
+ * Your `class`, `style` and `data-*` go on the field's box; every other attribute (`id`, `aria-*`, native
6
+ * listeners like `@keydown`) goes on the `<input>`.
7
+ *
5
8
  * @event update:modelValue Emitted on selection change — powers v-model
6
9
  * @event debounced Emitted debounce ms after the user stops typing the search query (only when debounce > 0)
7
10
  */
@@ -9,6 +12,7 @@ import { computed, ref, useId, onMounted, onUnmounted, watch, nextTick } from 'v
9
12
  import { useFieldValidation, useFocusLeave } from '../composables/_useFieldValidation'
10
13
  import type { ValidateOn, ValidationRule } from '../composables/validation'
11
14
  import MIcon from './MIcon.vue'
15
+ import { useSplitAttrs } from '../composables/_splitAttrs'
12
16
  import { vTooltip } from '../directives/vTooltip'
13
17
  import MIconButton from './MIconButton.vue'
14
18
  import MCheckbox from './MCheckbox.vue'
@@ -113,6 +117,13 @@ const { hasError, message: errorMessage, messageId } = validation
113
117
 
114
118
  const locale = useLocale()
115
119
  const id = useId()
120
+ const { rootAttrs, inputAttrs, attrId } = useSplitAttrs()
121
+ /** The trigger's id: the consumer's `id` if given (so `<label for>` works), else the generated one */
122
+ const controlId = () => attrId() ?? id
123
+ // Ours (the message below the field) plus any the consumer passed
124
+ function describedBy() {
125
+ return [errorMessage.value || props.hint ? messageId : '', inputAttrs()['aria-describedby']].filter(Boolean).join(' ') || undefined
126
+ }
116
127
  const open = ref(false)
117
128
  const modalOpen = ref(false)
118
129
  const modalSearch = ref('')
@@ -413,7 +424,7 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
413
424
  </script>
414
425
 
415
426
  <template>
416
- <div ref="rootEl" class="flex flex-col gap-1" v-bind="$attrs" @focusout="onFocusOut">
427
+ <div ref="rootEl" class="flex flex-col gap-1" v-bind="rootAttrs()" @focusout="onFocusOut">
417
428
  <div
418
429
  ref="fieldEl"
419
430
  class="relative"
@@ -452,7 +463,7 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
452
463
  :aria-label="`${locale.remove} ${chip.label}`"
453
464
  v-if="!isDisabled"
454
465
  type="button"
455
- class="flex h-4 w-4 shrink-0 items-center justify-center rounded-full hover:bg-on-secondary-container/20"
466
+ class="flex h-4 w-4 shrink-0 items-center justify-center rounded-full hover:bg-on-secondary-container/8"
456
467
  @click="removeChip(chip.value, $event)"
457
468
  >
458
469
  <MIcon name="close" :size="12" />
@@ -461,14 +472,14 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
461
472
  <span
462
473
  v-if="overflowCount > 0 && !chipsExpanded"
463
474
  v-tooltip="overflowLabels"
464
- class="cursor-pointer rounded-full bg-surface-container-high px-2 py-0.5 text-label-small text-on-surface-variant transition-colors hover:bg-on-surface/12"
475
+ class="cursor-pointer rounded-full bg-surface-container-high px-2 py-0.5 text-label-small text-on-surface-variant transition-colors hover:bg-on-surface/8"
465
476
  @click.stop="chipsExpanded = true"
466
477
  >
467
478
  +{{ overflowCount }}
468
479
  </span>
469
480
  <span
470
481
  v-if="chipsExpanded && modelValue.length > maxChips"
471
- class="cursor-pointer rounded-full bg-surface-container-high px-2 py-0.5 text-label-small text-on-surface-variant transition-colors hover:bg-on-surface/12"
482
+ class="cursor-pointer rounded-full bg-surface-container-high px-2 py-0.5 text-label-small text-on-surface-variant transition-colors hover:bg-on-surface/8"
472
483
  @click.stop="chipsExpanded = false"
473
484
  >
474
485
  <MIcon name="unfold_less" :size="14" />
@@ -476,10 +487,11 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
476
487
  </template>
477
488
 
478
489
  <input
479
- :id="id"
490
+ v-bind="inputAttrs()"
491
+ :id="controlId()"
480
492
  ref="inputEl"
481
493
  :aria-invalid="hasError || undefined"
482
- :aria-describedby="errorMessage || hint ? messageId : undefined"
494
+ :aria-describedby="describedBy()"
483
495
  type="text"
484
496
  :value="search"
485
497
  :placeholder="!label && !hasValue ? placeholder : undefined"
@@ -503,7 +515,7 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
503
515
  </div>
504
516
 
505
517
  <!-- Floating label -->
506
- <label :for="id" :class="labelClasses">
518
+ <label :for="controlId()" :class="labelClasses">
507
519
  {{ label }}<span v-if="required" class="text-error">&nbsp;*</span>
508
520
  </label>
509
521
 
@@ -2,6 +2,9 @@
2
2
  /**
3
3
  * Select multiple values with removable chips and an optional in-dropdown search.
4
4
  *
5
+ * Your `class`, `style` and `data-*` go on the field's box; every other attribute (`id`, `aria-*`, native
6
+ * listeners like `@keydown`) goes on the trigger.
7
+ *
5
8
  * @slot no-results Custom content shown in the dropdown when no options match the search query
6
9
  * @event update:modelValue Emitted with the new array of selected values.
7
10
  */
@@ -9,6 +12,7 @@ import { computed, ref, useId, onMounted, onUnmounted, nextTick, watch } from 'v
9
12
  import { useFieldValidation, useFocusLeave } from '../composables/_useFieldValidation'
10
13
  import type { ValidateOn, ValidationRule } from '../composables/validation'
11
14
  import MIcon from './MIcon.vue'
15
+ import { useSplitAttrs } from '../composables/_splitAttrs'
12
16
  import { vTooltip } from '../directives/vTooltip'
13
17
  import MIconButton from './MIconButton.vue'
14
18
  import MCheckbox from './MCheckbox.vue'
@@ -119,6 +123,13 @@ const isDisabled = validation.disabled
119
123
  const { hasError, message: errorMessage, messageId } = validation
120
124
 
121
125
  const id = useId()
126
+ const { rootAttrs, inputAttrs, attrId } = useSplitAttrs()
127
+ /** The trigger's id: the consumer's `id` if given (so `<label for>` works), else the generated one */
128
+ const controlId = () => attrId() ?? id
129
+ // Ours (the message below the field) plus any the consumer passed
130
+ function describedBy() {
131
+ return [errorMessage.value || props.hint ? messageId : '', inputAttrs()['aria-describedby']].filter(Boolean).join(' ') || undefined
132
+ }
122
133
  const open = ref(false)
123
134
  const modalOpen = ref(false)
124
135
  // Focused (from the keyboard too) looks like open: M3's focused field, 2dp primary indicator and primary label,
@@ -320,7 +331,7 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
320
331
  </script>
321
332
 
322
333
  <template>
323
- <div ref="rootEl" class="flex flex-col gap-1" v-bind="$attrs" @focusout="onFocusOut">
334
+ <div ref="rootEl" class="flex flex-col gap-1" v-bind="rootAttrs()" @focusout="onFocusOut">
324
335
  <div
325
336
  ref="fieldEl"
326
337
  class="relative"
@@ -340,12 +351,13 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
340
351
 
341
352
  <!-- Trigger field -->
342
353
  <div
343
- :id="id"
354
+ v-bind="inputAttrs()"
355
+ :id="controlId()"
344
356
  :class="triggerClasses"
345
357
  role="button"
346
358
  :tabindex="isDisabled ? -1 : 0"
347
359
  :aria-invalid="hasError || undefined"
348
- :aria-describedby="errorMessage || hint ? messageId : undefined"
360
+ :aria-describedby="describedBy()"
349
361
  :aria-expanded="open || modalOpen"
350
362
  :aria-haspopup="true"
351
363
  :aria-controls="open ? `${id}-list` : undefined"
@@ -369,7 +381,7 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
369
381
  :aria-label="`${locale.remove} ${chip.label}`"
370
382
  v-if="!isDisabled"
371
383
  type="button"
372
- class="flex h-4 w-4 shrink-0 items-center justify-center rounded-full hover:bg-on-secondary-container/20"
384
+ class="flex h-4 w-4 shrink-0 items-center justify-center rounded-full hover:bg-on-secondary-container/8"
373
385
  @click="removeChip(chip.value, $event)"
374
386
  >
375
387
  <MIcon name="close" :size="12" />
@@ -378,14 +390,14 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
378
390
  <span
379
391
  v-if="overflowCount > 0 && !chipsExpanded"
380
392
  v-tooltip="overflowLabels"
381
- class="cursor-pointer rounded-full bg-surface-container-high px-2 py-0.5 text-label-small text-on-surface-variant transition-colors hover:bg-on-surface/12"
393
+ class="cursor-pointer rounded-full bg-surface-container-high px-2 py-0.5 text-label-small text-on-surface-variant transition-colors hover:bg-on-surface/8"
382
394
  @click.stop="chipsExpanded = true"
383
395
  >
384
396
  +{{ overflowCount }}
385
397
  </span>
386
398
  <span
387
399
  v-if="chipsExpanded && modelValue.length > maxChips"
388
- class="cursor-pointer rounded-full bg-surface-container-high px-2 py-0.5 text-label-small text-on-surface-variant transition-colors hover:bg-on-surface/12"
400
+ class="cursor-pointer rounded-full bg-surface-container-high px-2 py-0.5 text-label-small text-on-surface-variant transition-colors hover:bg-on-surface/8"
389
401
  @click.stop="chipsExpanded = false"
390
402
  >
391
403
  <MIcon name="unfold_less" :size="14" />
@@ -443,7 +455,7 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
443
455
  class="fixed z-500 max-h-60 overflow-auto rounded-xs bg-surface-container shadow-elevation-2"
444
456
  :style="dropPos"
445
457
  >
446
- <div v-if="searchable" class="sticky top-0 bg-surface-container px-3 py-2">
458
+ <div v-if="searchable" class="sticky top-0 z-10 bg-surface-container px-3 py-2">
447
459
  <div class="flex items-center gap-2 rounded-full bg-surface-container-high px-3 py-1.5">
448
460
  <MIcon name="search" :size="16" class="shrink-0 text-on-surface-variant" />
449
461
  <input
@@ -20,9 +20,12 @@ import { vTooltip } from '../directives/vTooltip'
20
20
  import type { TooltipPlacement } from '../composables/_tooltipTrigger'
21
21
  import MBadge from "./MBadge.vue";
22
22
  import MDrawerItemList from "./_MDrawerItemList.vue";
23
- import { motionSprings, type SpringSpec } from "../composables/motion";
23
+ import { type SpringSpec } from "../composables/motion";
24
+ // Springs of the app's motion scheme, read when each animation starts
25
+ import { DEFAULT_SPATIAL, FAST_EFFECTS } from "../composables/_useSpring";
24
26
  import { sampleSpring, sampleAt, playSamples, prefersReducedMotion } from "../composables/_springAnimation";
25
27
  import { useScrollLock } from '../composables/_useScrollLock'
28
+ import { useFocusTrap } from '../composables/_useFocusTrap'
26
29
  import { useDocumentRtl } from '../composables/_rtl'
27
30
 
28
31
  export interface DrawerItem {
@@ -217,6 +220,9 @@ function itemTag(item: DrawerItem) {
217
220
  }
218
221
 
219
222
  useScrollLock(() => props.modal && props.modelValue);
223
+ // Modal: focus moves into the drawer on open, Tab stays inside, and closing returns it to the opener
224
+ const modalEl = ref<HTMLElement>();
225
+ useFocusTrap(() => modalEl.value, () => props.modal && props.modelValue);
220
226
 
221
227
  // ── Modal: slide in/out + swipe to close ────────────────────────────────────────────────────
222
228
  // After ModalNavigationDrawer (NavigationDrawer.kt), which is left/right only; top/bottom add a bottom sheet's
@@ -227,8 +233,6 @@ useScrollLock(() => props.modal && props.modelValue);
227
233
  //
228
234
  // Each spring plays as a Web Animation (see _springAnimation.ts): a rAF loop janked the open on phones. Only the
229
235
  // drag itself writes styles directly. Offsets are fractions of the panel's size, so opening never reads layout.
230
- const DEFAULT_SPATIAL = motionSprings.standard.defaultSpatial
231
- const FAST_EFFECTS = motionSprings.standard.fastEffects
232
236
  const FLING_VELOCITY = 400
233
237
 
234
238
  let panelEl: HTMLElement | null = null
@@ -489,6 +493,9 @@ function onPanelClickCapture(e: MouseEvent) {
489
493
  <Transition :css="false" @enter="onModalEnter" @leave="onModalLeave" appear>
490
494
  <div
491
495
  v-if="modelValue"
496
+ ref="modalEl"
497
+ role="dialog"
498
+ aria-modal="true"
492
499
  class="fixed inset-0 z-100 flex"
493
500
  :class="[
494
501
  (physicalSide === 'right' && !rtl) || (physicalSide === 'left' && rtl) ? 'justify-end' : '',
@@ -14,6 +14,7 @@ import MBadge from './MBadge.vue'
14
14
  import { useItemLink, type ItemLink } from '../composables/_useItemLink'
15
15
  import { sampleSpring, sampleAt, playSamples, prefersReducedMotion } from '../composables/_springAnimation'
16
16
  import { useScrollLock } from '../composables/_useScrollLock'
17
+ import { useFocusTrap } from '../composables/_useFocusTrap'
17
18
  import { useEscapeStack } from '../composables/_useEscapeStack'
18
19
  import { isRtl } from '../composables/_rtl'
19
20
 
@@ -372,6 +373,9 @@ onUnmounted(() => {
372
373
  slideScrimAnim?.cancel()
373
374
  })
374
375
  useScrollLock(() => props.modal && props.expanded)
376
+ // Modal: focus moves into the panel on open, Tab stays inside, and closing returns it to the opener
377
+ const modalEl = ref<HTMLElement>()
378
+ useFocusTrap(() => modalEl.value, () => !!(props.modal && props.expanded))
375
379
  </script>
376
380
 
377
381
  <template>
@@ -531,7 +535,7 @@ useScrollLock(() => props.modal && props.expanded)
531
535
  -->
532
536
  <Teleport v-if="modal" to="body">
533
537
  <Transition :css="false" @enter="onPanelEnter" @leave="onPanelLeave">
534
- <div v-if="expanded" class="fixed inset-0 z-100">
538
+ <div v-if="expanded" ref="modalEl" role="dialog" aria-modal="true" class="fixed inset-0 z-100">
535
539
  <div class="wnr-scrim absolute inset-0 bg-scrim/32" @click="close" />
536
540
 
537
541
  <nav
@@ -32,7 +32,7 @@ export interface InboxNotification {
32
32
  /** An image URL instead of the icon */
33
33
  avatar?: string
34
34
  /** The icon's color: a theme role */
35
- color?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'success'
35
+ color?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'warning'
36
36
  }
37
37
 
38
38
  const props = withDefaults(
@@ -189,6 +189,7 @@ const ROLE_BG = {
189
189
  tertiary: 'bg-tertiary-container text-on-tertiary-container',
190
190
  error: 'bg-error-container text-on-error-container',
191
191
  success: 'bg-success-container text-on-success-container',
192
+ warning: 'bg-warning-container text-on-warning-container',
192
193
  } as const
193
194
  </script>
194
195
 
@@ -30,17 +30,17 @@ const variantStyles: Record<string, { bg: string; icon: string; iconName: string
30
30
  },
31
31
  success: {
32
32
  bg: 'bg-inverse-surface text-inverse-on-surface',
33
- icon: 'text-[#4ade80]',
33
+ icon: 'text-success-container',
34
34
  iconName: 'check_circle',
35
35
  },
36
36
  warning: {
37
37
  bg: 'bg-inverse-surface text-inverse-on-surface',
38
- icon: 'text-[#fcd34d]',
38
+ icon: 'text-warning-container',
39
39
  iconName: 'warning',
40
40
  },
41
41
  error: {
42
42
  bg: 'bg-inverse-surface text-inverse-on-surface',
43
- icon: 'text-[#f87171]',
43
+ icon: 'text-error-container',
44
44
  iconName: 'error',
45
45
  },
46
46
  }
@@ -2,6 +2,9 @@
2
2
  /**
3
3
  * A numeric text field with +/- stepper buttons, min/max clamping, and keyboard arrow support.
4
4
  *
5
+ * Your `class`, `style` and `data-*` go on the field's box; every other attribute (`id`, `inputmode`, `enterkeyhint`,
6
+ * `maxlength`, `readonly`, `aria-*`, native listeners like `@keydown`) goes on the `<input>`.
7
+ *
5
8
  * @event update:modelValue Emitted on every change — typing, stepper clicks, or arrow keys — powers v-model
6
9
  * @event debounced Emitted debounce ms after the user stops typing (only when debounce > 0). Stepper
7
10
  * clicks/arrow keys still emit instantly
@@ -10,11 +13,17 @@ import { computed, ref, useId } from 'vue'
10
13
  import { useFieldValidation, useFocusLeave } from '../composables/_useFieldValidation'
11
14
  import type { ValidateOn, ValidationRule } from '../composables/validation'
12
15
  import MIcon from './MIcon.vue'
16
+ import { useSplitAttrs } from '../composables/_splitAttrs'
17
+ import { useLocale } from '../composables/useLocale'
13
18
  import MIconButton from './MIconButton.vue'
14
19
  import { useFieldBg } from '../composables/useFieldBg'
15
20
  import { useDebounce } from '../composables/useDebounce'
16
21
  import { FIELD_PADDING_END, fieldLabelClasses, vOverflowTitle, type FieldEndInset } from '../composables/_fieldLayout'
17
22
 
23
+ defineOptions({ inheritAttrs: false })
24
+
25
+ const locale = useLocale()
26
+
18
27
  const props = withDefaults(
19
28
  defineProps<{
20
29
  /** Bound numeric value (v-model) */
@@ -42,7 +51,7 @@ const props = withDefaults(
42
51
  validateOn?: ValidateOn
43
52
  /** Wait this long (ms) after the value stops changing before re-checking (one request for an async rule, not one per key). Defaults to its `MForm`'s */
44
53
  validateDebounce?: number
45
- /** The key of this field in its `MForm`'s values, errors and schema */
54
+ /** Native `name`; also the key of this field in its `MForm`'s values, errors and schema */
46
55
  name?: string
47
56
  /** Hint text */
48
57
  hint?: string
@@ -95,7 +104,13 @@ const onFocusOut = useFocusLeave(() => rootEl.value, () => {
95
104
  emit('blur')
96
105
  })
97
106
 
98
- const id = useId()
107
+ const { rootAttrs, inputAttrs, attrId } = useSplitAttrs()
108
+ const autoId = useId()
109
+ const id = computed(() => attrId() ?? autoId)
110
+ // Ours (the message below the field) plus any the consumer passed
111
+ function describedBy() {
112
+ return [errorMessage.value || props.hint ? messageId : '', inputAttrs()['aria-describedby']].filter(Boolean).join(' ') || undefined
113
+ }
99
114
  const fieldBgEl = ref<HTMLElement | null>(null)
100
115
  const inputEl = ref<HTMLInputElement | null>(null)
101
116
  const { resolvedFieldBg } = useFieldBg(fieldBgEl, () => props.fieldBg)
@@ -205,7 +220,7 @@ defineExpose({
205
220
  </script>
206
221
 
207
222
  <template>
208
- <div ref="rootEl" class="flex flex-col gap-1" @focusout="onFocusOut">
223
+ <div ref="rootEl" class="flex flex-col gap-1" @focusout="onFocusOut" v-bind="rootAttrs()">
209
224
  <div
210
225
  ref="fieldBgEl"
211
226
  class="relative"
@@ -225,10 +240,12 @@ defineExpose({
225
240
 
226
241
  <input
227
242
  ref="inputEl"
243
+ v-bind="inputAttrs()"
228
244
  :aria-invalid="hasError || undefined"
229
- :aria-describedby="errorMessage || hint ? messageId : undefined"
245
+ :aria-describedby="describedBy()"
230
246
  :id="id"
231
247
  type="number"
248
+ :name="name"
232
249
  :value="modelValue ?? ''"
233
250
  :disabled="isDisabled"
234
251
  :required="required"
@@ -247,8 +264,8 @@ defineExpose({
247
264
  </label>
248
265
 
249
266
  <div v-if="stepper" class="absolute end-1 top-1/2 -translate-y-1/2 flex items-center gap-0.5">
250
- <MIconButton icon="remove" label="Decrease" :size="32" :disabled="isDisabled || (min !== undefined && (modelValue ?? 0) <= min)" @click="decrement" />
251
- <MIconButton icon="add" label="Increase" :size="32" :disabled="isDisabled || (max !== undefined && (modelValue ?? 0) >= max)" @click="increment" />
267
+ <MIconButton icon="remove" :label="locale.decrease" :size="32" :disabled="isDisabled || (min !== undefined && (modelValue ?? 0) <= min)" @click="decrement" />
268
+ <MIconButton icon="add" :label="locale.increase" :size="32" :disabled="isDisabled || (max !== undefined && (modelValue ?? 0) >= max)" @click="increment" />
252
269
  </div>
253
270
  </div>
254
271
 
@@ -39,7 +39,7 @@ export interface OdontogramCondition {
39
39
  */
40
40
  import { computed, nextTick, ref } from 'vue'
41
41
  import MIcon from './MIcon.vue'
42
- import { useLocale } from '../composables/useLocale'
42
+ import { useLocale, formatMessage } from '../composables/useLocale'
43
43
  import { vRipple } from '../directives/vRipple'
44
44
 
45
45
  const locale = useLocale()
@@ -280,7 +280,7 @@ async function onKeydown(e: KeyboardEvent, idx: number) {
280
280
 
281
281
  function toothLabel(t: Tooth) {
282
282
  const st = state(t)
283
- const parts = [locale.odontoTooth.replace('{n}', t.label)]
283
+ const parts = [formatMessage(locale.odontoTooth, { n: t.label }, locale.lang)]
284
284
  for (const k of st.conditions ?? []) parts.push(condMap.value.get(k)?.label ?? k)
285
285
  for (const [s, k] of Object.entries(st.surfaces ?? {})) parts.push(`${surfaceLabels.value[s as ToothSurface]}: ${condMap.value.get(k!)?.label ?? k}`)
286
286
  return parts.join(', ')
@@ -380,7 +380,7 @@ const SIDES: Exclude<Side, 'center'>[] = ['top', 'bottom', 'left', 'right']
380
380
  :data-surface="surfaceAt(t, s)"
381
381
  @click="applySurface(t, surfaceAt(t, s))"
382
382
  >
383
- <title>{{ locale.odontoTooth.replace('{n}', t.label) }} · {{ surfaceLabels[surfaceAt(t, s)] }}</title>
383
+ <title>{{ formatMessage(locale.odontoTooth, { n: t.label }, locale.lang) }} · {{ surfaceLabels[surfaceAt(t, s)] }}</title>
384
384
  </polygon>
385
385
  <rect
386
386
  x="12"
@@ -392,7 +392,7 @@ const SIDES: Exclude<Side, 'center'>[] = ['top', 'bottom', 'left', 'right']
392
392
  data-surface="occlusal"
393
393
  @click="applySurface(t, 'occlusal')"
394
394
  >
395
- <title>{{ locale.odontoTooth.replace('{n}', t.label) }} · {{ surfaceLabels.occlusal }}</title>
395
+ <title>{{ formatMessage(locale.odontoTooth, { n: t.label }, locale.lang) }} · {{ surfaceLabels.occlusal }}</title>
396
396
  </rect>
397
397
 
398
398
  <circle v-if="has(t, 'crown')" cx="20" cy="20" r="23" fill="none" :stroke="condMap.get('crown')?.color" stroke-width="2.5" pointer-events="none" data-mark="crown" />
@@ -284,4 +284,8 @@ function pick(r: Row, side: 'bid' | 'ask') {
284
284
  .m3-ob-flash { animation: none; }
285
285
  .m3-ob-depth { transition: none; }
286
286
  }
287
+ /* createM3UI({ reducedMotion: 'always' }) */
288
+ :root[data-m3-motion='reduce'] .m3-ob-flash { animation: none; }
289
+ :root[data-m3-motion='reduce'] .m3-ob-depth { transition: none; }
290
+
287
291
  </style>