@carbon/ibm-products-web-components 0.24.1 → 0.25.0
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/custom-elements.json +263 -0
- package/es/components/checklist/checklist-chart.d.ts +25 -0
- package/es/components/checklist/checklist-chart.js +81 -0
- package/es/components/checklist/checklist-chart.js.map +1 -0
- package/es/components/checklist/checklist-group.d.ts +25 -0
- package/es/components/checklist/checklist-group.js +58 -0
- package/es/components/checklist/checklist-group.js.map +1 -0
- package/es/components/checklist/checklist-icon.d.ts +26 -0
- package/es/components/checklist/checklist-icon.js +72 -0
- package/es/components/checklist/checklist-icon.js.map +1 -0
- package/es/components/checklist/checklist-item.d.ts +40 -0
- package/es/components/checklist/checklist-item.js +122 -0
- package/es/components/checklist/checklist-item.js.map +1 -0
- package/es/components/checklist/checklist.d.ts +71 -0
- package/es/components/checklist/checklist.js +187 -0
- package/es/components/checklist/checklist.js.map +1 -0
- package/es/components/checklist/checklist.scss.js +13 -0
- package/es/components/checklist/checklist.scss.js.map +1 -0
- package/es/components/checklist/checklist.test.d.ts +7 -0
- package/es/components/checklist/checklist.test.js +172 -0
- package/es/components/checklist/checklist.test.js.map +1 -0
- package/es/components/checklist/checklist.types.d.ts +22 -0
- package/es/components/checklist/checklist.types.js +32 -0
- package/es/components/checklist/checklist.types.js.map +1 -0
- package/es/components/checklist/index.d.ts +13 -0
- package/es/components/checklist/index.js +13 -0
- package/es/components/checklist/index.js.map +1 -0
- package/es/packages/ibm-products-web-components/package.json.js +1 -1
- package/es-custom/components/checklist/checklist-chart.d.ts +25 -0
- package/es-custom/components/checklist/checklist-chart.js +81 -0
- package/es-custom/components/checklist/checklist-chart.js.map +1 -0
- package/es-custom/components/checklist/checklist-group.d.ts +25 -0
- package/es-custom/components/checklist/checklist-group.js +58 -0
- package/es-custom/components/checklist/checklist-group.js.map +1 -0
- package/es-custom/components/checklist/checklist-icon.d.ts +26 -0
- package/es-custom/components/checklist/checklist-icon.js +72 -0
- package/es-custom/components/checklist/checklist-icon.js.map +1 -0
- package/es-custom/components/checklist/checklist-item.d.ts +40 -0
- package/es-custom/components/checklist/checklist-item.js +122 -0
- package/es-custom/components/checklist/checklist-item.js.map +1 -0
- package/es-custom/components/checklist/checklist.d.ts +71 -0
- package/es-custom/components/checklist/checklist.js +187 -0
- package/es-custom/components/checklist/checklist.js.map +1 -0
- package/es-custom/components/checklist/checklist.scss.js +13 -0
- package/es-custom/components/checklist/checklist.scss.js.map +1 -0
- package/es-custom/components/checklist/checklist.test.d.ts +7 -0
- package/es-custom/components/checklist/checklist.test.js +172 -0
- package/es-custom/components/checklist/checklist.test.js.map +1 -0
- package/es-custom/components/checklist/checklist.types.d.ts +22 -0
- package/es-custom/components/checklist/checklist.types.js +32 -0
- package/es-custom/components/checklist/checklist.types.js.map +1 -0
- package/es-custom/components/checklist/index.d.ts +13 -0
- package/es-custom/components/checklist/index.js +13 -0
- package/es-custom/components/checklist/index.js.map +1 -0
- package/es-custom/packages/ibm-products-web-components/package.json.js +1 -1
- package/lib/components/checklist/checklist-chart.d.ts +25 -0
- package/lib/components/checklist/checklist-group.d.ts +25 -0
- package/lib/components/checklist/checklist-icon.d.ts +26 -0
- package/lib/components/checklist/checklist-item.d.ts +40 -0
- package/lib/components/checklist/checklist.d.ts +71 -0
- package/lib/components/checklist/checklist.test.d.ts +7 -0
- package/lib/components/checklist/checklist.types.d.ts +22 -0
- package/lib/components/checklist/index.d.ts +13 -0
- package/package.json +3 -3
- package/scss/components/checklist/checklist.scss +65 -0
- package/telemetry.yml +26 -5
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checklist.test.js","sources":["../../../src/components/checklist/checklist.test.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAWH,MAAM,UAAU,GAAG,CAAG,EAAA,MAAM,aAAa;AAEzC,QAAQ,CAAC,eAAe,EAAE,MAAK;AAC7B,IAAA,IAAI,EAAg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MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,WAAW,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;AACrD,KAAC,CAAC;AAEF,IAAA,EAAE,CAAC,kDAAkD,EAAE,YAAW;;AAChE,QAAA,MAAM,MAAM,GAAG,CAAA,EAAA,GAAA,EAAE,CAAC,UAAU,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,aAAa,CACzC,CAAA,CAAA,EAAI,UAAU,CAAA,kBAAA,CAAoB,CACb;;AAGvB,QAAA,UAAU,CAAC,MAAM,MAAM,KAAA,IAAA,IAAN,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAE,KAAK,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;AAEvE,QAAA,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK;AACxB,KAAC,CAAC;AAEF,IAAA,EAAE,CAAC,6BAA6B,EAAE,MAAK;AACrC,QAAA,MAAM,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC;AACpE,QAAA,MAAM,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;AACjE,KAAC,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2025
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
export declare enum Kinds {
|
8
|
+
unchecked = "unchecked",
|
9
|
+
indeterminate = "indeterminate",
|
10
|
+
checked = "checked",
|
11
|
+
disabled = "disabled",
|
12
|
+
error = "error"
|
13
|
+
}
|
14
|
+
export type Kind = Kinds.unchecked | Kinds.indeterminate | Kinds.checked | Kinds.disabled | Kinds.error;
|
15
|
+
export declare enum Statuses {
|
16
|
+
NotStarted = "not started",
|
17
|
+
InProgress = "in progress",
|
18
|
+
Completed = "completed",
|
19
|
+
Error = "error",
|
20
|
+
Disabled = "disabled"
|
21
|
+
}
|
22
|
+
export type Status = Statuses.NotStarted | Statuses.InProgress | Statuses.Completed | Statuses.Error | Statuses.Disabled;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Copyright IBM Corp. 2025
|
10
|
+
*
|
11
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
13
|
+
*/
|
14
|
+
var Kinds;
|
15
|
+
(function (Kinds) {
|
16
|
+
Kinds["unchecked"] = "unchecked";
|
17
|
+
Kinds["indeterminate"] = "indeterminate";
|
18
|
+
Kinds["checked"] = "checked";
|
19
|
+
Kinds["disabled"] = "disabled";
|
20
|
+
Kinds["error"] = "error";
|
21
|
+
})(Kinds || (Kinds = {}));
|
22
|
+
var Statuses;
|
23
|
+
(function (Statuses) {
|
24
|
+
Statuses["NotStarted"] = "not started";
|
25
|
+
Statuses["InProgress"] = "in progress";
|
26
|
+
Statuses["Completed"] = "completed";
|
27
|
+
Statuses["Error"] = "error";
|
28
|
+
Statuses["Disabled"] = "disabled";
|
29
|
+
})(Statuses || (Statuses = {}));
|
30
|
+
|
31
|
+
export { Kinds, Statuses };
|
32
|
+
//# sourceMappingURL=checklist.types.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checklist.types.js","sources":["../../../src/components/checklist/checklist.types.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;AAKG;IAES;AAAZ,CAAA,UAAY,KAAK,EAAA;AACf,IAAA,KAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,KAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/B,IAAA,KAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,KAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,KAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EANW,KAAK,KAAL,KAAK,GAMhB,EAAA,CAAA,CAAA;IASW;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,YAAA,CAAA,GAAA,aAA0B;AAC1B,IAAA,QAAA,CAAA,YAAA,CAAA,GAAA,aAA0B;AAC1B,IAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EANW,QAAQ,KAAR,QAAQ,GAMnB,EAAA,CAAA,CAAA;;;;"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
*
|
4
|
+
* Copyright IBM Corp. 2025
|
5
|
+
*
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
8
|
+
*/
|
9
|
+
import './checklist-group';
|
10
|
+
import './checklist-item';
|
11
|
+
import './checklist-chart';
|
12
|
+
import './checklist-icon';
|
13
|
+
import './checklist';
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import './checklist-group.js';
|
9
|
+
import './checklist-item.js';
|
10
|
+
import './checklist-chart.js';
|
11
|
+
import './checklist-icon.js';
|
12
|
+
import './checklist.js';
|
13
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
*
|
4
|
+
* Copyright IBM Corp. 2025
|
5
|
+
*
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
8
|
+
*/
|
9
|
+
import { LitElement } from 'lit';
|
10
|
+
/**
|
11
|
+
* @element c4p-checklist-chart
|
12
|
+
*/
|
13
|
+
declare class CDSChecklistChart extends LitElement {
|
14
|
+
/**
|
15
|
+
* A number between 0 and 1 which indicates the progress of checklist
|
16
|
+
*/
|
17
|
+
value: number;
|
18
|
+
connectedCallback(): void;
|
19
|
+
private _updateChart;
|
20
|
+
static get observedAttributes(): string[];
|
21
|
+
attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
|
22
|
+
render(): symbol;
|
23
|
+
static styles: any;
|
24
|
+
}
|
25
|
+
export default CDSChecklistChart;
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { __decorate } from 'tslib';
|
9
|
+
import { LitElement, nothing } from 'lit';
|
10
|
+
import { property } from 'lit/decorators.js';
|
11
|
+
import { carbonElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
12
|
+
import { prefix } from '../../globals/settings.js';
|
13
|
+
import styles from './checklist.scss.js';
|
14
|
+
|
15
|
+
/**
|
16
|
+
* @license
|
17
|
+
*
|
18
|
+
* Copyright IBM Corp. 2025
|
19
|
+
*
|
20
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
22
|
+
*/
|
23
|
+
const blockClass = `${prefix}--checklist__chart`;
|
24
|
+
/**
|
25
|
+
* Clamps a value between a minimum and maximum.
|
26
|
+
* If the value, min, or max is NaN, the function returns void.
|
27
|
+
*
|
28
|
+
*/
|
29
|
+
const clamp = (value, min, max) => {
|
30
|
+
if (isNaN(value) || isNaN(min) || isNaN(max)) {
|
31
|
+
return;
|
32
|
+
}
|
33
|
+
{
|
34
|
+
value = value <= max ? value : max;
|
35
|
+
}
|
36
|
+
{
|
37
|
+
value = value >= min ? value : min;
|
38
|
+
}
|
39
|
+
return value;
|
40
|
+
};
|
41
|
+
/**
|
42
|
+
* @element c4p-checklist-chart
|
43
|
+
*/
|
44
|
+
let CDSChecklistChart = class CDSChecklistChart extends LitElement {
|
45
|
+
constructor() {
|
46
|
+
super(...arguments);
|
47
|
+
/**
|
48
|
+
* A number between 0 and 1 which indicates the progress of checklist
|
49
|
+
*/
|
50
|
+
this.value = 0;
|
51
|
+
}
|
52
|
+
connectedCallback() {
|
53
|
+
super.connectedCallback();
|
54
|
+
this.classList.add(`${blockClass}`);
|
55
|
+
}
|
56
|
+
_updateChart(value) {
|
57
|
+
this.style.setProperty(`--${prefix}-num-degrees`, `${clamp(value * 360, 0, 360)}deg`);
|
58
|
+
}
|
59
|
+
static get observedAttributes() {
|
60
|
+
return ['value'];
|
61
|
+
}
|
62
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
63
|
+
if (name === 'value' && oldValue !== newValue) {
|
64
|
+
this._updateChart(newValue);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
render() {
|
68
|
+
return nothing;
|
69
|
+
}
|
70
|
+
};
|
71
|
+
CDSChecklistChart.styles = styles;
|
72
|
+
__decorate([
|
73
|
+
property({ type: Number })
|
74
|
+
], CDSChecklistChart.prototype, "value", void 0);
|
75
|
+
CDSChecklistChart = __decorate([
|
76
|
+
carbonElement(`${prefix}-checklist-chart`)
|
77
|
+
], CDSChecklistChart);
|
78
|
+
var CDSChecklistChart$1 = CDSChecklistChart;
|
79
|
+
|
80
|
+
export { CDSChecklistChart$1 as default };
|
81
|
+
//# sourceMappingURL=checklist-chart.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checklist-chart.js","sources":["../../../src/components/checklist/checklist-chart.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH,MAAM,UAAU,GAAG,CAAG,EAAA,MAAM,oBAAoB;AAEhD;;;;AAIG;AACH,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,KAAmB;AACvE,IAAA,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,EAAE;QAC5C;;AAEF,IAAuB;AACrB,QAAA,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,GAAG;;AAEpC,IAAuB;AACrB,QAAA,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,GAAG,GAAG;;AAEpC,IAAA,OAAO,KAAK;AACd,CAAC;AAED;;AAEG;AAEH,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU,CAAA;AAA1C,IAAA,WAAA,GAAA;;AACE;;AAEG;QAEH,IAAK,CAAA,KAAA,GAAG,CAAC;;IAET,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAG,EAAA,UAAU,CAAE,CAAA,CAAC;;AAG7B,IAAA,YAAY,CAAC,KAAK,EAAA;QACxB,IAAI,CAAC,KAAK,CAAC,WAAW,CACpB,CAAK,EAAA,EAAA,MAAM,CAAc,YAAA,CAAA,EACzB,CAAG,EAAA,KAAK,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAAK,GAAA,CAAA,CACnC;;AAGH,IAAA,WAAW,kBAAkB,GAAA;QAC3B,OAAO,CAAC,OAAO,CAAC;;AAGlB,IAAA,wBAAwB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAA;QAC/C,IAAI,IAAI,KAAK,OAAO,IAAI,QAAQ,KAAK,QAAQ,EAAE;AAC7C,YAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC;;;IAI/B,MAAM,GAAA;AACJ,QAAA,OAAO,OAAO;;;AAGT,iBAAM,CAAA,MAAA,GAAG,MAAH;AA5Bb,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AAChB,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AALN,iBAAiB,GAAA,UAAA,CAAA;AADtB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,gBAAA,CAAkB;AACpC,CAAA,EAAA,iBAAiB,CAkCtB;AAED,0BAAe,iBAAiB;;;;"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
*
|
4
|
+
* Copyright IBM Corp. 2025
|
5
|
+
*
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
8
|
+
*/
|
9
|
+
import { LitElement } from 'lit';
|
10
|
+
/**
|
11
|
+
* Sections in c4p-checklist
|
12
|
+
* @element c4p-checklist-group
|
13
|
+
* @slot default - Contains one or more `c4p-checklist-item` components
|
14
|
+
*/
|
15
|
+
declare class CDSChecklistGroup extends LitElement {
|
16
|
+
/**
|
17
|
+
* Title text of the c4p-checklist-group
|
18
|
+
*/
|
19
|
+
title: any;
|
20
|
+
private _updateAttributes;
|
21
|
+
firstUpdated(): void;
|
22
|
+
render(): import("lit-html").TemplateResult<1>;
|
23
|
+
static styles: any;
|
24
|
+
}
|
25
|
+
export default CDSChecklistGroup;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { __decorate } from 'tslib';
|
9
|
+
import { LitElement, html } from 'lit';
|
10
|
+
import { property } from 'lit/decorators.js';
|
11
|
+
import { carbonElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
12
|
+
import { prefix } from '../../globals/settings.js';
|
13
|
+
import styles from './checklist.scss.js';
|
14
|
+
|
15
|
+
/**
|
16
|
+
* @license
|
17
|
+
*
|
18
|
+
* Copyright IBM Corp. 2025
|
19
|
+
*
|
20
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
22
|
+
*/
|
23
|
+
/**
|
24
|
+
* Sections in c4p-checklist
|
25
|
+
* @element c4p-checklist-group
|
26
|
+
* @slot default - Contains one or more `c4p-checklist-item` components
|
27
|
+
*/
|
28
|
+
let CDSChecklistGroup = class CDSChecklistGroup extends LitElement {
|
29
|
+
_updateAttributes() {
|
30
|
+
this.classList.add(`${prefix}--checklist__list-group`);
|
31
|
+
}
|
32
|
+
firstUpdated() {
|
33
|
+
this._updateAttributes();
|
34
|
+
}
|
35
|
+
render() {
|
36
|
+
const { title } = this;
|
37
|
+
return html `
|
38
|
+
${title &&
|
39
|
+
html `<h3 title=${title} class="${prefix}--checklist__list-title">
|
40
|
+
${title}
|
41
|
+
</h3>`}
|
42
|
+
<ol class="${prefix}--checklist__list">
|
43
|
+
<slot></slot>
|
44
|
+
</ol>
|
45
|
+
`;
|
46
|
+
}
|
47
|
+
};
|
48
|
+
CDSChecklistGroup.styles = styles;
|
49
|
+
__decorate([
|
50
|
+
property()
|
51
|
+
], CDSChecklistGroup.prototype, "title", void 0);
|
52
|
+
CDSChecklistGroup = __decorate([
|
53
|
+
carbonElement(`${prefix}-checklist-group`)
|
54
|
+
], CDSChecklistGroup);
|
55
|
+
var CDSChecklistGroup$1 = CDSChecklistGroup;
|
56
|
+
|
57
|
+
export { CDSChecklistGroup$1 as default };
|
58
|
+
//# sourceMappingURL=checklist-group.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checklist-group.js","sources":["../../../src/components/checklist/checklist-group.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH;;;;AAIG;AAEH,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU,CAAA;IAOhC,iBAAiB,GAAA;QACvB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAG,EAAA,MAAM,CAAyB,uBAAA,CAAA,CAAC;;IAGxD,YAAY,GAAA;QACV,IAAI,CAAC,iBAAiB,EAAE;;IAG1B,MAAM,GAAA;AACJ,QAAA,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI;AAEtB,QAAA,OAAO,IAAI,CAAA;QACP,KAAK;AACP,YAAA,IAAI,CAAA,CAAA,UAAA,EAAa,KAAK,CAAA,QAAA,EAAW,MAAM,CAAA;UACnC,KAAK;AACH,WAAA,CAAA;mBACO,MAAM,CAAA;;;KAGpB;;;AAGI,iBAAM,CAAA,MAAA,GAAG,MAAH;AAxBb,UAAA,CAAA;AADC,IAAA,QAAQ;AACH,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AALF,iBAAiB,GAAA,UAAA,CAAA;AADtB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,gBAAA,CAAkB;AACpC,CAAA,EAAA,iBAAiB,CA8BtB;AAED,0BAAe,iBAAiB;;;;"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
*
|
4
|
+
* Copyright IBM Corp. 2025
|
5
|
+
*
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
8
|
+
*/
|
9
|
+
import { LitElement } from 'lit';
|
10
|
+
import '@carbon/web-components/es-custom/components/icon/index.js';
|
11
|
+
import { Kinds } from './checklist.types';
|
12
|
+
/**
|
13
|
+
* @element c4p-checklist-icon
|
14
|
+
* Represents checklist item status with different icons (unchecked, checked, indeterminate, error).
|
15
|
+
*/
|
16
|
+
declare class CDSChecklistIcon extends LitElement {
|
17
|
+
/**
|
18
|
+
* The icon to be displayed.
|
19
|
+
* Values can be 'unchecked', 'indeterminate', 'checked', 'error', 'disabled'
|
20
|
+
|
21
|
+
*/
|
22
|
+
kind: Kinds;
|
23
|
+
render(): import("lit-html").TemplateResult<1>;
|
24
|
+
static styles: any;
|
25
|
+
}
|
26
|
+
export default CDSChecklistIcon;
|
@@ -0,0 +1,72 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { __decorate } from 'tslib';
|
9
|
+
import { LitElement, html } from 'lit';
|
10
|
+
import { property } from 'lit/decorators.js';
|
11
|
+
import { carbonElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
12
|
+
import CheckmarkOutline16 from '@carbon/icons/es/checkmark--outline/16';
|
13
|
+
import CircleDash16 from '@carbon/icons/es/circle-dash/16';
|
14
|
+
import Incomplete16 from '@carbon/icons/es/incomplete/16';
|
15
|
+
import Warning16 from '@carbon/icons/es/warning/16';
|
16
|
+
import '@carbon/web-components/es-custom/components/icon/index.js';
|
17
|
+
import { Kinds } from './checklist.types.js';
|
18
|
+
import { prefix } from '../../globals/settings.js';
|
19
|
+
import { classMap } from 'lit/directives/class-map.js';
|
20
|
+
import styles from './checklist.scss.js';
|
21
|
+
|
22
|
+
/**
|
23
|
+
* @license
|
24
|
+
*
|
25
|
+
* Copyright IBM Corp. 2025
|
26
|
+
*
|
27
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
28
|
+
* LICENSE file in the root directory of this source tree.
|
29
|
+
*/
|
30
|
+
const blockClass = `${prefix}--checklist__icon`;
|
31
|
+
/**
|
32
|
+
* @element c4p-checklist-icon
|
33
|
+
* Represents checklist item status with different icons (unchecked, checked, indeterminate, error).
|
34
|
+
*/
|
35
|
+
let CDSChecklistIcon = class CDSChecklistIcon extends LitElement {
|
36
|
+
constructor() {
|
37
|
+
super(...arguments);
|
38
|
+
/**
|
39
|
+
* The icon to be displayed.
|
40
|
+
* Values can be 'unchecked', 'indeterminate', 'checked', 'error', 'disabled'
|
41
|
+
|
42
|
+
*/
|
43
|
+
this.kind = Kinds.unchecked;
|
44
|
+
}
|
45
|
+
render() {
|
46
|
+
const icon = this.kind === Kinds.checked
|
47
|
+
? CheckmarkOutline16
|
48
|
+
: this.kind === Kinds.indeterminate
|
49
|
+
? Incomplete16
|
50
|
+
: this.kind === Kinds.error
|
51
|
+
? Warning16
|
52
|
+
: CircleDash16;
|
53
|
+
const classes = classMap({
|
54
|
+
[`${blockClass}`]: true,
|
55
|
+
[`${blockClass}--${this.kind}`]: true,
|
56
|
+
});
|
57
|
+
return html ` <span class="${classes}">
|
58
|
+
<cds-custom-icon .icon=${icon} size="16" ariaLabel=${this.kind}></cds-custom-icon>
|
59
|
+
</span>`;
|
60
|
+
}
|
61
|
+
};
|
62
|
+
CDSChecklistIcon.styles = styles;
|
63
|
+
__decorate([
|
64
|
+
property({ type: String, attribute: 'kind' })
|
65
|
+
], CDSChecklistIcon.prototype, "kind", void 0);
|
66
|
+
CDSChecklistIcon = __decorate([
|
67
|
+
carbonElement(`${prefix}-checklist-icon`)
|
68
|
+
], CDSChecklistIcon);
|
69
|
+
var CDSChecklistIcon$1 = CDSChecklistIcon;
|
70
|
+
|
71
|
+
export { CDSChecklistIcon$1 as default };
|
72
|
+
//# sourceMappingURL=checklist-icon.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checklist-icon.js","sources":["../../../src/components/checklist/checklist-icon.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAkBH,MAAM,UAAU,GAAG,CAAG,EAAA,MAAM,mBAAmB;AAE/C;;;AAGG;AAEH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU,CAAA;AAAzC,IAAA,WAAA,GAAA;;AACE;;;;AAIG;AAEH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,SAAS;;IAEtB,MAAM,GAAA;QACJ,MAAM,IAAI,GACR,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;AAClB,cAAE;AACF,cAAE,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;AACpB,kBAAE;AACF,kBAAE,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;AACpB,sBAAE;sBACA,YAAY;QAEtB,MAAM,OAAO,GAAG,QAAQ,CAAC;AACvB,YAAA,CAAC,CAAG,EAAA,UAAU,CAAE,CAAA,GAAG,IAAI;YACvB,CAAC,CAAA,EAAG,UAAU,CAAK,EAAA,EAAA,IAAI,CAAC,IAAI,CAAA,CAAE,GAAG,IAAI;AACtC,SAAA,CAAC;QAEF,OAAO,IAAI,CAAA,CAAA,cAAA,EAAiB,OAAO,CAAA;wBACf,IAAI,CAAA,qBAAA,EAAwB,IAAI,CAAC,IAAI,CAAA;YACjD;;;AAGH,gBAAM,CAAA,MAAA,GAAG,MAAH;AAtBb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE;AACtB,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAPnB,gBAAgB,GAAA,UAAA,CAAA;AADrB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,eAAA,CAAiB;AACnC,CAAA,EAAA,gBAAgB,CA8BrB;AAED,yBAAe,gBAAgB;;;;"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
*
|
4
|
+
* Copyright IBM Corp. 2025
|
5
|
+
*
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
8
|
+
*/
|
9
|
+
import { LitElement } from 'lit';
|
10
|
+
/**
|
11
|
+
* item in c4p-checklist-group
|
12
|
+
* @element c4p-checklist-item
|
13
|
+
* @slot icon - checklist item icon, usually a status indicator icon
|
14
|
+
* @slot content - checklist item title/description
|
15
|
+
* @fires c4p-checklist-item-clicked - The custom event which is fired when a user clicks on checklist item with clickable attribute.
|
16
|
+
*/
|
17
|
+
declare class CDSChecklistItem extends LitElement {
|
18
|
+
/**
|
19
|
+
* label of the c4p-checklist-item
|
20
|
+
*/
|
21
|
+
label: any;
|
22
|
+
/**
|
23
|
+
* status of the c4p-checklist-item
|
24
|
+
* Values can be 'not started', 'in progress', 'completed', 'error', 'disabled'
|
25
|
+
*/
|
26
|
+
status: any;
|
27
|
+
/** When true, makes the checklist item label clickable */
|
28
|
+
clickable: boolean;
|
29
|
+
private _handleClick;
|
30
|
+
private _mapStatusToKind;
|
31
|
+
private _updateAttributes;
|
32
|
+
firstUpdated(): void;
|
33
|
+
render(): import("lit-html").TemplateResult<1>;
|
34
|
+
/**
|
35
|
+
* The custom event which is fired when the checklist item is clicked.
|
36
|
+
*/
|
37
|
+
static get checklistItemClicked(): string;
|
38
|
+
static styles: any;
|
39
|
+
}
|
40
|
+
export default CDSChecklistItem;
|
@@ -0,0 +1,122 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { __decorate } from 'tslib';
|
9
|
+
import { LitElement, html } from 'lit';
|
10
|
+
import { property } from 'lit/decorators.js';
|
11
|
+
import { carbonElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
12
|
+
import { prefix } from '../../globals/settings.js';
|
13
|
+
import styles from './checklist.scss.js';
|
14
|
+
import { Kinds, Statuses } from './checklist.types.js';
|
15
|
+
import { classMap } from 'lit/directives/class-map.js';
|
16
|
+
|
17
|
+
/**
|
18
|
+
* @license
|
19
|
+
*
|
20
|
+
* Copyright IBM Corp. 2025
|
21
|
+
*
|
22
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
24
|
+
*/
|
25
|
+
/**
|
26
|
+
* item in c4p-checklist-group
|
27
|
+
* @element c4p-checklist-item
|
28
|
+
* @slot icon - checklist item icon, usually a status indicator icon
|
29
|
+
* @slot content - checklist item title/description
|
30
|
+
* @fires c4p-checklist-item-clicked - The custom event which is fired when a user clicks on checklist item with clickable attribute.
|
31
|
+
*/
|
32
|
+
let CDSChecklistItem = class CDSChecklistItem extends LitElement {
|
33
|
+
constructor() {
|
34
|
+
super(...arguments);
|
35
|
+
/** When true, makes the checklist item label clickable */
|
36
|
+
this.clickable = false;
|
37
|
+
}
|
38
|
+
_handleClick(event) {
|
39
|
+
const triggeredBy = event.target;
|
40
|
+
event.stopPropagation();
|
41
|
+
const init = {
|
42
|
+
bubbles: true,
|
43
|
+
cancelable: true,
|
44
|
+
composed: true,
|
45
|
+
detail: {
|
46
|
+
triggeredBy,
|
47
|
+
},
|
48
|
+
};
|
49
|
+
this.dispatchEvent(new CustomEvent(this.constructor.checklistItemClicked, init));
|
50
|
+
}
|
51
|
+
_mapStatusToKind(status) {
|
52
|
+
switch (status) {
|
53
|
+
case Statuses.NotStarted:
|
54
|
+
return Kinds.unchecked;
|
55
|
+
case Statuses.InProgress:
|
56
|
+
return Kinds.indeterminate;
|
57
|
+
case Statuses.Completed:
|
58
|
+
return Kinds.checked;
|
59
|
+
case Statuses.Error:
|
60
|
+
return Kinds.error;
|
61
|
+
case Statuses.Disabled:
|
62
|
+
return Kinds.disabled;
|
63
|
+
default:
|
64
|
+
return Kinds.error;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
_updateAttributes() {
|
68
|
+
this.setAttribute('role', 'listitem');
|
69
|
+
this.setAttribute('tabindex', '0');
|
70
|
+
this.classList.add(`${prefix}--checklist__list-item`);
|
71
|
+
}
|
72
|
+
firstUpdated() {
|
73
|
+
this._updateAttributes();
|
74
|
+
}
|
75
|
+
render() {
|
76
|
+
const { clickable, label, status, _handleClick: handleClick } = this;
|
77
|
+
const iconKind = this._mapStatusToKind(status);
|
78
|
+
const classes = classMap({
|
79
|
+
[`${prefix}--checklist__label`]: true,
|
80
|
+
[`${prefix}--checklist__label--clickable`]: clickable,
|
81
|
+
[`${prefix}--checklist__label--disabled`]: status === Statuses.Disabled,
|
82
|
+
});
|
83
|
+
return html `
|
84
|
+
<slot name="icon">
|
85
|
+
<c4p-checklist-icon kind="${iconKind}"></c4p-checklist-icon>
|
86
|
+
</slot>
|
87
|
+
<slot name="content">
|
88
|
+
<div
|
89
|
+
class="${classes}"
|
90
|
+
title=${label}
|
91
|
+
@click=${clickable ? handleClick : undefined}
|
92
|
+
tabindex=${clickable ? 0 : -1}
|
93
|
+
>
|
94
|
+
${label}
|
95
|
+
</div>
|
96
|
+
</slot>
|
97
|
+
`;
|
98
|
+
}
|
99
|
+
/**
|
100
|
+
* The custom event which is fired when the checklist item is clicked.
|
101
|
+
*/
|
102
|
+
static get checklistItemClicked() {
|
103
|
+
return `${prefix}-checklist-item-clicked`;
|
104
|
+
}
|
105
|
+
};
|
106
|
+
CDSChecklistItem.styles = styles;
|
107
|
+
__decorate([
|
108
|
+
property()
|
109
|
+
], CDSChecklistItem.prototype, "label", void 0);
|
110
|
+
__decorate([
|
111
|
+
property()
|
112
|
+
], CDSChecklistItem.prototype, "status", void 0);
|
113
|
+
__decorate([
|
114
|
+
property({ type: Boolean })
|
115
|
+
], CDSChecklistItem.prototype, "clickable", void 0);
|
116
|
+
CDSChecklistItem = __decorate([
|
117
|
+
carbonElement(`${prefix}-checklist-item`)
|
118
|
+
], CDSChecklistItem);
|
119
|
+
var CDSChecklistItem$1 = CDSChecklistItem;
|
120
|
+
|
121
|
+
export { CDSChecklistItem$1 as default };
|
122
|
+
//# sourceMappingURL=checklist-item.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"checklist-item.js","sources":["../../../src/components/checklist/checklist-item.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAWH;;;;;;AAMG;AAEH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU,CAAA;AAAzC,IAAA,WAAA,GAAA;;;QAgBE,IAAS,CAAA,SAAA,GAAG,KAAK;;AAET,IAAA,YAAY,CAAC,KAAY,EAAA;AAC/B,QAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM;QAChC,KAAK,CAAC,eAAe,EAAE;AACvB,QAAA,MAAM,IAAI,GAAG;AACX,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,MAAM,EAAE;gBACN,WAAW;AACZ,aAAA;SACF;AACD,QAAA,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CACZ,IAAI,CAAC,WAAuC,CAAC,oBAAoB,EAClE,IAAI,CACL,CACF;;AAGK,IAAA,gBAAgB,CAAC,MAAM,EAAA;QAC7B,QAAQ,MAAM;YACZ,KAAK,QAAQ,CAAC,UAAU;gBACtB,OAAO,KAAK,CAAC,SAAS;YACxB,KAAK,QAAQ,CAAC,UAAU;gBACtB,OAAO,KAAK,CAAC,aAAa;YAC5B,KAAK,QAAQ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,MAAM,CAAA,uBAAA,CAAyB;;;AAGpC,gBAAM,CAAA,MAAA,GAAG,MAAH;AA9Fb,UAAA,CAAA;AADC,IAAA,QAAQ;AACH,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAON,UAAA,CAAA;AADC,IAAA,QAAQ;AACF,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAIP,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;AACT,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAhBd,gBAAgB,GAAA,UAAA,CAAA;AADrB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,eAAA,CAAiB;AACnC,CAAA,EAAA,gBAAgB,CAoGrB;AAED,yBAAe,gBAAgB;;;;"}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
*
|
4
|
+
* Copyright IBM Corp. 2025
|
5
|
+
*
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
8
|
+
*/
|
9
|
+
import { LitElement } from 'lit';
|
10
|
+
import '@carbon/web-components/es-custom/components/icon-button/index.js';
|
11
|
+
import './checklist-chart';
|
12
|
+
import './checklist-icon';
|
13
|
+
/**
|
14
|
+
* @element c4p-checklist
|
15
|
+
* @slot checklist-header - Header area which includes the title and the progress indicator.
|
16
|
+
* @slot default - Contains one or more `c4p-checklist-group` components to organize tasks into logical groups.
|
17
|
+
* @slot checklist-footer - Optional footer area for actions like buttons, links, or additional notes.
|
18
|
+
* @fires c4p-checklist-view-all - The custom event which is fired when a user clicks on View All button in checklist footer.
|
19
|
+
* @fires c4p-checklist-toggle - The custom event which is fired when user clicks on toggle button in checklist header.
|
20
|
+
*/
|
21
|
+
declare class CDSChecklist extends LitElement {
|
22
|
+
/**
|
23
|
+
* Specifies whether the component is opened or closed.
|
24
|
+
*/
|
25
|
+
open: boolean;
|
26
|
+
/**
|
27
|
+
* The title of the component.
|
28
|
+
*/
|
29
|
+
title: any;
|
30
|
+
/**
|
31
|
+
* The label for progress indicator chart
|
32
|
+
*/
|
33
|
+
chartLabel: any;
|
34
|
+
/**
|
35
|
+
* A number between 0 and 1 which indicates the progress of checklist
|
36
|
+
*/
|
37
|
+
chartValue: any;
|
38
|
+
/**
|
39
|
+
* Whether or not to show the open/close toggle.
|
40
|
+
*/
|
41
|
+
disableToggle: boolean;
|
42
|
+
/**
|
43
|
+
* The label for the toggle's tooltip.
|
44
|
+
*/
|
45
|
+
toggleLabel: any;
|
46
|
+
/**
|
47
|
+
* The alignment of the toggle's tooltip.
|
48
|
+
*/
|
49
|
+
toggleLabelAlign: any;
|
50
|
+
/**
|
51
|
+
* Aria-label for the Checklist's toggle component.
|
52
|
+
*/
|
53
|
+
toggleAriaLabel: any;
|
54
|
+
/**
|
55
|
+
* If defined, will show and enable the "View all (#)" button in the checklist footer.
|
56
|
+
*/
|
57
|
+
viewAllLabel: any;
|
58
|
+
private _viewAll;
|
59
|
+
private _onToggle;
|
60
|
+
render(): import("lit-html").TemplateResult<1>;
|
61
|
+
/**
|
62
|
+
* The custom event which is fired when the view all button in checklist footer is clicked or when the Enter key is pressed on it.
|
63
|
+
*/
|
64
|
+
static get checklistViewAll(): string;
|
65
|
+
/**
|
66
|
+
* The custom event which is fired when the checklist toggle button is clicked or when the Enter key is pressed on it.
|
67
|
+
*/
|
68
|
+
static get checklistToggle(): string;
|
69
|
+
static styles: any;
|
70
|
+
}
|
71
|
+
export default CDSChecklist;
|