@carbon/ibm-products-web-components 0.24.0 → 0.25.0-rc.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 +315 -52
- 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/components/interstitial-screen/interstitial-screen-footer.d.ts +1 -1
- package/es/components/interstitial-screen/interstitial-screen-footer.js +1 -1
- package/es/components/page-header/page-header-title-breadcrumb.d.ts +1 -1
- package/es/components/page-header/page-header-title-breadcrumb.js +1 -1
- 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/components/interstitial-screen/interstitial-screen-footer.d.ts +1 -1
- package/es-custom/components/interstitial-screen/interstitial-screen-footer.js +1 -1
- package/es-custom/components/page-header/page-header-title-breadcrumb.d.ts +1 -1
- package/es-custom/components/page-header/page-header-title-breadcrumb.js +1 -1
- 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/lib/components/interstitial-screen/interstitial-screen-footer.d.ts +1 -1
- package/lib/components/page-header/page-header-title-breadcrumb.d.ts +1 -1
- package/package.json +3 -3
- package/scss/components/checklist/checklist.scss +65 -0
- package/telemetry.yml +26 -5
@@ -0,0 +1,172 @@
|
|
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 { describe, beforeEach, it, expect } from 'vitest';
|
9
|
+
import { fixture, html, oneEvent, elementUpdated } from '@open-wc/testing';
|
10
|
+
import { prefix, carbonPrefix } from '../../globals/settings.js';
|
11
|
+
import CDSChecklist from './checklist.js';
|
12
|
+
import CDSChecklistItem from './checklist-item.js';
|
13
|
+
import { Kinds } from './checklist.types.js';
|
14
|
+
import './checklist-group.js';
|
15
|
+
import './checklist-chart.js';
|
16
|
+
import './checklist-icon.js';
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Copyright IBM Corp. 2025
|
20
|
+
*
|
21
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
23
|
+
*/
|
24
|
+
const blockClass = `${prefix}--checklist`;
|
25
|
+
describe('c4p-checklist', () => {
|
26
|
+
let el;
|
27
|
+
beforeEach(async () => {
|
28
|
+
el = await fixture(html `
|
29
|
+
<c4p-checklist
|
30
|
+
title="Test Title"
|
31
|
+
chart-label="5 out of 10 tasks completed"
|
32
|
+
chart-value="0.5"
|
33
|
+
toggle-label="Toggle"
|
34
|
+
toggle-label-align="top"
|
35
|
+
toggle-aria-label="Toggle"
|
36
|
+
view-all-label="View All"
|
37
|
+
></c4p-checklist>
|
38
|
+
`);
|
39
|
+
});
|
40
|
+
it('renders with default properties', () => {
|
41
|
+
const shadow = el.shadowRoot;
|
42
|
+
// Render title
|
43
|
+
expect(shadow.textContent).to.include('Test Title');
|
44
|
+
// Render chartLabel
|
45
|
+
expect(shadow.textContent).to.include('5 out of 10 tasks completed');
|
46
|
+
// Render chart
|
47
|
+
const chart = shadow.querySelector(`.${blockClass}__chart`);
|
48
|
+
expect(chart).to.exist;
|
49
|
+
// Render toggle button
|
50
|
+
const toggleButton = shadow.querySelector(`.${blockClass}__toggle`);
|
51
|
+
expect(toggleButton).to.exist;
|
52
|
+
// Checklist should be in collapsed state
|
53
|
+
expect(el.open).to.be.false;
|
54
|
+
});
|
55
|
+
it('toggles open state and fires checklistToggle event', async () => {
|
56
|
+
const shadow = el.shadowRoot;
|
57
|
+
const toggleButton = shadow.querySelector(`.${blockClass}__toggle`);
|
58
|
+
// Listen for event before clicking
|
59
|
+
setTimeout(() => toggleButton === null || toggleButton === void 0 ? void 0 : toggleButton.click());
|
60
|
+
const ev = await oneEvent(el, CDSChecklist.checklistToggle);
|
61
|
+
// Verify open property updated
|
62
|
+
expect(el.open).to.be.true;
|
63
|
+
expect(ev).to.exist;
|
64
|
+
});
|
65
|
+
it('fires checklistViewAll event on viewAll button click', async () => {
|
66
|
+
const shadow = el.shadowRoot;
|
67
|
+
const link = Array.from(shadow.querySelectorAll(`${carbonPrefix}-link`)).find((a) => { var _a; return ((_a = a.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === 'View All'; });
|
68
|
+
expect(link).toBeTruthy();
|
69
|
+
setTimeout(() => link === null || link === void 0 ? void 0 : link.click());
|
70
|
+
const ev = await oneEvent(el, CDSChecklist.checklistViewAll);
|
71
|
+
expect(ev).to.exist;
|
72
|
+
});
|
73
|
+
it('does not render toggle button if disableToggle is true', async () => {
|
74
|
+
el = await fixture(html `
|
75
|
+
<c4p-checklist
|
76
|
+
title="Test Title"
|
77
|
+
chart-label="5 out of 10 tasks completed"
|
78
|
+
chart-value="0.5"
|
79
|
+
disable-toggle
|
80
|
+
toggle-label="Toggle"
|
81
|
+
toggle-label-align="top"
|
82
|
+
toggle-aria-label="Toggle"
|
83
|
+
view-all-label="View All"
|
84
|
+
></c4p-checklist>
|
85
|
+
`);
|
86
|
+
await elementUpdated(el);
|
87
|
+
const shadow = el.shadowRoot;
|
88
|
+
const toggleBtn = shadow.querySelector(`.${blockClass}__toggle`);
|
89
|
+
expect(toggleBtn).to.be.null;
|
90
|
+
});
|
91
|
+
});
|
92
|
+
describe('c4p-checklist-group', () => {
|
93
|
+
let el;
|
94
|
+
beforeEach(async () => {
|
95
|
+
el = await fixture(html `
|
96
|
+
<c4p-checklist-group title="Test Title"></c4p-checklist-group>
|
97
|
+
`);
|
98
|
+
});
|
99
|
+
it('renders group title', () => {
|
100
|
+
var _a, _b;
|
101
|
+
expect((_b = (_a = el
|
102
|
+
.shadowRoot.querySelector(`.${blockClass}__list-title`)) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()).toBe('Test Title');
|
103
|
+
});
|
104
|
+
it('renders an empty list when no content is provided', () => {
|
105
|
+
const ol = el.shadowRoot.querySelector('ol');
|
106
|
+
expect(ol).to.exist;
|
107
|
+
expect(ol.querySelector('li')).to.be.null;
|
108
|
+
});
|
109
|
+
it('renders checklist items provided via slot', async () => {
|
110
|
+
var _a;
|
111
|
+
el = await fixture(html `
|
112
|
+
<c4p-checklist-group title="Test Title">
|
113
|
+
<c4p-checklist-item
|
114
|
+
label="task 1"
|
115
|
+
status="completed"
|
116
|
+
></c4p-checklist-item>
|
117
|
+
<c4p-checklist-item
|
118
|
+
label="task 2"
|
119
|
+
status="in progress"
|
120
|
+
></c4p-checklist-item>
|
121
|
+
<c4p-checklist-item
|
122
|
+
label="task 3"
|
123
|
+
status="not started"
|
124
|
+
></c4p-checklist-item>
|
125
|
+
</c4p-checklist-group>
|
126
|
+
`);
|
127
|
+
await elementUpdated(el);
|
128
|
+
const slot = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot');
|
129
|
+
expect(slot).toBeDefined();
|
130
|
+
// Retrieve the assigned custom elements
|
131
|
+
const checklistItems = slot
|
132
|
+
.assignedElements()
|
133
|
+
.filter((el) => el.tagName.toLowerCase() === 'c4p-checklist-item');
|
134
|
+
expect(checklistItems).toHaveLength(3);
|
135
|
+
});
|
136
|
+
});
|
137
|
+
describe('c4p-checklist-item', () => {
|
138
|
+
const label = 'Test Label';
|
139
|
+
const status = 'in progress';
|
140
|
+
const clickable = true;
|
141
|
+
let el;
|
142
|
+
beforeEach(async () => {
|
143
|
+
el = await fixture(html `
|
144
|
+
<c4p-checklist-item
|
145
|
+
.label=${label}
|
146
|
+
.status=${status}
|
147
|
+
.clickable=${clickable}
|
148
|
+
></c4p-checklist-item>
|
149
|
+
`);
|
150
|
+
});
|
151
|
+
it('renders item with correct classes', async () => {
|
152
|
+
var _a, _b;
|
153
|
+
const itemEl = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`.${blockClass}__label`);
|
154
|
+
expect(itemEl).to.exist;
|
155
|
+
expect(itemEl === null || itemEl === void 0 ? void 0 : itemEl.classList.contains(`${blockClass}__label--clickable`)).to.be
|
156
|
+
.true;
|
157
|
+
expect((_b = itemEl === null || itemEl === void 0 ? void 0 : itemEl.textContent) === null || _b === void 0 ? void 0 : _b.trim()).to.equal(label);
|
158
|
+
});
|
159
|
+
it('dispatches "checklistItemClicked" event on click', async () => {
|
160
|
+
var _a;
|
161
|
+
const itemEl = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`.${blockClass}__label--clickable`);
|
162
|
+
// Use oneEvent to await the custom event
|
163
|
+
setTimeout(() => itemEl === null || itemEl === void 0 ? void 0 : itemEl.click());
|
164
|
+
const event = await oneEvent(el, CDSChecklistItem.checklistItemClicked);
|
165
|
+
expect(event).to.exist;
|
166
|
+
});
|
167
|
+
it('maps status to correct kind', () => {
|
168
|
+
expect(el['_mapStatusToKind'](status)).to.equal(Kinds.indeterminate);
|
169
|
+
expect(el['_mapStatusToKind']('unknown')).to.equal(Kinds.error);
|
170
|
+
});
|
171
|
+
});
|
172
|
+
//# sourceMappingURL=checklist.test.js.map
|
@@ -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,EAAgB;IAEpB,UAAU,CAAC,YAAW;AACpB,QAAA,EAAE,GAAG,MAAM,OAAO,CAAC,IAAI,CAAA;;;;;;;;;;AAUtB,IAAA,CAAA,CAAC;AACJ,KAAC,CAAC;AAEF,IAAA,EAAE,CAAC,iCAAiC,EAAE,MAAK;AACzC,QAAA,MAAM,MAAM,GAAG,EAAE,CAAC,UAAW;;AAE7B,QAAA,MAAM,CAAC,MAAO,CAAC,WAAY,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;;AAErD,QAAA,MAAM,CAAC,MAAO,CAAC,WAAY,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,6BAA6B,CAAC;;QAEtE,MAAM,KAAK,GAAG,MAAO,CAAC,aAAa,CAAC,CAAI,CAAA,EAAA,UAAU,CAAS,OAAA,CAAA,CAAE;AAC7D,QAAA,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK;;QAEtB,MAAM,YAAY,GAAG,MAAO,CAAC,aAAa,CAAC,CAAI,CAAA,EAAA,UAAU,CAAU,QAAA,CAAA,CAAE;AACrE,QAAA,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,KAAK;;QAE7B,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK;AAC7B,KAAC,CAAC;AAEF,IAAA,EAAE,CAAC,oDAAoD,EAAE,YAAW;AAClE,QAAA,MAAM,MAAM,GAAG,EAAE,CAAC,UAAW;QAC7B,MAA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M,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":";;;;;;;;;;;"}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
import { PropertyValues } from 'lit';
|
10
10
|
import '@carbon/web-components/es-custom/components/button/index.js';
|
11
11
|
import '@carbon/web-components/es-custom/components/inline-loading/inline-loading.js';
|
12
|
-
import
|
12
|
+
import CDSModalFooter from '@carbon/web-components/es/components/modal/modal-footer';
|
13
13
|
export type ActionType = 'close' | 'start' | 'skip' | 'back' | 'next';
|
14
14
|
declare const CDSInterstitialScreenFooter_base: {
|
15
15
|
new (...args: any[]): {
|
@@ -16,7 +16,7 @@ import styles from './interstitial-screen-footer.scss.js';
|
|
16
16
|
import { interstitialDetailsSignal } from './interstitial-screen-context.js';
|
17
17
|
import { SignalWatcher } from '@lit-labs/signals';
|
18
18
|
import '@carbon/web-components/es-custom/components/inline-loading/inline-loading.js';
|
19
|
-
import
|
19
|
+
import CDSModalFooter from '@carbon/web-components/es/components/modal/modal-footer';
|
20
20
|
import ArrowRight from '@carbon/icons/es/arrow--right/16.js';
|
21
21
|
import { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';
|
22
22
|
import { registerFocusableContainers } from '../../utilities/manageFocusTrap/manageFocusTrap.js';
|
@@ -6,7 +6,7 @@
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
8
8
|
*/
|
9
|
-
import
|
9
|
+
import CDSBreadcrumbItem from '@carbon/web-components/es/components/breadcrumb/breadcrumb-item';
|
10
10
|
/**
|
11
11
|
* Page header Title Breadcrumb
|
12
12
|
* @element c4p-page-header-title-breadcrumb
|
@@ -9,7 +9,7 @@ import { __decorate } from 'tslib';
|
|
9
9
|
import { html } from 'lit';
|
10
10
|
import { consume, ContextConsumer } from '@lit/context';
|
11
11
|
import { carbonElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
12
|
-
import
|
12
|
+
import CDSBreadcrumbItem from '@carbon/web-components/es/components/breadcrumb/breadcrumb-item';
|
13
13
|
import { prefix } from '../../globals/settings.js';
|
14
14
|
import styles from './page-header.scss.js';
|
15
15
|
import { pageHeaderContext } from './context.js';
|
@@ -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,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,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/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,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,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/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;
|
@@ -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,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';
|
@@ -9,7 +9,7 @@
|
|
9
9
|
import { PropertyValues } from 'lit';
|
10
10
|
import '@carbon/web-components/es/components/button/index.js';
|
11
11
|
import '@carbon/web-components/es/components/inline-loading/inline-loading.js';
|
12
|
-
import
|
12
|
+
import CDSModalFooter from '@carbon/web-components/es/components/modal/modal-footer';
|
13
13
|
export type ActionType = 'close' | 'start' | 'skip' | 'back' | 'next';
|
14
14
|
declare const CDSInterstitialScreenFooter_base: {
|
15
15
|
new (...args: any[]): {
|
@@ -6,7 +6,7 @@
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
8
8
|
*/
|
9
|
-
import
|
9
|
+
import CDSBreadcrumbItem from '@carbon/web-components/es/components/breadcrumb/breadcrumb-item';
|
10
10
|
/**
|
11
11
|
* Page header Title Breadcrumb
|
12
12
|
* @element c4p-page-header-title-breadcrumb
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products-web-components",
|
3
3
|
"description": "Carbon for IBM Products Web Components",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.25.0-rc.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "es/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -56,7 +56,7 @@
|
|
56
56
|
},
|
57
57
|
"dependencies": {
|
58
58
|
"@carbon-labs/wc-empty-state": "^0.9.0",
|
59
|
-
"@carbon/ibm-products-styles": "^2.
|
59
|
+
"@carbon/ibm-products-styles": "^2.72.0-rc.0",
|
60
60
|
"@carbon/styles": "1.89.0",
|
61
61
|
"@carbon/web-components": "2.37.0",
|
62
62
|
"@ibm/telemetry-js": "^1.10.2",
|
@@ -105,5 +105,5 @@
|
|
105
105
|
"vitest": "^3.2.0",
|
106
106
|
"web-component-analyzer": "2.0.0"
|
107
107
|
},
|
108
|
-
"gitHead": "
|
108
|
+
"gitHead": "bf120ae9c3bf30ed5898cd7684f1f04ac3d137d9"
|
109
109
|
}
|