@y14e/disclosure-css 2.0.3 → 2.0.4

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.3";
16
+ import Disclosure from "https://esm.sh/@y14e/disclosure-css@2.0.4";
17
17
  // or
18
- import Disclosure from "https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@2.0.3/+esm";
18
+ import Disclosure from "https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@2.0.4/+esm";
19
19
  // or
20
- import Disclosure from "https://esm.unpkg.com/@y14e/disclosure-css@2.0.3";
20
+ import Disclosure from "https://esm.unpkg.com/@y14e/disclosure-css@2.0.4";
21
21
  ```
22
22
 
23
23
  ## Usage
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- // node_modules/@y14e/attributes-utils/dist/index.js
3
+ // node_modules/@y14e/attribute-util/dist/index.js
4
4
  var snapshots = /* @__PURE__ */ new WeakMap();
5
5
  function restoreAttributes(element_or_elements) {
6
6
  for (const element of Array.isArray(element_or_elements) ? element_or_elements : [element_or_elements]) {
@@ -28,7 +28,7 @@ function saveAttributes(element_or_elements, name_or_names) {
28
28
  });
29
29
  }
30
30
 
31
- // node_modules/@y14e/roving-tabindex/node_modules/@y14e/attributes-utils/dist/index.js
31
+ // node_modules/@y14e/attributes-utils/dist/index.js
32
32
  var DEFAULT_PARSER = (value) => value.split(/\s+/);
33
33
  var DEFAULT_SERIALIZER = (tokens) => tokens.join(" ");
34
34
  function addTokenToAttribute(element, name, token, options = {}) {
@@ -776,7 +776,7 @@ var Disclosure = class _Disclosure {
776
776
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
777
777
  * Using the <details> and <summary> element.
778
778
  *
779
- * @version 2.0.3
779
+ * @version 2.0.4
780
780
  * @author Yusuke Kamiyamane
781
781
  * @license MIT
782
782
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -784,15 +784,15 @@ var Disclosure = class _Disclosure {
784
784
  */
785
785
  /*! Bundled license information:
786
786
 
787
- @y14e/attributes-utils/dist/index.js:
787
+ @y14e/attribute-util/dist/index.js:
788
788
  (**
789
- * Attributes Utils
789
+ * Attribute Util
790
790
  *
791
791
  * @version 2.0.0
792
792
  * @author Yusuke Kamiyamane
793
793
  * @license MIT
794
794
  * @copyright Copyright (c) Yusuke Kamiyamane
795
- * @see {@link https://github.com/y14e/attributes-utils}
795
+ * @see {@link https://github.com/y14e/attribute-util}
796
796
  *)
797
797
 
798
798
  @y14e/attributes-utils/dist/index.js:
@@ -1,4 +1,4 @@
1
- // node_modules/@y14e/attributes-utils/dist/index.js
1
+ // node_modules/@y14e/attribute-util/dist/index.js
2
2
  var snapshots = /* @__PURE__ */ new WeakMap();
3
3
  function restoreAttributes(element_or_elements) {
4
4
  for (const element of Array.isArray(element_or_elements) ? element_or_elements : [element_or_elements]) {
@@ -26,7 +26,7 @@ function saveAttributes(element_or_elements, name_or_names) {
26
26
  });
27
27
  }
28
28
 
29
- // node_modules/@y14e/roving-tabindex/node_modules/@y14e/attributes-utils/dist/index.js
29
+ // node_modules/@y14e/attributes-utils/dist/index.js
30
30
  var DEFAULT_PARSER = (value) => value.split(/\s+/);
31
31
  var DEFAULT_SERIALIZER = (tokens) => tokens.join(" ");
32
32
  function addTokenToAttribute(element, name, token, options = {}) {
@@ -774,7 +774,7 @@ var Disclosure = class _Disclosure {
774
774
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
775
775
  * Using the <details> and <summary> element.
776
776
  *
777
- * @version 2.0.3
777
+ * @version 2.0.4
778
778
  * @author Yusuke Kamiyamane
779
779
  * @license MIT
780
780
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -782,15 +782,15 @@ var Disclosure = class _Disclosure {
782
782
  */
783
783
  /*! Bundled license information:
784
784
 
785
- @y14e/attributes-utils/dist/index.js:
785
+ @y14e/attribute-util/dist/index.js:
786
786
  (**
787
- * Attributes Utils
787
+ * Attribute Util
788
788
  *
789
789
  * @version 2.0.0
790
790
  * @author Yusuke Kamiyamane
791
791
  * @license MIT
792
792
  * @copyright Copyright (c) Yusuke Kamiyamane
793
- * @see {@link https://github.com/y14e/attributes-utils}
793
+ * @see {@link https://github.com/y14e/attribute-util}
794
794
  *)
795
795
 
796
796
  @y14e/attributes-utils/dist/index.js:
package/dist/index.cjs CHANGED
@@ -1,8 +1,28 @@
1
1
  'use strict';
2
2
 
3
- var attributesUtils = require('@y14e/attributes-utils');
3
+ var util = require('@y14e/attribute-util');
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 util__namespace = /*#__PURE__*/_interopNamespace(util);
25
+
6
26
  // src/index.ts
7
27
  var Disclosure = class _Disclosure {
8
28
  static defaults = {};
@@ -88,7 +108,7 @@ var Disclosure = class _Disclosure {
88
108
  this.#cleanupRovingTabIndex?.();
89
109
  this.#cleanupRovingTabIndex = null;
90
110
  this.#detailsElements.length = 0;
91
- attributesUtils.restoreAttributes(this.#summaryElements);
111
+ util__namespace.restoreAttributes(this.#summaryElements);
92
112
  this.#summaryElements.length = 0;
93
113
  this.#contentElements.length = 0;
94
114
  this.#rootElement.removeAttribute("data-disclosure-initialized");
@@ -104,7 +124,7 @@ var Disclosure = class _Disclosure {
104
124
  this.#toggle(details, true);
105
125
  }
106
126
  #initialize() {
107
- attributesUtils.saveAttributes(this.#summaryElements, [
127
+ util__namespace.saveAttributes(this.#summaryElements, [
108
128
  "aria-disabled",
109
129
  "style",
110
130
  "tabindex"
@@ -164,7 +184,7 @@ var Disclosure = class _Disclosure {
164
184
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
165
185
  * Using the <details> and <summary> element.
166
186
  *
167
- * @version 2.0.3
187
+ * @version 2.0.4
168
188
  * @author Yusuke Kamiyamane
169
189
  * @license MIT
170
190
  * @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.3
6
+ * @version 2.0.4
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.3
6
+ * @version 2.0.4
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 { restoreAttributes, saveAttributes } from '@y14e/attributes-utils';
1
+ import * as util from '@y14e/attribute-util';
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
- restoreAttributes(this.#summaryElements);
89
+ util.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
- saveAttributes(this.#summaryElements, [
105
+ util.saveAttributes(this.#summaryElements, [
106
106
  "aria-disabled",
107
107
  "style",
108
108
  "tabindex"
@@ -162,7 +162,7 @@ var Disclosure = class _Disclosure {
162
162
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
163
163
  * Using the <details> and <summary> element.
164
164
  *
165
- * @version 2.0.3
165
+ * @version 2.0.4
166
166
  * @author Yusuke Kamiyamane
167
167
  * @license MIT
168
168
  * @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.3",
3
+ "version": "2.0.4",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -51,7 +51,7 @@
51
51
  "node": ">=18"
52
52
  },
53
53
  "dependencies": {
54
- "@y14e/attributes-utils": "^2.0.0",
54
+ "@y14e/attribute-util": "^2.0.0",
55
55
  "@y14e/roving-tabindex": "^3.1.20"
56
56
  }
57
57
  }