@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.
Files changed (76) hide show
  1. package/custom-elements.json +315 -52
  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/components/interstitial-screen/interstitial-screen-footer.d.ts +1 -1
  29. package/es/components/interstitial-screen/interstitial-screen-footer.js +1 -1
  30. package/es/components/page-header/page-header-title-breadcrumb.d.ts +1 -1
  31. package/es/components/page-header/page-header-title-breadcrumb.js +1 -1
  32. package/es/packages/ibm-products-web-components/package.json.js +1 -1
  33. package/es-custom/components/checklist/checklist-chart.d.ts +25 -0
  34. package/es-custom/components/checklist/checklist-chart.js +81 -0
  35. package/es-custom/components/checklist/checklist-chart.js.map +1 -0
  36. package/es-custom/components/checklist/checklist-group.d.ts +25 -0
  37. package/es-custom/components/checklist/checklist-group.js +58 -0
  38. package/es-custom/components/checklist/checklist-group.js.map +1 -0
  39. package/es-custom/components/checklist/checklist-icon.d.ts +26 -0
  40. package/es-custom/components/checklist/checklist-icon.js +72 -0
  41. package/es-custom/components/checklist/checklist-icon.js.map +1 -0
  42. package/es-custom/components/checklist/checklist-item.d.ts +40 -0
  43. package/es-custom/components/checklist/checklist-item.js +122 -0
  44. package/es-custom/components/checklist/checklist-item.js.map +1 -0
  45. package/es-custom/components/checklist/checklist.d.ts +71 -0
  46. package/es-custom/components/checklist/checklist.js +187 -0
  47. package/es-custom/components/checklist/checklist.js.map +1 -0
  48. package/es-custom/components/checklist/checklist.scss.js +13 -0
  49. package/es-custom/components/checklist/checklist.scss.js.map +1 -0
  50. package/es-custom/components/checklist/checklist.test.d.ts +7 -0
  51. package/es-custom/components/checklist/checklist.test.js +172 -0
  52. package/es-custom/components/checklist/checklist.test.js.map +1 -0
  53. package/es-custom/components/checklist/checklist.types.d.ts +22 -0
  54. package/es-custom/components/checklist/checklist.types.js +32 -0
  55. package/es-custom/components/checklist/checklist.types.js.map +1 -0
  56. package/es-custom/components/checklist/index.d.ts +13 -0
  57. package/es-custom/components/checklist/index.js +13 -0
  58. package/es-custom/components/checklist/index.js.map +1 -0
  59. package/es-custom/components/interstitial-screen/interstitial-screen-footer.d.ts +1 -1
  60. package/es-custom/components/interstitial-screen/interstitial-screen-footer.js +1 -1
  61. package/es-custom/components/page-header/page-header-title-breadcrumb.d.ts +1 -1
  62. package/es-custom/components/page-header/page-header-title-breadcrumb.js +1 -1
  63. package/es-custom/packages/ibm-products-web-components/package.json.js +1 -1
  64. package/lib/components/checklist/checklist-chart.d.ts +25 -0
  65. package/lib/components/checklist/checklist-group.d.ts +25 -0
  66. package/lib/components/checklist/checklist-icon.d.ts +26 -0
  67. package/lib/components/checklist/checklist-item.d.ts +40 -0
  68. package/lib/components/checklist/checklist.d.ts +71 -0
  69. package/lib/components/checklist/checklist.test.d.ts +7 -0
  70. package/lib/components/checklist/checklist.types.d.ts +22 -0
  71. package/lib/components/checklist/index.d.ts +13 -0
  72. package/lib/components/interstitial-screen/interstitial-screen-footer.d.ts +1 -1
  73. package/lib/components/page-header/page-header-title-breadcrumb.d.ts +1 -1
  74. package/package.json +3 -3
  75. package/scss/components/checklist/checklist.scss +65 -0
  76. package/telemetry.yml +26 -5
@@ -128,16 +128,16 @@
128
128
  "type": "SetOfActions"
129
129
  },
130
130
  {
131
- "name": "set-of-users",
132
- "type": "SetOfUsers"
131
+ "name": "set-of-breadcrumbs",
132
+ "type": "SetOfBreadcrumbs"
133
133
  },
134
134
  {
135
135
  "name": "set-of-tags",
136
136
  "type": "SetOfTags"
137
137
  },
138
138
  {
139
- "name": "set-of-breadcrumbs",
140
- "type": "SetOfBreadcrumbs"
139
+ "name": "set-of-users",
140
+ "type": "SetOfUsers"
141
141
  }
