ngx-cho-components 1.0.0 → 3.3.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.
Files changed (41) hide show
  1. package/README.md +35 -119
  2. package/fesm2022/ngx-cho-components.mjs +736 -279
  3. package/fesm2022/ngx-cho-components.mjs.map +1 -1
  4. package/lib/cho-address-info.component.d.ts +2 -2
  5. package/lib/cho-card-header.component.d.ts +4 -2
  6. package/lib/cho-card-tabs.component.d.ts +1 -1
  7. package/lib/cho-card.component.d.ts +14 -16
  8. package/lib/cho-component.types.d.ts +2 -0
  9. package/lib/cho-detail-page.component.d.ts +26 -0
  10. package/lib/cho-details-card.component.d.ts +4 -4
  11. package/lib/cho-email-info.component.d.ts +2 -6
  12. package/lib/cho-pager.component.d.ts +23 -0
  13. package/lib/cho-phone-info.component.d.ts +2 -2
  14. package/lib/cho-radio-group.component.d.ts +13 -12
  15. package/lib/cho-review-status-alert.component.d.ts +3 -3
  16. package/lib/cho-search-card.component.d.ts +41 -0
  17. package/lib/index.d.ts +5 -5
  18. package/package.json +15 -10
  19. package/styles/_cards.scss +116 -0
  20. package/styles/_contact-info.scss +9 -0
  21. package/styles/_detail-page.scss +31 -0
  22. package/styles/_forms.scss +33 -0
  23. package/styles/_index.scss +8 -0
  24. package/styles/_pager.scss +45 -0
  25. package/styles/_responsive.scss +26 -0
  26. package/styles/_search-card.scss +44 -0
  27. package/styles/_status.scss +9 -0
  28. package/esm2022/lib/cho-address-info.component.mjs +0 -37
  29. package/esm2022/lib/cho-card-filters.component.mjs +0 -18
  30. package/esm2022/lib/cho-card-header.component.mjs +0 -55
  31. package/esm2022/lib/cho-card-tabs.component.mjs +0 -63
  32. package/esm2022/lib/cho-card-toolbar.component.mjs +0 -18
  33. package/esm2022/lib/cho-card.component.mjs +0 -123
  34. package/esm2022/lib/cho-details-card.component.mjs +0 -52
  35. package/esm2022/lib/cho-email-info.component.mjs +0 -36
  36. package/esm2022/lib/cho-phone-info.component.mjs +0 -29
  37. package/esm2022/lib/cho-radio-group.component.mjs +0 -70
  38. package/esm2022/lib/cho-review-status-alert.component.mjs +0 -31
  39. package/esm2022/lib/index.mjs +0 -12
  40. package/esm2022/ngx-cho-components.mjs +0 -5
  41. package/esm2022/public-api.mjs +0 -5
package/README.md CHANGED
@@ -1,133 +1,49 @@
1
- # NgxChoComponents
2
-
3
- This library provides reusable Angular components for CHO applications with comprehensive Storybook documentation.
4
-
5
- Generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
6
-
7
- ## Overview
8
-
9
- NgxChoComponents includes:
10
- - `ChoAddressInfoComponent` - Address display and editing
11
- - `ChoDetailsCardComponent` - Information card layout
12
- - `ChoEmailInfoComponent` - Email display and validation
13
- - `ChoPhoneInfoComponent` - Phone number display and formatting
14
- - `ChoRadioGroupComponent` - Radio button group with validation
15
- - `ChoReviewStatusAlertComponent` - Status alert messages
16
-
17
- ## Dependencies
1
+ # NgxChoComponents
18
2
 
19
- This library depends on:
20
- - **ngx-cho-common** (must be built first)
21
-
22
- This library does not require Bootstrap, ng-bootstrap, Popper, or PrimeNG.
3
+ `ngx-cho-components` is the canonical home for reusable rendered UI across CHO Angular applications. Version 3.3 targets Angular 19 and PrimeNG 19 and has no Bootstrap, ng-bootstrap, PrimeFlex, Tailwind-presentation, toast, or spinner dependency.
23
4
 
24
5
  ## Installation
25
6
 
26
7
  ```bash
27
- npm install ngx-cho-components ngx-cho-common
8
+ npm install --save-exact ngx-cho-common@3.3.0 ngx-cho-components@3.3.0
28
9
  ```
29
10
 
30
- ## Breaking Changes
11
+ Applications must provide compatible Angular Common, Core, and Forms packages plus PrimeNG 19.
31
12
 
