@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/dist/plugin.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { App, MaybeRef } from 'vue';
|
|
2
2
|
import type { Palette } from './composables/useColorPalette';
|
|
3
|
+
import type { SeedOptions } from './composables/dynamicColor';
|
|
3
4
|
import type { M3Locale } from './composables/useLocale';
|
|
4
5
|
export interface M3UIOptions {
|
|
5
6
|
palette?: string;
|
|
@@ -19,7 +20,24 @@ export interface M3UIOptions {
|
|
|
19
20
|
* `[data-palette='<id>'].dark { ... }` block, overriding the same tokens as `palettes.css`.
|
|
20
21
|
*/
|
|
21
22
|
customPalettes?: Palette[];
|
|
23
|
+
/**
|
|
24
|
+
* Generate the whole color scheme (light and dark) from one color instead of using a named palette: Google's
|
|
25
|
+
* dynamic color, the way Android builds a theme from a wallpaper. `palette` wins when both are given, and like
|
|
26
|
+
* `palette` it's only the first-visit default unless `persistPalette` is `false`.
|
|
27
|
+
*/
|
|
28
|
+
seed?: string;
|
|
29
|
+
/** How `seed` becomes a scheme: `variant` (`'tonal-spot'` by default) and `contrast` (0 standard, 0.5 medium, 1 high). */
|
|
30
|
+
seedOptions?: SeedOptions;
|
|
22
31
|
locale?: MaybeRef<Partial<M3Locale>>;
|
|
32
|
+
/**
|
|
33
|
+
* Keep `<meta name="theme-color">` (the color phones give the browser bar and status bar) in sync with a color
|
|
34
|
+
* role of the active palette, following palette, seed and dark mode changes. `'surface'` matches a top app
|
|
35
|
+
* bar, as Material apps on Android do; any role name works (`'primary'`, `'surface-container'`…). Off by default:
|
|
36
|
+
* when set, the library owns that meta (it's created if missing, and a light/dark `media` pair becomes one).
|
|
37
|
+
* Note that Chrome and Samsung Internet on Android ignore it in a regular tab while the system is in dark
|
|
38
|
+
* mode (they keep their own dark bar); installed apps (PWA) still get it.
|
|
39
|
+
*/
|
|
40
|
+
themeColor?: 'surface' | 'surface-container' | 'primary' | (string & {});
|
|
23
41
|
}
|
|
24
42
|
export declare function createM3UI(options?: M3UIOptions): {
|
|
25
43
|
install(app: App): void;
|
package/dist/rich-text-editor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as e } from "./useLocale-
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
1
|
+
import { i as e } from "./useLocale-Cn9MVIdw.js";
|
|
2
|
+
import { a as t, n, o as r, r as i, t as a } from "./MTextField-DKtgPymd.js";
|
|
3
|
+
import { t as o } from "./MIcon-DLOkQduI.js";
|
|
4
4
|
import { t as s } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
5
5
|
import { Fragment as c, computed as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, ref as x, renderList as S, shallowRef as C, toDisplayString as w, watch as T, withCtx as E, withKeys as D } from "vue";
|
|
6
6
|
//#region src/components/MRichTextEditor.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -197,25 +197,25 @@ var O = {
|
|
|
197
197
|
}
|
|
198
198
|
return (e, l) => (b(), d("div", { class: g(["overflow-hidden rounded-lg border transition-colors duration-150", s.disabled ? "border-outline-variant/50 opacity-60" : "border-outline-variant focus-within:border-primary"]) }, [
|
|
199
199
|
R.value ? (b(), d("div", O, [
|
|
200
|
-
m(
|
|
201
|
-
trigger: E(() => [f("button", k, [p(w(K.value) + " ", 1), m(
|
|
200
|
+
m(i, { align: "left" }, {
|
|
201
|
+
trigger: E(() => [f("button", k, [p(w(K.value) + " ", 1), m(o, {
|
|
202
202
|
name: "arrow_drop_down",
|
|
203
203
|
size: 20
|
|
204
204
|
})])]),
|
|
205
205
|
default: E(() => [
|
|
206
|
-
m(
|
|
206
|
+
m(n, { onClick: l[0] ||= (e) => q(0) }, {
|
|
207
207
|
default: E(() => [p(w(I.value.paragraph), 1)]),
|
|
208
208
|
_: 1
|
|
209
209
|
}),
|
|
210
|
-
m(
|
|
210
|
+
m(n, { onClick: l[1] ||= (e) => q(1) }, {
|
|
211
211
|
default: E(() => [p(w(I.value.heading1), 1)]),
|
|
212
212
|
_: 1
|
|
213
213
|
}),
|
|
214
|
-
m(
|
|
214
|
+
m(n, { onClick: l[2] ||= (e) => q(2) }, {
|
|
215
215
|
default: E(() => [p(w(I.value.heading2), 1)]),
|
|
216
216
|
_: 1
|
|
217
217
|
}),
|
|
218
|
-
m(
|
|
218
|
+
m(n, { onClick: l[3] ||= (e) => q(3) }, {
|
|
219
219
|
default: E(() => [p(w(I.value.heading3), 1)]),
|
|
220
220
|
_: 1
|
|
221
221
|
})
|
|
@@ -223,23 +223,23 @@ var O = {
|
|
|
223
223
|
_: 1
|
|
224
224
|
}),
|
|
225
225
|
l[10] ||= f("div", { class: "mx-1 h-6 w-px bg-outline-variant" }, null, -1),
|
|
226
|
-
(b(!0), d(c, null, S(V.value, (e,
|
|
226
|
+
(b(!0), d(c, null, S(V.value, (e, t) => (b(), d(c, { key: t }, [(b(!0), d(c, null, S(e, (e) => (b(), d("button", {
|
|
227
227
|
key: e.icon,
|
|
228
228
|
type: "button",
|
|
229
229
|
title: e.label,
|
|
230
230
|
class: g(["flex h-8 w-8 cursor-pointer items-center justify-center rounded transition-colors duration-100", e.active?.() ? "bg-secondary-container text-on-secondary-container" : "text-on-surface-variant hover:bg-on-surface/8"]),
|
|
231
231
|
onClick: e.action
|
|
232
|
-
}, [m(
|
|
232
|
+
}, [m(o, {
|
|
233
233
|
name: e.icon,
|
|
234
234
|
size: 20
|
|
235
|
-
}, null, 8, ["name"])], 10, A))), 128)),
|
|
235
|
+
}, null, 8, ["name"])], 10, A))), 128)), t < V.value.length - 1 ? (b(), d("div", j)) : u("", !0)], 64))), 128)),
|
|
236
236
|
l[11] ||= f("div", { class: "mx-1 h-6 w-px bg-outline-variant" }, null, -1),
|
|
237
237
|
f("button", {
|
|
238
238
|
type: "button",
|
|
239
239
|
title: I.value.link,
|
|
240
240
|
class: "flex h-8 w-8 cursor-pointer items-center justify-center rounded text-on-surface-variant transition-colors hover:bg-on-surface/8",
|
|
241
241
|
onClick: J
|
|
242
|
-
}, [m(
|
|
242
|
+
}, [m(o, {
|
|
243
243
|
name: "link",
|
|
244
244
|
size: 20
|
|
245
245
|
})], 8, M),
|
|
@@ -248,7 +248,7 @@ var O = {
|
|
|
248
248
|
title: I.value.image,
|
|
249
249
|
class: "flex h-8 w-8 cursor-pointer items-center justify-center rounded text-on-surface-variant transition-colors hover:bg-on-surface/8",
|
|
250
250
|
onClick: X
|
|
251
|
-
}, [m(
|
|
251
|
+
}, [m(o, {
|
|
252
252
|
name: "image",
|
|
253
253
|
size: 20
|
|
254
254
|
})], 8, N)
|
|
@@ -259,22 +259,22 @@ var O = {
|
|
|
259
259
|
class: "rte-content bg-surface px-4 py-3 text-body-large text-on-surface",
|
|
260
260
|
style: _({ minHeight: s.minHeight })
|
|
261
261
|
}, null, 4),
|
|
262
|
-
m(
|
|
262
|
+
m(t, {
|
|
263
263
|
modelValue: H.value,
|
|
264
264
|
"onUpdate:modelValue": l[6] ||= (e) => H.value = e,
|
|
265
265
|
title: I.value.insertLink
|
|
266
266
|
}, {
|
|
267
|
-
actions: E(() => [m(
|
|
267
|
+
actions: E(() => [m(r, {
|
|
268
268
|
variant: "text",
|
|
269
269
|
onClick: l[5] ||= (e) => H.value = !1
|
|
270
270
|
}, {
|
|
271
271
|
default: E(() => [p(w(I.value.cancel), 1)]),
|
|
272
272
|
_: 1
|
|
273
|
-
}), m(
|
|
273
|
+
}), m(r, { onClick: Y }, {
|
|
274
274
|
default: E(() => [p(w(I.value.insert), 1)]),
|
|
275
275
|
_: 1
|
|
276
276
|
})]),
|
|
277
|
-
default: E(() => [m(
|
|
277
|
+
default: E(() => [m(a, {
|
|
278
278
|
modelValue: U.value,
|
|
279
279
|
"onUpdate:modelValue": l[4] ||= (e) => U.value = e,
|
|
280
280
|
label: "URL",
|
|
@@ -283,22 +283,22 @@ var O = {
|
|
|
283
283
|
}, null, 8, ["modelValue"])]),
|
|
284
284
|
_: 1
|
|
285
285
|
}, 8, ["modelValue", "title"]),
|
|
286
|
-
m(
|
|
286
|
+
m(t, {
|
|
287
287
|
modelValue: W.value,
|
|
288
288
|
"onUpdate:modelValue": l[9] ||= (e) => W.value = e,
|
|
289
289
|
title: I.value.insertImage
|
|
290
290
|
}, {
|
|
291
|
-
actions: E(() => [m(
|
|
291
|
+
actions: E(() => [m(r, {
|
|
292
292
|
variant: "text",
|
|
293
293
|
onClick: l[8] ||= (e) => W.value = !1
|
|
294
294
|
}, {
|
|
295
295
|
default: E(() => [p(w(I.value.cancel), 1)]),
|
|
296
296
|
_: 1
|
|
297
|
-
}), m(
|
|
297
|
+
}), m(r, { onClick: Z }, {
|
|
298
298
|
default: E(() => [p(w(I.value.insert), 1)]),
|
|
299
299
|
_: 1
|
|
300
300
|
})]),
|
|
301
|
-
default: E(() => [m(
|
|
301
|
+
default: E(() => [m(a, {
|
|
302
302
|
modelValue: G.value,
|
|
303
303
|
"onUpdate:modelValue": l[7] ||= (e) => G.value = e,
|
|
304
304
|
label: I.value.imageUrlLabel,
|