@m3ui-vue/m3ui-vue 0.8.1 → 0.8.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 +34 -2
- package/dist/{MMenuItem-CDWfeU4F.js → MMenuItem-DiilFeDO.js} +334 -165
- package/dist/MMenuItem-DiilFeDO.js.map +1 -0
- 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/MContextMenu.vue.d.ts +25 -4
- package/dist/components/MMenu.vue.d.ts +20 -2
- package/dist/components/MMenuDivider.vue.d.ts +13 -1
- package/dist/components/MMenuItem.vue.d.ts +3 -0
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +4007 -3874
- 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 +8 -8
- 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/MCommandPalette.vue +4 -0
- package/src/components/MContextMenu.vue +296 -15
- package/src/components/MMarkdown.vue +1 -1
- package/src/components/MMenu.vue +315 -21
- package/src/components/MMenuDivider.vue +16 -0
- package/src/components/MMenuItem.vue +60 -18
- package/src/components/MSpotlightSearch.vue +6 -0
- package/src/styles/theme.css +1 -0
- package/dist/MMenuItem-CDWfeU4F.js.map +0 -1
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
|
|