drab 6.4.0 → 6.4.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.
@@ -29,7 +29,7 @@ export class Copy extends Base {
29
29
  * @param value The `value` to copy
30
30
  */
31
31
  copy(value = this.value) {
32
- this.announce(`copied ${value} to clipboard`);
32
+ this.announce("copied text to clipboard");
33
33
  this.swapContent();
34
34
  return navigator.clipboard.writeText(value);
35
35
  }
@@ -23,9 +23,9 @@ export declare class Dialog extends Base {
23
23
  constructor();
24
24
  /** The `HTMLDialogElement` within the element. */
25
25
  get dialog(): HTMLDialogElement;
26
- /** `HTMLDialogElement.showModal()` with animation. */
26
+ /** Wraps `HTMLDialogElement.showModal()`. */
27
27
  show(): void;
28
- /** `HTMLDialogElement.close()` with animation. */
28
+ /** Wraps `HTMLDialogElement.close()`. */
29
29
  close(): void;
30
30
  /** `show` or `close` depending on the dialog's `open` attribute. */
31
31
  toggle(): void;
@@ -15,7 +15,6 @@ import { Base } from "../base/index.js";
15
15
  * is open.
16
16
  */
17
17
  export class Dialog extends Base {
18
- /** The initial margin-right value of the body element. */
19
18
  #initialBodyMarginRight = parseInt(getComputedStyle(document.body).marginRight);
20
19
  constructor() {
21
20
  super();
@@ -36,12 +35,12 @@ export class Dialog extends Base {
36
35
  document.body.style.overflow = show ? "hidden" : "";
37
36
  }
38
37
  }
39
- /** `HTMLDialogElement.showModal()` with animation. */
38
+ /** Wraps `HTMLDialogElement.showModal()`. */
40
39
  show() {
41
40
  this.dialog.showModal();
42
41
  this.#toggleBodyScroll(true);
43
42
  }
44
- /** `HTMLDialogElement.close()` with animation. */
43
+ /** Wraps `HTMLDialogElement.close()`. */
45
44
  close() {
46
45
  this.#toggleBodyScroll(false);
47
46
  this.dialog.close();
@@ -57,7 +56,6 @@ export class Dialog extends Base {
57
56
  this.triggerListener(() => this.toggle());
58
57
  this.safeListener("keydown", (e) => {
59
58
  if (e.key === "Escape" && this.dialog.open) {
60
- // to execute animation
61
59
  e.preventDefault();
62
60
  this.close();
63
61
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "drab",
3
3
  "description": "Interactivity for You",
4
- "version": "6.4.0",
4
+ "version": "6.4.1",
5
5
  "homepage": "https://drab.robino.dev",
6
6
  "license": "MIT",
7
7
  "author": {