@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.
Files changed (66) hide show
  1. package/custom-elements.json +263 -0
  2. package/es/components/checklist/checklist-chart.d.ts +25 -0
  3. package/es/components/checklist/checklist-chart.js +81 -0
  4. package/es/components/checklist/checklist-chart.js.map +1 -0
  5. package/es/components/checklist/checklist-group.d.ts +25 -0
  6. package/es/components/checklist/checklist-group.js +58 -0
  7. package/es/components/checklist/checklist-group.js.map +1 -0
  8. package/es/components/checklist/checklist-icon.d.ts +26 -0
  9. package/es/components/checklist/checklist-icon.js +72 -0
  10. package/es/components/checklist/checklist-icon.js.map +1 -0
  11. package/es/components/checklist/checklist-item.d.ts +40 -0
  12. package/es/components/checklist/checklist-item.js +122 -0
  13. package/es/components/checklist/checklist-item.js.map +1 -0
  14. package/es/components/checklist/checklist.d.ts +71 -0
  15. package/es/components/checklist/checklist.js +187 -0
  16. package/es/components/checklist/checklist.js.map +1 -0
  17. package/es/components/checklist/checklist.scss.js +13 -0
  18. package/es/components/checklist/checklist.scss.js.map +1 -0
  19. package/es/components/checklist/checklist.test.d.ts +7 -0
  20. package/es/components/checklist/checklist.test.js +172 -0
  21. package/es/components/checklist/checklist.test.js.map +1 -0
  22. package/es/components/checklist/checklist.types.d.ts +22 -0
  23. package/es/components/checklist/checklist.types.js +32 -0
  24. package/es/components/checklist/checklist.types.js.map +1 -0
  25. package/es/components/checklist/index.d.ts +13 -0
  26. package/es/components/checklist/index.js +13 -0
  27. package/es/components/checklist/index.js.map +1 -0
  28. package/es/packages/ibm-products-web-components/package.json.js +1 -1
  29. package/es-custom/components/checklist/checklist-chart.d.ts +25 -0
  30. package/es-custom/components/checklist/checklist-chart.js +81 -0
  31. package/es-custom/components/checklist/checklist-chart.js.map +1 -0
  32. package/es-custom/components/checklist/checklist-group.d.ts +25 -0
  33. package/es-custom/components/checklist/checklist-group.js +58 -0
  34. package/es-custom/components/checklist/checklist-group.js.map +1 -0
  35. package/es-custom/components/checklist/checklist-icon.d.ts +26 -0
  36. package/es-custom/components/checklist/checklist-icon.js +72 -0
  37. package/es-custom/components/checklist/checklist-icon.js.map +1 -0
  38. package/es-custom/components/checklist/checklist-item.d.ts +40 -0
  39. package/es-custom/components/checklist/checklist-item.js +122 -0
  40. package/es-custom/components/checklist/checklist-item.js.map +1 -0
  41. package/es-custom/components/checklist/checklist.d.ts +71 -0
  42. package/es-custom/components/checklist/checklist.js +187 -0
  43. package/es-custom/components/checklist/checklist.js.map +1 -0
  44. package/es-custom/components/checklist/checklist.scss.js +13 -0
  45. package/es-custom/components/checklist/checklist.scss.js.map +1 -0
  46. package/es-custom/components/checklist/checklist.test.d.ts +7 -0
  47. package/es-custom/components/checklist/checklist.test.js +172 -0
  48. package/es-custom/components/checklist/checklist.test.js.map +1 -0
  49. package/es-custom/components/checklist/checklist.types.d.ts +22 -0
  50. package/es-custom/components/checklist/checklist.types.js +32 -0
  51. package/es-custom/components/checklist/checklist.types.js.map +1 -0
  52. package/es-custom/components/checklist/index.d.ts +13 -0
  53. package/es-custom/components/checklist/index.js +13 -0
  54. package/es-custom/components/checklist/index.js.map +1 -0
  55. package/es-custom/packages/ibm-products-web-components/package.json.js +1 -1
  56. package/lib/components/checklist/checklist-chart.d.ts +25 -0
  57. package/lib/components/checklist/checklist-group.d.ts +25 -0
  58. package/lib/components/checklist/checklist-icon.d.ts +26 -0
  59. package/lib/components/checklist/checklist-item.d.ts +40 -0
  60. package/lib/components/checklist/checklist.d.ts +71 -0
  61. package/lib/components/checklist/checklist.test.d.ts +7 -0
  62. package/lib/components/checklist/checklist.types.d.ts +22 -0
  63. package/lib/components/checklist/index.d.ts +13 -0
  64. package/package.json +3 -3
  65. package/scss/components/checklist/checklist.scss +65 -0
  66. package/telemetry.yml +26 -5
