@vaadin/accordion 23.2.0-alpha2 → 23.2.0-alpha5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/accordion",
3
- "version": "23.2.0-alpha2",
3
+ "version": "23.2.0-alpha5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,7 +23,9 @@
23
23
  "src",
24
24
  "theme",
25
25
  "vaadin-*.d.ts",
26
- "vaadin-*.js"
26
+ "vaadin-*.js",
27
+ "web-types.json",
28
+ "web-types.lit.json"
27
29
  ],
28
30
  "keywords": [
29
31
  "Vaadin",
@@ -34,16 +36,20 @@
34
36
  ],
35
37
  "dependencies": {
36
38
  "@polymer/polymer": "^3.0.0",
37
- "@vaadin/component-base": "23.2.0-alpha2",
38
- "@vaadin/details": "23.2.0-alpha2",
39
- "@vaadin/vaadin-lumo-styles": "23.2.0-alpha2",
40
- "@vaadin/vaadin-material-styles": "23.2.0-alpha2",
41
- "@vaadin/vaadin-themable-mixin": "23.2.0-alpha2"
39
+ "@vaadin/component-base": "23.2.0-alpha5",
40
+ "@vaadin/details": "23.2.0-alpha5",
41
+ "@vaadin/vaadin-lumo-styles": "23.2.0-alpha5",
42
+ "@vaadin/vaadin-material-styles": "23.2.0-alpha5",
43
+ "@vaadin/vaadin-themable-mixin": "23.2.0-alpha5"
42
44
  },
43
45
  "devDependencies": {
44
46
  "@esm-bundle/chai": "^4.3.4",
45
47
  "@vaadin/testing-helpers": "^0.3.2",
46
48
  "sinon": "^13.0.2"
47
49
  },
48
- "gitHead": "c9b8113d0fa9a602f8b9cb915c1826355af2e8df"
50
+ "web-types": [
51
+ "web-types.json",
52
+ "web-types.lit.json"
53
+ ],
54
+ "gitHead": "c6247fd741d61096d75a71feda4a1faf88b6f0ce"
49
55
  }
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
7
7
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
- import { AccordionPanel } from './vaadin-accordion-panel.js';
8
+ import type { AccordionPanel } from './vaadin-accordion-panel.js';
9
9
 
