@vaadin/message-input 25.0.0-alpha19 → 25.0.0-alpha20

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": "25.0.0-alpha19",
3
+ "version": "25.0.0-alpha20",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,22 +34,22 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@open-wc/dedupe-mixin": "^1.3.0",
37
- "@vaadin/button": "25.0.0-alpha19",
38
- "@vaadin/component-base": "25.0.0-alpha19",
39
- "@vaadin/text-area": "25.0.0-alpha19",
40
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha19",
37
+ "@vaadin/button": "25.0.0-alpha20",
38
+ "@vaadin/component-base": "25.0.0-alpha20",
39
+ "@vaadin/text-area": "25.0.0-alpha20",
40
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha20",
41
41
  "lit": "^3.0.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@vaadin/chai-plugins": "25.0.0-alpha19",
45
- "@vaadin/test-runner-commands": "25.0.0-alpha19",
44
+ "@vaadin/chai-plugins": "25.0.0-alpha20",
45
+ "@vaadin/test-runner-commands": "25.0.0-alpha20",
46
46
  "@vaadin/testing-helpers": "^2.0.0",
47
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha19",
47
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha20",
48
48
  "sinon": "^21.0.0"
49
49
  },
50
50
  "web-types": [
51
51
  "web-types.json",
52
52
  "web-types.lit.json"
53
53
  ],
54
- "gitHead": "1f9af1ce5f0bae8daff044176c8a8df697763881"
54
+ "gitHead": "c948aae591a30b432f3784000d4677674cae56e0"
55
55
  }
@@ -28,7 +28,7 @@ export const messageInputStyles = css`
28
28
  }
29
29
 
30
30
  :host([disabled]) {
31
- --vaadin-input-field-value-color: var(--vaadin-input-field-disabled-text-color, var(--vaadin-color-disabled));
31
+ --vaadin-input-field-value-color: var(--vaadin-input-field-disabled-text-color, var(--vaadin-text-color-disabled));
32
32
  --vaadin-input-field-background: var(
33
33
  --vaadin-input-field-disabled-background,
34
34
  var(--vaadin-background-container-strong)
@@ -42,41 +42,4 @@ export const messageInputStyles = css`
42
42
  --vaadin-focus-ring-width: 0;
43
43
  --vaadin-input-field-background: transparent !important;
44
44
  }
