@vaadin/scroller 25.0.0-alpha1 → 25.0.0-alpha10

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": "25.0.0-alpha1",
3
+ "version": "25.0.0-alpha10",
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-alpha1",
39
- "@vaadin/component-base": "25.0.0-alpha1",
40
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
41
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
40
+ "@vaadin/a11y-base": "25.0.0-alpha10",
41
+ "@vaadin/component-base": "25.0.0-alpha10",
42
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
43
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
42
44
  "lit": "^3.0.0"
43
45
  },
44
46
  "devDependencies": {
45
- "@vaadin/chai-plugins": "25.0.0-alpha1",
46
- "@vaadin/test-runner-commands": "25.0.0-alpha1",
47
- "@vaadin/testing-helpers": "^1.1.0"
47
+ "@vaadin/chai-plugins": "25.0.0-alpha10",
48
+ "@vaadin/test-runner-commands": "25.0.0-alpha10",
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": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
55
+ "gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
54
56
  }
@@ -0,0 +1,8 @@
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 type { CSSResult } from 'lit';
7
+
8
+ export const scrollerStyles: CSSResult;
@@ -0,0 +1,57 @@
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
+ :host {
11
+ display: block;
12
+ overflow: auto;
13
+ outline: none;
14
+ }
15
+
16
+ :host([focus-ring]) {
17
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
18
+ }
19
+
20
+ :host([hidden]) {
21
+ display: none !important;
22
+ }
23
+
24
+ :host([scroll-direction='vertical']) {
25
+ overflow-x: hidden;
26
+ }
27
+
28
+ :host([scroll-direction='horizontal']) {
29
+ overflow-y: hidden;
30
+ }
31
+
32
+ :host([scroll-direction='none']) {
33
+ overflow: hidden;
34
+ }
35
+
36
+ :host([theme~='overflow-indicators'])::before,
37
+ :host([theme~='overflow-indicators'])::after {
38
+ content: '';
39
+ display: none;
40
+ position: sticky;
41
+ inset: 0;
42
+ z-index: 9999;
43
+ height: 1px;
44
+ margin-bottom: -1px;
45
+ background: var(--vaadin-scroller-border-color, var(--vaadin-border-color));
46
+ }
47
+
48
+ :host([theme~='overflow-indicators'])::after {
49
+ margin-bottom: 0;
50
+ margin-top: -1px;
51
+ }
52
+
53
+ :host([theme~='overflow-indicators'][overflow~='top'])::before,
54
+ :host([theme~='overflow-indicators'][overflow~='bottom'])::after {
55
+ display: block;
56
+ }
57
+ `;
@@ -0,0 +1,8 @@
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 type { CSSResult } from 'lit';
7
+
8
+ export const scrollerStyles: CSSResult;
@@ -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
+ `;
@@ -10,7 +10,7 @@ import { ScrollerMixin } from './vaadin-scroller-mixin.js';
10
10
  /**
11
11
  * `<vaadin-scroller>` provides a simple way to enable scrolling when its content is overflowing.
12
12
  *
13
- * ```
13
+ * ```html
14
14
  * <vaadin-scroller>
15
15
  * <div>Content</div>
16
16
  * </vaadin-scroller>
@@ -3,18 +3,20 @@
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 { css, html, LitElement } from 'lit';
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 { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
11
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
+ import { scrollerStyles } from './styles/vaadin-scroller-core-styles.js';
12
14
  import { ScrollerMixin } from './vaadin-scroller-mixin.js';
13
15
 
14
16
  /**
15
17
  * `<vaadin-scroller>` provides a simple way to enable scrolling when its content is overflowing.
16
18
  *
17
- * ```
19
+ * ```html
18
20
  * <vaadin-scroller>
19
21
  * <div>Content</div>
20
22
  * </vaadin-scroller>
@@ -33,34 +35,19 @@ import { ScrollerMixin } from './vaadin-scroller-mixin.js';
33
35
  * @mixes ElementMixin
34
36
  * @mixes ScrollerMixin
35
37
  */
36
- class Scroller extends ScrollerMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
38
+ class Scroller extends ScrollerMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
37
39
  static get is() {
38
40
  return 'vaadin-scroller';
39
41
  }
40
42
 
41
43
  static get styles() {
42
- return css`
43
- :host {
44
- display: block;
45
- overflow: auto;
46
- }
47
-
48
- :host([hidden]) {
49
- display: none !important;
50
- }
51
-
52
- :host([scroll-direction='vertical']) {
53
- overflow-x: hidden;
54
- }
55
-
56
- :host([scroll-direction='horizontal']) {
57
- overflow-y: hidden;
58
- }
44
+ return scrollerStyles;
45
+ }
59
46
 
60
- :host([scroll-direction='none']) {
61
- overflow: hidden;
62
- }
63
- `;
47
+ static get lumoInjector() {
48
+ return {
49
+ includeBaseStyles: true,
50
+ };
64
51
  }
65
52
 
66
53
  /** @protected */
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": "25.0.0-alpha1",
4
+ "version": "25.0.0-alpha10",
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.\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.",
11
+ "description": "`<vaadin-scroller>` provides a simple way to enable scrolling when its content is overflowing.\n\n```html\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",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/scroller",
4
- "version": "25.0.0-alpha1",
4
+ "version": "25.0.0-alpha10",
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.\n`overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none.",
19
+ "description": "`<vaadin-scroller>` provides a simple way to enable scrolling when its content is overflowing.\n\n```html\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
  {