ng-blatui 1.32.2 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,64 +1,75 @@
1
- # NgBlatui
1
+ # ng-blatui
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 22.0.0.
3
+ A large Angular 21/22 UI library — 157 signal-based, standalone, zoneless- and SSR-safe components
4
+ styled with Tailwind CSS v4. Selectors are prefixed **`bui`**.
4
5
 
5
- ## Code scaffolding
6
+ Full docs & live catalog: **https://ngblatui.remix-it.com**
6
7
 
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
+ ## Installation
8
9
 
9
10
  ```bash
10
- ng generate component component-name
11
+ npm i ng-blatui
11
12
  ```
12
13
 
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
+ Peer dependencies: `@angular/core`, `@angular/common`, `@angular/forms`, `@angular/cdk`,
15
+ `@angular/aria` (Angular 21 or 22).
14
16
 
15
- ```bash
16
- ng generate --help
17
- ```
18
-
19
- ## Building
17
+ ### Tailwind CSS setup
20
18
 
21
- To build the library, run:
19
+ Styling is **Tailwind CSS v4**. In your app's global stylesheet (e.g. `src/styles.css`):
22
20
 
23
- ```bash
24
- ng build ng-blatui
21
+ ```css
22
+ @import 'tailwindcss';
23
+ @import 'ng-blatui/foundations/blatui.css'; /* design tokens + dark theme */
24
+ @source '../node_modules/ng-blatui'; /* ← generate the utilities the lib's classes use */
25
25
  ```
26
26
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
27
+ The **`@source`** line is the one to not forget: without it Tailwind never scans ng-blatui's
28
+ compiled templates, so components render **unstyled**. Adjust the `../` depth so it points at
29
+ `node_modules/ng-blatui` relative to the stylesheet. Dark mode is a `dark` class on a parent;
30
+ override any oklch token in `:root` / `.dark` to re-theme.
28
31
 
29
- ### Publishing the Library
32
+ ### Icons
30
33
 
31
- Once the project is built, you can publish your library by following these steps:
34
+ ng-blatui ships no icon set wire your own (e.g. `@ng-icons`) with `provideIcons(...)`. Components
35
+ that take an icon accept an SVG path `d` string, so any source works.
32
36
 
33
- 1. Navigate to the `dist` directory:
37
+ ## Usage
34
38
 
35
- ```bash
36
- cd dist/ng-blatui
37
- ```
39
+ Import the component from the `ng-blatui` barrel into a standalone component's `imports[]` — no
40
+ NgModule.
38
41
 
39
- 2. Run the `npm publish` command to publish your library to the npm registry:
40
- ```bash
41
- npm publish
42
- ```
42
+ ```ts
43
+ import { Component } from '@angular/core';
44
+ import { BuiButton, BuiBadge } from 'ng-blatui';
43
45
 
44
- ## Running unit tests
46
+ @Component({
47
+ selector: 'app-demo',
48
+ imports: [BuiButton, BuiBadge],
49
+ template: `<button buiButton>Save <span buiBadge tone="success">New</span></button>`,
50
+ })
51
+ export class Demo {}
52
+ ```
45
53
 
46
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
54
+ Signals throughout (`input()` / `model()`); every form control is a `ControlValueAccessor`
55
+ (`formControlName`, `[(ngModel)]`, `[formControl]` all work).
47
56
 
48
- ```bash
49
- ng test
50
- ```
57
+ ### Form fields: two levels
51
58
 
52
- ## Running end-to-end tests
59
+ - **Batteries-included** (label + hint + error + ARIA handled for you): `BuiInputField`,
60
+ `BuiMoneyInput` (localized currency; `symbol="DH"` overrides the ISO code), `BuiDateRangePicker`
61
+ (start→end with presets), `BuiSelect`, `BuiCombobox`, `BuiAutocomplete`, `BuiPhoneInput`.
62
+ - **Composition primitives** for custom layouts: `buiField` + `buiFieldLabel` /
63
+ `buiFieldDescription` / `buiFieldError` around a bare `buiInput`.
53
64
 
54
- For end-to-end (e2e) testing, run:
65
+ Other easy-to-miss building blocks: `buiEmpty` (empty states), `bui-stat` (stat cards).
55
66
 
56
- ```bash
57
- ng e2e
58
- ```
67
+ ## Discover the whole catalog
59
68
 
60
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
69
+ - Live docs: **https://ngblatui.remix-it.com/components**
70
+ - `llms.txt` (for AI tools): **https://ngblatui.remix-it.com/llms.txt**
71
+ - MCP server: `npx ng-blatui-mcp`
61
72
 
62
- ## Additional Resources
73
+ ## License
63
74
 
64
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
75
+ MIT