@m3ui-vue/m3ui-vue 0.8.2 → 0.8.4
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 +53 -2
- package/dist/{MMenuItem-BAWmUTT3.js → MMenuItem-DiilFeDO.js} +6 -3
- package/dist/{MMenuItem-BAWmUTT3.js.map → MMenuItem-DiilFeDO.js.map} +1 -1
- package/dist/chart.js +22 -9
- package/dist/chart.js.map +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MDataTable.vue.d.ts +6 -0
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +1073 -1066
- package/dist/m3ui.js.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/styles/theme.css +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/MChart.vue +12 -8
- package/src/components/MCircleProgressBar.vue +1 -1
- package/src/components/MCodeEditor.vue +3 -1
- package/src/components/MContextMenu.vue +9 -2
- package/src/components/MDataTable.vue +9 -3
- package/src/components/MMarkdown.vue +1 -1
- package/src/components/MMenu.vue +8 -2
- package/src/styles/theme.css +1 -0
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ pnpm add @m3ui-vue/m3ui-vue
|
|
|
38
38
|
|
|
39
39
|
```html
|
|
40
40
|
<link
|
|
41
|
-
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap"
|
|
41
|
+
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Mono:wght@400&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap"
|
|
42
42
|
rel="stylesheet"
|
|
43
43
|
/>
|
|
44
44
|
```
|
|
@@ -53,7 +53,39 @@ pnpm add material-symbols
|
|
|
53
53
|
@import 'material-symbols/outlined.css';
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
`material-symbols` is listed as an optional peer dependency for this reason.
|
|
56
|
+
`material-symbols` is listed as an optional peer dependency for this reason. For the text fonts, [`@fontsource/roboto`](https://www.npmjs.com/package/@fontsource/roboto) and [`@fontsource/roboto-mono`](https://www.npmjs.com/package/@fontsource/roboto-mono) do the same job:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pnpm add @fontsource/roboto @fontsource/roboto-mono
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```css
|
|
63
|
+
@import '@fontsource/roboto/400.css';
|
|
64
|
+
@import '@fontsource/roboto/500.css';
|
|
65
|
+
@import '@fontsource/roboto/700.css';
|
|
66
|
+
@import '@fontsource/roboto-mono/400.css';
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Roboto isn't required — without it, text falls back to `system-ui`.
|
|
70
|
+
|
|
71
|
+
#### Using a different font
|
|
72
|
+
|
|
73
|
+
Every component reads its typeface from two tokens in `theme.css`: `--font-sans` (default `'Roboto', system-ui, …`) and `--font-mono` (default `'Roboto Mono', ui-monospace, …`, used by `MCodeEditor` and `MMarkdown` code). Override them after importing the theme, and load the font yourself (CDN, `@fontsource/*`, or your own `@font-face`):
|
|
74
|
+
|
|
75
|
+
```css
|
|
76
|
+
@import '@m3ui-vue/m3ui-vue/theme';
|
|
77
|
+
|
|
78
|
+
@theme {
|
|
79
|
+
--font-sans: 'Inter', system-ui, sans-serif;
|
|
80
|
+
--font-mono: 'JetBrains Mono', ui-monospace, monospace;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
To switch at runtime, set the variable on `<html>` — components (including `MChart`'s canvas) pick it up live:
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
document.documentElement.style.setProperty('--font-sans', "'Inter', system-ui, sans-serif")
|
|
88
|
+
```
|
|
57
89
|
|
|
58
90
|
### CSS
|
|
59
91
|
|
|
@@ -365,6 +397,25 @@ Install only the packages you need:
|
|
|
365
397
|
| `MQRCode` | `qrcode-generator` |
|
|
366
398
|
| `MBarcode` | `jsbarcode` |
|
|
367
399
|
|
|
400
|
+
## About this project
|
|
401
|
+
|
|
402
|
+
M3UI Vue started as a set of components I built for my own projects. Over time it grew
|
|
403
|
+
into something I thought others might find useful, so I decided to open-source it and
|
|
404
|
+
keep improving it so anyone can use it for free.
|
|
405
|
+
|
|
406
|
+
That said, this is a personal project maintained in my spare time. I can't offer
|
|
407
|
+
round-the-clock support or guarantee response times, and features are prioritized
|
|
408
|
+
around what I need and what I have time for.
|
|
409
|
+
|
|
410
|
+
**Contributions are very welcome:**
|
|
411
|
+
|
|
412
|
+
- **Found a bug?** [Open an issue](https://github.com/SrWither/m3ui-vue/issues) with steps
|
|
413
|
+
to reproduce it (a minimal example helps a lot).
|
|
414
|
+
- **Want to fix something or add a feature?** Pull requests are appreciated. For larger
|
|
415
|
+
changes, opening an issue first to discuss the idea is a good way to avoid wasted effort.
|
|
416
|
+
|
|
417
|
+
Thanks for using it! ⭐ Starring the repo is also a nice way to show support.
|
|
418
|
+
|
|
368
419
|
## License
|
|
369
420
|
|
|
370
421
|
MIT
|
|
@@ -808,7 +808,10 @@ var re = "relative inline-flex shrink-0 items-center justify-center overflow-hid
|
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
810
|
function se(e) {
|
|
811
|
-
|
|
811
|
+
if (!U.value) return;
|
|
812
|
+
let t = e.target;
|
|
813
|
+
for (let e of q) if (e.contains(t)) return;
|
|
814
|
+
t.closest?.(".m3-submenu") || Q();
|
|
812
815
|
}
|
|
813
816
|
function ce(e) {
|
|
814
817
|
if (e.key === "Escape") {
|
|
@@ -843,7 +846,7 @@ var re = "relative inline-flex shrink-0 items-center justify-center overflow-hid
|
|
|
843
846
|
transformOrigin: ue.value
|
|
844
847
|
})
|
|
845
848
|
}, [u("div", { class: g(["overflow-hidden", [e.variant === "expressive" ? "rounded-lg" : "rounded-xs", k.value ? "" : "bg-surface-container"]]) }, [u("div", {
|
|
846
|
-
class: "relative overflow-y-auto py-1",
|
|
849
|
+
class: "relative overflow-y-auto overscroll-contain py-1",
|
|
847
850
|
style: _({ maxHeight: K.value.maxHeight })
|
|
848
851
|
}, [f(a, {
|
|
849
852
|
css: !1,
|
|
@@ -1006,4 +1009,4 @@ var re = "relative inline-flex shrink-0 items-center justify-center overflow-hid
|
|
|
1006
1009
|
//#endregion
|
|
1007
1010
|
export { se as a, H as c, le as i, V as l, we as n, G as o, ve as r, U as s, Oe as t, R as u };
|
|
1008
1011
|
|
|
1009
|
-
//# sourceMappingURL=MMenuItem-
|
|
1012
|
+
//# sourceMappingURL=MMenuItem-DiilFeDO.js.map
|