@carbon/ibm-products-web-components
Version:
Carbon for IBM Products Web Components
59 lines (55 loc) • 1.68 kB
JavaScript
/**
* Copyright IBM Corp. 2024
*
* 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 { __decorate } from 'tslib';
import { LitElement, html } from 'lit';
import { property } from 'lit/decorators.js';
import { carbonElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
import { prefix } from '../../globals/settings.js';
import styles from './checklist.scss.js';
/**
* @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(`${prefix}--checklist__list-group`);
}
firstUpdated() {
this._updateAttributes();
}
render() {
const { title } = this;
return html `
${title &&
html `<h3 title=${title} class="${prefix}--checklist__list-title">
${title}
</h3>`}
<ol class="${prefix}--checklist__list">
<slot></slot>
</ol>
`;
}
};
CDSChecklistGroup.styles = styles;
__decorate([
property()
], CDSChecklistGroup.prototype, "title", void 0);
CDSChecklistGroup = __decorate([
carbonElement(`${prefix}-checklist-group`)
], CDSChecklistGroup);
var CDSChecklistGroup$1 = CDSChecklistGroup;
export { CDSChecklistGroup$1 as default };
//# sourceMappingURL=checklist-group.js.map