@mekari/pixel3-drawer 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/body.d.mts +6 -0
- package/dist/body.d.ts +6 -0
- package/dist/body.js +46 -0
- package/dist/body.mjs +7 -0
- package/dist/chunk-4UTOYOXC.mjs +47 -0
- package/dist/chunk-54CTPMF7.mjs +8 -0
- package/dist/chunk-7CKFUGSM.mjs +84 -0
- package/dist/chunk-CMAJDRDT.mjs +18 -0
- package/dist/chunk-O5HQLNZJ.mjs +22 -0
- package/dist/chunk-PSZMVXVP.mjs +44 -0
- package/dist/chunk-PZOVPODZ.mjs +18 -0
- package/dist/chunk-QZ7VFGWC.mjs +6 -0
- package/dist/chunk-V64M33JD.mjs +22 -0
- package/dist/chunk-ZTWQO5OZ.mjs +22 -0
- package/dist/close-button.d.mts +6 -0
- package/dist/close-button.d.ts +6 -0
- package/dist/close-button.js +42 -0
- package/dist/close-button.mjs +7 -0
- package/dist/content.d.mts +6 -0
- package/dist/content.d.ts +6 -0
- package/dist/content.js +108 -0
- package/dist/content.mjs +8 -0
- package/dist/drawer.d.mts +94 -0
- package/dist/drawer.d.ts +94 -0
- package/dist/drawer.js +109 -0
- package/dist/drawer.mjs +9 -0
- package/dist/footer.d.mts +6 -0
- package/dist/footer.d.ts +6 -0
- package/dist/footer.js +46 -0
- package/dist/footer.mjs +7 -0
- package/dist/header.d.mts +6 -0
- package/dist/header.d.ts +6 -0
- package/dist/header.js +46 -0
- package/dist/header.mjs +7 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +285 -0
- package/dist/index.mjs +33 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/modules/drawer.context.d.mts +11 -0
- package/dist/modules/drawer.context.d.ts +11 -0
- package/dist/modules/drawer.context.js +33 -0
- package/dist/modules/drawer.context.mjs +9 -0
- package/dist/modules/drawer.props.d.mts +47 -0
- package/dist/modules/drawer.props.d.ts +47 -0
- package/dist/modules/drawer.props.js +72 -0
- package/dist/modules/drawer.props.mjs +9 -0
- package/dist/overlay.d.mts +6 -0
- package/dist/overlay.d.ts +6 -0
- package/dist/overlay.js +42 -0
- package/dist/overlay.mjs +7 -0
- package/package.json +44 -0
package/dist/body.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpDrawerBody: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpDrawerBody };
|
package/dist/body.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpDrawerBody: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpDrawerBody };
|
package/dist/body.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
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/body.tsx
|
|
21
|
+
var body_exports = {};
|
|
22
|
+
__export(body_exports, {
|
|
23
|
+
MpDrawerBody: () => MpDrawerBody
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(body_exports);
|
|
26
|
+
var import_vue = require("vue");
|
|
27
|
+
var import_vue2 = require("vue");
|
|
28
|
+
var import_pixel3_modal = require("@mekari/pixel3-modal");
|
|
29
|
+
var MpDrawerBody = (0, import_vue2.defineComponent)({
|
|
30
|
+
name: "MpDrawerBody",
|
|
31
|
+
setup(_props, {
|
|
32
|
+
slots
|
|
33
|
+
}) {
|
|
34
|
+
return () => {
|
|
35
|
+
return (0, import_vue.createVNode)(import_pixel3_modal.MpModalBody, {
|
|
36
|
+
"data-pixel-component": "MpDrawerBody"
|
|
37
|
+
}, {
|
|
38
|
+
default: () => [slots.default && slots.default()]
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
MpDrawerBody
|
|
46
|
+
});
|
package/dist/body.mjs
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// src/modules/drawer.props.ts
|
|
2
|
+
var drawerProps = {
|
|
3
|
+
id: {
|
|
4
|
+
type: String
|
|
5
|
+
},
|
|
6
|
+
isOpen: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: false
|
|
9
|
+
},
|
|
10
|
+
isBlockScrollOnMount: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
isCloseOnEsc: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: true
|
|
17
|
+
},
|
|
18
|
+
isCloseOnOverlayClick: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
21
|
+
},
|
|
22
|
+
isKeepAlive: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
isFullHeight: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: true
|
|
29
|
+
},
|
|
30
|
+
placement: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "right"
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "md"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var drawerEmits = {
|
|
40
|
+
"open": (value) => value,
|
|
41
|
+
"close": (value) => value
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
drawerProps,
|
|
46
|
+
drawerEmits
|
|
47
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useDrawerContext
|
|
3
|
+
} from "./chunk-54CTPMF7.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__name
|
|
6
|
+
} from "./chunk-QZ7VFGWC.mjs";
|
|
7
|
+
|
|
8
|
+
// src/content.tsx
|
|
9
|
+
import { createVNode as _createVNode } from "vue";
|
|
10
|
+
import { defineComponent, computed } from "vue";
|
|
11
|
+
import { MpModalContent } from "@mekari/pixel3-modal";
|
|
12
|
+
var getPlacementStyles = /* @__PURE__ */ __name((position, {
|
|
13
|
+
finalWidth
|
|
14
|
+
}) => {
|
|
15
|
+
const placements = {
|
|
16
|
+
bottom: {
|
|
17
|
+
maxWidth: "100vw",
|
|
18
|
+
height: "auto",
|
|
19
|
+
bottom: 0,
|
|
20
|
+
left: 0,
|
|
21
|
+
right: 0
|
|
22
|
+
},
|
|
23
|
+
top: {
|
|
24
|
+
maxWidth: "100vw",
|
|
25
|
+
height: "auto",
|
|
26
|
+
top: 0,
|
|
27
|
+
left: 0,
|
|
28
|
+
right: 0
|
|
29
|
+
},
|
|
30
|
+
left: {
|
|
31
|
+
...finalWidth && {
|
|
32
|
+
maxWidth: finalWidth
|
|
33
|
+
},
|
|
34
|
+
height: "100vh",
|
|
35
|
+
left: 0,
|
|
36
|
+
top: 0
|
|
37
|
+
},
|
|
38
|
+
right: {
|
|
39
|
+
...finalWidth && {
|
|
40
|
+
maxWidth: finalWidth
|
|
41
|
+
},
|
|
42
|
+
right: 0,
|
|
43
|
+
top: 0,
|
|
44
|
+
height: "100vh"
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return placements[position] || placements.right;
|
|
48
|
+
}, "getPlacementStyles");
|
|
49
|
+
var MpDrawerContent = defineComponent({
|
|
50
|
+
name: "MpDrawerContent",
|
|
51
|
+
setup(_props, {
|
|
52
|
+
slots
|
|
53
|
+
}) {
|
|
54
|
+
const {
|
|
55
|
+
props: drawerProps
|
|
56
|
+
} = useDrawerContext();
|
|
57
|
+
const {
|
|
58
|
+
placement
|
|
59
|
+
} = drawerProps;
|
|
60
|
+
const placementStyles = computed(() => {
|
|
61
|
+
const placementStyles2 = getPlacementStyles(placement.value, {});
|
|
62
|
+
return {
|
|
63
|
+
position: "fixed",
|
|
64
|
+
borderRadius: 0,
|
|
65
|
+
...placementStyles2
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
return () => {
|
|
69
|
+
return _createVNode(MpModalContent, {
|
|
70
|
+
"data-pixel-component": "MpDrawerContent",
|
|
71
|
+
"type": "drawer",
|
|
72
|
+
"placement": placement.value,
|
|
73
|
+
"data-placement": placement.value,
|
|
74
|
+
"style": placementStyles.value
|
|
75
|
+
}, {
|
|
76
|
+
default: () => [slots.default && slots.default()]
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
MpDrawerContent
|
|
84
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/close-button.tsx
|
|
2
|
+
import { createVNode as _createVNode } from "vue";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { MpModalCloseButton } from "@mekari/pixel3-modal";
|
|
5
|
+
var MpDrawerCloseButton = defineComponent({
|
|
6
|
+
name: "MpDrawerCloseButton",
|
|
7
|
+
setup() {
|
|
8
|
+
return () => {
|
|
9
|
+
return _createVNode(MpModalCloseButton, {
|
|
10
|
+
"data-pixel-component": "MpDrawerCloseButton"
|
|
11
|
+
}, null);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
MpDrawerCloseButton
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/header.tsx
|
|
2
|
+
import { createVNode as _createVNode } from "vue";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { MpModalHeader } from "@mekari/pixel3-modal";
|
|
5
|
+
var MpDrawerHeader = defineComponent({
|
|
6
|
+
name: "MpDrawerHeader",
|
|
7
|
+
setup(_props, {
|
|
8
|
+
slots
|
|
9
|
+
}) {
|
|
10
|
+
return () => {
|
|
11
|
+
return _createVNode(MpModalHeader, {
|
|
12
|
+
"data-pixel-component": "MpDrawerHeader"
|
|
13
|
+
}, {
|
|
14
|
+
default: () => [slots.default && slots.default()]
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
MpDrawerHeader
|
|
22
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
drawerEmits,
|
|
3
|
+
drawerProps
|
|
4
|
+
} from "./chunk-4UTOYOXC.mjs";
|
|
5
|
+
import {
|
|
6
|
+
DrawerProvider
|
|
7
|
+
} from "./chunk-54CTPMF7.mjs";
|
|
8
|
+
|
|
9
|
+
// src/drawer.tsx
|
|
10
|
+
import { createVNode as _createVNode } from "vue";
|
|
11
|
+
import { defineComponent, toRefs } from "vue";
|
|
12
|
+
import { MpModal } from "@mekari/pixel3-modal";
|
|
13
|
+
var MpDrawer = defineComponent({
|
|
14
|
+
name: "MpDrawer",
|
|
15
|
+
props: drawerProps,
|
|
16
|
+
emits: drawerEmits,
|
|
17
|
+
setup(props, {
|
|
18
|
+
slots,
|
|
19
|
+
emit
|
|
20
|
+
}) {
|
|
21
|
+
DrawerProvider({
|
|
22
|
+
props: toRefs(props)
|
|
23
|
+
});
|
|
24
|
+
return () => {
|
|
25
|
+
return _createVNode(MpModal, {
|
|
26
|
+
"data-pixel-component": "MpDrawer",
|
|
27
|
+
"id": props.id,
|
|
28
|
+
"isOpen": props.isOpen,
|
|
29
|
+
"size": props.size,
|
|
30
|
+
"isCloseOnEsc": props.isCloseOnEsc,
|
|
31
|
+
"isCloseOnOverlayClick": props.isCloseOnOverlayClick,
|
|
32
|
+
"isKeepAlive": props.isKeepAlive,
|
|
33
|
+
"onOpen": () => emit("open", true),
|
|
34
|
+
"onClose": () => emit("close", true)
|
|
35
|
+
}, {
|
|
36
|
+
default: () => [slots.default && slots.default()]
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
MpDrawer
|
|
44
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/overlay.tsx
|
|
2
|
+
import { createVNode as _createVNode } from "vue";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { MpModalOverlay } from "@mekari/pixel3-modal";
|
|
5
|
+
var MpDrawerOverlay = defineComponent({
|
|
6
|
+
name: "MpDrawerOverlay",
|
|
7
|
+
setup() {
|
|
8
|
+
return () => {
|
|
9
|
+
return _createVNode(MpModalOverlay, {
|
|
10
|
+
"data-pixel-component": "MpDrawerOverlay"
|
|
11
|
+
}, null);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
MpDrawerOverlay
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/footer.tsx
|
|
2
|
+
import { createVNode as _createVNode } from "vue";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { MpModalFooter } from "@mekari/pixel3-modal";
|
|
5
|
+
var MpDrawerFooter = defineComponent({
|
|
6
|
+
name: "MpDrawerFooter",
|
|
7
|
+
setup(_props, {
|
|
8
|
+
slots
|
|
9
|
+
}) {
|
|
10
|
+
return () => {
|
|
11
|
+
return _createVNode(MpModalFooter, {
|
|
12
|
+
"data-pixel-component": "MpDrawerFooter"
|
|
13
|
+
}, {
|
|
14
|
+
default: () => [slots.default && slots.default()]
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
MpDrawerFooter
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/body.tsx
|
|
2
|
+
import { createVNode as _createVNode } from "vue";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { MpModalBody } from "@mekari/pixel3-modal";
|
|
5
|
+
var MpDrawerBody = defineComponent({
|
|
6
|
+
name: "MpDrawerBody",
|
|
7
|
+
setup(_props, {
|
|
8
|
+
slots
|
|
9
|
+
}) {
|
|
10
|
+
return () => {
|
|
11
|
+
return _createVNode(MpModalBody, {
|
|
12
|
+
"data-pixel-component": "MpDrawerBody"
|
|
13
|
+
}, {
|
|
14
|
+
default: () => [slots.default && slots.default()]
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
MpDrawerBody
|
|
22
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpDrawerCloseButton: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpDrawerCloseButton };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpDrawerCloseButton: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpDrawerCloseButton };
|
|
@@ -0,0 +1,42 @@
|
|
|
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/close-button.tsx
|
|
21
|
+
var close_button_exports = {};
|
|
22
|
+
__export(close_button_exports, {
|
|
23
|
+
MpDrawerCloseButton: () => MpDrawerCloseButton
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(close_button_exports);
|
|
26
|
+
var import_vue = require("vue");
|
|
27
|
+
var import_vue2 = require("vue");
|
|
28
|
+
var import_pixel3_modal = require("@mekari/pixel3-modal");
|
|
29
|
+
var MpDrawerCloseButton = (0, import_vue2.defineComponent)({
|
|
30
|
+
name: "MpDrawerCloseButton",
|
|
31
|
+
setup() {
|
|
32
|
+
return () => {
|
|
33
|
+
return (0, import_vue.createVNode)(import_pixel3_modal.MpModalCloseButton, {
|
|
34
|
+
"data-pixel-component": "MpDrawerCloseButton"
|
|
35
|
+
}, null);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
MpDrawerCloseButton
|
|
42
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpDrawerContent: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpDrawerContent };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpDrawerContent: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpDrawerContent };
|
package/dist/content.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
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/content.tsx
|
|
22
|
+
var content_exports = {};
|
|
23
|
+
__export(content_exports, {
|
|
24
|
+
MpDrawerContent: () => MpDrawerContent
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(content_exports);
|
|
27
|
+
var import_vue = require("vue");
|
|
28
|
+
var import_vue2 = require("vue");
|
|
29
|
+
var import_pixel3_modal = require("@mekari/pixel3-modal");
|
|
30
|
+
|
|
31
|
+
// src/modules/drawer.context.ts
|
|
32
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
33
|
+
var [DrawerProvider, useDrawerContext] = (0, import_pixel3_utils.usePixelCreateContext)("DrawerContext");
|
|
34
|
+
|
|
35
|
+
// src/content.tsx
|
|
36
|
+
var getPlacementStyles = /* @__PURE__ */ __name((position, {
|
|
37
|
+
finalWidth
|
|
38
|
+
}) => {
|
|
39
|
+
const placements = {
|
|
40
|
+
bottom: {
|
|
41
|
+
maxWidth: "100vw",
|
|
42
|
+
height: "auto",
|
|
43
|
+
bottom: 0,
|
|
44
|
+
left: 0,
|
|
45
|
+
right: 0
|
|
46
|
+
},
|
|
47
|
+
top: {
|
|
48
|
+
maxWidth: "100vw",
|
|
49
|
+
height: "auto",
|
|
50
|
+
top: 0,
|
|
51
|
+
left: 0,
|
|
52
|
+
right: 0
|
|
53
|
+
},
|
|
54
|
+
left: {
|
|
55
|
+
...finalWidth && {
|
|
56
|
+
maxWidth: finalWidth
|
|
57
|
+
},
|
|
58
|
+
height: "100vh",
|
|
59
|
+
left: 0,
|
|
60
|
+
top: 0
|
|
61
|
+
},
|
|
62
|
+
right: {
|
|
63
|
+
...finalWidth && {
|
|
64
|
+
maxWidth: finalWidth
|
|
65
|
+
},
|
|
66
|
+
right: 0,
|
|
67
|
+
top: 0,
|
|
68
|
+
height: "100vh"
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return placements[position] || placements.right;
|
|
72
|
+
}, "getPlacementStyles");
|
|
73
|
+
var MpDrawerContent = (0, import_vue2.defineComponent)({
|
|
74
|
+
name: "MpDrawerContent",
|
|
75
|
+
setup(_props, {
|
|
76
|
+
slots
|
|
77
|
+
}) {
|
|
78
|
+
const {
|
|
79
|
+
props: drawerProps
|
|
80
|
+
} = useDrawerContext();
|
|
81
|
+
const {
|
|
82
|
+
placement
|
|
83
|
+
} = drawerProps;
|
|
84
|
+
const placementStyles = (0, import_vue2.computed)(() => {
|
|
85
|
+
const placementStyles2 = getPlacementStyles(placement.value, {});
|
|
86
|
+
return {
|
|
87
|
+
position: "fixed",
|
|
88
|
+
borderRadius: 0,
|
|
89
|
+
...placementStyles2
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
return () => {
|
|
93
|
+
return (0, import_vue.createVNode)(import_pixel3_modal.MpModalContent, {
|
|
94
|
+
"data-pixel-component": "MpDrawerContent",
|
|
95
|
+
"type": "drawer",
|
|
96
|
+
"placement": placement.value,
|
|
97
|
+
"data-placement": placement.value,
|
|
98
|
+
"style": placementStyles.value
|
|
99
|
+
}, {
|
|
100
|
+
default: () => [slots.default && slots.default()]
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
106
|
+
0 && (module.exports = {
|
|
107
|
+
MpDrawerContent
|
|
108
|
+
});
|
package/dist/content.mjs
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
2
|
+
import * as _mekari_pixel3_modal from '@mekari/pixel3-modal';
|
|
3
|
+
import * as vue from 'vue';
|
|
4
|
+
|
|
5
|
+
declare const MpDrawer: vue.DefineComponent<{
|
|
6
|
+
id: {
|
|
7
|
+
type: vue.PropType<string>;
|
|
8
|
+
};
|
|
9
|
+
isOpen: {
|
|
10
|
+
type: vue.PropType<boolean>;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
isBlockScrollOnMount: {
|
|
14
|
+
type: vue.PropType<boolean>;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
isCloseOnEsc: {
|
|
18
|
+
type: vue.PropType<boolean>;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
isCloseOnOverlayClick: {
|
|
22
|
+
type: vue.PropType<boolean>;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
isKeepAlive: {
|
|
26
|
+
type: vue.PropType<boolean>;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
isFullHeight: {
|
|
30
|
+
type: vue.PropType<boolean>;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
placement: {
|
|
34
|
+
type: vue.PropType<_mekari_pixel3_modal.Placement>;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
size: {
|
|
38
|
+
type: vue.PropType<_mekari_pixel3_modal.BaseSize>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
42
|
+
open: (value: boolean) => boolean;
|
|
43
|
+
close: (value: boolean) => boolean;
|
|
44
|
+
}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
45
|
+
id: {
|
|
46
|
+
type: vue.PropType<string>;
|
|
47
|
+
};
|
|
48
|
+
isOpen: {
|
|
49
|
+
type: vue.PropType<boolean>;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
isBlockScrollOnMount: {
|
|
53
|
+
type: vue.PropType<boolean>;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
isCloseOnEsc: {
|
|
57
|
+
type: vue.PropType<boolean>;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
isCloseOnOverlayClick: {
|
|
61
|
+
type: vue.PropType<boolean>;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
isKeepAlive: {
|
|
65
|
+
type: vue.PropType<boolean>;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
isFullHeight: {
|
|
69
|
+
type: vue.PropType<boolean>;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
placement: {
|
|
73
|
+
type: vue.PropType<_mekari_pixel3_modal.Placement>;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
size: {
|
|
77
|
+
type: vue.PropType<_mekari_pixel3_modal.BaseSize>;
|
|
78
|
+
default: string;
|
|
79
|
+
};
|
|
80
|
+
}>> & {
|
|
81
|
+
onClose?: ((value: boolean) => any) | undefined;
|
|
82
|
+
onOpen?: ((value: boolean) => any) | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
isOpen: boolean;
|
|
85
|
+
isBlockScrollOnMount: boolean;
|
|
86
|
+
isCloseOnEsc: boolean;
|
|
87
|
+
isCloseOnOverlayClick: boolean;
|
|
88
|
+
isKeepAlive: boolean;
|
|
89
|
+
size: _mekari_pixel3_modal.BaseSize;
|
|
90
|
+
placement: _mekari_pixel3_modal.Placement;
|
|
91
|
+
isFullHeight: boolean;
|
|
92
|
+
}, {}>;
|
|
93
|
+
|
|
94
|
+
export { MpDrawer };
|