@y14e/disclosure-css 2.0.12 → 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-css
13
13
  import { Disclosure } from '@y14e/disclosure-css';
14
14
 
15
15
  // CDNs
16
- import { Disclosure } from 'https://esm.sh/@y14e/disclosure-css@2.0.12';
16
+ import { Disclosure } from 'https://esm.sh/@y14e/disclosure-css@2.1.0';
17
17
  // or
18
- import { Disclosure } from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@2.0.12/+esm';
18
+ import { Disclosure } from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@2.1.0/+esm';
19
19
  // or
20
- import { Disclosure } from 'https://esm.unpkg.com/@y14e/disclosure-css@2.0.12';
20
+ import { Disclosure } from 'https://esm.unpkg.com/@y14e/disclosure-css@2.1.0';
21
21
  ```
22
22
 
23
23
  ## Usage
@@ -780,7 +780,7 @@ var Disclosure = class _Disclosure {
780
780
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
781
781
  * Using the <details> and <summary> element.
782
782
  *
783
- * @version 2.0.11
783
+ * @version 2.1.0
784
784
  * @author Yusuke Kamiyamane
785
785
  * @license MIT
786
786
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -778,7 +778,7 @@ var Disclosure = class _Disclosure {
778
778
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
779
779
  * Using the <details> and <summary> element.
780
780
  *
781
- * @version 2.0.11
781
+ * @version 2.1.0
782
782
  * @author Yusuke Kamiyamane
783
783
  * @license MIT
784
784
  * @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 = {};
@@ -108,7 +88,7 @@ var Disclosure = class _Disclosure {
108
88
  this.#cleanupRovingTabIndex?.();
109
89
  this.#cleanupRovingTabIndex = null;
110
90
  this.#detailsElements.length = 0;
111
- utils__namespace.restoreAttributes(this.#summaryElements);
91
+ attributeUtils.restoreAttributes(this.#summaryElements);
112
92
  this.#summaryElements.length = 0;
113
93
  this.#contentElements.length = 0;
114
94
  this.#rootElement.removeAttribute("data-disclosure-initialized");
@@ -124,7 +104,7 @@ var Disclosure = class _Disclosure {
124
104
  this.#toggle(details, true);
125
105
  }
126
106
  #initialize() {
127
- utils__namespace.saveAttributes(this.#summaryElements, [
107
+ attributeUtils.saveAttributes(this.#summaryElements, [
128
108
  "aria-disabled",
129
109
  "style",
130
110
  "tabindex"
@@ -190,7 +170,7 @@ var Disclosure = class _Disclosure {
190
170
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
191
171
  * Using the <details> and <summary> element.
192
172
  *
193
- * @version 2.0.11
173
+ * @version 2.1.0
194
174
  * @author Yusuke Kamiyamane
195
175
  * @license MIT
196
176
  * @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.11
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.11
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
@@ -86,7 +86,7 @@ var Disclosure = class _Disclosure {
86
86
  this.#cleanupRovingTabIndex?.();
87
87
  this.#cleanupRovingTabIndex = null;
88
88
  this.#detailsElements.length = 0;
89
- utils.restoreAttributes(this.#summaryElements);
89
+ restoreAttributes(this.#summaryElements);
90
90
  this.#summaryElements.length = 0;
91
91
  this.#contentElements.length = 0;
92
92
  this.#rootElement.removeAttribute("data-disclosure-initialized");
@@ -102,7 +102,7 @@ var Disclosure = class _Disclosure {
102
102
  this.#toggle(details, true);
103
103
  }
104
104
  #initialize() {
105
- utils.saveAttributes(this.#summaryElements, [
105
+ saveAttributes(this.#summaryElements, [
106
106
  "aria-disabled",
107
107
  "style",
108
108
  "tabindex"
@@ -168,7 +168,7 @@ var Disclosure = class _Disclosure {
168
168
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
169
169
  * Using the <details> and <summary> element.
170
170
  *
171
- * @version 2.0.11
171
+ * @version 2.1.0
172
172
  * @author Yusuke Kamiyamane
173
173
  * @license MIT
174
174
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/disclosure-css",
3
- "version": "2.0.12",
3
+ "version": "2.1.0",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "keywords": [
6
6
  "a11y",