@vaadin/scroller 24.8.0-alpha9 → 25.0.0-alpha2

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 CHANGED
@@ -34,29 +34,6 @@ Once installed, import the component in your application:
34
34
  import '@vaadin/scroller';
35
35
  ```
36
36
 
37
- ## Themes
38
-
39
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
40
- The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/scroller/vaadin-scroller.js) of the package uses the Lumo theme.
41
-
42
- To use the Material theme, import the component from the `theme/material` folder:
43
-
44
- ```js
45
- import '@vaadin/scroller/theme/material/vaadin-scroller.js';
46
- ```
47
-
48
- You can also import the Lumo version of the component explicitly:
49
-
50
- ```js
51
- import '@vaadin/scroller/theme/lumo/vaadin-scroller.js';
52
- ```
53
-
54
- Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
55
-
56
- ```js
57
- import '@vaadin/scroller/src/vaadin-scroller.js';
58
- ```
59
-
60
37
  ## Contributing
61
38
 
62
39
  Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/scroller",
3
- "version": "24.8.0-alpha9",
3
+ "version": "25.0.0-alpha2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,27 +31,24 @@
31
31
  "Vaadin",
32
32
  "vaadin-scroller",
33
33
  "web-components",
34
- "web-component",
35
- "polymer"
34
+ "web-component"
36
35
  ],
37
36
  "dependencies": {
38
37
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "24.8.0-alpha9",
41
- "@vaadin/component-base": "24.8.0-alpha9",
42
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha9",
43
- "@vaadin/vaadin-material-styles": "24.8.0-alpha9",
44
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
38
+ "@vaadin/a11y-base": "25.0.0-alpha2",
39
+ "@vaadin/component-base": "25.0.0-alpha2",
40
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha2",
41
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
45
42
  "lit": "^3.0.0"
46
43
  },
47
44
  "devDependencies": {
48
- "@vaadin/chai-plugins": "24.8.0-alpha9",
49
- "@vaadin/test-runner-commands": "24.8.0-alpha9",
50
- "@vaadin/testing-helpers": "^1.1.0"
45
+ "@vaadin/chai-plugins": "25.0.0-alpha2",
46
+ "@vaadin/test-runner-commands": "25.0.0-alpha2",
47
+ "@vaadin/testing-helpers": "^2.0.0"
51
48
  },
52
49
  "web-types": [
53
50
  "web-types.json",
54
51
  "web-types.lit.json"
55
52
  ],
56
- "gitHead": "4de3809275ddfd733b0d13fd02af8faf73eb6770"
53
+ "gitHead": "67ffcd5355cf21ce1b5039c598525109fc4c164b"
57
54
  }
@@ -3,7 +3,6 @@
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 { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
7
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
8
7
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
8
  import { ScrollerMixin } from './vaadin-scroller-mixin.js';
@@ -24,7 +23,7 @@ import { ScrollerMixin } from './vaadin-scroller-mixin.js';
24
23
  * `focused` | Set when the element is focused.
25
24
  * `overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.
26
25
  */
27
- declare class Scroller extends ScrollerMixin(ThemableMixin(ElementMixin(ControllerMixin(HTMLElement)))) {}
26
+ declare class Scroller extends ScrollerMixin(ThemableMixin(ElementMixin(HTMLElement))) {}
28
27
 
