@mekari/pixel3-scrollbar 0.1.0-dev.0 → 0.1.0-dev.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-3YFVWLNU.mjs → chunk-UCPNDVZC.mjs} +16 -30
- package/dist/index.js +14 -28
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/scrollbar.d.mts +2 -2
- package/dist/scrollbar.d.ts +2 -2
- package/dist/scrollbar.js +14 -28
- package/dist/scrollbar.mjs +1 -1
- package/package.json +2 -3
|
@@ -4,40 +4,28 @@ import {
|
|
|
4
4
|
} from "./chunk-TYS4GN6M.mjs";
|
|
5
5
|
|
|
6
6
|
// src/scrollbar.tsx
|
|
7
|
-
import { createVNode as _createVNode,
|
|
7
|
+
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
8
8
|
import { defineComponent, onMounted, ref, computed } from "vue";
|
|
9
9
|
import { useOverlayScrollbars } from "overlayscrollbars-vue";
|
|
10
|
-
import {
|
|
11
|
-
import { css } from "@mekari/pixel3-styled-system/css";
|
|
12
|
-
import "
|
|
13
|
-
function _isSlot(s) {
|
|
14
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !_isVNode(s);
|
|
15
|
-
}
|
|
16
|
-
__name(_isSlot, "_isSlot");
|
|
10
|
+
import { scrollbarRecipe } from "@mekari/pixel3-styled-system/recipes";
|
|
11
|
+
import { css, cx } from "@mekari/pixel3-styled-system/css";
|
|
12
|
+
import { splitCssProps } from "@mekari/pixel3-styled-system/jsx";
|
|
17
13
|
var MpScrollbar = defineComponent({
|
|
18
14
|
name: "MpScrollbar",
|
|
19
15
|
props: scrollbarProps,
|
|
16
|
+
inheritAttrs: false,
|
|
20
17
|
emits: ["initialized", "scroll"],
|
|
21
18
|
setup(props, {
|
|
22
19
|
slots,
|
|
20
|
+
attrs,
|
|
23
21
|
emit
|
|
24
22
|
}) {
|
|
25
23
|
const wrapperRef = ref();
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
});
|
|
24
|
+
const [cssProps, restProps] = splitCssProps(attrs);
|
|
25
|
+
const classes = computed(() => {
|
|
26
|
+
return cx(scrollbarRecipe(), css({
|
|
27
|
+
...cssProps
|
|
28
|
+
}));
|
|
41
29
|
});
|
|
42
30
|
const [initialize] = useOverlayScrollbars({
|
|
43
31
|
defer: true,
|
|
@@ -50,7 +38,7 @@ var MpScrollbar = defineComponent({
|
|
|
50
38
|
onMounted(() => {
|
|
51
39
|
if (wrapperRef.value) {
|
|
52
40
|
initialize({
|
|
53
|
-
target: wrapperRef.value
|
|
41
|
+
target: wrapperRef.value
|
|
54
42
|
});
|
|
55
43
|
}
|
|
56
44
|
});
|
|
@@ -63,13 +51,11 @@ var MpScrollbar = defineComponent({
|
|
|
63
51
|
__name(activateEvent, "activateEvent");
|
|
64
52
|
return () => {
|
|
65
53
|
const children = slots.default && slots.default();
|
|
66
|
-
return _createVNode(
|
|
67
|
-
"ref": wrapperRef,
|
|
54
|
+
return _createVNode("div", _mergeProps({
|
|
68
55
|
"data-pixel-component": "MpScrollbar",
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
});
|
|
56
|
+
"ref": wrapperRef,
|
|
57
|
+
"class": classes.value
|
|
58
|
+
}, restProps), [children]);
|
|
73
59
|
};
|
|
74
60
|
}
|
|
75
61
|
});
|
package/dist/index.js
CHANGED
|
@@ -29,8 +29,9 @@ module.exports = __toCommonJS(src_exports);
|
|
|
29
29
|
var import_vue = require("vue");
|
|
30
30
|
var import_vue2 = require("vue");
|
|
31
31
|
var import_overlayscrollbars_vue = require("overlayscrollbars-vue");
|
|
32
|
-
var
|
|
32
|
+
var import_recipes = require("@mekari/pixel3-styled-system/recipes");
|
|
33
33
|
var import_css = require("@mekari/pixel3-styled-system/css");
|
|
34
|
+
var import_jsx = require("@mekari/pixel3-styled-system/jsx");
|
|
34
35
|
|
|
35
36
|
// src/modules/scrollbar.props.ts
|
|
36
37
|
var scrollbarProps = {
|
|
@@ -52,35 +53,22 @@ var scrollbarProps = {
|
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
// 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
56
|
var MpScrollbar = (0, import_vue2.defineComponent)({
|
|
61
57
|
name: "MpScrollbar",
|
|
62
58
|
props: scrollbarProps,
|
|
59
|
+
inheritAttrs: false,
|
|
63
60
|
emits: ["initialized", "scroll"],
|
|
64
61
|
setup(props, {
|
|
65
62
|
slots,
|
|
63
|
+
attrs,
|
|
66
64
|
emit
|
|
67
65
|
}) {
|
|
68
66
|
const wrapperRef = (0, import_vue2.ref)();
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
});
|
|
67
|
+
const [cssProps, restProps] = (0, import_jsx.splitCssProps)(attrs);
|
|
68
|
+
const classes = (0, import_vue2.computed)(() => {
|
|
69
|
+
return (0, import_css.cx)((0, import_recipes.scrollbarRecipe)(), (0, import_css.css)({
|
|
70
|
+
...cssProps
|
|
71
|
+
}));
|
|
84
72
|
});
|
|
85
73
|
const [initialize] = (0, import_overlayscrollbars_vue.useOverlayScrollbars)({
|
|
86
74
|
defer: true,
|
|
@@ -93,7 +81,7 @@ var MpScrollbar = (0, import_vue2.defineComponent)({
|
|
|
93
81
|
(0, import_vue2.onMounted)(() => {
|
|
94
82
|
if (wrapperRef.value) {
|
|
95
83
|
initialize({
|
|
96
|
-
target: wrapperRef.value
|
|
84
|
+
target: wrapperRef.value
|
|
97
85
|
});
|
|
98
86
|
}
|
|
99
87
|
});
|
|
@@ -106,13 +94,11 @@ var MpScrollbar = (0, import_vue2.defineComponent)({
|
|
|
106
94
|
__name(activateEvent, "activateEvent");
|
|
107
95
|
return () => {
|
|
108
96
|
const children = slots.default && slots.default();
|
|
109
|
-
return (0, import_vue.createVNode)(
|
|
110
|
-
"ref": wrapperRef,
|
|
97
|
+
return (0, import_vue.createVNode)("div", (0, import_vue.mergeProps)({
|
|
111
98
|
"data-pixel-component": "MpScrollbar",
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
99
|
+
"ref": wrapperRef,
|
|
100
|
+
"class": classes.value
|
|
101
|
+
}, restProps), [children]);
|
|
116
102
|
};
|
|
117
103
|
}
|
|
118
104
|
});
|
package/dist/index.mjs
CHANGED
package/dist/metafile-cjs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/modules/scrollbar.props.ts":{"bytes":373,"imports":[],"format":"esm"},"src/scrollbar.tsx":{"bytes":
|
|
1
|
+
{"inputs":{"src/modules/scrollbar.props.ts":{"bytes":373,"imports":[],"format":"esm"},"src/scrollbar.tsx":{"bytes":1777,"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/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"import-statement","external":true},{"path":"src/modules/scrollbar.props.ts","kind":"import-statement","original":"./modules/scrollbar.props"},{"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/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":127},"src/scrollbar.tsx":{"bytesInOutput":1745},"src/modules/scrollbar.props.ts":{"bytesInOutput":279}},"bytes":3241},"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/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/scrollbar.tsx","inputs":{"src/scrollbar.tsx":{"bytesInOutput":1890},"src/modules/scrollbar.props.ts":{"bytesInOutput":279}},"bytes":3242},"dist/modules/scrollbar.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/scrollbar.props.ts","inputs":{"src/modules/scrollbar.props.ts":{"bytesInOutput":448}},"bytes":1390}}}
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/modules/scrollbar.props.ts":{"bytes":373,"imports":[],"format":"esm"},"src/scrollbar.tsx":{"bytes":
|
|
1
|
+
{"inputs":{"src/modules/scrollbar.props.ts":{"bytes":373,"imports":[],"format":"esm"},"src/scrollbar.tsx":{"bytes":1777,"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/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"import-statement","external":true},{"path":"src/modules/scrollbar.props.ts","kind":"import-statement","original":"./modules/scrollbar.props"},{"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-UCPNDVZC.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-UCPNDVZC.mjs","kind":"import-statement"},{"path":"dist/chunk-TYS4GN6M.mjs","kind":"import-statement"}],"exports":["MpScrollbar"],"entryPoint":"src/scrollbar.tsx","inputs":{},"bytes":111},"dist/chunk-UCPNDVZC.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/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/jsx","kind":"import-statement","external":true}],"exports":["MpScrollbar"],"inputs":{"src/scrollbar.tsx":{"bytesInOutput":1618}},"bytes":1734},"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}}}
|
package/dist/scrollbar.d.mts
CHANGED
|
@@ -15,7 +15,7 @@ declare const MpScrollbar: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
}>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("
|
|
18
|
+
}>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("scroll" | "initialized")[], "scroll" | "initialized", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
19
19
|
options: {
|
|
20
20
|
type: ObjectConstructor;
|
|
21
21
|
default: () => {
|
|
@@ -30,8 +30,8 @@ declare const MpScrollbar: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}>> & Readonly<{
|
|
33
|
-
onInitialized?: ((...args: any[]) => any) | undefined;
|
|
34
33
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
onInitialized?: ((...args: any[]) => any) | undefined;
|
|
35
35
|
}>, {
|
|
36
36
|
options: Record<string, any>;
|
|
37
37
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
package/dist/scrollbar.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ declare const MpScrollbar: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
}>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("
|
|
18
|
+
}>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("scroll" | "initialized")[], "scroll" | "initialized", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
19
19
|
options: {
|
|
20
20
|
type: ObjectConstructor;
|
|
21
21
|
default: () => {
|
|
@@ -30,8 +30,8 @@ declare const MpScrollbar: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}>> & Readonly<{
|
|
33
|
-
onInitialized?: ((...args: any[]) => any) | undefined;
|
|
34
33
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
onInitialized?: ((...args: any[]) => any) | undefined;
|
|
35
35
|
}>, {
|
|
36
36
|
options: Record<string, any>;
|
|
37
37
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
package/dist/scrollbar.js
CHANGED
|
@@ -27,8 +27,9 @@ module.exports = __toCommonJS(scrollbar_exports);
|
|
|
27
27
|
var import_vue = require("vue");
|
|
28
28
|
var import_vue2 = require("vue");
|
|
29
29
|
var import_overlayscrollbars_vue = require("overlayscrollbars-vue");
|
|
30
|
-
var
|
|
30
|
+
var import_recipes = require("@mekari/pixel3-styled-system/recipes");
|
|
31
31
|
var import_css = require("@mekari/pixel3-styled-system/css");
|
|
32
|
+
var import_jsx = require("@mekari/pixel3-styled-system/jsx");
|
|
32
33
|
|
|
33
34
|
// src/modules/scrollbar.props.ts
|
|
34
35
|
var scrollbarProps = {
|
|
@@ -50,35 +51,22 @@ var scrollbarProps = {
|
|
|
50
51
|
};
|
|
51
52
|
|
|
52
53
|
// 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
54
|
var MpScrollbar = (0, import_vue2.defineComponent)({
|
|
59
55
|
name: "MpScrollbar",
|
|
60
56
|
props: scrollbarProps,
|
|
57
|
+
inheritAttrs: false,
|
|
61
58
|
emits: ["initialized", "scroll"],
|
|
62
59
|
setup(props, {
|
|
63
60
|
slots,
|
|
61
|
+
attrs,
|
|
64
62
|
emit
|
|
65
63
|
}) {
|
|
66
64
|
const wrapperRef = (0, import_vue2.ref)();
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
});
|
|
65
|
+
const [cssProps, restProps] = (0, import_jsx.splitCssProps)(attrs);
|
|
66
|
+
const classes = (0, import_vue2.computed)(() => {
|
|
67
|
+
return (0, import_css.cx)((0, import_recipes.scrollbarRecipe)(), (0, import_css.css)({
|
|
68
|
+
...cssProps
|
|
69
|
+
}));
|
|
82
70
|
});
|
|
83
71
|
const [initialize] = (0, import_overlayscrollbars_vue.useOverlayScrollbars)({
|
|
84
72
|
defer: true,
|
|
@@ -91,7 +79,7 @@ var MpScrollbar = (0, import_vue2.defineComponent)({
|
|
|
91
79
|
(0, import_vue2.onMounted)(() => {
|
|
92
80
|
if (wrapperRef.value) {
|
|
93
81
|
initialize({
|
|
94
|
-
target: wrapperRef.value
|
|
82
|
+
target: wrapperRef.value
|
|
95
83
|
});
|
|
96
84
|
}
|
|
97
85
|
});
|
|
@@ -104,13 +92,11 @@ var MpScrollbar = (0, import_vue2.defineComponent)({
|
|
|
104
92
|
__name(activateEvent, "activateEvent");
|
|
105
93
|
return () => {
|
|
106
94
|
const children = slots.default && slots.default();
|
|
107
|
-
return (0, import_vue.createVNode)(
|
|
108
|
-
"ref": wrapperRef,
|
|
95
|
+
return (0, import_vue.createVNode)("div", (0, import_vue.mergeProps)({
|
|
109
96
|
"data-pixel-component": "MpScrollbar",
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
97
|
+
"ref": wrapperRef,
|
|
98
|
+
"class": classes.value
|
|
99
|
+
}, restProps), [children]);
|
|
114
100
|
};
|
|
115
101
|
}
|
|
116
102
|
});
|
package/dist/scrollbar.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mekari/pixel3-scrollbar",
|
|
3
3
|
"description": "Mekari Pixel 3 | Custom scrollbar component",
|
|
4
|
-
"version": "0.1.0-dev.
|
|
4
|
+
"version": "0.1.0-dev.1",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"overlayscrollbars-vue": "0.5.9",
|
|
12
|
-
"
|
|
13
|
-
"@mekari/pixel3-styled-system": "0.1.3-dev.1",
|
|
12
|
+
"@mekari/pixel3-styled-system": "0.1.3-dev.2",
|
|
14
13
|
"@mekari/pixel3-utils": "0.0.7"
|
|
15
14
|
},
|
|
16
15
|
"peerDependencies": {
|