142
142
  ],
143
143
  "events": [
@@ -151,6 +151,269 @@
151
151
  }
152
152
  ]
153
153
  },
154
+ {
155
+ "name": "c4p-checklist-chart",
156
+ "path": "./src/components/checklist/checklist-chart.ts",
157
+ "attributes": [
158
+ {
159
+ "name": "value",
160
+ "description": "A number between 0 and 1 which indicates the progress of checklist",
161
+ "type": "number",
162
+ "default": "0"
163
+ }
164
+ ],
165
+ "properties": [
166
+ {
167
+ "name": "styles",
168
+ "default": "\"styles\""
169
+ },
170
+ {
171
+ "name": "value",
172
+ "attribute": "value",
173
+ "description": "A number between 0 and 1 which indicates the progress of checklist",
174
+ "type": "number",
175
+ "default": "0"
176
+ }
177
+ ]
178
+ },
179
+ {
180
+ "name": "c4p-checklist-group",
181
+ "path": "./src/components/checklist/checklist-group.ts",
182
+ "description": "Sections in c4p-checklist",
183
+ "attributes": [
184
+ {
185
+ "name": "title",
186
+ "description": "Title text of the c4p-checklist-group"
187
+ }
188
+ ],
189
+ "properties": [
190
+ {
191
+ "name": "title",
192
+ "attribute": "title",
193
+ "description": "Title text of the c4p-checklist-group"
194
+ },
195
+ {
196
+ "name": "styles",
197
+ "default": "\"styles\""
198
+ }
199
+ ],
200
+ "slots": [
201
+ {
202
+ "name": "default",
203
+ "description": "Contains one or more `c4p-checklist-item` components"
204
+ }
205
+ ]
206
+ },
207
+ {
208
+ "name": "c4p-checklist-icon",
209
+ "path": "./src/components/checklist/checklist-icon.ts",
210
+ "attributes": [
211
+ {
212
+ "name": "kind",
213
+ "description": "The icon to be displayed.\nValues can be 'unchecked', 'indeterminate', 'checked', 'error', 'disabled'",
214
+ "type": "Kinds",
215
+ "default": "\"unchecked\""
216
+ }
217
+ ],
218
+ "properties": [
219
+ {
220
+ "name": "kind",
221
+ "attribute": "kind",
222
+ "description": "The icon to be displayed.\nValues can be 'unchecked', 'indeterminate', 'checked', 'error', 'disabled'",
223
+ "type": "Kinds",
224
+ "default": "\"unchecked\""
225
+ },
226
+ {
227
+ "name": "styles",
228
+ "default": "\"styles\""
229
+ }
230
+ ]
231
+ },
232
+ {
233
+ "name": "c4p-checklist-item",
234
+ "path": "./src/components/checklist/checklist-item.ts",
235
+ "description": "item in c4p-checklist-group",
236
+ "attributes": [
237
+ {
238
+ "name": "label",
239
+ "description": "label of the c4p-checklist-item"
240
+ },
241
+ {
242
+ "name": "status",
243
+ "description": "status of the c4p-checklist-item\nValues can be 'not started', 'in progress', 'completed', 'error', 'disabled'"
244
+ },
245
+ {
246
+ "name": "clickable",
247
+ "description": "When true, makes the checklist item label clickable",
248
+ "type": "boolean",
249
+ "default": "false"
250
+ }
251
+ ],
252
+ "properties": [
253
+ {
254
+ "name": "label",
255
+ "attribute": "label",
256
+ "description": "label of the c4p-checklist-item"
257
+ },
258
+ {
259
+ "name": "status",
260
+ "attribute": "status",
261
+ "description": "status of the c4p-checklist-item\nValues can be 'not started', 'in progress', 'completed', 'error', 'disabled'"
262
+ },
263
+ {
264
+ "name": "clickable",
265
+ "attribute": "clickable",
266
+ "description": "When true, makes the checklist item label clickable",
267
+ "type": "boolean",
268
+ "default": "false"
269
+ },
270
+ {
271
+ "name": "styles",
272
+ "default": "\"styles\""
273
+ }
274
+ ],
275
+ "events": [
276
+ {
277
+ "name": "c4p-checklist-item-clicked",
278
+ "description": "The custom event which is fired when a user clicks on checklist item with clickable attribute."
279
+ }
280
+ ],
281
+ "slots": [
282
+ {
283
+ "name": "icon",
284
+ "description": "checklist item icon, usually a status indicator icon"
285
+ },
286
+ {
287
+ "name": "content",
288
+ "description": "checklist item title/description"
289
+ }
290
+ ]
291
+ },
292
+ {
293
+ "name": "c4p-checklist",
294
+ "path": "./src/components/checklist/checklist.ts",
295
+ "attributes": [
296
+ {
297
+ "name": "open",
298
+ "description": "Specifies whether the component is opened or closed.",
299
+ "type": "boolean",
300
+ "default": "false"
301
+ },
302
+ {
303
+ "name": "title",
304
+ "description": "The title of the component."
305
+ },
306
+ {
307
+ "name": "chart-label",
308
+ "description": "The label for progress indicator chart"
309
+ },
310
+ {
311
+ "name": "chart-value",
312
+ "description": "A number between 0 and 1 which indicates the progress of checklist"
313
+ },
314
+ {
315
+ "name": "disable-toggle",
316
+ "description": "Whether or not to show the open/close toggle.",
317
+ "type": "boolean",
318
+ "default": "false"
319
+ },
320
+ {
321
+ "name": "toggle-label",
322
+ "description": "The label for the toggle's tooltip."
323
+ },
324
+ {
325
+ "name": "toggle-label-align",
326
+ "description": "The alignment of the toggle's tooltip."
327
+ },
328
+ {
329
+ "name": "toggle-aria-label",
330
+ "description": "Aria-label for the Checklist's toggle component."
331
+ },
332
+ {
333
+ "name": "view-all-label",
334
+ "description": "If defined, will show and enable the \"View all (#)\" button in the checklist footer."
335
+ }
336
+ ],
337
+ "properties": [
338
+ {
339
+ "name": "open",
340
+ "attribute": "open",
341
+ "description": "Specifies whether the component is opened or closed.",
342
+ "type": "boolean",
343
+ "default": "false"
344
+ },
345
+ {
346
+ "name": "title",
347
+ "attribute": "title",
348
+ "description": "The title of the component."
349
+ },
350
+ {
351
+ "name": "chartLabel",
352
+ "attribute": "chart-label",
353
+ "description": "The label for progress indicator chart"
354
+ },
355
+ {
356
+ "name": "chartValue",
357
+ "attribute": "chart-value",
358
+ "description": "A number between 0 and 1 which indicates the progress of checklist"
359
+ },
360
+ {
361
+ "name": "disableToggle",
362
+ "attribute": "disable-toggle",
363
+ "description": "Whether or not to show the open/close toggle.",
364
+ "type": "boolean",
365
+ "default": "false"
366
+ },
367
+ {
368
+ "name": "toggleLabel",
369
+ "attribute": "toggle-label",
370
+ "description": "The label for the toggle's tooltip."
371
+ },
372
+ {
373
+ "name": "toggleLabelAlign",
374
+ "attribute": "toggle-label-align",
375
+ "description": "The alignment of the toggle's tooltip."
376
+ },
377
+ {
378
+ "name": "toggleAriaLabel",
379
+ "attribute": "toggle-aria-label",
380
+ "description": "Aria-label for the Checklist's toggle component."
381
+ },
382
+ {
383
+ "name": "viewAllLabel",
384
+ "attribute": "view-all-label",
385
+ "description": "If defined, will show and enable the \"View all (#)\" button in the checklist footer."
386
+ },
387
+ {
388
+ "name": "styles",
389
+ "default": "\"styles\""
390
+ }
391
+ ],
392
+ "events": [
393
+ {
394
+ "name": "c4p-checklist-view-all",
395
+ "description": "The custom event which is fired when a user clicks on View All button in checklist footer."
396
+ },
397
+ {
398
+ "name": "c4p-checklist-toggle",
399
+ "description": "The custom event which is fired when user clicks on toggle button in checklist header."
400
+ }
401
+ ],
402
+ "slots": [
403
+ {
404
+ "name": "checklist-header",
405
+ "description": "Header area which includes the title and the progress indicator."
406
+ },
407
+ {
408
+ "name": "default",
409
+ "description": "Contains one or more `c4p-checklist-group` components to organize tasks into logical groups."
410
+ },
411
+ {
412
+ "name": "checklist-footer",
413
+ "description": "Optional footer area for actions like buttons, links, or additional notes."
414
+ }
415
+ ]
416
+ },
154
417
  {
155
418
  "name": "c4p-full-page-error",
156
419
  "path": "./src/components/full-page-error/full-page-error.ts",
@@ -328,16 +591,16 @@
328
591
  "type": "SetOfActions"
329
592
  },