32
- `ChoModalComponent` and the `<cho-modal>` selector have been removed. Applications should replace modal usage with an app-local dialog implementation, such as a native dialog or a PrimeNG dialog/drawer. This package no longer declares `bootstrap` or `@ng-bootstrap/ng-bootstrap` as peer dependencies.
33
-
34
- ## Build
35
-
36
- **Important**: Build `ngx-cho-common` first before building this library.
37
-
38
- ```bash
39
- # Build dependencies first
40
- ng build ngx-cho-common
41
-
42
- # Then build this library
43
- ng build ngx-cho-components
44
- ```
45
-
46
- Build artifacts will be stored in the `dist/ngx-cho-components` directory.
47
-
48
- ## Development
49
-
50
- ### Code Scaffolding
51
-
52
- ```bash
53
- ng generate component component-name --project ngx-cho-components
54
- ng generate service service-name --project ngx-cho-components
55
- ```
56
-
57
- > Note: Always include `--project ngx-cho-components` or the component will be added to the default project.
58
-
59
- ### Storybook Development
60
-
61
- This library includes Storybook for component development and documentation:
62
-
63
- ```bash
64
- # Start Storybook development server
65
- ng run ngx-cho-components:storybook
66
-
67
- # Build Storybook for deployment
68
- ng run ngx-cho-components:build-storybook
69
- ```
70
-
71
- Storybook will be available at `http://localhost:6006`
72
-
73
- ### Running Tests
74
-
75
- ```bash
76
- ng test ngx-cho-components
77
- ```
78
-
79
- ## Publishing
13
+ Import component styles once in the application root stylesheet, after the Common foundation:
80
14
 
81
- 1. **Update version** in `projects/ngx-cho-components/package.json`. Use a major version for the modal-component and peer-dependency removal.
82
- 2. **Build dependencies and library**:
83
- ```bash
84
- ng build ngx-cho-common
85
- ng build ngx-cho-components --configuration production
86
- ```
87
- 3. **Publish to npm**:
88
- ```bash
89
- cd dist/ngx-cho-components
90
- npm publish
91
- ```
92
-
93
- ## Usage
94
-
95
- Import the components module in your application:
96
-
97
- ```typescript
98
- import { NgxChoComponentsModule } from 'ngx-cho-components';
99
-
100
- @NgModule({
101
- imports: [NgxChoComponentsModule],
102
- // ...
103
- })
104
- export class AppModule {}
105
- ```
106
-
107
- Use components in your templates:
15
+ ```scss
16
+ @use 'ngx-cho-common/styles';
17
+ @use 'ngx-cho-components/styles';
18
+ ```
108
19
 
109
- ```html
110
- <cho-address-info [address]="userAddress"></cho-address-info>
20
+ ## Public UI
21
+
22
+ - `ChoSearchCardComponent` composes a consistent card, named toolbar/filter/tab/content templates, optional paging, semantic padding, embedding, and configurable heading levels.
23
+ - `ChoDetailPageComponent` composes a header/tabs card with a separate projected feature body, a configurable heading, semantic body padding, and an optional back action.
24
+ - `ChoPagerComponent` maps PrimeNG paginator events to immutable `PaginationInstance` values. Query synchronization is explicit and its dropdown overlay appends to `body` by default.
25
+ - `ChoCardComponent`, `ChoDetailsCardComponent`, contact display components, `ChoRadioGroupComponent`, and `ChoReviewStatusAlertComponent` provide the remaining reusable visual contracts.
26
+
27
+ Named slots are declared on `ng-template` elements:
111
28
 
112
- <cho-radio-group
113
- [options]="radioOptions"
114
- [(value)]="selectedValue">
115
- </cho-radio-group>
29
+ ```html
30
+ <cho-search-card cardTitle="Jobs" [pager]="pager" [syncPagerQueryParams]="false">
31
+ <ng-template choSearchCardFilters>...</ng-template>
32
+ <ng-template choSearchCardToolbar>...</ng-template>
33
+ <ng-template choSearchCardContent>...</ng-template>
34
+ </cho-search-card>
116
35
  ```
117
36
 
118
- ## Styling
37
+ Use `contentPadding="none"`, `compact`, or `comfortable`; wrap feature-specific layout in projected content instead of passing arbitrary classes into shared UI.
38
+ Embedded SearchCards omit their own header and tabs. They retain filters, named content, and paging so callers can place them inside an application-owned surface without nested card chrome.
39
+
40
+ ## Build and Validation
41
+
42
+ ```bash
43
+ npm run build:components
44
+ npx ng test ngx-cho-components --watch=false --browsers=ChromeHeadless
45
+ npm run test:style-contract
46
+ npm run publish:components:dry
47
+ ```
119
48
 
120
- Components are framework-neutral and do not require Bootstrap. Applications should provide their own layout, dialog, and theme styling.
121
-
122
- ## Documentation
123
-
124
- View component documentation and examples in Storybook:
125
- 1. Run `ng run ngx-cho-components:storybook`
126
- 2. Navigate to `http://localhost:6006`
127
- 3. Browse component stories and interact with examples
128
-
129
- ## Further Help
130
-
131
- - [Angular CLI Overview and Command Reference](https://angular.io/cli)
132
- - [Storybook for Angular](https://storybook.js.org/docs/angular/get-started/introduction)
133
- - [Angular Library Development Guide](https://angular.io/guide/creating-libraries)
49
+ The guarded build verifies the Sass interface, peer contract, export targets, and packed tarball. Publishing is intentionally limited to the `next` tag by the package-specific command.