@mekari/pixel3-collapse 0.0.1
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/chunk-PL4PQPHR.mjs +37 -0
- package/dist/chunk-X4UXBFME.mjs +45 -0
- package/dist/collapse.d.mts +66 -0
- package/dist/collapse.d.ts +66 -0
- package/dist/collapse.js +97 -0
- package/dist/collapse.mjs +7 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +99 -0
- package/dist/index.mjs +7 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/modules/collapse.props.d.mts +34 -0
- package/dist/modules/collapse.props.d.ts +34 -0
- package/dist/modules/collapse.props.js +57 -0
- package/dist/modules/collapse.props.mjs +6 -0
- package/package.json +44 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/modules/collapse.props.ts
|
|
5
|
+
var collapseProps = {
|
|
6
|
+
as: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "div"
|
|
9
|
+
},
|
|
10
|
+
isOpen: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
duration: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 250
|
|
17
|
+
},
|
|
18
|
+
isAnimateOpacity: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
21
|
+
},
|
|
22
|
+
easing: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "easeInOutSine"
|
|
25
|
+
},
|
|
26
|
+
startingHeight: {
|
|
27
|
+
type: Number
|
|
28
|
+
},
|
|
29
|
+
endingHeight: {
|
|
30
|
+
type: Number
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
__name,
|
|
36
|
+
collapseProps
|
|
37
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name,
|
|
3
|
+
collapseProps
|
|
4
|
+
} from "./chunk-PL4PQPHR.mjs";
|
|
5
|
+
|
|
6
|
+
// src/collapse.tsx
|
|
7
|
+
import { createVNode as _createVNode, isVNode as _isVNode } from "vue";
|
|
8
|
+
import { defineComponent } from "vue";
|
|
9
|
+
import { MpAnimateHeight } from "@mekari/pixel3-transition";
|
|
10
|
+
function _isSlot(s) {
|
|
11
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !_isVNode(s);
|
|
12
|
+
}
|
|
13
|
+
__name(_isSlot, "_isSlot");
|
|
14
|
+
var MpCollapse = defineComponent({
|
|
15
|
+
name: "MpCollapse",
|
|
16
|
+
props: collapseProps,
|
|
17
|
+
emit: ["enter", "leave"],
|
|
18
|
+
setup(props, {
|
|
19
|
+
slots,
|
|
20
|
+
emit
|
|
21
|
+
}) {
|
|
22
|
+
return () => {
|
|
23
|
+
let _slot;
|
|
24
|
+
return _createVNode(MpAnimateHeight, {
|
|
25
|
+
"data-pixel-component": "MpCollapse",
|
|
26
|
+
"as": props.as,
|
|
27
|
+
"isOpen": props.isOpen,
|
|
28
|
+
"duration": props.duration,
|
|
29
|
+
"enterEasing": props.easing,
|
|
30
|
+
"leaveEasing": props.easing,
|
|
31
|
+
"initialHeight": props.startingHeight,
|
|
32
|
+
"finalHeight": props.endingHeight,
|
|
33
|
+
"animateOpacity": props.isAnimateOpacity,
|
|
34
|
+
"onEnter": () => emit("enter"),
|
|
35
|
+
"onLeave": () => emit("leave")
|
|
36
|
+
}, _isSlot(_slot = slots.default()) ? _slot : {
|
|
37
|
+
default: () => [_slot]
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
MpCollapse
|
|
45
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const MpCollapse: vue.DefineComponent<{
|
|
5
|
+
as: {
|
|
6
|
+
type: vue.PropType<keyof HTMLElementTagNameMap>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
isOpen: {
|
|
10
|
+
type: vue.PropType<boolean>;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
duration: {
|
|
14
|
+
type: vue.PropType<number>;
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
isAnimateOpacity: {
|
|
18
|
+
type: vue.PropType<boolean>;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
easing: {
|
|
22
|
+
type: vue.PropType<string>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
startingHeight: {
|
|
26
|
+
type: vue.PropType<number>;
|
|
27
|
+
};
|
|
28
|
+
endingHeight: {
|
|
29
|
+
type: vue.PropType<number>;
|
|
30
|
+
};
|
|
31
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
32
|
+
as: {
|
|
33
|
+
type: vue.PropType<keyof HTMLElementTagNameMap>;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
isOpen: {
|
|
37
|
+
type: vue.PropType<boolean>;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
duration: {
|
|
41
|
+
type: vue.PropType<number>;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
isAnimateOpacity: {
|
|
45
|
+
type: vue.PropType<boolean>;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
easing: {
|
|
49
|
+
type: vue.PropType<string>;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
startingHeight: {
|
|
53
|
+
type: vue.PropType<number>;
|
|
54
|
+
};
|
|
55
|
+
endingHeight: {
|
|
56
|
+
type: vue.PropType<number>;
|
|
57
|
+
};
|
|
58
|
+
}>>, {
|
|
59
|
+
as: keyof HTMLElementTagNameMap;
|
|
60
|
+
isOpen: boolean;
|
|
61
|
+
duration: number;
|
|
62
|
+
isAnimateOpacity: boolean;
|
|
63
|
+
easing: string;
|
|
64
|
+
}, {}>;
|
|
65
|
+
|
|
66
|
+
export { MpCollapse };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const MpCollapse: vue.DefineComponent<{
|
|
5
|
+
as: {
|
|
6
|
+
type: vue.PropType<keyof HTMLElementTagNameMap>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
isOpen: {
|
|
10
|
+
type: vue.PropType<boolean>;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
duration: {
|
|
14
|
+
type: vue.PropType<number>;
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
isAnimateOpacity: {
|
|
18
|
+
type: vue.PropType<boolean>;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
easing: {
|
|
22
|
+
type: vue.PropType<string>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
startingHeight: {
|
|
26
|
+
type: vue.PropType<number>;
|
|
27
|
+
};
|
|
28
|
+
endingHeight: {
|
|
29
|
+
type: vue.PropType<number>;
|
|
30
|
+
};
|
|
31
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
32
|
+
as: {
|
|
33
|
+
type: vue.PropType<keyof HTMLElementTagNameMap>;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
isOpen: {
|
|
37
|
+
type: vue.PropType<boolean>;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
duration: {
|
|
41
|
+
type: vue.PropType<number>;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
isAnimateOpacity: {
|
|
45
|
+
type: vue.PropType<boolean>;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
easing: {
|
|
49
|
+
type: vue.PropType<string>;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
startingHeight: {
|
|
53
|
+
type: vue.PropType<number>;
|
|
54
|
+
};
|
|
55
|
+
endingHeight: {
|
|
56
|
+
type: vue.PropType<number>;
|
|
57
|
+
};
|
|
58
|
+
}>>, {
|
|
59
|
+
as: keyof HTMLElementTagNameMap;
|
|
60
|
+
isOpen: boolean;
|
|
61
|
+
duration: number;
|
|
62
|
+
isAnimateOpacity: boolean;
|
|
63
|
+
easing: string;
|
|
64
|
+
}, {}>;
|
|
65
|
+
|
|
66
|
+
export { MpCollapse };
|
package/dist/collapse.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/collapse.tsx
|
|
22
|
+
var collapse_exports = {};
|
|
23
|
+
__export(collapse_exports, {
|
|
24
|
+
MpCollapse: () => MpCollapse
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(collapse_exports);
|
|
27
|
+
var import_vue = require("vue");
|
|
28
|
+
var import_vue2 = require("vue");
|
|
29
|
+
var import_pixel3_transition = require("@mekari/pixel3-transition");
|
|
30
|
+
|
|
31
|
+
// src/modules/collapse.props.ts
|
|
32
|
+
var collapseProps = {
|
|
33
|
+
as: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "div"
|
|
36
|
+
},
|
|
37
|
+
isOpen: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
duration: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 250
|
|
44
|
+
},
|
|
45
|
+
isAnimateOpacity: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true
|
|
48
|
+
},
|
|
49
|
+
easing: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "easeInOutSine"
|
|
52
|
+
},
|
|
53
|
+
startingHeight: {
|
|
54
|
+
type: Number
|
|
55
|
+
},
|
|
56
|
+
endingHeight: {
|
|
57
|
+
type: Number
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// src/collapse.tsx
|
|
62
|
+
function _isSlot(s) {
|
|
63
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, import_vue.isVNode)(s);
|
|
64
|
+
}
|
|
65
|
+
__name(_isSlot, "_isSlot");
|
|
66
|
+
var MpCollapse = (0, import_vue2.defineComponent)({
|
|
67
|
+
name: "MpCollapse",
|
|
68
|
+
props: collapseProps,
|
|
69
|
+
emit: ["enter", "leave"],
|
|
70
|
+
setup(props, {
|
|
71
|
+
slots,
|
|
72
|
+
emit
|
|
73
|
+
}) {
|
|
74
|
+
return () => {
|
|
75
|
+
let _slot;
|
|
76
|
+
return (0, import_vue.createVNode)(import_pixel3_transition.MpAnimateHeight, {
|
|
77
|
+
"data-pixel-component": "MpCollapse",
|
|
78
|
+
"as": props.as,
|
|
79
|
+
"isOpen": props.isOpen,
|
|
80
|
+
"duration": props.duration,
|
|
81
|
+
"enterEasing": props.easing,
|
|
82
|
+
"leaveEasing": props.easing,
|
|
83
|
+
"initialHeight": props.startingHeight,
|
|
84
|
+
"finalHeight": props.endingHeight,
|
|
85
|
+
"animateOpacity": props.isAnimateOpacity,
|
|
86
|
+
"onEnter": () => emit("enter"),
|
|
87
|
+
"onLeave": () => emit("leave")
|
|
88
|
+
}, _isSlot(_slot = slots.default()) ? _slot : {
|
|
89
|
+
default: () => [_slot]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
95
|
+
0 && (module.exports = {
|
|
96
|
+
MpCollapse
|
|
97
|
+
});
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
MpCollapse: () => MpCollapse
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
27
|
+
|
|
28
|
+
// src/collapse.tsx
|
|
29
|
+
var import_vue = require("vue");
|
|
30
|
+
var import_vue2 = require("vue");
|
|
31
|
+
var import_pixel3_transition = require("@mekari/pixel3-transition");
|
|
32
|
+
|
|
33
|
+
// src/modules/collapse.props.ts
|
|
34
|
+
var collapseProps = {
|
|
35
|
+
as: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "div"
|
|
38
|
+
},
|
|
39
|
+
isOpen: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
duration: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 250
|
|
46
|
+
},
|
|
47
|
+
isAnimateOpacity: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: true
|
|
50
|
+
},
|
|
51
|
+
easing: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "easeInOutSine"
|
|
54
|
+
},
|
|
55
|
+
startingHeight: {
|
|
56
|
+
type: Number
|
|
57
|
+
},
|
|
58
|
+
endingHeight: {
|
|
59
|
+
type: Number
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// src/collapse.tsx
|
|
64
|
+
function _isSlot(s) {
|
|
65
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, import_vue.isVNode)(s);
|
|
66
|
+
}
|
|
67
|
+
__name(_isSlot, "_isSlot");
|
|
68
|
+
var MpCollapse = (0, import_vue2.defineComponent)({
|
|
69
|
+
name: "MpCollapse",
|
|
70
|
+
props: collapseProps,
|
|
71
|
+
emit: ["enter", "leave"],
|
|
72
|
+
setup(props, {
|
|
73
|
+
slots,
|
|
74
|
+
emit
|
|
75
|
+
}) {
|
|
76
|
+
return () => {
|
|
77
|
+
let _slot;
|
|
78
|
+
return (0, import_vue.createVNode)(import_pixel3_transition.MpAnimateHeight, {
|
|
79
|
+
"data-pixel-component": "MpCollapse",
|
|
80
|
+
"as": props.as,
|
|
81
|
+
"isOpen": props.isOpen,
|
|
82
|
+
"duration": props.duration,
|
|
83
|
+
"enterEasing": props.easing,
|
|
84
|
+
"leaveEasing": props.easing,
|
|
85
|
+
"initialHeight": props.startingHeight,
|
|
86
|
+
"finalHeight": props.endingHeight,
|
|
87
|
+
"animateOpacity": props.isAnimateOpacity,
|
|
88
|
+
"onEnter": () => emit("enter"),
|
|
89
|
+
"onLeave": () => emit("leave")
|
|
90
|
+
}, _isSlot(_slot = slots.default()) ? _slot : {
|
|
91
|
+
default: () => [_slot]
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
+
0 && (module.exports = {
|
|
98
|
+
MpCollapse
|
|
99
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/modules/collapse.props.ts":{"bytes":863,"imports":[],"format":"esm"},"src/collapse.tsx":{"bytes":1232,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-transition","kind":"import-statement","external":true},{"path":"src/modules/collapse.props.ts","kind":"import-statement","original":"./modules/collapse.props"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":112,"imports":[{"path":"src/collapse.tsx","kind":"import-statement","original":"./collapse"}],"format":"esm"}},"outputs":{"dist/collapse.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-transition","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/collapse.tsx","inputs":{"src/collapse.tsx":{"bytesInOutput":1284},"src/modules/collapse.props.ts":{"bytesInOutput":393}},"bytes":2746},"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-transition","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":125},"src/collapse.tsx":{"bytesInOutput":1144},"src/modules/collapse.props.ts":{"bytesInOutput":393}},"bytes":2748},"dist/modules/collapse.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/collapse.props.ts","inputs":{"src/modules/collapse.props.ts":{"bytesInOutput":557}},"bytes":1497}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/modules/collapse.props.ts":{"bytes":863,"imports":[],"format":"esm"},"src/collapse.tsx":{"bytes":1232,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-transition","kind":"import-statement","external":true},{"path":"src/modules/collapse.props.ts","kind":"import-statement","original":"./modules/collapse.props"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":112,"imports":[{"path":"src/collapse.tsx","kind":"import-statement","original":"./collapse"}],"format":"esm"}},"outputs":{"dist/collapse.mjs":{"imports":[{"path":"dist/chunk-X4UXBFME.mjs","kind":"import-statement"},{"path":"dist/chunk-PL4PQPHR.mjs","kind":"import-statement"}],"exports":["MpCollapse"],"entryPoint":"src/collapse.tsx","inputs":{},"bytes":109},"dist/index.mjs":{"imports":[{"path":"dist/chunk-X4UXBFME.mjs","kind":"import-statement"},{"path":"dist/chunk-PL4PQPHR.mjs","kind":"import-statement"}],"exports":["MpCollapse"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":109},"dist/chunk-X4UXBFME.mjs":{"imports":[{"path":"dist/chunk-PL4PQPHR.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-transition","kind":"import-statement","external":true}],"exports":["MpCollapse"],"inputs":{"src/collapse.tsx":{"bytesInOutput":1108}},"bytes":1221},"dist/modules/collapse.props.mjs":{"imports":[{"path":"dist/chunk-PL4PQPHR.mjs","kind":"import-statement"}],"exports":["collapseProps"],"entryPoint":"src/modules/collapse.props.ts","inputs":{},"bytes":85},"dist/chunk-PL4PQPHR.mjs":{"imports":[],"exports":["__name","collapseProps"],"inputs":{"src/modules/collapse.props.ts":{"bytesInOutput":393}},"bytes":595}}}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare const collapseProps: {
|
|
4
|
+
as: {
|
|
5
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
isOpen: {
|
|
9
|
+
type: PropType<boolean>;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
duration: {
|
|
13
|
+
type: PropType<number>;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
isAnimateOpacity: {
|
|
17
|
+
type: PropType<boolean>;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
easing: {
|
|
21
|
+
type: PropType<string>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
startingHeight: {
|
|
25
|
+
type: PropType<number>;
|
|
26
|
+
};
|
|
27
|
+
endingHeight: {
|
|
28
|
+
type: PropType<number>;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type CollapseProps = ExtractPropTypes<typeof collapseProps>;
|
|
32
|
+
type CollapseEmits = (e: 'enter' | 'leave', value?: unknown) => void;
|
|
33
|
+
|
|
34
|
+
export { CollapseEmits, CollapseProps, collapseProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare const collapseProps: {
|
|
4
|
+
as: {
|
|
5
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
isOpen: {
|
|
9
|
+
type: PropType<boolean>;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
duration: {
|
|
13
|
+
type: PropType<number>;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
isAnimateOpacity: {
|
|
17
|
+
type: PropType<boolean>;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
easing: {
|
|
21
|
+
type: PropType<string>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
startingHeight: {
|
|
25
|
+
type: PropType<number>;
|
|
26
|
+
};
|
|
27
|
+
endingHeight: {
|
|
28
|
+
type: PropType<number>;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type CollapseProps = ExtractPropTypes<typeof collapseProps>;
|
|
32
|
+
type CollapseEmits = (e: 'enter' | 'leave', value?: unknown) => void;
|
|
33
|
+
|
|
34
|
+
export { CollapseEmits, CollapseProps, collapseProps };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/modules/collapse.props.ts
|
|
21
|
+
var collapse_props_exports = {};
|
|
22
|
+
__export(collapse_props_exports, {
|
|
23
|
+
collapseProps: () => collapseProps
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(collapse_props_exports);
|
|
26
|
+
var collapseProps = {
|
|
27
|
+
as: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "div"
|
|
30
|
+
},
|
|
31
|
+
isOpen: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
35
|
+
duration: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: 250
|
|
38
|
+
},
|
|
39
|
+
isAnimateOpacity: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
easing: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "easeInOutSine"
|
|
46
|
+
},
|
|
47
|
+
startingHeight: {
|
|
48
|
+
type: Number
|
|
49
|
+
},
|
|
50
|
+
endingHeight: {
|
|
51
|
+
type: Number
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
collapseProps
|
|
57
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mekari/pixel3-collapse",
|
|
3
|
+
"description": "Collapse component for mekari pixel 3",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@mekari/pixel3-icon": "0.0.2",
|
|
12
|
+
"@mekari/pixel3-spinner": "0.0.2",
|
|
13
|
+
"@mekari/pixel3-transition": "0.0.1",
|
|
14
|
+
"@mekari/pixel3-styled-system": "0.0.1"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"vue": "^3.3.7"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"vue": "^3.3.7"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"module": "dist/index.mjs",
|
|
26
|
+
"types": "dist/index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"require": "./dist/index.js",
|
|
31
|
+
"default": "./dist/index.mjs"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"clean": "rimraf dist .turbo",
|
|
36
|
+
"build": "tsup && pnpm build:types",
|
|
37
|
+
"build:fast": "tsup",
|
|
38
|
+
"build:types": "tsup src --dts-only",
|
|
39
|
+
"build:external": "tsup src/index.tsx --external",
|
|
40
|
+
"types:check": "tsc --noEmit",
|
|
41
|
+
"replace-config": "clean-package",
|
|
42
|
+
"restore-config": "clean-package restore"
|
|
43
|
+
}
|
|
44
|
+
}
|