@v-c/trigger 0.0.13 → 0.0.15

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,91 +1,62 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const vue = require("vue");
4
- const util = require("@v-c/util");
5
- const Arrow = /* @__PURE__ */ vue.defineComponent({
6
- props: {
7
- prefixCls: {
8
- type: String,
9
- required: true,
10
- default: void 0
11
- },
12
- align: {
13
- type: Object,
14
- required: true,
15
- default: void 0
16
- },
17
- arrow: {
18
- type: Object,
19
- required: true,
20
- default: void 0
21
- },
22
- arrowPos: {
23
- type: Object,
24
- required: true,
25
- default: void 0
26
- }
27
- },
28
- name: "Arrow",
29
- setup(props, {
30
- expose
31
- }) {
32
- const arrowRef = vue.shallowRef();
33
- expose({
34
- arrowRef
35
- });
36
- return () => {
37
- const {
38
- prefixCls,
39
- align,
40
- arrow,
41
- arrowPos
42
- } = props;
43
- const {
44
- className,
45
- content,
46
- style
47
- } = arrow || {};
48
- const {
49
- x = 0,
50
- y = 0
51
- } = arrowPos;
52
- if (!align || !align.points) {
53
- return null;
54
- }
55
- const alignStyle = {
56
- position: "absolute"
57
- };
58
- if (align.autoArrow !== false) {
59
- const popupPoints = align.points[0];
60
- const targetPoints = align.points[1];
61
- const popupTB = popupPoints[0];
62
- const popupLR = popupPoints[1];
63
- const targetTB = targetPoints[0];
64
- const targetLR = targetPoints[1];
65
- if (popupTB === targetTB || !["t", "b"].includes(popupTB)) {
66
- alignStyle.top = `${y}px`;
67
- } else if (popupTB === "t") {
68
- alignStyle.top = 0;
69
- } else {
70
- alignStyle.bottom = 0;
71
- }
72
- if (popupLR === targetLR || !["l", "r"].includes(popupLR)) {
73
- alignStyle.left = `${x}px`;
74
- } else if (popupLR === "l") {
75
- alignStyle.left = 0;
76
- } else {
77
- alignStyle.right = 0;
78
- }
79
- }
80
- return vue.createVNode("div", {
81
- "ref": arrowRef,
82
- "class": util.classNames(`${prefixCls}-arrow`, className),
83
- "style": {
84
- ...alignStyle,
85
- ...style
86
- }
87
- }, [content]);
88
- };
89
- }
1
+ const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
2
+ let vue = require("vue");
3
+ let __v_c_util = require("@v-c/util");
4
+ const Arrow = /* @__PURE__ */ (0, vue.defineComponent)({
5
+ props: {
6
+ prefixCls: {
7
+ type: String,
8
+ required: true,
9
+ default: void 0
10
+ },
11
+ align: {
12
+ type: Object,
13
+ required: true,
14
+ default: void 0
15
+ },
16
+ arrow: {
17
+ type: Object,
18
+ required: true,
19
+ default: void 0
20
+ },
21
+ arrowPos: {
22
+ type: Object,
23
+ required: true,
24
+ default: void 0
25
+ }
26
+ },
27
+ name: "Arrow",
28
+ setup(props, { expose }) {
29
+ const arrowRef = (0, vue.shallowRef)();
30
+ expose({ arrowRef });
31
+ return () => {
32
+ const { prefixCls, align, arrow, arrowPos } = props;
33
+ const { className, content, style } = arrow || {};
34
+ const { x = 0, y = 0 } = arrowPos;
35
+ if (!align || !align.points) return null;
36
+ const alignStyle = { position: "absolute" };
37
+ if (align.autoArrow !== false) {
38
+ const popupPoints = align.points[0];
39
+ const targetPoints = align.points[1];
40
+ const popupTB = popupPoints[0];
41
+ const popupLR = popupPoints[1];
42
+ const targetTB = targetPoints[0];
43
+ const targetLR = targetPoints[1];
44
+ if (popupTB === targetTB || !["t", "b"].includes(popupTB)) alignStyle.top = `${y}px`;
45
+ else if (popupTB === "t") alignStyle.top = 0;
46
+ else alignStyle.bottom = 0;
47
+ if (popupLR === targetLR || !["l", "r"].includes(popupLR)) alignStyle.left = `${x}px`;
48
+ else if (popupLR === "l") alignStyle.left = 0;
49
+ else alignStyle.right = 0;
50
+ }
51
+ return (0, vue.createVNode)("div", {
52
+ "ref": arrowRef,
53
+ "class": (0, __v_c_util.classNames)(`${prefixCls}-arrow`, className),
54
+ "style": {
55
+ ...alignStyle,
56
+ ...style
57
+ }
58
+ }, [content]);
59
+ };
60
+ }
90
61
  });
91
62
  exports.Arrow = Arrow;
@@ -1,91 +1,61 @@
1
- import { defineComponent, shallowRef, createVNode } from "vue";
1
+ import { createVNode, defineComponent, shallowRef } from "vue";
2
2
  import { classNames } from "@v-c/util";
3
3
  const Arrow = /* @__PURE__ */ defineComponent({
4
- props: {
5
- prefixCls: {
6
- type: String,
7
- required: true,
8
- default: void 0
9
- },
10
- align: {
11
- type: Object,
12
- required: true,
13
- default: void 0
14
- },
15
- arrow: {
16
- type: Object,
17
- required: true,
18
- default: void 0
19
- },
20
- arrowPos: {
21
- type: Object,
22
- required: true,
23
- default: void 0
24
- }
25
- },
26
- name: "Arrow",
27
- setup(props, {
28
- expose
29
- }) {
30
- const arrowRef = shallowRef();
31
- expose({
32
- arrowRef
33
- });
34
- return () => {
35
- const {
36
- prefixCls,
37
- align,
38
- arrow,
39
- arrowPos
40
- } = props;
41
- const {
42
- className,
43
- content,
44
- style
45
- } = arrow || {};
46
- const {
47
- x = 0,
48
- y = 0
49
- } = arrowPos;
50
- if (!align || !align.points) {
51
- return null;
52
- }
53
- const alignStyle = {
54
- position: "absolute"
55
- };
56
- if (align.autoArrow !== false) {
57
- const popupPoints = align.points[0];
58
- const targetPoints = align.points[1];
59
- const popupTB = popupPoints[0];
60
- const popupLR = popupPoints[1];
61
- const targetTB = targetPoints[0];
62
- const targetLR = targetPoints[1];
63
- if (popupTB === targetTB || !["t", "b"].includes(popupTB)) {
64
- alignStyle.top = `${y}px`;
65
- } else if (popupTB === "t") {
66
- alignStyle.top = 0;
67
- } else {
68
- alignStyle.bottom = 0;
69
- }
70
- if (popupLR === targetLR || !["l", "r"].includes(popupLR)) {
71
- alignStyle.left = `${x}px`;
72
- } else if (popupLR === "l") {
73
- alignStyle.left = 0;
74
- } else {
75
- alignStyle.right = 0;
76
- }
77
- }
78
- return createVNode("div", {
79
- "ref": arrowRef,
80
- "class": classNames(`${prefixCls}-arrow`, className),
81
- "style": {
82
- ...alignStyle,
83
- ...style
84
- }
85
- }, [content]);
86
- };
87
- }
4
+ props: {
5
+ prefixCls: {
6
+ type: String,
7
+ required: true,
8
+ default: void 0
9
+ },
10
+ align: {
11
+ type: Object,
12
+ required: true,
13
+ default: void 0
14
+ },
15
+ arrow: {
16
+ type: Object,
17
+ required: true,
18
+ default: void 0
19
+ },
20
+ arrowPos: {
21
+ type: Object,
22
+ required: true,
23
+ default: void 0
24
+ }
25
+ },
26
+ name: "Arrow",
27
+ setup(props, { expose }) {
28
+ const arrowRef = shallowRef();
29
+ expose({ arrowRef });
30
+ return () => {
31
+ const { prefixCls, align, arrow, arrowPos } = props;
32
+ const { className, content, style } = arrow || {};
33
+ const { x = 0, y = 0 } = arrowPos;
34
+ if (!align || !align.points) return null;
35
+ const alignStyle = { position: "absolute" };
36
+ if (align.autoArrow !== false) {
37
+ const popupPoints = align.points[0];
38
+ const targetPoints = align.points[1];
39
+ const popupTB = popupPoints[0];
40
+ const popupLR = popupPoints[1];
41
+ const targetTB = targetPoints[0];
42
+ const targetLR = targetPoints[1];
43
+ if (popupTB === targetTB || !["t", "b"].includes(popupTB)) alignStyle.top = `${y}px`;
44
+ else if (popupTB === "t") alignStyle.top = 0;
45
+ else alignStyle.bottom = 0;
46
+ if (popupLR === targetLR || !["l", "r"].includes(popupLR)) alignStyle.left = `${x}px`;
47
+ else if (popupLR === "l") alignStyle.left = 0;
48
+ else alignStyle.right = 0;
49
+ }
50
+ return createVNode("div", {
51
+ "ref": arrowRef,
52
+ "class": classNames(`${prefixCls}-arrow`, className),
53
+ "style": {
54
+ ...alignStyle,
55
+ ...style
56
+ }
57
+ }, [content]);
58
+ };
59
+ }
88
60
  });
89
- export {
90
- Arrow
91
- };
61
+ export { Arrow };
@@ -1,66 +1,55 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const vue = require("vue");
4
- const transition = require("@v-c/util/dist/utils/transition");
5
- const Mask = /* @__PURE__ */ vue.defineComponent((props, {
6
- attrs
7
- }) => {
8
- return () => {
9
- const {
10
- prefixCls,
11
- open,
12
- zIndex,
13
- mask,
14
- motion,
15
- mobile
16
- } = props;
17
- if (!mask) {
18
- return null;
19
- }
20
- const transitionProps = transition.getTransitionProps(motion?.name, motion);
21
- return vue.createVNode(vue.Transition, transitionProps, {
22
- default: () => [open ? vue.createVNode("div", {
23
- "style": {
24
- zIndex
25
- },
26
- "class": [`${prefixCls}-mask`, mobile && `${prefixCls}-mask-mobile`, attrs.class]
27
- }, null) : null]
28
- });
29
- };
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
3
+ let vue = require("vue");
4
+ let __v_c_util_dist_utils_transition = require("@v-c/util/dist/utils/transition");
5
+ var Mask = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs }) => {
6
+ return () => {
7
+ const { prefixCls, open, zIndex, mask, motion, mobile } = props;
8
+ if (!mask) return null;
9
+ return (0, vue.createVNode)(vue.Transition, (0, __v_c_util_dist_utils_transition.getTransitionProps)(motion?.name, motion), { default: () => [open ? (0, vue.createVNode)("div", {
10
+ "style": { zIndex },
11
+ "class": [
12
+ `${prefixCls}-mask`,
13
+ mobile && `${prefixCls}-mask-mobile`,
14
+ attrs.class
15
+ ]
16
+ }, null) : null] });
17
+ };
30
18
  }, {
31
- props: {
32
- prefixCls: {
33
- type: String,
34
- required: true,
35
- default: void 0
36
- },
37
- open: {
38
- type: Boolean,
39
- required: false,
40
- default: void 0
41
- },
42
- zIndex: {
43
- type: Number,
44
- required: false,
45
- default: void 0
46
- },
47
- mask: {
48
- type: Boolean,
49
- required: false,
50
- default: void 0
51
- },
52
- motion: {
53
- type: Object,
54
- required: false,
55
- default: void 0
56
- },
57
- mobile: {
58
- type: Boolean,
59
- required: false,
60
- default: void 0
61
- }
62
- },
63
- inheritAttrs: false,
64
- name: "PopupMask"
19
+ props: {
20
+ prefixCls: {
21
+ type: String,
22
+ required: true,
23
+ default: void 0
24
+ },
25
+ open: {
26
+ type: Boolean,
27
+ required: false,
28
+ default: void 0
29
+ },
30
+ zIndex: {
31
+ type: Number,
32
+ required: false,
33
+ default: void 0
34
+ },
35
+ mask: {
36
+ type: Boolean,
37
+ required: false,
38
+ default: void 0
39
+ },
40
+ motion: {
41
+ type: Object,
42
+ required: false,
43
+ default: void 0
44
+ },
45
+ mobile: {
46
+ type: Boolean,
47
+ required: false,
48
+ default: void 0
49
+ }
50
+ },
51
+ inheritAttrs: false,
52
+ name: "PopupMask"
65
53
  });
66
- exports.default = Mask;
54
+ var Mask_default = Mask;
55
+ exports.default = Mask_default;
@@ -1,66 +1,52 @@
1
- import { defineComponent, createVNode, Transition } from "vue";
1
+ import { Transition, createVNode, defineComponent } from "vue";
2
2
  import { getTransitionProps } from "@v-c/util/dist/utils/transition";
3
- const Mask = /* @__PURE__ */ defineComponent((props, {
4
- attrs
5
- }) => {
6
- return () => {
7
- const {
8
- prefixCls,
9
- open,
10
- zIndex,
11
- mask,
12
- motion,
13
- mobile
14
- } = props;
15
- if (!mask) {
16
- return null;
17
- }
18
- const transitionProps = getTransitionProps(motion?.name, motion);
19
- return createVNode(Transition, transitionProps, {
20
- default: () => [open ? createVNode("div", {
21
- "style": {
22
- zIndex
23
- },
24
- "class": [`${prefixCls}-mask`, mobile && `${prefixCls}-mask-mobile`, attrs.class]
25
- }, null) : null]
26
- });
27
- };
3
+ var Mask_default = /* @__PURE__ */ defineComponent((props, { attrs }) => {
4
+ return () => {
5
+ const { prefixCls, open, zIndex, mask, motion, mobile } = props;
6
+ if (!mask) return null;
7
+ return createVNode(Transition, getTransitionProps(motion?.name, motion), { default: () => [open ? createVNode("div", {
8
+ "style": { zIndex },
9
+ "class": [
10
+ `${prefixCls}-mask`,
11
+ mobile && `${prefixCls}-mask-mobile`,
12
+ attrs.class
13
+ ]
14
+ }, null) : null] });
15
+ };
28
16
  }, {
29
- props: {
30
- prefixCls: {
31
- type: String,
32
- required: true,
33
- default: void 0
34
- },
35
- open: {
36
- type: Boolean,
37
- required: false,
38
- default: void 0
39
- },
40
- zIndex: {
41
- type: Number,
42
- required: false,
43
- default: void 0
44
- },
45
- mask: {
46
- type: Boolean,
47
- required: false,
48
- default: void 0
49
- },
50
- motion: {
51
- type: Object,
52
- required: false,
53
- default: void 0
54
- },
55
- mobile: {
56
- type: Boolean,
57
- required: false,
58
- default: void 0
59
- }
60
- },
61
- inheritAttrs: false,
62
- name: "PopupMask"
17
+ props: {
18
+ prefixCls: {
19
+ type: String,
20
+ required: true,
21
+ default: void 0
22
+ },
23
+ open: {
24
+ type: Boolean,
25
+ required: false,
26
+ default: void 0
27
+ },
28
+ zIndex: {
29
+ type: Number,
30
+ required: false,
31
+ default: void 0
32
+ },
33
+ mask: {
34
+ type: Boolean,
35
+ required: false,
36
+ default: void 0
37
+ },
38
+ motion: {
39
+ type: Object,
40
+ required: false,
41
+ default: void 0
42
+ },
43
+ mobile: {
44
+ type: Boolean,
45
+ required: false,
46
+ default: void 0
47
+ }
48
+ },
49
+ inheritAttrs: false,
50
+ name: "PopupMask"
63
51
  });
64
- export {
65
- Mask as default
66
- };
52
+ export { Mask_default as default };
@@ -1,29 +1,24 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const vue = require("vue");
4
- const PopupContent = /* @__PURE__ */ vue.defineComponent((props, {
5
- slots
6
- }) => {
7
- const cachedChildren = vue.shallowRef();
8
- return () => {
9
- const children = slots?.default?.();
10
- if (!props.cache) {
11
- cachedChildren.value = children;
12
- return children;
13
- }
14
- if (!cachedChildren.value) {
15
- cachedChildren.value = children;
16
- }
17
- return cachedChildren.value;
18
- };
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
3
+ let vue = require("vue");
4
+ var PopupContent = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots }) => {
5
+ const cachedChildren = (0, vue.shallowRef)();
6
+ return () => {
7
+ const children = slots?.default?.();
8
+ if (!props.cache) {
9
+ cachedChildren.value = children;
10
+ return children;
11
+ }
12
+ if (!cachedChildren.value) cachedChildren.value = children;
13
+ return cachedChildren.value;
14
+ };
19
15
  }, {
20
- props: {
21
- cache: {
22
- type: Boolean,
23
- required: false,
24
- default: void 0
25
- }
26
- },
27
- name: "PopupContext"
16
+ props: { cache: {
17
+ type: Boolean,
18
+ required: false,
19
+ default: void 0
20
+ } },
21
+ name: "PopupContext"
28
22
  });
29
- exports.default = PopupContent;
23
+ var PopupContent_default = PopupContent;
24
+ exports.default = PopupContent_default;
@@ -1,29 +1,21 @@
1
1
  import { defineComponent, shallowRef } from "vue";
2
- const PopupContent = /* @__PURE__ */ defineComponent((props, {
3
- slots
4
- }) => {
5
- const cachedChildren = shallowRef();
6
- return () => {
7
- const children = slots?.default?.();
8
- if (!props.cache) {
9
- cachedChildren.value = children;
10
- return children;
11
- }
12
- if (!cachedChildren.value) {
13
- cachedChildren.value = children;
14
- }
15
- return cachedChildren.value;
16
- };
2
+ var PopupContent_default = /* @__PURE__ */ defineComponent((props, { slots }) => {
3
+ const cachedChildren = shallowRef();
4
+ return () => {
5
+ const children = slots?.default?.();
6
+ if (!props.cache) {
7
+ cachedChildren.value = children;
8
+ return children;
9
+ }
10
+ if (!cachedChildren.value) cachedChildren.value = children;
11
+ return cachedChildren.value;
12
+ };
17
13
  }, {
18
- props: {
19
- cache: {
20
- type: Boolean,
21
- required: false,
22
- default: void 0
23
- }
24
- },
25
- name: "PopupContext"
14
+ props: { cache: {
15
+ type: Boolean,
16
+ required: false,
17
+ default: void 0
18
+ } },
19
+ name: "PopupContext"
26
20
  });
27
- export {
28
- PopupContent as default
29
- };
21
+ export { PopupContent_default as default };