@mekari/pixel3-scrollbar 0.1.0-dev.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.
@@ -0,0 +1,79 @@
1
+ import {
2
+ __name,
3
+ scrollbarProps
4
+ } from "./chunk-TYS4GN6M.mjs";
5
+
6
+ // src/scrollbar.tsx
7
+ import { createVNode as _createVNode, isVNode as _isVNode } from "vue";
8
+ import { defineComponent, onMounted, ref, computed } from "vue";
9
+ import { useOverlayScrollbars } from "overlayscrollbars-vue";
10
+ import { Pixel } from "@mekari/pixel3-styled-system/jsx";
11
+ import { css } from "@mekari/pixel3-styled-system/css";
12
+ import "overlayscrollbars/overlayscrollbars.css";
13
+ function _isSlot(s) {
14
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !_isVNode(s);
15
+ }
16
+ __name(_isSlot, "_isSlot");
17
+ var MpScrollbar = defineComponent({
18
+ name: "MpScrollbar",
19
+ props: scrollbarProps,
20
+ emits: ["initialized", "scroll"],
21
+ setup(props, {
22
+ slots,
23
+ emit
24
+ }) {
25
+ const wrapperRef = ref();
26
+ const wrapperClass = computed(() => {
27
+ return css({
28
+ "& .os-scrollbar": {
29
+ "--os-handle-bg": "colors.gray.100!",
30
+ "--os-handle-bg-hover": "colors.gray.400!",
31
+ "--os-handle-bg-active": "colors.gray.400!"
32
+ },
33
+ _nextTheme: {
34
+ "& .os-scrollbar": {
35
+ "--os-handle-bg": "colors.icon.subtle!",
36
+ "--os-handle-bg-hover": "colors.icon.default!",
37
+ "--os-handle-bg-active": "colors.icon.default!"
38
+ }
39
+ }
40
+ });
41
+ });
42
+ const [initialize] = useOverlayScrollbars({
43
+ defer: true,
44
+ options: props.options,
45
+ events: {
46
+ initialized: (e) => activateEvent("initialized", e),
47
+ scroll: (e) => activateEvent("scroll", e)
48
+ }
49
+ });
50
+ onMounted(() => {
51
+ if (wrapperRef.value) {
52
+ initialize({
53
+ target: wrapperRef.value.$el
54
+ });
55
+ }
56
+ });
57
+ function activateEvent(type, event) {
58
+ if (!event) {
59
+ return;
60
+ }
61
+ emit(type, event);
62
+ }
63
+ __name(activateEvent, "activateEvent");
64
+ return () => {
65
+ const children = slots.default && slots.default();
66
+ return _createVNode(Pixel.div, {
67
+ "ref": wrapperRef,
68
+ "data-pixel-component": "MpScrollbar",
69
+ "class": wrapperClass.value
70
+ }, _isSlot(children) ? children : {
71
+ default: () => [children]
72
+ });
73
+ };
74
+ }
75
+ });
76
+
77
+ export {
78
+ MpScrollbar
79
+ };
@@ -0,0 +1,26 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/modules/scrollbar.props.ts
5
+ var scrollbarProps = {
6
+ options: {
7
+ type: Object,
8
+ default: () => {
9
+ return {
10
+ overflow: {
11
+ x: "scroll",
12
+ y: "scroll"
13
+ },
14
+ scrollbars: {
15
+ autoHide: "scroll",
16
+ autoHideDelay: 1e3
17
+ }
18
+ };
19
+ }
20
+ }
21
+ };
22
+
23
+ export {
24
+ __name,
25
+ scrollbarProps
26
+ };
@@ -0,0 +1,3 @@
1
+ export { MpScrollbar } from './scrollbar.mjs';
2
+ import 'vue/jsx-runtime';
3
+ import 'vue';
@@ -0,0 +1,3 @@
1
+ export { MpScrollbar } from './scrollbar.js';
2
+ import 'vue/jsx-runtime';
3
+ import 'vue';
package/dist/index.js ADDED
@@ -0,0 +1,122 @@
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
+ MpScrollbar: () => MpScrollbar
25
+ });
26
+ module.exports = __toCommonJS(src_exports);
27
+
28
+ // src/scrollbar.tsx
29
+ var import_vue = require("vue");
30
+ var import_vue2 = require("vue");
31
+ var import_overlayscrollbars_vue = require("overlayscrollbars-vue");
32
+ var import_jsx = require("@mekari/pixel3-styled-system/jsx");
33
+ var import_css = require("@mekari/pixel3-styled-system/css");
34
+
35
+ // src/modules/scrollbar.props.ts
36
+ var scrollbarProps = {
37
+ options: {
38
+ type: Object,
39
+ default: () => {
40
+ return {
41
+ overflow: {
42
+ x: "scroll",
43
+ y: "scroll"
44
+ },
45
+ scrollbars: {
46
+ autoHide: "scroll",
47
+ autoHideDelay: 1e3
48
+ }
49
+ };
50
+ }
51
+ }
52
+ };
53
+
54
+ // src/scrollbar.tsx
55
+ var import_overlayscrollbars = require("overlayscrollbars/overlayscrollbars.css");
56
+ function _isSlot(s) {
57
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, import_vue.isVNode)(s);
58
+ }
59
+ __name(_isSlot, "_isSlot");
60
+ var MpScrollbar = (0, import_vue2.defineComponent)({
61
+ name: "MpScrollbar",
62
+ props: scrollbarProps,
63
+ emits: ["initialized", "scroll"],
64
+ setup(props, {
65
+ slots,
66
+ emit
67
+ }) {
68
+ const wrapperRef = (0, import_vue2.ref)();
69
+ const wrapperClass = (0, import_vue2.computed)(() => {
70
+ return (0, import_css.css)({
71
+ "& .os-scrollbar": {
72
+ "--os-handle-bg": "colors.gray.100!",
73
+ "--os-handle-bg-hover": "colors.gray.400!",
74
+ "--os-handle-bg-active": "colors.gray.400!"
75
+ },
76
+ _nextTheme: {
77
+ "& .os-scrollbar": {
78
+ "--os-handle-bg": "colors.icon.subtle!",
79
+ "--os-handle-bg-hover": "colors.icon.default!",
80
+ "--os-handle-bg-active": "colors.icon.default!"
81
+ }
82
+ }
83
+ });
84
+ });
85
+ const [initialize] = (0, import_overlayscrollbars_vue.useOverlayScrollbars)({
86
+ defer: true,
87
+ options: props.options,
88
+ events: {
89
+ initialized: (e) => activateEvent("initialized", e),
90
+ scroll: (e) => activateEvent("scroll", e)
91
+ }
92
+ });
93
+ (0, import_vue2.onMounted)(() => {
94
+ if (wrapperRef.value) {
95
+ initialize({
96
+ target: wrapperRef.value.$el
97
+ });
98
+ }
99
+ });
100
+ function activateEvent(type, event) {
101
+ if (!event) {
102
+ return;
103
+ }
104
+ emit(type, event);
105
+ }
106
+ __name(activateEvent, "activateEvent");
107
+ return () => {
108
+ const children = slots.default && slots.default();
109
+ return (0, import_vue.createVNode)(import_jsx.Pixel.div, {
110
+ "ref": wrapperRef,
111
+ "data-pixel-component": "MpScrollbar",
112
+ "class": wrapperClass.value
113
+ }, _isSlot(children) ? children : {
114
+ default: () => [children]
115
+ });
116
+ };
117
+ }
118
+ });
119
+ // Annotate the CommonJS export names for ESM import in node:
120
+ 0 && (module.exports = {
121
+ MpScrollbar
122
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import {
2
+ MpScrollbar
3
+ } from "./chunk-3YFVWLNU.mjs";
4
+ import "./chunk-TYS4GN6M.mjs";
5
+ export {
6
+ MpScrollbar
7
+ };
@@ -0,0 +1 @@
1
+ {"inputs":{"src/modules/scrollbar.props.ts":{"bytes":373,"imports":[],"format":"esm"},"src/scrollbar.tsx":{"bytes":2281,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"overlayscrollbars-vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"src/modules/scrollbar.props.ts","kind":"import-statement","original":"./modules/scrollbar.props"},{"path":"overlayscrollbars/overlayscrollbars.css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":127,"imports":[{"path":"src/scrollbar.tsx","kind":"import-statement","original":"./scrollbar"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"overlayscrollbars-vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"overlayscrollbars/overlayscrollbars.css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":127},"src/scrollbar.tsx":{"bytesInOutput":2247},"src/modules/scrollbar.props.ts":{"bytesInOutput":279}},"bytes":3743},"dist/scrollbar.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"overlayscrollbars-vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"overlayscrollbars/overlayscrollbars.css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/scrollbar.tsx","inputs":{"src/scrollbar.tsx":{"bytesInOutput":2392},"src/modules/scrollbar.props.ts":{"bytesInOutput":279}},"bytes":3744},"dist/modules/scrollbar.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/scrollbar.props.ts","inputs":{"src/modules/scrollbar.props.ts":{"bytesInOutput":448}},"bytes":1390}}}
@@ -0,0 +1 @@
1
+ {"inputs":{"src/modules/scrollbar.props.ts":{"bytes":373,"imports":[],"format":"esm"},"src/scrollbar.tsx":{"bytes":2281,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"overlayscrollbars-vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"src/modules/scrollbar.props.ts","kind":"import-statement","original":"./modules/scrollbar.props"},{"path":"overlayscrollbars/overlayscrollbars.css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":127,"imports":[{"path":"src/scrollbar.tsx","kind":"import-statement","original":"./scrollbar"}],"format":"esm"}},"outputs":{"dist/index.mjs":{"imports":[{"path":"dist/chunk-3YFVWLNU.mjs","kind":"import-statement"},{"path":"dist/chunk-TYS4GN6M.mjs","kind":"import-statement"}],"exports":["MpScrollbar"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":111},"dist/scrollbar.mjs":{"imports":[{"path":"dist/chunk-3YFVWLNU.mjs","kind":"import-statement"},{"path":"dist/chunk-TYS4GN6M.mjs","kind":"import-statement"}],"exports":["MpScrollbar"],"entryPoint":"src/scrollbar.tsx","inputs":{},"bytes":111},"dist/chunk-3YFVWLNU.mjs":{"imports":[{"path":"dist/chunk-TYS4GN6M.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"overlayscrollbars-vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"overlayscrollbars/overlayscrollbars.css","kind":"import-statement","external":true}],"exports":["MpScrollbar"],"inputs":{"src/scrollbar.tsx":{"bytesInOutput":2108}},"bytes":2224},"dist/modules/scrollbar.props.mjs":{"imports":[{"path":"dist/chunk-TYS4GN6M.mjs","kind":"import-statement"}],"exports":["scrollbarProps"],"entryPoint":"src/modules/scrollbar.props.ts","inputs":{},"bytes":87},"dist/chunk-TYS4GN6M.mjs":{"imports":[],"exports":["__name","scrollbarProps"],"inputs":{"src/modules/scrollbar.props.ts":{"bytesInOutput":279}},"bytes":483}}}
@@ -0,0 +1,17 @@
1
+ declare const scrollbarProps: {
2
+ options: {
3
+ type: ObjectConstructor;
4
+ default: () => {
5
+ overflow: {
6
+ x: string;
7
+ y: string;
8
+ };
9
+ scrollbars: {
10
+ autoHide: string;
11
+ autoHideDelay: number;
12
+ };
13
+ };
14
+ };
15
+ };
16
+
17
+ export { scrollbarProps };
@@ -0,0 +1,17 @@
1
+ declare const scrollbarProps: {
2
+ options: {
3
+ type: ObjectConstructor;
4
+ default: () => {
5
+ overflow: {
6
+ x: string;
7
+ y: string;
8
+ };
9
+ scrollbars: {
10
+ autoHide: string;
11
+ autoHideDelay: number;
12
+ };
13
+ };
14
+ };
15
+ };
16
+
17
+ export { scrollbarProps };
@@ -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/modules/scrollbar.props.ts
21
+ var scrollbar_props_exports = {};
22
+ __export(scrollbar_props_exports, {
23
+ scrollbarProps: () => scrollbarProps
24
+ });
25
+ module.exports = __toCommonJS(scrollbar_props_exports);
26
+ var scrollbarProps = {
27
+ options: {
28
+ type: Object,
29
+ default: () => {
30
+ return {
31
+ overflow: {
32
+ x: "scroll",
33
+ y: "scroll"
34
+ },
35
+ scrollbars: {
36
+ autoHide: "scroll",
37
+ autoHideDelay: 1e3
38
+ }
39
+ };
40
+ }
41
+ }
42
+ };
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ scrollbarProps
46
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ scrollbarProps
3
+ } from "../chunk-TYS4GN6M.mjs";
4
+ export {
5
+ scrollbarProps
6
+ };
@@ -0,0 +1,39 @@
1
+ import * as vue_jsx_runtime from 'vue/jsx-runtime';
2
+ import * as vue from 'vue';
3
+
4
+ declare const MpScrollbar: vue.DefineComponent<vue.ExtractPropTypes<{
5
+ options: {
6
+ type: ObjectConstructor;
7
+ default: () => {
8
+ overflow: {
9
+ x: string;
10
+ y: string;
11
+ };
12
+ scrollbars: {
13
+ autoHide: string;
14
+ autoHideDelay: number;
15
+ };
16
+ };
17
+ };
18
+ }>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("initialized" | "scroll")[], "initialized" | "scroll", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
19
+ options: {
20
+ type: ObjectConstructor;
21
+ default: () => {
22
+ overflow: {
23
+ x: string;
24
+ y: string;
25
+ };
26
+ scrollbars: {
27
+ autoHide: string;
28
+ autoHideDelay: number;
29
+ };
30
+ };
31
+ };
32
+ }>> & Readonly<{
33
+ onInitialized?: ((...args: any[]) => any) | undefined;
34
+ onScroll?: ((...args: any[]) => any) | undefined;
35
+ }>, {
36
+ options: Record<string, any>;
37
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
38
+
39
+ export { MpScrollbar };
@@ -0,0 +1,39 @@
1
+ import * as vue_jsx_runtime from 'vue/jsx-runtime';
2
+ import * as vue from 'vue';
3
+
4
+ declare const MpScrollbar: vue.DefineComponent<vue.ExtractPropTypes<{
5
+ options: {
6
+ type: ObjectConstructor;
7
+ default: () => {
8
+ overflow: {
9
+ x: string;
10
+ y: string;
11
+ };
12
+ scrollbars: {
13
+ autoHide: string;
14
+ autoHideDelay: number;
15
+ };
16
+ };
17
+ };
18
+ }>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("initialized" | "scroll")[], "initialized" | "scroll", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
19
+ options: {
20
+ type: ObjectConstructor;
21
+ default: () => {
22
+ overflow: {
23
+ x: string;
24
+ y: string;
25
+ };
26
+ scrollbars: {
27
+ autoHide: string;
28
+ autoHideDelay: number;
29
+ };
30
+ };
31
+ };
32
+ }>> & Readonly<{
33
+ onInitialized?: ((...args: any[]) => any) | undefined;
34
+ onScroll?: ((...args: any[]) => any) | undefined;
35
+ }>, {
36
+ options: Record<string, any>;
37
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
38
+
39
+ export { MpScrollbar };
@@ -0,0 +1,120 @@
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/scrollbar.tsx
22
+ var scrollbar_exports = {};
23
+ __export(scrollbar_exports, {
24
+ MpScrollbar: () => MpScrollbar
25
+ });
26
+ module.exports = __toCommonJS(scrollbar_exports);
27
+ var import_vue = require("vue");
28
+ var import_vue2 = require("vue");
29
+ var import_overlayscrollbars_vue = require("overlayscrollbars-vue");
30
+ var import_jsx = require("@mekari/pixel3-styled-system/jsx");
31
+ var import_css = require("@mekari/pixel3-styled-system/css");
32
+
33
+ // src/modules/scrollbar.props.ts
34
+ var scrollbarProps = {
35
+ options: {
36
+ type: Object,
37
+ default: () => {
38
+ return {
39
+ overflow: {
40
+ x: "scroll",
41
+ y: "scroll"
42
+ },
43
+ scrollbars: {
44
+ autoHide: "scroll",
45
+ autoHideDelay: 1e3
46
+ }
47
+ };
48
+ }
49
+ }
50
+ };
51
+
52
+ // src/scrollbar.tsx
53
+ var import_overlayscrollbars = require("overlayscrollbars/overlayscrollbars.css");
54
+ function _isSlot(s) {
55
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, import_vue.isVNode)(s);
56
+ }
57
+ __name(_isSlot, "_isSlot");
58
+ var MpScrollbar = (0, import_vue2.defineComponent)({
59
+ name: "MpScrollbar",
60
+ props: scrollbarProps,
61
+ emits: ["initialized", "scroll"],
62
+ setup(props, {
63
+ slots,
64
+ emit
65
+ }) {
66
+ const wrapperRef = (0, import_vue2.ref)();
67
+ const wrapperClass = (0, import_vue2.computed)(() => {
68
+ return (0, import_css.css)({
69
+ "& .os-scrollbar": {
70
+ "--os-handle-bg": "colors.gray.100!",
71
+ "--os-handle-bg-hover": "colors.gray.400!",
72
+ "--os-handle-bg-active": "colors.gray.400!"
73
+ },
74
+ _nextTheme: {
75
+ "& .os-scrollbar": {
76
+ "--os-handle-bg": "colors.icon.subtle!",
77
+ "--os-handle-bg-hover": "colors.icon.default!",
78
+ "--os-handle-bg-active": "colors.icon.default!"
79
+ }
80
+ }
81
+ });
82
+ });
83
+ const [initialize] = (0, import_overlayscrollbars_vue.useOverlayScrollbars)({
84
+ defer: true,
85
+ options: props.options,
86
+ events: {
87
+ initialized: (e) => activateEvent("initialized", e),
88
+ scroll: (e) => activateEvent("scroll", e)
89
+ }
90
+ });
91
+ (0, import_vue2.onMounted)(() => {
92
+ if (wrapperRef.value) {
93
+ initialize({
94
+ target: wrapperRef.value.$el
95
+ });
96
+ }
97
+ });
98
+ function activateEvent(type, event) {
99
+ if (!event) {
100
+ return;
101
+ }
102
+ emit(type, event);
103
+ }
104
+ __name(activateEvent, "activateEvent");
105
+ return () => {
106
+ const children = slots.default && slots.default();
107
+ return (0, import_vue.createVNode)(import_jsx.Pixel.div, {
108
+ "ref": wrapperRef,
109
+ "data-pixel-component": "MpScrollbar",
110
+ "class": wrapperClass.value
111
+ }, _isSlot(children) ? children : {
112
+ default: () => [children]
113
+ });
114
+ };
115
+ }
116
+ });
117
+ // Annotate the CommonJS export names for ESM import in node:
118
+ 0 && (module.exports = {
119
+ MpScrollbar
120
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ MpScrollbar
3
+ } from "./chunk-3YFVWLNU.mjs";
4
+ import "./chunk-TYS4GN6M.mjs";
5
+ export {
6
+ MpScrollbar
7
+ };
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@mekari/pixel3-scrollbar",
3
+ "description": "Mekari Pixel 3 | Custom scrollbar component",
4
+ "version": "0.1.0-dev.0",
5
+ "main": "dist/index.js",
6
+ "license": "MIT",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "dependencies": {
11
+ "overlayscrollbars-vue": "0.5.9",
12
+ "overlayscrollbars": "2.11.1",
13
+ "@mekari/pixel3-styled-system": "0.1.3-dev.1",
14
+ "@mekari/pixel3-utils": "0.0.7"
15
+ },
16
+ "peerDependencies": {
17
+ "vue": "^3.4.9"
18
+ },
19
+ "devDependencies": {
20
+ "vue": "^3.4.9"
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
+ "types:check": "tsc --noEmit",
40
+ "replace-config": "clean-package",
41
+ "restore-config": "clean-package restore"
42
+ }
43
+ }