@vaadin/message-list 25.2.0-alpha1 → 25.2.0-alpha3
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 +5 -5
- package/package.json +11 -11
- package/src/vaadin-message-mixin.d.ts +0 -15
- package/src/vaadin-message-mixin.js +0 -15
- package/src/vaadin-message.d.ts +8 -4
- package/src/vaadin-message.js +8 -4
- package/web-types.json +5 -5
- package/web-types.lit.json +4 -4
package/custom-elements.json
CHANGED
|
@@ -320,7 +320,7 @@
|
|
|
320
320
|
"type": {
|
|
321
321
|
"text": "number"
|
|
322
322
|
},
|
|
323
|
-
"description": "A color index to be used to render the color of the avatar
|
|
323
|
+
"description": "A color index to be used to render the color of the avatar.",
|
|
324
324
|
"attribute": "user-color-index"
|
|
325
325
|
},
|
|
326
326
|
{
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
"type": {
|
|
375
375
|
"text": "number"
|
|
376
376
|
},
|
|
377
|
-
"description": "A color index to be used to render the color of the avatar
|
|
377
|
+
"description": "A color index to be used to render the color of the avatar.",
|
|
378
378
|
"fieldName": "userColorIndex"
|
|
379
379
|
},
|
|
380
380
|
{
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
"declarations": [
|
|
425
425
|
{
|
|
426
426
|
"kind": "class",
|
|
427
|
-
"description": "`<vaadin-message>` is a Web Component for showing a single message with an author, message and time.\n\n```html\n<vaadin-message
|
|
427
|
+
"description": "`<vaadin-message>` is a Web Component for showing a single message with an author, message and time.\n\n```html\n<vaadin-message\n time=\"2021-01-28 10:43\"\n user-name=\"Bob Ross\"\n user-abbr=\"BR\"\n user-img=\"/static/img/avatar.jpg\"\n>\n There is no real ending. It's just the place where you stop the story.\n</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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:------------------------------------------- |\n`--vaadin-message-attachment-background` |\n`--vaadin-message-attachment-border-color` |\n`--vaadin-message-attachment-border-radius` |\n`--vaadin-message-attachment-border-width` |\n`--vaadin-message-attachment-font-size` |\n`--vaadin-message-attachment-font-weight` |\n`--vaadin-message-attachment-gap` |\n`--vaadin-message-attachment-line-height` |\n`--vaadin-message-attachment-padding` |\n`--vaadin-message-attachment-text-color` |\n`--vaadin-message-font-size` |\n`--vaadin-message-font-weight` |\n`--vaadin-message-gap` |\n`--vaadin-message-header-line-height` |\n`--vaadin-message-line-height` |\n`--vaadin-message-name-color` |\n`--vaadin-message-name-font-size` |\n`--vaadin-message-name-font-weight` |\n`--vaadin-message-padding` |\n`--vaadin-message-text-color` |\n`--vaadin-message-time-color` |\n`--vaadin-message-time-font-size` |\n`--vaadin-message-time-font-weight` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
428
428
|
"name": "Message",
|
|
429
429
|
"members": [
|
|
430
430
|
{
|
|
@@ -476,7 +476,7 @@
|
|
|
476
476
|
"type": {
|
|
477
477
|
"text": "number"
|
|
478
478
|
},
|
|
479
|
-
"description": "A color index to be used to render the color of the avatar
|
|
479
|
+
"description": "A color index to be used to render the color of the avatar.",
|
|
480
480
|
"attribute": "user-color-index",
|
|
481
481
|
"inheritedFrom": {
|
|
482
482
|
"name": "MessageMixin",
|
|
@@ -583,7 +583,7 @@
|
|
|
583
583
|
"type": {
|
|
584
584
|
"text": "number"
|
|
585
585
|
},
|
|
586
|
-
"description": "A color index to be used to render the color of the avatar
|
|
586
|
+
"description": "A color index to be used to render the color of the avatar.",
|
|
587
587
|
"fieldName": "userColorIndex",
|
|
588
588
|
"inheritedFrom": {
|
|
589
589
|
"name": "MessageMixin",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/message-list",
|
|
3
|
-
"version": "25.2.0-
|
|
3
|
+
"version": "25.2.0-alpha3",
|
|
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.2.0-
|
|
41
|
-
"@vaadin/avatar": "25.2.0-
|
|
42
|
-
"@vaadin/component-base": "25.2.0-
|
|
43
|
-
"@vaadin/markdown": "25.2.0-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "25.2.0-
|
|
40
|
+
"@vaadin/a11y-base": "25.2.0-alpha3",
|
|
41
|
+
"@vaadin/avatar": "25.2.0-alpha3",
|
|
42
|
+
"@vaadin/component-base": "25.2.0-alpha3",
|
|
43
|
+
"@vaadin/markdown": "25.2.0-alpha3",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-alpha3",
|
|
45
45
|
"lit": "^3.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@vaadin/aura": "25.2.0-
|
|
49
|
-
"@vaadin/chai-plugins": "25.2.0-
|
|
50
|
-
"@vaadin/test-runner-commands": "25.2.0-
|
|
48
|
+
"@vaadin/aura": "25.2.0-alpha3",
|
|
49
|
+
"@vaadin/chai-plugins": "25.2.0-alpha3",
|
|
50
|
+
"@vaadin/test-runner-commands": "25.2.0-alpha3",
|
|
51
51
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
52
|
-
"@vaadin/vaadin-lumo-styles": "25.2.0-
|
|
52
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-alpha3",
|
|
53
53
|
"sinon": "^21.0.2"
|
|
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": "
|
|
60
|
+
"gitHead": "6ba3d66b9eeb541945dc071e72e05dac2d4c3e0b"
|
|
61
61
|
}
|
|
@@ -56,22 +56,7 @@ export declare class MessageMixinClass {
|
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* A color index to be used to render the color of the avatar.
|
|
59
|
-
* With no `userColorIndex` set, the basic avatar color will be used.
|
|
60
|
-
* By setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.
|
|
61
|
-
* If now CSS variable is found for the color index, the property for the color will not be set.
|
|
62
59
|
*
|
|
63
|
-
* Example:
|
|
64
|
-
* CSS:
|
|
65
|
-
* ```css
|
|
66
|
-
* html {
|
|
67
|
-
* --vaadin-user-color-1: red;
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
|
-
*
|
|
71
|
-
* JavaScript:
|
|
72
|
-
* ```js
|
|
73
|
-
* message.userColorIndex = 1;
|
|
74
|
-
* ```
|
|
75
60
|
* @attr {number} user-color-index
|
|
76
61
|
*/
|
|
77
62
|
userColorIndex: number | null | undefined;
|
|
@@ -58,22 +58,7 @@ export const MessageMixin = (superClass) =>
|
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* A color index to be used to render the color of the avatar.
|
|
61
|
-
* With no `userColorIndex` set, the basic avatar color will be used.
|
|
62
|
-
* By setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.
|
|
63
|
-
* If now CSS variable is found for the color index, the property for the color will not be set.
|
|
64
61
|
*
|
|
65
|
-
* Example:
|
|
66
|
-
* CSS:
|
|
67
|
-
* ```css
|
|
68
|
-
* html {
|
|
69
|
-
* --vaadin-user-color-1: red;
|
|
70
|
-
* }
|
|
71
|
-
* ```
|
|
72
|
-
*
|
|
73
|
-
* JavaScript:
|
|
74
|
-
* ```js
|
|
75
|
-
* message.userColorIndex = 1;
|
|
76
|
-
* ```
|
|
77
62
|
* @attr {number} user-color-index
|
|
78
63
|
*/
|
|
79
64
|
userColorIndex: {
|
package/src/vaadin-message.d.ts
CHANGED
|
@@ -17,10 +17,14 @@ export type MessageEventMap = HTMLElementEventMap & {
|
|
|
17
17
|
* `<vaadin-message>` is a Web Component for showing a single message with an author, message and time.
|
|
18
18
|
*
|
|
19
19
|
* ```html
|
|
20
|
-
* <vaadin-message
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* <vaadin-message
|
|
21
|
+
* time="2021-01-28 10:43"
|
|
22
|
+
* user-name="Bob Ross"
|
|
23
|
+
* user-abbr="BR"
|
|
24
|
+
* user-img="/static/img/avatar.jpg"
|
|
25
|
+
* >
|
|
26
|
+
* There is no real ending. It's just the place where you stop the story.
|
|
27
|
+
* </vaadin-message>
|
|
24
28
|
* ```
|
|
25
29
|
*
|
|
26
30
|
* ### Styling
|
package/src/vaadin-message.js
CHANGED
|
@@ -17,10 +17,14 @@ import { MessageMixin } from './vaadin-message-mixin.js';
|
|
|
17
17
|
* `<vaadin-message>` is a Web Component for showing a single message with an author, message and time.
|
|
18
18
|
*
|
|
19
19
|
* ```html
|
|
20
|
-
* <vaadin-message
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* <vaadin-message
|
|
21
|
+
* time="2021-01-28 10:43"
|
|
22
|
+
* user-name="Bob Ross"
|
|
23
|
+
* user-abbr="BR"
|
|
24
|
+
* user-img="/static/img/avatar.jpg"
|
|
25
|
+
* >
|
|
26
|
+
* There is no real ending. It's just the place where you stop the story.
|
|
27
|
+
* </vaadin-message>
|
|
24
28
|
* ```
|
|
25
29
|
*
|
|
26
30
|
* ### Styling
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/message-list",
|
|
4
|
-
"version": "25.2.0-
|
|
4
|
+
"version": "25.2.0-alpha3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-message",
|
|
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
|
|
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\n time=\"2021-01-28 10:43\"\n user-name=\"Bob Ross\"\n user-abbr=\"BR\"\n user-img=\"/static/img/avatar.jpg\"\n>\n There is no real ending. It's just the place where you stop the story.\n</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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:------------------------------------------- |\n`--vaadin-message-attachment-background` |\n`--vaadin-message-attachment-border-color` |\n`--vaadin-message-attachment-border-radius` |\n`--vaadin-message-attachment-border-width` |\n`--vaadin-message-attachment-font-size` |\n`--vaadin-message-attachment-font-weight` |\n`--vaadin-message-attachment-gap` |\n`--vaadin-message-attachment-line-height` |\n`--vaadin-message-attachment-padding` |\n`--vaadin-message-attachment-text-color` |\n`--vaadin-message-font-size` |\n`--vaadin-message-font-weight` |\n`--vaadin-message-gap` |\n`--vaadin-message-header-line-height` |\n`--vaadin-message-line-height` |\n`--vaadin-message-name-color` |\n`--vaadin-message-name-font-size` |\n`--vaadin-message-name-font-weight` |\n`--vaadin-message-padding` |\n`--vaadin-message-text-color` |\n`--vaadin-message-time-color` |\n`--vaadin-message-time-font-size` |\n`--vaadin-message-time-font-weight` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "theme",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"name": "user-color-index",
|
|
48
|
-
"description": "A color index to be used to render the color of the avatar
|
|
48
|
+
"description": "A color index to be used to render the color of the avatar.",
|
|
49
49
|
"value": {
|
|
50
50
|
"type": [
|
|
51
51
|
"number",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
"name": "userColorIndex",
|
|
117
|
-
"description": "A color index to be used to render the color of the avatar
|
|
117
|
+
"description": "A color index to be used to render the color of the avatar.",
|
|
118
118
|
"value": {
|
|
119
119
|
"type": [
|
|
120
120
|
"number",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
"name": "vaadin-message-list",
|
|
159
|
-
"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.2.0-
|
|
159
|
+
"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.2.0-alpha3/#/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.2.0-alpha3/#/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.",
|
|
160
160
|
"attributes": [
|
|
161
161
|
{
|
|
162
162
|
"name": "announce-messages",
|
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/message-list",
|
|
4
|
-
"version": "25.2.0-
|
|
4
|
+
"version": "25.2.0-alpha3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-message",
|
|
19
|
-
"description": "`<vaadin-message>` is a Web Component for showing a single message with an author, message and time.\n\n```html\n<vaadin-message
|
|
19
|
+
"description": "`<vaadin-message>` is a Web Component for showing a single message with an author, message and time.\n\n```html\n<vaadin-message\n time=\"2021-01-28 10:43\"\n user-name=\"Bob Ross\"\n user-abbr=\"BR\"\n user-img=\"/static/img/avatar.jpg\"\n>\n There is no real ending. It's just the place where you stop the story.\n</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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:------------------------------------------- |\n`--vaadin-message-attachment-background` |\n`--vaadin-message-attachment-border-color` |\n`--vaadin-message-attachment-border-radius` |\n`--vaadin-message-attachment-border-width` |\n`--vaadin-message-attachment-font-size` |\n`--vaadin-message-attachment-font-weight` |\n`--vaadin-message-attachment-gap` |\n`--vaadin-message-attachment-line-height` |\n`--vaadin-message-attachment-padding` |\n`--vaadin-message-attachment-text-color` |\n`--vaadin-message-font-size` |\n`--vaadin-message-font-weight` |\n`--vaadin-message-gap` |\n`--vaadin-message-header-line-height` |\n`--vaadin-message-line-height` |\n`--vaadin-message-name-color` |\n`--vaadin-message-name-font-size` |\n`--vaadin-message-name-font-weight` |\n`--vaadin-message-padding` |\n`--vaadin-message-text-color` |\n`--vaadin-message-time-color` |\n`--vaadin-message-time-font-size` |\n`--vaadin-message-time-font-weight` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"name": ".userColorIndex",
|
|
45
|
-
"description": "A color index to be used to render the color of the avatar
|
|
45
|
+
"description": "A color index to be used to render the color of the avatar.",
|
|
46
46
|
"value": {
|
|
47
47
|
"kind": "expression"
|
|
48
48
|
}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
"name": "vaadin-message-list",
|
|
75
|
-
"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.2.0-
|
|
75
|
+
"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.2.0-alpha3/#/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.2.0-alpha3/#/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.",
|
|
76
76
|
"extension": true,
|
|
77
77
|
"attributes": [
|
|
78
78
|
{
|