330
593
  {
331
- "name": "set-of-users",
332
- "type": "SetOfUsers"
594
+ "name": "set-of-breadcrumbs",
595
+ "type": "SetOfBreadcrumbs"
333
596
  },
334
597
  {
335
598
  "name": "set-of-tags",
336
599
  "type": "SetOfTags"
337
600
  },
338
601
  {
339
- "name": "set-of-breadcrumbs",
340
- "type": "SetOfBreadcrumbs"
602
+ "name": "set-of-users",
603
+ "type": "SetOfUsers"
341
604
  }
342
605
  ]
343
606
  },
@@ -395,16 +658,16 @@
395
658
  "type": "SetOfActions"
396
659
  },
397
660
  {
398
- "name": "set-of-users",
399
- "type": "SetOfUsers"
661
+ "name": "set-of-breadcrumbs",
662
+ "type": "SetOfBreadcrumbs"
400
663
  },
401
664
  {
402
665
  "name": "set-of-tags",
403
666
  "type": "SetOfTags"
404
667
  },
405
668
  {
406
- "name": "set-of-breadcrumbs",
407
- "type": "SetOfBreadcrumbs"
669
+ "name": "set-of-users",
670
+ "type": "SetOfUsers"
408
671
  }
409
672
  ],
410
673
  "events": [
@@ -582,16 +845,16 @@
582
845
  "type": "SetOfActions"
583
846
  },
584
847
  {
585
- "name": "set-of-users",
586
- "type": "SetOfUsers"
848
+ "name": "set-of-breadcrumbs",
849
+ "type": "SetOfBreadcrumbs"
587
850
  },
588
851
  {
589
852
  "name": "set-of-tags",
590
853
  "type": "SetOfTags"
591
854
  },
592
855
  {
593
- "name": "set-of-breadcrumbs",
594
- "type": "SetOfBreadcrumbs"
856
+ "name": "set-of-users",
857
+ "type": "SetOfUsers"
595
858
  },
596
859
  {
597
860
  "name": "hasThreeButtons",
@@ -773,16 +1036,16 @@
773
1036
  "type": "SetOfActions"
774
1037
  },
775
1038
  {
776
- "name": "set-of-users",
777
- "type": "SetOfUsers"
1039
+ "name": "set-of-breadcrumbs",
1040
+ "type": "SetOfBreadcrumbs"
778
1041
  },
779
1042
  {
780
1043
  "name": "set-of-tags",
781
1044
  "type": "SetOfTags"
782
1045
  },
783
1046
  {
784
- "name": "set-of-breadcrumbs",
785
- "type": "SetOfBreadcrumbs"
1047
+ "name": "set-of-users",
1048
+ "type": "SetOfUsers"
786
1049
  }
787
1050
  ]
788
1051
  },
@@ -911,16 +1174,16 @@
911
1174
  "type": "SetOfActions"
912
1175
  },
913
1176
  {
914
- "name": "set-of-users",
915
- "type": "SetOfUsers"
1177
+ "name": "set-of-breadcrumbs",
1178
+ "type": "SetOfBreadcrumbs"
916
1179
  },
917
1180
  {
918
1181
  "name": "set-of-tags",
919
1182
  "type": "SetOfTags"
920
1183
  },
921
1184
  {
922
- "name": "set-of-breadcrumbs",
923
- "type": "SetOfBreadcrumbs"
1185
+ "name": "set-of-users",
1186
+ "type": "SetOfUsers"
924
1187
  }
925
1188
  ],
926
1189
  "events": [
@@ -989,16 +1252,16 @@
989
1252
  "type": "SetOfActions"
990
1253
  },
991
1254
  {
992
- "name": "set-of-users",
993
- "type": "SetOfUsers"
1255
+ "name": "set-of-breadcrumbs",
1256
+ "type": "SetOfBreadcrumbs"
994
1257
  },
995
1258
  {
996
1259
  "name": "set-of-tags",
997
1260
  "type": "SetOfTags"
998
1261
  },
999
1262
  {
1000
- "name": "set-of-breadcrumbs",
1001
- "type": "SetOfBreadcrumbs"
1263
+ "name": "set-of-users",
1264
+ "type": "SetOfUsers"
1002
1265
  }
1003
1266
  ],
1004
1267
  "events": [
@@ -1139,16 +1402,16 @@
1139
1402
  "type": "SetOfActions"
1140
1403
  },
1141
1404
  {
1142
- "name": "set-of-users",
1143
- "type": "SetOfUsers"
1405
+ "name": "set-of-breadcrumbs",
1406
+ "type": "SetOfBreadcrumbs"
1144
1407
  },
