@vaadin/message-list 25.1.0-alpha8 → 25.1.0-alpha9

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/message-list",
3
- "version": "25.1.0-alpha8",
3
+ "version": "25.1.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,19 +37,19 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.1.0-alpha8",
41
- "@vaadin/avatar": "25.1.0-alpha8",
42
- "@vaadin/component-base": "25.1.0-alpha8",
43
- "@vaadin/markdown": "25.1.0-alpha8",
44
- "@vaadin/vaadin-themable-mixin": "25.1.0-alpha8",
40
+ "@vaadin/a11y-base": "25.1.0-alpha9",
41
+ "@vaadin/avatar": "25.1.0-alpha9",
42
+ "@vaadin/component-base": "25.1.0-alpha9",
43
+ "@vaadin/markdown": "25.1.0-alpha9",
44
+ "@vaadin/vaadin-themable-mixin": "25.1.0-alpha9",
45
45
  "lit": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vaadin/aura": "25.1.0-alpha8",
49
- "@vaadin/chai-plugins": "25.1.0-alpha8",
50
- "@vaadin/test-runner-commands": "25.1.0-alpha8",
48
+ "@vaadin/aura": "25.1.0-alpha9",
49
+ "@vaadin/chai-plugins": "25.1.0-alpha9",
50
+ "@vaadin/test-runner-commands": "25.1.0-alpha9",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "25.1.0-alpha8",
52
+ "@vaadin/vaadin-lumo-styles": "25.1.0-alpha9",
53
53
  "sinon": "^21.0.0"
54
54
  },
55
55
  "customElements": "custom-elements.json",
@@ -57,5 +57,5 @@
57
57
  "web-types.json",
58
58
  "web-types.lit.json"
59
59
  ],
60
- "gitHead": "810590c9c7682a9326c9352df795b5ea4891a71f"
60
+ "gitHead": "ef432311376ba3dac4233cb23d393a49a425e0a4"
61
61
  }
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-list",
4
- "version": "25.1.0-alpha8",
4
+ "version": "25.1.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -11,8 +11,8 @@
11
11
  "description": "`<vaadin-message>` is a Web Component for showing a single message with an author, message and time.\n\n```html\n<vaadin-message time=\"2021-01-28 10:43\"\n user-name = \"Bob Ross\"\n user-abbr = \"BR\"\n user-img = \"/static/img/avatar.jpg\">There is no real ending. It's just the place where you stop the story.</vaadin-message>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n--------------------|----------------\n`name` | Author's name\n`time` | When the message was posted\n`content` | The message itself as a slotted content\n`attachments` | Container for the attachments\n`attachment` | Individual attachment button\n`attachment-image` | Image attachment button (in addition to `attachment`)\n`attachment-file` | File attachment button (in addition to `attachment`)\n`attachment-preview`| Image preview inside an image attachment\n`attachment-icon` | File icon inside a file attachment\n`attachment-name` | File name inside a file attachment\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|-------------\n`focus-ring` | Set when the message is focused using the keyboard.\n`focused` | Set when the message is focused.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
- "name": "time",
15
- "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
14
+ "name": "theme",
15
+ "description": "The theme variants to apply to the component.",
16
16
  "value": {
17
17
  "type": [
18
18
  "string",
@@ -22,8 +22,8 @@
22
22
  }
23
23
  },
24
24
  {
25
- "name": "user-name",
26
- "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
25
+ "name": "time",
26
+ "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
27
27
  "value": {
28
28
  "type": [
29
29
  "string",
@@ -44,30 +44,30 @@
44
44
  }
45
45
  },
46
46
  {
47
- "name": "user-img",
48
- "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
47
+ "name": "user-color-index",
48
+ "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
49
49
  "value": {
50
50
  "type": [
51
- "string",
51
+ "number",
52
52
  "null",
53
53
  "undefined"
54
54
  ]
55
55
  }
56
56
  },
57
57
  {
58
- "name": "user-color-index",
59
- "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
58
+ "name": "user-img",
59
+ "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
60
60
  "value": {
61
61
  "type": [
62
- "number",
62
+ "string",
63
63
  "null",
64
64
  "undefined"
65
65
  ]
66
66
  }
67
67
  },
68
68
  {
69
- "name": "theme",
70
- "description": "The theme variants to apply to the component.",
69
+ "name": "user-name",
70
+ "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
71
71
  "value": {
72
72
  "type": [
73
73
  "string",
@@ -80,19 +80,19 @@
80
80
  "js": {
81
81
  "properties": [
82
82
  {
83
- "name": "time",
84
- "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
83
+ "name": "attachments",
84
+ "description": "An array of attachment objects to display with the message.\nEach attachment object can have the following properties:\n- `name`: The name of the attachment file\n- `url`: The URL of the attachment\n- `type`: The MIME type of the attachment (e.g., 'image/png', 'application/pdf')\n\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.",
85
85
  "value": {
86
86
  "type": [
87
- "string",
87
+ "Array",
88
88
  "null",
89
89
  "undefined"
90
90
  ]
91
91
  }
92
92
  },
93
93
  {
94
- "name": "userName",
95
- "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
94
+ "name": "time",
95
+ "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
96
96
  "value": {
97
97
  "type": [
98
98
  "string",
@@ -113,33 +113,33 @@
113
113
  }
114
114
  },
115
115
  {
116
- "name": "userImg",
117
- "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
116
+ "name": "userColorIndex",
117
+ "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
118
118
  "value": {
119
119
  "type": [
120
- "string",
120
+ "number",
121
121
  "null",
122
122
  "undefined"
123
123
  ]
124
124
  }
125
125
  },
126
126
  {
127
- "name": "userColorIndex",
128
- "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
127
+ "name": "userImg",
128
+ "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
129
129
  "value": {
130
130
  "type": [
131
- "number",
131
+ "string",
132
132
  "null",
133
133
  "undefined"
134
134
  ]
135
135
  }
136
136
  },
137
137
  {
138
- "name": "attachments",
139
- "description": "An array of attachment objects to display with the message.\nEach attachment object can have the following properties:\n- `name`: The name of the attachment file\n- `url`: The URL of the attachment\n- `type`: The MIME type of the attachment (e.g., 'image/png', 'application/pdf')\n\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.",
138
+ "name": "userName",
139
+ "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
140
140
  "value": {
141
141
  "type": [
142
- "Array",
142
+ "string",
143
143
  "null",
144
144
  "undefined"
145
145
  ]
@@ -151,11 +151,11 @@
151
151
  },
152
152
  {
153
153
  "name": "vaadin-message-list",
154
- "description": "`<vaadin-message-list>` is a Web Component for showing an ordered list of messages. The messages are rendered as <vaadin-message>\n\n### Example\n\nTo create a new message list, add the component to the page:\n\n```html\n<vaadin-message-list></vaadin-message-list>\n```\n\nProvide the messages to the message list with the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha8/#/elements/vaadin-message-list#property-items) property.\n\n```js\ndocument.querySelector('vaadin-message-list').items = [\n { text: 'Hello list', time: 'yesterday', userName: 'Matt Mambo', userAbbr: 'MM', userColorIndex: 1 },\n { text: 'Another message', time: 'right now', userName: 'Linsey Listy', userAbbr: 'LL', userColorIndex: 2, userImg: '/static/img/avatar.jpg' }\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------|----------------\n`list` | The container wrapping messages.\n\nSee the [`<vaadin-message>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha8/#/elements/vaadin-message) documentation for the available\nstate attributes and stylable shadow parts of message elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
154
+ "description": "`<vaadin-message-list>` is a Web Component for showing an ordered list of messages. The messages are rendered as <vaadin-message>\n\n### Example\n\nTo create a new message list, add the component to the page:\n\n```html\n<vaadin-message-list></vaadin-message-list>\n```\n\nProvide the messages to the message list with the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-message-list#property-items) property.\n\n```js\ndocument.querySelector('vaadin-message-list').items = [\n { text: 'Hello list', time: 'yesterday', userName: 'Matt Mambo', userAbbr: 'MM', userColorIndex: 1 },\n { text: 'Another message', time: 'right now', userName: 'Linsey Listy', userAbbr: 'LL', userColorIndex: 2, userImg: '/static/img/avatar.jpg' }\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------|----------------\n`list` | The container wrapping messages.\n\nSee the [`<vaadin-message>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-message) documentation for the available\nstate attributes and stylable shadow parts of message elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
155
155
  "attributes": [
156
156
  {
157
- "name": "markdown",
158
- "description": "When set to `true`, the message text is parsed as Markdown.",
157
+ "name": "announce-messages",
158
+ "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
159
159
  "value": {
160
160
  "type": [
161
161
  "boolean"
@@ -163,8 +163,8 @@
163
163
  }
164
164
  },
165
165
  {
166
- "name": "announce-messages",
167
- "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
166
+ "name": "markdown",
167
+ "description": "When set to `true`, the message text is parsed as Markdown.",
168
168
  "value": {
169
169
  "type": [
170
170
  "boolean"
@@ -185,6 +185,15 @@
185
185
  ],
186
186
  "js": {
187
187
  "properties": [
188
+ {
189
+ "name": "announceMessages",
190
+ "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
191
+ "value": {
192
+ "type": [
193
+ "boolean"
194
+ ]
195
+ }
196
+ },
188
197
  {
189
198
  "name": "items",
190
199
  "description": "An array of objects which will be rendered as messages.\nThe message objects can have the following properties:\n```js\nArray<{\n text: string,\n time: string,\n userName: string,\n userAbbr: string,\n userImg: string,\n userColorIndex: number,\n className: string,\n theme: string,\n attachments: Array<{\n name: string,\n url: string,\n type: string\n }>\n}>\n```\n\nWhen a message has attachments, they are rendered in the message's shadow DOM.\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.\nClicking an attachment dispatches an `attachment-click` event.",
@@ -204,15 +213,6 @@
204
213
  "boolean"
205
214
  ]
206
215
  }
207
- },
208
- {
209
- "name": "announceMessages",
210
- "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
211
- "value": {
212
- "type": [
213
- "boolean"
214
- ]
215
- }
216
216
  }
217
217
  ],
218
218
  "events": []
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-list",
4
- "version": "25.1.0-alpha8",
4
+ "version": "25.1.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -20,15 +20,15 @@
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
23
- "name": ".time",
24
- "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
23
+ "name": ".attachments",
24
+ "description": "An array of attachment objects to display with the message.\nEach attachment object can have the following properties:\n- `name`: The name of the attachment file\n- `url`: The URL of the attachment\n- `type`: The MIME type of the attachment (e.g., 'image/png', 'application/pdf')\n\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.",
25
25
  "value": {
26
26
  "kind": "expression"
27
27
  }
28
28
  },
29
29
  {
30
- "name": ".userName",
31
- "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
30
+ "name": ".time",
31
+ "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
32
32
  "value": {
33
33
  "kind": "expression"
34
34
  }
@@ -41,22 +41,22 @@
41
41
  }
42
42
  },
43
43
  {
44
- "name": ".userImg",
45
- "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
44
+ "name": ".userColorIndex",
45
+ "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
46
46
  "value": {
47
47
  "kind": "expression"
48
48
  }
49
49
  },
50
50
  {
51
- "name": ".userColorIndex",
52
- "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
51
+ "name": ".userImg",
52
+ "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
53
53
  "value": {
54
54
  "kind": "expression"
55
55
  }
56
56
  },
57
57
  {
58
- "name": ".attachments",
59
- "description": "An array of attachment objects to display with the message.\nEach attachment object can have the following properties:\n- `name`: The name of the attachment file\n- `url`: The URL of the attachment\n- `type`: The MIME type of the attachment (e.g., 'image/png', 'application/pdf')\n\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.",
58
+ "name": ".userName",
59
+ "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
60
60
  "value": {
61
61
  "kind": "expression"
62
62
  }
@@ -65,19 +65,19 @@
65
65
  },
66
66
  {
67
67
  "name": "vaadin-message-list",
68
- "description": "`<vaadin-message-list>` is a Web Component for showing an ordered list of messages. The messages are rendered as <vaadin-message>\n\n### Example\n\nTo create a new message list, add the component to the page:\n\n```html\n<vaadin-message-list></vaadin-message-list>\n```\n\nProvide the messages to the message list with the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha8/#/elements/vaadin-message-list#property-items) property.\n\n```js\ndocument.querySelector('vaadin-message-list').items = [\n { text: 'Hello list', time: 'yesterday', userName: 'Matt Mambo', userAbbr: 'MM', userColorIndex: 1 },\n { text: 'Another message', time: 'right now', userName: 'Linsey Listy', userAbbr: 'LL', userColorIndex: 2, userImg: '/static/img/avatar.jpg' }\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------|----------------\n`list` | The container wrapping messages.\n\nSee the [`<vaadin-message>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha8/#/elements/vaadin-message) documentation for the available\nstate attributes and stylable shadow parts of message elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
68
+ "description": "`<vaadin-message-list>` is a Web Component for showing an ordered list of messages. The messages are rendered as <vaadin-message>\n\n### Example\n\nTo create a new message list, add the component to the page:\n\n```html\n<vaadin-message-list></vaadin-message-list>\n```\n\nProvide the messages to the message list with the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-message-list#property-items) property.\n\n```js\ndocument.querySelector('vaadin-message-list').items = [\n { text: 'Hello list', time: 'yesterday', userName: 'Matt Mambo', userAbbr: 'MM', userColorIndex: 1 },\n { text: 'Another message', time: 'right now', userName: 'Linsey Listy', userAbbr: 'LL', userColorIndex: 2, userImg: '/static/img/avatar.jpg' }\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------|----------------\n`list` | The container wrapping messages.\n\nSee the [`<vaadin-message>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha9/#/elements/vaadin-message) documentation for the available\nstate attributes and stylable shadow parts of message elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
69
69
  "extension": true,
70
70
  "attributes": [
71
71
  {
72
- "name": "?markdown",
73
- "description": "When set to `true`, the message text is parsed as Markdown.",
72
+ "name": "?announceMessages",
73
+ "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
74
74
  "value": {
75
75
  "kind": "expression"
76
76
  }
77
77
  },
78
78
  {
79
- "name": "?announceMessages",
80
- "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
79
+ "name": "?markdown",
80
+ "description": "When set to `true`, the message text is parsed as Markdown.",
81
81
  "value": {
82
82
  "kind": "expression"
83
83
  }