@m3e/progress-indicator 1.0.0-rc.2 → 1.0.0-rc.4
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 +1 -1
- package/dist/custom-elements.json +24 -29
- package/dist/src/CircularProgressIndicatorElement.d.ts +74 -0
- package/dist/src/CircularProgressIndicatorElement.d.ts.map +1 -0
- package/dist/src/LinearProgressIndicatorElement.d.ts +70 -0
- package/dist/src/LinearProgressIndicatorElement.d.ts.map +1 -0
- package/dist/src/LinearProgressMode.d.ts +3 -0
- package/dist/src/LinearProgressMode.d.ts.map +1 -0
- package/dist/src/ProgressElementIndicatorBase.d.ts +23 -0
- package/dist/src/ProgressElementIndicatorBase.d.ts.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Alternately, you can explicitly reference the `html-custom-data.json` and `css-c
|
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
## 🚀
|
|
30
|
+
## 🚀 Native Module Support
|
|
31
31
|
|
|
32
32
|
This package uses [JavaScript Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#module_specifiers). To use it directly in a browser without a bundler, use a module script similar to the following.
|
|
33
33
|
|
|
@@ -1415,25 +1415,6 @@
|
|
|
1415
1415
|
"kind": "mixin",
|
|
1416
1416
|
"description": "Mixin that adds support for custom event attributes.",
|
|
1417
1417
|
"name": "EventAttribute",
|
|
1418
|
-
"members": [
|
|
1419
|
-
{
|
|
1420
|
-
"kind": "method",
|
|
1421
|
-
"name": "dispatchEvent",
|
|
1422
|
-
"return": {
|
|
1423
|
-
"type": {
|
|
1424
|
-
"text": "boolean"
|
|
1425
|
-
}
|
|
1426
|
-
},
|
|
1427
|
-
"parameters": [
|
|
1428
|
-
{
|
|
1429
|
-
"name": "event",
|
|
1430
|
-
"type": {
|
|
1431
|
-
"text": "Event"
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
]
|
|
1435
|
-
}
|
|
1436
|
-
],
|
|
1437
1418
|
"parameters": [
|
|
1438
1419
|
{
|
|
1439
1420
|
"name": "base",
|
|
@@ -1731,6 +1712,17 @@
|
|
|
1731
1712
|
"description": "Mixin to augment an element with behavior used to submit a form.",
|
|
1732
1713
|
"name": "FormSubmitter",
|
|
1733
1714
|
"members": [
|
|
1715
|
+
{
|
|
1716
|
+
"kind": "field",
|
|
1717
|
+
"name": "formAssociated",
|
|
1718
|
+
"type": {
|
|
1719
|
+
"text": "boolean"
|
|
1720
|
+
},
|
|
1721
|
+
"static": true,
|
|
1722
|
+
"readonly": true,
|
|
1723
|
+
"default": "true",
|
|
1724
|
+
"description": "Indicates that this custom element participates in form submission, validation, and form state restoration."
|
|
1725
|
+
},
|
|
1734
1726
|
{
|
|
1735
1727
|
"kind": "field",
|
|
1736
1728
|
"name": "name",
|
|
@@ -2267,6 +2259,11 @@
|
|
|
2267
2259
|
"kind": "javascript-module",
|
|
2268
2260
|
"path": "../core/src/shared/mixins/Labelled.ts",
|
|
2269
2261
|
"declarations": [
|
|
2262
|
+
{
|
|
2263
|
+
"kind": "variable",
|
|
2264
|
+
"name": "updateLabels",
|
|
2265
|
+
"description": "A symbol through which to update labels to reflect a control's current state."
|
|
2266
|
+
},
|
|
2270
2267
|
{
|
|
2271
2268
|
"kind": "function",
|
|
2272
2269
|
"name": "isLabelledMixin",
|
|
@@ -2316,16 +2313,6 @@
|
|
|
2316
2313
|
},
|
|
2317
2314
|
"description": "The label elements that the element is associated with.",
|
|
2318
2315
|
"readonly": true
|
|
2319
|
-
},
|
|
2320
|
-
{
|
|
2321
|
-
"kind": "method",
|
|
2322
|
-
"name": "[_updateLabels]",
|
|
2323
|
-
"privacy": "private",
|
|
2324
|
-
"return": {
|
|
2325
|
-
"type": {
|
|
2326
|
-
"text": "void"
|
|
2327
|
-
}
|
|
2328
|
-
}
|
|
2329
2316
|
}
|
|
2330
2317
|
],
|
|
2331
2318
|
"parameters": [
|
|
@@ -2340,6 +2327,14 @@
|
|
|
2340
2327
|
}
|
|
2341
2328
|
],
|
|
2342
2329
|
"exports": [
|
|
2330
|
+
{
|
|
2331
|
+
"kind": "js",
|
|
2332
|
+
"name": "updateLabels",
|
|
2333
|
+
"declaration": {
|
|
2334
|
+
"name": "updateLabels",
|
|
2335
|
+
"module": "../core/src/shared/mixins/Labelled.ts"
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2343
2338
|
{
|
|
2344
2339
|
"kind": "js",
|
|
2345
2340
|
"name": "isLabelledMixin",
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from Angular Material Progress Spinner
|
|
3
|
+
* Source: https://github.com/angular/components/tree/main/src/material/progress-spinner
|
|
4
|
+
*
|
|
5
|
+
* @license MIT
|
|
6
|
+
* Copyright (c) 2025 Google LLC
|
|
7
|
+
* See LICENSE file in the project root for full license text.
|
|
8
|
+
*/
|
|
9
|
+
import { CSSResultGroup } from "lit";
|
|
10
|
+
import { ProgressElementIndicatorBase } from "./ProgressElementIndicatorBase";
|
|
11
|
+
/**
|
|
12
|
+
* A circular indicator of progress and activity.
|
|
13
|
+
*
|
|
14
|
+
* @description
|
|
15
|
+
* The `m3e-circular-progress-indicator` component displays a circular progress spinner for
|
|
16
|
+
* tracking the completion of a task or process. It supports determinate and indeterminate
|
|
17
|
+
* modes, and can be customized with CSS custom properties for diameter, stroke width, and
|
|
18
|
+
* color. The component is accessible, animates smoothly, and adapts to various use cases including
|
|
19
|
+
* loading and activity indication.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* The following example illustrates a determinate circular progress indicator.
|
|
23
|
+
* ```html
|
|
24
|
+
* <m3e-circular-progress-indicator value="30"></m3e-circular-progress-indicator>
|
|
25
|
+
* ```
|
|
26
|
+
* @example
|
|
27
|
+
* The next example illustrates an indeterminate circular progress indicator using the `indeterminate` attribute.
|
|
28
|
+
* ```html
|
|
29
|
+
* <m3e-circular-progress-indicator indeterminate></m3e-circular-progress-indicator>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @tag m3e-circular-progress-indicator
|
|
33
|
+
*
|
|
34
|
+
* @slot - Renders the content inside the progress indicator.
|
|
35
|
+
*
|
|
36
|
+
* @attr diameter - The diameter, in pixels, of the progress spinner.
|
|
37
|
+
* @attr indeterminate - Whether to show something is happening without conveying progress.
|
|
38
|
+
* @attr max - The maximum progress value.
|
|
39
|
+
* @attr stroke-width - The stroke width, in pixels, of the progress spinner.
|
|
40
|
+
* @attr value - A fractional value, between 0 and `max`, indicating progress.
|
|
41
|
+
*
|
|
42
|
+
* @cssprop --m3e-progress-indicator-track-color - Track color of the progress bar (background/buffer).
|
|
43
|
+
* @cssprop --m3e-progress-indicator-color - Color of the progress indicator (foreground).
|
|
44
|
+
*/
|
|
45
|
+
export declare class M3eCircularProgressIndicatorElement extends ProgressElementIndicatorBase {
|
|
46
|
+
#private;
|
|
47
|
+
/** The styles of the element. */
|
|
48
|
+
static styles: CSSResultGroup;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to show something is happening without conveying progress.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
indeterminate: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The diameter, in pixels, of the progress spinner.
|
|
56
|
+
* @default 40
|
|
57
|
+
*/
|
|
58
|
+
get diameter(): number;
|
|
59
|
+
set diameter(value: number);
|
|
60
|
+
/**
|
|
61
|
+
* The stroke width, in pixels, of the progress spinner.
|
|
62
|
+
* @default 10
|
|
63
|
+
*/
|
|
64
|
+
get strokeWidth(): number;
|
|
65
|
+
set strokeWidth(value: number);
|
|
66
|
+
/** @inheritdoc */
|
|
67
|
+
protected render(): unknown;
|
|
68
|
+
}
|
|
69
|
+
declare global {
|
|
70
|
+
interface HTMLElementTagNameMap {
|
|
71
|
+
"m3e-circular-progress-indicator": M3eCircularProgressIndicatorElement;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=CircularProgressIndicatorElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircularProgressIndicatorElement.d.ts","sourceRoot":"","sources":["../../src/CircularProgressIndicatorElement.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAO,cAAc,EAAQ,MAAM,KAAK,CAAC;AAGhD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAM9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBACa,mCAAoC,SAAQ,4BAA4B;;IACnF,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CA2JpC;IAKF;;;OAGG;IACyC,aAAa,UAAS;IAElE;;;OAGG;IACH,IAAgC,QAAQ,IAAI,MAAM,CAEjD;IACD,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAGzB;IAED;;;OAGG;IACH,IAA2D,WAAW,IAAI,MAAM,CAE/E;IACD,IAAI,WAAW,CAAC,KAAK,EAAE,MAAM,EAG5B;IAED,kBAAkB;cACC,MAAM,IAAI,OAAO;CAkBrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iCAAiC,EAAE,mCAAmC,CAAC;KACxE;CACF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from Angular Material Progress Bar
|
|
3
|
+
* Source: https://github.com/angular/components/blob/main/src/material/progress-bar/progress-bar.ts
|
|
4
|
+
*
|
|
5
|
+
* @license MIT
|
|
6
|
+
* Copyright (c) 2025 Google LLC
|
|
7
|
+
* See LICENSE file in the project root for full license text.
|
|
8
|
+
*/
|
|
9
|
+
import { CSSResultGroup } from "lit";
|
|
10
|
+
import { LinearProgressMode } from "./LinearProgressMode";
|
|
11
|
+
import { ProgressElementIndicatorBase } from "./ProgressElementIndicatorBase";
|
|
12
|
+
/**
|
|
13
|
+
* A horizontal bar for indicating progress and activity.
|
|
14
|
+
*
|
|
15
|
+
* @description
|
|
16
|
+
* The `m3e-linear-progress-indicator` component displays a horizontal progress bar for tracking
|
|
17
|
+
* the completion of a task or process. It supports `determinate`, `indeterminate`, `buffer`,
|
|
18
|
+
* and `query` modes, and can be customized with CSS custom properties for thickness, shape, and color.
|
|
19
|
+
* The component is accessible, animates smoothly, and adapts to various use cases including loading,
|
|
20
|
+
* buffering, and activity indication.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* The following example illustrates a determinate linear progress indicator.
|
|
24
|
+
* ```html
|
|
25
|
+
* <m3e-linear-progress-indicator value="30"></m3e-linear-progress-indicator>
|
|
26
|
+
* ```
|
|
27
|
+
* @example
|
|
28
|
+
* The next example illustrates an indeterminate linear progress indicator using the `mode` attribute.
|
|
29
|
+
* ```html
|
|
30
|
+
* <m3e-linear-progress-indicator mode="indeterminate"></m3e-linear-progress-indicator>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @tag m3e-linear-progress-indicator
|
|
34
|
+
*
|
|
35
|
+
* @attr buffer-value - A fractional value, between 0 and `max`, indicating buffer progress.
|
|
36
|
+
* @attr max - The maximum progress value.
|
|
37
|
+
* @attr mode - The mode of the progress bar.
|
|
38
|
+
* @attr value - A fractional value, between 0 and `max`, indicating progress.
|
|
39
|
+
*
|
|
40
|
+
* @cssprop --m3e-linear-progress-indicator-thickness - Thickness (height) of the progress bar.
|
|
41
|
+
* @cssprop --m3e-linear-progress-indicator-shape - Border radius of the progress bar.
|
|
42
|
+
* @cssprop --m3e-progress-indicator-track-color - Track color of the progress bar (background/buffer).
|
|
43
|
+
* @cssprop --m3e-progress-indicator-color - Color of the progress indicator (foreground).
|
|
44
|
+
*/
|
|
45
|
+
export declare class M3eLinearProgressIndicatorElement extends ProgressElementIndicatorBase {
|
|
46
|
+
#private;
|
|
47
|
+
/** The styles of the element. */
|
|
48
|
+
static styles: CSSResultGroup;
|
|
49
|
+
/** @private */ private static __nextPatternId;
|
|
50
|
+
/**
|
|
51
|
+
* The mode of the progress bar.
|
|
52
|
+
* @default "determinate"
|
|
53
|
+
*/
|
|
54
|
+
mode: LinearProgressMode;
|
|
55
|
+
/**
|
|
56
|
+
* A fractional value, between 0 and `max`, indicating buffer progress.
|
|
57
|
+
* @default 0
|
|
58
|
+
*/
|
|
59
|
+
bufferValue: number;
|
|
60
|
+
/** @inheritdoc */
|
|
61
|
+
connectedCallback(): void;
|
|
62
|
+
/** @inheritdoc */
|
|
63
|
+
protected render(): unknown;
|
|
64
|
+
}
|
|
65
|
+
declare global {
|
|
66
|
+
interface HTMLElementTagNameMap {
|
|
67
|
+
"m3e-linear-progress-indicator": M3eLinearProgressIndicatorElement;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=LinearProgressIndicatorElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinearProgressIndicatorElement.d.ts","sourceRoot":"","sources":["../../src/LinearProgressIndicatorElement.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAO,cAAc,EAAQ,MAAM,KAAK,CAAC;AAKhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBACa,iCAAkC,SAAQ,4BAA4B;;IACjF,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAkLpC;IAEF,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAK;IAInD;;;OAGG;IAC0B,IAAI,EAAE,kBAAkB,CAAiB;IAEtE;;;OAGG;IACmE,WAAW,SAAK;IAEtF,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IAWlC,kBAAkB;cACC,MAAM,IAAI,OAAO;CAwBrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,+BAA+B,EAAE,iCAAiC,CAAC;KACpE;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinearProgressMode.d.ts","sourceRoot":"","sources":["../../src/LinearProgressMode.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement, PropertyValues } from "lit";
|
|
2
|
+
declare const ProgressElementIndicatorBase_base: import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").AttachInternalsMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor & typeof LitElement;
|
|
3
|
+
/** A base implementation for an element used to convey progress. This class must be inherited. */
|
|
4
|
+
export declare abstract class ProgressElementIndicatorBase extends ProgressElementIndicatorBase_base {
|
|
5
|
+
/** The styles of the element. */
|
|
6
|
+
static styles: CSSResultGroup;
|
|
7
|
+
/**
|
|
8
|
+
* A fractional value, between 0 and `max`, indicating progress.
|
|
9
|
+
* @default 0
|
|
10
|
+
*/
|
|
11
|
+
value: number;
|
|
12
|
+
/**
|
|
13
|
+
* The maximum progress value.
|
|
14
|
+
* @default 100
|
|
15
|
+
*/
|
|
16
|
+
max: number;
|
|
17
|
+
/** @inheritdoc */
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
/** @inheritdoc */
|
|
20
|
+
protected update(changedProperties: PropertyValues<this>): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=ProgressElementIndicatorBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressElementIndicatorBase.d.ts","sourceRoot":"","sources":["../../src/ProgressElementIndicatorBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;;AAKtE,kGAAkG;AAClG,8BAAsB,4BAA6B,SAAQ,iCAAsD;IAC/G,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAOpC;IAEF;;;OAGG;IACwC,KAAK,SAAK;IAErD;;;OAGG;IACyB,GAAG,SAAO;IAEtC,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IAKlC,kBAAkB;cACC,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;CAUzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m3e/progress-indicator",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "Progress Indicator for M3E",
|
|
5
5
|
"author": "matraic <matraic@yahoo.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"clean": "rimraf dist"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@m3e/core": "1.0.0-rc.
|
|
33
|
+
"@m3e/core": "1.0.0-rc.4",
|
|
34
34
|
"lit": "^3.3.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|