@m3ui-vue/m3ui-vue 0.9.1 → 0.9.3
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 +43 -0
- package/dist/API.md +266 -60
- package/dist/{MIcon-CaEooCmZ.js → MIcon-DLOkQduI.js} +10 -3
- package/dist/MIcon-DLOkQduI.js.map +1 -0
- package/dist/{MTextField-pJU1vFaR.js → MTextField-DKtgPymd.js} +422 -206
- package/dist/MTextField-DKtgPymd.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/MBox.vue.d.ts +3 -3
- package/dist/components/MButton.vue.d.ts +4 -2
- package/dist/components/MButtonGroup.vue.d.ts +2 -0
- package/dist/components/MColorPicker.vue.d.ts +13 -1
- package/dist/components/MColorPickerModal.vue.d.ts +14 -2
- package/dist/components/MDragHandle.vue.d.ts +12 -0
- package/dist/components/MEmojiSelector.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +5 -3
- package/dist/components/MFabMenu.vue.d.ts +1 -1
- 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 +5 -5
- package/dist/components/MMenuItem.vue.d.ts +17 -4
- package/dist/components/MOverlay.vue.d.ts +1 -1
- package/dist/components/MScrollField.vue.d.ts +40 -0
- package/dist/components/MScrollable.vue.d.ts +9 -0
- package/dist/components/MSplitButton.vue.d.ts +2 -0
- package/dist/components/MSplitter.vue.d.ts +2 -2
- package/dist/components/MSwipeToDismiss.vue.d.ts +49 -0
- 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/MTransition.vue.d.ts +34 -0
- package/dist/components/MTree.vue.d.ts +2 -2
- package/dist/components/MWindow.vue.d.ts +1 -1
- package/dist/components/_MColorPanel.vue.d.ts +18 -0
- package/dist/components/_MDrawerItemList.vue.d.ts +3 -0
- package/dist/composables/_colorUtils.d.ts +34 -0
- package/dist/composables/_themeColor.d.ts +1 -0
- package/dist/composables/_useSpring.d.ts +17 -0
- package/dist/composables/dynamicColor.d.ts +18 -0
- package/dist/composables/useColorPalette.d.ts +27 -0
- package/dist/composables/useLocale.d.ts +16 -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 +12 -1
- package/dist/locales/index.js +112 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +7443 -6150
- package/dist/m3ui.js.map +1 -1
- package/dist/material-color-utilities-Cktu8DBU.js +3160 -0
- package/dist/material-color-utilities-Cktu8DBU.js.map +1 -0
- package/dist/plugin.d.ts +18 -0
- package/dist/rich-text-editor.js +22 -22
- package/dist/styles/palettes.css +546 -0
- package/dist/styles/theme.css +90 -0
- package/dist/styles.css +1 -1
- package/dist/terminal.js +1 -1
- package/dist/{useLocale-Drihe5G2.js → useLocale-Cn9MVIdw.js} +17 -1
- package/dist/useLocale-Cn9MVIdw.js.map +1 -0
- package/package.json +3 -2
- package/src/__tests__/MButtonGroup.test.ts +51 -0
- package/src/__tests__/MColorPicker.test.ts +141 -0
- package/src/__tests__/MDragHandle.test.ts +57 -0
- package/src/__tests__/MIconButton.test.ts +60 -0
- package/src/__tests__/MListItemShape.test.ts +76 -0
- package/src/__tests__/MMenuItem.test.ts +84 -0
- package/src/__tests__/MScrollField.test.ts +69 -0
- package/src/__tests__/MScrollable.test.ts +42 -0
- package/src/__tests__/MSwipeToDismiss.test.ts +104 -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__/MTransition.test.ts +27 -0
- package/src/__tests__/dynamicColor.test.ts +191 -0
- package/src/__tests__/vRipple.test.ts +92 -0
- package/src/components/MBox.vue +4 -2
- package/src/components/MButton.vue +4 -13
- package/src/components/MButtonGroup.vue +118 -44
- package/src/components/MColorPicker.vue +114 -210
- package/src/components/MColorPickerModal.vue +50 -251
- package/src/components/MDragHandle.vue +54 -0
- package/src/components/MFab.vue +8 -15
- package/src/components/MIcon.vue +4 -2
- package/src/components/MIconButton.vue +96 -24
- package/src/components/MList.vue +33 -3
- package/src/components/MListItem.vue +75 -5
- package/src/components/MMenuItem.vue +115 -13
- package/src/components/MScrollField.vue +310 -0
- package/src/components/MScrollable.vue +160 -5
- package/src/components/MSplitButton.vue +5 -12
- package/src/components/MSplitter.vue +33 -10
- package/src/components/MSwipeToDismiss.vue +247 -0
- 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/MTransition.vue +149 -0
- package/src/components/_MColorPanel.vue +478 -0
- package/src/composables/_carouselStrategy.ts +3 -0
- package/src/composables/_colorUtils.ts +107 -0
- package/src/composables/_themeColor.ts +33 -0
- package/src/composables/_useSpring.ts +91 -0
- package/src/composables/dynamicColor.ts +85 -0
- package/src/composables/useColorPalette.ts +171 -25
- package/src/composables/useFieldBg.ts +6 -0
- package/src/composables/useLocale.ts +34 -0
- 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 +14 -1
- package/src/locales/de.ts +16 -0
- package/src/locales/es.ts +16 -0
- package/src/locales/fr.ts +16 -0
- package/src/locales/ja.ts +16 -0
- package/src/locales/ko.ts +16 -0
- package/src/locales/pt.ts +16 -0
- package/src/locales/zh.ts +16 -0
- package/src/plugin.ts +30 -7
- package/src/styles/palettes.css +546 -0
- package/src/styles/theme.css +90 -0
- package/dist/MIcon-CaEooCmZ.js.map +0 -1
- package/dist/MTextField-pJU1vFaR.js.map +0 -1
- package/dist/useLocale-Drihe5G2.js.map +0 -1
package/README.md
CHANGED
|
@@ -361,6 +361,20 @@ UI components come from @m3ui-vue/m3ui-vue; its API is in node_modules/@m3ui-vue
|
|
|
361
361
|
|
|
362
362
|
`purple` (default) `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`
|
|
363
363
|
|
|
364
|
+
### Dynamic Color (from a seed)
|
|
365
|
+
|
|
366
|
+
Instead of a named palette, generate the whole scheme (light and dark) from one color with Google's dynamic color algorithm:
|
|
367
|
+
|
|
368
|
+
```ts
|
|
369
|
+
app.use(createM3UI({ seed: '#0b57d0', seedOptions: { variant: 'tonal-spot', contrast: 0 } }))
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
At runtime, `useColorPalette().setSeed('#0b57d0')`; `set(id)` switches back to a named palette (the last choice wins). A named `palette` wins over `seed` in `createM3UI`. `generateScheme(seed, options)` returns the tokens if you want them yourself.
|
|
373
|
+
|
|
374
|
+
### Browser Bar Color on Phones
|
|
375
|
+
|
|
376
|
+
`createM3UI({ themeColor: 'surface' })` keeps `<meta name="theme-color">` in sync with a color role of the active palette (palette, seed and dark mode changes included). Off by default. Chrome and Samsung Internet on Android ignore it in a regular tab while the system is in dark mode; installed apps (PWA) still get it.
|
|
377
|
+
|
|
364
378
|
### Switch at Runtime
|
|
365
379
|
|
|
366
380
|
```vue
|
|
@@ -421,6 +435,33 @@ Install only the packages you need:
|
|
|
421
435
|
| `MQRCode` | `qrcode-generator` |
|
|
422
436
|
| `MBarcode` | `jsbarcode` |
|
|
423
437
|
|
|
438
|
+
## Roadmap to 1.0.0
|
|
439
|
+
|
|
440
|
+
1.0.0 ships once all of Material 3's core is in the library. Still to come:
|
|
441
|
+
|
|
442
|
+
**Components**
|
|
443
|
+
|
|
444
|
+
- [ ] Bottom app bar (`BottomAppBar`) and the Expressive flexible bottom app bar
|
|
445
|
+
- [ ] Standard (non-modal) bottom sheet
|
|
446
|
+
- [ ] Wheel time picker (`TimeScroll`)
|
|
447
|
+
- [ ] Icon toggle buttons (standard, filled, tonal and outlined, with a selected state)
|
|
448
|
+
- [ ] Top app bar scroll behaviors (collapse on scroll, hide on scroll) and the Expressive medium/large flexible app bars with subtitle
|
|
449
|
+
- [ ] Selectable and checkable menu items
|
|
450
|
+
- [ ] Search in the top app bar, and the contained full-screen search
|
|
451
|
+
- [ ] The four chip types (assist, filter, input, suggestion) and their elevated variants
|
|
452
|
+
- [ ] Tabs with the icon beside the label
|
|
453
|
+
- [ ] Swipe to close the modal navigation rail
|
|
454
|
+
|
|
455
|
+
**Foundations**
|
|
456
|
+
|
|
457
|
+
- [ ] Material 3 Expressive shape scale (large-increased, extra-large-increased, extra-extra-large)
|
|
458
|
+
- [ ] Motion tokens: easings, durations and springs, exposed for your own animations
|
|
459
|
+
- [ ] Scrollbars: drop the global rule that hides them in Chromium/WebKit (it reaches the whole app, and Firefox shows them anyway) in favor of thin theme-colored scrollbars with `scrollbar-gutter: stable`, hiding them only where a component needs it. For now, set `scrollbar-width: auto` where you want them visible
|
|
460
|
+
|
|
461
|
+
Already in: dynamic color from a seed, fixed color roles, elevation levels 0–5, the emphasized type scale, and the
|
|
462
|
+
Expressive components so far (button groups, split buttons, toggle buttons, loading indicator, FAB menu, toolbars,
|
|
463
|
+
shapes, carousel, scroll field, short navigation bar…).
|
|
464
|
+
|
|
424
465
|
## About this project
|
|
425
466
|
|
|
426
467
|
M3UI Vue started as a set of components I built for my own projects. Over time it grew
|
|
@@ -443,3 +484,5 @@ Thanks for using it! ⭐ Starring the repo is also a nice way to show support.
|
|
|
443
484
|
## License
|
|
444
485
|
|
|
445
486
|
MIT
|
|
487
|
+
|
|
488
|
+
The package bundles code from a few open-source packages (`@material/material-color-utilities`, `shape-morph`, `highlight.js`, `@lezer/highlight`), emoji data generated from Unicode's emoji files and CLDR annotations (Unicode License v3), and a TypeScript port of the Compose Material 3 carousel engine (Android Open Source Project, Apache-2.0). Their licenses ship in `dist/THIRD_PARTY_LICENSES.md`, generated on every build. Optional peer dependencies (TipTap, CodeMirror, xterm.js, Chart.js, markdown-it…) aren't bundled: your app installs them with their own licenses.
|
package/dist/API.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @m3ui-vue/m3ui-vue 0.9.
|
|
1
|
+
# @m3ui-vue/m3ui-vue 0.9.3 — 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.
|
|
@@ -246,7 +246,7 @@ Props:
|
|
|
246
246
|
- `surface?: "default" | "container" | "container-low" | "container-high" | "container-highest" | "primary-container" | "secondary-container" | "tertiary-container" | "inverse"` — Surface color variant
|
|
247
247
|
- `padding?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "none"` — Padding size
|
|
248
248
|
- `rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full" = "none"` — Border radius
|
|
249
|
-
- `elevation?: 0 | 1 | 2 | 3 = 0` — Shadow elevation level
|
|
249
|
+
- `elevation?: 0 | 1 | 2 | 3 | 4 | 5 = 0` — Shadow elevation level (M3 levels 0–5)
|
|
250
250
|
- `border?: boolean = false` — Show border
|
|
251
251
|
- `tag?: string = "div"` — HTML tag to render
|
|
252
252
|
|
|
@@ -288,6 +288,7 @@ Props:
|
|
|
288
288
|
- `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
289
|
- `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
290
|
- `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
|
|
291
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
291
292
|
|
|
292
293
|
Slots:
|
|
293
294
|
- `#default` — The button's label.
|
|
@@ -304,6 +305,7 @@ Props:
|
|
|
304
305
|
- `multiSelect?: boolean = false` — Allow multiple selections
|
|
305
306
|
- `selectionRequired?: boolean = false` — At least one must be selected
|
|
306
307
|
- `color?: "primary" | "secondary" | "tertiary" = "primary"` — Selected button color
|
|
308
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
307
309
|
|
|
308
310
|
Events:
|
|
309
311
|
- `update:modelValue(unknown)` — Emitted on selection change — powers v-model
|
|
@@ -533,31 +535,16 @@ type Language = 'javascript' | 'typescript' | 'json' | 'html' | 'css' | 'python'
|
|
|
533
535
|
|
|
534
536
|
### MColorPicker
|
|
535
537
|
|
|
536
|
-
An
|
|
538
|
+
An outlined field that opens a color picker in a dropdown: saturation/brightness area, hue (and optional opacity) slider, eyedropper, HEX/RGB/HSL fields, recent colors and preset swatches. Updates the value live while picking.
|
|
537
539
|
|
|
538
540
|
Props:
|
|
539
|
-
- `modelValue: string` (v-model) — Selected color in hex format (v-model)
|
|
541
|
+
- `modelValue: string` (v-model) — Selected color in hex format (v-model). `#rrggbb`, or `#rrggbbaa` when `alpha` is on and the color isn't opaque.
|
|
540
542
|
- `label?: string` — Field label
|
|
541
|
-
- `presets?: string[] =
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
"#3f51b5",
|
|
547
|
-
"#2196f3",
|
|
548
|
-
"#03a9f4",
|
|
549
|
-
"#00bcd4",
|
|
550
|
-
"#009688",
|
|
551
|
-
"#4caf50",
|
|
552
|
-
"#8bc34a",
|
|
553
|
-
"#cddc39",
|
|
554
|
-
"#ffeb3b",
|
|
555
|
-
"#ffc107",
|
|
556
|
-
"#ff9800",
|
|
557
|
-
"#ff5722",
|
|
558
|
-
"#795548",
|
|
559
|
-
"#607d8b",
|
|
560
|
-
]` — Preset color swatches shown in the panel
|
|
543
|
+
- `presets?: string[] = defaultColorPresets` — Preset color swatches shown in the panel
|
|
544
|
+
- `alpha?: boolean = false` — Adds an opacity slider and an alpha channel to the value
|
|
545
|
+
- `recent?: boolean = true` — Remember picked colors and show them above the presets (stored in localStorage, shared by every picker).
|
|
546
|
+
- `recentLimit?: number = 7` — How many recent colors to keep.
|
|
547
|
+
- `eyedropper?: boolean = true` — Show a button to pick a color from the screen, where the browser supports it (Chrome, Edge).
|
|
561
548
|
- `disabled?: boolean` — Disables the picker
|
|
562
549
|
- `error?: boolean` — Error state
|
|
563
550
|
- `errorLabel?: string` — Error message shown when error is true
|
|
@@ -565,36 +552,21 @@ Props:
|
|
|
565
552
|
- `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the border
|
|
566
553
|
|
|
567
554
|
Events:
|
|
568
|
-
- `update:modelValue(string)` — Emitted with the picked color.
|
|
555
|
+
- `update:modelValue(string)` — Emitted with the picked color, live while dragging or typing.
|
|
569
556
|
|
|
570
557
|
### MColorPickerModal
|
|
571
558
|
|
|
572
|
-
A
|
|
559
|
+
A color picker in a dialog: saturation/brightness area, hue (and optional opacity) slider, eyedropper, HEX/RGB/HSL fields, recent colors and preset swatches. Built on MDialog; the color is only applied on confirm, and the preview shows it next to the original.
|
|
573
560
|
|
|
574
561
|
Props:
|
|
575
|
-
- `modelValue: string` (v-model) — Selected color in hex format (v-model)
|
|
562
|
+
- `modelValue: string` (v-model) — Selected color in hex format (v-model). `#rrggbb`, or `#rrggbbaa` when `alpha` is on and the color isn't opaque.
|
|
576
563
|
- `show?: boolean = false` (v-model:show) — Controls dialog visibility (v-model:show)
|
|
577
|
-
- `presets?: string[] =
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
"#2196f3",
|
|
584
|
-
"#03a9f4",
|
|
585
|
-
"#00bcd4",
|
|
586
|
-
"#009688",
|
|
587
|
-
"#4caf50",
|
|
588
|
-
"#8bc34a",
|
|
589
|
-
"#cddc39",
|
|
590
|
-
"#ffeb3b",
|
|
591
|
-
"#ffc107",
|
|
592
|
-
"#ff9800",
|
|
593
|
-
"#ff5722",
|
|
594
|
-
"#795548",
|
|
595
|
-
"#607d8b",
|
|
596
|
-
]` — Preset color swatches shown in the dialog
|
|
597
|
-
- `title?: string` — Dialog title
|
|
564
|
+
- `presets?: string[] = defaultColorPresets` — Preset color swatches shown in the dialog
|
|
565
|
+
- `title?: string` — Dialog title; defaults to the locale's `selectColor`
|
|
566
|
+
- `alpha?: boolean = false` — Adds an opacity slider and an alpha channel to the value
|
|
567
|
+
- `recent?: boolean = true` — Remember confirmed colors and show them above the presets (stored in localStorage, shared by every picker).
|
|
568
|
+
- `recentLimit?: number = 7` — How many recent colors to keep.
|
|
569
|
+
- `eyedropper?: boolean = true` — Show a button to pick a color from the screen, where the browser supports it (Chrome, Edge).
|
|
598
570
|
|
|
599
571
|
Events:
|
|
600
572
|
- `update:modelValue(string)` — Emitted when a color is confirmed — powers v-model. Only fires on confirm, not while dragging
|
|
@@ -917,6 +889,14 @@ export interface DragDropItem {
|
|
|
917
889
|
}
|
|
918
890
|
```
|
|
919
891
|
|
|
892
|
+
### MDragHandle
|
|
893
|
+
|
|
894
|
+
M3's drag handle: the capsule users drag to resize or move something, e.g. the divider between two panes. Port of Compose's `VerticalDragHandle`; it only draws the handle and its pressed/dragged look, the dragging itself is up to the parent (MSplitter uses it).
|
|
895
|
+
|
|
896
|
+
Props:
|
|
897
|
+
- `orientation?: "horizontal" | "vertical" = "vertical"` — `vertical` is a tall capsule for horizontal drags (between side-by-side panes); `horizontal` is a wide one for vertical drags.
|
|
898
|
+
- `dragging?: boolean = false` — Show the dragged look (the parent is dragging)
|
|
899
|
+
|
|
920
900
|
### MEmoji
|
|
921
901
|
|
|
922
902
|
Renders a single emoji character at a fixed pixel size, with optional accessible labeling.
|
|
@@ -1031,6 +1011,7 @@ Props:
|
|
|
1031
1011
|
- `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.
|
|
1032
1012
|
- `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.
|
|
1033
1013
|
- `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.
|
|
1014
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the FAB's content color
|
|
1034
1015
|
|
|
1035
1016
|
Events:
|
|
1036
1017
|
- `click(MouseEvent)` — Emitted when the FAB itself is clicked (not a speed-dial item)
|
|
@@ -1214,10 +1195,11 @@ Renders a Material Symbols Outlined glyph by name. Color follows the surrounding
|
|
|
1214
1195
|
Props:
|
|
1215
1196
|
- `name: string` — Material Symbol name (e.g. "settings", "favorite")
|
|
1216
1197
|
- `size?: number = 24` — Icon size in px
|
|
1198
|
+
- `filled?: boolean = false` — Filled glyph (the Material Symbols FILL axis), as M3 draws a selected icon
|
|
1217
1199
|
|
|
1218
1200
|
### MIconButton
|
|
1219
1201
|
|
|
1220
|
-
A button that shows only an icon — four visual styles, the same 5-tier expressive sizing as MButton.
|
|
1202
|
+
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.
|
|
1221
1203
|
|
|
1222
1204
|
Props:
|
|
1223
1205
|
- `icon: string` — Material Symbol icon name
|
|
@@ -1227,6 +1209,12 @@ Props:
|
|
|
1227
1209
|
- `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
|
|
1228
1210
|
- `disabled?: boolean = false` — Disables interaction
|
|
1229
1211
|
- `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
|
|
1212
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
1213
|
+
- `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
|
|
1214
|
+
- `checkedIcon?: string` — Icon shown while checked, when it differs from `icon` (e.g. 'pause' for 'play_arrow')
|
|
1215
|
+
|
|
1216
|
+
Events:
|
|
1217
|
+
- `update:checked(boolean)` — Emitted on click when `checked` is set — powers v-model:checked
|
|
1230
1218
|
|
|
1231
1219
|
### MInfiniteScroll
|
|
1232
1220
|
|
|
@@ -1569,7 +1557,7 @@ Props:
|
|
|
1569
1557
|
|
|
1570
1558
|
### MMenuItem
|
|
1571
1559
|
|
|
1572
|
-
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.
|
|
1560
|
+
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.
|
|
1573
1561
|
|
|
1574
1562
|
Props:
|
|
1575
1563
|
- `icon?: string` — Material Symbol icon name
|
|
@@ -1577,10 +1565,14 @@ Props:
|
|
|
1577
1565
|
- `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
|
|
1578
1566
|
- `disabled?: boolean = false` — Disables the item
|
|
1579
1567
|
- `danger?: boolean = false` — Danger/destructive styling (error color)
|
|
1580
|
-
- `keepOpen?: boolean
|
|
1568
|
+
- `keepOpen?: boolean` — Keep the menu open after this item is clicked. Defaults to true for `checked` items, false otherwise
|
|
1569
|
+
- `selected?: boolean` — Makes it one choice of several (radio-like): selected look while true. Leave unset for a plain item
|
|
1570
|
+
- `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
|
|
1571
|
+
- `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
|
|
1581
1572
|
|
|
1582
1573
|
Events:
|
|
1583
1574
|
- `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.
|
|
1575
|
+
- `update:checked(boolean)` — Emitted on click when `checked` is set, with the new value — powers v-model:checked
|
|
1584
1576
|
|
|
1585
1577
|
Slots:
|
|
1586
1578
|
- `#default` — Item label text.
|
|
@@ -2129,16 +2121,36 @@ export interface SchedulerEvent {
|
|
|
2129
2121
|
|
|
2130
2122
|
### MScrollable
|
|
2131
2123
|
|
|
2132
|
-
A constrained scroll area — vertical, horizontal, or both directions.
|
|
2124
|
+
A constrained scroll area — vertical, horizontal, or both directions. Shows the browser's scrollbar, or with `scrollbar="indicator"` M3's thin visual-only scrollbar (Compose's `Modifier.nonInteractiveScrollbar`), which appears while scrolling and fades out after.
|
|
2133
2125
|
|
|
2134
2126
|
Props:
|
|
2135
2127
|
- `direction?: "horizontal" | "vertical" | "both" = "vertical"` — Scroll direction
|
|
2136
2128
|
- `height?: string` — Fixed height (CSS value)
|
|
2137
2129
|
- `maxHeight?: string` — Maximum height (CSS value)
|
|
2130
|
+
- `scrollbar?: "none" | "native" | "indicator" = "native"` — `native`: the browser's scrollbar. `indicator`: M3's thin scrollbar, visual only (scroll with the wheel, touch or keys). `none`: no scrollbar at all.
|
|
2131
|
+
- `scrollbarFade?: boolean = true` — With `scrollbar="indicator"`: show it only while scrolling, fading out after (false keeps it visible)
|
|
2138
2132
|
|
|
2139
2133
|
Slots:
|
|
2140
2134
|
- `#default` — The scrolling content.
|
|
2141
2135
|
|
|
2136
|
+
### MScrollField
|
|
2137
|
+
|
|
2138
|
+
An endless wheel to pick a number or option by scrolling (M3 Expressive's ScrollField, a port of Compose's `ScrollField`): the centered item is the selected one. Drag, flick, use the mouse wheel, the arrow keys, or click an item. Put two side by side for a time (hours and minutes).
|
|
2139
|
+
|
|
2140
|
+
Props:
|
|
2141
|
+
- `modelValue: number` (v-model) — Index of the selected item, 0 to count - 1 (v-model)
|
|
2142
|
+
- `count: number` — Number of items; the wheel wraps around after the last one
|
|
2143
|
+
- `label?: string` — Accessible name of the field. Include the range when it isn't obvious ("Select year between 2000 and 2025"): the wheel wraps, so screen readers can't tell where it ends.
|
|
2144
|
+
- `format?: ((index: number) => string) = String(index).padStart(2, "0")` — Text for each item (also what screen readers announce). Defaults to the index with at least 2 digits.
|
|
2145
|
+
- `height?: number = 200` — Height in px; three items fit in the default 200 (ScrollFieldDefaults.ScrollFieldHeight)
|
|
2146
|
+
- `disabled?: boolean = false` — Disables the field
|
|
2147
|
+
|
|
2148
|
+
Events:
|
|
2149
|
+
- `update:modelValue(number)` — Emitted with the index of the centered item, as it changes while scrolling
|
|
2150
|
+
|
|
2151
|
+
Slots:
|
|
2152
|
+
- `#item { index: number; selected: boolean; }` — Custom content for each item, instead of the formatted number. Receives `{ index, selected }`.
|
|
2153
|
+
|
|
2142
2154
|
### MSearchBar
|
|
2143
2155
|
|
|
2144
2156
|
A collapsed search field that expands into a docked panel or a fullscreen overlay, with results shown below the input.
|
|
@@ -2459,6 +2471,7 @@ Props:
|
|
|
2459
2471
|
- `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Button size
|
|
2460
2472
|
- `disabled?: boolean = false` — Disables both parts
|
|
2461
2473
|
- `items?: SplitButtonItem[]` — Dropdown menu items; see `SplitButtonItem`
|
|
2474
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
2462
2475
|
|
|
2463
2476
|
Events:
|
|
2464
2477
|
- `click(MouseEvent)` — Emitted when the main (left) button is clicked
|
|
@@ -2477,7 +2490,7 @@ export interface SplitButtonItem {
|
|
|
2477
2490
|
|
|
2478
2491
|
### MSplitter
|
|
2479
2492
|
|
|
2480
|
-
Two resizable panels divided by a draggable handle.
|
|
2493
|
+
Two resizable panels divided by a draggable bar with M3's drag handle (MDragHandle) on it. The bar is also a keyboard separator: arrow keys move it (Shift for 10%), Home/End jump to the limits.
|
|
2481
2494
|
|
|
2482
2495
|
Props:
|
|
2483
2496
|
- `direction?: "horizontal" | "vertical" = "horizontal"` — Split direction
|
|
@@ -2616,6 +2629,33 @@ Slots:
|
|
|
2616
2629
|
- `#main { twoPane: boolean; }` — The main content
|
|
2617
2630
|
- `#supporting { twoPane: boolean; }` — Content that supports the main pane: related items, a summary, details, tools
|
|
2618
2631
|
|
|
2632
|
+
### MSwipeToDismiss
|
|
2633
|
+
|
|
2634
|
+
Content that can be swiped left or right to dismiss it, uncovering a background behind it (a port of Compose's `SwipeToDismissBox`), typically a list item with "archive" and "delete" behind. Once swiped away it stays there until you reset it (`v-model` back to `'settled'`, or `reset()`), so you decide what happens: remove the item, or undo.
|
|
2635
|
+
|
|
2636
|
+
Props:
|
|
2637
|
+
- `modelValue?: SwipeToDismissValue = "settled"` (v-model) — State (v-model): `'settled'`, or dismissed towards `'start-to-end'` / `'end-to-start'`. Set it to animate there.
|
|
2638
|
+
- `startToEnd?: boolean = true` — Allow dismissing by swiping in the reading direction (right in LTR)
|
|
2639
|
+
- `endToStart?: boolean = true` — Allow dismissing by swiping against the reading direction (left in LTR)
|
|
2640
|
+
- `disabled?: boolean = false` — Turns the swipe gesture off (setting v-model still works)
|
|
2641
|
+
- `threshold?: number = 56` — How far, in px, the content has to move before releasing dismisses it (SwipeToDismissBoxDefaults: 56dp)
|
|
2642
|
+
|
|
2643
|
+
Events:
|
|
2644
|
+
- `update:modelValue(SwipeToDismissValue)` — Emitted when it settles in a new state — powers v-model
|
|
2645
|
+
- `dismiss("start-to-end" | "end-to-start")` — Emitted with the direction when the content is swiped away
|
|
2646
|
+
|
|
2647
|
+
Slots:
|
|
2648
|
+
- `#background { direction: SwipeToDismissValue; target: SwipeToDismissValue; progress: number; }` — What the swipe uncovers. Receives `{ direction, target, progress }`: the side being swiped (`'start-to-end'`, `'end-to-start'` or `'settled'`), the state it would settle in if released now, and how far it has moved (0 to 1)
|
|
2649
|
+
- `#default` — The content that moves
|
|
2650
|
+
|
|
2651
|
+
Exposed (template ref):
|
|
2652
|
+
- `reset: () => void` — Animates back to `'settled'`
|
|
2653
|
+
- `dismiss: (dir: "start-to-end" | "end-to-start") => void` — Animates away in the given direction
|
|
2654
|
+
|
|
2655
|
+
```ts
|
|
2656
|
+
export type SwipeToDismissValue = 'settled' | 'start-to-end' | 'end-to-start'
|
|
2657
|
+
```
|
|
2658
|
+
|
|
2619
2659
|
### MSwitch
|
|
2620
2660
|
|
|
2621
2661
|
A toggle switch with an optional label, 4 semantic colors, and both M3 icon variants.
|
|
@@ -2691,6 +2731,7 @@ Props:
|
|
|
2691
2731
|
- `tabs: Tab[]` — Tab definitions
|
|
2692
2732
|
- `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.
|
|
2693
2733
|
- `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.
|
|
2734
|
+
- `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.
|
|
2694
2735
|
|
|
2695
2736
|
Events:
|
|
2696
2737
|
- `update:modelValue(string | number)` — Emitted with the value of the tab you picked.
|
|
@@ -2846,7 +2887,7 @@ Events:
|
|
|
2846
2887
|
|
|
2847
2888
|
### MTimePickerModal
|
|
2848
2889
|
|
|
2849
|
-
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.
|
|
2890
|
+
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.
|
|
2850
2891
|
|
|
2851
2892
|
Props:
|
|
2852
2893
|
- `modelValue: string | null = null` (v-model) — Selected time in HH:MM format (v-model)
|
|
@@ -2854,11 +2895,25 @@ Props:
|
|
|
2854
2895
|
- `use24h?: boolean = false` — Use 24-hour format (shows inner ring 13-23)
|
|
2855
2896
|
- `minuteStep?: number = 5` — Minute increment step
|
|
2856
2897
|
- `title?: string` — Dialog title
|
|
2898
|
+
- `mode?: "dial" | "scroll" = "dial"` — How the time is picked before switching to keyboard input: a clock `dial`, or `scroll` wheels (MTimeScroll)
|
|
2857
2899
|
|
|
2858
2900
|
Events:
|
|
2859
2901
|
- `update:modelValue(string | null)` — Emitted when a time is confirmed — powers v-model
|
|
2860
2902
|
- `update:show(boolean)` — Emitted when the dialog opens or closes — powers v-model:show
|
|
2861
2903
|
|
|
2904
|
+
### MTimeScroll
|
|
2905
|
+
|
|
2906
|
+
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.
|
|
2907
|
+
|
|
2908
|
+
Props:
|
|
2909
|
+
- `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)
|
|
2910
|
+
- `use24h?: boolean = false` — 24-hour wheel (00–23) instead of 1–12 with AM/PM
|
|
2911
|
+
- `minuteStep?: number = 1` — Minute increment step; the minute wheel shows only multiples of it
|
|
2912
|
+
- `disabled?: boolean = false` — Disables the wheels and the AM/PM toggle
|
|
2913
|
+
|
|
2914
|
+
Events:
|
|
2915
|
+
- `update:modelValue(string)` — Emitted with the time as HH:MM (24-hour) whenever a wheel or AM/PM changes
|
|
2916
|
+
|
|
2862
2917
|
### MTitle
|
|
2863
2918
|
|
|
2864
2919
|
Semantic heading component in three sizes — a thin wrapper around `MText` at medium weight.
|
|
@@ -2882,6 +2937,7 @@ Props:
|
|
|
2882
2937
|
- `disabled?: boolean = false` — Disables interaction
|
|
2883
2938
|
- `icon?: string` — Material Symbol icon name shown before the label
|
|
2884
2939
|
- `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Same 5-tier expressive sizing as MButton
|
|
2940
|
+
- `rippleColor?: string` — Any CSS color for the press ripple; defaults to the button's content color
|
|
2885
2941
|
|
|
2886
2942
|
Events:
|
|
2887
2943
|
- `update:checked(boolean)` — Emitted when clicked — powers v-model:checked
|
|
@@ -3004,6 +3060,18 @@ export interface TransferItem {
|
|
|
3004
3060
|
type Value = string | number
|
|
3005
3061
|
```
|
|
3006
3062
|
|
|
3063
|
+
### MTransition
|
|
3064
|
+
|
|
3065
|
+
M3's navigation transitions between two views (a port of Compose's `MaterialTransitions`): `shared-axis` slides the new view in from the side as the old one slides out (use `reverse` when going back), and `fade-through` fades the old view out and the new one in with a slight scale, for destinations without a spatial relationship such as navigation bar tabs. Wrap content that changes its `key` (or a `v-if`/`v-else` pair, or a `<RouterView>` slot's component); both views overlap while they animate.
|
|
3066
|
+
|
|
3067
|
+
Props:
|
|
3068
|
+
- `type?: "shared-axis" | "fade-through" = "shared-axis"` — `shared-axis` (horizontal, for forward/back navigation) or `fade-through` (unrelated destinations)
|
|
3069
|
+
- `reverse?: boolean = false` — Shared axis: play the backward transition (the new view comes from the start side)
|
|
3070
|
+
- `appear?: boolean = false` — Animate the first view too
|
|
3071
|
+
|
|
3072
|
+
Slots:
|
|
3073
|
+
- `#default` — The current view; give it a `key` that changes with it
|
|
3074
|
+
|
|
3007
3075
|
### MTree
|
|
3008
3076
|
|
|
3009
3077
|
A hierarchical tree view with expand/collapse, single-node selection, and optional cascading checkbox selection.
|
|
@@ -3017,8 +3085,8 @@ Props:
|
|
|
3017
3085
|
- `emptyText?: string` — Text shown when nodes is empty. Falls back to the app's configured locale's noItems string
|
|
3018
3086
|
|
|
3019
3087
|
Events:
|
|
3020
|
-
- `update:selected(string | number | null)` — Fires when a node is clicked, toggling selection (clicking the already-selected node clears it)
|
|
3021
3088
|
- `update:checked((string | number)[])` — Fires when a checkbox toggles a node (checkable mode)
|
|
3089
|
+
- `update:selected(string | number | null)` — Fires when a node is clicked, toggling selection (clicking the already-selected node clears it)
|
|
3022
3090
|
- `node-click(TreeNode)` — Fires whenever a node row is clicked, alongside update:selected
|
|
3023
3091
|
|
|
3024
3092
|
Exposed (template ref):
|
|
@@ -3172,6 +3240,8 @@ useColorPalette(): {
|
|
|
3172
3240
|
palette: Ref<string>
|
|
3173
3241
|
palettes: Palette[]
|
|
3174
3242
|
set: (id: string) => void
|
|
3243
|
+
seed: Readonly<Ref<{ readonly seed: string; readonly variant?: SchemeVariant; readonly contrast?: number; } | null>>
|
|
3244
|
+
setSeed: (seed: string, options?: SeedOptions) => Promise<void>
|
|
3175
3245
|
persistPalette: Ref<boolean>
|
|
3176
3246
|
setPersistPalette: (enabled: boolean) => void
|
|
3177
3247
|
}
|
|
@@ -3183,6 +3253,38 @@ useColorPalette(): {
|
|
|
3183
3253
|
palettes: Palette[]
|
|
3184
3254
|
```
|
|
3185
3255
|
|
|
3256
|
+
### SEED_PALETTE
|
|
3257
|
+
|
|
3258
|
+
The palette id used while a seed color is active (`useColorPalette().setSeed()`).
|
|
3259
|
+
|
|
3260
|
+
```ts
|
|
3261
|
+
SEED_PALETTE: "seed"
|
|
3262
|
+
```
|
|
3263
|
+
|
|
3264
|
+
### generateScheme
|
|
3265
|
+
|
|
3266
|
+
Generates the light and dark schemes for a seed color (`#rrggbb`).
|
|
3267
|
+
|
|
3268
|
+
```ts
|
|
3269
|
+
generateScheme(seed: string, options: SeedOptions = {}): Promise<GeneratedScheme>
|
|
3270
|
+
```
|
|
3271
|
+
|
|
3272
|
+
### schemeToCss
|
|
3273
|
+
|
|
3274
|
+
CSS for a scheme under `[data-palette='<id>']` (light) and `[data-palette='<id>'].dark`, like palettes.css.
|
|
3275
|
+
|
|
3276
|
+
```ts
|
|
3277
|
+
schemeToCss(scheme: GeneratedScheme, id: string): string
|
|
3278
|
+
```
|
|
3279
|
+
|
|
3280
|
+
### schemeRoles
|
|
3281
|
+
|
|
3282
|
+
The `--color-*` roles a generated scheme sets. `success*` is a library extension and stays as themed.
|
|
3283
|
+
|
|
3284
|
+
```ts
|
|
3285
|
+
schemeRoles: readonly ["primary", "on-primary", "primary-container", "on-primary-container", "secondary", "on-secondary", "secondary-container", "on-secondary-container", "tertiary", "on-tertiary", "tertiary-container", "on-tertiary-container", "error", "on-error", "error-container", "on-error-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", "inverse-surface", "inverse-on-surface", "inverse-primary", "scrim", "shadow", "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"]
|
|
3286
|
+
```
|
|
3287
|
+
|
|
3186
3288
|
### useToast
|
|
3187
3289
|
|
|
3188
3290
|
```ts
|
|
@@ -3290,6 +3392,14 @@ usePageProgress(): {
|
|
|
3290
3392
|
}
|
|
3291
3393
|
```
|
|
3292
3394
|
|
|
3395
|
+
### vRipple
|
|
3396
|
+
|
|
3397
|
+
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.
|
|
3398
|
+
|
|
3399
|
+
```ts
|
|
3400
|
+
vRipple: Directive<HTMLElement, RippleValue>
|
|
3401
|
+
```
|
|
3402
|
+
|
|
3293
3403
|
### emojiCategories
|
|
3294
3404
|
|
|
3295
3405
|
```ts
|
|
@@ -3353,7 +3463,24 @@ export interface M3UIOptions {
|
|
|
3353
3463
|
* `[data-palette='<id>'].dark { ... }` block, overriding the same tokens as `palettes.css`.
|
|
3354
3464
|
*/
|
|
3355
3465
|
customPalettes?: Palette[]
|
|
3466
|
+
/**
|
|
3467
|
+
* Generate the whole color scheme (light and dark) from one color instead of using a named palette: Google's
|
|
3468
|
+
* dynamic color, the way Android builds a theme from a wallpaper. `palette` wins when both are given, and like
|
|
3469
|
+
* `palette` it's only the first-visit default unless `persistPalette` is `false`.
|
|
3470
|
+
*/
|
|
3471
|
+
seed?: string
|
|
3472
|
+
/** How `seed` becomes a scheme: `variant` (`'tonal-spot'` by default) and `contrast` (0 standard, 0.5 medium, 1 high). */
|
|
3473
|
+
seedOptions?: SeedOptions
|
|
3356
3474
|
locale?: MaybeRef<Partial<M3Locale>>
|
|
3475
|
+
/**
|
|
3476
|
+
* Keep `<meta name="theme-color">` (the color phones give the browser bar and status bar) in sync with a color
|
|
3477
|
+
* role of the active palette, following palette, seed and dark mode changes. `'surface'` matches a top app
|
|
3478
|
+
* bar, as Material apps on Android do; any role name works (`'primary'`, `'surface-container'`…). Off by default:
|
|
3479
|
+
* when set, the library owns that meta (it's created if missing, and a light/dark `media` pair becomes one).
|
|
3480
|
+
* Note that Chrome and Samsung Internet on Android ignore it in a regular tab while the system is in dark
|
|
3481
|
+
* mode (they keep their own dark bar); installed apps (PWA) still get it.
|
|
3482
|
+
*/
|
|
3483
|
+
themeColor?: 'surface' | 'surface-container' | 'primary' | (string & {})
|
|
3357
3484
|
}
|
|
3358
3485
|
```
|
|
3359
3486
|
|
|
@@ -3365,10 +3492,55 @@ export type Theme = 'light' | 'dark' | 'system'
|
|
|
3365
3492
|
export interface Palette {
|
|
3366
3493
|
id: string
|
|
3367
3494
|
label: string
|
|
3495
|
+
/**
|
|
3496
|
+
* The palette's key color. A custom palette (`createM3UI({ customPalettes })`) with no CSS of its own gets its
|
|
3497
|
+
* scheme generated from it; one with `[data-palette='<id>']` rules keeps them.
|
|
3498
|
+
*/
|
|
3499
|
+
seed: string
|
|
3500
|
+
}
|
|
3501
|
+
```
|
|
3502
|
+
|
|
3503
|
+
```ts
|
|
3504
|
+
export interface ActiveSeed extends SeedOptions {
|
|
3368
3505
|
seed: string
|
|
3369
3506
|
}
|
|
3370
3507
|
```
|
|
3371
3508
|
|
|
3509
|
+
```ts
|
|
3510
|
+
// Dynamic color: a full M3 color scheme (light and dark) generated from one seed color with Google's
|
|
3511
|
+
// material-color-utilities (HCT, DynamicScheme). The package is loaded with a dynamic import, so apps that
|
|
3512
|
+
// never use a seed don't download it; it's bundled into the library (its 0.4.0 ESM build has an extensionless
|
|
3513
|
+
// import that Node can't resolve, which would break SSR and tests if it were left external).
|
|
3514
|
+
|
|
3515
|
+
export type SchemeVariant =
|
|
3516
|
+
| 'tonal-spot'
|
|
3517
|
+
| 'expressive'
|
|
3518
|
+
| 'vibrant'
|
|
3519
|
+
| 'fidelity'
|
|
3520
|
+
| 'content'
|
|
3521
|
+
| 'neutral'
|
|
3522
|
+
| 'monochrome'
|
|
3523
|
+
| 'rainbow'
|
|
3524
|
+
| 'fruit-salad'
|
|
3525
|
+
```
|
|
3526
|
+
|
|
3527
|
+
```ts
|
|
3528
|
+
export interface SeedOptions {
|
|
3529
|
+
/** How the seed spreads into the scheme. `tonal-spot` is Android's default (calm, seed-led). */
|
|
3530
|
+
variant?: SchemeVariant
|
|
3531
|
+
/** Contrast level: 0 standard, 0.5 medium, 1 high (-1 reduced). */
|
|
3532
|
+
contrast?: number
|
|
3533
|
+
}
|
|
3534
|
+
```
|
|
3535
|
+
|
|
3536
|
+
```ts
|
|
3537
|
+
/** Token name (as in `--color-<name>`) → hex, for each scheme. */
|
|
3538
|
+
export interface GeneratedScheme {
|
|
3539
|
+
light: Record<string, string>
|
|
3540
|
+
dark: Record<string, string>
|
|
3541
|
+
}
|
|
3542
|
+
```
|
|
3543
|
+
|
|
3372
3544
|
```ts
|
|
3373
3545
|
export interface Toast {
|
|
3374
3546
|
id: number
|
|
@@ -3447,12 +3619,30 @@ export interface M3Locale {
|
|
|
3447
3619
|
// Pickers
|
|
3448
3620
|
selectDate: string
|
|
3449
3621
|
selectTime: string
|
|
3622
|
+
timeHourSelection: string
|
|
3623
|
+
timeMinuteSelection: string
|
|
3624
|
+
timePeriodToggle: string
|
|
3625
|
+
timeToggleKeyboard: string
|
|
3626
|
+
timeToggleDial: string
|
|
3627
|
+
timeToggleScroll: string
|
|
3450
3628
|
selectRange: string
|
|
3451
3629
|
pickStart: string
|
|
3452
3630
|
pickEnd: string
|
|
3453
3631
|
previousMonth: string
|
|
3454
3632
|
nextMonth: string
|
|
3455
3633
|
|
|
3634
|
+
// Color picker
|
|
3635
|
+
selectColor: string
|
|
3636
|
+
colorHue: string
|
|
3637
|
+
colorSaturation: string
|
|
3638
|
+
colorBrightness: string
|
|
3639
|
+
colorAlpha: string
|
|
3640
|
+
colorEyedropper: string
|
|
3641
|
+
colorOriginal: string
|
|
3642
|
+
colorFormat: string
|
|
3643
|
+
colorRecent: string
|
|
3644
|
+
colorPresets: string
|
|
3645
|
+
|
|
3456
3646
|
// Scheduler
|
|
3457
3647
|
dayView: string
|
|
3458
3648
|
weekView: string
|
|
@@ -3633,8 +3823,24 @@ export interface NotificationOptions {
|
|
|
3633
3823
|
}
|
|
3634
3824
|
```
|
|
3635
3825
|
|
|
3826
|
+
```ts
|
|
3827
|
+
/** Options for `v-ripple`. */
|
|
3828
|
+
export interface RippleOptions {
|
|
3829
|
+
/** No ripple while true (e.g. bound to the element's disabled state). */
|
|
3830
|
+
disabled?: boolean
|
|
3831
|
+
/** Any CSS color for the ripple; defaults to the element's text color (`currentColor`). */
|
|
3832
|
+
color?: string
|
|
3833
|
+
}
|
|
3834
|
+
```
|
|
3835
|
+
|
|
3836
|
+
```ts
|
|
3837
|
+
/** `v-ripple` value: nothing or `true` (on), `false` (off), a CSS color, or an options object. */
|
|
3838
|
+
export type RippleValue = boolean | string | RippleOptions | null | undefined
|
|
3839
|
+
```
|
|
3840
|
+
|
|
3636
3841
|
```ts
|
|
3637
3842
|
// Generated by scripts/generate-emoji-data.mjs from Unicode emoji-test.txt (Emoji 15). Don't edit by hand.
|
|
3843
|
+
// Emoji data © Unicode, Inc., under the Unicode License v3 (dist/THIRD_PARTY_LICENSES.md, scripts/licenses/unicode-license-v3.txt).
|
|
3638
3844
|
|
|
3639
3845
|
export interface EmojiCategory {
|
|
3640
3846
|
id: string
|
|
@@ -3650,12 +3856,12 @@ export interface EmojiCategory {
|
|
|
3650
3856
|
`M3Locale` keys (pass a partial object to `createM3UI({ locale })`; presets from `@m3ui-vue/m3ui-vue/locales`:
|
|
3651
3857
|
`esLocale`, `frLocale`, `ptLocale`, `deLocale`, `jaLocale`, `zhLocale`, `koLocale`):
|
|
3652
3858
|
|
|
3653
|
-
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, 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
|
|
3859
|
+
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, 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
|
|
3654
3860
|
|
|
3655
3861
|
## Theme tokens
|
|
3656
3862
|
|
|
3657
|
-
- 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, 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
|
|
3658
|
-
- 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
|
|
3659
|
-
- Radius (`rounded-*`): xs, sm, md, lg, xl
|
|
3660
|
-
- Shadows (`shadow-*`): elevation-1, elevation-2, elevation-3, elevation-4
|
|
3863
|
+
- 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
|
|
3864
|
+
- 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
|
|
3865
|
+
- Radius (`rounded-*`): xs, sm, md, lg, xl, lg-increased, xl-increased, xxl
|
|
3866
|
+
- Shadows (`shadow-*`): elevation-1, elevation-2, elevation-3, elevation-4, elevation-5
|
|
3661
3867
|
- 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
|