@vaadin/horizontal-layout 25.0.0-alpha2 → 25.0.0-alpha21

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/horizontal-layout",
3
- "version": "25.0.0-alpha2",
3
+ "version": "25.0.0-alpha21",
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",
@@ -35,19 +34,19 @@
35
34
  ],
36
35
  "dependencies": {
37
36
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/component-base": "25.0.0-alpha2",
39
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha2",
40
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
37
+ "@vaadin/component-base": "25.0.0-alpha21",
38
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha21",
41
39
  "lit": "^3.0.0"
42
40
  },
43
41
  "devDependencies": {
44
- "@vaadin/chai-plugins": "25.0.0-alpha2",
45
- "@vaadin/test-runner-commands": "25.0.0-alpha2",
46
- "@vaadin/testing-helpers": "^2.0.0"
42
+ "@vaadin/chai-plugins": "25.0.0-alpha21",
43
+ "@vaadin/test-runner-commands": "25.0.0-alpha21",
44
+ "@vaadin/testing-helpers": "^2.0.0",
45
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha21"
47
46
  },
48
47
  "web-types": [
49
48
  "web-types.json",
50
49
  "web-types.lit.json"
51
50
  ],
52
- "gitHead": "67ffcd5355cf21ce1b5039c598525109fc4c164b"
51
+ "gitHead": "8fb9e9710c01449edf623a1aaac4655cdc11a933"
53
52
  }
@@ -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 {
@@ -17,15 +18,19 @@ export const baseStyles = css`
17
18
 
18
19
  /* Theme variations */
19
20
  :host([theme~='margin']) {
20
- margin: 1em;
21
+ margin: var(--vaadin-horizontal-layout-margin, var(--vaadin-padding-m));
21
22
  }
22
23
 
23
24
  :host([theme~='padding']) {
24
- padding: 1em;
25
+ padding: var(--vaadin-horizontal-layout-margin, var(--vaadin-padding-m));
25
26
  }
26
27
 
27
28
  :host([theme~='spacing']) {
28
- gap: 1em;
29
+ gap: var(--vaadin-horizontal-layout-gap, var(--vaadin-gap-s));
30
+ }
31
+
32
+ :host([theme~='wrap']) {
33
+ flex-wrap: wrap;
29
34
  }
30
35
 
31
36
  :host([has-end]:not([has-middle])) ::slotted([last-start-child]) {
@@ -10,7 +10,7 @@ import { HorizontalLayoutMixin } from './vaadin-horizontal-layout-mixin.js';
10
10
  /**
11
11
  * `<vaadin-horizontal-layout>` provides a simple way to horizontally align your HTML elements.
12
12
  *
13
- * ```
13
+ * ```html
14
14
  * <vaadin-horizontal-layout>
15
15
  * <div>Item 1</div>
16
16
  * <div>Item 2</div>
@@ -7,14 +7,15 @@ 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';
12
+ import { horizontalLayoutStyles } from './styles/vaadin-horizontal-layout-base-styles.js';
11
13
  import { HorizontalLayoutMixin } from './vaadin-horizontal-layout-mixin.js';
12
- import { horizontalLayoutStyles } from './vaadin-horizontal-layout-styles.js';
13
14
 
14
15
  /**
15
16
  * `<vaadin-horizontal-layout>` provides a simple way to horizontally align your HTML elements.
16
17
  *
17
- * ```
18
+ * ```html
18
19
  * <vaadin-horizontal-layout>
19
20
  * <div>Item 1</div>
20
21
  * <div>Item 2</div>
@@ -48,7 +49,9 @@ import { horizontalLayoutStyles } from './vaadin-horizontal-layout-styles.js';
48
49
  * @mixes ElementMixin
49
50
  * @mixes HorizontalLayoutMixin
50
51
  */
51
- class HorizontalLayout extends HorizontalLayoutMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
52
+ class HorizontalLayout extends HorizontalLayoutMixin(
53
+ ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
54
+ ) {
52
55
  static get is() {
53
56
  return 'vaadin-horizontal-layout';
54
57
  }
@@ -57,6 +60,12 @@ class HorizontalLayout extends HorizontalLayoutMixin(ThemableMixin(ElementMixin(
57
60
  return horizontalLayoutStyles;
58
61
  }
59
62
 
63
+ static get lumoInjector() {
64
+ return {
65
+ includeBaseStyles: true,
66
+ };
67
+ }
68
+
60
69
  /** @protected */
61
70
  render() {
62
71
  return html`
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-horizontal-layout.js';
1
+ import './src/vaadin-horizontal-layout.js';
2
2
  export * from './src/vaadin-horizontal-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/horizontal-layout",
4
- "version": "25.0.0-alpha2",
4
+ "version": "25.0.0-alpha21",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-horizontal-layout",
11
- "description": "`<vaadin-horizontal-layout>` provides a simple way to horizontally align your HTML elements.\n\n```\n<vaadin-horizontal-layout>\n <div>Item 1</div>\n <div>Item 2</div>\n</vaadin-horizontal-layout>\n```\n\n### Built-in Theme Variations\n\n`<vaadin-horizontal-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 width\n\n### Component's slots\n\nThe following slots are available to be set:\n\nSlot name | Description\n-------------------|---------------\nno name | Default slot\n`middle` | Slot for the content placed in the middle\n`end` | Slot for the content placed at the end",
11
+ "description": "`<vaadin-horizontal-layout>` provides a simple way to horizontally align your HTML elements.\n\n```html\n<vaadin-horizontal-layout>\n <div>Item 1</div>\n <div>Item 2</div>\n</vaadin-horizontal-layout>\n```\n\n### Built-in Theme Variations\n\n`<vaadin-horizontal-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 width\n\n### Component's slots\n\nThe following slots are available to be set:\n\nSlot name | Description\n-------------------|---------------\nno name | Default slot\n`middle` | Slot for the content placed in the middle\n`end` | Slot for the content placed at the end",
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/horizontal-layout",
4
- "version": "25.0.0-alpha2",
4
+ "version": "25.0.0-alpha21",
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-horizontal-layout",
19
- "description": "`<vaadin-horizontal-layout>` provides a simple way to horizontally align your HTML elements.\n\n```\n<vaadin-horizontal-layout>\n <div>Item 1</div>\n <div>Item 2</div>\n</vaadin-horizontal-layout>\n```\n\n### Built-in Theme Variations\n\n`<vaadin-horizontal-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 width\n\n### Component's slots\n\nThe following slots are available to be set:\n\nSlot name | Description\n-------------------|---------------\nno name | Default slot\n`middle` | Slot for the content placed in the middle\n`end` | Slot for the content placed at the end",
19
+ "description": "`<vaadin-horizontal-layout>` provides a simple way to horizontally align your HTML elements.\n\n```html\n<vaadin-horizontal-layout>\n <div>Item 1</div>\n <div>Item 2</div>\n</vaadin-horizontal-layout>\n```\n\n### Built-in Theme Variations\n\n`<vaadin-horizontal-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 width\n\n### Component's slots\n\nThe following slots are available to be set:\n\nSlot name | Description\n-------------------|---------------\nno name | Default slot\n`middle` | Slot for the content placed in the middle\n`end` | Slot for the content placed at the end",
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 horizontalLayout = 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-horizontal-layout', horizontalLayout, { moduleId: 'lumo-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';