@m3ui-vue/m3ui-vue 0.9.2 → 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.
Files changed (91) hide show
  1. package/README.md +2 -0
  2. package/dist/API.md +69 -8
  3. package/dist/{MIcon-CaEooCmZ.js → MIcon-DLOkQduI.js} +10 -3
  4. package/dist/MIcon-DLOkQduI.js.map +1 -0
  5. package/dist/{MTextField-Ck0oWDMk.js → MTextField-DKtgPymd.js} +416 -206
  6. package/dist/MTextField-DKtgPymd.js.map +1 -0
  7. package/dist/THIRD_PARTY_LICENSES.md +547 -0
  8. package/dist/api.json +1 -1
  9. package/dist/code-editor.js +2 -2
  10. package/dist/components/MButton.vue.d.ts +4 -2
  11. package/dist/components/MButtonGroup.vue.d.ts +2 -0
  12. package/dist/components/MFab.vue.d.ts +4 -2
  13. package/dist/components/MIcon.vue.d.ts +3 -0
  14. package/dist/components/MIconButton.vue.d.ts +15 -1
  15. package/dist/components/MMenuItem.vue.d.ts +17 -4
  16. package/dist/components/MSplitButton.vue.d.ts +2 -0
  17. package/dist/components/MTabs.vue.d.ts +6 -0
  18. package/dist/components/MTimePickerModal.vue.d.ts +3 -0
  19. package/dist/components/MTimeScroll.vue.d.ts +22 -0
  20. package/dist/components/MToggleButton.vue.d.ts +2 -0
  21. package/dist/components/MTree.vue.d.ts +2 -2
  22. package/dist/components/_MDrawerItemList.vue.d.ts +3 -0
  23. package/dist/composables/_useSpring.d.ts +2 -0
  24. package/dist/composables/useLocale.d.ts +6 -0
  25. package/dist/directives/vRipple.d.ts +16 -0
  26. package/dist/emoji-names-de-BphO5XpV.js.map +1 -1
  27. package/dist/emoji-names-en-9ZvMRvzi.js.map +1 -1
  28. package/dist/emoji-names-es-DvfWU3Pj.js.map +1 -1
  29. package/dist/emoji-names-fr-B-jhUlsP.js.map +1 -1
  30. package/dist/emoji-names-ja-l8cMFJo1.js.map +1 -1
  31. package/dist/emoji-names-ko-YP-o9G0c.js.map +1 -1
  32. package/dist/emoji-names-pt-DGj_Js4M.js.map +1 -1
  33. package/dist/emoji-names-zh-Dzecwtw_.js.map +1 -1
  34. package/dist/index.d.ts +3 -0
  35. package/dist/locales/index.js +42 -0
  36. package/dist/locales/index.js.map +1 -1
  37. package/dist/m3ui-vue.css +1 -1
  38. package/dist/m3ui.js +5741 -5634
  39. package/dist/m3ui.js.map +1 -1
  40. package/dist/rich-text-editor.js +22 -22
  41. package/dist/styles/theme.css +13 -0
  42. package/dist/styles.css +1 -1
  43. package/dist/terminal.js +1 -1
  44. package/dist/{useLocale-CFW8cIzL.js → useLocale-Cn9MVIdw.js} +7 -1
  45. package/dist/useLocale-Cn9MVIdw.js.map +1 -0
  46. package/package.json +2 -2
  47. package/src/__tests__/MIconButton.test.ts +60 -0
  48. package/src/__tests__/MMenuItem.test.ts +84 -0
  49. package/src/__tests__/MScrollField.test.ts +28 -0
  50. package/src/__tests__/MTabs.test.ts +39 -0
  51. package/src/__tests__/MTimePickerModal.test.ts +52 -0
  52. package/src/__tests__/MTimeScroll.test.ts +44 -0
  53. package/src/__tests__/vRipple.test.ts +92 -0
  54. package/src/components/MButton.vue +4 -13
  55. package/src/components/MButtonGroup.vue +4 -11
  56. package/src/components/MFab.vue +8 -15
  57. package/src/components/MIcon.vue +4 -2
  58. package/src/components/MIconButton.vue +96 -24
  59. package/src/components/MMenuItem.vue +115 -13
  60. package/src/components/MScrollField.vue +10 -2
  61. package/src/components/MSplitButton.vue +5 -12
  62. package/src/components/MTabs.vue +16 -5
  63. package/src/components/MTimePickerModal.vue +48 -8
  64. package/src/components/MTimeScroll.vue +161 -0
  65. package/src/components/MToggleButton.vue +5 -12
  66. package/src/composables/_carouselStrategy.ts +3 -0
  67. package/src/composables/_useSpring.ts +2 -0
  68. package/src/composables/useLocale.ts +12 -0
  69. package/src/data/emoji-names/emoji-names-de.ts +1 -0
  70. package/src/data/emoji-names/emoji-names-en.ts +1 -0
  71. package/src/data/emoji-names/emoji-names-es.ts +1 -0
  72. package/src/data/emoji-names/emoji-names-fr.ts +1 -0
  73. package/src/data/emoji-names/emoji-names-ja.ts +1 -0
  74. package/src/data/emoji-names/emoji-names-ko.ts +1 -0
  75. package/src/data/emoji-names/emoji-names-pt.ts +1 -0
  76. package/src/data/emoji-names/emoji-names-zh.ts +1 -0
  77. package/src/data/emojis.ts +1 -0
  78. package/src/directives/vRipple.ts +73 -0
  79. package/src/index.ts +5 -0
  80. package/src/locales/de.ts +6 -0
  81. package/src/locales/es.ts +6 -0
  82. package/src/locales/fr.ts +6 -0
  83. package/src/locales/ja.ts +6 -0
  84. package/src/locales/ko.ts +6 -0
  85. package/src/locales/pt.ts +6 -0
  86. package/src/locales/zh.ts +6 -0
  87. package/src/plugin.ts +2 -0
  88. package/src/styles/theme.css +13 -0
  89. package/dist/MIcon-CaEooCmZ.js.map +0 -1
  90. package/dist/MTextField-Ck0oWDMk.js.map +0 -1
  91. package/dist/useLocale-CFW8cIzL.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { i as e } from "./useLocale-CFW8cIzL.js";
2
- import { t } from "./MIcon-CaEooCmZ.js";
1
+ import { i as e } from "./useLocale-Cn9MVIdw.js";
2
+ import { t } from "./MIcon-DLOkQduI.js";
3
3
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
4
4
  import { computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderSlot as g, toDisplayString as _, watch as v, withCtx as y } from "vue";
5
5
  //#region src/components/MCodeEditor.vue?vue&type=script&setup=true&lang.ts
@@ -29,10 +29,12 @@ type __VLS_Props = {
29
29
  shape?: 'rounded' | 'squared';
30
30
  /** Vue Router destination — renders as RouterLink instead of button */
31
31
  to?: string | Record<string, any>;
32
+ /** Any CSS color for the press ripple; defaults to the button's content color */
33
+ rippleColor?: string;
32
34
  };
33
- declare var __VLS_20: {};
35
+ declare var __VLS_18: {};
34
36
  type __VLS_Slots = {} & {
35
- default?: (props: typeof __VLS_20) => any;
37
+ default?: (props: typeof __VLS_18) => any;
36
38
  };
37
39
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
38
40
  color: string;
@@ -19,6 +19,8 @@ type __VLS_Props = {
19
19
  selectionRequired?: boolean;
20
20
  /** Selected button color */
21
21
  color?: 'primary' | 'secondary' | 'tertiary';
22
+ /** Any CSS color for the press ripple; defaults to the button's content color */
23
+ rippleColor?: string;
22
24
  };
23
25
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
26
  "update:modelValue": (args_0: unknown) => any;
@@ -42,12 +42,14 @@ type __VLS_Props = {
42
42
  * the content's own leave animation has time to play instead of just
43
43
  * vanishing. 'none' skips any panel-level transition entirely. */
44
44
  contentTransition?: 'scale' | 'fade' | 'none';
45
+ /** Any CSS color for the press ripple; defaults to the FAB's content color */
46
+ rippleColor?: string;
45
47
  };
46
- declare var __VLS_46: {
48
+ declare var __VLS_45: {
47
49
  close: () => boolean;
48
50
  };
49
51
  type __VLS_Slots = {} & {
50
- content?: (props: typeof __VLS_46) => any;
52
+ content?: (props: typeof __VLS_45) => any;
51
53
  };
52
54
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
55
  click: (args_0: MouseEvent) => any;
@@ -3,9 +3,12 @@ type __VLS_Props = {
3
3
  name: string;
4
4
  /** Icon size in px */
5
5
  size?: number;
6
+ /** Filled glyph (the Material Symbols FILL axis), as M3 draws a selected icon */
7
+ filled?: boolean;
6
8
  };
7
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
10
  size: number;
11
+ filled: boolean;
9
12
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
13
  declare const _default: typeof __VLS_export;
11
14
  export default _default;
@@ -16,12 +16,26 @@ type __VLS_Props = {
16
16
  disabled?: boolean;
17
17
  /** Vue Router destination — renders as RouterLink instead of button */
18
18
  to?: string | Record<string, any>;
19
+ /** Any CSS color for the press ripple; defaults to the button's content color */
20
+ rippleColor?: string;
21
+ /**
22
+ * Makes it a toggle button (v-model:checked): selected colors, a filled icon, and a shape that morphs when
23
+ * pressed and when checked. Leave it unset for a plain icon button
24
+ */
25
+ checked?: boolean;
26
+ /** Icon shown while checked, when it differs from `icon` (e.g. 'pause' for 'play_arrow') */
27
+ checkedIcon?: string;
19
28
  };
20
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
29
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
+ "update:checked": (args_0: boolean) => any;
31
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
32
+ "onUpdate:checked"?: ((args_0: boolean) => any) | undefined;
33
+ }>, {
21
34
  size: "xs" | "sm" | "md" | "lg" | "xl" | number;
22
35
  variant: "standard" | "filled" | "tonal" | "outlined";
23
36
  shape: "rounded" | "squared";
24
37
  disabled: boolean;
38
+ checked: boolean;
25
39
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
40
  declare const _default: typeof __VLS_export;
27
41
  export default _default;
@@ -9,21 +9,34 @@ type __VLS_Props = {
9
9
  disabled?: boolean;
10
10
  /** Danger/destructive styling (error color) */
11
11
  danger?: boolean;
12
- /** Keep the menu open after this item is clicked (e.g. checkable/toggle items). */
12
+ /** Keep the menu open after this item is clicked. Defaults to true for `checked` items, false otherwise */
13
13
  keepOpen?: boolean;
14
+ /** Makes it one choice of several (radio-like): selected look while true. Leave unset for a plain item */
15
+ selected?: boolean;
16
+ /** Makes it an on/off setting (v-model:checked, checkbox-like): checked look while true. Leave unset for a plain item */
17
+ checked?: boolean;
18
+ /**
19
+ * Icon shown while selected or checked. Defaults to a check that slides in when the item has no `icon`;
20
+ * with an `icon`, that icon stays and turns filled
21
+ */
22
+ selectedIcon?: string;
14
23
  };
15
- declare var __VLS_14: {}, __VLS_33: {};
24
+ declare var __VLS_21: {}, __VLS_40: {};
16
25
  type __VLS_Slots = {} & {
17
- default?: (props: typeof __VLS_14) => any;
26
+ default?: (props: typeof __VLS_21) => any;
18
27
  } & {
19
- children?: (props: typeof __VLS_33) => any;
28
+ children?: (props: typeof __VLS_40) => any;
20
29
  };
21
30
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
31
  click: () => any;
32
+ "update:checked": (args_0: boolean) => any;
23
33
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
24
34
  onClick?: (() => any) | undefined;
35
+ "onUpdate:checked"?: ((args_0: boolean) => any) | undefined;
25
36
  }>, {
37
+ selected: boolean;
26
38
  disabled: boolean;
39
+ checked: boolean;
27
40
  danger: boolean;
28
41
  keepOpen: boolean;
29
42
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -19,6 +19,8 @@ type __VLS_Props = {
19
19
  disabled?: boolean;
20
20
  /** Dropdown menu items; see `SplitButtonItem` */
21
21
  items?: SplitButtonItem[];
22
+ /** Any CSS color for the press ripple; defaults to the button's content color */
23
+ rippleColor?: string;
22
24
  };
23
25
  declare var __VLS_34: {
24
26
  close: () => boolean;
@@ -16,6 +16,12 @@ type __VLS_Props = {
16
16
  variant?: 'primary' | 'secondary';
17
17
  /** 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. */
18
18
  scrollable?: boolean;
19
+ /**
20
+ * Where a tab's icon goes: `top`, stacked above the label in a 64px tab (Compose's `Tab`), or `leading`,
21
+ * beside the label in a 48px tab (Compose's `LeadingIconTab`). Defaults to `top` for primary tabs and
22
+ * `leading` for secondary ones.
23
+ */
24
+ iconPosition?: 'top' | 'leading';
19
25
  };
20
26
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
27
  "update:modelValue": (args_0: string | number) => any;
@@ -9,6 +9,8 @@ type __VLS_Props = {
9
9
  minuteStep?: number;
10
10
  /** Dialog title */
11
11
  title?: string;
12
+ /** How the time is picked before switching to keyboard input: a clock `dial`, or `scroll` wheels (MTimeScroll) */
13
+ mode?: 'dial' | 'scroll';
12
14
  };
13
15
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
16
  "update:modelValue": (args_0: string | null) => any;
@@ -17,6 +19,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
17
19
  "onUpdate:modelValue"?: ((args_0: string | null) => any) | undefined;
18
20
  "onUpdate:show"?: ((args_0: boolean) => any) | undefined;
19
21
  }>, {
22
+ mode: "dial" | "scroll";
20
23
  show: boolean;
21
24
  modelValue: string | null;
22
25
  minuteStep: number;
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ /** Selected time in HH:MM, 24-hour (v-model); null shows 12:00 AM (00:00 in 24-hour mode) */
3
+ modelValue: string | null;
4
+ /** 24-hour wheel (00–23) instead of 1–12 with AM/PM */
5
+ use24h?: boolean;
6
+ /** Minute increment step; the minute wheel shows only multiples of it */
7
+ minuteStep?: number;
8
+ /** Disables the wheels and the AM/PM toggle */
9
+ disabled?: boolean;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (args_0: string) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
15
+ }>, {
16
+ modelValue: string | null;
17
+ disabled: boolean;
18
+ minuteStep: number;
19
+ use24h: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -9,6 +9,8 @@ type __VLS_Props = {
9
9
  icon?: string;
10
10
  /** Same 5-tier expressive sizing as MButton */
11
11
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
12
+ /** Any CSS color for the press ripple; defaults to the button's content color */
13
+ rippleColor?: string;
12
14
  };
13
15
  declare var __VLS_6: {};
14
16
  type __VLS_Slots = {} & {
@@ -55,12 +55,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
55
55
  expandAll: typeof expandAll;
56
56
  collapseAll: typeof collapseAll;
57
57
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
- "update:selected": (args_0: string | number | null) => any;
59
58
  "update:checked": (args_0: (string | number)[]) => any;
59
+ "update:selected": (args_0: string | number | null) => any;
60
60
  "node-click": (args_0: TreeNode) => any;
61
61
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
62
- "onUpdate:selected"?: ((args_0: string | number | null) => any) | undefined;
63
62
  "onUpdate:checked"?: ((args_0: (string | number)[]) => any) | undefined;
63
+ "onUpdate:selected"?: ((args_0: string | number | null) => any) | undefined;
64
64
  "onNode-click"?: ((args_0: TreeNode) => any) | undefined;
65
65
  }>, {
66
66
  selected: string | number | null;
@@ -48,10 +48,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
48
48
  MIcon: import("vue").DefineComponent<{
49
49
  name: string;
50
50
  size?: number;
51
+ filled?: boolean;
51
52
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
52
53
  name: string;
53
54
  size?: number;
55
+ filled?: boolean;
54
56
  }> & Readonly<{}>, {
55
57
  size: number;
58
+ filled: boolean;
56
59
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
57
60
  }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -4,6 +4,8 @@ export interface SpringSpec {
4
4
  }
5
5
  /** MotionSchemeKeyTokens.FastSpatial in the Standard scheme (StandardMotionTokens.SpringFastSpatial*) */
6
6
  export declare const FAST_SPATIAL: SpringSpec;
7
+ /** MotionSchemeKeyTokens.FastEffects in the Standard scheme */
8
+ export declare const FAST_EFFECTS: SpringSpec;
7
9
  /** MotionSchemeKeyTokens.DefaultEffects in the Standard scheme */
8
10
  export declare const DEFAULT_EFFECTS: SpringSpec;
9
11
  /** MotionSchemeKeyTokens.DefaultSpatial in the Standard scheme */
@@ -26,6 +26,12 @@ export interface M3Locale {
26
26
  remove: string;
27
27
  selectDate: string;
28
28
  selectTime: string;
29
+ timeHourSelection: string;
30
+ timeMinuteSelection: string;
31
+ timePeriodToggle: string;
32
+ timeToggleKeyboard: string;
33
+ timeToggleDial: string;
34
+ timeToggleScroll: string;
29
35
  selectRange: string;
30
36
  pickStart: string;
31
37
  pickEnd: string;
@@ -0,0 +1,16 @@
1
+ import type { Directive } from 'vue';
2
+ /** Options for `v-ripple`. */
3
+ export interface RippleOptions {
4
+ /** No ripple while true (e.g. bound to the element's disabled state). */
5
+ disabled?: boolean;
6
+ /** Any CSS color for the ripple; defaults to the element's text color (`currentColor`). */
7
+ color?: string;
8
+ }
9
+ /** `v-ripple` value: nothing or `true` (on), `false` (off), a CSS color, or an options object. */
10
+ export type RippleValue = boolean | string | RippleOptions | null | undefined;
11
+ /**
12
+ * The M3 press ripple for any element: `<div v-ripple>`, `v-ripple="false"`, `v-ripple="'#e91e63'"`
13
+ * or `v-ripple="{ disabled, color }"`. A statically positioned element is made `position: relative`.
14
+ * Registered globally as `v-ripple` by `createM3UI()`; import `vRipple` to use it without the plugin.
15
+ */
16
+ export declare const vRipple: Directive<HTMLElement, RippleValue>;