10
10
  /**
11
11
  * Fired when the `items` property changes.
@@ -23,7 +23,7 @@ export interface AccordionCustomEventMap {
23
23
  'opened-changed': AccordionOpenedChangedEvent;
24
24
  }
25
25
 
26
- export type AccordionEventMap = HTMLElementEventMap & AccordionCustomEventMap;
26
+ export type AccordionEventMap = AccordionCustomEventMap & HTMLElementEventMap;
27
27
 
28
28
  /**
29
29
  * `<vaadin-accordion>` is a Web Component implementing accordion widget —
@@ -87,13 +87,13 @@ declare class Accordion extends ElementMixin(ThemableMixin(HTMLElement)) {
87
87
  addEventListener<K extends keyof AccordionEventMap>(
88
88
  type: K,
89
89
  listener: (this: Accordion, ev: AccordionEventMap[K]) => void,
90
- options?: boolean | AddEventListenerOptions,
90
+ options?: AddEventListenerOptions | boolean,
91
91
  ): void;
92
92
 
93
93
  removeEventListener<K extends keyof AccordionEventMap>(
94
94
  type: K,
95
95
  listener: (this: Accordion, ev: AccordionEventMap[K]) => void,
96
- options?: boolean | EventListenerOptions,
96
+ options?: EventListenerOptions | boolean,
97
97
  ): void;
98
98
  }
99
99
 
package/web-types.json ADDED
@@ -0,0 +1,150 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/accordion",
4
+ "version": "23.2.0-alpha5",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
10
+ "name": "vaadin-accordion-panel",
11
+ "description": "The accordion panel element.\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n-----------------|----------------\n`summary` | The element used to open and close collapsible content.\n`toggle` | The element used as indicator, can represent an icon.\n`summary-content`| The wrapper for the slotted summary content.\n`content` | The wrapper for the collapsible panel content.\n\nThe following attributes are exposed 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\nSee [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.",
12
+ "attributes": [
13
+ {
14
+ "name": "disabled",
15
+ "description": "If true, the user cannot interact with this element.",
16
+ "value": {
17
+ "type": [
18
+ "boolean",
19
+ "null",
20
+ "undefined"
21
+ ]
22
+ }
23
+ },
24
+ {
25
+ "name": "autofocus",
26
+ "description": "Specify that this control should have input focus when the page loads.",
27
+ "value": {
28
+ "type": [
29
+ "boolean",
30
+ "null",
31
+ "undefined"
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "name": "opened",
37
+ "description": "If true, the details content is visible.",
38
+ "value": {
39
+ "type": [
40
+ "boolean"
41
+ ]
42
+ }
43
+ },
44
+ {
45
+ "name": "theme",
46
+ "description": "The theme variants to apply to the component.",
47
+ "value": {
48
+ "type": [
49
+ "string",
50
+ "null",
51
+ "undefined"
52
+ ]
53
+ }
54
+ }
55
+ ],
56
+ "js": {
57
+ "properties": [
58
+ {
59
+ "name": "disabled",
60
+ "description": "If true, the user cannot interact with this element.",
61
+ "value": {
62
+ "type": [
63
+ "boolean",
64
+ "null",
65
+ "undefined"
66
+ ]
67
+ }
68
+ },
69
+ {
70
+ "name": "autofocus",
71
+ "description": "Specify that this control should have input focus when the page loads.",
72
+ "value": {
73
+ "type": [
74
+ "boolean",
75
+ "null",
76
+ "undefined"
77
+ ]
78
+ }
79
+ },
80
+ {
81
+ "name": "opened",
82
+ "description": "If true, the details content is visible.",
83
+ "value": {
84
+ "type": [
85
+ "boolean"
86
+ ]
87
+ }
88
+ }
89
+ ],
90
+ "events": [
91
+ {
92
+ "name": "opened-changed",
93
+ "description": "Fired when the `opened` property changes."
94
+ }
95
+ ]
96
+ }
97
+ },
98
+ {
99
+ "name": "vaadin-accordion",
100
+ "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```\n<vaadin-accordion>\n <vaadin-accordion-panel>\n <div slot=\"summary\">Panel 1</div>\n This panel is opened, so the text is visible by default.\n </vaadin-accordion-panel>\n <vaadin-accordion-panel>\n <div slot=\"summary\">Panel 2</div>\n After opening this panel, the first one becomes closed.\n </vaadin-accordion-panel>\n</vaadin-accordion>\n```\n\n### Styling\n\nSee the [`<vaadin-accordion-panel>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-alpha5/#/elements/vaadin-accordion-panel)\ndocumentation for the available state attributes and stylable shadow parts.\n\n**Note:** You can apply the theme to `<vaadin-accordion>` component itself,\nespecially by using the following CSS selector:\n\n```\n:host ::slotted(vaadin-accordion-panel) {\n margin-bottom: 5px;\n}\n```\n\nSee [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.",
101
+ "attributes": [
102
+ {
103
+ "name": "opened",
104
+ "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.",
105
+ "value": {
106
+ "type": [
107
+ "number"
108
+ ]
109
+ }
110
+ },
111
+ {
112
+ "name": "theme",
113
+ "description": "The theme variants to apply to the component.",
114
+ "value": {
115
+ "type": [
116
+ "string",
117
+ "null",
118
+ "undefined"
119
+ ]
120
+ }
121
+ }
122
+ ],
123
+ "js": {
124
+ "properties": [
125
+ {
126
+ "name": "opened",
127
+ "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.",
128
+ "value": {
129
+ "type": [
130
+ "number"
131
+ ]
132
+ }
133
+ }
134
+ ],
135
+ "events": [
136
+ {
137
+ "name": "opened-changed",
138
+ "description": "Fired when the `opened` property changes."
139
+ },
140
+ {
141
+ "name": "items-changed",
142
+ "description": "Fired when the `items` property changes."
143
+ }
144
+ ]
145
+ }
146
+ }
147
+ ]
148
+ }
149
+ }
150
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/accordion",
4
+ "version": "23.2.0-alpha5",
5
+ "description-markup": "markdown",
6
+ "framework": "lit",
7
+ "framework-config": {
8
+ "enable-when": {
9
+ "node-packages": [
10
+ "lit"
11
+ ]
12
+ }
13
+ },
14
+ "contributions": {
15
+ "html": {
16
+ "elements": [
17
+ {
18
+ "name": "vaadin-accordion-panel",
19
+ "description": "The accordion panel element.\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n-----------------|----------------\n`summary` | The element used to open and close collapsible content.\n`toggle` | The element used as indicator, can represent an icon.\n`summary-content`| The wrapper for the slotted summary content.\n`content` | The wrapper for the collapsible panel content.\n\nThe following attributes are exposed 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\nSee [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.",
20
+ "extension": true,
21
+ "attributes": [
22
+ {
23
+ "name": "?disabled",
24
+ "description": "If true, the user cannot interact with this element.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
29
+ {
30
+ "name": "?autofocus",
31
+ "description": "Specify that this control should have input focus when the page loads.",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
36
+ {
37
+ "name": "?opened",
38
+ "description": "If true, the details content is visible.",
39
+ "value": {
40
+ "kind": "expression"
41
+ }
42
+ },
43
+ {
44
+ "name": "@opened-changed",
45
+ "description": "Fired when the `opened` property changes.",
46
+ "value": {
47
+ "kind": "expression"
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "name": "vaadin-accordion",
54
+ "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```\n<vaadin-accordion>\n <vaadin-accordion-panel>\n <div slot=\"summary\">Panel 1</div>\n This panel is opened, so the text is visible by default.\n </vaadin-accordion-panel>\n <vaadin-accordion-panel>\n <div slot=\"summary\">Panel 2</div>\n After opening this panel, the first one becomes closed.\n </vaadin-accordion-panel>\n</vaadin-accordion>\n```\n\n### Styling\n\nSee the [`<vaadin-accordion-panel>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-alpha5/#/elements/vaadin-accordion-panel)\ndocumentation for the available state attributes and stylable shadow parts.\n\n**Note:** You can apply the theme to `<vaadin-accordion>` component itself,\nespecially by using the following CSS selector:\n\n```\n:host ::slotted(vaadin-accordion-panel) {\n margin-bottom: 5px;\n}\n```\n\nSee [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.",
55
+ "extension": true,
56
+ "attributes": [
57
+ {
58
+ "name": ".opened",
59
+ "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.",
60
+ "value": {
61
+ "kind": "expression"
62
+ }
63
+ },
64
+ {
65
+ "name": "@opened-changed",
66
+ "description": "Fired when the `opened` property changes.",
67
+ "value": {
68
+ "kind": "expression"
69
+ }
70
+ },
71
+ {
72
+ "name": "@items-changed",
73
+ "description": "Fired when the `items` property changes.",
74
+ "value": {
75
+ "kind": "expression"
76
+ }
77
+ }
78
+ ]
79
+ }
80
+ ]
81
+ }
82
+ }
83
+ }