@vaadin/checkbox 23.3.2 → 23.3.4
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/checkbox",
|
|
3
|
-
"version": "23.3.
|
|
3
|
+
"version": "23.3.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "~23.3.
|
|
40
|
-
"@vaadin/field-base": "~23.3.
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "~23.3.
|
|
42
|
-
"@vaadin/vaadin-material-styles": "~23.3.
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "~23.3.
|
|
39
|
+
"@vaadin/component-base": "~23.3.4",
|
|
40
|
+
"@vaadin/field-base": "~23.3.4",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "~23.3.4",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "~23.3.4",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "~23.3.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"web-types.json",
|
|
52
52
|
"web-types.lit.json"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "e896534f360fb7b7eed1ed6b3e660ca1fe44e028"
|
|
55
55
|
}
|
package/src/vaadin-checkbox.js
CHANGED
|
@@ -85,30 +85,41 @@ class Checkbox extends LabelMixin(
|
|
|
85
85
|
align-items: baseline;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
[part='checkbox'],
|
|
89
|
+
::slotted(input),
|
|
90
|
+
::slotted(label) {
|
|
91
|
+
grid-row: 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[part='checkbox'],
|
|
95
|
+
::slotted(input) {
|
|
96
|
+
grid-column: 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[part='checkbox'] {
|
|
100
|
+
width: var(--vaadin-checkbox-size, 1em);
|
|
101
|
+
height: var(--vaadin-checkbox-size, 1em);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[part='checkbox']::before {
|
|
105
|
+
display: block;
|
|
106
|
+
content: '\\202F';
|
|
107
|
+
line-height: var(--vaadin-checkbox-size, 1em);
|
|
108
|
+
contain: paint;
|
|
91
109
|
}
|
|
92
110
|
|
|
93
111
|
/* visually hidden */
|
|
94
112
|
::slotted(input) {
|
|
95
|
-
position: absolute;
|
|
96
|
-
top: 0;
|
|
97
|
-
left: 0;
|
|
98
|
-
right: 0;
|
|
99
|
-
width: 100%;
|
|
100
|
-
height: 100%;
|
|
101
113
|
opacity: 0;
|
|
102
114
|
cursor: inherit;
|
|
103
115
|
margin: 0;
|
|
116
|
+
align-self: stretch;
|
|
117
|
+
-webkit-appearance: none;
|
|
104
118
|
}
|
|
105
119
|
</style>
|
|
106
120
|
<div class="vaadin-checkbox-container">
|
|
107
|
-
<div
|
|
108
|
-
|
|
109
|
-
<slot name="input"></slot>
|
|
110
|
-
</div>
|
|
111
|
-
|
|
121
|
+
<div part="checkbox"></div>
|
|
122
|
+
<slot name="input"></slot>
|
|
112
123
|
<slot name="label"></slot>
|
|
113
124
|
|
|
114
125
|
<div style="display: none !important">
|
|
@@ -22,23 +22,23 @@ registerStyles(
|
|
|
22
22
|
user-select: none;
|
|
23
23
|
cursor: default;
|
|
24
24
|
outline: none;
|
|
25
|
+
--_checkbox-size: var(--vaadin-checkbox-size, calc(var(--lumo-size-m) / 2));
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
:host([has-label]) ::slotted(label) {
|
|
28
|
-
padding: var(--lumo-space-xs)
|
|
29
|
+
padding-block: var(--lumo-space-xs);
|
|
30
|
+
padding-inline: var(--lumo-space-xs) var(--lumo-space-s);
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
[part='checkbox'] {
|
|
32
|
-
width:
|
|
33
|
-
height:
|
|
34
|
+
width: var(--_checkbox-size);
|
|
35
|
+
height: var(--_checkbox-size);
|
|
34
36
|
margin: var(--lumo-space-xs);
|
|
35
37
|
position: relative;
|
|
36
38
|
border-radius: var(--lumo-border-radius-s);
|
|
37
39
|
background-color: var(--lumo-contrast-20pct);
|
|
38
40
|
transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;
|
|
39
|
-
line-height: 1.2;
|
|
40
41
|
cursor: var(--lumo-clickable-cursor);
|
|
41
|
-
flex: none;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
:host([indeterminate]) [part='checkbox'],
|
|
@@ -46,18 +46,13 @@ registerStyles(
|
|
|
46
46
|
background-color: var(--lumo-primary-color);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
/* Needed to align the checkbox nicely on the baseline */
|
|
50
|
-
[part='checkbox']::before {
|
|
51
|
-
content: '\\2003';
|
|
52
|
-
}
|
|
53
|
-
|
|
54
49
|
/* Checkmark */
|
|
55
50
|
[part='checkbox']::after {
|
|
56
51
|
pointer-events: none;
|
|
57
52
|
font-family: 'lumo-icons';
|
|
58
53
|
content: var(--lumo-icons-checkmark);
|
|
59
54
|
color: var(--lumo-primary-contrast-color);
|
|
60
|
-
font-size: calc(var(--
|
|
55
|
+
font-size: calc(var(--_checkbox-size) + 2px);
|
|
61
56
|
line-height: 1;
|
|
62
57
|
position: absolute;
|
|
63
58
|
top: -1px;
|
|
@@ -119,9 +114,9 @@ registerStyles(
|
|
|
119
114
|
[part='checkbox']::before {
|
|
120
115
|
pointer-events: none;
|
|
121
116
|
color: transparent;
|
|
122
|
-
display: inline-block;
|
|
123
117
|
width: 100%;
|
|
124
118
|
height: 100%;
|
|
119
|
+
line-height: var(--_checkbox-size);
|
|
125
120
|
border-radius: inherit;
|
|
126
121
|
background-color: inherit;
|
|
127
122
|
transform: scale(1.4);
|
|
@@ -12,6 +12,7 @@ registerStyles(
|
|
|
12
12
|
user-select: none;
|
|
13
13
|
outline: none;
|
|
14
14
|
-webkit-tap-highlight-color: transparent;
|
|
15
|
+
--_checkbox-size: var(--vaadin-checkbox-size, 16px);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
:host([has-label]) ::slotted(label) {
|
|
@@ -19,25 +20,21 @@ registerStyles(
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
[part='checkbox'] {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
height: 16px;
|
|
23
|
+
width: var(--_checkbox-size);
|
|
24
|
+
height: var(--_checkbox-size);
|
|
25
25
|
margin: 4px;
|
|
26
26
|
position: relative;
|
|
27
27
|
border-radius: 2px;
|
|
28
28
|
box-shadow: inset 0 0 0 2px var(--material-secondary-text-color);
|
|
29
|
-
line-height: 1.275;
|
|
30
29
|
background-color: transparent;
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
/* Used for the ripple */
|
|
34
33
|
[part='checkbox']::before {
|
|
35
|
-
/* Needed to align the checkbox nicely on the baseline */
|
|
36
|
-
content: '\\2003';
|
|
37
34
|
pointer-events: none;
|
|
38
|
-
display: inline-block;
|
|
39
35
|
width: 100%;
|
|
40
36
|
height: 100%;
|
|
37
|
+
line-height: var(--_checkbox-size);
|
|
41
38
|
border-radius: 50%;
|
|
42
39
|
background-color: var(--material-disabled-text-color);
|
|
43
40
|
transform: scale(0);
|
package/web-types.json
CHANGED