clr-lift 19.0.0 โ†’ 21.0.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,40 +1,115 @@
1
- # clr-lift Overview
1
+ <div align="center">
2
2
 
3
- The **clr-lift** library is designed to augment the capabilities of the Clarity library by providing a set of reusable
4
- components built on top of clarity components.
3
+ # ๐ŸŽจ clr-lift
4
+
5
+ **Production-ready Angular components built on Clarity Design System**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/clr-lift.svg?logo=npm)](https://www.npmjs.com/package/clr-lift)
8
+ [![npm downloads](https://img.shields.io/npm/dm/clr-lift.svg)](https://www.npmjs.com/package/clr-lift)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+ [![Angular](https://img.shields.io/badge/Angular-%3E%3D19.0.0-red.svg)](https://angular.io)
11
+ [![Clarity](https://img.shields.io/badge/Clarity-%3E%3D17.0.0-blue.svg)](https://clarity.design)
12
+
13
+ [๐Ÿ“– Documentation](https://ngx-lift.netlify.app/clr-lift) โ€ข [๐ŸŽฎ Live Demo](https://ngx-lift.netlify.app/clr-lift) โ€ข
14
+ [๐Ÿ’ป Source Code](https://github.com/wghglory/ngx-lift-workspace/tree/main/libs/clr-lift)
15
+
16
+ </div>
17
+
18
+ ---
19
+
20
+ A comprehensive Angular component library built on top of the **Clarity Design System**. **clr-lift** extends Clarity's
21
+ capabilities by providing a rich set of production-ready, reusable components, utilities, and operators that simplify
22
+ common development tasks.
23
+
24
+ **Why clr-lift?**
25
+
26
+ - ๐ŸŽจ **15+ Components** - Alerts, toasts, wizards, spinners, and more
27
+ - ๐Ÿ—๏ธ **Built on Clarity** - Consistent with VMware Clarity Design System
28
+ - โ™ฟ **Accessible** - WCAG compliant with ARIA support
29
+ - ๐ŸŽฏ **Type-Safe** - Full TypeScript support with strict mode
30
+ - ๐ŸŒ“ **Theme Support** - Light and dark mode out of the box
31
+ - ๐Ÿ“ฆ **Tree-Shakable** - Import only what you need
5
32
 
6
33
  ## Features
7
34
 
8
- 1. **dgState Operator**
35
+ ### ๐ŸŽจ Components
36
+
37
+ - **`cll-alert`** - Enhanced alert component with customizable types and styling
38
+ - **`cll-alerts`** - Alert container service for managing multiple alerts
39
+ - **`cll-callout`** - Callout component for highlighting important information
40
+ - **`cll-certificate-signpost`** - Certificate display and validation component
41
+ - **`cll-file-reader`** - File input component with drag-and-drop support
42
+ - **`cll-idle-detection`** - Idle detection component with configurable timeouts
43
+ - **`cll-key-value-inputs`** - Key-value pair input component for forms
44
+ - **`cll-page-container`** - Page layout container component
45
+ - **`cll-spinner`** - Loading spinner component
46
+ - **`cll-status-indicator`** - Status indicator component with various states
47
+ - **`cll-theme-toggle`** - Theme toggle component for light/dark mode
48
+ - **`cll-timeline-wizard`** - Timeline wizard component for multi-step flows
49
+ - **`cll-toast`** - Toast notification component
50
+ - **`cll-tooltip`** - Advanced tooltip component with rich content support
51
+
52
+ ### ๐Ÿ”ง Operators
53
+
54
+ - **`dgState`** - Streamlines Clarity datagrid state management, making it easier to work with datagrid state changes
55
+
56
+ ### ๐Ÿ› ๏ธ Utilities
57
+
58
+ - **`convertToHttpParams`** - Converts Clarity datagrid state to HTTP query parameters
59
+ - **Datagrid Utilities** - Helper functions for working with Clarity datagrids
60
+
61
+ ### ๐Ÿ“ฆ Models
62
+
63
+ - **`PageQuery`** - Type for pagination query parameters
64
+ - **`Rde`** - Type for RDE (Resource Definition Entity) objects
9
65
 
10
- The **clr-lift** library introduces the `dgState` operator, which enhances the functionality of the Clarity library.
11
- This operator streamlines the management of datagrid state, making it more intuitive and efficient for developers to
12
- work with Clarity datagrids.
66
+ ### ๐ŸŒ Services
13
67
 
14
- 2. **Datagrid Utilities**
68
+ - **`TranslationService`** - Service for managing translations and i18n
15
69
 
16
- The library includes a set of utilities specifically tailored for Clarity datagrids. These utilities aim to simplify
17
- common tasks and operations related to datagrids, providing developers with a more streamlined and cohesive
18
- experience when working with Clarity components.
70
+ ### ๐Ÿ”ค Pipes
71
+
72
+ - **`translate`** - Translation pipe for displaying translated text
19
73
 
20
74
  ## Requirements
21
75
 
22
- To ensure optimal performance and compatibility, clr-lift requires **Angular version 17 or higher**.
76
+ - **Angular**: >= 21.0.0
77
+ - **@clr/angular**: >= 18.0.0
78
+ - **ngx-lift**: >= 21.0.0
79
+ - **RxJS**: >= 7.8.0
23
80
 
24
- ## Getting Started
81
+ ## Installation
25
82
 
26
- ### Installation
83
+ Install clr-lift and its peer dependencies:
84
+
85
+ ```bash
86
+ npm install clr-lift @clr/angular ngx-lift
87
+ # or
88
+ yarn add clr-lift @clr/angular ngx-lift
89
+ # or
90
+ pnpm add clr-lift @clr/angular ngx-lift
91
+ ```
92
+
93
+ ## ๐Ÿš€ Quick Start
27
94
 
28
- To use **clr-lift** in your project, you can install it using your preferred package manager. For example, with npm:
95
+ ### Installation
29
96
 
30
97
  ```bash
31
- npm install clr-lift
98
+ npm install clr-lift @clr/angular ngx-lift
99
+ # or
100
+ yarn add clr-lift @clr/angular ngx-lift
101
+ # or
102
+ pnpm add clr-lift @clr/angular ngx-lift
32
103
  ```
33
104
 
34
- ### Usage
105
+ ### Using the dgState Operator
106
+
107
+ **Simplified Datagrid State Management** - Streamline Clarity datagrid state handling:
35
108
 
36
- ```ts
109
+ ```typescript
37
110
  import {dgState, convertToHttpParams} from 'clr-lift';
111
+ import {BehaviorSubject, switchMap, share} from 'rxjs';
112
+ import {ClrDatagridStateInterface} from '@clr/angular';
38
113
 
39
114
  export class UserDatagridComponent {
40
115
  private dgSource = new BehaviorSubject<ClrDatagridStateInterface | null>(null);
@@ -43,33 +118,144 @@ export class UserDatagridComponent {
43
118
  usersState$ = this.dgState$.pipe(
44
119
  switchMap((state) => {
45
120
  const params = convertToHttpParams(state);
46
- return this.userService.getUserAPI(params);
121
+ return this.userService.getUsers(params);
47
122
  }),
48
123
  share(),
49
124
  );
125
+
126
+ refresh(state: ClrDatagridStateInterface) {
127
+ this.dgSource.next(state);
128
+ }
129
+ }
130
+ ```
131
+
132
+ ### Using Components
133
+
134
+ **Standalone Components** - Import only what you need:
135
+
136
+ ```typescript
137
+ import {Component} from '@angular/core';
138
+ import {AlertComponent, SpinnerComponent, PageContainerComponent, ToastService} from 'clr-lift';
139
+
140
+ @Component({
141
+ selector: 'app-example',
142
+ imports: [AlertComponent, SpinnerComponent, PageContainerComponent],
143
+ template: `
144
+ <cll-alert [type]="'success'" [closable]="true"> Operation completed successfully! </cll-alert>
145
+
146
+ <cll-spinner [size]="'lg'"></cll-spinner>
147
+
148
+ <cll-page-container>
149
+ <h1>Page Content</h1>
150
+ </cll-page-container>
151
+
152
+ <button (click)="showToast()">Show Toast</button>
153
+ `,
154
+ })
155
+ export class ExampleComponent {
156
+ private toastService = inject(ToastService);
157
+
158
+ showToast() {
159
+ this.toastService.show({
160
+ type: 'success',
161
+ message: 'Operation completed!',
162
+ });
163
+ }
50
164
  }
51
165
  ```
52
166
 
53
- ## Running unit tests
167
+ ### Using File Reader Component
168
+
169
+ ```html
170
+ <cll-file-reader
171
+ [(ngModel)]="file"
172
+ [accept]="'.pdf,.doc,.docx'"
173
+ [maxSize]="5242880"
174
+ [multiple]="false"
175
+ ></cll-file-reader>
176
+ ```
177
+
178
+ ### Using Theme Toggle
179
+
180
+ ```html
181
+ <cll-theme-toggle></cll-theme-toggle>
182
+ ```
183
+
184
+ ### Using Timeline Wizard
185
+
186
+ ```html
187
+ <cll-timeline-wizard
188
+ [steps]="wizardSteps"
189
+ [currentStep]="currentStep"
190
+ (stepChange)="onStepChange($event)"
191
+ ></cll-timeline-wizard>
192
+ ```
193
+
194
+ ## ๐Ÿ“š Documentation
195
+
196
+ - **๐Ÿ“– Full Documentation**: [ngx-lift.netlify.app/clr-lift](https://ngx-lift.netlify.app/clr-lift)
197
+ - **๐ŸŽฎ Interactive Demo**: [Live Examples](https://ngx-lift.netlify.app/clr-lift)
198
+ - **๐Ÿ’ป Source Code**: [GitHub Repository](https://github.com/wghglory/ngx-lift-workspace/tree/main/libs/clr-lift)
199
+ - **๐Ÿ“ฆ npm Package**: [npmjs.com/package/clr-lift](https://www.npmjs.com/package/clr-lift)
200
+ - **๐ŸŽจ Clarity Design System**: [clarity.design](https://clarity.design)
54
201
 
55
- Run `nx test clr-lift` to execute the unit tests.
202
+ ## ๐ŸŽฏ Use Cases
56
203
 
57
- ## Contributing
204
+ **clr-lift** is perfect for:
58
205
 
59
- We welcome contributions to the **clr-lift** library. If you encounter any issues, have feature requests, or would like
60
- to contribute code, please check out our
61
- [contribution guidelines](https://github.com/wghglory/ngx-lift-workspace/CONTRIBUTING.md).
206
+ - ๐ŸŽจ **UI Components** - Production-ready components for Clarity-based applications
207
+ - ๐Ÿ“Š **Data Grids** - Simplified state management for Clarity datagrids
208
+ - ๐Ÿ”” **Notifications** - Toast notifications and alerts
209
+ - ๐Ÿ“ **Forms** - Enhanced form components (file uploads, key-value inputs)
210
+ - ๐Ÿงญ **Navigation** - Wizards, timelines, and multi-step flows
211
+ - ๐ŸŽญ **Theming** - Easy theme switching between light and dark modes
62
212
 
63
- ## License
213
+ ## ๐Ÿงช Testing
64
214
 
65
- **clr-lift** is licensed under the MIT License.
215
+ Run the unit tests for clr-lift:
66
216
 
67
- ## Acknowledgments
217
+ ```bash
218
+ nx test clr-lift
219
+ ```
68
220
 
69
- We would like to express our gratitude to the Clarity library maintainers and contributors for their foundational work
70
- that enables the development of **clr-lift**.
221
+ Run tests with coverage:
222
+
223
+ ```bash
224
+ nx test clr-lift --coverage
225
+ ```
226
+
227
+ ## ๐Ÿค Contributing
228
+
229
+ We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help makes this
230
+ project better.
231
+
232
+ - ๐Ÿ› **Found a bug?** [Open an issue](https://github.com/wghglory/ngx-lift-workspace/issues/new?template=bug_report.md)
233
+ - ๐Ÿ’ก **Have a feature request?**
234
+ [Request a feature](https://github.com/wghglory/ngx-lift-workspace/issues/new?template=feature_request.md)
235
+ - ๐Ÿ“ **Want to contribute?** See our
236
+ [Contributing Guidelines](https://github.com/wghglory/ngx-lift-workspace/blob/main/CONTRIBUTING.md)
237
+
238
+ ## ๐Ÿ“„ License
239
+
240
+ **clr-lift** is licensed under the [MIT License](https://opensource.org/licenses/MIT).
241
+
242
+ ## ๐Ÿ™ Acknowledgments
243
+
244
+ We would like to express our gratitude to the **Clarity Design System** maintainers and contributors for their
245
+ foundational work that enables the development of **clr-lift**.
246
+
247
+ ## โญ Show Your Support
248
+
249
+ If this library helped you, please consider giving it a โญ on GitHub!
71
250
 
72
251
  ---
73
252
 
74
- Feel free to explore the **clr-lift** library and enhance your Clarity datagrid implementation with ease! If you have
75
- any questions or concerns, please don't hesitate to reach out to us. Happy coding!
253
+ <div align="center">
254
+
255
+ **Made with โค๏ธ for the Angular and Clarity community**
256
+
257
+ [Report Bug](https://github.com/wghglory/ngx-lift-workspace/issues) โ€ข
258
+ [Request Feature](https://github.com/wghglory/ngx-lift-workspace/issues) โ€ข
259
+ [View Documentation](https://ngx-lift.netlify.app/clr-lift)
260
+
261
+ </div>