@spectrum-web-components/progress-bar 0.41.1 → 0.42.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +7 -7
- package/src/ProgressBar.dev.js +1 -1
- package/src/ProgressBar.dev.js.map +2 -2
- package/src/ProgressBar.js +4 -4
- package/src/ProgressBar.js.map +2 -2
- package/src/progress-bar.css.dev.js +1 -115
- package/src/progress-bar.css.dev.js.map +2 -2
- package/src/progress-bar.css.js +1 -115
- package/src/progress-bar.css.js.map +2 -2
- package/src/spectrum-progress-bar.css.dev.js +1 -115
- package/src/spectrum-progress-bar.css.dev.js.map +2 -2
- package/src/spectrum-progress-bar.css.js +1 -115
- package/src/spectrum-progress-bar.css.js.map +2 -2
- package/stories/progress-bar.stories.js +60 -40
- package/stories/progress-bar.stories.js.map +2 -2
- package/test/progress-bar.test.js +24 -0
- package/test/progress-bar.test.js.map +2 -2
@@ -1,121 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
3
3
|
const styles = css`
|
4
|
-
:host{--spectrum-progressbar-animation-ease-in-out-indeterminate:var(
|
5
|
-
--spectrum-animation-ease-in-out
|
6
|
-
);--spectrum-progressbar-animation-duration-indeterminate:var(
|
7
|
-
--spectrum-animation-duration-2000
|
8
|
-
);--spectrum-progressbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-progressbar-fill-size-indeterminate:70%;--spectrum-progressbar-size-2400:192px;--spectrum-progressbar-size-2500:200px;--spectrum-progressbar-size-2800:224px;--spectrum-progressbar-line-height-cjk:var(--spectrum-cjk-line-height-100);--spectrum-progressbar-min-size:var(--spectrum-progress-bar-minimum-width);--spectrum-progressbar-max-size:var(--spectrum-progress-bar-maximum-width);--spectrum-progressbar-thickness:var(
|
9
|
-
--spectrum-progress-bar-thickness-medium
|
10
|
-
);--spectrum-progressbar-line-height:var(--spectrum-line-height-100);--spectrum-progressbar-spacing-label-to-progressbar:var(
|
11
|
-
--spectrum-spacing-75
|
12
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
13
|
-
--spectrum-component-top-to-text-100
|
14
|
-
);--spectrum-progressbar-spacing-label-to-text:var(--spectrum-spacing-200);--spectrum-progressbar-text-color:var(
|
15
|
-
--spectrum-neutral-content-color-default
|
16
|
-
);--spectrum-progressbar-track-color:var(--spectrum-gray-300);--spectrum-progressbar-fill-color:var(--spectrum-accent-color-900);--spectrum-progressbar-fill-color-positive:var(
|
17
|
-
--spectrum-positive-visual-color
|
18
|
-
);--spectrum-progressbar-fill-color-notice:var(
|
19
|
-
--spectrum-notice-visual-color
|
20
|
-
);--spectrum-progressbar-fill-color-negative:var(
|
21
|
-
--spectrum-negative-visual-color
|
22
|
-
);--spectrum-progressbar-label-and-value-white:var(--spectrum-white);--spectrum-progressbar-track-color-white:var(
|
23
|
-
--spectrum-transparent-white-300
|
24
|
-
);--spectrum-progressbar-fill-color-white:var(--spectrum-white);--spectrum-meter-min-width:var(--spectrum-meter-minimum-width);--spectrum-meter-max-width:var(--spectrum-meter-maximum-width);--spectrum-meter-inline-size:var(--spectrum-meter-default-width);--spectrum-meter-thickness-s:var(--spectrum-meter-thickness-small);--spectrum-meter-thickness-l:var(--spectrum-meter-thickness-large);--spectrum-meter-top-to-text:var(--spectrum-component-top-to-text)}:host([size=s]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(
|
25
|
-
--spectrum-progress-bar-thickness-small
|
26
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
27
|
-
--spectrum-component-top-to-text-75
|
28
|
-
)}:host{--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(
|
29
|
-
--spectrum-progress-bar-thickness-large
|
30
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
31
|
-
--spectrum-component-top-to-text-75
|
32
|
-
)}:host([size=l]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2500);--spectrum-progressbar-font-size:var(--spectrum-font-size-100);--spectrum-progressbar-thickness:var(
|
33
|
-
--spectrum-progress-bar-thickness-large
|
34
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
35
|
-
--spectrum-component-top-to-text-200
|
36
|
-
)}:host([size=xl]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2800);--spectrum-progressbar-font-size:var(--spectrum-font-size-200);--spectrum-progressbar-thickness:var(
|
37
|
-
--spectrum-progress-bar-thickness-extra-large
|
38
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
39
|
-
--spectrum-component-top-to-text-300
|
40
|
-
)}.spectrum-Meter{--spectrum-progressbar-size-default:var(
|
41
|
-
--mod-meter-inline-size,var(--spectrum-meter-inline-size)
|
42
|
-
);--spectrum-progressbar-max-size:var(
|
43
|
-
--mod-meter-max-width,var(--spectrum-meter-max-width)
|
44
|
-
);--spectrum-progressbar-min-size:var(
|
45
|
-
--mod-meter-min-width,var(--spectrum-meter-min-width)
|
46
|
-
)}:host([positive]) .spectrum-Meter .fill{background-color:var(
|
47
|
-
--highcontrast-progressbar-fill-color,var(
|
48
|
-
--mod-progressbar-fill-color-positive,var(--spectrum-progressbar-fill-color-positive)
|
49
|
-
)
|
50
|
-
)}:host([notice]) .spectrum-Meter .fill{background-color:var(
|
51
|
-
--highcontrast-progressbar-fill-color,var(
|
52
|
-
--mod-progressbar-fill-color-notice,var(--spectrum-progressbar-fill-color-notice)
|
53
|
-
)
|
54
|
-
)}:host([negative]) .spectrum-Meter .fill{background-color:var(
|
55
|
-
--highcontrast-progressbar-fill-color,var(
|
56
|
-
--mod-progressbar-fill-color-negative,var(--spectrum-progressbar-fill-color-negative)
|
57
|
-
)
|
58
|
-
)}:host{align-items:center;display:inline-flex;flex-flow:wrap;font-size:var(
|
59
|
-
--mod-progressbar-font-size,var(--spectrum-progressbar-font-size)
|
60
|
-
);inline-size:var(
|
61
|
-
--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)
|
62
|
-
);justify-content:space-between;max-inline-size:var(
|
63
|
-
--mod-progressbar-max-size,var(--spectrum-progressbar-max-size)
|
64
|
-
);min-inline-size:var(
|
65
|
-
--mod-progressbar-min-size,var(--spectrum-progressbar-min-size)
|
66
|
-
);position:relative;vertical-align:top}.label,.percentage{line-height:var(
|
67
|
-
--mod-progressbar-line-height,var(--spectrum-progressbar-line-height)
|
68
|
-
);margin-block-end:var(
|
69
|
-
--mod-progressbar-spacing-label-to-progressbar,var(--spectrum-progressbar-spacing-label-to-progressbar)
|
70
|
-
);margin-block-start:var(
|
71
|
-
--mod-progressbar-spacing-top-to-text,var(--spectrum-progressbar-spacing-top-to-text)
|
72
|
-
);text-align:start}.label:lang(ja),.label:lang(ko),.label:lang(zh),.percentage:lang(ja),.percentage:lang(ko),.percentage:lang(zh){line-height:var(
|
73
|
-
--mod-progressbar-line-height-cjk,var(--spectrum-progressbar-line-height-cjk)
|
74
|
-
)}.label,.percentage{color:var(
|
75
|
-
--mod-progressbar-text-color,var(--spectrum-progressbar-text-color)
|
76
|
-
)}.label{flex:1}.percentage{align-self:flex-start;margin-inline-start:var(
|
77
|
-
--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text)
|
78
|
-
)}.track{background-color:var(
|
79
|
-
--highcontrast-progressbar-track-color,var(
|
80
|
-
--mod-progressbar-track-color,var(--spectrum-progressbar-track-color)
|
81
|
-
)
|
82
|
-
);border-radius:var(--spectrum-progressbar-corner-radius);inline-size:100%;overflow:hidden}.fill,.track{block-size:var(
|
83
|
-
--mod-progressbar-thickness,var(--spectrum-progressbar-thickness)
|
84
|
-
)}.fill{background-color:var(
|
85
|
-
--highcontrast-progressbar-fill-color,var(
|
86
|
-
--mod-progressbar-fill-color,var(--spectrum-progressbar-fill-color)
|
87
|
-
)
|
88
|
-
);border:none;transition:width 1s}:host([indeterminate]) .fill{animation-timing-function:var(
|
89
|
-
--mod-progressbar-animation-ease-in-out-indeterminate,var(--spectrum-progressbar-animation-ease-in-out-indeterminate)
|
90
|
-
);inline-size:var(
|
91
|
-
--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate)
|
92
|
-
);position:relative;will-change:transform}:host([side-label]){display:inline-flex;flex-flow:row;justify-content:space-between}:host([side-label]) .track{flex:1 1 var(
|
93
|
-
--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)
|
94
|
-
)}:host([side-label]) .label{flex-grow:0;margin-block-end:0;margin-inline-end:var(
|
95
|
-
--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text)
|
96
|
-
)}:host([side-label]) .percentage{margin-block-end:0;margin-inline-start:var(
|
97
|
-
--mod-spacing-progressbar-label-to-text,var(--spectrum-progressbar-spacing-label-to-text)
|
98
|
-
);order:3;text-align:end}:host([static=white]) .fill{background-color:var(
|
99
|
-
--mod-progressbar-fill-color-white,var(--spectrum-progressbar-fill-color-white)
|
100
|
-
);color:var(
|
101
|
-
--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white)
|
102
|
-
)}:host([static=white]) .label,:host([static=white]) .percentage{color:var(
|
103
|
-
--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white)
|
104
|
-
)}:host([static=white]) .track{background-color:var(--spectrum-progressbar-track-color-white)}:host([dir=ltr][indeterminate]) .fill{animation:indeterminate-loop-ltr var(
|
105
|
-
--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate)
|
106
|
-
) infinite}:host([dir=rtl][indeterminate]) .fill{animation:indeterminate-loop-rtl var(
|
107
|
-
--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate)
|
108
|
-
) infinite}@keyframes indeterminate-loop-ltr{0%{transform:translate(calc(var(
|
109
|
-
--mod-progressbar-fill-size-indeterminate,
|
110
|
-
var(--spectrum-progressbar-fill-size-indeterminate)
|
111
|
-
)*-1))}to{transform:translate(var(
|
112
|
-
--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)
|
113
|
-
))}}@keyframes indeterminate-loop-rtl{0%{transform:translate(var(
|
114
|
-
--mod-progressbar-size-default,var(--spectrum-progressbar-fill-size-indeterminate)
|
115
|
-
))}to{transform:translate(calc(var(
|
116
|
-
--mod-progressbar-size-default,
|
117
|
-
var(--spectrum-progressbar-size-default)
|
118
|
-
)*-1))}}@media (forced-colors:active){.track{forced-color-adjust:none;--highcontrast-progressbar-fill-color:ButtonText;--highcontrast-progressbar-track-color:ButtonFace;border:1px solid ButtonText}}
|
4
|
+
:host{--spectrum-progressbar-animation-ease-in-out-indeterminate:var(--spectrum-animation-ease-in-out);--spectrum-progressbar-animation-duration-indeterminate:var(--spectrum-animation-duration-2000);--spectrum-progressbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-progressbar-fill-size-indeterminate:70%;--spectrum-progressbar-size-2400:192px;--spectrum-progressbar-size-2500:200px;--spectrum-progressbar-size-2800:224px;--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-line-height-cjk:var(--spectrum-cjk-line-height-100);--spectrum-progressbar-min-size:var(--spectrum-progress-bar-minimum-width);--spectrum-progressbar-max-size:var(--spectrum-progress-bar-maximum-width);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-medium);--spectrum-progressbar-line-height:var(--spectrum-line-height-100);--spectrum-progressbar-spacing-label-to-progressbar:var(--spectrum-spacing-75);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-100);--spectrum-progressbar-spacing-label-to-text:var(--spectrum-spacing-200);--spectrum-progressbar-text-color:var(--spectrum-neutral-content-color-default);--spectrum-progressbar-track-color:var(--spectrum-gray-300);--spectrum-progressbar-fill-color:var(--spectrum-accent-color-900);--spectrum-progressbar-fill-color-positive:var(--spectrum-positive-visual-color);--spectrum-progressbar-fill-color-notice:var(--spectrum-notice-visual-color);--spectrum-progressbar-fill-color-negative:var(--spectrum-negative-visual-color);--spectrum-progressbar-label-and-value-white:var(--spectrum-white);--spectrum-progressbar-track-color-white:var(--spectrum-transparent-white-300);--spectrum-progressbar-fill-color-white:var(--spectrum-white);--spectrum-meter-min-width:var(--spectrum-meter-minimum-width);--spectrum-meter-max-width:var(--spectrum-meter-maximum-width);--spectrum-meter-inline-size:var(--spectrum-meter-default-width);--spectrum-meter-thickness-s:var(--spectrum-meter-thickness-small);--spectrum-meter-thickness-l:var(--spectrum-meter-thickness-large);--spectrum-meter-top-to-text:var(--spectrum-component-top-to-text)}:host([size=s]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-small);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-75)}:host{--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-75)}:host([size=l]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2500);--spectrum-progressbar-font-size:var(--spectrum-font-size-100);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-200)}:host([size=xl]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2800);--spectrum-progressbar-font-size:var(--spectrum-font-size-200);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-extra-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-300)}.spectrum-Meter{--spectrum-progressbar-size-default:var(--mod-meter-inline-size,var(--spectrum-meter-inline-size));--spectrum-progressbar-max-size:var(--mod-meter-max-width,var(--spectrum-meter-max-width));--spectrum-progressbar-min-size:var(--mod-meter-min-width,var(--spectrum-meter-min-width))}:host([positive]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-positive,var(--spectrum-progressbar-fill-color-positive)))}:host([notice]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-notice,var(--spectrum-progressbar-fill-color-notice)))}:host([negative]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-negative,var(--spectrum-progressbar-fill-color-negative)))}:host{font-size:var(--mod-progressbar-font-size,var(--spectrum-progressbar-font-size));vertical-align:top;inline-size:var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default));max-inline-size:var(--mod-progressbar-max-size,var(--spectrum-progressbar-max-size));min-inline-size:var(--mod-progressbar-min-size,var(--spectrum-progressbar-min-size));flex-flow:wrap;justify-content:space-between;align-items:center;display:inline-flex;position:relative}.label,.percentage{text-align:start;line-height:var(--mod-progressbar-line-height,var(--spectrum-progressbar-line-height));margin-block-start:var(--mod-progressbar-spacing-top-to-text,var(--spectrum-progressbar-spacing-top-to-text));margin-block-end:var(--mod-progressbar-spacing-label-to-progressbar,var(--spectrum-progressbar-spacing-label-to-progressbar))}.label:lang(ja),.label:lang(zh),.label:lang(ko),.percentage:lang(ja),.percentage:lang(zh),.percentage:lang(ko){line-height:var(--mod-progressbar-line-height-cjk,var(--spectrum-progressbar-line-height-cjk))}.label,.percentage{color:var(--mod-progressbar-text-color,var(--spectrum-progressbar-text-color))}.label{flex:1}.percentage{align-self:flex-start;margin-inline-start:var(--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}.track{block-size:var(--mod-progressbar-thickness,var(--spectrum-progressbar-thickness));border-radius:var(--spectrum-progressbar-corner-radius);background-color:var(--highcontrast-progressbar-track-color,var(--mod-progressbar-track-color,var(--spectrum-progressbar-track-color)));inline-size:100%;overflow:hidden}.fill{block-size:var(--mod-progressbar-thickness,var(--spectrum-progressbar-thickness));background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color,var(--spectrum-progressbar-fill-color)));border:none;transition:width 1s}:host([indeterminate]) .fill{inline-size:var(--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate));animation-timing-function:var(--mod-progressbar-animation-ease-in-out-indeterminate,var(--spectrum-progressbar-animation-ease-in-out-indeterminate));will-change:transform;position:relative}:host([side-label]){flex-flow:row;justify-content:space-between;display:inline-flex}:host([side-label]) .track{flex:1 1 var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default))}:host([side-label]) .label{flex-grow:0;margin-block-end:0;margin-inline-end:var(--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}:host([side-label]) .percentage{text-align:end;order:3;margin-block-end:0;margin-inline-start:var(--mod-spacing-progressbar-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}:host([static=white]) .fill{color:var(--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white));background-color:var(--mod-progressbar-fill-color-white,var(--spectrum-progressbar-fill-color-white))}:host([static=white]) .label,:host([static=white]) .percentage{color:var(--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white))}:host([static=white]) .track{background-color:var(--spectrum-progressbar-track-color-white)}:host([dir=ltr][indeterminate]) .fill{animation:indeterminate-loop-ltr var(--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate))infinite}:host([dir=rtl][indeterminate]) .fill{animation:indeterminate-loop-rtl var(--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate))infinite}@keyframes indeterminate-loop-ltr{0%{transform:translate(calc(var(--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate))*-1))}to{transform:translate(var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)))}}@keyframes indeterminate-loop-rtl{0%{transform:translate(var(--mod-progressbar-size-default,var(--spectrum-progressbar-fill-size-indeterminate)))}to{transform:translate(calc(var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default))*-1))}}@media (forced-colors:active){.track{forced-color-adjust:none;--highcontrast-progressbar-fill-color:ButtonText;--highcontrast-progressbar-track-color:ButtonFace;border:1px solid buttontext}}
|
119
5
|
`;
|
120
6
|
export default styles;
|
121
7
|
//# sourceMappingURL=spectrum-progress-bar.css.dev.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["spectrum-progress-bar.css.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-progressbar-animation-ease-in-out-indeterminate:var(
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-progressbar-animation-ease-in-out-indeterminate:var(--spectrum-animation-ease-in-out);--spectrum-progressbar-animation-duration-indeterminate:var(--spectrum-animation-duration-2000);--spectrum-progressbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-progressbar-fill-size-indeterminate:70%;--spectrum-progressbar-size-2400:192px;--spectrum-progressbar-size-2500:200px;--spectrum-progressbar-size-2800:224px;--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-line-height-cjk:var(--spectrum-cjk-line-height-100);--spectrum-progressbar-min-size:var(--spectrum-progress-bar-minimum-width);--spectrum-progressbar-max-size:var(--spectrum-progress-bar-maximum-width);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-medium);--spectrum-progressbar-line-height:var(--spectrum-line-height-100);--spectrum-progressbar-spacing-label-to-progressbar:var(--spectrum-spacing-75);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-100);--spectrum-progressbar-spacing-label-to-text:var(--spectrum-spacing-200);--spectrum-progressbar-text-color:var(--spectrum-neutral-content-color-default);--spectrum-progressbar-track-color:var(--spectrum-gray-300);--spectrum-progressbar-fill-color:var(--spectrum-accent-color-900);--spectrum-progressbar-fill-color-positive:var(--spectrum-positive-visual-color);--spectrum-progressbar-fill-color-notice:var(--spectrum-notice-visual-color);--spectrum-progressbar-fill-color-negative:var(--spectrum-negative-visual-color);--spectrum-progressbar-label-and-value-white:var(--spectrum-white);--spectrum-progressbar-track-color-white:var(--spectrum-transparent-white-300);--spectrum-progressbar-fill-color-white:var(--spectrum-white);--spectrum-meter-min-width:var(--spectrum-meter-minimum-width);--spectrum-meter-max-width:var(--spectrum-meter-maximum-width);--spectrum-meter-inline-size:var(--spectrum-meter-default-width);--spectrum-meter-thickness-s:var(--spectrum-meter-thickness-small);--spectrum-meter-thickness-l:var(--spectrum-meter-thickness-large);--spectrum-meter-top-to-text:var(--spectrum-component-top-to-text)}:host([size=s]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-small);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-75)}:host{--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-75)}:host([size=l]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2500);--spectrum-progressbar-font-size:var(--spectrum-font-size-100);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-200)}:host([size=xl]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2800);--spectrum-progressbar-font-size:var(--spectrum-font-size-200);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-extra-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-300)}.spectrum-Meter{--spectrum-progressbar-size-default:var(--mod-meter-inline-size,var(--spectrum-meter-inline-size));--spectrum-progressbar-max-size:var(--mod-meter-max-width,var(--spectrum-meter-max-width));--spectrum-progressbar-min-size:var(--mod-meter-min-width,var(--spectrum-meter-min-width))}:host([positive]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-positive,var(--spectrum-progressbar-fill-color-positive)))}:host([notice]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-notice,var(--spectrum-progressbar-fill-color-notice)))}:host([negative]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-negative,var(--spectrum-progressbar-fill-color-negative)))}:host{font-size:var(--mod-progressbar-font-size,var(--spectrum-progressbar-font-size));vertical-align:top;inline-size:var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default));max-inline-size:var(--mod-progressbar-max-size,var(--spectrum-progressbar-max-size));min-inline-size:var(--mod-progressbar-min-size,var(--spectrum-progressbar-min-size));flex-flow:wrap;justify-content:space-between;align-items:center;display:inline-flex;position:relative}.label,.percentage{text-align:start;line-height:var(--mod-progressbar-line-height,var(--spectrum-progressbar-line-height));margin-block-start:var(--mod-progressbar-spacing-top-to-text,var(--spectrum-progressbar-spacing-top-to-text));margin-block-end:var(--mod-progressbar-spacing-label-to-progressbar,var(--spectrum-progressbar-spacing-label-to-progressbar))}.label:lang(ja),.label:lang(zh),.label:lang(ko),.percentage:lang(ja),.percentage:lang(zh),.percentage:lang(ko){line-height:var(--mod-progressbar-line-height-cjk,var(--spectrum-progressbar-line-height-cjk))}.label,.percentage{color:var(--mod-progressbar-text-color,var(--spectrum-progressbar-text-color))}.label{flex:1}.percentage{align-self:flex-start;margin-inline-start:var(--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}.track{block-size:var(--mod-progressbar-thickness,var(--spectrum-progressbar-thickness));border-radius:var(--spectrum-progressbar-corner-radius);background-color:var(--highcontrast-progressbar-track-color,var(--mod-progressbar-track-color,var(--spectrum-progressbar-track-color)));inline-size:100%;overflow:hidden}.fill{block-size:var(--mod-progressbar-thickness,var(--spectrum-progressbar-thickness));background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color,var(--spectrum-progressbar-fill-color)));border:none;transition:width 1s}:host([indeterminate]) .fill{inline-size:var(--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate));animation-timing-function:var(--mod-progressbar-animation-ease-in-out-indeterminate,var(--spectrum-progressbar-animation-ease-in-out-indeterminate));will-change:transform;position:relative}:host([side-label]){flex-flow:row;justify-content:space-between;display:inline-flex}:host([side-label]) .track{flex:1 1 var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default))}:host([side-label]) .label{flex-grow:0;margin-block-end:0;margin-inline-end:var(--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}:host([side-label]) .percentage{text-align:end;order:3;margin-block-end:0;margin-inline-start:var(--mod-spacing-progressbar-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}:host([static=white]) .fill{color:var(--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white));background-color:var(--mod-progressbar-fill-color-white,var(--spectrum-progressbar-fill-color-white))}:host([static=white]) .label,:host([static=white]) .percentage{color:var(--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white))}:host([static=white]) .track{background-color:var(--spectrum-progressbar-track-color-white)}:host([dir=ltr][indeterminate]) .fill{animation:indeterminate-loop-ltr var(--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate))infinite}:host([dir=rtl][indeterminate]) .fill{animation:indeterminate-loop-rtl var(--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate))infinite}@keyframes indeterminate-loop-ltr{0%{transform:translate(calc(var(--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate))*-1))}to{transform:translate(var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)))}}@keyframes indeterminate-loop-rtl{0%{transform:translate(var(--mod-progressbar-size-default,var(--spectrum-progressbar-fill-size-indeterminate)))}to{transform:translate(calc(var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default))*-1))}}@media (forced-colors:active){.track{forced-color-adjust:none;--highcontrast-progressbar-fill-color:ButtonText;--highcontrast-progressbar-track-color:ButtonFace;border:1px solid buttontext}}\n`;\nexport default styles;"],
|
5
|
+
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -1,118 +1,4 @@
|
|
1
1
|
"use strict";import{css as r}from"@spectrum-web-components/base";const e=r`
|
2
|
-
:host{--spectrum-progressbar-animation-ease-in-out-indeterminate:var(
|
3
|
-
--spectrum-animation-ease-in-out
|
4
|
-
);--spectrum-progressbar-animation-duration-indeterminate:var(
|
5
|
-
--spectrum-animation-duration-2000
|
6
|
-
);--spectrum-progressbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-progressbar-fill-size-indeterminate:70%;--spectrum-progressbar-size-2400:192px;--spectrum-progressbar-size-2500:200px;--spectrum-progressbar-size-2800:224px;--spectrum-progressbar-line-height-cjk:var(--spectrum-cjk-line-height-100);--spectrum-progressbar-min-size:var(--spectrum-progress-bar-minimum-width);--spectrum-progressbar-max-size:var(--spectrum-progress-bar-maximum-width);--spectrum-progressbar-thickness:var(
|
7
|
-
--spectrum-progress-bar-thickness-medium
|
8
|
-
);--spectrum-progressbar-line-height:var(--spectrum-line-height-100);--spectrum-progressbar-spacing-label-to-progressbar:var(
|
9
|
-
--spectrum-spacing-75
|
10
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
11
|
-
--spectrum-component-top-to-text-100
|
12
|
-
);--spectrum-progressbar-spacing-label-to-text:var(--spectrum-spacing-200);--spectrum-progressbar-text-color:var(
|
13
|
-
--spectrum-neutral-content-color-default
|
14
|
-
);--spectrum-progressbar-track-color:var(--spectrum-gray-300);--spectrum-progressbar-fill-color:var(--spectrum-accent-color-900);--spectrum-progressbar-fill-color-positive:var(
|
15
|
-
--spectrum-positive-visual-color
|
16
|
-
);--spectrum-progressbar-fill-color-notice:var(
|
17
|
-
--spectrum-notice-visual-color
|
18
|
-
);--spectrum-progressbar-fill-color-negative:var(
|
19
|
-
--spectrum-negative-visual-color
|
20
|
-
);--spectrum-progressbar-label-and-value-white:var(--spectrum-white);--spectrum-progressbar-track-color-white:var(
|
21
|
-
--spectrum-transparent-white-300
|
22
|
-
);--spectrum-progressbar-fill-color-white:var(--spectrum-white);--spectrum-meter-min-width:var(--spectrum-meter-minimum-width);--spectrum-meter-max-width:var(--spectrum-meter-maximum-width);--spectrum-meter-inline-size:var(--spectrum-meter-default-width);--spectrum-meter-thickness-s:var(--spectrum-meter-thickness-small);--spectrum-meter-thickness-l:var(--spectrum-meter-thickness-large);--spectrum-meter-top-to-text:var(--spectrum-component-top-to-text)}:host([size=s]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(
|
23
|
-
--spectrum-progress-bar-thickness-small
|
24
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
25
|
-
--spectrum-component-top-to-text-75
|
26
|
-
)}:host{--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(
|
27
|
-
--spectrum-progress-bar-thickness-large
|
28
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
29
|
-
--spectrum-component-top-to-text-75
|
30
|
-
)}:host([size=l]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2500);--spectrum-progressbar-font-size:var(--spectrum-font-size-100);--spectrum-progressbar-thickness:var(
|
31
|
-
--spectrum-progress-bar-thickness-large
|
32
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
33
|
-
--spectrum-component-top-to-text-200
|
34
|
-
)}:host([size=xl]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2800);--spectrum-progressbar-font-size:var(--spectrum-font-size-200);--spectrum-progressbar-thickness:var(
|
35
|
-
--spectrum-progress-bar-thickness-extra-large
|
36
|
-
);--spectrum-progressbar-spacing-top-to-text:var(
|
37
|
-
--spectrum-component-top-to-text-300
|
38
|
-
)}.spectrum-Meter{--spectrum-progressbar-size-default:var(
|
39
|
-
--mod-meter-inline-size,var(--spectrum-meter-inline-size)
|
40
|
-
);--spectrum-progressbar-max-size:var(
|
41
|
-
--mod-meter-max-width,var(--spectrum-meter-max-width)
|
42
|
-
);--spectrum-progressbar-min-size:var(
|
43
|
-
--mod-meter-min-width,var(--spectrum-meter-min-width)
|
44
|
-
)}:host([positive]) .spectrum-Meter .fill{background-color:var(
|
45
|
-
--highcontrast-progressbar-fill-color,var(
|
46
|
-
--mod-progressbar-fill-color-positive,var(--spectrum-progressbar-fill-color-positive)
|
47
|
-
)
|
48
|
-
)}:host([notice]) .spectrum-Meter .fill{background-color:var(
|
49
|
-
--highcontrast-progressbar-fill-color,var(
|
50
|
-
--mod-progressbar-fill-color-notice,var(--spectrum-progressbar-fill-color-notice)
|
51
|
-
)
|
52
|
-
)}:host([negative]) .spectrum-Meter .fill{background-color:var(
|
53
|
-
--highcontrast-progressbar-fill-color,var(
|
54
|
-
--mod-progressbar-fill-color-negative,var(--spectrum-progressbar-fill-color-negative)
|
55
|
-
)
|
56
|
-
)}:host{align-items:center;display:inline-flex;flex-flow:wrap;font-size:var(
|
57
|
-
--mod-progressbar-font-size,var(--spectrum-progressbar-font-size)
|
58
|
-
);inline-size:var(
|
59
|
-
--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)
|
60
|
-
);justify-content:space-between;max-inline-size:var(
|
61
|
-
--mod-progressbar-max-size,var(--spectrum-progressbar-max-size)
|
62
|
-
);min-inline-size:var(
|
63
|
-
--mod-progressbar-min-size,var(--spectrum-progressbar-min-size)
|
64
|
-
);position:relative;vertical-align:top}.label,.percentage{line-height:var(
|
65
|
-
--mod-progressbar-line-height,var(--spectrum-progressbar-line-height)
|
66
|
-
);margin-block-end:var(
|
67
|
-
--mod-progressbar-spacing-label-to-progressbar,var(--spectrum-progressbar-spacing-label-to-progressbar)
|
68
|
-
);margin-block-start:var(
|
69
|
-
--mod-progressbar-spacing-top-to-text,var(--spectrum-progressbar-spacing-top-to-text)
|
70
|
-
);text-align:start}.label:lang(ja),.label:lang(ko),.label:lang(zh),.percentage:lang(ja),.percentage:lang(ko),.percentage:lang(zh){line-height:var(
|
71
|
-
--mod-progressbar-line-height-cjk,var(--spectrum-progressbar-line-height-cjk)
|
72
|
-
)}.label,.percentage{color:var(
|
73
|
-
--mod-progressbar-text-color,var(--spectrum-progressbar-text-color)
|
74
|
-
)}.label{flex:1}.percentage{align-self:flex-start;margin-inline-start:var(
|
75
|
-
--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text)
|
76
|
-
)}.track{background-color:var(
|
77
|
-
--highcontrast-progressbar-track-color,var(
|
78
|
-
--mod-progressbar-track-color,var(--spectrum-progressbar-track-color)
|
79
|
-
)
|
80
|
-
);border-radius:var(--spectrum-progressbar-corner-radius);inline-size:100%;overflow:hidden}.fill,.track{block-size:var(
|
81
|
-
--mod-progressbar-thickness,var(--spectrum-progressbar-thickness)
|
82
|
-
)}.fill{background-color:var(
|
83
|
-
--highcontrast-progressbar-fill-color,var(
|
84
|
-
--mod-progressbar-fill-color,var(--spectrum-progressbar-fill-color)
|
85
|
-
)
|
86
|
-
);border:none;transition:width 1s}:host([indeterminate]) .fill{animation-timing-function:var(
|
87
|
-
--mod-progressbar-animation-ease-in-out-indeterminate,var(--spectrum-progressbar-animation-ease-in-out-indeterminate)
|
88
|
-
);inline-size:var(
|
89
|
-
--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate)
|
90
|
-
);position:relative;will-change:transform}:host([side-label]){display:inline-flex;flex-flow:row;justify-content:space-between}:host([side-label]) .track{flex:1 1 var(
|
91
|
-
--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)
|
92
|
-
)}:host([side-label]) .label{flex-grow:0;margin-block-end:0;margin-inline-end:var(
|
93
|
-
--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text)
|
94
|
-
)}:host([side-label]) .percentage{margin-block-end:0;margin-inline-start:var(
|
95
|
-
--mod-spacing-progressbar-label-to-text,var(--spectrum-progressbar-spacing-label-to-text)
|
96
|
-
);order:3;text-align:end}:host([static=white]) .fill{background-color:var(
|
97
|
-
--mod-progressbar-fill-color-white,var(--spectrum-progressbar-fill-color-white)
|
98
|
-
);color:var(
|
99
|
-
--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white)
|
100
|
-
)}:host([static=white]) .label,:host([static=white]) .percentage{color:var(
|
101
|
-
--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white)
|
102
|
-
)}:host([static=white]) .track{background-color:var(--spectrum-progressbar-track-color-white)}:host([dir=ltr][indeterminate]) .fill{animation:indeterminate-loop-ltr var(
|
103
|
-
--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate)
|
104
|
-
) infinite}:host([dir=rtl][indeterminate]) .fill{animation:indeterminate-loop-rtl var(
|
105
|
-
--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate)
|
106
|
-
) infinite}@keyframes indeterminate-loop-ltr{0%{transform:translate(calc(var(
|
107
|
-
--mod-progressbar-fill-size-indeterminate,
|
108
|
-
var(--spectrum-progressbar-fill-size-indeterminate)
|
109
|
-
)*-1))}to{transform:translate(var(
|
110
|
-
--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)
|
111
|
-
))}}@keyframes indeterminate-loop-rtl{0%{transform:translate(var(
|
112
|
-
--mod-progressbar-size-default,var(--spectrum-progressbar-fill-size-indeterminate)
|
113
|
-
))}to{transform:translate(calc(var(
|
114
|
-
--mod-progressbar-size-default,
|
115
|
-
var(--spectrum-progressbar-size-default)
|
116
|
-
)*-1))}}@media (forced-colors:active){.track{forced-color-adjust:none;--highcontrast-progressbar-fill-color:ButtonText;--highcontrast-progressbar-track-color:ButtonFace;border:1px solid ButtonText}}
|
2
|
+
:host{--spectrum-progressbar-animation-ease-in-out-indeterminate:var(--spectrum-animation-ease-in-out);--spectrum-progressbar-animation-duration-indeterminate:var(--spectrum-animation-duration-2000);--spectrum-progressbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-progressbar-fill-size-indeterminate:70%;--spectrum-progressbar-size-2400:192px;--spectrum-progressbar-size-2500:200px;--spectrum-progressbar-size-2800:224px;--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-line-height-cjk:var(--spectrum-cjk-line-height-100);--spectrum-progressbar-min-size:var(--spectrum-progress-bar-minimum-width);--spectrum-progressbar-max-size:var(--spectrum-progress-bar-maximum-width);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-medium);--spectrum-progressbar-line-height:var(--spectrum-line-height-100);--spectrum-progressbar-spacing-label-to-progressbar:var(--spectrum-spacing-75);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-100);--spectrum-progressbar-spacing-label-to-text:var(--spectrum-spacing-200);--spectrum-progressbar-text-color:var(--spectrum-neutral-content-color-default);--spectrum-progressbar-track-color:var(--spectrum-gray-300);--spectrum-progressbar-fill-color:var(--spectrum-accent-color-900);--spectrum-progressbar-fill-color-positive:var(--spectrum-positive-visual-color);--spectrum-progressbar-fill-color-notice:var(--spectrum-notice-visual-color);--spectrum-progressbar-fill-color-negative:var(--spectrum-negative-visual-color);--spectrum-progressbar-label-and-value-white:var(--spectrum-white);--spectrum-progressbar-track-color-white:var(--spectrum-transparent-white-300);--spectrum-progressbar-fill-color-white:var(--spectrum-white);--spectrum-meter-min-width:var(--spectrum-meter-minimum-width);--spectrum-meter-max-width:var(--spectrum-meter-maximum-width);--spectrum-meter-inline-size:var(--spectrum-meter-default-width);--spectrum-meter-thickness-s:var(--spectrum-meter-thickness-small);--spectrum-meter-thickness-l:var(--spectrum-meter-thickness-large);--spectrum-meter-top-to-text:var(--spectrum-component-top-to-text)}:host([size=s]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-small);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-75)}:host{--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-75)}:host([size=l]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2500);--spectrum-progressbar-font-size:var(--spectrum-font-size-100);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-200)}:host([size=xl]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2800);--spectrum-progressbar-font-size:var(--spectrum-font-size-200);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-extra-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-300)}.spectrum-Meter{--spectrum-progressbar-size-default:var(--mod-meter-inline-size,var(--spectrum-meter-inline-size));--spectrum-progressbar-max-size:var(--mod-meter-max-width,var(--spectrum-meter-max-width));--spectrum-progressbar-min-size:var(--mod-meter-min-width,var(--spectrum-meter-min-width))}:host([positive]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-positive,var(--spectrum-progressbar-fill-color-positive)))}:host([notice]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-notice,var(--spectrum-progressbar-fill-color-notice)))}:host([negative]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-negative,var(--spectrum-progressbar-fill-color-negative)))}:host{font-size:var(--mod-progressbar-font-size,var(--spectrum-progressbar-font-size));vertical-align:top;inline-size:var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default));max-inline-size:var(--mod-progressbar-max-size,var(--spectrum-progressbar-max-size));min-inline-size:var(--mod-progressbar-min-size,var(--spectrum-progressbar-min-size));flex-flow:wrap;justify-content:space-between;align-items:center;display:inline-flex;position:relative}.label,.percentage{text-align:start;line-height:var(--mod-progressbar-line-height,var(--spectrum-progressbar-line-height));margin-block-start:var(--mod-progressbar-spacing-top-to-text,var(--spectrum-progressbar-spacing-top-to-text));margin-block-end:var(--mod-progressbar-spacing-label-to-progressbar,var(--spectrum-progressbar-spacing-label-to-progressbar))}.label:lang(ja),.label:lang(zh),.label:lang(ko),.percentage:lang(ja),.percentage:lang(zh),.percentage:lang(ko){line-height:var(--mod-progressbar-line-height-cjk,var(--spectrum-progressbar-line-height-cjk))}.label,.percentage{color:var(--mod-progressbar-text-color,var(--spectrum-progressbar-text-color))}.label{flex:1}.percentage{align-self:flex-start;margin-inline-start:var(--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}.track{block-size:var(--mod-progressbar-thickness,var(--spectrum-progressbar-thickness));border-radius:var(--spectrum-progressbar-corner-radius);background-color:var(--highcontrast-progressbar-track-color,var(--mod-progressbar-track-color,var(--spectrum-progressbar-track-color)));inline-size:100%;overflow:hidden}.fill{block-size:var(--mod-progressbar-thickness,var(--spectrum-progressbar-thickness));background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color,var(--spectrum-progressbar-fill-color)));border:none;transition:width 1s}:host([indeterminate]) .fill{inline-size:var(--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate));animation-timing-function:var(--mod-progressbar-animation-ease-in-out-indeterminate,var(--spectrum-progressbar-animation-ease-in-out-indeterminate));will-change:transform;position:relative}:host([side-label]){flex-flow:row;justify-content:space-between;display:inline-flex}:host([side-label]) .track{flex:1 1 var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default))}:host([side-label]) .label{flex-grow:0;margin-block-end:0;margin-inline-end:var(--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}:host([side-label]) .percentage{text-align:end;order:3;margin-block-end:0;margin-inline-start:var(--mod-spacing-progressbar-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}:host([static=white]) .fill{color:var(--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white));background-color:var(--mod-progressbar-fill-color-white,var(--spectrum-progressbar-fill-color-white))}:host([static=white]) .label,:host([static=white]) .percentage{color:var(--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white))}:host([static=white]) .track{background-color:var(--spectrum-progressbar-track-color-white)}:host([dir=ltr][indeterminate]) .fill{animation:indeterminate-loop-ltr var(--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate))infinite}:host([dir=rtl][indeterminate]) .fill{animation:indeterminate-loop-rtl var(--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate))infinite}@keyframes indeterminate-loop-ltr{0%{transform:translate(calc(var(--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate))*-1))}to{transform:translate(var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)))}}@keyframes indeterminate-loop-rtl{0%{transform:translate(var(--mod-progressbar-size-default,var(--spectrum-progressbar-fill-size-indeterminate)))}to{transform:translate(calc(var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default))*-1))}}@media (forced-colors:active){.track{forced-color-adjust:none;--highcontrast-progressbar-fill-color:ButtonText;--highcontrast-progressbar-track-color:ButtonFace;border:1px solid buttontext}}
|
117
3
|
`;export default e;
|
118
4
|
//# sourceMappingURL=spectrum-progress-bar.css.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["spectrum-progress-bar.css.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-progressbar-animation-ease-in-out-indeterminate:var(
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-progressbar-animation-ease-in-out-indeterminate:var(--spectrum-animation-ease-in-out);--spectrum-progressbar-animation-duration-indeterminate:var(--spectrum-animation-duration-2000);--spectrum-progressbar-corner-radius:var(--spectrum-corner-radius-100);--spectrum-progressbar-fill-size-indeterminate:70%;--spectrum-progressbar-size-2400:192px;--spectrum-progressbar-size-2500:200px;--spectrum-progressbar-size-2800:224px;--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-line-height-cjk:var(--spectrum-cjk-line-height-100);--spectrum-progressbar-min-size:var(--spectrum-progress-bar-minimum-width);--spectrum-progressbar-max-size:var(--spectrum-progress-bar-maximum-width);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-medium);--spectrum-progressbar-line-height:var(--spectrum-line-height-100);--spectrum-progressbar-spacing-label-to-progressbar:var(--spectrum-spacing-75);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-100);--spectrum-progressbar-spacing-label-to-text:var(--spectrum-spacing-200);--spectrum-progressbar-text-color:var(--spectrum-neutral-content-color-default);--spectrum-progressbar-track-color:var(--spectrum-gray-300);--spectrum-progressbar-fill-color:var(--spectrum-accent-color-900);--spectrum-progressbar-fill-color-positive:var(--spectrum-positive-visual-color);--spectrum-progressbar-fill-color-notice:var(--spectrum-notice-visual-color);--spectrum-progressbar-fill-color-negative:var(--spectrum-negative-visual-color);--spectrum-progressbar-label-and-value-white:var(--spectrum-white);--spectrum-progressbar-track-color-white:var(--spectrum-transparent-white-300);--spectrum-progressbar-fill-color-white:var(--spectrum-white);--spectrum-meter-min-width:var(--spectrum-meter-minimum-width);--spectrum-meter-max-width:var(--spectrum-meter-maximum-width);--spectrum-meter-inline-size:var(--spectrum-meter-default-width);--spectrum-meter-thickness-s:var(--spectrum-meter-thickness-small);--spectrum-meter-thickness-l:var(--spectrum-meter-thickness-large);--spectrum-meter-top-to-text:var(--spectrum-component-top-to-text)}:host([size=s]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-small);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-75)}:host{--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2400);--spectrum-progressbar-font-size:var(--spectrum-font-size-75);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-75)}:host([size=l]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2500);--spectrum-progressbar-font-size:var(--spectrum-font-size-100);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-200)}:host([size=xl]){--spectrum-progressbar-size-default:var(--spectrum-progressbar-size-2800);--spectrum-progressbar-font-size:var(--spectrum-font-size-200);--spectrum-progressbar-thickness:var(--spectrum-progress-bar-thickness-extra-large);--spectrum-progressbar-spacing-top-to-text:var(--spectrum-component-top-to-text-300)}.spectrum-Meter{--spectrum-progressbar-size-default:var(--mod-meter-inline-size,var(--spectrum-meter-inline-size));--spectrum-progressbar-max-size:var(--mod-meter-max-width,var(--spectrum-meter-max-width));--spectrum-progressbar-min-size:var(--mod-meter-min-width,var(--spectrum-meter-min-width))}:host([positive]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-positive,var(--spectrum-progressbar-fill-color-positive)))}:host([notice]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-notice,var(--spectrum-progressbar-fill-color-notice)))}:host([negative]) .spectrum-Meter .fill{background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color-negative,var(--spectrum-progressbar-fill-color-negative)))}:host{font-size:var(--mod-progressbar-font-size,var(--spectrum-progressbar-font-size));vertical-align:top;inline-size:var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default));max-inline-size:var(--mod-progressbar-max-size,var(--spectrum-progressbar-max-size));min-inline-size:var(--mod-progressbar-min-size,var(--spectrum-progressbar-min-size));flex-flow:wrap;justify-content:space-between;align-items:center;display:inline-flex;position:relative}.label,.percentage{text-align:start;line-height:var(--mod-progressbar-line-height,var(--spectrum-progressbar-line-height));margin-block-start:var(--mod-progressbar-spacing-top-to-text,var(--spectrum-progressbar-spacing-top-to-text));margin-block-end:var(--mod-progressbar-spacing-label-to-progressbar,var(--spectrum-progressbar-spacing-label-to-progressbar))}.label:lang(ja),.label:lang(zh),.label:lang(ko),.percentage:lang(ja),.percentage:lang(zh),.percentage:lang(ko){line-height:var(--mod-progressbar-line-height-cjk,var(--spectrum-progressbar-line-height-cjk))}.label,.percentage{color:var(--mod-progressbar-text-color,var(--spectrum-progressbar-text-color))}.label{flex:1}.percentage{align-self:flex-start;margin-inline-start:var(--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}.track{block-size:var(--mod-progressbar-thickness,var(--spectrum-progressbar-thickness));border-radius:var(--spectrum-progressbar-corner-radius);background-color:var(--highcontrast-progressbar-track-color,var(--mod-progressbar-track-color,var(--spectrum-progressbar-track-color)));inline-size:100%;overflow:hidden}.fill{block-size:var(--mod-progressbar-thickness,var(--spectrum-progressbar-thickness));background-color:var(--highcontrast-progressbar-fill-color,var(--mod-progressbar-fill-color,var(--spectrum-progressbar-fill-color)));border:none;transition:width 1s}:host([indeterminate]) .fill{inline-size:var(--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate));animation-timing-function:var(--mod-progressbar-animation-ease-in-out-indeterminate,var(--spectrum-progressbar-animation-ease-in-out-indeterminate));will-change:transform;position:relative}:host([side-label]){flex-flow:row;justify-content:space-between;display:inline-flex}:host([side-label]) .track{flex:1 1 var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default))}:host([side-label]) .label{flex-grow:0;margin-block-end:0;margin-inline-end:var(--mod-progressbar-spacing-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}:host([side-label]) .percentage{text-align:end;order:3;margin-block-end:0;margin-inline-start:var(--mod-spacing-progressbar-label-to-text,var(--spectrum-progressbar-spacing-label-to-text))}:host([static=white]) .fill{color:var(--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white));background-color:var(--mod-progressbar-fill-color-white,var(--spectrum-progressbar-fill-color-white))}:host([static=white]) .label,:host([static=white]) .percentage{color:var(--mod-progressbar-label-and-value-white,var(--spectrum-progressbar-label-and-value-white))}:host([static=white]) .track{background-color:var(--spectrum-progressbar-track-color-white)}:host([dir=ltr][indeterminate]) .fill{animation:indeterminate-loop-ltr var(--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate))infinite}:host([dir=rtl][indeterminate]) .fill{animation:indeterminate-loop-rtl var(--mod-progressbar-animation-duration-indeterminate,var(--spectrum-progressbar-animation-duration-indeterminate))infinite}@keyframes indeterminate-loop-ltr{0%{transform:translate(calc(var(--mod-progressbar-fill-size-indeterminate,var(--spectrum-progressbar-fill-size-indeterminate))*-1))}to{transform:translate(var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default)))}}@keyframes indeterminate-loop-rtl{0%{transform:translate(var(--mod-progressbar-size-default,var(--spectrum-progressbar-fill-size-indeterminate)))}to{transform:translate(calc(var(--mod-progressbar-size-default,var(--spectrum-progressbar-size-default))*-1))}}@media (forced-colors:active){.track{forced-color-adjust:none;--highcontrast-progressbar-fill-color:ButtonText;--highcontrast-progressbar-track-color:ButtonFace;border:1px solid buttontext}}\n`;\nexport default styles;"],
|
5
|
+
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
6
6
|
"names": ["css", "styles"]
|
7
7
|
}
|
@@ -33,54 +33,74 @@ export const sideIndeterminate = () => {
|
|
33
33
|
></sp-progress-bar>
|
34
34
|
`;
|
35
35
|
};
|
36
|
-
const makeOverBackground = (story) =>
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
36
|
+
const makeOverBackground = (variant) => (story) => {
|
37
|
+
const color = variant === "black" ? "rgb(181, 209, 211)" : "var(--spectrum-seafoam-900)";
|
38
|
+
return html`
|
39
|
+
<div
|
40
|
+
style="
|
41
|
+
--mod-actionbutton-static-content-color: ${color};
|
42
|
+
--mod-button-static-content-color: ${color};
|
43
|
+
background-color: ${color};
|
44
|
+
color: ${color};
|
45
|
+
padding: calc(var(--swc-scale-factor) * 14px) calc(var(--swc-scale-factor) * 20px);
|
46
|
+
display: inline-block;
|
47
|
+
"
|
48
|
+
>
|
49
|
+
${story()}
|
50
|
+
</div>
|
51
|
+
`;
|
52
|
+
};
|
43
53
|
export const staticWhite = () => {
|
44
|
-
return makeOverBackground(
|
45
|
-
|
46
|
-
|
54
|
+
return makeOverBackground("white")(
|
55
|
+
() => html`
|
56
|
+
<sp-progress-bar progress="50" static="white"></sp-progress-bar>
|
57
|
+
`
|
58
|
+
);
|
47
59
|
};
|
48
60
|
export const staticWhiteLabel = () => {
|
49
|
-
return makeOverBackground(
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
61
|
+
return makeOverBackground("white")(
|
62
|
+
() => html`
|
63
|
+
<sp-progress-bar
|
64
|
+
label="Loading"
|
65
|
+
progress="50"
|
66
|
+
static="white"
|
67
|
+
></sp-progress-bar>
|
68
|
+
`
|
69
|
+
);
|
56
70
|
};
|
57
71
|
export const staticWhiteIndeterminate = () => {
|
58
|
-
return makeOverBackground(
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
72
|
+
return makeOverBackground("white")(
|
73
|
+
() => html`
|
74
|
+
<sp-progress-bar
|
75
|
+
label="Loading"
|
76
|
+
indeterminate
|
77
|
+
static="white"
|
78
|
+
></sp-progress-bar>
|
79
|
+
`
|
80
|
+
);
|
65
81
|
};
|
66
82
|
export const staticWhiteSideLabel = () => {
|
67
|
-
return makeOverBackground(
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
83
|
+
return makeOverBackground("white")(
|
84
|
+
() => html`
|
85
|
+
<sp-progress-bar
|
86
|
+
label="Loading"
|
87
|
+
progress="50"
|
88
|
+
static="white"
|
89
|
+
side-label
|
90
|
+
></sp-progress-bar>
|
91
|
+
`
|
92
|
+
);
|
75
93
|
};
|
76
94
|
export const staticWhiteSideLabelIndeterminate = () => {
|
77
|
-
return makeOverBackground(
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
95
|
+
return makeOverBackground("white")(
|
96
|
+
() => html`
|
97
|
+
<sp-progress-bar
|
98
|
+
label="Loading"
|
99
|
+
indeterminate
|
100
|
+
static="white"
|
101
|
+
side-label
|
102
|
+
></sp-progress-bar>
|
103
|
+
`
|
104
|
+
);
|
85
105
|
};
|
86
106
|
//# sourceMappingURL=progress-bar.stories.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["progress-bar.stories.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/progress-bar/sp-progress-bar.js';\n\nexport default {\n title: 'Progress Bar',\n component: 'sp-progress-bar',\n};\n\nexport const label = (): TemplateResult => {\n return html`\n <sp-progress-bar label=\"Loading\" progress=\"50\"></sp-progress-bar>\n `;\n};\n\nexport const indeterminate = (): TemplateResult => {\n return html`\n <sp-progress-bar label=\"Loading\" indeterminate></sp-progress-bar>\n `;\n};\n\nexport const sideLabel = (): TemplateResult => {\n return html`\n <sp-progress-bar\n side-label\n label=\"Loading\"\n progress=\"50\"\n ></sp-progress-bar>\n `;\n};\n\nexport const sideIndeterminate = (): TemplateResult => {\n return html`\n <sp-progress-bar\n side-label\n label=\"Loading\"\n indeterminate\n ></sp-progress-bar>\n `;\n};\n\nconst makeOverBackground
|
5
|
-
"mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AAEP,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,gBAAgB,MAAsB;AAC/C,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,YAAY,MAAsB;AAC3C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;AAEO,aAAM,oBAAoB,MAAsB;AACnD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;AAEA,MAAM,
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/progress-bar/sp-progress-bar.js';\n\nexport default {\n title: 'Progress Bar',\n component: 'sp-progress-bar',\n};\n\nexport const label = (): TemplateResult => {\n return html`\n <sp-progress-bar label=\"Loading\" progress=\"50\"></sp-progress-bar>\n `;\n};\n\nexport const indeterminate = (): TemplateResult => {\n return html`\n <sp-progress-bar label=\"Loading\" indeterminate></sp-progress-bar>\n `;\n};\n\nexport const sideLabel = (): TemplateResult => {\n return html`\n <sp-progress-bar\n side-label\n label=\"Loading\"\n progress=\"50\"\n ></sp-progress-bar>\n `;\n};\n\nexport const sideIndeterminate = (): TemplateResult => {\n return html`\n <sp-progress-bar\n side-label\n label=\"Loading\"\n indeterminate\n ></sp-progress-bar>\n `;\n};\n\nconst makeOverBackground =\n (variant?: 'white' | 'black') =>\n (story: () => TemplateResult): TemplateResult => {\n const color =\n variant === 'black'\n ? 'rgb(181, 209, 211)'\n : 'var(--spectrum-seafoam-900)';\n return html`\n <div\n style=\"\n --mod-actionbutton-static-content-color: ${color};\n --mod-button-static-content-color: ${color};\n background-color: ${color};\n color: ${color};\n padding: calc(var(--swc-scale-factor) * 14px) calc(var(--swc-scale-factor) * 20px);\n display: inline-block;\n \"\n >\n ${story()}\n </div>\n `;\n };\n\nexport const staticWhite = (): TemplateResult => {\n return makeOverBackground('white')(\n () => html`\n <sp-progress-bar progress=\"50\" static=\"white\"></sp-progress-bar>\n `\n );\n};\n\nexport const staticWhiteLabel = (): TemplateResult => {\n return makeOverBackground('white')(\n () => html`\n <sp-progress-bar\n label=\"Loading\"\n progress=\"50\"\n static=\"white\"\n ></sp-progress-bar>\n `\n );\n};\n\nexport const staticWhiteIndeterminate = (): TemplateResult => {\n return makeOverBackground('white')(\n () => html`\n <sp-progress-bar\n label=\"Loading\"\n indeterminate\n static=\"white\"\n ></sp-progress-bar>\n `\n );\n};\n\nexport const staticWhiteSideLabel = (): TemplateResult => {\n return makeOverBackground('white')(\n () => html`\n <sp-progress-bar\n label=\"Loading\"\n progress=\"50\"\n static=\"white\"\n side-label\n ></sp-progress-bar>\n `\n );\n};\n\nexport const staticWhiteSideLabelIndeterminate = (): TemplateResult => {\n return makeOverBackground('white')(\n () => html`\n <sp-progress-bar\n label=\"Loading\"\n indeterminate\n static=\"white\"\n side-label\n ></sp-progress-bar>\n `\n );\n};\n"],
|
5
|
+
"mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AAEP,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,gBAAgB,MAAsB;AAC/C,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,YAAY,MAAsB;AAC3C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;AAEO,aAAM,oBAAoB,MAAsB;AACnD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;AAEA,MAAM,qBACF,CAAC,YACD,CAAC,UAAgD;AAC7C,QAAM,QACF,YAAY,UACN,uBACA;AACV,SAAO;AAAA;AAAA;AAAA,+DAGgD,KAAK;AAAA,yDACX,KAAK;AAAA,wCACtB,KAAK;AAAA,6BAChB,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKhB,MAAM,CAAC;AAAA;AAAA;AAGrB;AAEG,aAAM,cAAc,MAAsB;AAC7C,SAAO,mBAAmB,OAAO;AAAA,IAC7B,MAAM;AAAA;AAAA;AAAA,EAGV;AACJ;AAEO,aAAM,mBAAmB,MAAsB;AAClD,SAAO,mBAAmB,OAAO;AAAA,IAC7B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOV;AACJ;AAEO,aAAM,2BAA2B,MAAsB;AAC1D,SAAO,mBAAmB,OAAO;AAAA,IAC7B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOV;AACJ;AAEO,aAAM,uBAAuB,MAAsB;AACtD,SAAO,mBAAmB,OAAO;AAAA,IAC7B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQV;AACJ;AAEO,aAAM,oCAAoC,MAAsB;AACnE,SAAO,mBAAmB,OAAO;AAAA,IAC7B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQV;AACJ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -134,5 +134,29 @@ describe("ProgressBar", () => {
|
|
134
134
|
);
|
135
135
|
expect((_a = percentage.textContent) == null ? void 0 : _a.search("\u066A")).to.not.equal(-1);
|
136
136
|
});
|
137
|
+
it("accepts `aria-label`", async () => {
|
138
|
+
const el = await fixture(html`
|
139
|
+
<sp-progress-bar aria-label="Loading"></sp-progress-bar>
|
140
|
+
`);
|
141
|
+
await elementUpdated(el);
|
142
|
+
expect(el.hasAttribute("aria-label")).to.be.true;
|
143
|
+
expect(el.getAttribute("aria-label")).to.equal("Loading");
|
144
|
+
});
|
145
|
+
it("sets `aria-label` to equal `label` if `label` is set", async () => {
|
146
|
+
const el = await fixture(html`
|
147
|
+
<sp-progress-bar label="Loading"></sp-progress-bar>
|
148
|
+
`);
|
149
|
+
await elementUpdated(el);
|
150
|
+
expect(el.hasAttribute("aria-label")).to.be.true;
|
151
|
+
expect(el.getAttribute("aria-label")).to.equal("Loading");
|
152
|
+
});
|
153
|
+
it("does not remove `aria-label` if set independently of `label`", async () => {
|
154
|
+
const el = await fixture(html`
|
155
|
+
<sp-progress-bar label="" aria-label="Loading"></sp-progress-bar>
|
156
|
+
`);
|
157
|
+
await elementUpdated(el);
|
158
|
+
expect(el.hasAttribute("aria-label")).to.be.true;
|
159
|
+
expect(el.getAttribute("aria-label")).to.equal("Loading");
|
160
|
+
});
|
137
161
|
});
|
138
162
|
//# sourceMappingURL=progress-bar.test.js.map
|