@vaadin/scroller 25.0.0-alpha5 → 25.0.0-alpha6
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 +10 -8
- package/src/styles/vaadin-scroller-base-styles.d.ts +8 -0
- package/src/styles/vaadin-scroller-base-styles.js +59 -0
- package/src/styles/vaadin-scroller-core-styles.d.ts +8 -0
- package/src/styles/vaadin-scroller-core-styles.js +29 -0
- package/src/vaadin-scroller.js +5 -25
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/scroller",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
+
"!src/styles/*-base-styles.d.ts",
|
|
25
|
+
"!src/styles/*-base-styles.js",
|
|
24
26
|
"theme",
|
|
25
27
|
"vaadin-*.d.ts",
|
|
26
28
|
"vaadin-*.js",
|
|
@@ -35,20 +37,20 @@
|
|
|
35
37
|
],
|
|
36
38
|
"dependencies": {
|
|
37
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
40
|
+
"@vaadin/a11y-base": "25.0.0-alpha6",
|
|
41
|
+
"@vaadin/component-base": "25.0.0-alpha6",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha6",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha6",
|
|
42
44
|
"lit": "^3.0.0"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
46
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
47
|
+
"@vaadin/chai-plugins": "25.0.0-alpha6",
|
|
48
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha6",
|
|
47
49
|
"@vaadin/testing-helpers": "^2.0.0"
|
|
48
50
|
},
|
|
49
51
|
"web-types": [
|
|
50
52
|
"web-types.json",
|
|
51
53
|
"web-types.lit.json"
|
|
52
54
|
],
|
|
53
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "cd1d084198d2b326c58d44bb39fa4845b71ce551"
|
|
54
56
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2020 - 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 scrollerStyles = css`
|
|
10
|
+
@layer base {
|
|
11
|
+
:host {
|
|
12
|
+
display: block;
|
|
13
|
+
overflow: auto;
|
|
14
|
+
outline: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host([focus-ring]) {
|
|
18
|
+
outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host([hidden]) {
|
|
22
|
+
display: none !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host([scroll-direction='vertical']) {
|
|
26
|
+
overflow-x: hidden;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host([scroll-direction='horizontal']) {
|
|
30
|
+
overflow-y: hidden;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([scroll-direction='none']) {
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([theme~='overflow-indicators'])::before,
|
|
38
|
+
:host([theme~='overflow-indicators'])::after {
|
|
39
|
+
content: '';
|
|
40
|
+
display: none;
|
|
41
|
+
position: sticky;
|
|
42
|
+
inset: 0;
|
|
43
|
+
z-index: 9999;
|
|
44
|
+
height: 1px;
|
|
45
|
+
margin-bottom: -1px;
|
|
46
|
+
background: var(--vaadin-scroller-border-color, var(--vaadin-border-color));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host([theme~='overflow-indicators'])::after {
|
|
50
|
+
margin-bottom: 0;
|
|
51
|
+
margin-top: -1px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([theme~='overflow-indicators'][overflow~='top'])::before,
|
|
55
|
+
:host([theme~='overflow-indicators'][overflow~='bottom'])::after {
|
|
56
|
+
display: block;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2020 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import { css } from 'lit';
|
|
7
|
+
|
|
8
|
+
export const scrollerStyles = css`
|
|
9
|
+
:host {
|
|
10
|
+
display: block;
|
|
11
|
+
overflow: auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host([hidden]) {
|
|
15
|
+
display: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host([scroll-direction='vertical']) {
|
|
19
|
+
overflow-x: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host([scroll-direction='horizontal']) {
|
|
23
|
+
overflow-y: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host([scroll-direction='none']) {
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
}
|
|
29
|
+
`;
|
package/src/vaadin-scroller.js
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
* Copyright (c) 2020 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { html, LitElement } from 'lit';
|
|
7
7
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
8
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
9
|
import { OverflowController } from '@vaadin/component-base/src/overflow-controller.js';
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
|
-
import {
|
|
11
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
12
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
|
+
import { scrollerStyles } from './styles/vaadin-scroller-core-styles.js';
|
|
13
14
|
import { ScrollerMixin } from './vaadin-scroller-mixin.js';
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -34,34 +35,13 @@ import { ScrollerMixin } from './vaadin-scroller-mixin.js';
|
|
|
34
35
|
* @mixes ElementMixin
|
|
35
36
|
* @mixes ScrollerMixin
|
|
36
37
|
*/
|
|
37
|
-
class Scroller extends ScrollerMixin(ElementMixin(ThemableMixin(
|
|
38
|
+
class Scroller extends ScrollerMixin(ElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
|
|
38
39
|
static get is() {
|
|
39
40
|
return 'vaadin-scroller';
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
static get styles() {
|
|
43
|
-
return
|
|
44
|
-
:host {
|
|
45
|
-
display: block;
|
|
46
|
-
overflow: auto;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
:host([hidden]) {
|
|
50
|
-
display: none !important;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host([scroll-direction='vertical']) {
|
|
54
|
-
overflow-x: hidden;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host([scroll-direction='horizontal']) {
|
|
58
|
-
overflow-y: hidden;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
:host([scroll-direction='none']) {
|
|
62
|
-
overflow: hidden;
|
|
63
|
-
}
|
|
64
|
-
`;
|
|
44
|
+
return scrollerStyles;
|
|
65
45
|
}
|
|
66
46
|
|
|
67
47
|
/** @protected */
|
package/web-types.json
CHANGED