native-document 1.0.255 → 1.0.256

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-document",
3
- "version": "1.0.255",
3
+ "version": "1.0.256",
4
4
  "description": "A reactive JavaScript framework that preserves native DOM simplicity without sacrificing modern features",
5
5
  "author": "AfroCodeur <https://github.com/afrocodeur>",
6
6
  "license": "MIT",
@@ -46,6 +46,8 @@ export default function Toast(content, props = {}) {
46
46
  props,
47
47
  };
48
48
  this.aria = { 'role': 'status', 'aria-live': 'polite' };
49
+
50
+ queueMicrotask(() => this.show());
49
51
  }
50
52
 
51
53
  BaseComponent.extends(Toast);
@@ -260,4 +262,9 @@ Toast.prototype.onClose = function(handler) {
260
262
  return this;
261
263
  };
262
264
 
265
+ Toast.error = (content, props = {}) => Toast(content, props).error();
266
+ Toast.success = (content, props = {}) => Toast(content, props).success();
267
+ Toast.warning = (content, props = {}) => Toast(content, props).warning();
268
+ Toast.info = (content, props = {}) => Toast(content, props).info();
269
+
263
270
  Toast.prototype.show = BaseComponent.prototype.toNdElement;
@@ -1,7 +1,7 @@
1
1
  :root {
2
2
  --drawer-z-index: 1000;
3
3
  --drawer-background-color: white;
4
- --drawer-width: 400px;
4
+ --drawer-width: 500px;
5
5
  --drawer-backdrop-color: rgba(0, 0, 0, var(--opacity-backdrop));
6
6
  --drawer-panel-backdrop-color: hsl(from var(--gray-lite-1) h s l / .5);
7
7
  --drawer-panel-shadow: 0 0 20px rgba(0, 0, 0, 0.2);