diff --git a/AGENTS.md b/AGENTS.md index 1b2ec300..ea4fad25 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -123,7 +123,7 @@ Apply these rules to all new or modified Angular code: - **Angular 21.x** with standalone components (no NgModules pattern) - **TypeScript 5.9.3** -- **Bootstrap 5.3** + **Angular Material 21.x** (UI components) +- **Angular Material 21.x** (UI components). The library has no Bootstrap dependency: button directives and components keep their Bootstrap class names and ship their own CSS for them. Library CSS sits in the `ng-kit` cascade layer. The demo still loads Bootstrap 5.3 for its own layout. - **RxJS 7.x** ### Package manager diff --git a/projects/ng-kit-demo/e2e/home.spec.ts b/projects/ng-kit-demo/e2e/home.spec.ts index 69941f42..eb2dea45 100644 --- a/projects/ng-kit-demo/e2e/home.spec.ts +++ b/projects/ng-kit-demo/e2e/home.spec.ts @@ -3,11 +3,11 @@ import { expect, test } from '@playwright/test'; test('has success alert', async ({ page }) => { await page.goto('/alert-demo'); await expect(page.getByText('Success Alert')).toHaveCount(2); - await expect(page.locator('.btn-close')).toHaveCount(2); + await expect(page.getByRole('button', { name: 'Close', exact: true })).toHaveCount(2); }); test('has error alert', async ({ page }) => { await page.goto('/alert-demo'); await expect(page.getByText('Error Alert')).toHaveCount(2); - await expect(page.locator('.btn-close')).toHaveCount(2); + await expect(page.getByRole('button', { name: 'Close', exact: true })).toHaveCount(2); }); diff --git a/projects/ng-kit-demo/src/app/pages/alert/alert.page.ts b/projects/ng-kit-demo/src/app/pages/alert/alert.page.ts index 20be21b8..34b7c9e9 100644 --- a/projects/ng-kit-demo/src/app/pages/alert/alert.page.ts +++ b/projects/ng-kit-demo/src/app/pages/alert/alert.page.ts @@ -46,8 +46,8 @@ const alertTypesConfig = getAlertDemoConfig(); template: `

- Fully customizable, reusable alert component styled with Bootstrap CSS. Designed for standalone usage, tree-shakable imports, and - reactive state via Angular signals. Configure the alert type, visibility, dismiss behavior, and custom classes. + Fully customizable, reusable alert component with its own styles. Designed for standalone usage, tree-shakable imports, and reactive + state via Angular signals. Configure the alert type, visibility, dismiss behavior, and custom classes.

@@ -165,7 +165,7 @@ const alertTypesConfig = getAlertDemoConfig(); -

Requires Bootstrap styles to be loaded for the alert to render correctly.

+

No Bootstrap styles are required. The existing alert and alert-* classes remain.

`, diff --git a/projects/ng-kit-demo/src/app/pages/installation/installation.page.ts b/projects/ng-kit-demo/src/app/pages/installation/installation.page.ts index 74d6fed8..75bdc6f6 100644 --- a/projects/ng-kit-demo/src/app/pages/installation/installation.page.ts +++ b/projects/ng-kit-demo/src/app/pages/installation/installation.page.ts @@ -59,7 +59,7 @@ npm install`; @@ -118,8 +118,12 @@ npm install`; installed.
  • Clean install: Delete node_modules and lock files, then reinstall dependencies.
  • -
  • Bootstrap styles: Verify Bootstrap CSS is properly imported if components appear unstyled.
  • +
  • Library styles: Ensure the application allows component styles if buttons or alerts appear unstyled.
  • Angular Material: Ensure Angular Material is installed if using Material-based components.
  • +
  • + CSS layers: If your application uses layers, declare ng-kit before your utility layer, for example + @layer components, ng-kit, utilities; near the top of your stylesheet. +
  • TypeScript errors: Ensure you're using a compatible TypeScript version (check Angular requirements).
  • Update guide: Review the Angular Update Guide for breaking changes between versions.
  • diff --git a/projects/ng-kit-demo/src/app/pages/introduction/introduction.page.ts b/projects/ng-kit-demo/src/app/pages/introduction/introduction.page.ts index 0d689656..08f52364 100644 --- a/projects/ng-kit-demo/src/app/pages/introduction/introduction.page.ts +++ b/projects/ng-kit-demo/src/app/pages/introduction/introduction.page.ts @@ -12,7 +12,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';

    Introduction

    @js-smart/ng-kit is a comprehensive collection of reusable Angular components, directives, and utilities built - with Angular Material and Bootstrap 5.x. + with Angular Material. The library provides its own button and alert styles without requiring Bootstrap.

    @@ -28,8 +28,8 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';

    Key features