@vaadin/horizontal-layout 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
@@ -27,29 +27,6 @@ Once installed, import the component in your application:
27
27
  import '@vaadin/horizontal-layout';
28
28
  ```
29
29
 
30
- ## Themes
31
-
32
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
33
- The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/horizontal-layout/vaadin-horizontal-layout.js) of the package uses the Lumo theme.
34
-
35
- To use the Material theme, import the component from the `theme/material` folder:
36
-
37
- ```js
38
- import '@vaadin/horizontal-layout/theme/material/vaadin-horizontal-layout.js';
39
- ```
40
-
41
- You can also import the Lumo version of the component explicitly:
42
-
43
- ```js
44
- import '@vaadin/horizontal-layout/theme/lumo/vaadin-horizontal-layout.js';
45
- ```
46
-
47
- Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
48
-
49
- ```js
50
- import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js';
51
- ```
52
-
53
30
  ## Contributing
54
31
 
55
32
  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/horizontal-layout",
3
- "version": "24.8.0-alpha9",
3
+ "version": "25.0.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,25 +31,22 @@
31
31
  "Vaadin",
32
32
  "vaadin-horizontal-layout",
33
33
  "web-components",
34
- "web-component",
35
- "polymer"
34
+ "web-component"
36
35
  ],
37
36
  "dependencies": {
38
- "@polymer/polymer": "^3.0.0",
39
- "@vaadin/component-base": "24.8.0-alpha9",
40
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha9",
41
- "@vaadin/vaadin-material-styles": "24.8.0-alpha9",
42
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
37
+ "@vaadin/component-base": "25.0.0-alpha1",
38
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
39
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
43
40
  "lit": "^3.0.0"
44
41
  },
45
42
  "devDependencies": {
46
- "@vaadin/chai-plugins": "24.8.0-alpha9",
47
- "@vaadin/test-runner-commands": "24.8.0-alpha9",
43
+ "@vaadin/chai-plugins": "25.0.0-alpha1",
44
+ "@vaadin/test-runner-commands": "25.0.0-alpha1",
48
45
  "@vaadin/testing-helpers": "^1.1.0"
49
46
  },
50
47
  "web-types": [
51
48
  "web-types.json",
52
49
  "web-types.lit.json"
53
50
  ],
54
- "gitHead": "4de3809275ddfd733b0d13fd02af8faf73eb6770"
51
+ "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
55
52
  }
@@ -40,7 +40,7 @@ export const baseStyles = css`
40
40
  margin-inline-end: auto;
41
41
  }
42
42
 
