mirror of
https://github.com/bitwarden/browser
synced 2026-01-27 14:53:44 +00:00
add jsdoc class comments to libs/components
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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]",
|
||||
})
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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<Partial<AnonLayoutWrapperData>>();
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -65,6 +65,9 @@ const buttonStyles: Record<ButtonType, string[]> = {
|
||||
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({
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { Directive } from "@angular/core";
|
||||
|
||||
/**
|
||||
* Directive that applies standard card styling with border, shadow, and rounded corners.
|
||||
*/
|
||||
@Directive({
|
||||
host: {
|
||||
class:
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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: `<ng-content></ng-content>`,
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -22,6 +22,9 @@ export interface CopyClickListener {
|
||||
|
||||
export const COPY_CLICK_LISTENER = new InjectionToken<CopyClickListener>("CopyClickListener");
|
||||
|
||||
/**
|
||||
* Directive that copies text to clipboard on click with optional toast notification.
|
||||
*/
|
||||
@Directive({
|
||||
selector: "[appCopyClick]",
|
||||
})
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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<R = unknown, C = unknown> implements DialogRef<R, C> {
|
||||
readonly isDrawer = true;
|
||||
|
||||
@@ -183,6 +189,9 @@ export class CdkDialogRef<R = unknown, C = unknown> implements DialogRef<R, C> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Service for opening and managing modal dialogs and drawer panels.
|
||||
*/
|
||||
@Injectable()
|
||||
export class DialogService {
|
||||
private dialog = inject(CdkDialog);
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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]",
|
||||
})
|
||||
|
||||
@@ -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]",
|
||||
})
|
||||
|
||||
@@ -26,6 +26,9 @@ const DEFAULT_COLOR: Record<SimpleDialogType, string> = {
|
||||
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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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<Portal<unknown> | undefined>(undefined);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Abstract class defining the interface for form control components.
|
||||
*/
|
||||
export abstract class BitFormControlAbstraction {
|
||||
abstract disabled: boolean;
|
||||
abstract required: boolean;
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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<string>;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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 }],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -21,6 +21,9 @@ const BIT_SIDE_NAV_WIDTH_KEY_DEF = new KeyDefinition<number>(BIT_SIDE_NAV_DISK,
|
||||
deserializer: (s) => s,
|
||||
});
|
||||
|
||||
/**
|
||||
* Service managing the side navigation state, width, and responsive behavior.
|
||||
*/
|
||||
@Injectable({
|
||||
providedIn: "root",
|
||||
})
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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<boolean>;
|
||||
abstract disabled: ModelSignal<boolean>;
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user