From 22917d7e355cd93d46d12a57c9db005f7707b059 Mon Sep 17 00:00:00 2001 From: Will Martin Date: Thu, 22 Jan 2026 12:50:13 -0500 Subject: [PATCH] add jsdoc class comments to libs/components Co-authored-by: Claude --- libs/components/src/a11y/a11y-title.directive.ts | 3 +++ libs/components/src/a11y/aria-disable.directive.ts | 3 +++ .../src/a11y/aria-disabled-click-capture.service.ts | 3 +++ .../src/anon-layout/anon-layout-wrapper.component.ts | 3 +++ libs/components/src/anon-layout/anon-layout.component.ts | 3 +++ .../default-anon-layout-wrapper-data.service.ts | 3 +++ libs/components/src/app/app.component.ts | 3 +++ libs/components/src/app/app.module.ts | 3 +++ .../components/src/async-actions/async-actions.module.ts | 3 +++ libs/components/src/avatar/avatar.module.ts | 3 +++ libs/components/src/badge-list/badge-list.module.ts | 3 +++ libs/components/src/badge/badge.module.ts | 3 +++ libs/components/src/banner/banner.module.ts | 3 +++ libs/components/src/breadcrumbs/breadcrumbs.module.ts | 3 +++ libs/components/src/button/button.component.ts | 3 +++ libs/components/src/button/button.module.ts | 3 +++ libs/components/src/callout/callout.module.ts | 3 +++ .../components/src/card/base-card/base-card.directive.ts | 3 +++ libs/components/src/card/card-content.component.ts | 3 +++ libs/components/src/card/card.component.ts | 3 +++ libs/components/src/checkbox/checkbox.component.ts | 3 +++ libs/components/src/checkbox/checkbox.module.ts | 3 +++ .../src/color-password/color-password.module.ts | 3 +++ libs/components/src/copy-click/copy-click.directive.ts | 3 +++ libs/components/src/dialog/dialog.module.ts | 3 +++ libs/components/src/dialog/dialog.service.ts | 9 +++++++++ libs/components/src/dialog/dialog/dialog.component.ts | 4 ++++ .../src/dialog/directives/dialog-close.directive.ts | 3 +++ .../directives/dialog-title-container.directive.ts | 3 +++ .../simple-configurable-dialog.component.ts | 3 +++ .../src/dialog/simple-dialog/simple-dialog.component.ts | 6 ++++++ libs/components/src/drawer/drawer.module.ts | 3 +++ libs/components/src/drawer/drawer.service.ts | 3 +++ .../src/form-control/form-control.abstraction.ts | 3 +++ libs/components/src/form-control/form-control.module.ts | 3 +++ libs/components/src/form-field/form-field-control.ts | 3 +++ libs/components/src/form-field/form-field.module.ts | 3 +++ libs/components/src/icon-button/icon-button.module.ts | 3 +++ libs/components/src/icon/icon.module.ts | 3 +++ libs/components/src/input/input.directive.ts | 3 +++ libs/components/src/input/input.module.ts | 3 +++ libs/components/src/item/item.module.ts | 3 +++ libs/components/src/link/link.module.ts | 3 +++ libs/components/src/menu/menu.module.ts | 3 +++ libs/components/src/multi-select/multi-select.module.ts | 3 +++ libs/components/src/navigation/navigation.module.ts | 3 +++ libs/components/src/navigation/side-nav.service.ts | 3 +++ libs/components/src/no-items/no-items.module.ts | 3 +++ libs/components/src/popover/popover.module.ts | 3 +++ libs/components/src/progress/progress.module.ts | 3 +++ .../src/radio-button/radio-button.component.ts | 3 +++ libs/components/src/radio-button/radio-button.module.ts | 3 +++ .../components/src/radio-button/radio-group.component.ts | 3 +++ .../components/src/radio-button/radio-input.component.ts | 3 +++ libs/components/src/search/search.module.ts | 3 +++ libs/components/src/select/option.component.ts | 3 +++ libs/components/src/select/select.component.ts | 3 +++ libs/components/src/select/select.module.ts | 3 +++ libs/components/src/shared/button-like.abstraction.ts | 3 +++ libs/components/src/shared/shared.module.ts | 3 +++ libs/components/src/spinner/spinner.component.ts | 3 +++ libs/components/src/stepper/stepper.module.ts | 3 +++ .../stories/kitchen-sink/kitchen-sink-shared.module.ts | 3 +++ libs/components/src/table/table.module.ts | 3 +++ libs/components/src/tabs/tabs.module.ts | 3 +++ libs/components/src/toast/toast.module.ts | 3 +++ libs/components/src/toggle-group/toggle-group.module.ts | 3 +++ libs/components/src/typography/typography.module.ts | 3 +++ 68 files changed, 214 insertions(+) diff --git a/libs/components/src/a11y/a11y-title.directive.ts b/libs/components/src/a11y/a11y-title.directive.ts index 75c2967805f..067cbe2d312 100644 --- a/libs/components/src/a11y/a11y-title.directive.ts +++ b/libs/components/src/a11y/a11y-title.directive.ts @@ -2,6 +2,9 @@ import { Directive, effect, ElementRef, input } from "@angular/core"; import { setA11yTitleAndAriaLabel } from "./set-a11y-title-and-aria-label"; +/** + * Directive that applies accessibility title and aria-label attributes to elements. + */ @Directive({ selector: "[appA11yTitle]", }) diff --git a/libs/components/src/a11y/aria-disable.directive.ts b/libs/components/src/a11y/aria-disable.directive.ts index 8236e178994..a79d55c84a0 100644 --- a/libs/components/src/a11y/aria-disable.directive.ts +++ b/libs/components/src/a11y/aria-disable.directive.ts @@ -2,6 +2,9 @@ import { Directive, inject } from "@angular/core"; import { AriaDisabledClickCaptureService } from "./aria-disabled-click-capture.service"; +/** + * Directive that marks elements with aria-disable attribute for click capture handling. + */ @Directive({ host: { "[attr.bit-aria-disable]": "true", diff --git a/libs/components/src/a11y/aria-disabled-click-capture.service.ts b/libs/components/src/a11y/aria-disabled-click-capture.service.ts index 78f45acc80a..4f3723022da 100644 --- a/libs/components/src/a11y/aria-disabled-click-capture.service.ts +++ b/libs/components/src/a11y/aria-disabled-click-capture.service.ts @@ -1,5 +1,8 @@ import { Injectable, Inject, NgZone, OnDestroy, DOCUMENT } from "@angular/core"; +/** + * Service that captures and prevents clicks on elements marked with aria-disabled. + */ @Injectable({ providedIn: "root" }) export class AriaDisabledClickCaptureService implements OnDestroy { private listener!: (e: MouseEvent | KeyboardEvent) => void; diff --git a/libs/components/src/anon-layout/anon-layout-wrapper.component.ts b/libs/components/src/anon-layout/anon-layout-wrapper.component.ts index 553da0c541b..99e8de5b75b 100644 --- a/libs/components/src/anon-layout/anon-layout-wrapper.component.ts +++ b/libs/components/src/anon-layout/anon-layout-wrapper.component.ts @@ -46,6 +46,9 @@ export interface AnonLayoutWrapperData { hideBackgroundIllustration?: boolean; } +/** + * Wrapper component that manages anonymous layout page data from routes and services. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/anon-layout/anon-layout.component.ts b/libs/components/src/anon-layout/anon-layout.component.ts index e6572a0c3c1..9f8f1b47f82 100644 --- a/libs/components/src/anon-layout/anon-layout.component.ts +++ b/libs/components/src/anon-layout/anon-layout.component.ts @@ -28,6 +28,9 @@ import { TypographyModule } from "../typography"; export type AnonLayoutMaxWidth = "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"; +/** + * Anonymous layout component for unauthenticated pages with customizable title, subtitle, and icon. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/anon-layout/default-anon-layout-wrapper-data.service.ts b/libs/components/src/anon-layout/default-anon-layout-wrapper-data.service.ts index e1499b20377..fdca076ceac 100644 --- a/libs/components/src/anon-layout/default-anon-layout-wrapper-data.service.ts +++ b/libs/components/src/anon-layout/default-anon-layout-wrapper-data.service.ts @@ -3,6 +3,9 @@ import { Observable, Subject } from "rxjs"; import { AnonLayoutWrapperDataService } from "./anon-layout-wrapper-data.service"; import { AnonLayoutWrapperData } from "./anon-layout-wrapper.component"; +/** + * Default implementation for managing anonymous layout wrapper data. + */ export class DefaultAnonLayoutWrapperDataService implements AnonLayoutWrapperDataService { protected anonLayoutWrapperDataSubject = new Subject>(); diff --git a/libs/components/src/app/app.component.ts b/libs/components/src/app/app.component.ts index c2829956219..5c9ce5fede2 100644 --- a/libs/components/src/app/app.component.ts +++ b/libs/components/src/app/app.component.ts @@ -1,5 +1,8 @@ import { Component } from "@angular/core"; +/** + * Root component for the component library's Storybook application. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/app/app.module.ts b/libs/components/src/app/app.module.ts index 9da535ffbe1..1a1d917be68 100644 --- a/libs/components/src/app/app.module.ts +++ b/libs/components/src/app/app.module.ts @@ -4,6 +4,9 @@ import { BrowserModule } from "@angular/platform-browser"; import { AppComponent } from "./app.component"; +/** + * Root module for the component library's Storybook application. + */ @NgModule({ declarations: [AppComponent], imports: [BrowserModule, CommonModule], diff --git a/libs/components/src/async-actions/async-actions.module.ts b/libs/components/src/async-actions/async-actions.module.ts index bff4286f890..c88e85de9bd 100644 --- a/libs/components/src/async-actions/async-actions.module.ts +++ b/libs/components/src/async-actions/async-actions.module.ts @@ -4,6 +4,9 @@ import { BitActionDirective } from "./bit-action.directive"; import { BitSubmitDirective } from "./bit-submit.directive"; import { BitFormButtonDirective } from "./form-button.directive"; +/** + * Module providing directives for handling async actions and form submissions. + */ @NgModule({ imports: [BitActionDirective, BitFormButtonDirective, BitSubmitDirective], exports: [BitActionDirective, BitFormButtonDirective, BitSubmitDirective], diff --git a/libs/components/src/avatar/avatar.module.ts b/libs/components/src/avatar/avatar.module.ts index 4ef0978cbec..c2907e4f6ee 100644 --- a/libs/components/src/avatar/avatar.module.ts +++ b/libs/components/src/avatar/avatar.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { AvatarComponent } from "./avatar.component"; +/** + * Module providing the avatar component for displaying user account identifiers. + */ @NgModule({ imports: [AvatarComponent], exports: [AvatarComponent], diff --git a/libs/components/src/badge-list/badge-list.module.ts b/libs/components/src/badge-list/badge-list.module.ts index 9359fe2c5c5..ab02fd7e069 100644 --- a/libs/components/src/badge-list/badge-list.module.ts +++ b/libs/components/src/badge-list/badge-list.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { BadgeListComponent } from "./badge-list.component"; +/** + * Module providing the badge list component for displaying collections of badges. + */ @NgModule({ imports: [BadgeListComponent], exports: [BadgeListComponent], diff --git a/libs/components/src/badge/badge.module.ts b/libs/components/src/badge/badge.module.ts index d9a6e712820..720d3d91c9b 100644 --- a/libs/components/src/badge/badge.module.ts +++ b/libs/components/src/badge/badge.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { BadgeComponent } from "./badge.component"; +/** + * Module providing the badge component for labels, counters, and small buttons. + */ @NgModule({ imports: [BadgeComponent], exports: [BadgeComponent], diff --git a/libs/components/src/banner/banner.module.ts b/libs/components/src/banner/banner.module.ts index 3301218ed1a..95b61d93b8b 100644 --- a/libs/components/src/banner/banner.module.ts +++ b/libs/components/src/banner/banner.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { BannerComponent } from "./banner.component"; +/** + * Module providing the banner component for important user notifications. + */ @NgModule({ imports: [BannerComponent], exports: [BannerComponent], diff --git a/libs/components/src/breadcrumbs/breadcrumbs.module.ts b/libs/components/src/breadcrumbs/breadcrumbs.module.ts index 89b57fd19b5..159ba09c6dc 100644 --- a/libs/components/src/breadcrumbs/breadcrumbs.module.ts +++ b/libs/components/src/breadcrumbs/breadcrumbs.module.ts @@ -3,6 +3,9 @@ import { NgModule } from "@angular/core"; import { BreadcrumbComponent } from "./breadcrumb.component"; import { BreadcrumbsComponent } from "./breadcrumbs.component"; +/** + * Module providing breadcrumb components for navigation hierarchy display. + */ @NgModule({ imports: [BreadcrumbsComponent, BreadcrumbComponent], exports: [BreadcrumbsComponent, BreadcrumbComponent], diff --git a/libs/components/src/button/button.component.ts b/libs/components/src/button/button.component.ts index 7cae8fe974d..eda0b22c9ac 100644 --- a/libs/components/src/button/button.component.ts +++ b/libs/components/src/button/button.component.ts @@ -65,6 +65,9 @@ const buttonStyles: Record = { unstyled: [], }; +/** + * Button component with support for multiple styles, loading states, and accessibility features. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/button/button.module.ts b/libs/components/src/button/button.module.ts index f1a86eff3ab..4949add5ca5 100644 --- a/libs/components/src/button/button.module.ts +++ b/libs/components/src/button/button.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { ButtonComponent } from "./button.component"; +/** + * Module providing the button component for user interactions. + */ @NgModule({ imports: [ButtonComponent], exports: [ButtonComponent], diff --git a/libs/components/src/callout/callout.module.ts b/libs/components/src/callout/callout.module.ts index ad7e083fec7..1e17a7d040d 100644 --- a/libs/components/src/callout/callout.module.ts +++ b/libs/components/src/callout/callout.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { CalloutComponent } from "./callout.component"; +/** + * Module providing the callout component for important user communications. + */ @NgModule({ imports: [CalloutComponent], exports: [CalloutComponent], diff --git a/libs/components/src/card/base-card/base-card.directive.ts b/libs/components/src/card/base-card/base-card.directive.ts index 7c6ec2b3b2f..6a127608403 100644 --- a/libs/components/src/card/base-card/base-card.directive.ts +++ b/libs/components/src/card/base-card/base-card.directive.ts @@ -1,5 +1,8 @@ import { Directive } from "@angular/core"; +/** + * Directive that applies standard card styling with border, shadow, and rounded corners. + */ @Directive({ host: { class: diff --git a/libs/components/src/card/card-content.component.ts b/libs/components/src/card/card-content.component.ts index 650a2665475..7cf3e466f5b 100644 --- a/libs/components/src/card/card-content.component.ts +++ b/libs/components/src/card/card-content.component.ts @@ -1,5 +1,8 @@ import { Component } from "@angular/core"; +/** + * Component providing padded content area within a card. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/card/card.component.ts b/libs/components/src/card/card.component.ts index 9cca973f003..fcb9658a049 100644 --- a/libs/components/src/card/card.component.ts +++ b/libs/components/src/card/card.component.ts @@ -2,6 +2,9 @@ import { ChangeDetectionStrategy, Component } from "@angular/core"; import { BaseCardDirective } from "./base-card/base-card.directive"; +/** + * Card container component with responsive padding. + */ @Component({ selector: "bit-card", template: ``, diff --git a/libs/components/src/checkbox/checkbox.component.ts b/libs/components/src/checkbox/checkbox.component.ts index 2501b85f617..b4dc4bc596a 100644 --- a/libs/components/src/checkbox/checkbox.component.ts +++ b/libs/components/src/checkbox/checkbox.component.ts @@ -3,6 +3,9 @@ import { NgControl, Validators } from "@angular/forms"; import { BitFormControlAbstraction } from "../form-control"; +/** + * Checkbox input component with support for indeterminate state and form integration. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/checkbox/checkbox.module.ts b/libs/components/src/checkbox/checkbox.module.ts index 3abfb4b1bfd..36fef75cd1c 100644 --- a/libs/components/src/checkbox/checkbox.module.ts +++ b/libs/components/src/checkbox/checkbox.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { CheckboxComponent } from "./checkbox.component"; +/** + * Module providing the checkbox component for binary selection inputs. + */ @NgModule({ imports: [CheckboxComponent], exports: [CheckboxComponent], diff --git a/libs/components/src/color-password/color-password.module.ts b/libs/components/src/color-password/color-password.module.ts index 3ebc1c80e12..54aca11d1bb 100644 --- a/libs/components/src/color-password/color-password.module.ts +++ b/libs/components/src/color-password/color-password.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { ColorPasswordComponent } from "./color-password.component"; +/** + * Module providing the color password component for displaying passwords with colored characters. + */ @NgModule({ imports: [ColorPasswordComponent], exports: [ColorPasswordComponent], diff --git a/libs/components/src/copy-click/copy-click.directive.ts b/libs/components/src/copy-click/copy-click.directive.ts index f12880f8781..89d40ff466b 100644 --- a/libs/components/src/copy-click/copy-click.directive.ts +++ b/libs/components/src/copy-click/copy-click.directive.ts @@ -22,6 +22,9 @@ export interface CopyClickListener { export const COPY_CLICK_LISTENER = new InjectionToken("CopyClickListener"); +/** + * Directive that copies text to clipboard on click with optional toast notification. + */ @Directive({ selector: "[appCopyClick]", }) diff --git a/libs/components/src/dialog/dialog.module.ts b/libs/components/src/dialog/dialog.module.ts index f31fdd52060..d4d107c03dd 100644 --- a/libs/components/src/dialog/dialog.module.ts +++ b/libs/components/src/dialog/dialog.module.ts @@ -6,6 +6,9 @@ import { DialogService } from "./dialog.service"; import { DialogCloseDirective } from "./directives/dialog-close.directive"; import { IconDirective, SimpleDialogComponent } from "./simple-dialog/simple-dialog.component"; +/** + * Module providing dialog components and services for modal interactions. + */ @NgModule({ imports: [ CdkDialogModule, diff --git a/libs/components/src/dialog/dialog.service.ts b/libs/components/src/dialog/dialog.service.ts index 8393db57b2f..2b95f729097 100644 --- a/libs/components/src/dialog/dialog.service.ts +++ b/libs/components/src/dialog/dialog.service.ts @@ -27,6 +27,9 @@ import { SimpleDialogOptions } from "./simple-dialog/types"; * * https://github.com/angular/components/issues/7390 */ +/** + * Custom scroll strategy that blocks body scrolling for dialogs with virtual scrolling support. + */ class CustomBlockScrollStrategy implements ScrollStrategy { enable() { document.body.classList.add("tw-overflow-hidden"); @@ -127,6 +130,9 @@ export class CenterPositionStrategy extends GlobalPositionStrategy { } } +/** + * Dialog reference implementation for drawer-style dialogs. + */ class DrawerDialogRef implements DialogRef { readonly isDrawer = true; @@ -183,6 +189,9 @@ export class CdkDialogRef implements DialogRef { } } +/** + * Service for opening and managing modal dialogs and drawer panels. + */ @Injectable() export class DialogService { private dialog = inject(CdkDialog); diff --git a/libs/components/src/dialog/dialog/dialog.component.ts b/libs/components/src/dialog/dialog/dialog.component.ts index f9073da2217..f592b3db6fe 100644 --- a/libs/components/src/dialog/dialog/dialog.component.ts +++ b/libs/components/src/dialog/dialog/dialog.component.ts @@ -41,6 +41,10 @@ const drawerSizeToWidth = { large: "md:tw-max-w-2xl", } as const; +/** + * Reusable dialog component with header, content area, and footer sections. + * Supports responsive sizing, animations, and accessibility features. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/dialog/directives/dialog-close.directive.ts b/libs/components/src/dialog/directives/dialog-close.directive.ts index 66d1a996295..f0e9b9d8c38 100644 --- a/libs/components/src/dialog/directives/dialog-close.directive.ts +++ b/libs/components/src/dialog/directives/dialog-close.directive.ts @@ -1,6 +1,9 @@ import { DialogRef } from "@angular/cdk/dialog"; import { Directive, HostBinding, HostListener, Optional, input } from "@angular/core"; +/** + * Directive that closes a dialog when clicked, optionally passing a result value. + */ @Directive({ selector: "[bitDialogClose]", }) diff --git a/libs/components/src/dialog/directives/dialog-title-container.directive.ts b/libs/components/src/dialog/directives/dialog-title-container.directive.ts index 683bda41cad..463379db126 100644 --- a/libs/components/src/dialog/directives/dialog-title-container.directive.ts +++ b/libs/components/src/dialog/directives/dialog-title-container.directive.ts @@ -4,6 +4,9 @@ import { Directive, HostBinding, OnInit, Optional, input } from "@angular/core"; // Increments for each instance of this component let nextId = 0; +/** + * Directive that marks a dialog title element and connects it to ARIA labelling. + */ @Directive({ selector: "[bitDialogTitleContainer]", }) diff --git a/libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts b/libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts index eed031d76fb..780a73dac36 100644 --- a/libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts +++ b/libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts @@ -26,6 +26,9 @@ const DEFAULT_COLOR: Record = { danger: "tw-text-danger", }; +/** + * Configurable simple dialog component with customizable content, buttons, and actions. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/dialog/simple-dialog/simple-dialog.component.ts b/libs/components/src/dialog/simple-dialog/simple-dialog.component.ts index cd44a79c271..b4c16fb590a 100644 --- a/libs/components/src/dialog/simple-dialog/simple-dialog.component.ts +++ b/libs/components/src/dialog/simple-dialog/simple-dialog.component.ts @@ -4,11 +4,17 @@ import { TypographyDirective } from "../../typography/typography.directive"; import { fadeIn } from "../animations"; import { DialogTitleContainerDirective } from "../directives/dialog-title-container.directive"; +/** + * Directive that marks an icon element for use within a simple dialog. + */ @Directive({ selector: "[bitDialogIcon]", }) export class IconDirective {} +/** + * Simple dialog component with optional icon and content projection. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/drawer/drawer.module.ts b/libs/components/src/drawer/drawer.module.ts index 9f51ba06b4e..ecbc203c711 100644 --- a/libs/components/src/drawer/drawer.module.ts +++ b/libs/components/src/drawer/drawer.module.ts @@ -5,6 +5,9 @@ import { DrawerCloseDirective } from "./drawer-close.directive"; import { DrawerHeaderComponent } from "./drawer-header.component"; import { DrawerComponent } from "./drawer.component"; +/** + * Module providing drawer components for supplementary side panel content. + */ @NgModule({ imports: [DrawerComponent, DrawerHeaderComponent, DrawerBodyComponent, DrawerCloseDirective], exports: [DrawerComponent, DrawerHeaderComponent, DrawerBodyComponent, DrawerCloseDirective], diff --git a/libs/components/src/drawer/drawer.service.ts b/libs/components/src/drawer/drawer.service.ts index 71b3ff967d7..ded7eb32486 100644 --- a/libs/components/src/drawer/drawer.service.ts +++ b/libs/components/src/drawer/drawer.service.ts @@ -1,6 +1,9 @@ import { Portal } from "@angular/cdk/portal"; import { Injectable, signal } from "@angular/core"; +/** + * Service for managing drawer panel display and lifecycle. + */ @Injectable({ providedIn: "root" }) export class DrawerService { private readonly _portal = signal | undefined>(undefined); diff --git a/libs/components/src/form-control/form-control.abstraction.ts b/libs/components/src/form-control/form-control.abstraction.ts index ac5a249667d..24ba6924253 100644 --- a/libs/components/src/form-control/form-control.abstraction.ts +++ b/libs/components/src/form-control/form-control.abstraction.ts @@ -1,3 +1,6 @@ +/** + * Abstract class defining the interface for form control components. + */ export abstract class BitFormControlAbstraction { abstract disabled: boolean; abstract required: boolean; diff --git a/libs/components/src/form-control/form-control.module.ts b/libs/components/src/form-control/form-control.module.ts index d87284adbcd..7fcc259a2e1 100644 --- a/libs/components/src/form-control/form-control.module.ts +++ b/libs/components/src/form-control/form-control.module.ts @@ -4,6 +4,9 @@ import { FormControlComponent } from "./form-control.component"; import { BitHintDirective } from "./hint.directive"; import { BitLabelComponent } from "./label.component"; +/** + * Module providing form control components for labels and hints. + */ @NgModule({ imports: [BitLabelComponent, FormControlComponent, BitHintDirective], exports: [FormControlComponent, BitLabelComponent, BitHintDirective], diff --git a/libs/components/src/form-field/form-field-control.ts b/libs/components/src/form-field/form-field-control.ts index 0a8696e2ac3..580d2d79fbe 100644 --- a/libs/components/src/form-field/form-field-control.ts +++ b/libs/components/src/form-field/form-field-control.ts @@ -12,6 +12,9 @@ export type InputTypes = | "date" | "time"; +/** + * Abstract class defining the interface for form field control elements. + */ export abstract class BitFormFieldControl { abstract ariaDescribedBy?: string; abstract id: Signal; diff --git a/libs/components/src/form-field/form-field.module.ts b/libs/components/src/form-field/form-field.module.ts index c7529c14fb7..01e6083d29e 100644 --- a/libs/components/src/form-field/form-field.module.ts +++ b/libs/components/src/form-field/form-field.module.ts @@ -11,6 +11,9 @@ import { BitPasswordInputToggleDirective } from "./password-input-toggle.directi import { BitPrefixDirective } from "./prefix.directive"; import { BitSuffixDirective } from "./suffix.directive"; +/** + * Module providing form field components for structured input layouts with labels, errors, and hints. + */ @NgModule({ imports: [ FormControlModule, diff --git a/libs/components/src/icon-button/icon-button.module.ts b/libs/components/src/icon-button/icon-button.module.ts index 26f48cdb177..ee82395d6c0 100644 --- a/libs/components/src/icon-button/icon-button.module.ts +++ b/libs/components/src/icon-button/icon-button.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { BitIconButtonComponent } from "./icon-button.component"; +/** + * Module providing the icon button component for icon-only interactive buttons. + */ @NgModule({ imports: [BitIconButtonComponent], exports: [BitIconButtonComponent], diff --git a/libs/components/src/icon/icon.module.ts b/libs/components/src/icon/icon.module.ts index 3d15b5bb3c3..b21837a2e23 100644 --- a/libs/components/src/icon/icon.module.ts +++ b/libs/components/src/icon/icon.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { BitIconComponent } from "./icon.component"; +/** + * Module providing the icon component for displaying SVG icons. + */ @NgModule({ imports: [BitIconComponent], exports: [BitIconComponent], diff --git a/libs/components/src/input/input.directive.ts b/libs/components/src/input/input.directive.ts index ce34b70e88b..697ea95b5bb 100644 --- a/libs/components/src/input/input.directive.ts +++ b/libs/components/src/input/input.directive.ts @@ -27,6 +27,9 @@ export function inputBorderClasses(error: boolean) { ]; } +/** + * Directive for styling form inputs, selects, and textareas with consistent design system appearance. + */ @Directive({ selector: "input[bitInput], select[bitInput], textarea[bitInput]", providers: [{ provide: BitFormFieldControl, useExisting: BitInputDirective }], diff --git a/libs/components/src/input/input.module.ts b/libs/components/src/input/input.module.ts index 9399cb06517..119e52e409f 100644 --- a/libs/components/src/input/input.module.ts +++ b/libs/components/src/input/input.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { BitInputDirective } from "./input.directive"; +/** + * Module providing input directive for styled form inputs. + */ @NgModule({ imports: [BitInputDirective], exports: [BitInputDirective], diff --git a/libs/components/src/item/item.module.ts b/libs/components/src/item/item.module.ts index 226fed11d80..24b26312656 100644 --- a/libs/components/src/item/item.module.ts +++ b/libs/components/src/item/item.module.ts @@ -5,6 +5,9 @@ import { ItemContentComponent } from "./item-content.component"; import { ItemGroupComponent } from "./item-group.component"; import { ItemComponent } from "./item.component"; +/** + * Module providing item components for displaying list entries with content and actions. + */ @NgModule({ imports: [ItemComponent, ItemContentComponent, ItemActionComponent, ItemGroupComponent], exports: [ItemComponent, ItemContentComponent, ItemActionComponent, ItemGroupComponent], diff --git a/libs/components/src/link/link.module.ts b/libs/components/src/link/link.module.ts index 52d2f29e53c..c28be182c62 100644 --- a/libs/components/src/link/link.module.ts +++ b/libs/components/src/link/link.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { AnchorLinkDirective, ButtonLinkDirective } from "./link.directive"; +/** + * Module providing link directives for styled anchors and button links. + */ @NgModule({ imports: [AnchorLinkDirective, ButtonLinkDirective], exports: [AnchorLinkDirective, ButtonLinkDirective], diff --git a/libs/components/src/menu/menu.module.ts b/libs/components/src/menu/menu.module.ts index a9a5e64dd9f..4624b29959f 100644 --- a/libs/components/src/menu/menu.module.ts +++ b/libs/components/src/menu/menu.module.ts @@ -5,6 +5,9 @@ import { MenuItemComponent } from "./menu-item.component"; import { MenuTriggerForDirective } from "./menu-trigger-for.directive"; import { MenuComponent } from "./menu.component"; +/** + * Module providing menu components for dropdown navigation and action lists. + */ @NgModule({ imports: [MenuComponent, MenuTriggerForDirective, MenuItemComponent, MenuDividerComponent], exports: [MenuComponent, MenuTriggerForDirective, MenuItemComponent, MenuDividerComponent], diff --git a/libs/components/src/multi-select/multi-select.module.ts b/libs/components/src/multi-select/multi-select.module.ts index c8cc899db00..3a33b9d4d29 100644 --- a/libs/components/src/multi-select/multi-select.module.ts +++ b/libs/components/src/multi-select/multi-select.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { MultiSelectComponent } from "./multi-select.component"; +/** + * Module providing the multi-select component for selecting multiple options. + */ @NgModule({ imports: [MultiSelectComponent], exports: [MultiSelectComponent], diff --git a/libs/components/src/navigation/navigation.module.ts b/libs/components/src/navigation/navigation.module.ts index a08fbaddb98..3ca52b330a4 100644 --- a/libs/components/src/navigation/navigation.module.ts +++ b/libs/components/src/navigation/navigation.module.ts @@ -6,6 +6,9 @@ import { NavItemComponent } from "./nav-item.component"; import { NavLogoComponent } from "./nav-logo.component"; import { SideNavComponent } from "./side-nav.component"; +/** + * Module providing navigation components for side navigation menus. + */ @NgModule({ imports: [ NavDividerComponent, diff --git a/libs/components/src/navigation/side-nav.service.ts b/libs/components/src/navigation/side-nav.service.ts index 63e54c81fe5..2180f2c2417 100644 --- a/libs/components/src/navigation/side-nav.service.ts +++ b/libs/components/src/navigation/side-nav.service.ts @@ -21,6 +21,9 @@ const BIT_SIDE_NAV_WIDTH_KEY_DEF = new KeyDefinition(BIT_SIDE_NAV_DISK, deserializer: (s) => s, }); +/** + * Service managing the side navigation state, width, and responsive behavior. + */ @Injectable({ providedIn: "root", }) diff --git a/libs/components/src/no-items/no-items.module.ts b/libs/components/src/no-items/no-items.module.ts index 49c3c73f133..2c3ee562372 100644 --- a/libs/components/src/no-items/no-items.module.ts +++ b/libs/components/src/no-items/no-items.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { NoItemsComponent } from "./no-items.component"; +/** + * Module providing the no items component for empty state displays. + */ @NgModule({ imports: [NoItemsComponent], exports: [NoItemsComponent], diff --git a/libs/components/src/popover/popover.module.ts b/libs/components/src/popover/popover.module.ts index 8d7032c7aed..61e42a529ef 100644 --- a/libs/components/src/popover/popover.module.ts +++ b/libs/components/src/popover/popover.module.ts @@ -3,6 +3,9 @@ import { NgModule } from "@angular/core"; import { PopoverTriggerForDirective } from "./popover-trigger-for.directive"; import { PopoverComponent } from "./popover.component"; +/** + * Module providing popover components for contextual overlays. + */ @NgModule({ imports: [PopoverComponent, PopoverTriggerForDirective], exports: [PopoverComponent, PopoverTriggerForDirective], diff --git a/libs/components/src/progress/progress.module.ts b/libs/components/src/progress/progress.module.ts index cc93c4c3bd0..5170c651022 100644 --- a/libs/components/src/progress/progress.module.ts +++ b/libs/components/src/progress/progress.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { ProgressComponent } from "./progress.component"; +/** + * Module providing the progress component for displaying task completion status. + */ @NgModule({ imports: [ProgressComponent], exports: [ProgressComponent], diff --git a/libs/components/src/radio-button/radio-button.component.ts b/libs/components/src/radio-button/radio-button.component.ts index a004e7e07e2..7633d5d6795 100644 --- a/libs/components/src/radio-button/radio-button.component.ts +++ b/libs/components/src/radio-button/radio-button.component.ts @@ -7,6 +7,9 @@ import { RadioInputComponent } from "./radio-input.component"; let nextId = 0; +/** + * Radio button component that integrates with a parent radio group for single-choice selection. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/radio-button/radio-button.module.ts b/libs/components/src/radio-button/radio-button.module.ts index 7b05c27b4ff..5cef4c1dc0b 100644 --- a/libs/components/src/radio-button/radio-button.module.ts +++ b/libs/components/src/radio-button/radio-button.module.ts @@ -6,6 +6,9 @@ import { RadioButtonComponent } from "./radio-button.component"; import { RadioGroupComponent } from "./radio-group.component"; import { RadioInputComponent } from "./radio-input.component"; +/** + * Module providing radio button components for mutually exclusive selections. + */ @NgModule({ imports: [FormControlModule, RadioInputComponent, RadioButtonComponent, RadioGroupComponent], exports: [FormControlModule, RadioInputComponent, RadioButtonComponent, RadioGroupComponent], diff --git a/libs/components/src/radio-button/radio-group.component.ts b/libs/components/src/radio-button/radio-group.component.ts index 7a1288b71e5..298e6d5ed3e 100644 --- a/libs/components/src/radio-button/radio-group.component.ts +++ b/libs/components/src/radio-button/radio-group.component.ts @@ -8,6 +8,9 @@ import { BitLabelComponent } from "../form-control/label.component"; let nextId = 0; +/** + * Radio group container that manages a collection of radio buttons with form integration. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/radio-button/radio-input.component.ts b/libs/components/src/radio-button/radio-input.component.ts index 47bb799d88e..7b15b1f038f 100644 --- a/libs/components/src/radio-button/radio-input.component.ts +++ b/libs/components/src/radio-button/radio-input.component.ts @@ -5,6 +5,9 @@ import { BitFormControlAbstraction } from "../form-control"; let nextId = 0; +/** + * Radio input element with styled appearance and form integration. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/search/search.module.ts b/libs/components/src/search/search.module.ts index cb9761eae6b..80e898c6706 100644 --- a/libs/components/src/search/search.module.ts +++ b/libs/components/src/search/search.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { SearchComponent } from "./search.component"; +/** + * Module providing the search component for text filtering. + */ @NgModule({ imports: [SearchComponent], exports: [SearchComponent], diff --git a/libs/components/src/select/option.component.ts b/libs/components/src/select/option.component.ts index b981d0e0bdc..494e2043941 100644 --- a/libs/components/src/select/option.component.ts +++ b/libs/components/src/select/option.component.ts @@ -2,6 +2,9 @@ import { Component, booleanAttribute, input } from "@angular/core"; import { MappedOptionComponent } from "./option"; +/** + * Option item for use within a select component to define selectable choices. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/select/select.component.ts b/libs/components/src/select/select.component.ts index 0aa18d68702..c6a2b0255b9 100644 --- a/libs/components/src/select/select.component.ts +++ b/libs/components/src/select/select.component.ts @@ -34,6 +34,9 @@ import { OptionComponent } from "./option.component"; let nextId = 0; +/** + * Dropdown select component with search, keyboard navigation, and form integration. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/select/select.module.ts b/libs/components/src/select/select.module.ts index 8807ed63a48..fcce03d3c0a 100644 --- a/libs/components/src/select/select.module.ts +++ b/libs/components/src/select/select.module.ts @@ -3,6 +3,9 @@ import { NgModule } from "@angular/core"; import { OptionComponent } from "./option.component"; import { SelectComponent } from "./select.component"; +/** + * Module providing select components for dropdown selections. + */ @NgModule({ imports: [SelectComponent, OptionComponent], exports: [SelectComponent, OptionComponent], diff --git a/libs/components/src/shared/button-like.abstraction.ts b/libs/components/src/shared/button-like.abstraction.ts index 45a661b6ecb..1c151255869 100644 --- a/libs/components/src/shared/button-like.abstraction.ts +++ b/libs/components/src/shared/button-like.abstraction.ts @@ -4,6 +4,9 @@ export type ButtonType = "primary" | "secondary" | "danger" | "dangerPrimary" | export type ButtonSize = "default" | "small"; +/** + * Abstract class defining the common interface for button-like components. + */ export abstract class ButtonLikeAbstraction { abstract loading: ModelSignal; abstract disabled: ModelSignal; diff --git a/libs/components/src/shared/shared.module.ts b/libs/components/src/shared/shared.module.ts index 99d052c3350..ac1fc272764 100644 --- a/libs/components/src/shared/shared.module.ts +++ b/libs/components/src/shared/shared.module.ts @@ -3,6 +3,9 @@ import { NgModule } from "@angular/core"; import { I18nPipe } from "@bitwarden/ui-common"; +/** + * Module providing commonly used imports and exports for other component modules. + */ @NgModule({ imports: [CommonModule, I18nPipe], exports: [CommonModule, I18nPipe], diff --git a/libs/components/src/spinner/spinner.component.ts b/libs/components/src/spinner/spinner.component.ts index d0c2b90a165..dcfe2d0bdc3 100644 --- a/libs/components/src/spinner/spinner.component.ts +++ b/libs/components/src/spinner/spinner.component.ts @@ -3,6 +3,9 @@ import { Component, HostBinding, Input, booleanAttribute } from "@angular/core"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +/** + * Loading spinner component with customizable size and color options. + */ // FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ diff --git a/libs/components/src/stepper/stepper.module.ts b/libs/components/src/stepper/stepper.module.ts index da66f2c6a9c..a34de860255 100644 --- a/libs/components/src/stepper/stepper.module.ts +++ b/libs/components/src/stepper/stepper.module.ts @@ -3,6 +3,9 @@ import { NgModule } from "@angular/core"; import { StepComponent } from "./step.component"; import { StepperComponent } from "./stepper.component"; +/** + * Module providing stepper components for multi-step workflows. + */ @NgModule({ imports: [StepperComponent, StepComponent], exports: [StepperComponent, StepComponent], diff --git a/libs/components/src/stories/kitchen-sink/kitchen-sink-shared.module.ts b/libs/components/src/stories/kitchen-sink/kitchen-sink-shared.module.ts index c4fe2f9b2af..08bb2ce1784 100644 --- a/libs/components/src/stories/kitchen-sink/kitchen-sink-shared.module.ts +++ b/libs/components/src/stories/kitchen-sink/kitchen-sink-shared.module.ts @@ -36,6 +36,9 @@ import { TabsModule } from "../../tabs"; import { ToggleGroupModule } from "../../toggle-group"; import { TypographyModule } from "../../typography"; +/** + * Shared module for Kitchen Sink stories that imports all component library modules. + */ @NgModule({ imports: [ AsyncActionsModule, diff --git a/libs/components/src/table/table.module.ts b/libs/components/src/table/table.module.ts index 5e44f604481..87648be54ec 100644 --- a/libs/components/src/table/table.module.ts +++ b/libs/components/src/table/table.module.ts @@ -8,6 +8,9 @@ import { SortableComponent } from "./sortable.component"; import { BitRowDefDirective, TableScrollComponent } from "./table-scroll.component"; import { TableBodyDirective, TableComponent } from "./table.component"; +/** + * Module providing table components for displaying structured data with sorting and virtual scrolling. + */ @NgModule({ imports: [ CommonModule, diff --git a/libs/components/src/tabs/tabs.module.ts b/libs/components/src/tabs/tabs.module.ts index ef1537db67e..33629673c4b 100644 --- a/libs/components/src/tabs/tabs.module.ts +++ b/libs/components/src/tabs/tabs.module.ts @@ -8,6 +8,9 @@ import { TabComponent } from "./tab-group/tab.component"; import { TabLinkComponent } from "./tab-nav-bar/tab-link.component"; import { TabNavBarComponent } from "./tab-nav-bar/tab-nav-bar.component"; +/** + * Module providing tab components for organizing content into switchable panels. + */ @NgModule({ imports: [ CommonModule, diff --git a/libs/components/src/toast/toast.module.ts b/libs/components/src/toast/toast.module.ts index 647ccadc4fe..64987dcc9de 100644 --- a/libs/components/src/toast/toast.module.ts +++ b/libs/components/src/toast/toast.module.ts @@ -4,6 +4,9 @@ import { DefaultNoComponentGlobalConfig, GlobalConfig, TOAST_CONFIG } from "ngx- import { ToastContainerComponent } from "./toast-container.component"; import { BitwardenToastrComponent } from "./toastr.component"; +/** + * Module providing toast notification components and services. + */ @NgModule({ imports: [BitwardenToastrComponent, ToastContainerComponent], exports: [BitwardenToastrComponent, ToastContainerComponent], diff --git a/libs/components/src/toggle-group/toggle-group.module.ts b/libs/components/src/toggle-group/toggle-group.module.ts index 654149611f0..c75be64166d 100644 --- a/libs/components/src/toggle-group/toggle-group.module.ts +++ b/libs/components/src/toggle-group/toggle-group.module.ts @@ -3,6 +3,9 @@ import { NgModule } from "@angular/core"; import { ToggleGroupComponent } from "./toggle-group.component"; import { ToggleComponent } from "./toggle.component"; +/** + * Module providing toggle group components for mutually exclusive selections. + */ @NgModule({ imports: [ToggleGroupComponent, ToggleComponent], exports: [ToggleGroupComponent, ToggleComponent], diff --git a/libs/components/src/typography/typography.module.ts b/libs/components/src/typography/typography.module.ts index 74d1d4d6e6a..7fed1a3c456 100644 --- a/libs/components/src/typography/typography.module.ts +++ b/libs/components/src/typography/typography.module.ts @@ -2,6 +2,9 @@ import { NgModule } from "@angular/core"; import { TypographyDirective } from "./typography.directive"; +/** + * Module providing typography directive for text styling. + */ @NgModule({ imports: [TypographyDirective], exports: [TypographyDirective],