@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/README.md
CHANGED
|
@@ -219,6 +219,7 @@ const name = ref('')
|
|
|
219
219
|
| `useNotification()` | Rich notifications; mounts its own host, nothing to place |
|
|
220
220
|
| `MDialog` / `MConfirmDialog` | Modal dialogs |
|
|
221
221
|
| `MBottomSheet` | Bottom sheet |
|
|
222
|
+
| `MBottomSheetScaffold` | Standard (non-modal) bottom sheet over a screen, peeking until dragged up |
|
|
222
223
|
| `MSideSheet` | Side sheet |
|
|
223
224
|
| `MProgressBar` | Linear progress |
|
|
224
225
|
| `MCircleProgressBar` | Circular progress (circle or wavy variant) |
|
|
@@ -246,8 +247,10 @@ const name = ref('')
|
|
|
246
247
|
| `MShortNavigationBar` | M3 Expressive's shorter (64dp) navigation bar — `equal` or `centered` item arrangement, `top` or `start` icon position |
|
|
247
248
|
| `MNavigationRail` | Side navigation rail |
|
|
248
249
|
| `MNavigationDrawer` | Collapsible side drawer |
|
|
249
|
-
| `MTopAppBar` / `MAppBar` | Top app bar |
|
|
250
|
-
| `
|
|
250
|
+
| `MTopAppBar` / `MAppBar` | Top app bar: small, center-aligned, medium, large and the flexible ones, with scroll behaviors |
|
|
251
|
+
| `MBottomAppBar` | Bottom app bar with actions and a FAB, or the Expressive flexible one; can hide on scroll |
|
|
252
|
+
| `MAppBarWithSearch` | Top app bar with a search bar in place of the title (or only the search field) |
|
|
253
|
+
| `MSearchBar` | M3 search bar — docked (dropdown-style), fullscreen or contained fullscreen expansion, drop it anywhere including a `MTopAppBar` title slot |
|
|
251
254
|
| `MToolbar` | Action toolbar |
|
|
252
255
|
|
|
253
256
|
### Layout
|
|
@@ -354,6 +357,9 @@ UI components come from @m3ui-vue/m3ui-vue; its API is in node_modules/@m3ui-vue
|
|
|
354
357
|
| `useDevice()` | Responsive breakpoint detection |
|
|
355
358
|
| `useWindowSizeClass()` | M3 width/height size classes (compact → extra-large) for the window or any element |
|
|
356
359
|
| `usePageProgress()` | Shared state for `MPageProgress`'s `start()`/`set()`/`done()` — drive it by hand or let the component auto-wire vue-router |
|
|
360
|
+
| `useSpring()` | Animate numbers on a real spring with M3's motion specs (`motionSprings`), like the components do |
|
|
361
|
+
|
|
362
|
+
**Motion tokens:** M3's easings are Tailwind `ease-*` utilities (`ease-emphasized`, `ease-emphasized-decelerate`…) and its durations CSS variables (`duration-(--duration-medium-2)`); in JS, `motionSprings` (Standard and Expressive), `motionEasings`, `motionDurations` and `cubicBezier()`.
|
|
357
363
|
|
|
358
364
|
## Color Palettes
|
|
359
365
|
|
|
@@ -361,6 +367,22 @@ UI components come from @m3ui-vue/m3ui-vue; its API is in node_modules/@m3ui-vue
|
|
|
361
367
|
|
|
362
368
|
`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
369
|
|
|
370
|
+
### Contrast levels
|
|
371
|
+
|
|
372
|
+
Medium and high contrast for every palette (light and dark), as in Android's accessibility settings: import the
|
|
373
|
+
optional stylesheet after `palettes`, then pick a level.
|
|
374
|
+
|
|
375
|
+
```css
|
|
376
|
+
@import '@m3ui-vue/m3ui-vue/palettes-contrast'; /* ~27 KB gzipped */
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
```ts
|
|
380
|
+
app.use(createM3UI({ contrast: 'system' })) // 'standard' | 'medium' | 'high' | 'system' (follows prefers-contrast)
|
|
381
|
+
useColorPalette().setContrast('high') // at runtime, remembered like the palette
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
A seed palette is regenerated at the chosen level, with or without the stylesheet.
|
|
385
|
+
|
|
364
386
|
### Dynamic Color (from a seed)
|
|
365
387
|
|
|
366
388
|
Instead of a named palette, generate the whole scheme (light and dark) from one color with Google's dynamic color algorithm:
|
|
@@ -435,33 +457,6 @@ Install only the packages you need:
|
|
|
435
457
|
| `MQRCode` | `qrcode-generator` |
|
|
436
458
|
| `MBarcode` | `jsbarcode` |
|
|
437
459
|
|
|
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
|
-
|
|
465
460
|
## About this project
|
|
466
461
|
|
|
467
462
|
M3UI Vue started as a set of components I built for my own projects. Over time it grew
|
|
@@ -484,3 +479,5 @@ Thanks for using it! ⭐ Starring the repo is also a nice way to show support.
|
|
|
484
479
|
## License
|
|
485
480
|
|
|
486
481
|
MIT
|
|
482
|
+
|
|
483
|
+
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.
|