29
28
  declare global {
30
29
  interface HTMLElementTagNameMap {
@@ -3,11 +3,11 @@
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 { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
- import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
6
+ import { css, html, LitElement } from 'lit';
8
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
8
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
9
  import { OverflowController } from '@vaadin/component-base/src/overflow-controller.js';
10
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
12
  import { ScrollerMixin } from './vaadin-scroller-mixin.js';
13
13
 
@@ -30,42 +30,42 @@ import { ScrollerMixin } from './vaadin-scroller-mixin.js';
30
30
  * @customElement
31
31
  * @extends HTMLElement
32
32
  * @mixes ThemableMixin
33
- * @mixes ControllerMixin
34
33
  * @mixes ElementMixin
35
34
  * @mixes ScrollerMixin
36
35
  */
37
- class Scroller extends ScrollerMixin(ElementMixin(ControllerMixin(ThemableMixin(PolymerElement)))) {
38
- static get template() {
39
- return html`
40
- <style>
41
- :host([hidden]) {
42
- display: none !important;
43
- }
36
+ class Scroller extends ScrollerMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
37
+ static get is() {
38
+ return 'vaadin-scroller';
39
+ }
44
40
 
45
- :host {
46
- display: block;
47
- overflow: auto;
48
- }
41
+ static get styles() {
42
+ return css`
43
+ :host {
44
+ display: block;
45
+ overflow: auto;
46
+ }
49
47
 
50
- :host([scroll-direction='vertical']) {
51
- overflow-x: hidden;
52
- }
48
+ :host([hidden]) {
49
+ display: none !important;
50
+ }
53
51
 
54
- :host([scroll-direction='horizontal']) {
55
- overflow-y: hidden;
56
- }
52
+ :host([scroll-direction='vertical']) {
53
+ overflow-x: hidden;
54
+ }
57
55
 
58
- :host([scroll-direction='none']) {
59
- overflow: hidden;
60
- }
61
- </style>
56
+ :host([scroll-direction='horizontal']) {
57
+ overflow-y: hidden;
58
+ }
62
59
 
63
- <slot></slot>
60
+ :host([scroll-direction='none']) {
61
+ overflow: hidden;
62
+ }
64
63
  `;
65
64
  }
66
65
 
67
- static get is() {
68
- return 'vaadin-scroller';
66
+ /** @protected */
67
+ render() {
68
+ return html`<slot></slot>`;
69
69
  }
70
70
 
71
71
  /** @protected */
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/scroller",
4
- "version": "24.8.0-alpha9",
4
+ "version": "25.0.0-alpha2",
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/scroller",
4
- "version": "24.8.0-alpha9",
4
+ "version": "25.0.0-alpha2",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1 +0,0 @@
1
- export * from './vaadin-scroller.js';
@@ -1,69 +0,0 @@
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, html, LitElement } from 'lit';
7
- import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
- import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
- import { OverflowController } from '@vaadin/component-base/src/overflow-controller.js';
10
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
- import { ScrollerMixin } from './vaadin-scroller-mixin.js';
13
-
14
- /**
15
- * LitElement based version of `<vaadin-scroller>` web component.
16
- *
17
- * ## Disclaimer
18
- *
19
- * This component is an experiment and not yet a part of Vaadin platform.
20
- * There is no ETA regarding specific Vaadin version where it'll land.
21
- * Feel free to try this code in your apps as per Apache 2.0 license.
22
- */
23
- class Scroller extends ScrollerMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
24
- static get is() {
25
- return 'vaadin-scroller';
26
- }
27
-
28
- static get styles() {
29
- return css`
30
- :host {
31
- display: block;
32
- overflow: auto;
33
- }
34
-
35
- :host([hidden]) {
36
- display: none !important;
37
- }
38
-
39
- :host([scroll-direction='vertical']) {
40
- overflow-x: hidden;
41
- }
42
-
43
- :host([scroll-direction='horizontal']) {
44
- overflow-y: hidden;
45
- }
46
-
47
- :host([scroll-direction='none']) {
48
- overflow: hidden;
49
- }
50
- `;
51
- }
52
-
53
- /** @protected */
54
- render() {
55
- return html`<slot></slot>`;
56
- }
57
-
58
- /** @protected */
59
- ready() {
60
- super.ready();
61
-
62
- this.__overflowController = new OverflowController(this);
63
- this.addController(this.__overflowController);
64
- }
65
- }
66
-
67
- defineCustomElement(Scroller);
68
-
69
- export { Scroller };
@@ -1,2 +0,0 @@
1
- import './vaadin-scroller-styles.js';
2
- import '../../src/vaadin-lit-scroller.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-scroller-styles.js';
2
- import '../../src/vaadin-lit-scroller.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-scroller-styles.js';
2
- import '../../src/vaadin-lit-scroller.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-scroller-styles.js';
2
- import '../../src/vaadin-lit-scroller.js';
@@ -1,3 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
2
- declare const scroller: import("lit").CSSResult;
3
- export { scroller };
@@ -1,16 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
2
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
3
-
4
- const scroller = css`
5
- :host {
6
- outline: none;
7
- }
8
-
9
- :host([focus-ring]) {
10
- box-shadow: 0 0 0 2px var(--material-primary-color);
11
- }
12
- `;
13
-
14
- registerStyles('vaadin-scroller', scroller, { moduleId: 'material-scroller' });
15
-
16
- export { scroller };
@@ -1,2 +0,0 @@
1
- import './vaadin-scroller-styles.js';
2
- import '../../src/vaadin-scroller.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-scroller-styles.js';
2
- import '../../src/vaadin-scroller.js';
@@ -1 +0,0 @@
1
- export * from './src/vaadin-scroller.js';
@@ -1,2 +0,0 @@
1
- import './theme/lumo/vaadin-lit-scroller.js';
2
- export * from './src/vaadin-lit-scroller.js';