@mekari/pixel3-dropzone 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.
@@ -0,0 +1,176 @@
1
+ import * as vue_jsx_runtime from 'vue/jsx-runtime';
2
+ import * as vue from 'vue';
3
+
4
+ declare const MpDropzone: vue.DefineComponent<{
5
+ id: {
6
+ type: vue.PropType<string>;
7
+ default: string;
8
+ };
9
+ variant: {
10
+ type: vue.PropType<"default" | "logo" | "product" | "avatar">;
11
+ default: string;
12
+ };
13
+ accept: {
14
+ type: vue.PropType<string>;
15
+ };
16
+ name: {
17
+ type: vue.PropType<string>;
18
+ };
19
+ placeholder: {
20
+ type: vue.PropType<string>;
21
+ default: string;
22
+ };
23
+ description: {
24
+ type: vue.PropType<string>;
25
+ default: string;
26
+ };
27
+ loadingText: {
28
+ type: vue.PropType<string>;
29
+ default: string;
30
+ };
31
+ buttonText: {
32
+ type: vue.PropType<string>;
33
+ default: string;
34
+ };
35
+ overlayVariant: {
36
+ type: vue.PropType<"white" | "black">;
37
+ default: string;
38
+ };
39
+ isShowPreview: {
40
+ type: vue.PropType<boolean>;
41
+ default: boolean;
42
+ };
43
+ isMultiple: {
44
+ type: vue.PropType<boolean>;
45
+ default: boolean;
46
+ };
47
+ isLoading: {
48
+ type: vue.PropType<boolean>;
49
+ default: boolean;
50
+ };
51
+ isDisabled: {
52
+ type: vue.PropType<boolean>;
53
+ default: boolean;
54
+ };
55
+ isInvalid: {
56
+ type: vue.PropType<boolean>;
57
+ default: boolean;
58
+ };
59
+ isRequired: {
60
+ type: vue.PropType<boolean>;
61
+ default: boolean;
62
+ };
63
+ hasCustomUpload: {
64
+ type: vue.PropType<boolean>;
65
+ default: boolean;
66
+ };
67
+ isEnableDragAndDrop: {
68
+ type: vue.PropType<boolean>;
69
+ default: boolean;
70
+ };
71
+ isEnableInputFile: {
72
+ type: vue.PropType<boolean>;
73
+ default: boolean;
74
+ };
75
+ isShowOverlay: {
76
+ type: vue.PropType<boolean>;
77
+ default: boolean;
78
+ };
79
+ }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, string[], string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
80
+ id: {
81
+ type: vue.PropType<string>;
82
+ default: string;
83
+ };
84
+ variant: {
85
+ type: vue.PropType<"default" | "logo" | "product" | "avatar">;
86
+ default: string;
87
+ };
88
+ accept: {
89
+ type: vue.PropType<string>;
90
+ };
91
+ name: {
92
+ type: vue.PropType<string>;
93
+ };
94
+ placeholder: {
95
+ type: vue.PropType<string>;
96
+ default: string;
97
+ };
98
+ description: {
99
+ type: vue.PropType<string>;
100
+ default: string;
101
+ };
102
+ loadingText: {
103
+ type: vue.PropType<string>;
104
+ default: string;
105
+ };
106
+ buttonText: {
107
+ type: vue.PropType<string>;
108
+ default: string;
109
+ };
110
+ overlayVariant: {
111
+ type: vue.PropType<"white" | "black">;
112
+ default: string;
113
+ };
114
+ isShowPreview: {
115
+ type: vue.PropType<boolean>;
116
+ default: boolean;
117
+ };
118
+ isMultiple: {
119
+ type: vue.PropType<boolean>;
120
+ default: boolean;
121
+ };
122
+ isLoading: {
123
+ type: vue.PropType<boolean>;
124
+ default: boolean;
125
+ };
126
+ isDisabled: {
127
+ type: vue.PropType<boolean>;
128
+ default: boolean;
129
+ };
130
+ isInvalid: {
131
+ type: vue.PropType<boolean>;
132
+ default: boolean;
133
+ };
134
+ isRequired: {
135
+ type: vue.PropType<boolean>;
136
+ default: boolean;
137
+ };
138
+ hasCustomUpload: {
139
+ type: vue.PropType<boolean>;
140
+ default: boolean;
141
+ };
142
+ isEnableDragAndDrop: {
143
+ type: vue.PropType<boolean>;
144
+ default: boolean;
145
+ };
146
+ isEnableInputFile: {
147
+ type: vue.PropType<boolean>;
148
+ default: boolean;
149
+ };
150
+ isShowOverlay: {
151
+ type: vue.PropType<boolean>;
152
+ default: boolean;
153
+ };
154
+ }>> & {
155
+ [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
156
+ }, {
157
+ id: string;
158
+ variant: "default" | "logo" | "product" | "avatar";
159
+ placeholder: string;
160
+ description: string;
161
+ loadingText: string;
162
+ buttonText: string;
163
+ overlayVariant: "white" | "black";
164
+ isShowPreview: boolean;
165
+ isMultiple: boolean;
166
+ isLoading: boolean;
167
+ isDisabled: boolean;
168
+ isInvalid: boolean;
169
+ isRequired: boolean;
170
+ hasCustomUpload: boolean;
171
+ isEnableDragAndDrop: boolean;
172
+ isEnableInputFile: boolean;
173
+ isShowOverlay: boolean;
174
+ }, {}>;
175
+
176
+ export { MpDropzone };
@@ -0,0 +1,502 @@
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/dropzone.tsx
22
+ var dropzone_exports = {};
23
+ __export(dropzone_exports, {
24
+ MpDropzone: () => MpDropzone
25
+ });
26
+ module.exports = __toCommonJS(dropzone_exports);
27
+ var import_vue2 = require("vue");
28
+ var import_vue3 = require("vue");
29
+ var import_pixel3_text = require("@mekari/pixel3-text");
30
+ var import_pixel3_icon = require("@mekari/pixel3-icon");
31
+ var import_pixel3_spinner = require("@mekari/pixel3-spinner");
32
+
33
+ // src/modules/dropzone.props.ts
34
+ var dropzoneProps = {
35
+ id: {
36
+ type: String,
37
+ default: ""
38
+ },
39
+ variant: {
40
+ type: String,
41
+ default: "default"
42
+ },
43
+ accept: {
44
+ type: String
45
+ },
46
+ name: {
47
+ type: String
48
+ },
49
+ placeholder: {
50
+ type: String,
51
+ default: "Drop your file(s) here or "
52
+ },
53
+ description: {
54
+ type: String,
55
+ default: "Description of dropzone"
56
+ },
57
+ loadingText: {
58
+ type: String,
59
+ default: "Uploading..."
60
+ },
61
+ buttonText: {
62
+ type: String,
63
+ default: "Change file"
64
+ },
65
+ overlayVariant: {
66
+ type: String,
67
+ default: "white"
68
+ },
69
+ isShowPreview: {
70
+ type: Boolean,
71
+ default: true
72
+ },
73
+ isMultiple: {
74
+ type: Boolean,
75
+ default: false
76
+ },
77
+ isLoading: {
78
+ type: Boolean,
79
+ default: false
80
+ },
81
+ isDisabled: {
82
+ type: Boolean,
83
+ default: false
84
+ },
85
+ isInvalid: {
86
+ type: Boolean,
87
+ default: false
88
+ },
89
+ isRequired: {
90
+ type: Boolean,
91
+ default: false
92
+ },
93
+ hasCustomUpload: {
94
+ type: Boolean,
95
+ default: false
96
+ },
97
+ isEnableDragAndDrop: {
98
+ type: Boolean,
99
+ default: true
100
+ },
101
+ isEnableInputFile: {
102
+ type: Boolean,
103
+ default: false
104
+ },
105
+ isShowOverlay: {
106
+ type: Boolean,
107
+ default: false
108
+ }
109
+ };
110
+ var dropzoneEmit = ["click", "dragover", "dragleave", "drop", "change", "clear", "cancel"];
111
+
112
+ // src/modules/dropzone.hooks.ts
113
+ var import_vue = require("vue");
114
+ var import_pixel3_utils = require("@mekari/pixel3-utils");
115
+ var import_recipes = require("@mekari/pixel3-styled-system/recipes");
116
+ function useDropzone(props, emit) {
117
+ const {
118
+ id,
119
+ variant,
120
+ name,
121
+ accept,
122
+ isMultiple,
123
+ hasCustomUpload,
124
+ overlayVariant,
125
+ isEnableInputFile,
126
+ isEnableDragAndDrop,
127
+ isShowPreview,
128
+ isShowOverlay,
129
+ isLoading,
130
+ isInvalid,
131
+ isDisabled,
132
+ isRequired
133
+ } = (0, import_vue.toRefs)(props);
134
+ const files = (0, import_vue.ref)();
135
+ const fileInput = (0, import_vue.ref)();
136
+ const preview = (0, import_vue.ref)("");
137
+ const showOverlay = (0, import_vue.ref)(isShowOverlay.value);
138
+ const overlay = (0, import_vue.ref)();
139
+ const getId = id.value || (0, import_pixel3_utils.getUniqueId)("", "dropzone").value;
140
+ const hasPreview = (0, import_vue.computed)(() => {
141
+ return isShowPreview.value && preview.value;
142
+ });
143
+ const rootAttrs = (0, import_vue.computed)(() => {
144
+ return {
145
+ "data-pixel-component": "MpDropzone",
146
+ id: getId,
147
+ class: (0, import_recipes.dropzoneSlotRecipe)().root,
148
+ onClick: handleClick,
149
+ onDragover: handleDragover,
150
+ onDragleave: handleDragleave,
151
+ onDrop: handleDrop
152
+ };
153
+ });
154
+ const wrapperAttrs = (0, import_vue.computed)(() => {
155
+ return {
156
+ "data-invalid": isInvalid.value || void 0,
157
+ "data-disabled": isDisabled.value || void 0,
158
+ "data-variant": variant.value,
159
+ tabindex: isDisabled.value ? -1 : 0,
160
+ class: (0, import_recipes.dropzoneSlotRecipe)().wrapper,
161
+ style: {
162
+ background: variant.value === "default" ? "var(--mp-colors-white)" : "var(--mp-colors-background)",
163
+ borderRadius: variant.value === "avatar" ? "var(--mp-radii-full)" : "var(--mp-radii-md)"
164
+ }
165
+ };
166
+ });
167
+ const boxAttrs = (0, import_vue.computed)(() => {
168
+ return {
169
+ class: (0, import_recipes.dropzoneSlotRecipe)().box
170
+ };
171
+ });
172
+ const logoBoxAttrs = (0, import_vue.computed)(() => {
173
+ return {
174
+ class: (0, import_recipes.dropzoneSlotRecipe)().logoBox,
175
+ onClick: handleClickInput
176
+ };
177
+ });
178
+ const productBoxAttrs = (0, import_vue.computed)(() => {
179
+ return {
180
+ class: (0, import_recipes.dropzoneSlotRecipe)().productBox,
181
+ onClick: handleClickInput
182
+ };
183
+ });
184
+ const avatarBoxAttrs = (0, import_vue.computed)(() => {
185
+ return {
186
+ class: (0, import_recipes.dropzoneSlotRecipe)().avatarBox,
187
+ onClick: handleClickInput
188
+ };
189
+ });
190
+ const overlayWrapperAttrs = (0, import_vue.computed)(() => {
191
+ return {
192
+ class: (0, import_recipes.dropzoneSlotRecipe)().overlayWrapper
193
+ };
194
+ });
195
+ const overlayAttrs = (0, import_vue.computed)(() => {
196
+ return {
197
+ ref: overlay,
198
+ class: (0, import_recipes.dropzoneSlotRecipe)().overlay,
199
+ style: {
200
+ display: showOverlay.value ? "flex" : "none",
201
+ background: overlayVariant.value === "white" ? "var(--mp-colors-whiteAlpha.300)" : "var(--mp-colors-overlay)"
202
+ }
203
+ };
204
+ });
205
+ const inputAttrs = (0, import_vue.computed)(() => {
206
+ return {
207
+ ref: fileInput,
208
+ id: `input-${getId}`,
209
+ class: (0, import_recipes.sharedSlotRecipe)().hidden,
210
+ type: "file",
211
+ name: name == null ? void 0 : name.value,
212
+ accept: accept == null ? void 0 : accept.value,
213
+ multiple: isMultiple.value,
214
+ disabled: isDisabled.value,
215
+ required: isRequired.value,
216
+ onChange: handleChangeInput
217
+ };
218
+ });
219
+ const cancelButtonAttrs = (0, import_vue.computed)(() => {
220
+ return {
221
+ color: "red.400",
222
+ style: {
223
+ cursor: "pointer"
224
+ },
225
+ onClick: handleCancel
226
+ };
227
+ });
228
+ const browseButtonAttrs = (0, import_vue.computed)(() => {
229
+ return {
230
+ as: "span",
231
+ weight: "semiBold",
232
+ color: "blue.400",
233
+ style: {
234
+ cursor: "pointer"
235
+ },
236
+ onClick: handleClickInput
237
+ };
238
+ });
239
+ const previewAttrs = (0, import_vue.computed)(() => {
240
+ return {
241
+ class: (0, import_recipes.dropzoneSlotRecipe)().preview
242
+ };
243
+ });
244
+ const overlayPreviewAttrs = (0, import_vue.computed)(() => {
245
+ return {
246
+ "data-overlay-preview": true,
247
+ class: (0, import_recipes.dropzoneSlotRecipe)().overlayPreview,
248
+ onClick: handleClickInput
249
+ };
250
+ });
251
+ const imageAttrs = (0, import_vue.computed)(() => {
252
+ return {
253
+ src: preview.value,
254
+ style: {
255
+ borderRadius: "inherit",
256
+ height: "100%",
257
+ objectFit: "cover"
258
+ }
259
+ };
260
+ });
261
+ const clearButtonAttrs = (0, import_vue.computed)(() => {
262
+ return {
263
+ class: (0, import_recipes.dropzoneSlotRecipe)().clearButton,
264
+ name: "minus-circular",
265
+ variant: "fill",
266
+ color: "red.400",
267
+ style: {
268
+ top: variant.value === "avatar" ? "-4px" : "-10px",
269
+ right: variant.value === "avatar" ? "-4px" : "-10px"
270
+ },
271
+ onClick: handleClear
272
+ };
273
+ });
274
+ function handleClick(e) {
275
+ if (!isEnableInputFile.value) {
276
+ return;
277
+ }
278
+ handleClickInput();
279
+ emit("click", e);
280
+ }
281
+ __name(handleClick, "handleClick");
282
+ function handleClickInput() {
283
+ if (isDisabled.value) {
284
+ return;
285
+ }
286
+ files.value = null;
287
+ fileInput.value.value = null;
288
+ fileInput.value.click();
289
+ }
290
+ __name(handleClickInput, "handleClickInput");
291
+ function handleDragover(e) {
292
+ e.preventDefault();
293
+ if (!isEnableDragAndDrop.value) {
294
+ return;
295
+ }
296
+ emit("dragover", e);
297
+ if (hasCustomUpload.value) {
298
+ showOverlay.value = true;
299
+ }
300
+ }
301
+ __name(handleDragover, "handleDragover");
302
+ function handleDragleave(e) {
303
+ if (!isEnableDragAndDrop.value) {
304
+ return;
305
+ }
306
+ emit("dragleave", e);
307
+ if (e.target === overlay.value) {
308
+ showOverlay.value = false;
309
+ }
310
+ }
311
+ __name(handleDragleave, "handleDragleave");
312
+ function handleDrop(e) {
313
+ e.preventDefault();
314
+ if (!isEnableDragAndDrop.value) {
315
+ return;
316
+ }
317
+ emit("drop", e);
318
+ const target = e.dataTransfer;
319
+ if (target && target.files) {
320
+ const {
321
+ files: files2
322
+ } = target;
323
+ handleFiles(files2);
324
+ }
325
+ if (hasCustomUpload.value) {
326
+ showOverlay.value = false;
327
+ }
328
+ }
329
+ __name(handleDrop, "handleDrop");
330
+ function handleChangeInput(e) {
331
+ const target = e.target;
332
+ if (target && target.files) {
333
+ const {
334
+ files: files2
335
+ } = target;
336
+ handleFiles(files2);
337
+ }
338
+ }
339
+ __name(handleChangeInput, "handleChangeInput");
340
+ function handleFiles(item) {
341
+ if (isDisabled.value) {
342
+ return;
343
+ }
344
+ if (item && item.length > 0) {
345
+ files.value = item;
346
+ }
347
+ emit("change", files.value);
348
+ if (files.value && files.value.length === 1) {
349
+ handlePreview(files.value[0]);
350
+ }
351
+ }
352
+ __name(handleFiles, "handleFiles");
353
+ function handlePreview(item) {
354
+ if (isLoading.value) {
355
+ return;
356
+ }
357
+ const REGEXP_MIME_TYPE_IMAGES = /^image\/\w+$/;
358
+ if (REGEXP_MIME_TYPE_IMAGES.test(item.type)) {
359
+ preview.value = URL.createObjectURL(item);
360
+ }
361
+ }
362
+ __name(handlePreview, "handlePreview");
363
+ function handleClear(e) {
364
+ e.stopPropagation();
365
+ emit("clear", e);
366
+ files.value = null;
367
+ preview.value = "";
368
+ }
369
+ __name(handleClear, "handleClear");
370
+ function handleCancel(e) {
371
+ e.stopPropagation();
372
+ emit("cancel", e);
373
+ }
374
+ __name(handleCancel, "handleCancel");
375
+ return {
376
+ rootAttrs,
377
+ wrapperAttrs,
378
+ boxAttrs,
379
+ logoBoxAttrs,
380
+ productBoxAttrs,
381
+ avatarBoxAttrs,
382
+ overlayWrapperAttrs,
383
+ overlayAttrs,
384
+ inputAttrs,
385
+ imageAttrs,
386
+ cancelButtonAttrs,
387
+ browseButtonAttrs,
388
+ previewAttrs,
389
+ overlayPreviewAttrs,
390
+ clearButtonAttrs,
391
+ hasPreview
392
+ };
393
+ }
394
+ __name(useDropzone, "useDropzone");
395
+
396
+ // src/dropzone.tsx
397
+ function _isSlot(s) {
398
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, import_vue2.isVNode)(s);
399
+ }
400
+ __name(_isSlot, "_isSlot");
401
+ var MpDropzone = (0, import_vue3.defineComponent)({
402
+ name: "MpDropzone",
403
+ props: dropzoneProps,
404
+ emits: dropzoneEmit,
405
+ setup(props, {
406
+ emit,
407
+ slots
408
+ }) {
409
+ const {
410
+ rootAttrs,
411
+ wrapperAttrs,
412
+ boxAttrs,
413
+ logoBoxAttrs,
414
+ productBoxAttrs,
415
+ avatarBoxAttrs,
416
+ overlayWrapperAttrs,
417
+ overlayAttrs,
418
+ inputAttrs,
419
+ imageAttrs,
420
+ cancelButtonAttrs,
421
+ browseButtonAttrs,
422
+ previewAttrs,
423
+ overlayPreviewAttrs,
424
+ clearButtonAttrs,
425
+ hasPreview
426
+ } = useDropzone(props, emit);
427
+ return () => {
428
+ const children = slots.default && slots.default();
429
+ const {
430
+ variant,
431
+ placeholder,
432
+ description,
433
+ buttonText,
434
+ loadingText,
435
+ overlayVariant,
436
+ isLoading,
437
+ isInvalid
438
+ } = props;
439
+ return (0, import_vue2.createVNode)("div", rootAttrs.value, [children ? (0, import_vue2.createVNode)("div", overlayWrapperAttrs.value, [(0, import_vue2.createVNode)("div", overlayAttrs.value, [(0, import_vue2.createVNode)(import_pixel3_text.MpText, {
440
+ "weight": "semiBold",
441
+ "color": overlayVariant === "white" ? "dark" : "white"
442
+ }, _isSlot(placeholder) ? placeholder : {
443
+ default: () => [placeholder]
444
+ }), (0, import_vue2.createVNode)(import_pixel3_text.MpText, {
445
+ "color": overlayVariant === "white" ? "dark" : "white"
446
+ }, _isSlot(description) ? description : {
447
+ default: () => [description]
448
+ })]), children]) : (0, import_vue2.createVNode)("div", wrapperAttrs.value, [isLoading && (0, import_vue2.createVNode)("div", boxAttrs.value, [(0, import_vue2.createVNode)(import_pixel3_spinner.MpSpinner, null, null), variant !== "avatar" && (0, import_vue2.createVNode)(import_pixel3_text.MpText, {
449
+ "color": "gray.600"
450
+ }, _isSlot(loadingText) ? loadingText : {
451
+ default: () => [loadingText]
452
+ }), variant === "default" && (0, import_vue2.createVNode)(import_pixel3_text.MpText, cancelButtonAttrs.value, {
453
+ default: () => [(0, import_vue2.createTextVNode)("Cancel")]
454
+ })]), !isLoading && hasPreview.value && (0, import_vue2.createVNode)("div", previewAttrs.value, [(0, import_vue2.createVNode)(import_pixel3_icon.MpIcon, clearButtonAttrs.value, null), (0, import_vue2.createVNode)("div", overlayPreviewAttrs.value, [(0, import_vue2.createVNode)(import_pixel3_icon.MpIcon, {
455
+ "name": "folder-open",
456
+ "variant": "fill",
457
+ "color": "white"
458
+ }, null), variant !== "avatar" && (0, import_vue2.createVNode)(import_pixel3_text.MpText, {
459
+ "color": "white"
460
+ }, _isSlot(buttonText) ? buttonText : {
461
+ default: () => [buttonText]
462
+ })]), (0, import_vue2.createVNode)("img", imageAttrs.value, null)]), !isLoading && !hasPreview.value && variant === "default" && (0, import_vue2.createVNode)("div", boxAttrs.value, [(0, import_vue2.createVNode)(import_pixel3_icon.MpIcon, {
463
+ "name": "upload",
464
+ "variant": isInvalid ? "outline" : "duotone",
465
+ "color": isInvalid ? "red.400" : "gray.600"
466
+ }, null), (0, import_vue2.createVNode)(import_pixel3_text.MpText, null, {
467
+ default: () => [placeholder, (0, import_vue2.createVNode)(import_pixel3_text.MpText, browseButtonAttrs.value, {
468
+ default: () => [(0, import_vue2.createTextVNode)("Browse")]
469
+ })]
470
+ }), (0, import_vue2.createVNode)(import_pixel3_text.MpText, {
471
+ "color": "gray.600"
472
+ }, _isSlot(description) ? description : {
473
+ default: () => [description]
474
+ })]), !isLoading && !hasPreview.value && variant === "logo" && (0, import_vue2.createVNode)("div", logoBoxAttrs.value, [(0, import_vue2.createVNode)(import_pixel3_icon.MpIcon, {
475
+ "name": "img",
476
+ "variant": isInvalid ? "fill" : "outline",
477
+ "color": isInvalid ? "red.400" : "gray.600"
478
+ }, null), (0, import_vue2.createVNode)(import_pixel3_text.MpText, {
479
+ "color": isInvalid ? "red.400" : "gray.600"
480
+ }, _isSlot(placeholder) ? placeholder : {
481
+ default: () => [placeholder]
482
+ })]), !isLoading && !hasPreview.value && variant === "product" && (0, import_vue2.createVNode)("div", productBoxAttrs.value, [(0, import_vue2.createVNode)(import_pixel3_icon.MpIcon, {
483
+ "name": "add-circular",
484
+ "variant": isInvalid ? "fill" : "outline",
485
+ "color": isInvalid ? "red.400" : "gray.600"
486
+ }, null), (0, import_vue2.createVNode)(import_pixel3_text.MpText, {
487
+ "color": isInvalid ? "red.400" : "gray.600"
488
+ }, _isSlot(placeholder) ? placeholder : {
489
+ default: () => [placeholder]
490
+ })]), !isLoading && !hasPreview.value && variant === "avatar" && (0, import_vue2.createVNode)("div", avatarBoxAttrs.value, [(0, import_vue2.createVNode)(import_pixel3_text.MpText, {
491
+ "size": "h1",
492
+ "color": isInvalid ? "red.400" : "gray.600"
493
+ }, _isSlot(placeholder) ? placeholder : {
494
+ default: () => [placeholder]
495
+ })])]), (0, import_vue2.createVNode)("input", inputAttrs.value, null)]);
496
+ };
497
+ }
498
+ });
499
+ // Annotate the CommonJS export names for ESM import in node:
500
+ 0 && (module.exports = {
501
+ MpDropzone
502
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ MpDropzone
3
+ } from "./chunk-DEUKYB7V.mjs";
4
+ import "./chunk-PB3KHIIV.mjs";
5
+ import "./chunk-CQO276YD.mjs";
6
+ import "./chunk-QZ7VFGWC.mjs";
7
+ export {
8
+ MpDropzone
9
+ };
@@ -0,0 +1,3 @@
1
+ export { MpDropzone } from './dropzone.mjs';
2
+ import 'vue/jsx-runtime';
3
+ import 'vue';
@@ -0,0 +1,3 @@
1
+ export { MpDropzone } from './dropzone.js';
2
+ import 'vue/jsx-runtime';
3
+ import 'vue';