@m3ui-vue/m3ui-vue 1.8.1 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/API.md +26 -11
- package/dist/{MButton-B6eZTfFV.js → MButton-LiZRRP4h.js} +4 -4
- package/dist/{MButton-B6eZTfFV.js.map → MButton-LiZRRP4h.js.map} +1 -1
- package/dist/{MColorPickerModal-Dajjf6tH.js → MColorPickerModal-IjciC8zh.js} +185 -185
- package/dist/MColorPickerModal-IjciC8zh.js.map +1 -0
- package/dist/{MDialog-DQvE_JBv.js → MDialog-BLpfgIA3.js} +7 -7
- package/dist/{MDialog-DQvE_JBv.js.map → MDialog-BLpfgIA3.js.map} +1 -1
- package/dist/MIcon-BSsJZhK7.js +116 -0
- package/dist/MIcon-BSsJZhK7.js.map +1 -0
- package/dist/{MIconButton-BBggVwBV.js → MIconButton-CNjN0xwW.js} +18 -18
- package/dist/{MIconButton-BBggVwBV.js.map → MIconButton-CNjN0xwW.js.map} +1 -1
- package/dist/{MListItem-DiOAxaN7.js → MListItem-BBQ-6i3v.js} +139 -139
- package/dist/MListItem-BBQ-6i3v.js.map +1 -0
- package/dist/{MLoadingIndicator-CuTZYFFj.js → MLoadingIndicator-dejdXpu8.js} +2 -2
- package/dist/{MLoadingIndicator-CuTZYFFj.js.map → MLoadingIndicator-dejdXpu8.js.map} +1 -1
- package/dist/MMenuItem-E31tMzOt.js +577 -0
- package/dist/MMenuItem-E31tMzOt.js.map +1 -0
- package/dist/{MPdfViewer-C5ngKPRM.js → MPdfViewer-B5Q9Xs9d.js} +9 -9
- package/dist/{MPdfViewer-C5ngKPRM.js.map → MPdfViewer-B5Q9Xs9d.js.map} +1 -1
- package/dist/{MProgressBar-BWly1UKN.js → MProgressBar-CPrZhQbA.js} +3 -3
- package/dist/{MProgressBar-BWly1UKN.js.map → MProgressBar-CPrZhQbA.js.map} +1 -1
- package/dist/{MSeekBar-BCDQTx2t.js → MSeekBar-NwkuAzx-.js} +2 -2
- package/dist/{MSeekBar-BCDQTx2t.js.map → MSeekBar-NwkuAzx-.js.map} +1 -1
- package/dist/{MSegmentedButton-BXzRsg1S.js → MSegmentedButton-DZuZLBML.js} +4 -4
- package/dist/{MSegmentedButton-BXzRsg1S.js.map → MSegmentedButton-DZuZLBML.js.map} +1 -1
- package/dist/{MSignaturePad-CxOtelzE.js → MSignaturePad-Bqr-1R9f.js} +2 -2
- package/dist/{MSignaturePad-CxOtelzE.js.map → MSignaturePad-Bqr-1R9f.js.map} +1 -1
- package/dist/MSlider-B7dIcHVn.js +745 -0
- package/dist/MSlider-B7dIcHVn.js.map +1 -0
- package/dist/{MSpinner-UCdtSOHP.js → MSpinner-CXLY7lWw.js} +2 -2
- package/dist/{MSpinner-UCdtSOHP.js.map → MSpinner-CXLY7lWw.js.map} +1 -1
- package/dist/{MTextField-CYk9yFvi.js → MTextField-CryHMs8-.js} +18 -18
- package/dist/MTextField-CryHMs8-.js.map +1 -0
- package/dist/MTooltip-Cn_DYm9M.js +90 -0
- package/dist/MTooltip-Cn_DYm9M.js.map +1 -0
- package/dist/{_popupPosition-nL8SVKPK.js → _popupPosition-C_lxj9qU.js} +7 -7
- package/dist/_popupPosition-C_lxj9qU.js.map +1 -0
- package/dist/{_useFieldValidation-B0B44M_t.js → _useFieldValidation-CvZnZfl-.js} +2 -2
- package/dist/{_useFieldValidation-B0B44M_t.js.map → _useFieldValidation-CvZnZfl-.js.map} +1 -1
- package/dist/api.json +1 -1
- package/dist/code-editor.js +129 -128
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MAddressField.vue.d.ts +1 -1
- package/dist/components/MAudioPlayer.vue.d.ts +1 -1
- package/dist/components/MAutocomplete.vue.d.ts +1 -1
- package/dist/components/MAvailabilityCalendar.vue.d.ts +3 -3
- package/dist/components/MBadge.vue.d.ts +2 -2
- package/dist/components/MBar.vue.d.ts +1 -1
- package/dist/components/MBeforeAfter.vue.d.ts +3 -3
- package/dist/components/MButton.vue.d.ts +1 -1
- package/dist/components/MCalendarHeatmap.vue.d.ts +1 -1
- package/dist/components/MChatBubble.vue.d.ts +1 -1
- package/dist/components/MCodeEditor.vue.d.ts +1 -1
- package/dist/components/MContainerTransform.vue.d.ts +1 -1
- package/dist/components/MCopyButton.vue.d.ts +2 -2
- package/dist/components/MCountrySelect.vue.d.ts +1 -1
- package/dist/components/MCreditCardInput.vue.d.ts +2 -2
- package/dist/components/MDiffViewer.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +2 -2
- package/dist/components/MExpansionPanel.vue.d.ts +1 -1
- package/dist/components/MExportButton.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +1 -1
- package/dist/components/MFilterBuilder.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +2 -2
- package/dist/components/MFloorPlan.vue.d.ts +2 -2
- package/dist/components/MFlow.vue.d.ts +2 -2
- package/dist/components/MFormRenderer.vue.d.ts +2 -2
- package/dist/components/MGantt.vue.d.ts +2 -2
- package/dist/components/MGanttControls.vue.d.ts +1 -1
- package/dist/components/MGrid.vue.d.ts +1 -1
- package/dist/components/MIcon.vue.d.ts +3 -5
- package/dist/components/MIconButton.vue.d.ts +1 -1
- package/dist/components/MLightbox.vue.d.ts +2 -2
- package/dist/components/MMapMeasure.vue.d.ts +2 -2
- package/dist/components/MMenu.vue.d.ts +6 -3
- package/dist/components/MMortgageCalculator.vue.d.ts +2 -2
- package/dist/components/MMultiAutocomplete.vue.d.ts +1 -1
- package/dist/components/MMultiSelect.vue.d.ts +1 -1
- package/dist/components/MNavigationDrawer.vue.d.ts +5 -4
- package/dist/components/MNavigationRail.vue.d.ts +1 -1
- package/dist/components/MNumberField.vue.d.ts +1 -1
- package/dist/components/MOdontogram.vue.d.ts +2 -2
- package/dist/components/MPhoneInput.vue.d.ts +2 -2
- package/dist/components/MPinInput.vue.d.ts +3 -3
- package/dist/components/MPosKeypad.vue.d.ts +1 -1
- package/dist/components/MProductConfigurator.vue.d.ts +1 -1
- package/dist/components/MResourceTimeline.vue.d.ts +2 -2
- package/dist/components/MRichTextEditor.vue.d.ts +1 -1
- package/dist/components/MScheme.vue.d.ts +1 -1
- package/dist/components/MSearchBar.vue.d.ts +2 -2
- package/dist/components/MSearchField.vue.d.ts +1 -1
- package/dist/components/MSeatMap.vue.d.ts +1 -1
- package/dist/components/MSeekBar.vue.d.ts +2 -2
- package/dist/components/MSelect.vue.d.ts +1 -1
- package/dist/components/MShortNavigationBar.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +1 -1
- package/dist/components/MSpreadsheet.vue.d.ts +2 -2
- package/dist/components/MStack.vue.d.ts +2 -2
- package/dist/components/MSubtitle.vue.d.ts +1 -1
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTagInput.vue.d.ts +1 -1
- package/dist/components/MText.vue.d.ts +1 -1
- package/dist/components/MTextField.vue.d.ts +3 -3
- package/dist/components/MTimeScroll.vue.d.ts +1 -1
- package/dist/components/MTimezoneSelect.vue.d.ts +1 -1
- package/dist/components/MTitle.vue.d.ts +1 -1
- package/dist/components/MToolbar.vue.d.ts +1 -1
- package/dist/components/MTooltip.vue.d.ts +1 -1
- package/dist/components/MTopAppBar.vue.d.ts +2 -2
- package/dist/components/MVitalsChart.vue.d.ts +1 -1
- package/dist/components/MWindow.vue.d.ts +3 -3
- package/dist/components/_MDrawerItemList.vue.d.ts +8 -1
- package/dist/composables/_fieldLayout.d.ts +8 -8
- package/dist/composables/_popupPosition.d.ts +3 -2
- package/dist/composables/_rtl.d.ts +26 -0
- package/dist/composables/useColorPalette.d.ts +1 -1
- package/dist/composables/useLocale.d.ts +4 -0
- package/dist/draw.js +5 -5
- package/dist/flow.js +2 -2
- package/dist/gantt.js +3 -3
- package/dist/locales/ar.d.ts +6 -0
- package/dist/locales/index.d.ts +1 -0
- package/dist/locales/index.js +768 -1
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +11961 -12040
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +1127 -1149
- package/dist/map.js.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/media.js +7 -7
- package/dist/pdf-sign.js +9 -9
- package/dist/pdf.js +1 -1
- package/dist/plugin.d.ts +8 -0
- package/dist/rich-text-editor.js +79 -78
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles/theme.css +13 -0
- package/dist/styles.css +1 -1
- package/dist/terminal.js +5 -2
- package/dist/terminal.js.map +1 -1
- package/dist/{useLocale-DL96OFgr.js → useLocale-ybIju59R.js} +3 -1
- package/dist/useLocale-ybIju59R.js.map +1 -0
- package/dist/vTooltip-xESB2YOb.js +154 -0
- package/dist/vTooltip-xESB2YOb.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/MAddressField.test.ts +1 -1
- package/src/__tests__/MChip.test.ts +3 -3
- package/src/__tests__/MFab.test.ts +6 -6
- package/src/__tests__/MListItemNestedControl.test.ts +2 -2
- package/src/__tests__/MScheduler.test.ts +1 -1
- package/src/__tests__/MTrackingTimeline.test.ts +1 -1
- package/src/__tests__/MWindow.test.ts +16 -0
- package/src/__tests__/fieldOverflow.test.ts +9 -9
- package/src/__tests__/hydration.test.ts +39 -0
- package/src/__tests__/localePresets.test.ts +2 -0
- package/src/__tests__/rtl.test.ts +167 -0
- package/src/__tests__/ssr.test.ts +6 -0
- package/src/components/MAlert.vue +1 -1
- package/src/components/MAutocomplete.vue +7 -7
- package/src/components/MAvailabilityCalendar.vue +5 -3
- package/src/components/MBadge.vue +12 -3
- package/src/components/MBar.vue +1 -1
- package/src/components/MBottomAppBar.vue +1 -1
- package/src/components/MCalendar.vue +3 -3
- package/src/components/MCalendarHeatmap.vue +3 -3
- package/src/components/MChatBubble.vue +3 -3
- package/src/components/MChip.vue +6 -6
- package/src/components/MCodeEditor.vue +7 -3
- package/src/components/MColorPicker.vue +1 -1
- package/src/components/MCommandPalette.vue +1 -1
- package/src/components/MContainerTransform.vue +1 -1
- package/src/components/MContextMenu.vue +1 -1
- package/src/components/MDataTable.vue +5 -5
- package/src/components/MDatePicker.vue +3 -2
- package/src/components/MDateRangePicker.vue +3 -2
- package/src/components/MDialog.vue +5 -5
- package/src/components/MDiffViewer.vue +1 -1
- package/src/components/MDivider.vue +1 -1
- package/src/components/MDragDropList.vue +1 -1
- package/src/components/MEmojiSelector.vue +11 -7
- package/src/components/MExpansionPanel.vue +1 -1
- package/src/components/MFab.vue +5 -5
- package/src/components/MFormBuilder.vue +3 -3
- package/src/components/MIcon.vue +14 -2
- package/src/components/MJsonEditor.vue +1 -3
- package/src/components/MJsonViewer.vue +1 -1
- package/src/components/MKanban.vue +2 -1
- package/src/components/MListDetail.vue +2 -2
- package/src/components/MListGroup.vue +1 -1
- package/src/components/MListItem.vue +5 -5
- package/src/components/MListSubheader.vue +1 -1
- package/src/components/MMapDraw.vue +3 -2
- package/src/components/MMapHover.vue +2 -1
- package/src/components/MMapMeasure.vue +2 -1
- package/src/components/MMapRoute.vue +2 -1
- package/src/components/MMarkdown.vue +9 -6
- package/src/components/MMaskField.vue +6 -6
- package/src/components/MMenu.vue +13 -6
- package/src/components/MMenuItem.vue +8 -6
- package/src/components/MMultiAutocomplete.vue +9 -8
- package/src/components/MMultiSelect.vue +9 -8
- package/src/components/MNavigationDrawer.vue +39 -27
- package/src/components/MNavigationRail.vue +28 -19
- package/src/components/MNavigationSuite.vue +1 -1
- package/src/components/MNotificationCenter.vue +1 -1
- package/src/components/MNotificationHost.vue +1 -1
- package/src/components/MNumberField.vue +6 -6
- package/src/components/MOrderTicket.vue +1 -1
- package/src/components/MPageProgress.vue +1 -1
- package/src/components/MPhoneInput.vue +5 -4
- package/src/components/MPinInput.vue +3 -2
- package/src/components/MPosKeypad.vue +2 -1
- package/src/components/MProductConfigurator.vue +2 -1
- package/src/components/MProgressBar.vue +2 -2
- package/src/components/MRichTextEditor.vue +8 -4
- package/src/components/MScheduler.vue +14 -14
- package/src/components/MSearchField.vue +1 -1
- package/src/components/MSeatMap.vue +2 -1
- package/src/components/MSegmentedButton.vue +1 -1
- package/src/components/MSelect.vue +7 -7
- package/src/components/MSideSheet.vue +3 -2
- package/src/components/MSimpleCarousel.vue +20 -11
- package/src/components/MSlider.vue +15 -5
- package/src/components/MSnackbar.vue +2 -2
- package/src/components/MSplitButton.vue +3 -2
- package/src/components/MSplitter.vue +6 -3
- package/src/components/MSpotlightSearch.vue +1 -1
- package/src/components/MSwitch.vue +5 -5
- package/src/components/MTable.vue +3 -3
- package/src/components/MTabs.vue +4 -1
- package/src/components/MTagInput.vue +6 -6
- package/src/components/MTerminal.vue +1 -1
- package/src/components/MText.vue +1 -1
- package/src/components/MTextField.vue +7 -7
- package/src/components/MTimePicker.vue +3 -2
- package/src/components/MTimePickerModal.vue +2 -2
- package/src/components/MTimeScroll.vue +1 -1
- package/src/components/MTimeline.vue +12 -12
- package/src/components/MToolbar.vue +3 -3
- package/src/components/MTrackingTimeline.vue +3 -2
- package/src/components/MTransition.vue +8 -3
- package/src/components/MTreeTable.vue +1 -1
- package/src/components/MTypewriter.vue +1 -1
- package/src/components/MVirtualTable.vue +2 -2
- package/src/components/MWindow.vue +4 -3
- package/src/components/_MColorPanel.vue +5 -4
- package/src/components/_MDrawerItemList.vue +9 -5
- package/src/components/_MMapAttribution.vue +2 -1
- package/src/components/_MMonthYearButton.vue +1 -1
- package/src/components/_MTransferPane.vue +8 -1
- package/src/components/_MTreeNode.vue +3 -3
- package/src/components/_MYearGrid.vue +4 -2
- package/src/composables/_fieldLayout.ts +19 -19
- package/src/composables/_popupPosition.ts +5 -3
- package/src/composables/_rtl.ts +76 -0
- package/src/composables/_useMenuNav.ts +24 -17
- package/src/composables/_useSheetMotion.ts +10 -3
- package/src/composables/useLocale.ts +6 -0
- package/src/locales/ar.ts +798 -0
- package/src/locales/de.ts +2 -0
- package/src/locales/es.ts +2 -0
- package/src/locales/fr.ts +2 -0
- package/src/locales/index.ts +1 -0
- package/src/locales/ja.ts +2 -0
- package/src/locales/ko.ts +2 -0
- package/src/locales/pt.ts +2 -0
- package/src/locales/zh.ts +2 -0
- package/src/plugin.ts +10 -0
- package/src/styles/theme.css +13 -0
- package/dist/MColorPickerModal-Dajjf6tH.js.map +0 -1
- package/dist/MIcon-DpajuUTJ.js +0 -33
- package/dist/MIcon-DpajuUTJ.js.map +0 -1
- package/dist/MListItem-DiOAxaN7.js.map +0 -1
- package/dist/MMenuItem-BuxYoASE.js +0 -574
- package/dist/MMenuItem-BuxYoASE.js.map +0 -1
- package/dist/MSlider-D_O8J9YH.js +0 -739
- package/dist/MSlider-D_O8J9YH.js.map +0 -1
- package/dist/MTextField-CYk9yFvi.js.map +0 -1
- package/dist/MTooltip-CK39Zon4.js +0 -183
- package/dist/MTooltip-CK39Zon4.js.map +0 -1
- package/dist/_popupPosition-nL8SVKPK.js.map +0 -1
- package/dist/useLocale-DL96OFgr.js.map +0 -1
package/dist/API.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @m3ui-vue/m3ui-vue 1.
|
|
1
|
+
# @m3ui-vue/m3ui-vue 1.9.0 — API reference
|
|
2
2
|
|
|
3
3
|
Material Design 3 components for Vue 3 + Tailwind CSS v4. Generated from the source by
|
|
4
4
|
`scripts/generate-api.mjs`; full docs with live demos at https://m3ui.dev.
|
|
@@ -380,14 +380,16 @@ Props:
|
|
|
380
380
|
- `dot?: boolean` — Show a small dot instead of a number
|
|
381
381
|
- `color?: "error" | "primary" | "secondary" | "tertiary" = "error"` — Badge color
|
|
382
382
|
- `max?: number = 99` — Max value before showing "N+"
|
|
383
|
-
- `position?: BadgePosition = "top-
|
|
383
|
+
- `position?: BadgePosition = "top-end"` — Corner where the badge is placed. `start`/`end` follow the reading direction (`top-end` is the top right, or the top left in a right-to-left page); `left`/`right` don't
|
|
384
384
|
- `overlap?: BadgeOverlap = "edge"` — How much the badge overlaps the content
|
|
385
385
|
|
|
386
386
|
Slots:
|
|
387
387
|
- `#default` — The element the badge sits on.
|
|
388
388
|
|
|
389
389
|
```ts
|
|
390
|
-
export type BadgePosition =
|
|
390
|
+
export type BadgePosition =
|
|
391
|
+
| 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start'
|
|
392
|
+
| 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
|
|
391
393
|
```
|
|
392
394
|
|
|
393
395
|
```ts
|
|
@@ -1189,7 +1191,7 @@ Material's container transform: an element (a card, a list item, an image, a FAB
|
|
|
1189
1191
|
|
|
1190
1192
|
Props:
|
|
1191
1193
|
- `controller?: ContainerTransformController<T>` — A `useContainerTransform()` controller, to open it from elements elsewhere (`controller.open($event, item)`)
|
|
1192
|
-
- `mode?: "fullscreen" | "dialog" | "custom" = "fullscreen"` — Where the expanded view opens: over the whole screen, as a centered panel (wider screens), or `custom`: the classes you give the component place and size it (`bottom-4
|
|
1194
|
+
- `mode?: "fullscreen" | "dialog" | "custom" = "fullscreen"` — Where the expanded view opens: over the whole screen, as a centered panel (wider screens), or `custom`: the classes you give the component place and size it (`bottom-4 end-4 w-80 h-96`, `inset-y-0 end-0 w-96`…), anywhere over the page
|
|
1193
1195
|
- `maxWidth?: string = "560px"` — The centered panel's maximum width (`dialog` mode)
|
|
1194
1196
|
- `label?: string` — Accessible name of the expanded view
|
|
1195
1197
|
- `scrim?: boolean = true` — Dims the page behind it, which makes it modal (scroll lock, `aria-modal`). Without one the page stays usable: a click outside closes it instead (unless `persistent`)
|
|
@@ -2786,13 +2788,14 @@ export interface HotkeyBinding {
|
|
|
2786
2788
|
|
|
2787
2789
|
### MIcon
|
|
2788
2790
|
|
|
2789
|
-
Renders a Material Symbols Outlined glyph by name. Color follows the surrounding text color (set it with a Tailwind text-* class). Decorative by default: hidden from assistive technology, which would otherwise read the glyph's ligature text (its name, e.g. "arrow_drop_down"). Give it a `label` when the icon says something on its own.
|
|
2791
|
+
Renders a Material Symbols Outlined glyph by name. Color follows the surrounding text color (set it with a Tailwind text-* class). Decorative by default: hidden from assistive technology, which would otherwise read the glyph's ligature text (its name, e.g. "arrow_drop_down"). Give it a `label` when the icon says something on its own. In a right-to-left layout (`dir="rtl"` on the page or any ancestor), icons that point along the reading direction (`arrow_back`, `chevron_right`, `send`, `undo`…, see `MIRRORED_ICONS`) are drawn mirrored, as Android's auto-mirrored icons are; `mirror` forces it on or off for one icon.
|
|
2790
2792
|
|
|
2791
2793
|
Props:
|
|
2792
2794
|
- `name: string` — Material Symbol name (e.g. "settings", "favorite")
|
|
2793
2795
|
- `size?: number = 24` — Icon size in px
|
|
2794
2796
|
- `filled?: boolean = false` — Filled glyph (the Material Symbols FILL axis), as M3 draws a selected icon
|
|
2795
2797
|
- `label?: string` — What the icon means, when nothing next to it says so: makes it an image with this name instead of decoration
|
|
2798
|
+
- `mirror?: boolean` — Mirror the glyph in a right-to-left layout. By default, only the directional icons in `MIRRORED_ICONS` are
|
|
2796
2799
|
|
|
2797
2800
|
### MIconButton
|
|
2798
2801
|
|
|
@@ -3732,7 +3735,7 @@ export interface MentionRef {
|
|
|
3732
3735
|
A trigger-based dropdown menu, composed with `MMenuItem` and `MMenuDivider`. Items support unlimited-depth nested submenus via the `#children` slot.
|
|
3733
3736
|
|
|
3734
3737
|
Props:
|
|
3735
|
-
- `align?: "right" | "left" = "
|
|
3738
|
+
- `align?: "right" | "left" | "start" | "end" = "end"` — Which edge of the trigger the dropdown aligns to. `start`/`end` follow the reading direction (`end` is the right edge, or the left one in a right-to-left page)
|
|
3736
3739
|
- `submenuMode?: "push" | "flyout" = "flyout"` — How items with a `#children` slot behave. `'flyout'` opens a hover-positioned side panel (desktop). `'push'` replaces the panel's own content with the submenu and a back header — no positioning math, works with touch. Useful for mobile.
|
|
3737
3740
|
- `variant?: "standard" | "expressive" = "standard"` — 'standard' is M3's baseline menu (4dp corners). 'expressive' is M3's rounder 'vertical menu' styling (16dp corners) — combine with `<MMenuDivider gap />` to split the panel into independently-rounded groups with a visible gap, instead of a plain divider line.
|
|
3738
3741
|
|
|
@@ -3973,7 +3976,7 @@ Props:
|
|
|
3973
3976
|
- `collapsed?: boolean` — Compact mode (72px) showing only icons — inline variant only
|
|
3974
3977
|
- `collapsedLabels?: boolean` — In `collapsed` mode, shows each item's label under its icon, with the selection on a 56×32 pill around the icon, like MNavigationRail's collapsed items — nested items included
|
|
3975
3978
|
- `width?: string` — Custom drawer width (e.g. "320px", "25rem"). Defaults to 22.5rem (360px)
|
|
3976
|
-
- `side?: "top" | "right" | "bottom" | "left" = "
|
|
3979
|
+
- `side?: "top" | "right" | "bottom" | "left" | "start" | "end" = "start"` — Which side the drawer opens from. `start` is the left edge, or the right one in a right-to-left page, and `end` the other one. Top/bottom are only available for the modal variant — the inline variant always renders on one side.
|
|
3977
3980
|
- `swipeEnabled?: boolean = true` — Lets the modal drawer be swiped closed toward its edge; with false it only closes through v-model or the scrim
|
|
3978
3981
|
- `expandSelected?: boolean = true` — Opens the groups that hold the selected item (and the selected item, if it's a group) whenever `selected` changes
|
|
3979
3982
|
- `accordion?: boolean = false` — Keeps one group open per level: opening a group, by hand or through `expandSelected`, closes its siblings
|
|
@@ -4494,7 +4497,7 @@ Exposed (template ref):
|
|
|
4494
4497
|
|
|
4495
4498
|
### MPinInput
|
|
4496
4499
|
|
|
4497
|
-
One box per character for OTP/PIN/verification codes. Typing advances to the next box, backspace on an empty box goes back, and pasting a full code fills every box at once.
|
|
4500
|
+
One box per character for OTP/PIN/verification codes. Typing advances to the next box, backspace on an empty box goes back, and pasting a full code fills every box at once. The boxes read left to right in a right-to-left page too, as codes do.
|
|
4498
4501
|
|
|
4499
4502
|
Props:
|
|
4500
4503
|
- `modelValue: string = ""` (v-model) — Bound code (v-model), e.g. "1234"
|
|
@@ -5525,7 +5528,7 @@ export interface ShortNavBarItem {
|
|
|
5525
5528
|
|
|
5526
5529
|
### MSideSheet
|
|
5527
5530
|
|
|
5528
|
-
A panel that slides in from the
|
|
5531
|
+
A panel that slides in from the end edge of the screen (the right, or the left in a right-to-left page). Supports drag-to-dismiss from its inner edge, or tapping the scrim.
|
|
5529
5532
|
|
|
5530
5533
|
Props:
|
|
5531
5534
|
- `modelValue: boolean` (v-model) — Open/closed state (v-model)
|
|
@@ -9839,6 +9842,14 @@ export interface M3UIOptions {
|
|
|
9839
9842
|
* that window size instead of compact.
|
|
9840
9843
|
*/
|
|
9841
9844
|
initialState?: M3InitialState
|
|
9845
|
+
/**
|
|
9846
|
+
* Server-side rendering of a right-to-left app: the page's reading direction (the `dir` its `<html>` gets). The
|
|
9847
|
+
* server has no page to read it from, so without it what's placed by the direction at render time (which edge
|
|
9848
|
+
* `MNavigationDrawer` sits on) renders left to right there and jumps once hydrated. Not needed in an app rendered
|
|
9849
|
+
* only in the browser, where the components read `dir` from the page; a `dir` set on an inner element is still
|
|
9850
|
+
* followed by layout either way.
|
|
9851
|
+
*/
|
|
9852
|
+
dir?: 'ltr' | 'rtl'
|
|
9842
9853
|
}
|
|
9843
9854
|
```
|
|
9844
9855
|
|
|
@@ -10445,6 +10456,10 @@ export interface M3Locale {
|
|
|
10445
10456
|
formBuilderCopy: string
|
|
10446
10457
|
/** MFormBuilder */
|
|
10447
10458
|
formBuilderCopied: string
|
|
10459
|
+
/** MCodeEditor: copy button's tooltip and label */
|
|
10460
|
+
codeCopy: string
|
|
10461
|
+
/** MCodeEditor: shown once the code is copied */
|
|
10462
|
+
codeCopied: string
|
|
10448
10463
|
/** MFormBuilder: what the preview submitted */
|
|
10449
10464
|
formBuilderSubmitted: string
|
|
10450
10465
|
/** MFormBuilder: the inspector with nothing selected */
|
|
@@ -11761,9 +11776,9 @@ export interface FilterGroup {
|
|
|
11761
11776
|
## Locale
|
|
11762
11777
|
|
|
11763
11778
|
`M3Locale` keys (pass a partial object to `createM3UI({ locale })`; presets from `@m3ui-vue/m3ui-vue/locales`:
|
|
11764
|
-
`esLocale`, `frLocale`, `ptLocale`, `deLocale`, `jaLocale`, `zhLocale`, `koLocale`):
|
|
11779
|
+
`esLocale`, `frLocale`, `ptLocale`, `deLocale`, `jaLocale`, `zhLocale`, `koLocale`, `arLocale`):
|
|
11765
11780
|
|
|
11766
|
-
lang, search, noResults, close, cancel, confirm, loading, menu, previous, next, today, more, selectedCount, recordCount, expand, collapse, clear, columns, exportCsv, noGroup, finish, dropText, selectText, maxSizePrefix, remove, selectDate, ok, dateToggleInput, dateToggleCalendar, dateSwitchToYear, dateSwitchToDay, heatmapLess, heatmapMore, meterRemaining, meterUsedOf, phoneCountry, phoneSearchCountry, phoneInvalid, dateInputLabel, selectTime, timeHourSelection, timeMinuteSelection, timePeriodToggle, timeToggleKeyboard, timeToggleDial, timeToggleScroll, sheetExpand, sheetCollapse, sheetDismiss, seekBar, seekBarValue, seekBarShowRemaining, seekBarShowDuration, selectRange, pickStart, pickEnd, previousMonth, nextMonth, selectColor, colorHue, colorSaturation, colorBrightness, colorAlpha, colorEyedropper, colorOriginal, colorFormat, colorRecent, colorPresets, dayView, weekView, allDay, emojiSearch, emojiNoResults, emojiRecent, emojiSkinTone, emojiSkinTones, emojiCategorySmileys, emojiCategoryGestures, emojiCategoryPeople, emojiCategoryAnimals, emojiCategoryNature, emojiCategoryFood, emojiCategoryActivities, emojiCategoryTravel, emojiCategoryObjects, emojiCategorySymbols, emojiCategoryFlags, available, selected, noItems, moveAllRight, moveRight, moveLeft, moveAllLeft, searchCommand, navigateHint, selectHint, openHint, closeHint, loadingMore, noMoreItems, bold, italic, underline, strikethrough, highlight, bulletList, orderedList, blockquote, code, alignLeft, alignCenter, alignRight, undo, redo, link, image, paragraph, heading1, heading2, heading3, insertLink, insertImage, imageUrlLabel, insert, jsonValid, jsonInvalid, jsonFormat, jsonMinify, jsonElements, jsonFields, resultSuccessTitle, resultSuccessDesc, resultErrorTitle, resultErrorDesc, resultWarningTitle, resultWarningDesc, resultInfoTitle, resultInfoDesc, result404Title, result404Desc, result403Title, result403Desc, result500Title, result500Desc, chatTyping, chatRecordingAudio, reorderHandle, reorderGrabbed, reorderMoved, reorderDropped, reorderCancelled, selectAll, clearSearch, kanbanMoved, windowMinimize, windowMaximize, windowRestore, paginationRange, paginationPage, previousPage, nextPage, carousel, carouselItem, sparklineSummary, sliderRangeStart, sliderRangeEnd, mapTitle, mapMarker, mapZoomIn, mapZoomOut, mapResetBearing, mapFindMyLocation, mapLocationNotAvailable, mapEnterFullscreen, mapExitFullscreen, mapToggleAttribution, mapFeedback, mapCtrlScroll, mapCmdScroll, mapTwoFingers, mapLayers, mapSearchLayers, mapNoLayers, mapShowLayer, mapHideLayer, mapOpacity, mapClusterZoom, mapDownload, mapNoBaseLayer, mapHoverInfo, mapNoValue, mapMeasureDistance, mapMeasureArea, mapClearMeasurements, mapDeleteMeasurement, mapDrawPoint, mapDrawLine, mapDrawPolygon, mapDeleteFeature, mapTotal, mapSearchPlaces, mapAddress, mapPressEnterToSearch, mapSearching, mapNoPlaces, mapRouteStop, mapRouteVehicle, spreadsheet, spreadsheetFormula, spreadsheetName, formSubmit, formBuilderEdit, formBuilderPreview, formBuilderJson, formBuilderAddField, formBuilderEmpty, formBuilderForm, formBuilderTitle, formBuilderDescription, formBuilderSubmitLabel, formBuilderLabel, formBuilderName, formBuilderPlaceholder, formBuilderHint, formBuilderRequired, formBuilderWidth, formBuilderWidthFull, formBuilderWidthHalf, formBuilderWidthThird, formBuilderWidthTwoThirds, formBuilderOptions, formBuilderMin, formBuilderMax, formBuilderStep, formBuilderMinLength, formBuilderMaxLength, formBuilderPattern, formBuilderPatternMessage, formBuilderRows, formBuilderShowWhen, formBuilderAlways, formBuilderEquals, formBuilderDuplicate, formBuilderDelete, formBuilderCopy, formBuilderCopied, formBuilderSubmitted, formBuilderSelectField, formFieldText, formFieldEmail, formFieldPassword, formFieldTel, formFieldUrl, formFieldTextarea, formFieldNumber, formFieldSelect, formFieldAutocomplete, formFieldRadio, formFieldCheckbox, formFieldSwitch, formFieldDate, formFieldTime, formFieldSlider, formFieldRating, formFieldPhone, formFieldHeading, formFieldDivider, pdfSignSignature, pdfSignInitials, pdfSignName, pdfSignDate, pdfSignText, pdfSignCheckbox, pdfSignHere, pdfSignNext, pdfSignFinish, pdfSignProgress, pdfSignDraw, pdfSignTypeIt, pdfSignAdopt, pdfSignAddField, pdfSignRequired, pdfSignDelete, pdfSignComplete, trackingArrives, trackingArrivingNow, trackingDelivered, trackingDelayed, trackingCanceled, trackingShowDetails, trackingHideDetails, filterMatchAll, filterMatchAny, filterAddCondition, filterAddGroup, filterRemoveCondition, filterRemoveGroup, filterField, filterOperator, filterValue, filterFrom, filterTo, filterNoConditions, filterOpContains, filterOpNotContains, filterOpEquals, filterOpNotEquals, filterOpStartsWith, filterOpEndsWith, filterOpGt, filterOpGte, filterOpLt, filterOpLte, filterOpBetween, filterOpIn, filterOpNotIn, filterOpIsTrue, filterOpIsFalse, filterOpIsEmpty, filterOpIsNotEmpty, filterOpAfter, filterOpBefore, cronExpression, cronInvalid, cronNextRuns, cronFreqMinutes, cronFreqHourly, cronFreqDaily, cronFreqWeekly, cronFreqMonthly, cronFreqCustom, cronEvery, cronMinute, cronTime, cronDayOfMonth, cronEveryMinute, cronEveryNMinutes, cronHourlyAt, cronAt, cronEveryNHoursAt, cronMinutesOfHours, cronOnDaysOfMonth, cronInMonths, cronRange, country, timeZone, cameraStart, cameraStarting, cameraCapture, cameraRetake, cameraUsePhoto, cameraSwitch, cameraDenied, cameraUnavailable, cameraUnsupported, cameraFailed, qrHint, qrUnsupported, recorderStart, recorderStop, recorderPause, recorderResume, recorderDiscard, recorderUse, recorderPlay, recorderPausePlayback, recorderRecording, micDenied, micUnavailable, micUnsupported, dashGrabbed, dashPlaced, dashDropped, dashCancelled, dashResize, diffUnchanged, diffSplit, diffUnified, diffNoChanges, notifTitle, notifMarkAllRead, notifAll, notifUnread, notifEmpty, notifToday, notifYesterday, notifDismiss, notifMarkRead, notifMarkUnread, timelineShowMore, timelineShowLess, mediaPlayer, mediaPlay, mediaPause, mediaReplay, mediaSeekBack, mediaSeekForward, mediaSeconds, mediaMute, mediaUnmute, mediaVolume, mediaFullscreen, mediaExitFullscreen, mediaPictureInPicture, mediaSettings, mediaSpeed, mediaSpeedNormal, mediaSubtitles, mediaSubtitlesOff, mediaQuality, mediaQualityAuto, mediaLive, mediaError, mediaRepeat, mediaRepeatOne, mediaShuffle, pdfViewer, pdfThumbnails, pdfOutline, pdfPage, pdfZoom, pdfZoomIn, pdfZoomOut, pdfFitWidth, pdfFitPage, pdfSearch, pdfSearchPrevious, pdfSearchNext, pdfMatchCount, pdfNoMatches, pdfMore, pdfRotate, pdfDownload, pdfPrint, pdfFullscreen, pdfExitFullscreen, pdfPassword, pdfPasswordLabel, pdfWrongPassword, pdfOpen, pdfError, pdfLoading, pdfAnnotate, pdfSelect, pdfHighlight, pdfNote, pdfDraw, pdfEraser, pdfInkWidth, pdfColor, pdfUndo, pdfCopy, pdfDelete, pdfNotePlaceholder, pdfAddComment, flowCanvas, flowNode, flowEdge, flowZoomIn, flowZoomOut, flowFitView, flowLock, flowUnlock, flowUndo, flowRedo, flowMinimap, flowMoved, flowConnected, flowDeleted, flowDeleteEdge, flowDelete, ganttChart, ganttTask, ganttStart, ganttEnd, ganttDuration, ganttProgress, ganttDays, ganttHours, ganttMilestone, ganttQuarter, ganttToday, ganttZoomIn, ganttZoomOut, ganttExpandAll, ganttCollapseAll, ganttExpand, ganttCollapse, ganttUndo, ganttRedo, ganttScaleHour, ganttScaleDay, ganttScaleWeek, ganttScaleMonth, ganttScaleQuarter, ganttScaleYear, ganttMoved, ganttProgressSet, ganttLinked, ganttUnlink, ganttDeleted, ganttDelete, ganttReordered, ganttSlack, ganttCritical, ganttBaseline, ganttEmpty, ganttResize, ganttFit, ganttShowList, ganttHideList, timelineResource, timelineConflict, timelineMoved, timelineEmpty, cropArea, cropRotateLeft, cropRotateRight, cropFlip, cropReset, cropFree, drawCanvas, drawTools, drawMore, drawSelect, drawPan, drawPen, drawBrush, drawMarker, drawHighlighter, drawEraser, drawStrokeEraser, drawLine, drawArrow, drawRect, drawEllipse, drawText, drawFill, drawColor, floorPlan, floorSeats, floorRotate, floorTools, floorMove, floorDrawWall, floorDrawZone, floorAddTable, floorAddDecor, floorDuplicate, floorDelete, floorUndo, floorRedo, floorLabel, floorSeatsField, floorShape, floorRound, floorSquare, floorLong, floorAngle, floorFlip, floorZoomIn, floorZoomOut, floorZoomFit, floorOverlaps, floorSeatN, floorDrawShape, floorShapeHint, floorColor, floorThickness, floorWidth, floorHeight, floorMerge, floorSplit, floorNothingPicked, floorTablesPicked, floorTableN, floorZone, floorWall, floorDeleteCorner, floorFinishWall, floorCancel, floorDecorDoor, floorDecorWindow, floorDecorPlant, floorDecorColumn, floorDecorRestroom, floorDecorKitchen, floorDecorRegister, floorDecorStairs, floorDecorLabel, drawCustomColor, drawSize, drawUndo, drawRedo, drawDelete, drawLayers, drawLayer, drawLayerName, drawAddLayer, drawDeleteLayer, drawShowLayer, drawHideLayer, drawLockLayer, drawUnlockLayer, drawLayerUp, drawLayerDown, compareBefore, compareAfter, compareSlider, cardNumber, cardExpiry, cardCvc, cardName, cardInvalidNumber, cardInvalidExpiry, cardInvalidCvc, validationRequired, validationInvalid, validationEmail, validationUrl, validationMinLength, validationMaxLength, validationMinItems, validationMaxItems, validationMin, validationMax, validationPattern, validationSameAs, keypadDelete, keypadClear, keypadChange, keypadRemaining, seatStage, seatAvailable, seatSelected, seatOccupied, seatLabel, receiptSubtotal, receiptTotal, receiptPaid, receiptChange, configRequired, configOptional, configChooseUpTo, configChooseAtLeast, configChooseExactly, configUnavailable, configQuantity, configIncrease, configDecrease, availNight, availNights, availMinNights, availCheckIn, availCheckOut, availSelectCheckIn, availSelectCheckOut, availUnavailable, chartOpen, chartHigh, chartLow, chartClose, chartVolume, bookPrice, bookSize, bookTotal, bookSpread, mortgagePrice, mortgageDown, mortgageRate, mortgageTerm, mortgageYears, mortgageLoan, mortgageMonthly, mortgageFirstPayment, mortgageLastPayment, mortgagePrincipal, mortgageInterest, mortgageTotal, mortgageSchedule, mortgageYear, mortgageBalance, bodyFront, bodyBack, bodyRight, bodyLeft, bodyRear, bodyHead, bodyNeck, bodyChest, bodyAbdomen, bodyPelvis, bodyShoulder, bodyUpperArm, bodyForearm, bodyHand, bodyThigh, bodyKnee, bodyLeg, bodyFoot, bodyUpperBack, bodyLowerBack, bodyGlute, bodyCalf, odontoTooth, odontoUpper, odontoLower, odontoMesial, odontoDistal, odontoBuccal, odontoLingual, odontoOcclusal, odontoCaries, odontoFilling, odontoSealant, odontoCrown, odontoRootCanal, odontoImplant, odontoMissing, odontoExtraction, odontoEraser, vitalsNormal, vitalsHigh, vitalsLow, vitalsNoData, quizCheck, quizNext, quizFinish, quizCorrect, quizIncorrect, quizCorrectAnswer, quizQuestionOf, quizScore, quizPassed, quizFailed, quizRetry, quizTrue, quizFalse, quizSelectAll, quizOrderHint, quizMoveUp, quizMoveDown, quizTypeAnswer, quizTimeLeft, quizReview, certTitle, certPresentedTo, certDate, certId
|
|
11781
|
+
lang, search, noResults, close, cancel, confirm, loading, menu, previous, next, today, more, selectedCount, recordCount, expand, collapse, clear, columns, exportCsv, noGroup, finish, dropText, selectText, maxSizePrefix, remove, selectDate, ok, dateToggleInput, dateToggleCalendar, dateSwitchToYear, dateSwitchToDay, heatmapLess, heatmapMore, meterRemaining, meterUsedOf, phoneCountry, phoneSearchCountry, phoneInvalid, dateInputLabel, selectTime, timeHourSelection, timeMinuteSelection, timePeriodToggle, timeToggleKeyboard, timeToggleDial, timeToggleScroll, sheetExpand, sheetCollapse, sheetDismiss, seekBar, seekBarValue, seekBarShowRemaining, seekBarShowDuration, selectRange, pickStart, pickEnd, previousMonth, nextMonth, selectColor, colorHue, colorSaturation, colorBrightness, colorAlpha, colorEyedropper, colorOriginal, colorFormat, colorRecent, colorPresets, dayView, weekView, allDay, emojiSearch, emojiNoResults, emojiRecent, emojiSkinTone, emojiSkinTones, emojiCategorySmileys, emojiCategoryGestures, emojiCategoryPeople, emojiCategoryAnimals, emojiCategoryNature, emojiCategoryFood, emojiCategoryActivities, emojiCategoryTravel, emojiCategoryObjects, emojiCategorySymbols, emojiCategoryFlags, available, selected, noItems, moveAllRight, moveRight, moveLeft, moveAllLeft, searchCommand, navigateHint, selectHint, openHint, closeHint, loadingMore, noMoreItems, bold, italic, underline, strikethrough, highlight, bulletList, orderedList, blockquote, code, alignLeft, alignCenter, alignRight, undo, redo, link, image, paragraph, heading1, heading2, heading3, insertLink, insertImage, imageUrlLabel, insert, jsonValid, jsonInvalid, jsonFormat, jsonMinify, jsonElements, jsonFields, resultSuccessTitle, resultSuccessDesc, resultErrorTitle, resultErrorDesc, resultWarningTitle, resultWarningDesc, resultInfoTitle, resultInfoDesc, result404Title, result404Desc, result403Title, result403Desc, result500Title, result500Desc, chatTyping, chatRecordingAudio, reorderHandle, reorderGrabbed, reorderMoved, reorderDropped, reorderCancelled, selectAll, clearSearch, kanbanMoved, windowMinimize, windowMaximize, windowRestore, paginationRange, paginationPage, previousPage, nextPage, carousel, carouselItem, sparklineSummary, sliderRangeStart, sliderRangeEnd, mapTitle, mapMarker, mapZoomIn, mapZoomOut, mapResetBearing, mapFindMyLocation, mapLocationNotAvailable, mapEnterFullscreen, mapExitFullscreen, mapToggleAttribution, mapFeedback, mapCtrlScroll, mapCmdScroll, mapTwoFingers, mapLayers, mapSearchLayers, mapNoLayers, mapShowLayer, mapHideLayer, mapOpacity, mapClusterZoom, mapDownload, mapNoBaseLayer, mapHoverInfo, mapNoValue, mapMeasureDistance, mapMeasureArea, mapClearMeasurements, mapDeleteMeasurement, mapDrawPoint, mapDrawLine, mapDrawPolygon, mapDeleteFeature, mapTotal, mapSearchPlaces, mapAddress, mapPressEnterToSearch, mapSearching, mapNoPlaces, mapRouteStop, mapRouteVehicle, spreadsheet, spreadsheetFormula, spreadsheetName, formSubmit, formBuilderEdit, formBuilderPreview, formBuilderJson, formBuilderAddField, formBuilderEmpty, formBuilderForm, formBuilderTitle, formBuilderDescription, formBuilderSubmitLabel, formBuilderLabel, formBuilderName, formBuilderPlaceholder, formBuilderHint, formBuilderRequired, formBuilderWidth, formBuilderWidthFull, formBuilderWidthHalf, formBuilderWidthThird, formBuilderWidthTwoThirds, formBuilderOptions, formBuilderMin, formBuilderMax, formBuilderStep, formBuilderMinLength, formBuilderMaxLength, formBuilderPattern, formBuilderPatternMessage, formBuilderRows, formBuilderShowWhen, formBuilderAlways, formBuilderEquals, formBuilderDuplicate, formBuilderDelete, formBuilderCopy, formBuilderCopied, codeCopy, codeCopied, formBuilderSubmitted, formBuilderSelectField, formFieldText, formFieldEmail, formFieldPassword, formFieldTel, formFieldUrl, formFieldTextarea, formFieldNumber, formFieldSelect, formFieldAutocomplete, formFieldRadio, formFieldCheckbox, formFieldSwitch, formFieldDate, formFieldTime, formFieldSlider, formFieldRating, formFieldPhone, formFieldHeading, formFieldDivider, pdfSignSignature, pdfSignInitials, pdfSignName, pdfSignDate, pdfSignText, pdfSignCheckbox, pdfSignHere, pdfSignNext, pdfSignFinish, pdfSignProgress, pdfSignDraw, pdfSignTypeIt, pdfSignAdopt, pdfSignAddField, pdfSignRequired, pdfSignDelete, pdfSignComplete, trackingArrives, trackingArrivingNow, trackingDelivered, trackingDelayed, trackingCanceled, trackingShowDetails, trackingHideDetails, filterMatchAll, filterMatchAny, filterAddCondition, filterAddGroup, filterRemoveCondition, filterRemoveGroup, filterField, filterOperator, filterValue, filterFrom, filterTo, filterNoConditions, filterOpContains, filterOpNotContains, filterOpEquals, filterOpNotEquals, filterOpStartsWith, filterOpEndsWith, filterOpGt, filterOpGte, filterOpLt, filterOpLte, filterOpBetween, filterOpIn, filterOpNotIn, filterOpIsTrue, filterOpIsFalse, filterOpIsEmpty, filterOpIsNotEmpty, filterOpAfter, filterOpBefore, cronExpression, cronInvalid, cronNextRuns, cronFreqMinutes, cronFreqHourly, cronFreqDaily, cronFreqWeekly, cronFreqMonthly, cronFreqCustom, cronEvery, cronMinute, cronTime, cronDayOfMonth, cronEveryMinute, cronEveryNMinutes, cronHourlyAt, cronAt, cronEveryNHoursAt, cronMinutesOfHours, cronOnDaysOfMonth, cronInMonths, cronRange, country, timeZone, cameraStart, cameraStarting, cameraCapture, cameraRetake, cameraUsePhoto, cameraSwitch, cameraDenied, cameraUnavailable, cameraUnsupported, cameraFailed, qrHint, qrUnsupported, recorderStart, recorderStop, recorderPause, recorderResume, recorderDiscard, recorderUse, recorderPlay, recorderPausePlayback, recorderRecording, micDenied, micUnavailable, micUnsupported, dashGrabbed, dashPlaced, dashDropped, dashCancelled, dashResize, diffUnchanged, diffSplit, diffUnified, diffNoChanges, notifTitle, notifMarkAllRead, notifAll, notifUnread, notifEmpty, notifToday, notifYesterday, notifDismiss, notifMarkRead, notifMarkUnread, timelineShowMore, timelineShowLess, mediaPlayer, mediaPlay, mediaPause, mediaReplay, mediaSeekBack, mediaSeekForward, mediaSeconds, mediaMute, mediaUnmute, mediaVolume, mediaFullscreen, mediaExitFullscreen, mediaPictureInPicture, mediaSettings, mediaSpeed, mediaSpeedNormal, mediaSubtitles, mediaSubtitlesOff, mediaQuality, mediaQualityAuto, mediaLive, mediaError, mediaRepeat, mediaRepeatOne, mediaShuffle, pdfViewer, pdfThumbnails, pdfOutline, pdfPage, pdfZoom, pdfZoomIn, pdfZoomOut, pdfFitWidth, pdfFitPage, pdfSearch, pdfSearchPrevious, pdfSearchNext, pdfMatchCount, pdfNoMatches, pdfMore, pdfRotate, pdfDownload, pdfPrint, pdfFullscreen, pdfExitFullscreen, pdfPassword, pdfPasswordLabel, pdfWrongPassword, pdfOpen, pdfError, pdfLoading, pdfAnnotate, pdfSelect, pdfHighlight, pdfNote, pdfDraw, pdfEraser, pdfInkWidth, pdfColor, pdfUndo, pdfCopy, pdfDelete, pdfNotePlaceholder, pdfAddComment, flowCanvas, flowNode, flowEdge, flowZoomIn, flowZoomOut, flowFitView, flowLock, flowUnlock, flowUndo, flowRedo, flowMinimap, flowMoved, flowConnected, flowDeleted, flowDeleteEdge, flowDelete, ganttChart, ganttTask, ganttStart, ganttEnd, ganttDuration, ganttProgress, ganttDays, ganttHours, ganttMilestone, ganttQuarter, ganttToday, ganttZoomIn, ganttZoomOut, ganttExpandAll, ganttCollapseAll, ganttExpand, ganttCollapse, ganttUndo, ganttRedo, ganttScaleHour, ganttScaleDay, ganttScaleWeek, ganttScaleMonth, ganttScaleQuarter, ganttScaleYear, ganttMoved, ganttProgressSet, ganttLinked, ganttUnlink, ganttDeleted, ganttDelete, ganttReordered, ganttSlack, ganttCritical, ganttBaseline, ganttEmpty, ganttResize, ganttFit, ganttShowList, ganttHideList, timelineResource, timelineConflict, timelineMoved, timelineEmpty, cropArea, cropRotateLeft, cropRotateRight, cropFlip, cropReset, cropFree, drawCanvas, drawTools, drawMore, drawSelect, drawPan, drawPen, drawBrush, drawMarker, drawHighlighter, drawEraser, drawStrokeEraser, drawLine, drawArrow, drawRect, drawEllipse, drawText, drawFill, drawColor, floorPlan, floorSeats, floorRotate, floorTools, floorMove, floorDrawWall, floorDrawZone, floorAddTable, floorAddDecor, floorDuplicate, floorDelete, floorUndo, floorRedo, floorLabel, floorSeatsField, floorShape, floorRound, floorSquare, floorLong, floorAngle, floorFlip, floorZoomIn, floorZoomOut, floorZoomFit, floorOverlaps, floorSeatN, floorDrawShape, floorShapeHint, floorColor, floorThickness, floorWidth, floorHeight, floorMerge, floorSplit, floorNothingPicked, floorTablesPicked, floorTableN, floorZone, floorWall, floorDeleteCorner, floorFinishWall, floorCancel, floorDecorDoor, floorDecorWindow, floorDecorPlant, floorDecorColumn, floorDecorRestroom, floorDecorKitchen, floorDecorRegister, floorDecorStairs, floorDecorLabel, drawCustomColor, drawSize, drawUndo, drawRedo, drawDelete, drawLayers, drawLayer, drawLayerName, drawAddLayer, drawDeleteLayer, drawShowLayer, drawHideLayer, drawLockLayer, drawUnlockLayer, drawLayerUp, drawLayerDown, compareBefore, compareAfter, compareSlider, cardNumber, cardExpiry, cardCvc, cardName, cardInvalidNumber, cardInvalidExpiry, cardInvalidCvc, validationRequired, validationInvalid, validationEmail, validationUrl, validationMinLength, validationMaxLength, validationMinItems, validationMaxItems, validationMin, validationMax, validationPattern, validationSameAs, keypadDelete, keypadClear, keypadChange, keypadRemaining, seatStage, seatAvailable, seatSelected, seatOccupied, seatLabel, receiptSubtotal, receiptTotal, receiptPaid, receiptChange, configRequired, configOptional, configChooseUpTo, configChooseAtLeast, configChooseExactly, configUnavailable, configQuantity, configIncrease, configDecrease, availNight, availNights, availMinNights, availCheckIn, availCheckOut, availSelectCheckIn, availSelectCheckOut, availUnavailable, chartOpen, chartHigh, chartLow, chartClose, chartVolume, bookPrice, bookSize, bookTotal, bookSpread, mortgagePrice, mortgageDown, mortgageRate, mortgageTerm, mortgageYears, mortgageLoan, mortgageMonthly, mortgageFirstPayment, mortgageLastPayment, mortgagePrincipal, mortgageInterest, mortgageTotal, mortgageSchedule, mortgageYear, mortgageBalance, bodyFront, bodyBack, bodyRight, bodyLeft, bodyRear, bodyHead, bodyNeck, bodyChest, bodyAbdomen, bodyPelvis, bodyShoulder, bodyUpperArm, bodyForearm, bodyHand, bodyThigh, bodyKnee, bodyLeg, bodyFoot, bodyUpperBack, bodyLowerBack, bodyGlute, bodyCalf, odontoTooth, odontoUpper, odontoLower, odontoMesial, odontoDistal, odontoBuccal, odontoLingual, odontoOcclusal, odontoCaries, odontoFilling, odontoSealant, odontoCrown, odontoRootCanal, odontoImplant, odontoMissing, odontoExtraction, odontoEraser, vitalsNormal, vitalsHigh, vitalsLow, vitalsNoData, quizCheck, quizNext, quizFinish, quizCorrect, quizIncorrect, quizCorrectAnswer, quizQuestionOf, quizScore, quizPassed, quizFailed, quizRetry, quizTrue, quizFalse, quizSelectAll, quizOrderHint, quizMoveUp, quizMoveDown, quizTypeAnswer, quizTimeLeft, quizReview, certTitle, certPresentedTo, certDate, certId
|
|
11767
11782
|
|
|
11768
11783
|
## Theme tokens
|
|
11769
11784
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./MSpinner-
|
|
2
|
-
import { t } from "./MIcon-
|
|
3
|
-
import { p as n } from "./MIconButton-
|
|
1
|
+
import { t as e } from "./MSpinner-CXLY7lWw.js";
|
|
2
|
+
import { t } from "./MIcon-BSsJZhK7.js";
|
|
3
|
+
import { p as n } from "./MIconButton-CNjN0xwW.js";
|
|
4
4
|
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderSlot as f, resolveDynamicComponent as p, unref as m, withCtx as h, withDirectives as g } from "vue";
|
|
5
5
|
// src/components/MButton.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var _ = "relative inline-flex items-center justify-center font-medium whitespace-nowrap overflow-hidden transition-[box-shadow,background-color,color] duration-150 select-none cursor-pointer disabled:cursor-not-allowed disabled:shadow-none disabled:text-on-surface/38 before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity before:duration-150 enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]", v = /* @__PURE__ */ c({
|
|
@@ -168,4 +168,4 @@ var _ = "relative inline-flex items-center justify-center font-medium whitespace
|
|
|
168
168
|
});
|
|
169
169
|
export { v as t };
|
|
170
170
|
|
|
171
|
-
//# sourceMappingURL=MButton-
|
|
171
|
+
//# sourceMappingURL=MButton-LiZRRP4h.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MButton-B6eZTfFV.js","names":["_withDirectives","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_normalizeStyle","_withCtx","_createElementBlock","_Fragment","MSpinner","MIcon","_renderSlot","_unref","MSpinner_default","vRipple","base","MButton_default","defineComponent","NAMED_COLORS","props","__props","tag","computed","isCustomColor","customStyle","isError","ROLE","style","c","disabledContainerClasses","sizeMap","s","sizeClasses","iconSize","spinnerSize","px","shapeClass","variantClasses","err","withDirectives","openBlock","createBlock","resolveDynamicComponent","normalizeClass","normalizeStyle","withCtx","createElementBlock","Fragment","MIcon_default","createCommentVNode","renderSlot","_ctx","unref"],"sources":["../src/components/MButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The standard M3 button — five variants, five expressive size tiers, and either color.\n *\n * @slot default The button's label.\n */\nimport { computed } from 'vue'\nimport MSpinner from './MSpinner.vue'\nimport MIcon from './MIcon.vue'\nimport { vRipple } from '../directives/vRipple'\n\nconst NAMED_COLORS = ['primary', 'error'] as const\ntype NamedColor = (typeof NAMED_COLORS)[number]\n\nconst props = withDefaults(\n defineProps<{\n /** Visual style of the button */\n variant?: 'filled' | 'tonal' | 'outlined' | 'text' | 'elevated'\n /**\n * Named semantic color ('primary' | 'error') OR any CSS color string\n * ('red', '#e91e63', 'oklch(0.6 0.2 0)', …).\n * When a CSS color is passed, --color-primary is overridden for this button.\n */\n color?: string\n /** HTML button type */\n type?: 'button' | 'submit' | 'reset'\n /** Disables interaction */\n disabled?: boolean\n /** Shows a spinner and disables the button */\n loading?: boolean\n /** Material Symbol icon name shown next to the label */\n icon?: string\n /** Draw the icon filled (Material Symbols' FILL axis), e.g. a starred star or a play icon */\n iconFilled?: boolean\n /** Which side of the label the icon renders on */\n // Which side of the label `icon` renders on. Real M3 buttons support both via\n // `ButtonDefaults.contentPaddingFor(hasStartIcon/hasEndIcon)` — padding ends up identical\n // either way at every tier, so this only changes render order, not spacing.\n iconPos?: 'leading' | 'trailing'\n /**\n * M3's 5-tier expressive button sizing (xs: 32px, sm: 40px, md: 56px, lg: 96px, xl: 136px) — lg/xl are\n * meant for hero-style prominent buttons, not everyday UI\n */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /**\n * Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md,\n * 28px lg/xl)\n */\n shape?: 'rounded' | 'squared'\n /** Vue Router destination — renders as RouterLink instead of button */\n to?: string | Record<string, any>\n /** Any CSS color for the press ripple; defaults to the button's content color */\n rippleColor?: string\n /**\n * Label and icon color, over what the variant and `color` give: an M3 role (`on-surface` for a neutral text\n * button, `on-primary-container`…) or any CSS color (`#000` on a white filled button). Disabled buttons keep\n * their own\n */\n contentColor?: string\n }>(),\n {\n variant: 'filled',\n color: 'primary',\n type: 'button',\n disabled: false,\n loading: false,\n iconPos: 'leading',\n size: 'sm',\n shape: 'rounded',\n },\n)\n\nconst tag = computed(() => props.to ? 'RouterLink' : 'button')\n\nconst isCustomColor = computed(\n () => !!props.color && !(NAMED_COLORS as readonly string[]).includes(props.color),\n)\n\nconst customStyle = computed(() => {\n if (!isCustomColor.value) return undefined\n return {\n '--color-primary': props.color,\n '--color-on-primary': '#ffffff',\n '--color-primary-container': props.color + '33',\n '--color-on-primary-container': props.color,\n }\n})\n\nconst isError = computed(() => props.color === 'error')\n\n// Color-role names (`on-surface`, `secondary-container`…) read the theme's token; anything else is a CSS color\nconst ROLE = /^(on-)?(primary|secondary|tertiary|error|surface|surface-variant|inverse-surface|inverse-primary)(-container|-variant)?$/\nconst style = computed(() => {\n const c = props.contentColor\n if (!c || props.disabled || props.loading) return customStyle.value\n return { ...customStyle.value, color: ROLE.test(c) ? `var(--color-${c})` : c }\n})\n\nconst base =\n 'relative inline-flex items-center justify-center font-medium ' +\n 'whitespace-nowrap overflow-hidden transition-[box-shadow,background-color,color] duration-150 select-none cursor-pointer ' +\n 'disabled:cursor-not-allowed disabled:shadow-none disabled:text-on-surface/38 ' +\n \"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 'enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]'\n\n// M3 disabled tokens: container at 10% on-surface opacity (DisabledContainerOpacity, same\n// across Filled/Tonal/Elevated), content/label always at 38% on-surface (handled in `base`\n// above, applies to every variant including text/elevated which have no container). The\n// outlined border uses the SAME color role as its enabled border (OutlineVariant, not\n// on-surface) just dimmed to that 10% too — see `variantClasses`' outlined case below for\n// why the enabled color is also outline-variant, not outline.\nconst disabledContainerClasses = computed(() => {\n switch (props.variant) {\n case 'filled':\n case 'tonal':\n case 'elevated':\n return 'disabled:bg-on-surface/10'\n case 'outlined':\n return isError.value ? 'disabled:border-error/10' : 'disabled:border-outline-variant/10'\n default:\n return ''\n }\n})\n\n/*\n * M3's newer 5-tier \"expressive\" button sizing (Button{XSmall,Small,Medium,Large,\n * XLarge}Tokens.kt + Button.kt's size-variant overloads — @ExperimentalMaterial3ExpressiveApi\n * in Compose, but this `size` prop is deliberately implementing exactly that system, same\n * as MFabMenu/MLoadingIndicator already do for other Expressive-only components). Content\n * padding is IDENTICAL whether or not an icon is present at every tier in the default\n * (non \"precision pointer\") mode — e.g. `IconMediumLeadingPadding = MediumLeadingPadding`\n * verbatim in the real source — so there's deliberately no separate icon-vs-no-icon padding\n * split here, unlike the old version of this file which had one (and got the values wrong\n * in both directions). `gap` between icon and label also varies by tier (IconLabelSpace),\n * not a flat value for every size.\n */\nconst sizeMap = {\n xs: { h: 'h-8', text: 'text-label-large', icon: 20, spinner: 16, gap: 'gap-1', px: 'px-3', pxText: 'px-2', squareRadius: 'rounded-md' },\n sm: { h: 'h-10', text: 'text-label-large', icon: 20, spinner: 16, gap: 'gap-2', px: 'px-4', pxText: 'px-3', squareRadius: 'rounded-md' },\n md: { h: 'h-14', text: 'text-title-medium', icon: 24, spinner: 18, gap: 'gap-2', px: 'px-6', pxText: 'px-3', squareRadius: 'rounded-lg' },\n lg: { h: 'h-24', text: 'text-headline-small', icon: 32, spinner: 26, gap: 'gap-3', px: 'px-12', pxText: 'px-4', squareRadius: 'rounded-xl' },\n xl: { h: 'h-[136px]', text: 'text-headline-large', icon: 40, spinner: 34, gap: 'gap-4', px: 'px-16', pxText: 'px-4', squareRadius: 'rounded-xl' },\n}\n\nconst s = computed(() => sizeMap[props.size] ?? sizeMap.sm)\nconst sizeClasses = computed(() => `${s.value.h} ${s.value.text} ${s.value.gap}`)\nconst iconSize = computed(() => s.value.icon)\nconst spinnerSize = computed(() => s.value.spinner)\n\nconst px = computed(() => props.variant === 'text' ? s.value.pxText : s.value.px)\n\n// Squared shape radius scales with size, matching each tier's own ContainerShapeSquare\n// token (ButtonXSmallTokens/ButtonSmallTokens use CornerMedium=12px, ButtonMediumTokens\n// CornerLarge=16px, ButtonLargeTokens/ButtonXLargeTokens CornerExtraLarge=28px) — the\n// pill (ContainerShapeRound) is CornerFull at every tier, so that half doesn't vary.\nconst shapeClass = computed(() => props.shape === 'squared' ? s.value.squareRadius : 'rounded-full')\n\nconst variantClasses = computed(() => {\n const err = isError.value\n switch (props.variant) {\n case 'filled':\n return err\n ? 'bg-error text-on-error enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n : 'bg-primary text-on-primary enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n case 'tonal':\n return err\n ? 'bg-error-container text-on-error-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n : 'bg-secondary-container text-on-secondary-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n case 'elevated':\n return err\n ? 'bg-surface-container-low text-error shadow-elevation-1 enabled:hover:shadow-elevation-2'\n : 'bg-surface-container-low text-primary shadow-elevation-1 enabled:hover:shadow-elevation-2'\n case 'outlined':\n // OutlinedButtonTokens.OutlineColor = ColorSchemeKeyTokens.OutlineVariant, not Outline\n return err\n ? 'border border-error text-error'\n : 'border border-outline-variant text-primary'\n case 'text':\n return err\n ? 'text-error'\n : 'text-primary'\n default:\n return ''\n }\n})\n</script>\n\n<template>\n <component\n :is=\"tag\"\n :to=\"to || undefined\"\n :type=\"to ? undefined : type\"\n :disabled=\"disabled || loading\"\n :class=\"[base, shapeClass, sizeClasses, px, variantClasses, disabledContainerClasses]\"\n :style=\"style\"\n v-ripple=\"{ disabled: disabled || loading, color: rippleColor }\"\n >\n <template v-if=\"iconPos === 'leading'\">\n <MSpinner v-if=\"loading\" :size=\"spinnerSize\" />\n <MIcon v-else-if=\"icon\" :name=\"icon\" :size=\"iconSize\" :filled=\"iconFilled\" />\n </template>\n <slot />\n <template v-if=\"iconPos === 'trailing'\">\n <MSpinner v-if=\"loading\" :size=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A;IAAgBR,EAAA;GAAwB,CAAA;GACnF,OAAKxB,EAAEsB,EAAA,KAAK;;GAGb,SAAArB,QAGW;IAHKc,EAAA,YAAO,aAAvBnB,EAAA,GAAAM,EAGWC,GAAA,EAAA,KAAA,EAAA,GAAA,CAFOY,EAAA,WAAhBnB,EAAA,GAAAC,EAA+CO,GAAA;;KAArB,MAAMyB,EAAA;I,yBACdd,EAAA,QAAlBnB,EAAA,GAAAC,EAA6EQ,GAAA;;KAApD,MAAMU,EAAA;KAAO,MAAMa,EAAA;KAAW,QAAQb,EAAA;;;;;;IAEjET,EAAQwC,EAAA,QAAA,SAAA;IACQ/B,EAAA,YAAO,cAAvBnB,EAAA,GAAAM,EAGWC,GAAA,EAAA,KAAA,EAAA,GAAA,CAFOY,EAAA,WAAhBnB,EAAA,GAAAC,EAA+CO,GAAA;;KAArB,MAAMyB,EAAA;I,yBACdd,EAAA,QAAlBnB,EAAA,GAAAC,EAA6EQ,GAAA;;KAApD,MAAMU,EAAA;KAAO,MAAMa,EAAA;KAAW,QAAQb,EAAA;;;;;;;;;;;;;;E,MAT3C,CAAAR,EAAAE,CAAA,GAAA;GAAA,UAAAM,EAAA,YAAYA,EAAA;GAAO,OAASA,EAAA;EAAW,CAAA,C"}
|
|
1
|
+
{"version":3,"file":"MButton-LiZRRP4h.js","names":["_withDirectives","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_normalizeStyle","_withCtx","_createElementBlock","_Fragment","MSpinner","MIcon","_renderSlot","_unref","MSpinner_default","vRipple","base","MButton_default","defineComponent","NAMED_COLORS","props","__props","tag","computed","isCustomColor","customStyle","isError","ROLE","style","c","disabledContainerClasses","sizeMap","s","sizeClasses","iconSize","spinnerSize","px","shapeClass","variantClasses","err","withDirectives","openBlock","createBlock","resolveDynamicComponent","normalizeClass","normalizeStyle","withCtx","createElementBlock","Fragment","MIcon_default","createCommentVNode","renderSlot","_ctx","unref"],"sources":["../src/components/MButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The standard M3 button — five variants, five expressive size tiers, and either color.\n *\n * @slot default The button's label.\n */\nimport { computed } from 'vue'\nimport MSpinner from './MSpinner.vue'\nimport MIcon from './MIcon.vue'\nimport { vRipple } from '../directives/vRipple'\n\nconst NAMED_COLORS = ['primary', 'error'] as const\ntype NamedColor = (typeof NAMED_COLORS)[number]\n\nconst props = withDefaults(\n defineProps<{\n /** Visual style of the button */\n variant?: 'filled' | 'tonal' | 'outlined' | 'text' | 'elevated'\n /**\n * Named semantic color ('primary' | 'error') OR any CSS color string\n * ('red', '#e91e63', 'oklch(0.6 0.2 0)', …).\n * When a CSS color is passed, --color-primary is overridden for this button.\n */\n color?: string\n /** HTML button type */\n type?: 'button' | 'submit' | 'reset'\n /** Disables interaction */\n disabled?: boolean\n /** Shows a spinner and disables the button */\n loading?: boolean\n /** Material Symbol icon name shown next to the label */\n icon?: string\n /** Draw the icon filled (Material Symbols' FILL axis), e.g. a starred star or a play icon */\n iconFilled?: boolean\n /** Which side of the label the icon renders on */\n // Which side of the label `icon` renders on. Real M3 buttons support both via\n // `ButtonDefaults.contentPaddingFor(hasStartIcon/hasEndIcon)` — padding ends up identical\n // either way at every tier, so this only changes render order, not spacing.\n iconPos?: 'leading' | 'trailing'\n /**\n * M3's 5-tier expressive button sizing (xs: 32px, sm: 40px, md: 56px, lg: 96px, xl: 136px) — lg/xl are\n * meant for hero-style prominent buttons, not everyday UI\n */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /**\n * Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md,\n * 28px lg/xl)\n */\n shape?: 'rounded' | 'squared'\n /** Vue Router destination — renders as RouterLink instead of button */\n to?: string | Record<string, any>\n /** Any CSS color for the press ripple; defaults to the button's content color */\n rippleColor?: string\n /**\n * Label and icon color, over what the variant and `color` give: an M3 role (`on-surface` for a neutral text\n * button, `on-primary-container`…) or any CSS color (`#000` on a white filled button). Disabled buttons keep\n * their own\n */\n contentColor?: string\n }>(),\n {\n variant: 'filled',\n color: 'primary',\n type: 'button',\n disabled: false,\n loading: false,\n iconPos: 'leading',\n size: 'sm',\n shape: 'rounded',\n },\n)\n\nconst tag = computed(() => props.to ? 'RouterLink' : 'button')\n\nconst isCustomColor = computed(\n () => !!props.color && !(NAMED_COLORS as readonly string[]).includes(props.color),\n)\n\nconst customStyle = computed(() => {\n if (!isCustomColor.value) return undefined\n return {\n '--color-primary': props.color,\n '--color-on-primary': '#ffffff',\n '--color-primary-container': props.color + '33',\n '--color-on-primary-container': props.color,\n }\n})\n\nconst isError = computed(() => props.color === 'error')\n\n// Color-role names (`on-surface`, `secondary-container`…) read the theme's token; anything else is a CSS color\nconst ROLE = /^(on-)?(primary|secondary|tertiary|error|surface|surface-variant|inverse-surface|inverse-primary)(-container|-variant)?$/\nconst style = computed(() => {\n const c = props.contentColor\n if (!c || props.disabled || props.loading) return customStyle.value\n return { ...customStyle.value, color: ROLE.test(c) ? `var(--color-${c})` : c }\n})\n\nconst base =\n 'relative inline-flex items-center justify-center font-medium ' +\n 'whitespace-nowrap overflow-hidden transition-[box-shadow,background-color,color] duration-150 select-none cursor-pointer ' +\n 'disabled:cursor-not-allowed disabled:shadow-none disabled:text-on-surface/38 ' +\n \"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 'enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]'\n\n// M3 disabled tokens: container at 10% on-surface opacity (DisabledContainerOpacity, same\n// across Filled/Tonal/Elevated), content/label always at 38% on-surface (handled in `base`\n// above, applies to every variant including text/elevated which have no container). The\n// outlined border uses the SAME color role as its enabled border (OutlineVariant, not\n// on-surface) just dimmed to that 10% too — see `variantClasses`' outlined case below for\n// why the enabled color is also outline-variant, not outline.\nconst disabledContainerClasses = computed(() => {\n switch (props.variant) {\n case 'filled':\n case 'tonal':\n case 'elevated':\n return 'disabled:bg-on-surface/10'\n case 'outlined':\n return isError.value ? 'disabled:border-error/10' : 'disabled:border-outline-variant/10'\n default:\n return ''\n }\n})\n\n/*\n * M3's newer 5-tier \"expressive\" button sizing (Button{XSmall,Small,Medium,Large,\n * XLarge}Tokens.kt + Button.kt's size-variant overloads — @ExperimentalMaterial3ExpressiveApi\n * in Compose, but this `size` prop is deliberately implementing exactly that system, same\n * as MFabMenu/MLoadingIndicator already do for other Expressive-only components). Content\n * padding is IDENTICAL whether or not an icon is present at every tier in the default\n * (non \"precision pointer\") mode — e.g. `IconMediumLeadingPadding = MediumLeadingPadding`\n * verbatim in the real source — so there's deliberately no separate icon-vs-no-icon padding\n * split here, unlike the old version of this file which had one (and got the values wrong\n * in both directions). `gap` between icon and label also varies by tier (IconLabelSpace),\n * not a flat value for every size.\n */\nconst sizeMap = {\n xs: { h: 'h-8', text: 'text-label-large', icon: 20, spinner: 16, gap: 'gap-1', px: 'px-3', pxText: 'px-2', squareRadius: 'rounded-md' },\n sm: { h: 'h-10', text: 'text-label-large', icon: 20, spinner: 16, gap: 'gap-2', px: 'px-4', pxText: 'px-3', squareRadius: 'rounded-md' },\n md: { h: 'h-14', text: 'text-title-medium', icon: 24, spinner: 18, gap: 'gap-2', px: 'px-6', pxText: 'px-3', squareRadius: 'rounded-lg' },\n lg: { h: 'h-24', text: 'text-headline-small', icon: 32, spinner: 26, gap: 'gap-3', px: 'px-12', pxText: 'px-4', squareRadius: 'rounded-xl' },\n xl: { h: 'h-[136px]', text: 'text-headline-large', icon: 40, spinner: 34, gap: 'gap-4', px: 'px-16', pxText: 'px-4', squareRadius: 'rounded-xl' },\n}\n\nconst s = computed(() => sizeMap[props.size] ?? sizeMap.sm)\nconst sizeClasses = computed(() => `${s.value.h} ${s.value.text} ${s.value.gap}`)\nconst iconSize = computed(() => s.value.icon)\nconst spinnerSize = computed(() => s.value.spinner)\n\nconst px = computed(() => props.variant === 'text' ? s.value.pxText : s.value.px)\n\n// Squared shape radius scales with size, matching each tier's own ContainerShapeSquare\n// token (ButtonXSmallTokens/ButtonSmallTokens use CornerMedium=12px, ButtonMediumTokens\n// CornerLarge=16px, ButtonLargeTokens/ButtonXLargeTokens CornerExtraLarge=28px) — the\n// pill (ContainerShapeRound) is CornerFull at every tier, so that half doesn't vary.\nconst shapeClass = computed(() => props.shape === 'squared' ? s.value.squareRadius : 'rounded-full')\n\nconst variantClasses = computed(() => {\n const err = isError.value\n switch (props.variant) {\n case 'filled':\n return err\n ? 'bg-error text-on-error enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n : 'bg-primary text-on-primary enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n case 'tonal':\n return err\n ? 'bg-error-container text-on-error-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n : 'bg-secondary-container text-on-secondary-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n case 'elevated':\n return err\n ? 'bg-surface-container-low text-error shadow-elevation-1 enabled:hover:shadow-elevation-2'\n : 'bg-surface-container-low text-primary shadow-elevation-1 enabled:hover:shadow-elevation-2'\n case 'outlined':\n // OutlinedButtonTokens.OutlineColor = ColorSchemeKeyTokens.OutlineVariant, not Outline\n return err\n ? 'border border-error text-error'\n : 'border border-outline-variant text-primary'\n case 'text':\n return err\n ? 'text-error'\n : 'text-primary'\n default:\n return ''\n }\n})\n</script>\n\n<template>\n <component\n :is=\"tag\"\n :to=\"to || undefined\"\n :type=\"to ? undefined : type\"\n :disabled=\"disabled || loading\"\n :class=\"[base, shapeClass, sizeClasses, px, variantClasses, disabledContainerClasses]\"\n :style=\"style\"\n v-ripple=\"{ disabled: disabled || loading, color: rippleColor }\"\n >\n <template v-if=\"iconPos === 'leading'\">\n <MSpinner v-if=\"loading\" :size=\"spinnerSize\" />\n <MIcon v-else-if=\"icon\" :name=\"icon\" :size=\"iconSize\" :filled=\"iconFilled\" />\n </template>\n <slot />\n <template v-if=\"iconPos === 'trailing'\">\n <MSpinner v-if=\"loading\" :size=\"spinnerSize\" />\n <MIcon v-else-if=\"icon\" :name=\"icon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