@vaadin/progress-bar 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
@@ -28,29 +28,6 @@ Once installed, import the component in your application:
28
28
  import '@vaadin/progress-bar';
29
29
  ```
30
30
 
31
- ## Themes
32
-
33
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
34
- The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/progress-bar/vaadin-progress-bar.js) of the package uses Lumo theme.
35
-
36
- To use the Material theme, import the component from the `theme/material` folder:
37
-
38
- ```js
39
- import '@vaadin/progress-bar/theme/material/vaadin-progress-bar.js';
40
- ```
41
-
42
- You can also import the Lumo version of the component explicitly:
43
-
44
- ```js
45
- import '@vaadin/progress-bar/theme/lumo/vaadin-progress-bar.js';
46
- ```
47
-
48
- Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
49
-
50
- ```js
51
- import '@vaadin/progress-bar/src/vaadin-progress-bar.js';
52
- ```
53
-
54
31
  ## Contributing
55
32
 
56
33
  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/progress-bar",
3
- "version": "24.8.0-alpha9",
3
+ "version": "25.0.0-alpha2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,26 +32,23 @@
32
32
  "vaadin-progress",
33
33
  "vaadin-progress-bar",
34
34
  "web-components",
35
- "web-component",
36
- "polymer"
35
+ "web-component"
37
36
  ],
38
37
  "dependencies": {
39
38
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@polymer/polymer": "^3.0.0",
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",
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,15 +3,14 @@
3
3
  * Copyright (c) 2017 - 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';
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
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
11
  import { progressBarStyles } from './vaadin-progress-bar-styles.js';
11
12
  import { ProgressMixin } from './vaadin-progress-mixin.js';
12
13
 
13
- registerStyles('vaadin-progress-bar', progressBarStyles, { moduleId: 'vaadin-progress-bar-styles' });
14
-
15
14
  /**
16
15
  * `<vaadin-progress-bar>` is a Web Component for progress bars.
17
16
  *
@@ -49,12 +48,17 @@ registerStyles('vaadin-progress-bar', progressBarStyles, { moduleId: 'vaadin-pro
49
48
  * @mixes ThemableMixin
50
49
  * @mixes ElementMixin
51
50
  */
52
- class ProgressBar extends ElementMixin(ThemableMixin(ProgressMixin(PolymerElement))) {
51
+ class ProgressBar extends ProgressMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
53
52
  static get is() {
54
53
  return 'vaadin-progress-bar';
55
54
  }
56
55
 
57
- static get template() {
56
+ static get styles() {
57
+ return progressBarStyles;
58
+ }
59
+
60
+ /** @protected */
61
+ render() {
58
62
  return html`
59
63
  <div part="bar">
60
64
  <div part="value"></div>
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/progress-bar",
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/progress-bar",
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,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- export * from './vaadin-progress-bar.js';
@@ -1,44 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { 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 { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
- import { progressBarStyles } from './vaadin-progress-bar-styles.js';
12
- import { ProgressMixin } from './vaadin-progress-mixin.js';
13
-
14
- /**
15
- * LitElement based version of `<vaadin-progress-bar>` 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 ProgressBar extends ProgressMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
24
- static get is() {
25
- return 'vaadin-progress-bar';
26
- }
27
-
28
- static get styles() {
29
- return progressBarStyles;
30
- }
31
-
32
- /** @protected */
33
- render() {
34
- return html`
35
- <div part="bar">
36
- <div part="value"></div>
37
- </div>
38
- `;
39
- }
40
- }
41
-
42
- defineCustomElement(ProgressBar);
43
-
44
- export { ProgressBar };
@@ -1,2 +0,0 @@
1
- import './vaadin-progress-bar-styles.js';
2
- import '../../src/vaadin-lit-progress-bar.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-progress-bar-styles.js';
2
- import '../../src/vaadin-lit-progress-bar.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-progress-bar-styles.js';
2
- import '../../src/vaadin-lit-progress-bar.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-progress-bar-styles.js';
2
- import '../../src/vaadin-lit-progress-bar.js';
@@ -1 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
@@ -1,118 +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
- registerStyles(
5
- 'vaadin-progress-bar',
6
- css`
7
- :host {
8
- height: 4px;
9
- margin: 8px 0;
10
- position: relative;
11
- overflow: hidden;
12
- }
13
-
14
- :host::before {
15
- content: '';
16
- display: block;
17
- height: 100%;
18
- background-color: var(--material-primary-color);
19
- opacity: 0.16;
20
- }
21
-
22
- [part='bar'] {
23
- position: absolute;
24
- top: 0;
25
- width: 100%;
26
- transform: scaleX(var(--vaadin-progress-value));
27
- transform-origin: 0 0;
28
- }
29
-
30
- [part='value'] {
31
- transform: none;
32
- background-color: var(--material-primary-color);
33
- }
34
-
35
- /* Indeterminate */
36
-
37
- :host([indeterminate]) [part='bar'] {
38
- left: -100%;
39
- animation: primary-indeterminate-translate 2s infinite linear;
40
- }
41
-
42
- :host([indeterminate]) [part='value'] {
43
- animation: primary-indeterminate-scale 2s infinite linear;
44
- }
45
-
46
- @keyframes primary-indeterminate-translate {
47
- 0% {
48
- transform: translateX(0);
49
- }
50
-
51
- 20% {
52
- animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
53
- transform: translateX(0);
54
- }
55
-
56
- 59.15% {
57
- animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
58
- transform: translateX(83.67142%);
59
- }
60
-
61
- 100% {
62
- transform: translateX(200.611057%);
63
- }
64
- }
65
-
66
- @keyframes primary-indeterminate-scale {
67
- 0% {
68
- transform: scaleX(0.08);
69
- }
70
-
71
- 36.65% {
72
- animation-timing-function: cubic-bezier(0.334731, 0.12482, 0.785844, 1);
73
- transform: scaleX(0.08);
74
- }
75
-
76
- 69.15% {
77
- animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);
78
- transform: scaleX(0.661479);
79
- }
80
-
81
- 100% {
82
- transform: scaleX(0.08);
83
- }
84
- }
85
-
86
- /* RTL specific styles */
87
- :host([dir='rtl']) [part='bar'] {
88
- transform-origin: 100% 0;
89
- }
90
-
91
- :host([indeterminate][dir='rtl']) [part='bar'] {
92
- left: auto;
93
- right: -100%;
94
- animation: primary-indeterminate-translate-rtl 2s infinite linear;
95
- }
96
-
97
- @keyframes primary-indeterminate-translate-rtl {
98
- 0% {
99
- transform: translateX(0);
100
- }
101
-
102
- 20% {
103
- animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
104
- transform: translateX(0);
105
- }
106
-
107
- 59.15% {
108
- animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
109
- transform: translateX(-83.67142%);
110
- }
111
-
112
- 100% {
113
- transform: translateX(-200.611057%);
114
- }
115
- }
116
- `,
117
- { moduleId: 'material-progress-bar' },
118
- );
@@ -1,2 +0,0 @@
1
- import './vaadin-progress-bar-styles.js';
2
- import '../../src/vaadin-progress-bar.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-progress-bar-styles.js';
2
- import '../../src/vaadin-progress-bar.js';
@@ -1 +0,0 @@
1
- export * from './src/vaadin-progress-bar.js';
@@ -1,2 +0,0 @@
1
- import './theme/lumo/vaadin-lit-progress-bar.js';
2
- export * from './src/vaadin-lit-progress-bar.js';