@vaadin/message-input 23.2.0 → 23.3.0-alpha1

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-input",
3
- "version": "23.2.0",
3
+ "version": "23.3.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,12 +36,12 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/button": "^23.2.0",
40
- "@vaadin/component-base": "^23.2.0",
41
- "@vaadin/text-area": "^23.2.0",
42
- "@vaadin/vaadin-lumo-styles": "^23.2.0",
43
- "@vaadin/vaadin-material-styles": "^23.2.0",
44
- "@vaadin/vaadin-themable-mixin": "^23.2.0"
39
+ "@vaadin/button": "23.3.0-alpha1",
40
+ "@vaadin/component-base": "23.3.0-alpha1",
41
+ "@vaadin/text-area": "23.3.0-alpha1",
42
+ "@vaadin/vaadin-lumo-styles": "23.3.0-alpha1",
43
+ "@vaadin/vaadin-material-styles": "23.3.0-alpha1",
44
+ "@vaadin/vaadin-themable-mixin": "23.3.0-alpha1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@esm-bundle/chai": "^4.3.4",
@@ -52,5 +52,5 @@
52
52
  "web-types.json",
53
53
  "web-types.lit.json"
54
54
  ],
55
- "gitHead": "8b1f5941f26ac41ca038e75e24c8584e331bc7a8"
55
+ "gitHead": "beabc527d4b1274eb798ff701d406fed45cfe638"
56
56
  }
@@ -3,6 +3,7 @@
3
3
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
+ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
6
7
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
7
8
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
9
 
@@ -35,7 +36,7 @@ export type MessageInputEventMap = HTMLElementEventMap & MessageInputCustomEvent
35
36
  * <vaadin-message-input></vaadin-message-input>
36
37
  * ```
37
38
  */
38
- declare class MessageInput extends ThemableMixin(ElementMixin(HTMLElement)) {
39
+ declare class MessageInput extends ThemableMixin(ElementMixin(ControllerMixin(HTMLElement))) {
39
40
  /**
40
41
  * Current content of the text input field
41
42
  */
@@ -6,7 +6,9 @@
6
6
  import './vaadin-message-input-text-area.js';
7
7
  import './vaadin-message-input-button.js';
8
8
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
9
+ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
9
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
+ import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
10
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
13
 
12
14
  /**
@@ -30,10 +32,11 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
30
32
  * - `<vaadin-message-input-text-area>` - has the same API as [`<vaadin-text-area>`](#/elements/vaadin-text-area).
31
33
  *
32
34
  * @extends HTMLElement
35
+ * @mizes ControllerMixin
33
36
  * @mixes ThemableMixin
34
37
  * @mixes ElementMixin
35
38
  */
36
- class MessageInput extends ElementMixin(ThemableMixin(PolymerElement)) {
39
+ class MessageInput extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElement))) {
37
40
  static get properties() {
38
41
  return {
39
42
  /**
@@ -106,6 +109,8 @@ class MessageInput extends ElementMixin(ThemableMixin(PolymerElement)) {
106
109
  <vaadin-message-input-button disabled="[[disabled]]" theme="primary contained" on-click="__submit"
107
110
  >[[i18n.send]]</vaadin-message-input-button
108
111
  >
112
+
113
+ <slot name="tooltip"></slot>
109
114
  `;
110
115
  }
111
116
 
@@ -113,6 +118,14 @@ class MessageInput extends ElementMixin(ThemableMixin(PolymerElement)) {
113
118
  return 'vaadin-message-input';
114
119
  }
115
120
 
121
+ /** @protected */
122
+ ready() {
123
+ super.ready();
124
+
125
+ this._tooltipController = new TooltipController(this);
126
+ this.addController(this._tooltipController);
127
+ }
128
+
116
129
  /**
117
130
  * Submits the current value as an custom event named 'submit'.
118
131
  * It also clears the text input and refocuses it for sending another message.
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-input",
4
- "version": "23.2.0",
4
+ "version": "23.3.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-message-input",
11
- "description": "`<vaadin-message-input>` is a Web Component for sending messages.\nIt consists of a text area that grows on along with the content, and a send button to send message.\n\nThe message can be sent by one of the following actions:\n- by pressing Enter (use Shift + Enter to add a new line)\n- by clicking `submit` button.\n\n```html\n<vaadin-message-input></vaadin-message-input>\n```\n\n### Internal components\n\nIn addition to `<vaadin-message-input>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-message-input-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0/#/elements/vaadin-button).\n- `<vaadin-message-input-text-area>` - has the same API as [`<vaadin-text-area>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0/#/elements/vaadin-text-area).",
11
+ "description": "`<vaadin-message-input>` is a Web Component for sending messages.\nIt consists of a text area that grows on along with the content, and a send button to send message.\n\nThe message can be sent by one of the following actions:\n- by pressing Enter (use Shift + Enter to add a new line)\n- by clicking `submit` button.\n\n```html\n<vaadin-message-input></vaadin-message-input>\n```\n\n### Internal components\n\nIn addition to `<vaadin-message-input>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-message-input-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-button).\n- `<vaadin-message-input-text-area>` - has the same API as [`<vaadin-text-area>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-text-area).",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "value",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-input",
4
- "version": "23.2.0",
4
+ "version": "23.3.0-alpha1",
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-input",
19
- "description": "`<vaadin-message-input>` is a Web Component for sending messages.\nIt consists of a text area that grows on along with the content, and a send button to send message.\n\nThe message can be sent by one of the following actions:\n- by pressing Enter (use Shift + Enter to add a new line)\n- by clicking `submit` button.\n\n```html\n<vaadin-message-input></vaadin-message-input>\n```\n\n### Internal components\n\nIn addition to `<vaadin-message-input>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-message-input-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0/#/elements/vaadin-button).\n- `<vaadin-message-input-text-area>` - has the same API as [`<vaadin-text-area>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0/#/elements/vaadin-text-area).",
19
+ "description": "`<vaadin-message-input>` is a Web Component for sending messages.\nIt consists of a text area that grows on along with the content, and a send button to send message.\n\nThe message can be sent by one of the following actions:\n- by pressing Enter (use Shift + Enter to add a new line)\n- by clicking `submit` button.\n\n```html\n<vaadin-message-input></vaadin-message-input>\n```\n\n### Internal components\n\nIn addition to `<vaadin-message-input>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-message-input-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-button).\n- `<vaadin-message-input-text-area>` - has the same API as [`<vaadin-text-area>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha1/#/elements/vaadin-text-area).",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {