@y14e/disclosure 2.0.16 → 2.1.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/README.md CHANGED
@@ -13,11 +13,11 @@ npm i @y14e/disclosure
13
13
  import { Disclosure } from '@y14e/disclosure';
14
14
 
15
15
  // CDNs
16
- import { Disclosure } from 'https://esm.sh/@y14e/disclosure@2.0.16';
16
+ import { Disclosure } from 'https://esm.sh/@y14e/disclosure@2.1.0';
17
17
  // or
18
- import { Disclosure } from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure@2.0.16/+esm';
18
+ import { Disclosure } from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure@2.1.0/+esm';
19
19
  // or
20
- import { Disclosure } from 'https://esm.unpkg.com/@y14e/disclosure@2.0.16';
20
+ import { Disclosure } from 'https://esm.unpkg.com/@y14e/disclosure@2.1.0';
21
21
  ```
22
22
 
23
23
  ## Usage
@@ -917,7 +917,7 @@ function waitAnimationFinish(animation) {
917
917
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
918
918
  * Using the <details> and <summary> element.
919
919
  *
920
- * @version 2.0.16
920
+ * @version 2.1.0
921
921
  * @author Yusuke Kamiyamane
922
922
  * @license MIT
923
923
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -915,7 +915,7 @@ function waitAnimationFinish(animation) {
915
915
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
916
916
  * Using the <details> and <summary> element.
917
917
  *
918
- * @version 2.0.16
918
+ * @version 2.1.0
919
919
  * @author Yusuke Kamiyamane
920
920
  * @license MIT
921
921
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.cjs CHANGED
@@ -1,28 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var utils = require('@y14e/attribute-utils');
3
+ var attributeUtils = require('@y14e/attribute-utils');
4
4
  var rovingTabindex = require('@y14e/roving-tabindex');
5
5
 
6
- function _interopNamespace(e) {
7
- if (e && e.__esModule) return e;
8
- var n = Object.create(null);
9
- if (e) {
10
- Object.keys(e).forEach(function (k) {
11
- if (k !== 'default') {
12
- var d = Object.getOwnPropertyDescriptor(e, k);
13
- Object.defineProperty(n, k, d.get ? d : {
14
- enumerable: true,
15
- get: function () { return e[k]; }
16
- });
17
- }
18
- });
19
- }
20
- n.default = e;
21
- return Object.freeze(n);
22
- }
23
-
24
- var utils__namespace = /*#__PURE__*/_interopNamespace(utils);
25
-
26
6
  // src/index.ts
27
7
  var Disclosure = class _Disclosure {
28
8
  static defaults = {};
@@ -133,7 +113,7 @@ var Disclosure = class _Disclosure {
133
113
  }
134
114
  }
135
115
  this.#detailsElements.length = 0;
136
- utils__namespace.restoreAttributes(this.#summaryElements);
116
+ attributeUtils.restoreAttributes(this.#summaryElements);
137
117
  this.#summaryElements.length = 0;
138
118
  this.#contentElements.length = 0;
139
119
  this.#rootElement.removeAttribute("data-disclosure-initialized");
@@ -149,7 +129,7 @@ var Disclosure = class _Disclosure {
149
129
  this.#toggle(details, true);
150
130
  }
151
131
  #initialize() {
152
- utils__namespace.saveAttributes(this.#summaryElements, [
132
+ attributeUtils.saveAttributes(this.#summaryElements, [
153
133
  "aria-disabled",
154
134
  "style",
155
135
  "tabindex"
@@ -327,7 +307,7 @@ function waitAnimationFinish(animation) {
327
307
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
328
308
  * Using the <details> and <summary> element.
329
309
  *
330
- * @version 2.0.16
310
+ * @version 2.1.0
331
311
  * @author Yusuke Kamiyamane
332
312
  * @license MIT
333
313
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 2.0.16
6
+ * @version 2.1.0
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 2.0.16
6
+ * @version 2.1.0
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import * as utils from '@y14e/attribute-utils';
1
+ import { restoreAttributes, saveAttributes } from '@y14e/attribute-utils';
2
2
  import { createRovingTabIndex } from '@y14e/roving-tabindex';
3
3
 
4
4
  // src/index.ts
@@ -111,7 +111,7 @@ var Disclosure = class _Disclosure {
111
111
  }
112
112
  }
113
113
  this.#detailsElements.length = 0;
114
- utils.restoreAttributes(this.#summaryElements);
114
+ restoreAttributes(this.#summaryElements);
115
115
  this.#summaryElements.length = 0;
116
116
  this.#contentElements.length = 0;
117
117
  this.#rootElement.removeAttribute("data-disclosure-initialized");
@@ -127,7 +127,7 @@ var Disclosure = class _Disclosure {
127
127
  this.#toggle(details, true);
128
128
  }
129
129
  #initialize() {
130
- utils.saveAttributes(this.#summaryElements, [
130
+ saveAttributes(this.#summaryElements, [
131
131
  "aria-disabled",
132
132
  "style",
133
133
  "tabindex"
@@ -305,7 +305,7 @@ function waitAnimationFinish(animation) {
305
305
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
306
306
  * Using the <details> and <summary> element.
307
307
  *
308
- * @version 2.0.16
308
+ * @version 2.1.0
309
309
  * @author Yusuke Kamiyamane
310
310
  * @license MIT
311
311
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/disclosure",
3
- "version": "2.0.16",
3
+ "version": "2.1.0",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "keywords": [
6
6
  "a11y",