@vaadin/scroller 23.2.0-alpha4 → 23.2.0-alpha5
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 +6 -6
- package/src/vaadin-scroller.d.ts +3 -1
- package/src/vaadin-scroller.js +13 -1
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/scroller",
|
|
3
|
-
"version": "23.2.0-
|
|
3
|
+
"version": "23.2.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "23.2.0-
|
|
40
|
-
"@vaadin/vaadin-lumo-styles": "23.2.0-
|
|
41
|
-
"@vaadin/vaadin-material-styles": "23.2.0-
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0-
|
|
39
|
+
"@vaadin/component-base": "23.2.0-alpha5",
|
|
40
|
+
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha5",
|
|
41
|
+
"@vaadin/vaadin-material-styles": "23.2.0-alpha5",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"web-types.json",
|
|
50
50
|
"web-types.lit.json"
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "c6247fd741d61096d75a71feda4a1faf88b6f0ce"
|
|
53
53
|
}
|
package/src/vaadin-scroller.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2020 - 2022 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';
|
|
6
7
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
7
8
|
import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
|
|
8
9
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
@@ -21,8 +22,9 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
21
22
|
* -------------| -----------
|
|
22
23
|
* `focus-ring` | Set when the element is focused using the keyboard.
|
|
23
24
|
* `focused` | Set when the element is focused.
|
|
25
|
+
* `overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.
|
|
24
26
|
*/
|
|
25
|
-
declare class Scroller extends FocusMixin(ThemableMixin(ElementMixin(HTMLElement))) {
|
|
27
|
+
declare class Scroller extends FocusMixin(ThemableMixin(ElementMixin(ControllerMixin(HTMLElement)))) {
|
|
26
28
|
/**
|
|
27
29
|
* This property indicates the scroll direction. Supported values are `vertical`, `horizontal`, `none`.
|
|
28
30
|
* When `scrollDirection` is undefined scrollbars will be shown in both directions.
|
package/src/vaadin-scroller.js
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
|
+
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
7
8
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
8
9
|
import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
|
|
10
|
+
import { OverflowController } from '@vaadin/component-base/src/overflow-controller.js';
|
|
9
11
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -22,13 +24,15 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
22
24
|
* -------------| -----------
|
|
23
25
|
* `focus-ring` | Set when the element is focused using the keyboard.
|
|
24
26
|
* `focused` | Set when the element is focused.
|
|
27
|
+
* `overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.
|
|
25
28
|
*
|
|
26
29
|
* @extends HTMLElement
|
|
27
30
|
* @mixes ThemableMixin
|
|
31
|
+
* @mixes ControllerMixin
|
|
28
32
|
* @mixes ElementMixin
|
|
29
33
|
* @mixes FocusMixin
|
|
30
34
|
*/
|
|
31
|
-
class Scroller extends FocusMixin(ElementMixin(ThemableMixin(PolymerElement))) {
|
|
35
|
+
class Scroller extends FocusMixin(ElementMixin(ControllerMixin(ThemableMixin(PolymerElement)))) {
|
|
32
36
|
static get template() {
|
|
33
37
|
return html`
|
|
34
38
|
<style>
|
|
@@ -85,6 +89,14 @@ class Scroller extends FocusMixin(ElementMixin(ThemableMixin(PolymerElement))) {
|
|
|
85
89
|
};
|
|
86
90
|
}
|
|
87
91
|
|
|
92
|
+
/** @protected */
|
|
93
|
+
ready() {
|
|
94
|
+
super.ready();
|
|
95
|
+
|
|
96
|
+
this.__overflowController = new OverflowController(this);
|
|
97
|
+
this.addController(this.__overflowController);
|
|
98
|
+
}
|
|
99
|
+
|
|
88
100
|
/**
|
|
89
101
|
* Override method inherited from `FocusMixin` to mark the scroller as focused
|
|
90
102
|
* only when the host is focused.
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/scroller",
|
|
4
|
-
"version": "23.2.0-
|
|
4
|
+
"version": "23.2.0-alpha5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-scroller",
|
|
11
|
-
"description": "`<vaadin-scroller>` provides a simple way to enable scrolling when its content is overflowing.\n\n```\n<vaadin-scroller>\n <div>Content</div>\n</vaadin-scroller>\n```\nThe following attributes are exposed for styling:\n\nAttribute | Description\n-------------| -----------\n`focus-ring` | Set when the element is focused using the keyboard.\n`focused` | Set when the element is focused.",
|
|
11
|
+
"description": "`<vaadin-scroller>` provides a simple way to enable scrolling when its content is overflowing.\n\n```\n<vaadin-scroller>\n <div>Content</div>\n</vaadin-scroller>\n```\nThe following attributes are exposed for styling:\n\nAttribute | Description\n-------------| -----------\n`focus-ring` | Set when the element is focused using the keyboard.\n`focused` | Set when the element is focused.\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "scroll-direction",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/scroller",
|
|
4
|
-
"version": "23.2.0-
|
|
4
|
+
"version": "23.2.0-alpha5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-scroller",
|
|
19
|
-
"description": "`<vaadin-scroller>` provides a simple way to enable scrolling when its content is overflowing.\n\n```\n<vaadin-scroller>\n <div>Content</div>\n</vaadin-scroller>\n```\nThe following attributes are exposed for styling:\n\nAttribute | Description\n-------------| -----------\n`focus-ring` | Set when the element is focused using the keyboard.\n`focused` | Set when the element is focused.",
|
|
19
|
+
"description": "`<vaadin-scroller>` provides a simple way to enable scrolling when its content is overflowing.\n\n```\n<vaadin-scroller>\n <div>Content</div>\n</vaadin-scroller>\n```\nThe following attributes are exposed for styling:\n\nAttribute | Description\n-------------| -----------\n`focus-ring` | Set when the element is focused using the keyboard.\n`focused` | Set when the element is focused.\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|