@vaadin/accordion 25.0.0-alpha2 → 25.0.0-alpha21
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/package.json +10 -15
- package/src/styles/vaadin-accordion-heading-base-styles.js +27 -0
- package/src/{vaadin-accordion-panel-core-styles.js → styles/vaadin-accordion-panel-base-styles.js} +7 -5
- package/src/vaadin-accordion-heading.js +3 -2
- package/src/vaadin-accordion-mixin.js +3 -2
- package/src/vaadin-accordion-panel.d.ts +8 -7
- package/src/vaadin-accordion-panel.js +11 -9
- package/src/vaadin-accordion.d.ts +1 -10
- package/src/vaadin-accordion.js +1 -10
- package/vaadin-accordion-heading.js +1 -1
- package/vaadin-accordion-panel.js +1 -1
- package/vaadin-accordion.js +1 -1
- package/web-types.json +3 -3
- package/web-types.lit.json +3 -3
- package/src/vaadin-accordion-heading-core-styles.js +0 -34
- package/theme/lumo/vaadin-accordion-heading-styles.d.ts +0 -1
- package/theme/lumo/vaadin-accordion-heading-styles.js +0 -19
- package/theme/lumo/vaadin-accordion-heading.d.ts +0 -2
- package/theme/lumo/vaadin-accordion-heading.js +0 -2
- package/theme/lumo/vaadin-accordion-panel-styles.d.ts +0 -2
- package/theme/lumo/vaadin-accordion-panel-styles.js +0 -25
- package/theme/lumo/vaadin-accordion-panel.d.ts +0 -3
- package/theme/lumo/vaadin-accordion-panel.js +0 -3
- package/theme/lumo/vaadin-accordion.d.ts +0 -2
- package/theme/lumo/vaadin-accordion.js +0 -2
- /package/src/{vaadin-accordion-heading-core-styles.d.ts → styles/vaadin-accordion-heading-base-styles.d.ts} +0 -0
- /package/src/{vaadin-accordion-panel-core-styles.d.ts → styles/vaadin-accordion-panel-base-styles.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/accordion",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha21",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,11 +21,6 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
-
"!src/vaadin-accordion-heading-base-styles.d.ts",
|
|
25
|
-
"!src/vaadin-accordion-heading-base-styles.js",
|
|
26
|
-
"!src/vaadin-accordion-panel-base-styles.d.ts",
|
|
27
|
-
"!src/vaadin-accordion-panel-base-styles.js",
|
|
28
|
-
"theme",
|
|
29
24
|
"vaadin-*.d.ts",
|
|
30
25
|
"vaadin-*.js",
|
|
31
26
|
"web-types.json",
|
|
@@ -39,22 +34,22 @@
|
|
|
39
34
|
],
|
|
40
35
|
"dependencies": {
|
|
41
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
42
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
43
|
-
"@vaadin/component-base": "25.0.0-
|
|
44
|
-
"@vaadin/details": "25.0.0-
|
|
45
|
-
"@vaadin/vaadin-
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-alpha21",
|
|
38
|
+
"@vaadin/component-base": "25.0.0-alpha21",
|
|
39
|
+
"@vaadin/details": "25.0.0-alpha21",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha21",
|
|
47
41
|
"lit": "^3.0.0"
|
|
48
42
|
},
|
|
49
43
|
"devDependencies": {
|
|
50
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
51
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
44
|
+
"@vaadin/chai-plugins": "25.0.0-alpha21",
|
|
45
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha21",
|
|
52
46
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
53
|
-
"
|
|
47
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha21",
|
|
48
|
+
"sinon": "^21.0.0"
|
|
54
49
|
},
|
|
55
50
|
"web-types": [
|
|
56
51
|
"web-types.json",
|
|
57
52
|
"web-types.lit.json"
|
|
58
53
|
],
|
|
59
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "8fb9e9710c01449edf623a1aaac4655cdc11a933"
|
|
60
55
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2019 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import { css } from 'lit';
|
|
7
|
+
import { detailsSummary } from '@vaadin/details/src/styles/vaadin-details-summary-base-styles.js';
|
|
8
|
+
|
|
9
|
+
export const accordionHeading = [
|
|
10
|
+
detailsSummary('vaadin-accordion-heading'),
|
|
11
|
+
css`
|
|
12
|
+
button {
|
|
13
|
+
align-items: center;
|
|
14
|
+
appearance: none;
|
|
15
|
+
background: transparent;
|
|
16
|
+
border: 0;
|
|
17
|
+
color: inherit;
|
|
18
|
+
cursor: inherit;
|
|
19
|
+
display: flex;
|
|
20
|
+
font: inherit;
|
|
21
|
+
gap: inherit;
|
|
22
|
+
outline: none;
|
|
23
|
+
padding: 0;
|
|
24
|
+
touch-action: manipulation;
|
|
25
|
+
}
|
|
26
|
+
`,
|
|
27
|
+
];
|
package/src/{vaadin-accordion-panel-core-styles.js → styles/vaadin-accordion-panel-base-styles.js}
RENAMED
|
@@ -15,12 +15,14 @@ export const accordionPanel = css`
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
[part='content'] {
|
|
18
|
-
|
|
19
|
-
overflow: hidden;
|
|
18
|
+
box-sizing: border-box;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
:host([opened]) [part='content'] {
|
|
23
|
-
display:
|
|
24
|
-
|
|
21
|
+
:host(:not([opened])) [part='content'] {
|
|
22
|
+
display: none !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host([focus-ring]) {
|
|
26
|
+
--_focus-ring: 1;
|
|
25
27
|
}
|
|
26
28
|
`;
|
|
@@ -8,8 +8,9 @@ import { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';
|
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
9
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
11
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
12
|
-
import { accordionHeading } from './vaadin-accordion-heading-
|
|
13
|
+
import { accordionHeading } from './styles/vaadin-accordion-heading-base-styles.js';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* The accordion heading element.
|
|
@@ -50,7 +51,7 @@ import { accordionHeading } from './vaadin-accordion-heading-core-styles.js';
|
|
|
50
51
|
* @mixes DirMixin
|
|
51
52
|
* @mixes ThemableMixin
|
|
52
53
|
*/
|
|
53
|
-
class AccordionHeading extends ActiveMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
54
|
+
class AccordionHeading extends ActiveMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
54
55
|
static get is() {
|
|
55
56
|
return 'vaadin-accordion-heading';
|
|
56
57
|
}
|
|
@@ -66,14 +66,15 @@ export const AccordionMixin = (superClass) =>
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
+
* @param {FocusOptions=} options
|
|
69
70
|
* @protected
|
|
70
71
|
* @override
|
|
71
72
|
*/
|
|
72
|
-
focus() {
|
|
73
|
+
focus(options) {
|
|
73
74
|
if (this._observer) {
|
|
74
75
|
this._observer.flush();
|
|
75
76
|
}
|
|
76
|
-
super.focus();
|
|
77
|
+
super.focus(options);
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
/** @protected */
|
|
@@ -28,14 +28,15 @@ export type AccordionPanelEventMap = AccordionPanelCustomEventMap & HTMLElementE
|
|
|
28
28
|
* -----------------|----------------
|
|
29
29
|
* `content` | The wrapper for the collapsible panel content.
|
|
30
30
|
*
|
|
31
|
-
* The following attributes are
|
|
31
|
+
* The following state attributes are available for styling:
|
|
32
32
|
*
|
|
33
|
-
* Attribute
|
|
34
|
-
*
|
|
35
|
-
* `opened`
|
|
36
|
-
* `disabled`
|
|
37
|
-
* `focus-ring`
|
|
38
|
-
* `focused`
|
|
33
|
+
* Attribute | Description
|
|
34
|
+
* ---------------|------------
|
|
35
|
+
* `opened` | Set when the collapsible content is expanded and visible
|
|
36
|
+
* `disabled` | Set when the element is disabled
|
|
37
|
+
* `focus-ring` | Set when the element is focused using the keyboard
|
|
38
|
+
* `focused` | Set when the element is focused
|
|
39
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
39
40
|
*
|
|
40
41
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
41
42
|
*
|
|
@@ -7,8 +7,9 @@ import './vaadin-accordion-heading.js';
|
|
|
7
7
|
import { html, LitElement } from 'lit';
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
9
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
10
11
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
11
|
-
import { accordionPanel } from './vaadin-accordion-panel-
|
|
12
|
+
import { accordionPanel } from './styles/vaadin-accordion-panel-base-styles.js';
|
|
12
13
|
import { AccordionPanelMixin } from './vaadin-accordion-panel-mixin.js';
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -22,14 +23,15 @@ import { AccordionPanelMixin } from './vaadin-accordion-panel-mixin.js';
|
|
|
22
23
|
* -----------------|----------------
|
|
23
24
|
* `content` | The wrapper for the collapsible panel content.
|
|
24
25
|
*
|
|
25
|
-
* The following attributes are
|
|
26
|
+
* The following state attributes are available for styling:
|
|
26
27
|
*
|
|
27
|
-
* Attribute
|
|
28
|
-
*
|
|
29
|
-
* `opened`
|
|
30
|
-
* `disabled`
|
|
31
|
-
* `focus-ring`
|
|
32
|
-
* `focused`
|
|
28
|
+
* Attribute | Description
|
|
29
|
+
* ---------------|------------
|
|
30
|
+
* `opened` | Set when the collapsible content is expanded and visible
|
|
31
|
+
* `disabled` | Set when the element is disabled
|
|
32
|
+
* `focus-ring` | Set when the element is focused using the keyboard
|
|
33
|
+
* `focused` | Set when the element is focused
|
|
34
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
33
35
|
*
|
|
34
36
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
35
37
|
*
|
|
@@ -40,7 +42,7 @@ import { AccordionPanelMixin } from './vaadin-accordion-panel-mixin.js';
|
|
|
40
42
|
* @mixes AccordionPanelMixin
|
|
41
43
|
* @mixes ThemableMixin
|
|
42
44
|
*/
|
|
43
|
-
class AccordionPanel extends AccordionPanelMixin(ThemableMixin(PolylitMixin(LitElement))) {
|
|
45
|
+
class AccordionPanel extends AccordionPanelMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
|
|
44
46
|
static get is() {
|
|
45
47
|
return 'vaadin-accordion-panel';
|
|
46
48
|
}
|
|
@@ -38,7 +38,7 @@ export type AccordionEventMap = AccordionCustomEventMap & HTMLElementEventMap;
|
|
|
38
38
|
* Only one panel can be opened at a time, opening a new one forces
|
|
39
39
|
* previous panel to close and hide its content.
|
|
40
40
|
*
|
|
41
|
-
* ```
|
|
41
|
+
* ```html
|
|
42
42
|
* <vaadin-accordion>
|
|
43
43
|
* <vaadin-accordion-panel>
|
|
44
44
|
* <vaadin-accordion-heading slot="summary">Panel 1</vaadin-accordion-heading>
|
|
@@ -56,15 +56,6 @@ export type AccordionEventMap = AccordionCustomEventMap & HTMLElementEventMap;
|
|
|
56
56
|
* See the [`<vaadin-accordion-panel>`](#/elements/vaadin-accordion-panel)
|
|
57
57
|
* documentation for the available state attributes and stylable shadow parts.
|
|
58
58
|
*
|
|
59
|
-
* **Note:** You can apply the theme to `<vaadin-accordion>` component itself,
|
|
60
|
-
* especially by using the following CSS selector:
|
|
61
|
-
*
|
|
62
|
-
* ```
|
|
63
|
-
* :host ::slotted(vaadin-accordion-panel) {
|
|
64
|
-
* margin-bottom: 5px;
|
|
65
|
-
* }
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
59
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
69
60
|
*
|
|
70
61
|
* @fires {CustomEvent} items-changed - Fired when the `items` property changes.
|
package/src/vaadin-accordion.js
CHANGED
|
@@ -23,7 +23,7 @@ import { AccordionMixin } from './vaadin-accordion-mixin.js';
|
|
|
23
23
|
* Only one panel can be opened at a time, opening a new one forces
|
|
24
24
|
* previous panel to close and hide its content.
|
|
25
25
|
*
|
|
26
|
-
* ```
|
|
26
|
+
* ```html
|
|
27
27
|
* <vaadin-accordion>
|
|
28
28
|
* <vaadin-accordion-panel>
|
|
29
29
|
* <vaadin-accordion-heading slot="summary">Panel 1</vaadin-accordion-heading>
|
|
@@ -41,15 +41,6 @@ import { AccordionMixin } from './vaadin-accordion-mixin.js';
|
|
|
41
41
|
* See the [`<vaadin-accordion-panel>`](#/elements/vaadin-accordion-panel)
|
|
42
42
|
* documentation for the available state attributes and stylable shadow parts.
|
|
43
43
|
*
|
|
44
|
-
* **Note:** You can apply the theme to `<vaadin-accordion>` component itself,
|
|
45
|
-
* especially by using the following CSS selector:
|
|
46
|
-
*
|
|
47
|
-
* ```
|
|
48
|
-
* :host ::slotted(vaadin-accordion-panel) {
|
|
49
|
-
* margin-bottom: 5px;
|
|
50
|
-
* }
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
44
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
54
45
|
*
|
|
55
46
|
* @fires {CustomEvent} items-changed - Fired when the `items` property changes.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './src/vaadin-accordion-heading.js';
|
|
2
2
|
export * from './src/vaadin-accordion-heading.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './src/vaadin-accordion-panel.js';
|
|
2
2
|
export * from './src/vaadin-accordion-panel.js';
|
package/vaadin-accordion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './src/vaadin-accordion.js';
|
|
2
2
|
export * from './src/vaadin-accordion.js';
|
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.0.0-
|
|
4
|
+
"version": "25.0.0-alpha21",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"name": "vaadin-accordion-panel",
|
|
77
|
-
"description": "The accordion panel element.\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n-----------------|----------------\n`content` | The wrapper for the collapsible panel content.\n\nThe following attributes are
|
|
77
|
+
"description": "The accordion panel element.\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n-----------------|----------------\n`content` | The wrapper for the collapsible panel content.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|------------\n`opened` | Set when the collapsible content is expanded and visible\n`disabled` | Set when the element is disabled\n`focus-ring` | Set when the element is focused using the keyboard\n`focused` | Set when the element is focused\n`has-tooltip` | Set when the element has a slotted tooltip\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
78
78
|
"attributes": [
|
|
79
79
|
{
|
|
80
80
|
"name": "opened",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
"name": "vaadin-accordion",
|
|
188
|
-
"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
|
|
188
|
+
"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\nSee the [`<vaadin-accordion-panel>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-accordion-panel)\ndocumentation for the available state attributes and stylable shadow parts.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
189
189
|
"attributes": [
|
|
190
190
|
{
|
|
191
191
|
"name": "opened",
|
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.0.0-
|
|
4
|
+
"version": "25.0.0-alpha21",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"name": "vaadin-accordion-panel",
|
|
40
|
-
"description": "The accordion panel element.\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n-----------------|----------------\n`content` | The wrapper for the collapsible panel content.\n\nThe following attributes are
|
|
40
|
+
"description": "The accordion panel element.\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n-----------------|----------------\n`content` | The wrapper for the collapsible panel content.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|------------\n`opened` | Set when the collapsible content is expanded and visible\n`disabled` | Set when the element is disabled\n`focus-ring` | Set when the element is focused using the keyboard\n`focused` | Set when the element is focused\n`has-tooltip` | Set when the element has a slotted tooltip\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
41
41
|
"extension": true,
|
|
42
42
|
"attributes": [
|
|
43
43
|
{
|
|
@@ -79,7 +79,7 @@
|
|
|
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
|
|
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\nSee the [`<vaadin-accordion-panel>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/elements/vaadin-accordion-panel)\ndocumentation for the available state attributes and stylable shadow parts.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
83
83
|
"extension": true,
|
|
84
84
|
"attributes": [
|
|
85
85
|
{
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2019 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
|
|
8
|
-
export const accordionHeading = css`
|
|
9
|
-
:host {
|
|
10
|
-
display: block;
|
|
11
|
-
outline: none;
|
|
12
|
-
-webkit-user-select: none;
|
|
13
|
-
user-select: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:host([hidden]) {
|
|
17
|
-
display: none !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
button {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: inherit;
|
|
24
|
-
width: 100%;
|
|
25
|
-
margin: 0;
|
|
26
|
-
padding: 0;
|
|
27
|
-
background-color: initial;
|
|
28
|
-
color: inherit;
|
|
29
|
-
border: initial;
|
|
30
|
-
outline: none;
|
|
31
|
-
font: inherit;
|
|
32
|
-
text-align: inherit;
|
|
33
|
-
}
|
|
34
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { detailsSummary } from '@vaadin/details/theme/lumo/vaadin-details-summary-styles.js';
|
|
2
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
3
|
-
|
|
4
|
-
const accordionHeading = css`
|
|
5
|
-
:host {
|
|
6
|
-
padding: 0;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
[part='content'] {
|
|
10
|
-
padding: var(--lumo-space-s) 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([theme~='filled']) {
|
|
14
|
-
padding-top: 0;
|
|
15
|
-
padding-bottom: 0;
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
registerStyles('vaadin-accordion-heading', [detailsSummary, accordionHeading], { moduleId: 'lumo-accordion-heading' });
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
3
|
-
import { details } from '@vaadin/details/theme/lumo/vaadin-details-styles.js';
|
|
4
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
5
|
-
|
|
6
|
-
const accordionPanel = css`
|
|
7
|
-
:host {
|
|
8
|
-
margin: 0;
|
|
9
|
-
border-bottom: solid 1px var(--lumo-contrast-10pct);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
:host(:last-child) {
|
|
13
|
-
border-bottom: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:host([theme~='filled']) {
|
|
17
|
-
border-bottom: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host([theme~='filled']:not(:last-child)) {
|
|
21
|
-
margin-bottom: 2px;
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
registerStyles('vaadin-accordion-panel', [details, accordionPanel], { moduleId: 'lumo-accordion-panel' });
|
|
File without changes
|
|
File without changes
|