@vaadin/message-input 24.8.0-alpha9 → 25.0.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/README.md CHANGED
@@ -24,29 +24,6 @@ Once installed, import the component in your application:
24
24
  import '@vaadin/message-input';
25
25
  ```
26
26
 
27
- ## Themes
28
-
29
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
30
- The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/message-input/vaadin-message-input.js) of the package uses the Lumo theme.
31
-
32
- To use the Material theme, import the component from the `theme/material` folder:
33
-
34
- ```js
35
- import '@vaadin/message-input/theme/material/vaadin-message-input.js';
36
- ```
37
-
38
- You can also import the Lumo version of the component explicitly:
39
-
40
- ```js
41
- import '@vaadin/message-input/theme/lumo/vaadin-message-input.js';
42
- ```
43
-
44
- Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
45
-
46
- ```js
47
- import '@vaadin/message-input/src/vaadin-message-input.js';
48
- ```
49
-
50
27
  ## Contributing
51
28
 
52
29
  Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/message-input",
3
- "version": "24.8.0-alpha9",
3
+ "version": "25.0.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,23 +31,20 @@
31
31
  "Vaadin",
32
32
  "message-input",
33
33
  "web-components",
34
- "web-component",
35
- "polymer"
34
+ "web-component"
36
35
  ],
37
36
  "dependencies": {
38
37
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@polymer/polymer": "^3.0.0",
40
- "@vaadin/button": "24.8.0-alpha9",
41
- "@vaadin/component-base": "24.8.0-alpha9",
42
- "@vaadin/text-area": "24.8.0-alpha9",
43
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha9",
44
- "@vaadin/vaadin-material-styles": "24.8.0-alpha9",
45
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
38
+ "@vaadin/button": "25.0.0-alpha1",
39
+ "@vaadin/component-base": "25.0.0-alpha1",
40
+ "@vaadin/text-area": "25.0.0-alpha1",
41
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
42
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
46
43
  "lit": "^3.0.0"
47
44
  },
48
45
  "devDependencies": {
49
- "@vaadin/chai-plugins": "24.8.0-alpha9",
50
- "@vaadin/test-runner-commands": "24.8.0-alpha9",
46
+ "@vaadin/chai-plugins": "25.0.0-alpha1",
47
+ "@vaadin/test-runner-commands": "25.0.0-alpha1",
51
48
  "@vaadin/testing-helpers": "^1.1.0",
52
49
  "sinon": "^18.0.0"
53
50
  },
@@ -55,5 +52,5 @@
55
52
  "web-types.json",
56
53
  "web-types.lit.json"
57
54
  ],
58
- "gitHead": "4de3809275ddfd733b0d13fd02af8faf73eb6770"
55
+ "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
59
56
  }
@@ -4,7 +4,6 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
7
- import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
8
7
  import type { I18nMixinClass } from '@vaadin/component-base/src/i18n-mixin.js';
9
8
 
10
9
  export interface MessageInputI18n {
@@ -14,10 +13,7 @@ export interface MessageInputI18n {
14
13
 
15
14
  export declare function MessageInputMixin<T extends Constructor<HTMLElement>>(
16
15
  base: T,
17
- ): Constructor<ControllerMixinClass> &
18
- Constructor<I18nMixinClass<MessageInputI18n>> &
19
- Constructor<MessageInputMixinClass> &
20
- T;
16
+ ): Constructor<I18nMixinClass<MessageInputI18n>> & Constructor<MessageInputMixinClass> & T;
21
17
 
22
18
  export declare class MessageInputMixinClass {
23
19
  /**
@@ -3,7 +3,6 @@
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 { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
7
6
  import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
8
7
  import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
9
8
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
@@ -15,10 +14,10 @@ const DEFAULT_I18N = {
15
14
 
16
15
  /**
17
16
  * @polymerMixin
18
- * @mixes ControllerMixin
17
+ * @mixes I18nMixin
19
18
  */
20
19
  export const MessageInputMixin = (superClass) =>
21
- class MessageInputMixinClass extends I18nMixin(DEFAULT_I18N, ControllerMixin(superClass)) {
20
+ class MessageInputMixinClass extends I18nMixin(DEFAULT_I18N, superClass) {
22
21
  static get properties() {
23
22
  return {
24
23
  /**
@@ -5,9 +5,10 @@
5
5
  */
6
6
  import '@vaadin/button/src/vaadin-button.js';
7
7
  import '@vaadin/text-area/src/vaadin-text-area.js';
8
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
8
+ import { css, 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';
11
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
13
  import { MessageInputMixin } from './vaadin-message-input-mixin.js';
13
14
 
@@ -29,32 +30,40 @@ import { MessageInputMixin } from './vaadin-message-input-mixin.js';
29
30
  * @mixes ThemableMixin
30
31
  * @mixes ElementMixin
31
32
  */
32
- class MessageInput extends MessageInputMixin(ElementMixin(ThemableMixin(PolymerElement))) {
33
- static get template() {
34
- return html`
35
- <style>
36
- :host {
37
- align-items: flex-start;
38
- box-sizing: border-box;
39
- display: flex;
40
- max-height: 50vh;
41
- overflow: hidden;
42
- flex-shrink: 0;
43
- }
33
+ class MessageInput extends MessageInputMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
34
+ static get is() {
35
+ return 'vaadin-message-input';
36
+ }
44
37
 
