@m3ui-vue/m3ui-vue 1.1.3 → 1.2.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/README.md +1 -1
- package/dist/API.md +579 -40
- package/dist/MMenuItem-DI351kIf.js +929 -0
- package/dist/MMenuItem-DI351kIf.js.map +1 -0
- package/dist/MSlider-BnEy5ieZ.js +1500 -0
- package/dist/MSlider-BnEy5ieZ.js.map +1 -0
- package/dist/MTextField-BBmkaIbO.js +633 -0
- package/dist/MTextField-BBmkaIbO.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/chart.js +83 -49
- package/dist/chart.js.map +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/components/MAnimatedNumber.vue.d.ts +3 -1
- package/dist/components/MButton.vue.d.ts +9 -1
- package/dist/components/MButtonGroup.vue.d.ts +40 -31
- package/dist/components/MCarousel.vue.d.ts +2 -0
- package/dist/components/MChart.vue.d.ts +6 -0
- package/dist/components/MCircleProgressBar.vue.d.ts +5 -3
- package/dist/components/MContainerTransform.vue.d.ts +59 -0
- package/dist/components/MContextMenu.vue.d.ts +2 -2
- package/dist/components/MCopyButton.vue.d.ts +1 -1
- package/dist/components/MDialog.vue.d.ts +8 -5
- package/dist/components/MExportButton.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +2 -2
- package/dist/components/MFabMenu.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +1 -1
- package/dist/components/MIconButton.vue.d.ts +15 -1
- package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
- package/dist/components/MListItem.vue.d.ts +5 -5
- package/dist/components/MMap.vue.d.ts +20 -2
- package/dist/components/MMapBaseLayers.vue.d.ts +3 -0
- package/dist/components/MMapFilter.vue.d.ts +3 -0
- package/dist/components/MMapLayers.vue.d.ts +3 -0
- package/dist/components/MMenu.vue.d.ts +2 -2
- package/dist/components/MMenuItem.vue.d.ts +7 -3
- package/dist/components/MNavigationDrawer.vue.d.ts +13 -2
- package/dist/components/MNavigationRail.vue.d.ts +1 -1
- package/dist/components/MOverlay.vue.d.ts +12 -1
- package/dist/components/MProgressBar.vue.d.ts +5 -3
- package/dist/components/MPullToRefresh.vue.d.ts +7 -2
- package/dist/components/MRichTextEditor.vue.d.ts +7 -1
- package/dist/components/MSearchField.vue.d.ts +58 -0
- package/dist/components/MSegmentedButton.vue.d.ts +31 -23
- package/dist/components/MSimpleCarousel.vue.d.ts +2 -0
- package/dist/components/MSkeleton.vue.d.ts +6 -3
- package/dist/components/MSplitter.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +1 -1
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTextField.vue.d.ts +5 -1
- package/dist/components/MTimeline.vue.d.ts +85 -22
- package/dist/components/MToolbar.vue.d.ts +32 -5
- package/dist/components/MTooltip.vue.d.ts +1 -1
- package/dist/components/_MDrawerItemList.vue.d.ts +2 -0
- package/dist/components/_MToolbarFab.vue.d.ts +16 -0
- package/dist/composables/_containerTransform.d.ts +48 -0
- package/dist/composables/_mapStyle.d.ts +13 -0
- package/dist/composables/_themeTransition.d.ts +2 -0
- package/dist/composables/_tooltipTrigger.d.ts +22 -0
- package/dist/composables/_useMenuNav.d.ts +28 -0
- package/dist/composables/useAutoGrow.d.ts +21 -0
- package/dist/composables/useColorPalette.d.ts +1 -1
- package/dist/composables/useContainerTransform.d.ts +30 -0
- package/dist/composables/useLocale.d.ts +6 -0
- package/dist/composables/useMap.d.ts +19 -3
- package/dist/composables/useMapFilter.d.ts +4 -1
- package/dist/composables/useMapLayers.d.ts +5 -2
- package/dist/composables/useScrollReveal.d.ts +44 -0
- package/dist/composables/useThemeTokens.d.ts +21 -0
- package/dist/composables/viewportHints.d.ts +27 -0
- package/dist/directives/vClickOutside.d.ts +25 -0
- package/dist/directives/vFocusRing.d.ts +22 -0
- package/dist/directives/vLongPress.d.ts +27 -0
- package/dist/directives/vReveal.d.ts +10 -0
- package/dist/directives/vScrollElevation.d.ts +31 -0
- package/dist/directives/vSkeleton.d.ts +19 -0
- package/dist/directives/vStateLayer.d.ts +20 -0
- package/dist/directives/vSwipe.d.ts +45 -0
- package/dist/directives/vTooltip.d.ts +23 -0
- package/dist/index.d.ts +31 -1
- package/dist/locales/index.js +35 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +7692 -6273
- package/dist/m3ui.js.map +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/map.js +823 -793
- package/dist/map.js.map +1 -1
- package/dist/motion-DZiXG09o.js +150 -0
- package/dist/motion-DZiXG09o.js.map +1 -0
- package/dist/plugin.d.ts +24 -0
- package/dist/rich-text-editor.js +20 -16
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles/theme.css +63 -0
- package/dist/styles.css +1 -1
- package/dist/{useLocale-SfQHnJfp.js → useLocale-JYxDDeXC.js} +6 -2
- package/dist/useLocale-JYxDDeXC.js.map +1 -0
- package/dist/useThemeTokens-Bv-Uv8eX.js +135 -0
- package/dist/useThemeTokens-Bv-Uv8eX.js.map +1 -0
- package/package.json +2 -1
- package/src/__tests__/MAnimatedNumber.test.ts +24 -2
- package/src/__tests__/MButton.test.ts +22 -0
- package/src/__tests__/MCarousel.test.ts +9 -0
- package/src/__tests__/MChart.test.ts +77 -5
- package/src/__tests__/MContainerTransform.test.ts +279 -0
- package/src/__tests__/MDialog.test.ts +27 -0
- package/src/__tests__/MIconButton.test.ts +33 -0
- package/src/__tests__/MListItemExpandable.test.ts +48 -0
- package/src/__tests__/MListItemShape.test.ts +9 -6
- package/src/__tests__/MListKeyboard.test.ts +90 -0
- package/src/__tests__/MMap.test.ts +53 -1
- package/src/__tests__/MMapLayers.test.ts +46 -2
- package/src/__tests__/MMapTools.test.ts +2 -1
- package/src/__tests__/MMenu.test.ts +104 -1
- package/src/__tests__/MMenuItem.test.ts +18 -0
- package/src/__tests__/MNavigationDrawer.test.ts +80 -0
- package/src/__tests__/MNavigationRail.test.ts +33 -0
- package/src/__tests__/MOverlay.test.ts +49 -0
- package/src/__tests__/MProgressBar.test.ts +41 -0
- package/src/__tests__/MPullToRefresh.test.ts +33 -0
- package/src/__tests__/MRichTextEditor.test.ts +22 -0
- package/src/__tests__/MSearchField.test.ts +71 -0
- package/src/__tests__/MSkeleton.test.ts +38 -0
- package/src/__tests__/MSlider.test.ts +161 -0
- package/src/__tests__/MTimeline.test.ts +238 -0
- package/src/__tests__/MToolbar.test.ts +157 -0
- package/src/__tests__/_fakeMaplibre.ts +3 -1
- package/src/__tests__/attrsFallthrough.test.ts +9 -0
- package/src/__tests__/escapeStack.test.ts +93 -0
- package/src/__tests__/hydration.test.ts +25 -0
- package/src/__tests__/ssr.test.ts +21 -2
- package/src/__tests__/useAutoGrow.test.ts +103 -0
- package/src/__tests__/useScrollReveal.test.ts +102 -0
- package/src/__tests__/useThemeTokens.test.ts +114 -0
- package/src/__tests__/vClickOutside.test.ts +82 -0
- package/src/__tests__/vFocusRing.test.ts +36 -0
- package/src/__tests__/vLongPress.test.ts +81 -0
- package/src/__tests__/vScrollElevation.test.ts +89 -0
- package/src/__tests__/vSkeleton.test.ts +48 -0
- package/src/__tests__/vStateLayer.test.ts +53 -0
- package/src/__tests__/vSwipe.test.ts +93 -0
- package/src/__tests__/vTooltip.test.ts +95 -0
- package/src/__tests__/viewportHints.test.ts +41 -0
- package/src/components/MAnimatedNumber.vue +32 -6
- package/src/components/MAutocomplete.vue +5 -0
- package/src/components/MBottomSheet.vue +4 -1
- package/src/components/MButton.vue +19 -3
- package/src/components/MButtonGroup.vue +22 -17
- package/src/components/MCarousel.vue +7 -1
- package/src/components/MChart.vue +74 -34
- package/src/components/MCircleProgressBar.vue +14 -9
- package/src/components/MCommandPalette.vue +3 -2
- package/src/components/MContainerTransform.vue +321 -0
- package/src/components/MContextMenu.vue +19 -60
- package/src/components/MDialog.vue +31 -6
- package/src/components/MDragDropList.vue +2 -0
- package/src/components/MFab.vue +10 -5
- package/src/components/MIconButton.vue +43 -2
- package/src/components/MKanban.vue +2 -0
- package/src/components/MLightbox.vue +7 -2
- package/src/components/MList.vue +26 -2
- package/src/components/MListItem.vue +138 -84
- package/src/components/MMap.vue +38 -5
- package/src/components/MMapBaseLayers.vue +7 -3
- package/src/components/MMapFilter.vue +7 -4
- package/src/components/MMapGeoJson.vue +1 -1
- package/src/components/MMapLayers.vue +6 -2
- package/src/components/MMapMeasure.vue +5 -2
- package/src/components/MMenu.vue +18 -59
- package/src/components/MMenuItem.vue +11 -2
- package/src/components/MMultiAutocomplete.vue +5 -0
- package/src/components/MNavigationDrawer.vue +96 -11
- package/src/components/MNavigationRail.vue +44 -25
- package/src/components/MOverlay.vue +32 -13
- package/src/components/MProgressBar.vue +25 -27
- package/src/components/MPullToRefresh.vue +20 -1
- package/src/components/MRichTextEditor.vue +19 -5
- package/src/components/MSearchBar.vue +5 -0
- package/src/components/MSearchField.vue +142 -0
- package/src/components/MSegmentedButton.vue +19 -17
- package/src/components/MSelect.vue +10 -1
- package/src/components/MSideSheet.vue +5 -2
- package/src/components/MSimpleCarousel.vue +10 -1
- package/src/components/MSkeleton.vue +30 -8
- package/src/components/MSlider.vue +161 -42
- package/src/components/MSpotlightSearch.vue +3 -2
- package/src/components/MTextField.vue +15 -2
- package/src/components/MTimeline.vue +370 -81
- package/src/components/MToolbar.vue +256 -15
- package/src/components/MTooltip.vue +20 -152
- package/src/components/_MDrawerItemList.vue +25 -6
- package/src/components/_MToolbarFab.vue +14 -0
- package/src/composables/_containerTransform.ts +179 -0
- package/src/composables/_mapStyle.ts +45 -0
- package/src/composables/_themeTransition.ts +2 -0
- package/src/composables/_tooltipTrigger.ts +184 -0
- package/src/composables/_useEscapeStack.ts +2 -0
- package/src/composables/_useMenuNav.ts +209 -0
- package/src/composables/useAutoGrow.ts +78 -0
- package/src/composables/useContainerTransform.ts +59 -0
- package/src/composables/useLocale.ts +10 -0
- package/src/composables/useMap.ts +43 -5
- package/src/composables/useMapFilter.ts +6 -5
- package/src/composables/useMapLayers.ts +7 -6
- package/src/composables/useScrollReveal.ts +151 -0
- package/src/composables/useThemeTokens.ts +116 -0
- package/src/composables/viewportHints.ts +80 -0
- package/src/directives/vClickOutside.ts +90 -0
- package/src/directives/vFocusRing.ts +60 -0
- package/src/directives/vLongPress.ts +134 -0
- package/src/directives/vReveal.ts +57 -0
- package/src/directives/vScrollElevation.ts +116 -0
- package/src/directives/vSkeleton.ts +87 -0
- package/src/directives/vStateLayer.ts +83 -0
- package/src/directives/vSwipe.ts +197 -0
- package/src/directives/vTooltip.ts +128 -0
- package/src/index.ts +31 -1
- package/src/locales/de.ts +4 -0
- package/src/locales/es.ts +4 -0
- package/src/locales/fr.ts +4 -0
- package/src/locales/ja.ts +4 -0
- package/src/locales/ko.ts +4 -0
- package/src/locales/pt.ts +4 -0
- package/src/locales/zh.ts +4 -0
- package/src/map.ts +1 -1
- package/src/plugin.ts +34 -0
- package/src/styles/theme.css +63 -0
- package/dist/MMenuItem-BckcR0nW.js +0 -809
- package/dist/MMenuItem-BckcR0nW.js.map +0 -1
- package/dist/MSlider-LyH_gy8D.js +0 -1411
- package/dist/MSlider-LyH_gy8D.js.map +0 -1
- package/dist/MTextField-FCPOTB0o.js +0 -672
- package/dist/MTextField-FCPOTB0o.js.map +0 -1
- package/dist/composables/_useThemeTokens.d.ts +0 -7
- package/dist/useLocale-SfQHnJfp.js.map +0 -1
- package/src/composables/_useThemeTokens.ts +0 -42
package/dist/API.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @m3ui-vue/m3ui-vue 1.
|
|
1
|
+
# @m3ui-vue/m3ui-vue 1.2.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.
|
|
@@ -85,7 +85,7 @@ A number, time or duration whose digits roll to their new value on a spring when
|
|
|
85
85
|
Props:
|
|
86
86
|
- `value: number | Date` — The value: a number, a `Date` for times, or seconds for a duration
|
|
87
87
|
- `type?: "number" | "datetime" | "duration"` — `number` (Intl.NumberFormat), `datetime` (Intl.DateTimeFormat; a `Date` or a timestamp) or `duration` (seconds as `h:mm:ss`, hours only when there are some). Defaults to `datetime` for a `Date`, `number` otherwise
|
|
88
|
-
- `format?: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions` — Intl options for the type: `{ style: 'currency', currency: 'EUR' }`, `{ style: 'percent' }`, `{ style: 'unit', unit: 'kilometer-per-hour' }`, `{ notation: 'compact' }` for numbers; `{ timeStyle: 'medium' }` (the default), `{ hour: '2-digit', minute: '2-digit' }`, `{ dateStyle: 'short' }` for times. Unused for durations
|
|
88
|
+
- `format?: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions` — Intl options for the type: `{ style: 'currency', currency: 'EUR' }`, `{ style: 'percent' }`, `{ style: 'unit', unit: 'kilometer-per-hour' }`, `{ notation: 'compact' }` for numbers; `{ timeStyle: 'medium' }` (the default), `{ hour: '2-digit', minute: '2-digit' }`, `{ dateStyle: 'short' }` for times. Unused for durations. Dollar-sign currencies show their country (`AR$`, `MX$`, `US$`) in any language; set `currencyDisplay` for Intl's own output (`'symbol'` gives the local peso as a plain `$`)
|
|
89
89
|
- `locale?: string` — BCP-47 language for the format (`es-AR` for Argentine pesos and separators); defaults to the app's locale
|
|
90
90
|
- `spring?: SpringSpec` — The rolling spring; Standard SlowSpatial by default (an unhurried landing, no visible bounce)
|
|
91
91
|
- `animate?: boolean = true` — Roll to new values; false (or the system's reduced motion) jumps to them
|
|
@@ -297,7 +297,7 @@ Props:
|
|
|
297
297
|
- `squareCornersWhenFull?: boolean = false` — Squares the top corners while the expanded sheet fills the screen, as Android's views sheet does
|
|
298
298
|
|
|
299
299
|
Events:
|
|
300
|
-
- `update:modelValue(boolean)` — Emitted when the sheet closes (scrim click, drag-to-dismiss, or the close button) — powers v-model
|
|
300
|
+
- `update:modelValue(boolean)` — Emitted when the sheet closes (scrim click, drag-to-dismiss, Escape, or the close button) — powers v-model
|
|
301
301
|
- `update:expanded(boolean)` — Emitted when the sheet moves between partially and fully expanded (or closes) — powers v-model:expanded
|
|
302
302
|
|
|
303
303
|
Slots:
|
|
@@ -373,11 +373,13 @@ Props:
|
|
|
373
373
|
- `disabled?: boolean = false` — Disables interaction
|
|
374
374
|
- `loading?: boolean = false` — Shows a spinner and disables the button
|
|
375
375
|
- `icon?: string` — Material Symbol icon name shown next to the label
|
|
376
|
+
- `iconFilled?: boolean` — Draw the icon filled (Material Symbols' FILL axis), e.g. a starred star or a play icon
|
|
376
377
|
- `iconPos?: "leading" | "trailing" = "leading"` — Which side of the label the icon renders on
|
|
377
378
|
- `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — M3's 5-tier expressive button sizing (xs: 32px, sm: 40px, md: 56px, lg: 96px, xl: 136px) — lg/xl are meant for hero-style prominent buttons, not everyday UI
|
|
378
379
|
- `shape?: "rounded" | "squared" = "rounded"` — Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md, 28px lg/xl)
|
|
379
380
|
- `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
|
|
380
381
|
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
382
|
+
- `contentColor?: string` — Label and icon color, over what the variant and `color` give: an M3 role (`on-surface` for a neutral text button, `on-primary-container`…) or any CSS color (`#000` on a white filled button). Disabled buttons keep their own
|
|
381
383
|
|
|
382
384
|
Slots:
|
|
383
385
|
- `#default` — The button's label.
|
|
@@ -387,8 +389,8 @@ Slots:
|
|
|
387
389
|
A set of buttons that share selection state — standard (separated) or connected (joined into one pill), single or multi select, any value type.
|
|
388
390
|
|
|
389
391
|
Props:
|
|
390
|
-
- `modelValue:
|
|
391
|
-
- `options: ButtonGroupOption[]` — The options to choose from; see `ButtonGroupOption`.
|
|
392
|
+
- `modelValue: M` (v-model) — Selected value (null when none), or values with `multiSelect` (v-model) — any type, typed after the options' values
|
|
393
|
+
- `options: ButtonGroupOption<T>[]` — The options to choose from; see `ButtonGroupOption`.
|
|
392
394
|
- `variant?: "standard" | "connected" = "standard"` — Standard (separated) or connected (joined)
|
|
393
395
|
- `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Button size
|
|
394
396
|
- `multiSelect?: boolean = false` — Allow multiple selections
|
|
@@ -397,11 +399,11 @@ Props:
|
|
|
397
399
|
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
398
400
|
|
|
399
401
|
Events:
|
|
400
|
-
- `update:modelValue(
|
|
402
|
+
- `update:modelValue(M)` — Emitted on selection change — powers v-model
|
|
401
403
|
|
|
402
404
|
```ts
|
|
403
|
-
export interface ButtonGroupOption {
|
|
404
|
-
value:
|
|
405
|
+
export interface ButtonGroupOption<T = unknown> {
|
|
406
|
+
value: T
|
|
405
407
|
label?: string
|
|
406
408
|
icon?: string
|
|
407
409
|
disabled?: boolean
|
|
@@ -510,13 +512,14 @@ Slots:
|
|
|
510
512
|
|
|
511
513
|
Import from `@m3ui-vue/m3ui-vue/chart`.
|
|
512
514
|
|
|
513
|
-
A thin Chart.js wrapper — line, bar, pie, doughnut, and radar types, with legend/tooltip/axis colors that automatically track the active M3 theme (light/dark,
|
|
515
|
+
A thin Chart.js wrapper — line, bar, pie, doughnut, and radar types, with legend/tooltip/axis colors that automatically track the active M3 theme (light/dark, palette, contrast). Datasets without colors of their own get the theme's too, one per series (one per slice in a pie or doughnut). Available from the `/chart` entry point.
|
|
514
516
|
|
|
515
517
|
Props:
|
|
516
518
|
- `type: ChartType` — Chart type. Required — there is no default.
|
|
517
519
|
- `data: Record<string, any>` — Chart.js data object with labels and datasets. Required — there is no default.
|
|
518
520
|
- `options?: Record<string, any>` — Chart.js options, deep-merged on top of MChart's own M3-themed defaults (legend/tooltip/axis colors that track the active theme automatically)
|
|
519
521
|
- `height?: string = "300px"` — Chart height
|
|
522
|
+
- `colors?: string[]` — Colors for datasets that don't set their own, in order (one per series; per slice in a pie or doughnut): M3 role names (`primary`, `tertiary-container`…) or any CSS colors. Default primary, tertiary, secondary, success, error, outline
|
|
520
523
|
|
|
521
524
|
```ts
|
|
522
525
|
type ChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar'
|
|
@@ -591,7 +594,8 @@ A circular progress indicator — a smooth arc, or the M3 Expressive wavy ring t
|
|
|
591
594
|
Props:
|
|
592
595
|
- `value?: number` — Progress 0–100 (omit when indeterminate)
|
|
593
596
|
- `indeterminate?: boolean` — Spinning arc — no value needed. Identical for both variants.
|
|
594
|
-
- `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Ring color
|
|
597
|
+
- `color?: "error" | "primary" | "secondary" | "tertiary" | (string & {}) = "primary"` — Ring color: an M3 role or any CSS color
|
|
598
|
+
- `trackColor?: string` — Track color: an M3 role or any CSS color. Default the role's container, or the ring color at 24% for a CSS color
|
|
595
599
|
- `variant?: "wavy" | "circle" = "wavy"` — wavy: animated bumpy ring that fades to circle near 0% and 100%; circle: smooth arc
|
|
596
600
|
- `label?: string` — Label text below the circle
|
|
597
601
|
- `size?: number` — Diameter in px — matches the real M3 WaveSize/Size tokens per variant
|
|
@@ -727,6 +731,27 @@ Props:
|
|
|
727
731
|
Slots:
|
|
728
732
|
- `#default` — Content.
|
|
729
733
|
|
|
734
|
+
### MContainerTransform
|
|
735
|
+
|
|
736
|
+
Material's container transform: an element (a card, a list item, an image, a FAB…) grows into an expanded view and shrinks back into it, morphing its bounds and shape while its content fades into the new one. The expanded view opens over the page, full screen, as a centered panel, or wherever your classes put it (`custom`), with a scrim (optional), Escape and scroll lock; focus goes to it and back to the element on close. A port of Android's MaterialContainerTransform, played on the compositor. For elements that live apart from the expanded view (a grid of cards, one detail), pass a `useContainerTransform()` controller instead of the default slot.
|
|
737
|
+
|
|
738
|
+
Props:
|
|
739
|
+
- `controller?: ContainerTransformController<T>` — A `useContainerTransform()` controller, to open it from elements elsewhere (`controller.open($event, item)`)
|
|
740
|
+
- `mode?: "fullscreen" | "dialog" | "custom" = "fullscreen"` — Where the expanded view opens: over the whole screen, as a centered panel (wider screens), or `custom`: the classes you give the component place and size it (`bottom-4 right-4 w-80 h-96`, `inset-y-0 right-0 w-96`…), anywhere over the page
|
|
741
|
+
- `maxWidth?: string = "560px"` — The centered panel's maximum width (`dialog` mode)
|
|
742
|
+
- `label?: string` — Accessible name of the expanded view
|
|
743
|
+
- `scrim?: boolean = true` — Dims the page behind it, which makes it modal (scroll lock, `aria-modal`). Without one the page stays usable: a click outside closes it instead (unless `persistent`)
|
|
744
|
+
- `persistent?: boolean = false` — A click on the scrim, or outside without one, doesn't close it
|
|
745
|
+
- `closeOnBack?: boolean = true` — Android's back (button or gesture) closes it, like an expanded view in an app, where the browser has the CloseWatcher API (Chrome, Edge); the history and the router are left alone. Default `true`
|
|
746
|
+
- `open?: boolean = false` (v-model:open) — Whether the expanded view is open; opening it from here grows it from the default slot's element
|
|
747
|
+
|
|
748
|
+
Events:
|
|
749
|
+
- `update:open(value: boolean)` — The expanded view opened or closed (v-model:open)
|
|
750
|
+
|
|
751
|
+
Slots:
|
|
752
|
+
- `#default { open: () => void; isOpen: boolean; }` — The element that opens it, with `{ open, isOpen }`: call `open()` from its click
|
|
753
|
+
- `#expanded { close: () => void; item: T | undefined; }` — The expanded view, with `{ close, item }` (`item` is what the controller's `open` was given)
|
|
754
|
+
|
|
730
755
|
### MContextMenu
|
|
731
756
|
|
|
732
757
|
A right-click context menu composed with MMenuItem — same item/divider/submenu building blocks as MMenu, but positioned at the cursor instead of anchored to a trigger element.
|
|
@@ -940,7 +965,7 @@ Props:
|
|
|
940
965
|
- `fullscreen?: boolean = false` — Full-screen variant — slides up from the bottom, covers the entire viewport
|
|
941
966
|
- `closeLabel?: string` — Aria label for the close (X) button — falls back to the locale string when omitted
|
|
942
967
|
- `closable?: boolean = true` — Show the header close (X) button — a library addition, not part of the M3 AlertDialog spec, so it can be turned off
|
|
943
|
-
- `bare?: boolean = false` — Just the dialog's box (surface, shape, elevation), scrim, Escape, scroll lock and animation, with the default slot filling it: no title row, padding, close button or actions. For dialogs that draw everything themselves (the date and time pickers). `title` then only names it for assistive technology
|
|
968
|
+
- `bare?: boolean = false` — Just the dialog's box (surface, shape, elevation), scrim, Escape, scroll lock and animation, with the default slot filling it: no title row, padding, close button or actions. For dialogs that draw everything themselves (the date and time pickers). With `fullscreen`, the slot fills the screen and draws its own top bar. `title` then only names it for assistive technology
|
|
944
969
|
|
|
945
970
|
Events:
|
|
946
971
|
- `update:modelValue(boolean)` — Emitted when the dialog should open/close — powers v-model
|
|
@@ -1302,6 +1327,8 @@ Props:
|
|
|
1302
1327
|
- `icon: string` — Material Symbol icon name
|
|
1303
1328
|
- `label?: string` — Accessible label (its aria-label; no visible tooltip: wrap it in MTooltip for one)
|
|
1304
1329
|
- `variant?: "filled" | "outlined" | "tonal" | "standard" = "standard"` — Visual style
|
|
1330
|
+
- `color?: "error" | "primary" | "secondary" | "tertiary" | (string & {})` — An M3 role or any CSS color (`#fff` over a photo, `rgb(0 0 0 / 0.3)` for a scrim-like filled button, `currentColor` to follow the surrounding text). Standard and outlined use it for the icon; filled for the container with white (or the role's on-color) on it; tonal for a 20% container with the color on it. Disabled buttons and toggles keep their own colors
|
|
1331
|
+
- `contentColor?: string` — Icon color over what the variant and `color` give: an M3 role (`on-surface`…) or any CSS color (`#000` on a white filled button). Disabled buttons and toggles keep their own
|
|
1305
1332
|
- `shape?: "rounded" | "squared" = "rounded"` — Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md, 28px lg/xl)
|
|
1306
1333
|
- `size?: number | "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — M3's 5-tier icon button sizing (xs:32, sm:40, md:56, lg:96, xl:136), or a custom pixel value
|
|
1307
1334
|
- `disabled?: boolean = false` — Disables interaction
|
|
@@ -1309,6 +1336,7 @@ Props:
|
|
|
1309
1336
|
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
1310
1337
|
- `checked?: boolean` (v-model:checked) — Makes it a toggle button (v-model:checked): selected colors, a filled icon, and a shape that morphs when pressed and when checked. Leave it unset for a plain icon button
|
|
1311
1338
|
- `checkedIcon?: string` — Icon shown while checked, when it differs from `icon` (e.g. 'pause' for 'play_arrow')
|
|
1339
|
+
- `iconFilled?: boolean` — Draw the icon filled (Material Symbols' FILL axis) without making it a toggle, e.g. media controls
|
|
1312
1340
|
|
|
1313
1341
|
Events:
|
|
1314
1342
|
- `update:checked(boolean)` — Emitted on click when `checked` is set — powers v-model:checked
|
|
@@ -1595,7 +1623,9 @@ Import from `@m3ui-vue/m3ui-vue/map`.
|
|
|
1595
1623
|
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.
|
|
1596
1624
|
|
|
1597
1625
|
Props:
|
|
1598
|
-
- `mapStyle: string | maplibregl.StyleSpecification` — The map's style: a style JSON URL or a style object (MapLibre's `StyleSpecification`). Changing it reloads the style
|
|
1626
|
+
- `mapStyle: string | maplibregl.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`)
|
|
1627
|
+
- `keepLayers?: boolean | ((layer: maplibregl.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)
|
|
1628
|
+
- `transformStyle?: maplibregl.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…)
|
|
1599
1629
|
- `center?: [number, number]` (v-model:center) — `[lng, lat]` (v-model). When left out, the style's (or the remembered view's)
|
|
1600
1630
|
- `zoom?: number` (v-model:zoom) — Zoom level (v-model)
|
|
1601
1631
|
- `bearing?: number` (v-model:bearing) — Rotation in degrees (v-model)
|
|
@@ -1622,6 +1652,7 @@ Slots:
|
|
|
1622
1652
|
|
|
1623
1653
|
Exposed (template ref):
|
|
1624
1654
|
- `map: maplibregl.Map | undefined` — The MapLibre map, once loaded
|
|
1655
|
+
- `context: MapContext` — What the components inside it share: pass the `MMap` (or this) as `map` to `MMapLayers`, `useMap()`… outside it
|
|
1625
1656
|
|
|
1626
1657
|
```ts
|
|
1627
1658
|
export type MapControlPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
|
|
@@ -1631,12 +1662,13 @@ export type MapControlPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bot
|
|
|
1631
1662
|
|
|
1632
1663
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
1633
1664
|
|
|
1634
|
-
The base layer switcher of an `MMap` with an `adapter`: a round thumbnail per base layer (the adapter's `image`, after `imageBase`), one shown at a time, plus "no base layer". Only the thumbnails: put them in an `MMapControl` (`:group="false"`), an `MFab`'s `#content` or a panel
|
|
1665
|
+
The base layer switcher of an `MMap` with an `adapter`: a round thumbnail per base layer (the adapter's `image`, after `imageBase`), one shown at a time, plus "no base layer". Only the thumbnails: put them in an `MMapControl` (`:group="false"`), an `MFab`'s `#content` or a panel, inside the `MMap` or anywhere else with `map`. Available from the `/map` entry point.
|
|
1635
1666
|
|
|
1636
1667
|
Props:
|
|
1637
1668
|
- `imageBase?: string = ""` — Prefix for the thumbnails' paths (e.g. `/images/`); full URLs are used as they are
|
|
1638
1669
|
- `none?: boolean = true` — Offer "no base layer"
|
|
1639
1670
|
- `vertical?: boolean = false` — Lay them out in a column
|
|
1671
|
+
- `map?: MapSource` — The map, when this is outside it (a side panel): the `MMap`'s template ref
|
|
1640
1672
|
|
|
1641
1673
|
### MMapControl
|
|
1642
1674
|
|
|
@@ -1673,7 +1705,7 @@ Slots:
|
|
|
1673
1705
|
|
|
1674
1706
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
1675
1707
|
|
|
1676
|
-
A simple filter for one layer of an `MMap`: chips for the values of one of its properties; the layer shows only the features with the selected ones (all of them with none selected). The values are `values`, or else the distinct ones among the layer's features loaded in the map. The style's own filter on the layer stays. For anything more involved, build your own on `useMapFilter()`. Available from the `/map` entry point.
|
|
1708
|
+
A simple filter for one layer of an `MMap`: chips for the values of one of its properties; the layer shows only the features with the selected ones (all of them with none selected). The values are `values`, or else the distinct ones among the layer's features loaded in the map. The style's own filter on the layer stays. For anything more involved, build your own on `useMapFilter()`. Inside the `MMap`, or anywhere else with `map`. Available from the `/map` entry point.
|
|
1677
1709
|
|
|
1678
1710
|
Props:
|
|
1679
1711
|
- `layer: string` — The layer's id
|
|
@@ -1681,6 +1713,7 @@ Props:
|
|
|
1681
1713
|
- `values?: (string | number)[]` — The values to offer (labels in `labels`); by default the ones found in the layer's loaded features
|
|
1682
1714
|
- `labels?: Record<string, string>` — Labels for the values, by value
|
|
1683
1715
|
- `modelValue?: (string | number)[]` (v-model) — The selected values (v-model)
|
|
1716
|
+
- `map?: MapSource` — The map, when this is outside it (a side panel): the `MMap`'s template ref
|
|
1684
1717
|
|
|
1685
1718
|
Events:
|
|
1686
1719
|
- `update:modelValue(values: (string | number)[])`
|
|
@@ -1748,11 +1781,12 @@ Exposed (template ref):
|
|
|
1748
1781
|
|
|
1749
1782
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
1750
1783
|
|
|
1751
|
-
The layer list of an `MMap` with an `adapter`: a search field, the style's groups (collapsible, with a visibility toggle for the whole group and a count) and its layers, each with a visibility toggle and, expanded, its description, an opacity slider, its legend and a download link. Only the content: put it in an `MWindow`, an `MSideSheet`, an `MBottomSheet` or an `MMapControl`. Available from the `/map` entry point.
|
|
1784
|
+
The layer list of an `MMap` with an `adapter`: a search field, the style's groups (collapsible, with a visibility toggle for the whole group and a count) and its layers, each with a visibility toggle and, expanded, its description, an opacity slider, its legend and a download link. Only the content: put it in an `MWindow`, an `MSideSheet`, an `MBottomSheet` or an `MMapControl`, inside the `MMap` or anywhere else with `map`. Available from the `/map` entry point.
|
|
1752
1785
|
|
|
1753
1786
|
Props:
|
|
1754
1787
|
- `search?: boolean = true` — Show the search field
|
|
1755
1788
|
- `collapsed?: boolean = false` — Groups start collapsed
|
|
1789
|
+
- `map?: MapSource` — The map, when this is outside it (a side panel): the `MMap`'s template ref
|
|
1756
1790
|
|
|
1757
1791
|
Slots:
|
|
1758
1792
|
- `#actions { layer: MapLayerInfo; visible: boolean; }` — Extra actions in an expanded layer (scope: `{ layer, visible }`)
|
|
@@ -1943,6 +1977,7 @@ Events:
|
|
|
1943
1977
|
- `update:checked(boolean)` — Emitted on click when `checked` is set, with the new value — powers v-model:checked
|
|
1944
1978
|
|
|
1945
1979
|
Slots:
|
|
1980
|
+
- `#icon { on: boolean; }` — Replaces the leading icon (an `MIcon` with a class, an image, an avatar…), `{ on }` while selected or checked. It gets the icon's 20px box and color
|
|
1946
1981
|
- `#default` — Item label text.
|
|
1947
1982
|
- `#children` — Nested submenu items. In the parent MMenu's default 'flyout' mode, clicking or hovering (mouse only) the item opens a side panel — supports unlimited nesting depth. In 'push' mode, clicking the item instead swaps the whole menu panel to the submenu with a back header; hover does nothing.
|
|
1948
1983
|
|
|
@@ -2045,9 +2080,12 @@ Props:
|
|
|
2045
2080
|
- `title?: string` — Drawer header title (ignored if the #header slot is used)
|
|
2046
2081
|
- `modal?: boolean = true` — Modal with a Teleported scrim overlay, or an inline sidebar that participates in normal layout flow
|
|
2047
2082
|
- `collapsed?: boolean` — Compact mode (72px) showing only icons — inline variant only
|
|
2083
|
+
- `collapsedLabels?: boolean` — In `collapsed` mode, shows each item's label under its icon, with the selection on a 56×32 pill around the icon, like MNavigationRail's collapsed items — nested items included
|
|
2048
2084
|
- `width?: string` — Custom drawer width (e.g. "320px", "25rem"). Defaults to 22.5rem (360px)
|
|
2049
2085
|
- `side?: "top" | "right" | "bottom" | "left" = "left"` — Which side the drawer opens from. Top/bottom are only available for the modal variant — the inline variant always renders on left or right.
|
|
2050
2086
|
- `swipeEnabled?: boolean = true` — Lets the modal drawer be swiped closed toward its edge; with false it only closes through v-model or the scrim
|
|
2087
|
+
- `expandSelected?: boolean = true` — Opens the groups that hold the selected item (and the selected item, if it's a group) whenever `selected` changes
|
|
2088
|
+
- `accordion?: boolean = false` — Keeps one group open per level: opening a group, by hand or through `expandSelected`, closes its siblings
|
|
2051
2089
|
|
|
2052
2090
|
Events:
|
|
2053
2091
|
- `update:modelValue(boolean)` — Open/closed state for v-model
|
|
@@ -2094,7 +2132,7 @@ Props:
|
|
|
2094
2132
|
- `modelValue: string | number` (v-model) — Active item value, v-model
|
|
2095
2133
|
- `items: NavRailItem[]` — Array of rail items (see `NavRailItem`)
|
|
2096
2134
|
- `alignment?: "top" | "bottom" | "center" = "top"` — Vertical alignment of items within the rail
|
|
2097
|
-
- `expanded?: boolean = false` (v-model:expanded) — Widens the rail (
|
|
2135
|
+
- `expanded?: boolean = false` (v-model:expanded) — Widens the rail (to fit the longest label, 220 to 360px) and shows each item's icon beside its label in a full-width pill, instead of the icon over the label. Toggle it from your own menu button.
|
|
2098
2136
|
- `modal?: boolean = false` — Keeps the rail collapsed and opens the expanded rail as a panel over the app, with a scrim, instead of widening in place. It closes on a scrim click, Escape or picking an item, emitting `update:expanded`.
|
|
2099
2137
|
- `hideOnCollapse?: boolean = false` — With `modal`: no collapsed rail on screen; the expanded rail slides in from off-screen and can be swiped away (Compose's `hideOnCollapse`). Open it from your own menu button
|
|
2100
2138
|
|
|
@@ -2179,15 +2217,18 @@ Events:
|
|
|
2179
2217
|
|
|
2180
2218
|
### MOverlay
|
|
2181
2219
|
|
|
2182
|
-
Full-screen overlay with scrim and teleport to body. A generic low-level building block — content is entirely up to you via the default slot.
|
|
2220
|
+
Full-screen overlay with scrim and teleport to body. A generic low-level building block — content is entirely up to you via the default slot. Your class, role and aria attributes go on the content layer (over the scrim), so `class="flex items-center justify-center bg-black"` lays out and paints the slot.
|
|
2183
2221
|
|
|
2184
2222
|
Props:
|
|
2185
2223
|
- `modelValue?: boolean = true` (v-model) — Controls visibility (v-model)
|
|
2186
2224
|
- `scrim?: boolean = true` — Show dark backdrop
|
|
2187
2225
|
- `zIndex?: number = 50` — Z-index value
|
|
2226
|
+
- `closeOnEscape?: boolean = false` — Closes on Escape. It shares the library's Escape stack with MDialog and the sheets, so a dialog or menu opened over it takes Escape first
|
|
2227
|
+
- `lockScroll?: boolean = false` — Locks the page's scroll while open (shared with the library's other modal surfaces, so stacking is safe)
|
|
2228
|
+
- `transition?: string` — Name of a `<Transition>` (your CSS classes) to play instead of the default fade
|
|
2188
2229
|
|
|
2189
2230
|
Events:
|
|
2190
|
-
- `update:modelValue(value: boolean)` — Emitted with false when the scrim is clicked, for v-model support
|
|
2231
|
+
- `update:modelValue(value: boolean)` — Emitted with false when the scrim is clicked (or Escape is pressed with closeOnEscape), for v-model support
|
|
2191
2232
|
|
|
2192
2233
|
Slots:
|
|
2193
2234
|
- `#default` — Content shown over the scrim.
|
|
@@ -2256,7 +2297,8 @@ A linear progress indicator — determinate, indeterminate, or the M3 Expressive
|
|
|
2256
2297
|
Props:
|
|
2257
2298
|
- `value?: number` — Progress 0–100 (omit for indeterminate)
|
|
2258
2299
|
- `indeterminate?: boolean` — Indeterminate animation — also implied by omitting value
|
|
2259
|
-
- `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Bar color
|
|
2300
|
+
- `color?: "error" | "primary" | "secondary" | "tertiary" | (string & {}) = "primary"` — Bar color: an M3 role or any CSS color (`#fff` over a photo, say)
|
|
2301
|
+
- `trackColor?: string` — Track color: an M3 role or any CSS color. Default the role's container, or the bar color at 24% for a CSS color
|
|
2260
2302
|
- `variant?: "wavy" | "linear" = "linear"` — Bar style
|
|
2261
2303
|
- `label?: string` — Label text above the bar
|
|
2262
2304
|
- `thickness?: number` — Stroke width in px. Defaults to 4dp, matching the real M3 token for both variants.
|
|
@@ -2278,6 +2320,10 @@ Events:
|
|
|
2278
2320
|
Slots:
|
|
2279
2321
|
- `#default` — The scrollable content. A pull starts only when it's scrolled to the top; otherwise touch scrolls it normally
|
|
2280
2322
|
|
|
2323
|
+
Exposed (template ref):
|
|
2324
|
+
- `scrollEl: HTMLElement | null` — The element that scrolls the slot's content
|
|
2325
|
+
- `scrollTo: (options: ScrollToOptions) => void | undefined` — Scrolls the content, like `Element.scrollTo()` (e.g. `{ top: 0, behavior: 'smooth' }`)
|
|
2326
|
+
|
|
2281
2327
|
### MQRCode
|
|
2282
2328
|
|
|
2283
2329
|
Import from `@m3ui-vue/m3ui-vue/qrcode`.
|
|
@@ -2406,7 +2452,8 @@ Props:
|
|
|
2406
2452
|
- `modelValue: string` (v-model) — HTML content (v-model)
|
|
2407
2453
|
- `placeholder?: string` — Placeholder text shown on an empty document
|
|
2408
2454
|
- `disabled?: boolean = false` — Disables editing
|
|
2409
|
-
- `minHeight?: string = "200px"` — Minimum
|
|
2455
|
+
- `minHeight?: string = "200px"` — Minimum height of the text area (not used with `fill`)
|
|
2456
|
+
- `fill?: boolean = false` — Fills the height you give the editor (`class="h-full"`, `flex-1`…): the toolbar stays put and the text scrolls inside, instead of the editor growing with its content
|
|
2410
2457
|
- `labels?: RichTextEditorLabels` — Object with all toolbar/dialog label overrides for i18n (see `RichTextEditorLabels`) — defaults come from useLocale()
|
|
2411
2458
|
|
|
2412
2459
|
Events:
|
|
@@ -2565,6 +2612,34 @@ Slots:
|
|
|
2565
2612
|
- `#trailing` — Trailing content in both the collapsed bar and the expanded header (e.g. an avatar)
|
|
2566
2613
|
- `#default` — Results/suggestions content, shown below the input while expanded
|
|
2567
2614
|
|
|
2615
|
+
### MSearchField
|
|
2616
|
+
|
|
2617
|
+
A pill-shaped search input that filters in place: a list, a table, a grid of products. Unlike MSearchBar, it never expands into a results view; it's just the field, in M3's search bar colors and shape. Your `class` and `style` go on the pill; every other attribute (`name`, `autocomplete`, `aria-*`, listeners like `@focus` or `@keydown`) goes on the `<input>`.
|
|
2618
|
+
|
|
2619
|
+
Props:
|
|
2620
|
+
- `modelValue?: string = ""` (v-model) — The text (v-model)
|
|
2621
|
+
- `placeholder?: string` — Placeholder. Defaults to the locale's `search`
|
|
2622
|
+
- `label?: string` — Accessible name when there's no visible label. Defaults to the placeholder
|
|
2623
|
+
- `icon?: string = "search"` — Leading icon, a Material Symbol. Set to '' for none
|
|
2624
|
+
- `size?: "sm" | "md" | "lg" = "lg"` — Height: `sm` 40px (body-medium text), `md` 48px, `lg` 56px (M3's search bar)
|
|
2625
|
+
- `clearable?: boolean = true` — Shows a clear button while there's text
|
|
2626
|
+
- `clearOnEscape?: boolean = true` — Escape empties the field (keeping the key from closing a dialog or menu around it); on an empty field it leaves it and lets the key through
|
|
2627
|
+
- `disabled?: boolean = false` — Disables the field
|
|
2628
|
+
|
|
2629
|
+
Events:
|
|
2630
|
+
- `search(string)` — Enter was pressed, with the text
|
|
2631
|
+
- `update:modelValue(string)` — The text, on every keystroke — powers v-model
|
|
2632
|
+
- `clear()` — The clear button (or Escape) emptied the field
|
|
2633
|
+
|
|
2634
|
+
Slots:
|
|
2635
|
+
- `#leading` — Replaces the search icon (an avatar, a back or menu button…). Spaced for a 40px icon button, as in M3's search bar: its icon lands 16px from the edge, like the default one, and the text at the same place
|
|
2636
|
+
- `#trailing` — Extra content after the clear button (a mic button, a filter menu…)
|
|
2637
|
+
|
|
2638
|
+
Exposed (template ref):
|
|
2639
|
+
- `inputEl: HTMLInputElement | undefined` — The `<input>` element
|
|
2640
|
+
- `focus: (options?: FocusOptions | undefined) => void | undefined` — Focuses the input
|
|
2641
|
+
- `blur: () => void | undefined` — Takes focus away from the input
|
|
2642
|
+
|
|
2568
2643
|
### MSection
|
|
2569
2644
|
|
|
2570
2645
|
A titled content section with optional subtitle, header actions, and divider.
|
|
@@ -2631,18 +2706,18 @@ export interface SeekBarChapter {
|
|
|
2631
2706
|
A row of joined segments for choosing between a small set of related options — single or multi select.
|
|
2632
2707
|
|
|
2633
2708
|
Props:
|
|
2634
|
-
- `modelValue:
|
|
2635
|
-
- `options: SegmentedOption[]` — The options to choose from; see `SegmentedOption`.
|
|
2709
|
+
- `modelValue: M` (v-model) — Selected value, or values with `multiSelect` (v-model); typed after the options' values
|
|
2710
|
+
- `options: SegmentedOption<V>[]` — The options to choose from; see `SegmentedOption`.
|
|
2636
2711
|
- `multiSelect?: boolean = false` — Allow multiple selections
|
|
2637
2712
|
- `density?: "default" | "compact" | "comfortable" = "default"` — Button density
|
|
2638
2713
|
- `color?: "primary" | "secondary" | "tertiary" = "primary"` — Selected segment color
|
|
2639
2714
|
|
|
2640
2715
|
Events:
|
|
2641
|
-
- `update:modelValue(
|
|
2716
|
+
- `update:modelValue(M)` — Emitted on selection change — powers v-model
|
|
2642
2717
|
|
|
2643
2718
|
```ts
|
|
2644
|
-
export interface SegmentedOption {
|
|
2645
|
-
value:
|
|
2719
|
+
export interface SegmentedOption<V extends string | number = string | number> {
|
|
2720
|
+
value: V
|
|
2646
2721
|
label: string
|
|
2647
2722
|
icon?: string
|
|
2648
2723
|
disabled?: boolean
|
|
@@ -2768,7 +2843,7 @@ Props:
|
|
|
2768
2843
|
- `width?: string = "w-80"` — Tailwind width class for the panel (capped at max-w-[90vw])
|
|
2769
2844
|
|
|
2770
2845
|
Events:
|
|
2771
|
-
- `update:modelValue(boolean)` — Emitted when the sheet closes (scrim click, drag-to-dismiss from the left edge, or the close button) — powers v-model
|
|
2846
|
+
- `update:modelValue(boolean)` — Emitted when the sheet closes (scrim click, drag-to-dismiss from the left edge, Escape, or the close button) — powers v-model
|
|
2772
2847
|
|
|
2773
2848
|
Slots:
|
|
2774
2849
|
- `#header` — Replaces the default title text entirely — the close button stays
|
|
@@ -2823,6 +2898,7 @@ Exposed (template ref):
|
|
|
2823
2898
|
- `prev: () => void`
|
|
2824
2899
|
- `scrollToItem: (index: number) => void`
|
|
2825
2900
|
- `scrollToPage: (page: number) => void`
|
|
2901
|
+
- `focus: (options?: FocusOptions | undefined) => void | undefined` — Moves keyboard focus to the carousel, so the arrow keys move it
|
|
2826
2902
|
|
|
2827
2903
|
```ts
|
|
2828
2904
|
export interface SimpleCarouselItem {
|
|
@@ -2844,6 +2920,7 @@ Props:
|
|
|
2844
2920
|
- `height?: string` — CSS height (defaults to 14px for text, 40px for circular, 100px otherwise)
|
|
2845
2921
|
- `lines?: number = 1` — Number of text lines (text variant only) — the last line renders at 60% width
|
|
2846
2922
|
- `animation?: "none" | "pulse" | "wave" = "pulse"` — Animation style
|
|
2923
|
+
- `radius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | (string & {})` — Corner radius: an M3 shape step (`none`, `xs` 4px, `sm` 8px, `md` 12px, `lg` 16px, `xl` 28px, `full`) or any CSS length, to match the card or thumbnail it stands in for. Defaults to the variant's (a Tailwind `rounded-*` class works too)
|
|
2847
2924
|
|
|
2848
2925
|
### MSlider
|
|
2849
2926
|
|
|
@@ -3285,7 +3362,9 @@ Props:
|
|
|
3285
3362
|
- `disabled?: boolean` — Disables the field
|
|
3286
3363
|
- `required?: boolean` — Marks as required — adds a red asterisk after the label
|
|
3287
3364
|
- `multiline?: boolean` — Renders a textarea instead of an input
|
|
3288
|
-
- `rows?: number = 3` — Textarea rows (when multiline)
|
|
3365
|
+
- `rows?: number = 3` — Textarea rows (when multiline); with autoGrow, the fewest it shrinks to
|
|
3366
|
+
- `autoGrow?: boolean` — Multiline only: grows with the text from `rows` up to `maxRows`, instead of a fixed height with a drag handle
|
|
3367
|
+
- `maxRows?: number` — With autoGrow, the most rows it grows to before scrolling. Unset grows without limit
|
|
3289
3368
|
- `autocomplete?: string` — Passed through to the native autocomplete attribute
|
|
3290
3369
|
- `leadingIcon?: string` — Material Symbol shown before the input
|
|
3291
3370
|
- `clearable?: boolean = false` — Show a clear button when the field has a value
|
|
@@ -3301,24 +3380,58 @@ Slots:
|
|
|
3301
3380
|
|
|
3302
3381
|
### MTimeline
|
|
3303
3382
|
|
|
3304
|
-
|
|
3383
|
+
An event timeline with icon dots, dates, and colors — a single column, alternating left/right, or horizontal. With `current` (or items' `status`) it tracks progress: done steps filled with a solid line, the current one pulsing, the rest outlined with a dashed line. Every part can be replaced through slots, which receive `{ item, index }`; your item type flows into them.
|
|
3305
3384
|
|
|
3306
3385
|
Props:
|
|
3307
|
-
- `items:
|
|
3386
|
+
- `items: T[]` — Array of timeline entries — required
|
|
3308
3387
|
- `dense?: boolean = false` — Compact spacing between items
|
|
3309
|
-
- `alternating?: boolean = false` — Alternate items left/right of a central line instead of a single left-aligned column
|
|
3388
|
+
- `alternating?: boolean = false` — Alternate items left/right of a central line instead of a single left-aligned column (vertical only)
|
|
3389
|
+
- `orientation?: "horizontal" | "vertical" = "vertical"` — Vertical (default) or horizontal: entries side by side along a line, scrolling sideways when they don't fit
|
|
3390
|
+
- `bare?: boolean = false` — Leaves each entry's content to the `#item` slot: no title, description or date
|
|
3391
|
+
- `current?: number` — Makes it a progress timeline (an order's tracking, a setup's steps): the index of the current step. The ones before are done, the ones after pending; an item's own `status` wins. `items.length` marks them all done
|
|
3392
|
+
- `responsive?: boolean = true` — Lets the alternating layout fold into a single column (the line on the left, `#opposite` under the content) while the timeline is narrower than 32rem: its own width, so it works in a side column too
|
|
3393
|
+
- `animate?: boolean = true` — Entries added after it mounts fade and slide in, and the rest move to their new places, on M3 springs (none with reduced motion). Give items a `key`, or an insertion looks like a change to every entry after it
|
|
3394
|
+
- `limit?: number` — Shows only the first entries (a count; groups' headers don't count), with a button for the rest
|
|
3395
|
+
- `expanded?: boolean` (v-model:expanded) — Whether the entries past `limit` show (v-model:expanded); the timeline keeps its own state otherwise
|
|
3396
|
+
|
|
3397
|
+
Events:
|
|
3398
|
+
- `update:expanded(expanded: boolean)`
|
|
3399
|
+
|
|
3400
|
+
Slots:
|
|
3401
|
+
- `#item { item: T; index: number; }` — Extra content under an entry's description (a card, chips, a button). With `bare`, the entry's whole content. `item-{index}` slots still work for a single entry and win over this one
|
|
3402
|
+
- `#title { item: T; index: number; }` — Replaces an entry's title row (title and date)
|
|
3403
|
+
- `#dot { item: T; index: number; }` — Replaces an entry's dot (an avatar, an image, a custom shape); the line still runs from it
|
|
3404
|
+
- `#opposite { item: T; index: number; }` — Content across the line: on the empty side in the alternating layout, or in a column before the line in the single-column one (dates, times, amounts)
|
|
3405
|
+
- `#group { group: string; items: T[]; }` — Replaces a group's header (scope: `{ group, items }`, the run of entries under it)
|
|
3310
3406
|
|
|
3311
3407
|
```ts
|
|
3312
3408
|
export interface TimelineItem {
|
|
3409
|
+
/** Stable key for the entry (defaults to its index): set it when entries are added or removed */
|
|
3410
|
+
key?: string | number;
|
|
3313
3411
|
title: string;
|
|
3314
3412
|
description?: string;
|
|
3315
3413
|
date?: string;
|
|
3316
3414
|
icon?: string;
|
|
3317
3415
|
color?: "primary" | "secondary" | "tertiary" | "error" | "success";
|
|
3416
|
+
/** Any CSS color for the dot (and its line), over `color` */
|
|
3318
3417
|
dotColor?: string;
|
|
3418
|
+
/**
|
|
3419
|
+
* Progress of a step: `done` (filled, a solid line to the next), `current` (filled, with a pulsing halo) or
|
|
3420
|
+
* `pending` (outlined, a dashed line). Over what the timeline's `current` gives it
|
|
3421
|
+
*/
|
|
3422
|
+
status?: "done" | "current" | "pending";
|
|
3423
|
+
/**
|
|
3424
|
+
* A group to show it under ("Today", "Yesterday"): a header goes before each run of consecutive entries with the
|
|
3425
|
+
* same group, and the line stops at the end of the run
|
|
3426
|
+
*/
|
|
3427
|
+
group?: string;
|
|
3319
3428
|
}
|
|
3320
3429
|
```
|
|
3321
3430
|
|
|
3431
|
+
```ts
|
|
3432
|
+
export type TimelineStatus = NonNullable<TimelineItem["status"]>;
|
|
3433
|
+
```
|
|
3434
|
+
|
|
3322
3435
|
### MTimePicker
|
|
3323
3436
|
|
|
3324
3437
|
An inline, dropdown-anchored hour/minute picker with 12h/24h format support.
|
|
@@ -3400,7 +3513,7 @@ Slots:
|
|
|
3400
3513
|
|
|
3401
3514
|
### MToolbar
|
|
3402
3515
|
|
|
3403
|
-
A container for grouping icon buttons and actions — docked to an edge or floating as a rounded pill, horizontal or vertical, with an optional paired FAB.
|
|
3516
|
+
A container for grouping icon buttons and actions — docked to an edge or floating as a rounded pill, horizontal or vertical, with an optional paired FAB. A floating toolbar collapses (`v-model:expanded`): with a FAB, into the FAB, which grows to 80px; without one, to its center (the default slot), closing `#leading` and `#trailing`. `collapseOnScroll` does it as the content scrolls.
|
|
3404
3517
|
|
|
3405
3518
|
Props:
|
|
3406
3519
|
- `variant?: "docked" | "floating" = "docked"` — Docked (edge-attached, full width/height, bordered) or floating (rounded pill with shadow)
|
|
@@ -3408,10 +3521,17 @@ Props:
|
|
|
3408
3521
|
- `color?: "surface" | "primary" | "secondary" | "tertiary" = "surface"` — Background color scheme
|
|
3409
3522
|
- `fabPosition?: "start" | "none" | "end" = "none"` — Where the #fab slot renders relative to the toolbar body
|
|
3410
3523
|
- `align?: "center" | "start" | "between" | "end" = "center"` — Item alignment along the main axis
|
|
3524
|
+
- `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
|
|
3525
|
+
- `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`
|
|
3526
|
+
|
|
3527
|
+
Events:
|
|
3528
|
+
- `update:expanded(value: boolean)` — The toolbar collapsed or expanded on scroll (`collapseOnScroll`)
|
|
3411
3529
|
|
|
3412
3530
|
Slots:
|
|
3413
|
-
- `#fab` — A FAB rendered alongside the toolbar body, positioned by fabPosition
|
|
3414
|
-
- `#
|
|
3531
|
+
- `#fab` — A FAB rendered alongside the toolbar body, positioned by fabPosition. The toolbar sizes an MFab in it
|
|
3532
|
+
- `#leading` — Items before the center, hidden when a floating toolbar without a FAB collapses
|
|
3533
|
+
- `#default` — Toolbar items — typically MIconButton/MButton, separated with MDivider. With #leading or #trailing, the center, which stays when a floating toolbar without a FAB collapses
|
|
3534
|
+
- `#trailing` — Items after the center, hidden when a floating toolbar without a FAB collapses
|
|
3415
3535
|
|
|
3416
3536
|
### MTooltip
|
|
3417
3537
|
|
|
@@ -3673,10 +3793,10 @@ Exposed (template ref):
|
|
|
3673
3793
|
|
|
3674
3794
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
3675
3795
|
|
|
3676
|
-
The map of the enclosing `MMap`, for your own controls, layers and handlers (call it in a component inside `MMap`). Listeners added through it are removed when the component unmounts. ```ts const { map, onLayer } = useMap() onLayer('click', 'parcels-fill', (e) => console.log(e.features?.[0]?.properties)) ```
|
|
3796
|
+
The map of the enclosing `MMap`, for your own controls, layers and handlers (call it in a component inside `MMap`). Listeners added through it are removed when the component unmounts. Outside an `MMap` (a side panel), pass it one: the `MMap`'s template ref, or a getter for it; until it mounts, `map` is undefined and `onReady` waits. ```ts const { map, onLayer } = useMap() onLayer('click', 'parcels-fill', (e) => console.log(e.features?.[0]?.properties)) // In a panel next to the map: <MMap ref="mapRef"> … <MyPanel :map="mapRef" /> const { map } = useMap(() => props.map) ```
|
|
3677
3797
|
|
|
3678
3798
|
```ts
|
|
3679
|
-
useMap(): {
|
|
3799
|
+
useMap(source?: MaybeRefOrGetter<MapSource>): {
|
|
3680
3800
|
map: ComputedRef<Map$1 | undefined>
|
|
3681
3801
|
maplibre: ComputedRef<typeof import("/home/runner/work/m3ui-vue/m3ui-vue/node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl") | undefined>
|
|
3682
3802
|
styleVersion: ComputedRef<number>
|
|
@@ -3691,10 +3811,10 @@ useMap(): {
|
|
|
3691
3811
|
|
|
3692
3812
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
3693
3813
|
|
|
3694
|
-
The layers of the enclosing `MMap`'s style as its `adapter` describes them, with their visibility and opacity, for a layer panel or a base layer switcher of your own (`MMapLayers` and `MMapBaseLayers` are built on it). Changes go to the map and to every component using it; a layer's `children` follow it.
|
|
3814
|
+
The layers of the enclosing `MMap`'s style as its `adapter` describes them, with their visibility and opacity, for a layer panel or a base layer switcher of your own (`MMapLayers` and `MMapBaseLayers` are built on it). Changes go to the map and to every component using it; a layer's `children` follow it. Outside an `MMap`, pass it one (its template ref), as with `useMap`.
|
|
3695
3815
|
|
|
3696
3816
|
```ts
|
|
3697
|
-
useMapLayers(): {
|
|
3817
|
+
useMapLayers(source?: MaybeRefOrGetter<MapSource>): {
|
|
3698
3818
|
model: ComputedRef<MapLayerModel | undefined>
|
|
3699
3819
|
layers: ComputedRef<MapLayerInfo[]>
|
|
3700
3820
|
isVisible: (id: string) => boolean
|
|
@@ -3765,10 +3885,10 @@ fieldLabel(key: string, format?: MapFieldFormat): string
|
|
|
3765
3885
|
|
|
3766
3886
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
3767
3887
|
|
|
3768
|
-
Filters for the layers of the enclosing `MMap`, on top of the filters their style already has (a layer that only draws parks keeps doing so): `setFilter(layer, expression)` combines both, `setFilter(layer, null)` brings the style's back. `MMapFilter` is built on it; use it for filters of your own (a range slider, a date, a search…).
|
|
3888
|
+
Filters for the layers of the enclosing `MMap`, on top of the filters their style already has (a layer that only draws parks keeps doing so): `setFilter(layer, expression)` combines both, `setFilter(layer, null)` brings the style's back. `MMapFilter` is built on it; use it for filters of your own (a range slider, a date, a search…). Outside an `MMap`, pass it one (its template ref), as with `useMap`.
|
|
3769
3889
|
|
|
3770
3890
|
```ts
|
|
3771
|
-
useMapFilter(): {
|
|
3891
|
+
useMapFilter(source?: MaybeRefOrGetter<MapSource>): {
|
|
3772
3892
|
setFilter: (layerId: string, filter: Maplibre.FilterSpecification | null) => void
|
|
3773
3893
|
valuesOf: (layerId: string, property: string) => (string | number)[]
|
|
3774
3894
|
}
|
|
@@ -3850,6 +3970,14 @@ Fires a burst of confetti. Browser only; does nothing under reduced motion.
|
|
|
3850
3970
|
fireConfetti(origin?: ConfettiOrigin, options: ConfettiOptions = {}): void
|
|
3851
3971
|
```
|
|
3852
3972
|
|
|
3973
|
+
### useContainerTransform
|
|
3974
|
+
|
|
3975
|
+
Material's container transform for elements that live apart from their expanded view: one controller, many elements opening it (a grid of cards), and one `<MContainerTransform :controller>` wherever the expanded view belongs. `open(event, item)` from a click grows that element into the expanded view, with `item` for it to show. ```ts const detail = useContainerTransform<Recipe>() // <MCard v-for="r in recipes"
|
|
3976
|
+
|
|
3977
|
+
```ts
|
|
3978
|
+
useContainerTransform(): ContainerTransformController<T>
|
|
3979
|
+
```
|
|
3980
|
+
|
|
3853
3981
|
### SEED_PALETTE
|
|
3854
3982
|
|
|
3855
3983
|
The palette id used while a seed color is active (`useColorPalette().setSeed()`).
|
|
@@ -3866,6 +3994,22 @@ A script to inline in `<head>` of a server-rendered page (Nuxt, Vite SSR), so da
|
|
|
3866
3994
|
themeInitScript(options: ThemeInitOptions = {}): string
|
|
3867
3995
|
```
|
|
3868
3996
|
|
|
3997
|
+
### viewportFromHeaders
|
|
3998
|
+
|
|
3999
|
+
The window size to server-render the adaptive layouts at, from a request's headers: the size `createM3UI({ cookies: true })` keeps in the `m3-viewport` cookie (any visit after the first); the viewport client hints (Chromium, once the server asked for them with `VIEWPORT_HINTS`); or, on a first visit, a size standing for the kind of device (`Sec-CH-UA-Mobile`, then the user agent: a phone, a tablet or a desktop), unless `guess: false`. Undefined when nothing tells: the layouts then render compact. ```ts createM3UI({ cookies: true, initialState: { viewport: viewportFromHeaders(request.headers) } }) ```
|
|
4000
|
+
|
|
4001
|
+
```ts
|
|
4002
|
+
viewportFromHeaders(headers: RequestHeaders, options: { guess?: boolean } = {}): ViewportSize | undefined
|
|
4003
|
+
```
|
|
4004
|
+
|
|
4005
|
+
### VIEWPORT_HINTS
|
|
4006
|
+
|
|
4007
|
+
The client hints that carry the window's size (Chromium), for a server's `Accept-CH` and `Critical-CH` response headers. With `Critical-CH`, Chromium repeats the very first request once to send them; later requests carry them after `Accept-CH` alone.
|
|
4008
|
+
|
|
4009
|
+
```ts
|
|
4010
|
+
VIEWPORT_HINTS: "Sec-CH-Viewport-Width, Sec-CH-Viewport-Height"
|
|
4011
|
+
```
|
|
4012
|
+
|
|
3869
4013
|
### generateScheme
|
|
3870
4014
|
|
|
3871
4015
|
Generates the light and dark schemes for a seed color (`#rrggbb`).
|
|
@@ -3953,6 +4097,34 @@ useDevice(): {
|
|
|
3953
4097
|
}
|
|
3954
4098
|
```
|
|
3955
4099
|
|
|
4100
|
+
### useAutoGrow
|
|
4101
|
+
|
|
4102
|
+
Makes a `<textarea>` grow with its text, between `minRows` and `maxRows` rows, scrolling past the last one: a chat composer, a comment box. Works on any textarea, styled however you like (rows are measured from its computed line height, padding and border). It also follows width changes, which rewrap the text. Returns `resize()` for anything else that changes the text.
|
|
4103
|
+
|
|
4104
|
+
```ts
|
|
4105
|
+
useAutoGrow(target: MaybeRefOrGetter<HTMLTextAreaElement | null | undefined>, options: AutoGrowOptions = {}): {
|
|
4106
|
+
resize: () => void
|
|
4107
|
+
}
|
|
4108
|
+
```
|
|
4109
|
+
|
|
4110
|
+
### useThemeTokens
|
|
4111
|
+
|
|
4112
|
+
The current values of some color tokens (`['primary', 'surface']` → `--color-primary`…), kept up to date across light/dark, palette, contrast and generated (seed) palette changes: for what can't use CSS variables, like a Chart.js dataset, a canvas or a MapLibre layer's paint. Values settle after the theme switch's color transition; with `{ live: true }` they also follow it frame by frame (as `rgba()` midway). Empty strings on the server. ```ts const colors = useThemeTokens(['primary', 'tertiary', 'outline-variant'] as const) const data = computed(() => ({ datasets: [{ data: sales, borderColor: colors.value.primary }] })) ```
|
|
4113
|
+
|
|
4114
|
+
```ts
|
|
4115
|
+
useThemeTokens(names: readonly T[], options: ThemeTokensOptions = {}): Ref<Record<T, string>, Record<T, string>>
|
|
4116
|
+
```
|
|
4117
|
+
|
|
4118
|
+
### useScrollReveal
|
|
4119
|
+
|
|
4120
|
+
Reveals elements as they scroll into view: they fade (and slide or grow) in on M3's springs, cascading when several enter together. Pass an element, a template ref, an array of them, or a getter. Off with reduced motion: everything is simply there. For a single element in a template, `v-reveal` does the same.
|
|
4121
|
+
|
|
4122
|
+
```ts
|
|
4123
|
+
useScrollReveal(target: MaybeRefOrGetter<Target>, options: ScrollRevealOptions = {}): {
|
|
4124
|
+
stop: () => void
|
|
4125
|
+
}
|
|
4126
|
+
```
|
|
4127
|
+
|
|
3956
4128
|
### useWindowSizeClass
|
|
3957
4129
|
|
|
3958
4130
|
The M3 width/height size classes, reactive. With no argument it tracks the browser window. Pass an element (ref or getter) to classify that element's own size instead, which is what the adaptive layout components do, so they adapt to the space they actually get (a column, a dialog, a resizable panel).
|
|
@@ -4061,6 +4233,78 @@ The M3 press ripple for any element: `<div v-ripple>`, `v-ripple="false"`, `v-ri
|
|
|
4061
4233
|
vRipple: Directive<HTMLElement, RippleValue>
|
|
4062
4234
|
```
|
|
4063
4235
|
|
|
4236
|
+
### vReveal
|
|
4237
|
+
|
|
4238
|
+
Reveals the element as it scrolls into view, on M3's springs (see `useScrollReveal` for the options): `v-reveal`, `v-reveal="'scale'"`, `v-reveal="{ effect: 'slide-left', delay: 100 }"`. Items of a `v-for` with the same options cascade in. Off with reduced motion. Registered by `createM3UI()`, or import `vReveal`.
|
|
4239
|
+
|
|
4240
|
+
```ts
|
|
4241
|
+
vReveal: Directive<HTMLElement, RevealValue>
|
|
4242
|
+
```
|
|
4243
|
+
|
|
4244
|
+
### vStateLayer
|
|
4245
|
+
|
|
4246
|
+
The M3 state layer for any element: a tint in its text color at 8% on hover, 10% on keyboard focus and press, 16% while dragged. `<div v-state-layer>`, `v-state-layer="false"`, `v-state-layer="'#e91e63'"` or `v-state-layer="{ disabled, color, dragged }"`. Pairs with `v-ripple`. A statically positioned element is made `position: relative`. Registered globally as `v-state-layer` by `createM3UI()`; import `vStateLayer` to use it without the plugin.
|
|
4247
|
+
|
|
4248
|
+
```ts
|
|
4249
|
+
vStateLayer: Directive<HTMLElement, StateLayerValue>
|
|
4250
|
+
```
|
|
4251
|
+
|
|
4252
|
+
### vTooltip
|
|
4253
|
+
|
|
4254
|
+
MTooltip's plain tooltip on any element, without wrapping it: `v-tooltip="'Save'"` or `v-tooltip="{ text, placement, delay, disabled }"`. Shows after a delay on mouse hover, on keyboard focus, and on a long press on touch (swallowing that press's click, hiding 1.5s after the finger lifts); Escape and scrolling hide it. Registered globally as `v-tooltip` by `createM3UI()`; import `vTooltip` to use it without the plugin.
|
|
4255
|
+
|
|
4256
|
+
```ts
|
|
4257
|
+
vTooltip: Directive<HTMLElement, TooltipValue>
|
|
4258
|
+
```
|
|
4259
|
+
|
|
4260
|
+
### vFocusRing
|
|
4261
|
+
|
|
4262
|
+
The M3 focus indicator on any element: a 3dp ring in `secondary`, 2dp outside the element, shown on keyboard focus only (`:focus-visible`), never on a click or tap. `<div v-focus-ring tabindex="0">`, `v-focus-ring="false"`, `v-focus-ring="'#e91e63'"` or `v-focus-ring="{ disabled, color, inset, within }"`. It wins over an `outline-none` class on the same element. Registered globally as `v-focus-ring` by `createM3UI()`; import `vFocusRing` to use it without the plugin.
|
|
4263
|
+
|
|
4264
|
+
```ts
|
|
4265
|
+
vFocusRing: Directive<HTMLElement, FocusRingValue>
|
|
4266
|
+
```
|
|
4267
|
+
|
|
4268
|
+
### vScrollElevation
|
|
4269
|
+
|
|
4270
|
+
Marks an element while the content under it has scrolled, as M3's top app bar does on scroll: it takes the scrolled container color (`surface-container`) and gets a `data-scrolled` attribute for your own styles (`data-scrolled:shadow-elevation-2`). Follows the window, or `v-scroll-elevation="'#list'"` / `{ target, threshold, color, onChange, disabled }`. Add `transition-colors` to the element for a fade. Registered globally as `v-scroll-elevation` by `createM3UI()`; import `vScrollElevation` to use it without the plugin.
|
|
4271
|
+
|
|
4272
|
+
```ts
|
|
4273
|
+
vScrollElevation: Directive<HTMLElement, ScrollElevationValue>
|
|
4274
|
+
```
|
|
4275
|
+
|
|
4276
|
+
### vLongPress
|
|
4277
|
+
|
|
4278
|
+
Calls a handler when the element is pressed and held: `v-long-press="onHold"` or `v-long-press="{ handler, duration, tolerance, haptic, mouse, disabled }"`. Moving past the tolerance (a scroll or a drag) cancels it; once it fires, the click the press ends in and the browser's own long-press menu are swallowed, so a long-pressed button doesn't also click. While held, the element has `data-long-pressing` (`data-long-pressing:scale-95`). Registered globally as `v-long-press` by `createM3UI()`; import `vLongPress` to use it without the plugin.
|
|
4279
|
+
|
|
4280
|
+
```ts
|
|
4281
|
+
vLongPress: Directive<HTMLElement, LongPressValue>
|
|
4282
|
+
```
|
|
4283
|
+
|
|
4284
|
+
### vSwipe
|
|
4285
|
+
|
|
4286
|
+
Calls handlers when an element is swiped: `v-swipe="onSwipe"` (any direction, `info.direction` says which) or `v-swipe="{ left, right, up, down, threshold, velocity, onMove, onEnd, mouse, disabled }"`. A swipe counts past `threshold` px, or at any length when flicked faster than `velocity`. The element's `touch-action` is set from the directions you listen to: only left/right leaves vertical scrolling to the page (`pan-y`), only up/down the horizontal (`pan-x`), both block panning from it (`none`). The click a swipe ends in is swallowed. Registered globally as `v-swipe` by `createM3UI()`; import `vSwipe` to use it without the plugin.
|
|
4287
|
+
|
|
4288
|
+
```ts
|
|
4289
|
+
vSwipe: Directive<HTMLElement, SwipeValue>
|
|
4290
|
+
```
|
|
4291
|
+
|
|
4292
|
+
### vClickOutside
|
|
4293
|
+
|
|
4294
|
+
Calls a handler when a press lands outside the element: `v-click-outside="close"` or `v-click-outside="{ handler, exclude, event, disabled }"`. `exclude` takes elements or selectors that count as inside (the toggle button, a teleported popup). Only the primary button counts. Starts listening after the event that mounted it, so the click that opened a panel doesn't close it. Registered globally as `v-click-outside` by `createM3UI()`; import `vClickOutside` to use it without the plugin.
|
|
4295
|
+
|
|
4296
|
+
```ts
|
|
4297
|
+
vClickOutside: Directive<HTMLElement, ClickOutsideValue>
|
|
4298
|
+
```
|
|
4299
|
+
|
|
4300
|
+
### vSkeleton
|
|
4301
|
+
|
|
4302
|
+
Turns an element into its own loading placeholder: `v-skeleton="loading"` or `v-skeleton="{ loading, animation }"`. While loading it keeps its size and corners, hides its content (which still sizes it: placeholder text like `{{ user?.name ?? 'Loading name' }}` gives an empty element a width), takes MSkeleton's tint and animation (`pulse`, `wave` or `none`; still with reduced motion), ignores the pointer and is `aria-busy`. Registered globally as `v-skeleton` by `createM3UI()`; import `vSkeleton` to use it without the plugin.
|
|
4303
|
+
|
|
4304
|
+
```ts
|
|
4305
|
+
vSkeleton: Directive<HTMLElement, SkeletonValue>
|
|
4306
|
+
```
|
|
4307
|
+
|
|
4064
4308
|
### emojiCategories
|
|
4065
4309
|
|
|
4066
4310
|
```ts
|
|
@@ -4126,6 +4370,14 @@ export interface MapContext {
|
|
|
4126
4370
|
}
|
|
4127
4371
|
```
|
|
4128
4372
|
|
|
4373
|
+
```ts
|
|
4374
|
+
/**
|
|
4375
|
+
* A map to use from outside `<MMap>`: the `MMap` itself (a template ref: `<MMap ref="map">` → `:map="map"`) or its
|
|
4376
|
+
* `context`. Null or undefined until it mounts.
|
|
4377
|
+
*/
|
|
4378
|
+
export type MapSource = { context: MapContext } | MapContext | null | undefined
|
|
4379
|
+
```
|
|
4380
|
+
|
|
4129
4381
|
```ts
|
|
4130
4382
|
/** The `maplibre-gl` module (its classes: `Map`, `Marker`, `Popup`…) */
|
|
4131
4383
|
export type MaplibreModule = typeof import('maplibre-gl')
|
|
@@ -4372,6 +4624,27 @@ export interface ConfettiOptions {
|
|
|
4372
4624
|
export type ConfettiOrigin = MouseEvent | PointerEvent | Element | { x: number; y: number }
|
|
4373
4625
|
```
|
|
4374
4626
|
|
|
4627
|
+
```ts
|
|
4628
|
+
/** The state MContainerTransform plays, shared between the elements that open it and the panel they open */
|
|
4629
|
+
export interface ContainerTransformController<T = unknown> {
|
|
4630
|
+
/** Whether the expanded view is open (or opening) */
|
|
4631
|
+
isOpen: Ref<boolean>
|
|
4632
|
+
/** What `open` was given, for the expanded view to show */
|
|
4633
|
+
item: Ref<T | undefined>
|
|
4634
|
+
/** The element it grows from and shrinks back into */
|
|
4635
|
+
source: ShallowRef<HTMLElement | null>
|
|
4636
|
+
/** Opens from `origin` (a click's element, an element or a component), with an optional `item` */
|
|
4637
|
+
open: (origin?: ContainerTransformOrigin, item?: T) => void
|
|
4638
|
+
/** Shrinks the expanded view back into the element it opened from */
|
|
4639
|
+
close: () => void
|
|
4640
|
+
}
|
|
4641
|
+
```
|
|
4642
|
+
|
|
4643
|
+
```ts
|
|
4644
|
+
/** What a container transform opens from: a click (its element), an element, or a component */
|
|
4645
|
+
export type ContainerTransformOrigin = Event | Element | ComponentPublicInstance | null | undefined
|
|
4646
|
+
```
|
|
4647
|
+
|
|
4375
4648
|
```ts
|
|
4376
4649
|
export interface Palette {
|
|
4377
4650
|
id: string
|
|
@@ -4415,6 +4688,19 @@ export interface ThemeInitOptions {
|
|
|
4415
4688
|
}
|
|
4416
4689
|
```
|
|
4417
4690
|
|
|
4691
|
+
```ts
|
|
4692
|
+
/** A request's headers as server frameworks hand them over: a `Headers`, or a plain object (Node's, h3's). */
|
|
4693
|
+
export type RequestHeaders = Headers | Record<string, string | string[] | undefined>
|
|
4694
|
+
```
|
|
4695
|
+
|
|
4696
|
+
```ts
|
|
4697
|
+
/** A window size, for `createM3UI({ initialState: { viewport } })` */
|
|
4698
|
+
export interface ViewportSize {
|
|
4699
|
+
width: number
|
|
4700
|
+
height: number
|
|
4701
|
+
}
|
|
4702
|
+
```
|
|
4703
|
+
|
|
4418
4704
|
```ts
|
|
4419
4705
|
// Dynamic color: a full M3 color scheme (light and dark) generated from one seed color with Google's
|
|
4420
4706
|
// material-color-utilities (HCT, DynamicScheme). The package is loaded with a dynamic import, so apps that
|
|
@@ -4690,6 +4976,9 @@ export interface M3Locale {
|
|
|
4690
4976
|
carouselItem: string
|
|
4691
4977
|
/** MSparkline's summary for screen readers: {first}, {last}, {min}, {max} */
|
|
4692
4978
|
sparklineSummary: string
|
|
4979
|
+
/** MSlider range: its two thumbs */
|
|
4980
|
+
sliderRangeStart: string
|
|
4981
|
+
sliderRangeEnd: string
|
|
4693
4982
|
// MMap (maplibre controls)
|
|
4694
4983
|
mapTitle: string
|
|
4695
4984
|
mapMarker: string
|
|
@@ -4721,9 +5010,65 @@ export interface M3Locale {
|
|
|
4721
5010
|
mapDeleteMeasurement: string
|
|
4722
5011
|
mapTotal: string
|
|
4723
5012
|
mapSearchPlaces: string
|
|
5013
|
+
/** MTimeline's button past `limit`; `{count}` is how many entries are hidden */
|
|
5014
|
+
timelineShowMore: string
|
|
5015
|
+
timelineShowLess: string
|
|
4724
5016
|
}
|
|
4725
5017
|
```
|
|
4726
5018
|
|
|
5019
|
+
```ts
|
|
5020
|
+
export interface AutoGrowOptions {
|
|
5021
|
+
/** Fewest rows it shrinks to (default 1) */
|
|
5022
|
+
minRows?: MaybeRefOrGetter<number | undefined>
|
|
5023
|
+
/** Most rows it grows to; past them it scrolls. Unset grows without limit */
|
|
5024
|
+
maxRows?: MaybeRefOrGetter<number | undefined>
|
|
5025
|
+
/**
|
|
5026
|
+
* The text, when it can change without typing (cleared after sending, an emoji inserted…): a ref or getter, so the
|
|
5027
|
+
* height follows. Typing is followed on its own
|
|
5028
|
+
*/
|
|
5029
|
+
value?: WatchSource<unknown>
|
|
5030
|
+
}
|
|
5031
|
+
```
|
|
5032
|
+
|
|
5033
|
+
```ts
|
|
5034
|
+
export interface ThemeTokensOptions {
|
|
5035
|
+
/**
|
|
5036
|
+
* Updates every animation frame while the theme switch's colors fade, so a canvas redrawn on change fades with
|
|
5037
|
+
* the page instead of jumping to the new colors. Off by default: what animates color changes itself (Chart.js,
|
|
5038
|
+
* MChart, maps) only needs the final values, and would otherwise redraw ~15 times per switch.
|
|
5039
|
+
*/
|
|
5040
|
+
live?: boolean
|
|
5041
|
+
}
|
|
5042
|
+
```
|
|
5043
|
+
|
|
5044
|
+
```ts
|
|
5045
|
+
export interface ScrollRevealOptions {
|
|
5046
|
+
/** How it enters (default `'fade-up'`) */
|
|
5047
|
+
effect?: RevealEffect
|
|
5048
|
+
/** Distance in px for the slide effects (default 24) */
|
|
5049
|
+
distance?: number
|
|
5050
|
+
/** Delay in ms before it starts (default 0) */
|
|
5051
|
+
delay?: number
|
|
5052
|
+
/** Extra delay in ms for each next element revealed at the same time, so a list cascades in (default 60) */
|
|
5053
|
+
stagger?: number
|
|
5054
|
+
/** Reveal only the first time (default `true`); with `false` it hides again once it leaves the screen */
|
|
5055
|
+
once?: boolean
|
|
5056
|
+
/** How much of the element has to be visible, 0 to 1 (default 0.15) */
|
|
5057
|
+
threshold?: number
|
|
5058
|
+
/** Grows or shrinks the area that counts as visible, like IntersectionObserver's `rootMargin` (default `'0px'`) */
|
|
5059
|
+
rootMargin?: string
|
|
5060
|
+
/** Motion scheme of the springs: `'standard'` (default) or `'expressive'` (a little bounce) */
|
|
5061
|
+
scheme?: 'standard' | 'expressive'
|
|
5062
|
+
/** Pace: M3's fast, default or slow springs (default `'default'`); slow suits large, calm entrances */
|
|
5063
|
+
speed?: 'fast' | 'default' | 'slow'
|
|
5064
|
+
}
|
|
5065
|
+
```
|
|
5066
|
+
|
|
5067
|
+
```ts
|
|
5068
|
+
/** How an element enters: from below, from a side, growing, or only fading. */
|
|
5069
|
+
export type RevealEffect = 'fade-up' | 'fade' | 'scale' | 'slide-left' | 'slide-right'
|
|
5070
|
+
```
|
|
5071
|
+
|
|
4727
5072
|
```ts
|
|
4728
5073
|
/*
|
|
4729
5074
|
* M3 window size classes, with the breakpoints from androidx `WindowSizeClass`
|
|
@@ -4805,6 +5150,200 @@ export interface RippleOptions {
|
|
|
4805
5150
|
export type RippleValue = boolean | string | RippleOptions | null | undefined
|
|
4806
5151
|
```
|
|
4807
5152
|
|
|
5153
|
+
```ts
|
|
5154
|
+
/** `v-reveal` value: nothing or `true` (fade up), `false` (off), an effect name, or options. */
|
|
5155
|
+
export type RevealValue = boolean | RevealEffect | ScrollRevealOptions | null | undefined
|
|
5156
|
+
```
|
|
5157
|
+
|
|
5158
|
+
```ts
|
|
5159
|
+
/** Options for `v-state-layer`. */
|
|
5160
|
+
export interface StateLayerOptions {
|
|
5161
|
+
/** No state layer while true (e.g. bound to the element's disabled state). `disabled` / `aria-disabled="true"` hosts get none either way. */
|
|
5162
|
+
disabled?: boolean
|
|
5163
|
+
/** Any CSS color for the layer; defaults to the element's text color (`currentColor`). */
|
|
5164
|
+
color?: string
|
|
5165
|
+
/** Holds the dragged state (16%) while true, e.g. while the element is being dragged. */
|
|
5166
|
+
dragged?: boolean
|
|
5167
|
+
}
|
|
5168
|
+
```
|
|
5169
|
+
|
|
5170
|
+
```ts
|
|
5171
|
+
/** `v-state-layer` value: nothing or `true` (on), `false` (off), a CSS color, or an options object. */
|
|
5172
|
+
export type StateLayerValue = boolean | string | StateLayerOptions | null | undefined
|
|
5173
|
+
```
|
|
5174
|
+
|
|
5175
|
+
```ts
|
|
5176
|
+
/** Options for `v-tooltip`. */
|
|
5177
|
+
export interface TooltipOptions {
|
|
5178
|
+
/** The tooltip's text; nothing shows while it's empty. */
|
|
5179
|
+
text?: string
|
|
5180
|
+
/** Side of the element it shows on (default `'top'`); it stays inside the window. */
|
|
5181
|
+
placement?: TooltipPlacement
|
|
5182
|
+
/** Delay before it shows on hover or keyboard focus, in ms (default 600, like MTooltip). */
|
|
5183
|
+
delay?: number
|
|
5184
|
+
/** Never shows while true. */
|
|
5185
|
+
disabled?: boolean
|
|
5186
|
+
}
|
|
5187
|
+
```
|
|
5188
|
+
|
|
5189
|
+
```ts
|
|
5190
|
+
/** `v-tooltip` value: the text, or an options object. */
|
|
5191
|
+
export type TooltipValue = string | TooltipOptions | null | undefined
|
|
5192
|
+
```
|
|
5193
|
+
|
|
5194
|
+
```ts
|
|
5195
|
+
/** Options for `v-focus-ring`. */
|
|
5196
|
+
export interface FocusRingOptions {
|
|
5197
|
+
/** No ring while true. */
|
|
5198
|
+
disabled?: boolean
|
|
5199
|
+
/** Any CSS color or token for the ring; defaults to `var(--color-secondary)`, as M3's focus indicator. */
|
|
5200
|
+
color?: string
|
|
5201
|
+
/** Draws the ring inside the element's edge instead of 2px outside it, for elements clipped by a parent. */
|
|
5202
|
+
inset?: boolean
|
|
5203
|
+
/** Also shows while an element inside it has keyboard focus (a card holding a link or a field). */
|
|
5204
|
+
within?: boolean
|
|
5205
|
+
}
|
|
5206
|
+
```
|
|
5207
|
+
|
|
5208
|
+
```ts
|
|
5209
|
+
/** `v-focus-ring` value: nothing or `true` (on), `false` (off), a CSS color, or an options object. */
|
|
5210
|
+
export type FocusRingValue = boolean | string | FocusRingOptions | null | undefined
|
|
5211
|
+
```
|
|
5212
|
+
|
|
5213
|
+
```ts
|
|
5214
|
+
/** Options for `v-scroll-elevation`. */
|
|
5215
|
+
export interface ScrollElevationOptions {
|
|
5216
|
+
/**
|
|
5217
|
+
* What scrolls: an element, a CSS selector for it, or the window (when left out). A template ref that's still
|
|
5218
|
+
* empty (`target: list` before the list mounts) waits for it instead of following the window.
|
|
5219
|
+
*/
|
|
5220
|
+
target?: HTMLElement | Window | string | null
|
|
5221
|
+
/** How far (px) the content has to scroll before the element counts as scrolled (default 0: any scroll). */
|
|
5222
|
+
threshold?: number
|
|
5223
|
+
/**
|
|
5224
|
+
* The background while scrolled, any CSS color or token; default `var(--color-surface-container)`, M3's
|
|
5225
|
+
* scrolled container color for a top app bar. `false` changes no color: style `[data-scrolled]` yourself.
|
|
5226
|
+
*/
|
|
5227
|
+
color?: string | false
|
|
5228
|
+
/** Called when the scrolled state changes. */
|
|
5229
|
+
onChange?: (scrolled: boolean) => void
|
|
5230
|
+
/** Stops following the scroll while true (and clears the scrolled state). */
|
|
5231
|
+
disabled?: boolean
|
|
5232
|
+
}
|
|
5233
|
+
```
|
|
5234
|
+
|
|
5235
|
+
```ts
|
|
5236
|
+
/** `v-scroll-elevation` value: nothing or `true` (the window), `false` (off), a selector, or an options object. */
|
|
5237
|
+
export type ScrollElevationValue = boolean | string | ScrollElevationOptions | null | undefined
|
|
5238
|
+
```
|
|
5239
|
+
|
|
5240
|
+
```ts
|
|
5241
|
+
/** Options for `v-long-press`. */
|
|
5242
|
+
export interface LongPressOptions {
|
|
5243
|
+
/** Called once the press has been held for `duration`, with the pointerdown that started it. */
|
|
5244
|
+
handler?: (event: PointerEvent) => void
|
|
5245
|
+
/** How long to hold, in ms (default 500, as MTooltip's long press). */
|
|
5246
|
+
duration?: number
|
|
5247
|
+
/** How far (px) the pointer may move before it's a scroll or a drag, not a press (default 10). */
|
|
5248
|
+
tolerance?: number
|
|
5249
|
+
/** A short vibration when it fires, where the device supports it (default true). */
|
|
5250
|
+
haptic?: boolean
|
|
5251
|
+
/** Also with a mouse (default true); false leaves the mouse alone, for touch and pen only. */
|
|
5252
|
+
mouse?: boolean
|
|
5253
|
+
/** Off while true. */
|
|
5254
|
+
disabled?: boolean
|
|
5255
|
+
}
|
|
5256
|
+
```
|
|
5257
|
+
|
|
5258
|
+
```ts
|
|
5259
|
+
/** `v-long-press` value: the handler, or an options object. */
|
|
5260
|
+
export type LongPressValue = ((event: PointerEvent) => void) | LongPressOptions | null | undefined
|
|
5261
|
+
```
|
|
5262
|
+
|
|
5263
|
+
```ts
|
|
5264
|
+
export type SwipeDirection = 'left' | 'right' | 'up' | 'down'
|
|
5265
|
+
```
|
|
5266
|
+
|
|
5267
|
+
```ts
|
|
5268
|
+
/** What a swipe handler gets. */
|
|
5269
|
+
export interface SwipeInfo {
|
|
5270
|
+
direction: SwipeDirection
|
|
5271
|
+
/** Distance from where the press started, px (x grows rightwards, y downwards). */
|
|
5272
|
+
dx: number
|
|
5273
|
+
dy: number
|
|
5274
|
+
/** Speed along the swipe's axis when the finger lifted, px/ms. */
|
|
5275
|
+
velocity: number
|
|
5276
|
+
/** The pointerup that ended it. */
|
|
5277
|
+
event: PointerEvent
|
|
5278
|
+
}
|
|
5279
|
+
```
|
|
5280
|
+
|
|
5281
|
+
```ts
|
|
5282
|
+
/** Options for `v-swipe`. */
|
|
5283
|
+
export interface SwipeOptions {
|
|
5284
|
+
left?: (info: SwipeInfo) => void
|
|
5285
|
+
right?: (info: SwipeInfo) => void
|
|
5286
|
+
up?: (info: SwipeInfo) => void
|
|
5287
|
+
down?: (info: SwipeInfo) => void
|
|
5288
|
+
/** Called for a swipe in any direction that has no handler of its own. Listens on both axes. */
|
|
5289
|
+
handler?: (info: SwipeInfo) => void
|
|
5290
|
+
/** How far (px) the finger has to travel for a slow swipe to count (default 50). */
|
|
5291
|
+
threshold?: number
|
|
5292
|
+
/** A swipe at least this fast (px/ms) counts whatever its length (default 0.5, a flick). */
|
|
5293
|
+
velocity?: number
|
|
5294
|
+
/** Called while the finger moves along a listened axis, for feedback (follow the finger, fade a hint). */
|
|
5295
|
+
onMove?: (dx: number, dy: number, event: PointerEvent) => void
|
|
5296
|
+
/** Called when the press ends, swiped or not (spring a moved element back). */
|
|
5297
|
+
onEnd?: (swiped: boolean) => void
|
|
5298
|
+
/** Also with a mouse drag (default false: swipes are for touch and pen). */
|
|
5299
|
+
mouse?: boolean
|
|
5300
|
+
/** Off while true. */
|
|
5301
|
+
disabled?: boolean
|
|
5302
|
+
}
|
|
5303
|
+
```
|
|
5304
|
+
|
|
5305
|
+
```ts
|
|
5306
|
+
/** `v-swipe` value: a handler for any direction, or an options object. */
|
|
5307
|
+
export type SwipeValue = ((info: SwipeInfo) => void) | SwipeOptions | null | undefined
|
|
5308
|
+
```
|
|
5309
|
+
|
|
5310
|
+
```ts
|
|
5311
|
+
/** Options for `v-click-outside`. */
|
|
5312
|
+
export interface ClickOutsideOptions {
|
|
5313
|
+
/** Called with the event that landed outside the element. */
|
|
5314
|
+
handler?: (event: PointerEvent | MouseEvent) => void
|
|
5315
|
+
/**
|
|
5316
|
+
* Elements that count as inside too: elements or CSS selectors (the button that toggles a panel, or a panel's
|
|
5317
|
+
* own popup teleported to `<body>`).
|
|
5318
|
+
*/
|
|
5319
|
+
exclude?: Array<HTMLElement | string | null | undefined>
|
|
5320
|
+
/** `'pointerdown'` (default) reacts as the press starts, like menus; `'click'` once it ends, so a drag out doesn't count. */
|
|
5321
|
+
event?: 'pointerdown' | 'click'
|
|
5322
|
+
/** Off while true. */
|
|
5323
|
+
disabled?: boolean
|
|
5324
|
+
}
|
|
5325
|
+
```
|
|
5326
|
+
|
|
5327
|
+
```ts
|
|
5328
|
+
/** `v-click-outside` value: the handler, or an options object. */
|
|
5329
|
+
export type ClickOutsideValue = ((event: PointerEvent | MouseEvent) => void) | ClickOutsideOptions | null | undefined
|
|
5330
|
+
```
|
|
5331
|
+
|
|
5332
|
+
```ts
|
|
5333
|
+
/** Options for `v-skeleton`. */
|
|
5334
|
+
export interface SkeletonOptions {
|
|
5335
|
+
/** Shows the placeholder while true. */
|
|
5336
|
+
loading?: boolean
|
|
5337
|
+
/** MSkeleton's animations (default `'pulse'`). */
|
|
5338
|
+
animation?: 'pulse' | 'wave' | 'none'
|
|
5339
|
+
}
|
|
5340
|
+
```
|
|
5341
|
+
|
|
5342
|
+
```ts
|
|
5343
|
+
/** `v-skeleton` value: whether it's loading, or an options object. */
|
|
5344
|
+
export type SkeletonValue = boolean | SkeletonOptions | null | undefined
|
|
5345
|
+
```
|
|
5346
|
+
|
|
4808
5347
|
```ts
|
|
4809
5348
|
// Generated by scripts/generate-emoji-data.mjs from Unicode emoji-test.txt (Emoji 15). Don't edit by hand.
|
|
4810
5349
|
// Emoji data © Unicode, Inc., under the Unicode License v3 (dist/THIRD_PARTY_LICENSES.md, scripts/licenses/unicode-license-v3.txt).
|
|
@@ -4823,7 +5362,7 @@ export interface EmojiCategory {
|
|
|
4823
5362
|
`M3Locale` keys (pass a partial object to `createM3UI({ locale })`; presets from `@m3ui-vue/m3ui-vue/locales`:
|
|
4824
5363
|
`esLocale`, `frLocale`, `ptLocale`, `deLocale`, `jaLocale`, `zhLocale`, `koLocale`):
|
|
4825
5364
|
|
|
4826
|
-
lang, search, noResults, close, cancel, confirm, loading, menu, previous, next, today, more, selectedCount, recordCount, expand, collapse, clear, columns, exportCsv, noGroup, finish, dropText, selectText, maxSizePrefix, remove, selectDate, ok, dateToggleInput, dateToggleCalendar, dateInputLabel, selectTime, timeHourSelection, timeMinuteSelection, timePeriodToggle, timeToggleKeyboard, timeToggleDial, timeToggleScroll, sheetExpand, sheetCollapse, sheetDismiss, seekBar, seekBarValue, seekBarShowRemaining, seekBarShowDuration, selectRange, pickStart, pickEnd, previousMonth, nextMonth, selectColor, colorHue, colorSaturation, colorBrightness, colorAlpha, colorEyedropper, colorOriginal, colorFormat, colorRecent, colorPresets, dayView, weekView, allDay, emojiSearch, emojiNoResults, emojiRecent, emojiSkinTone, emojiSkinTones, emojiCategorySmileys, emojiCategoryGestures, emojiCategoryPeople, emojiCategoryAnimals, emojiCategoryNature, emojiCategoryFood, emojiCategoryActivities, emojiCategoryTravel, emojiCategoryObjects, emojiCategorySymbols, emojiCategoryFlags, available, selected, noItems, moveAllRight, moveRight, moveLeft, moveAllLeft, searchCommand, navigateHint, selectHint, openHint, closeHint, loadingMore, noMoreItems, bold, italic, underline, strikethrough, highlight, bulletList, orderedList, blockquote, code, alignLeft, alignCenter, alignRight, undo, redo, link, image, paragraph, heading1, heading2, heading3, insertLink, insertImage, imageUrlLabel, insert, jsonValid, jsonInvalid, jsonFormat, jsonMinify, jsonElements, jsonFields, resultSuccessTitle, resultSuccessDesc, resultErrorTitle, resultErrorDesc, resultWarningTitle, resultWarningDesc, resultInfoTitle, resultInfoDesc, result404Title, result404Desc, result403Title, result403Desc, result500Title, result500Desc, chatTyping, chatRecordingAudio, reorderHandle, reorderGrabbed, reorderMoved, reorderDropped, reorderCancelled, selectAll, clearSearch, kanbanMoved, windowMinimize, windowMaximize, windowRestore, paginationRange, paginationPage, previousPage, nextPage, carousel, carouselItem, sparklineSummary, mapTitle, mapMarker, mapZoomIn, mapZoomOut, mapResetBearing, mapFindMyLocation, mapLocationNotAvailable, mapEnterFullscreen, mapExitFullscreen, mapToggleAttribution, mapFeedback, mapCtrlScroll, mapCmdScroll, mapTwoFingers, mapLayers, mapSearchLayers, mapNoLayers, mapShowLayer, mapHideLayer, mapOpacity, mapDownload, mapNoBaseLayer, mapHoverInfo, mapNoValue, mapMeasureDistance, mapMeasureArea, mapClearMeasurements, mapDeleteMeasurement, mapTotal, mapSearchPlaces
|
|
5365
|
+
lang, search, noResults, close, cancel, confirm, loading, menu, previous, next, today, more, selectedCount, recordCount, expand, collapse, clear, columns, exportCsv, noGroup, finish, dropText, selectText, maxSizePrefix, remove, selectDate, ok, dateToggleInput, dateToggleCalendar, dateInputLabel, selectTime, timeHourSelection, timeMinuteSelection, timePeriodToggle, timeToggleKeyboard, timeToggleDial, timeToggleScroll, sheetExpand, sheetCollapse, sheetDismiss, seekBar, seekBarValue, seekBarShowRemaining, seekBarShowDuration, selectRange, pickStart, pickEnd, previousMonth, nextMonth, selectColor, colorHue, colorSaturation, colorBrightness, colorAlpha, colorEyedropper, colorOriginal, colorFormat, colorRecent, colorPresets, dayView, weekView, allDay, emojiSearch, emojiNoResults, emojiRecent, emojiSkinTone, emojiSkinTones, emojiCategorySmileys, emojiCategoryGestures, emojiCategoryPeople, emojiCategoryAnimals, emojiCategoryNature, emojiCategoryFood, emojiCategoryActivities, emojiCategoryTravel, emojiCategoryObjects, emojiCategorySymbols, emojiCategoryFlags, available, selected, noItems, moveAllRight, moveRight, moveLeft, moveAllLeft, searchCommand, navigateHint, selectHint, openHint, closeHint, loadingMore, noMoreItems, bold, italic, underline, strikethrough, highlight, bulletList, orderedList, blockquote, code, alignLeft, alignCenter, alignRight, undo, redo, link, image, paragraph, heading1, heading2, heading3, insertLink, insertImage, imageUrlLabel, insert, jsonValid, jsonInvalid, jsonFormat, jsonMinify, jsonElements, jsonFields, resultSuccessTitle, resultSuccessDesc, resultErrorTitle, resultErrorDesc, resultWarningTitle, resultWarningDesc, resultInfoTitle, resultInfoDesc, result404Title, result404Desc, result403Title, result403Desc, result500Title, result500Desc, chatTyping, chatRecordingAudio, reorderHandle, reorderGrabbed, reorderMoved, reorderDropped, reorderCancelled, selectAll, clearSearch, kanbanMoved, windowMinimize, windowMaximize, windowRestore, paginationRange, paginationPage, previousPage, nextPage, carousel, carouselItem, sparklineSummary, sliderRangeStart, sliderRangeEnd, mapTitle, mapMarker, mapZoomIn, mapZoomOut, mapResetBearing, mapFindMyLocation, mapLocationNotAvailable, mapEnterFullscreen, mapExitFullscreen, mapToggleAttribution, mapFeedback, mapCtrlScroll, mapCmdScroll, mapTwoFingers, mapLayers, mapSearchLayers, mapNoLayers, mapShowLayer, mapHideLayer, mapOpacity, mapDownload, mapNoBaseLayer, mapHoverInfo, mapNoValue, mapMeasureDistance, mapMeasureArea, mapClearMeasurements, mapDeleteMeasurement, mapTotal, mapSearchPlaces, timelineShowMore, timelineShowLess
|
|
4827
5366
|
|
|
4828
5367
|
## Theme tokens
|
|
4829
5368
|
|