@vaadin/accordion 25.2.7 → 25.3.0-alpha10
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/custom-elements.json +105 -40
- package/package.json +10 -10
- package/src/vaadin-accordion-heading.js +1 -0
- package/src/vaadin-accordion-mixin.d.ts +12 -0
- package/src/vaadin-accordion-mixin.js +25 -0
- package/src/vaadin-accordion-panel-mixin.js +18 -6
- package/src/vaadin-accordion-panel.js +1 -0
- package/src/vaadin-accordion.js +1 -0
- package/web-types.json +23 -11
- package/web-types.lit.json +9 -2
package/custom-elements.json
CHANGED
|
@@ -101,6 +101,13 @@
|
|
|
101
101
|
},
|
|
102
102
|
"description": "When true, the element is opened.",
|
|
103
103
|
"fieldName": "opened"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": {
|
|
107
|
+
"text": "string"
|
|
108
|
+
},
|
|
109
|
+
"description": "The theme variants to apply to the component.",
|
|
110
|
+
"name": "theme"
|
|
104
111
|
}
|
|
105
112
|
],
|
|
106
113
|
"mixins": [
|
|
@@ -154,6 +161,16 @@
|
|
|
154
161
|
"description": "A mixin providing common accordion functionality.",
|
|
155
162
|
"name": "AccordionMixin",
|
|
156
163
|
"members": [
|
|
164
|
+
{
|
|
165
|
+
"kind": "field",
|
|
166
|
+
"name": "headingLevel",
|
|
167
|
+
"privacy": "public",
|
|
168
|
+
"type": {
|
|
169
|
+
"text": "number"
|
|
170
|
+
},
|
|
171
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the `<vaadin-accordion-heading>` element of each panel.\n\nBy default, no `aria-level` is set and the headings are announced by\nscreen readers using their default level. Set this property to expose\nthe headings at the level that matches the surrounding page structure.",
|
|
172
|
+
"attribute": "heading-level"
|
|
173
|
+
},
|
|
157
174
|
{
|
|
158
175
|
"kind": "field",
|
|
159
176
|
"name": "items",
|
|
@@ -177,6 +194,14 @@
|
|
|
177
194
|
}
|
|
178
195
|
],
|
|
179
196
|
"attributes": [
|
|
197
|
+
{
|
|
198
|
+
"name": "heading-level",
|
|
199
|
+
"type": {
|
|
200
|
+
"text": "number"
|
|
201
|
+
},
|
|
202
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the `<vaadin-accordion-heading>` element of each panel.\n\nBy default, no `aria-level` is set and the headings are announced by\nscreen readers using their default level. Set this property to expose\nthe headings at the level that matches the surrounding page structure.",
|
|
203
|
+
"fieldName": "headingLevel"
|
|
204
|
+
},
|
|
180
205
|
{
|
|
181
206
|
"name": "opened",
|
|
182
207
|
"type": {
|
|
@@ -425,30 +450,6 @@
|
|
|
425
450
|
"name": "opened-changed"
|
|
426
451
|
}
|
|
427
452
|
],
|
|
428
|
-
"mixins": [
|
|
429
|
-
{
|
|
430
|
-
"name": "AccordionPanelMixin",
|
|
431
|
-
"module": "src/vaadin-accordion-panel-mixin.js"
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
"name": "ThemableMixin",
|
|
435
|
-
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
"name": "PolylitMixin",
|
|
439
|
-
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
440
|
-
},
|
|
441
|
-
{
|
|
442
|
-
"name": "LumoInjectionMixin",
|
|
443
|
-
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
444
|
-
}
|
|
445
|
-
],
|
|
446
|
-
"superclass": {
|
|
447
|
-
"name": "LitElement",
|
|
448
|
-
"package": "lit"
|
|
449
|
-
},
|
|
450
|
-
"tagName": "vaadin-accordion-panel",
|
|
451
|
-
"customElement": true,
|
|
452
453
|
"attributes": [
|
|
453
454
|
{
|
|
454
455
|
"name": "autofocus",
|
|
@@ -497,8 +498,39 @@
|
|
|
497
498
|
"name": "AccordionPanelMixin",
|
|
498
499
|
"module": "src/vaadin-accordion-panel-mixin.js"
|
|
499
500
|
}
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"type": {
|
|
504
|
+
"text": "string"
|
|
505
|
+
},
|
|
506
|
+
"description": "The theme variants to apply to the component.",
|
|
507
|
+
"name": "theme"
|
|
500
508
|
}
|
|
501
|
-
]
|
|
509
|
+
],
|
|
510
|
+
"mixins": [
|
|
511
|
+
{
|
|
512
|
+
"name": "AccordionPanelMixin",
|
|
513
|
+
"module": "src/vaadin-accordion-panel-mixin.js"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"name": "ThemableMixin",
|
|
517
|
+
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "PolylitMixin",
|
|
521
|
+
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "LumoInjectionMixin",
|
|
525
|
+
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
"superclass": {
|
|
529
|
+
"name": "LitElement",
|
|
530
|
+
"package": "lit"
|
|
531
|
+
},
|
|
532
|
+
"tagName": "vaadin-accordion-panel",
|
|
533
|
+
"customElement": true
|
|
502
534
|
}
|
|
503
535
|
],
|
|
504
536
|
"exports": [
|
|
@@ -521,6 +553,20 @@
|
|
|
521
553
|
"description": "`<vaadin-accordion>` is a Web Component implementing accordion widget:\na vertically stacked set of expandable panels. The component should be\nused as a wrapper for two or more `<vaadin-accordion-panel>` components.\n\nPanel headings function as controls that enable users to open (expand)\nor hide (collapse) their associated sections of content. The user can\ntoggle panels by mouse click, Enter and Space keys.\n\nOnly one panel can be opened at a time, opening a new one forces\nprevious panel to close and hide its content.\n\n```html\n<vaadin-accordion>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 1</vaadin-accordion-heading>\n <div>This panel is opened, so the text is visible by default.</div>\n </vaadin-accordion-panel>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 2</vaadin-accordion-heading>\n <div>After opening this panel, the first one becomes closed.</div>\n </vaadin-accordion-panel>\n</vaadin-accordion>\n```\n\n### Styling\n\nAccordion does not have own stylable shadow parts or state attributes. Instead, apply styles to\nthe following components:\n\n- [`<vaadin-accordion-heading>`](#/elements/vaadin-accordion-heading)\n- [`<vaadin-accordion-panel>`](#/elements/vaadin-accordion-panel)\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
522
554
|
"name": "Accordion",
|
|
523
555
|
"members": [
|
|
556
|
+
{
|
|
557
|
+
"kind": "field",
|
|
558
|
+
"name": "headingLevel",
|
|
559
|
+
"privacy": "public",
|
|
560
|
+
"type": {
|
|
561
|
+
"text": "number"
|
|
562
|
+
},
|
|
563
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the `<vaadin-accordion-heading>` element of each panel.\n\nBy default, no `aria-level` is set and the headings are announced by\nscreen readers using their default level. Set this property to expose\nthe headings at the level that matches the surrounding page structure.",
|
|
564
|
+
"attribute": "heading-level",
|
|
565
|
+
"inheritedFrom": {
|
|
566
|
+
"name": "AccordionMixin",
|
|
567
|
+
"module": "src/vaadin-accordion-mixin.js"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
524
570
|
{
|
|
525
571
|
"kind": "field",
|
|
526
572
|
"name": "items",
|
|
@@ -567,6 +613,39 @@
|
|
|
567
613
|
"name": "opened-changed"
|
|
568
614
|
}
|
|
569
615
|
],
|
|
616
|
+
"attributes": [
|
|
617
|
+
{
|
|
618
|
+
"name": "heading-level",
|
|
619
|
+
"type": {
|
|
620
|
+
"text": "number"
|
|
621
|
+
},
|
|
622
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the `<vaadin-accordion-heading>` element of each panel.\n\nBy default, no `aria-level` is set and the headings are announced by\nscreen readers using their default level. Set this property to expose\nthe headings at the level that matches the surrounding page structure.",
|
|
623
|
+
"fieldName": "headingLevel",
|
|
624
|
+
"inheritedFrom": {
|
|
625
|
+
"name": "AccordionMixin",
|
|
626
|
+
"module": "src/vaadin-accordion-mixin.js"
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "opened",
|
|
631
|
+
"type": {
|
|
632
|
+
"text": "number"
|
|
633
|
+
},
|
|
634
|
+
"description": "The index of currently opened panel. First panel is opened by\ndefault. Only one panel can be opened at the same time.\nSetting null or undefined closes all the accordion panels.",
|
|
635
|
+
"fieldName": "opened",
|
|
636
|
+
"inheritedFrom": {
|
|
637
|
+
"name": "AccordionMixin",
|
|
638
|
+
"module": "src/vaadin-accordion-mixin.js"
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"type": {
|
|
643
|
+
"text": "string"
|
|
644
|
+
},
|
|
645
|
+
"description": "The theme variants to apply to the component.",
|
|
646
|
+
"name": "theme"
|
|
647
|
+
}
|
|
648
|
+
],
|
|
570
649
|
"mixins": [
|
|
571
650
|
{
|
|
572
651
|
"name": "AccordionMixin",
|
|
@@ -590,21 +669,7 @@
|
|
|
590
669
|
"package": "lit"
|
|
591
670
|
},
|
|
592
671
|
"tagName": "vaadin-accordion",
|
|
593
|
-
"customElement": true
|
|
594
|
-
"attributes": [
|
|
595
|
-
{
|
|
596
|
-
"name": "opened",
|
|
597
|
-
"type": {
|
|
598
|
-
"text": "number"
|
|
599
|
-
},
|
|
600
|
-
"description": "The index of currently opened panel. First panel is opened by\ndefault. Only one panel can be opened at the same time.\nSetting null or undefined closes all the accordion panels.",
|
|
601
|
-
"fieldName": "opened",
|
|
602
|
-
"inheritedFrom": {
|
|
603
|
-
"name": "AccordionMixin",
|
|
604
|
-
"module": "src/vaadin-accordion-mixin.js"
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
]
|
|
672
|
+
"customElement": true
|
|
608
673
|
}
|
|
609
674
|
],
|
|
610
675
|
"exports": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/accordion",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.3.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "
|
|
39
|
-
"@vaadin/component-base": "
|
|
40
|
-
"@vaadin/details": "
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
38
|
+
"@vaadin/a11y-base": "25.3.0-alpha10",
|
|
39
|
+
"@vaadin/component-base": "25.3.0-alpha10",
|
|
40
|
+
"@vaadin/details": "25.3.0-alpha10",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-alpha10",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/aura": "
|
|
46
|
-
"@vaadin/chai-plugins": "
|
|
47
|
-
"@vaadin/test-runner-commands": "
|
|
45
|
+
"@vaadin/aura": "25.3.0-alpha10",
|
|
46
|
+
"@vaadin/chai-plugins": "25.3.0-alpha10",
|
|
47
|
+
"@vaadin/test-runner-commands": "25.3.0-alpha10",
|
|
48
48
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-alpha10",
|
|
50
50
|
"sinon": "^22.0.0"
|
|
51
51
|
},
|
|
52
52
|
"customElements": "custom-elements.json",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "f2833abdf9b613fa0d0ed216830e3f4de87b7dac"
|
|
58
58
|
}
|
|
@@ -60,6 +60,7 @@ import { accordionHeading } from './styles/vaadin-accordion-heading-base-styles.
|
|
|
60
60
|
*
|
|
61
61
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
62
62
|
*
|
|
63
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
63
64
|
* @customElement vaadin-accordion-heading
|
|
64
65
|
* @extends HTMLElement
|
|
65
66
|
*/
|
|
@@ -21,6 +21,18 @@ export declare class AccordionMixinClass {
|
|
|
21
21
|
*/
|
|
22
22
|
opened: number | null;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* The ARIA heading level, used to set the `aria-level` attribute
|
|
26
|
+
* on the `<vaadin-accordion-heading>` element of each panel.
|
|
27
|
+
*
|
|
28
|
+
* By default, no `aria-level` is set and the headings are announced by
|
|
29
|
+
* screen readers using their default level. Set this property to expose
|
|
30
|
+
* the headings at the level that matches the surrounding page structure.
|
|
31
|
+
*
|
|
32
|
+
* @attr {number} heading-level
|
|
33
|
+
*/
|
|
34
|
+
headingLevel: number | null | undefined;
|
|
35
|
+
|
|
24
36
|
/**
|
|
25
37
|
* The list of `<vaadin-accordion-panel>` child elements.
|
|
26
38
|
* It is populated from the elements passed to the light DOM,
|
|
@@ -26,6 +26,20 @@ export const AccordionMixin = (superClass) =>
|
|
|
26
26
|
reflectToAttribute: true,
|
|
27
27
|
},
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* The ARIA heading level, used to set the `aria-level` attribute
|
|
31
|
+
* on the `<vaadin-accordion-heading>` element of each panel.
|
|
32
|
+
*
|
|
33
|
+
* By default, no `aria-level` is set and the headings are announced by
|
|
34
|
+
* screen readers using their default level. Set this property to expose
|
|
35
|
+
* the headings at the level that matches the surrounding page structure.
|
|
36
|
+
*
|
|
37
|
+
* @attr {number} heading-level
|
|
38
|
+
*/
|
|
39
|
+
headingLevel: {
|
|
40
|
+
type: Number,
|
|
41
|
+
},
|
|
42
|
+
|
|
29
43
|
/**
|
|
30
44
|
* The list of `<vaadin-accordion-panel>` child elements.
|
|
31
45
|
* It is populated from the elements passed to the light DOM,
|
|
@@ -87,6 +101,17 @@ export const AccordionMixin = (superClass) =>
|
|
|
87
101
|
});
|
|
88
102
|
}
|
|
89
103
|
|
|
104
|
+
/** @protected */
|
|
105
|
+
updated(props) {
|
|
106
|
+
super.updated(props);
|
|
107
|
+
|
|
108
|
+
if (props.has('items') || props.has('headingLevel')) {
|
|
109
|
+
(this.items || []).forEach((item) => {
|
|
110
|
+
item._headingLevel = this.headingLevel;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
90
115
|
/**
|
|
91
116
|
* Override method inherited from `KeyboardDirectionMixin`
|
|
92
117
|
* to use the stored list of accordion panels as items.
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { DelegateFocusMixin } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';
|
|
7
7
|
import { DelegateStateMixin } from '@vaadin/component-base/src/delegate-state-mixin.js';
|
|
8
|
+
import { setOrRemoveAttribute } from '@vaadin/component-base/src/dom-utils.js';
|
|
8
9
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
9
10
|
import { CollapsibleMixin } from '@vaadin/details/src/collapsible-mixin.js';
|
|
10
11
|
import { SummaryController } from '@vaadin/details/src/summary-controller.js';
|
|
@@ -24,6 +25,16 @@ export const AccordionPanelMixin = (superClass) =>
|
|
|
24
25
|
type: String,
|
|
25
26
|
observer: '_summaryChanged',
|
|
26
27
|
},
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The ARIA heading level for the panel heading, propagated from the
|
|
31
|
+
* `headingLevel` property of the parent `<vaadin-accordion>`.
|
|
32
|
+
*
|
|
33
|
+
* @protected
|
|
34
|
+
*/
|
|
35
|
+
_headingLevel: {
|
|
36
|
+
type: Number,
|
|
37
|
+
},
|
|
27
38
|
};
|
|
28
39
|
}
|
|
29
40
|
|
|
@@ -32,7 +43,7 @@ export const AccordionPanelMixin = (superClass) =>
|
|
|
32
43
|
}
|
|
33
44
|
|
|
34
45
|
static get delegateProps() {
|
|
35
|
-
return ['disabled', 'opened', '_theme'];
|
|
46
|
+
return ['disabled', 'opened', '_theme', '_headingLevel'];
|
|
36
47
|
}
|
|
37
48
|
|
|
38
49
|
constructor() {
|
|
@@ -91,6 +102,11 @@ export const AccordionPanelMixin = (superClass) =>
|
|
|
91
102
|
return;
|
|
92
103
|
}
|
|
93
104
|
|
|
105
|
+
if (name === '_headingLevel') {
|
|
106
|
+
this._delegateAttribute('aria-level', value);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
94
110
|
super._delegateProperty(name, value);
|
|
95
111
|
}
|
|
96
112
|
|
|
@@ -120,11 +136,7 @@ export const AccordionPanelMixin = (superClass) =>
|
|
|
120
136
|
node.setAttribute('aria-labelledby', focusElement.id);
|
|
121
137
|
}
|
|
122
138
|
|
|
123
|
-
|
|
124
|
-
focusElement.setAttribute('aria-controls', node.id);
|
|
125
|
-
} else {
|
|
126
|
-
focusElement.removeAttribute('aria-controls');
|
|
127
|
-
}
|
|
139
|
+
setOrRemoveAttribute(focusElement, 'aria-controls', node?.id);
|
|
128
140
|
}
|
|
129
141
|
}
|
|
130
142
|
};
|
|
@@ -37,6 +37,7 @@ import { AccordionPanelMixin } from './vaadin-accordion-panel-mixin.js';
|
|
|
37
37
|
*
|
|
38
38
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
39
39
|
*
|
|
40
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
40
41
|
* @customElement vaadin-accordion-panel
|
|
41
42
|
* @extends HTMLElement
|
|
42
43
|
*/
|
package/src/vaadin-accordion.js
CHANGED
|
@@ -49,6 +49,7 @@ import { AccordionMixin } from './vaadin-accordion-mixin.js';
|
|
|
49
49
|
* @fires {CustomEvent} items-changed - Fired when the `items` property changes.
|
|
50
50
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
51
51
|
*
|
|
52
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
52
53
|
* @customElement vaadin-accordion
|
|
53
54
|
* @extends HTMLElement
|
|
54
55
|
*/
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/accordion",
|
|
4
|
-
"version": "25.
|
|
4
|
+
"version": "25.3.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -33,9 +33,7 @@
|
|
|
33
33
|
"description": "The theme variants to apply to the component.",
|
|
34
34
|
"value": {
|
|
35
35
|
"type": [
|
|
36
|
-
"string"
|
|
37
|
-
"null",
|
|
38
|
-
"undefined"
|
|
36
|
+
"string"
|
|
39
37
|
]
|
|
40
38
|
}
|
|
41
39
|
}
|
|
@@ -109,9 +107,7 @@
|
|
|
109
107
|
"description": "The theme variants to apply to the component.",
|
|
110
108
|
"value": {
|
|
111
109
|
"type": [
|
|
112
|
-
"string"
|
|
113
|
-
"null",
|
|
114
|
-
"undefined"
|
|
110
|
+
"string"
|
|
115
111
|
]
|
|
116
112
|
}
|
|
117
113
|
}
|
|
@@ -165,8 +161,17 @@
|
|
|
165
161
|
},
|
|
166
162
|
{
|
|
167
163
|
"name": "vaadin-accordion",
|
|
168
|
-
"description": "`<vaadin-accordion>` is a Web Component implementing accordion widget:\na vertically stacked set of expandable panels. The component should be\nused as a wrapper for two or more `<vaadin-accordion-panel>` components.\n\nPanel headings function as controls that enable users to open (expand)\nor hide (collapse) their associated sections of content. The user can\ntoggle panels by mouse click, Enter and Space keys.\n\nOnly one panel can be opened at a time, opening a new one forces\nprevious panel to close and hide its content.\n\n```html\n<vaadin-accordion>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 1</vaadin-accordion-heading>\n <div>This panel is opened, so the text is visible by default.</div>\n </vaadin-accordion-panel>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 2</vaadin-accordion-heading>\n <div>After opening this panel, the first one becomes closed.</div>\n </vaadin-accordion-panel>\n</vaadin-accordion>\n```\n\n### Styling\n\nAccordion does not have own stylable shadow parts or state attributes. Instead, apply styles to\nthe following components:\n\n- [`<vaadin-accordion-heading>`](https://cdn.vaadin.com/vaadin-web-components/25.
|
|
164
|
+
"description": "`<vaadin-accordion>` is a Web Component implementing accordion widget:\na vertically stacked set of expandable panels. The component should be\nused as a wrapper for two or more `<vaadin-accordion-panel>` components.\n\nPanel headings function as controls that enable users to open (expand)\nor hide (collapse) their associated sections of content. The user can\ntoggle panels by mouse click, Enter and Space keys.\n\nOnly one panel can be opened at a time, opening a new one forces\nprevious panel to close and hide its content.\n\n```html\n<vaadin-accordion>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 1</vaadin-accordion-heading>\n <div>This panel is opened, so the text is visible by default.</div>\n </vaadin-accordion-panel>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 2</vaadin-accordion-heading>\n <div>After opening this panel, the first one becomes closed.</div>\n </vaadin-accordion-panel>\n</vaadin-accordion>\n```\n\n### Styling\n\nAccordion does not have own stylable shadow parts or state attributes. Instead, apply styles to\nthe following components:\n\n- [`<vaadin-accordion-heading>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha10/#/elements/vaadin-accordion-heading)\n- [`<vaadin-accordion-panel>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha10/#/elements/vaadin-accordion-panel)\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
169
165
|
"attributes": [
|
|
166
|
+
{
|
|
167
|
+
"name": "heading-level",
|
|
168
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the `<vaadin-accordion-heading>` element of each panel.\n\nBy default, no `aria-level` is set and the headings are announced by\nscreen readers using their default level. Set this property to expose\nthe headings at the level that matches the surrounding page structure.",
|
|
169
|
+
"value": {
|
|
170
|
+
"type": [
|
|
171
|
+
"number"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
},
|
|
170
175
|
{
|
|
171
176
|
"name": "opened",
|
|
172
177
|
"description": "The index of currently opened panel. First panel is opened by\ndefault. Only one panel can be opened at the same time.\nSetting null or undefined closes all the accordion panels.",
|
|
@@ -181,15 +186,22 @@
|
|
|
181
186
|
"description": "The theme variants to apply to the component.",
|
|
182
187
|
"value": {
|
|
183
188
|
"type": [
|
|
184
|
-
"string"
|
|
185
|
-
"null",
|
|
186
|
-
"undefined"
|
|
189
|
+
"string"
|
|
187
190
|
]
|
|
188
191
|
}
|
|
189
192
|
}
|
|
190
193
|
],
|
|
191
194
|
"js": {
|
|
192
195
|
"properties": [
|
|
196
|
+
{
|
|
197
|
+
"name": "headingLevel",
|
|
198
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the `<vaadin-accordion-heading>` element of each panel.\n\nBy default, no `aria-level` is set and the headings are announced by\nscreen readers using their default level. Set this property to expose\nthe headings at the level that matches the surrounding page structure.",
|
|
199
|
+
"value": {
|
|
200
|
+
"type": [
|
|
201
|
+
"number"
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
193
205
|
{
|
|
194
206
|
"name": "opened",
|
|
195
207
|
"description": "The index of currently opened panel. First panel is opened by\ndefault. Only one panel can be opened at the same time.\nSetting null or undefined closes all the accordion panels.",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/accordion",
|
|
4
|
-
"version": "25.
|
|
4
|
+
"version": "25.3.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -79,9 +79,16 @@
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"name": "vaadin-accordion",
|
|
82
|
-
"description": "`<vaadin-accordion>` is a Web Component implementing accordion widget:\na vertically stacked set of expandable panels. The component should be\nused as a wrapper for two or more `<vaadin-accordion-panel>` components.\n\nPanel headings function as controls that enable users to open (expand)\nor hide (collapse) their associated sections of content. The user can\ntoggle panels by mouse click, Enter and Space keys.\n\nOnly one panel can be opened at a time, opening a new one forces\nprevious panel to close and hide its content.\n\n```html\n<vaadin-accordion>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 1</vaadin-accordion-heading>\n <div>This panel is opened, so the text is visible by default.</div>\n </vaadin-accordion-panel>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 2</vaadin-accordion-heading>\n <div>After opening this panel, the first one becomes closed.</div>\n </vaadin-accordion-panel>\n</vaadin-accordion>\n```\n\n### Styling\n\nAccordion does not have own stylable shadow parts or state attributes. Instead, apply styles to\nthe following components:\n\n- [`<vaadin-accordion-heading>`](https://cdn.vaadin.com/vaadin-web-components/25.
|
|
82
|
+
"description": "`<vaadin-accordion>` is a Web Component implementing accordion widget:\na vertically stacked set of expandable panels. The component should be\nused as a wrapper for two or more `<vaadin-accordion-panel>` components.\n\nPanel headings function as controls that enable users to open (expand)\nor hide (collapse) their associated sections of content. The user can\ntoggle panels by mouse click, Enter and Space keys.\n\nOnly one panel can be opened at a time, opening a new one forces\nprevious panel to close and hide its content.\n\n```html\n<vaadin-accordion>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 1</vaadin-accordion-heading>\n <div>This panel is opened, so the text is visible by default.</div>\n </vaadin-accordion-panel>\n <vaadin-accordion-panel>\n <vaadin-accordion-heading slot=\"summary\">Panel 2</vaadin-accordion-heading>\n <div>After opening this panel, the first one becomes closed.</div>\n </vaadin-accordion-panel>\n</vaadin-accordion>\n```\n\n### Styling\n\nAccordion does not have own stylable shadow parts or state attributes. Instead, apply styles to\nthe following components:\n\n- [`<vaadin-accordion-heading>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha10/#/elements/vaadin-accordion-heading)\n- [`<vaadin-accordion-panel>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha10/#/elements/vaadin-accordion-panel)\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
83
83
|
"extension": true,
|
|
84
84
|
"attributes": [
|
|
85
|
+
{
|
|
86
|
+
"name": ".headingLevel",
|
|
87
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the `<vaadin-accordion-heading>` element of each panel.\n\nBy default, no `aria-level` is set and the headings are announced by\nscreen readers using their default level. Set this property to expose\nthe headings at the level that matches the surrounding page structure.",
|
|
88
|
+
"value": {
|
|
89
|
+
"kind": "expression"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
85
92
|
{
|
|
86
93
|
"name": ".opened",
|
|
87
94
|
"description": "The index of currently opened panel. First panel is opened by\ndefault. Only one panel can be opened at the same time.\nSetting null or undefined closes all the accordion panels.",
|