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 +49 -38
- package/fesm2022/ng-blatui.mjs +5218 -3640
- package/fesm2022/ng-blatui.mjs.map +1 -1
- package/package.json +2 -2
- package/types/ng-blatui.d.ts +542 -131
package/README.md
CHANGED
|
@@ -1,64 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ng-blatui
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
6
|
+
Full docs & live catalog: **https://ngblatui.remix-it.com**
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
## Installation
|
|
8
9
|
|
|
9
10
|
```bash
|
|
10
|
-
|
|
11
|
+
npm i ng-blatui
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
Peer dependencies: `@angular/core`, `@angular/common`, `@angular/forms`, `@angular/cdk`,
|
|
15
|
+
`@angular/aria` (Angular 21 or 22).
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
ng generate --help
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Building
|
|
17
|
+
### Tailwind CSS setup
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
Styling is **Tailwind CSS v4**. In your app's global stylesheet (e.g. `src/styles.css`):
|
|
22
20
|
|
|
23
|
-
```
|
|
24
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
32
|
+
### Icons
|
|
30
33
|
|
|
31
|
-
|
|
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
|
-
|
|
37
|
+
## Usage
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```
|
|
39
|
+
Import the component from the `ng-blatui` barrel into a standalone component's `imports[]` — no
|
|
40
|
+
NgModule.
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
```
|
|
42
|
+
```ts
|
|
43
|
+
import { Component } from '@angular/core';
|
|
44
|
+
import { BuiButton, BuiBadge } from 'ng-blatui';
|
|
43
45
|
|
|
44
|
-
|
|
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
|
-
|
|
54
|
+
Signals throughout (`input()` / `model()`); every form control is a `ControlValueAccessor`
|
|
55
|
+
(`formControlName`, `[(ngModel)]`, `[formControl]` all work).
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
ng test
|
|
50
|
-
```
|
|
57
|
+
### Form fields: two levels
|
|
51
58
|
|
|
52
|
-
|
|
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
|
-
|
|
65
|
+
Other easy-to-miss building blocks: `buiEmpty` (empty states), `bui-stat` (stat cards).
|
|
55
66
|
|
|
56
|
-
|
|
57
|
-
ng e2e
|
|
58
|
-
```
|
|
67
|
+
## Discover the whole catalog
|
|
59
68
|
|
|
60
|
-
|
|
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
|
-
##
|
|
73
|
+
## License
|
|
63
74
|
|
|
64
|
-
|
|
75
|
+
MIT
|