@carbon/ibm-products-web-components
Version:
Carbon for IBM Products Web Components
56 lines (54 loc) • 1.73 kB
JavaScript
/**
* Copyright IBM Corp. 2020, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import "../../globals/settings.js";
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.127.0/helpers/decorate.js";
import checklist_default from "./checklist.scss.js";
import { LitElement, html } from "lit";
import { property } from "lit/decorators.js";
import { carbonElement } from "@carbon/web-components/es/globals/decorators/carbon-element.js";
//#region src/components/checklist/checklist-group.ts
/**
* @license
*
* Copyright IBM Corp. 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Sections in c4p-checklist
* @element c4p-checklist-group
* @slot default - Contains one or more `c4p-checklist-item` components
*/
let CDSChecklistGroup = class CDSChecklistGroup extends LitElement {
_updateAttributes() {
this.classList.add(`c4p--checklist__list-group`);
}
firstUpdated() {
this._updateAttributes();
}
render() {
const { title } = this;
return html`
${title && html`<h3 title=${title} class="${"c4p"}--checklist__list-title">
${title}
</h3>`}
<ol class="${"c4p"}--checklist__list">
<slot></slot>
</ol>
`;
}
static {
this.styles = checklist_default;
}
};
__decorate([property()], CDSChecklistGroup.prototype, "title", void 0);
CDSChecklistGroup = __decorate([carbonElement(`c4p-checklist-group`)], CDSChecklistGroup);
var checklist_group_default = CDSChecklistGroup;
//#endregion
export { checklist_group_default as default };
//# sourceMappingURL=checklist-group.js.map