43
- :host([has-start]:not([has-middle])) ::slotted([first-end-child]) {
43
+ :host(:not([has-middle])) ::slotted([first-end-child]) {
44
44
  margin-inline-start: auto;
45
45
  }
46
46
  `;
@@ -3,15 +3,14 @@
3
3
  * Copyright (c) 2017 - 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 { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
6
+ import { html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
8
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
11
  import { HorizontalLayoutMixin } from './vaadin-horizontal-layout-mixin.js';
11
12
  import { horizontalLayoutStyles } from './vaadin-horizontal-layout-styles.js';
12
13
 
13
- registerStyles('vaadin-horizontal-layout', horizontalLayoutStyles, { moduleId: 'vaadin-horizontal-layout-styles' });
14
-
15
14
  /**
16
15
  * `<vaadin-horizontal-layout>` provides a simple way to horizontally align your HTML elements.
17
16
  *
@@ -49,18 +48,23 @@ registerStyles('vaadin-horizontal-layout', horizontalLayoutStyles, { moduleId: '
49
48
  * @mixes ElementMixin
50
49
  * @mixes HorizontalLayoutMixin
51
50
  */
52
- class HorizontalLayout extends HorizontalLayoutMixin(ElementMixin(ThemableMixin(PolymerElement))) {
53
- static get template() {
51
+ class HorizontalLayout extends HorizontalLayoutMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
52
+ static get is() {
53
+ return 'vaadin-horizontal-layout';
54
+ }
55
+
56
+ static get styles() {
57
+ return horizontalLayoutStyles;
58
+ }
59
+
60
+ /** @protected */
61
+ render() {
54
62
  return html`
55
63
  <slot></slot>
56
64
  <slot name="middle"></slot>
57
65
  <slot name="end"></slot>
58
66
  `;
59
67
  }
60
-
61
- static get is() {
62
- return 'vaadin-horizontal-layout';
63
- }
64
68
  }
65
69
 
66
70
  defineCustomElement(HorizontalLayout);
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/horizontal-layout",
4
- "version": "24.8.0-alpha9",
4
+ "version": "25.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/horizontal-layout",
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,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- export * from './vaadin-horizontal-layout.js';
@@ -1,44 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 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 { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
- import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
- import { HorizontalLayoutMixin } from './vaadin-horizontal-layout-mixin.js';
12
- import { horizontalLayoutStyles } from './vaadin-horizontal-layout-styles.js';
13
-
14
- /**
15
- * LitElement based version of `<vaadin-horizontal-layout>` web component.
16
- *
17
- * ## Disclaimer
18
- *
19
- * This component is an experiment and not yet a part of Vaadin platform.
20
- * There is no ETA regarding specific Vaadin version where it'll land.
21
- * Feel free to try this code in your apps as per Apache 2.0 license.
22
- */
23
- class HorizontalLayout extends HorizontalLayoutMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
24
- static get is() {
25
- return 'vaadin-horizontal-layout';
26
- }
27
-
28
- static get styles() {
29
- return horizontalLayoutStyles;
30
- }
31
-
32
- /** @protected */
33
- render() {
34
- return html`
35
- <slot></slot>
36
- <slot name="middle"></slot>
37
- <slot name="end"></slot>
38
- `;
39
- }
40
- }
41
-
42
- defineCustomElement(HorizontalLayout);
43
-
44
- export { HorizontalLayout };
@@ -1,2 +0,0 @@
1
- import './vaadin-horizontal-layout-styles.js';
2
- import '../../src/vaadin-lit-horizontal-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-horizontal-layout-styles.js';
2
- import '../../src/vaadin-lit-horizontal-layout.js';
@@ -1 +0,0 @@
1
- export {};
@@ -1,37 +0,0 @@
1
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
2
-
3
- const horizontalLayout = css`
4
- [theme~='margin'] {
5
- margin: 16px;
6
- }
7
-
8
- [theme~='padding'] {
9
- padding: 16px;
10
- }
11
-
12
- :host([theme~='spacing-xs']) {
13
- gap: 4px;
14
- }
15
-
16
- :host([theme~='spacing-s']) {
17
- gap: 8px;
18
- }
19
-
20
- :host([theme~='spacing']) {
21
- gap: 16px;
22
- }
23
-
24
- :host([theme~='spacing-l']) {
25
- gap: 24px;
26
- }
27
-
28
- :host([theme~='spacing-xl']) {
29
- gap: 40px;
30
- }
31
-
32
- :host([theme~='wrap']) {
33
- flex-wrap: wrap;
34
- }
35
- `;
36
-
37
- registerStyles('vaadin-horizontal-layout', horizontalLayout, { moduleId: 'material-horizontal-layout' });
@@ -1,2 +0,0 @@
1
- import './vaadin-horizontal-layout-styles.js';
2
- import '../../src/vaadin-horizontal-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-horizontal-layout-styles.js';
2
- import '../../src/vaadin-horizontal-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-horizontal-layout-styles.js';
2
- import '../../src/vaadin-lit-horizontal-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-horizontal-layout-styles.js';
2
- import '../../src/vaadin-lit-horizontal-layout.js';
@@ -1 +0,0 @@
1
- export * from './vaadin-horizontal-layout.js';
@@ -1,2 +0,0 @@
1
- import './theme/lumo/vaadin-lit-horizontal-layout.js';
2
- export * from './src/vaadin-lit-horizontal-layout.js';