@gnireeg/accordion 0.1.6 → 0.1.8
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/dist/global.d.ts +42 -0
- package/dist/index.d.ts +0 -33
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -26
- package/dist/index.js.map +1 -1
- package/package.json +7 -2
package/dist/global.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Global TypeScript JSX type declarations
|
|
2
|
+
// This file is automatically loaded by TypeScript
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace JSX {
|
|
6
|
+
interface IntrinsicElements {
|
|
7
|
+
'accordion-item': {
|
|
8
|
+
// Custom accordion attributes
|
|
9
|
+
open?: boolean;
|
|
10
|
+
'animation-time'?: string;
|
|
11
|
+
'animation-easing'?: string;
|
|
12
|
+
|
|
13
|
+
// Custom event handlers
|
|
14
|
+
onAccordionOpened?: (event: CustomEvent<{ open: boolean }>) => void;
|
|
15
|
+
onAccordionClosed?: (event: CustomEvent<{ open: boolean }>) => void;
|
|
16
|
+
|
|
17
|
+
// Standard HTML attributes
|
|
18
|
+
class?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
style?: string | Record<string, any>;
|
|
22
|
+
children?: any;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
'accordion-group': {
|
|
27
|
+
// Custom accordion-group attributes
|
|
28
|
+
'allow-multiple-open'?: boolean;
|
|
29
|
+
|
|
30
|
+
// Standard HTML attributes
|
|
31
|
+
class?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
id?: string;
|
|
34
|
+
style?: string | Record<string, any>;
|
|
35
|
+
children?: any;
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,34 +1 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace JSX {
|
|
3
|
-
interface IntrinsicElements {
|
|
4
|
-
'accordion-item': {
|
|
5
|
-
open?: boolean;
|
|
6
|
-
'animation-time'?: string;
|
|
7
|
-
'animation-easing'?: string;
|
|
8
|
-
onAccordionOpened?: (event: CustomEvent<{
|
|
9
|
-
open: boolean;
|
|
10
|
-
}>) => void;
|
|
11
|
-
onAccordionClosed?: (event: CustomEvent<{
|
|
12
|
-
open: boolean;
|
|
13
|
-
}>) => void;
|
|
14
|
-
class?: string;
|
|
15
|
-
className?: string;
|
|
16
|
-
id?: string;
|
|
17
|
-
style?: string | Record<string, any>;
|
|
18
|
-
children?: any;
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
21
|
-
'accordion-group': {
|
|
22
|
-
'allow-multiple-open'?: boolean;
|
|
23
|
-
class?: string;
|
|
24
|
-
className?: string;
|
|
25
|
-
id?: string;
|
|
26
|
-
style?: string | Record<string, any>;
|
|
27
|
-
children?: any;
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export {};
|
|
34
1
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// SSR-safe: Only define and register components in browser environment
|
|
2
3
|
if (typeof window !== 'undefined' && typeof HTMLElement !== 'undefined') {
|
|
3
4
|
/**
|
|
@@ -8,8 +9,9 @@ if (typeof window !== 'undefined' && typeof HTMLElement !== 'undefined') {
|
|
|
8
9
|
* @attr {boolean} open - When present, the accordion starts in an expanded state
|
|
9
10
|
* @attr {string} animation-time - Animation duration in milliseconds (default: "300")
|
|
10
11
|
* @attr {string} animation-easing - CSS easing function (default: "ease")
|
|
12
|
+
* @attr {boolean} accordion-trigger - Applied to the element inside trigger-container that should toggle the accordion
|
|
11
13
|
*
|
|
12
|
-
* @slot trigger -
|
|
14
|
+
* @slot trigger-container - Container for the trigger element(s). Use accordion-trigger attribute to specify which element toggles the accordion
|
|
13
15
|
* @slot - Default slot for the accordion content
|
|
14
16
|
*
|
|
15
17
|
* @fires accordion-opened - Dispatched when the accordion opens (detail: { open: true })
|
|
@@ -20,16 +22,27 @@ if (typeof window !== 'undefined' && typeof HTMLElement !== 'undefined') {
|
|
|
20
22
|
*
|
|
21
23
|
* @example
|
|
22
24
|
* ```html
|
|
25
|
+
* <!-- Basic usage -->
|
|
23
26
|
* <accordion-item>
|
|
24
|
-
* <button slot="trigger">Click to expand</button>
|
|
27
|
+
* <button slot="trigger-container">Click to expand</button>
|
|
25
28
|
* <div>Your content here</div>
|
|
26
29
|
* </accordion-item>
|
|
27
30
|
*
|
|
28
31
|
* <!-- Start expanded with custom animation -->
|
|
29
32
|
* <accordion-item open animation-time="500" animation-easing="ease-in-out">
|
|
30
|
-
* <button slot="trigger">Already open</button>
|
|
33
|
+
* <button slot="trigger-container">Already open</button>
|
|
31
34
|
* <div>This content is visible by default</div>
|
|
32
35
|
* </accordion-item>
|
|
36
|
+
*
|
|
37
|
+
* <!-- Advanced: Selective trigger with multiple interactive elements -->
|
|
38
|
+
* <accordion-item>
|
|
39
|
+
* <div slot="trigger-container" class="flex gap-2">
|
|
40
|
+
* <button accordion-trigger class="flex-1">Expand details</button>
|
|
41
|
+
* <button onclick="edit()">Edit</button>
|
|
42
|
+
* <button onclick="delete()">Delete</button>
|
|
43
|
+
* </div>
|
|
44
|
+
* <div>Content - only the first button toggles the accordion</div>
|
|
45
|
+
* </accordion-item>
|
|
33
46
|
* ```
|
|
34
47
|
*
|
|
35
48
|
* @example
|
|
@@ -48,20 +61,18 @@ if (typeof window !== 'undefined' && typeof HTMLElement !== 'undefined') {
|
|
|
48
61
|
*
|
|
49
62
|
* @note Automatically adds ARIA attributes (aria-expanded) for accessibility
|
|
50
63
|
* @note Supports keyboard navigation (Enter/Space) for non-button triggers
|
|
64
|
+
* @note If no element with accordion-trigger attribute is found, the entire trigger-container will toggle the accordion
|
|
51
65
|
*/
|
|
52
66
|
class AccordionItem extends HTMLElement {
|
|
53
67
|
constructor() {
|
|
54
68
|
super();
|
|
55
|
-
this.
|
|
69
|
+
this.triggerContainerSlot = null;
|
|
56
70
|
this.triggerElement = null;
|
|
57
71
|
this.open = false;
|
|
58
72
|
this.setupTriggerAccessibility = () => {
|
|
59
|
-
if (!this.trigger)
|
|
60
|
-
return;
|
|
61
|
-
this.triggerElement = this.trigger.assignedElements()[0];
|
|
62
73
|
if (!this.triggerElement)
|
|
63
74
|
return;
|
|
64
|
-
// If the
|
|
75
|
+
// If the trigger element is not a button, add keyboard support
|
|
65
76
|
if (this.triggerElement.tagName !== 'BUTTON' && !this.triggerElement.hasAttribute('role')) {
|
|
66
77
|
this.triggerElement.setAttribute('role', 'button');
|
|
67
78
|
this.triggerElement.setAttribute('tabindex', '0');
|
|
@@ -123,12 +134,9 @@ if (typeof window !== 'undefined' && typeof HTMLElement !== 'undefined') {
|
|
|
123
134
|
}));
|
|
124
135
|
};
|
|
125
136
|
this.updateTriggerAccessibility = () => {
|
|
126
|
-
if (!this.
|
|
137
|
+
if (!this.triggerElement)
|
|
127
138
|
return;
|
|
128
|
-
|
|
129
|
-
if (triggerElement) {
|
|
130
|
-
triggerElement.setAttribute('aria-expanded', String(this.open));
|
|
131
|
-
}
|
|
139
|
+
this.triggerElement.setAttribute('aria-expanded', String(this.open));
|
|
132
140
|
};
|
|
133
141
|
// Initialize state from attribute
|
|
134
142
|
this.open = this.hasAttribute('open');
|
|
@@ -156,10 +164,10 @@ if (typeof window !== 'undefined' && typeof HTMLElement !== 'undefined') {
|
|
|
156
164
|
min-height: 0;
|
|
157
165
|
}
|
|
158
166
|
</style>
|
|
159
|
-
<slot name="trigger"></slot>
|
|
167
|
+
<slot name="trigger-container"></slot>
|
|
160
168
|
<div class="content-wrapper">
|
|
161
169
|
<div class="content-inner">
|
|
162
|
-
<slot
|
|
170
|
+
<slot></slot>
|
|
163
171
|
</div>
|
|
164
172
|
</div>
|
|
165
173
|
`;
|
|
@@ -185,22 +193,27 @@ if (typeof window !== 'undefined' && typeof HTMLElement !== 'undefined') {
|
|
|
185
193
|
}
|
|
186
194
|
}
|
|
187
195
|
connectedCallback() {
|
|
188
|
-
this.
|
|
189
|
-
if (this.
|
|
190
|
-
|
|
191
|
-
// Setup accessibility for trigger element
|
|
196
|
+
this.triggerContainerSlot = this.shadow.querySelector('slot[name="trigger-container"]');
|
|
197
|
+
if (this.triggerContainerSlot) {
|
|
198
|
+
// Find the element with accordion-trigger attribute
|
|
192
199
|
requestAnimationFrame(() => {
|
|
193
|
-
this.
|
|
194
|
-
|
|
200
|
+
this.triggerElement = this.querySelector('[accordion-trigger]');
|
|
201
|
+
// Fallback: if no [accordion-trigger] found, use the first slotted element
|
|
202
|
+
if (!this.triggerElement) {
|
|
203
|
+
this.triggerElement = this.triggerContainerSlot;
|
|
204
|
+
}
|
|
205
|
+
if (this.triggerElement) {
|
|
206
|
+
this.triggerElement.addEventListener('click', this.handleTriggerClick);
|
|
207
|
+
this.setupTriggerAccessibility();
|
|
208
|
+
this.updateTriggerAccessibility();
|
|
209
|
+
}
|
|
195
210
|
});
|
|
196
211
|
}
|
|
197
212
|
}
|
|
198
213
|
disconnectedCallback() {
|
|
199
|
-
|
|
200
|
-
this.trigger.removeEventListener('click', this.handleTriggerClick);
|
|
201
|
-
}
|
|
202
|
-
// Cleanup keyboard listener
|
|
214
|
+
// Cleanup click and keyboard listeners
|
|
203
215
|
if (this.triggerElement) {
|
|
216
|
+
this.triggerElement.removeEventListener('click', this.handleTriggerClick);
|
|
204
217
|
this.triggerElement.removeEventListener('keydown', this.handleKeydown);
|
|
205
218
|
}
|
|
206
219
|
}
|
|
@@ -305,5 +318,4 @@ if (typeof window !== 'undefined' && typeof HTMLElement !== 'undefined') {
|
|
|
305
318
|
customElements.define('accordion-item', AccordionItem);
|
|
306
319
|
customElements.define('accordion-group', AccordionGroup);
|
|
307
320
|
}
|
|
308
|
-
export {};
|
|
309
321
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE,CAAC;IAE1E
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE,CAAC;IAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6DG;IACH,MAAM,aAAc,SAAQ,WAAW;QASnC;YACI,KAAK,EAAE,CAAC;YAPJ,yBAAoB,GAA2B,IAAI,CAAC;YACpD,mBAAc,GAAuB,IAAI,CAAC;YAC3C,SAAI,GAAG,KAAK,CAAC;YA4FZ,8BAAyB,GAAG,GAAG,EAAE;gBACrC,IAAG,CAAC,IAAI,CAAC,cAAc;oBAAE,OAAO;gBAEhC,+DAA+D;gBAC/D,IAAG,IAAI,CAAC,cAAc,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;oBACvF,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;oBACnD,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,U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AAQ;gBAAE,OAAO;YACjC,QAAQ,IAAI,EAAE,CAAC;gBACX,KAAK,qBAAqB;oBACtB,MAAM,eAAe,GAAG,QAAQ,KAAK,IAAI,CAAC;oBAC1C,iEAAiE;oBACjE,IAAG,IAAI,CAAC,aAAa,KAAK,eAAe,EAAE,CAAC;wBACxC,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC;oBACzC,CAAC;oBACD,MAAM;gBACV;oBACI,MAAM;YACd,CAAC;QACL,CAAC;QAED,iBAAiB;YACb,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAA;QACzE,CAAC;QACD,oBAAoB;YAChB,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAA;QAC5E,CAAC;;IArCc,4BAAa,GAAG,KAAK,AAAR,CAAS;IAoDzC,2BAA2B;IAC3B,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;IACvD,cAAc,CAAC,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;AAEzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnireeg/accordion",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Accessible accordion web component with smooth animations, keyboard support, and nested accordion groups",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
"*": {
|
|
10
|
+
"*": ["dist/global.d.ts", "dist/index.d.ts"]
|
|
11
|
+
}
|
|
12
|
+
},
|
|
8
13
|
"exports": {
|
|
9
14
|
".": {
|
|
10
15
|
"types": "./dist/index.d.ts",
|
|
@@ -33,7 +38,7 @@
|
|
|
33
38
|
"directory": "packages/accordion"
|
|
34
39
|
},
|
|
35
40
|
"scripts": {
|
|
36
|
-
"build": "tsc",
|
|
41
|
+
"build": "tsc && node -e \"require('fs').copyFileSync('src/global.d.ts', 'dist/global.d.ts')\"",
|
|
37
42
|
"dev": "tsc --watch",
|
|
38
43
|
"prepublishOnly": "npm run build"
|
|
39
44
|
},
|