@xn-lib/directives 0.1.5 → 0.1.7

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.
@@ -1,4 +1,5 @@
1
1
  export * from './overflowTooltip';
2
+ export * from './tooltips';
2
3
  export declare const directives: {
3
4
  overflowTooltip: {
4
5
  install(app: import("vue").App, defaultOptions?: Partial<import("./overflowTooltip").OverflowTooltipOptions>): void;
@@ -0,0 +1,8 @@
1
+ export * from './z-index-manager';
2
+ /**
3
+ * 解析当前组件ClassName,自动添加前缀
4
+ * @param clsName 当前ClassName
5
+ * @param prefix 前缀,默认为xn
6
+ * @returns prefix-clsName
7
+ */
8
+ export declare function resolveClassName(clsName: string, prefix?: string): string;
@@ -0,0 +1,68 @@
1
+ /**
2
+ * 页面框架层级
3
+ */
4
+ export declare enum XNLAYERTYPE {
5
+ /** 网站内容的背景、拓扑的画布等 */
6
+ BOTTOM = "bottom",
7
+ /** 页面呈现的各类内容 */
8
+ CONTENT = "content",
9
+ /** 页面需全屏操作的部分功能或编辑器的全屏模式 */
10
+ FULLSCREEN = "fullScreen",
11
+ /** 各类消息提示 */
12
+ MESSAGE = "message",
13
+ /** 各类弹窗或抽屉(非模态弹窗不考虑) */
14
+ MODAL = "modal",
15
+ /** 顶部导航、侧边导航以及用户信息等 */
16
+ NAVI = "navi",
17
+ /** 各类功能插件 */
18
+ PLUGINS = "plugins",
19
+ /** 各类popper提示 */
20
+ POPPER = "popper"
21
+ }
22
+ /** 定义不同分层默认值 */
23
+ export declare const XNLAYERD_INDEX_EFAULT_VALUE: {
24
+ bottom: number;
25
+ content: number;
26
+ navi: number;
27
+ fullScreen: number;
28
+ modal: number;
29
+ plugins: number;
30
+ message: number;
31
+ popper: number;
32
+ };
33
+ declare class XNZIndexManager {
34
+ storageLayerIndexValue: any;
35
+ constructor();
36
+ /**
37
+ *
38
+ * @param type
39
+ * @returns
40
+ */
41
+ getNextIndex(type: XNLAYERTYPE): number | undefined;
42
+ /** 获取弹窗类型最新zIndex的值 */
43
+ getModalNextIndex(): number | undefined;
44
+ /** 获取Message类型最新zIndex的值 */
45
+ getMessageNextIndex(): number | undefined;
46
+ /** 获取全屏类型最新zIndex的值 */
47
+ getFullScreenNextIndex(): number | undefined;
48
+ /** 获取导航类型最新zIndex的值 */
49
+ getNaviNextIndex(): number | undefined;
50
+ /** 获取导航类型最新zIndex的值 */
51
+ getPopperIndex(): number | undefined;
52
+ /**
53
+ * 更新自定义默认zIndex配置
54
+ * @param config 配置项
55
+ */
56
+ setDefaultZIndex(config: any): void;
57
+ /**
58
+ * 重置zIndex
59
+ * @param config 配置项
60
+ */
61
+ resetZIndex(config: any): void;
62
+ /**
63
+ * 根据默认设置创建副本
64
+ */
65
+ private copyDefaultValue;
66
+ }
67
+ export declare const xnZIndexManager: XNZIndexManager;
68
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './src';
2
+ import { Directive } from 'vue';
3
+ declare const vXnTooltips: import("vue").ObjectDirective<any, any, string, any>;
4
+ export declare const tooltipDirective: Directive;
5
+ export { vXnTooltips };
@@ -0,0 +1,20 @@
1
+ import { ObjectDirective, VNode } from 'vue';
2
+ import { Placement } from '@popperjs/core';
3
+ import '../../styles/popover.scss';
4
+ export declare type IOptions = {
5
+ arrow: boolean;
6
+ disabled: boolean;
7
+ placement: Placement;
8
+ content: VNode | string;
9
+ showOnInit: boolean;
10
+ theme: string;
11
+ trigger: string;
12
+ distance: number;
13
+ extCls: string;
14
+ delay: number;
15
+ sameWidth: boolean;
16
+ onShow: () => void;
17
+ onHide: () => void;
18
+ };
19
+ declare const tooltips: ObjectDirective;
20
+ export default tooltips;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@xn-lib/directives",
4
- "version": "0.1.5",
4
+ "version": "0.1.7",
5
5
  "description": "",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.mjs",
@@ -37,6 +37,11 @@
37
37
  "author": "",
38
38
  "license": "ISC",
39
39
  "dependencies": {
40
+ "vue": "^3.3.4",
40
41
  "tippy.js": "^6.3.7"
42
+ },
43
+ "devDependencies": {
44
+ "@popperjs/core": "^2.11.8",
45
+ "uuid": "^13.0.0"
41
46
  }
42
47
  }