@mekari/pixel3-upload 0.0.15-dev.0 → 0.0.16-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-O5TCYA7V.mjs → chunk-ADYWIIBK.mjs} +1 -1
- package/dist/{chunk-W6VPDWGC.mjs → chunk-DUIAKRG4.mjs} +1 -1
- package/dist/{chunk-IEVDIM2Y.mjs → chunk-Z5XNNZQB.mjs} +19 -14
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -13
- package/dist/index.mjs +3 -3
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/modules/upload.hooks.d.mts +3 -3
- package/dist/modules/upload.hooks.d.ts +3 -3
- package/dist/modules/upload.hooks.js +18 -13
- package/dist/modules/upload.hooks.mjs +1 -1
- package/dist/modules/upload.props.d.mts +3 -3
- package/dist/modules/upload.props.d.ts +3 -3
- package/dist/upload-list.d.mts +11 -11
- package/dist/upload-list.d.ts +11 -11
- package/dist/upload-list.js +11 -7
- package/dist/upload-list.mjs +2 -2
- package/dist/upload.d.mts +1 -1
- package/dist/upload.d.ts +1 -1
- package/dist/upload.js +7 -6
- package/dist/upload.mjs +2 -2
- package/package.json +7 -7
package/dist/upload-list.js
CHANGED
|
@@ -92,17 +92,21 @@ function useUploadList(props, emit) {
|
|
|
92
92
|
isShowDownloadButton,
|
|
93
93
|
isShowRemoveButton
|
|
94
94
|
} = (0, import_vue.toRefs)(props);
|
|
95
|
+
const {
|
|
96
|
+
isNextTheme
|
|
97
|
+
} = (0, import_pixel3_utils.usePixelTheme)();
|
|
95
98
|
const getId = id.value || (0, import_pixel3_utils.getUniqueId)("", "upload-list").value;
|
|
96
99
|
const color = (0, import_vue.computed)(() => {
|
|
97
|
-
let title = "dark";
|
|
98
|
-
let subtitle = "gray.600";
|
|
100
|
+
let title = isNextTheme.value ? "text.default" : "dark";
|
|
101
|
+
let subtitle = isNextTheme.value ? "text.secondary" : "gray.600";
|
|
99
102
|
if (status.value === "success") {
|
|
100
|
-
title = "blue.700";
|
|
103
|
+
title = isNextTheme.value ? "text.success" : "blue.700";
|
|
101
104
|
}
|
|
102
105
|
if (status.value === "error") {
|
|
103
|
-
title = "red.400";
|
|
104
|
-
subtitle = "red.400";
|
|
106
|
+
title = isNextTheme.value ? "text.danger" : "red.400";
|
|
107
|
+
subtitle = isNextTheme.value ? "text.danger" : "red.400";
|
|
105
108
|
}
|
|
109
|
+
console.log("ada", title, subtitle);
|
|
106
110
|
return {
|
|
107
111
|
title,
|
|
108
112
|
subtitle
|
|
@@ -129,8 +133,8 @@ function useUploadList(props, emit) {
|
|
|
129
133
|
return {
|
|
130
134
|
size: "md",
|
|
131
135
|
name: status.value === "error" ? "error" : iconName.value,
|
|
132
|
-
color: status.value === "error" ? "red.700" : iconColor.value,
|
|
133
|
-
variant: status.value === "error" ? "duotone" : iconVariant.value
|
|
136
|
+
color: status.value === "error" ? isNextTheme.value ? "icon.danger" : "red.700" : iconColor.value,
|
|
137
|
+
variant: status.value === "error" ? isNextTheme.value ? "outline" : "duotone" : iconVariant.value
|
|
134
138
|
};
|
|
135
139
|
});
|
|
136
140
|
const titleWrapperAttrs = (0, import_vue.computed)(() => {
|
package/dist/upload-list.mjs
CHANGED
package/dist/upload.d.mts
CHANGED
|
@@ -112,9 +112,9 @@ declare const MpUpload: vue.DefineComponent<{
|
|
|
112
112
|
}>> & {
|
|
113
113
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
114
114
|
}, {
|
|
115
|
+
id: string;
|
|
115
116
|
isDisabled: boolean;
|
|
116
117
|
isLoading: boolean;
|
|
117
|
-
id: string;
|
|
118
118
|
placeholder: string;
|
|
119
119
|
loadingText: string;
|
|
120
120
|
buttonText: string;
|
package/dist/upload.d.ts
CHANGED
|
@@ -112,9 +112,9 @@ declare const MpUpload: vue.DefineComponent<{
|
|
|
112
112
|
}>> & {
|
|
113
113
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
114
114
|
}, {
|
|
115
|
+
id: string;
|
|
115
116
|
isDisabled: boolean;
|
|
116
117
|
isLoading: boolean;
|
|
117
|
-
id: string;
|
|
118
118
|
placeholder: string;
|
|
119
119
|
loadingText: string;
|
|
120
120
|
buttonText: string;
|
package/dist/upload.js
CHANGED
|
@@ -110,6 +110,9 @@ function useUpload(props, emit) {
|
|
|
110
110
|
} = (0, import_vue.toRefs)(props);
|
|
111
111
|
const files = (0, import_vue.ref)(fileList == null ? void 0 : fileList.value);
|
|
112
112
|
const fileInput = (0, import_vue.ref)();
|
|
113
|
+
const {
|
|
114
|
+
isNextTheme
|
|
115
|
+
} = (0, import_pixel3_utils.usePixelTheme)();
|
|
113
116
|
const getId = id.value || (0, import_pixel3_utils.getUniqueId)("", "upload").value;
|
|
114
117
|
const fileName = (0, import_vue.computed)(() => {
|
|
115
118
|
if (isLoading.value) {
|
|
@@ -153,12 +156,10 @@ function useUpload(props, emit) {
|
|
|
153
156
|
isDisabled: isDisabled.value
|
|
154
157
|
};
|
|
155
158
|
});
|
|
156
|
-
const textAttrs = (0, import_vue.computed)(() => {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
};
|
|
161
|
-
});
|
|
159
|
+
const textAttrs = (0, import_vue.computed)(() => ({
|
|
160
|
+
color: !isLoading.value && totalFiles.value >= 1 ? isNextTheme ? "text.default" : "dark" : isNextTheme ? "text.secondary" : "gray.400",
|
|
161
|
+
isTruncated: true
|
|
162
|
+
}));
|
|
162
163
|
const resetButtonAttrs = (0, import_vue.computed)(() => {
|
|
163
164
|
return {
|
|
164
165
|
class: (0, import_recipes.uploadSlotRecipe)().resetButton,
|
package/dist/upload.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mekari/pixel3-upload",
|
|
3
3
|
"description": "Upload component for mekari pixel 3",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.16-dev.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@mekari/pixel3-button": "0.0.
|
|
12
|
-
"@mekari/pixel3-spinner": "0.0.
|
|
13
|
-
"@mekari/pixel3-
|
|
14
|
-
"@mekari/pixel3-
|
|
15
|
-
"@mekari/pixel3-
|
|
16
|
-
"@mekari/pixel3-utils": "0.0.
|
|
11
|
+
"@mekari/pixel3-button": "0.0.17-dev.0",
|
|
12
|
+
"@mekari/pixel3-spinner": "0.0.17-dev.0",
|
|
13
|
+
"@mekari/pixel3-icon": "0.0.17-dev.0",
|
|
14
|
+
"@mekari/pixel3-text": "0.0.16-dev.0",
|
|
15
|
+
"@mekari/pixel3-styled-system": "0.1.2-dev.0",
|
|
16
|
+
"@mekari/pixel3-utils": "0.0.7-dev.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"vue": "^3.4.9"
|