@simple-reporting/base 1.0.16 → 1.0.18
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/cli.js +4 -2
- package/dev/eslint.config.js +5 -0
- package/dev/livingdocs.config.json +29 -16
- package/dev/package.json +1 -1
- package/dev/src/assets/scss/components/icons.scss +287 -0
- package/dev/src/assets/scss/components/note/accordion.scss +60 -27
- package/dev/src/assets/scss/components/round-button.scss +75 -0
- package/dev/src/assets/scss/general.scss +2 -0
- package/dev/src/assets/scss/pdf.scss +3 -3
- package/dev/src/assets/scss/placeholders.scss +315 -1
- package/dev/src/assets/scss/web.scss +1 -0
- package/dev/srl.config.json +29 -14
- package/livingdocs/010.Titles/020.title-h2/scss/general.scss +1 -1
- package/livingdocs/010.Titles/020.title-h2/title-h2.html +5 -6
- package/livingdocs/010.Titles/030.title-h3/scss/general.scss +1 -1
- package/livingdocs/010.Titles/030.title-h3/title-h3.html +4 -5
- package/livingdocs/010.Titles/040.title-h4/scss/general.scss +1 -1
- package/livingdocs/010.Titles/040.title-h4/title-h4.html +4 -5
- package/livingdocs/020.Text/010.lead/scss/general.scss +1 -1
- package/livingdocs/020.Text/050.quote/scss/general.scss +1 -1
- package/livingdocs/020.Text/060.quote-with-portrait/scss/general.scss +2 -1
- package/livingdocs/020.Text/070.footnote-container/scss/general.scss +1 -0
- package/livingdocs/020.Text/070.footnote-container/scss/pdf.scss +9 -0
- package/livingdocs/040.Media/010.table/ld-conf.json +1 -6
- package/livingdocs/040.Media/010.table/scss/general.scss +55 -3
- package/livingdocs/040.Media/010.table/table.html +11 -9
- package/livingdocs/040.Media/010.table/table.vue +0 -1
- package/livingdocs/040.Media/020.image/scss/general.scss +1 -1
- package/livingdocs/040.Media/030.video/ld-conf.json +3 -0
- package/livingdocs/040.Media/030.video/scss/general.scss +4 -0
- package/livingdocs/040.Media/030.video/scss/web.scss +23 -32
- package/livingdocs/040.Media/030.video/video.html +13 -12
- package/livingdocs/040.Media/030.video/video.vue +53 -0
- package/livingdocs/060.Buttons/010.button-container/button-container.html +5 -0
- package/livingdocs/060.Buttons/010.button-container/ld-conf.json +19 -0
- package/livingdocs/060.Buttons/010.button-container/properties.json +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/app.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/editor.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/general.scss +6 -0
- package/livingdocs/060.Buttons/010.button-container/scss/pdf.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/web.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/word.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/xbrl.scss +2 -0
- package/livingdocs/060.Buttons/020.button/button.html +4 -0
- package/livingdocs/060.Buttons/020.button/ld-conf.json +15 -0
- package/livingdocs/060.Buttons/020.button/scss/app.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/editor.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/general.scss +89 -0
- package/livingdocs/060.Buttons/020.button/scss/pdf.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/web.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/word.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/xbrl.scss +3 -0
- package/livingdocs/090.Signatures/010.signature-container/scss/general.scss +1 -1
- package/livingdocs/090.Signatures/010.signature-container/scss/web.scss +1 -0
- package/livingdocs/110.PDF/040.pdf-chapter-title/scss/editor.scss +0 -6
- package/livingdocs/999.Properties/hide-quote-characters/properties.json +1 -1
- package/livingdocs/999.Properties/icon/properties.json +19 -0
- package/livingdocs/999.Properties/reverse/properties.json +7 -0
- package/package.json +1 -1
- package/plugins/viteSrlPlugin.d.ts +5 -1
- package/plugins/viteSrlPlugin.js +4 -1
- package/scripts/build.d.ts +1 -1
- package/scripts/build.js +135 -34
- package/srl/components/Srl/Category/Accordion/Content.vue +7 -1
- package/srl/components/Srl/Category/Accordion.vue +2 -1
- package/srl/components/Srl/Menu.vue +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use "web";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use "web";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
@use "srl";
|
|
2
|
+
@use "assets/scss/placeholders";
|
|
3
|
+
|
|
4
|
+
.srl-button {
|
|
5
|
+
display: flex;
|
|
6
|
+
gap: srl.spacer-get(100);
|
|
7
|
+
align-items: center;
|
|
8
|
+
padding: srl.spacer-get(200);
|
|
9
|
+
background-color: srl.colors-white-1000();
|
|
10
|
+
border: 1px solid srl.colors-primary-1000();
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
|
|
13
|
+
border-radius: srl.system-size-unit(24);
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
@include srl.typography-button-text();
|
|
16
|
+
|
|
17
|
+
@media (prefers-reduced-motion: reduce) {
|
|
18
|
+
transition-duration: 0s;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.srl-has-icon,
|
|
22
|
+
[class*="-after"] &,
|
|
23
|
+
.srl-header__meta-navigation &,
|
|
24
|
+
&[class*="-before"],
|
|
25
|
+
&[class*="-after"] {
|
|
26
|
+
padding: srl.system-size-unit(11) srl.spacer-get(200);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[class*="-after"] &,
|
|
30
|
+
&[class*="-after"] {
|
|
31
|
+
flex-direction: row-reverse;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&[aria-expanded="true"] {
|
|
35
|
+
border-bottom: none;
|
|
36
|
+
border-bottom-left-radius: 0;
|
|
37
|
+
border-bottom-right-radius: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
background-color: srl.colors-primary-1000();
|
|
42
|
+
//border-color: srl.colors-white-1000();
|
|
43
|
+
color: srl.colors-white-1000();
|
|
44
|
+
|
|
45
|
+
&[aria-expanded="true"] {
|
|
46
|
+
border-color: srl.colors-primary-1000();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.srl-bg-primary-1000 & {
|
|
50
|
+
border-color: srl.colors-secondary-1000();
|
|
51
|
+
background-color: srl.colors-secondary-1000();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:focus {
|
|
56
|
+
background-color: srl.colors-primary-1000();
|
|
57
|
+
border-color: srl.colors-primary-1000();
|
|
58
|
+
color: srl.colors-white-1000();
|
|
59
|
+
|
|
60
|
+
.srl-bg-primary-1000 & {
|
|
61
|
+
background-color: srl.colors-primary-1000();
|
|
62
|
+
border-color: srl.colors-primary-1000();
|
|
63
|
+
color: srl.colors-white-1000();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.srl-button__icon {
|
|
69
|
+
display: none;
|
|
70
|
+
|
|
71
|
+
[class*="srl-icon-"][class*="-before"] &,
|
|
72
|
+
[class*="srl-icon-"][class*="-after"] & {
|
|
73
|
+
display: block;
|
|
74
|
+
@extend %srl-icon;
|
|
75
|
+
@extend %srl-icon-mask;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.srl-icon-arrow-left-before & {
|
|
79
|
+
@extend %srl-icon-arrow-left;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.srl-icon-arrow-right-after & {
|
|
83
|
+
@extend %srl-icon-arrow-right;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.srl-icon-download-after & {
|
|
87
|
+
@extend %srl-icon-download;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use "srl";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use "srl";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use "pdf";
|
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
@use "web";
|
|
3
3
|
@use 'assets/scss/placeholders';
|
|
4
4
|
|
|
5
|
-
.srl-pdf-chapter-title {
|
|
6
|
-
border-bottom: 1px solid #{srl.colors-primary-1000()};
|
|
7
|
-
@include srl.spacer-padding-block(200);
|
|
8
|
-
@extend %srl-grid-base;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
5
|
.srl-pdf-chapter-title__text {
|
|
12
6
|
@extend %srl-regular-width;
|
|
13
7
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"icon": {
|
|
3
|
+
"label": "Icon",
|
|
4
|
+
"type": "select",
|
|
5
|
+
"options": [
|
|
6
|
+
{
|
|
7
|
+
"caption": "None"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"caption": "Arrow right",
|
|
11
|
+
"value": "srl-icon-arrow-right-after"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"caption": "Download",
|
|
15
|
+
"value": "srl-icon-download-after"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
package/package.json
CHANGED
package/plugins/viteSrlPlugin.js
CHANGED
|
@@ -125,7 +125,7 @@ function triggerAction(callback) {
|
|
|
125
125
|
}, 200);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
function viteSrlPlugin() {
|
|
129
129
|
return {
|
|
130
130
|
name: 'vite-srl-plugin',
|
|
131
131
|
config(config) {
|
|
@@ -251,3 +251,6 @@ export default function viteSrlPlugin() {
|
|
|
251
251
|
},
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
+
|
|
255
|
+
export default viteSrlPlugin;
|
|
256
|
+
export { viteSrlPlugin };
|
package/scripts/build.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {string} version
|
|
6
6
|
* @return {Promise<void>} A Promise that resolves when the build process is completed or rejects if an error occurs.
|
|
7
7
|
*/
|
|
8
|
-
export function build(version: string): Promise<void>;
|
|
8
|
+
export function build(version: string, options: any): Promise<void>;
|
|
9
9
|
/**
|
|
10
10
|
* Builds the project sequentially by executing a series of asynchronous tasks in a specific order.
|
|
11
11
|
* This method is used to build the project in a predetermined sequence.
|
package/scripts/build.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { join } from 'node:path/posix';
|
|
1
|
+
import { join, relative } from 'node:path/posix';
|
|
2
2
|
import {
|
|
3
3
|
statSync,
|
|
4
4
|
writeFileSync,
|
|
@@ -244,22 +244,6 @@ async function zipLdd() {
|
|
|
244
244
|
console.log("\n\nCreate zip file for LDD");
|
|
245
245
|
await checkFolders();
|
|
246
246
|
|
|
247
|
-
const lddPdfDir = join(folders.srlOutput, 'ldd', 'pdf');
|
|
248
|
-
|
|
249
|
-
try {
|
|
250
|
-
const pdfDir = join(folders.srlOutput, 'pdf');
|
|
251
|
-
statSync(pdfDir);
|
|
252
|
-
await cpSync(pdfDir, lddPdfDir, { recursive: true });
|
|
253
|
-
console.log('PDF folder has been copied to ' + lddPdfDir);
|
|
254
|
-
} catch (e) {}
|
|
255
|
-
|
|
256
|
-
try {
|
|
257
|
-
const customerDir = join(folders.root, 'pdf', 'customer');
|
|
258
|
-
statSync(customerDir);
|
|
259
|
-
await cpSync(customerDir, lddPdfDir, { recursive: true });
|
|
260
|
-
console.log('Contents of pdf/customer have been copied to ' + lddPdfDir);
|
|
261
|
-
} catch (e) {}
|
|
262
|
-
|
|
263
247
|
const archiver = require('archiver');
|
|
264
248
|
const output = createWriteStream(join(outputPath, 'design.zip'));
|
|
265
249
|
const archive = archiver('zip', {
|
|
@@ -472,21 +456,6 @@ async function buildLdd(version) {
|
|
|
472
456
|
}
|
|
473
457
|
}
|
|
474
458
|
},
|
|
475
|
-
resolve: {
|
|
476
|
-
alias: {
|
|
477
|
-
'~': folders.root,
|
|
478
|
-
'@': folders.srlSrc,
|
|
479
|
-
'#components': folders.srlComponents,
|
|
480
|
-
'#composables': folders.srlComposables,
|
|
481
|
-
'#plugins': folders.srlPlugins,
|
|
482
|
-
'#types': folders.srlTypes,
|
|
483
|
-
'#utils': folders.srlUtils,
|
|
484
|
-
'#imports': folders.srlImports,
|
|
485
|
-
'#ldd': folders.packageLd,
|
|
486
|
-
'assets': folders.srlAssets,
|
|
487
|
-
'srl': folders.srlSystem,
|
|
488
|
-
},
|
|
489
|
-
},
|
|
490
459
|
publicDir: false,
|
|
491
460
|
})
|
|
492
461
|
}
|
|
@@ -508,6 +477,137 @@ async function buildLdd(version) {
|
|
|
508
477
|
}
|
|
509
478
|
}
|
|
510
479
|
|
|
480
|
+
async function buildPdfCustomer(customer) {
|
|
481
|
+
const customerDir = join(folders.root, 'pdf', 'customers', customer);
|
|
482
|
+
|
|
483
|
+
try {
|
|
484
|
+
statSync(customerDir);
|
|
485
|
+
} catch (e) {
|
|
486
|
+
console.error(`Customer ${customer} does not exist in: ` + customerDir);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
console.log(`\nBuild PDF for customer ${customer}`);
|
|
490
|
+
|
|
491
|
+
const lddPdfDir = join(folders.srlOutput, 'ldd', 'pdf');
|
|
492
|
+
const lddJson = await readLivingDocsJson();
|
|
493
|
+
|
|
494
|
+
try {
|
|
495
|
+
const pdfDir = join(folders.srlOutput, 'pdf');
|
|
496
|
+
statSync(pdfDir);
|
|
497
|
+
await cpSync(pdfDir, lddPdfDir, { recursive: true });
|
|
498
|
+
console.log(`PDF folder has been copied to ${relative(folders.root, lddPdfDir)}`);
|
|
499
|
+
} catch (e) {
|
|
500
|
+
console.error(e)
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
try {
|
|
504
|
+
statSync(customerDir);
|
|
505
|
+
const customerTarget = join(lddPdfDir, customer);
|
|
506
|
+
mkdirSync(customerTarget, { recursive: true });
|
|
507
|
+
const jsReferences = [
|
|
508
|
+
'pdf.js'
|
|
509
|
+
];
|
|
510
|
+
const cssReferences = [
|
|
511
|
+
'pdf.css'
|
|
512
|
+
];
|
|
513
|
+
|
|
514
|
+
try {
|
|
515
|
+
const tsPath = join(customerDir, 'custom.ts');
|
|
516
|
+
statSync(tsPath);
|
|
517
|
+
const config = {
|
|
518
|
+
css: {
|
|
519
|
+
preprocessorOptions: {
|
|
520
|
+
scss: {
|
|
521
|
+
api: 'modern-compiler',
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
base: './',
|
|
526
|
+
build: {
|
|
527
|
+
outDir: customerTarget,
|
|
528
|
+
lib: {
|
|
529
|
+
fileName: 'custom',
|
|
530
|
+
entry: tsPath,
|
|
531
|
+
formats: ['es'],
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
publicDir: false,
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
try {
|
|
538
|
+
await viteBuild(config);
|
|
539
|
+
} catch (e) {
|
|
540
|
+
console.error(e);
|
|
541
|
+
}
|
|
542
|
+
jsReferences.push(join(customer, 'custom.js'));
|
|
543
|
+
} catch (e) {}
|
|
544
|
+
|
|
545
|
+
try {
|
|
546
|
+
const cssPath = join(customerTarget, 'custom.css');
|
|
547
|
+
statSync(cssPath);
|
|
548
|
+
cssReferences.push(join(customer, 'custom.css'));
|
|
549
|
+
} catch (e) {}
|
|
550
|
+
|
|
551
|
+
try {
|
|
552
|
+
const publicDir = join(customerDir, 'public');
|
|
553
|
+
statSync(publicDir);
|
|
554
|
+
const publicTarget = join(customerTarget, 'public');
|
|
555
|
+
await cpSync(publicDir, publicTarget, { recursive: true });
|
|
556
|
+
console.log(`Customer ${customer} public folder has been copied to ${relative(folders.root, publicTarget)}`);
|
|
557
|
+
|
|
558
|
+
const publicFiles = await glob(join(publicTarget, '**', '*'), { withFileTypes: true });
|
|
559
|
+
|
|
560
|
+
for (const publicFile of publicFiles) {
|
|
561
|
+
if (publicFile.isFile()) {
|
|
562
|
+
if (publicFile.name.endsWith('.css')) {
|
|
563
|
+
cssReferences.push(`${relative(lddPdfDir, publicFile.fullpath())}`);
|
|
564
|
+
}
|
|
565
|
+
if (publicFile.name.endsWith('.js')) {
|
|
566
|
+
jsReferences.push(`${relative(lddPdfDir, publicFile.fullpath())}`);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
} catch (e) {}
|
|
571
|
+
|
|
572
|
+
const pdfXmlStart = `<configuration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n`;
|
|
573
|
+
const pdfXmlEnd = `\n</configuration>`;
|
|
574
|
+
const nsWowUrl = `${nsWowInternalLddUrl}/${lddJson.name}/${lddJson.version}/pdf`;
|
|
575
|
+
|
|
576
|
+
const pdfConfig = [];
|
|
577
|
+
cssReferences.forEach( p => {
|
|
578
|
+
pdfConfig.push(` <userStyleSheets><uri>${nsWowUrl}/${p}</uri></userStyleSheets>`);
|
|
579
|
+
})
|
|
580
|
+
|
|
581
|
+
jsReferences.forEach( p => {
|
|
582
|
+
pdfConfig.push(` <userScripts><uri>${nsWowUrl}/${p}</uri></userScripts>`);
|
|
583
|
+
})
|
|
584
|
+
|
|
585
|
+
const pdfConfigContent = pdfXmlStart
|
|
586
|
+
+ ` <appendLog>false</appendLog>\n`
|
|
587
|
+
+ pdfConfig.join('\n')
|
|
588
|
+
+ pdfXmlEnd;
|
|
589
|
+
const pdfConfigPath = join(customerTarget, 'pdf-configuration.xml');
|
|
590
|
+
writeFileSync(pdfConfigPath, pdfConfigContent);
|
|
591
|
+
console.log(`Customer ${customer} PDF configuration file has been built to ${relative(folders.root, pdfConfigPath)}`);
|
|
592
|
+
|
|
593
|
+
const pdfConfigDebugContent = pdfXmlStart
|
|
594
|
+
+ ` <appendLog>true</appendLog>\n`
|
|
595
|
+
+ ` <inspectableSettings><enabled>true</enabled></inspectableSettings>\n`
|
|
596
|
+
+ ` <debugSettings><all>true</all></debugSettings>\n`
|
|
597
|
+
+ pdfConfig.join('\n')
|
|
598
|
+
+ pdfXmlEnd;
|
|
599
|
+
const pdfConfigDebugPath = join(customerTarget, 'pdf-configuration-debug.xml');
|
|
600
|
+
writeFileSync(pdfConfigDebugPath, pdfConfigDebugContent);
|
|
601
|
+
console.log(`Customer ${customer} PDF debug configuration file has been built to ${relative(folders.root, pdfConfigDebugPath)}`);
|
|
602
|
+
|
|
603
|
+
console.log(`Customer ${customer} PDF files has been built to ${relative(folders.root, customerTarget)}`);
|
|
604
|
+
|
|
605
|
+
console.log("\n");
|
|
606
|
+
} catch (e) {}
|
|
607
|
+
|
|
608
|
+
return true;
|
|
609
|
+
}
|
|
610
|
+
|
|
511
611
|
/**
|
|
512
612
|
* Builds the word document by compiling the HTML file using Vite and
|
|
513
613
|
* returns the result.
|
|
@@ -518,7 +618,6 @@ async function buildLdd(version) {
|
|
|
518
618
|
async function buildWord() {
|
|
519
619
|
console.log("\n\nBuild Word");
|
|
520
620
|
await checkFolders();
|
|
521
|
-
let configFile = false;
|
|
522
621
|
|
|
523
622
|
const config = {
|
|
524
623
|
css: {
|
|
@@ -555,7 +654,8 @@ async function buildWord() {
|
|
|
555
654
|
* @param {string} version
|
|
556
655
|
* @return {Promise<void>} A Promise that resolves when the build process is completed or rejects if an error occurs.
|
|
557
656
|
*/
|
|
558
|
-
async function build(version) {
|
|
657
|
+
async function build(version, options) {
|
|
658
|
+
|
|
559
659
|
try {
|
|
560
660
|
await checkFolders();
|
|
561
661
|
const packageJson = await readPackageJson();
|
|
@@ -577,6 +677,7 @@ async function build(version) {
|
|
|
577
677
|
await buildWord();
|
|
578
678
|
await buildXbrl();
|
|
579
679
|
await buildLdd();
|
|
680
|
+
!options.customer || await buildPdfCustomer(options.customer);
|
|
580
681
|
new LivingdocsDesignValidator(await readLivingDocsJson()).IsDesignValid();
|
|
581
682
|
await zipApp();
|
|
582
683
|
await zipLdd();
|
|
@@ -57,7 +57,13 @@ onMounted(() => {
|
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
59
|
<template>
|
|
60
|
-
<div
|
|
60
|
+
<div
|
|
61
|
+
ref="rootEl"
|
|
62
|
+
:id="props.accordion.id"
|
|
63
|
+
:hidden="!props.accordion.state"
|
|
64
|
+
tabindex="-1"
|
|
65
|
+
@keydown.esc.stop.prevent="accordion.close()"
|
|
66
|
+
>
|
|
61
67
|
<slot/>
|
|
62
68
|
</div>
|
|
63
69
|
</template>
|
|
@@ -12,11 +12,12 @@ function toggle() {
|
|
|
12
12
|
|
|
13
13
|
function open() {
|
|
14
14
|
state.value = true
|
|
15
|
-
rootEl.value
|
|
15
|
+
rootEl.value?.querySelector<HTMLDivElement>(`#${id.value}`)?.focus()
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function close() {
|
|
19
19
|
state.value = false
|
|
20
|
+
rootEl.value?.querySelector<HTMLDivElement>(`[aria-controls="${id.value}"]`)?.focus()
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
const accordion = computed(() => {
|