@public-ui/angular-v19 3.0.1-rc.0 → 3.0.1

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
@@ -11,57 +11,93 @@
11
11
  This package provides an Angular adapter for KoliBri components, making them easily usable in Angular applications.
12
12
 
13
13
  ## Installation
14
+
14
15
  ```bash
15
16
  npm install @public-ui/angular-v19
16
17
  ```
17
18
 
19
+ ## Usage
20
+
18
21
  ### With NgModule (Traditional)
22
+
19
23
  ```typescript
20
24
  import { NgModule } from '@angular/core';
21
25
  import { KoliBriModule } from '@public-ui/angular-v19';
22
26
 
23
27
  @NgModule({
24
- imports: [KoliBriModule],
28
+ imports: [KoliBriModule],
29
+ // ...
25
30
  })
26
31
  export class AppModule {}
27
32
  ```
28
33
 
29
34
  ### With Standalone Components (Recommended)
35
+
30
36
  ```typescript
31
37
  import { Component } from '@angular/core';
32
38
  import { KolButton } from '@public-ui/angular-v19';
33
39
 
34
40
  @Component({
35
- selector: 'app-root',
36
- standalone: true,
37
- imports: [KolButton],
38
- template: ` <kol-button _label="Click me!"></kol-button> `,
41
+ selector: 'app-root',
42
+ standalone: true,
43
+ imports: [KolButton],
44
+ template: ` <kol-button _label="Click me!"></kol-button> `,
39
45
  })
40
46
  export class AppComponent {}
41
47
  ```
42
48
 
43
49
  ## Available Components
50
+
44
51
  All KoliBri components are available as standalone components. Here's how to use them:
52
+
45
53
  ```typescript
46
54
  import { KolButton, KolInputText, KolHeading } from '@public-ui/angular-v19';
47
55
 
48
56
  @Component({
57
+ // ...
49
58
  imports: [KolButton, KolInputText, KolHeading],
50
59
  })
51
60
  ```
52
61
 
53
62
  ## Migration from NgModule to Standalone
63
+
64
+ If you're migrating from the NgModule approach to standalone components:
65
+
54
66
  1. Remove the `KoliBriModule` import from your NgModule
55
67
  2. Import the specific components you need directly
56
68
  3. Add them to your component's `imports` array
57
- 4. Ensure your component is marked `standalone: true`
69
+ 4. Make sure your component is marked as `standalone: true`
70
+
71
+ Example migration:
72
+
73
+ ```typescript
74
+ // Before (NgModule)
75
+ import { KoliBriModule } from '@public-ui/angular-v19';
76
+
77
+ @NgModule({
78
+ imports: [KoliBriModule],
79
+ })
80
+ export class AppModule {}
81
+
82
+ // After (Standalone)
83
+ import { KolButton } from '@public-ui/angular-v19';
84
+
85
+ @Component({
86
+ standalone: true,
87
+ imports: [KolButton],
88
+ })
89
+ export class AppComponent {}
90
+ ```
58
91
 
59
92
  ## Browser Support
93
+
60
94
  This package supports all modern browsers that are supported by Angular 19.
61
95
 
62
96
  ## License
97
+
63
98
  EUPL-1.2
64
99
 
65
100
  ## References
101
+
66
102
  - [Architecture Concept](https://public-ui.github.io/docs/concepts/architecture)
67
103
  - [Project Documentation](https://public-ui.github.io/docs)