1145
1408
  {
1146
1409
  "name": "set-of-tags",
1147
1410
  "type": "SetOfTags"
1148
1411
  },
1149
1412
  {
1150
- "name": "set-of-breadcrumbs",
1151
- "type": "SetOfBreadcrumbs"
1413
+ "name": "set-of-users",
1414
+ "type": "SetOfUsers"
1152
1415
  }
1153
1416
  ],
1154
1417
  "events": [
@@ -1249,16 +1512,16 @@
1249
1512
  "type": "SetOfActions"
1250
1513
  },
1251
1514
  {
1252
- "name": "set-of-users",
1253
- "type": "SetOfUsers"
1515
+ "name": "set-of-breadcrumbs",
1516
+ "type": "SetOfBreadcrumbs"
1254
1517
  },
1255
1518
  {
1256
1519
  "name": "set-of-tags",
1257
1520
  "type": "SetOfTags"
1258
1521
  },
1259
1522
  {
1260
- "name": "set-of-breadcrumbs",
1261
- "type": "SetOfBreadcrumbs"
1523
+ "name": "set-of-users",
1524
+ "type": "SetOfUsers"
1262
1525
  }
1263
1526
  ],
1264
1527
  "events": [
@@ -1364,16 +1627,16 @@
1364
1627
  "type": "SetOfActions"
1365
1628
  },
1366
1629
  {
1367
- "name": "set-of-users",
1368
- "type": "SetOfUsers"
1630
+ "name": "set-of-breadcrumbs",
1631
+ "type": "SetOfBreadcrumbs"
1369
1632
  },
1370
1633
  {
1371
1634
  "name": "set-of-tags",
1372
1635
  "type": "SetOfTags"
1373
1636
  },
1374
1637
  {
1375
- "name": "set-of-breadcrumbs",
1376
- "type": "SetOfBreadcrumbs"
1638
+ "name": "set-of-users",
1639
+ "type": "SetOfUsers"
1377
1640
  }
1378
1641
  ],
1379
1642
  "events": [
@@ -3058,16 +3321,16 @@
3058
3321
  "type": "SetOfActions"
3059
3322
  },
3060
3323
  {
3061
- "name": "set-of-users",
3062
- "type": "SetOfUsers"
3324
+ "name": "set-of-breadcrumbs",
3325
+ "type": "SetOfBreadcrumbs"
3063
3326
  },
3064
3327
  {
3065
3328
  "name": "set-of-tags",
3066
3329
  "type": "SetOfTags"
3067
3330
  },
3068
3331
  {
3069
- "name": "set-of-breadcrumbs",
3070
- "type": "SetOfBreadcrumbs"
3332
+ "name": "set-of-users",
3333
+ "type": "SetOfUsers"
3071
3334
  }
3072
3335
  ],
3073
3336
  "events": [
@@ -3241,16 +3504,16 @@
3241
3504
  "type": "SetOfActions"
3242
3505
  },
3243
3506
  {
3244
- "name": "set-of-users",
3245
- "type": "SetOfUsers"
3507
+ "name": "set-of-breadcrumbs",
3508
+ "type": "SetOfBreadcrumbs"
3246
3509
  },
3247
3510
  {
3248
3511
  "name": "set-of-tags",
3249
3512
  "type": "SetOfTags"
3250
3513
  },
3251
3514
  {
3252
- "name": "set-of-breadcrumbs",
3253
- "type": "SetOfBreadcrumbs"
3515
+ "name": "set-of-users",
3516
+ "type": "SetOfUsers"
3254
3517
  }
3255
3518
  ],
3256
3519
  "events": [
@@ -3617,16 +3880,16 @@
3617
3880
  "type": "SetOfActions"
3618
3881
  },
3619
3882
  {
3620
- "name": "set-of-users",
3621
- "type": "SetOfUsers"
3883
+ "name": "set-of-breadcrumbs",
3884
+ "type": "SetOfBreadcrumbs"
3622
3885
  },
3623
3886
  {
3624
3887
  "name": "set-of-tags",
3625
3888
  "type": "SetOfTags"
3626
3889
  },
3627
3890
  {
3628
- "name": "set-of-breadcrumbs",
3629
- "type": "SetOfBreadcrumbs"
3891
+ "name": "set-of-users",
3892
+ "type": "SetOfUsers"
3630
3893
  }
3631
3894
  ]
3632
3895
  }
@@ -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;