@vonage/vivid 3.0.0-next.14 → 3.0.0-next.15
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.
|
@@ -3,4 +3,5 @@ import type { Connotation } from '../enums';
|
|
|
3
3
|
export declare type ProgressRingConnotation = Connotation.Primary | Connotation.Success | Connotation.Alert | Connotation.CTA;
|
|
4
4
|
export declare class ProgressRing extends BaseProgress {
|
|
5
5
|
connotation?: ProgressRingConnotation;
|
|
6
|
+
density?: -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3;
|
|
6
7
|
}
|
package/package.json
CHANGED
package/progress-ring/index.js
CHANGED
|
@@ -4,19 +4,24 @@ import { B as BaseProgress } from '../shared/base-progress.js';
|
|
|
4
4
|
import { w as when } from '../shared/when.js';
|
|
5
5
|
import { c as classNames } from '../shared/class-names.js';
|
|
6
6
|
|
|
7
|
-
var css_248z = ".base {\n
|
|
7
|
+
var css_248z = ".base {\n align-items: center;\n block-size: var(--_density);\n inline-size: var(--_density);\n outline: none;\n}\n.base.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n}\n.base.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n.base.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n.base:not(.connotation-cta, .connotation-alert, .connotation-success) {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n}\n.base.density-4 {\n --_density: calc(4 * 4px);\n}\n.base.density-5 {\n --_density: calc(5 * 4px);\n}\n.base.density-6 {\n --_density: calc(6 * 4px);\n}\n.base.density-7 {\n --_density: calc(7 * 4px);\n}\n.base.density-8 {\n --_density: calc(8 * 4px);\n}\n.base.density-10 {\n --_density: calc(10 * 4px);\n}\n.base.density-11 {\n --_density: calc(11 * 4px);\n}\n.base.density-12 {\n --_density: calc(12 * 4px);\n}\n.base:not(.density-4, .density-5, .density-6, .density-7, .density-8, .density-10, .density-11, .density-12) {\n --_density: calc(9 * 4px);\n}\n\n.progress {\n width: 100%;\n height: 100%;\n}\n\n.background {\n fill: none;\n stroke: transparent;\n stroke-width: 2px;\n}\n\n.determinate {\n fill: none;\n stroke: var(--connotation);\n stroke-linecap: round;\n stroke-width: 2px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.indeterminate-indicator-1 {\n animation: spin-infinite 2s linear infinite;\n fill: none;\n stroke: var(--connotation);\n stroke-linecap: round;\n stroke-width: 2px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.base.paused .indeterminate-indicator-1 {\n animation-play-state: paused;\n stroke: var(--vvd-color-neutral);\n}\n\n.base.paused .determinate {\n stroke: var(--vvd-color-neutral);\n}\n\n@keyframes spin-infinite {\n 0% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(0deg);\n }\n 50% {\n stroke-dasharray: 21.99px 21.99px;\n transform: rotate(450deg);\n }\n 100% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(1080deg);\n }\n}";
|
|
8
8
|
styleInject(css_248z);
|
|
9
9
|
|
|
10
10
|
class ProgressRing extends BaseProgress {}
|
|
11
11
|
|
|
12
|
-
__decorate([attr
|
|
12
|
+
__decorate([attr, __metadata("design:type", String)], ProgressRing.prototype, "connotation", void 0);
|
|
13
|
+
|
|
14
|
+
__decorate([attr, __metadata("design:type", Number)], ProgressRing.prototype, "density", void 0);
|
|
13
15
|
|
|
14
16
|
let _2 = t => t,
|
|
15
17
|
_t,
|
|
16
18
|
_t2,
|
|
17
19
|
_t3;
|
|
18
20
|
|
|
19
|
-
const getClasses =
|
|
21
|
+
const getClasses = ({
|
|
22
|
+
connotation,
|
|
23
|
+
density
|
|
24
|
+
}) => classNames('base', [`connotation-${connotation}`, !!connotation], [`density-${(density ? Number(density) : 0) + 9}`, !!density]);
|
|
20
25
|
|
|
21
26
|
const progressSegments = 44;
|
|
22
27
|
const ProgressRingTemplate = _ => html(_t || (_t = _2`
|