@@ -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,IAA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 +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,187 @@
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 { classMap } from 'lit/directives/class-map.js';
12
+ import { carbonElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
13
+ import ChevronIcon16 from '@carbon/icons/es/chevron--up/16';
14
+ import { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';
15
+ import '@carbon/web-components/es/components/icon-button/index.js';
16
+ import { prefix } from '../../globals/settings.js';
17
+ import styles from './checklist.scss.js';
18
+ import './checklist-chart.js';
19
+ import './checklist-icon.js';
20
+
21
+ /**
22
+ * @license
23
+ *
24
+ * Copyright IBM Corp. 2025
25
+ *
26
+ * This source code is licensed under the Apache-2.0 license found in the
27
+ * LICENSE file in the root directory of this source tree.
28
+ */
29
+ const blockClass = `${prefix}--checklist`;
30
+ /**
31
+ * @element c4p-checklist
32
+ * @slot checklist-header - Header area which includes the title and the progress indicator.
33
+ * @slot default - Contains one or more `c4p-checklist-group` components to organize tasks into logical groups.
34
+ * @slot checklist-footer - Optional footer area for actions like buttons, links, or additional notes.
35
+ * @fires c4p-checklist-view-all - The custom event which is fired when a user clicks on View All button in checklist footer.
36
+ * @fires c4p-checklist-toggle - The custom event which is fired when user clicks on toggle button in checklist header.
37
+ */
38
+ let CDSChecklist = class CDSChecklist extends LitElement {
39
+ constructor() {
40
+ super(...arguments);
41
+ /**
42
+ * Specifies whether the component is opened or closed.
43
+ */
44
+ this.open = false;
45
+ /**
46
+ * Whether or not to show the open/close toggle.
47
+ */
48
+ this.disableToggle = false;
49
+ }
50
+ _viewAll(event) {
51
+ const triggeredBy = event.target;
52
+ event.stopPropagation();
53
+ const init = {
54
+ bubbles: true,
55
+ cancelable: true,
56
+ composed: true,
57
+ detail: {
58
+ triggeredBy,
59
+ },
60
+ };
61
+ this.dispatchEvent(new CustomEvent(this.constructor.checklistViewAll, init));
62
+ }
63
+ _onToggle(event) {
64
+ this.open = !this.open;
65
+ // Fire custom event
66
+ const triggeredBy = event.target;
67
+ event.stopPropagation();
68
+ const init = {
69
+ bubbles: true,
70
+ cancelable: true,
71
+ composed: true,
72
+ detail: {
73
+ triggeredBy,
74
+ },
75
+ };
76
+ this.dispatchEvent(new CustomEvent(this.constructor.checklistToggle, init));
77
+ }
78
+ render() {
79
+ const { open, chartLabel, chartValue, title, disableToggle, toggleLabel, toggleLabelAlign, toggleAriaLabel, viewAllLabel, _viewAll: viewAll, _onToggle: onToggle, } = this;
80
+ const classes = classMap({
81
+ [`${blockClass}`]: true,
82
+ [`${blockClass}__closed`]: !open,
83
+ });
84
+ return html `
85
+ <aside class=${classes}>
86
+ <!-- Header -->
87
+ <header class="${blockClass}__header">
88
+ <slot name="checklist-header">
89
+ ${html `<c4p-checklist-chart
90
+ value=${chartValue}
91
+ ></c4p-checklist-chart>`}
92
+ ${(title || chartLabel) &&
93
+ html `<div class="${blockClass}__titles">
94
+ <!-- checklist title -->
95
+ ${title && html ` <h3 class="${blockClass}__title">${title}</h3> `}
96
+ <!-- chart label -->
97
+ ${chartLabel &&
98
+ html `
99
+ <p id="{chartLabelId}" class="${blockClass}__chart-label">
100
+ ${chartLabel}
101
+ </p>
102
+ `}
103
+ </div>`}
104
+ </slot>
105
+ <!-- Checklist toggle button -->
106
+ ${!disableToggle &&
107
+ html `<cds-icon-button
108
+ kind="ghost"
109
+ size="sm"
110
+ align=${toggleLabelAlign}
111
+ aria-label=${toggleAriaLabel}
112
+ class="${blockClass}__toggle"
113
+ @click=${onToggle}
114
+ >
115
+ ${iconLoader(ChevronIcon16, {
116
+ slot: 'icon',
117
+ class: `${blockClass}__chevron`,
118
+ })}
119
+ <span slot="tooltip-content">${toggleLabel}</span>
120
+ </cds-icon-button>`}
121
+ </header>
122
+ <div class="${blockClass}__content-outer">
123
+ <div class="${blockClass}__content-inner">
124
+ <!-- Checklist body -->
125
+ <!-- This is where you add c4p-checklist-group elements-->
126
+ <slot></slot>
127
+
128
+ <!-- Checklist footer -->
129
+ <div class="${blockClass}__footer">
130
+ <slot name="checklist-footer">
131
+ ${viewAllLabel &&
132
+ html `<cds-link @click=${viewAll}> ${viewAllLabel} </cds-link>`}
133
+ </slot>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </aside>
138
+ `;
139
+ }
140
+ /**
141
+ * 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.
142
+ */
143
+ static get checklistViewAll() {
144
+ return `${prefix}-checklist-view-all`;
145
+ }
146
+ /**
147
+ * The custom event which is fired when the checklist toggle button is clicked or when the Enter key is pressed on it.
148
+ */
149
+ static get checklistToggle() {
150
+ return `${prefix}-checklist-toggle`;
151
+ }
152
+ };
153
+ CDSChecklist.styles = styles;
154
+ __decorate([
155
+ property({ type: Boolean, reflect: true })
156
+ ], CDSChecklist.prototype, "open", void 0);
157
+ __decorate([
158
+ property({ type: String })
159
+ ], CDSChecklist.prototype, "title", void 0);
160
+ __decorate([
161
+ property({ type: String, attribute: 'chart-label' })
162
+ ], CDSChecklist.prototype, "chartLabel", void 0);
163
+ __decorate([
164
+ property({ type: Number, attribute: 'chart-value' })
165
+ ], CDSChecklist.prototype, "chartValue", void 0);
166
+ __decorate([
167
+ property({ type: Boolean, attribute: 'disable-toggle' })
168
+ ], CDSChecklist.prototype, "disableToggle", void 0);
169
+ __decorate([
170
+ property({ type: String, attribute: 'toggle-label' })
171
+ ], CDSChecklist.prototype, "toggleLabel", void 0);
172
+ __decorate([
173
+ property({ type: String, attribute: 'toggle-label-align' })
174
+ ], CDSChecklist.prototype, "toggleLabelAlign", void 0);
175
+ __decorate([
176
+ property({ type: String, attribute: 'toggle-aria-label' })
177
+ ], CDSChecklist.prototype, "toggleAriaLabel", void 0);
178
+ __decorate([
179
+ property({ type: String, attribute: 'view-all-label' })
180
+ ], CDSChecklist.prototype, "viewAllLabel", void 0);
181
+ CDSChecklist = __decorate([
182
+ carbonElement(`${prefix}-checklist`)
183
+ ], CDSChecklist);
184
+ var CDSChecklist$1 = CDSChecklist;
185
+
186
+ export { CDSChecklist$1 as default };
187
+ //# sourceMappingURL=checklist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist.js","sources":["../../../src/components/checklist/checklist.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAeH,MAAM,UAAU,GAAG,CAAG,EAAA,MAAM,aAAa;AAEzC;;;;;;;AAOG;AAEH,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU,CAAA;AAArC,IAAA,WAAA,GAAA;;AACE;;AAEG;QAEH,IAAI,CAAA,IAAA,GAAG,KAAK;AAoBZ;;AAEG;QAEH,IAAa,CAAA,aAAA,GAAG,KAAK;;AA0Bb,IAAA,QAAQ,CAAC,KAAY,EAAA;AAC3B,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,WAAmC,CAAC,gBAAgB,EAC1D,IAAI,CACL,CACF;;AAGK,IAAA,SAAS,CAAC,KAAY,EAAA;AAC5B,QAAA,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI;;AAEtB,QAAA,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM;QAChC,KAAK,CAAC,eAAe,E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EAAE,SAAS,EAAE,gBAAgB,EAAE;AAClC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAMtB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE;AACzC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAMZ,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE;AAC1C,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,MAAA,CAAA;AAMjB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE;AAC1C,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,MAAA,CAAA;AAMhB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE;AAC1C,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AArDT,YAAY,GAAA,UAAA,CAAA;AADjB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,UAAA,CAAY;AAC9B,CAAA,EAAA,YAAY,CA2LjB;AAED,qBAAe,YAAY;;;;"}
@@ -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 { css } from 'lit';
9
+
10
+ var styles = css(["a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-feature-settings:\"liga\" 1;font-size:100%;margin:0;padding:0;vertical-align:baseline}button,input,select,textarea{border-radius:0;font-family:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{background-color:var(--cds-background,#fff);color:var(--cds-text-primary,#161616);line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{font-size:100%}body{font-family:IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,sans-serif;font-weight:400;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}code{font-family:IBM Plex Mono,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,monospace}strong{font-weight:600}@media screen and (-ms-high-contrast:active){svg{fill:ButtonText}}h1{font-size:var(--cds-heading-06-font-size,2.625rem);font-weight:var(--cds-heading-06-font-weight,300);letter-spacing:var(--cds-heading-06-letter-spacing,0);line-height:var(--cds-heading-06-line-height,1.199)}h2{font-size:var(--cds-heading-05-font-size,2rem);font-weight:var(--cds-heading-05-font-weight,400);letter-spacing:var(--cds-heading-05-letter-spacing,0);line-height:var(--cds-heading-05-line-height,1.25)}h3{font-size:var(--cds-heading-04-font-size,1.75rem);font-weight:var(--cds-heading-04-font-weight,400);letter-spacing:var(--cds-heading-04-letter-spacing,0);line-height:var(--cds-heading-04-line-height,1.28572)}h4{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-heading-03-line-height,1.4)}h5{font-size:var(--cds-heading-02-font-size,1rem);font-weight:var(--cds-heading-02-font-weight,600);letter-spacing:var(--cds-heading-02-letter-spacing,0);line-height:var(--cds-heading-02-line-height,1.5)}h6{font-size:var(--cds-heading-01-font-size,.875rem);font-weight:var(--cds-heading-01-font-weight,600);letter-spacing:var(--cds-heading-01-letter-spacing,.16px);line-height:var(--cds-heading-01-line-height,1.42857)}p{font-size:var(--cds-body-02-font-size,1rem);font-weight:var(--cds-body-02-font-weight,400);letter-spacing:var(--cds-body-02-letter-spacing,0);line-height:var(--cds-body-02-line-height,1.5)}a{color:var(--cds-link-primary,#0062fe)}em{font-style:italic}.cds--layout--size-xs{--cds-layout-size-height-context:var(--cds-layout-size-height-xs,1.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xs{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xs,1.5rem))}.cds--layout-constraint--size__min-xs{--cds-layout-size-height-min:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout-constraint--size__max-xs{--cds-layout-size-height-max:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout--size-sm{--cds-layout-size-height-context:var(--cds-layout-size-height-sm,2rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-sm{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-sm,2rem))}.cds--layout-constraint--size__min-sm{--cds-layout-size-height-min:var(--cds-layout-size-height-sm,2rem)}.cds--layout-constraint--size__max-sm{--cds-layout-size-height-max:var(--cds-layout-size-height-sm,2rem)}.cds--layout--size-md{--cds-layout-size-height-context:var(--cds-layout-size-height-md,2.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-md{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-md,2.5rem))}.cds--layout-constraint--size__min-md{--cds-layout-size-height-min:var(--cds-layout-size-height-md,2.5rem)}.cds--layout-constraint--size__max-md{--cds-layout-size-height-max:var(--cds-layout-size-height-md,2.5rem)}.cds--layout--size-lg{--cds-layout-size-height-context:var(--cds-layout-size-height-lg,3rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-lg{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-lg,3rem))}.cds--layout-constraint--size__min-lg{--cds-layout-size-height-min:var(--cds-layout-size-height-lg,3rem)}.cds--layout-constraint--size__max-lg{--cds-layout-size-height-max:var(--cds-layout-size-height-lg,3rem)}.cds--layout--size-xl{--cds-layout-size-height-context:var(--cds-layout-size-height-xl,4rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xl,4rem))}.cds--layout-constraint--size__min-xl{--cds-layout-size-height-min:var(--cds-layout-size-height-xl,4rem)}.cds--layout-constraint--size__max-xl{--cds-layout-size-height-max:var(--cds-layout-size-height-xl,4rem)}.cds--layout--size-2xl{--cds-layout-size-height-context:var(--cds-layout-size-height-2xl,5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-2xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-2xl,5rem))}.cds--layout-constraint--size__min-2xl{--cds-layout-size-height-min:var(--cds-layout-size-height-2xl,5rem)}.cds--layout-constraint--size__max-2xl{--cds-layout-size-height-max:var(--cds-layout-size-height-2xl,5rem)}.cds--layout--density-condensed{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-condensed,0.5rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-condensed{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-condensed,0.5rem))}.cds--layout-constraint--density__min-condensed{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout-constraint--density__max-condensed{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout--density-normal{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-normal,1rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-normal{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-normal,1rem))}.cds--layout-constraint--density__min-normal{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-normal,1rem)}.cds--layout-constraint--density__max-normal{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-normal,1rem)}:root{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px}@keyframes cds--hide-feedback{0%{opacity:1;visibility:inherit}to{opacity:0;visibility:hidden}}@keyframes cds--show-feedback{0%{opacity:0;visibility:hidden}to{opacity:1;visibility:inherit}}@keyframes cds--skeleton{0%{opacity:.3;transform:scaleX(0);transform-origin:left}20%{opacity:1;transform:scaleX(1);transform-origin:left}28%{transform:scaleX(1);transform-origin:right}51%{transform:scaleX(0);transform-origin:right}58%{transform:scaleX(0);transform-origin:right}82%{transform:scaleX(1);transform-origin:right}83%{transform:scaleX(1);transform-origin:left}96%{transform:scaleX(0);transform-origin:left}to{opacity:.3;transform:scaleX(0);transform-origin:left}}.cds--tag{--cds-layout-size-height-xs:1.125rem;--cds-layout-size-height-sm:1.125rem;--cds-layout-size-height-md:1.5rem;--cds-layout-size-height-lg:2rem;--cds-layout-size-height-local:clamp(max(var(--cds-layout-size-height-min),var(--cds-layout-size-height-sm)),var(--cds-layout-size-height,var(--cds-layout-size-height-md)),min(var(--cds-layout-size-height-max),var(--cds-layout-size-height-lg)));align-items:center;background-color:var(--cds-tag-background-gray,#e0e0e0);border-radius:1rem;color:var(--cds-tag-color-gray,#161616);cursor:default;display:inline-flex;font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);justify-content:center;letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333);margin:.25rem;max-inline-size:13rem;min-block-size:var(--cds-layout-size-height-local);min-inline-size:2rem;padding-inline:.5rem;vertical-align:middle;word-break:break-word}.cds--layout--size-xs :where(.cds--tag),.cds--tag.cds--layout--size-xs{--cds-layout-size-height:var(--cds-layout-size-height-xs)}.cds--layout--size-sm :where(.cds--tag),.cds--tag.cds--layout--size-sm{--cds-layout-size-height:var(--cds-layout-size-height-sm)}.cds--layout--size-md :where(.cds--tag),.cds--tag.cds--layout--size-md{--cds-layout-size-height:var(--cds-layout-size-height-md)}.cds--layout--size-lg :where(.cds--tag),.cds--tag.cds--layout--size-lg{--cds-layout-size-height:var(--cds-layout-size-height-lg)}.cds--tag.cds--tag--operational{border:1px solid var(--cds-tag-background-gray,#e0e0e0)}.cds--tag .cds--tag__close-icon:hover,.cds--tag.cds--tag--operational:hover{background-color:var(--cds-tag-hover-gray,#d1d1d1)}.cds--tag .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-gray,#161616)}.cds--tag.cds--tag--lg{padding-inline-start:.75rem}.cds--tag:has(.cds--tag__custom-icon){padding-inline-start:.25rem}.cds--tag.cds--tag--lg:not(.cds--tag--filter){padding-inline:.75rem}.cds--tag.cds--tag--lg:has(.cds--tag__custom-icon){padding-inline-start:.5rem}.cds--tag:not(.cds--tag--selectable){border:0}.cds--tag:not(:first-child){margin-inline-start:0}.cds--tag--operational>span,.cds--tag--selectable>span,.cds--tag__label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cds--tag--interactive:focus{outline:2px solid var(--cds-focus,#0f62fe);outline-offset:1px}.cds--tag--filter{padding-block:0;padding-inline-end:0}.cds--tag--filter:hover{outline:none}.cds--tag--selectable{background-color:var(--cds-layer);border:1px solid var(--cds-border-inverse,#161616);color:var(--cds-text-primary,#161616);cursor:pointer}.cds--tag--selectable:hover{background-color:var(--cds-layer-hover);outline:none}.cds--tag--selectable:focus{outline:2px solid var(--cds-focus,#0f62fe);outline-offset:1px}.cds--tag--selectable-selected{color:var(--cds-text-inverse,#fff)}.cds--tag--selectable-selected,.cds--tag--selectable-selected:hover{background-color:var(--cds-layer-selected-inverse,#161616)}.cds--tag--operational{background-color:var(--cds-tag-background-gray,#e0e0e0);border:1px solid var(--cds-tag-border-gray,#a8a8a8);color:var(--cds-tag-color-gray,#161616);cursor:pointer}.cds--tag--operational:hover{background-color:var(--cds-tag-hover-gray,#d1d1d1);outline:none}.cds--tag--operational:focus{outline:2px solid var(--cds-focus,#0f62fe);outline-offset:1px}.cds--tag--red{background-color:var(--cds-tag-background-red,#ffd7d9);color:var(--cds-tag-color-red,#a2191f)}.cds--tag--red.cds--tag--operational{border:1px solid var(--cds-tag-border-red,#ff8389)}.cds--tag--red .cds--tag__close-icon:hover,.cds--tag--red.cds--tag--operational:hover{background-color:var(--cds-tag-hover-red,#ffc2c5)}.cds--tag--red .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-red,#a2191f)}.cds--tag--magenta{background-color:var(--cds-tag-background-magenta,#ffd6e8);color:var(--cds-tag-color-magenta,#9f1853)}.cds--tag--magenta.cds--tag--operational{border:1px solid var(--cds-tag-border-magenta,#ff7eb6)}.cds--tag--magenta .cds--tag__close-icon:hover,.cds--tag--magenta.cds--tag--operational:hover{background-color:var(--cds-tag-hover-magenta,#ffbdda)}.cds--tag--magenta .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-magenta,#9f1853)}.cds--tag--purple{background-color:var(--cds-tag-background-purple,#e8daff);color:var(--cds-tag-color-purple,#6929c4)}.cds--tag--purple.cds--tag--operational{border:1px solid var(--cds-tag-border-purple,#be95ff)}.cds--tag--purple .cds--tag__close-icon:hover,.cds--tag--purple.cds--tag--operational:hover{background-color:var(--cds-tag-hover-purple,#dcc7ff)}.cds--tag--purple .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-purple,#6929c4)}.cds--tag--blue{background-color:var(--cds-tag-background-blue,#d0e2ff);color:var(--cds-tag-color-blue,#0043ce)}.cds--tag--blue.cds--tag--operational{border:1px solid var(--cds-tag-border-blue,#78a9ff)}.cds--tag--blue .cds--tag__close-icon:hover,.cds--tag--blue.cds--tag--operational:hover{background-color:var(--cds-tag-hover-blue,#b8d3ff)}.cds--tag--blue .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-blue,#0043ce)}.cds--tag--cyan{background-color:var(--cds-tag-background-cyan,#bae6ff);color:var(--cds-tag-color-cyan,#00539a)}.cds--tag--cyan.cds--tag--operational{border:1px solid var(--cds-tag-border-cyan,#33b1ff)}.cds--tag--cyan .cds--tag__close-icon:hover,.cds--tag--cyan.cds--tag--operational:hover{background-color:var(--cds-tag-hover-cyan,#99daff)}.cds--tag--cyan .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-cyan,#00539a)}.cds--tag--teal{background-color:var(--cds-tag-background-teal,#9ef0f0);color:var(--cds-tag-color-teal,#005d5d)}.cds--tag--teal.cds--tag--operational{border:1px solid var(--cds-tag-border-teal,#08bdba)}.cds--tag--teal .cds--tag__close-icon:hover,.cds--tag--teal.cds--tag--operational:hover{background-color:var(--cds-tag-hover-teal,#57e5e5)}.cds--tag--teal .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-teal,#005d5d)}.cds--tag--green{background-color:var(--cds-tag-background-green,#a7f0ba);color:var(--cds-tag-color-green,#0e6027)}.cds--tag--green.cds--tag--operational{border:1px solid var(--cds-tag-border-green,#42be65)}.cds--tag--green .cds--tag__close-icon:hover,.cds--tag--green.cds--tag--operational:hover{background-color:var(--cds-tag-hover-green,#74e792)}.cds--tag--green .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-green,#0e6027)}.cds--tag--gray{background-color:var(--cds-tag-background-gray,#e0e0e0);color:var(--cds-tag-color-gray,#161616)}.cds--tag--gray.cds--tag--operational{border:1px solid var(--cds-tag-border-gray,#a8a8a8)}.cds--tag--gray .cds--tag__close-icon:hover,.cds--tag--gray.cds--tag--operational:hover{background-color:var(--cds-tag-hover-gray,#d1d1d1)}.cds--tag--gray .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-gray,#161616)}.cds--tag--cool-gray{background-color:var(--cds-tag-background-cool-gray,#dde1e6);color:var(--cds-tag-color-cool-gray,#121619)}.cds--tag--cool-gray.cds--tag--operational{border:1px solid var(--cds-tag-border-cool-gray,#a2a9b0)}.cds--tag--cool-gray .cds--tag__close-icon:hover,.cds--tag--cool-gray.cds--tag--operational:hover{background-color:var(--cds-tag-hover-cool-gray,#cdd3da)}.cds--tag--cool-gray .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-cool-gray,#121619)}.cds--tag--warm-gray{background-color:var(--cds-tag-background-warm-gray,#e5e0df);color:var(--cds-tag-color-warm-gray,#171414)}.cds--tag--warm-gray.cds--tag--operational{border:1px solid var(--cds-tag-border-warm-gray,#ada8a8)}.cds--tag--warm-gray .cds--tag__close-icon:hover,.cds--tag--warm-gray.cds--tag--operational:hover{background-color:var(--cds-tag-hover-warm-gray,#d8d0cf)}.cds--tag--warm-gray .cds--definition-term .cds--tag__label{color:var(--cds-tag-color-warm-gray,#171414)}.cds--tag--high-contrast:not(.cds--tag--operational){background-color:var(--cds-background-inverse,#393939);color:var(--cds-text-inverse,#fff)}.cds--tag--high-contrast:not(.cds--tag--operational).cds--tag--operational{border:1px solid var(--cds-background-inverse,#393939)}.cds--tag--high-contrast:not(.cds--tag--operational) .cds--tag__close-icon:hover,.cds--tag--high-contrast:not(.cds--tag--operational).cds--tag--operational:hover{background-color:var(--cds-background-inverse-hover,#474747)}.cds--tag--high-contrast:not(.cds--tag--operational) .cds--definition-term .cds--tag__label{color:var(--cds-text-inverse,#fff)}.cds--multi-select--readonly .cds--tag--high-contrast:not(.cds--tag--operational) .cds--tag__close-icon:hover{background-color:transparent}.cds--tag--outline:not(.cds--tag--operational):not(span):not([disabled]){background-color:var(--cds-background,#fff);color:var(--cds-text-primary,#161616);outline:1px solid var(--cds-background-inverse,#393939);outline-offset:-1px}.cds--tag--outline:not(.cds--tag--operational):not(span):not([disabled]).cds--tag--operational{border:1px solid var(--cds-background,#fff)}.cds--tag--outline:not(.cds--tag--operational):not(span):not([disabled]) .cds--tag__close-icon:hover,.cds--tag--outline:not(.cds--tag--operational):not(span):not([disabled]).cds--tag--operational:hover{background-color:var(--cds-layer-hover)}.cds--tag--outline:not(.cds--tag--operational):not(span):not([disabled]) .cds--definition-term .cds--tag__label{color:var(--cds-text-primary,#161616)}.cds--tag--disabled:not(.cds--tag--operational),.cds--tag--filter.cds--tag--disabled,.cds--tag--interactive.cds--tag--disabled{background-color:var(--cds-layer);box-shadow:none;color:var(--cds-text-disabled,hsla(0,0%,9%,.25));outline:none}.cds--tag--disabled:not(.cds--tag--operational).cds--tag--operational,.cds--tag--filter.cds--tag--disabled.cds--tag--operational,.cds--tag--interactive.cds--tag--disabled.cds--tag--operational{border:1px solid var(--cds-layer)}.cds--tag--disabled:not(.cds--tag--operational) .cds--tag__close-icon:hover,.cds--tag--disabled:not(.cds--tag--operational).cds--tag--operational:hover,.cds--tag--filter.cds--tag--disabled .cds--tag__close-icon:hover,.cds--tag--filter.cds--tag--disabled.cds--tag--operational:hover,.cds--tag--interactive.cds--tag--disabled .cds--tag__close-icon:hover,.cds--tag--interactive.cds--tag--disabled.cds--tag--operational:hover{background-color:var(--cds-layer)}.cds--tag--disabled:not(.cds--tag--operational) .cds--definition-term .cds--tag__label,.cds--tag--filter.cds--tag--disabled .cds--definition-term .cds--tag__label,.cds--tag--interactive.cds--tag--disabled .cds--definition-term .cds--tag__label{color:var(--cds-text-disabled,hsla(0,0%,9%,.25))}.cds--tag--disabled:not(.cds--tag--operational):hover,.cds--tag--filter.cds--tag--disabled:hover,.cds--tag--interactive.cds--tag--disabled:hover{cursor:not-allowed}.cds--tag--disabled:not(.cds--tag--operational) .cds--tag__label,.cds--tag--filter.cds--tag--disabled .cds--tag__label,.cds--tag--interactive.cds--tag--disabled .cds--tag__label{background-color:var(--cds-layer);color:var(--cds-text-disabled,hsla(0,0%,9%,.25))}.cds--tag--operational.cds--tag--disabled,.cds--tag--selectable.cds--tag--disabled{background-color:var(--cds-layer);border:1px solid var(--cds-border-disabled,#c6c6c6);color:var(--cds-text-disabled,hsla(0,0%,9%,.25))}.cds--tag--operational.cds--tag--disabled:hover,.cds--tag--selectable.cds--tag--disabled:hover{background-color:var(--cds-layer);cursor:not-allowed}.cds--tag--interactive{transition:background-color 70ms cubic-bezier(0,0,.38,.9)}.cds--tag__close-icon{align-items:center;background-color:transparent;block-size:var(--cds-layout-size-height-local);border:0;border-radius:50%;color:currentColor;cursor:pointer;display:flex;flex-shrink:0;inline-size:var(--cds-layout-size-height-local);justify-content:center;margin:0 0 0 .125rem;padding:0;transition:background-color 70ms cubic-bezier(.2,0,.38,.9),box-shadow 70ms cubic-bezier(.2,0,.38,.9)}.cds--tag__close-icon svg{fill:currentColor}.cds--tag__custom-icon{background-color:transparent;block-size:1rem;border:0;color:currentColor;flex-shrink:0;inline-size:1rem;margin-inline-end:.25rem;outline:none;padding:0}.cds--tag__custom-icon svg{fill:currentColor}.cds--tag--disabled .cds--tag__close-icon{cursor:not-allowed}.cds--tag__close-icon:focus{border-radius:50%;box-shadow:inset 0 0 0 1px var(--cds-focus,#0f62fe);outline:none;z-index:99999}.cds--tag--high-contrast .cds--tag__close-icon:focus{box-shadow:inset 0 0 0 1px var(--cds-focus-inverse,#fff)}.cds--tag--filter.cds--tag--disabled .cds--tag__close-icon:hover{background-color:transparent}.cds--tag--filter.cds--tag--disabled svg{fill:var(--cds-icon-disabled,hsla(0,0%,9%,.25))}.cds--tag--sm.cds--tag--filter{padding-inline-end:0}.cds--tag--sm .cds--tag__close-icon{margin-inline-start:.3125rem}.cds--tag.cds--skeleton{background:var(--cds-skeleton-background,#e8e8e8);background-color:var(--cds-skeleton-background,#e8e8e8);border:none;box-shadow:none;color:var(--cds-text-primary,#161616);inline-size:3.75rem;overflow:hidden;padding:0;pointer-events:none;position:relative}.cds--tag.cds--skeleton:active,.cds--tag.cds--skeleton:focus,.cds--tag.cds--skeleton:hover{border:none;cursor:default;outline:none}.cds--tag.cds--skeleton:before{animation:cds--skeleton 3s ease-in-out infinite;background:var(--cds-skeleton-element,#c6c6c6);block-size:100%;content:\"\";inline-size:100%;inset-inline-start:0;position:absolute;will-change:transform-origin,transform,opacity}@media (prefers-reduced-motion:reduce){.cds--tag.cds--skeleton:before{animation:none}}@media (forced-colors:active),screen and (-ms-high-contrast:active){.cds--tag.cds--skeleton{background:CanvasText}.cds--tag.cds--skeleton:before{background:Canvas;forced-color-adjust:none}}.cds--tag.cds--skeleton.cds--tag--operational{border:1px solid var(--cds-skeleton-background,#e8e8e8)}.cds--tag.cds--skeleton .cds--tag__close-icon:hover,.cds--tag.cds--skeleton.cds--tag--operational:hover{background-color:var(--cds-skeleton-background,#e8e8e8)}.cds--tag.cds--skeleton .cds--definition-term .cds--tag__label{color:var(--cds-text-primary,#161616)}@supports (hanging-punctuation:first) and (font:-apple-system-body) and (-webkit-appearance:none){.cds--tag.cds--skeleton{transform:translateZ(0)}}.cds--tag .cds--ai-label .cds--ai-label__button--inline,.cds--tag .cds--slug .cds--slug__button--inline{color:currentColor;margin-inline-start:.0625rem}.cds--tag .cds--ai-label .cds--ai-label__button--inline .cds--ai-label__text:before,.cds--tag .cds--slug .cds--slug__button--inline .cds--slug__text:before{background-color:currentColor}.cds--tag .cds--ai-label .cds--ai-label__button--inline:hover,.cds--tag .cds--slug .cds--slug__button--inline:hover{border-color:currentColor}.cds--tag--filter .cds--ai-label,.cds--tag--filter .cds--slug,.cds--tag--filter .cds--tag__decorator>*{min-inline-size:2.00875rem}.cds--tag .cds--tag__decorator:not(:has(.cds--ai-label)){block-size:1rem;text-align:center}@media (forced-colors:active),screen and (-ms-high-contrast:active){.cds--tag{outline:1px solid transparent}.cds--tag__close-icon:focus{color:Highlight;outline:1px solid Highlight}}.cds--tag-label-tooltip{max-inline-size:-webkit-fill-available}.cds--tag__custom-icon+.cds--tag-label-tooltip{max-inline-size:11rem}.cds--tag--filter .cds--tag__custom-icon+.cds--tag-label-tooltip{max-inline-size:9.875rem}.cds--interactive--tag-children{display:inline-flex;max-inline-size:12.5rem;place-items:center}.cds--tag--filter .cds--tag__custom-icon+span>.cds--interactive--tag-children{max-inline-size:11.5rem}.cds--tag .cds--definition-term{border-block-end:none;cursor:default;max-inline-size:12rem}.cds--tag .cds--tag__custom-icon+span>.cds--definition-term{max-inline-size:11rem}.cds--tag>.cds--popover-container{display:flex}.cds--toggletip-button:has(.cds--tag--operational.cds--tag--disabled){pointer-events:none}.c4p--checklist__header{background-color:var(--cds-layer-01,#f4f4f4);border-block-end:1px solid var(--cds-border-subtle-01,#c6c6c6);display:flex;gap:.5rem;padding:1rem}.c4p--checklist__chart{align-self:center;block-size:2.5rem;inline-size:2.5rem;min-inline-size:2.5rem;position:relative}.c4p--checklist__chart:after{background-color:var(--cds-layer-01,#f4f4f4);block-size:2rem;border-radius:50%;content:\"\";inline-size:2rem;inset-block-start:.25rem;inset-inline-start:.25rem;position:absolute}.c4p--checklist__titles{display:flex;flex-direction:column;justify-content:center}.c4p--checklist__title{font-size:var(--cds-productive-heading-02-font-size,1rem);font-weight:var(--cds-productive-heading-02-font-weight,600);letter-spacing:var(--cds-productive-heading-02-letter-spacing,0);line-height:var(--cds-productive-heading-02-line-height,1.375)}.c4p--checklist__chart-label,.c4p--checklist__title{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis}.c4p--checklist__chart-label{color:var(--cds-text-secondary,#525252);font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333)}.c4p--checklist__title+.c4p--checklist__chart-label{margin-block-start:.125rem}.c4p--checklist__header .cds--tooltip{block-size:2rem;margin-block-start:-.5rem;margin-inline:auto -.5rem}.c4p--checklist__chevron{color:var(--cds-text-primary,#161616);transform:rotate(0deg);transition:all .11s cubic-bezier(.2,0,.38,.9)}@media (prefers-reduced-motion:reduce){.c4p--checklist__chevron{transition:none}}.c4p--checklist__closed .c4p--checklist__chevron{transform:rotate(-180deg)}.c4p--checklist__button.cds--btn--primary{background-color:transparent;border:none;color:var(--cds-link-primary,#0f62fe);flex-shrink:unset;font-size:var(--cds-body-short-01-font-size,.875rem);font-weight:var(--cds-body-short-01-font-weight,400);letter-spacing:var(--cds-body-short-01-letter-spacing,.16px);line-height:var(--cds-body-short-01-line-height,1.28572);max-inline-size:none;min-block-size:auto;padding:0}.c4p--checklist__button.cds--btn--primary div{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis}.c4p--checklist__button.cds--btn--primary:hover{background:transparent;color:var(--cds-link-primary-hover,#0043ce);text-decoration:underline}.c4p--checklist__button.cds--btn--primary:active{background:transparent;color:var(--cds-text-primary,#161616);text-decoration:underline}.c4p--checklist__content-outer{overflow:hidden}.c4p--checklist__content-inner{background-color:var(--cds-layer-01,#f4f4f4);block-size:100%;transform:translate(0);transition:all .11s cubic-bezier(.2,0,.38,.9)}@media (prefers-reduced-motion:reduce){.c4p--checklist__content-inner{transition:none}}.c4p--checklist__closed .c4p--checklist__content-inner{block-size:0;transform:translateY(-100%)}.c4p--checklist__list-group{border-block-start:1px solid var(--cds-border-subtle-01,#c6c6c6);padding:1rem}.c4p--checklist__list-group:first-of-type{border-block-start:none}.c4p--checklist__list-title{display:-webkit-box;font-size:var(--cds-body-short-01-font-size,.875rem);font-weight:var(--cds-body-short-01-font-weight,400);letter-spacing:var(--cds-body-short-01-letter-spacing,.16px);line-height:var(--cds-body-short-01-line-height,1.28572);overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;margin-block-end:.5rem;text-overflow:ellipsis}.c4p--checklist__list-item{display:flex;margin-block-end:.5rem}.c4p--checklist__list-item:last-child{margin-block-end:0}.c4p--checklist__icon{color:var(--cds-icon-primary,#161616);margin:.0625rem .5rem 0 0}.c4p--checklist__icon--checked,.c4p--checklist__icon--indeterminate{color:var(--cds-interactive,#0f62fe)}.c4p--checklist__icon--error{color:var(--cds-support-error,#da1e28)}.c4p--checklist__icon--disabled{color:var(--cds-icon-disabled,hsla(0,0%,9%,.25))}.c4p--checklist__label{display:-webkit-box;font-size:var(--cds-body-short-01-font-size,.875rem);font-weight:var(--cds-body-short-01-font-weight,400);letter-spacing:var(--cds-body-short-01-letter-spacing,.16px);line-height:var(--cds-body-short-01-line-height,1.28572);overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis}.c4p--checklist__label--disabled{color:var(--cds-text-disabled,hsla(0,0%,9%,.25))}.c4p--checklist__footer{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;border-block-start:1px solid var(--cds-border-subtle-01,#c6c6c6);padding:.5rem 1rem;text-overflow:ellipsis}:host(c4p-checklist) .c4p--checklist__toggle{margin-block-start:-.5rem;margin-inline:auto -.5rem}:host(c4p-checklist-item){display:flex;margin-block-end:.5rem}:host(c4p-checklist-item:last-of-type){margin-block-end:0}:host(c4p-checklist-group){border-block-start:1px solid var(--cds-border-subtle-01,#c6c6c6);display:block;padding:1rem}:host(c4p-checklist-group:first-of-type){border-block-start:none}.c4p--checklist__label--clickable{color:var(--cds-link-primary,#0f62fe);cursor:pointer}.c4p--checklist__label--clickable:hover{color:var(--cds-link-primary-hover,#0043ce);text-decoration:underline}.c4p--checklist__chart{background-image:conic-gradient(#a56eff var(--c4p-num-degrees),var(--cds-tag-background-gray,#e0e0e0) var(--c4p-num-degrees) 1turn);border-radius:50%}"]);
11
+
12
+ export { styles as default };
13
+ //# sourceMappingURL=checklist.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -0,0 +1,7 @@
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
+ import './index.ts';
@@ -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