1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

Remove standalone true from platform and UIF (#15032)

Remove standalone: true from every instance since it's the default as of Angular 19.
This commit is contained in:
Oscar Hinton
2025-06-02 20:03:04 +02:00
committed by GitHub
parent 6107d7d3da
commit 26fb7effd3
129 changed files with 5 additions and 151 deletions

View File

@@ -6,7 +6,6 @@ import { FocusableElement } from "../shared/focusable-element";
@Directive({
selector: "bitA11yCell",
standalone: true,
providers: [{ provide: FocusableElement, useExisting: A11yCellDirective }],
})
export class A11yCellDirective implements FocusableElement {

View File

@@ -15,7 +15,6 @@ import { A11yRowDirective } from "./a11y-row.directive";
@Directive({
selector: "bitA11yGrid",
standalone: true,
})
export class A11yGridDirective implements AfterViewInit {
@HostBinding("attr.role")

View File

@@ -13,7 +13,6 @@ import { A11yCellDirective } from "./a11y-cell.directive";
@Directive({
selector: "bitA11yRow",
standalone: true,
})
export class A11yRowDirective implements AfterViewInit {
@HostBinding("attr.role")

View File

@@ -4,7 +4,6 @@ import { Directive, ElementRef, Input, OnInit, Renderer2 } from "@angular/core";
@Directive({
selector: "[appA11yTitle]",
standalone: true,
})
export class A11yTitleDirective implements OnInit {
@Input() set appA11yTitle(title: string) {

View File

@@ -15,7 +15,6 @@ import { FunctionReturningAwaitable, functionToObservable } from "../utils/funct
*/
@Directive({
selector: "[bitAction]",
standalone: true,
})
export class BitActionDirective implements OnDestroy {
private destroy$ = new Subject<void>();

View File

@@ -14,7 +14,6 @@ import { FunctionReturningAwaitable, functionToObservable } from "../utils/funct
*/
@Directive({
selector: "[formGroup][bitSubmit]",
standalone: true,
})
export class BitSubmitDirective implements OnInit, OnDestroy {
private destroy$ = new Subject<void>();

View File

@@ -25,7 +25,6 @@ import { BitSubmitDirective } from "./bit-submit.directive";
*/
@Directive({
selector: "button[bitFormButton]",
standalone: true,
})
export class BitFormButtonDirective implements OnDestroy {
private destroy$ = new Subject<void>();

View File

@@ -27,7 +27,6 @@ const SizeClasses: Record<SizeTypes, string[]> = {
template: `@if (src) {
<img [src]="src" title="{{ title || text }}" [ngClass]="classList" />
}`,
standalone: true,
imports: [NgClass],
})
export class AvatarComponent implements OnChanges {

View File

@@ -10,7 +10,6 @@ import { BadgeModule, BadgeVariant } from "../badge";
@Component({
selector: "bit-badge-list",
templateUrl: "badge-list.component.html",
standalone: true,
imports: [BadgeModule, I18nPipe],
})
export class BadgeListComponent implements OnChanges {

View File

@@ -51,16 +51,15 @@ const hoverStyles: Record<BadgeVariant, string[]> = {
* The Badge directive can be used on a `<span>` (non clickable events), or an `<a>` or `<button>` tag
* > `NOTE:` The Focus and Hover states only apply to badges used for interactive events.
*
*
* > `NOTE:` The `disabled` state only applies to buttons.
*
*
*/
@Component({
selector: "span[bitBadge], a[bitBadge], button[bitBadge]",
providers: [{ provide: FocusableElement, useExisting: BadgeComponent }],
imports: [CommonModule],
templateUrl: "badge.component.html",
standalone: true,
})
export class BadgeComponent implements FocusableElement {
@HostBinding("class") get classList() {

View File

@@ -28,7 +28,6 @@ const defaultIcon: Record<BannerType, string> = {
@Component({
selector: "bit-banner",
templateUrl: "./banner.component.html",
standalone: true,
imports: [CommonModule, IconButtonModule, I18nPipe],
})
export class BannerComponent implements OnInit {

View File

@@ -7,7 +7,6 @@ import { QueryParamsHandling } from "@angular/router";
@Component({
selector: "bit-breadcrumb",
templateUrl: "./breadcrumb.component.html",
standalone: true,
})
export class BreadcrumbComponent {
@Input()

View File

@@ -16,7 +16,6 @@ import { BreadcrumbComponent } from "./breadcrumb.component";
@Component({
selector: "bit-breadcrumbs",
templateUrl: "./breadcrumbs.component.html",
standalone: true,
imports: [CommonModule, LinkModule, RouterModule, IconButtonModule, MenuModule],
})
export class BreadcrumbsComponent {

View File

@@ -52,7 +52,6 @@ const buttonStyles: Record<ButtonType, string[]> = {
selector: "button[bitButton], a[bitButton]",
templateUrl: "button.component.html",
providers: [{ provide: ButtonLikeAbstraction, useExisting: ButtonComponent }],
standalone: true,
imports: [NgClass],
host: {
"[attr.disabled]": "disabledAttr()",

View File

@@ -32,7 +32,6 @@ let nextId = 0;
@Component({
selector: "bit-callout",
templateUrl: "callout.component.html",
standalone: true,
imports: [SharedModule, TypographyModule],
})
export class CalloutComponent implements OnInit {

View File

@@ -2,7 +2,6 @@ import { ChangeDetectionStrategy, Component } from "@angular/core";
@Component({
selector: "bit-card",
standalone: true,
template: `<ng-content></ng-content>`,
changeDetection: ChangeDetectionStrategy.OnPush,
host: {

View File

@@ -9,7 +9,6 @@ import { BitFormControlAbstraction } from "../form-control";
selector: "input[type=checkbox][bitCheckbox]",
template: "",
providers: [{ provide: BitFormControlAbstraction, useExisting: CheckboxComponent }],
standalone: true,
})
export class CheckboxComponent implements BitFormControlAbstraction {
@HostBinding("class")

View File

@@ -39,7 +39,6 @@ export type ChipSelectOption<T> = Option<T> & {
@Component({
selector: "bit-chip-select",
templateUrl: "chip-select.component.html",
standalone: true,
imports: [SharedModule, ButtonModule, IconButtonModule, MenuModule, TypographyModule],
providers: [
{

View File

@@ -25,7 +25,6 @@ enum CharacterType {
}
</span>
}`,
standalone: true,
})
export class ColorPasswordComponent {
password = input<string>("");

View File

@@ -6,6 +6,5 @@ import { Component } from "@angular/core";
@Component({
selector: "bit-container",
templateUrl: "container.component.html",
standalone: true,
})
export class ContainerComponent {}

View File

@@ -21,7 +21,6 @@ import { CopyClickDirective } from "./copy-click.directive";
#toastWithLabel
></button>
`,
standalone: true,
imports: [CopyClickDirective],
})
class TestCopyClickComponent {

View File

@@ -9,7 +9,6 @@ import { ToastService, ToastVariant } from "../";
@Directive({
selector: "[appCopyClick]",
standalone: true,
})
export class CopyClickDirective {
private _showToast = false;

View File

@@ -16,7 +16,6 @@ import { DialogTitleContainerDirective } from "../directives/dialog-title-contai
selector: "bit-dialog",
templateUrl: "./dialog.component.html",
animations: [fadeIn],
standalone: true,
imports: [
CommonModule,
DialogTitleContainerDirective,

View File

@@ -3,7 +3,6 @@ import { Directive, HostBinding, HostListener, Input, Optional } from "@angular/
@Directive({
selector: "[bitDialogClose]",
standalone: true,
})
export class DialogCloseDirective {
@Input("bitDialogClose") dialogResult: any;

View File

@@ -6,7 +6,6 @@ let nextId = 0;
@Directive({
selector: "[bitDialogTitleContainer]",
standalone: true,
})
export class DialogTitleContainerDirective implements OnInit {
@HostBinding("id") id = `bit-dialog-title-${nextId++}`;

View File

@@ -30,7 +30,6 @@ const DEFAULT_COLOR: Record<SimpleDialogType, string> = {
@Component({
templateUrl: "./simple-configurable-dialog.component.html",
standalone: true,
imports: [
ReactiveFormsModule,
BitSubmitDirective,

View File

@@ -6,7 +6,6 @@ import { DialogTitleContainerDirective } from "../directives/dialog-title-contai
@Directive({
selector: "[bitDialogIcon]",
standalone: true,
})
export class IconDirective {}
@@ -14,7 +13,6 @@ export class IconDirective {}
selector: "bit-simple-dialog",
templateUrl: "./simple-dialog.component.html",
animations: [fadeIn],
standalone: true,
imports: [DialogTitleContainerDirective, TypographyDirective],
})
export class SimpleDialogComponent {

View File

@@ -7,7 +7,6 @@ import { DisclosureComponent } from "./disclosure.component";
@Directive({
selector: "[bitDisclosureTriggerFor]",
exportAs: "disclosureTriggerFor",
standalone: true,
})
export class DisclosureTriggerForDirective {
/**

View File

@@ -21,9 +21,9 @@ let nextId = 0;
* 3. Set a template reference on the `bit-disclosure`
* 4. Use the `bitDisclosureTriggerFor` directive on the trigger component, and pass it the `bit-disclosure` template reference
* 5. Set the `open` property on the `bit-disclosure` to init the disclosure as either currently expanded or currently collapsed. The disclosure will default to `false`, meaning it defaults to being hidden.
*
*
* @example
*
*
* ```html
* <button
* type="button"
@@ -33,11 +33,10 @@ let nextId = 0;
* ></button>
* <bit-disclosure #disclosureRef open>click button to hide this content</bit-disclosure>
* ```
*
*
*/
@Component({
selector: "bit-disclosure",
standalone: true,
template: `<ng-content></ng-content>`,
})
export class DisclosureComponent {

View File

@@ -8,7 +8,6 @@ import { map } from "rxjs";
*/
@Component({
selector: "bit-drawer-body",
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [],
host: {

View File

@@ -15,7 +15,6 @@ import { DrawerComponent } from "./drawer.component";
**/
@Directive({
selector: "button[bitDrawerClose]",
standalone: true,
host: {
"(click)": "onClick()",
},

View File

@@ -13,7 +13,6 @@ import { DrawerCloseDirective } from "./drawer-close.directive";
**/
@Component({
selector: "bit-drawer-header",
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [CommonModule, DrawerCloseDirective, TypographyModule, IconButtonModule, I18nPipe],
templateUrl: "drawer-header.component.html",

View File

@@ -8,7 +8,6 @@ import { Directive, signal } from "@angular/core";
*/
@Directive({
selector: "[bitDrawerHost]",
standalone: true,
})
export class DrawerHostDirective {
private _portal = signal<Portal<unknown> | undefined>(undefined);

View File

@@ -19,7 +19,6 @@ import { DrawerHostDirective } from "./drawer-host.directive";
*/
@Component({
selector: "bit-drawer",
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [CommonModule, PortalModule],
templateUrl: "drawer.component.html",

View File

@@ -14,7 +14,6 @@ import { BitFormControlAbstraction } from "./form-control.abstraction";
@Component({
selector: "bit-form-control",
templateUrl: "form-control.component.html",
standalone: true,
imports: [NgClass, TypographyDirective, I18nPipe],
})
export class FormControlComponent {

View File

@@ -8,7 +8,6 @@ let nextId = 0;
host: {
class: "tw-text-muted tw-font-normal tw-inline-block tw-mt-1 tw-text-xs",
},
standalone: true,
})
export class BitHintComponent {
@HostBinding() id = `bit-hint-${nextId++}`;

View File

@@ -10,7 +10,6 @@ let nextId = 0;
@Component({
selector: "bit-label",
standalone: true,
templateUrl: "label.component.html",
imports: [CommonModule],
})

View File

@@ -15,7 +15,6 @@ import { I18nPipe } from "@bitwarden/ui-common";
class: "tw-block tw-text-danger tw-mt-2",
"aria-live": "assertive",
},
standalone: true,
imports: [I18nPipe],
})
export class BitErrorSummary {

View File

@@ -14,7 +14,6 @@ let nextId = 0;
class: "tw-block tw-mt-1 tw-text-danger tw-text-xs",
"aria-live": "assertive",
},
standalone: true,
})
export class BitErrorComponent {
@HostBinding() id = `bit-error-${nextId++}`;

View File

@@ -26,7 +26,6 @@ import { BitFormFieldControl } from "./form-field-control";
@Component({
selector: "bit-form-field",
templateUrl: "./form-field.component.html",
standalone: true,
imports: [CommonModule, BitErrorComponent, I18nPipe],
})
export class BitFormFieldComponent implements AfterContentChecked {

View File

@@ -18,7 +18,6 @@ import { BitFormFieldComponent } from "./form-field.component";
@Directive({
selector: "[bitPasswordInputToggle]",
standalone: true,
})
export class BitPasswordInputToggleDirective implements AfterContentInit, OnChanges {
/**

View File

@@ -4,7 +4,6 @@ import { BitIconButtonComponent } from "../icon-button/icon-button.component";
@Directive({
selector: "[bitPrefix]",
standalone: true,
})
export class BitPrefixDirective implements OnInit {
@HostBinding("class") @Input() get classList() {

View File

@@ -4,7 +4,6 @@ import { BitIconButtonComponent } from "../icon-button/icon-button.component";
@Directive({
selector: "[bitSuffix]",
standalone: true,
})
export class BitSuffixDirective implements OnInit {
@HostBinding("class") @Input() get classList() {

View File

@@ -161,7 +161,6 @@ const sizes: Record<IconButtonSize, string[]> = {
{ provide: ButtonLikeAbstraction, useExisting: BitIconButtonComponent },
{ provide: FocusableElement, useExisting: BitIconButtonComponent },
],
standalone: true,
imports: [NgClass],
host: {
"[attr.disabled]": "disabledAttr()",

View File

@@ -11,7 +11,6 @@ import { Icon, isIcon } from "./icon";
"[innerHtml]": "innerHtml",
},
template: ``,
standalone: true,
})
export class BitIconComponent {
innerHtml: SafeHtml | null = null;

View File

@@ -30,7 +30,6 @@ export function inputBorderClasses(error: boolean) {
@Directive({
selector: "input[bitInput], select[bitInput], textarea[bitInput]",
providers: [{ provide: BitFormFieldControl, useExisting: BitInputDirective }],
standalone: true,
})
export class BitInputDirective implements BitFormFieldControl {
@HostBinding("class") @Input() get classList() {

View File

@@ -4,7 +4,6 @@ import { A11yCellDirective } from "../a11y/a11y-cell.directive";
@Component({
selector: "bit-item-action",
standalone: true,
imports: [],
template: `<ng-content></ng-content>`,
providers: [{ provide: A11yCellDirective, useExisting: ItemActionComponent }],

View File

@@ -16,7 +16,6 @@ import { TypographyModule } from "../typography";
@Component({
selector: "bit-item-content, [bit-item-content]",
standalone: true,
imports: [TypographyModule, NgClass],
templateUrl: `item-content.component.html`,
host: {

View File

@@ -2,7 +2,6 @@ import { ChangeDetectionStrategy, Component } from "@angular/core";
@Component({
selector: "bit-item-group",
standalone: true,
imports: [],
template: `<ng-content></ng-content>`,
changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -12,7 +12,6 @@ import { ItemActionComponent } from "./item-action.component";
@Component({
selector: "bit-item",
standalone: true,
imports: [ItemActionComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: "item.component.html",

View File

@@ -11,7 +11,6 @@ import { SharedModule } from "../shared";
@Component({
selector: "bit-layout",
templateUrl: "layout.component.html",
standalone: true,
imports: [CommonModule, SharedModule, LinkModule, RouterModule, PortalModule],
hostDirectives: [DrawerHostDirective],
})

View File

@@ -76,7 +76,6 @@ abstract class LinkDirective {
*/
@Directive({
selector: "a[bitLink]",
standalone: true,
})
export class AnchorLinkDirective extends LinkDirective {
@HostBinding("class") get classList() {
@@ -88,7 +87,6 @@ export class AnchorLinkDirective extends LinkDirective {
@Directive({
selector: "button[bitLink]",
standalone: true,
})
export class ButtonLinkDirective extends LinkDirective {
@HostBinding("class") get classList() {

View File

@@ -3,6 +3,5 @@ import { Component } from "@angular/core";
@Component({
selector: "bit-menu-divider",
templateUrl: "./menu-divider.component.html",
standalone: true,
})
export class MenuDividerComponent {}

View File

@@ -6,7 +6,6 @@ import { Component, ElementRef, HostBinding, Input } from "@angular/core";
@Component({
selector: "[bitMenuItem]",
templateUrl: "menu-item.component.html",
standalone: true,
imports: [NgClass],
})
export class MenuItemDirective implements FocusableOption {

View File

@@ -19,7 +19,6 @@ import { MenuItemDirective } from "./menu-item.directive";
selector: "bit-menu",
templateUrl: "./menu.component.html",
exportAs: "menuComponent",
standalone: true,
imports: [CdkTrapFocus],
})
export class MenuComponent implements AfterContentInit {

View File

@@ -37,7 +37,6 @@ let nextId = 0;
selector: "bit-multi-select",
templateUrl: "./multi-select.component.html",
providers: [{ provide: BitFormFieldControl, useExisting: MultiSelectComponent }],
standalone: true,
imports: [NgSelectModule, ReactiveFormsModule, FormsModule, BadgeModule, I18nPipe],
})
/**

View File

@@ -6,7 +6,6 @@ import { SideNavService } from "./side-nav.service";
@Component({
selector: "bit-nav-divider",
templateUrl: "./nav-divider.component.html",
standalone: true,
imports: [CommonModule],
})
export class NavDividerComponent {

View File

@@ -27,7 +27,6 @@ import { SideNavService } from "./side-nav.service";
{ provide: NavBaseComponent, useExisting: NavGroupComponent },
{ provide: NavGroupAbstraction, useExisting: NavGroupComponent },
],
standalone: true,
imports: [CommonModule, NavItemComponent, IconButtonModule, I18nPipe],
})
export class NavGroupComponent extends NavBaseComponent implements AfterContentInit {

View File

@@ -13,7 +13,6 @@ import { NavGroupComponent } from "./nav-group.component";
import { NavigationModule } from "./navigation.module";
@Component({
standalone: true,
template: "",
})
class DummyContentComponent {}

View File

@@ -17,7 +17,6 @@ export abstract class NavGroupAbstraction {
selector: "bit-nav-item",
templateUrl: "./nav-item.component.html",
providers: [{ provide: NavBaseComponent, useExisting: NavItemComponent }],
standalone: true,
imports: [CommonModule, IconButtonModule, RouterModule],
})
export class NavItemComponent extends NavBaseComponent {

View File

@@ -13,7 +13,6 @@ import { SideNavService } from "./side-nav.service";
@Component({
selector: "bit-nav-logo",
templateUrl: "./nav-logo.component.html",
standalone: true,
imports: [RouterLinkActive, RouterLink, BitIconComponent, NavItemComponent],
})
export class NavLogoComponent {

View File

@@ -16,7 +16,6 @@ export type SideNavVariant = "primary" | "secondary";
@Component({
selector: "bit-side-nav",
templateUrl: "side-nav.component.html",
standalone: true,
imports: [CommonModule, CdkTrapFocus, NavDividerComponent, BitIconButtonComponent, I18nPipe],
})
export class SideNavComponent {

View File

@@ -9,7 +9,6 @@ import { BitIconComponent } from "../icon/icon.component";
@Component({
selector: "bit-no-items",
templateUrl: "./no-items.component.html",
standalone: true,
imports: [BitIconComponent],
})
export class NoItemsComponent {

View File

@@ -19,7 +19,6 @@ import { PopoverComponent } from "./popover.component";
@Directive({
selector: "[bitPopoverTriggerFor]",
standalone: true,
exportAs: "popoverTrigger",
})
export class PopoverTriggerForDirective implements OnDestroy, AfterViewInit {

View File

@@ -8,7 +8,6 @@ import { SharedModule } from "../shared/shared.module";
import { TypographyModule } from "../typography";
@Component({
standalone: true,
selector: "bit-popover",
imports: [A11yModule, IconButtonModule, SharedModule, TypographyModule],
templateUrl: "./popover.component.html",

View File

@@ -23,7 +23,6 @@ const BackgroundClasses: Record<BackgroundType, string[]> = {
@Component({
selector: "bit-progress",
templateUrl: "./progress.component.html",
standalone: true,
imports: [CommonModule],
})
export class ProgressComponent {

View File

@@ -10,7 +10,6 @@ let nextId = 0;
@Component({
selector: "bit-radio-button",
templateUrl: "radio-button.component.html",
standalone: true,
imports: [FormControlModule, RadioInputComponent],
})
export class RadioButtonComponent {

View File

@@ -13,7 +13,6 @@ let nextId = 0;
@Component({
selector: "bit-radio-group",
templateUrl: "radio-group.component.html",
standalone: true,
imports: [NgTemplateOutlet, I18nPipe],
})
export class RadioGroupComponent implements ControlValueAccessor {

View File

@@ -11,7 +11,6 @@ let nextId = 0;
selector: "input[type=radio][bitRadio]",
template: "",
providers: [{ provide: BitFormControlAbstraction, useExisting: RadioInputComponent }],
standalone: true,
})
export class RadioInputComponent implements BitFormControlAbstraction {
@HostBinding("attr.id") @Input() id = `bit-radio-input-${nextId++}`;

View File

@@ -30,7 +30,6 @@ let nextId = 0;
useExisting: SearchComponent,
},
],
standalone: true,
imports: [InputModule, ReactiveFormsModule, FormsModule, I18nPipe],
})
export class SearchComponent implements ControlValueAccessor, FocusableElement {

View File

@@ -3,7 +3,6 @@ import { Component } from "@angular/core";
import { TypographyModule } from "../typography";
@Component({
standalone: true,
selector: "bit-section-header",
templateUrl: "./section-header.component.html",
imports: [TypographyModule],

View File

@@ -4,7 +4,6 @@ import { Component, Input } from "@angular/core";
@Component({
selector: "bit-section",
standalone: true,
imports: [CommonModule],
template: `
<section

View File

@@ -7,7 +7,6 @@ import { Option } from "./option";
@Component({
selector: "bit-option",
template: `<ng-template><ng-content></ng-content></ng-template>`,
standalone: true,
})
export class OptionComponent<T = unknown> implements Option<T> {
@Input()

View File

@@ -10,7 +10,6 @@ import { SelectComponent } from "./select.component";
import { SelectModule } from "./select.module";
@Component({
standalone: true,
imports: [SelectModule, ReactiveFormsModule],
template: `
<form [formGroup]="form">

View File

@@ -35,7 +35,6 @@ let nextId = 0;
selector: "bit-select",
templateUrl: "select.component.html",
providers: [{ provide: BitFormFieldControl, useExisting: SelectComponent }],
standalone: true,
imports: [NgSelectModule, ReactiveFormsModule, FormsModule],
})
export class SelectComponent<T> implements BitFormFieldControl, ControlValueAccessor {

View File

@@ -8,7 +8,6 @@ import { TableDataSource, TableModule } from "../../../table";
@Component({
selector: "dialog-virtual-scroll-block",
standalone: true,
imports: [DialogModule, IconButtonModule, SectionComponent, TableModule, ScrollingModule],
template: /*html*/ `<bit-section>
<cdk-virtual-scroll-viewport scrollWindow itemSize="47">

View File

@@ -8,7 +8,6 @@ import { I18nMockService } from "../../../utils/i18n-mock.service";
import { KitchenSinkSharedModule } from "../kitchen-sink-shared.module";
@Component({
standalone: true,
selector: "bit-kitchen-sink-form",
imports: [KitchenSinkSharedModule],
providers: [

View File

@@ -9,7 +9,6 @@ import { KitchenSinkTable } from "./kitchen-sink-table.component";
import { KitchenSinkToggleList } from "./kitchen-sink-toggle-list.component";
@Component({
standalone: true,
imports: [KitchenSinkSharedModule],
template: `
<bit-dialog title="Dialog Title" dialogSize="large">
@@ -26,7 +25,6 @@ class KitchenSinkDialog {
}
@Component({
standalone: true,
selector: "bit-tab-main",
imports: [KitchenSinkSharedModule, KitchenSinkTable, KitchenSinkToggleList, KitchenSinkForm],
template: `

View File

@@ -3,7 +3,6 @@ import { Component } from "@angular/core";
import { KitchenSinkSharedModule } from "../kitchen-sink-shared.module";
@Component({
standalone: true,
selector: "bit-kitchen-sink-table",
imports: [KitchenSinkSharedModule],
template: `

View File

@@ -3,7 +3,6 @@ import { Component } from "@angular/core";
import { KitchenSinkSharedModule } from "../kitchen-sink-shared.module";
@Component({
standalone: true,
selector: "bit-kitchen-sink-toggle-list",
imports: [KitchenSinkSharedModule],
template: `

View File

@@ -2,7 +2,6 @@ import { Directive, HostBinding } from "@angular/core";
@Directive({
selector: "th[bitCell], td[bitCell]",
standalone: true,
})
export class CellDirective {
@HostBinding("class") get classList() {

View File

@@ -2,7 +2,6 @@ import { Directive, HostBinding, Input } from "@angular/core";
@Directive({
selector: "tr[bitRow]",
standalone: true,
})
export class RowDirective {
@Input() alignContent: "top" | "middle" | "bottom" | "baseline" = "middle";

View File

@@ -20,7 +20,6 @@ import { TableComponent } from "./table.component";
<i class="bwi tw-ms-2" [ngClass]="icon"></i>
</button>
`,
standalone: true,
imports: [NgClass],
})
export class SortableComponent implements OnInit {

View File

@@ -35,7 +35,6 @@ import { TableComponent } from "./table.component";
*/
@Directive({
selector: "[bitRowDef]",
standalone: true,
})
export class BitRowDef {
constructor(public template: TemplateRef<any>) {}
@@ -50,7 +49,6 @@ export class BitRowDef {
selector: "bit-table-scroll",
templateUrl: "./table-scroll.component.html",
providers: [{ provide: TableComponent, useExisting: TableScrollComponent }],
standalone: true,
imports: [
CommonModule,
CdkVirtualScrollViewport,

View File

@@ -17,7 +17,6 @@ import { TableDataSource } from "./table-data-source";
@Directive({
selector: "ng-template[body]",
standalone: true,
})
export class TableBodyDirective {
// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
@@ -27,7 +26,6 @@ export class TableBodyDirective {
@Component({
selector: "bit-table",
templateUrl: "./table.component.html",
standalone: true,
imports: [CommonModule],
})
export class TableComponent implements OnDestroy, AfterContentChecked {

View File

@@ -10,6 +10,5 @@ import { Component } from "@angular/core";
"tw-h-16 tw-ps-4 tw-bg-background-alt tw-flex tw-items-end tw-border-0 tw-border-b tw-border-solid tw-border-secondary-300",
},
template: `<ng-content></ng-content>`,
standalone: true,
})
export class TabHeaderComponent {}

View File

@@ -8,6 +8,5 @@ import { Directive } from "@angular/core";
host: {
class: "tw-inline-flex tw-flex-wrap tw-leading-5",
},
standalone: true,
})
export class TabListContainerDirective {}

View File

@@ -9,7 +9,6 @@ import { Directive, ElementRef, HostBinding, Input } from "@angular/core";
*/
@Directive({
selector: "[bitTabListItem]",
standalone: true,
})
export class TabListItemDirective implements FocusableOption {
@Input() active: boolean;

View File

@@ -6,7 +6,6 @@ import { Component, HostBinding, Input } from "@angular/core";
@Component({
selector: "bit-tab-body",
templateUrl: "tab-body.component.html",
standalone: true,
imports: [CdkPortalOutlet],
})
export class TabBodyComponent {

View File

@@ -31,7 +31,6 @@ let nextId = 0;
@Component({
selector: "bit-tab-group",
templateUrl: "./tab-group.component.html",
standalone: true,
imports: [
NgTemplateOutlet,
TabHeaderComponent,

View File

@@ -16,7 +16,6 @@ import { Directive, TemplateRef } from "@angular/core";
*/
@Directive({
selector: "[bitTabLabel]",
standalone: true,
})
export class TabLabelDirective {
constructor(public templateRef: TemplateRef<unknown>) {}

View File

@@ -19,7 +19,6 @@ import { TabLabelDirective } from "./tab-label.directive";
host: {
role: "tabpanel",
},
standalone: true,
})
export class TabComponent implements OnInit {
@Input() disabled = false;

View File

@@ -12,7 +12,6 @@ import { TabNavBarComponent } from "./tab-nav-bar.component";
@Component({
selector: "bit-tab-link",
templateUrl: "tab-link.component.html",
standalone: true,
imports: [TabListItemDirective, RouterModule],
})
export class TabLinkComponent implements FocusableOption, AfterViewInit, OnDestroy {

View File

@@ -21,7 +21,6 @@ import { TabLinkComponent } from "./tab-link.component";
host: {
class: "tw-block",
},
standalone: true,
imports: [TabHeaderComponent, TabListContainerDirective],
})
export class TabNavBarComponent implements AfterContentInit {

View File

@@ -4,7 +4,6 @@ import { ToastContainerDirective, ToastrService } from "ngx-toastr";
@Component({
selector: "bit-toast-container",
templateUrl: "toast-container.component.html",
standalone: true,
imports: [ToastContainerDirective],
})
export class ToastContainerComponent implements OnInit {

View File

@@ -28,7 +28,6 @@ const variants: Record<ToastVariant, { icon: string; bgColor: string }> = {
@Component({
selector: "bit-toast",
templateUrl: "toast.component.html",
standalone: true,
imports: [SharedModule, IconButtonModule, TypographyModule],
})
export class ToastComponent {

View File

@@ -26,7 +26,6 @@ import { ToastComponent } from "./toast.component";
transition("active => removed", animate("{{ easeTime }}ms {{ easing }}")),
]),
],
standalone: true,
imports: [ToastComponent],
})
export class BitwardenToastrComponent extends BaseToastrComponent {

View File

@@ -12,7 +12,6 @@ let nextId = 0;
@Component({
selector: "bit-toggle-group",
templateUrl: "./toggle-group.component.html",
standalone: true,
})
export class ToggleGroupComponent<TValue = unknown> {
private id = nextId++;

View File

@@ -19,7 +19,6 @@ let nextId = 0;
@Component({
selector: "bit-toggle",
templateUrl: "./toggle.component.html",
standalone: true,
imports: [NgClass],
})
export class ToggleComponent<TValue> implements AfterContentChecked, AfterViewInit {

View File

@@ -31,7 +31,6 @@ const margins: Record<TypographyType, string[]> = {
@Directive({
selector: "[bitTypography]",
standalone: true,
})
export class TypographyDirective {
@Input("bitTypography") bitTypography: TypographyType;