@vaadin/button 25.0.0-alpha1 → 25.0.0-alpha10

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/button",
3
- "version": "25.0.0-alpha1",
3
+ "version": "25.0.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,8 +21,8 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "!src/vaadin-button-base-styles.d.ts",
25
- "!src/vaadin-button-base-styles.js",
24
+ "!src/styles/*-base-styles.d.ts",
25
+ "!src/styles/*-base-styles.js",
26
26
  "theme",
27
27
  "vaadin-*.d.ts",
28
28
  "vaadin-*.js",
@@ -37,22 +37,23 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.0.0-alpha1",
41
- "@vaadin/component-base": "25.0.0-alpha1",
42
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
43
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
40
+ "@vaadin/a11y-base": "25.0.0-alpha10",
41
+ "@vaadin/component-base": "25.0.0-alpha10",
42
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
43
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/chai-plugins": "25.0.0-alpha1",
48
- "@vaadin/icon": "25.0.0-alpha1",
49
- "@vaadin/test-runner-commands": "25.0.0-alpha1",
50
- "@vaadin/testing-helpers": "^1.1.0",
47
+ "@vaadin/chai-plugins": "25.0.0-alpha10",
48
+ "@vaadin/icon": "25.0.0-alpha10",
49
+ "@vaadin/icons": "25.0.0-alpha10",
50
+ "@vaadin/test-runner-commands": "25.0.0-alpha10",
51
+ "@vaadin/testing-helpers": "^2.0.0",
51
52
  "sinon": "^18.0.0"
52
53
  },
53
54
  "web-types": [
54
55
  "web-types.json",
55
56
  "web-types.lit.json"
56
57
  ],
57
- "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
58
+ "gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
58
59
  }
@@ -0,0 +1,106 @@
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 buttonStyles = css`
10
+ :host {
11
+ display: inline-flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ text-align: center;
15
+ gap: var(--vaadin-button-gap, 0 var(--vaadin-gap-container-inline));
16
+ white-space: nowrap;
17
+ -webkit-tap-highlight-color: transparent;
18
+ -webkit-user-select: none;
19
+ user-select: none;
20
+ cursor: var(--vaadin-clickable-cursor);
21
+ box-sizing: border-box;
22
+ vertical-align: middle;
23
+ flex-shrink: 0;
24
+ height: var(--vaadin-button-height, auto);
25
+ margin: var(--vaadin-button-margin, 0);
26
+ padding: var(--vaadin-button-padding, var(--vaadin-padding-container));
27
+ font-family: var(--vaadin-button-font-family, inherit);
28
+ font-size: var(--vaadin-button-font-size, inherit);
29
+ line-height: var(--vaadin-button-line-height, inherit);
30
+ font-weight: var(--vaadin-button-font-weight, 500);
31
+ color: var(--vaadin-button-text-color, var(--vaadin-color));
32
+ background: var(--vaadin-button-background, var(--vaadin-background-container));
33
+ background-origin: border-box;
34
+ border: var(
35
+ --vaadin-button-border,
36
+ var(--vaadin-button-border-width, 1px) solid var(--vaadin-button-border-color, var(--vaadin-border-color))
37
+ );
38
+ border-radius: var(--vaadin-button-border-radius, var(--vaadin-radius-m));
39
+ touch-action: manipulation;
40
+ }
41
+
42
+ :host([hidden]) {
43
+ display: none !important;
44
+ }
45
+
46
+ .vaadin-button-container,
47
+ [part='prefix'],
48
+ [part='suffix'],
49
+ [part='label'] {
50
+ display: contents;
51
+ }
52
+
53
+ :host(:is([focus-ring], :focus-visible)) {
54
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
55
+ outline-offset: 1px;
56
+ }
57
+
58
+ :host([theme~='primary']) {
59
+ --vaadin-button-background: var(--vaadin-color);
60
+ --vaadin-button-text-color: var(--vaadin-background-color);
61
+ --vaadin-button-border-color: transparent;
62
+ }
63
+
64
+ :host([theme~='tertiary']) {
65
+ --vaadin-button-text-color: var(--_vaadin-button-text-color);
66
+ --vaadin-button-background: transparent;
67
+ --vaadin-button-border-color: transparent;
68
+ }
69
+
70
+ :host([disabled]) {
71
+ pointer-events: var(--_vaadin-button-disabled-pointer-events, none);
72
+ cursor: var(--vaadin-disabled-cursor);
73
+ opacity: 0.5;
74
+ }
75
+
76
+ :host([disabled][theme~='primary']) {
77
+ --vaadin-button-text-color: var(--vaadin-background-container-strong);
78
+ --vaadin-button-background: var(--vaadin-color-disabled);
79
+ }
80
+
81
+ @media (forced-colors: active) {
82
+ :host {
83
+ --vaadin-button-border-width: 1px;
84
+ --vaadin-button-background: ButtonFace;
85
+ --vaadin-button-text-color: ButtonText;
86
+ }
87
+
88
+ :host([theme~='primary']) {
89
+ forced-color-adjust: none;
90
+ --vaadin-button-background: CanvasText;
91
+ --vaadin-button-text-color: Canvas;
92
+ --vaadin-icon-color: Canvas;
93
+ }
94
+
95
+ ::slotted(*) {
96
+ forced-color-adjust: auto;
97
+ }
98
+
99
+ :host([disabled]) {
100
+ --vaadin-button-background: transparent !important;
101
+ --vaadin-button-border-color: GrayText !important;
102
+ --vaadin-button-text-color: GrayText !important;
103
+ opacity: 1;
104
+ }
105
+ }
106
+ `;
@@ -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 buttonStyles: CSSResult;
@@ -8,8 +8,9 @@ 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 { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
11
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
11
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
- import { buttonStyles } from './vaadin-button-core-styles.js';
13
+ import { buttonStyles } from './styles/vaadin-button-core-styles.js';
13
14
  import { ButtonMixin } from './vaadin-button-mixin.js';
14
15
 
15
16
  /**
@@ -46,7 +47,7 @@ import { ButtonMixin } from './vaadin-button-mixin.js';
46
47
  * @mixes ElementMixin
47
48
  * @mixes ThemableMixin
48
49
  */
49
- class Button extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
50
+ class Button extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
50
51
  static get is() {
51
52
  return 'vaadin-button';
52
53
  }
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/button",
4
- "version": "25.0.0-alpha1",
4
+ "version": "25.0.0-alpha10",
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/button",
4
- "version": "25.0.0-alpha1",
4
+ "version": "25.0.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {