@mekari/pixel3-color-picker 0.0.1-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.
- package/dist/chunk-36OXI4E3.mjs +347 -0
- package/dist/chunk-5FWKSVUW.mjs +89 -0
- package/dist/chunk-AEUPCATZ.mjs +156 -0
- package/dist/chunk-DVRBDVR4.mjs +63 -0
- package/dist/chunk-L5BRB7ES.mjs +64 -0
- package/dist/chunk-PULVLME3.mjs +196 -0
- package/dist/chunk-QZ7VFGWC.mjs +6 -0
- package/dist/chunk-YLUI3RMF.mjs +116 -0
- package/dist/color-picker.d.mts +129 -0
- package/dist/color-picker.d.ts +129 -0
- package/dist/color-picker.js +1006 -0
- package/dist/color-picker.mjs +13 -0
- package/dist/hue.d.mts +27 -0
- package/dist/hue.d.ts +27 -0
- package/dist/hue.js +217 -0
- package/dist/hue.mjs +7 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1008 -0
- package/dist/index.mjs +13 -0
- package/dist/input.d.mts +41 -0
- package/dist/input.d.ts +41 -0
- package/dist/input.js +110 -0
- package/dist/input.mjs +7 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/modules/color-picker.hooks.d.mts +206 -0
- package/dist/modules/color-picker.hooks.d.ts +206 -0
- package/dist/modules/color-picker.hooks.js +378 -0
- package/dist/modules/color-picker.hooks.mjs +7 -0
- package/dist/modules/color-picker.props.d.mts +62 -0
- package/dist/modules/color-picker.props.d.ts +62 -0
- package/dist/modules/color-picker.props.js +89 -0
- package/dist/modules/color-picker.props.mjs +9 -0
- package/dist/preset.d.mts +26 -0
- package/dist/preset.d.ts +26 -0
- package/dist/preset.js +94 -0
- package/dist/preset.mjs +7 -0
- package/dist/saturation.d.mts +16 -0
- package/dist/saturation.d.ts +16 -0
- package/dist/saturation.js +187 -0
- package/dist/saturation.mjs +7 -0
- package/package.json +53 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MpColorPicker
|
|
3
|
+
} from "./chunk-YLUI3RMF.mjs";
|
|
4
|
+
import "./chunk-PULVLME3.mjs";
|
|
5
|
+
import "./chunk-5FWKSVUW.mjs";
|
|
6
|
+
import "./chunk-DVRBDVR4.mjs";
|
|
7
|
+
import "./chunk-AEUPCATZ.mjs";
|
|
8
|
+
import "./chunk-36OXI4E3.mjs";
|
|
9
|
+
import "./chunk-L5BRB7ES.mjs";
|
|
10
|
+
import "./chunk-QZ7VFGWC.mjs";
|
|
11
|
+
export {
|
|
12
|
+
MpColorPicker
|
|
13
|
+
};
|
package/dist/input.d.mts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpColorInput: vue.DefineComponent<{
|
|
5
|
+
value: {
|
|
6
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
label: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
width: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
max: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
};
|
|
19
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "change"[], "change", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
20
|
+
value: {
|
|
21
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
label: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
width: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
31
|
+
max: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
};
|
|
34
|
+
}>> & {
|
|
35
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
value: string | number;
|
|
38
|
+
label: string;
|
|
39
|
+
}, {}>;
|
|
40
|
+
|
|
41
|
+
export { MpColorInput };
|
package/dist/input.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpColorInput: vue.DefineComponent<{
|
|
5
|
+
value: {
|
|
6
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
label: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
width: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
max: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
};
|
|
19
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "change"[], "change", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
20
|
+
value: {
|
|
21
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
label: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
width: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
31
|
+
max: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
};
|
|
34
|
+
}>> & {
|
|
35
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
value: string | number;
|
|
38
|
+
label: string;
|
|
39
|
+
}, {}>;
|
|
40
|
+
|
|
41
|
+
export { MpColorInput };
|
package/dist/input.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
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/input.tsx
|
|
22
|
+
var input_exports = {};
|
|
23
|
+
__export(input_exports, {
|
|
24
|
+
MpColorInput: () => MpColorInput
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(input_exports);
|
|
27
|
+
var import_vue = require("vue");
|
|
28
|
+
var import_vue2 = require("vue");
|
|
29
|
+
var import_pixel3_text = require("@mekari/pixel3-text");
|
|
30
|
+
var import_pixel3_input = require("@mekari/pixel3-input");
|
|
31
|
+
var import_css = require("@mekari/pixel3-styled-system/css");
|
|
32
|
+
var MpColorInput = (0, import_vue2.defineComponent)({
|
|
33
|
+
name: "MpColorInput",
|
|
34
|
+
props: {
|
|
35
|
+
value: {
|
|
36
|
+
type: [String, Number],
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
label: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "hex"
|
|
42
|
+
},
|
|
43
|
+
width: {
|
|
44
|
+
type: String
|
|
45
|
+
},
|
|
46
|
+
max: {
|
|
47
|
+
type: Number
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: ["change"],
|
|
51
|
+
setup(props, {
|
|
52
|
+
emit
|
|
53
|
+
}) {
|
|
54
|
+
const val = (0, import_vue2.computed)({
|
|
55
|
+
get() {
|
|
56
|
+
return props.value;
|
|
57
|
+
},
|
|
58
|
+
set(v) {
|
|
59
|
+
if (!(props.max === void 0) && +v > props.max) {
|
|
60
|
+
return props.max;
|
|
61
|
+
} else {
|
|
62
|
+
return v;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
function handleInput(e) {
|
|
67
|
+
console.log("asdad", e);
|
|
68
|
+
const target = e.target;
|
|
69
|
+
const value = target.value;
|
|
70
|
+
const data = {};
|
|
71
|
+
data[props.label] = value;
|
|
72
|
+
if (data.hex === void 0 && data["#"] === void 0) {
|
|
73
|
+
emit("change", data);
|
|
74
|
+
} else if (value.length > 5) {
|
|
75
|
+
emit("change", data);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
__name(handleInput, "handleInput");
|
|
79
|
+
return () => {
|
|
80
|
+
return (0, import_vue.createVNode)("div", {
|
|
81
|
+
"data-pixel-component": "MpColorPickerInput",
|
|
82
|
+
"class": (0, import_css.css)({
|
|
83
|
+
display: "flex",
|
|
84
|
+
flexDirection: "column",
|
|
85
|
+
gap: "1"
|
|
86
|
+
})
|
|
87
|
+
}, [(0, import_vue.createVNode)("div", null, [(0, import_vue.createVNode)(import_pixel3_text.MpText, {
|
|
88
|
+
"size": "label-small",
|
|
89
|
+
"class": (0, import_css.css)({
|
|
90
|
+
textTransform: "capitalize"
|
|
91
|
+
})
|
|
92
|
+
}, {
|
|
93
|
+
default: () => [props.label]
|
|
94
|
+
})]), (0, import_vue.createVNode)(import_pixel3_input.MpInput, {
|
|
95
|
+
"value": val.value,
|
|
96
|
+
"size": "sm",
|
|
97
|
+
"maxlength": props.label === "hex" ? "7" : "3",
|
|
98
|
+
"style": {
|
|
99
|
+
width: props.width,
|
|
100
|
+
minWidth: props.width
|
|
101
|
+
},
|
|
102
|
+
"onInput": handleInput
|
|
103
|
+
}, null)]);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
108
|
+
0 && (module.exports = {
|
|
109
|
+
MpColorInput
|
|
110
|
+
});
|
package/dist/input.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/modules/color-picker.props.ts":{"bytes":1916,"imports":[{"path":"vue","kind":"import-statement","external":true}],"format":"esm"},"src/modules/color-picker.hooks.ts":{"bytes":9339,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"tinycolor2","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","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/tokens","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/saturation.tsx":{"bytes":4652,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"clamp","kind":"import-statement","external":true},{"path":"lodash.throttle","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hue.tsx":{"bytes":5628,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/input.tsx":{"bytes":2196,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true},{"path":"@mekari/pixel3-input","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/preset.tsx":{"bytes":1437,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"tinycolor2","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/color-picker.tsx":{"bytes":4530,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true},{"path":"@mekari/pixel3-popover","kind":"import-statement","external":true},{"path":"@mekari/pixel3-input","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-divider","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"src/modules/color-picker.props.ts","kind":"import-statement","original":"./modules/color-picker.props"},{"path":"src/modules/color-picker.hooks.ts","kind":"import-statement","original":"./modules/color-picker.hooks"},{"path":"src/saturation.tsx","kind":"import-statement","original":"./saturation"},{"path":"src/hue.tsx","kind":"import-statement","original":"./hue"},{"path":"src/input.tsx","kind":"import-statement","original":"./input"},{"path":"src/preset.tsx","kind":"import-statement","original":"./preset"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":132,"imports":[{"path":"src/color-picker.tsx","kind":"import-statement","original":"./color-picker"}],"format":"esm"}},"outputs":{"dist/color-picker.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-text","kind":"require-call","external":true},{"path":"@mekari/pixel3-popover","kind":"require-call","external":true},{"path":"@mekari/pixel3-input","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-divider","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"tinycolor2","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","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/tokens","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"clamp","kind":"require-call","external":true},{"path":"lodash.throttle","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-text","kind":"require-call","external":true},{"path":"@mekari/pixel3-input","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"tinycolor2","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/color-picker.tsx","inputs":{"src/color-picker.tsx":{"bytesInOutput":5065},"src/modules/color-picker.props.ts":{"bytesInOutput":1040},"src/modules/color-picker.hooks.ts":{"bytesInOutput":9666},"src/saturation.tsx":{"bytesInOutput":5060},"src/hue.tsx":{"bytesInOutput":6268},"src/input.tsx":{"bytesInOutput":2116},"src/preset.tsx":{"bytesInOutput":1489}},"bytes":32499},"dist/hue.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/hue.tsx","inputs":{"src/hue.tsx":{"bytesInOutput":6383}},"bytes":7392},"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-text","kind":"require-call","external":true},{"path":"@mekari/pixel3-popover","kind":"require-call","external":true},{"path":"@mekari/pixel3-input","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-divider","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"tinycolor2","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","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/tokens","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"clamp","kind":"require-call","external":true},{"path":"lodash.throttle","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-text","kind":"require-call","external":true},{"path":"@mekari/pixel3-input","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"tinycolor2","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":131},"src/color-picker.tsx":{"bytesInOutput":4907},"src/modules/color-picker.props.ts":{"bytesInOutput":1040},"src/modules/color-picker.hooks.ts":{"bytesInOutput":9666},"src/saturation.tsx":{"bytesInOutput":5060},"src/hue.tsx":{"bytesInOutput":6268},"src/input.tsx":{"bytesInOutput":2116},"src/preset.tsx":{"bytesInOutput":1489}},"bytes":32489},"dist/input.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-text","kind":"require-call","external":true},{"path":"@mekari/pixel3-input","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/input.tsx","inputs":{"src/input.tsx":{"bytesInOutput":2243}},"bytes":3256},"dist/preset.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"tinycolor2","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/preset.tsx","inputs":{"src/preset.tsx":{"bytesInOutput":1622}},"bytes":3234},"dist/saturation.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"clamp","kind":"require-call","external":true},{"path":"lodash.throttle","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/saturation.tsx","inputs":{"src/saturation.tsx":{"bytesInOutput":5208}},"bytes":6828},"dist/modules/color-picker.hooks.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"tinycolor2","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","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/tokens","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/color-picker.hooks.ts","inputs":{"src/modules/color-picker.hooks.ts":{"bytesInOutput":9844}},"bytes":11476},"dist/modules/color-picker.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/color-picker.props.ts","inputs":{"src/modules/color-picker.props.ts":{"bytesInOutput":1298}},"bytes":2264}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/modules/color-picker.props.ts":{"bytes":1916,"imports":[{"path":"vue","kind":"import-statement","external":true}],"format":"esm"},"src/modules/color-picker.hooks.ts":{"bytes":9339,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"tinycolor2","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","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/tokens","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/saturation.tsx":{"bytes":4652,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"clamp","kind":"import-statement","external":true},{"path":"lodash.throttle","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hue.tsx":{"bytes":5628,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/input.tsx":{"bytes":2196,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true},{"path":"@mekari/pixel3-input","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/preset.tsx":{"bytes":1437,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"tinycolor2","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/color-picker.tsx":{"bytes":4530,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true},{"path":"@mekari/pixel3-popover","kind":"import-statement","external":true},{"path":"@mekari/pixel3-input","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-divider","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"src/modules/color-picker.props.ts","kind":"import-statement","original":"./modules/color-picker.props"},{"path":"src/modules/color-picker.hooks.ts","kind":"import-statement","original":"./modules/color-picker.hooks"},{"path":"src/saturation.tsx","kind":"import-statement","original":"./saturation"},{"path":"src/hue.tsx","kind":"import-statement","original":"./hue"},{"path":"src/input.tsx","kind":"import-statement","original":"./input"},{"path":"src/preset.tsx","kind":"import-statement","original":"./preset"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":132,"imports":[{"path":"src/color-picker.tsx","kind":"import-statement","original":"./color-picker"}],"format":"esm"}},"outputs":{"dist/color-picker.mjs":{"imports":[{"path":"dist/chunk-YLUI3RMF.mjs","kind":"import-statement"},{"path":"dist/chunk-PULVLME3.mjs","kind":"import-statement"},{"path":"dist/chunk-5FWKSVUW.mjs","kind":"import-statement"},{"path":"dist/chunk-DVRBDVR4.mjs","kind":"import-statement"},{"path":"dist/chunk-AEUPCATZ.mjs","kind":"import-statement"},{"path":"dist/chunk-36OXI4E3.mjs","kind":"import-statement"},{"path":"dist/chunk-L5BRB7ES.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpColorPicker"],"entryPoint":"src/color-picker.tsx","inputs":{},"bytes":301},"dist/hue.mjs":{"imports":[{"path":"dist/chunk-PULVLME3.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpColorHue"],"entryPoint":"src/hue.tsx","inputs":{},"bytes":109},"dist/index.mjs":{"imports":[{"path":"dist/chunk-YLUI3RMF.mjs","kind":"import-statement"},{"path":"dist/chunk-PULVLME3.mjs","kind":"import-statement"},{"path":"dist/chunk-5FWKSVUW.mjs","kind":"import-statement"},{"path":"dist/chunk-DVRBDVR4.mjs","kind":"import-statement"},{"path":"dist/chunk-AEUPCATZ.mjs","kind":"import-statement"},{"path":"dist/chunk-36OXI4E3.mjs","kind":"import-statement"},{"path":"dist/chunk-L5BRB7ES.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpColorPicker"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":301},"dist/chunk-YLUI3RMF.mjs":{"imports":[{"path":"dist/chunk-PULVLME3.mjs","kind":"import-statement"},{"path":"dist/chunk-5FWKSVUW.mjs","kind":"import-statement"},{"path":"dist/chunk-DVRBDVR4.mjs","kind":"import-statement"},{"path":"dist/chunk-AEUPCATZ.mjs","kind":"import-statement"},{"path":"dist/chunk-36OXI4E3.mjs","kind":"import-statement"},{"path":"dist/chunk-L5BRB7ES.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true},{"path":"@mekari/pixel3-popover","kind":"import-statement","external":true},{"path":"@mekari/pixel3-input","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-divider","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true}],"exports":["MpColorPicker"],"inputs":{"src/color-picker.tsx":{"bytesInOutput":4154}},"bytes":4597},"dist/chunk-PULVLME3.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true}],"exports":["MpColorHue"],"inputs":{"src/hue.tsx":{"bytesInOutput":6037}},"bytes":6128},"dist/input.mjs":{"imports":[{"path":"dist/chunk-5FWKSVUW.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpColorInput"],"entryPoint":"src/input.tsx","inputs":{},"bytes":113},"dist/chunk-5FWKSVUW.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true},{"path":"@mekari/pixel3-input","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true}],"exports":["MpColorInput"],"inputs":{"src/input.tsx":{"bytesInOutput":1948}},"bytes":2043},"dist/preset.mjs":{"imports":[{"path":"dist/chunk-DVRBDVR4.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpColorPreset"],"entryPoint":"src/preset.tsx","inputs":{},"bytes":115},"dist/chunk-DVRBDVR4.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"tinycolor2","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true}],"exports":["MpColorPreset"],"inputs":{"src/preset.tsx":{"bytesInOutput":1365}},"bytes":1462},"dist/saturation.mjs":{"imports":[{"path":"dist/chunk-AEUPCATZ.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpColorSaturation"],"entryPoint":"src/saturation.tsx","inputs":{},"bytes":123},"dist/chunk-AEUPCATZ.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"clamp","kind":"import-statement","external":true},{"path":"lodash.throttle","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true}],"exports":["MpColorSaturation"],"inputs":{"src/saturation.tsx":{"bytesInOutput":4709}},"bytes":4814},"dist/modules/color-picker.hooks.mjs":{"imports":[{"path":"dist/chunk-36OXI4E3.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["useColorPicker"],"entryPoint":"src/modules/color-picker.hooks.ts","inputs":{},"bytes":119},"dist/chunk-36OXI4E3.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"tinycolor2","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","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/tokens","kind":"import-statement","external":true}],"exports":["useColorPicker"],"inputs":{"src/modules/color-picker.hooks.ts":{"bytesInOutput":8653}},"bytes":8770},"dist/modules/color-picker.props.mjs":{"imports":[{"path":"dist/chunk-L5BRB7ES.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["colorPickerEmit","colorPickerProps"],"entryPoint":"src/modules/color-picker.props.ts","inputs":{},"bytes":161},"dist/chunk-L5BRB7ES.mjs":{"imports":[],"exports":["colorPickerEmit","colorPickerProps"],"inputs":{"src/modules/color-picker.props.ts":{"bytesInOutput":1074}},"bytes":1162},"dist/chunk-QZ7VFGWC.mjs":{"imports":[],"exports":["__name"],"inputs":{},"bytes":151}}}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { ColorPickerProps, ColorPickerEmit, Placement } from './color-picker.props.mjs';
|
|
3
|
+
|
|
4
|
+
declare function useColorPicker(props: ColorPickerProps, emit: ColorPickerEmit): {
|
|
5
|
+
rootAttrs: vue.ComputedRef<{
|
|
6
|
+
'data-pixel-component': string;
|
|
7
|
+
id: string | undefined;
|
|
8
|
+
class: string;
|
|
9
|
+
style: {
|
|
10
|
+
width: string;
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
popoverAttrs: vue.ComputedRef<{
|
|
14
|
+
id: string;
|
|
15
|
+
placement: Placement;
|
|
16
|
+
defaultIsOpen: boolean;
|
|
17
|
+
initialFocusRef: string;
|
|
18
|
+
onOpen: () => void;
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
}>;
|
|
21
|
+
popoverTriggerAttrs: vue.ComputedRef<{
|
|
22
|
+
tabindex: string;
|
|
23
|
+
class: string;
|
|
24
|
+
style: {
|
|
25
|
+
borderColor: string;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
boxColorAttrs: vue.ComputedRef<{
|
|
29
|
+
class: string;
|
|
30
|
+
style: {
|
|
31
|
+
background: string;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
inputTriggerAttrs: vue.ComputedRef<{
|
|
35
|
+
id: string;
|
|
36
|
+
type: string;
|
|
37
|
+
autocomplete: string;
|
|
38
|
+
variant: "unstyled";
|
|
39
|
+
maxlength: string;
|
|
40
|
+
value: string;
|
|
41
|
+
placeholder: string;
|
|
42
|
+
class: string;
|
|
43
|
+
onInput: (e: Event) => void;
|
|
44
|
+
}>;
|
|
45
|
+
iconDropDownAttrs: vue.ComputedRef<{
|
|
46
|
+
name: "chevrons-down";
|
|
47
|
+
size: "sm";
|
|
48
|
+
class: string;
|
|
49
|
+
}>;
|
|
50
|
+
popoverContentAttrs: vue.ComputedRef<{
|
|
51
|
+
class: string;
|
|
52
|
+
style: {
|
|
53
|
+
width: string;
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
56
|
+
wrapperAdvanceAttrs: vue.ComputedRef<{
|
|
57
|
+
class: string;
|
|
58
|
+
}>;
|
|
59
|
+
wrapperBasicAttrs: vue.ComputedRef<{
|
|
60
|
+
class: string;
|
|
61
|
+
}>;
|
|
62
|
+
wrapperSaturationAttrs: vue.ComputedRef<{
|
|
63
|
+
class: string;
|
|
64
|
+
}>;
|
|
65
|
+
saturationAttrs: vue.ComputedRef<{
|
|
66
|
+
value: {
|
|
67
|
+
hsl: {
|
|
68
|
+
h: number;
|
|
69
|
+
s: number;
|
|
70
|
+
l: number;
|
|
71
|
+
a: number;
|
|
72
|
+
};
|
|
73
|
+
hex: string;
|
|
74
|
+
hex8: string;
|
|
75
|
+
rgba: {
|
|
76
|
+
r: number;
|
|
77
|
+
g: number;
|
|
78
|
+
b: number;
|
|
79
|
+
a: number;
|
|
80
|
+
};
|
|
81
|
+
hsv: {
|
|
82
|
+
a: number;
|
|
83
|
+
h: number;
|
|
84
|
+
s: number;
|
|
85
|
+
v: number;
|
|
86
|
+
};
|
|
87
|
+
oldHue: any;
|
|
88
|
+
source: any;
|
|
89
|
+
};
|
|
90
|
+
onChange: (data: any) => void;
|
|
91
|
+
}>;
|
|
92
|
+
wrapperHueAttrs: vue.ComputedRef<{
|
|
93
|
+
class: string;
|
|
94
|
+
}>;
|
|
95
|
+
hueAttrs: vue.ComputedRef<{
|
|
96
|
+
value: {
|
|
97
|
+
hsl: {
|
|
98
|
+
h: number;
|
|
99
|
+
s: number;
|
|
100
|
+
l: number;
|
|
101
|
+
a: number;
|
|
102
|
+
};
|
|
103
|
+
hex: string;
|
|
104
|
+
hex8: string;
|
|
105
|
+
rgba: {
|
|
106
|
+
r: number;
|
|
107
|
+
g: number;
|
|
108
|
+
b: number;
|
|
109
|
+
a: number;
|
|
110
|
+
};
|
|
111
|
+
hsv: {
|
|
112
|
+
a: number;
|
|
113
|
+
h: number;
|
|
114
|
+
s: number;
|
|
115
|
+
v: number;
|
|
116
|
+
};
|
|
117
|
+
oldHue: any;
|
|
118
|
+
source: any;
|
|
119
|
+
};
|
|
120
|
+
onChange: (data: any) => void;
|
|
121
|
+
}>;
|
|
122
|
+
wrapperInputAttrs: vue.ComputedRef<{
|
|
123
|
+
class: string;
|
|
124
|
+
}>;
|
|
125
|
+
inputHexAttrs: vue.ComputedRef<{
|
|
126
|
+
label: string;
|
|
127
|
+
width: string;
|
|
128
|
+
value: string;
|
|
129
|
+
onChange: (data: {
|
|
130
|
+
hex?: string | undefined;
|
|
131
|
+
'#'?: string | undefined;
|
|
132
|
+
r?: string | undefined;
|
|
133
|
+
g?: string | undefined;
|
|
134
|
+
b?: string | undefined;
|
|
135
|
+
a?: string | undefined;
|
|
136
|
+
}) => void;
|
|
137
|
+
}>;
|
|
138
|
+
inputRedAttrs: vue.ComputedRef<{
|
|
139
|
+
label: string;
|
|
140
|
+
width: string;
|
|
141
|
+
value: number;
|
|
142
|
+
onChange: (data: {
|
|
143
|
+
hex?: string | undefined;
|
|
144
|
+
'#'?: string | undefined;
|
|
145
|
+
r?: string | undefined;
|
|
146
|
+
g?: string | undefined;
|
|
147
|
+
b?: string | undefined;
|
|
148
|
+
a?: string | undefined;
|
|
149
|
+
}) => void;
|
|
150
|
+
}>;
|
|
151
|
+
inputGreenAttrs: vue.ComputedRef<{
|
|
152
|
+
label: string;
|
|
153
|
+
width: string;
|
|
154
|
+
value: number;
|
|
155
|
+
onChange: (data: {
|
|
156
|
+
hex?: string | undefined;
|
|
157
|
+
'#'?: string | undefined;
|
|
158
|
+
r?: string | undefined;
|
|
159
|
+
g?: string | undefined;
|
|
160
|
+
b?: string | undefined;
|
|
161
|
+
a?: string | undefined;
|
|
162
|
+
}) => void;
|
|
163
|
+
}>;
|
|
164
|
+
inputBlueAttrs: vue.ComputedRef<{
|
|
165
|
+
label: string;
|
|
166
|
+
width: string;
|
|
167
|
+
value: number;
|
|
168
|
+
onChange: (data: {
|
|
169
|
+
hex?: string | undefined;
|
|
170
|
+
'#'?: string | undefined;
|
|
171
|
+
r?: string | undefined;
|
|
172
|
+
g?: string | undefined;
|
|
173
|
+
b?: string | undefined;
|
|
174
|
+
a?: string | undefined;
|
|
175
|
+
}) => void;
|
|
176
|
+
}>;
|
|
177
|
+
inputFullAttrs: vue.ComputedRef<{
|
|
178
|
+
label: string;
|
|
179
|
+
width: string;
|
|
180
|
+
value: string;
|
|
181
|
+
onChange: (data: {
|
|
182
|
+
hex?: string | undefined;
|
|
183
|
+
'#'?: string | undefined;
|
|
184
|
+
r?: string | undefined;
|
|
185
|
+
g?: string | undefined;
|
|
186
|
+
b?: string | undefined;
|
|
187
|
+
a?: string | undefined;
|
|
188
|
+
}) => void;
|
|
189
|
+
}>;
|
|
190
|
+
boxPresetAttrs: vue.ComputedRef<{
|
|
191
|
+
class: string;
|
|
192
|
+
}>;
|
|
193
|
+
wrapperPresetAttrs: vue.ComputedRef<{
|
|
194
|
+
class: string;
|
|
195
|
+
}>;
|
|
196
|
+
wrapperBasicPresetAttrs: vue.ComputedRef<{
|
|
197
|
+
class: string;
|
|
198
|
+
}>;
|
|
199
|
+
presetBoxAttrs: (item: string) => {
|
|
200
|
+
value: string;
|
|
201
|
+
isActive: boolean;
|
|
202
|
+
onClick: (data: any) => void;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export { useColorPicker };
|