45
- :host([hidden]) {
46
- display: none !important;
47
- }
38
+ static get styles() {
39
+ return css`
40
+ :host {
41
+ align-items: flex-start;
42
+ box-sizing: border-box;
43
+ display: flex;
44
+ max-height: 50vh;
45
+ overflow: hidden;
46
+ flex-shrink: 0;
47
+ }
48
48
 
49
- ::slotted([slot='button']) {
50
- flex-shrink: 0;
51
- }
49
+ :host([hidden]) {
50
+ display: none !important;
51
+ }
52
52
 
53
- ::slotted([slot='textarea']) {
54
- align-self: stretch;
55
- flex-grow: 1;
56
- }
57
- </style>
53
+ ::slotted([slot='button']) {
54
+ flex-shrink: 0;
55
+ }
56
+
57
+ ::slotted([slot='textarea']) {
58
+ align-self: stretch;
59
+ flex-grow: 1;
60
+ }
61
+ `;
62
+ }
63
+
64
+ /** @protected */
65
+ render() {
66
+ return html`
58
67
  <slot name="textarea"></slot>
59
68
 
60
69
  <slot name="button"></slot>
@@ -62,10 +71,6 @@ class MessageInput extends MessageInputMixin(ElementMixin(ThemableMixin(PolymerE
62
71
  <slot name="tooltip"></slot>
63
72
  `;
64
73
  }
65
-
66
- static get is() {
67
- return 'vaadin-message-input';
68
- }
69
74
  }
70
75
 
71
76
  defineCustomElement(MessageInput);
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-input",
4
- "version": "24.8.0-alpha9",
4
+ "version": "25.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -10,6 +10,15 @@
10
10
  "name": "vaadin-message-input",
