@vaadin/scroller 23.2.0-dev.48e5e3967 → 23.2.0-rc1

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/scroller",
3
- "version": "23.2.0-dev.48e5e3967",
3
+ "version": "23.2.0-rc1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,7 +23,9 @@
23
23
  "src",
24
24
  "theme",
25
25
  "vaadin-*.d.ts",
26
- "vaadin-*.js"
26
+ "vaadin-*.js",
27
+ "web-types.json",
28
+ "web-types.lit.json"
27
29
  ],
28
30
  "keywords": [
29
31
  "Vaadin",
@@ -34,14 +36,18 @@
34
36
  ],
35
37
  "dependencies": {
36
38
  "@polymer/polymer": "^3.0.0",
37
- "@vaadin/component-base": "23.2.0-dev.48e5e3967",
38
- "@vaadin/vaadin-lumo-styles": "23.2.0-dev.48e5e3967",
39
- "@vaadin/vaadin-material-styles": "23.2.0-dev.48e5e3967",
40
- "@vaadin/vaadin-themable-mixin": "23.2.0-dev.48e5e3967"
39
+ "@vaadin/component-base": "23.2.0-rc1",
40
+ "@vaadin/vaadin-lumo-styles": "23.2.0-rc1",
41
+ "@vaadin/vaadin-material-styles": "23.2.0-rc1",
42
+ "@vaadin/vaadin-themable-mixin": "23.2.0-rc1"
41
43
  },
42
44
  "devDependencies": {
43
45
  "@esm-bundle/chai": "^4.3.4",
44
46
  "@vaadin/testing-helpers": "^0.3.2"
45
47
  },
46
- "gitHead": "961bc4ae5b707c3c02f12b99819b3c12c9b478aa"
48
+ "web-types": [
49
+ "web-types.json",
50
+ "web-types.lit.json"
51
+ ],
52
+ "gitHead": "e78a1f2fe6f42d78cefa3f48085b09a3033c9588"
47
53
  }
@@ -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,13 +22,14 @@ 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.
29
31
  */
30
- scrollDirection: 'horizontal' | 'vertical' | 'none' | undefined;
32
+ scrollDirection: 'horizontal' | 'none' | 'vertical' | undefined;
31
33
 
32
34
  /**
33
35
  * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.
@@ -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 ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/scroller",
4
+ "version": "23.2.0-rc1",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
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.\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.",
12
+ "attributes": [
13
+ {
14
+ "name": "scroll-direction",
15
+ "description": "This property indicates the scroll direction. Supported values are `vertical`, `horizontal`, `none`.\nWhen `scrollDirection` is undefined scrollbars will be shown in both directions.",
16
+ "value": {
17
+ "type": [
18
+ "string",
19
+ "null",
20
+ "undefined"
21
+ ]
22
+ }
23
+ },
24
+ {
25
+ "name": "theme",
26
+ "description": "The theme variants to apply to the component.",
27
+ "value": {
28
+ "type": [
29
+ "string",
30
+ "null",
31
+ "undefined"
32
+ ]
33
+ }
34
+ }
35
+ ],
36
+ "js": {
37
+ "properties": [
38
+ {
39
+ "name": "scrollDirection",
40
+ "description": "This property indicates the scroll direction. Supported values are `vertical`, `horizontal`, `none`.\nWhen `scrollDirection` is undefined scrollbars will be shown in both directions.",
41
+ "value": {
42
+ "type": [
43
+ "string",
44
+ "null",
45
+ "undefined"
46
+ ]
47
+ }
48
+ }
49
+ ],
50
+ "events": []
51
+ }
52
+ }
53
+ ]
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/scroller",
4
+ "version": "23.2.0-rc1",
5
+ "description-markup": "markdown",
6
+ "framework": "lit",
7
+ "framework-config": {
8
+ "enable-when": {
9
+ "node-packages": [
10
+ "lit"
11
+ ]
12
+ }
13
+ },
14
+ "contributions": {
15
+ "html": {
16
+ "elements": [
17
+ {
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.\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.",
20
+ "extension": true,
21
+ "attributes": [
22
+ {
23
+ "name": ".scrollDirection",
24
+ "description": "This property indicates the scroll direction. Supported values are `vertical`, `horizontal`, `none`.\nWhen `scrollDirection` is undefined scrollbars will be shown in both directions.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ }
29
+ ]
30
+ }
31
+ ]
32
+ }
33
+ }
34
+ }