@vaadin/button 25.0.0-alpha3 → 25.0.0-alpha5

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