@m3ui-vue/m3ui-vue 0.9.2 → 1.0.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 +26 -29
- package/dist/API.md +242 -22
- package/dist/{MIcon-CaEooCmZ.js → MIcon-DLOkQduI.js} +10 -3
- package/dist/MIcon-DLOkQduI.js.map +1 -0
- package/dist/{MTextField-Ck0oWDMk.js → MTextField-TZ7lfr09.js} +551 -216
- package/dist/MTextField-TZ7lfr09.js.map +1 -0
- package/dist/THIRD_PARTY_LICENSES.md +547 -0
- package/dist/api.json +1 -1
- package/dist/code-editor.js +2 -2
- package/dist/components/MAppBarWithSearch.vue.d.ts +70 -0
- package/dist/components/MBottomAppBar.vue.d.ts +37 -0
- package/dist/components/MBottomSheetScaffold.vue.d.ts +40 -0
- package/dist/components/MButton.vue.d.ts +4 -2
- package/dist/components/MButtonGroup.vue.d.ts +2 -0
- package/dist/components/MChatBubble.vue.d.ts +1 -1
- package/dist/components/MChip.vue.d.ts +19 -2
- package/dist/components/MContainer.vue.d.ts +1 -1
- package/dist/components/MDataTable.vue.d.ts +1 -1
- package/dist/components/MDialog.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +15 -4
- package/dist/components/MIcon.vue.d.ts +3 -0
- package/dist/components/MIconButton.vue.d.ts +15 -1
- package/dist/components/MListItem.vue.d.ts +2 -2
- package/dist/components/MLoadingOverlay.vue.d.ts +1 -1
- package/dist/components/MMenuItem.vue.d.ts +17 -4
- package/dist/components/MNavigationRail.vue.d.ts +6 -0
- package/dist/components/MSearchBar.vue.d.ts +5 -3
- package/dist/components/MShortNavigationBar.vue.d.ts +1 -1
- package/dist/components/MSplitButton.vue.d.ts +2 -0
- package/dist/components/MTable.vue.d.ts +1 -1
- package/dist/components/MTabs.vue.d.ts +6 -0
- package/dist/components/MTimePickerModal.vue.d.ts +3 -0
- package/dist/components/MTimeScroll.vue.d.ts +22 -0
- package/dist/components/MToggleButton.vue.d.ts +2 -0
- package/dist/components/MTopAppBar.vue.d.ts +33 -2
- package/dist/components/MTree.vue.d.ts +2 -2
- package/dist/components/_MDrawerItemList.vue.d.ts +3 -0
- package/dist/composables/_searchAppBar.d.ts +6 -0
- package/dist/composables/_themeTransition.d.ts +2 -0
- package/dist/composables/_useSpring.d.ts +5 -5
- package/dist/composables/motion.d.ts +101 -0
- package/dist/composables/useColorPalette.d.ts +10 -0
- package/dist/composables/useLocale.d.ts +9 -0
- package/dist/directives/vRipple.d.ts +16 -0
- package/dist/emoji-names-de-BphO5XpV.js.map +1 -1
- package/dist/emoji-names-en-9ZvMRvzi.js.map +1 -1
- package/dist/emoji-names-es-DvfWU3Pj.js.map +1 -1
- package/dist/emoji-names-fr-B-jhUlsP.js.map +1 -1
- package/dist/emoji-names-ja-l8cMFJo1.js.map +1 -1
- package/dist/emoji-names-ko-YP-o9G0c.js.map +1 -1
- package/dist/emoji-names-pt-DGj_Js4M.js.map +1 -1
- package/dist/emoji-names-zh-Dzecwtw_.js.map +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/locales/index.js +63 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +7716 -6768
- package/dist/m3ui.js.map +1 -1
- package/dist/plugin.d.ts +7 -0
- package/dist/rich-text-editor.js +22 -22
- package/dist/styles/palettes-contrast.css +7764 -0
- package/dist/styles/theme.css +59 -2
- package/dist/styles.css +1 -1
- package/dist/terminal.js +1 -1
- package/dist/{useLocale-CFW8cIzL.js → useLocale-CuvWRZ1h.js} +10 -1
- package/dist/useLocale-CuvWRZ1h.js.map +1 -0
- package/package.json +4 -2
- package/src/__tests__/MAppBarWithSearch.test.ts +96 -0
- package/src/__tests__/MBottomAppBar.test.ts +71 -0
- package/src/__tests__/MBottomSheetScaffold.test.ts +101 -0
- package/src/__tests__/MChip.test.ts +63 -0
- package/src/__tests__/MFab.test.ts +36 -0
- package/src/__tests__/MIconButton.test.ts +60 -0
- package/src/__tests__/MMenuItem.test.ts +84 -0
- package/src/__tests__/MNavigationRail.test.ts +77 -0
- package/src/__tests__/MScrollField.test.ts +28 -0
- package/src/__tests__/MTabs.test.ts +39 -0
- package/src/__tests__/MTimePickerModal.test.ts +52 -0
- package/src/__tests__/MTimeScroll.test.ts +44 -0
- package/src/__tests__/MTopAppBar.test.ts +99 -0
- package/src/__tests__/contrast.test.ts +64 -0
- package/src/__tests__/dynamicColor.test.ts +17 -0
- package/src/__tests__/motion.test.ts +37 -0
- package/src/__tests__/themeTransition.test.ts +119 -0
- package/src/__tests__/vRipple.test.ts +92 -0
- package/src/components/MAppBarWithSearch.vue +236 -0
- package/src/components/MBottomAppBar.vue +181 -0
- package/src/components/MBottomSheetScaffold.vue +296 -0
- package/src/components/MBreadcrumbs.vue +1 -1
- package/src/components/MButton.vue +4 -13
- package/src/components/MButtonGroup.vue +4 -11
- package/src/components/MChip.vue +137 -5
- package/src/components/MFab.vue +81 -27
- package/src/components/MIcon.vue +4 -2
- package/src/components/MIconButton.vue +96 -24
- package/src/components/MMenuItem.vue +115 -13
- package/src/components/MNavigationDrawer.vue +2 -2
- package/src/components/MNavigationRail.vue +135 -8
- package/src/components/MScrollField.vue +10 -2
- package/src/components/MSearchBar.vue +28 -12
- package/src/components/MSplitButton.vue +5 -12
- package/src/components/MTabs.vue +16 -5
- package/src/components/MTimePickerModal.vue +48 -8
- package/src/components/MTimeScroll.vue +161 -0
- package/src/components/MToggleButton.vue +5 -12
- package/src/components/MTopAppBar.vue +252 -28
- package/src/composables/_carouselStrategy.ts +3 -0
- package/src/composables/_searchAppBar.ts +9 -0
- package/src/composables/_themeColor.ts +11 -4
- package/src/composables/_themeTransition.ts +71 -0
- package/src/composables/_useSpring.ts +12 -20
- package/src/composables/motion.ts +73 -0
- package/src/composables/useColorPalette.ts +103 -20
- package/src/composables/useLocale.ts +18 -0
- package/src/composables/useTheme.ts +4 -12
- package/src/data/emoji-names/emoji-names-de.ts +1 -0
- package/src/data/emoji-names/emoji-names-en.ts +1 -0
- package/src/data/emoji-names/emoji-names-es.ts +1 -0
- package/src/data/emoji-names/emoji-names-fr.ts +1 -0
- package/src/data/emoji-names/emoji-names-ja.ts +1 -0
- package/src/data/emoji-names/emoji-names-ko.ts +1 -0
- package/src/data/emoji-names/emoji-names-pt.ts +1 -0
- package/src/data/emoji-names/emoji-names-zh.ts +1 -0
- package/src/data/emojis.ts +1 -0
- package/src/directives/vRipple.ts +73 -0
- package/src/index.ts +13 -1
- package/src/locales/de.ts +9 -0
- package/src/locales/es.ts +9 -0
- package/src/locales/fr.ts +9 -0
- package/src/locales/ja.ts +9 -0
- package/src/locales/ko.ts +9 -0
- package/src/locales/pt.ts +9 -0
- package/src/locales/zh.ts +9 -0
- package/src/plugin.ts +11 -1
- package/src/styles/palettes-contrast.css +7764 -0
- package/src/styles/theme.css +59 -2
- package/dist/MIcon-CaEooCmZ.js.map +0 -1
- package/dist/MTextField-Ck0oWDMk.js.map +0 -1
- package/dist/useLocale-CFW8cIzL.js.map +0 -1
package/dist/API.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @m3ui-vue/m3ui-vue 0.
|
|
1
|
+
# @m3ui-vue/m3ui-vue 1.0.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.
|
|
@@ -10,6 +10,7 @@ Material Design 3 components for Vue 3 + Tailwind CSS v4. Generated from the sou
|
|
|
10
10
|
@import 'tailwindcss';
|
|
11
11
|
@import '@m3ui-vue/m3ui-vue/theme';
|
|
12
12
|
@import '@m3ui-vue/m3ui-vue/palettes';
|
|
13
|
+
@import '@m3ui-vue/m3ui-vue/palettes-contrast'; /* optional: medium and high contrast */
|
|
13
14
|
@import '@m3ui-vue/m3ui-vue/styles';
|
|
14
15
|
```
|
|
15
16
|
|
|
@@ -25,7 +26,9 @@ app.use(createM3UI({ palette: 'blue', locale: esLocale }))
|
|
|
25
26
|
- Import components by name: `import { MButton, MDialog } from '@m3ui-vue/m3ui-vue'`. Components with heavy optional peer
|
|
26
27
|
dependencies live in their own entry points (noted on each one): `@m3ui-vue/m3ui-vue/chart`, `@m3ui-vue/m3ui-vue/code-editor`, `@m3ui-vue/m3ui-vue/markdown`, `@m3ui-vue/m3ui-vue/rich-text-editor`, `@m3ui-vue/m3ui-vue/terminal`, `@m3ui-vue/m3ui-vue/qrcode`, `@m3ui-vue/m3ui-vue/barcode`.
|
|
27
28
|
- Dark mode is the `dark` class on `<html>` (`useTheme()` manages it); palettes are `data-palette="<id>"` on `<html>`
|
|
28
|
-
(`useColorPalette()`)
|
|
29
|
+
(`useColorPalette()`, or a scheme generated from any color with `setSeed()` / `createM3UI({ seed })`); contrast levels
|
|
30
|
+
are `data-contrast="medium|high"` (`setContrast()` / `createM3UI({ contrast })`, needs the `palettes-contrast` import).
|
|
31
|
+
- `createM3UI()` also registers the `v-ripple` directive globally (or import `vRipple`).
|
|
29
32
|
- Style your own markup with the M3 tokens as Tailwind utilities: `bg-surface-container`, `text-on-surface-variant`,
|
|
30
33
|
`text-title-medium`, `rounded-lg`, `shadow-elevation-2`.
|
|
31
34
|
- Two-way props are `v-model` (`modelValue`) or `v-model:<name>`, marked "(v-model)" below.
|
|
@@ -90,6 +93,37 @@ Slots:
|
|
|
90
93
|
- `#default` — Main content (title text)
|
|
91
94
|
- `#trailing` — Trailing action buttons
|
|
92
95
|
|
|
96
|
+
### MAppBarWithSearch
|
|
97
|
+
|
|
98
|
+
A top app bar whose title is a search bar (a port of Compose's `AppBarWithSearch`, and with `transparent` its `TopSearchBar`): a navigation icon, the search bar and actions in one 64px row. The search bar expands like MSearchBar (full screen by default). It can darken as content scrolls under it, and hide while scrolling down.
|
|
99
|
+
|
|
100
|
+
Props:
|
|
101
|
+
- `modelValue?: string = ""` (v-model) — Search query (v-model)
|
|
102
|
+
- `expanded?: boolean` (v-model:expanded) — Whether the search is expanded (v-model:expanded)
|
|
103
|
+
- `placeholder?: string` — Defaults to the locale's "Search..."
|
|
104
|
+
- `searchVariant?: "fullscreen" | "fullscreen-contained" | "docked" = "fullscreen"` — How the search expands: full screen (default), full screen keeping the pill input, or a docked panel
|
|
105
|
+
- `leadingIcon?: string = "search"` — Icon shown in the collapsed search bar
|
|
106
|
+
- `loading?: boolean = false` — Shows a spinner in the expanded header instead of the clear button
|
|
107
|
+
- `clearable?: boolean = true` — Shows a clear (×) button once there is a query
|
|
108
|
+
- `navigationIcon?: string` — Leading icon outside the search bar (e.g. menu, arrow_back)
|
|
109
|
+
- `navigationLabel?: string` — Accessible label for the navigation icon button; defaults to the locale's "Menu"
|
|
110
|
+
- `transparent?: boolean = false` — No app bar container, only the search bar (Compose's TopSearchBar)
|
|
111
|
+
- `scrollBehavior?: "pinned" | "enter-always"` — How the bar reacts to `scrollTarget` scrolling: `pinned` stays and changes color once content is under it; `enter-always` also hides while scrolling down and comes back on any scroll up. With `enter-always` the bar is sticky over the content: put it at the top of the scrolling element (or of the page)
|
|
112
|
+
- `scrollTarget?: string | HTMLElement | null = null` — What `scrollBehavior` follows: an element or a CSS selector for it. Defaults to the window
|
|
113
|
+
|
|
114
|
+
Events:
|
|
115
|
+
- `search(string)` — Emitted when Enter is pressed in the input, with the current query
|
|
116
|
+
- `update:modelValue(string)` — Emitted on every input change — powers v-model
|
|
117
|
+
- `update:expanded(boolean)` — Emitted when the search expands or collapses — powers v-model:expanded
|
|
118
|
+
- `navigation()` — Emitted when the default navigation icon button is clicked
|
|
119
|
+
|
|
120
|
+
Slots:
|
|
121
|
+
- `#navigation` — Custom leading area (default: an MIconButton built from the navigationIcon prop)
|
|
122
|
+
- `#leading` — Overrides the search bar's leading icon
|
|
123
|
+
- `#trailing` — Trailing content inside the search bar (e.g. an avatar)
|
|
124
|
+
- `#default` — Results/suggestions, shown below the input while the search is expanded
|
|
125
|
+
- `#actions` — Trailing action buttons
|
|
126
|
+
|
|
93
127
|
### MAppLayout
|
|
94
128
|
|
|
95
129
|
Full app shell — drawer, header, content, footer, and fab slots.
|
|
@@ -222,6 +256,21 @@ Props:
|
|
|
222
256
|
Slots:
|
|
223
257
|
- `#error` — Shown instead of the SVG when value is invalid for the given format (e.g. a non-numeric EAN13)
|
|
224
258
|
|
|
259
|
+
### MBottomAppBar
|
|
260
|
+
|
|
261
|
+
M3's bottom app bar (a port of Compose's `BottomAppBar`): navigation and key actions at the bottom of small screens, with an optional FAB at the end. With `flexible` it's M3 Expressive's `FlexibleBottomAppBar`, a shorter bar whose actions spread across it. With `scrollBehavior="exit-always"` it collapses as the content scrolls down and comes back as it scrolls up.
|
|
262
|
+
|
|
263
|
+
Props:
|
|
264
|
+
- `flexible?: boolean = false` — M3 Expressive's FlexibleBottomAppBar: 64px instead of 80px, 16px side padding, no FAB slot
|
|
265
|
+
- `arrangement?: "start" | "between" | "around" | "evenly" | "fixed"` — How the actions are spread: `start` (the standard bar's), `between` (the flexible bar's default), `around`, `evenly`, or `fixed` (centered, 32px apart: FlexibleFixedHorizontalArrangement)
|
|
266
|
+
- `color?: "surface" | "primary" | "secondary" | "tertiary" = "surface"` — Container color: surface-container, or a color's container for a vibrant bar
|
|
267
|
+
- `scrollBehavior?: "pinned" | "exit-always" = "pinned"` — `pinned` stays put; `exit-always` collapses while the content scrolls down and returns when it scrolls up
|
|
268
|
+
- `scrollTarget?: string | HTMLElement | null = null` — What `exit-always` follows: an element or a CSS selector for it. Defaults to the window
|
|
269
|
+
|
|
270
|
+
Slots:
|
|
271
|
+
- `#default` — The actions, usually MIconButtons
|
|
272
|
+
- `#fab` — A FAB at the end of the standard bar; an MFab here turns secondary and drops its shadow, as M3's bottom app bar FAB (`bottomAppBarFabColor`, `bottomAppBarFabElevation`)
|
|
273
|
+
|
|
225
274
|
### MBottomSheet
|
|
226
275
|
|
|
227
276
|
A sheet that slides up from the bottom of the screen, capped at a 640px max width and rounded top corners. Supports drag-to-dismiss via the handle bar, or tapping the scrim.
|
|
@@ -238,6 +287,29 @@ Slots:
|
|
|
238
287
|
- `#default` — Sheet body content (scrollable)
|
|
239
288
|
- `#actions` — Footer action buttons, shown in a bordered strip below the content
|
|
240
289
|
|
|
290
|
+
### MBottomSheetScaffold
|
|
291
|
+
|
|
292
|
+
A screen with M3's standard (non-modal) bottom sheet, a port of Compose's `BottomSheetScaffold`: the sheet sits over the bottom of the content without a scrim, peeking out when partially expanded, and the content stays usable. Drag it (or its content, which scrolls once the sheet is fully expanded) between its states, or tap the handle. For a sheet that blocks the screen behind a scrim, use MBottomSheet.
|
|
293
|
+
|
|
294
|
+
Props:
|
|
295
|
+
- `modelValue?: BottomSheetValue = "partial"` (v-model) — The sheet's state (v-model): `partial` shows `peekHeight` of it, `expanded` all of it, `hidden` none
|
|
296
|
+
- `peekHeight?: number = 56` — Height in px the partially expanded sheet shows (BottomSheetDefaults.SheetPeekHeight)
|
|
297
|
+
- `skipHiddenState?: boolean = true` — Leaves out the hidden state, so the sheet can't be swiped away (Compose's default for this sheet)
|
|
298
|
+
- `swipeEnabled?: boolean = true` — Lets the sheet be dragged; with false it only moves through v-model and the handle
|
|
299
|
+
- `maxWidth?: number = 640` — Maximum width in px; the sheet is centered when the screen is wider
|
|
300
|
+
|
|
301
|
+
Events:
|
|
302
|
+
- `update:modelValue(BottomSheetValue)` — Emitted when the sheet settles in another state after a drag or a handle tap — powers v-model
|
|
303
|
+
|
|
304
|
+
Slots:
|
|
305
|
+
- `#top-bar` — An app bar above the content (the sheet can rise over it)
|
|
306
|
+
- `#default` — The screen's content; it gets bottom padding equal to `peekHeight` so nothing hides under the peeking sheet
|
|
307
|
+
- `#sheet` — The sheet's content, below the drag handle
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
export type BottomSheetValue = 'hidden' | 'partial' | 'expanded'
|
|
311
|
+
```
|
|
312
|
+
|
|
241
313
|
### MBox
|
|
242
314
|
|
|
243
315
|
Generic surface box with padding, radius, elevation, and border — a building block for ad-hoc layout that doesn't warrant a dedicated component.
|
|
@@ -288,6 +360,7 @@ Props:
|
|
|
288
360
|
- `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
|
|
289
361
|
- `shape?: "rounded" | "squared" = "rounded"` — Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md, 28px lg/xl)
|
|
290
362
|
- `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
|
|
363
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
291
364
|
|
|
292
365
|
Slots:
|
|
293
366
|
- `#default` — The button's label.
|
|
@@ -304,6 +377,7 @@ Props:
|
|
|
304
377
|
- `multiSelect?: boolean = false` — Allow multiple selections
|
|
305
378
|
- `selectionRequired?: boolean = false` — At least one must be selected
|
|
306
379
|
- `color?: "primary" | "secondary" | "tertiary" = "primary"` — Selected button color
|
|
380
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
307
381
|
|
|
308
382
|
Events:
|
|
309
383
|
- `update:modelValue(unknown)` — Emitted on selection change — powers v-model
|
|
@@ -471,21 +545,26 @@ Slots:
|
|
|
471
545
|
|
|
472
546
|
### MChip
|
|
473
547
|
|
|
474
|
-
Compact elements for filters, input, or actions — named semantic tones or any CSS color, with optional icon, click, selection, and removal support.
|
|
548
|
+
Compact elements for filters, input, or actions — named semantic tones or any CSS color, with optional icon, click, selection, and removal support. With `type` it's one of M3's four chips instead (assist, filter, input, suggestion), styled by the spec and always interactive; `tone` then doesn't apply.
|
|
475
549
|
|
|
476
550
|
Props:
|
|
477
551
|
- `tone?: string = "neutral"` — Color tone or any CSS color string
|
|
478
|
-
- `selected?: boolean = false` — Selected/active state — the chip's shape morphs from a rounded rect to a full pill when selected
|
|
552
|
+
- `selected?: boolean = false` (v-model:selected) — Selected/active state — the chip's shape morphs from a rounded rect to a full pill when selected
|
|
479
553
|
- `removable?: boolean = false` — Show a remove (X) button
|
|
480
554
|
- `clickable?: boolean = false` — Makes the chip an interactive `<button>` with hover/press/focus feedback (otherwise renders as a plain `<span>`)
|
|
481
555
|
- `disabled?: boolean = false` — Disables interaction
|
|
482
556
|
- `icon?: string` — Leading Material Symbol icon
|
|
557
|
+
- `type?: "filter" | "assist" | "input" | "suggestion"` — One of M3's chips: `assist` (an action), `filter` (on/off, v-model:selected; a check slides in while selected), `input` (a piece of user input, with an optional #avatar and `removable`), `suggestion`. Leave unset for the generic tone-colored chip
|
|
558
|
+
- `elevated?: boolean = false` — Typed assist, filter and suggestion chips: surface-container-low with elevation 1 instead of an outline
|
|
559
|
+
- `trailingIcon?: string` — Typed chips: a trailing Material Symbol icon (e.g. arrow_drop_down on a filter chip that opens a menu)
|
|
483
560
|
|
|
484
561
|
Events:
|
|
485
|
-
- `click()` — Emitted when a clickable, non-disabled chip is clicked
|
|
562
|
+
- `click()` — Emitted when a clickable (or typed), non-disabled chip is clicked
|
|
486
563
|
- `remove()` — Emitted when the remove (X) button is clicked (removable only)
|
|
564
|
+
- `update:selected(boolean)` — Filter and input chips: emitted on click with the new selected state — powers v-model:selected
|
|
487
565
|
|
|
488
566
|
Slots:
|
|
567
|
+
- `#avatar` — Input chips only: a 24px round avatar before the label (e.g. an MAvatar or an img)
|
|
489
568
|
- `#default` — The chip's label.
|
|
490
569
|
|
|
491
570
|
### MCircleProgressBar
|
|
@@ -999,8 +1078,9 @@ A Floating Action Button for the primary action of a screen. Supports extended (
|
|
|
999
1078
|
Props:
|
|
1000
1079
|
- `icon: string` — Material Symbol icon name
|
|
1001
1080
|
- `label?: string` — Extended FAB label text
|
|
1002
|
-
- `
|
|
1003
|
-
- `
|
|
1081
|
+
- `expanded?: boolean = true` — Extended FAB only: false collapses it to a plain FAB (the label fades out and the width shrinks to a square), e.g. while the content scrolls. Compose's `expanded`
|
|
1082
|
+
- `color?: "surface" | "primary" | "secondary" | "tertiary"` — Color scheme; defaults to primary, or secondary inside an MBottomAppBar
|
|
1083
|
+
- `size?: "medium" | "small" | "large" | "regular" = "regular"` — FAB size. With a `label`, small/medium/large are M3 Expressive's extended FABs (56/80/96px, title-medium, title-large and headline-small labels); regular is the baseline extended FAB
|
|
1004
1084
|
- `disabled?: boolean = false` — Disables interaction
|
|
1005
1085
|
- `items?: SpeedDialItem[]` — Speed-dial child items (see `SpeedDialItem`)
|
|
1006
1086
|
- `direction?: "right" | "left" | "up" | "down" | "radial" = "up"` — Speed-dial expand direction
|
|
@@ -1009,6 +1089,7 @@ Props:
|
|
|
1009
1089
|
- `align?: "start" | "end" = "start"` — For the `up`/`down` #content panel only: which edge it anchors to when it's wider than the FAB itself. 'start' (default) keeps its left edge aligned with the FAB's left edge (existing behavior); 'end' aligns the right edges instead, which keeps a wide panel from running off-screen when the FAB sits in the bottom-right corner, a common placement.
|
|
1010
1090
|
- `scrim?: boolean = false` — Dims the rest of the screen behind the #content panel while open (has no effect on the `items` speed dial). A plain sibling with its own fade transition, independent of the panel's enter/leave transform, so it doesn't visually shrink/lag along with it.
|
|
1011
1091
|
- `contentTransition?: "none" | "scale" | "fade" = "scale"` — How the #content panel itself animates open/closed. 'scale' (default) is the original fade+scale. 'fade' drops the scale — use this when the slot content already animates its own entrance (e.g. a staggered per-item reveal), so the panel doesn't *also* scale as a group on top of that; it still gives Vue a real transition to wait for on close, so the content's own leave animation has time to play instead of just vanishing. 'none' skips any panel-level transition entirely.
|
|
1092
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the FAB's content color
|
|
1012
1093
|
|
|
1013
1094
|
Events:
|
|
1014
1095
|
- `click(MouseEvent)` — Emitted when the FAB itself is clicked (not a speed-dial item)
|
|
@@ -1118,7 +1199,7 @@ A thin, prop-driven wrapper around CSS flexbox — direction, alignment, justifi
|
|
|
1118
1199
|
Props:
|
|
1119
1200
|
- `direction?: "row" | "column" | "row-reverse" | "column-reverse" = "row"` — Flex direction
|
|
1120
1201
|
- `align?: "center" | "start" | "end" | "stretch" | "baseline" = "stretch"` — Cross-axis alignment (align-items)
|
|
1121
|
-
- `justify?: "center" | "start" | "
|
|
1202
|
+
- `justify?: "center" | "start" | "between" | "around" | "evenly" | "end" = "start"` — Main-axis alignment (justify-content)
|
|
1122
1203
|
- `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "none"` — Gap between items
|
|
1123
1204
|
- `wrap?: boolean = false` — Allow items to wrap
|
|
1124
1205
|
- `inline?: boolean = false` — Use inline-flex instead of flex
|
|
@@ -1192,10 +1273,11 @@ Renders a Material Symbols Outlined glyph by name. Color follows the surrounding
|
|
|
1192
1273
|
Props:
|
|
1193
1274
|
- `name: string` — Material Symbol name (e.g. "settings", "favorite")
|
|
1194
1275
|
- `size?: number = 24` — Icon size in px
|
|
1276
|
+
- `filled?: boolean = false` — Filled glyph (the Material Symbols FILL axis), as M3 draws a selected icon
|
|
1195
1277
|
|
|
1196
1278
|
### MIconButton
|
|
1197
1279
|
|
|
1198
|
-
A button that shows only an icon — four visual styles, the same 5-tier expressive sizing as MButton.
|
|
1280
|
+
A button that shows only an icon — four visual styles, the same 5-tier expressive sizing as MButton. Give it `checked` (v-model:checked) and it becomes M3's icon toggle button.
|
|
1199
1281
|
|
|
1200
1282
|
Props:
|
|
1201
1283
|
- `icon: string` — Material Symbol icon name
|
|
@@ -1205,6 +1287,12 @@ Props:
|
|
|
1205
1287
|
- `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
|
|
1206
1288
|
- `disabled?: boolean = false` — Disables interaction
|
|
1207
1289
|
- `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
|
|
1290
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
1291
|
+
- `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
|
|
1292
|
+
- `checkedIcon?: string` — Icon shown while checked, when it differs from `icon` (e.g. 'pause' for 'play_arrow')
|
|
1293
|
+
|
|
1294
|
+
Events:
|
|
1295
|
+
- `update:checked(boolean)` — Emitted on click when `checked` is set — powers v-model:checked
|
|
1208
1296
|
|
|
1209
1297
|
### MInfiniteScroll
|
|
1210
1298
|
|
|
@@ -1415,9 +1503,9 @@ Props:
|
|
|
1415
1503
|
- `expanded?: boolean` (v-model:expanded) — Control the expanded state (v-model:expanded) — otherwise managed internally
|
|
1416
1504
|
|
|
1417
1505
|
Events:
|
|
1506
|
+
- `update:expanded(value: boolean)` — Fires when an expandable item is toggled open/closed
|
|
1418
1507
|
- `click(e: MouseEvent)` — Fires on any click, including on an expandable item (right before it toggles)
|
|
1419
1508
|
- `update:trailingValue(value: boolean)` — Fires when a trailing switch/checkbox is toggled (trailing='switch' | 'checkbox')
|
|
1420
|
-
- `update:expanded(value: boolean)` — Fires when an expandable item is toggled open/closed
|
|
1421
1509
|
|
|
1422
1510
|
Slots:
|
|
1423
1511
|
- `#leading` — Custom leading element, replacing the icon/avatar/image/icon-container
|
|
@@ -1547,7 +1635,7 @@ Props:
|
|
|
1547
1635
|
|
|
1548
1636
|
### MMenuItem
|
|
1549
1637
|
|
|
1550
|
-
An item of an MMenu or MContextMenu: icon, label and a shortcut hint. Put more items in its `#children` slot to make it open a submenu.
|
|
1638
|
+
An item of an MMenu or MContextMenu: icon, label and a shortcut hint. Put more items in its `#children` slot to make it open a submenu. With `selected` it's one choice of several (Compose's SelectableDropdownMenuItem), with `checked` an on/off setting (CheckableDropdownMenuItem): tertiary-container and rounder while on, with a check that slides in.
|
|
1551
1639
|
|
|
1552
1640
|
Props:
|
|
1553
1641
|
- `icon?: string` — Material Symbol icon name
|
|
@@ -1555,10 +1643,14 @@ Props:
|
|
|
1555
1643
|
- `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
|
|
1556
1644
|
- `disabled?: boolean = false` — Disables the item
|
|
1557
1645
|
- `danger?: boolean = false` — Danger/destructive styling (error color)
|
|
1558
|
-
- `keepOpen?: boolean
|
|
1646
|
+
- `keepOpen?: boolean` — Keep the menu open after this item is clicked. Defaults to true for `checked` items, false otherwise
|
|
1647
|
+
- `selected?: boolean` — Makes it one choice of several (radio-like): selected look while true. Leave unset for a plain item
|
|
1648
|
+
- `checked?: boolean` (v-model:checked) — Makes it an on/off setting (v-model:checked, checkbox-like): checked look while true. Leave unset for a plain item
|
|
1649
|
+
- `selectedIcon?: string` — Icon shown while selected or checked. Defaults to a check that slides in when the item has no `icon`; with an `icon`, that icon stays and turns filled
|
|
1559
1650
|
|
|
1560
1651
|
Events:
|
|
1561
1652
|
- `click()` — Emitted when a leaf item (no #children) is clicked. Not emitted for disabled items or for items with #children, since clicking those just opens/toggles the submenu instead.
|
|
1653
|
+
- `update:checked(boolean)` — Emitted on click when `checked` is set, with the new value — powers v-model:checked
|
|
1562
1654
|
|
|
1563
1655
|
Slots:
|
|
1564
1656
|
- `#default` — Item label text.
|
|
@@ -1713,10 +1805,11 @@ Props:
|
|
|
1713
1805
|
- `alignment?: "top" | "bottom" | "center" = "top"` — Vertical alignment of items within the rail
|
|
1714
1806
|
- `expanded?: boolean = false` (v-model:expanded) — Widens the rail (220px) 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.
|
|
1715
1807
|
- `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`.
|
|
1808
|
+
- `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
|
|
1716
1809
|
|
|
1717
1810
|
Events:
|
|
1718
1811
|
- `update:modelValue(string | number)` — Emitted when an item is clicked — powers v-model
|
|
1719
|
-
- `update:expanded(boolean)` — Emitted when the modal panel closes (modal mode only) — pair with :expanded for v-model:expanded
|
|
1812
|
+
- `update:expanded(boolean)` — Emitted when the modal panel closes (modal mode only) — pair with :expanded for v-model:expanded. With `hideOnCollapse`, swiping the panel away closes it too
|
|
1720
1813
|
|
|
1721
1814
|
Slots:
|
|
1722
1815
|
- `#fab` — A FAB (or MFabMenu) at the top of the rail, above the items.
|
|
@@ -2145,7 +2238,7 @@ Props:
|
|
|
2145
2238
|
- `modelValue?: string = ""` (v-model) — Search query (v-model)
|
|
2146
2239
|
- `expanded?: boolean` (v-model:expanded) — Controls the expanded/collapsed state — also works uncontrolled if omitted.
|
|
2147
2240
|
- `placeholder?: string` — Defaults to the locale's "Search..."
|
|
2148
|
-
- `variant?: "
|
|
2241
|
+
- `variant?: "fullscreen" | "fullscreen-contained" | "docked" = "docked"` — 'docked' grows into a rounded panel anchored below the bar (default). 'fullscreen' takes over the whole viewport, matching M3's mobile search pattern — the leading icon becomes a back button either way. 'fullscreen-contained' (M3 Expressive's ExpandedFullScreenContainedSearchBar) also takes the whole viewport, on surface-container-low, but keeps the input in its pill shape, with no divider.
|
|
2149
2242
|
- `leadingIcon?: string = "search"` — Icon shown in the collapsed bar
|
|
2150
2243
|
- `iconPosition?: "start" | "end" = "start"` — Which side of the *collapsed* bar the leading icon sits on. The expanded panel's back button always stays at the start regardless — that's a near-universal "go back" convention.
|
|
2151
2244
|
- `textAlign?: "center" | "start" = "start"` — Centers the input/placeholder text instead of the M3-standard start alignment (an iOS-style look some apps use for the collapsed bar).
|
|
@@ -2154,8 +2247,8 @@ Props:
|
|
|
2154
2247
|
- `disabled?: boolean = false` — Disables the collapsed bar
|
|
2155
2248
|
|
|
2156
2249
|
Events:
|
|
2157
|
-
- `update:modelValue(string)` — Emitted on every input change — powers v-model
|
|
2158
2250
|
- `search(string)` — Emitted when Enter is pressed in the input, with the current query
|
|
2251
|
+
- `update:modelValue(string)` — Emitted on every input change — powers v-model
|
|
2159
2252
|
- `update:expanded(boolean)` — Emitted when the expanded state changes — powers v-model:expanded
|
|
2160
2253
|
|
|
2161
2254
|
Slots:
|
|
@@ -2457,6 +2550,7 @@ Props:
|
|
|
2457
2550
|
- `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Button size
|
|
2458
2551
|
- `disabled?: boolean = false` — Disables both parts
|
|
2459
2552
|
- `items?: SplitButtonItem[]` — Dropdown menu items; see `SplitButtonItem`
|
|
2553
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
2460
2554
|
|
|
2461
2555
|
Events:
|
|
2462
2556
|
- `click(MouseEvent)` — Emitted when the main (left) button is clicked
|
|
@@ -2504,9 +2598,9 @@ Props:
|
|
|
2504
2598
|
- `closeHint?: string` — Footer hint text for Escape — falls back to the locale's own string when unset
|
|
2505
2599
|
|
|
2506
2600
|
Events:
|
|
2601
|
+
- `search(string)` — Emitted as the query changes (debounced by the debounce prop) — drive your own filtering and update results in response
|
|
2507
2602
|
- `update:modelValue(boolean)` — Emitted on open/close — powers v-model
|
|
2508
2603
|
- `select(SpotlightResult)` — Emitted when a result is chosen (click, or Enter)
|
|
2509
|
-
- `search(string)` — Emitted as the query changes (debounced by the debounce prop) — drive your own filtering and update results in response
|
|
2510
2604
|
|
|
2511
2605
|
```ts
|
|
2512
2606
|
export interface SpotlightResult {
|
|
@@ -2526,7 +2620,7 @@ Props:
|
|
|
2526
2620
|
- `direction?: "row" | "column" = "column"` — Stack direction
|
|
2527
2621
|
- `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "md"` — Gap between items (ignored when divider is true)
|
|
2528
2622
|
- `align?: "center" | "start" | "end" | "stretch" | "baseline" = "stretch"` — Cross-axis alignment
|
|
2529
|
-
- `justify?: "center" | "start" | "
|
|
2623
|
+
- `justify?: "center" | "start" | "between" | "around" | "evenly" | "end" = "start"` — Main-axis alignment
|
|
2530
2624
|
- `wrap?: boolean = false` — Allow items to wrap
|
|
2531
2625
|
- `divider?: boolean = false` — Show dividers between items instead of a gap
|
|
2532
2626
|
- `inline?: boolean = false` — Use inline-flex
|
|
@@ -2716,6 +2810,7 @@ Props:
|
|
|
2716
2810
|
- `tabs: Tab[]` — Tab definitions
|
|
2717
2811
|
- `variant?: "primary" | "secondary" = "primary"` — Primary: short sliding underline shorter than the tab with a stretch animation. Secondary: full-width underline spanning the entire tab, text-only.
|
|
2718
2812
|
- `scrollable?: boolean = false` — Fixed (default, M3 `TabRow`): tabs evenly share the available width, no scrolling — use for 2-5 tabs. Scrollable (M3 `ScrollableTabRow`): tabs keep their natural width and the row scrolls horizontally when they overflow — use for many tabs.
|
|
2813
|
+
- `iconPosition?: "top" | "leading"` — Where a tab's icon goes: `top`, stacked above the label in a 64px tab (Compose's `Tab`), or `leading`, beside the label in a 48px tab (Compose's `LeadingIconTab`). Defaults to `top` for primary tabs and `leading` for secondary ones.
|
|
2719
2814
|
|
|
2720
2815
|
Events:
|
|
2721
2816
|
- `update:modelValue(string | number)` — Emitted with the value of the tab you picked.
|
|
@@ -2871,7 +2966,7 @@ Events:
|
|
|
2871
2966
|
|
|
2872
2967
|
### MTimePickerModal
|
|
2873
2968
|
|
|
2874
|
-
A modal, centered time picker with a clock dial and a keyboard input mode. Supports AM/PM toggle and 24h format — the sibling of MTimePicker, a fully separate component rather than a shared internal.
|
|
2969
|
+
A modal, centered time picker with a clock dial (or, with `mode="scroll"`, M3 Expressive's scroll wheels from MTimeScroll) and a keyboard input mode. Supports AM/PM toggle and 24h format — the sibling of MTimePicker, a fully separate component rather than a shared internal.
|
|
2875
2970
|
|
|
2876
2971
|
Props:
|
|
2877
2972
|
- `modelValue: string | null = null` (v-model) — Selected time in HH:MM format (v-model)
|
|
@@ -2879,11 +2974,25 @@ Props:
|
|
|
2879
2974
|
- `use24h?: boolean = false` — Use 24-hour format (shows inner ring 13-23)
|
|
2880
2975
|
- `minuteStep?: number = 5` — Minute increment step
|
|
2881
2976
|
- `title?: string` — Dialog title
|
|
2977
|
+
- `mode?: "dial" | "scroll" = "dial"` — How the time is picked before switching to keyboard input: a clock `dial`, or `scroll` wheels (MTimeScroll)
|
|
2882
2978
|
|
|
2883
2979
|
Events:
|
|
2884
2980
|
- `update:modelValue(string | null)` — Emitted when a time is confirmed — powers v-model
|
|
2885
2981
|
- `update:show(boolean)` — Emitted when the dialog opens or closes — powers v-model:show
|
|
2886
2982
|
|
|
2983
|
+
### MTimeScroll
|
|
2984
|
+
|
|
2985
|
+
M3 Expressive's time scroll picker (a port of Compose's `TimeScroll`): an hour wheel and a minute wheel side by side, plus an AM/PM toggle in 12-hour mode. It updates as the wheels turn; put it in a dialog or a form for the confirm step.
|
|
2986
|
+
|
|
2987
|
+
Props:
|
|
2988
|
+
- `modelValue: string | null = null` (v-model) — Selected time in HH:MM, 24-hour (v-model); null shows 12:00 AM (00:00 in 24-hour mode)
|
|
2989
|
+
- `use24h?: boolean = false` — 24-hour wheel (00–23) instead of 1–12 with AM/PM
|
|
2990
|
+
- `minuteStep?: number = 1` — Minute increment step; the minute wheel shows only multiples of it
|
|
2991
|
+
- `disabled?: boolean = false` — Disables the wheels and the AM/PM toggle
|
|
2992
|
+
|
|
2993
|
+
Events:
|
|
2994
|
+
- `update:modelValue(string)` — Emitted with the time as HH:MM (24-hour) whenever a wheel or AM/PM changes
|
|
2995
|
+
|
|
2887
2996
|
### MTitle
|
|
2888
2997
|
|
|
2889
2998
|
Semantic heading component in three sizes — a thin wrapper around `MText` at medium weight.
|
|
@@ -2907,6 +3016,7 @@ Props:
|
|
|
2907
3016
|
- `disabled?: boolean = false` — Disables interaction
|
|
2908
3017
|
- `icon?: string` — Material Symbol icon name shown before the label
|
|
2909
3018
|
- `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Same 5-tier expressive sizing as MButton
|
|
3019
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
2910
3020
|
|
|
2911
3021
|
Events:
|
|
2912
3022
|
- `update:checked(boolean)` — Emitted when clicked — powers v-model:checked
|
|
@@ -2923,7 +3033,7 @@ Props:
|
|
|
2923
3033
|
- `orientation?: "horizontal" | "vertical" = "horizontal"` — Layout direction
|
|
2924
3034
|
- `color?: "surface" | "primary" | "secondary" | "tertiary" = "surface"` — Background color scheme
|
|
2925
3035
|
- `fabPosition?: "start" | "none" | "end" = "none"` — Where the #fab slot renders relative to the toolbar body
|
|
2926
|
-
- `align?: "center" | "start" | "
|
|
3036
|
+
- `align?: "center" | "start" | "between" | "end" = "center"` — Item alignment along the main axis
|
|
2927
3037
|
|
|
2928
3038
|
Slots:
|
|
2929
3039
|
- `#fab` — A FAB rendered alongside the toolbar body, positioned by fabPosition
|
|
@@ -2946,15 +3056,20 @@ Slots:
|
|
|
2946
3056
|
|
|
2947
3057
|
### MTopAppBar
|
|
2948
3058
|
|
|
2949
|
-
A top app bar in four M3 layouts — center-aligned, small, medium, and large — with a leading navigation icon and trailing actions.
|
|
3059
|
+
A top app bar in four M3 layouts — center-aligned, small, medium, and large — with a leading navigation icon and trailing actions. Medium and large can be M3 Expressive's flexible bars (bigger titles, a subtitle), and any of them can react to scrolling: change color, hide, or collapse to the small bar.
|
|
2950
3060
|
|
|
2951
3061
|
Props:
|
|
2952
3062
|
- `title?: string` — App bar title
|
|
3063
|
+
- `subtitle?: string` — A line below the title (Compose's `subtitle`): small, center-aligned and flexible medium/large bars
|
|
2953
3064
|
- `variant?: "center" | "medium" | "small" | "large" = "small"` — 64dp small/center-aligned row, or a 112dp medium / 152dp large two-row layout with the title below
|
|
3065
|
+
- `flexible?: boolean = false` — Medium/large only: M3 Expressive's MediumFlexibleTopAppBar / LargeFlexibleTopAppBar, with a headline-medium / display-small title and room for a subtitle (112/136dp and 120/152dp tall)
|
|
3066
|
+
- `titleAlignment?: "center" | "start" = "start"` — Medium/large only: where the title row sits (Compose's `titleHorizontalAlignment`)
|
|
2954
3067
|
- `navigationIcon?: string` — Leading icon (e.g. menu, arrow_back)
|
|
2955
3068
|
- `navigationLabel?: string` — Accessible label for the navigation icon button — defaults to the locale's generic "Menu" label; override when navigationIcon is actually a back arrow rather than a drawer toggle.
|
|
2956
3069
|
- `elevated?: boolean` — Swaps both container color (surface → surface-container) and elevation (level 0 → level 2), matching the real M3 on-scroll container tokens rather than just adding a shadow
|
|
2957
3070
|
- `bordered?: boolean` — Add a bottom border (border-outline-variant)
|
|
3071
|
+
- `scrollBehavior?: "pinned" | "enter-always" | "exit-until-collapsed"` — How the bar reacts to `scrollTarget` scrolling (Compose's TopAppBarDefaults scroll behaviors). `pinned` stays put and takes the scrolled container color once the content moves under it; `enter-always` hides (a medium/large bar collapses to the small one) while the content scrolls down and comes back as soon as it scrolls up; `exit-until-collapsed` collapses a medium/large bar as the content scrolls and expands it only back at the top. The last two make the bar sticky over the content: put it at the top of the scrolling element (or of the page)
|
|
3072
|
+
- `scrollTarget?: string | HTMLElement | null = null` — What `scrollBehavior` follows: an element or a CSS selector for it. Defaults to the window
|
|
2958
3073
|
|
|
2959
3074
|
Events:
|
|
2960
3075
|
- `navigation()` — Emitted when the default navigation icon button is clicked (not emitted when the #navigation slot is overridden — that content is fully custom)
|
|
@@ -2962,6 +3077,7 @@ Events:
|
|
|
2962
3077
|
Slots:
|
|
2963
3078
|
- `#navigation` — Custom leading area (default: an MIconButton built from the navigationIcon prop)
|
|
2964
3079
|
- `#title` — Custom title content (default: renders the title prop)
|
|
3080
|
+
- `#subtitle` — Custom subtitle content (default: renders the subtitle prop)
|
|
2965
3081
|
- `#actions` — Trailing action buttons
|
|
2966
3082
|
|
|
2967
3083
|
### MTour
|
|
@@ -3211,6 +3327,9 @@ useColorPalette(): {
|
|
|
3211
3327
|
set: (id: string) => void
|
|
3212
3328
|
seed: Readonly<Ref<{ readonly seed: string; readonly variant?: SchemeVariant; readonly contrast?: number; } | null>>
|
|
3213
3329
|
setSeed: (seed: string, options?: SeedOptions) => Promise<void>
|
|
3330
|
+
contrast: Readonly<Ref<ContrastLevel>>
|
|
3331
|
+
activeContrast: ComputedRef<Exclude<ContrastLevel, 'system'>>
|
|
3332
|
+
setContrast: (level: ContrastLevel) => void
|
|
3214
3333
|
persistPalette: Ref<boolean>
|
|
3215
3334
|
setPersistPalette: (enabled: boolean) => void
|
|
3216
3335
|
}
|
|
@@ -3361,6 +3480,54 @@ usePageProgress(): {
|
|
|
3361
3480
|
}
|
|
3362
3481
|
```
|
|
3363
3482
|
|
|
3483
|
+
### useSpring
|
|
3484
|
+
|
|
3485
|
+
```ts
|
|
3486
|
+
useSpring(target: () => number[], apply: (values: readonly number[]) => void, spec: SpringSpec = FAST_SPATIAL): {
|
|
3487
|
+
snap: () => void
|
|
3488
|
+
}
|
|
3489
|
+
```
|
|
3490
|
+
|
|
3491
|
+
### motionSprings
|
|
3492
|
+
|
|
3493
|
+
Spring specs of the two motion schemes. Spatial springs move things (position, size, shape); effects springs change color and opacity and never overshoot. Standard is the default scheme; Expressive is bouncier, for Expressive components and moments that should feel lively.
|
|
3494
|
+
|
|
3495
|
+
```ts
|
|
3496
|
+
motionSprings: { readonly standard: { readonly fastSpatial: { readonly dampingRatio: 0.9; readonly stiffness: 1400; }; readonly defaultSpatial: { readonly dampingRatio: 0.9; readonly stiffness: 700; }; readonly slowSpatial: { readonly dampingRatio: 0.9; readonly stiffness: 300; }; readonly fastEffects: { readonly dampingRatio: 1; readonly stiffness: 3800; }; readonly defaultEffects: { readonly dampingRatio: 1; readonly stiffness: 1600; }; readonly slowEffects: { readonly dampingRatio: 1; readonly stiffness: 800; }; }; readonly expressive: { readonly fastSpatial: { readonly dampingRatio: 0.6; readonly stiffness: 800; }; readonly defaultSpatial: { readonly dampingRatio: 0.8; readonly stiffness: 380; }; readonly slowSpatial: { readonly dampingRatio: 0.8; readonly stiffness: 200; }; readonly fastEffects: { readonly dampingRatio: 1; readonly stiffness: 3800; }; readonly defaultEffects: { readonly dampingRatio: 1; readonly stiffness: 1600; }; readonly slowEffects: { readonly dampingRatio: 1; readonly stiffness: 800; }; }; }
|
|
3497
|
+
```
|
|
3498
|
+
|
|
3499
|
+
### motionEasings
|
|
3500
|
+
|
|
3501
|
+
Easing curves as cubic-bezier control points [x1, y1, x2, y2] (theme.css has them as `--ease-*`)
|
|
3502
|
+
|
|
3503
|
+
```ts
|
|
3504
|
+
motionEasings: { readonly emphasized: readonly [0.2, 0, 0, 1]; readonly emphasizedDecelerate: readonly [0.05, 0.7, 0.1, 1]; readonly emphasizedAccelerate: readonly [0.3, 0, 0.8, 0.15]; readonly standard: readonly [0.2, 0, 0, 1]; readonly standardDecelerate: readonly [0, 0, 0, 1]; readonly standardAccelerate: readonly [0.3, 0, 1, 1]; readonly legacy: readonly [0.4, 0, 0.2, 1]; readonly legacyDecelerate: readonly [0, 0, 0.2, 1]; readonly legacyAccelerate: readonly [0.4, 0, 1, 1]; readonly linear: readonly [0, 0, 1, 1]; }
|
|
3505
|
+
```
|
|
3506
|
+
|
|
3507
|
+
### motionDurations
|
|
3508
|
+
|
|
3509
|
+
Durations in ms (theme.css has them as `--duration-short-1` … `--duration-extra-long-4`)
|
|
3510
|
+
|
|
3511
|
+
```ts
|
|
3512
|
+
motionDurations: { readonly short1: 50; readonly short2: 100; readonly short3: 150; readonly short4: 200; readonly medium1: 250; readonly medium2: 300; readonly medium3: 350; readonly medium4: 400; readonly long1: 450; readonly long2: 500; readonly long3: 550; readonly long4: 600; readonly extraLong1: 700; readonly extraLong2: 800; readonly extraLong3: 900; readonly extraLong4: 1000; }
|
|
3513
|
+
```
|
|
3514
|
+
|
|
3515
|
+
### cubicBezier
|
|
3516
|
+
|
|
3517
|
+
A cubic-bezier easing as a function of progress (0–1), e.g. `cubicBezier(...motionEasings.emphasized)`, for JS-driven tweens and for mapping a fraction through a curve
|
|
3518
|
+
|
|
3519
|
+
```ts
|
|
3520
|
+
cubicBezier(x1: number, y1: number, x2: number, y2: number): (t: number) => number
|
|
3521
|
+
```
|
|
3522
|
+
|
|
3523
|
+
### vRipple
|
|
3524
|
+
|
|
3525
|
+
The M3 press ripple for any element: `<div v-ripple>`, `v-ripple="false"`, `v-ripple="'#e91e63'"` or `v-ripple="{ disabled, color }"`. A statically positioned element is made `position: relative`. Registered globally as `v-ripple` by `createM3UI()`; import `vRipple` to use it without the plugin.
|
|
3526
|
+
|
|
3527
|
+
```ts
|
|
3528
|
+
vRipple: Directive<HTMLElement, RippleValue>
|
|
3529
|
+
```
|
|
3530
|
+
|
|
3364
3531
|
### emojiCategories
|
|
3365
3532
|
|
|
3366
3533
|
```ts
|
|
@@ -3432,6 +3599,12 @@ export interface M3UIOptions {
|
|
|
3432
3599
|
seed?: string
|
|
3433
3600
|
/** How `seed` becomes a scheme: `variant` (`'tonal-spot'` by default) and `contrast` (0 standard, 0.5 medium, 1 high). */
|
|
3434
3601
|
seedOptions?: SeedOptions
|
|
3602
|
+
/**
|
|
3603
|
+
* M3's contrast level: `'standard'`, `'medium'`, `'high'`, or `'system'` (follows the OS's `prefers-contrast`).
|
|
3604
|
+
* Like `palette`, only the first-visit default unless `persistPalette` is `false`. Built-in palettes need
|
|
3605
|
+
* `@m3ui-vue/m3ui-vue/palettes-contrast` imported for medium and high; seed palettes are regenerated.
|
|
3606
|
+
*/
|
|
3607
|
+
contrast?: ContrastLevel
|
|
3435
3608
|
locale?: MaybeRef<Partial<M3Locale>>
|
|
3436
3609
|
/**
|
|
3437
3610
|
* Keep `<meta name="theme-color">` (the color phones give the browser bar and status bar) in sync with a color
|
|
@@ -3467,6 +3640,15 @@ export interface ActiveSeed extends SeedOptions {
|
|
|
3467
3640
|
}
|
|
3468
3641
|
```
|
|
3469
3642
|
|
|
3643
|
+
```ts
|
|
3644
|
+
// ── Contrast ─────────────────────────────────────────────────────────────────────────────────────
|
|
3645
|
+
/**
|
|
3646
|
+
* M3's contrast levels. `system` follows the OS (`prefers-contrast: more` → high). Built-in palettes need
|
|
3647
|
+
* `@m3ui-vue/m3ui-vue/palettes-contrast` imported for medium and high; seed palettes are regenerated.
|
|
3648
|
+
*/
|
|
3649
|
+
export type ContrastLevel = 'standard' | 'medium' | 'high' | 'system'
|
|
3650
|
+
```
|
|
3651
|
+
|
|
3470
3652
|
```ts
|
|
3471
3653
|
// Dynamic color: a full M3 color scheme (light and dark) generated from one seed color with Google's
|
|
3472
3654
|
// material-color-utilities (HCT, DynamicScheme). The package is loaded with a dynamic import, so apps that
|
|
@@ -3580,6 +3762,15 @@ export interface M3Locale {
|
|
|
3580
3762
|
// Pickers
|
|
3581
3763
|
selectDate: string
|
|
3582
3764
|
selectTime: string
|
|
3765
|
+
timeHourSelection: string
|
|
3766
|
+
timeMinuteSelection: string
|
|
3767
|
+
timePeriodToggle: string
|
|
3768
|
+
timeToggleKeyboard: string
|
|
3769
|
+
timeToggleDial: string
|
|
3770
|
+
timeToggleScroll: string
|
|
3771
|
+
sheetExpand: string
|
|
3772
|
+
sheetCollapse: string
|
|
3773
|
+
sheetDismiss: string
|
|
3583
3774
|
selectRange: string
|
|
3584
3775
|
pickStart: string
|
|
3585
3776
|
pickEnd: string
|
|
@@ -3778,8 +3969,34 @@ export interface NotificationOptions {
|
|
|
3778
3969
|
}
|
|
3779
3970
|
```
|
|
3780
3971
|
|
|
3972
|
+
```ts
|
|
3973
|
+
// Material 3's motion tokens for your own animations, from androidx's MotionTokens, StandardMotionTokens and
|
|
3974
|
+
// ExpressiveMotionTokens. The same easings and durations are CSS variables in theme.css (`--ease-*`, which
|
|
3975
|
+
// Tailwind turns into `ease-*` utilities, and `--duration-*`); the springs only make sense in JS, with
|
|
3976
|
+
// `useSpring` (exported next to these) or your own loop. No imports here: _useSpring builds on this file.
|
|
3977
|
+
|
|
3978
|
+
/** A spring: dampingRatio 1 settles without overshoot, lower bounces; higher stiffness is faster */
|
|
3979
|
+
export interface SpringSpec { dampingRatio: number; stiffness: number }
|
|
3980
|
+
```
|
|
3981
|
+
|
|
3982
|
+
```ts
|
|
3983
|
+
/** Options for `v-ripple`. */
|
|
3984
|
+
export interface RippleOptions {
|
|
3985
|
+
/** No ripple while true (e.g. bound to the element's disabled state). */
|
|
3986
|
+
disabled?: boolean
|
|
3987
|
+
/** Any CSS color for the ripple; defaults to the element's text color (`currentColor`). */
|
|
3988
|
+
color?: string
|
|
3989
|
+
}
|
|
3990
|
+
```
|
|
3991
|
+
|
|
3992
|
+
```ts
|
|
3993
|
+
/** `v-ripple` value: nothing or `true` (on), `false` (off), a CSS color, or an options object. */
|
|
3994
|
+
export type RippleValue = boolean | string | RippleOptions | null | undefined
|
|
3995
|
+
```
|
|
3996
|
+
|
|
3781
3997
|
```ts
|
|
3782
3998
|
// Generated by scripts/generate-emoji-data.mjs from Unicode emoji-test.txt (Emoji 15). Don't edit by hand.
|
|
3999
|
+
// Emoji data © Unicode, Inc., under the Unicode License v3 (dist/THIRD_PARTY_LICENSES.md, scripts/licenses/unicode-license-v3.txt).
|
|
3783
4000
|
|
|
3784
4001
|
export interface EmojiCategory {
|
|
3785
4002
|
id: string
|
|
@@ -3795,12 +4012,15 @@ export interface EmojiCategory {
|
|
|
3795
4012
|
`M3Locale` keys (pass a partial object to `createM3UI({ locale })`; presets from `@m3ui-vue/m3ui-vue/locales`:
|
|
3796
4013
|
`esLocale`, `frLocale`, `ptLocale`, `deLocale`, `jaLocale`, `zhLocale`, `koLocale`):
|
|
3797
4014
|
|
|
3798
|
-
lang, search, noResults, close, cancel, confirm, loading, menu, previous, next, today, more, selectedCount, recordCount, expand, columns, exportCsv, noGroup, finish, dropText, selectText, maxSizePrefix, remove, selectDate, selectTime, 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
|
|
4015
|
+
lang, search, noResults, close, cancel, confirm, loading, menu, previous, next, today, more, selectedCount, recordCount, expand, columns, exportCsv, noGroup, finish, dropText, selectText, maxSizePrefix, remove, selectDate, selectTime, timeHourSelection, timeMinuteSelection, timePeriodToggle, timeToggleKeyboard, timeToggleDial, timeToggleScroll, sheetExpand, sheetCollapse, sheetDismiss, 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
|
|
3799
4016
|
|
|
3800
4017
|
## Theme tokens
|
|
3801
4018
|
|
|
3802
4019
|
- Colors (`bg-*`, `text-*`, `border-*`…): primary, on-primary, primary-container, on-primary-container, secondary, on-secondary, secondary-container, on-secondary-container, tertiary, on-tertiary, tertiary-container, on-tertiary-container, primary-fixed, primary-fixed-dim, on-primary-fixed, on-primary-fixed-variant, secondary-fixed, secondary-fixed-dim, on-secondary-fixed, on-secondary-fixed-variant, tertiary-fixed, tertiary-fixed-dim, on-tertiary-fixed, on-tertiary-fixed-variant, error, on-error, error-container, on-error-container, success, on-success, success-container, on-success-container, background, on-background, surface, on-surface, surface-variant, on-surface-variant, surface-dim, surface-bright, surface-container-lowest, surface-container-low, surface-container, surface-container-high, surface-container-highest, outline, outline-variant, shadow, scrim, inverse-surface, inverse-on-surface, inverse-primary
|
|
3803
4020
|
- Type scale (`text-*`): display-large, display-medium, display-small, headline-large, headline-medium, headline-small, title-large, title-medium, title-small, body-large, body-medium, body-small, label-large, label-medium, label-small, display-large-emphasized, display-medium-emphasized, display-small-emphasized, headline-large-emphasized, headline-medium-emphasized, headline-small-emphasized, title-large-emphasized, title-medium-emphasized, title-small-emphasized, body-large-emphasized, body-medium-emphasized, body-small-emphasized, label-large-emphasized, label-medium-emphasized, label-small-emphasized
|
|
3804
|
-
- Radius (`rounded-*`): xs, sm, md, lg, xl
|
|
4021
|
+
- Radius (`rounded-*`): xs, sm, md, lg, xl, lg-increased, xl-increased, xxl
|
|
3805
4022
|
- Shadows (`shadow-*`): elevation-1, elevation-2, elevation-3, elevation-4, elevation-5
|
|
4023
|
+
- Easing (`ease-*`, CSS `--ease-*`): emphasized, emphasized-decelerate, emphasized-accelerate, standard, standard-decelerate, standard-accelerate, legacy, legacy-decelerate, legacy-accelerate
|
|
4024
|
+
- Durations (CSS `--duration-*`, e.g. `duration-(--duration-medium-2)`): short-1, short-2, short-3, short-4, medium-1, medium-2, medium-3, medium-4, long-1, long-2, long-3, long-4, extra-long-1, extra-long-2, extra-long-3, extra-long-4
|
|
4025
|
+
- Utilities: `scrollbar-none`
|
|
3806
4026
|
- Palettes (`useColorPalette().set(id)` / `createM3UI({ palette })`): purple, indigo, navy, blue, cyan, teal, green, lime, olive, amber, sand, orange, deep-orange, brown, red, coral, crimson, pink, violet, slate, graphite, charcoal, steel, ash, iron, fog, pewter, smoke, stone, zinc, monochrome, rust, gold, emerald, turquoise, cobalt, sapphire, amethyst, magenta, mauve
|
|
@@ -5,16 +5,23 @@ var a = /* @__PURE__ */ t({
|
|
|
5
5
|
__name: "MIcon",
|
|
6
6
|
props: {
|
|
7
7
|
name: {},
|
|
8
|
-
size: { default: 24 }
|
|
8
|
+
size: { default: 24 },
|
|
9
|
+
filled: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
}
|
|
9
13
|
},
|
|
10
14
|
setup(t) {
|
|
11
15
|
return (a, o) => (r(), e("span", {
|
|
12
16
|
class: "material-symbols-outlined leading-none",
|
|
13
|
-
style: n({
|
|
17
|
+
style: n({
|
|
18
|
+
fontSize: `${t.size}px`,
|
|
19
|
+
fontVariationSettings: t.filled ? "'FILL' 1" : void 0
|
|
20
|
+
})
|
|
14
21
|
}, i(t.name), 5));
|
|
15
22
|
}
|
|
16
23
|
});
|
|
17
24
|
//#endregion
|
|
18
25
|
export { a as t };
|
|
19
26
|
|
|
20
|
-
//# sourceMappingURL=MIcon-
|
|
27
|
+
//# sourceMappingURL=MIcon-DLOkQduI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MIcon-DLOkQduI.js","names":[],"sources":["../src/components/MIcon.vue","../src/components/MIcon.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Renders a Material Symbols Outlined glyph by name. Color follows the surrounding text color (set it with a\n * Tailwind text-* class).\n */\nwithDefaults(defineProps<{\n /** Material Symbol name (e.g. \"settings\", \"favorite\") */\n name: string\n /** Icon size in px */\n size?: number\n /** Filled glyph (the Material Symbols FILL axis), as M3 draws a selected icon */\n filled?: boolean\n}>(), { size: 24, filled: false })\n</script>\n\n<template>\n <span class=\"material-symbols-outlined leading-none\" :style=\"{ fontSize: `${size}px`, fontVariationSettings: filled ? `'FILL' 1` : undefined }\">{{\n name\n }}</span>\n</template>\n","<script setup lang=\"ts\">\n/**\n * Renders a Material Symbols Outlined glyph by name. Color follows the surrounding text color (set it with a\n * Tailwind text-* class).\n */\nwithDefaults(defineProps<{\n /** Material Symbol name (e.g. \"settings\", \"favorite\") */\n name: string\n /** Icon size in px */\n size?: number\n /** Filled glyph (the Material Symbols FILL axis), as M3 draws a selected icon */\n filled?: boolean\n}>(), { size: 24, filled: false })\n</script>\n\n<template>\n <span class=\"material-symbols-outlined leading-none\" :style=\"{ fontSize: `${size}px`, fontVariationSettings: filled ? `'FILL' 1` : undefined }\">{{\n name\n }}</span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;oBAgBE,EAAA,GAAA,EAES,QAAA;GAFH,OAAM;GAA0C,OAAK,EAAA;IAAA,UAAA,GAAiB,EAAA,KAAI;IAAA,uBAA6B,EAAA,SAAM,aAAgB,KAAA;GAAS,CAAA;EAC1I,GAAA,EAAA,EAAA,IAAI,GAAA,CAAA"}
|