@m3ui-vue/m3ui-vue 1.5.0 → 1.6.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 +43 -32
- package/dist/{MButton-D_uxtJa-.js → MButton-CPghlKb0.js} +8 -9
- package/dist/MButton-CPghlKb0.js.map +1 -0
- package/dist/{MDialog-DT4KAPmn.js → MDialog-X50At1Gk.js} +38 -44
- package/dist/MDialog-X50At1Gk.js.map +1 -0
- package/dist/{MIcon-Bxh9j135.js → MIcon-DpajuUTJ.js} +2 -3
- package/dist/MIcon-DpajuUTJ.js.map +1 -0
- package/dist/{MIconButton-DoNotQ9v.js → MIconButton-BBggVwBV.js} +5 -6
- package/dist/MIconButton-BBggVwBV.js.map +1 -0
- package/dist/{MListItem-CwYrxpPZ.js → MListItem-DVi1j1QI.js} +8 -14
- package/dist/MListItem-DVi1j1QI.js.map +1 -0
- package/dist/{MLoadingIndicator-DhzECYRI.js → MLoadingIndicator-vooA3110.js} +3 -4
- package/dist/MLoadingIndicator-vooA3110.js.map +1 -0
- package/dist/{MMenuItem-Bih0h4-n.js → MMenuItem-CRNZkVVr.js} +13 -25
- package/dist/MMenuItem-CRNZkVVr.js.map +1 -0
- package/dist/{MProgressBar-BCoruxA-.js → MProgressBar-BWly1UKN.js} +3 -8
- package/dist/MProgressBar-BWly1UKN.js.map +1 -0
- package/dist/{MSeekBar-DQPF5FTp.js → MSeekBar-BL2W5_rD.js} +4 -5
- package/dist/MSeekBar-BL2W5_rD.js.map +1 -0
- package/dist/{MSegmentedButton-DL9JtJFX.js → MSegmentedButton-BEB4gXLA.js} +3 -4
- package/dist/MSegmentedButton-BEB4gXLA.js.map +1 -0
- package/dist/{MSlider-BvoMZTy9.js → MSlider-B9NcKTmZ.js} +22 -23
- package/dist/MSlider-B9NcKTmZ.js.map +1 -0
- package/dist/{MSpinner-CgcCQhS9.js → MSpinner-_XpTRkAg.js} +3 -4
- package/dist/MSpinner-_XpTRkAg.js.map +1 -0
- package/dist/{MTextField-B72dwF6V.js → MTextField-DpcPmR5B.js} +119 -89
- package/dist/MTextField-DpcPmR5B.js.map +1 -0
- package/dist/{MTooltip-YyF1CO75.js → MTooltip-BL3jPYPT.js} +10 -12
- package/dist/MTooltip-BL3jPYPT.js.map +1 -0
- package/dist/THIRD_PARTY_LICENSES.md +2 -2
- package/dist/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
- package/dist/{_storageKeys-CYXsUBwK.js → _storageKeys-C4W_4xK4.js} +2 -3
- package/dist/_storageKeys-C4W_4xK4.js.map +1 -0
- package/dist/{_useEscapeStack-CjndQhqg.js → _useEscapeStack-C5-BYr8y.js} +2 -3
- package/dist/_useEscapeStack-C5-BYr8y.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/barcode.js +1 -2
- package/dist/barcode.js.map +1 -1
- package/dist/chart.js +2 -4
- package/dist/chart.js.map +1 -1
- package/dist/code-editor.js +22 -23
- package/dist/code-editor.js.map +1 -1
- package/dist/{common-0dgrgaPL.js → common-kIb6A2Qu.js} +8 -37
- package/dist/common-kIb6A2Qu.js.map +1 -0
- package/dist/components/MAbsolute.vue.d.ts +5 -3
- package/dist/components/MAlert.vue.d.ts +8 -6
- package/dist/components/MAppBar.vue.d.ts +9 -7
- package/dist/components/MAppBarWithSearch.vue.d.ts +15 -13
- package/dist/components/MAppLayout.vue.d.ts +13 -11
- package/dist/components/MAspectRatio.vue.d.ts +5 -3
- package/dist/components/MAudioPlayer.vue.d.ts +22 -20
- package/dist/components/MAutocomplete.vue.d.ts +1 -1
- package/dist/components/MAvailabilityCalendar.vue.d.ts +19 -17
- package/dist/components/MBadge.vue.d.ts +6 -4
- package/dist/components/MBar.vue.d.ts +14 -12
- package/dist/components/MBarcode.vue.d.ts +5 -3
- package/dist/components/MBeforeAfter.vue.d.ts +12 -10
- package/dist/components/MBodyMap.vue.d.ts +1 -1
- package/dist/components/MBottomAppBar.vue.d.ts +10 -8
- package/dist/components/MBottomSheet.vue.d.ts +8 -6
- package/dist/components/MBottomSheetScaffold.vue.d.ts +9 -7
- package/dist/components/MBox.vue.d.ts +6 -4
- package/dist/components/MButton.vue.d.ts +7 -5
- package/dist/components/MCard.vue.d.ts +12 -10
- package/dist/components/MCenter.vue.d.ts +5 -3
- package/dist/components/MChatBubble.vue.d.ts +6 -4
- package/dist/components/MCheckbox.vue.d.ts +5 -3
- package/dist/components/MChip.vue.d.ts +9 -7
- package/dist/components/MCircleProgressBar.vue.d.ts +6 -4
- package/dist/components/MCodeEditor.vue.d.ts +5 -3
- package/dist/components/MContainer.vue.d.ts +6 -4
- package/dist/components/MContextMenu.vue.d.ts +8 -6
- package/dist/components/MCopyButton.vue.d.ts +1 -1
- package/dist/components/MDataTable.vue.d.ts +21 -19
- package/dist/components/MDialog.vue.d.ts +21 -19
- package/dist/components/MDragHandle.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +5 -3
- package/dist/components/MDrawToolbar.vue.d.ts +7 -5
- package/dist/components/MEmptyState.vue.d.ts +5 -3
- package/dist/components/MExpansionPanel.vue.d.ts +6 -4
- package/dist/components/MExportButton.vue.d.ts +7 -5
- package/dist/components/MFab.vue.d.ts +11 -9
- package/dist/components/MFabMenu.vue.d.ts +3 -3
- package/dist/components/MFixed.vue.d.ts +5 -3
- package/dist/components/MFlex.vue.d.ts +7 -5
- package/dist/components/MFloorPlan.vue.d.ts +3 -3
- package/dist/components/MFloorPlanInspector.vue.d.ts +32 -30
- package/dist/components/MFloorPlanToolbar.vue.d.ts +2 -2
- package/dist/components/MFlow.vue.d.ts +4 -4
- package/dist/components/MFlowControls.vue.d.ts +6 -4
- package/dist/components/MFlowHandle.vue.d.ts +1 -1
- package/dist/components/MFlowNode.vue.d.ts +11 -9
- package/dist/components/MFooter.vue.d.ts +12 -10
- package/dist/components/MFullscreen.vue.d.ts +5 -3
- package/dist/components/MGantt.vue.d.ts +33 -31
- package/dist/components/MGanttControls.vue.d.ts +8 -6
- package/dist/components/MGrid.vue.d.ts +6 -4
- package/dist/components/MIcon.vue.d.ts +5 -0
- package/dist/components/MIconButton.vue.d.ts +1 -1
- package/dist/components/MImageCropper.vue.d.ts +14 -12
- package/dist/components/MInfiniteScroll.vue.d.ts +11 -9
- package/dist/components/MList.vue.d.ts +5 -3
- package/dist/components/MListGroup.vue.d.ts +7 -5
- package/dist/components/MListItem.vue.d.ts +21 -19
- package/dist/components/MListSubheader.vue.d.ts +5 -3
- package/dist/components/MLoadingOverlay.vue.d.ts +10 -8
- package/dist/components/MMap.vue.d.ts +14 -6
- package/dist/components/MMapControl.vue.d.ts +12 -10
- package/dist/components/MMapFeatureInfo.vue.d.ts +11 -9
- package/dist/components/MMapIdentify.vue.d.ts +9 -7
- package/dist/components/MMapLayers.vue.d.ts +13 -11
- package/dist/components/MMapMarker.vue.d.ts +7 -5
- package/dist/components/MMapPopup.vue.d.ts +5 -3
- package/dist/components/MMasonry.vue.d.ts +5 -3
- package/dist/components/MMenu.vue.d.ts +12 -10
- package/dist/components/MMenuItem.vue.d.ts +11 -9
- package/dist/components/MMultiAutocomplete.vue.d.ts +1 -1
- package/dist/components/MMultiSelect.vue.d.ts +6 -4
- package/dist/components/MNavigationDrawer.vue.d.ts +14 -12
- package/dist/components/MNavigationRail.vue.d.ts +7 -5
- package/dist/components/MOdontogram.vue.d.ts +1 -1
- package/dist/components/MOrderBook.vue.d.ts +1 -1
- package/dist/components/MOverlay.vue.d.ts +5 -3
- package/dist/components/MPdfViewer.vue.d.ts +4 -4
- package/dist/components/MPhoneInput.vue.d.ts +11 -9
- package/dist/components/MPosKeypad.vue.d.ts +18 -16
- package/dist/components/MProgressBar.vue.d.ts +1 -1
- package/dist/components/MPullToRefresh.vue.d.ts +5 -3
- package/dist/components/MQRCode.vue.d.ts +7 -5
- package/dist/components/MRadioGroup.vue.d.ts +1 -1
- package/dist/components/MReceipt.vue.d.ts +2 -2
- package/dist/components/MRelative.vue.d.ts +5 -3
- package/dist/components/MResourceTimeline.vue.d.ts +31 -29
- package/dist/components/MResponsive.vue.d.ts +5 -3
- package/dist/components/MResult.vue.d.ts +7 -5
- package/dist/components/MScrollable.vue.d.ts +7 -5
- package/dist/components/MSearchBar.vue.d.ts +13 -11
- package/dist/components/MSearchField.vue.d.ts +7 -5
- package/dist/components/MSection.vue.d.ts +11 -9
- package/dist/components/MSeekBar.vue.d.ts +3 -3
- package/dist/components/MSelect.vue.d.ts +1 -1
- package/dist/components/MShader.vue.d.ts +11 -9
- package/dist/components/MShortNavigationBar.vue.d.ts +1 -1
- package/dist/components/MSideSheet.vue.d.ts +9 -7
- package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +2 -2
- package/dist/components/MSlider.vue.d.ts +3 -3
- package/dist/components/MSparkline.vue.d.ts +1 -1
- package/dist/components/MSplitButton.vue.d.ts +7 -5
- package/dist/components/MSplitter.vue.d.ts +9 -7
- package/dist/components/MSpotlightSearch.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +8 -6
- package/dist/components/MStatCard.vue.d.ts +5 -3
- package/dist/components/MStepper.vue.d.ts +5 -3
- package/dist/components/MSticky.vue.d.ts +5 -3
- package/dist/components/MSubtitle.vue.d.ts +6 -4
- package/dist/components/MSwipeToDismiss.vue.d.ts +11 -9
- package/dist/components/MTable.vue.d.ts +17 -15
- package/dist/components/MText.vue.d.ts +5 -3
- package/dist/components/MTextField.vue.d.ts +6 -4
- package/dist/components/MTimePickerModal.vue.d.ts +1 -1
- package/dist/components/MTitle.vue.d.ts +6 -4
- package/dist/components/MToggleButton.vue.d.ts +5 -3
- package/dist/components/MToolbar.vue.d.ts +24 -22
- package/dist/components/MTooltip.vue.d.ts +10 -8
- package/dist/components/MTopAppBar.vue.d.ts +22 -20
- package/dist/components/MTour.vue.d.ts +28 -26
- package/dist/components/MTransition.vue.d.ts +5 -3
- package/dist/components/MTree.vue.d.ts +6 -4
- package/dist/components/MTreeTable.vue.d.ts +21 -19
- package/dist/components/MTypewriter.vue.d.ts +6 -4
- package/dist/components/MVirtualTable.vue.d.ts +8 -6
- package/dist/components/_MMapLayerItem.vue.d.ts +8 -6
- package/dist/components/_MPdfPage.vue.d.ts +2 -2
- package/dist/components/_MToolbarFab.vue.d.ts +5 -3
- package/dist/components/_MTreeNode.vue.d.ts +13 -11
- package/dist/composables/_fieldLayout.d.ts +47 -0
- package/dist/composables/useMap.d.ts +8 -0
- package/dist/{dist-CrjSW5DN.js → dist-Bj5kEq8G.js} +4 -6
- package/dist/dist-Bj5kEq8G.js.map +1 -0
- package/dist/draw.js +62 -82
- package/dist/draw.js.map +1 -1
- package/dist/{emoji-names-de-BphO5XpV.js → emoji-names-de-Cu3OSpp6.js} +2 -3
- package/dist/emoji-names-de-Cu3OSpp6.js.map +1 -0
- package/dist/{emoji-names-en-9ZvMRvzi.js → emoji-names-en-BNX1pM9h.js} +2 -3
- package/dist/emoji-names-en-BNX1pM9h.js.map +1 -0
- package/dist/{emoji-names-es-DvfWU3Pj.js → emoji-names-es-C_Dafg4D.js} +2 -3
- package/dist/emoji-names-es-C_Dafg4D.js.map +1 -0
- package/dist/{emoji-names-fr-B-jhUlsP.js → emoji-names-fr-D4HTMFuM.js} +2 -3
- package/dist/emoji-names-fr-D4HTMFuM.js.map +1 -0
- package/dist/{emoji-names-ja-l8cMFJo1.js → emoji-names-ja-BCql-Sj6.js} +2 -3
- package/dist/emoji-names-ja-BCql-Sj6.js.map +1 -0
- package/dist/{emoji-names-ko-YP-o9G0c.js → emoji-names-ko-CT8L52nn.js} +2 -3
- package/dist/emoji-names-ko-CT8L52nn.js.map +1 -0
- package/dist/{emoji-names-pt-DGj_Js4M.js → emoji-names-pt-DHiwPiL-.js} +2 -3
- package/dist/emoji-names-pt-DHiwPiL-.js.map +1 -0
- package/dist/{emoji-names-zh-Dzecwtw_.js → emoji-names-zh-L3FXVief.js} +2 -3
- package/dist/emoji-names-zh-L3FXVief.js.map +1 -0
- package/dist/flow.js +351 -374
- package/dist/flow.js.map +1 -1
- package/dist/{flowPaths-CcWOKY4Z.js → flowPaths-BaH7yaUM.js} +3 -8
- package/dist/flowPaths-BaH7yaUM.js.map +1 -0
- package/dist/gantt.js +272 -333
- package/dist/gantt.js.map +1 -1
- package/dist/locales/index.js +1 -2
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +4085 -4277
- package/dist/m3ui.js.map +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/map.js +521 -520
- package/dist/map.js.map +1 -1
- package/dist/markdown.js +3 -4
- package/dist/markdown.js.map +1 -1
- package/dist/{material-color-utilities-C_iikgRm.js → material-color-utilities-CEFytLsr.js} +15 -32
- package/dist/material-color-utilities-CEFytLsr.js.map +1 -0
- package/dist/media.js +80 -94
- package/dist/media.js.map +1 -1
- package/dist/{motion-DZiXG09o.js → motion-BcejVTeX.js} +2 -3
- package/dist/motion-BcejVTeX.js.map +1 -0
- package/dist/pdf.js +103 -115
- package/dist/pdf.js.map +1 -1
- package/dist/qrcode.js +1 -2
- package/dist/qrcode.js.map +1 -1
- package/dist/rich-text-editor.js +33 -34
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/terminal.js +2 -3
- package/dist/terminal.js.map +1 -1
- package/dist/{useLocale-DLcG3qPC.js → useLocale-COav9m8C.js} +2 -3
- package/dist/useLocale-COav9m8C.js.map +1 -0
- package/dist/{useThemeTokens-DQQcaWbE.js → useThemeTokens-DyAdPQB0.js} +6 -10
- package/dist/useThemeTokens-DyAdPQB0.js.map +1 -0
- package/package.json +32 -32
- package/src/__tests__/MFab.test.ts +10 -1
- package/src/__tests__/MMap.test.ts +16 -1
- package/src/__tests__/_fakeMaplibre.ts +2 -0
- package/src/__tests__/fieldOverflow.test.ts +118 -0
- package/src/components/MAutocomplete.vue +21 -24
- package/src/components/MColorPicker.vue +3 -3
- package/src/components/MDatePicker.vue +4 -4
- package/src/components/MDateRangePicker.vue +4 -4
- package/src/components/MMap.vue +12 -3
- package/src/components/MMapMeasure.vue +3 -1
- package/src/components/MMaskField.vue +16 -24
- package/src/components/MMultiAutocomplete.vue +19 -25
- package/src/components/MMultiSelect.vue +20 -27
- package/src/components/MNumberField.vue +16 -26
- package/src/components/MPinInput.vue +3 -2
- package/src/components/MSearchBar.vue +2 -2
- package/src/components/MSelect.vue +16 -22
- package/src/components/MTagInput.vue +19 -26
- package/src/components/MTextField.vue +18 -46
- package/src/components/MTimePicker.vue +4 -4
- package/src/composables/_fieldLayout.ts +117 -0
- package/src/composables/useMap.ts +17 -0
- package/src/composables/useMapLayers.ts +4 -1
- package/src/map.ts +1 -1
- package/dist/MButton-D_uxtJa-.js.map +0 -1
- package/dist/MDialog-DT4KAPmn.js.map +0 -1
- package/dist/MIcon-Bxh9j135.js.map +0 -1
- package/dist/MIconButton-DoNotQ9v.js.map +0 -1
- package/dist/MListItem-CwYrxpPZ.js.map +0 -1
- package/dist/MLoadingIndicator-DhzECYRI.js.map +0 -1
- package/dist/MMenuItem-Bih0h4-n.js.map +0 -1
- package/dist/MProgressBar-BCoruxA-.js.map +0 -1
- package/dist/MSeekBar-DQPF5FTp.js.map +0 -1
- package/dist/MSegmentedButton-DL9JtJFX.js.map +0 -1
- package/dist/MSlider-BvoMZTy9.js.map +0 -1
- package/dist/MSpinner-CgcCQhS9.js.map +0 -1
- package/dist/MTextField-B72dwF6V.js.map +0 -1
- package/dist/MTooltip-YyF1CO75.js.map +0 -1
- package/dist/_storageKeys-CYXsUBwK.js.map +0 -1
- package/dist/_useEscapeStack-CjndQhqg.js.map +0 -1
- package/dist/common-0dgrgaPL.js.map +0 -1
- package/dist/dist-CrjSW5DN.js.map +0 -1
- package/dist/emoji-names-de-BphO5XpV.js.map +0 -1
- package/dist/emoji-names-en-9ZvMRvzi.js.map +0 -1
- package/dist/emoji-names-es-DvfWU3Pj.js.map +0 -1
- package/dist/emoji-names-fr-B-jhUlsP.js.map +0 -1
- package/dist/emoji-names-ja-l8cMFJo1.js.map +0 -1
- package/dist/emoji-names-ko-YP-o9G0c.js.map +0 -1
- package/dist/emoji-names-pt-DGj_Js4M.js.map +0 -1
- package/dist/emoji-names-zh-Dzecwtw_.js.map +0 -1
- package/dist/flowPaths-CcWOKY4Z.js.map +0 -1
- package/dist/material-color-utilities-C_iikgRm.js.map +0 -1
- package/dist/motion-DZiXG09o.js.map +0 -1
- package/dist/useLocale-DLcG3qPC.js.map +0 -1
- package/dist/useThemeTokens-DQQcaWbE.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.6.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.
|
|
@@ -1393,7 +1393,7 @@ Import from `@m3ui-vue/m3ui-vue/draw`.
|
|
|
1393
1393
|
A drawing surface: pens that follow a stylus' pressure, an eraser that cuts strokes (and the pen's eraser end), lines, arrows, rectangles, ellipses, text, lasso selection to move, scale or delete, layers, undo and redo, pan and pinch zoom. An infinite canvas, or pages of a fixed size. The drawing is plain data (`v-model`, a list of strokes, shapes and texts), exported as SVG or PNG. Put an MDrawToolbar (or your own, with `useDrawing()`) in its default slot. Not an M3 spec component. Gestures: draw with the pen, mouse or a finger; two fingers pan and zoom (and cancel a stroke a finger just started); the wheel pans, Ctrl + wheel zooms; Space + drag or the middle button pans. With `penOnly` (by default once a stylus has been used) fingers only pan and zoom, so a palm on the screen doesn't draw. Keys: Ctrl+Z undo, Ctrl+Shift+Z or Ctrl+Y redo, Delete removes the selection, Escape drops it, Ctrl+A selects everything.
|
|
1394
1394
|
|
|
1395
1395
|
Props:
|
|
1396
|
-
- `mode?: "
|
|
1396
|
+
- `mode?: "pages" | "infinite" = "infinite"` — An endless canvas, or pages of `pageSize` stacked one under another
|
|
1397
1397
|
- `pageSize?: { width: number; height: number; } = { width: 794, height: 1123 }` — A page's size in drawing units (A4 at 96 dpi by default)
|
|
1398
1398
|
- `paper?: string = "#ffffff"` — The paper's color (pages, or the whole infinite canvas)
|
|
1399
1399
|
- `background?: "none" | "grid" | "dots" | "lines" = "none"` — A ruling drawn on the paper
|
|
@@ -1584,7 +1584,7 @@ Props:
|
|
|
1584
1584
|
- `direction?: "right" | "left" | "up" | "down" | "radial" = "up"` — Speed-dial expand direction
|
|
1585
1585
|
- `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
|
|
1586
1586
|
- `persistent?: boolean = false` — Keep speed-dial open after clicking an item or clicking outside
|
|
1587
|
-
- `align?: "
|
|
1587
|
+
- `align?: "start" | "end" = "start"` — For the `up`/`down` #content panel only: which edge it anchors to when it's wider than the FAB itself. 'start' (default) keeps its left edge aligned with the FAB's left edge (existing behavior); 'end' aligns the right edges instead, which keeps a wide panel from running off-screen when the FAB sits in the bottom-right corner, a common placement.
|
|
1588
1588
|
- `scrim?: boolean = false` — Dims the rest of the screen behind the #content panel while open (has no effect on the `items` speed dial). A plain sibling with its own fade transition, independent of the panel's enter/leave transform, so it doesn't visually shrink/lag along with it.
|
|
1589
1589
|
- `contentTransition?: "none" | "scale" | "fade" = "scale"` — How the #content panel itself animates open/closed. 'scale' (default) is the original fade+scale. 'fade' drops the scale — use this when the slot content already animates its own entrance (e.g. a staggered per-item reveal), so the panel doesn't *also* scale as a group on top of that; it still gives Vue a real transition to wait for on close, so the content's own leave animation has time to play instead of just vanishing. 'none' skips any panel-level transition entirely.
|
|
1590
1590
|
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the FAB's content color
|
|
@@ -1616,7 +1616,7 @@ Props:
|
|
|
1616
1616
|
- `size?: "small" | "large" | "regular" = "regular"` — Trigger FAB size — independent from `itemSize` below.
|
|
1617
1617
|
- `itemSize?: "small" | "large" | "regular" = "large"` — Menu item row size — independent from the trigger FAB's own `size`.
|
|
1618
1618
|
- `direction?: "up" | "down" = "up"` — Which side of the FAB the menu list opens toward
|
|
1619
|
-
- `align?: "
|
|
1619
|
+
- `align?: "start" | "end" = "end"` — Which edge the (usually wider-than-the-FAB) menu list anchors to — 'end' keeps it from running off-screen when the FAB sits in a bottom-right corner
|
|
1620
1620
|
- `scrim?: boolean = true` — Dim the rest of the screen while the menu is open
|
|
1621
1621
|
- `persistent?: boolean = false` — Keep the menu open after clicking an item or clicking outside
|
|
1622
1622
|
- `disabled?: boolean = false` — Disables the trigger FAB
|
|
@@ -1696,8 +1696,8 @@ A thin, prop-driven wrapper around CSS flexbox — direction, alignment, justifi
|
|
|
1696
1696
|
|
|
1697
1697
|
Props:
|
|
1698
1698
|
- `direction?: "row" | "column" | "row-reverse" | "column-reverse" = "row"` — Flex direction
|
|
1699
|
-
- `align?: "center" | "
|
|
1700
|
-
- `justify?: "center" | "
|
|
1699
|
+
- `align?: "center" | "start" | "end" | "stretch" | "baseline" = "stretch"` — Cross-axis alignment (align-items)
|
|
1700
|
+
- `justify?: "center" | "start" | "end" | "between" | "around" | "evenly" = "start"` — Main-axis alignment (justify-content)
|
|
1701
1701
|
- `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "none"` — Gap between items
|
|
1702
1702
|
- `wrap?: boolean = false` — Allow items to wrap
|
|
1703
1703
|
- `inline?: boolean = false` — Use inline-flex instead of flex
|
|
@@ -1737,7 +1737,7 @@ Props:
|
|
|
1737
1737
|
- `backgroundOpacity?: number = 0.5` — Its opacity
|
|
1738
1738
|
- `tableOrigin?: "center" | "corner" = "center"` — Which point of a table `x` / `y` name: its middle (default) or its top-left corner (unturned), as your data keeps it
|
|
1739
1739
|
- `overlap?: "warn" | "allow" | "prevent" = "warn"` — Tables that overlap while editing: `warn` outlines them (default), `prevent` also undoes a move or a resize that would make one overlap another, `allow` says nothing
|
|
1740
|
-
- `resizeSnap?: "grid" | "
|
|
1740
|
+
- `resizeSnap?: "grid" | "subgrid" | "free" = "free"` — How a resize handle steps (tables and decor): `grid` whole grid squares, `subgrid` the snapping step of walls and zones (`subgrid`), `free` not at all. The change steps, not the size: a table drawn a little smaller than its square keeps that margin and grows by whole squares
|
|
1741
1741
|
- `resizable?: boolean = true` — The handle that resizes the selected table (off when your tables keep one size)
|
|
1742
1742
|
- `dragMerged?: boolean = false` — Dragging (or nudging) a merged table moves its whole merge with it
|
|
1743
1743
|
- `selectable?: "none" | "multiple" | "single" = "none"` — What a click on a table selects outside editing: nothing, one, or several (toggling; to merge them). While editing, `multiple` keeps clicks toggling tables in and out of the selection, and a drag moves the table pressed on its own (to bring the ones being merged together)
|
|
@@ -2201,7 +2201,7 @@ Props:
|
|
|
2201
2201
|
|
|
2202
2202
|
Events:
|
|
2203
2203
|
- `link({ from: string; to: string; type: NonNullable<"FS" | "SS" | "FF" | "SF" | undefined>; })` — A dependency was drawn: `{ from, to, type }` (it's also added to the task)
|
|
2204
|
-
- `change({ tasks: GanttTask<any>[]; kind: "
|
|
2204
|
+
- `change({ tasks: GanttTask<any>[]; kind: "reorder" | "progress" | "move" | "resize" | "rename"; })` — A drag or a key changed tasks: `{ tasks, kind }` with the changed tasks and `'move' | 'resize' | 'progress' | 'reorder' | 'rename'`
|
|
2205
2205
|
- `delete({ tasks: GanttTask<any>[]; })` — Tasks were deleted: `{ tasks }`
|
|
2206
2206
|
- `update:selection(string[])`
|
|
2207
2207
|
- `update:tasks(GanttTask<any>[])`
|
|
@@ -2274,7 +2274,7 @@ Props:
|
|
|
2274
2274
|
- `lg?: 1 | 2 | 3 | 4 | 5 | 6 | 12` — Columns at lg breakpoint
|
|
2275
2275
|
- `xl?: 1 | 2 | 3 | 4 | 5 | 6 | 12` — Columns at xl breakpoint
|
|
2276
2276
|
- `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "md"` — Gap between items
|
|
2277
|
-
- `alignItems?: "center" | "
|
|
2277
|
+
- `alignItems?: "center" | "start" | "end" | "stretch" = "stretch"` — Vertical alignment
|
|
2278
2278
|
|
|
2279
2279
|
Slots:
|
|
2280
2280
|
- `#default` — The grid items.
|
|
@@ -2667,29 +2667,30 @@ Slots:
|
|
|
2667
2667
|
|
|
2668
2668
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
2669
2669
|
|
|
2670
|
-
A MapLibre GL map, for any style: a style URL (from an MVT server like mvt-rs, MapTiler, OpenFreeMap…) or a style object. Its controls take the M3 look and the app's locale, the view can be a v-model and remembered between visits, and markers, popups, GeoJSON layers and your own controls go inside it as components. For anything else, the MapLibre map itself is the `ready` event's argument and the `map` of `useMap()` in components placed inside. Available from the `/map` entry point; needs `maplibre-gl` installed and its CSS imported (`maplibre-gl/dist/maplibre-gl.css`). Give it a height. Server-side rendering renders the empty container: MapLibre loads in the browser.
|
|
2670
|
+
A MapLibre GL map, for any style: a style URL (from an MVT server like mvt-rs, MapTiler, OpenFreeMap…) or a style object. Its controls take the M3 look and the app's locale, the view can be a v-model and remembered between visits, and markers, popups, GeoJSON layers and your own controls go inside it as components. For anything else, the MapLibre map itself is the `ready` event's argument and the `map` of `useMap()` in components placed inside. Available from the `/map` entry point; needs `maplibre-gl` installed and its CSS imported (`maplibre-gl/dist/maplibre-gl.css`). Give it a height. Server-side rendering renders the empty container: MapLibre loads in the browser. With maplibre-gl 6 and a bundler, give it MapLibre's worker URL (`setMapWorker()` once at startup, or the `workerUrl` prop), or the map stays blank.
|
|
2671
2671
|
|
|
2672
2672
|
Props:
|
|
2673
|
-
- `mapStyle: string |
|
|
2674
|
-
- `keepLayers?: boolean | ((layer:
|
|
2675
|
-
- `transformStyle?:
|
|
2673
|
+
- `mapStyle: string | StyleSpecification` — The map's style: a style JSON URL or a style object (MapLibre's `StyleSpecification`). Changing it reloads the style, keeping what was added at runtime (see `keepLayers`)
|
|
2674
|
+
- `keepLayers?: boolean | ((layer: LayerSpecification) => boolean) = true` — What happens to the sources and layers added at runtime (with `useMap()`, or by `MMapGeoJson`, `MMapMeasure`…) when `mapStyle` changes: `true` carries them into the new style, on top of its layers; `false` drops them, as MapLibre does; a function picks the layers to carry (their sources come along)
|
|
2675
|
+
- `transformStyle?: TransformStyleFunction` — MapLibre's `transformStyle` for a `mapStyle` change, run after `keepLayers`: edit the next style before it loads (copy a layer's paint over, add a sprite…)
|
|
2676
2676
|
- `center?: [number, number]` (v-model:center) — `[lng, lat]` (v-model). When left out, the style's (or the remembered view's)
|
|
2677
2677
|
- `zoom?: number` (v-model:zoom) — Zoom level (v-model)
|
|
2678
2678
|
- `bearing?: number` (v-model:bearing) — Rotation in degrees (v-model)
|
|
2679
2679
|
- `pitch?: number` (v-model:pitch) — Tilt in degrees (v-model)
|
|
2680
2680
|
- `persist?: string | boolean = false` — Remember the view (center, zoom, bearing, pitch) in localStorage and start from it on the next visit: `true` under `m3-map-view` (after `createM3UI`'s `storagePrefix`, if any), or your own key (one per map)
|
|
2681
|
+
- `workerUrl?: string` — The URL of MapLibre's worker, handed to maplibre's `setWorkerUrl()` before the map is created. maplibre-gl 6 needs it under a bundler; with Vite: `import workerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url'`. Overrides `setMapWorker()`; the setting is global to maplibre, so the last one applied wins
|
|
2681
2682
|
- `navigation?: boolean | MapControlPosition = true` — Zoom and compass buttons: `false`, or a corner (`true` is top-right)
|
|
2682
2683
|
- `geolocate?: boolean | MapControlPosition = false` — A button that centers the map on the user's location and follows it: `false`, or a corner (`true` is top-right)
|
|
2683
2684
|
- `fullscreen?: boolean | MapControlPosition = false` — A fullscreen button: `false`, or a corner (`true` is top-right)
|
|
2684
2685
|
- `scale?: boolean | MapControlPosition = true` — A metric scale bar: `false`, or a corner (`true` is bottom-left)
|
|
2685
2686
|
- `attribution?: boolean | MapControlPosition = true` — The credits of the style's sources, an info button that opens into a pill: `false`, or a corner (`true` is bottom-right). Most tile providers require it
|
|
2686
|
-
- `options?: Partial<Omit<
|
|
2687
|
+
- `options?: Partial<Omit<MapOptions, "container" | "style">>` — Anything else for MapLibre's `Map` constructor (`maxZoom`, `maxBounds`, `cooperativeGestures`…)
|
|
2687
2688
|
- `adapter?: MapAdapter` — Reads the style's conventions (layer names, groups, base layers, what to identify or show on hover) for `MMapLayers`, `MMapBaseLayers`, `MMapIdentify` and `MMapHover`: `genericAdapter`, `orvianAdapter()`, or your own
|
|
2688
2689
|
|
|
2689
2690
|
Events:
|
|
2690
|
-
- `click(event:
|
|
2691
|
+
- `click(event: MapMouseEvent)` — A click on the map (MapLibre's `MapMouseEvent`: `lngLat`, `point`)
|
|
2691
2692
|
- `update:zoom(zoom: number)` — The zoom changed (on `moveend`)
|
|
2692
|
-
- `ready(map:
|
|
2693
|
+
- `ready(map: Map)` — The map loaded (with its style), with the MapLibre `Map`
|
|
2693
2694
|
- `update:center(center: [number, number])` — The view moved (on `moveend`): `[lng, lat]`
|
|
2694
2695
|
- `update:bearing(bearing: number)` — The rotation changed (on `moveend`)
|
|
2695
2696
|
- `update:pitch(pitch: number)` — The tilt changed (on `moveend`)
|
|
@@ -2698,7 +2699,7 @@ Slots:
|
|
|
2698
2699
|
- `#default` — Map components (`MMapMarker`, `MMapPopup`, `MMapGeoJson`, `MMapControl`) and anything to show over the map, rendered once the map exists
|
|
2699
2700
|
|
|
2700
2701
|
Exposed (template ref):
|
|
2701
|
-
- `map:
|
|
2702
|
+
- `map: Map | undefined` — The MapLibre map, once loaded
|
|
2702
2703
|
- `context: MapContext` — What the components inside it share: pass the `MMap` (or this) as `map` to `MMapLayers`, `useMap()`… outside it
|
|
2703
2704
|
|
|
2704
2705
|
```ts
|
|
@@ -2777,10 +2778,10 @@ Props:
|
|
|
2777
2778
|
- `layers?: MapGeoJsonLayer[]` — How to draw it: MapLibre layers without `source`. Defaults to theme-colored fill, outline, line and circle layers
|
|
2778
2779
|
- `before?: string` — Insert the layers below this layer id (e.g. under the style's labels)
|
|
2779
2780
|
- `interactive?: boolean = false` — Show a pointer over its features (set it when you handle `click`)
|
|
2780
|
-
- `sourceOptions?: Partial<Omit<
|
|
2781
|
+
- `sourceOptions?: Partial<Omit<GeoJSONSourceSpecification, "type" | "data">>` — More options for the GeoJSON source (`cluster`, `promoteId`, `tolerance`…)
|
|
2781
2782
|
|
|
2782
2783
|
Events:
|
|
2783
|
-
- `click(event:
|
|
2784
|
+
- `click(event: MapLayerMouseEvent)` — A click on one of its features (MapLibre's `MapLayerMouseEvent`: `e.features` holds them)
|
|
2784
2785
|
|
|
2785
2786
|
Exposed (template ref):
|
|
2786
2787
|
- `sourceId: string` — The source's id
|
|
@@ -2848,7 +2849,7 @@ Props:
|
|
|
2848
2849
|
- `lngLat: [number, number]` (v-model:lngLat) — Position, `[lng, lat]` (v-model with `draggable`)
|
|
2849
2850
|
- `color?: string` — The pin's color (any CSS color). Defaults to the theme's primary; ignored with custom content
|
|
2850
2851
|
- `draggable?: boolean = false` — Let the user drag it
|
|
2851
|
-
- `anchor?:
|
|
2852
|
+
- `anchor?: PositionAnchor` — Which part of the marker sits on `lngLat`. By default the pin's tip (MapLibre's placement: its center, offset `[0, -14]`), and the center of custom content
|
|
2852
2853
|
- `offset?: [number, number]` — Offset in pixels, `[x, y]`. The pin's default is MapLibre's `[0, -14]`, which puts its tip on `lngLat`
|
|
2853
2854
|
- `rotation?: number = 0` — Rotation in degrees
|
|
2854
2855
|
|
|
@@ -2861,7 +2862,7 @@ Slots:
|
|
|
2861
2862
|
- `#popup` — Content of a popup that opens when the marker is clicked
|
|
2862
2863
|
|
|
2863
2864
|
Exposed (template ref):
|
|
2864
|
-
- `marker: () =>
|
|
2865
|
+
- `marker: () => Marker | undefined` — The MapLibre marker
|
|
2865
2866
|
|
|
2866
2867
|
### MMapMeasure
|
|
2867
2868
|
|
|
@@ -2898,8 +2899,8 @@ Props:
|
|
|
2898
2899
|
- `open?: boolean = true` (v-model:open) — Shown (v-model)
|
|
2899
2900
|
- `closeButton?: boolean = true` — Show a close button
|
|
2900
2901
|
- `closeOnClick?: boolean = true` — Close it when the map is clicked
|
|
2901
|
-
- `anchor?:
|
|
2902
|
-
- `offset?:
|
|
2902
|
+
- `anchor?: PositionAnchor` — Where the popup sits relative to `lngLat`. By default MapLibre picks the side with room
|
|
2903
|
+
- `offset?: Offset` — Offset from `lngLat`: pixels, `[x, y]`, or one per side (`{ bottom: [0, -38], … }`, MapLibre's `Offset`). By default none: its tip touches the point
|
|
2903
2904
|
- `maxWidth?: string = "320px"` — Maximum width (CSS)
|
|
2904
2905
|
|
|
2905
2906
|
Events:
|
|
@@ -2909,7 +2910,7 @@ Slots:
|
|
|
2909
2910
|
- `#default` — The popup's content
|
|
2910
2911
|
|
|
2911
2912
|
Exposed (template ref):
|
|
2912
|
-
- `popup: () =>
|
|
2913
|
+
- `popup: () => Popup | undefined` — The MapLibre popup
|
|
2913
2914
|
|
|
2914
2915
|
### MMapSearch
|
|
2915
2916
|
|
|
@@ -3690,7 +3691,7 @@ Props:
|
|
|
3690
3691
|
- `max?: number` — Largest amount accepted; keys that would pass it are ignored
|
|
3691
3692
|
- `maxLength?: number` — Most digits accepted (a PIN's length, for one). With `pin` mode, filling it emits `submit` on its own
|
|
3692
3693
|
- `quickAmounts?: number[]` — Chips above the keys with preset amounts
|
|
3693
|
-
- `quickMode?: "
|
|
3694
|
+
- `quickMode?: "add" | "set" = "set"` — Whether a quick amount replaces the value or adds to it
|
|
3694
3695
|
- `due?: number` — Amount due: shows the remaining amount under the value, or the change once it's covered
|
|
3695
3696
|
- `actionLabel?: string` — Label of the submit button. Without it (and without the `action` slot) there is no button
|
|
3696
3697
|
- `actionIcon?: string` — Material Symbol on the submit button
|
|
@@ -3702,8 +3703,8 @@ Props:
|
|
|
3702
3703
|
|
|
3703
3704
|
Events:
|
|
3704
3705
|
- `update:modelValue(string)` — Emitted on every key — powers v-model
|
|
3705
|
-
- `key(string)` — Emitted on every key press, with the key (`'0'`–`'9'`, `'00'`, `'.'`, `'backspace'`, `'clear'`)
|
|
3706
3706
|
- `submit(string)` — Emitted by the action button or Enter, with the value
|
|
3707
|
+
- `key(string)` — Emitted on every key press, with the key (`'0'`–`'9'`, `'00'`, `'.'`, `'backspace'`, `'clear'`)
|
|
3707
3708
|
|
|
3708
3709
|
Slots:
|
|
3709
3710
|
- `#display { value: string; formatted: string; amount: number; }` — Replaces the value display. Slot props: `{ value, formatted, amount }`
|
|
@@ -4282,7 +4283,7 @@ Props:
|
|
|
4282
4283
|
- `placeholder?: string` — Defaults to the locale's "Search..."
|
|
4283
4284
|
- `variant?: "fullscreen" | "fullscreen-contained" | "docked" = "docked"` — 'docked' grows into a rounded panel anchored below the bar (default). 'fullscreen' takes over the whole viewport, matching M3's mobile search pattern — the leading icon becomes a back button either way. 'fullscreen-contained' (M3 Expressive's ExpandedFullScreenContainedSearchBar) also takes the whole viewport, on surface-container-low, but keeps the input in its pill shape, with no divider.
|
|
4284
4285
|
- `leadingIcon?: string = "search"` — Icon shown in the collapsed bar
|
|
4285
|
-
- `iconPosition?: "
|
|
4286
|
+
- `iconPosition?: "start" | "end" = "start"` — Which side of the *collapsed* bar the leading icon sits on. The expanded panel's back button always stays at the start regardless — that's a near-universal "go back" convention.
|
|
4286
4287
|
- `textAlign?: "center" | "start" = "start"` — Centers the input/placeholder text instead of the M3-standard start alignment (an iOS-style look some apps use for the collapsed bar).
|
|
4287
4288
|
- `loading?: boolean = false` — Shows a spinner in the expanded header instead of the clear button
|
|
4288
4289
|
- `clearable?: boolean = true` — Shows a clear (×) button once there is a query
|
|
@@ -4822,8 +4823,8 @@ Flex stack with gap, alignment, and optional dividers between items.
|
|
|
4822
4823
|
Props:
|
|
4823
4824
|
- `direction?: "row" | "column" = "column"` — Stack direction
|
|
4824
4825
|
- `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "md"` — Gap between items (ignored when divider is true)
|
|
4825
|
-
- `align?: "center" | "
|
|
4826
|
-
- `justify?: "center" | "
|
|
4826
|
+
- `align?: "center" | "start" | "end" | "stretch" | "baseline" = "stretch"` — Cross-axis alignment
|
|
4827
|
+
- `justify?: "center" | "start" | "end" | "between" | "around" | "evenly" = "start"` — Main-axis alignment
|
|
4827
4828
|
- `wrap?: boolean = false` — Allow items to wrap
|
|
4828
4829
|
- `divider?: boolean = false` — Show dividers between items instead of a gap
|
|
4829
4830
|
- `inline?: boolean = false` — Use inline-flex
|
|
@@ -5329,8 +5330,8 @@ Props:
|
|
|
5329
5330
|
- `variant?: "docked" | "floating" = "docked"` — Docked (edge-attached, full width/height, bordered) or floating (rounded pill with shadow)
|
|
5330
5331
|
- `orientation?: "horizontal" | "vertical" = "horizontal"` — Layout direction
|
|
5331
5332
|
- `color?: "surface" | "primary" | "secondary" | "tertiary" = "surface"` — Background color scheme
|
|
5332
|
-
- `fabPosition?: "
|
|
5333
|
-
- `align?: "center" | "
|
|
5333
|
+
- `fabPosition?: "start" | "end" | "none" = "none"` — Where the #fab slot renders relative to the toolbar body
|
|
5334
|
+
- `align?: "center" | "start" | "end" | "between" = "center"` — Item alignment along the main axis
|
|
5334
5335
|
- `collapseOnScroll?: string | boolean | HTMLElement | null = false` — Collapse a floating toolbar as the content scrolls down and expand it as it scrolls back up (40px each way): `true` follows the window, or pass the scrolling element (or a CSS selector for it). Off by default
|
|
5335
5336
|
- `expanded?: boolean = true` (v-model:expanded) — A floating toolbar's state: collapsed, it shows only the FAB, or only its center without one. Default `true`
|
|
5336
5337
|
|
|
@@ -5801,7 +5802,7 @@ The map of the enclosing `MMap`, for your own controls, layers and handlers (cal
|
|
|
5801
5802
|
```ts
|
|
5802
5803
|
useMap(source?: MaybeRefOrGetter<MapSource>): {
|
|
5803
5804
|
map: ComputedRef<Map$1 | undefined>
|
|
5804
|
-
maplibre: ComputedRef<typeof import("/home/runner/work/m3ui-vue/m3ui-vue/node_modules/.pnpm/maplibre-gl@
|
|
5805
|
+
maplibre: ComputedRef<typeof import("/home/runner/work/m3ui-vue/m3ui-vue/node_modules/.pnpm/maplibre-gl@6.19.0/node_modules/maplibre-gl/dist/maplibre-gl") | undefined>
|
|
5805
5806
|
styleVersion: ComputedRef<number>
|
|
5806
5807
|
activeTool: Ref<string | null>
|
|
5807
5808
|
onReady: (fn: (map: Maplibre.Map, maplibre: MaplibreModule) => void) => void
|
|
@@ -5810,6 +5811,16 @@ useMap(source?: MaybeRefOrGetter<MapSource>): {
|
|
|
5810
5811
|
}
|
|
5811
5812
|
```
|
|
5812
5813
|
|
|
5814
|
+
### setMapWorker
|
|
5815
|
+
|
|
5816
|
+
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
5817
|
+
|
|
5818
|
+
The URL of MapLibre's worker for every `MMap` (its `workerUrl` prop wins), handed to maplibre's `setWorkerUrl()` when the first map loads maplibre-gl. maplibre-gl 6 needs it under a bundler, or maps stay blank; call it once at startup. With Vite: `import workerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url'`. Unlike calling maplibre's own `setWorkerUrl()`, it doesn't load maplibre-gl before a map needs it.
|
|
5819
|
+
|
|
5820
|
+
```ts
|
|
5821
|
+
setMapWorker(url: string | undefined): void
|
|
5822
|
+
```
|
|
5823
|
+
|
|
5813
5824
|
### useMapLayers
|
|
5814
5825
|
|
|
5815
5826
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./MIcon-
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "./MSpinner-_XpTRkAg.js";
|
|
2
|
+
import { t } from "./MIcon-DpajuUTJ.js";
|
|
3
|
+
import { p as n } from "./MIconButton-BBggVwBV.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({
|
|
7
7
|
__name: "MButton",
|
|
8
8
|
props: {
|
|
@@ -125,7 +125,7 @@ var _ = "relative inline-flex items-center justify-center font-medium whitespace
|
|
|
125
125
|
style: u(T.value)
|
|
126
126
|
}, {
|
|
127
127
|
default: h(() => [
|
|
128
|
-
c.iconPos === "leading" ? (d(), s(r, { key: 0 }, [c.loading ? (d(), a(
|
|
128
|
+
c.iconPos === "leading" ? (d(), s(r, { key: 0 }, [c.loading ? (d(), a(e, {
|
|
129
129
|
key: 0,
|
|
130
130
|
size: j.value
|
|
131
131
|
}, null, 8, ["size"])) : c.icon ? (d(), a(t, {
|
|
@@ -139,7 +139,7 @@ var _ = "relative inline-flex items-center justify-center font-medium whitespace
|
|
|
139
139
|
"filled"
|
|
140
140
|
])) : o("", !0)], 64)) : o("", !0),
|
|
141
141
|
f(i.$slots, "default"),
|
|
142
|
-
c.iconPos === "trailing" ? (d(), s(r, { key: 1 }, [c.loading ? (d(), a(
|
|
142
|
+
c.iconPos === "trailing" ? (d(), s(r, { key: 1 }, [c.loading ? (d(), a(e, {
|
|
143
143
|
key: 0,
|
|
144
144
|
size: j.value
|
|
145
145
|
}, null, 8, ["size"])) : c.icon ? (d(), a(t, {
|
|
@@ -160,13 +160,12 @@ var _ = "relative inline-flex items-center justify-center font-medium whitespace
|
|
|
160
160
|
"disabled",
|
|
161
161
|
"class",
|
|
162
162
|
"style"
|
|
163
|
-
])), [[m(
|
|
163
|
+
])), [[m(n), {
|
|
164
164
|
disabled: c.disabled || c.loading,
|
|
165
165
|
color: c.rippleColor
|
|
166
166
|
}]]);
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
|
-
//#endregion
|
|
170
169
|
export { v as t };
|
|
171
170
|
|
|
172
|
-
//# sourceMappingURL=MButton-
|
|
171
|
+
//# sourceMappingURL=MButton-CPghlKb0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MButton-CPghlKb0.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\" :size=\"iconSize\" :filled=\"iconFilled\" />\n </template>\n </component>\n</template>\n"],"mappings":";;;;;AAkGA,IAAMe,IACJ,8e;;;;;;;;;;;;;;;;;;;;;;;;EAxFF,IAAMG,IAAe,CAAC,WAAW,OAAO,GAGlCC,IAAQC,GA0DRC,IAAMC,QAAeH,EAAM,KAAK,eAAe,QAAQ,GAEvDI,IAAgBD,QACd,CAAC,CAACH,EAAM,SAAS,CAAED,EAAmC,SAASC,EAAM,KAAK,CAClF,GAEMK,IAAcF,QAAe;GACjC,IAAKC,EAAc,OACnB,OAAO;IACL,mBAAmBJ,EAAM;IACzB,sBAAsB;IACtB,6BAA6BA,EAAM,QAAQ;IAC3C,gCAAgCA,EAAM;GACxC;EACF,CAAC,GAEKM,IAAUH,QAAeH,EAAM,UAAU,OAAO,GAGhDO,IAAO,4HACPC,IAAQL,QAAe;GAC3B,IAAMM,IAAIT,EAAM;GAEhB,OADI,CAACS,KAAKT,EAAM,YAAYA,EAAM,UAAgBK,EAAY,QACvD;IAAE,GAAGA,EAAY;IAAO,OAAOE,EAAK,KAAKE,CAAC,IAAI,eA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,EAAA;GAAO,OAASA,EAAA;EAAW,CAAA,C"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { t as n } from "./
|
|
4
|
-
import { t as r } from "./
|
|
1
|
+
import { t as e } from "./MIconButton-BBggVwBV.js";
|
|
2
|
+
import { i as t } from "./useLocale-COav9m8C.js";
|
|
3
|
+
import { t as n } from "./_useEscapeStack-C5-BYr8y.js";
|
|
4
|
+
import { t as r } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
5
5
|
import { Fragment as i, Teleport as a, Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, getCurrentInstance as h, mergeProps as g, nextTick as _, normalizeClass as v, onBeforeUnmount as y, onUnmounted as b, openBlock as x, ref as S, renderSlot as C, toDisplayString as w, unref as T, useId as E, watch as D, withCtx as O, withModifiers as k } from "vue";
|
|
6
|
-
|
|
6
|
+
// src/composables/_useScrollLock.ts
|
|
7
7
|
var A = 0, j = "";
|
|
8
8
|
function M() {
|
|
9
9
|
A++ === 0 && (j = document.body.style.overflow, document.body.style.overflow = "hidden");
|
|
@@ -14,12 +14,11 @@ function N() {
|
|
|
14
14
|
function P(e) {
|
|
15
15
|
let t = !1;
|
|
16
16
|
function n(e) {
|
|
17
|
-
typeof document
|
|
17
|
+
typeof document < "u" && e !== t && (t = e, e ? M() : N());
|
|
18
18
|
}
|
|
19
19
|
return e && D(e, (e) => n(!!e), { immediate: !0 }), h() && y(() => n(!1)), { set: n };
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
//#region src/components/MDialog.vue?vue&type=script&setup=true&lang.ts
|
|
21
|
+
// src/components/MDialog.vue?vue&type=script&setup=true&lang.ts
|
|
23
22
|
var F = ["aria-labelledby", "aria-label"], I = {
|
|
24
23
|
key: 0,
|
|
25
24
|
class: "min-h-0 overflow-y-auto rounded-[inherit]"
|
|
@@ -47,7 +46,7 @@ var F = ["aria-labelledby", "aria-label"], I = {
|
|
|
47
46
|
}, K = {
|
|
48
47
|
key: 2,
|
|
49
48
|
class: "flex-1 overflow-y-auto px-6 py-4 text-body-medium text-on-surface-variant"
|
|
50
|
-
}, q = /*#__PURE__*/
|
|
49
|
+
}, q = /*#__PURE__*/ r(/* @__PURE__ */ m({
|
|
51
50
|
inheritAttrs: !1,
|
|
52
51
|
__name: "MDialog",
|
|
53
52
|
props: {
|
|
@@ -74,8 +73,8 @@ var F = ["aria-labelledby", "aria-label"], I = {
|
|
|
74
73
|
}
|
|
75
74
|
},
|
|
76
75
|
emits: ["update:modelValue"],
|
|
77
|
-
setup(
|
|
78
|
-
let h =
|
|
76
|
+
setup(r, { emit: m }) {
|
|
77
|
+
let h = r, y = t(), A = (e) => /^-?[\d.]+[a-z%]*$|^(calc|min|max|clamp|var)\(/i.test(e.trim()), j = s(() => [h.maxWidth, h.maxHeight].filter((e) => !A(e))), M = s(() => ({
|
|
79
78
|
...A(h.maxWidth) ? { maxWidth: h.maxWidth } : {},
|
|
80
79
|
...A(h.maxHeight) ? { maxHeight: h.maxHeight } : {}
|
|
81
80
|
})), N = m;
|
|
@@ -85,89 +84,84 @@ var F = ["aria-labelledby", "aria-label"], I = {
|
|
|
85
84
|
let J = S(), Y = S(), X = S(!1), Z;
|
|
86
85
|
function Q() {
|
|
87
86
|
let e = J.value;
|
|
88
|
-
|
|
89
|
-
X.value = !1;
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
X.value = e.scrollHeight - e.scrollTop - e.clientHeight > 1;
|
|
87
|
+
e ? X.value = e.scrollHeight - e.scrollTop - e.clientHeight > 1 : X.value = !1;
|
|
93
88
|
}
|
|
94
|
-
P(() => h.modelValue),
|
|
89
|
+
P(() => h.modelValue), n(() => h.modelValue, q);
|
|
95
90
|
let $ = `m3-dialog-${E()}`;
|
|
96
91
|
return D(() => h.modelValue, async (e) => {
|
|
97
|
-
typeof window
|
|
92
|
+
typeof window < "u" && (e ? (await _(), Q(), Z = new ResizeObserver(Q), J.value && Z.observe(J.value), Y.value && Z.observe(Y.value)) : (Z?.disconnect(), Z = void 0));
|
|
98
93
|
}, { immediate: !0 }), b(() => {
|
|
99
94
|
Z?.disconnect();
|
|
100
|
-
}), (
|
|
95
|
+
}), (t, n) => (x(), c(a, { to: "body" }, [r.fullscreen ? (x(), c(o, {
|
|
101
96
|
key: 1,
|
|
102
97
|
name: "m3-dialog-fs",
|
|
103
98
|
appear: ""
|
|
104
99
|
}, {
|
|
105
|
-
default: O(() => [
|
|
100
|
+
default: O(() => [r.modelValue ? (x(), u("div", g({ key: 0 }, t.$attrs, {
|
|
106
101
|
class: "dialog-fs m3-dialog-fs-surface fixed inset-0 z-50 flex flex-col",
|
|
107
102
|
role: "dialog",
|
|
108
103
|
"aria-modal": "true",
|
|
109
|
-
"aria-labelledby": !
|
|
110
|
-
"aria-label":
|
|
111
|
-
}), [
|
|
112
|
-
|
|
104
|
+
"aria-labelledby": !r.bare && (t.$slots.title || r.title) ? $ : void 0,
|
|
105
|
+
"aria-label": r.bare ? r.title : void 0
|
|
106
|
+
}), [r.bare ? (x(), u("div", U, [C(t.$slots, "default", {}, void 0, !0)])) : (x(), u("div", W, [
|
|
107
|
+
r.persistent ? l("", !0) : (x(), c(e, {
|
|
113
108
|
key: 0,
|
|
114
109
|
icon: "close",
|
|
115
|
-
label:
|
|
110
|
+
label: r.closeLabel ?? T(y).close,
|
|
116
111
|
onClick: q
|
|
117
112
|
}, null, 8, ["label"])),
|
|
118
113
|
d("h2", {
|
|
119
114
|
id: $,
|
|
120
115
|
class: "flex-1 text-title-large font-medium text-on-surface"
|
|
121
|
-
}, [C(
|
|
122
|
-
|
|
123
|
-
])),
|
|
116
|
+
}, [C(t.$slots, "title", {}, () => [f(w(r.title), 1)], !0)]),
|
|
117
|
+
t.$slots.actions ? (x(), u("div", G, [C(t.$slots, "actions", {}, void 0, !0)])) : l("", !0)
|
|
118
|
+
])), r.bare ? l("", !0) : (x(), u("div", K, [C(t.$slots, "default", {}, void 0, !0)]))], 16, H)) : l("", !0)]),
|
|
124
119
|
_: 3
|
|
125
120
|
})) : (x(), c(o, {
|
|
126
121
|
key: 0,
|
|
127
122
|
name: "m3-dialog",
|
|
128
123
|
appear: ""
|
|
129
124
|
}, {
|
|
130
|
-
default: O(() => [
|
|
125
|
+
default: O(() => [r.modelValue ? (x(), u("div", {
|
|
131
126
|
key: 0,
|
|
132
127
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-scrim/32 p-4",
|
|
133
128
|
onClick: k(q, ["self"])
|
|
134
|
-
}, [d("div", g(
|
|
129
|
+
}, [d("div", g(t.$attrs, {
|
|
135
130
|
class: ["dialog-box m3-dialog-surface flex min-w-[280px] w-full flex-col", j.value],
|
|
136
131
|
style: M.value,
|
|
137
132
|
role: "dialog",
|
|
138
133
|
"aria-modal": "true",
|
|
139
|
-
"aria-labelledby": !
|
|
140
|
-
"aria-label":
|
|
141
|
-
}), [
|
|
134
|
+
"aria-labelledby": !r.bare && (t.$slots.title || r.title) ? $ : void 0,
|
|
135
|
+
"aria-label": r.bare ? r.title : void 0
|
|
136
|
+
}), [r.bare ? (x(), u("div", I, [C(t.$slots, "default", {}, void 0, !0)])) : (x(), u(i, { key: 1 }, [
|
|
142
137
|
d("div", L, [
|
|
143
|
-
|
|
138
|
+
r.closable && !r.persistent ? (x(), u("div", R, [p(e, {
|
|
144
139
|
icon: "close",
|
|
145
|
-
label:
|
|
140
|
+
label: r.closeLabel ?? T(y).close,
|
|
146
141
|
onClick: q
|
|
147
142
|
}, null, 8, ["label"])])) : l("", !0),
|
|
148
|
-
|
|
143
|
+
t.$slots.icon ? (x(), u("div", z, [C(t.$slots, "icon", {}, void 0, !0)])) : l("", !0),
|
|
149
144
|
d("h2", {
|
|
150
145
|
id: $,
|
|
151
|
-
class: v(["text-headline-small text-on-surface", [
|
|
152
|
-
}, [C(
|
|
146
|
+
class: v(["text-headline-small text-on-surface", [t.$slots.icon ? "text-center" : "text-left", r.closable && !r.persistent ? t.$slots.icon ? "px-10" : "pr-10" : ""]])
|
|
147
|
+
}, [C(t.$slots, "title", {}, () => [f(w(r.title), 1)], !0)], 2)
|
|
153
148
|
]),
|
|
154
149
|
d("div", {
|
|
155
150
|
ref_key: "contentEl",
|
|
156
151
|
ref: J,
|
|
157
|
-
class: v(["overflow-y-auto px-6 pt-2 text-body-medium text-on-surface-variant",
|
|
152
|
+
class: v(["overflow-y-auto px-6 pt-2 text-body-medium text-on-surface-variant", t.$slots.actions ? "pb-2" : "pb-6"]),
|
|
158
153
|
onScroll: Q
|
|
159
154
|
}, [d("div", {
|
|
160
155
|
ref_key: "contentInnerEl",
|
|
161
156
|
ref: Y
|
|
162
|
-
}, [C(
|
|
163
|
-
X.value &&
|
|
164
|
-
|
|
157
|
+
}, [C(t.$slots, "default", {}, void 0, !0)], 512)], 34),
|
|
158
|
+
X.value && t.$slots.actions ? (x(), u("div", B)) : l("", !0),
|
|
159
|
+
t.$slots.actions ? (x(), u("div", V, [C(t.$slots, "actions", {}, void 0, !0)])) : l("", !0)
|
|
165
160
|
], 64))], 16, F)])) : l("", !0)]),
|
|
166
161
|
_: 3
|
|
167
162
|
}))]));
|
|
168
163
|
}
|
|
169
164
|
}), [["__scopeId", "data-v-8f788bae"]]);
|
|
170
|
-
//#endregion
|
|
171
165
|
export { P as n, q as t };
|
|
172
166
|
|
|
173
|
-
//# sourceMappingURL=MDialog-
|
|
167
|
+
//# sourceMappingURL=MDialog-X50At1Gk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MDialog-X50At1Gk.js","names":["$attrs","$slots","_openBlock","_createBlock","_Teleport","_Transition","_withCtx","_createElementBlock","_withModifiers","_createElementVNode","_mergeProps","_renderSlot","_Fragment","_createVNode","MIconButton","_unref","_normalizeClass","_createTextVNode","_toDisplayString","MIconButton_default","useLocale","useEscapeStack","_plugin_vue_export_helper_default","count","previous","lock","unlock","useScrollLock","held","set","on","active","watch","getCurrentInstance","onBeforeUnmount","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","MDialog_default","defineComponent","__emit","props","__props","locale","isCssValue","v","sizeClasses","computed","sizeStyle","emit","close","contentEl","ref","contentInnerEl","showDivider","resizeObserver","updateDividerVisibility","el","titleId","useId","open","nextTick","onUnmounted","openBlock","createBlock","Teleport","Transition","withCtx","createElementBlock","mergeProps","_ctx","renderSlot","createCommentVNode","unref","createElementVNode","createTextVNode","toDisplayString","withModifiers","Fragment","createVNode","normalizeClass"],"sources":["../src/composables/_useScrollLock.ts","../src/components/MDialog.vue"],"sourcesContent":["import { getCurrentInstance, onBeforeUnmount, watch, type WatchSource } from 'vue'\n\n/*\n * Internal (not exported from index.ts): locks the page's scroll (body overflow hidden) while a modal surface is\n * open, shared by every component that does it. Counted, so overlays stacked on each other (a select's modal or a\n * date picker inside an MDialog) release it only when the last one closes: each component used to write\n * `overflow = ''` on its own, so closing the inner one let the page under the outer one scroll again. Each\n * instance also releases what it holds when it unmounts (a dialog removed while open left the page locked for good)\n * and nothing when it holds nothing (a select unmounting inside an open dialog used to unlock it).\n */\n\nlet count = 0\nlet previous = ''\n\nfunction lock() {\n if (count++ === 0) {\n previous = document.body.style.overflow\n document.body.style.overflow = 'hidden'\n }\n}\n\nfunction unlock() {\n if (count > 0 && --count === 0) document.body.style.overflow = previous\n}\n\n/**\n * Locks the page's scroll while `active` is true (from the start too: a dialog mounted open locks it), and releases\n * it when it turns false or the component unmounts. Without `active`, drive it with the returned `set`.\n */\nexport function useScrollLock(active?: WatchSource<boolean>) {\n let held = false\n function set(on: boolean) {\n if (typeof document === 'undefined' || on === held) return\n held = on\n if (on) lock()\n else unlock()\n }\n if (active) watch(active, (on) => set(!!on), { immediate: true })\n if (getCurrentInstance()) onBeforeUnmount(() => set(false))\n return { set }\n}\n","<script setup lang=\"ts\">\n/**\n * The generic M3 modal shell — Escape, scroll lock, and Teleport are handled internally. Supports a centered\n * card, a full-screen variant, and an optional icon that centers the title per spec.\n *\n * @slot icon M3 AlertDialog's optional icon (Secondary color, 24dp expected). Its presence also centers the\n * title, per spec.\n * @slot title Overrides the title prop with custom markup\n * @slot default Dialog body content — scrolls independently when taller than maxHeight. With `bare`, the whole\n * dialog: it fills the box (no title, padding, close button or actions row)\n * @slot actions Row of action buttons — wraps to a new line instead of overflowing when labels are long\n * @event update:modelValue Emitted when the dialog should open/close — powers v-model\n */\nimport { computed, nextTick, onUnmounted, ref, useId, watch } from 'vue'\nimport MIconButton from './MIconButton.vue'\nimport { useLocale } from '../composables/useLocale'\nimport { useScrollLock } from '../composables/_useScrollLock'\nimport { useEscapeStack } from '../composables/_useEscapeStack'\n\nconst props = withDefaults(\n defineProps<{\n /** Open/closed state (v-model) */\n modelValue: boolean\n /** Dialog title (overridable via the #title slot) */\n title?: string\n /** A Tailwind class (`max-w-sm`) or a CSS value (`420px`, `min(90vw, 40rem)`). */\n maxWidth?: string\n /**\n * Maximum height: a Tailwind class (`max-h-[60vh]`) or a CSS value (`480px`, `calc(100dvh - 4rem)`). When the\n * content is taller, the body scrolls and a divider appears above the actions.\n */\n // A Tailwind class (`max-h-[80vh]`) or a CSS value (`600px`). M3's `AlertDialogDefaults` has\n // no max-height token at all (only `DialogMaxWidth`) — the default here is a library-chosen\n // viewport-relative cap, not a spec value.\n maxHeight?: string\n /** Prevent closing by clicking the scrim, pressing Escape, or the X button */\n persistent?: boolean\n /** Full-screen variant — slides up from the bottom, covers the entire viewport */\n fullscreen?: boolean\n /** Aria label for the close (X) button — falls back to the locale string when omitted */\n closeLabel?: string\n /**\n * Show the header close (X) button — a library addition, not part of the M3 AlertDialog spec, so it can be\n * turned off\n */\n // Whether the header shows a close (\"X\") icon button. M3's `AlertDialog` spec has no such\n // button — it expects only a Cancel/Confirm text button in the actions row — so this is a\n // deliberate library extension on top of the spec, kept opt-out (default `true`, matching\n // this component's existing behavior) rather than added unconditionally.\n closable?: boolean\n /**\n * Just the dialog's box (surface, shape, elevation), scrim, Escape, scroll lock and animation, with the default\n * slot filling it: no title row, padding, close button or actions. For dialogs that draw everything themselves\n * (the date and time pickers). With `fullscreen`, the slot fills the screen and draws its own top bar. `title`\n * then only names it for assistive technology\n */\n bare?: boolean\n }>(),\n {\n // AlertDialogDefaults.DialogMaxWidth = 560dp\n maxWidth: 'max-w-[560px]',\n maxHeight: 'max-h-[90vh]',\n persistent: false,\n fullscreen: false,\n closable: true,\n bare: false,\n },\n)\n\n// The root is a Teleport, which can't take the consumer's class/style/attrs: they go on the dialog's surface\ndefineOptions({ inheritAttrs: false })\n\nconst locale = useLocale()\n\n// maxWidth/maxHeight take either a Tailwind class or a CSS value: a bare length or a CSS function\n// can't be a class, so those go to inline style instead.\nconst isCssValue = (v: string) => /^-?[\\d.]+[a-z%]*$|^(calc|min|max|clamp|var)\\(/i.test(v.trim())\nconst sizeClasses = computed(() => [props.maxWidth, props.maxHeight].filter((v) => !isCssValue(v)))\nconst sizeStyle = computed(() => ({\n ...(isCssValue(props.maxWidth) ? { maxWidth: props.maxWidth } : {}),\n ...(isCssValue(props.maxHeight) ? { maxHeight: props.maxHeight } : {}),\n}))\n\nconst emit = defineEmits<{ 'update:modelValue': [boolean] }>()\n\nfunction close() {\n if (props.persistent) return\n emit('update:modelValue', false)\n}\n\n\n// M3's dialog anatomy lists an optional divider between the (scrollable) content and the\n// actions row — Compose's own AlertDialog.kt has no built-in implementation of it at all, so\n// this shows it only when the content actually has more to scroll to, above the actions row.\nconst contentEl = ref<HTMLElement>()\nconst contentInnerEl = ref<HTMLElement>()\nconst showDivider = ref(false)\nlet resizeObserver: ResizeObserver | undefined\n\nfunction updateDividerVisibility() {\n const el = contentEl.value\n if (!el) { showDivider.value = false; return }\n showDivider.value = el.scrollHeight - el.scrollTop - el.clientHeight > 1\n}\n\nuseScrollLock(() => props.modelValue)\n// Escape closes the dialog on top only, when several are stacked\nuseEscapeStack(() => props.modelValue, close)\n\nconst titleId = `m3-dialog-${useId()}`\n\nwatch(\n () => props.modelValue,\n async (open) => {\n // Server rendering (a dialog open on load runs this immediately): nothing to measure or observe\n if (typeof window === 'undefined') return\n if (open) {\n await nextTick()\n updateDividerVisibility()\n // Observing contentEl alone only catches viewport-driven resizes (e.g. window resize\n // changing the maxHeight cap) — its own box stays put when the *slotted* content\n // changes height, since overflow doesn't affect the scroll container's own size. The\n // inner wrapper around the slot grows/shrinks with the actual content, so that's what\n // needs observing to catch dynamic content (reactive text, async-loaded content, etc).\n resizeObserver = new ResizeObserver(updateDividerVisibility)\n if (contentEl.value) resizeObserver.observe(contentEl.value)\n if (contentInnerEl.value) resizeObserver.observe(contentInnerEl.value)\n } else {\n resizeObserver?.disconnect()\n resizeObserver = undefined\n }\n },\n { immediate: true },\n)\n\nonUnmounted(() => {\n resizeObserver?.disconnect()\n})\n</script>\n\n<template>\n <Teleport to=\"body\">\n <!-- Basic dialog -->\n <!-- appear: a dialog mounted already open (v-if + modelValue in the same tick) animates in too -->\n <Transition v-if=\"!fullscreen\" name=\"m3-dialog\" appear>\n <div\n v-if=\"modelValue\"\n class=\"fixed inset-0 z-50 flex items-center justify-center bg-scrim/32 p-4\"\n @click.self=\"close\"\n >\n <div\n v-bind=\"$attrs\"\n class=\"dialog-box m3-dialog-surface flex min-w-[280px] w-full flex-col\"\n :class=\"sizeClasses\"\n :style=\"sizeStyle\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-labelledby=\"!bare && ($slots.title || title) ? titleId : undefined\"\n :aria-label=\"bare ? title : undefined\"\n >\n <!-- Bare: the content is the whole dialog (scrolling if taller than maxHeight), clipped to the box's\n corners (rounded-[inherit]) so content reaching its edges, like a full-bleed image, keeps them -->\n <div v-if=\"bare\" class=\"min-h-0 overflow-y-auto rounded-[inherit]\">\n <slot />\n </div>\n <template v-else>\n <!--\n AlertDialogDefaults.dialogPadding is 24dp on all four sides of the whole content\n column, with per-element bottom paddings (IconPadding/TitlePadding/textPadding)\n providing the gaps BETWEEN elements — not a single wrapping padding, since this\n template uses separate divs per section instead of one padded Column. Each\n section's own top/bottom classes are chosen so the combined gaps still land on\n the right dp value: title-to-body is 16dp (8px here + 8px there), body-to-actions\n is 24dp (8px here + 16px there), and the outermost edges (top of title, bottom of\n whichever section is last) are the full 24dp on their own.\n -->\n <div class=\"relative px-6 pt-6 pb-2\">\n <!--\n Wrapped in a plain div rather than passing `absolute right-4 top-4` straight to\n MIconButton: its root already carries its own `relative` (for the ripple span),\n and Tailwind resolves conflicting position utilities by source order in the\n compiled CSS, not by order in the class attribute — so an external `absolute`\n can silently lose to that internal `relative` instead of overriding it.\n -->\n <div v-if=\"closable && !persistent\" class=\"absolute right-4 top-4\">\n <MIconButton icon=\"close\" :label=\"closeLabel ?? locale.close\" @click=\"close\" />\n </div>\n <!--\n Icon slot: M3 AlertDialog's optional `icon` param (IconColor=Secondary,\n IconSize=24dp expected from the slot content, IconPadding bottom=16dp below it),\n which per spec also centers the title (\"Align the title to the center when an\n icon is present\") — reserving `pr-10` on the title only when the close button is\n also showing, so a centered title doesn't collide with it.\n -->\n <div v-if=\"$slots.icon\" class=\"mb-4 flex justify-center text-secondary\">\n <slot name=\"icon\" />\n </div>\n <h2\n :id=\"titleId\"\n class=\"text-headline-small text-on-surface\"\n :class=\"[\n $slots.icon ? 'text-center' : 'text-left',\n closable && !persistent ? ($slots.icon ? 'px-10' : 'pr-10') : '',\n ]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n </div>\n <div\n ref=\"contentEl\"\n class=\"overflow-y-auto px-6 pt-2 text-body-medium text-on-surface-variant\"\n :class=\"$slots.actions ? 'pb-2' : 'pb-6'\"\n @scroll=\"updateDividerVisibility\"\n >\n <div ref=\"contentInnerEl\">\n <slot />\n </div>\n </div>\n <!-- Divider: M3 dialog anatomy's optional divider, shown only while the content has more to scroll to -->\n <div v-if=\"showDivider && $slots.actions\" class=\"shrink-0 border-t border-outline-variant\" />\n <!-- flex-wrap approximates AlertDialogFlowRow: buttons wrap to a new line instead of overflowing when labels are too long to fit on one -->\n <div v-if=\"$slots.actions\" class=\"flex flex-wrap justify-end gap-2 px-6 pt-4 pb-6\">\n <slot name=\"actions\" />\n </div>\n </template>\n </div>\n </div>\n </Transition>\n\n <!-- Fullscreen dialog -->\n <Transition v-else name=\"m3-dialog-fs\" appear>\n <div\n v-if=\"modelValue\"\n v-bind=\"$attrs\"\n class=\"dialog-fs m3-dialog-fs-surface fixed inset-0 z-50 flex flex-col\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-labelledby=\"!bare && ($slots.title || title) ? titleId : undefined\"\n :aria-label=\"bare ? title : undefined\"\n >\n <!-- Bare: the content is the whole screen, top bar included, in whatever colors it draws -->\n <div v-if=\"bare\" class=\"min-h-0 flex-1 overflow-y-auto\">\n <slot />\n </div>\n <div v-else class=\"flex h-14 shrink-0 items-center gap-2 px-2\">\n <MIconButton v-if=\"!persistent\" icon=\"close\" :label=\"closeLabel ?? locale.close\" @click=\"close\" />\n <h2 :id=\"titleId\" class=\"flex-1 text-title-large font-medium text-on-surface\">\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n <div v-if=\"$slots.actions\" class=\"flex items-center gap-2\">\n <slot name=\"actions\" />\n </div>\n </div>\n <div v-if=\"!bare\" class=\"flex-1 overflow-y-auto px-6 py-4 text-body-medium text-on-surface-variant\">\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.m3-dialog-enter-active,\n.m3-dialog-leave-active {\n transition: opacity 0.15s ease;\n}\n.m3-dialog-enter-from,\n.m3-dialog-leave-to {\n opacity: 0;\n}\n.m3-dialog-enter-active .dialog-box,\n.m3-dialog-leave-active .dialog-box {\n transition: transform 0.15s ease;\n}\n.m3-dialog-enter-from .dialog-box,\n.m3-dialog-leave-to .dialog-box {\n transform: scale(0.95);\n}\n\n.m3-dialog-fs-enter-active,\n.m3-dialog-fs-leave-active {\n transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), opacity 0.15s ease;\n}\n.m3-dialog-fs-enter-from {\n transform: translateY(100%);\n opacity: 0;\n}\n.m3-dialog-fs-leave-to {\n transform: translateY(100%);\n opacity: 0;\n}\n</style>\n\n<style>\n/* The surfaces' look, in the base layer so the consumer's classes on MDialog win (see MShape) */\n@layer base {\n .m3-dialog-surface {\n background-color: var(--color-surface-container-high);\n border-radius: var(--radius-xl);\n box-shadow: var(--shadow-elevation-3);\n }\n .m3-dialog-fs-surface {\n background-color: var(--color-surface);\n }\n}\n</style>\n"],"mappings":";;;;;;AAWA,IAAIuB,IAAQ,GACRC,IAAW;AAEf,SAASC,IAAO;CACd,AAAI,QAAY,MACd,IAAW,SAAS,KAAK,MAAM,UAC/B,SAAS,KAAK,MAAM,WAAW;AAEnC;AAEA,SAASC,IAAS;CAChB,AAAIH,IAAQ,KAAK,EAAEA,MAAU,MAAG,SAAS,KAAK,MAAM,WAAWC;AACjE;AAMA,SAAgBG,EAAc,GAA+B;CAC3D,IAAIC,IAAO;CACX,SAASC,EAAI,GAAa;EACxB,AAAI,OAAO,WAAa,OAAeC,MAAOF,MAC9C,IAAOE,GACHA,IAAIL,EAAK,IACRC,EAAO;CACd;CAGA,OAFIK,KAAQC,EAAMD,IAAS,MAAOF,EAAI,CAAC,CAACC,CAAE,GAAG,EAAE,WAAW,GAAK,CAAC,GAC5DG,EAAmB,KAAGC,QAAsBL,EAAI,EAAK,CAAC,GACnD,EAAE,OAAI;AACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECrBA,IAAMqB,IAAQC,GAqDRC,IAAShC,EAAU,GAInBiC,KAAc,MAAc,iDAAiD,KAAKC,EAAE,KAAK,CAAC,GAC1FC,IAAcC,QAAe,CAACN,EAAM,UAAUA,EAAM,SAAS,CAAC,CAAC,QAAQ,MAAM,CAACG,EAAWC,CAAC,CAAC,CAAC,GAC5FG,IAAYD,SAAgB;GAChC,GAAIH,EAAWH,E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AAAK,EAEM,OAFNkC,GAEM,CADJ9B,EAAuBoE,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,EAAA,C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as e, defineComponent as t, normalizeStyle as n, openBlock as r, toDisplayString as i } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/components/MIcon.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var a = [
|
|
4
4
|
"role",
|
|
5
5
|
"aria-label",
|
|
@@ -28,7 +28,6 @@ var a = [
|
|
|
28
28
|
}, i(t.name), 13, a));
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
//#endregion
|
|
32
31
|
export { o as t };
|
|
33
32
|
|
|
34
|
-
//# sourceMappingURL=MIcon-
|
|
33
|
+
//# sourceMappingURL=MIcon-DpajuUTJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MIcon-DpajuUTJ.js","names":["_openBlock","_createElementBlock","_normalizeStyle","_toDisplayString","_hoisted_1","MIcon_default","defineComponent","openBlock","createElementBlock","__props","normalizeStyle","toDisplayString"],"sources":["../src/components/MIcon.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Renders a Material Symbols Outlined glyph by name. Color follows the surrounding text color (set it with a\n * Tailwind text-* class). Decorative by default: hidden from assistive technology, which would otherwise read the\n * glyph's ligature text (its name, e.g. \"arrow_drop_down\"). Give it a `label` when the icon says something on its own.\n */\nwithDefaults(defineProps<{\n /** Material Symbol name (e.g. \"settings\", \"favorite\") */\n name: string\n /** Icon size in px */\n size?: number\n /** Filled glyph (the Material Symbols FILL axis), as M3 draws a selected icon */\n filled?: boolean\n /** What the icon means, when nothing next to it says so: makes it an image with this name instead of decoration */\n label?: string\n}>(), { size: 24, filled: false })\n</script>\n\n<template>\n <span\n class=\"material-symbols-outlined leading-none\"\n :role=\"label ? 'img' : undefined\"\n :aria-label=\"label\"\n :aria-hidden=\"label ? undefined : 'true'\"\n :style=\"{ fontSize: `${size}px`, fontVariationSettings: filled ? `'FILL' 1` : undefined }\"\n >{{ name }}</span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;E,kBAmBEA,EAAA,GAAAC,EAMkB,QAAA;GALhB,OAAM;GACL,MAAMQ,EAAA,QAAK,QAAW,KAAA;GACtB,cAAYA,EAAA;GACZ,eAAaA,EAAA,QAAQ,KAAA,IAAS;GAC9B,OAAKP,EAAA;IAAA,UAAA,GAAiBO,EAAA,KAAI;IAAA,uBAA6BA,EAAA,SAAM,aAAgB,KAAA;GAAS,CAAA;EACrF,GAAAN,EAAAM,EAAA,IAAI,GAAA,IAAAL,CAAA"}
|