11
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```",
12
12
  "attributes": [
13
+ {
14
+ "name": "i18n",
15
+ "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
16
+ "value": {
17
+ "type": [
18
+ "Object"
19
+ ]
20
+ }
21
+ },
13
22
  {
14
23
  "name": "value",
15
24
  "description": "Current content of the text input field",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-input",
4
- "version": "24.8.0-alpha9",
4
+ "version": "25.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1 +0,0 @@
1
- export * from './vaadin-message-input.js';
@@ -1,69 +0,0 @@
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/button/src/vaadin-lit-button.js';
7
- import '@vaadin/text-area/src/vaadin-lit-text-area.js';
8
- import { css, html, LitElement } from 'lit';
9
- import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
- import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
- import { MessageInputMixin } from './vaadin-message-input-mixin.js';
14
-
15
- /**
16
- * LitElement based version of `<vaadin-message-input>` web component.
17
- *
18
- * ## Disclaimer
19
- *
20
- * This component is an experiment and not yet a part of Vaadin platform.
21
- * There is no ETA regarding specific Vaadin version where it'll land.
22
- * Feel free to try this code in your apps as per Apache 2.0 license.
23
- */
24
- class MessageInput extends MessageInputMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
25
- static get is() {
26
- return 'vaadin-message-input';
27
- }
28
-
29
- static get styles() {
30
- return css`
31
- :host {
32
- align-items: flex-start;
33
- box-sizing: border-box;
34
- display: flex;
35
- max-height: 50vh;
36
- overflow: hidden;
37
- flex-shrink: 0;
38
- }
39
-
40
- :host([hidden]) {
41
- display: none !important;
42
- }
43
-
44
- ::slotted([slot='button']) {
45
- flex-shrink: 0;
46
- }
47
-
48
- ::slotted([slot='textarea']) {
49
- align-self: stretch;
50
- flex-grow: 1;
51
- }
52
- `;
53
- }
54
-
55
- /** @protected */
56
- render() {
57
- return html`
58
- <slot name="textarea"></slot>
59
-
60
- <slot name="button"></slot>
61
-
62
- <slot name="tooltip"></slot>
63
- `;
64
- }
65
- }
66
-
67
- defineCustomElement(MessageInput);
68
-
69
- export { MessageInput };
@@ -1,4 +0,0 @@
1
- import '@vaadin/button/theme/lumo/vaadin-lit-button.js';
2
- import '@vaadin/text-area/theme/lumo/vaadin-lit-text-area.js';
3
- import './vaadin-message-input-styles.js';
4
- import '../../src/vaadin-lit-message-input.js';
@@ -1,4 +0,0 @@
1
- import '@vaadin/button/theme/lumo/vaadin-lit-button.js';
2
- import '@vaadin/text-area/theme/lumo/vaadin-lit-text-area.js';
3
- import './vaadin-message-input-styles.js';
4
- import '../../src/vaadin-lit-message-input.js';
@@ -1,4 +0,0 @@
1
- import '@vaadin/button/theme/material/vaadin-lit-button.js';
2
- import '@vaadin/text-area/theme/material/vaadin-lit-text-area.js';
3
- import './vaadin-message-input-styles.js';
4
- import '../../src/vaadin-lit-message-input.js';
@@ -1,4 +0,0 @@
1
- import '@vaadin/button/theme/material/vaadin-lit-button.js';
2
- import '@vaadin/text-area/theme/material/vaadin-lit-text-area.js';
3
- import './vaadin-message-input-styles.js';
4
- import '../../src/vaadin-lit-message-input.js';
@@ -1,2 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
2
- import '@vaadin/vaadin-material-styles/typography.js';
@@ -1,18 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
2
- import '@vaadin/vaadin-material-styles/typography.js';
3
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
4
-
5
- registerStyles(
6
- 'vaadin-message-input',
7
- css`
8
- :host {
9
- padding: 0.5em 1em;
10
- }
11
-
12
- ::slotted([slot='textarea']) {
13
- margin: 0;
14
- margin-inline-end: 0.5em;
15
- }
16
- `,
17
- { moduleId: 'material-message-input' },
18
- );
@@ -1,4 +0,0 @@
1
- import '@vaadin/button/theme/material/vaadin-button.js';
2
- import '@vaadin/text-area/theme/material/vaadin-text-area.js';
3
- import './vaadin-message-input-styles.js';
4
- import '../../src/vaadin-message-input.js';
@@ -1,4 +0,0 @@
1
- import '@vaadin/button/theme/material/vaadin-button.js';
2
- import '@vaadin/text-area/theme/material/vaadin-text-area.js';
3
- import './vaadin-message-input-styles.js';
4
- import '../../src/vaadin-message-input.js';
@@ -1 +0,0 @@
1
- export * from './src/vaadin-message-input.js';
@@ -1,2 +0,0 @@
1
- import './theme/lumo/vaadin-lit-message-input.js';
2
- export * from './src/vaadin-lit-message-input.js';