@rcarls/rc-accordion 0.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 +3 -0
- package/dist/custom-elements.json +112 -0
- package/dist/demo.css +85 -0
- package/dist/demo.js +40 -0
- package/dist/rc-accordion-define.js +4 -0
- package/dist/rc-accordion-define.js.map +1 -0
- package/dist/rc-accordion.js +50 -0
- package/dist/rc-accordion.js.map +1 -0
- package/dist/types/packages/rc-accordion/src/define.d.ts +0 -0
- package/dist/types/packages/rc-accordion/src/index.d.ts +1 -0
- package/dist/types/packages/rc-accordion/src/rc-accordion.d.ts +22 -0
- package/dist/types/packages/rc-accordion/src/rc-accordion.test.d.ts +0 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/define.ts",
|
|
8
|
+
"declarations": [],
|
|
9
|
+
"exports": [
|
|
10
|
+
{
|
|
11
|
+
"kind": "custom-element-definition",
|
|
12
|
+
"name": "rc-accordion",
|
|
13
|
+
"declaration": {
|
|
14
|
+
"name": "RCAccordion",
|
|
15
|
+
"module": "/src/index.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"kind": "javascript-module",
|
|
22
|
+
"path": "src/index.ts",
|
|
23
|
+
"declarations": [],
|
|
24
|
+
"exports": [
|
|
25
|
+
{
|
|
26
|
+
"kind": "js",
|
|
27
|
+
"name": "*",
|
|
28
|
+
"declaration": {
|
|
29
|
+
"name": "*",
|
|
30
|
+
"module": "src/rc-accordion.js"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"kind": "javascript-module",
|
|
37
|
+
"path": "src/rc-accordion.ts",
|
|
38
|
+
"declarations": [
|
|
39
|
+
{
|
|
40
|
+
"kind": "class",
|
|
41
|
+
"description": "Coordinates direct child disclosures so only one stays open at a time.\n\nChild disclosures remain light-DOM behavioral wrappers around native\n`<details>` elements. The accordion only adds group behavior and optional\narrow-key navigation between summaries.",
|
|
42
|
+
"name": "RCAccordion",
|
|
43
|
+
"members": [
|
|
44
|
+
{
|
|
45
|
+
"kind": "method",
|
|
46
|
+
"name": "_details",
|
|
47
|
+
"privacy": "private",
|
|
48
|
+
"return": {
|
|
49
|
+
"type": {
|
|
50
|
+
"text": "HTMLDetailsElement[]"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"kind": "method",
|
|
56
|
+
"name": "_summaries",
|
|
57
|
+
"privacy": "private",
|
|
58
|
+
"return": {
|
|
59
|
+
"type": {
|
|
60
|
+
"text": "HTMLElement[]"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"kind": "method",
|
|
66
|
+
"name": "_syncNativeGroupNames",
|
|
67
|
+
"privacy": "private",
|
|
68
|
+
"return": {
|
|
69
|
+
"type": {
|
|
70
|
+
"text": "void"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"kind": "field",
|
|
76
|
+
"name": "_onKeydown",
|
|
77
|
+
"privacy": "private"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"kind": "field",
|
|
81
|
+
"name": "_onDisclosureToggle",
|
|
82
|
+
"privacy": "private"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"superclass": {
|
|
86
|
+
"name": "HTMLElement"
|
|
87
|
+
},
|
|
88
|
+
"tagName": "rc-accordion",
|
|
89
|
+
"customElement": true
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"exports": [
|
|
93
|
+
{
|
|
94
|
+
"kind": "js",
|
|
95
|
+
"name": "RCAccordion",
|
|
96
|
+
"declaration": {
|
|
97
|
+
"name": "RCAccordion",
|
|
98
|
+
"module": "src/rc-accordion.ts"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"kind": "js",
|
|
103
|
+
"name": "default",
|
|
104
|
+
"declaration": {
|
|
105
|
+
"name": "RCAccordion",
|
|
106
|
+
"module": "src/rc-accordion.ts"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
package/dist/demo.css
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
*, *::before, *::after {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
--rc-accent: Highlight; /* Chrome doesn't support AccentColor on the open web */
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@supports (color: AccentColor) {
|
|
11
|
+
:root {
|
|
12
|
+
--rc-accent: AccentColor;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[data-theme="light"] { color-scheme: light; }
|
|
17
|
+
[data-theme="dark"] { color-scheme: dark; }
|
|
18
|
+
|
|
19
|
+
[data-theme="solarized-light"] {
|
|
20
|
+
color-scheme: light;
|
|
21
|
+
--rc-surface: #fdf6e3;
|
|
22
|
+
--rc-text: #657b83;
|
|
23
|
+
--rc-border: 1px solid #93a1a1;
|
|
24
|
+
--rc-shadow: 0 2px 8px rgba(0, 0, 0, .12);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[data-theme="solarized-dark"] {
|
|
28
|
+
color-scheme: dark;
|
|
29
|
+
--rc-surface: #002b36;
|
|
30
|
+
--rc-text: #839496;
|
|
31
|
+
--rc-border: 1px solid #586e75;
|
|
32
|
+
--rc-shadow: 0 2px 8px rgba(0, 0, 0, .3);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body {
|
|
36
|
+
font-family: system-ui, sans-serif;
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.demo-page {
|
|
41
|
+
max-width: 60rem;
|
|
42
|
+
margin: 0 auto;
|
|
43
|
+
padding: 2rem 1.5rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.demo-controls {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 1rem;
|
|
50
|
+
margin-bottom: 2rem;
|
|
51
|
+
padding-bottom: 1rem;
|
|
52
|
+
border-bottom: 1px solid ButtonBorder;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.demo-controls .demo-title {
|
|
56
|
+
flex: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.demo-controls h1 {
|
|
60
|
+
margin: 0 0 0.15rem;
|
|
61
|
+
font-size: 1.5rem;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.demo-controls a {
|
|
65
|
+
font-size: 0.8rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.demo-section {
|
|
69
|
+
margin-bottom: 2rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.demo-section h2 {
|
|
73
|
+
margin: 0 0 0.5rem;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.theme-picker {
|
|
77
|
+
padding: 0.35em 0.75em;
|
|
78
|
+
font-family: inherit;
|
|
79
|
+
font-size: 0.8rem;
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
border: 1px solid ButtonBorder;
|
|
82
|
+
border-radius: 4px;
|
|
83
|
+
background: Canvas;
|
|
84
|
+
color: CanvasText;
|
|
85
|
+
}
|
package/dist/demo.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const THEMES = ['', 'light', 'dark', 'solarized-light', 'solarized-dark'];
|
|
2
|
+
const LABELS = ['Auto', 'Light', 'Dark', 'Solarized ☀', 'Solarized ☾'];
|
|
3
|
+
|
|
4
|
+
const stored = localStorage.getItem('rc-demo-theme') ?? '';
|
|
5
|
+
applyTheme(stored);
|
|
6
|
+
|
|
7
|
+
function applyTheme(theme) {
|
|
8
|
+
if (theme) {
|
|
9
|
+
document.documentElement.dataset.theme = theme;
|
|
10
|
+
} else {
|
|
11
|
+
delete document.documentElement.dataset.theme;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function currentIndex() {
|
|
16
|
+
const current = document.documentElement.dataset.theme ?? '';
|
|
17
|
+
const idx = THEMES.indexOf(current);
|
|
18
|
+
return idx === -1 ? 0 : idx;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function updateButtons() {
|
|
22
|
+
const label = LABELS[currentIndex()];
|
|
23
|
+
document.querySelectorAll('.theme-picker').forEach((btn) => {
|
|
24
|
+
btn.textContent = label;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
window.cycleTheme = function () {
|
|
29
|
+
const next = THEMES[(currentIndex() + 1) % THEMES.length];
|
|
30
|
+
applyTheme(next);
|
|
31
|
+
localStorage.setItem('rc-demo-theme', next);
|
|
32
|
+
updateButtons();
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
36
|
+
updateButtons();
|
|
37
|
+
document.querySelectorAll('.theme-picker').forEach((btn) => {
|
|
38
|
+
btn.addEventListener('click', window.cycleTheme);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-accordion-define.js","sources":["../src/define.ts"],"sourcesContent":["import '@rcarls/rc-disclosure/define';\n\nimport { RCAccordion } from './index.js';\n\ncustomElements.get('rc-accordion') || customElements.define('rc-accordion', RCAccordion);\n"],"names":["RCAccordion"],"mappings":";;AAIA,eAAe,IAAI,cAAc,KAAK,eAAe,OAAO,gBAAgBA,CAAW;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
class i extends HTMLElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
super(...arguments), this._onKeydown = (e) => {
|
|
4
|
+
if (e.altKey || e.ctrlKey || e.metaKey || e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "Home" && e.key !== "End") return;
|
|
5
|
+
const t = this._summaries();
|
|
6
|
+
if (t.length === 0) return;
|
|
7
|
+
const s = document.activeElement, r = s ? t.indexOf(s) : -1;
|
|
8
|
+
if (r === -1) return;
|
|
9
|
+
if (e.preventDefault(), e.key === "Home") {
|
|
10
|
+
t[0].focus();
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (e.key === "End") {
|
|
14
|
+
t[t.length - 1].focus();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const n = e.key === "ArrowDown" ? (r + 1) % t.length : (r - 1 + t.length) % t.length;
|
|
18
|
+
t[n].focus();
|
|
19
|
+
}, this._onDisclosureToggle = (e) => {
|
|
20
|
+
if (!e.detail.open) return;
|
|
21
|
+
const t = e.target;
|
|
22
|
+
for (const s of this.querySelectorAll(":scope > rc-disclosure"))
|
|
23
|
+
s !== t && (s.open = !1);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
this.addEventListener("rc-disclosure-toggle", this._onDisclosureToggle), this.addEventListener("keydown", this._onKeydown), this._syncNativeGroupNames();
|
|
28
|
+
}
|
|
29
|
+
disconnectedCallback() {
|
|
30
|
+
this.removeEventListener("rc-disclosure-toggle", this._onDisclosureToggle), this.removeEventListener("keydown", this._onKeydown);
|
|
31
|
+
}
|
|
32
|
+
_details() {
|
|
33
|
+
return Array.from(
|
|
34
|
+
this.querySelectorAll(":scope > rc-disclosure > details")
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
_summaries() {
|
|
38
|
+
return this._details().map((e) => e.querySelector(":scope > summary")).filter((e) => e !== null);
|
|
39
|
+
}
|
|
40
|
+
_syncNativeGroupNames() {
|
|
41
|
+
const e = this.getAttribute("name");
|
|
42
|
+
if (e)
|
|
43
|
+
for (const t of this._details())
|
|
44
|
+
t.hasAttribute("name") || t.setAttribute("name", e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
i as RCAccordion
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=rc-accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-accordion.js","sources":["../src/rc-accordion.ts"],"sourcesContent":["import type { RCDisclosureToggleEvent } from '@rcarls/rc-disclosure';\nimport type { RCDisclosure } from '@rcarls/rc-disclosure';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'rc-accordion': RCAccordion;\n }\n}\n\n/**\n * Coordinates direct child disclosures so only one stays open at a time.\n *\n * Child disclosures remain light-DOM behavioral wrappers around native\n * `<details>` elements. The accordion only adds group behavior and optional\n * arrow-key navigation between summaries.\n */\nexport class RCAccordion extends HTMLElement {\n connectedCallback(): void {\n this.addEventListener('rc-disclosure-toggle', this._onDisclosureToggle as EventListener);\n this.addEventListener('keydown', this._onKeydown);\n this._syncNativeGroupNames();\n }\n\n disconnectedCallback(): void {\n this.removeEventListener('rc-disclosure-toggle', this._onDisclosureToggle as EventListener);\n this.removeEventListener('keydown', this._onKeydown);\n }\n\n private _details(): HTMLDetailsElement[] {\n return Array.from(\n this.querySelectorAll<HTMLDetailsElement>(':scope > rc-disclosure > details'),\n );\n }\n\n private _summaries(): HTMLElement[] {\n return this._details()\n .map((details) => details.querySelector<HTMLElement>(':scope > summary'))\n .filter((summary): summary is HTMLElement => summary !== null);\n }\n\n private _syncNativeGroupNames(): void {\n const name = this.getAttribute('name');\n if (!name) return;\n\n for (const details of this._details()) {\n if (!details.hasAttribute('name')) details.setAttribute('name', name);\n }\n }\n\n private _onKeydown = (e: KeyboardEvent): void => {\n if (e.altKey || e.ctrlKey || e.metaKey) return;\n if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp' && e.key !== 'Home' && e.key !== 'End') return;\n\n const summaries = this._summaries();\n if (summaries.length === 0) return;\n\n const active = document.activeElement as HTMLElement | null;\n const idx = active ? summaries.indexOf(active) : -1;\n if (idx === -1) return;\n\n e.preventDefault();\n\n if (e.key === 'Home') {\n summaries[0].focus();\n return;\n }\n\n if (e.key === 'End') {\n summaries[summaries.length - 1].focus();\n return;\n }\n\n const next = e.key === 'ArrowDown'\n ? (idx + 1) % summaries.length\n : (idx - 1 + summaries.length) % summaries.length;\n\n summaries[next].focus();\n };\n\n private _onDisclosureToggle = (e: CustomEvent<RCDisclosureToggleEvent>): void => {\n if (!e.detail.open) return;\n\n const opened = e.target;\n for (const disclosure of this.querySelectorAll<RCDisclosure>(':scope > rc-disclosure')) {\n if (disclosure !== opened) disclosure.open = false;\n }\n };\n}\n\nexport default RCAccordion;\n"],"names":["RCAccordion","summaries","active","idx","next","opened","disclosure","details","summary","name"],"mappings":"AAgBO,MAAMA,UAAoB,YAAY;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA,GAiCL,KAAQ,aAAa,CAAC,MAA2B;AAE/C,UADI,EAAE,UAAU,EAAE,WAAW,EAAE,WAC3B,EAAE,QAAQ,eAAe,EAAE,QAAQ,aAAa,EAAE,QAAQ,UAAU,EAAE,QAAQ,MAAO;AAEzF,YAAMC,IAAY,KAAK,WAAA;AACvB,UAAIA,EAAU,WAAW,EAAG;AAE5B,YAAMC,IAAS,SAAS,eAClBC,IAAMD,IAASD,EAAU,QAAQC,CAAM,IAAI;AACjD,UAAIC,MAAQ,GAAI;AAIhB,UAFA,EAAE,eAAA,GAEE,EAAE,QAAQ,QAAQ;AACpB,QAAAF,EAAU,CAAC,EAAE,MAAA;AACb;AAAA,MACF;AAEA,UAAI,EAAE,QAAQ,OAAO;AACnB,QAAAA,EAAUA,EAAU,SAAS,CAAC,EAAE,MAAA;AAChC;AAAA,MACF;AAEA,YAAMG,IAAO,EAAE,QAAQ,eAClBD,IAAM,KAAKF,EAAU,UACrBE,IAAM,IAAIF,EAAU,UAAUA,EAAU;AAE7C,MAAAA,EAAUG,CAAI,EAAE,MAAA;AAAA,IAClB,GAEA,KAAQ,sBAAsB,CAAC,MAAkD;AAC/E,UAAI,CAAC,EAAE,OAAO,KAAM;AAEpB,YAAMC,IAAS,EAAE;AACjB,iBAAWC,KAAc,KAAK,iBAA+B,wBAAwB;AACnF,QAAIA,MAAeD,MAAQC,EAAW,OAAO;AAAA,IAEjD;AAAA,EAAA;AAAA,EArEA,oBAA0B;AACxB,SAAK,iBAAiB,wBAAwB,KAAK,mBAAoC,GACvF,KAAK,iBAAiB,WAAW,KAAK,UAAU,GAChD,KAAK,sBAAA;AAAA,EACP;AAAA,EAEA,uBAA6B;AAC3B,SAAK,oBAAoB,wBAAwB,KAAK,mBAAoC,GAC1F,KAAK,oBAAoB,WAAW,KAAK,UAAU;AAAA,EACrD;AAAA,EAEQ,WAAiC;AACvC,WAAO,MAAM;AAAA,MACX,KAAK,iBAAqC,kCAAkC;AAAA,IAAA;AAAA,EAEhF;AAAA,EAEQ,aAA4B;AAClC,WAAO,KAAK,SAAA,EACT,IAAI,CAACC,MAAYA,EAAQ,cAA2B,kBAAkB,CAAC,EACvE,OAAO,CAACC,MAAoCA,MAAY,IAAI;AAAA,EACjE;AAAA,EAEQ,wBAA8B;AACpC,UAAMC,IAAO,KAAK,aAAa,MAAM;AACrC,QAAKA;AAEL,iBAAWF,KAAW,KAAK;AACzB,QAAKA,EAAQ,aAAa,MAAM,KAAGA,EAAQ,aAAa,QAAQE,CAAI;AAAA,EAExE;AAwCF;"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './rc-accordion.js';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface HTMLElementTagNameMap {
|
|
3
|
+
'rc-accordion': RCAccordion;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Coordinates direct child disclosures so only one stays open at a time.
|
|
8
|
+
*
|
|
9
|
+
* Child disclosures remain light-DOM behavioral wrappers around native
|
|
10
|
+
* `<details>` elements. The accordion only adds group behavior and optional
|
|
11
|
+
* arrow-key navigation between summaries.
|
|
12
|
+
*/
|
|
13
|
+
export declare class RCAccordion extends HTMLElement {
|
|
14
|
+
connectedCallback(): void;
|
|
15
|
+
disconnectedCallback(): void;
|
|
16
|
+
private _details;
|
|
17
|
+
private _summaries;
|
|
18
|
+
private _syncNativeGroupNames;
|
|
19
|
+
private _onKeydown;
|
|
20
|
+
private _onDisclosureToggle;
|
|
21
|
+
}
|
|
22
|
+
export default RCAccordion;
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rcarls/rc-accordion",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"description": "Headless WAI-ARIA accordion coordinator for disclosure groups, built with Lit",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/richardcarls/rc-webcomponents.git",
|
|
11
|
+
"directory": "packages/rc-accordion"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/richardcarls/rc-webcomponents#readme",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"module": "./dist/rc-accordion.js",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/types/packages/rc-accordion/src/index.d.ts",
|
|
24
|
+
"default": "./dist/rc-accordion.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"./define": {
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./dist/types/packages/rc-accordion/src/define.d.ts",
|
|
30
|
+
"default": "./dist/rc-accordion-define.js"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"types": "./dist/types/packages/rc-accordion/src/index.d.ts",
|
|
35
|
+
"sideEffects": [
|
|
36
|
+
"./dist/rc-accordion-define.js"
|
|
37
|
+
],
|
|
38
|
+
"customElements": "dist/custom-elements.json",
|
|
39
|
+
"scripts": {
|
|
40
|
+
"dev": "vite",
|
|
41
|
+
"build": "tsc && vite build && cem analyze",
|
|
42
|
+
"cem:analyze": "cem analyze",
|
|
43
|
+
"preview": "vite preview",
|
|
44
|
+
"test:browser": "vitest",
|
|
45
|
+
"test:browser:chrome": "vitest --project=chromium",
|
|
46
|
+
"test:browser:firefox": "vitest --project=firefox",
|
|
47
|
+
"yalc:publish": "yalc publish --push"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@rcarls/rc-disclosure": "workspace:^"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@custom-elements-manifest/analyzer": "0.11.0",
|
|
54
|
+
"@guanghechen/rollup-plugin-copy": "^6.0.9",
|
|
55
|
+
"@vitest/browser-playwright": "4.1.5",
|
|
56
|
+
"lit": "^3.0.0",
|
|
57
|
+
"playwright": "^1.56.0",
|
|
58
|
+
"rollup": "^4.60.2",
|
|
59
|
+
"typescript": "~5.9.3",
|
|
60
|
+
"vite": "^7.1.7",
|
|
61
|
+
"vite-plugin-dts": "^4.5.4",
|
|
62
|
+
"vitest": "^4.0.6",
|
|
63
|
+
"vitest-browser-lit": "^1.0.1"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"lit": "^3.0.0"
|
|
67
|
+
}
|
|
68
|
+
}
|