@vaadin/button 24.0.5 → 24.1.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/README.md +2 -2
- package/package.json +8 -7
- package/src/vaadin-button-base.js +15 -0
- package/src/vaadin-button-mixin.d.ts +5 -5
- package/src/vaadin-button-mixin.js +3 -3
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ An accessible and customizable button that allows users to perform actions.
|
|
|
13
13
|
<vaadin-button theme="tertiary">Tertiary</vaadin-button>
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
[<img src="https://raw.githubusercontent.com/vaadin/web-components/
|
|
16
|
+
[<img src="https://raw.githubusercontent.com/vaadin/web-components/main/packages/button/screenshot.png" width="296" alt="Screenshot of vaadin-button">](https://vaadin.com/docs/latest/components/button)
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
@@ -32,7 +32,7 @@ import '@vaadin/button';
|
|
|
32
32
|
## Themes
|
|
33
33
|
|
|
34
34
|
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
|
|
35
|
-
The [main entrypoint](https://github.com/vaadin/web-components/blob/
|
|
35
|
+
The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/button/vaadin-button.js) of the package uses the Lumo theme.
|
|
36
36
|
|
|
37
37
|
To use the Material theme, import the component from the `theme/material` folder:
|
|
38
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/button",
|
|
3
|
-
"version": "24.0
|
|
3
|
+
"version": "24.1.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,15 +38,16 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
40
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/
|
|
42
|
-
"@vaadin/
|
|
43
|
-
"@vaadin/vaadin-
|
|
44
|
-
"@vaadin/vaadin-
|
|
41
|
+
"@vaadin/a11y-base": "24.1.0-alpha10",
|
|
42
|
+
"@vaadin/component-base": "24.1.0-alpha10",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "24.1.0-alpha10",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "24.1.0-alpha10",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "24.1.0-alpha10",
|
|
45
46
|
"lit": "^2.0.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@esm-bundle/chai": "^4.3.4",
|
|
49
|
-
"@vaadin/icon": "
|
|
50
|
+
"@vaadin/icon": "24.1.0-alpha10",
|
|
50
51
|
"@vaadin/testing-helpers": "^0.4.0",
|
|
51
52
|
"sinon": "^13.0.2"
|
|
52
53
|
},
|
|
@@ -54,5 +55,5 @@
|
|
|
54
55
|
"web-types.json",
|
|
55
56
|
"web-types.lit.json"
|
|
56
57
|
],
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "12e39be7eb3b49c68708e8ca3de2fb22e91051a1"
|
|
58
59
|
}
|
|
@@ -50,6 +50,21 @@ export const buttonStyles = css`
|
|
|
50
50
|
overflow: hidden;
|
|
51
51
|
text-overflow: ellipsis;
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
@media (forced-colors: active) {
|
|
55
|
+
:host {
|
|
56
|
+
outline: 1px solid;
|
|
57
|
+
outline-offset: -1px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([focused]) {
|
|
61
|
+
outline-width: 2px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([disabled]) {
|
|
65
|
+
outline-color: GrayText;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
53
68
|
`;
|
|
54
69
|
|
|
55
70
|
export const buttonTemplate = (html) => html`
|
|
@@ -4,11 +4,11 @@
|
|
|
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';
|
|
7
|
-
import type { ActiveMixinClass } from '@vaadin/
|
|
8
|
-
import type { DisabledMixinClass } from '@vaadin/
|
|
9
|
-
import type { FocusMixinClass } from '@vaadin/
|
|
10
|
-
import type { KeyboardMixinClass } from '@vaadin/
|
|
11
|
-
import type { TabindexMixinClass } from '@vaadin/
|
|
7
|
+
import type { ActiveMixinClass } from '@vaadin/a11y-base/src/active-mixin.js';
|
|
8
|
+
import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
|
|
9
|
+
import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
|
|
10
|
+
import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
|
|
11
|
+
import type { TabindexMixinClass } from '@vaadin/a11y-base/src/tabindex-mixin.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* A mixin providing common button functionality.
|
|
@@ -3,9 +3,9 @@
|
|
|
3
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
|
-
import { ActiveMixin } from '@vaadin/
|
|
7
|
-
import { FocusMixin } from '@vaadin/
|
|
8
|
-
import { TabindexMixin } from '@vaadin/
|
|
6
|
+
import { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';
|
|
7
|
+
import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
|
|
8
|
+
import { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* A mixin providing common button functionality.
|
package/web-types.json
CHANGED