@vaadin/vertical-layout 25.0.0-alpha7 → 25.0.0-alpha9

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": "25.0.0-alpha7",
3
+ "version": "25.0.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,6 +21,8 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
+ "!src/styles/*-base-styles.d.ts",
25
+ "!src/styles/*-base-styles.js",
24
26
  "theme",
25
27
  "vaadin-*.d.ts",
26
28
  "vaadin-*.js",
@@ -34,19 +36,19 @@
34
36
  "web-component"
35
37
  ],
36
38
  "dependencies": {
37
- "@vaadin/component-base": "25.0.0-alpha7",
38
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha7",
39
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha7",
39
+ "@vaadin/component-base": "25.0.0-alpha9",
40
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha9",
41
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
40
42
  "lit": "^3.0.0"
41
43
  },
42
44
  "devDependencies": {
43
- "@vaadin/chai-plugins": "25.0.0-alpha7",
44
- "@vaadin/test-runner-commands": "25.0.0-alpha7",
45
+ "@vaadin/chai-plugins": "25.0.0-alpha9",
46
+ "@vaadin/test-runner-commands": "25.0.0-alpha9",
45
47
  "@vaadin/testing-helpers": "^2.0.0"
46
48
  },
47
49
  "web-types": [
48
50
  "web-types.json",
49
51
  "web-types.lit.json"
50
52
  ],
51
- "gitHead": "87f72707ce6866892f8be5782fa0da008e87dcbc"
53
+ "gitHead": "bbe4720721e0955ffc87a79b412bee38b1f0eb1e"
52
54
  }
@@ -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,55 @@
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 '@vaadin/component-base/src/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const baseStyles = css`
10
+ :host {
11
+ display: flex;
12
+ flex-direction: column;
13
+ align-items: flex-start;
14
+ box-sizing: border-box;
15
+ }
16
+
17
+ :host([hidden]) {
18
+ display: none !important;
19
+ }
20
+
21
+ /* Theme variations */
22
+ :host([theme~='margin']) {
23
+ margin: var(--vaadin-vertical-layout-margin, var(--vaadin-padding));
24
+ }
25
+
26
+ :host([theme~='padding']) {
27
+ padding: var(--vaadin-vertical-layout-margin, var(--vaadin-padding));
28
+ }
29
+
30
+ :host([theme~='spacing']) {
31
+ gap: var(--vaadin-vertical-layout-gap, var(--vaadin-gap-container-block));
32
+ }
33
+
34
+ :host([theme~='wrap']) {
35
+ flex-wrap: wrap;
36
+ }
37
+ `;
38
+
39
+ // Layout improvements are part of a feature for Flow users where children that have been configured to use full size
40
+ // using `HasSize.setSizeFull()` and others, get additional styles so that they effectively take the remaining space in
41
+ // the layout, rather than explicitly use 100% width/height. The respective data attributes are set by Flow's `HasSize`
42
+ // class.
43
+ const enableLayoutImprovements = window.Vaadin.featureFlags.layoutComponentImprovements;
44
+ const layoutImprovementStyles = css`
45
+ ::slotted([data-height-full]) {
46
+ flex: 1;
47
+ }
48
+
49
+ ::slotted(vaadin-horizontal-layout[data-height-full]),
50
+ ::slotted(vaadin-vertical-layout[data-height-full]) {
51
+ min-height: 0;
52
+ }
53
+ `;
54
+
55
+ export const verticalLayoutStyles = enableLayoutImprovements ? [baseStyles, layoutImprovementStyles] : [baseStyles];
@@ -9,7 +9,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
9
9
  /**
10
10
  * `<vaadin-vertical-layout>` provides a simple way to vertically align your HTML elements.
11
11
  *
12
- * ```
12
+ * ```html
13
13
  * <vaadin-vertical-layout>
14
14
  * <div>Item 1</div>
15
15
  * <div>Item 2</div>
@@ -14,7 +14,7 @@ import { verticalLayoutStyles } from './styles/vaadin-vertical-layout-core-style
14
14
  /**
15
15
  * `<vaadin-vertical-layout>` provides a simple way to vertically align your HTML elements.
16
16
  *
17
- * ```
17
+ * ```html
18
18
  * <vaadin-vertical-layout>
19
19
  * <div>Item 1</div>
20
20
  * <div>Item 2</div>
@@ -37,7 +37,7 @@ import { verticalLayoutStyles } from './styles/vaadin-vertical-layout-core-style
37
37
  * @mixes ThemableMixin
38
38
  * @mixes ElementMixin
39
39
  */
40
- class VerticalLayout extends ThemableMixin(ElementMixin(LumoInjectionMixin(PolylitMixin(LitElement)))) {
40
+ class VerticalLayout extends ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
41
41
  static get is() {
42
42
  return 'vaadin-vertical-layout';
43
43
  }
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/vertical-layout",
4
- "version": "25.0.0-alpha7",
4
+ "version": "25.0.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-vertical-layout",
11
- "description": "`<vaadin-vertical-layout>` provides a simple way to vertically align your HTML elements.\n\n```\n<vaadin-vertical-layout>\n <div>Item 1</div>\n <div>Item 2</div>\n</vaadin-vertical-layout>\n```\n\n### Built-in Theme Variations\n\n`<vaadin-vertical-layout>` supports the following theme variations:\n\nTheme variation | Description\n---|---\n`theme=\"margin\"` | Applies the default amount of CSS margin for the host element (specified by the theme)\n`theme=\"padding\"` | Applies the default amount of CSS padding for the host element (specified by the theme)\n`theme=\"spacing\"` | Applies the default amount of CSS margin between items (specified by the theme)\n`theme=\"wrap\"` | Items wrap to the next row when they exceed the layout height",
11
+ "description": "`<vaadin-vertical-layout>` provides a simple way to vertically align your HTML elements.\n\n```html\n<vaadin-vertical-layout>\n <div>Item 1</div>\n <div>Item 2</div>\n</vaadin-vertical-layout>\n```\n\n### Built-in Theme Variations\n\n`<vaadin-vertical-layout>` supports the following theme variations:\n\nTheme variation | Description\n---|---\n`theme=\"margin\"` | Applies the default amount of CSS margin for the host element (specified by the theme)\n`theme=\"padding\"` | Applies the default amount of CSS padding for the host element (specified by the theme)\n`theme=\"spacing\"` | Applies the default amount of CSS margin between items (specified by the theme)\n`theme=\"wrap\"` | Items wrap to the next row when they exceed the layout height",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "theme",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/vertical-layout",
4
- "version": "25.0.0-alpha7",
4
+ "version": "25.0.0-alpha9",
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-vertical-layout",
19
- "description": "`<vaadin-vertical-layout>` provides a simple way to vertically align your HTML elements.\n\n```\n<vaadin-vertical-layout>\n <div>Item 1</div>\n <div>Item 2</div>\n</vaadin-vertical-layout>\n```\n\n### Built-in Theme Variations\n\n`<vaadin-vertical-layout>` supports the following theme variations:\n\nTheme variation | Description\n---|---\n`theme=\"margin\"` | Applies the default amount of CSS margin for the host element (specified by the theme)\n`theme=\"padding\"` | Applies the default amount of CSS padding for the host element (specified by the theme)\n`theme=\"spacing\"` | Applies the default amount of CSS margin between items (specified by the theme)\n`theme=\"wrap\"` | Items wrap to the next row when they exceed the layout height",
19
+ "description": "`<vaadin-vertical-layout>` provides a simple way to vertically align your HTML elements.\n\n```html\n<vaadin-vertical-layout>\n <div>Item 1</div>\n <div>Item 2</div>\n</vaadin-vertical-layout>\n```\n\n### Built-in Theme Variations\n\n`<vaadin-vertical-layout>` supports the following theme variations:\n\nTheme variation | Description\n---|---\n`theme=\"margin\"` | Applies the default amount of CSS margin for the host element (specified by the theme)\n`theme=\"padding\"` | Applies the default amount of CSS padding for the host element (specified by the theme)\n`theme=\"spacing\"` | Applies the default amount of CSS margin between items (specified by the theme)\n`theme=\"wrap\"` | Items wrap to the next row when they exceed the layout height",
20
20
  "extension": true,
21
21
  "attributes": []
22
22
  }