@m3ui-vue/m3ui-vue 1.1.3 → 1.2.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 +1 -1
- package/dist/API.md +579 -40
- package/dist/MMenuItem-DI351kIf.js +929 -0
- package/dist/MMenuItem-DI351kIf.js.map +1 -0
- package/dist/MSlider-BnEy5ieZ.js +1500 -0
- package/dist/MSlider-BnEy5ieZ.js.map +1 -0
- package/dist/MTextField-BBmkaIbO.js +633 -0
- package/dist/MTextField-BBmkaIbO.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/chart.js +83 -49
- package/dist/chart.js.map +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/components/MAnimatedNumber.vue.d.ts +3 -1
- package/dist/components/MButton.vue.d.ts +9 -1
- package/dist/components/MButtonGroup.vue.d.ts +40 -31
- package/dist/components/MCarousel.vue.d.ts +2 -0
- package/dist/components/MChart.vue.d.ts +6 -0
- package/dist/components/MCircleProgressBar.vue.d.ts +5 -3
- package/dist/components/MContainerTransform.vue.d.ts +59 -0
- package/dist/components/MContextMenu.vue.d.ts +2 -2
- package/dist/components/MCopyButton.vue.d.ts +1 -1
- package/dist/components/MDialog.vue.d.ts +8 -5
- package/dist/components/MExportButton.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +2 -2
- package/dist/components/MFabMenu.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +1 -1
- package/dist/components/MIconButton.vue.d.ts +15 -1
- package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
- package/dist/components/MListItem.vue.d.ts +5 -5
- package/dist/components/MMap.vue.d.ts +20 -2
- package/dist/components/MMapBaseLayers.vue.d.ts +3 -0
- package/dist/components/MMapFilter.vue.d.ts +3 -0
- package/dist/components/MMapLayers.vue.d.ts +3 -0
- package/dist/components/MMenu.vue.d.ts +2 -2
- package/dist/components/MMenuItem.vue.d.ts +7 -3
- package/dist/components/MNavigationDrawer.vue.d.ts +13 -2
- package/dist/components/MNavigationRail.vue.d.ts +1 -1
- package/dist/components/MOverlay.vue.d.ts +12 -1
- package/dist/components/MProgressBar.vue.d.ts +5 -3
- package/dist/components/MPullToRefresh.vue.d.ts +7 -2
- package/dist/components/MRichTextEditor.vue.d.ts +7 -1
- package/dist/components/MSearchField.vue.d.ts +58 -0
- package/dist/components/MSegmentedButton.vue.d.ts +31 -23
- package/dist/components/MSimpleCarousel.vue.d.ts +2 -0
- package/dist/components/MSkeleton.vue.d.ts +6 -3
- package/dist/components/MSplitter.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +1 -1
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTextField.vue.d.ts +5 -1
- package/dist/components/MTimeline.vue.d.ts +85 -22
- package/dist/components/MToolbar.vue.d.ts +32 -5
- package/dist/components/MTooltip.vue.d.ts +1 -1
- package/dist/components/_MDrawerItemList.vue.d.ts +2 -0
- package/dist/components/_MToolbarFab.vue.d.ts +16 -0
- package/dist/composables/_containerTransform.d.ts +48 -0
- package/dist/composables/_mapStyle.d.ts +13 -0
- package/dist/composables/_themeTransition.d.ts +2 -0
- package/dist/composables/_tooltipTrigger.d.ts +22 -0
- package/dist/composables/_useMenuNav.d.ts +28 -0
- package/dist/composables/useAutoGrow.d.ts +21 -0
- package/dist/composables/useColorPalette.d.ts +1 -1
- package/dist/composables/useContainerTransform.d.ts +30 -0
- package/dist/composables/useLocale.d.ts +6 -0
- package/dist/composables/useMap.d.ts +19 -3
- package/dist/composables/useMapFilter.d.ts +4 -1
- package/dist/composables/useMapLayers.d.ts +5 -2
- package/dist/composables/useScrollReveal.d.ts +44 -0
- package/dist/composables/useThemeTokens.d.ts +21 -0
- package/dist/composables/viewportHints.d.ts +27 -0
- package/dist/directives/vClickOutside.d.ts +25 -0
- package/dist/directives/vFocusRing.d.ts +22 -0
- package/dist/directives/vLongPress.d.ts +27 -0
- package/dist/directives/vReveal.d.ts +10 -0
- package/dist/directives/vScrollElevation.d.ts +31 -0
- package/dist/directives/vSkeleton.d.ts +19 -0
- package/dist/directives/vStateLayer.d.ts +20 -0
- package/dist/directives/vSwipe.d.ts +45 -0
- package/dist/directives/vTooltip.d.ts +23 -0
- package/dist/index.d.ts +31 -1
- package/dist/locales/index.js +35 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +7692 -6273
- package/dist/m3ui.js.map +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/map.js +823 -793
- package/dist/map.js.map +1 -1
- package/dist/motion-DZiXG09o.js +150 -0
- package/dist/motion-DZiXG09o.js.map +1 -0
- package/dist/plugin.d.ts +24 -0
- package/dist/rich-text-editor.js +20 -16
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles/theme.css +63 -0
- package/dist/styles.css +1 -1
- package/dist/{useLocale-SfQHnJfp.js → useLocale-JYxDDeXC.js} +6 -2
- package/dist/useLocale-JYxDDeXC.js.map +1 -0
- package/dist/useThemeTokens-Bv-Uv8eX.js +135 -0
- package/dist/useThemeTokens-Bv-Uv8eX.js.map +1 -0
- package/package.json +2 -1
- package/src/__tests__/MAnimatedNumber.test.ts +24 -2
- package/src/__tests__/MButton.test.ts +22 -0
- package/src/__tests__/MCarousel.test.ts +9 -0
- package/src/__tests__/MChart.test.ts +77 -5
- package/src/__tests__/MContainerTransform.test.ts +279 -0
- package/src/__tests__/MDialog.test.ts +27 -0
- package/src/__tests__/MIconButton.test.ts +33 -0
- package/src/__tests__/MListItemExpandable.test.ts +48 -0
- package/src/__tests__/MListItemShape.test.ts +9 -6
- package/src/__tests__/MListKeyboard.test.ts +90 -0
- package/src/__tests__/MMap.test.ts +53 -1
- package/src/__tests__/MMapLayers.test.ts +46 -2
- package/src/__tests__/MMapTools.test.ts +2 -1
- package/src/__tests__/MMenu.test.ts +104 -1
- package/src/__tests__/MMenuItem.test.ts +18 -0
- package/src/__tests__/MNavigationDrawer.test.ts +80 -0
- package/src/__tests__/MNavigationRail.test.ts +33 -0
- package/src/__tests__/MOverlay.test.ts +49 -0
- package/src/__tests__/MProgressBar.test.ts +41 -0
- package/src/__tests__/MPullToRefresh.test.ts +33 -0
- package/src/__tests__/MRichTextEditor.test.ts +22 -0
- package/src/__tests__/MSearchField.test.ts +71 -0
- package/src/__tests__/MSkeleton.test.ts +38 -0
- package/src/__tests__/MSlider.test.ts +161 -0
- package/src/__tests__/MTimeline.test.ts +238 -0
- package/src/__tests__/MToolbar.test.ts +157 -0
- package/src/__tests__/_fakeMaplibre.ts +3 -1
- package/src/__tests__/attrsFallthrough.test.ts +9 -0
- package/src/__tests__/escapeStack.test.ts +93 -0
- package/src/__tests__/hydration.test.ts +25 -0
- package/src/__tests__/ssr.test.ts +21 -2
- package/src/__tests__/useAutoGrow.test.ts +103 -0
- package/src/__tests__/useScrollReveal.test.ts +102 -0
- package/src/__tests__/useThemeTokens.test.ts +114 -0
- package/src/__tests__/vClickOutside.test.ts +82 -0
- package/src/__tests__/vFocusRing.test.ts +36 -0
- package/src/__tests__/vLongPress.test.ts +81 -0
- package/src/__tests__/vScrollElevation.test.ts +89 -0
- package/src/__tests__/vSkeleton.test.ts +48 -0
- package/src/__tests__/vStateLayer.test.ts +53 -0
- package/src/__tests__/vSwipe.test.ts +93 -0
- package/src/__tests__/vTooltip.test.ts +95 -0
- package/src/__tests__/viewportHints.test.ts +41 -0
- package/src/components/MAnimatedNumber.vue +32 -6
- package/src/components/MAutocomplete.vue +5 -0
- package/src/components/MBottomSheet.vue +4 -1
- package/src/components/MButton.vue +19 -3
- package/src/components/MButtonGroup.vue +22 -17
- package/src/components/MCarousel.vue +7 -1
- package/src/components/MChart.vue +74 -34
- package/src/components/MCircleProgressBar.vue +14 -9
- package/src/components/MCommandPalette.vue +3 -2
- package/src/components/MContainerTransform.vue +321 -0
- package/src/components/MContextMenu.vue +19 -60
- package/src/components/MDialog.vue +31 -6
- package/src/components/MDragDropList.vue +2 -0
- package/src/components/MFab.vue +10 -5
- package/src/components/MIconButton.vue +43 -2
- package/src/components/MKanban.vue +2 -0
- package/src/components/MLightbox.vue +7 -2
- package/src/components/MList.vue +26 -2
- package/src/components/MListItem.vue +138 -84
- package/src/components/MMap.vue +38 -5
- package/src/components/MMapBaseLayers.vue +7 -3
- package/src/components/MMapFilter.vue +7 -4
- package/src/components/MMapGeoJson.vue +1 -1
- package/src/components/MMapLayers.vue +6 -2
- package/src/components/MMapMeasure.vue +5 -2
- package/src/components/MMenu.vue +18 -59
- package/src/components/MMenuItem.vue +11 -2
- package/src/components/MMultiAutocomplete.vue +5 -0
- package/src/components/MNavigationDrawer.vue +96 -11
- package/src/components/MNavigationRail.vue +44 -25
- package/src/components/MOverlay.vue +32 -13
- package/src/components/MProgressBar.vue +25 -27
- package/src/components/MPullToRefresh.vue +20 -1
- package/src/components/MRichTextEditor.vue +19 -5
- package/src/components/MSearchBar.vue +5 -0
- package/src/components/MSearchField.vue +142 -0
- package/src/components/MSegmentedButton.vue +19 -17
- package/src/components/MSelect.vue +10 -1
- package/src/components/MSideSheet.vue +5 -2
- package/src/components/MSimpleCarousel.vue +10 -1
- package/src/components/MSkeleton.vue +30 -8
- package/src/components/MSlider.vue +161 -42
- package/src/components/MSpotlightSearch.vue +3 -2
- package/src/components/MTextField.vue +15 -2
- package/src/components/MTimeline.vue +370 -81
- package/src/components/MToolbar.vue +256 -15
- package/src/components/MTooltip.vue +20 -152
- package/src/components/_MDrawerItemList.vue +25 -6
- package/src/components/_MToolbarFab.vue +14 -0
- package/src/composables/_containerTransform.ts +179 -0
- package/src/composables/_mapStyle.ts +45 -0
- package/src/composables/_themeTransition.ts +2 -0
- package/src/composables/_tooltipTrigger.ts +184 -0
- package/src/composables/_useEscapeStack.ts +2 -0
- package/src/composables/_useMenuNav.ts +209 -0
- package/src/composables/useAutoGrow.ts +78 -0
- package/src/composables/useContainerTransform.ts +59 -0
- package/src/composables/useLocale.ts +10 -0
- package/src/composables/useMap.ts +43 -5
- package/src/composables/useMapFilter.ts +6 -5
- package/src/composables/useMapLayers.ts +7 -6
- package/src/composables/useScrollReveal.ts +151 -0
- package/src/composables/useThemeTokens.ts +116 -0
- package/src/composables/viewportHints.ts +80 -0
- package/src/directives/vClickOutside.ts +90 -0
- package/src/directives/vFocusRing.ts +60 -0
- package/src/directives/vLongPress.ts +134 -0
- package/src/directives/vReveal.ts +57 -0
- package/src/directives/vScrollElevation.ts +116 -0
- package/src/directives/vSkeleton.ts +87 -0
- package/src/directives/vStateLayer.ts +83 -0
- package/src/directives/vSwipe.ts +197 -0
- package/src/directives/vTooltip.ts +128 -0
- package/src/index.ts +31 -1
- package/src/locales/de.ts +4 -0
- package/src/locales/es.ts +4 -0
- package/src/locales/fr.ts +4 -0
- package/src/locales/ja.ts +4 -0
- package/src/locales/ko.ts +4 -0
- package/src/locales/pt.ts +4 -0
- package/src/locales/zh.ts +4 -0
- package/src/map.ts +1 -1
- package/src/plugin.ts +34 -0
- package/src/styles/theme.css +63 -0
- package/dist/MMenuItem-BckcR0nW.js +0 -809
- package/dist/MMenuItem-BckcR0nW.js.map +0 -1
- package/dist/MSlider-LyH_gy8D.js +0 -1411
- package/dist/MSlider-LyH_gy8D.js.map +0 -1
- package/dist/MTextField-FCPOTB0o.js +0 -672
- package/dist/MTextField-FCPOTB0o.js.map +0 -1
- package/dist/composables/_useThemeTokens.d.ts +0 -7
- package/dist/useLocale-SfQHnJfp.js.map +0 -1
- package/src/composables/_useThemeTokens.ts +0 -42
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
/** Options for `v-long-press`. */
|
|
3
|
+
export interface LongPressOptions {
|
|
4
|
+
/** Called once the press has been held for `duration`, with the pointerdown that started it. */
|
|
5
|
+
handler?: (event: PointerEvent) => void;
|
|
6
|
+
/** How long to hold, in ms (default 500, as MTooltip's long press). */
|
|
7
|
+
duration?: number;
|
|
8
|
+
/** How far (px) the pointer may move before it's a scroll or a drag, not a press (default 10). */
|
|
9
|
+
tolerance?: number;
|
|
10
|
+
/** A short vibration when it fires, where the device supports it (default true). */
|
|
11
|
+
haptic?: boolean;
|
|
12
|
+
/** Also with a mouse (default true); false leaves the mouse alone, for touch and pen only. */
|
|
13
|
+
mouse?: boolean;
|
|
14
|
+
/** Off while true. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** `v-long-press` value: the handler, or an options object. */
|
|
18
|
+
export type LongPressValue = ((event: PointerEvent) => void) | LongPressOptions | null | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Calls a handler when the element is pressed and held: `v-long-press="onHold"` or
|
|
21
|
+
* `v-long-press="{ handler, duration, tolerance, haptic, mouse, disabled }"`. Moving past the tolerance (a scroll
|
|
22
|
+
* or a drag) cancels it; once it fires, the click the press ends in and the browser's own long-press menu are
|
|
23
|
+
* swallowed, so a long-pressed button doesn't also click. While held, the element has `data-long-pressing`
|
|
24
|
+
* (`data-long-pressing:scale-95`). Registered globally as `v-long-press` by `createM3UI()`; import `vLongPress`
|
|
25
|
+
* to use it without the plugin.
|
|
26
|
+
*/
|
|
27
|
+
export declare const vLongPress: Directive<HTMLElement, LongPressValue>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
import { type RevealEffect, type ScrollRevealOptions } from '../composables/useScrollReveal';
|
|
3
|
+
/** `v-reveal` value: nothing or `true` (fade up), `false` (off), an effect name, or options. */
|
|
4
|
+
export type RevealValue = boolean | RevealEffect | ScrollRevealOptions | null | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Reveals the element as it scrolls into view, on M3's springs (see `useScrollReveal` for the options):
|
|
7
|
+
* `v-reveal`, `v-reveal="'scale'"`, `v-reveal="{ effect: 'slide-left', delay: 100 }"`. Items of a `v-for` with
|
|
8
|
+
* the same options cascade in. Off with reduced motion. Registered by `createM3UI()`, or import `vReveal`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const vReveal: Directive<HTMLElement, RevealValue>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
/** Options for `v-scroll-elevation`. */
|
|
3
|
+
export interface ScrollElevationOptions {
|
|
4
|
+
/**
|
|
5
|
+
* What scrolls: an element, a CSS selector for it, or the window (when left out). A template ref that's still
|
|
6
|
+
* empty (`target: list` before the list mounts) waits for it instead of following the window.
|
|
7
|
+
*/
|
|
8
|
+
target?: HTMLElement | Window | string | null;
|
|
9
|
+
/** How far (px) the content has to scroll before the element counts as scrolled (default 0: any scroll). */
|
|
10
|
+
threshold?: number;
|
|
11
|
+
/**
|
|
12
|
+
* The background while scrolled, any CSS color or token; default `var(--color-surface-container)`, M3's
|
|
13
|
+
* scrolled container color for a top app bar. `false` changes no color: style `[data-scrolled]` yourself.
|
|
14
|
+
*/
|
|
15
|
+
color?: string | false;
|
|
16
|
+
/** Called when the scrolled state changes. */
|
|
17
|
+
onChange?: (scrolled: boolean) => void;
|
|
18
|
+
/** Stops following the scroll while true (and clears the scrolled state). */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** `v-scroll-elevation` value: nothing or `true` (the window), `false` (off), a selector, or an options object. */
|
|
22
|
+
export type ScrollElevationValue = boolean | string | ScrollElevationOptions | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Marks an element while the content under it has scrolled, as M3's top app bar does on scroll: it takes the
|
|
25
|
+
* scrolled container color (`surface-container`) and gets a `data-scrolled` attribute for your own styles
|
|
26
|
+
* (`data-scrolled:shadow-elevation-2`). Follows the window, or `v-scroll-elevation="'#list'"` /
|
|
27
|
+
* `{ target, threshold, color, onChange, disabled }`. Add `transition-colors` to the element for a fade.
|
|
28
|
+
* Registered globally as `v-scroll-elevation` by `createM3UI()`; import `vScrollElevation` to use it without the
|
|
29
|
+
* plugin.
|
|
30
|
+
*/
|
|
31
|
+
export declare const vScrollElevation: Directive<HTMLElement, ScrollElevationValue>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
/** Options for `v-skeleton`. */
|
|
3
|
+
export interface SkeletonOptions {
|
|
4
|
+
/** Shows the placeholder while true. */
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
/** MSkeleton's animations (default `'pulse'`). */
|
|
7
|
+
animation?: 'pulse' | 'wave' | 'none';
|
|
8
|
+
}
|
|
9
|
+
/** `v-skeleton` value: whether it's loading, or an options object. */
|
|
10
|
+
export type SkeletonValue = boolean | SkeletonOptions | null | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Turns an element into its own loading placeholder: `v-skeleton="loading"` or
|
|
13
|
+
* `v-skeleton="{ loading, animation }"`. While loading it keeps its size and corners, hides its content (which
|
|
14
|
+
* still sizes it: placeholder text like `{{ user?.name ?? 'Loading name' }}` gives an empty element a width),
|
|
15
|
+
* takes MSkeleton's tint and animation (`pulse`, `wave` or `none`; still with reduced motion), ignores the pointer
|
|
16
|
+
* and is `aria-busy`. Registered globally as `v-skeleton` by `createM3UI()`; import `vSkeleton` to use it
|
|
17
|
+
* without the plugin.
|
|
18
|
+
*/
|
|
19
|
+
export declare const vSkeleton: Directive<HTMLElement, SkeletonValue>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
/** Options for `v-state-layer`. */
|
|
3
|
+
export interface StateLayerOptions {
|
|
4
|
+
/** No state layer while true (e.g. bound to the element's disabled state). `disabled` / `aria-disabled="true"` hosts get none either way. */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Any CSS color for the layer; defaults to the element's text color (`currentColor`). */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** Holds the dragged state (16%) while true, e.g. while the element is being dragged. */
|
|
9
|
+
dragged?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** `v-state-layer` value: nothing or `true` (on), `false` (off), a CSS color, or an options object. */
|
|
12
|
+
export type StateLayerValue = boolean | string | StateLayerOptions | null | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The M3 state layer for any element: a tint in its text color at 8% on hover, 10% on keyboard focus and press,
|
|
15
|
+
* 16% while dragged. `<div v-state-layer>`, `v-state-layer="false"`, `v-state-layer="'#e91e63'"` or
|
|
16
|
+
* `v-state-layer="{ disabled, color, dragged }"`. Pairs with `v-ripple`. A statically positioned element is made
|
|
17
|
+
* `position: relative`. Registered globally as `v-state-layer` by `createM3UI()`; import `vStateLayer` to use it
|
|
18
|
+
* without the plugin.
|
|
19
|
+
*/
|
|
20
|
+
export declare const vStateLayer: Directive<HTMLElement, StateLayerValue>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
export type SwipeDirection = 'left' | 'right' | 'up' | 'down';
|
|
3
|
+
/** What a swipe handler gets. */
|
|
4
|
+
export interface SwipeInfo {
|
|
5
|
+
direction: SwipeDirection;
|
|
6
|
+
/** Distance from where the press started, px (x grows rightwards, y downwards). */
|
|
7
|
+
dx: number;
|
|
8
|
+
dy: number;
|
|
9
|
+
/** Speed along the swipe's axis when the finger lifted, px/ms. */
|
|
10
|
+
velocity: number;
|
|
11
|
+
/** The pointerup that ended it. */
|
|
12
|
+
event: PointerEvent;
|
|
13
|
+
}
|
|
14
|
+
/** Options for `v-swipe`. */
|
|
15
|
+
export interface SwipeOptions {
|
|
16
|
+
left?: (info: SwipeInfo) => void;
|
|
17
|
+
right?: (info: SwipeInfo) => void;
|
|
18
|
+
up?: (info: SwipeInfo) => void;
|
|
19
|
+
down?: (info: SwipeInfo) => void;
|
|
20
|
+
/** Called for a swipe in any direction that has no handler of its own. Listens on both axes. */
|
|
21
|
+
handler?: (info: SwipeInfo) => void;
|
|
22
|
+
/** How far (px) the finger has to travel for a slow swipe to count (default 50). */
|
|
23
|
+
threshold?: number;
|
|
24
|
+
/** A swipe at least this fast (px/ms) counts whatever its length (default 0.5, a flick). */
|
|
25
|
+
velocity?: number;
|
|
26
|
+
/** Called while the finger moves along a listened axis, for feedback (follow the finger, fade a hint). */
|
|
27
|
+
onMove?: (dx: number, dy: number, event: PointerEvent) => void;
|
|
28
|
+
/** Called when the press ends, swiped or not (spring a moved element back). */
|
|
29
|
+
onEnd?: (swiped: boolean) => void;
|
|
30
|
+
/** Also with a mouse drag (default false: swipes are for touch and pen). */
|
|
31
|
+
mouse?: boolean;
|
|
32
|
+
/** Off while true. */
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** `v-swipe` value: a handler for any direction, or an options object. */
|
|
36
|
+
export type SwipeValue = ((info: SwipeInfo) => void) | SwipeOptions | null | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Calls handlers when an element is swiped: `v-swipe="onSwipe"` (any direction, `info.direction` says which) or
|
|
39
|
+
* `v-swipe="{ left, right, up, down, threshold, velocity, onMove, onEnd, mouse, disabled }"`. A swipe counts past
|
|
40
|
+
* `threshold` px, or at any length when flicked faster than `velocity`. The element's `touch-action` is set from
|
|
41
|
+
* the directions you listen to: only left/right leaves vertical scrolling to the page (`pan-y`), only up/down the
|
|
42
|
+
* horizontal (`pan-x`), both block panning from it (`none`). The click a swipe ends in is swallowed. Registered
|
|
43
|
+
* globally as `v-swipe` by `createM3UI()`; import `vSwipe` to use it without the plugin.
|
|
44
|
+
*/
|
|
45
|
+
export declare const vSwipe: Directive<HTMLElement, SwipeValue>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
import { type TooltipPlacement } from '../composables/_tooltipTrigger';
|
|
3
|
+
/** Options for `v-tooltip`. */
|
|
4
|
+
export interface TooltipOptions {
|
|
5
|
+
/** The tooltip's text; nothing shows while it's empty. */
|
|
6
|
+
text?: string;
|
|
7
|
+
/** Side of the element it shows on (default `'top'`); it stays inside the window. */
|
|
8
|
+
placement?: TooltipPlacement;
|
|
9
|
+
/** Delay before it shows on hover or keyboard focus, in ms (default 600, like MTooltip). */
|
|
10
|
+
delay?: number;
|
|
11
|
+
/** Never shows while true. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** `v-tooltip` value: the text, or an options object. */
|
|
15
|
+
export type TooltipValue = string | TooltipOptions | null | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* MTooltip's plain tooltip on any element, without wrapping it: `v-tooltip="'Save'"` or
|
|
18
|
+
* `v-tooltip="{ text, placement, delay, disabled }"`. Shows after a delay on mouse hover, on keyboard focus, and
|
|
19
|
+
* on a long press on touch (swallowing that press's click, hiding 1.5s after the finger lifts); Escape and
|
|
20
|
+
* scrolling hide it. Registered globally as `v-tooltip` by `createM3UI()`; import `vTooltip` to use it without
|
|
21
|
+
* the plugin.
|
|
22
|
+
*/
|
|
23
|
+
export declare const vTooltip: Directive<HTMLElement, TooltipValue>;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,10 +6,14 @@ export type { Theme } from './composables/useTheme';
|
|
|
6
6
|
export { useColorPalette, palettes } from './composables/useColorPalette';
|
|
7
7
|
export { useConfetti, fireConfetti } from './composables/useConfetti';
|
|
8
8
|
export type { ConfettiOptions, ConfettiOrigin } from './composables/useConfetti';
|
|
9
|
+
export { useContainerTransform } from './composables/useContainerTransform';
|
|
10
|
+
export type { ContainerTransformController, ContainerTransformOrigin } from './composables/useContainerTransform';
|
|
9
11
|
export type { Palette, PaletteId, ActiveSeed, ContrastLevel } from './composables/useColorPalette';
|
|
10
12
|
export { SEED_PALETTE } from './composables/useColorPalette';
|
|
11
13
|
export { themeInitScript } from './composables/themeInitScript';
|
|
12
14
|
export type { ThemeInitOptions } from './composables/themeInitScript';
|
|
15
|
+
export { viewportFromHeaders, VIEWPORT_HINTS } from './composables/viewportHints';
|
|
16
|
+
export type { RequestHeaders, ViewportSize } from './composables/viewportHints';
|
|
13
17
|
export { generateScheme, schemeToCss, schemeRoles, seedFromImage, seedFromPixels } from './composables/dynamicColor';
|
|
14
18
|
export type { SchemeVariant, SeedOptions, GeneratedScheme } from './composables/dynamicColor';
|
|
15
19
|
export { useToast } from './composables/useToast';
|
|
@@ -18,6 +22,12 @@ export { useFieldBg } from './composables/useFieldBg';
|
|
|
18
22
|
export { useLocale, defaultLocale } from './composables/useLocale';
|
|
19
23
|
export type { M3Locale } from './composables/useLocale';
|
|
20
24
|
export { useDevice } from './composables/useDevice';
|
|
25
|
+
export { useAutoGrow } from './composables/useAutoGrow';
|
|
26
|
+
export type { AutoGrowOptions } from './composables/useAutoGrow';
|
|
27
|
+
export { useThemeTokens } from './composables/useThemeTokens';
|
|
28
|
+
export type { ThemeTokensOptions } from './composables/useThemeTokens';
|
|
29
|
+
export { useScrollReveal } from './composables/useScrollReveal';
|
|
30
|
+
export type { ScrollRevealOptions, RevealEffect } from './composables/useScrollReveal';
|
|
21
31
|
export { useWindowSizeClass, widthSizeClass, heightSizeClass } from './composables/useWindowSizeClass';
|
|
22
32
|
export type { WidthSizeClass, HeightSizeClass, WindowSizeClassInfo } from './composables/useWindowSizeClass';
|
|
23
33
|
export { useNotification } from './composables/useNotification';
|
|
@@ -29,6 +39,24 @@ export { motionSprings, motionEasings, motionDurations, cubicBezier } from './co
|
|
|
29
39
|
export type { SpringSpec } from './composables/motion';
|
|
30
40
|
export { vRipple } from './directives/vRipple';
|
|
31
41
|
export type { RippleOptions, RippleValue } from './directives/vRipple';
|
|
42
|
+
export { vReveal } from './directives/vReveal';
|
|
43
|
+
export type { RevealValue } from './directives/vReveal';
|
|
44
|
+
export { vStateLayer } from './directives/vStateLayer';
|
|
45
|
+
export type { StateLayerOptions, StateLayerValue } from './directives/vStateLayer';
|
|
46
|
+
export { vTooltip } from './directives/vTooltip';
|
|
47
|
+
export type { TooltipOptions, TooltipValue } from './directives/vTooltip';
|
|
48
|
+
export { vFocusRing } from './directives/vFocusRing';
|
|
49
|
+
export type { FocusRingOptions, FocusRingValue } from './directives/vFocusRing';
|
|
50
|
+
export { vScrollElevation } from './directives/vScrollElevation';
|
|
51
|
+
export type { ScrollElevationOptions, ScrollElevationValue } from './directives/vScrollElevation';
|
|
52
|
+
export { vLongPress } from './directives/vLongPress';
|
|
53
|
+
export type { LongPressOptions, LongPressValue } from './directives/vLongPress';
|
|
54
|
+
export { vSwipe } from './directives/vSwipe';
|
|
55
|
+
export type { SwipeDirection, SwipeInfo, SwipeOptions, SwipeValue } from './directives/vSwipe';
|
|
56
|
+
export { vClickOutside } from './directives/vClickOutside';
|
|
57
|
+
export type { ClickOutsideOptions, ClickOutsideValue } from './directives/vClickOutside';
|
|
58
|
+
export { vSkeleton } from './directives/vSkeleton';
|
|
59
|
+
export type { SkeletonOptions, SkeletonValue } from './directives/vSkeleton';
|
|
32
60
|
export { default as MAbsolute } from './components/MAbsolute.vue';
|
|
33
61
|
export { default as MAlert } from './components/MAlert.vue';
|
|
34
62
|
export { default as MAnimatedNumber } from './components/MAnimatedNumber.vue';
|
|
@@ -61,6 +89,7 @@ export { default as MColorPicker } from './components/MColorPicker.vue';
|
|
|
61
89
|
export { default as MColorPickerModal } from './components/MColorPickerModal.vue';
|
|
62
90
|
export { default as MCommandPalette } from './components/MCommandPalette.vue';
|
|
63
91
|
export { default as MConfirmDialog } from './components/MConfirmDialog.vue';
|
|
92
|
+
export { default as MContainerTransform } from './components/MContainerTransform.vue';
|
|
64
93
|
export { default as MContainer } from './components/MContainer.vue';
|
|
65
94
|
export { default as MContextMenu } from './components/MContextMenu.vue';
|
|
66
95
|
export { default as MCopyButton } from './components/MCopyButton.vue';
|
|
@@ -139,6 +168,7 @@ export { default as MScheduler } from './components/MScheduler.vue';
|
|
|
139
168
|
export { default as MScheme } from './components/MScheme.vue';
|
|
140
169
|
export { default as MScrollable } from './components/MScrollable.vue';
|
|
141
170
|
export { default as MSearchBar } from './components/MSearchBar.vue';
|
|
171
|
+
export { default as MSearchField } from './components/MSearchField.vue';
|
|
142
172
|
export { default as MSection } from './components/MSection.vue';
|
|
143
173
|
export { default as MSeekBar } from './components/MSeekBar.vue';
|
|
144
174
|
export { default as MSegmentedButton } from './components/MSegmentedButton.vue';
|
|
@@ -217,7 +247,7 @@ export type { SpotlightResult } from './components/MSpotlightSearch.vue';
|
|
|
217
247
|
export type { StepItem } from './components/MStepper.vue';
|
|
218
248
|
export type { CommandItem } from './components/MCommandPalette.vue';
|
|
219
249
|
export type { TableFetchParams } from './components/MTable.vue';
|
|
220
|
-
export type { TimelineItem } from './components/MTimeline.vue';
|
|
250
|
+
export type { TimelineItem, TimelineStatus } from './components/MTimeline.vue';
|
|
221
251
|
export type { TourStep } from './components/MTour.vue';
|
|
222
252
|
export type { TransferItem } from './components/MTransferList.vue';
|
|
223
253
|
export type { TreeNode } from './components/MTree.vue';
|
package/dist/locales/index.js
CHANGED
|
@@ -156,6 +156,8 @@ var e = {
|
|
|
156
156
|
carousel: "Carrusel",
|
|
157
157
|
carouselItem: "{index} de {count}",
|
|
158
158
|
sparklineSummary: "De {first} a {last}, mínimo {min}, máximo {max}",
|
|
159
|
+
sliderRangeStart: "Inicio del rango",
|
|
160
|
+
sliderRangeEnd: "Fin del rango",
|
|
159
161
|
mapTitle: "Mapa",
|
|
160
162
|
mapMarker: "Marcador del mapa",
|
|
161
163
|
mapZoomIn: "Acercar",
|
|
@@ -185,7 +187,9 @@ var e = {
|
|
|
185
187
|
mapClearMeasurements: "Borrar mediciones",
|
|
186
188
|
mapDeleteMeasurement: "Borrar medición",
|
|
187
189
|
mapTotal: "Total",
|
|
188
|
-
mapSearchPlaces: "Buscar lugares"
|
|
190
|
+
mapSearchPlaces: "Buscar lugares",
|
|
191
|
+
timelineShowMore: "Mostrar {count} más",
|
|
192
|
+
timelineShowLess: "Mostrar menos"
|
|
189
193
|
}, t = {
|
|
190
194
|
lang: "fr",
|
|
191
195
|
search: "Rechercher...",
|
|
@@ -343,6 +347,8 @@ var e = {
|
|
|
343
347
|
carousel: "Carrousel",
|
|
344
348
|
carouselItem: "{index} sur {count}",
|
|
345
349
|
sparklineSummary: "De {first} à {last}, minimum {min}, maximum {max}",
|
|
350
|
+
sliderRangeStart: "Début de la plage",
|
|
351
|
+
sliderRangeEnd: "Fin de la plage",
|
|
346
352
|
mapTitle: "Carte",
|
|
347
353
|
mapMarker: "Marqueur de carte",
|
|
348
354
|
mapZoomIn: "Zoom avant",
|
|
@@ -372,7 +378,9 @@ var e = {
|
|
|
372
378
|
mapClearMeasurements: "Effacer les mesures",
|
|
373
379
|
mapDeleteMeasurement: "Supprimer la mesure",
|
|
374
380
|
mapTotal: "Total",
|
|
375
|
-
mapSearchPlaces: "Rechercher un lieu"
|
|
381
|
+
mapSearchPlaces: "Rechercher un lieu",
|
|
382
|
+
timelineShowMore: "Afficher {count} de plus",
|
|
383
|
+
timelineShowLess: "Afficher moins"
|
|
376
384
|
}, n = {
|
|
377
385
|
lang: "pt",
|
|
378
386
|
search: "Pesquisar...",
|
|
@@ -530,6 +538,8 @@ var e = {
|
|
|
530
538
|
carousel: "Carrossel",
|
|
531
539
|
carouselItem: "{index} de {count}",
|
|
532
540
|
sparklineSummary: "De {first} a {last}, mínimo {min}, máximo {max}",
|
|
541
|
+
sliderRangeStart: "Início do intervalo",
|
|
542
|
+
sliderRangeEnd: "Fim do intervalo",
|
|
533
543
|
mapTitle: "Mapa",
|
|
534
544
|
mapMarker: "Marcador do mapa",
|
|
535
545
|
mapZoomIn: "Aproximar",
|
|
@@ -559,7 +569,9 @@ var e = {
|
|
|
559
569
|
mapClearMeasurements: "Apagar medições",
|
|
560
570
|
mapDeleteMeasurement: "Apagar medição",
|
|
561
571
|
mapTotal: "Total",
|
|
562
|
-
mapSearchPlaces: "Pesquisar lugares"
|
|
572
|
+
mapSearchPlaces: "Pesquisar lugares",
|
|
573
|
+
timelineShowMore: "Mostrar mais {count}",
|
|
574
|
+
timelineShowLess: "Mostrar menos"
|
|
563
575
|
}, r = {
|
|
564
576
|
lang: "de",
|
|
565
577
|
search: "Suchen...",
|
|
@@ -717,6 +729,8 @@ var e = {
|
|
|
717
729
|
carousel: "Karussell",
|
|
718
730
|
carouselItem: "{index} von {count}",
|
|
719
731
|
sparklineSummary: "Von {first} bis {last}, Minimum {min}, Maximum {max}",
|
|
732
|
+
sliderRangeStart: "Bereichsanfang",
|
|
733
|
+
sliderRangeEnd: "Bereichsende",
|
|
720
734
|
mapTitle: "Karte",
|
|
721
735
|
mapMarker: "Kartenmarkierung",
|
|
722
736
|
mapZoomIn: "Vergrößern",
|
|
@@ -746,7 +760,9 @@ var e = {
|
|
|
746
760
|
mapClearMeasurements: "Messungen löschen",
|
|
747
761
|
mapDeleteMeasurement: "Messung löschen",
|
|
748
762
|
mapTotal: "Gesamt",
|
|
749
|
-
mapSearchPlaces: "Orte suchen"
|
|
763
|
+
mapSearchPlaces: "Orte suchen",
|
|
764
|
+
timelineShowMore: "{count} weitere anzeigen",
|
|
765
|
+
timelineShowLess: "Weniger anzeigen"
|
|
750
766
|
}, i = {
|
|
751
767
|
lang: "ja",
|
|
752
768
|
search: "検索...",
|
|
@@ -904,6 +920,8 @@ var e = {
|
|
|
904
920
|
carousel: "カルーセル",
|
|
905
921
|
carouselItem: "{count} 件中 {index} 件目",
|
|
906
922
|
sparklineSummary: "{first} から {last}、最小 {min}、最大 {max}",
|
|
923
|
+
sliderRangeStart: "範囲の開始",
|
|
924
|
+
sliderRangeEnd: "範囲の終了",
|
|
907
925
|
mapTitle: "地図",
|
|
908
926
|
mapMarker: "地図のマーカー",
|
|
909
927
|
mapZoomIn: "ズームイン",
|
|
@@ -933,7 +951,9 @@ var e = {
|
|
|
933
951
|
mapClearMeasurements: "測定をクリア",
|
|
934
952
|
mapDeleteMeasurement: "測定を削除",
|
|
935
953
|
mapTotal: "合計",
|
|
936
|
-
mapSearchPlaces: "場所を検索"
|
|
954
|
+
mapSearchPlaces: "場所を検索",
|
|
955
|
+
timelineShowMore: "さらに {count} 件を表示",
|
|
956
|
+
timelineShowLess: "表示を減らす"
|
|
937
957
|
}, a = {
|
|
938
958
|
lang: "zh",
|
|
939
959
|
search: "搜索...",
|
|
@@ -1091,6 +1111,8 @@ var e = {
|
|
|
1091
1111
|
carousel: "轮播",
|
|
1092
1112
|
carouselItem: "第 {index} 项,共 {count} 项",
|
|
1093
1113
|
sparklineSummary: "从 {first} 到 {last},最低 {min},最高 {max}",
|
|
1114
|
+
sliderRangeStart: "范围起点",
|
|
1115
|
+
sliderRangeEnd: "范围终点",
|
|
1094
1116
|
mapTitle: "地图",
|
|
1095
1117
|
mapMarker: "地图标记",
|
|
1096
1118
|
mapZoomIn: "放大",
|
|
@@ -1120,7 +1142,9 @@ var e = {
|
|
|
1120
1142
|
mapClearMeasurements: "清除测量",
|
|
1121
1143
|
mapDeleteMeasurement: "删除测量",
|
|
1122
1144
|
mapTotal: "总计",
|
|
1123
|
-
mapSearchPlaces: "搜索地点"
|
|
1145
|
+
mapSearchPlaces: "搜索地点",
|
|
1146
|
+
timelineShowMore: "再显示 {count} 项",
|
|
1147
|
+
timelineShowLess: "收起"
|
|
1124
1148
|
}, o = {
|
|
1125
1149
|
lang: "ko",
|
|
1126
1150
|
search: "검색...",
|
|
@@ -1278,6 +1302,8 @@ var e = {
|
|
|
1278
1302
|
carousel: "캐러셀",
|
|
1279
1303
|
carouselItem: "{count}개 중 {index}번째",
|
|
1280
1304
|
sparklineSummary: "{first}에서 {last}, 최소 {min}, 최대 {max}",
|
|
1305
|
+
sliderRangeStart: "범위 시작",
|
|
1306
|
+
sliderRangeEnd: "범위 끝",
|
|
1281
1307
|
mapTitle: "지도",
|
|
1282
1308
|
mapMarker: "지도 마커",
|
|
1283
1309
|
mapZoomIn: "확대",
|
|
@@ -1307,7 +1333,9 @@ var e = {
|
|
|
1307
1333
|
mapClearMeasurements: "측정 지우기",
|
|
1308
1334
|
mapDeleteMeasurement: "측정 삭제",
|
|
1309
1335
|
mapTotal: "합계",
|
|
1310
|
-
mapSearchPlaces: "장소 검색"
|
|
1336
|
+
mapSearchPlaces: "장소 검색",
|
|
1337
|
+
timelineShowMore: "{count}개 더 보기",
|
|
1338
|
+
timelineShowLess: "간략히 보기"
|
|
1311
1339
|
};
|
|
1312
1340
|
//#endregion
|
|
1313
1341
|
export { r as deLocale, e as esLocale, t as frLocale, i as jaLocale, o as koLocale, n as ptLocale, a as zhLocale };
|