miao-design 1.0.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 +76 -0
- package/dist/alert/Alert.vue.d.ts +27 -0
- package/dist/alert/index.d.ts +2 -0
- package/dist/alert/types.d.ts +20 -0
- package/dist/avatar/Avatar.vue.d.ts +18 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/types.d.ts +19 -0
- package/dist/button/Button.vue.d.ts +26 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/types.d.ts +21 -0
- package/dist/button-group/ButtonGroup.vue.d.ts +17 -0
- package/dist/button-group/context.d.ts +14 -0
- package/dist/button-group/index.d.ts +2 -0
- package/dist/button-group/types.d.ts +16 -0
- package/dist/checkbox/Checkbox.vue.d.ts +23 -0
- package/dist/checkbox/CheckboxGroup.vue.d.ts +23 -0
- package/dist/checkbox/context.d.ts +15 -0
- package/dist/checkbox/index.d.ts +3 -0
- package/dist/checkbox/types.d.ts +35 -0
- package/dist/date-picker/DatePicker.vue.d.ts +21 -0
- package/dist/date-picker/TimeSpinner.vue.d.ts +18 -0
- package/dist/date-picker/date-utils.d.ts +15 -0
- package/dist/date-picker/index.d.ts +3 -0
- package/dist/date-picker/types.d.ts +31 -0
- package/dist/date-range-picker/DateRangePicker.vue.d.ts +22 -0
- package/dist/date-range-picker/index.d.ts +2 -0
- package/dist/date-range-picker/types.d.ts +35 -0
- package/dist/dialog/Dialog.vue.d.ts +36 -0
- package/dist/dialog/index.d.ts +2 -0
- package/dist/dialog/types.d.ts +30 -0
- package/dist/directives/ripple.d.ts +58 -0
- package/dist/drawer/Drawer.vue.d.ts +35 -0
- package/dist/drawer/index.d.ts +2 -0
- package/dist/drawer/types.d.ts +26 -0
- package/dist/dropdown/Dropdown.vue.d.ts +32 -0
- package/dist/dropdown/DropdownItem.vue.d.ts +21 -0
- package/dist/dropdown/context.d.ts +13 -0
- package/dist/dropdown/index.d.ts +3 -0
- package/dist/dropdown/types.d.ts +45 -0
- package/dist/fab/Fab.vue.d.ts +26 -0
- package/dist/fab/index.d.ts +2 -0
- package/dist/fab/types.d.ts +21 -0
- package/dist/index.d.ts +27 -0
- package/dist/input/Input.vue.d.ts +34 -0
- package/dist/input/index.d.ts +2 -0
- package/dist/input/types.d.ts +24 -0
- package/dist/input-number/InputNumber.vue.d.ts +23 -0
- package/dist/input-number/index.d.ts +2 -0
- package/dist/input-number/types.d.ts +29 -0
- package/dist/miao-design.css +2 -0
- package/dist/miao-design.js +4103 -0
- package/dist/miao-design.umd.cjs +1 -0
- package/dist/radio/Radio.vue.d.ts +22 -0
- package/dist/radio/RadioGroup.vue.d.ts +23 -0
- package/dist/radio/context.d.ts +17 -0
- package/dist/radio/index.d.ts +3 -0
- package/dist/radio/types.d.ts +34 -0
- package/dist/select/Select.vue.d.ts +16 -0
- package/dist/select/index.d.ts +2 -0
- package/dist/select/types.d.ts +27 -0
- package/dist/slider/Slider.vue.d.ts +18 -0
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/types.d.ts +23 -0
- package/dist/switch/Switch.vue.d.ts +25 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/types.d.ts +20 -0
- package/dist/tabs/TabPane.vue.d.ts +16 -0
- package/dist/tabs/Tabs.vue.d.ts +30 -0
- package/dist/tabs/context.d.ts +33 -0
- package/dist/tabs/index.d.ts +3 -0
- package/dist/tabs/types.d.ts +39 -0
- package/dist/toast/MToast.vue.d.ts +26 -0
- package/dist/toast/ToastCard.vue.d.ts +11 -0
- package/dist/toast/ToastContainer.vue.d.ts +3 -0
- package/dist/toast/index.d.ts +5 -0
- package/dist/toast/service.d.ts +15 -0
- package/dist/toast/state.d.ts +6 -0
- package/dist/toast/types.d.ts +46 -0
- package/dist/tooltip/Tooltip.vue.d.ts +32 -0
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/types.d.ts +30 -0
- package/dist/utils/scroll-lock.d.ts +2 -0
- package/dist/utils/throttle.d.ts +2 -0
- package/package.json +35 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Directive } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* v-ripple 指令 —— MUI TouchRipple 同款按下涟漪(复刻其动效细节)。
|
|
4
|
+
*
|
|
5
|
+
* 用法:
|
|
6
|
+
* <button v-ripple>点击</button>
|
|
7
|
+
* <button v-ripple="false">禁用涟漪</button>
|
|
8
|
+
* <button v-ripple="{ disabled: false, color: '#fff' }">自定义涟漪颜色</button>
|
|
9
|
+
* <button v-ripple="{ duration: 300 }">加快涟漪动画(进入 + 退出,默认 550ms)</button>
|
|
10
|
+
* <button v-ripple="{ duration: 300, initialScale: 0.5 }">缩放从 0.5 起播而非 0</button>
|
|
11
|
+
* <button v-ripple="{ center: true }">涟漪从元素中心扩散(Checkbox / Radio 同款)</button>
|
|
12
|
+
*
|
|
13
|
+
* 动效(默认与 MUI 对齐):
|
|
14
|
+
* - 按下(pointerdown)即出现,波纹直径恰好覆盖元素最远角;配置 center 时改为
|
|
15
|
+
* 从元素中心起播,直径恰好覆盖元素(MUI Checkbox / Radio 居中涟漪);
|
|
16
|
+
* - 缩放从 initialScale(默认 0)扩散到 1,可配置为非 0 使涟漪更快显现;
|
|
17
|
+
* - 按住保持常显,松手(pointerup)/ 取消(pointercancel)/ 鼠标移出
|
|
18
|
+
* (pointerleave)后淡出(时长同进入,可经 duration 配置);
|
|
19
|
+
* - 触摸 / 笔输入延迟 80ms 出现以区分滚动,滚动 / 移动时取消;
|
|
20
|
+
* - 键盘聚焦(:focus-visible)或 Enter / 空格激活时居中脉冲波纹,失焦停止;
|
|
21
|
+
* - 宿主为原生 disabled 或 aria-disabled="true" 时不触发;
|
|
22
|
+
* - 涟漪默认跟随 currentColor,可通过 color 选项覆盖。
|
|
23
|
+
*/
|
|
24
|
+
export type RippleOptions = boolean | {
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
color?: string;
|
|
27
|
+
duration?: number;
|
|
28
|
+
initialScale?: number;
|
|
29
|
+
/** 涟漪从元素中心扩散而非点击点(MUI Checkbox / Radio 同款),默认 false */
|
|
30
|
+
center?: boolean;
|
|
31
|
+
};
|
|
32
|
+
interface RippleEntry {
|
|
33
|
+
wave?: HTMLSpanElement;
|
|
34
|
+
child?: HTMLSpanElement;
|
|
35
|
+
leaving: boolean;
|
|
36
|
+
/** 本次涟漪的动画时长(ms),未配置时为默认值 */
|
|
37
|
+
duration?: number;
|
|
38
|
+
/** 触摸输入等待显示期间使用的定时器 */
|
|
39
|
+
timer?: number;
|
|
40
|
+
/** 尚未落地的启动参数(触摸延迟期间保留) */
|
|
41
|
+
pending?: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
center: boolean;
|
|
45
|
+
pulsate: boolean;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
interface RippleHost extends HTMLElement {
|
|
49
|
+
__rippleContainer?: HTMLSpanElement;
|
|
50
|
+
/** 按 pointerId(键盘固定为 'keyboard')维护进行中的波纹 */
|
|
51
|
+
__rippleWaves?: Map<number | string, RippleEntry>;
|
|
52
|
+
__rippleState?: {
|
|
53
|
+
value: RippleOptions | undefined;
|
|
54
|
+
};
|
|
55
|
+
__rippleHandlers?: Array<[string, EventListener]>;
|
|
56
|
+
}
|
|
57
|
+
export declare const vRipple: Directive<RippleHost, RippleOptions | undefined>;
|
|
58
|
+
export default vRipple;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MDrawerProps } from './types';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_15: {}, __VLS_17: {}, __VLS_19: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
trigger?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
title?: (props: typeof __VLS_15) => any;
|
|
7
|
+
} & {
|
|
8
|
+
default?: (props: typeof __VLS_17) => any;
|
|
9
|
+
} & {
|
|
10
|
+
footer?: (props: typeof __VLS_19) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import('vue').DefineComponent<MDrawerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
close: () => any;
|
|
14
|
+
"update:modelValue": (value: boolean) => any;
|
|
15
|
+
open: () => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<MDrawerProps> & Readonly<{
|
|
17
|
+
onClose?: (() => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
19
|
+
onOpen?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
size: string | number;
|
|
22
|
+
appendToBody: boolean;
|
|
23
|
+
closeOnClickOverlay: boolean;
|
|
24
|
+
closeOnPressEscape: boolean;
|
|
25
|
+
showClose: boolean;
|
|
26
|
+
placement: import('./types').DrawerPlacement;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|
|
2
|
+
export interface MDrawerProps {
|
|
3
|
+
/** 抽屉开关(v-model) */
|
|
4
|
+
modelValue?: boolean;
|
|
5
|
+
/** 展开方向:左右抽屉定宽,上下抽屉定高 */
|
|
6
|
+
placement?: DrawerPlacement;
|
|
7
|
+
/** 左右方向为宽度 / 上下方向为高度,数字按 px 处理 */
|
|
8
|
+
size?: string | number;
|
|
9
|
+
title?: string;
|
|
10
|
+
/** 显示右上角(左右)或左侧(上下)关闭按钮 */
|
|
11
|
+
showClose?: boolean;
|
|
12
|
+
/** 点击遮罩关闭(默认开启) */
|
|
13
|
+
closeOnClickOverlay?: boolean;
|
|
14
|
+
/** Esc 关闭(默认开启) */
|
|
15
|
+
closeOnPressEscape?: boolean;
|
|
16
|
+
/** 挂载到 body(默认开启) */
|
|
17
|
+
appendToBody?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const MDrawerPropsDefault: {
|
|
20
|
+
readonly placement: "right";
|
|
21
|
+
readonly size: 320;
|
|
22
|
+
readonly showClose: true;
|
|
23
|
+
readonly closeOnClickOverlay: true;
|
|
24
|
+
readonly closeOnPressEscape: true;
|
|
25
|
+
readonly appendToBody: true;
|
|
26
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DropdownPlacement, MDropdownProps } from './types';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_20: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
trigger?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
default?: (props: typeof __VLS_3) => any;
|
|
7
|
+
} & {
|
|
8
|
+
menu?: (props: typeof __VLS_20) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import('vue').DefineComponent<MDropdownProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
close: () => any;
|
|
12
|
+
command: (value: unknown) => any;
|
|
13
|
+
open: () => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<MDropdownProps> & Readonly<{
|
|
15
|
+
onClose?: (() => any) | undefined;
|
|
16
|
+
onCommand?: ((value: unknown) => any) | undefined;
|
|
17
|
+
onOpen?: (() => any) | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
appendToBody: boolean;
|
|
21
|
+
trigger: import('./types').DropdownTrigger;
|
|
22
|
+
placement: DropdownPlacement;
|
|
23
|
+
offset: number;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MDropdownItemProps } from './types';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<MDropdownItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
command: (value: unknown) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<MDropdownItemProps> & Readonly<{
|
|
9
|
+
onCommand?: ((value: unknown) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
divider: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* MDropdown 通过 provide 暴露的上下文:
|
|
4
|
+
* MDropdownItem 点击时回调,实现「点击菜单项 → 抛出 command 并自动收起」,
|
|
5
|
+
* 无需手动在每一项上绑定关闭逻辑。
|
|
6
|
+
*/
|
|
7
|
+
export interface DropdownContext {
|
|
8
|
+
/** 点击菜单项:向 MDropdown 抛出 command 事件(value 为该项的 command 值) */
|
|
9
|
+
onItemClick: (value: unknown) => void;
|
|
10
|
+
/** 收起菜单 */
|
|
11
|
+
close: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const dropdownContextKey: InjectionKey<DropdownContext>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 下拉菜单弹出位置:上 / 下 各三个水平对齐位
|
|
3
|
+
* - top-start 上方,与触发区左对齐
|
|
4
|
+
* - top-center 上方,与触发区水平居中
|
|
5
|
+
* - top-end 上方,与触发区右对齐
|
|
6
|
+
* - bottom-start 下方,与触发区左对齐(默认)
|
|
7
|
+
* - bottom-center 下方,与触发区水平居中
|
|
8
|
+
* - bottom-end 下方,与触发区右对齐
|
|
9
|
+
*/
|
|
10
|
+
export type DropdownPlacement = 'top-start' | 'top-center' | 'top-end' | 'bottom-start' | 'bottom-center' | 'bottom-end';
|
|
11
|
+
/** 触发方式:点击(默认)或悬停 */
|
|
12
|
+
export type DropdownTrigger = 'click' | 'hover';
|
|
13
|
+
export interface MDropdownProps {
|
|
14
|
+
/** 弹出位置:top / bottom 各支持 start(左对齐)、center(居中)、end(右对齐) */
|
|
15
|
+
placement?: DropdownPlacement;
|
|
16
|
+
/** 触发方式:点击或悬停 */
|
|
17
|
+
trigger?: DropdownTrigger;
|
|
18
|
+
/** 是否禁用 */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** 菜单宽度(任意 CSS 长度);不传则与触发区等宽 */
|
|
21
|
+
width?: string;
|
|
22
|
+
/** 菜单与触发区之间的间距(px) */
|
|
23
|
+
offset?: number;
|
|
24
|
+
/** 是否挂载到 body(避免被父级 overflow / z-index 裁剪) */
|
|
25
|
+
appendToBody?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface MDropdownItemProps {
|
|
28
|
+
/** 点击菜单项时随 command 事件抛出的值(在 MDropdown 上监听) */
|
|
29
|
+
command?: unknown;
|
|
30
|
+
/** 是否禁用 */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** 渲染为分隔线而非菜单项 */
|
|
33
|
+
divider?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare const MDropdownPropsDefault: {
|
|
36
|
+
readonly placement: "bottom-start";
|
|
37
|
+
readonly trigger: "click";
|
|
38
|
+
readonly disabled: false;
|
|
39
|
+
readonly offset: 4;
|
|
40
|
+
readonly appendToBody: true;
|
|
41
|
+
};
|
|
42
|
+
export declare const MDropdownItemPropsDefault: {
|
|
43
|
+
readonly disabled: false;
|
|
44
|
+
readonly divider: false;
|
|
45
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MFabProps } from './types';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
icon?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
default?: (props: typeof __VLS_3) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<MFabProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
click: (event: MouseEvent) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<MFabProps> & Readonly<{
|
|
11
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
size: import('./types').FabSize;
|
|
14
|
+
color: import('./types').FabColor;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
position: import('./types').FabPosition;
|
|
17
|
+
extended: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type FabColor = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
2
|
+
export type FabSize = 'small' | 'medium' | 'large';
|
|
3
|
+
export type FabPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | '';
|
|
4
|
+
export interface MFabProps {
|
|
5
|
+
color?: FabColor;
|
|
6
|
+
size?: FabSize;
|
|
7
|
+
/** 悬浮定位:传值后按钮使用 fixed 定位并贴到对应角落,空字符串表示留在文档流 */
|
|
8
|
+
position?: FabPosition;
|
|
9
|
+
/** 扩展模式:图标 + 文本横排胶囊形(MUI ExtendedFab) */
|
|
10
|
+
extended?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** 无障碍标签(纯图标无文本时建议传入) */
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const MFabPropsDefault: {
|
|
16
|
+
readonly color: "primary";
|
|
17
|
+
readonly size: "medium";
|
|
18
|
+
readonly position: "";
|
|
19
|
+
readonly extended: false;
|
|
20
|
+
readonly disabled: false;
|
|
21
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import { toast } from './toast';
|
|
3
|
+
export * from './alert';
|
|
4
|
+
export * from './avatar';
|
|
5
|
+
export * from './button';
|
|
6
|
+
export * from './button-group';
|
|
7
|
+
export * from './checkbox';
|
|
8
|
+
export * from './date-picker';
|
|
9
|
+
export * from './date-range-picker';
|
|
10
|
+
export * from './dialog';
|
|
11
|
+
export * from './drawer';
|
|
12
|
+
export * from './dropdown';
|
|
13
|
+
export * from './fab';
|
|
14
|
+
export * from './input';
|
|
15
|
+
export * from './input-number';
|
|
16
|
+
export * from './radio';
|
|
17
|
+
export * from './select';
|
|
18
|
+
export * from './slider';
|
|
19
|
+
export * from './switch';
|
|
20
|
+
export * from './tabs';
|
|
21
|
+
export * from './toast';
|
|
22
|
+
export * from './tooltip';
|
|
23
|
+
export * from './directives/ripple';
|
|
24
|
+
/** 编程式 Toast API(非组件,供 JS 直接调用) */
|
|
25
|
+
export { toast };
|
|
26
|
+
export declare const MiaoUI: Plugin;
|
|
27
|
+
export default MiaoUI;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { MInputProps } from './types';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
prefix?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
suffix?: (props: typeof __VLS_3) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<MInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
focus: (event: FocusEvent) => any;
|
|
10
|
+
blur: (event: FocusEvent) => any;
|
|
11
|
+
change: (value: string) => any;
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
clear: () => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<MInputProps> & Readonly<{
|
|
15
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
16
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
17
|
+
onChange?: ((value: string) => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
onClear?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
type: string;
|
|
22
|
+
size: import('./types').InputSize;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
clearable: boolean;
|
|
25
|
+
readonly: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type InputSize = 'small' | 'default' | 'large';
|
|
2
|
+
export interface MInputProps {
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
clearable?: boolean;
|
|
9
|
+
/** 高度取全局 --m-size-* 令牌:small 28px / default 36px / large 48px */
|
|
10
|
+
size?: InputSize;
|
|
11
|
+
maxlength?: number;
|
|
12
|
+
/** 原生 input name(表单提交) */
|
|
13
|
+
name?: string;
|
|
14
|
+
/** 自动聚焦 */
|
|
15
|
+
autofocus?: boolean;
|
|
16
|
+
width?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const MInputPropsDefault: {
|
|
19
|
+
readonly type: "text";
|
|
20
|
+
readonly disabled: false;
|
|
21
|
+
readonly readonly: false;
|
|
22
|
+
readonly clearable: false;
|
|
23
|
+
readonly size: "default";
|
|
24
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MInputNumberProps } from './types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<MInputNumberProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
focus: (event: FocusEvent) => any;
|
|
4
|
+
blur: (event: FocusEvent) => any;
|
|
5
|
+
change: (value: number | null) => any;
|
|
6
|
+
"update:modelValue": (value: number | null) => any;
|
|
7
|
+
clear: () => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<MInputNumberProps> & Readonly<{
|
|
9
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
10
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
11
|
+
onChange?: ((value: number | null) => any) | undefined;
|
|
12
|
+
"onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
|
|
13
|
+
onClear?: (() => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
size: import('..').InputSize;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
step: number;
|
|
18
|
+
clearable: boolean;
|
|
19
|
+
readonly: boolean;
|
|
20
|
+
controls: import('./types').InputNumberControls;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InputSize } from '../input/types';
|
|
2
|
+
/** 步进按钮布局:right 右侧(默认) / both 左右两侧 */
|
|
3
|
+
export type InputNumberControls = 'right' | 'both';
|
|
4
|
+
export interface MInputNumberProps {
|
|
5
|
+
/** 空值传 undefined / null 均可 */
|
|
6
|
+
modelValue?: number | null;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
readonly?: boolean;
|
|
10
|
+
clearable?: boolean;
|
|
11
|
+
/** 高度取全局 --m-size-* 令牌:small 28px / default 36px / large 48px */
|
|
12
|
+
size?: InputSize;
|
|
13
|
+
/** 步进按钮布局:right 右侧并排(默认,down / up 箭头) / both 左右两侧(减号 / 加号) */
|
|
14
|
+
controls?: InputNumberControls;
|
|
15
|
+
min?: number;
|
|
16
|
+
max?: number;
|
|
17
|
+
step?: number;
|
|
18
|
+
/** 显示精度(失焦时按该精度取整) */
|
|
19
|
+
precision?: number;
|
|
20
|
+
width?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const MInputNumberPropsDefault: {
|
|
23
|
+
readonly disabled: false;
|
|
24
|
+
readonly readonly: false;
|
|
25
|
+
readonly clearable: false;
|
|
26
|
+
readonly size: "default";
|
|
27
|
+
readonly controls: "right";
|
|
28
|
+
readonly step: 1;
|
|
29
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--m-primary-rgb:25 118 210;--m-primary:#1976d2;--m-primary-hover:#1565c0;--m-primary-light:#42a5f5;--m-primary-contrast:#fff;--m-secondary-rgb:156 39 176;--m-secondary:#9c27b0;--m-secondary-hover:#7b1fa2;--m-secondary-light:#ba68c8;--m-secondary-contrast:#fff;--m-success-rgb:46 125 50;--m-success:#2e7d32;--m-success-hover:#1b5e20;--m-success-light:#4caf50;--m-success-contrast:#fff;--m-warning-rgb:237 108 2;--m-warning:#ed6c02;--m-warning-hover:#e65100;--m-warning-light:#ff9800;--m-warning-contrast:#fff;--m-error-rgb:211 47 47;--m-error:#d32f2f;--m-error-hover:#c62828;--m-error-light:#ef5350;--m-error-contrast:#fff;--m-info-rgb:2 136 209;--m-info:#0288d1;--m-info-hover:#01579b;--m-info-light:#03a9f4;--m-info-contrast:#fff;--m-text-title:#000000de;--m-text-default:#000000de;--m-text-sub:#0009;--m-text-disabled:#00000061;--m-text-white:#fff;--m-border:#0000001f;--m-border-disabled:#00000042;--m-input-border:#0000003b;--m-placeholder-opacity:.42;--m-action-hover:#0000000a;--m-action-selected:#00000014;--m-action-disabled:#00000042;--m-action-disabled-bg:#0000001f;--m-action-focus:#0000001f;--m-paper:#fff;--m-card:#fff;--m-html:#fff;--m-mask:#00000080;--m-shadow-0:none;--m-shadow-1:0px 2px 1px -1px #0003, 0px 1px 1px 0px #00000024, 0px 1px 3px 0px #0000001f;--m-shadow-2:0px 3px 1px -2px #0003, 0px 2px 2px 0px #00000024, 0px 1px 5px 0px #0000001f;--m-shadow-3:0px 3px 3px -2px #0003, 0px 3px 4px 0px #00000024, 0px 1px 8px 0px #0000001f;--m-shadow-4:0px 2px 4px -1px #0003, 0px 4px 5px 0px #00000024, 0px 1px 10px 0px #0000001f;--m-shadow-6:0px 3px 5px -1px #0003, 0px 6px 10px 0px #00000024, 0px 1px 18px 0px #0000001f;--m-shadow-8:0px 5px 5px -3px #0003, 0px 8px 10px 1px #00000024, 0px 3px 14px 2px #0000001f;--m-shadow-12:0px 7px 8px -4px #0003, 0px 12px 17px 2px #00000024, 0px 5px 22px 4px #0000001f;--m-shadow-16:0px 8px 10px -5px #0003, 0px 16px 24px 2px #00000024, 0px 6px 30px 5px #0000001f;--m-shadow-24:0px 11px 15px -7px #0003, 0px 24px 38px 3px #00000024, 0px 9px 46px 8px #0000001f;--m-dialog-shadow:var(--m-shadow-24);--m-dropdown-shadow:var(--m-shadow-8);--m-radius:4px;--m-font-family:"Roboto", "Helvetica", "Arial", sans-serif;--m-font-weight-medium:500;--m-ease-in-out:cubic-bezier(.4, 0, .2, 1);--m-ease-out:cubic-bezier(0, 0, .2, 1);--m-ease-in:cubic-bezier(.4, 0, 1, 1);--m-ease-sharp:cubic-bezier(.4, 0, .6, 1);--m-dur-shortest:.15s;--m-dur-shorter:.2s;--m-dur-short:.25s;--m-dur-standard:.3s;--m-dur-complex:.375s;--m-dur-entering:.225s;--m-dur-leaving:.195s;--m-z-modal:1300;--m-z-menu:1301;--m-z-tooltip:1500;--m-z-toast:1600;--m-size-default:36px;--m-size-small:28px;--m-size-large:48px}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--m-primary-rgb:144 202 249;--m-primary:#90caf9;--m-primary-hover:#42a5f5;--m-primary-light:#e3f2fd;--m-primary-contrast:#000000de;--m-secondary-rgb:206 147 216;--m-secondary:#ce93d8;--m-secondary-hover:#ab47bc;--m-secondary-light:#f3e5f5;--m-secondary-contrast:#000000de;--m-success-rgb:102 187 106;--m-success:#66bb6a;--m-success-hover:#4caf50;--m-success-light:#e8f5e9;--m-success-contrast:#000000de;--m-warning-rgb:255 167 38;--m-warning:#ffa726;--m-warning-hover:#ff9800;--m-warning-light:#fff3e0;--m-warning-contrast:#000000de;--m-error-rgb:244 67 54;--m-error:#f44336;--m-error-hover:#e53935;--m-error-light:#ffebee;--m-error-contrast:#fff;--m-info-rgb:41 182 246;--m-info:#29b6f6;--m-info-hover:#03a9f4;--m-info-light:#e1f5fe;--m-info-contrast:#000000de;--m-text-title:#fff;--m-text-default:#fff;--m-text-sub:#ffffffb3;--m-text-disabled:#ffffff80;--m-text-white:#fff;--m-border:#ffffff1f;--m-border-disabled:#ffffff4d;--m-input-border:#ffffff3b;--m-placeholder-opacity:.5;--m-action-hover:#ffffff14;--m-action-selected:#ffffff29;--m-action-disabled:#ffffff4d;--m-action-disabled-bg:#ffffff1f;--m-action-focus:#ffffff1f;--m-paper:#121212;--m-card:#1e1e1e;--m-html:#121212;--m-mask:#00000080;--m-shadow-0:none;--m-shadow-1:0px 2px 1px -1px #0006, 0px 1px 1px 0px #00000047, 0px 1px 3px 0px #0000003d;--m-shadow-2:0px 3px 1px -2px #0006, 0px 2px 2px 0px #00000047, 0px 1px 5px 0px #0000003d;--m-shadow-4:0px 2px 4px -1px #0006, 0px 4px 5px 0px #00000047, 0px 1px 10px 0px #0000003d;--m-shadow-6:0px 3px 5px -1px #0006, 0px 6px 10px 0px #00000047, 0px 1px 18px 0px #0000003d;--m-shadow-8:0px 5px 5px -3px #0006, 0px 8px 10px 1px #00000047, 0px 3px 14px 2px #0000003d;--m-shadow-24:0px 11px 15px -7px #0009, 0px 24px 38px 3px #0000006b, 0px 9px 46px 8px #0000005c;--m-dialog-shadow:var(--m-shadow-24);--m-dropdown-shadow:var(--m-shadow-8)}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{transition:background-color .2s}*{-webkit-tap-highlight-color:transparent}.m-ripple{z-index:0;border-radius:inherit;pointer-events:none;position:absolute;inset:0;overflow:hidden}.m-ripple-wave{pointer-events:none;opacity:0;border-radius:50%;position:absolute}.m-ripple-wave--active{opacity:.3;animation:m-ripple-enter var(--m-ripple-duration,.55s) cubic-bezier(.4, 0, .2, 1);transform:scale(1)}.m-ripple-wave--pulsate{opacity:.3;animation:.2s cubic-bezier(.4,0,.2,1) m-ripple-enter;transform:scale(1)}.m-ripple-child{opacity:1;background-color:currentColor;border-radius:50%;width:100%;height:100%;display:block}.m-ripple-child--leaving{opacity:0;animation:m-ripple-exit var(--m-ripple-duration,.55s) cubic-bezier(.4, 0, .2, 1)}.m-ripple-child--pulsate{animation:2.5s cubic-bezier(.4,0,.2,1) .2s infinite m-ripple-pulsate}@keyframes m-ripple-enter{0%{transform:scale(var(--m-ripple-initial-scale,0));opacity:.1}to{opacity:.3;transform:scale(1)}}@keyframes m-ripple-exit{0%{opacity:1}to{opacity:0}}@keyframes m-ripple-pulsate{0%{transform:scale(1)}50%{transform:scale(.92)}to{transform:scale(1)}}@media (prefers-reduced-motion:reduce){.m-ripple-wave--active,.m-ripple-wave--pulsate,.m-ripple-child--leaving,.m-ripple-child--pulsate{animation:none}}
|
|
2
|
+
/*$vite$:1*/
|