@y14e/disclosure-css 2.0.6 → 2.0.7
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 +3 -3
- package/dist/index.bundle.cjs +8 -8
- package/dist/index.bundle.js +8 -8
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
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.
|
|
16
|
+
import { Disclosure } from "https://esm.sh/@y14e/disclosure-css@2.0.7";
|
|
17
17
|
// or
|
|
18
|
-
import { Disclosure } from "https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@2.0.
|
|
18
|
+
import { Disclosure } from "https://cdn.jsdelivr.net/npm/@y14e/disclosure-css@2.0.7/+esm";
|
|
19
19
|
// or
|
|
20
|
-
import { Disclosure } from "https://esm.unpkg.com/@y14e/disclosure-css@2.0.
|
|
20
|
+
import { Disclosure } from "https://esm.unpkg.com/@y14e/disclosure-css@2.0.7";
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
package/dist/index.bundle.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// node_modules/@y14e/attribute-
|
|
3
|
+
// node_modules/@y14e/attribute-utils/dist/index.js
|
|
4
4
|
var DEFAULT_PARSER = (value) => value.split(/\s+/);
|
|
5
5
|
var DEFAULT_SERIALIZER = (tokens) => tokens.join(" ");
|
|
6
6
|
function addAttributeToken(element, name, token, options = {}) {
|
|
@@ -748,7 +748,7 @@ var Disclosure = class _Disclosure {
|
|
|
748
748
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
749
749
|
* Using the <details> and <summary> element.
|
|
750
750
|
*
|
|
751
|
-
* @version 2.0.
|
|
751
|
+
* @version 2.0.7
|
|
752
752
|
* @author Yusuke Kamiyamane
|
|
753
753
|
* @license MIT
|
|
754
754
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
@@ -756,15 +756,15 @@ var Disclosure = class _Disclosure {
|
|
|
756
756
|
*/
|
|
757
757
|
/*! Bundled license information:
|
|
758
758
|
|
|
759
|
-
@y14e/attribute-
|
|
759
|
+
@y14e/attribute-utils/dist/index.js:
|
|
760
760
|
(**
|
|
761
|
-
* Attribute
|
|
761
|
+
* Attribute Utils
|
|
762
762
|
*
|
|
763
|
-
* @version 2.0.
|
|
763
|
+
* @version 2.0.5
|
|
764
764
|
* @author Yusuke Kamiyamane
|
|
765
765
|
* @license MIT
|
|
766
766
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
767
|
-
* @see {@link https://github.com/y14e/attribute-
|
|
767
|
+
* @see {@link https://github.com/y14e/attribute-utils}
|
|
768
768
|
*)
|
|
769
769
|
|
|
770
770
|
power-focusable/dist/index.js:
|
|
@@ -773,7 +773,7 @@ power-focusable/dist/index.js:
|
|
|
773
773
|
* High-precision focus management utility with full composed tree support.
|
|
774
774
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
775
775
|
*
|
|
776
|
-
* @version 4.3.
|
|
776
|
+
* @version 4.3.26
|
|
777
777
|
* @author Yusuke Kamiyamane
|
|
778
778
|
* @license MIT
|
|
779
779
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
@@ -786,7 +786,7 @@ power-focusable/dist/index.js:
|
|
|
786
786
|
* Lightweight roving tabindex utility with fully focus management.
|
|
787
787
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
788
788
|
*
|
|
789
|
-
* @version 3.1.
|
|
789
|
+
* @version 3.1.23
|
|
790
790
|
* @author Yusuke Kamiyamane
|
|
791
791
|
* @license MIT
|
|
792
792
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/@y14e/attribute-
|
|
1
|
+
// node_modules/@y14e/attribute-utils/dist/index.js
|
|
2
2
|
var DEFAULT_PARSER = (value) => value.split(/\s+/);
|
|
3
3
|
var DEFAULT_SERIALIZER = (tokens) => tokens.join(" ");
|
|
4
4
|
function addAttributeToken(element, name, token, options = {}) {
|
|
@@ -746,7 +746,7 @@ var Disclosure = class _Disclosure {
|
|
|
746
746
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
747
747
|
* Using the <details> and <summary> element.
|
|
748
748
|
*
|
|
749
|
-
* @version 2.0.
|
|
749
|
+
* @version 2.0.7
|
|
750
750
|
* @author Yusuke Kamiyamane
|
|
751
751
|
* @license MIT
|
|
752
752
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
@@ -754,15 +754,15 @@ var Disclosure = class _Disclosure {
|
|
|
754
754
|
*/
|
|
755
755
|
/*! Bundled license information:
|
|
756
756
|
|
|
757
|
-
@y14e/attribute-
|
|
757
|
+
@y14e/attribute-utils/dist/index.js:
|
|
758
758
|
(**
|
|
759
|
-
* Attribute
|
|
759
|
+
* Attribute Utils
|
|
760
760
|
*
|
|
761
|
-
* @version 2.0.
|
|
761
|
+
* @version 2.0.5
|
|
762
762
|
* @author Yusuke Kamiyamane
|
|
763
763
|
* @license MIT
|
|
764
764
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
765
|
-
* @see {@link https://github.com/y14e/attribute-
|
|
765
|
+
* @see {@link https://github.com/y14e/attribute-utils}
|
|
766
766
|
*)
|
|
767
767
|
|
|
768
768
|
power-focusable/dist/index.js:
|
|
@@ -771,7 +771,7 @@ power-focusable/dist/index.js:
|
|
|
771
771
|
* High-precision focus management utility with full composed tree support.
|
|
772
772
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
773
773
|
*
|
|
774
|
-
* @version 4.3.
|
|
774
|
+
* @version 4.3.26
|
|
775
775
|
* @author Yusuke Kamiyamane
|
|
776
776
|
* @license MIT
|
|
777
777
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
@@ -784,7 +784,7 @@ power-focusable/dist/index.js:
|
|
|
784
784
|
* Lightweight roving tabindex utility with fully focus management.
|
|
785
785
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
786
786
|
*
|
|
787
|
-
* @version 3.1.
|
|
787
|
+
* @version 3.1.23
|
|
788
788
|
* @author Yusuke Kamiyamane
|
|
789
789
|
* @license MIT
|
|
790
790
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var utils = require('@y14e/attribute-utils');
|
|
4
4
|
var rovingTabindex = require('@y14e/roving-tabindex');
|
|
5
5
|
|
|
6
6
|
function _interopNamespace(e) {
|
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
return Object.freeze(n);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var utils__namespace = /*#__PURE__*/_interopNamespace(utils);
|
|
25
25
|
|
|
26
26
|
// src/index.ts
|
|
27
27
|
var Disclosure = class _Disclosure {
|
|
@@ -108,7 +108,7 @@ var Disclosure = class _Disclosure {
|
|
|
108
108
|
this.#cleanupRovingTabIndex?.();
|
|
109
109
|
this.#cleanupRovingTabIndex = null;
|
|
110
110
|
this.#detailsElements.length = 0;
|
|
111
|
-
|
|
111
|
+
utils__namespace.restoreAttributes(this.#summaryElements);
|
|
112
112
|
this.#summaryElements.length = 0;
|
|
113
113
|
this.#contentElements.length = 0;
|
|
114
114
|
this.#rootElement.removeAttribute("data-disclosure-initialized");
|
|
@@ -124,7 +124,7 @@ var Disclosure = class _Disclosure {
|
|
|
124
124
|
this.#toggle(details, true);
|
|
125
125
|
}
|
|
126
126
|
#initialize() {
|
|
127
|
-
|
|
127
|
+
utils__namespace.saveAttributes(this.#summaryElements, [
|
|
128
128
|
"aria-disabled",
|
|
129
129
|
"style",
|
|
130
130
|
"tabindex"
|
|
@@ -184,7 +184,7 @@ var Disclosure = class _Disclosure {
|
|
|
184
184
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
185
185
|
* Using the <details> and <summary> element.
|
|
186
186
|
*
|
|
187
|
-
* @version 2.0.
|
|
187
|
+
* @version 2.0.7
|
|
188
188
|
* @author Yusuke Kamiyamane
|
|
189
189
|
* @license MIT
|
|
190
190
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as utils 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
|
-
|
|
89
|
+
utils.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
|
-
|
|
105
|
+
utils.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.
|
|
165
|
+
* @version 2.0.7
|
|
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
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"esbuild": true
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@y14e/attribute-
|
|
58
|
-
"@y14e/roving-tabindex": "^3.1.
|
|
57
|
+
"@y14e/attribute-utils": "^2.0.5",
|
|
58
|
+
"@y14e/roving-tabindex": "^3.1.23"
|
|
59
59
|
}
|
|
60
60
|
}
|