45
-
46
- ::slotted([slot='button']) {
47
- flex: none;
48
- align-self: end;
49
- margin: var(--vaadin-input-field-padding, var(--vaadin-padding-container));
50
- --vaadin-button-border-width: 0;
51
- --vaadin-button-background: transparent;
52
- --vaadin-button-text-color: var(--vaadin-color);
53
- --vaadin-button-padding: 0;
54
- }
55
-
56
- :host([theme~='icon-button']) ::slotted([slot='button']) {
57
- width: var(--vaadin-icon-size, 1lh);
58
- height: var(--vaadin-icon-size, 1lh);
59
- color: transparent;
60
- position: relative;
61
- contain: strict;
62
- }
63
-
64
- :host([theme~='icon-button']) ::slotted([slot='button'])::before {
65
- content: '';
66
- position: absolute;
67
- inset: 0;
68
- mask-image: var(--_vaadin-icon-paper-airplane);
69
- background: var(--vaadin-button-text-color);
70
- }
71
-
72
- :host([dir='rtl'][theme~='icon-button']) ::slotted([slot='button'])::before {
73
- scale: -1;
74
- }
75
-
76
- @media (forced-colors: active) {
77
- :host([theme~='icon-button']) ::slotted([slot='button']) {
78
- forced-color-adjust: none;
79
- --vaadin-button-text-color: CanvasText;
80
- }
81
- }
82
45
  `;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import type { CSSResult } from 'lit';
7
+
8
+ export const messageInputButtonStyles: CSSResult;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import '@vaadin/component-base/src/styles/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const messageInputButtonStyles = css`
10
+ :host {
11
+ flex: none;
12
+ align-self: end;
13
+ margin: var(--vaadin-input-field-padding, var(--vaadin-padding-container));
14
+ --vaadin-button-border-width: 0;
15
+ --vaadin-button-background: transparent;
16
+ --vaadin-button-text-color: var(--vaadin-text-color);
17
+ --vaadin-button-padding: 0;
18
+ }
19
+ `;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
7
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
+
10
+ /**
11
+ * An element used internally by `<vaadin-message-input>`. Not intended to be used separately.
12
+ */
13
+ declare class MessageInputButton extends ButtonMixin(DirMixin(ThemableMixin(HTMLElement))) {}
14
+
15
+ declare global {
16
+ interface HTMLElementTagNameMap {
17
+ 'vaadin-message-input-button': MessageInputButton;
18
+ }
19
+ }
20
+
21
+ export { MessageInputButton };
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { html, LitElement } from 'lit';
7
+ import { buttonStyles } from '@vaadin/button/src/styles/vaadin-button-base-styles.js';
8
+ import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
9
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
11
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
13
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
+ import { messageInputButtonStyles } from './styles/vaadin-message-input-button-styles.js';
15
+
16
+ /**
17
+ * An element used internally by `<vaadin-message-input>`. Not intended to be used separately.
18
+ *
19
+ * @customElement
20
+ * @extends HTMLElement
21
+ * @mixes ButtonMixin
22
+ * @mixes DirMixin
23
+ * @mixes ThemableMixin
24
+ * @private
25
+ */
26
+ class MessageInputButton extends ButtonMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
27
+ static get is() {
28
+ return 'vaadin-message-input-button';
29
+ }
30
+
31
+ static get styles() {
32
+ return [buttonStyles, messageInputButtonStyles];
33
+ }
34
+
35
+ /** @protected */
36
+ render() {
37
+ return html`
38
+ <div class="vaadin-button-container">
39
+ <span part="label">
40
+ <slot></slot>
41
+ </span>
42
+ </div>
43
+ `;
44
+ }
45
+ }
46
+
47
+ defineCustomElement(MessageInputButton);
48
+
49
+ export { MessageInputButton };
@@ -90,7 +90,7 @@ export const MessageInputMixin = (superClass) =>
90
90
  ready() {
91
91
  super.ready();
92
92
 
93
- this._buttonController = new SlotController(this, 'button', 'vaadin-button', {
93
+ this._buttonController = new SlotController(this, 'button', 'vaadin-message-input-button', {
94
94
  initializer: (btn) => {
95
95
  btn.addEventListener('click', () => {
96
96
  this.__submit();
@@ -42,6 +42,14 @@ export type MessageInputEventMap = HTMLElementEventMap & MessageInputCustomEvent
42
42
  * `disabled` | Set when the element is disabled
43
43
  * `has-tooltip` | Set when the element has a slotted tooltip
44
44
  *
45
+ * ### Internal components
46
+ *
47
+ * In addition to `<vaadin-message-input>` itself, the following internal
48
+ * components are themable:
49
+ *
50
+ * - `<vaadin-message-input-button>` - has the same API as `<vaadin-button>`
51
+ * - `<vaadin-text-area>`
52
+ *
45
53
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
46
54
  */
47
55
  declare class MessageInput extends MessageInputMixin(ThemableMixin(ElementMixin(HTMLElement))) {
@@ -3,8 +3,8 @@
3
3
  * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import '@vaadin/button/src/vaadin-button.js';
7
6
  import '@vaadin/text-area/src/vaadin-text-area.js';
7
+ import './vaadin-message-input-button.js';
8
8
  import { html, LitElement } from 'lit';
9
9
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
@@ -35,6 +35,14 @@ import { MessageInputMixin } from './vaadin-message-input-mixin.js';
35
35
  * `disabled` | Set when the element is disabled
36
36
  * `has-tooltip` | Set when the element has a slotted tooltip
37
37
  *
38
+ * ### Internal components
39
+ *
40
+ * In addition to `<vaadin-message-input>` itself, the following internal
41
+ * components are themable:
42
+ *
43
+ * - `<vaadin-message-input-button>` - has the same API as `<vaadin-button>`
44
+ * - `<vaadin-text-area>`
45
+ *
38
46
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
39
47
  *
40
48
  * @customElement
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": "25.0.0-alpha19",
4
+ "version": "25.0.0-alpha20",
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### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-tooltip` | Set when the element has a slotted tooltip\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
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### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-tooltip` | Set when the element has a slotted tooltip\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>`\n- `<vaadin-text-area>`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "i18n",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-input",
4
- "version": "25.0.0-alpha19",
4
+ "version": "25.0.0-alpha20",
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### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-tooltip` | Set when the element has a slotted tooltip\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
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### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-tooltip` | Set when the element has a slotted tooltip\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>`\n- `<vaadin-text-area>`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {