@vaadin/vertical-layout 25.0.0-alpha2 → 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/vertical-layout",
3
- "version": "25.0.0-alpha2",
3
+ "version": "25.0.0-alpha20",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,7 +21,6 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "theme",
25
24
  "vaadin-*.d.ts",
26
25
  "vaadin-*.js",
27
26
  "web-types.json",
@@ -34,19 +33,19 @@
34
33
  "web-component"
35
34
  ],
36
35
  "dependencies": {
37
- "@vaadin/component-base": "25.0.0-alpha2",
38
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha2",
39
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
36
+ "@vaadin/component-base": "25.0.0-alpha20",
37
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha20",
40
38
  "lit": "^3.0.0"
41
39
  },
42
40
  "devDependencies": {
43
- "@vaadin/chai-plugins": "25.0.0-alpha2",
44
- "@vaadin/test-runner-commands": "25.0.0-alpha2",
45
- "@vaadin/testing-helpers": "^2.0.0"
41
+ "@vaadin/chai-plugins": "25.0.0-alpha20",
42
+ "@vaadin/test-runner-commands": "25.0.0-alpha20",
43
+ "@vaadin/testing-helpers": "^2.0.0",
44
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha20"
46
45
  },
47
46
  "web-types": [
48
47
  "web-types.json",
49
48
  "web-types.lit.json"
50
49
  ],
51
- "gitHead": "67ffcd5355cf21ce1b5039c598525109fc4c164b"
50
+ "gitHead": "c948aae591a30b432f3784000d4677674cae56e0"
52
51
  }
@@ -3,7 +3,8 @@
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 } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
6
+ import '@vaadin/component-base/src/styles/style-props.js';
7
+ import { css } from 'lit';
7
8
 
8
9
  export const baseStyles = css`
9
10
  :host {
@@ -19,15 +20,19 @@ export const baseStyles = css`
19
20
 
20
21
  /* Theme variations */
21
22
  :host([theme~='margin']) {
22
- margin: 1em;
23
+ margin: var(--vaadin-vertical-layout-margin, var(--vaadin-padding-m));
23
24
  }
24
25
 
25
26
  :host([theme~='padding']) {
26
- padding: 1em;
27
+ padding: var(--vaadin-vertical-layout-margin, var(--vaadin-padding-m));
27
28
  }
28
29
 
29
30
  :host([theme~='spacing']) {
30
- gap: 1em;
31
+ gap: var(--vaadin-vertical-layout-gap, var(--vaadin-gap-s));
32
+ }
33
+
34
+ :host([theme~='wrap']) {
35
+ flex-wrap: wrap;
31
36
  }
32
37
  `;
33
38
 
@@ -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>
@@ -7,13 +7,14 @@ 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
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
10
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
- import { verticalLayoutStyles } from './vaadin-vertical-layout-styles.js';
12
+ import { verticalLayoutStyles } from './styles/vaadin-vertical-layout-base-styles.js';
12
13
 
13
14
  /**
14
15
  * `<vaadin-vertical-layout>` provides a simple way to vertically align your HTML elements.
15
16
  *
16
- * ```
17
+ * ```html
17
18
  * <vaadin-vertical-layout>
18
19
  * <div>Item 1</div>
19
20
  * <div>Item 2</div>
@@ -36,7 +37,7 @@ import { verticalLayoutStyles } from './vaadin-vertical-layout-styles.js';
36
37
  * @mixes ThemableMixin
37
38
  * @mixes ElementMixin
38
39
  */
39
- class VerticalLayout extends ThemableMixin(ElementMixin(PolylitMixin(LitElement))) {
40
+ class VerticalLayout extends ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
40
41
  static get is() {
41
42
  return 'vaadin-vertical-layout';
42
43
  }
@@ -45,6 +46,12 @@ class VerticalLayout extends ThemableMixin(ElementMixin(PolylitMixin(LitElement)
45
46
  return verticalLayoutStyles;
46
47
  }
47
48
 
49
+ static get lumoInjector() {
50
+ return {
51
+ includeBaseStyles: true,
52
+ };
53
+ }
54
+
48
55
  /** @protected */
49
56
  render() {
50
57
  return html`<slot></slot>`;
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-vertical-layout.js';
1
+ import './src/vaadin-vertical-layout.js';
2
2
  export * from './src/vaadin-vertical-layout.js';
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-alpha2",
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-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-alpha2",
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-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
  }
@@ -1 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/spacing.js';
@@ -1,38 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/spacing.js';
2
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
3
-
4
- const verticalLayout = css`
5
- :host([theme~='margin']) {
6
- margin: var(--lumo-space-m);
7
- }
8
-
9
- :host([theme~='padding']) {
10
- padding: var(--lumo-space-m);
11
- }
12
-
13
- :host([theme~='spacing-xs']) {
14
- gap: var(--lumo-space-xs);
15
- }
16
-
17
- :host([theme~='spacing-s']) {
18
- gap: var(--lumo-space-s);
19
- }
20
-
21
- :host([theme~='spacing']) {
22
- gap: var(--lumo-space-m);
23
- }
24
-
25
- :host([theme~='spacing-l']) {
26
- gap: var(--lumo-space-l);
27
- }
28
-
29
- :host([theme~='spacing-xl']) {
30
- gap: var(--lumo-space-xl);
31
- }
32
-
33
- :host([theme~='wrap']) {
34
- flex-wrap: wrap;
35
- }
36
- `;
37
-
38
- registerStyles('vaadin-vertical-layout', verticalLayout, { moduleId: 'lumo-vertical-layout' });
@@ -1,2 +0,0 @@
1
- import './vaadin-vertical-layout-styles.js';
2
- import '../../src/vaadin-vertical-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-vertical-layout-styles.js';
2
- import '../../src/vaadin-vertical-layout.js';