@m3ui-vue/m3ui-vue 0.8.8 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -5
- package/dist/API.md +3661 -0
- package/dist/MIcon-CaEooCmZ.js.map +1 -1
- package/dist/{MMenuItem-5xojJYAL.js → MTextField-pJU1vFaR.js} +374 -364
- package/dist/MTextField-pJU1vFaR.js.map +1 -0
- package/dist/api.json +1 -0
- package/dist/barcode.js +9 -11
- package/dist/barcode.js.map +1 -1
- package/dist/chart.js.map +1 -1
- package/dist/code-editor.js +2 -2
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MAbsolute.vue.d.ts +12 -0
- package/dist/components/MAlert.vue.d.ts +4 -0
- package/dist/components/MAppBar.vue.d.ts +12 -0
- package/dist/components/MAppLayout.vue.d.ts +2 -0
- package/dist/components/MAspectRatio.vue.d.ts +1 -0
- package/dist/components/MAutocomplete.vue.d.ts +18 -0
- package/dist/components/MAvatar.vue.d.ts +3 -0
- package/dist/components/MBadge.vue.d.ts +6 -0
- package/dist/components/MBar.vue.d.ts +5 -0
- package/dist/components/MBarcode.vue.d.ts +9 -0
- package/dist/components/MBottomSheet.vue.d.ts +3 -0
- package/dist/components/MBox.vue.d.ts +6 -0
- package/dist/components/MBreadcrumbs.vue.d.ts +2 -0
- package/dist/components/MButton.vue.d.ts +14 -4
- package/dist/components/MButtonGroup.vue.d.ts +7 -0
- package/dist/components/MCalendar.vue.d.ts +8 -0
- package/dist/components/MCard.vue.d.ts +17 -0
- package/dist/components/MCarousel.vue.d.ts +61 -36
- package/dist/components/MCenter.vue.d.ts +1 -0
- package/dist/components/MChart.vue.d.ts +7 -0
- package/dist/components/MChatBubble.vue.d.ts +10 -0
- package/dist/components/MCheckbox.vue.d.ts +5 -0
- package/dist/components/MChip.vue.d.ts +9 -0
- package/dist/components/MCircleProgressBar.vue.d.ts +7 -0
- package/dist/components/MCodeEditor.vue.d.ts +9 -0
- package/dist/components/MColorPicker.vue.d.ts +8 -0
- package/dist/components/MColorPickerModal.vue.d.ts +4 -0
- package/dist/components/MCommandPalette.vue.d.ts +8 -0
- package/dist/components/MConfirmDialog.vue.d.ts +7 -0
- package/dist/components/MContainer.vue.d.ts +4 -0
- package/dist/components/MContextMenu.vue.d.ts +3 -6
- package/dist/components/MCopyButton.vue.d.ts +10 -0
- package/dist/components/MDataTable.vue.d.ts +33 -12
- package/dist/components/MDatePicker.vue.d.ts +16 -0
- package/dist/components/MDatePickerModal.vue.d.ts +9 -0
- package/dist/components/MDateRangePicker.vue.d.ts +18 -0
- package/dist/components/MDateRangePickerModal.vue.d.ts +9 -0
- package/dist/components/MDialog.vue.d.ts +10 -6
- package/dist/components/MDivider.vue.d.ts +6 -0
- package/dist/components/MDragDropList.vue.d.ts +6 -0
- package/dist/components/MEmoji.vue.d.ts +6 -0
- package/dist/components/MEmojiButton.vue.d.ts +5 -0
- package/dist/components/MEmojiSelector.vue.d.ts +21 -5
- package/dist/components/MEmptyState.vue.d.ts +4 -0
- package/dist/components/MExpansionPanel.vue.d.ts +9 -0
- package/dist/components/MExportButton.vue.d.ts +8 -0
- package/dist/components/MFab.vue.d.ts +9 -0
- package/dist/components/MFabMenu.vue.d.ts +15 -1
- package/dist/components/MFileUpload.vue.d.ts +8 -0
- package/dist/components/MFixed.vue.d.ts +10 -0
- package/dist/components/MFlex.vue.d.ts +7 -1
- package/dist/components/MFooter.vue.d.ts +11 -0
- package/dist/components/MFullscreen.vue.d.ts +2 -0
- package/dist/components/MGrid.vue.d.ts +7 -0
- package/dist/components/MHotkeys.vue.d.ts +4 -0
- package/dist/components/MIcon.vue.d.ts +2 -0
- package/dist/components/MIconButton.vue.d.ts +10 -0
- package/dist/components/MInfiniteScroll.vue.d.ts +6 -0
- package/dist/components/MJsonEditor.vue.d.ts +8 -0
- package/dist/components/MJsonViewer.vue.d.ts +4 -0
- package/dist/components/MKanban.vue.d.ts +2 -0
- package/dist/components/MKbd.vue.d.ts +2 -0
- package/dist/components/MLightbox.vue.d.ts +19 -5
- package/dist/components/MList.vue.d.ts +7 -0
- package/dist/components/MListItem.vue.d.ts +24 -0
- package/dist/components/MListSubheader.vue.d.ts +6 -0
- package/dist/components/MLoadingIndicator.vue.d.ts +10 -0
- package/dist/components/MLoadingOverlay.vue.d.ts +5 -0
- package/dist/components/MMarkdown.vue.d.ts +3 -0
- package/dist/components/MMaskField.vue.d.ts +15 -0
- package/dist/components/MMasonry.vue.d.ts +5 -0
- package/dist/components/MMenu.vue.d.ts +3 -6
- package/dist/components/MMenuDivider.vue.d.ts +4 -0
- package/dist/components/MMenuItem.vue.d.ts +5 -0
- package/dist/components/MMultiAutocomplete.vue.d.ts +20 -0
- package/dist/components/MMultiSelect.vue.d.ts +21 -0
- package/dist/components/MNavigationBar.vue.d.ts +2 -0
- package/dist/components/MNavigationDrawer.vue.d.ts +11 -0
- package/dist/components/MNavigationRail.vue.d.ts +9 -6
- package/dist/components/MNavigationSuite.vue.d.ts +5 -3
- package/dist/components/MNumberField.vue.d.ts +17 -0
- package/dist/components/MOverlay.vue.d.ts +3 -0
- package/dist/components/MPageProgress.vue.d.ts +3 -0
- package/dist/components/MPagination.vue.d.ts +3 -0
- package/dist/components/MPasswordMeter.vue.d.ts +1 -0
- package/dist/components/MPinInput.vue.d.ts +11 -0
- package/dist/components/MProgressBar.vue.d.ts +6 -0
- package/dist/components/MPullToRefresh.vue.d.ts +8 -0
- package/dist/components/MQRCode.vue.d.ts +6 -0
- package/dist/components/MRadio.vue.d.ts +5 -0
- package/dist/components/MRadioGroup.vue.d.ts +6 -0
- package/dist/components/MRating.vue.d.ts +11 -0
- package/dist/components/MRelativeTime.vue.d.ts +1 -0
- package/dist/components/MResponsive.vue.d.ts +3 -0
- package/dist/components/MResult.vue.d.ts +6 -0
- package/dist/components/MRichTextEditor.vue.d.ts +8 -0
- package/dist/components/MScheduler.vue.d.ts +48 -1
- package/dist/components/MScrollable.vue.d.ts +3 -0
- package/dist/components/MSearchBar.vue.d.ts +6 -0
- package/dist/components/MSection.vue.d.ts +5 -0
- package/dist/components/MSegmentedButton.vue.d.ts +5 -0
- package/dist/components/MSelect.vue.d.ts +17 -0
- package/dist/components/MShader.vue.d.ts +1 -0
- package/dist/components/MShape.vue.d.ts +1 -1
- package/dist/components/MShortNavigationBar.vue.d.ts +8 -9
- package/dist/components/MSideSheet.vue.d.ts +3 -0
- package/dist/components/MSignaturePad.vue.d.ts +7 -0
- package/dist/components/MSimpleCarousel.vue.d.ts +12 -2
- package/dist/components/MSkeleton.vue.d.ts +8 -0
- package/dist/components/MSlider.vue.d.ts +15 -1
- package/dist/components/MSnackbar.vue.d.ts +1 -0
- package/dist/components/MSpinner.vue.d.ts +6 -0
- package/dist/components/MSplitButton.vue.d.ts +7 -0
- package/dist/components/MSplitter.vue.d.ts +4 -0
- package/dist/components/MSpotlightSearch.vue.d.ts +18 -0
- package/dist/components/MStack.vue.d.ts +8 -1
- package/dist/components/MStatCard.vue.d.ts +7 -0
- package/dist/components/MStepper.vue.d.ts +7 -0
- package/dist/components/MSticky.vue.d.ts +2 -0
- package/dist/components/MSubtitle.vue.d.ts +4 -0
- package/dist/components/MSwitch.vue.d.ts +5 -6
- package/dist/components/MTable.vue.d.ts +17 -4
- package/dist/components/MTabs.vue.d.ts +6 -0
- package/dist/components/MTagInput.vue.d.ts +17 -0
- package/dist/components/MTerminal.vue.d.ts +4 -0
- package/dist/components/MText.vue.d.ts +10 -0
- package/dist/components/MTextField.vue.d.ts +18 -0
- package/dist/components/MTimePicker.vue.d.ts +10 -0
- package/dist/components/MTimePickerModal.vue.d.ts +5 -0
- package/dist/components/MTimeline.vue.d.ts +3 -0
- package/dist/components/MTitle.vue.d.ts +4 -0
- package/dist/components/MToggleButton.vue.d.ts +4 -0
- package/dist/components/MToolbar.vue.d.ts +6 -1
- package/dist/components/MTooltip.vue.d.ts +7 -0
- package/dist/components/MTopAppBar.vue.d.ts +8 -0
- package/dist/components/MTour.vue.d.ts +5 -0
- package/dist/components/MTransferList.vue.d.ts +11 -0
- package/dist/components/MTree.vue.d.ts +11 -0
- package/dist/components/MTreeTable.vue.d.ts +7 -0
- package/dist/components/MVirtualTable.vue.d.ts +6 -0
- package/dist/components/MWindow.vue.d.ts +33 -1
- package/dist/composables/_carouselStrategy.d.ts +101 -0
- package/dist/composables/useLocale.d.ts +21 -0
- package/dist/data/emoji-names/emoji-names-de.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-en.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-es.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-fr.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-ja.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-ko.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-pt.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-zh.d.ts +2 -0
- package/dist/data/emojis.d.ts +7 -1
- package/dist/emoji-names-de-BphO5XpV.js +1877 -0
- package/dist/emoji-names-de-BphO5XpV.js.map +1 -0
- package/dist/emoji-names-en-9ZvMRvzi.js +1877 -0
- package/dist/emoji-names-en-9ZvMRvzi.js.map +1 -0
- package/dist/emoji-names-es-DvfWU3Pj.js +1877 -0
- package/dist/emoji-names-es-DvfWU3Pj.js.map +1 -0
- package/dist/emoji-names-fr-B-jhUlsP.js +1877 -0
- package/dist/emoji-names-fr-B-jhUlsP.js.map +1 -0
- package/dist/emoji-names-ja-l8cMFJo1.js +1877 -0
- package/dist/emoji-names-ja-l8cMFJo1.js.map +1 -0
- package/dist/emoji-names-ko-YP-o9G0c.js +1877 -0
- package/dist/emoji-names-ko-YP-o9G0c.js.map +1 -0
- package/dist/emoji-names-pt-DGj_Js4M.js +1877 -0
- package/dist/emoji-names-pt-DGj_Js4M.js.map +1 -0
- package/dist/emoji-names-zh-Dzecwtw_.js +1877 -0
- package/dist/emoji-names-zh-Dzecwtw_.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/locales/index.js +140 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +6642 -5160
- package/dist/m3ui.js.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/plugin.d.ts +6 -0
- package/dist/qrcode.js.map +1 -1
- package/dist/rich-text-editor.js +10 -10
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/terminal.js +34 -27
- package/dist/terminal.js.map +1 -1
- package/dist/{useLocale-D3ZWZ8jY.js → useLocale-Drihe5G2.js} +33 -11
- package/dist/useLocale-Drihe5G2.js.map +1 -0
- package/package.json +4 -2
- package/src/__tests__/MCarousel.test.ts +183 -21
- package/src/__tests__/MDialog.test.ts +18 -0
- package/src/__tests__/MEmojiSelector.test.ts +138 -0
- package/src/__tests__/MHotkeys.test.ts +57 -0
- package/src/__tests__/MLightbox.test.ts +313 -5
- package/src/__tests__/MScheduler.test.ts +122 -0
- package/src/__tests__/MTerminal.test.ts +63 -0
- package/src/__tests__/attrsFallthrough.test.ts +65 -0
- package/src/__tests__/hostLocale.test.ts +57 -0
- package/src/__tests__/plugin.test.ts +28 -1
- package/src/components/MAbsolute.vue +18 -0
- package/src/components/MAlert.vue +12 -0
- package/src/components/MAppBar.vue +12 -0
- package/src/components/MAppLayout.vue +11 -0
- package/src/components/MAspectRatio.vue +6 -0
- package/src/components/MAutocomplete.vue +24 -0
- package/src/components/MAvatar.vue +12 -1
- package/src/components/MBadge.vue +11 -0
- package/src/components/MBar.vue +19 -0
- package/src/components/MBarcode.vue +18 -2
- package/src/components/MBottomSheet.vue +13 -1
- package/src/components/MBox.vue +12 -0
- package/src/components/MBreadcrumbs.vue +7 -0
- package/src/components/MButton.vue +22 -4
- package/src/components/MButtonGroup.vue +13 -0
- package/src/components/MCalendar.vue +14 -0
- package/src/components/MCard.vue +26 -0
- package/src/components/MCarousel.vue +542 -200
- package/src/components/MCenter.vue +6 -0
- package/src/components/MChart.vue +12 -0
- package/src/components/MChatBubble.vue +17 -0
- package/src/components/MCheckbox.vue +11 -0
- package/src/components/MChip.vue +17 -0
- package/src/components/MCircleProgressBar.vue +13 -0
- package/src/components/MCodeEditor.vue +18 -2
- package/src/components/MColorPicker.vue +13 -0
- package/src/components/MColorPickerModal.vue +12 -0
- package/src/components/MCommandPalette.vue +17 -1
- package/src/components/MConfirmDialog.vue +15 -0
- package/src/components/MContainer.vue +9 -0
- package/src/components/MContextMenu.vue +20 -7
- package/src/components/MCopyButton.vue +16 -0
- package/src/components/MDataTable.vue +58 -12
- package/src/components/MDatePicker.vue +21 -0
- package/src/components/MDatePickerModal.vue +17 -1
- package/src/components/MDateRangePicker.vue +23 -0
- package/src/components/MDateRangePickerModal.vue +17 -1
- package/src/components/MDialog.vue +43 -10
- package/src/components/MDivider.vue +6 -0
- package/src/components/MDragDropList.vue +18 -0
- package/src/components/MEmoji.vue +6 -0
- package/src/components/MEmojiButton.vue +11 -0
- package/src/components/MEmojiSelector.vue +486 -78
- package/src/components/MEmptyState.vue +9 -0
- package/src/components/MExpansionPanel.vue +17 -0
- package/src/components/MExportButton.vue +15 -0
- package/src/components/MFab.vue +20 -1
- package/src/components/MFabMenu.vue +20 -0
- package/src/components/MFileUpload.vue +19 -0
- package/src/components/MFixed.vue +16 -0
- package/src/components/MFlex.vue +11 -0
- package/src/components/MFooter.vue +11 -0
- package/src/components/MFullscreen.vue +8 -0
- package/src/components/MGrid.vue +12 -0
- package/src/components/MHotkeys.vue +20 -13
- package/src/components/MIcon.vue +10 -1
- package/src/components/MIconButton.vue +13 -0
- package/src/components/MInfiniteScroll.vue +16 -0
- package/src/components/MJsonEditor.vue +13 -0
- package/src/components/MJsonViewer.vue +7 -0
- package/src/components/MKanban.vue +18 -0
- package/src/components/MKbd.vue +6 -0
- package/src/components/MLightbox.vue +766 -268
- package/src/components/MList.vue +15 -0
- package/src/components/MListDetail.vue +11 -0
- package/src/components/MListItem.vue +37 -0
- package/src/components/MListSubheader.vue +6 -0
- package/src/components/MLoadingIndicator.vue +15 -0
- package/src/components/MLoadingOverlay.vue +18 -1
- package/src/components/MMarkdown.vue +7 -0
- package/src/components/MMaskField.vue +21 -0
- package/src/components/MMasonry.vue +11 -0
- package/src/components/MMenu.vue +19 -7
- package/src/components/MMenuDivider.vue +4 -0
- package/src/components/MMenuItem.vue +16 -0
- package/src/components/MMultiAutocomplete.vue +26 -0
- package/src/components/MMultiSelect.vue +27 -0
- package/src/components/MNavigationBar.vue +7 -0
- package/src/components/MNavigationDrawer.vue +30 -1
- package/src/components/MNavigationRail.vue +27 -6
- package/src/components/MNavigationSuite.vue +20 -3
- package/src/components/MNotificationHost.vue +3 -0
- package/src/components/MNumberField.vue +24 -0
- package/src/components/MOverlay.vue +11 -0
- package/src/components/MPageProgress.vue +7 -0
- package/src/components/MPagination.vue +15 -1
- package/src/components/MPasswordMeter.vue +7 -0
- package/src/components/MPinInput.vue +19 -0
- package/src/components/MProgressBar.vue +9 -0
- package/src/components/MPullToRefresh.vue +17 -0
- package/src/components/MQRCode.vue +12 -0
- package/src/components/MRadio.vue +11 -0
- package/src/components/MRadioGroup.vue +11 -0
- package/src/components/MRating.vue +19 -0
- package/src/components/MRelative.vue +8 -0
- package/src/components/MRelativeTime.vue +6 -0
- package/src/components/MResponsive.vue +9 -0
- package/src/components/MResult.vue +14 -0
- package/src/components/MRichTextEditor.vue +14 -0
- package/src/components/MScheduler.vue +303 -115
- package/src/components/MScrollable.vue +8 -0
- package/src/components/MSearchBar.vue +17 -0
- package/src/components/MSection.vue +13 -0
- package/src/components/MSegmentedButton.vue +10 -0
- package/src/components/MSelect.vue +22 -0
- package/src/components/MShader.vue +13 -0
- package/src/components/MShape.vue +6 -0
- package/src/components/MShortNavigationBar.vue +23 -9
- package/src/components/MSideSheet.vue +14 -1
- package/src/components/MSignaturePad.vue +15 -0
- package/src/components/MSimpleCarousel.vue +18 -0
- package/src/components/MSkeleton.vue +8 -0
- package/src/components/MSlider.vue +21 -0
- package/src/components/MSnackbar.vue +5 -0
- package/src/components/MSpacer.vue +6 -0
- package/src/components/MSpinner.vue +10 -0
- package/src/components/MSplitButton.vue +17 -1
- package/src/components/MSplitter.vue +10 -0
- package/src/components/MSpotlightSearch.vue +28 -1
- package/src/components/MStack.vue +12 -0
- package/src/components/MStatCard.vue +13 -0
- package/src/components/MStepper.vue +12 -0
- package/src/components/MSticky.vue +7 -0
- package/src/components/MSubtitle.vue +9 -0
- package/src/components/MSupportingPane.vue +10 -0
- package/src/components/MSwitch.vue +14 -6
- package/src/components/MTable.vue +33 -4
- package/src/components/MTabs.vue +12 -0
- package/src/components/MTagInput.vue +23 -0
- package/src/components/MTerminal.vue +33 -10
- package/src/components/MText.vue +15 -0
- package/src/components/MTextField.vue +26 -0
- package/src/components/MTimePicker.vue +15 -0
- package/src/components/MTimePickerModal.vue +13 -1
- package/src/components/MTimeline.vue +7 -0
- package/src/components/MTitle.vue +9 -0
- package/src/components/MToggleButton.vue +12 -0
- package/src/components/MToolbar.vue +12 -0
- package/src/components/MTooltip.vue +18 -0
- package/src/components/MTopAppBar.vue +18 -0
- package/src/components/MTour.vue +15 -2
- package/src/components/MTransferList.vue +24 -0
- package/src/components/MTree.vue +11 -0
- package/src/components/MTreeTable.vue +15 -0
- package/src/components/MVirtualTable.vue +12 -0
- package/src/components/MWindow.vue +34 -0
- package/src/composables/_carouselStrategy.ts +712 -0
- package/src/composables/useLocale.ts +54 -3
- package/src/data/emoji-names/emoji-names-de.ts +1875 -0
- package/src/data/emoji-names/emoji-names-en.ts +1875 -0
- package/src/data/emoji-names/emoji-names-es.ts +1875 -0
- package/src/data/emoji-names/emoji-names-fr.ts +1875 -0
- package/src/data/emoji-names/emoji-names-ja.ts +1875 -0
- package/src/data/emoji-names/emoji-names-ko.ts +1875 -0
- package/src/data/emoji-names/emoji-names-pt.ts +1875 -0
- package/src/data/emoji-names/emoji-names-zh.ts +1875 -0
- package/src/data/emojis.ts +29 -198
- package/src/index.ts +2 -2
- package/src/locales/de.ts +19 -0
- package/src/locales/es.ts +19 -0
- package/src/locales/fr.ts +19 -0
- package/src/locales/ja.ts +19 -0
- package/src/locales/ko.ts +19 -0
- package/src/locales/pt.ts +19 -0
- package/src/locales/zh.ts +19 -0
- package/src/plugin.ts +14 -2
- package/dist/MMenuItem-5xojJYAL.js.map +0 -1
- package/dist/useLocale-D3ZWZ8jY.js.map +0 -1
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* One navigation that adapts to the space, after Material 3's `NavigationSuiteScaffold`: a short navigation bar
|
|
4
|
+
* at the bottom on phones, the same bar with icons beside labels on a phone in landscape, and a navigation rail
|
|
5
|
+
* on the side from tablets up. Give it your destinations and your content; it picks MShortNavigationBar or
|
|
6
|
+
* MNavigationRail by its own size (see useWindowSizeClass) and swaps them without remounting the content. It
|
|
7
|
+
* has no default size, so give it the app's height, e.g. `class="h-dvh"`.
|
|
8
|
+
*
|
|
9
|
+
* @slot default The app content. It scrolls on its own and keeps its state when the navigation swaps. layout is
|
|
10
|
+
* the navigation in use
|
|
11
|
+
* @slot fab Primary action, e.g. an MFab: in the rail's header, or floating at the bottom end above the bar
|
|
12
|
+
* @event update:modelValue Emitted when a destination is picked (v-model)
|
|
13
|
+
*/
|
|
2
14
|
import { computed, ref } from 'vue'
|
|
3
15
|
import MNavigationRail from './MNavigationRail.vue'
|
|
4
16
|
import MShortNavigationBar from './MShortNavigationBar.vue'
|
|
@@ -20,13 +32,18 @@ export interface NavigationSuiteItem {
|
|
|
20
32
|
export type NavigationSuiteLayout = 'bar' | 'bar-medium' | 'rail' | 'rail-expanded' | 'none'
|
|
21
33
|
|
|
22
34
|
const props = withDefaults(defineProps<{
|
|
35
|
+
/** Selected destination (v-model) */
|
|
23
36
|
modelValue: string | number
|
|
37
|
+
/** Destinations, the same shape MNavigationRail and MShortNavigationBar take */
|
|
24
38
|
items: NavigationSuiteItem[]
|
|
25
39
|
/**
|
|
26
|
-
* 'auto' picks by the component's own size,
|
|
27
|
-
*
|
|
28
|
-
*
|
|
40
|
+
* 'auto' picks by the component's own size: compact width → short bar, compact height (a phone in landscape)
|
|
41
|
+
* → short bar with icons beside labels, anything else → rail. Any other value forces that navigation; 'none'
|
|
42
|
+
* hides it
|
|
29
43
|
*/
|
|
44
|
+
// 'auto' picks by the component's own size, as M3's NavigationSuiteScaffold does
|
|
45
|
+
// (`navigationSuiteType`): compact width → short bar; compact height (a phone in landscape)
|
|
46
|
+
// → short bar with icons beside labels; anything else → collapsed rail. Set it to force one.
|
|
30
47
|
layout?: 'auto' | NavigationSuiteLayout
|
|
31
48
|
}>(), { layout: 'auto' })
|
|
32
49
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
import { useNotification } from '../composables/useNotification'
|
|
4
|
+
import { useLocale } from '../composables/useLocale'
|
|
4
5
|
import MIcon from './MIcon.vue'
|
|
5
6
|
import MSpinner from './MSpinner.vue'
|
|
6
7
|
|
|
7
8
|
const { notifications, position, dismiss } = useNotification()
|
|
9
|
+
const locale = useLocale()
|
|
8
10
|
|
|
9
11
|
const isTop = computed(() => position.value.startsWith('top'))
|
|
10
12
|
|
|
@@ -87,6 +89,7 @@ const getStyle = (variant: string) => variantStyles[variant] ?? variantStyles.in
|
|
|
87
89
|
v-if="n.closable !== false"
|
|
88
90
|
type="button"
|
|
89
91
|
class="flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-inverse-on-surface/50 transition-colors hover:bg-inverse-on-surface/10"
|
|
92
|
+
:aria-label="locale.close"
|
|
90
93
|
@click="dismiss(n.id)"
|
|
91
94
|
>
|
|
92
95
|
<MIcon name="close" :size="16" />
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A numeric text field with +/- stepper buttons, min/max clamping, and keyboard arrow support.
|
|
4
|
+
*
|
|
5
|
+
* @event update:modelValue Emitted on every change — typing, stepper clicks, or arrow keys — powers v-model
|
|
6
|
+
* @event debounced Emitted debounce ms after the user stops typing (only when debounce > 0). Stepper
|
|
7
|
+
* clicks/arrow keys still emit instantly
|
|
8
|
+
*/
|
|
2
9
|
import { computed, ref, useId } from 'vue'
|
|
3
10
|
import MIcon from './MIcon.vue'
|
|
4
11
|
import MIconButton from './MIconButton.vue'
|
|
@@ -7,20 +14,37 @@ import { useDebounce } from '../composables/useDebounce'
|
|
|
7
14
|
|
|
8
15
|
const props = withDefaults(
|
|
9
16
|
defineProps<{
|
|
17
|
+
/** Bound numeric value (v-model) */
|
|
10
18
|
modelValue: number | null
|
|
19
|
+
/** Field label */
|
|
11
20
|
label: string
|
|
21
|
+
/** Visual style */
|
|
12
22
|
variant?: 'filled' | 'outlined'
|
|
23
|
+
/** Minimum allowed value */
|
|
13
24
|
min?: number
|
|
25
|
+
/** Maximum allowed value */
|
|
14
26
|
max?: number
|
|
27
|
+
/** Increment/decrement step */
|
|
15
28
|
step?: number
|
|
29
|
+
/** Error state */
|
|
16
30
|
error?: boolean
|
|
31
|
+
/** Error message shown when error is true */
|
|
17
32
|
errorLabel?: string
|
|
33
|
+
/** Hint text */
|
|
18
34
|
hint?: string
|
|
35
|
+
/** Disables the field */
|
|
19
36
|
disabled?: boolean
|
|
37
|
+
/** Marks as required — adds a red asterisk after the label */
|
|
20
38
|
required?: boolean
|
|
39
|
+
/** Material Symbol icon */
|
|
21
40
|
leadingIcon?: string
|
|
41
|
+
/** Show +/- buttons */
|
|
22
42
|
stepper?: boolean
|
|
43
|
+
/**
|
|
44
|
+
* Overrides the auto-detected background color used to cut the floating label out of the outlined border
|
|
45
|
+
*/
|
|
23
46
|
fieldBg?: string
|
|
47
|
+
/** Delay (ms) before firing the @debounced event */
|
|
24
48
|
debounce?: number
|
|
25
49
|
}>(),
|
|
26
50
|
{
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Full-screen overlay with scrim and teleport to body. A generic low-level building block — content is entirely
|
|
4
|
+
* up to you via the default slot.
|
|
5
|
+
*
|
|
6
|
+
* @slot default Content shown over the scrim.
|
|
7
|
+
* @event update:modelValue Emitted with false when the scrim is clicked, for v-model support
|
|
8
|
+
*/
|
|
2
9
|
import { computed } from 'vue'
|
|
3
10
|
|
|
4
11
|
const props = withDefaults(
|
|
5
12
|
defineProps<{
|
|
13
|
+
/** Controls visibility (v-model) */
|
|
6
14
|
modelValue?: boolean
|
|
15
|
+
/** Show dark backdrop */
|
|
7
16
|
scrim?: boolean
|
|
17
|
+
/** Z-index value */
|
|
8
18
|
zIndex?: number
|
|
9
19
|
}>(),
|
|
10
20
|
{ modelValue: true, scrim: true, zIndex: 50 },
|
|
@@ -26,6 +36,7 @@ function handleScrimClick() {
|
|
|
26
36
|
<template>
|
|
27
37
|
<Teleport to="body">
|
|
28
38
|
<Transition
|
|
39
|
+
appear
|
|
29
40
|
enter-active-class="transition-opacity duration-200"
|
|
30
41
|
leave-active-class="transition-opacity duration-150"
|
|
31
42
|
enter-from-class="opacity-0"
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A thin bar pinned to the top or bottom edge of the viewport, for page/route-level loading state — auto-wired
|
|
4
|
+
* to vue-router by default, or driven entirely by hand via usePageProgress().
|
|
5
|
+
*/
|
|
2
6
|
import { getCurrentInstance, onMounted, onUnmounted } from "vue";
|
|
3
7
|
import { usePageProgress } from "../composables/usePageProgress";
|
|
4
8
|
|
|
5
9
|
const props = withDefaults(
|
|
6
10
|
defineProps<{
|
|
11
|
+
/** Bar color */
|
|
7
12
|
color?: "primary" | "secondary" | "tertiary" | "error";
|
|
13
|
+
/** Bar height in px */
|
|
8
14
|
thickness?: number;
|
|
9
15
|
/** Auto-wire to vue-router's navigation guards when a router is detected. Set to `false` to drive it entirely by hand via `usePageProgress()`. */
|
|
10
16
|
auto?: boolean;
|
|
17
|
+
/** Which edge of the viewport the bar is pinned to */
|
|
11
18
|
position?: "top" | "bottom";
|
|
12
19
|
}>(),
|
|
13
20
|
{ color: "primary", thickness: 3, auto: true, position: "top" },
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Simple previous/next page navigation with an automatically computed page range label. Its texts (“1–10 of
|
|
4
|
+
* 25”, “Page 1 of 3” and the buttons’ labels) come from the app’s locale.
|
|
5
|
+
*
|
|
6
|
+
* @event update:page Emitted when the previous/next button is clicked — drive page with it for v-model-style
|
|
7
|
+
* two-way binding
|
|
8
|
+
*/
|
|
2
9
|
import { computed } from 'vue'
|
|
3
10
|
import MIconButton from './MIconButton.vue'
|
|
4
11
|
import { useLocale } from '../composables/useLocale'
|
|
5
12
|
|
|
6
|
-
const props = defineProps<{
|
|
13
|
+
const props = defineProps<{
|
|
14
|
+
/** Current page (1-based) */
|
|
15
|
+
page: number
|
|
16
|
+
/** Items per page */
|
|
17
|
+
perPage: number
|
|
18
|
+
/** Total number of items */
|
|
19
|
+
total: number
|
|
20
|
+
}>()
|
|
7
21
|
const emit = defineEmits<{ 'update:page': [number] }>()
|
|
8
22
|
const t = useLocale()
|
|
9
23
|
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A password strength bar. Scores length + character variety (0-4) and emits `score` so you can gate a submit
|
|
4
|
+
* button on it.
|
|
5
|
+
*
|
|
6
|
+
* @event score Emitted whenever value changes — -1 for an empty value, or 0-4 otherwise
|
|
7
|
+
*/
|
|
2
8
|
import { computed, watch } from 'vue'
|
|
3
9
|
|
|
4
10
|
const props = withDefaults(
|
|
5
11
|
defineProps<{
|
|
12
|
+
/** Password to score */
|
|
6
13
|
value: string
|
|
7
14
|
/** 5 labels, weakest to strongest. */
|
|
8
15
|
labels?: string[]
|
|
@@ -1,22 +1,41 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* One box per character for OTP/PIN/verification codes. Typing advances to the next box, backspace on an empty
|
|
4
|
+
* box goes back, and pasting a full code fills every box at once.
|
|
5
|
+
*
|
|
6
|
+
* @event update:modelValue Emitted on every box change — powers v-model
|
|
7
|
+
* @event complete Fires once with the full code as soon as every box is filled — the natural place to trigger
|
|
8
|
+
* auto-submit
|
|
9
|
+
*/
|
|
2
10
|
import { computed, nextTick, ref, watch } from 'vue'
|
|
3
11
|
|
|
4
12
|
const props = withDefaults(
|
|
5
13
|
defineProps<{
|
|
14
|
+
/** Bound code (v-model), e.g. "1234" */
|
|
6
15
|
modelValue: string
|
|
16
|
+
/** Number of boxes (ignored when groups is set) */
|
|
7
17
|
length?: number
|
|
8
18
|
/** Segment sizes for a grouped layout, e.g. [2, 4, 2, 3, 1, 3] renders `__ ____ __ ___ _ ___`. Overrides `length` (derived as the sum). */
|
|
9
19
|
groups?: number[]
|
|
10
20
|
/** Visual separator rendered between groups (only used when `groups` is set). */
|
|
11
21
|
separator?: string
|
|
22
|
+
/** Restricts which characters are accepted */
|
|
12
23
|
type?: 'numeric' | 'alphanumeric'
|
|
24
|
+
/** Renders each box as a password field (dots instead of characters) */
|
|
13
25
|
masked?: boolean
|
|
26
|
+
/** Visual style */
|
|
14
27
|
variant?: 'filled' | 'outlined'
|
|
28
|
+
/** Error state */
|
|
15
29
|
error?: boolean
|
|
30
|
+
/** Error message shown when error is true */
|
|
16
31
|
errorLabel?: string
|
|
32
|
+
/** Hint text below the boxes */
|
|
17
33
|
hint?: string
|
|
34
|
+
/** Disables every box */
|
|
18
35
|
disabled?: boolean
|
|
36
|
+
/** Focuses the first box on mount */
|
|
19
37
|
autoFocus?: boolean
|
|
38
|
+
/** aria-label for the group of boxes */
|
|
20
39
|
label?: string
|
|
21
40
|
}>(),
|
|
22
41
|
{
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A linear progress indicator — determinate, indeterminate, or the M3 Expressive wavy variant.
|
|
4
|
+
*/
|
|
2
5
|
import { computed, ref, watch, onMounted, onUnmounted, nextTick } from "vue";
|
|
3
6
|
|
|
4
7
|
const props = withDefaults(
|
|
5
8
|
defineProps<{
|
|
9
|
+
/** Progress 0–100 (omit for indeterminate) */
|
|
6
10
|
value?: number;
|
|
11
|
+
/** Indeterminate animation — also implied by omitting value */
|
|
7
12
|
indeterminate?: boolean;
|
|
13
|
+
/** Bar color */
|
|
8
14
|
color?: "primary" | "secondary" | "tertiary" | "error";
|
|
15
|
+
/** Bar style */
|
|
9
16
|
variant?: "linear" | "wavy";
|
|
17
|
+
/** Label text above the bar */
|
|
10
18
|
label?: string;
|
|
19
|
+
/** Stroke width in px. Defaults to 4dp, matching the real M3 token for both variants. */
|
|
11
20
|
thickness?: number;
|
|
12
21
|
}>(),
|
|
13
22
|
{ color: "primary", variant: "linear" },
|
|
@@ -1,13 +1,30 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Wraps its own scrollable container and fires a refresh event when the user pulls past a threshold at the very
|
|
4
|
+
* top of the scroll.
|
|
5
|
+
*
|
|
6
|
+
* @slot default The scrollable content. A pull starts only when it's scrolled to the top; otherwise touch
|
|
7
|
+
* scrolls it normally
|
|
8
|
+
* @event refresh Emitted when the user drags past threshold and releases. Set refreshing to true in the
|
|
9
|
+
* handler, then back to false once the fetch resolves.
|
|
10
|
+
*/
|
|
2
11
|
import { ref, watch, onMounted, onBeforeUnmount } from "vue";
|
|
3
12
|
import MLoadingIndicator from "./MLoadingIndicator.vue";
|
|
4
13
|
|
|
5
14
|
const props = withDefaults(
|
|
6
15
|
defineProps<{
|
|
16
|
+
/**
|
|
17
|
+
* Controlled loading state — set it to true in your @refresh handler and back to false once the fetch
|
|
18
|
+
* resolves; the indicator settles and releases accordingly, same pattern as MInfiniteScroll's loading prop
|
|
19
|
+
*/
|
|
7
20
|
refreshing?: boolean;
|
|
21
|
+
/** Disables the pull gesture */
|
|
8
22
|
disabled?: boolean;
|
|
23
|
+
/** Pull distance in px required to trigger a refresh on release */
|
|
9
24
|
threshold?: number;
|
|
25
|
+
/** Indicator size in px */
|
|
10
26
|
size?: number;
|
|
27
|
+
/** Indicator color */
|
|
11
28
|
color?: "primary" | "secondary" | "tertiary" | "error";
|
|
12
29
|
}>(),
|
|
13
30
|
{ refreshing: false, disabled: false, threshold: 64, size: 36, color: "primary" },
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Renders a QR code as inline SVG — crisp at any size, no canvas or image assets. Available from the `/qrcode`
|
|
4
|
+
* entry point, so it never adds weight to the main bundle.
|
|
5
|
+
*
|
|
6
|
+
* @slot error Shown instead of the SVG when value is too large to encode at the given errorCorrectionLevel
|
|
7
|
+
*/
|
|
2
8
|
import { computed } from 'vue'
|
|
3
9
|
import QRCode from 'qrcode-generator'
|
|
4
10
|
|
|
5
11
|
const props = withDefaults(
|
|
6
12
|
defineProps<{
|
|
13
|
+
/** Data to encode. Required — there is no default. */
|
|
7
14
|
value: string
|
|
15
|
+
/** Width/height in pixels (square) */
|
|
8
16
|
size?: number
|
|
9
17
|
/** Quiet zone around the code, in modules. */
|
|
10
18
|
margin?: number
|
|
19
|
+
/** Higher levels tolerate more damage/obstruction at the cost of a denser code */
|
|
11
20
|
errorCorrectionLevel?: 'L' | 'M' | 'Q' | 'H'
|
|
21
|
+
/** Dark module color */
|
|
12
22
|
color?: string
|
|
23
|
+
/** Light module / background color */
|
|
13
24
|
background?: string
|
|
25
|
+
/** aria-label for the svg. Defaults to value */
|
|
14
26
|
label?: string
|
|
15
27
|
/** Rounds the outer container corners. */
|
|
16
28
|
rounded?: boolean
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A single radio button, for when you lay out the options yourself. It's selected when `modelValue` equals its
|
|
4
|
+
* `value`; for a plain list of options, MRadioGroup is simpler.
|
|
5
|
+
*
|
|
6
|
+
* @event update:modelValue Emitted with `value` when the radio is selected.
|
|
7
|
+
*/
|
|
2
8
|
import { computed, useId } from "vue";
|
|
3
9
|
|
|
4
10
|
const props = withDefaults(
|
|
5
11
|
defineProps<{
|
|
12
|
+
/** The group's current value (v-model); share one ref between the radios of a group. */
|
|
6
13
|
modelValue: unknown;
|
|
14
|
+
/** The value this radio stands for; selecting it sets the v-model to it. */
|
|
7
15
|
value: unknown;
|
|
16
|
+
/** Text next to the radio. Clicking it selects the radio too. */
|
|
8
17
|
label?: string;
|
|
18
|
+
/** Grays the radio out and ignores clicks. */
|
|
9
19
|
disabled?: boolean;
|
|
20
|
+
/** Color role of the selected radio. */
|
|
10
21
|
color?: "primary" | "secondary" | "tertiary" | "error";
|
|
11
22
|
}>(),
|
|
12
23
|
{ disabled: false, color: "primary" },
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A group of radio buttons sharing a single selection, column or row layout.
|
|
4
|
+
*
|
|
5
|
+
* @event update:modelValue Emitted with the selected option's value.
|
|
6
|
+
*/
|
|
2
7
|
import MRadio from './MRadio.vue'
|
|
3
8
|
|
|
4
9
|
interface Option {
|
|
@@ -8,11 +13,17 @@ interface Option {
|
|
|
8
13
|
}
|
|
9
14
|
|
|
10
15
|
const props = withDefaults(defineProps<{
|
|
16
|
+
/** Selected value (v-model) */
|
|
11
17
|
modelValue: unknown
|
|
18
|
+
/** Radio options */
|
|
12
19
|
options: Option[]
|
|
20
|
+
/** Group label */
|
|
13
21
|
label?: string
|
|
22
|
+
/** Layout direction */
|
|
14
23
|
direction?: 'column' | 'row'
|
|
24
|
+
/** Disables all radios */
|
|
15
25
|
disabled?: boolean
|
|
26
|
+
/** Radio color */
|
|
16
27
|
color?: 'primary' | 'secondary' | 'tertiary' | 'error'
|
|
17
28
|
}>(), { direction: 'column', disabled: false, color: 'primary' })
|
|
18
29
|
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A star rating input with half increments and any Material Symbol icon. Not part of the official M3 spec, so
|
|
4
|
+
* it's built from M3 primitives: filled/outlined icon pairs, a state layer on hover/press, and a focus ring.
|
|
5
|
+
* Click or drag to rate (drag past the first icon to clear), or use the arrow keys, Home and End when focused.
|
|
6
|
+
*
|
|
7
|
+
* @event update:modelValue Emitted when the user rates by click, drag or keyboard (v-model). Dragging past the
|
|
8
|
+
* first icon emits 0
|
|
9
|
+
*/
|
|
2
10
|
import { computed, ref } from 'vue'
|
|
3
11
|
import MIcon from './MIcon.vue'
|
|
4
12
|
|
|
@@ -6,13 +14,24 @@ import MIcon from './MIcon.vue'
|
|
|
6
14
|
// Material Symbol pairs, on-surface-variant for the unselected icon, a 40px circular
|
|
7
15
|
// hover/press state layer (8%/10%) tinted with the active color, and a secondary focus ring.
|
|
8
16
|
const props = withDefaults(defineProps<{
|
|
17
|
+
/** Current rating (v-model) */
|
|
9
18
|
modelValue: number
|
|
19
|
+
/** Maximum stars */
|
|
10
20
|
max?: number
|
|
21
|
+
/** Star size in px */
|
|
11
22
|
size?: number
|
|
23
|
+
/** Display-only: not focusable, exposed as role="img" with the value as its label */
|
|
12
24
|
readonly?: boolean
|
|
25
|
+
/** Disables interaction */
|
|
13
26
|
disabled?: boolean
|
|
27
|
+
/** One of the 4 M3 roles ('primary' | 'secondary' | 'tertiary' | 'error'), or any other CSS color string */
|
|
14
28
|
color?: string
|
|
29
|
+
/** Material Symbol icon */
|
|
15
30
|
icon?: string
|
|
31
|
+
/**
|
|
32
|
+
* Allow half-star values (click the left half of an icon). Fractional values always render exactly, with or
|
|
33
|
+
* without this prop
|
|
34
|
+
*/
|
|
16
35
|
halfIncrements?: boolean
|
|
17
36
|
}>(), { max: 5, size: 28, color: 'primary', icon: 'star', halfIncrements: false })
|
|
18
37
|
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* Wrapper that sets `position: relative` on a container. Use it as the positioning parent for MAbsolute
|
|
4
|
+
* children.
|
|
5
|
+
*
|
|
6
|
+
* @slot default Content; absolutely positioned children are placed relative to it.
|
|
7
|
+
*/
|
|
8
|
+
-->
|
|
1
9
|
<template>
|
|
2
10
|
<div class="relative">
|
|
3
11
|
<slot />
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Renders a timestamp as human-readable relative text ("5 minutes ago", "in 2 hours") that keeps itself up to
|
|
4
|
+
* date, formatted with the native Intl.RelativeTimeFormat. It renders a semantic `<time>` element, and hovering
|
|
5
|
+
* it shows the full absolute date.
|
|
6
|
+
*/
|
|
2
7
|
import { computed, onUnmounted, ref, watch } from 'vue'
|
|
3
8
|
import { useLocale } from '../composables/useLocale'
|
|
4
9
|
|
|
5
10
|
const props = withDefaults(
|
|
6
11
|
defineProps<{
|
|
12
|
+
/** Required. The timestamp to format: an ISO string, epoch milliseconds, or a Date */
|
|
7
13
|
value: string | number | Date
|
|
8
14
|
/** BCP-47 locale tag (e.g. 'es-ES'). Defaults to the app's locale (via createM3UI/useLocale), then the browser's locale. */
|
|
9
15
|
locale?: string
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Shows or hides content at specific breakpoints using pure CSS (Tailwind's `hidden`/`block` utilities) — no JS
|
|
4
|
+
* resize listener.
|
|
5
|
+
*
|
|
6
|
+
* @slot default Content.
|
|
7
|
+
*/
|
|
2
8
|
import { computed } from 'vue'
|
|
3
9
|
|
|
4
10
|
type Breakpoint = 'sm-up' | 'md-up' | 'lg-up' | 'xl-up' | 'sm-down' | 'md-down' | 'lg-down' | 'xl-down'
|
|
5
11
|
|
|
6
12
|
const props = withDefaults(
|
|
7
13
|
defineProps<{
|
|
14
|
+
/** Show content only at this breakpoint range */
|
|
8
15
|
show?: Breakpoint
|
|
16
|
+
/** Hide content at this breakpoint range */
|
|
9
17
|
hide?: Breakpoint
|
|
18
|
+
/** HTML tag to render */
|
|
10
19
|
tag?: string
|
|
11
20
|
}>(),
|
|
12
21
|
{ tag: 'div' },
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A full result screen for the end of a flow: success, errors, empty states and HTTP error pages. Each status
|
|
4
|
+
* comes with its own icon, colors, title and description, and you can override any of them. The default texts
|
|
5
|
+
* come from the active locale (`useLocale`), so they follow the language passed to `createM3UI({ locale })`.
|
|
6
|
+
*
|
|
7
|
+
* @slot actions Action buttons, in a centered row below the description
|
|
8
|
+
* @slot default Extra content below the actions row, e.g. a secondary link or fine print
|
|
9
|
+
*/
|
|
2
10
|
import { computed } from 'vue'
|
|
3
11
|
import MIcon from './MIcon.vue'
|
|
4
12
|
import { useLocale, type M3Locale } from '../composables/useLocale'
|
|
5
13
|
|
|
6
14
|
const props = withDefaults(defineProps<{
|
|
15
|
+
/**
|
|
16
|
+
* Required. Picks the icon, its colors, and the default title/description. The three HTTP statuses also show
|
|
17
|
+
* the code in large type above the icon
|
|
18
|
+
*/
|
|
7
19
|
status: 'success' | 'error' | 'warning' | 'info' | '404' | '403' | '500'
|
|
20
|
+
/** Custom title, replaces the status default */
|
|
8
21
|
title?: string
|
|
22
|
+
/** Custom description, replaces the status default */
|
|
9
23
|
description?: string
|
|
10
24
|
}>(), {})
|
|
11
25
|
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A WYSIWYG editor built on tiptap, with a formatting toolbar covering text styles, lists, alignment, links,
|
|
4
|
+
* and images.
|
|
5
|
+
*
|
|
6
|
+
* @event update:modelValue Emitted with the editor HTML on every content change — powers v-model
|
|
7
|
+
*/
|
|
2
8
|
import { ref, watch, onMounted, onBeforeUnmount, shallowRef, computed } from 'vue'
|
|
3
9
|
import MIcon from './MIcon.vue'
|
|
4
10
|
import MMenu from './MMenu.vue'
|
|
@@ -40,10 +46,18 @@ const locale = useLocale()
|
|
|
40
46
|
|
|
41
47
|
const props = withDefaults(
|
|
42
48
|
defineProps<{
|
|
49
|
+
/** HTML content (v-model) */
|
|
43
50
|
modelValue: string
|
|
51
|
+
/** Placeholder text shown on an empty document */
|
|
44
52
|
placeholder?: string
|
|
53
|
+
/** Disables editing */
|
|
45
54
|
disabled?: boolean
|
|
55
|
+
/** Minimum editor height */
|
|
46
56
|
minHeight?: string
|
|
57
|
+
/**
|
|
58
|
+
* Object with all toolbar/dialog label overrides for i18n (see `RichTextEditorLabels`) — defaults come from
|
|
59
|
+
* useLocale()
|
|
60
|
+
*/
|
|
47
61
|
labels?: RichTextEditorLabels
|
|
48
62
|
}>(),
|
|
49
63
|
{ disabled: false, minHeight: '200px' },
|