@vaadin/button 24.0.0-alpha1 → 24.0.0-alpha11

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": "24.0.0-alpha1",
3
+ "version": "24.0.0-alpha11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,14 +36,14 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/component-base": "24.0.0-alpha1",
40
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha1",
41
- "@vaadin/vaadin-material-styles": "24.0.0-alpha1",
42
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha1"
39
+ "@vaadin/component-base": "24.0.0-alpha11",
40
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha11",
41
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha11",
42
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha11"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@esm-bundle/chai": "^4.3.4",
46
- "@vaadin/icon": "24.0.0-alpha1",
46
+ "@vaadin/icon": "24.0.0-alpha11",
47
47
  "@vaadin/testing-helpers": "^0.3.2",
48
48
  "sinon": "^13.0.2"
49
49
  },
@@ -51,5 +51,5 @@
51
51
  "web-types.json",
52
52
  "web-types.lit.json"
53
53
  ],
54
- "gitHead": "427527c27c4b27822d61fd41d38d7b170134770b"
54
+ "gitHead": "641b3d96ceeb3e503a093682ebe686afdd8c3a68"
55
55
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ActiveMixin } from '@vaadin/component-base/src/active-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -98,13 +98,13 @@ class Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(Poly
98
98
  }
99
99
  </style>
100
100
  <div class="vaadin-button-container">
101
- <span part="prefix">
101
+ <span part="prefix" aria-hidden="true">
102
102
  <slot name="prefix"></slot>
103
103
  </span>
104
104
  <span part="label">
105
105
  <slot></slot>
106
106
  </span>
107
- <span part="suffix">
107
+ <span part="suffix" aria-hidden="true">
108
108
  <slot name="suffix"></slot>
109
109
  </span>
110
110
  </div>
@@ -25,6 +25,7 @@ const button = css`
25
25
  -webkit-tap-highlight-color: transparent;
26
26
  -webkit-font-smoothing: antialiased;
27
27
  -moz-osx-font-smoothing: grayscale;
28
+ flex-shrink: 0;
28
29
  }
29
30
 
30
31
  /* Set only for the internal parts so we don’t affect the host vertical alignment */
@@ -203,16 +204,14 @@ const button = css`
203
204
 
204
205
  /* Icons */
205
206
 
206
- [part] ::slotted(vaadin-icon),
207
- [part] ::slotted(iron-icon) {
207
+ [part] ::slotted(vaadin-icon) {
208
208
  display: inline-block;
209
209
  width: var(--lumo-icon-size-m);
210
210
  height: var(--lumo-icon-size-m);
211
211
  }
212
212
 
213
213
  /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
214
- [part] ::slotted(vaadin-icon[icon^='vaadin:']),
215
- [part] ::slotted(iron-icon[icon^='vaadin:']) {
214
+ [part] ::slotted(vaadin-icon[icon^='vaadin:']) {
216
215
  padding: 0.25em;
217
216
  box-sizing: border-box !important;
218
217
  }
@@ -25,6 +25,7 @@ const button = css`
25
25
  -webkit-tap-highlight-color: transparent;
26
26
  -webkit-font-smoothing: antialiased;
27
27
  -moz-osx-font-smoothing: grayscale;
28
+ flex-shrink: 0;
28
29
  }
29
30
 
30
31
  :host::before,
@@ -116,21 +117,18 @@ const button = css`
116
117
 
117
118
  /* Icon alignment */
118
119
 
119
- [part] ::slotted(vaadin-icon),
120
- [part] ::slotted(iron-icon) {
120
+ [part] ::slotted(vaadin-icon) {
121
121
  display: block;
122
122
  width: 18px;
123
123
  height: 18px;
124
124
  }
125
125
 
126
- [part='prefix'] ::slotted(vaadin-icon),
127
- [part='prefix'] ::slotted(iron-icon) {
126
+ [part='prefix'] ::slotted(vaadin-icon) {
128
127
  margin-right: 8px;
129
128
  margin-left: -4px;
130
129
  }
131
130
 
132
- [part='suffix'] ::slotted(vaadin-icon),
133
- [part='suffix'] ::slotted(iron-icon) {
131
+ [part='suffix'] ::slotted(vaadin-icon) {
134
132
  margin-left: 8px;
135
133
  margin-right: -4px;
136
134
  }
@@ -156,14 +154,12 @@ const button = css`
156
154
  transform: translate(50%, -50%) scale(1);
157
155
  }
158
156
 
159
- :host([dir='rtl']) [part='prefix'] ::slotted(vaadin-icon),
160
- :host([dir='rtl']) [part='prefix'] ::slotted(iron-icon) {
157
+ :host([dir='rtl']) [part='prefix'] ::slotted(vaadin-icon) {
161
158
  margin-right: -4px;
162
159
  margin-left: 8px;
163
160
  }
164
161
 
165
- :host([dir='rtl']) [part='suffix'] ::slotted(vaadin-icon),
166
- :host([dir='rtl']) [part='suffix'] ::slotted(iron-icon) {
162
+ :host([dir='rtl']) [part='suffix'] ::slotted(vaadin-icon) {
167
163
  margin-left: -4px;
168
164
  margin-right: 8px;
169
165
  }
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": "24.0.0-alpha1",
4
+ "version": "24.0.0-alpha11",
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": "24.0.0-alpha1",
4
+ "version": "24.0.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {