prlg-ui 1.6.14 → 1.7.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/dist/blocks/index.cjs.js +1 -1
- package/dist/blocks/index.es.js +1 -1
- package/dist/icons/index.cjs.js +1 -1
- package/dist/icons/index.es.js +302 -278
- package/dist/icons.d.ts +2 -0
- package/dist/index.d.ts +71 -34
- package/dist/onClickOutside.util-BXSbNnqr.js +30 -0
- package/dist/onClickOutside.util-DWtrUc1v.cjs +1 -0
- package/dist/prlg-ui.cjs.js +1 -1
- package/dist/prlg-ui.css +1 -1
- package/dist/prlg-ui.es.js +2508 -1787
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.es.js +1 -1
- package/dist/utils/onClickOutside.util.ts +32 -10
- package/dist/utils.d.ts +13 -2
- package/package.json +2 -1
- package/dist/onClickOutside.util-CJueL_Rz.js +0 -21
- package/dist/onClickOutside.util-DD1l-Ra5.cjs +0 -1
package/dist/icons.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export declare const BellIcon: DefineComponent< {}, {}, {}, {}, {}, Component
|
|
|
25
25
|
|
|
26
26
|
export declare const BonusIcon: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
27
27
|
|
|
28
|
+
export declare const BookIcon: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
29
|
+
|
|
28
30
|
export declare const BoxIcon: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
29
31
|
|
|
30
32
|
export declare const BriefcaseIcon: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ import { ExtractPropTypes } from 'vue';
|
|
|
17
17
|
import { GlobalComponents } from 'vue';
|
|
18
18
|
import { GlobalDirectives } from 'vue';
|
|
19
19
|
import { nextTick } from 'vue';
|
|
20
|
-
import { OffsetOptions } from '@floating-ui/dom';
|
|
21
20
|
import { OnCleanup } from '@vue/reactivity';
|
|
22
|
-
import { Placement } from '@floating-ui/
|
|
21
|
+
import { Placement } from '@floating-ui/vue';
|
|
22
|
+
import { Placement as Placement_2 } from '@floating-ui/dom';
|
|
23
23
|
import { PropType } from 'vue';
|
|
24
24
|
import { PublicProps } from 'vue';
|
|
25
25
|
import { Ref } from 'vue';
|
|
@@ -51,23 +51,45 @@ declare const __VLS_component_12: DefineComponent<__VLS_PublicProps_9, {}, {}, {
|
|
|
51
51
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
52
52
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
53
53
|
|
|
54
|
-
declare const __VLS_component_13: DefineComponent<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
declare const __VLS_component_13: DefineComponent<ExtractPropTypes< {
|
|
55
|
+
placement: {
|
|
56
|
+
type: PropType<Placement>;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
offset: {
|
|
60
|
+
type: PropType<OffsetValue | number>;
|
|
61
|
+
};
|
|
62
|
+
arrowVisible: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
60
66
|
}>, {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
open: () => void;
|
|
68
|
+
close: () => void;
|
|
69
|
+
openSecondScreen: (event?: Event) => Promise<void>;
|
|
70
|
+
closeSecondScreen: () => void;
|
|
71
|
+
isOpen: Ref<boolean, boolean>;
|
|
72
|
+
isSecondScreenOpen: Ref<boolean, boolean>;
|
|
73
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
74
|
+
placement: {
|
|
75
|
+
type: PropType<Placement>;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
offset: {
|
|
79
|
+
type: PropType<OffsetValue | number>;
|
|
80
|
+
};
|
|
81
|
+
arrowVisible: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
|
+
}>> & Readonly<{}>, {
|
|
64
86
|
placement: Placement;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
arrowVisible: boolean;
|
|
88
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
89
|
+
reference: HTMLDivElement;
|
|
90
|
+
floating: HTMLDivElement;
|
|
91
|
+
'arrow-block': HTMLDivElement;
|
|
92
|
+
'second-screen': HTMLDivElement;
|
|
71
93
|
}, HTMLDivElement>;
|
|
72
94
|
|
|
73
95
|
declare const __VLS_component_14: DefineComponent<__VLS_Props_19, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_19> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -407,12 +429,23 @@ declare function __VLS_template_13(): {
|
|
|
407
429
|
attrs: Partial<{}>;
|
|
408
430
|
slots: {
|
|
409
431
|
trigger?(_: {}): any;
|
|
410
|
-
default?(_: {
|
|
411
|
-
|
|
432
|
+
default?(_: {
|
|
433
|
+
openSecondScreen: (event?: Event) => Promise<void>;
|
|
434
|
+
closeSecondScreen: () => void;
|
|
435
|
+
}): any;
|
|
436
|
+
default?(_: {
|
|
437
|
+
openSecondScreen: (event?: Event) => Promise<void>;
|
|
438
|
+
closeSecondScreen: () => void;
|
|
439
|
+
}): any;
|
|
440
|
+
'second-screen'?(_: {
|
|
441
|
+
closeSecondScreen: () => void;
|
|
442
|
+
}): any;
|
|
412
443
|
};
|
|
413
444
|
refs: {
|
|
414
|
-
|
|
415
|
-
|
|
445
|
+
reference: HTMLDivElement;
|
|
446
|
+
floating: HTMLDivElement;
|
|
447
|
+
'arrow-block': HTMLDivElement;
|
|
448
|
+
'second-screen': HTMLDivElement;
|
|
416
449
|
};
|
|
417
450
|
rootEl: HTMLDivElement;
|
|
418
451
|
};
|
|
@@ -1018,21 +1051,25 @@ export declare const Message: __VLS_WithTemplateSlots_8<typeof __VLS_component_8
|
|
|
1018
1051
|
|
|
1019
1052
|
export declare const Modal: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
|
|
1020
1053
|
|
|
1054
|
+
declare type OffsetValue = number | {
|
|
1055
|
+
/**
|
|
1056
|
+
* Отступ по главной оси
|
|
1057
|
+
*/
|
|
1058
|
+
mainAxis?: number;
|
|
1059
|
+
/**
|
|
1060
|
+
* Отступ по поперечной оси
|
|
1061
|
+
*/
|
|
1062
|
+
crossAxis?: number;
|
|
1063
|
+
/**
|
|
1064
|
+
* Отступ по оси выравнивания
|
|
1065
|
+
*/
|
|
1066
|
+
alignmentAxis?: number | null;
|
|
1067
|
+
};
|
|
1068
|
+
|
|
1021
1069
|
export declare const OverlayBadge: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
|
|
1022
1070
|
|
|
1023
1071
|
export declare const Popover: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
|
|
1024
1072
|
|
|
1025
|
-
declare interface PopoverProps {
|
|
1026
|
-
placement?: Placement;
|
|
1027
|
-
size?: 'small' | 'default';
|
|
1028
|
-
trigger?: 'click' | 'hover';
|
|
1029
|
-
offset?: OffsetOptions;
|
|
1030
|
-
popoverClass?: string;
|
|
1031
|
-
disabled?: boolean;
|
|
1032
|
-
showArrow?: boolean;
|
|
1033
|
-
hoverDelay?: number;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
1073
|
declare type Position = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright';
|
|
1037
1074
|
|
|
1038
1075
|
declare interface Props {
|
|
@@ -1259,7 +1296,7 @@ show: (element: HTMLElement) => void;
|
|
|
1259
1296
|
hide: () => void;
|
|
1260
1297
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TooltipProps> & Readonly<{}>, {
|
|
1261
1298
|
offset: number;
|
|
1262
|
-
placement:
|
|
1299
|
+
placement: Placement_2;
|
|
1263
1300
|
showArrow: boolean;
|
|
1264
1301
|
delay: number;
|
|
1265
1302
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
@@ -1283,7 +1320,7 @@ declare interface TooltipElement extends HTMLElement {
|
|
|
1283
1320
|
|
|
1284
1321
|
declare interface TooltipProps {
|
|
1285
1322
|
content: string;
|
|
1286
|
-
placement?:
|
|
1323
|
+
placement?: Placement_2;
|
|
1287
1324
|
offset?: number;
|
|
1288
1325
|
tooltipClass?: string;
|
|
1289
1326
|
showArrow?: boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { toValue as f, unref as g } from "vue";
|
|
2
|
+
const u = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
function l(t) {
|
|
4
|
+
const r = g(t);
|
|
5
|
+
return r?.$el ?? r;
|
|
6
|
+
}
|
|
7
|
+
function p(t) {
|
|
8
|
+
return typeof t == "string" ? document.querySelector(t) : l(t);
|
|
9
|
+
}
|
|
10
|
+
function w(t, r, d = {}) {
|
|
11
|
+
const n = p(t);
|
|
12
|
+
if (console.log("targetElement", n), !n) return () => {
|
|
13
|
+
};
|
|
14
|
+
const i = u.get(n);
|
|
15
|
+
i && (i(), u.delete(n));
|
|
16
|
+
const o = (s) => {
|
|
17
|
+
const c = s.target instanceof Node ? s.target : null;
|
|
18
|
+
if (!c) return;
|
|
19
|
+
const m = (f(d.ignore) ?? []).map((e) => typeof e == "string" ? document.querySelector(e) : l(e)).filter((e) => e != null);
|
|
20
|
+
n.contains(c) || m.some((e) => e.contains(c)) || r(s);
|
|
21
|
+
};
|
|
22
|
+
document.addEventListener("mousedown", o, { capture: !0 }), document.addEventListener("touchstart", o, { capture: !0 });
|
|
23
|
+
const a = () => {
|
|
24
|
+
document.removeEventListener("mousedown", o, { capture: !0 }), document.removeEventListener("touchstart", o, { capture: !0 }), u.delete(n);
|
|
25
|
+
};
|
|
26
|
+
return u.set(n, a), a;
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
w as o
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("vue"),u=new WeakMap;function d(t){const r=l.unref(t);return r?.$el??r}function g(t){return typeof t=="string"?document.querySelector(t):d(t)}function p(t,r,m={}){const n=g(t);if(console.log("targetElement",n),!n)return()=>{};const i=u.get(n);i&&(i(),u.delete(n));const o=s=>{const c=s.target instanceof Node?s.target:null;if(!c)return;const f=(l.toValue(m.ignore)??[]).map(e=>typeof e=="string"?document.querySelector(e):d(e)).filter(e=>e!=null);n.contains(c)||f.some(e=>e.contains(c))||r(s)};document.addEventListener("mousedown",o,{capture:!0}),document.addEventListener("touchstart",o,{capture:!0});const a=()=>{document.removeEventListener("mousedown",o,{capture:!0}),document.removeEventListener("touchstart",o,{capture:!0}),u.delete(n)};return u.set(n,a),a}exports.onClickOutside=p;
|