@mekari/pixel3-toast 0.0.22-dev.0 → 0.0.22-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-6PKDGWX7.mjs → chunk-LAEOE734.mjs} +15 -2
- package/dist/index.js +15 -2
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/modules/toast.types.d.mts +1 -0
- package/dist/modules/toast.types.d.ts +1 -0
- package/dist/toast.js +15 -2
- package/dist/toast.mjs +1 -1
- package/package.json +2 -2
|
@@ -78,19 +78,32 @@ var toast = {
|
|
|
78
78
|
position = "top-center",
|
|
79
79
|
duration = 5e3,
|
|
80
80
|
variant = "success",
|
|
81
|
-
render
|
|
81
|
+
render,
|
|
82
|
+
maxWidth
|
|
82
83
|
} = option || {};
|
|
83
84
|
if (toastManagerNode()) {
|
|
84
85
|
options.value = {
|
|
85
86
|
position
|
|
86
87
|
};
|
|
88
|
+
if (maxWidth) {
|
|
89
|
+
const toasterNode = document.querySelector("[data-sonner-toaster]");
|
|
90
|
+
if (toasterNode) {
|
|
91
|
+
toasterNode.style.setProperty("--width", maxWidth);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
87
94
|
toaster.custom(_createVNode(MpToast, {
|
|
88
95
|
"id": id,
|
|
89
96
|
"title": title,
|
|
90
97
|
"variant": variant,
|
|
91
98
|
"render": render
|
|
92
99
|
}, null), {
|
|
93
|
-
duration
|
|
100
|
+
duration,
|
|
101
|
+
...maxWidth && {
|
|
102
|
+
style: {
|
|
103
|
+
maxWidth,
|
|
104
|
+
width: maxWidth
|
|
105
|
+
}
|
|
106
|
+
}
|
|
94
107
|
});
|
|
95
108
|
}
|
|
96
109
|
},
|
package/dist/index.js
CHANGED
|
@@ -170,19 +170,32 @@ var toast = {
|
|
|
170
170
|
position = "top-center",
|
|
171
171
|
duration = 5e3,
|
|
172
172
|
variant = "success",
|
|
173
|
-
render
|
|
173
|
+
render,
|
|
174
|
+
maxWidth
|
|
174
175
|
} = option || {};
|
|
175
176
|
if (toastManagerNode()) {
|
|
176
177
|
options.value = {
|
|
177
178
|
position
|
|
178
179
|
};
|
|
180
|
+
if (maxWidth) {
|
|
181
|
+
const toasterNode = document.querySelector("[data-sonner-toaster]");
|
|
182
|
+
if (toasterNode) {
|
|
183
|
+
toasterNode.style.setProperty("--width", maxWidth);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
179
186
|
import_vue_sonner.toast.custom((0, import_vue2.createVNode)(MpToast, {
|
|
180
187
|
"id": id,
|
|
181
188
|
"title": title,
|
|
182
189
|
"variant": variant,
|
|
183
190
|
"render": render
|
|
184
191
|
}, null), {
|
|
185
|
-
duration
|
|
192
|
+
duration,
|
|
193
|
+
...maxWidth && {
|
|
194
|
+
style: {
|
|
195
|
+
maxWidth,
|
|
196
|
+
width: maxWidth
|
|
197
|
+
}
|
|
198
|
+
}
|
|
186
199
|
});
|
|
187
200
|
}
|
|
188
201
|
},
|
package/dist/index.mjs
CHANGED
package/dist/metafile-cjs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/modules/toast.props.ts":{"bytes":755,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"./toast.types","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.connects.ts":{"bytes":867,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"./toast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.hooks.ts":{"bytes":598,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/toast.connects.ts","kind":"import-statement","original":"./toast.connects"},{"path":"./toast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/toast.tsx":{"bytes":
|
|
1
|
+
{"inputs":{"src/modules/toast.props.ts":{"bytes":755,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"./toast.types","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.connects.ts":{"bytes":867,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"./toast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.hooks.ts":{"bytes":598,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/toast.connects.ts","kind":"import-statement","original":"./toast.connects"},{"path":"./toast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/toast.tsx":{"bytes":3946,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"vue-sonner","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"src/modules/toast.props.ts","kind":"import-statement","original":"./modules/toast.props"},{"path":"src/modules/toast.hooks.ts","kind":"import-statement","original":"./modules/toast.hooks"},{"path":"./modules/toast.types","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.types.ts":{"bytes":968,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":222,"imports":[{"path":"src/toast.tsx","kind":"import-statement","original":"./toast"},{"path":"src/modules/toast.types.ts","kind":"import-statement","original":"./modules/toast.types"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue-sonner","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":155},"src/toast.tsx":{"bytesInOutput":3593},"src/modules/toast.props.ts":{"bytesInOutput":310},"src/modules/toast.hooks.ts":{"bytesInOutput":440},"src/modules/toast.connects.ts":{"bytesInOutput":704}},"bytes":6388},"dist/toast.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue-sonner","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/toast.tsx","inputs":{"src/toast.tsx":{"bytesInOutput":3754},"src/modules/toast.props.ts":{"bytesInOutput":310},"src/modules/toast.hooks.ts":{"bytesInOutput":440},"src/modules/toast.connects.ts":{"bytesInOutput":704}},"bytes":6377},"dist/modules/toast.connects.js":{"imports":[{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/toast.connects.ts","inputs":{"src/modules/toast.connects.ts":{"bytesInOutput":866}},"bytes":1895},"dist/modules/toast.hooks.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/toast.hooks.ts","inputs":{"src/modules/toast.hooks.ts":{"bytesInOutput":585},"src/modules/toast.connects.ts":{"bytesInOutput":704}},"bytes":2376},"dist/modules/toast.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/toast.props.ts","inputs":{"src/modules/toast.props.ts":{"bytesInOutput":459}},"bytes":1393},"dist/modules/toast.types.js":{"imports":[],"exports":[],"entryPoint":"src/modules/toast.types.ts","inputs":{"src/modules/toast.types.ts":{"bytesInOutput":82}},"bytes":784}}}
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/modules/toast.props.ts":{"bytes":755,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"./toast.types","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.connects.ts":{"bytes":867,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"./toast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.hooks.ts":{"bytes":598,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/toast.connects.ts","kind":"import-statement","original":"./toast.connects"},{"path":"./toast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/toast.tsx":{"bytes":
|
|
1
|
+
{"inputs":{"src/modules/toast.props.ts":{"bytes":755,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"./toast.types","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.connects.ts":{"bytes":867,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"./toast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.hooks.ts":{"bytes":598,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/toast.connects.ts","kind":"import-statement","original":"./toast.connects"},{"path":"./toast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/toast.tsx":{"bytes":3946,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"vue-sonner","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"src/modules/toast.props.ts","kind":"import-statement","original":"./modules/toast.props"},{"path":"src/modules/toast.hooks.ts","kind":"import-statement","original":"./modules/toast.hooks"},{"path":"./modules/toast.types","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/toast.types.ts":{"bytes":968,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":222,"imports":[{"path":"src/toast.tsx","kind":"import-statement","original":"./toast"},{"path":"src/modules/toast.types.ts","kind":"import-statement","original":"./modules/toast.types"}],"format":"esm"}},"outputs":{"dist/index.mjs":{"imports":[{"path":"dist/chunk-LAEOE734.mjs","kind":"import-statement"},{"path":"dist/chunk-VHOLH4TX.mjs","kind":"import-statement"},{"path":"dist/chunk-VZBXYSQL.mjs","kind":"import-statement"},{"path":"dist/chunk-DUGBXMFI.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"dist/chunk-IDFCRJI7.mjs","kind":"import-statement"}],"exports":["MpToastManager","toast"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":259},"dist/toast.mjs":{"imports":[{"path":"dist/chunk-LAEOE734.mjs","kind":"import-statement"},{"path":"dist/chunk-VHOLH4TX.mjs","kind":"import-statement"},{"path":"dist/chunk-VZBXYSQL.mjs","kind":"import-statement"},{"path":"dist/chunk-DUGBXMFI.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpToastManager","toast"],"entryPoint":"src/toast.tsx","inputs":{},"bytes":228},"dist/chunk-LAEOE734.mjs":{"imports":[{"path":"dist/chunk-VHOLH4TX.mjs","kind":"import-statement"},{"path":"dist/chunk-DUGBXMFI.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":"vue-sonner","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true}],"exports":["MpToastManager","toast"],"inputs":{"src/toast.tsx":{"bytesInOutput":3360}},"bytes":3570},"dist/modules/toast.connects.mjs":{"imports":[{"path":"dist/chunk-VZBXYSQL.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["toastConnect"],"entryPoint":"src/modules/toast.connects.ts","inputs":{},"bytes":115},"dist/modules/toast.hooks.mjs":{"imports":[{"path":"dist/chunk-VHOLH4TX.mjs","kind":"import-statement"},{"path":"dist/chunk-VZBXYSQL.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["useToast"],"entryPoint":"src/modules/toast.hooks.ts","inputs":{},"bytes":139},"dist/chunk-VHOLH4TX.mjs":{"imports":[{"path":"dist/chunk-VZBXYSQL.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"exports":["useToast"],"inputs":{"src/modules/toast.hooks.ts":{"bytesInOutput":379}},"bytes":538},"dist/chunk-VZBXYSQL.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"exports":["toastConnect"],"inputs":{"src/modules/toast.connects.ts":{"bytesInOutput":666}},"bytes":777},"dist/modules/toast.props.mjs":{"imports":[{"path":"dist/chunk-DUGBXMFI.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["toastProps"],"entryPoint":"src/modules/toast.props.ts","inputs":{},"bytes":111},"dist/chunk-DUGBXMFI.mjs":{"imports":[],"exports":["toastProps"],"inputs":{"src/modules/toast.props.ts":{"bytesInOutput":310}},"bytes":366},"dist/chunk-QZ7VFGWC.mjs":{"imports":[],"exports":["__name"],"inputs":{},"bytes":151},"dist/modules/toast.types.mjs":{"imports":[{"path":"dist/chunk-IDFCRJI7.mjs","kind":"import-statement"}],"exports":[],"entryPoint":"src/modules/toast.types.ts","inputs":{},"bytes":32},"dist/chunk-IDFCRJI7.mjs":{"imports":[],"exports":[],"inputs":{"src/modules/toast.types.ts":{"bytesInOutput":0}},"bytes":0}}}
|
package/dist/toast.js
CHANGED
|
@@ -168,19 +168,32 @@ var toast = {
|
|
|
168
168
|
position = "top-center",
|
|
169
169
|
duration = 5e3,
|
|
170
170
|
variant = "success",
|
|
171
|
-
render
|
|
171
|
+
render,
|
|
172
|
+
maxWidth
|
|
172
173
|
} = option || {};
|
|
173
174
|
if (toastManagerNode()) {
|
|
174
175
|
options.value = {
|
|
175
176
|
position
|
|
176
177
|
};
|
|
178
|
+
if (maxWidth) {
|
|
179
|
+
const toasterNode = document.querySelector("[data-sonner-toaster]");
|
|
180
|
+
if (toasterNode) {
|
|
181
|
+
toasterNode.style.setProperty("--width", maxWidth);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
177
184
|
import_vue_sonner.toast.custom((0, import_vue2.createVNode)(MpToast, {
|
|
178
185
|
"id": id,
|
|
179
186
|
"title": title,
|
|
180
187
|
"variant": variant,
|
|
181
188
|
"render": render
|
|
182
189
|
}, null), {
|
|
183
|
-
duration
|
|
190
|
+
duration,
|
|
191
|
+
...maxWidth && {
|
|
192
|
+
style: {
|
|
193
|
+
maxWidth,
|
|
194
|
+
width: maxWidth
|
|
195
|
+
}
|
|
196
|
+
}
|
|
184
197
|
});
|
|
185
198
|
}
|
|
186
199
|
},
|
package/dist/toast.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mekari/pixel3-toast",
|
|
3
3
|
"description": "Mekari Pixel 3 | Toast component is used to show dynamic notifications and alerts to user",
|
|
4
|
-
"version": "0.0.22-dev.
|
|
4
|
+
"version": "0.0.22-dev.1",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"vue-sonner": "^1.0.2",
|
|
12
|
-
"@mekari/pixel3-icon": "0.1.
|
|
12
|
+
"@mekari/pixel3-icon": "0.1.2-dev.0",
|
|
13
13
|
"@mekari/pixel3-utils": "0.1.0",
|
|
14
14
|
"@mekari/pixel3-styled-system": "0.2.0"
|
|
15
15
|
},
|