@hichchi/ngx-ui 0.0.2 → 0.0.3

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 (2) hide show
  1. package/README.md +545 -0
  2. package/package.json +2 -1
package/README.md ADDED
@@ -0,0 +1,545 @@
1
+ <!--suppress ALL -->
2
+
3
+ <div align="center">
4
+ <h1>🎨 @hichchi/ngx-ui</h1>
5
+ <p>
6
+ <strong>A comprehensive UI component library for Angular applications</strong>
7
+ </p>
8
+ <p>
9
+ <a href="https://www.npmjs.com/package/@hichchi/ngx-ui">
10
+ <img src="https://img.shields.io/npm/v/@hichchi/ngx-ui?style=flat-square&color=blue" alt="npm version">
11
+ </a>
12
+ <a href="https://www.npmjs.com/package/@hichchi/ngx-ui">
13
+ <img src="https://img.shields.io/npm/dm/@hichchi/ngx-ui?style=flat-square&color=green" alt="npm downloads">
14
+ </a>
15
+ <a href="https://github.com/hichchidev/hichchi/blob/main/LICENSE">
16
+ <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License">
17
+ </a>
18
+ <img src="https://img.shields.io/badge/angular-19.0.0-red?style=flat-square" alt="Angular Version">
19
+ </p>
20
+ <p>
21
+ <em>Part of the <a href="https://github.com/hichchidev/hichchi">Hichchi</a> ecosystem - A powerful, scalable application built with Nx workspace</em>
22
+ </p>
23
+ </div>
24
+
25
+ ---
26
+
27
+ ## 📦 Installation
28
+
29
+ ```bash
30
+ npm install @hichchi/ngx-ui
31
+ ```
32
+
33
+ ## 🌟 Overview
34
+
35
+ This library provides a comprehensive collection of UI components and utilities for Angular applications. It includes reusable components, directives, pipes, and styling utilities to help build consistent and beautiful user interfaces.
36
+
37
+ ## ✨ Key Features
38
+
39
+ - 🧩 **UI Components**: Pre-built, customizable components for common UI patterns
40
+ - 🎯 **Directives**: Useful directives for enhanced functionality
41
+ - 🔧 **Pipes**: Custom pipes for data transformation and formatting
42
+ - 🎨 **Styling Utilities**: CSS utilities and theming support
43
+ - 📱 **Responsive Design**: Mobile-first, responsive components
44
+ - ♿ **Accessibility**: WCAG compliant components with proper ARIA support
45
+
46
+ ## 🚀 Usage
47
+
48
+ ### Using UI Components
49
+
50
+ ```typescript
51
+ import { NgModule } from "@angular/core";
52
+ import { HichchiUiModule } from "@hichchi/ngx-ui";
53
+
54
+ @NgModule({
55
+ imports: [HichchiUiModule],
56
+ })
57
+ export class AppModule {}
58
+ ```
59
+
60
+ ### Button Component
61
+
62
+ ```typescript
63
+ import { Component } from "@angular/core";
64
+
65
+ @Component({
66
+ selector: "app-example",
67
+ template: `
68
+ <hichchi-button variant="primary" size="large" (click)="handleClick()">
69
+ Click Me
70
+ </hichchi-button>
71
+
72
+ <hichchi-button
73
+ variant="secondary"
74
+ [disabled]="isLoading"
75
+ [loading]="isLoading"
76
+ >
77
+ Submit
78
+ </hichchi-button>
79
+ `,
80
+ })
81
+ export class ExampleComponent {
82
+ isLoading = false;
83
+
84
+ handleClick() {
85
+ console.log("Button clicked!");
86
+ }
87
+ }
88
+ ```
89
+
90
+ ### Card Component
91
+
92
+ ```typescript
93
+ import { Component } from "@angular/core";
94
+
95
+ @Component({
96
+ selector: "app-card-example",
97
+ template: `
98
+ <hichchi-card>
99
+ <hichchi-card-header>
100
+ <h3>Card Title</h3>
101
+ </hichchi-card-header>
102
+ <hichchi-card-content>
103
+ <p>This is the card content area.</p>
104
+ </hichchi-card-content>
105
+ <hichchi-card-footer>
106
+ <hichchi-button variant="primary">Action</hichchi-button>
107
+ </hichchi-card-footer>
108
+ </hichchi-card>
109
+ `,
110
+ })
111
+ export class CardExampleComponent {}
112
+ ```
113
+
114
+ ---
115
+
116
+ ## 🔧 Development
117
+
118
+ ### Building
119
+
120
+ ```bash
121
+ nx build ngx-ui
122
+ ```
123
+
124
+ ### Running unit tests
125
+
126
+ ```bash
127
+ nx test ngx-ui
128
+ ```
129
+
130
+ Tests are executed via [Jest](https://jestjs.io).
131
+
132
+ ---
133
+
134
+ <div align="center">
135
+
136
+ **Made with ❤️ by [Hichchi Dev](https://github.com/hichchidev)**
137
+
138
+ [![Hichchi Ecosystem](https://img.shields.io/badge/🏠_Hichchi_Ecosystem-blue)](https://github.com/hichchidev/hichchi)
139
+ [![Report Bug](https://img.shields.io/badge/🐛_Report_Bug-red)](https://github.com/hichchidev/hichchi/issues)
140
+ [![Request Feature](https://img.shields.io/badge/✨_Request_Feature-green)](https://github.com/hichchidev/hichchi/issues)
141
+
142
+ _Building the future of user interfaces, one commit at a time_
143
+
144
+ </div>
145
+
146
+ ---
147
+
148
+ # 📖 API Documentation
149
+
150
+ Complete technical reference for all classes, interfaces, methods, and types in this library.
151
+
152
+ **Auto-generated by TypeDoc** - Browse through detailed API references, code examples, and implementation guides below.
153
+
154
+ <!-- TypeDoc generated documentation will be appended below this point -->
155
+
156
+ ---
157
+
158
+ ## 📋 API Table of Contents
159
+
160
+ - [Classes](#classes)
161
+ - [ButtonComponent](#buttoncomponent)
162
+ - [HcCardComponent](#hccardcomponent)
163
+ - [HcSeparatorComponent](#hcseparatorcomponent)
164
+
165
+ ## Classes
166
+
167
+ ### ButtonComponent
168
+
169
+ Defined in: [button/button.component.ts:50](https://github.com/hichchidev/hichchi/blob/b9e6bdc58def58a8174e67e2e04b85e460b908e6/libs/ngx-ui/src/lib/components/button/button.component.ts#L50)
170
+
171
+ Reusable button component for the Hichchi UI library
172
+
173
+ This component provides a customizable button with consistent styling and behavior
174
+ across the application. It supports different colors, types, and custom CSS classes
175
+ while maintaining accessibility and user experience standards.
176
+
177
+ The component uses Angular's new signal-based inputs and outputs for better
178
+ performance and reactivity.
179
+
180
+ #### Examples
181
+
182
+ ```html
183
+ <!-- Basic button -->
184
+ <hc-button>Click me</hc-button>
185
+ ```
186
+
187
+ ```html
188
+ <!-- Button with custom color and type -->
189
+ <hc-button
190
+ [color]="'secondary'"
191
+ [type]="'button'"
192
+ (onClick)="handleClick($event)"
193
+ >
194
+ Submit Form
195
+ </hc-button>
196
+ ```
197
+
198
+ ```html
199
+ <!-- Button with custom CSS classes -->
200
+ <hc-button [class]="'my-custom-class another-class'" [color]="'danger'">
201
+ Delete Item
202
+ </hc-button>
203
+ ```
204
+
205
+ #### See
206
+
207
+ - HcColor Type defining available color options
208
+ - ButtonType Type defining available button types
209
+
210
+ #### Constructors
211
+
212
+ ##### Constructor
213
+
214
+ ```ts
215
+ new ButtonComponent(): ButtonComponent;
216
+ ```
217
+
218
+ ###### Returns
219
+
220
+ [`ButtonComponent`](#buttoncomponent)
221
+
222
+ #### Properties
223
+
224
+ <table>
225
+ <thead>
226
+ <tr>
227
+ <th>Property</th>
228
+ <th>Type</th>
229
+ <th>Description</th>
230
+ <th>Defined in</th>
231
+ </tr>
232
+ </thead>
233
+ <tbody>
234
+ <tr>
235
+ <td>
236
+
237
+ <a id="property-class"></a> `class`
238
+
239
+ </td>
240
+ <td>
241
+
242
+ `InputSignal`<`string`>
243
+
244
+ </td>
245
+ <td>
246
+
247
+ Additional CSS classes to apply to the button
248
+
249
+ Allows for custom styling by adding extra CSS classes to the button element.
250
+ Multiple classes can be specified as a space-separated string.
251
+
252
+ **Default**
253
+
254
+ ```ts
255
+ "";
256
+ ```
257
+
258
+ </td>
259
+ <td>
260
+
261
+ [button/button.component.ts:70](https://github.com/hichchidev/hichchi/blob/b9e6bdc58def58a8174e67e2e04b85e460b908e6/libs/ngx-ui/src/lib/components/button/button.component.ts#L70)
262
+
263
+ </td>
264
+ </tr>
265
+ <tr>
266
+ <td>
267
+
268
+ <a id="property-color"></a> `color`
269
+
270
+ </td>
271
+ <td>
272
+
273
+ `InputSignal`<`HcColor`>
274
+
275
+ </td>
276
+ <td>
277
+
278
+ The color theme of the button
279
+
280
+ Determines the visual appearance of the button based on predefined color schemes.
281
+ Each color represents a different semantic meaning (primary for main actions,
282
+ secondary for alternative actions, danger for destructive actions, etc.).
283
+
284
+ **Default**
285
+
286
+ ```ts
287
+ "primary";
288
+ ```
289
+
290
+ </td>
291
+ <td>
292
+
293
+ [button/button.component.ts:60](https://github.com/hichchidev/hichchi/blob/b9e6bdc58def58a8174e67e2e04b85e460b908e6/libs/ngx-ui/src/lib/components/button/button.component.ts#L60)
294
+
295
+ </td>
296
+ </tr>
297
+ <tr>
298
+ <td>
299
+
300
+ <a id="property-onclick"></a> `onClick`
301
+
302
+ </td>
303
+ <td>
304
+
305
+ `OutputEmitterRef`<`MouseEvent`>
306
+
307
+ </td>
308
+ <td>
309
+
310
+ Event emitted when the button is clicked
311
+
312
+ Emits the native MouseEvent when the user clicks the button, allowing
313
+ parent components to handle the click interaction. The event contains
314
+ information about the click such as coordinates, modifier keys, etc.
315
+
316
+ **Example**
317
+
318
+ ```typescript
319
+ handleButtonClick(event: MouseEvent) {
320
+ console.log('Button clicked at:', event.clientX, event.clientY);
321
+ // Handle the click event
322
+ }
323
+ ```
324
+
325
+ </td>
326
+ <td>
327
+
328
+ [button/button.component.ts:100](https://github.com/hichchidev/hichchi/blob/b9e6bdc58def58a8174e67e2e04b85e460b908e6/libs/ngx-ui/src/lib/components/button/button.component.ts#L100)
329
+
330
+ </td>
331
+ </tr>
332
+ <tr>
333
+ <td>
334
+
335
+ <a id="property-type"></a> `type`
336
+
337
+ </td>
338
+ <td>
339
+
340
+ `InputSignal`<`ButtonType`>
341
+
342
+ </td>
343
+ <td>
344
+
345
+ The HTML button type attribute
346
+
347
+ Specifies the behavior of the button when used within forms.
348
+
349
+ - "submit": Submits the form (default)
350
+ - "button": Regular button with no default behavior
351
+ - "reset": Resets the form to its initial state
352
+
353
+ **Default**
354
+
355
+ ```ts
356
+ "submit";
357
+ ```
358
+
359
+ </td>
360
+ <td>
361
+
362
+ [button/button.component.ts:82](https://github.com/hichchidev/hichchi/blob/b9e6bdc58def58a8174e67e2e04b85e460b908e6/libs/ngx-ui/src/lib/components/button/button.component.ts#L82)
363
+
364
+ </td>
365
+ </tr>
366
+ </tbody>
367
+ </table>
368
+
369
+ ---
370
+
371
+ ### HcCardComponent
372
+
373
+ Defined in: [hc-card/hc-card.component.ts:57](https://github.com/hichchidev/hichchi/blob/b9e6bdc58def58a8174e67e2e04b85e460b908e6/libs/ngx-ui/src/lib/components/hc-card/hc-card.component.ts#L57)
374
+
375
+ Reusable card component for the Hichchi UI library
376
+
377
+ This component provides a container with consistent card styling that can be used
378
+ to group related content together. Cards are commonly used for displaying information
379
+ in a structured, visually appealing way with proper spacing, borders, and shadows.
380
+
381
+ The component acts as a content wrapper and uses Angular's content projection
382
+ to display any content passed between the opening and closing tags.
383
+
384
+ #### Examples
385
+
386
+ ```html
387
+ <!-- Basic card -->
388
+ <hc-card>
389
+ <h3>Card Title</h3>
390
+ <p>This is some card content.</p>
391
+ </hc-card>
392
+ ```
393
+
394
+ ```html
395
+ <!-- Card with form content -->
396
+ <hc-card>
397
+ <form>
398
+ <input type="text" placeholder="Enter your name" />
399
+ <hc-button type="submit">Submit</hc-button>
400
+ </form>
401
+ </hc-card>
402
+ ```
403
+
404
+ ```html
405
+ <!-- Card with mixed content -->
406
+ <hc-card>
407
+ <div class="card-header">
408
+ <h2>User Profile</h2>
409
+ </div>
410
+ <div class="card-body">
411
+ <p>User information goes here...</p>
412
+ </div>
413
+ <div class="card-footer">
414
+ <hc-button>Edit Profile</hc-button>
415
+ </div>
416
+ </hc-card>
417
+ ```
418
+
419
+ #### See
420
+
421
+ [ButtonComponent](#buttoncomponent) Related button component often used within cards
422
+
423
+ #### Constructors
424
+
425
+ ##### Constructor
426
+
427
+ ```ts
428
+ new HcCardComponent(): HcCardComponent;
429
+ ```
430
+
431
+ ###### Returns
432
+
433
+ [`HcCardComponent`](#hccardcomponent)
434
+
435
+ ---
436
+
437
+ ### HcSeparatorComponent
438
+
439
+ Defined in: [hc-separator/hc-separator.component.ts:59](https://github.com/hichchidev/hichchi/blob/b9e6bdc58def58a8174e67e2e04b85e460b908e6/libs/ngx-ui/src/lib/components/hc-separator/hc-separator.component.ts#L59)
440
+
441
+ Reusable separator component for the Hichchi UI library
442
+
443
+ This component provides a visual separator element that can be used to divide
444
+ content sections within a page or form. It supports an optional label that can
445
+ be displayed within or alongside the separator line.
446
+
447
+ Separators are useful for creating visual breaks between different sections of
448
+ content, improving readability and organization of the user interface.
449
+
450
+ #### Examples
451
+
452
+ ```html
453
+ <!-- Basic separator without label -->
454
+ <hc-separator></hc-separator>
455
+ ```
456
+
457
+ ```html
458
+ <!-- Separator with label -->
459
+ <hc-separator [label]="'Personal Information'"></hc-separator>
460
+ ```
461
+
462
+ ```html
463
+ <!-- Using separator in a form -->
464
+ <form>
465
+ <input type="text" placeholder="First Name" />
466
+ <input type="text" placeholder="Last Name" />
467
+
468
+ <hc-separator [label]="'Contact Details'"></hc-separator>
469
+
470
+ <input type="email" placeholder="Email" />
471
+ <input type="tel" placeholder="Phone" />
472
+ </form>
473
+ ```
474
+
475
+ ```html
476
+ <!-- Using separator between content sections -->
477
+ <div>
478
+ <h2>Section 1</h2>
479
+ <p>Content for section 1...</p>
480
+
481
+ <hc-separator [label]="'OR'"></hc-separator>
482
+
483
+ <h2>Section 2</h2>
484
+ <p>Content for section 2...</p>
485
+ </div>
486
+ ```
487
+
488
+ #### Constructors
489
+
490
+ ##### Constructor
491
+
492
+ ```ts
493
+ new HcSeparatorComponent(): HcSeparatorComponent;
494
+ ```
495
+
496
+ ###### Returns
497
+
498
+ [`HcSeparatorComponent`](#hcseparatorcomponent)
499
+
500
+ #### Properties
501
+
502
+ <table>
503
+ <thead>
504
+ <tr>
505
+ <th>Property</th>
506
+ <th>Type</th>
507
+ <th>Description</th>
508
+ <th>Defined in</th>
509
+ </tr>
510
+ </thead>
511
+ <tbody>
512
+ <tr>
513
+ <td>
514
+
515
+ <a id="property-label"></a> `label`
516
+
517
+ </td>
518
+ <td>
519
+
520
+ `InputSignal`<`string`>
521
+
522
+ </td>
523
+ <td>
524
+
525
+ Optional label text to display with the separator
526
+
527
+ When provided, this text will be displayed as part of the separator,
528
+ typically centered within or alongside the separator line. This is useful
529
+ for creating labeled dividers that help organize content sections.
530
+
531
+ **Default**
532
+
533
+ ```ts
534
+ "";
535
+ ```
536
+
537
+ </td>
538
+ <td>
539
+
540
+ [hc-separator/hc-separator.component.ts:69](https://github.com/hichchidev/hichchi/blob/b9e6bdc58def58a8174e67e2e04b85e460b908e6/libs/ngx-ui/src/lib/components/hc-separator/hc-separator.component.ts#L69)
541
+
542
+ </td>
543
+ </tr>
544
+ </tbody>
545
+ </table>
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@hichchi/ngx-ui",
3
- "version": "0.0.2",
3
+ "description": "A comprehensive UI component library for Angular applications",
4
+ "version": "0.0.3",
4
5
  "publishConfig": {
5
6
  "access": "public"
6
7
  },