@vaadin/vaadin-lumo-styles 22.0.0-alpha6 → 22.0.0-beta1
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/color.js +29 -29
- package/font-icons.js +1 -1
- package/gulpfile.js +1 -1
- package/mixins/helper.d.ts +8 -0
- package/mixins/helper.js +63 -0
- package/mixins/input-field-shared.d.ts +10 -0
- package/mixins/input-field-shared.js +149 -0
- package/mixins/required-field.js +8 -16
- package/package.json +32 -28
- package/presets/compact.js +1 -28
- package/typography.js +3 -29
- package/vaadin-iconset.js +1 -1
- package/version.js +1 -1
package/color.js
CHANGED
|
@@ -30,9 +30,9 @@ const colorBase = css`
|
|
|
30
30
|
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
31
31
|
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
32
32
|
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
33
|
-
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.
|
|
34
|
-
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.
|
|
35
|
-
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.
|
|
33
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
34
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
35
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
36
36
|
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
37
37
|
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
38
38
|
--lumo-shade: hsl(214, 35%, 15%);
|
|
@@ -58,24 +58,24 @@ const colorBase = css`
|
|
|
58
58
|
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
59
59
|
|
|
60
60
|
/* Primary */
|
|
61
|
-
--lumo-primary-color: hsl(214,
|
|
62
|
-
--lumo-primary-color-50pct: hsla(214,
|
|
63
|
-
--lumo-primary-color-10pct: hsla(214,
|
|
64
|
-
--lumo-primary-text-color:
|
|
61
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
62
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
63
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
64
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
65
65
|
--lumo-primary-contrast-color: #fff;
|
|
66
66
|
|
|
67
67
|
/* Error */
|
|
68
|
-
--lumo-error-color: hsl(3,
|
|
69
|
-
--lumo-error-color-50pct: hsla(3,
|
|
70
|
-
--lumo-error-color-10pct: hsla(3,
|
|
71
|
-
--lumo-error-text-color: hsl(3,
|
|
68
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
69
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
70
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
71
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
72
72
|
--lumo-error-contrast-color: #fff;
|
|
73
73
|
|
|
74
74
|
/* Success */
|
|
75
|
-
--lumo-success-color: hsl(145,
|
|
76
|
-
--lumo-success-color-50pct: hsla(145,
|
|
77
|
-
--lumo-success-color-10pct: hsla(145,
|
|
78
|
-
--lumo-success-text-color: hsl(145,
|
|
75
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
76
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
77
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
78
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
79
79
|
--lumo-success-contrast-color: #fff;
|
|
80
80
|
}
|
|
81
81
|
`;
|
|
@@ -96,8 +96,8 @@ const color = css`
|
|
|
96
96
|
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
97
97
|
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
98
98
|
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
99
|
-
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.
|
|
100
|
-
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.
|
|
99
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
100
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
101
101
|
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
102
102
|
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
103
103
|
--lumo-tint: hsl(214, 100%, 98%);
|
|
@@ -136,23 +136,23 @@ const color = css`
|
|
|
136
136
|
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
137
137
|
|
|
138
138
|
/* Primary */
|
|
139
|
-
--lumo-primary-color: hsl(214,
|
|
140
|
-
--lumo-primary-color-50pct: hsla(214,
|
|
141
|
-
--lumo-primary-color-10pct: hsla(214, 90%,
|
|
142
|
-
--lumo-primary-text-color: hsl(214,
|
|
139
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
140
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
141
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
142
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
143
143
|
--lumo-primary-contrast-color: #fff;
|
|
144
144
|
|
|
145
145
|
/* Error */
|
|
146
|
-
--lumo-error-color: hsl(3,
|
|
147
|
-
--lumo-error-color-50pct: hsla(3,
|
|
148
|
-
--lumo-error-color-10pct: hsla(3,
|
|
149
|
-
--lumo-error-text-color: hsl(3, 100%,
|
|
146
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
147
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
148
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
149
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
150
150
|
|
|
151
151
|
/* Success */
|
|
152
|
-
--lumo-success-color: hsl(145,
|
|
153
|
-
--lumo-success-color-50pct: hsla(145,
|
|
154
|
-
--lumo-success-color-10pct: hsla(145,
|
|
155
|
-
--lumo-success-text-color: hsl(145, 85%,
|
|
152
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
153
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
154
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
155
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
html {
|
package/font-icons.js
CHANGED
|
@@ -11,7 +11,7 @@ $_documentContainer.innerHTML = `
|
|
|
11
11
|
<style>
|
|
12
12
|
@font-face {
|
|
13
13
|
font-family: 'lumo-icons';
|
|
14
|
-
src: url(data:application/font-woff;charset=utf-8;base64,
|
|
14
|
+
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuKY21hcAAAAYgAAAD4AAADrsCU8d5nbHlmAAACgAAAC2cAABeAWri7U2hlYWQAAA3oAAAAMAAAADZa/6SsaGhlYQAADhgAAAAdAAAAJAbpA35obXR4AAAOOAAAABAAAACspBAAAGxvY2EAAA5IAAAAWAAAAFh57oA4bWF4cAAADqAAAAAfAAAAIAFKAXBuYW1lAAAOwAAAATEAAAIuUUJZCHBvc3QAAA/0AAABKwAAAelm8SzVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+yDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mIO+p/FEMUcxDANKMwIkgMABn8MLQB4nO3SWW6DMABF0UtwCEnIPM/zh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AM8EJo8AAAAAAE4AmgDoAQoBLAFOAXABmgHEAe4CGgKcAugEmgS8BNYE8gUOBSoFegXQBf4GRAZmBrYHGAeQCBgIUghqCP4JRgm+CdoKBAo+CoQKugr0C1QLmgvAeJxjYGRgYNBmTGEQZQABJiDmAkIGhv9gPgMAGJQBvAB4nG2RPU7DMBiG3/QP0UoIBGJh8QILavozdmRo9w7d09RpUzlx5LgVvQMn4BAcgoEzcAgOwVvzSZVQbcnf48fvFysJgGt8IcJxROiG9TgauODuj5ukG+EW+UG4jR4ehTv0Q+EunjER7uEWmk+IWpc0d3gVbuAKb8JN+nfhFvlDuI17fAp36L+Fu1jgR7iHp+jF7Arbz1Nb1nO93pnEncSJFtrVuS3VKB6e5EyX2iVer9TyoOr9eux9pjJnCzW1pdfGWFU5u9WpjzfeV5PBIBMfp7aAwQ4FLPrIkbKWqDHn+67pDRK4s4lzbsEux5qHvcIIMb/nueSMyTKkE3jWFdNLHLjW2PPmMa1Hxn3GjGW/wjT0HtOG09JU4WxLk9LH2ISuiv9twJn9y8fh9uIXI+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==) format('woff');
|
|
15
15
|
font-weight: normal;
|
|
16
16
|
font-style: normal;
|
|
17
17
|
}
|
package/gulpfile.js
CHANGED
|
@@ -116,7 +116,7 @@ ${createIconset(folder, filenames)}
|
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
const vaadinIcons = `${createCopyright()}
|
|
119
|
-
import '@vaadin/
|
|
119
|
+
import '@vaadin/icon/vaadin-iconset.js';
|
|
120
120
|
import './version.js';
|
|
121
121
|
|
|
122
122
|
const $_documentContainer = document.createElement('template');
|
package/mixins/helper.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import { css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
|
|
7
|
+
import '../color.js';
|
|
8
|
+
import '../sizing.js';
|
|
9
|
+
import '../style.js';
|
|
10
|
+
import '../typography.js';
|
|
11
|
+
|
|
12
|
+
export const helper = css`
|
|
13
|
+
:host([has-helper]) [part='helper-text']::before {
|
|
14
|
+
content: '';
|
|
15
|
+
display: block;
|
|
16
|
+
height: 0.4em;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[part='helper-text'] {
|
|
20
|
+
display: block;
|
|
21
|
+
color: var(--lumo-secondary-text-color);
|
|
22
|
+
font-size: var(--lumo-font-size-xs);
|
|
23
|
+
line-height: var(--lumo-line-height-xs);
|
|
24
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
25
|
+
transition: color 0.2s;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host(:hover:not([readonly])) [part='helper-text'] {
|
|
29
|
+
color: var(--lumo-body-text-color);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([disabled]) [part='helper-text'] {
|
|
33
|
+
color: var(--lumo-disabled-text-color);
|
|
34
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
|
|
42
|
+
content: '';
|
|
43
|
+
display: block;
|
|
44
|
+
height: 0.4em;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] {
|
|
48
|
+
order: 0;
|
|
49
|
+
padding-bottom: 0.4em;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
|
|
53
|
+
order: 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
|
|
57
|
+
order: 2;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
|
61
|
+
order: 3;
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import { CSSResult } from 'lit';
|
|
7
|
+
|
|
8
|
+
export const inputField: CSSResult;
|
|
9
|
+
|
|
10
|
+
export const inputFieldShared: CSSResult;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
|
|
7
|
+
import '../color.js';
|
|
8
|
+
import '../font-icons.js';
|
|
9
|
+
import '../sizing.js';
|
|
10
|
+
import '../spacing.js';
|
|
11
|
+
import '../style.js';
|
|
12
|
+
import '../typography.js';
|
|
13
|
+
import { fieldButton } from './field-button.js';
|
|
14
|
+
import { helper } from './helper.js';
|
|
15
|
+
import { requiredField } from './required-field.js';
|
|
16
|
+
|
|
17
|
+
const inputField = css`
|
|
18
|
+
:host {
|
|
19
|
+
--lumo-text-field-size: var(--lumo-size-m);
|
|
20
|
+
color: var(--lumo-body-text-color);
|
|
21
|
+
font-size: var(--lumo-font-size-m);
|
|
22
|
+
font-family: var(--lumo-font-family);
|
|
23
|
+
-webkit-font-smoothing: antialiased;
|
|
24
|
+
-moz-osx-font-smoothing: grayscale;
|
|
25
|
+
-webkit-tap-highlight-color: transparent;
|
|
26
|
+
padding: var(--lumo-space-xs) 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host::before {
|
|
30
|
+
height: var(--lumo-text-field-size);
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([focused]:not([readonly])) [part='label'] {
|
|
37
|
+
color: var(--lumo-primary-text-color);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
|
|
41
|
+
-webkit-mask-image: none;
|
|
42
|
+
mask-image: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
::slotted(:is(input, textarea):placeholder-shown) {
|
|
46
|
+
color: var(--lumo-secondary-text-color);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Hover */
|
|
50
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
51
|
+
color: var(--lumo-body-text-color);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
55
|
+
opacity: 0.1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Touch device adjustment */
|
|
59
|
+
@media (pointer: coarse) {
|
|
60
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
61
|
+
color: var(--lumo-secondary-text-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host(:active:not([readonly]):not([focused])) [part='input-field']::after {
|
|
69
|
+
opacity: 0.2;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Trigger when not focusing using the keyboard */
|
|
74
|
+
:host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
|
|
75
|
+
transform: scaleX(0);
|
|
76
|
+
transition-duration: 0.15s, 1s;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Focus-ring */
|
|
80
|
+
:host([focus-ring]) [part='input-field'] {
|
|
81
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Read-only and disabled */
|
|
85
|
+
:host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Disabled style */
|
|
90
|
+
:host([disabled]) {
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([disabled]) [part='label'],
|
|
95
|
+
:host([disabled]) [part='input-field'] ::slotted(*) {
|
|
96
|
+
color: var(--lumo-disabled-text-color);
|
|
97
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Invalid style */
|
|
101
|
+
:host([invalid][focus-ring]) [part='input-field'] {
|
|
102
|
+
box-shadow: 0 0 0 2px var(--lumo-error-color-50pct);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:host([input-prevented]) [part='input-field'] {
|
|
106
|
+
animation: shake 0.15s infinite;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@keyframes shake {
|
|
110
|
+
25% {
|
|
111
|
+
transform: translateX(4px);
|
|
112
|
+
}
|
|
113
|
+
75% {
|
|
114
|
+
transform: translateX(-4px);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Small theme */
|
|
119
|
+
:host([theme~='small']) {
|
|
120
|
+
font-size: var(--lumo-font-size-s);
|
|
121
|
+
--lumo-text-field-size: var(--lumo-size-s);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:host([theme~='small'][has-label]) [part='label'] {
|
|
125
|
+
font-size: var(--lumo-font-size-xs);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:host([theme~='small'][has-label]) [part='error-message'] {
|
|
129
|
+
font-size: var(--lumo-font-size-xxs);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Slotted content */
|
|
133
|
+
[part='input-field'] ::slotted(:not(iron-icon):not(vaadin-icon):not(input):not(textarea)) {
|
|
134
|
+
color: var(--lumo-secondary-text-color);
|
|
135
|
+
font-weight: 400;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
[part='clear-button']::before {
|
|
139
|
+
content: var(--lumo-icons-cross);
|
|
140
|
+
}
|
|
141
|
+
`;
|
|
142
|
+
|
|
143
|
+
const inputFieldShared = [requiredField, fieldButton, helper, inputField];
|
|
144
|
+
|
|
145
|
+
registerStyles('', inputFieldShared, {
|
|
146
|
+
moduleId: 'lumo-input-field-shared-styles'
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
export { inputField, inputFieldShared };
|
package/mixins/required-field.js
CHANGED
|
@@ -40,28 +40,23 @@ const requiredField = css`
|
|
|
40
40
|
padding-top: var(--lumo-space-m);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
combo-box, date-picker, time-picker, date-time-picker, select. */
|
|
45
|
-
[part='label']::after,
|
|
46
|
-
[part='indicator']::after {
|
|
43
|
+
[part='required-indicator']::after {
|
|
47
44
|
content: var(--lumo-required-field-indicator, '•');
|
|
48
45
|
transition: opacity 0.2s;
|
|
49
46
|
opacity: 0;
|
|
50
|
-
color: var(--lumo-primary-text-color);
|
|
47
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
|
51
48
|
position: absolute;
|
|
52
49
|
right: 0;
|
|
53
50
|
width: 1em;
|
|
54
51
|
text-align: center;
|
|
55
52
|
}
|
|
56
53
|
|
|
57
|
-
:host([required]:not([has-value])) [part='
|
|
58
|
-
:host([required]:not([has-value])) [part='indicator']::after {
|
|
54
|
+
:host([required]:not([has-value])) [part='required-indicator']::after {
|
|
59
55
|
opacity: 1;
|
|
60
56
|
}
|
|
61
57
|
|
|
62
|
-
:host([invalid]) [part='
|
|
63
|
-
|
|
64
|
-
color: var(--lumo-error-text-color);
|
|
58
|
+
:host([invalid]) [part='required-indicator']::after {
|
|
59
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
|
65
60
|
}
|
|
66
61
|
|
|
67
62
|
[part='error-message'] {
|
|
@@ -74,10 +69,8 @@ const requiredField = css`
|
|
|
74
69
|
max-height: 5em;
|
|
75
70
|
}
|
|
76
71
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
[part='error-message']:not(:empty)::before,
|
|
80
|
-
[part='error-message']:not(:empty)::after {
|
|
72
|
+
:host([has-error-message]) [part='error-message']::before,
|
|
73
|
+
:host([has-error-message]) [part='error-message']::after {
|
|
81
74
|
content: '';
|
|
82
75
|
display: block;
|
|
83
76
|
height: 0.4em;
|
|
@@ -100,8 +93,7 @@ const requiredField = css`
|
|
|
100
93
|
padding-right: 0;
|
|
101
94
|
}
|
|
102
95
|
|
|
103
|
-
:host([dir='rtl']) [part='
|
|
104
|
-
:host([dir='rtl']) [part='indicator']::after {
|
|
96
|
+
:host([dir='rtl']) [part='required-indicator']::after {
|
|
105
97
|
right: auto;
|
|
106
98
|
left: 0;
|
|
107
99
|
}
|
package/package.json
CHANGED
|
@@ -1,51 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-lumo-styles",
|
|
3
|
-
"version": "22.0.0-
|
|
3
|
+
"version": "22.0.0-beta1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
4
7
|
"description": "Lumo is a design system foundation for modern web applications, used by Vaadin components",
|
|
5
|
-
"main": "all-imports.js",
|
|
6
|
-
"module": "all-imports.js",
|
|
7
|
-
"repository": "vaadin/vaadin-lumo-styles",
|
|
8
|
-
"keywords": [
|
|
9
|
-
"vaadin",
|
|
10
|
-
"lumo",
|
|
11
|
-
"design-system",
|
|
12
|
-
"web-components",
|
|
13
|
-
"web-component",
|
|
14
|
-
"polymer"
|
|
15
|
-
],
|
|
16
|
-
"author": "Vaadin Ltd",
|
|
17
8
|
"license": "Apache-2.0",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/vaadin/web-components.git",
|
|
12
|
+
"directory": "packages/vaadin-lumo-styles"
|
|
13
|
+
},
|
|
14
|
+
"author": "Vaadin Ltd",
|
|
15
|
+
"homepage": "https://vaadin.com/components",
|
|
18
16
|
"bugs": {
|
|
19
17
|
"url": "https://github.com/vaadin/vaadin-lumo-styles/issues"
|
|
20
18
|
},
|
|
21
|
-
"
|
|
19
|
+
"main": "all-imports.js",
|
|
20
|
+
"module": "all-imports.js",
|
|
21
|
+
"scripts": {
|
|
22
|
+
"icons": "gulp icons"
|
|
23
|
+
},
|
|
22
24
|
"files": [
|
|
23
|
-
"*.js",
|
|
24
25
|
"*.d.ts",
|
|
25
|
-
"
|
|
26
|
+
"*.js",
|
|
26
27
|
"mixins/*.d.ts",
|
|
28
|
+
"mixins/*.js",
|
|
27
29
|
"presets/*.js",
|
|
28
30
|
"utilities/*.js"
|
|
29
31
|
],
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
32
|
+
"keywords": [
|
|
33
|
+
"vaadin",
|
|
34
|
+
"lumo",
|
|
35
|
+
"design-system",
|
|
36
|
+
"web-components",
|
|
37
|
+
"web-component",
|
|
38
|
+
"polymer"
|
|
39
|
+
],
|
|
33
40
|
"dependencies": {
|
|
34
41
|
"@polymer/iron-icon": "^3.0.0",
|
|
35
42
|
"@polymer/iron-iconset-svg": "^3.0.0",
|
|
36
43
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/
|
|
38
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
44
|
+
"@vaadin/icon": "22.0.0-beta1",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "22.0.0-beta1"
|
|
39
46
|
},
|
|
40
47
|
"devDependencies": {
|
|
41
|
-
"gulp": "^4.0.
|
|
42
|
-
"gulp-cli": "^2.0
|
|
48
|
+
"gulp": "^4.0.2",
|
|
49
|
+
"gulp-cli": "^2.3.0",
|
|
43
50
|
"gulp-iconfont": "^11.0.0",
|
|
44
51
|
"gulp-sort": "^2.0.0",
|
|
45
|
-
"gulp-svgmin": "^
|
|
46
|
-
},
|
|
47
|
-
"publishConfig": {
|
|
48
|
-
"access": "public"
|
|
52
|
+
"gulp-svgmin": "^4.1.0"
|
|
49
53
|
},
|
|
50
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e"
|
|
51
55
|
}
|
package/presets/compact.js
CHANGED
|
@@ -9,34 +9,7 @@ const $_documentContainer = document.createElement('template');
|
|
|
9
9
|
|
|
10
10
|
$_documentContainer.innerHTML = `
|
|
11
11
|
<style>
|
|
12
|
-
/*
|
|
13
|
-
html {
|
|
14
|
-
--lumo-size-xl: 3rem;
|
|
15
|
-
--lumo-size-l: 2.5rem;
|
|
16
|
-
--lumo-size-m: 2rem;
|
|
17
|
-
--lumo-size-s: 1.75rem;
|
|
18
|
-
--lumo-size-xs: 1.5rem;
|
|
19
|
-
--lumo-font-size: 1rem;
|
|
20
|
-
--lumo-font-size-xxxl: 1.75rem;
|
|
21
|
-
--lumo-font-size-xxl: 1.375rem;
|
|
22
|
-
--lumo-font-size-xl: 1.125rem;
|
|
23
|
-
--lumo-font-size-l: 1rem;
|
|
24
|
-
--lumo-font-size-m: 0.875rem;
|
|
25
|
-
--lumo-font-size-s: 0.8125rem;
|
|
26
|
-
--lumo-font-size-xs: 0.75rem;
|
|
27
|
-
--lumo-font-size-xxs: 0.6875rem;
|
|
28
|
-
--lumo-line-height-m: 1.4;
|
|
29
|
-
--lumo-line-height-s: 1.2;
|
|
30
|
-
--lumo-line-height-xs: 1.1;
|
|
31
|
-
--lumo-space-xl: 1.875rem;
|
|
32
|
-
--lumo-space-l: 1.25rem;
|
|
33
|
-
--lumo-space-m: 0.625rem;
|
|
34
|
-
--lumo-space-s: 0.3125rem;
|
|
35
|
-
--lumo-space-xs: 0.1875rem;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* Need to use a separate and stronger selector for other browsers where
|
|
39
|
-
the imports added later would otherwise override the property values */
|
|
12
|
+
/* Use a stronger selector so that imports added later do not override the property values */
|
|
40
13
|
html:not(div) {
|
|
41
14
|
--lumo-size-xl: 3rem;
|
|
42
15
|
--lumo-size-l: 2.5rem;
|
package/typography.js
CHANGED
|
@@ -29,16 +29,7 @@ const font = css`
|
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
31
|
const typography = css`
|
|
32
|
-
html
|
|
33
|
-
font-family: var(--lumo-font-family);
|
|
34
|
-
font-size: var(--lumo-font-size, var(--lumo-font-size-m));
|
|
35
|
-
line-height: var(--lumo-line-height-m);
|
|
36
|
-
-webkit-text-size-adjust: 100%;
|
|
37
|
-
-webkit-font-smoothing: antialiased;
|
|
38
|
-
-moz-osx-font-smoothing: grayscale;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */
|
|
32
|
+
html,
|
|
42
33
|
:host {
|
|
43
34
|
font-family: var(--lumo-font-family);
|
|
44
35
|
font-size: var(--lumo-font-size, var(--lumo-font-size-m));
|
|
@@ -144,25 +135,8 @@ const typography = css`
|
|
|
144
135
|
|
|
145
136
|
registerStyles('', typography, { moduleId: 'lumo-typography' });
|
|
146
137
|
|
|
147
|
-
const inputs = css`
|
|
148
|
-
/* Slotted input styles */
|
|
149
|
-
input[slot='input']::placeholder,
|
|
150
|
-
textarea[slot='textarea']::placeholder {
|
|
151
|
-
color: inherit;
|
|
152
|
-
transition: opacity 0.175s 0.1s;
|
|
153
|
-
opacity: 0.5;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
[readonly] > input[slot='input']::placeholder,
|
|
157
|
-
[readonly] > textarea[slot='textarea']::placeholder,
|
|
158
|
-
[disabled] > input[slot='input']::placeholder,
|
|
159
|
-
[disabled] > textarea[slot='textarea']::placeholder {
|
|
160
|
-
opacity: 0;
|
|
161
|
-
}
|
|
162
|
-
`;
|
|
163
|
-
|
|
164
138
|
const $tpl = document.createElement('template');
|
|
165
|
-
$tpl.innerHTML = `<style>${font.toString().replace(':host', 'html')}
|
|
139
|
+
$tpl.innerHTML = `<style>${font.toString().replace(':host', 'html')}</style>`;
|
|
166
140
|
document.head.appendChild($tpl.content);
|
|
167
141
|
|
|
168
|
-
export { font,
|
|
142
|
+
export { font, typography };
|
package/vaadin-iconset.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import '@vaadin/
|
|
6
|
+
import '@vaadin/icon/vaadin-iconset.js';
|
|
7
7
|
import './version.js';
|
|
8
8
|
|
|
9
9
|
const $_documentContainer = document.createElement('template');
|