@vaadin/horizontal-layout 24.7.0-alpha4 → 24.7.0-alpha6

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": "24.7.0-alpha4",
3
+ "version": "24.7.0-alpha6",
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-alpha4",
40
- "@vaadin/vaadin-lumo-styles": "24.7.0-alpha4",
41
- "@vaadin/vaadin-material-styles": "24.7.0-alpha4",
42
- "@vaadin/vaadin-themable-mixin": "24.7.0-alpha4",
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",
43
43
  "lit": "^3.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@vaadin/chai-plugins": "24.7.0-alpha4",
46
+ "@vaadin/chai-plugins": "24.7.0-alpha6",
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": "d7165cebf9dcf6a7e9e22f6353662d33404b4856"
53
+ "gitHead": "6255a512997a648da91fed37de4d5000809eaebf"
54
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 horizontalLayoutStyles: CSSResult;
@@ -0,0 +1,30 @@
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 horizontalLayoutStyles = css`
9
+ :host {
10
+ display: flex;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ :host([hidden]) {
15
+ display: none !important;
16
+ }
17
+
18
+ /* Theme variations */
19
+ :host([theme~='margin']) {
20
+ margin: 1em;
21
+ }
22
+
23
+ :host([theme~='padding']) {
24
+ padding: 1em;
25
+ }
26
+
27
+ :host([theme~='spacing']) {
28
+ gap: 1em;
29
+ }
30
+ `;
@@ -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 { horizontalLayoutStyles } from './vaadin-horizontal-layout-styles.js';
11
+
12
+ registerStyles('vaadin-horizontal-layout', horizontalLayoutStyles, { moduleId: 'vaadin-horizontal-layout-styles' });
10
13
 
11
14
  /**
12
15
  * `<vaadin-horizontal-layout>` provides a simple way to horizontally align your HTML elements.
@@ -36,33 +39,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
36
39
  */
37
40
  class HorizontalLayout extends ElementMixin(ThemableMixin(PolymerElement)) {
38
41
  static get template() {
39
- return html`
40
- <style>
41
- :host {
42
- display: flex;
43
- box-sizing: border-box;
44
- }
45
-
46
- :host([hidden]) {
47
- display: none !important;
48
- }
49
-
50
- /* Theme variations */
51
- :host([theme~='margin']) {
52
- margin: 1em;
53
- }
54
-
55
- :host([theme~='padding']) {
56
- padding: 1em;
57
- }
58
-
59
- :host([theme~='spacing']) {
60
- gap: 1em;
61
- }
62
- </style>
63
-
64
- <slot></slot>
65
- `;
42
+ return html`<slot></slot>`;
66
43
  }
67
44
 
68
45
  static get is() {
@@ -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 { horizontalLayoutStyles } from './vaadin-horizontal-layout-styles.js';
11
12
 
12
13
  /**
13
14
  * LitElement based version of `<vaadin-horizontal-layout>` web component.
@@ -19,36 +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 HorizontalLayout extends ThemableMixin(ElementMixin(PolylitMixin(LitElement))) {
22
- static get styles() {
23
- return css`
24
- :host {
25
- display: flex;
26
- box-sizing: border-box;
27
- }
28
-
29
- :host([hidden]) {
30
- display: none !important;
31
- }
32
-
33
- /* Theme variations */
34
- :host([theme~='margin']) {
35
- margin: 1em;
36
- }
37
-
38
- :host([theme~='padding']) {
39
- padding: 1em;
40
- }
41
-
42
- :host([theme~='spacing']) {
43
- gap: 1em;
44
- }
45
- `;
46
- }
47
-
48
23
  static get is() {
49
24
  return 'vaadin-horizontal-layout';
50
25
  }
51
26
 
27
+ static get styles() {
28
+ return horizontalLayoutStyles;
29
+ }
30
+
31
+ /** @protected */
52
32
  render() {
53
33
  return html`<slot></slot>`;
54
34
  }
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.7.0-alpha4",
4
+ "version": "24.7.0-alpha6",
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.7.0-alpha4",
4
+ "version": "24.7.0-alpha6",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {