@vaadin/vertical-layout 24.7.0-alpha6 → 24.7.0-alpha7

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/vertical-layout",
3
- "version": "24.7.0-alpha6",
3
+ "version": "24.7.0-alpha7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,19 +36,19 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/component-base": "24.7.0-alpha6",
40
- "@vaadin/vaadin-lumo-styles": "24.7.0-alpha6",
41
- "@vaadin/vaadin-material-styles": "24.7.0-alpha6",
42
- "@vaadin/vaadin-themable-mixin": "24.7.0-alpha6",
39
+ "@vaadin/component-base": "24.7.0-alpha7",
40
+ "@vaadin/vaadin-lumo-styles": "24.7.0-alpha7",
41
+ "@vaadin/vaadin-material-styles": "24.7.0-alpha7",
42
+ "@vaadin/vaadin-themable-mixin": "24.7.0-alpha7",
43
43
  "lit": "^3.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@vaadin/chai-plugins": "24.7.0-alpha6",
46
+ "@vaadin/chai-plugins": "24.7.0-alpha7",
47
47
  "@vaadin/testing-helpers": "^1.1.0"
48
48
  },
49
49
  "web-types": [
50
50
  "web-types.json",
51
51
  "web-types.lit.json"
52
52
  ],
53
- "gitHead": "6255a512997a648da91fed37de4d5000809eaebf"
53
+ "gitHead": "5f48d7024caa02773aff3aa53091326a42d1eeb1"
54
54
  }
@@ -3,11 +3,12 @@
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 { css, html, LitElement } from 'lit';
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
9
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
10
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
+ import { verticalLayoutStyles } from './vaadin-vertical-layout-styles.js';
11
12
 
12
13
  /**
13
14
  * LitElement based version of `<vaadin-vertical-layout>` web component.
@@ -19,38 +20,15 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
19
20
  * Feel free to try this code in your apps as per Apache 2.0 license.
20
21
  */
21
22
  class VerticalLayout extends ThemableMixin(ElementMixin(PolylitMixin(LitElement))) {
22
- static get styles() {
23
- return css`
24
- :host {
25
- display: flex;
26
- flex-direction: column;
27
- align-items: flex-start;
28
- box-sizing: border-box;
29
- }
30
-
31
- :host([hidden]) {
32
- display: none !important;
33
- }
34
-
35
- /* Theme variations */
36
- :host([theme~='margin']) {
37
- margin: 1em;
38
- }
39
-
40
- :host([theme~='padding']) {
41
- padding: 1em;
42
- }
43
-
44
- :host([theme~='spacing']) {
45
- gap: 1em;
46
- }
47
- `;
48
- }
49
-
50
23
  static get is() {
51
24
  return 'vaadin-vertical-layout';
52
25
  }
53
26
 
27
+ static get styles() {
28
+ return verticalLayoutStyles;
29
+ }
30
+
31
+ /** @protected */
54
32
  render() {
55
33
  return html`<slot></slot>`;
56
34
  }
@@ -0,0 +1,8 @@
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 type { CSSResult } from 'lit';
7
+
8
+ export const verticalLayoutStyles: CSSResult;
@@ -0,0 +1,32 @@
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 { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
7
+
8
+ export const verticalLayoutStyles = css`
9
+ :host {
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: flex-start;
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ :host([hidden]) {
17
+ display: none !important;
18
+ }
19
+
20
+ /* Theme variations */
21
+ :host([theme~='margin']) {
22
+ margin: 1em;
23
+ }
24
+
25
+ :host([theme~='padding']) {
26
+ padding: 1em;
27
+ }
28
+
29
+ :host([theme~='spacing']) {
30
+ gap: 1em;
31
+ }
32
+ `;
@@ -6,7 +6,10 @@
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
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 { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
+ import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
+ import { verticalLayoutStyles } from './vaadin-vertical-layout-styles.js';
11
+
12
+ registerStyles('vaadin-vertical-layout', verticalLayoutStyles, { moduleId: 'vaadin-vertical-layout-styles' });
10
13
 
11
14
  /**
12
15
  * `<vaadin-vertical-layout>` provides a simple way to vertically align your HTML elements.
@@ -36,35 +39,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
36
39
  */
37
40
  class VerticalLayout extends ElementMixin(ThemableMixin(PolymerElement)) {
38
41
  static get template() {
39
- return html`
40
- <style>
41
- :host {
42
- display: flex;
43
- flex-direction: column;
44
- align-items: flex-start;
45
- box-sizing: border-box;
46
- }
47
-
48
- :host([hidden]) {
49
- display: none !important;
50
- }
51
-
52
- /* Theme variations */
53
- :host([theme~='margin']) {
54
- margin: 1em;
55
- }
56
-
57
- :host([theme~='padding']) {
58
- padding: 1em;
59
- }
60
-
61
- :host([theme~='spacing']) {
62
- gap: 1em;
63
- }
64
- </style>
65
-
66
- <slot></slot>
67
- `;
42
+ return html`<slot></slot>`;
68
43
  }
69
44
 
70
45
  static get is() {
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/vertical-layout",
4
- "version": "24.7.0-alpha6",
4
+ "version": "24.7.0-alpha7",
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/vertical-layout",
4
- "version": "24.7.0-alpha6",
4
+ "version": "24.7.0-alpha7",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {