@m3ui-vue/m3ui-vue 1.1.4 → 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/dist/API.md +511 -34
- package/dist/MMenuItem-DI351kIf.js +929 -0
- package/dist/MMenuItem-DI351kIf.js.map +1 -0
- package/dist/{MSlider-JflHJ70q.js → MSlider-BnEy5ieZ.js} +295 -320
- 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/MButton.vue.d.ts +7 -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/MContextMenu.vue.d.ts +2 -2
- package/dist/components/MCopyButton.vue.d.ts +1 -1
- 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/MIconButton.vue.d.ts +13 -1
- package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
- 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/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/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/MTooltip.vue.d.ts +1 -1
- package/dist/components/_MDrawerItemList.vue.d.ts +2 -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/useLocale.d.ts +3 -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 +28 -1
- package/dist/locales/index.js +21 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +7131 -6216
- package/dist/m3ui.js.map +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/map.js +821 -791
- 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 +13 -9
- 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-CXibICQA.js → useLocale-JYxDDeXC.js} +4 -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 +1 -1
- 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__/MIconButton.test.ts +33 -0
- package/src/__tests__/MMap.test.ts +53 -1
- package/src/__tests__/MMapLayers.test.ts +46 -2
- 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__/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__/MTimeline.test.ts +238 -0
- package/src/__tests__/_fakeMaplibre.ts +3 -1
- package/src/__tests__/attrsFallthrough.test.ts +3 -0
- package/src/__tests__/escapeStack.test.ts +93 -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/MAutocomplete.vue +5 -0
- package/src/components/MBottomSheet.vue +4 -1
- package/src/components/MButton.vue +15 -1
- 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/MContextMenu.vue +19 -60
- package/src/components/MDragDropList.vue +2 -0
- package/src/components/MIconButton.vue +40 -1
- package/src/components/MKanban.vue +2 -0
- package/src/components/MLightbox.vue +7 -2
- 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 +4 -15
- 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/MSpotlightSearch.vue +3 -2
- package/src/components/MTextField.vue +15 -2
- package/src/components/MTimeline.vue +370 -81
- package/src/components/MTooltip.vue +20 -152
- package/src/components/_MDrawerItemList.vue +25 -6
- package/src/composables/_mapStyle.ts +45 -0
- package/src/composables/_themeTransition.ts +2 -0
- package/src/composables/_tooltipTrigger.ts +184 -0
- package/src/composables/_useMenuNav.ts +209 -0
- package/src/composables/useAutoGrow.ts +78 -0
- package/src/composables/useLocale.ts +5 -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 +28 -1
- package/src/locales/de.ts +2 -0
- package/src/locales/es.ts +2 -0
- package/src/locales/fr.ts +2 -0
- package/src/locales/ja.ts +2 -0
- package/src/locales/ko.ts +2 -0
- package/src/locales/pt.ts +2 -0
- package/src/locales/zh.ts +2 -0
- package/src/map.ts +1 -1
- package/src/plugin.ts +34 -0
- package/src/styles/theme.css +63 -0
- package/dist/MMenuItem-BfjqwcYP.js +0 -830
- package/dist/MMenuItem-BfjqwcYP.js.map +0 -1
- package/dist/MSlider-JflHJ70q.js.map +0 -1
- package/dist/MTextField-NaIB6RbM.js +0 -673
- package/dist/MTextField-NaIB6RbM.js.map +0 -1
- package/dist/composables/_useThemeTokens.d.ts +0 -7
- package/dist/useLocale-CXibICQA.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.
|
|
@@ -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:
|
|
@@ -379,6 +379,7 @@ Props:
|
|
|
379
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)
|
|
380
380
|
- `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
|
|
381
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
|
|
382
383
|
|
|
383
384
|
Slots:
|
|
384
385
|
- `#default` — The button's label.
|
|
@@ -388,8 +389,8 @@ Slots:
|
|
|
388
389
|
A set of buttons that share selection state — standard (separated) or connected (joined into one pill), single or multi select, any value type.
|
|
389
390
|
|
|
390
391
|
Props:
|
|
391
|
-
- `modelValue:
|
|
392
|
-
- `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`.
|
|
393
394
|
- `variant?: "standard" | "connected" = "standard"` — Standard (separated) or connected (joined)
|
|
394
395
|
- `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Button size
|
|
395
396
|
- `multiSelect?: boolean = false` — Allow multiple selections
|
|
@@ -398,11 +399,11 @@ Props:
|
|
|
398
399
|
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
399
400
|
|
|
400
401
|
Events:
|
|
401
|
-
- `update:modelValue(
|
|
402
|
+
- `update:modelValue(M)` — Emitted on selection change — powers v-model
|
|
402
403
|
|
|
403
404
|
```ts
|
|
404
|
-
export interface ButtonGroupOption {
|
|
405
|
-
value:
|
|
405
|
+
export interface ButtonGroupOption<T = unknown> {
|
|
406
|
+
value: T
|
|
406
407
|
label?: string
|
|
407
408
|
icon?: string
|
|
408
409
|
disabled?: boolean
|
|
@@ -511,13 +512,14 @@ Slots:
|
|
|
511
512
|
|
|
512
513
|
Import from `@m3ui-vue/m3ui-vue/chart`.
|
|
513
514
|
|
|
514
|
-
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.
|
|
515
516
|
|
|
516
517
|
Props:
|
|
517
518
|
- `type: ChartType` — Chart type. Required — there is no default.
|
|
518
519
|
- `data: Record<string, any>` — Chart.js data object with labels and datasets. Required — there is no default.
|
|
519
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)
|
|
520
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
|
|
521
523
|
|
|
522
524
|
```ts
|
|
523
525
|
type ChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar'
|
|
@@ -592,7 +594,8 @@ A circular progress indicator — a smooth arc, or the M3 Expressive wavy ring t
|
|
|
592
594
|
Props:
|
|
593
595
|
- `value?: number` — Progress 0–100 (omit when indeterminate)
|
|
594
596
|
- `indeterminate?: boolean` — Spinning arc — no value needed. Identical for both variants.
|
|
595
|
-
- `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
|
|
596
599
|
- `variant?: "wavy" | "circle" = "wavy"` — wavy: animated bumpy ring that fades to circle near 0% and 100%; circle: smooth arc
|
|
597
600
|
- `label?: string` — Label text below the circle
|
|
598
601
|
- `size?: number` — Diameter in px — matches the real M3 WaveSize/Size tokens per variant
|
|
@@ -1324,6 +1327,8 @@ Props:
|
|
|
1324
1327
|
- `icon: string` — Material Symbol icon name
|
|
1325
1328
|
- `label?: string` — Accessible label (its aria-label; no visible tooltip: wrap it in MTooltip for one)
|
|
1326
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
|
|
1327
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)
|
|
1328
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
|
|
1329
1334
|
- `disabled?: boolean = false` — Disables interaction
|
|
@@ -1618,7 +1623,9 @@ Import from `@m3ui-vue/m3ui-vue/map`.
|
|
|
1618
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.
|
|
1619
1624
|
|
|
1620
1625
|
Props:
|
|
1621
|
-
- `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…)
|
|
1622
1629
|
- `center?: [number, number]` (v-model:center) — `[lng, lat]` (v-model). When left out, the style's (or the remembered view's)
|
|
1623
1630
|
- `zoom?: number` (v-model:zoom) — Zoom level (v-model)
|
|
1624
1631
|
- `bearing?: number` (v-model:bearing) — Rotation in degrees (v-model)
|
|
@@ -1645,6 +1652,7 @@ Slots:
|
|
|
1645
1652
|
|
|
1646
1653
|
Exposed (template ref):
|
|
1647
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
|
|
1648
1656
|
|
|
1649
1657
|
```ts
|
|
1650
1658
|
export type MapControlPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
|
|
@@ -1654,12 +1662,13 @@ export type MapControlPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bot
|
|
|
1654
1662
|
|
|
1655
1663
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
1656
1664
|
|
|
1657
|
-
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.
|
|
1658
1666
|
|
|
1659
1667
|
Props:
|
|
1660
1668
|
- `imageBase?: string = ""` — Prefix for the thumbnails' paths (e.g. `/images/`); full URLs are used as they are
|
|
1661
1669
|
- `none?: boolean = true` — Offer "no base layer"
|
|
1662
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
|
|
1663
1672
|
|
|
1664
1673
|
### MMapControl
|
|
1665
1674
|
|
|
@@ -1696,7 +1705,7 @@ Slots:
|
|
|
1696
1705
|
|
|
1697
1706
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
1698
1707
|
|
|
1699
|
-
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.
|
|
1700
1709
|
|
|
1701
1710
|
Props:
|
|
1702
1711
|
- `layer: string` — The layer's id
|
|
@@ -1704,6 +1713,7 @@ Props:
|
|
|
1704
1713
|
- `values?: (string | number)[]` — The values to offer (labels in `labels`); by default the ones found in the layer's loaded features
|
|
1705
1714
|
- `labels?: Record<string, string>` — Labels for the values, by value
|
|
1706
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
|
|
1707
1717
|
|
|
1708
1718
|
Events:
|
|
1709
1719
|
- `update:modelValue(values: (string | number)[])`
|
|
@@ -1771,11 +1781,12 @@ Exposed (template ref):
|
|
|
1771
1781
|
|
|
1772
1782
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
1773
1783
|
|
|
1774
|
-
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.
|
|
1775
1785
|
|
|
1776
1786
|
Props:
|
|
1777
1787
|
- `search?: boolean = true` — Show the search field
|
|
1778
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
|
|
1779
1790
|
|
|
1780
1791
|
Slots:
|
|
1781
1792
|
- `#actions { layer: MapLayerInfo; visible: boolean; }` — Extra actions in an expanded layer (scope: `{ layer, visible }`)
|
|
@@ -1966,6 +1977,7 @@ Events:
|
|
|
1966
1977
|
- `update:checked(boolean)` — Emitted on click when `checked` is set, with the new value — powers v-model:checked
|
|
1967
1978
|
|
|
1968
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
|
|
1969
1981
|
- `#default` — Item label text.
|
|
1970
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.
|
|
1971
1983
|
|
|
@@ -2068,9 +2080,12 @@ Props:
|
|
|
2068
2080
|
- `title?: string` — Drawer header title (ignored if the #header slot is used)
|
|
2069
2081
|
- `modal?: boolean = true` — Modal with a Teleported scrim overlay, or an inline sidebar that participates in normal layout flow
|
|
2070
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
|
|
2071
2084
|
- `width?: string` — Custom drawer width (e.g. "320px", "25rem"). Defaults to 22.5rem (360px)
|
|
2072
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.
|
|
2073
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
|
|
2074
2089
|
|
|
2075
2090
|
Events:
|
|
2076
2091
|
- `update:modelValue(boolean)` — Open/closed state for v-model
|
|
@@ -2202,15 +2217,18 @@ Events:
|
|
|
2202
2217
|
|
|
2203
2218
|
### MOverlay
|
|
2204
2219
|
|
|
2205
|
-
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.
|
|
2206
2221
|
|
|
2207
2222
|
Props:
|
|
2208
2223
|
- `modelValue?: boolean = true` (v-model) — Controls visibility (v-model)
|
|
2209
2224
|
- `scrim?: boolean = true` — Show dark backdrop
|
|
2210
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
|
|
2211
2229
|
|
|
2212
2230
|
Events:
|
|
2213
|
-
- `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
|
|
2214
2232
|
|
|
2215
2233
|
Slots:
|
|
2216
2234
|
- `#default` — Content shown over the scrim.
|
|
@@ -2279,7 +2297,8 @@ A linear progress indicator — determinate, indeterminate, or the M3 Expressive
|
|
|
2279
2297
|
Props:
|
|
2280
2298
|
- `value?: number` — Progress 0–100 (omit for indeterminate)
|
|
2281
2299
|
- `indeterminate?: boolean` — Indeterminate animation — also implied by omitting value
|
|
2282
|
-
- `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
|
|
2283
2302
|
- `variant?: "wavy" | "linear" = "linear"` — Bar style
|
|
2284
2303
|
- `label?: string` — Label text above the bar
|
|
2285
2304
|
- `thickness?: number` — Stroke width in px. Defaults to 4dp, matching the real M3 token for both variants.
|
|
@@ -2301,6 +2320,10 @@ Events:
|
|
|
2301
2320
|
Slots:
|
|
2302
2321
|
- `#default` — The scrollable content. A pull starts only when it's scrolled to the top; otherwise touch scrolls it normally
|
|
2303
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
|
+
|
|
2304
2327
|
### MQRCode
|
|
2305
2328
|
|
|
2306
2329
|
Import from `@m3ui-vue/m3ui-vue/qrcode`.
|
|
@@ -2429,7 +2452,8 @@ Props:
|
|
|
2429
2452
|
- `modelValue: string` (v-model) — HTML content (v-model)
|
|
2430
2453
|
- `placeholder?: string` — Placeholder text shown on an empty document
|
|
2431
2454
|
- `disabled?: boolean = false` — Disables editing
|
|
2432
|
-
- `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
|
|
2433
2457
|
- `labels?: RichTextEditorLabels` — Object with all toolbar/dialog label overrides for i18n (see `RichTextEditorLabels`) — defaults come from useLocale()
|
|
2434
2458
|
|
|
2435
2459
|
Events:
|
|
@@ -2588,6 +2612,34 @@ Slots:
|
|
|
2588
2612
|
- `#trailing` — Trailing content in both the collapsed bar and the expanded header (e.g. an avatar)
|
|
2589
2613
|
- `#default` — Results/suggestions content, shown below the input while expanded
|
|
2590
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
|
+
|
|
2591
2643
|
### MSection
|
|
2592
2644
|
|
|
2593
2645
|
A titled content section with optional subtitle, header actions, and divider.
|
|
@@ -2654,18 +2706,18 @@ export interface SeekBarChapter {
|
|
|
2654
2706
|
A row of joined segments for choosing between a small set of related options — single or multi select.
|
|
2655
2707
|
|
|
2656
2708
|
Props:
|
|
2657
|
-
- `modelValue:
|
|
2658
|
-
- `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`.
|
|
2659
2711
|
- `multiSelect?: boolean = false` — Allow multiple selections
|
|
2660
2712
|
- `density?: "default" | "compact" | "comfortable" = "default"` — Button density
|
|
2661
2713
|
- `color?: "primary" | "secondary" | "tertiary" = "primary"` — Selected segment color
|
|
2662
2714
|
|
|
2663
2715
|
Events:
|
|
2664
|
-
- `update:modelValue(
|
|
2716
|
+
- `update:modelValue(M)` — Emitted on selection change — powers v-model
|
|
2665
2717
|
|
|
2666
2718
|
```ts
|
|
2667
|
-
export interface SegmentedOption {
|
|
2668
|
-
value:
|
|
2719
|
+
export interface SegmentedOption<V extends string | number = string | number> {
|
|
2720
|
+
value: V
|
|
2669
2721
|
label: string
|
|
2670
2722
|
icon?: string
|
|
2671
2723
|
disabled?: boolean
|
|
@@ -2791,7 +2843,7 @@ Props:
|
|
|
2791
2843
|
- `width?: string = "w-80"` — Tailwind width class for the panel (capped at max-w-[90vw])
|
|
2792
2844
|
|
|
2793
2845
|
Events:
|
|
2794
|
-
- `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
|
|
2795
2847
|
|
|
2796
2848
|
Slots:
|
|
2797
2849
|
- `#header` — Replaces the default title text entirely — the close button stays
|
|
@@ -2846,6 +2898,7 @@ Exposed (template ref):
|
|
|
2846
2898
|
- `prev: () => void`
|
|
2847
2899
|
- `scrollToItem: (index: number) => void`
|
|
2848
2900
|
- `scrollToPage: (page: number) => void`
|
|
2901
|
+
- `focus: (options?: FocusOptions | undefined) => void | undefined` — Moves keyboard focus to the carousel, so the arrow keys move it
|
|
2849
2902
|
|
|
2850
2903
|
```ts
|
|
2851
2904
|
export interface SimpleCarouselItem {
|
|
@@ -2867,6 +2920,7 @@ Props:
|
|
|
2867
2920
|
- `height?: string` — CSS height (defaults to 14px for text, 40px for circular, 100px otherwise)
|
|
2868
2921
|
- `lines?: number = 1` — Number of text lines (text variant only) — the last line renders at 60% width
|
|
2869
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)
|
|
2870
2924
|
|
|
2871
2925
|
### MSlider
|
|
2872
2926
|
|
|
@@ -3308,7 +3362,9 @@ Props:
|
|
|
3308
3362
|
- `disabled?: boolean` — Disables the field
|
|
3309
3363
|
- `required?: boolean` — Marks as required — adds a red asterisk after the label
|
|
3310
3364
|
- `multiline?: boolean` — Renders a textarea instead of an input
|
|
3311
|
-
- `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
|
|
3312
3368
|
- `autocomplete?: string` — Passed through to the native autocomplete attribute
|
|
3313
3369
|
- `leadingIcon?: string` — Material Symbol shown before the input
|
|
3314
3370
|
- `clearable?: boolean = false` — Show a clear button when the field has a value
|
|
@@ -3324,24 +3380,58 @@ Slots:
|
|
|
3324
3380
|
|
|
3325
3381
|
### MTimeline
|
|
3326
3382
|
|
|
3327
|
-
|
|
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.
|
|
3328
3384
|
|
|
3329
3385
|
Props:
|
|
3330
|
-
- `items:
|
|
3386
|
+
- `items: T[]` — Array of timeline entries — required
|
|
3331
3387
|
- `dense?: boolean = false` — Compact spacing between items
|
|
3332
|
-
- `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)
|
|
3333
3406
|
|
|
3334
3407
|
```ts
|
|
3335
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;
|
|
3336
3411
|
title: string;
|
|
3337
3412
|
description?: string;
|
|
3338
3413
|
date?: string;
|
|
3339
3414
|
icon?: string;
|
|
3340
3415
|
color?: "primary" | "secondary" | "tertiary" | "error" | "success";
|
|
3416
|
+
/** Any CSS color for the dot (and its line), over `color` */
|
|
3341
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;
|
|
3342
3428
|
}
|
|
3343
3429
|
```
|
|
3344
3430
|
|
|
3431
|
+
```ts
|
|
3432
|
+
export type TimelineStatus = NonNullable<TimelineItem["status"]>;
|
|
3433
|
+
```
|
|
3434
|
+
|
|
3345
3435
|
### MTimePicker
|
|
3346
3436
|
|
|
3347
3437
|
An inline, dropdown-anchored hour/minute picker with 12h/24h format support.
|
|
@@ -3703,10 +3793,10 @@ Exposed (template ref):
|
|
|
3703
3793
|
|
|
3704
3794
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
3705
3795
|
|
|
3706
|
-
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) ```
|
|
3707
3797
|
|
|
3708
3798
|
```ts
|
|
3709
|
-
useMap(): {
|
|
3799
|
+
useMap(source?: MaybeRefOrGetter<MapSource>): {
|
|
3710
3800
|
map: ComputedRef<Map$1 | undefined>
|
|
3711
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>
|
|
3712
3802
|
styleVersion: ComputedRef<number>
|
|
@@ -3721,10 +3811,10 @@ useMap(): {
|
|
|
3721
3811
|
|
|
3722
3812
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
3723
3813
|
|
|
3724
|
-
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`.
|
|
3725
3815
|
|
|
3726
3816
|
```ts
|
|
3727
|
-
useMapLayers(): {
|
|
3817
|
+
useMapLayers(source?: MaybeRefOrGetter<MapSource>): {
|
|
3728
3818
|
model: ComputedRef<MapLayerModel | undefined>
|
|
3729
3819
|
layers: ComputedRef<MapLayerInfo[]>
|
|
3730
3820
|
isVisible: (id: string) => boolean
|
|
@@ -3795,10 +3885,10 @@ fieldLabel(key: string, format?: MapFieldFormat): string
|
|
|
3795
3885
|
|
|
3796
3886
|
Import from `@m3ui-vue/m3ui-vue/map`.
|
|
3797
3887
|
|
|
3798
|
-
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`.
|
|
3799
3889
|
|
|
3800
3890
|
```ts
|
|
3801
|
-
useMapFilter(): {
|
|
3891
|
+
useMapFilter(source?: MaybeRefOrGetter<MapSource>): {
|
|
3802
3892
|
setFilter: (layerId: string, filter: Maplibre.FilterSpecification | null) => void
|
|
3803
3893
|
valuesOf: (layerId: string, property: string) => (string | number)[]
|
|
3804
3894
|
}
|
|
@@ -3904,6 +3994,22 @@ A script to inline in `<head>` of a server-rendered page (Nuxt, Vite SSR), so da
|
|
|
3904
3994
|
themeInitScript(options: ThemeInitOptions = {}): string
|
|
3905
3995
|
```
|
|
3906
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
|
+
|
|
3907
4013
|
### generateScheme
|
|
3908
4014
|
|
|
3909
4015
|
Generates the light and dark schemes for a seed color (`#rrggbb`).
|
|
@@ -3991,6 +4097,34 @@ useDevice(): {
|
|
|
3991
4097
|
}
|
|
3992
4098
|
```
|
|
3993
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
|
+
|
|
3994
4128
|
### useWindowSizeClass
|
|
3995
4129
|
|
|
3996
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).
|
|
@@ -4099,6 +4233,78 @@ The M3 press ripple for any element: `<div v-ripple>`, `v-ripple="false"`, `v-ri
|
|
|
4099
4233
|
vRipple: Directive<HTMLElement, RippleValue>
|
|
4100
4234
|
```
|
|
4101
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
|
+
|
|
4102
4308
|
### emojiCategories
|
|
4103
4309
|
|
|
4104
4310
|
```ts
|
|
@@ -4164,6 +4370,14 @@ export interface MapContext {
|
|
|
4164
4370
|
}
|
|
4165
4371
|
```
|
|
4166
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
|
+
|
|
4167
4381
|
```ts
|
|
4168
4382
|
/** The `maplibre-gl` module (its classes: `Map`, `Marker`, `Popup`…) */
|
|
4169
4383
|
export type MaplibreModule = typeof import('maplibre-gl')
|
|
@@ -4474,6 +4688,19 @@ export interface ThemeInitOptions {
|
|
|
4474
4688
|
}
|
|
4475
4689
|
```
|
|
4476
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
|
+
|
|
4477
4704
|
```ts
|
|
4478
4705
|
// Dynamic color: a full M3 color scheme (light and dark) generated from one seed color with Google's
|
|
4479
4706
|
// material-color-utilities (HCT, DynamicScheme). The package is loaded with a dynamic import, so apps that
|
|
@@ -4783,9 +5010,65 @@ export interface M3Locale {
|
|
|
4783
5010
|
mapDeleteMeasurement: string
|
|
4784
5011
|
mapTotal: string
|
|
4785
5012
|
mapSearchPlaces: string
|
|
5013
|
+
/** MTimeline's button past `limit`; `{count}` is how many entries are hidden */
|
|
5014
|
+
timelineShowMore: string
|
|
5015
|
+
timelineShowLess: string
|
|
5016
|
+
}
|
|
5017
|
+
```
|
|
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>
|
|
4786
5030
|
}
|
|
4787
5031
|
```
|
|
4788
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
|
+
|
|
4789
5072
|
```ts
|
|
4790
5073
|
/*
|
|
4791
5074
|
* M3 window size classes, with the breakpoints from androidx `WindowSizeClass`
|
|
@@ -4867,6 +5150,200 @@ export interface RippleOptions {
|
|
|
4867
5150
|
export type RippleValue = boolean | string | RippleOptions | null | undefined
|
|
4868
5151
|
```
|
|
4869
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
|
+
|
|
4870
5347
|
```ts
|
|
4871
5348
|
// Generated by scripts/generate-emoji-data.mjs from Unicode emoji-test.txt (Emoji 15). Don't edit by hand.
|
|
4872
5349
|
// Emoji data © Unicode, Inc., under the Unicode License v3 (dist/THIRD_PARTY_LICENSES.md, scripts/licenses/unicode-license-v3.txt).
|
|
@@ -4885,7 +5362,7 @@ export interface EmojiCategory {
|
|
|
4885
5362
|
`M3Locale` keys (pass a partial object to `createM3UI({ locale })`; presets from `@m3ui-vue/m3ui-vue/locales`:
|
|
4886
5363
|
`esLocale`, `frLocale`, `ptLocale`, `deLocale`, `jaLocale`, `zhLocale`, `koLocale`):
|
|
4887
5364
|
|
|
4888
|
-
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
|
|
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
|
|
4889
5366
|
|
|
4890
5367
|
## Theme tokens
|
|
4891
5368
|
|