@vaadin/progress-bar 25.0.0-alpha4 → 25.0.0-alpha6

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/progress-bar",
3
- "version": "25.0.0-alpha4",
3
+ "version": "25.0.0-alpha6",
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",
@@ -36,19 +38,19 @@
36
38
  ],
37
39
  "dependencies": {
38
40
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@vaadin/component-base": "25.0.0-alpha4",
40
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha4",
41
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha4",
41
+ "@vaadin/component-base": "25.0.0-alpha6",
42
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha6",
43
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha6",
42
44
  "lit": "^3.0.0"
43
45
  },
44
46
  "devDependencies": {
45
- "@vaadin/chai-plugins": "25.0.0-alpha4",
46
- "@vaadin/test-runner-commands": "25.0.0-alpha4",
47
+ "@vaadin/chai-plugins": "25.0.0-alpha6",
48
+ "@vaadin/test-runner-commands": "25.0.0-alpha6",
47
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": "ce4421f0daf26027b863b91787a474e4cc264344"
55
+ "gitHead": "cd1d084198d2b326c58d44bb39fa4845b71ce551"
54
56
  }
@@ -0,0 +1,102 @@
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 '@vaadin/component-base/src/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const progressBarStyles = css`
10
+ @layer base {
11
+ :host {
12
+ display: block;
13
+ width: 100%; /* prevent collapsing inside non-stretching column flex */
14
+ height: 0.5lh;
15
+ contain: layout size;
16
+ }
17
+
18
+ :host([hidden]) {
19
+ display: none !important;
20
+ }
21
+
22
+ [part='bar'] {
23
+ box-sizing: border-box;
24
+ height: 100%;
25
+ --_padding: var(--vaadin-progress-bar-padding, 0px);
26
+ padding: var(--_padding); /* stylelint-disable-line length-zero-no-unit */
27
+ background: var(--vaadin-progress-bar-background, var(--vaadin-background-container));
28
+ border-radius: var(--vaadin-progress-bar-border-radius, var(--vaadin-radius-m));
29
+ border: var(--vaadin-progress-bar-border-width, 1px) solid
30
+ var(--vaadin-progress-bar-border-color, var(--vaadin-border-color));
31
+ }
32
+
33
+ [part='value'] {
34
+ box-sizing: border-box;
35
+ height: 100%;
36
+ width: calc(var(--vaadin-progress-value) * 100%);
37
+ background: var(--vaadin-progress-bar-value-background, var(--vaadin-border-color-strong));
38
+ border-radius: calc(
39
+ var(--vaadin-progress-bar-border-radius, var(--vaadin-radius-m)) - var(
40
+ --vaadin-progress-bar-border-width,
41
+ 1px
42
+ ) - var(--_padding)
43
+ );
44
+ transition: width 150ms;
45
+ }
46
+
47
+ /* Indeterminate progress */
48
+ :host([indeterminate]) [part='value'] {
49
+ --_w-min: clamp(0.5em, 5%, 1em);
50
+ --_w-max: clamp(1em, 20%, 8em);
51
+ animation: indeterminate var(--vaadin-progress-bar-animation-duration, 1s) linear infinite alternate;
52
+ width: var(--_w-min);
53
+ }
54
+
55
+ :host([indeterminate][aria-valuenow]) [part='value'] {
56
+ animation-delay: 150ms;
57
+ }
58
+
59
+ @keyframes indeterminate {
60
+ 0% {
61
+ animation-timing-function: ease-in;
62
+ }
63
+
64
+ 20% {
65
+ margin-inline-start: 0%;
66
+ width: var(--_w-max);
67
+ }
68
+
69
+ 50% {
70
+ margin-inline-start: calc(50% - var(--_w-max) / 2);
71
+ }
72
+
73
+ 80% {
74
+ width: var(--_w-max);
75
+ margin-inline-start: calc(100% - var(--_w-max));
76
+ animation-timing-function: ease-out;
77
+ }
78
+
79
+ 100% {
80
+ width: var(--_w-min);
81
+ margin-inline-start: calc(100% - var(--_w-min));
82
+ }
83
+ }
84
+
85
+ @keyframes indeterminate-reduced {
86
+ 100% {
87
+ opacity: 0.2;
88
+ }
89
+ }
90
+
91
+ @media (prefers-reduced-motion: reduce) {
92
+ [part='value'] {
93
+ transition: none;
94
+ }
95
+
96
+ :host([indeterminate]) [part='value'] {
97
+ width: 25%;
98
+ animation: indeterminate-reduced 2s linear infinite alternate;
99
+ }
100
+ }
101
+ }
102
+ `;
@@ -0,0 +1,8 @@
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 type { CSSResult } from 'lit';
7
+
8
+ export const progressBarStyles: CSSResult;
@@ -7,8 +7,9 @@ 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 { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
10
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
- import { progressBarStyles } from './styles/vaadin-progress-bar-styles.js';
12
+ import { progressBarStyles } from './styles/vaadin-progress-bar-core-styles.js';
12
13
  import { ProgressMixin } from './vaadin-progress-mixin.js';
13
14
 
14
15
  /**
@@ -48,7 +49,7 @@ import { ProgressMixin } from './vaadin-progress-mixin.js';
48
49
  * @mixes ThemableMixin
49
50
  * @mixes ElementMixin
50
51
  */
51
- class ProgressBar extends ProgressMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
52
+ class ProgressBar extends ProgressMixin(ElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
52
53
  static get is() {
53
54
  return 'vaadin-progress-bar';
54
55
  }
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": "25.0.0-alpha4",
4
+ "version": "25.0.0-alpha6",
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": "25.0.0-alpha4",
4
+ "version": "25.0.0-alpha6",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {