@apexara/ng-components 1.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.
Files changed (59) hide show
  1. package/README.md +1867 -0
  2. package/fesm2022/apexara-ng-components-button.mjs +66 -0
  3. package/fesm2022/apexara-ng-components-button.mjs.map +1 -0
  4. package/fesm2022/apexara-ng-components-carousel.mjs +161 -0
  5. package/fesm2022/apexara-ng-components-carousel.mjs.map +1 -0
  6. package/fesm2022/apexara-ng-components-checkbox.mjs +64 -0
  7. package/fesm2022/apexara-ng-components-checkbox.mjs.map +1 -0
  8. package/fesm2022/apexara-ng-components-chip.mjs +26 -0
  9. package/fesm2022/apexara-ng-components-chip.mjs.map +1 -0
  10. package/fesm2022/apexara-ng-components-datepicker.mjs +2175 -0
  11. package/fesm2022/apexara-ng-components-datepicker.mjs.map +1 -0
  12. package/fesm2022/apexara-ng-components-dialog.mjs +65 -0
  13. package/fesm2022/apexara-ng-components-dialog.mjs.map +1 -0
  14. package/fesm2022/apexara-ng-components-drawer.mjs +69 -0
  15. package/fesm2022/apexara-ng-components-drawer.mjs.map +1 -0
  16. package/fesm2022/apexara-ng-components-expander.mjs +41 -0
  17. package/fesm2022/apexara-ng-components-expander.mjs.map +1 -0
  18. package/fesm2022/apexara-ng-components-image.mjs +201 -0
  19. package/fesm2022/apexara-ng-components-image.mjs.map +1 -0
  20. package/fesm2022/apexara-ng-components-input.mjs +129 -0
  21. package/fesm2022/apexara-ng-components-input.mjs.map +1 -0
  22. package/fesm2022/apexara-ng-components-listbox.mjs +308 -0
  23. package/fesm2022/apexara-ng-components-listbox.mjs.map +1 -0
  24. package/fesm2022/apexara-ng-components-radiobutton.mjs +40 -0
  25. package/fesm2022/apexara-ng-components-radiobutton.mjs.map +1 -0
  26. package/fesm2022/apexara-ng-components-select.mjs +620 -0
  27. package/fesm2022/apexara-ng-components-select.mjs.map +1 -0
  28. package/fesm2022/apexara-ng-components-services.mjs +290 -0
  29. package/fesm2022/apexara-ng-components-services.mjs.map +1 -0
  30. package/fesm2022/apexara-ng-components-snackbar.mjs +279 -0
  31. package/fesm2022/apexara-ng-components-snackbar.mjs.map +1 -0
  32. package/fesm2022/apexara-ng-components-table.mjs +686 -0
  33. package/fesm2022/apexara-ng-components-table.mjs.map +1 -0
  34. package/fesm2022/apexara-ng-components-textarea.mjs +82 -0
  35. package/fesm2022/apexara-ng-components-textarea.mjs.map +1 -0
  36. package/fesm2022/apexara-ng-components-tooltip.mjs +319 -0
  37. package/fesm2022/apexara-ng-components-tooltip.mjs.map +1 -0
  38. package/fesm2022/apexara-ng-components.mjs +8 -0
  39. package/fesm2022/apexara-ng-components.mjs.map +1 -0
  40. package/package.json +146 -0
  41. package/types/apexara-ng-components-button.d.ts +27 -0
  42. package/types/apexara-ng-components-carousel.d.ts +31 -0
  43. package/types/apexara-ng-components-checkbox.d.ts +29 -0
  44. package/types/apexara-ng-components-chip.d.ts +11 -0
  45. package/types/apexara-ng-components-datepicker.d.ts +172 -0
  46. package/types/apexara-ng-components-dialog.d.ts +24 -0
  47. package/types/apexara-ng-components-drawer.d.ts +22 -0
  48. package/types/apexara-ng-components-expander.d.ts +10 -0
  49. package/types/apexara-ng-components-image.d.ts +46 -0
  50. package/types/apexara-ng-components-input.d.ts +51 -0
  51. package/types/apexara-ng-components-listbox.d.ts +70 -0
  52. package/types/apexara-ng-components-radiobutton.d.ts +30 -0
  53. package/types/apexara-ng-components-select.d.ts +111 -0
  54. package/types/apexara-ng-components-services.d.ts +96 -0
  55. package/types/apexara-ng-components-snackbar.d.ts +73 -0
  56. package/types/apexara-ng-components-table.d.ts +157 -0
  57. package/types/apexara-ng-components-textarea.d.ts +34 -0
  58. package/types/apexara-ng-components-tooltip.d.ts +54 -0
  59. package/types/apexara-ng-components.d.ts +3 -0
package/README.md ADDED
@@ -0,0 +1,1867 @@
1
+ # ng-components
2
+
3
+ This package provides custom Angular UI components, developed and maintained by IPI Soft LLC. <br>
4
+ Website: www.apexara.com
5
+
6
+ # Installation
7
+
8
+ ```sh
9
+ npm install @apexara/ng-components
10
+ ```
11
+
12
+ # Components
13
+
14
+ [🔽 Button](#ipi-button-component) <br>
15
+ [🔽 Checkbox](#ipi-checkbox-component) <br>
16
+ [🔽 Chip](#ipi-checkbox-component) <br>
17
+ [🔽 Dialog](#ipi-dialog-component) <br>
18
+ [🔽 Drawer](#ipi-drawer-component) <br>
19
+ [🔽 Expander](#ipi-expander-component) <br>
20
+ [🔽 Image](#ipi-image-component) <br>
21
+ [🔽 Input](#ipi-input-component) <br>
22
+ [🔽 Listbox](#ipi-listbox-component) <br>
23
+ [🔽 Radiobutton](#ipi-radio-button-component) <br>
24
+ [🔽 Select](#ipi-select-component) <br>
25
+ [🔽 Datepicker](#ipi-datepicker-component) <br>
26
+ [🔽 Carousel](#ipi-carousel-component) <br>
27
+ [🔽 Snackbar](#ipi-snackbar-service) <br>
28
+ [🔽 Table](#ipi-table-component) <br>
29
+ [🔽 Textarea](#ipi-textarea-component) <br>
30
+ [🔽 Tooltip](#ipi-tooltip-component) <br>
31
+
32
+
33
+ -----------------------------------------------------------------
34
+
35
+ # IPI Button Component
36
+ A simple button
37
+
38
+ ## Usage
39
+ >**`parent.component.ts`**
40
+ >```typescript
41
+ >import { IpiButtonComponent }
42
+ >from '@apexara/ng-components/button';
43
+ >
44
+ >@Component({
45
+ > imports: [ IpiButtonComponent ]
46
+ >})
47
+ >
48
+ >export class ButtonExampleComponent {
49
+ >
50
+ > public handleClickChange(event: PointerEvent | MouseEvent | KeyboardEvent): void {
51
+ > // click change login on button emit
52
+ > }
53
+ >
54
+ > public handleFocusChange(event: FocusChange): void {
55
+ > // focus change login on button emit (focusin or focusout type of event)
56
+ > }
57
+ >
58
+ >}
59
+ >```
60
+ >**`parent.component.html`**
61
+ >```html
62
+ ><ipi-button
63
+ > [options]="{
64
+ > iconLeft: 'icon.svg',
65
+ > iconRight: 'icon.svg'
66
+ > throttleTime: 500ms, // A delay after each clickChange event, defaults to 300ms
67
+ > }"
68
+ > [link]="routerLink"
69
+ > [state]="routerLink state"
70
+ > (focusChange)="handleFocusChange()"
71
+ > (clickChange)="handelClickChange()">
72
+ > Click here
73
+ ></ipi-button>
74
+ >```
75
+
76
+ ### Inputs
77
+
78
+ >#### options
79
+ >two icons inside the button can be passed optionally on the left or right side ot the text.
80
+
81
+ >#### clickChange
82
+ >event emitter to handle clicks
83
+
84
+ >#### focusChange
85
+ >event emitter to focus changes on the a tag inside the ipi-button
86
+
87
+ >#### link
88
+ >routerLink can be passed to for navigation
89
+
90
+ ### CSS Variables
91
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-button:
92
+ >
93
+ >```css
94
+ >ipi-button {
95
+ > /* Sizes: */
96
+ > --ipi-button-border-radius: 4px;
97
+ >
98
+ > /* Focus outline */
99
+ > --ipi-button-focus-outline: 2px solid #F96138;
100
+ >
101
+ > /* Colors, Fills, Strokes: */
102
+ > --ipi-button-disabled-background-color: #E7E7E7;
103
+ >
104
+ > --ipi-button-left-svg-fill: #FFFFFF;
105
+ > --ipi-button-left-svg-stroke: #FFFFFF00;
106
+ >
107
+ > --ipi-button-right-svg-fill: #FFFFFF;
108
+ > --ipi-button-right-svg-fill: #FFFFFF00;
109
+ >
110
+ > --ipi-button-text-color: #FFFFFF;
111
+ > --ipi-button-border-color: none;
112
+ > --ipi-button-background-color: #0B1222;
113
+ >
114
+ >/* Note: When you want to setup the color of your icon
115
+ > you should experiment with both these variables or consider
116
+ > using the one your icon is based on. */
117
+ >}
118
+ >```
119
+
120
+ [🔼 Back to top](#components)
121
+
122
+ -----------------------------------------------------------------
123
+
124
+ # IPI Checkbox Component
125
+ A simple checkbox that can project content, be used with FormGroup and have a tooltip displayed
126
+ with a IPI Tooltip.
127
+
128
+ ## Usage
129
+ >**`parent.component.ts`**
130
+ >```typescript
131
+ >import { IpiCheckboxComponent, IpiCheckboxOptions }
132
+ >from '@apexara/ng-components/checkbox';
133
+ >
134
+ >@Component({
135
+ > imports: [ IpiCheckboxComponent ]
136
+ >})
137
+ >
138
+ >export class CheckboxExampleComponent {
139
+ >
140
+ > public formGroup = new FormGroup({
141
+ > checkboxControl: [false, [Validators.required]],
142
+ > });
143
+ >
144
+ > public checkboxOptions: IpiCheckboxOptions = {
145
+ > formGroup: this.formGroup,
146
+ > formControlName: 'checkboxControl',
147
+ > }
148
+ >
149
+ >}
150
+ >```
151
+ >**`parent.component.html`**
152
+ >```html
153
+ ><ipi-checkbox
154
+ > [checked]="true"
155
+ > [disabled]="false"
156
+ > [options]="checkboxOptions"
157
+ > [tooltip]="'example tooltip text'">
158
+ ></ipi-checkbox>
159
+ >
160
+ >```
161
+ ### Inputs
162
+
163
+ >#### checked
164
+ >Sets the checked attribute of the checkbox input by default.
165
+
166
+ >#### disabled
167
+ >Can be used to disabled the input and to prevent a user from interacting with it.
168
+
169
+ >#### tooltip
170
+ >a text that if present triggers a tooltip component with it inside.
171
+
172
+ >#### formGroup
173
+ >Refference to the FormGroup that the ipi-checkbox will handle
174
+
175
+ >#### formControlName
176
+ >Refference to the name of the control that we will access in the FormGroup
177
+
178
+ ### CSS Variables
179
+ >Here are all the CSS variables (and their default values) you can set when using ipi-checkbox:
180
+ >
181
+ >```css
182
+ >ipi-checkbox {
183
+ > /* Sizes */
184
+ > --ipi-checkbox-font-size: 14px;
185
+ >
186
+ > /* Colors, Fills, Strokes: */
187
+ > --ipi-checkbox-background-color: #F7F8FB;
188
+ > --ipi-checkbox-wrapper-border-color: transparent;
189
+ > --ipi-checkbox-arrow-color: #FFFFFF;
190
+ > --ipi-checkbox-tooltip-icon-stroke: #FFFFFF;
191
+ >
192
+ > --ipi-checkbox-border-color: #E9E9E9;
193
+ > --ipi-checkbox-border-hover-color: #F96138;
194
+ > --ipi-checkbox-outline-color: none;
195
+ >
196
+ > /* Other */
197
+ > --ipi-checkbox-box-shadow-color: #F96138;
198
+ > --ipi-checkbox-disabled-opacity: 0.5;
199
+ >}
200
+ >```
201
+
202
+ [🔼 Back to top](#components)
203
+
204
+ -----------------------------------------------------------------
205
+
206
+ # IPI Chip component
207
+ A simple visual container for displaying a text, state, etc.
208
+
209
+ ## Usage
210
+ >**`parent.component.ts`**
211
+ >```typescript
212
+ >import { IpiChipComponent }
213
+ >from '@apexara/ng-components/chip';
214
+ >
215
+ >@Component({
216
+ > imports: [ IpiChipComponent ]
217
+ >})
218
+ >
219
+ >export class ChipExampleComponent { }
220
+ >
221
+ >```
222
+ >**`parent.component.html`**
223
+ >```html
224
+ ><ipi-chip
225
+ > class="with-close-icon"
226
+ > [closeIcon]="true"
227
+ > (closeChange)="chipClose()">
228
+ > With Close Icon
229
+ ></ipi-chip>
230
+ >```
231
+ >
232
+
233
+ ### Inputs
234
+ >#### closeIcon
235
+ >boolean that triggers an X icon that has the closeChange event emitter attached.
236
+
237
+ >#### closeChange
238
+ >event emitter to handle clicks
239
+
240
+ ### CSS Variables
241
+ >Here all the available CSS variables (and their default values) you can set when using ipi-chip:
242
+ >
243
+ >```css
244
+ >ipi-chip {
245
+ > /* Sizes: */
246
+ > --ipi-chip-font-size: 12px;
247
+ >
248
+ > /* Colors, Fills, Strokes: */
249
+ > --ipi-chip-color: #FFFFFF;
250
+ > --ipi-chip-background-color: #0B1222;
251
+ > --ipi-chip-icon-color: #FFFFFF;
252
+ >}
253
+ >```
254
+
255
+ [🔼 Back to top](#components)
256
+
257
+ -----------------------------------------------------------------
258
+
259
+ # IPI Dialog Component
260
+ Simple Dialog component with the option to project everything necessary - close icon, title, description, other content, actions.
261
+ The styling is only for the Dialog itself, the close icon, the title and the description. The content and the actions can be anything so their styling is up to the parent component
262
+
263
+ ## Usage
264
+ >**`parent.component.ts`**
265
+ >```typescript
266
+ >import { IpiDialogComponent }
267
+ >from '@apexara/ng-components/dialog';
268
+ >
269
+ >@Component({
270
+ > imports: [ IpiDialogComponent ]
271
+ >})
272
+ >
273
+ >export class DialogExampleComponent { }
274
+ >```
275
+ >**`parent.component.html`**
276
+ >```html
277
+ >@if (shouldRender) {
278
+ > <ipi-dialog>
279
+ > <ng-template #title>Title Here</ng-template>
280
+ >
281
+ > <ng-template #description>Description Here</ng-template>
282
+ >
283
+ > <ng-template #content>
284
+ > <ipi-input [options]="{ label: 'Name' }"></ipi-input>
285
+ > </ng-template>
286
+ >
287
+ > <ng-template #actions>
288
+ > <ipi-button (clickChange)="shouldRender = false">
289
+ > Cancel
290
+ > </ipi-button>
291
+ > </ng-template>
292
+ > </ipi-dialog>
293
+ >}
294
+ >```
295
+
296
+ ### Inputs
297
+ >#### Dialog Close Icon
298
+ >Shows a close icon. All you need is to pass [closeIcon]="true" and a function that closes the dialog. In example
299
+
300
+ >#### Dialog Title
301
+ >The title is projected with the Select=['title']. All you need is an HTML element with 'title' set. In example
302
+
303
+ >#### Dialog Description
304
+ >The description is projected with the Select=['description']. All you need is an HTML element with 'description' set. In example
305
+ >```html
306
+ ><ng-template #description>Description Here</ng-template>
307
+ >```
308
+
309
+ >#### Dialog Content
310
+ >You can place anything you want here. From Forms to Lists or whatever other stuff you need.
311
+ >The Content is projected with the Select=['content']. All you need is an HTML element with 'content' set. In example
312
+ >
313
+ >**`parent.component.html`**
314
+ >```html
315
+ ><ng-template #content>
316
+ > <ipi-input [options]="{ label: 'Name' }"></ipi-input>
317
+ ></ng-template>
318
+ >```
319
+ >
320
+ >**`parent.component.css`**
321
+ >```css
322
+ >ipi-input {
323
+ > --ipi-input-error-color: red;
324
+ >}
325
+ >```
326
+
327
+ >#### Dialog Actions
328
+ >**`parent.component.html`**
329
+ >The Actions are projected with the Select=['actions']. All you need is an HTML element with 'actions' set. In example
330
+ >```html
331
+ ><ng-template #actions>
332
+ > <ipi-button>Close</ipi-button>
333
+ ></ng-template>
334
+ >```
335
+ >**`parent.component.html`**
336
+ >Or with multiple actions:
337
+ >```html
338
+ ><ng-template #actions>
339
+ > <ipi-button (clickChange)="shouldRender = false">Close</ipi-button>
340
+ > <ipi-button (clickChange)="triggerAction()">Trigger Action</ipi-button>
341
+ ></ng-template>
342
+ >```
343
+ >Again, the styling of the buttons in this case should happen in the Parent component. You can group them in a div with 'display: flex'
344
+
345
+ ### CSS Variables
346
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-dialog:
347
+ >
348
+ >```css
349
+ >ipi-dialog {
350
+ > /* Sizes: */
351
+ > --ipi-dialog-max-width: 432px;
352
+ >
353
+ > /* Colors, Fills, Strokes: */
354
+ > --ipi-dialog-backdrop-background: #0B1222;
355
+ > --ipi-dialog-background: #FFFFFF;
356
+ > --ipi-dialog-close-icon-color: #0B1222;
357
+ > --ipi-dialog-close-icon-hover-color: #F96138;
358
+ > --ipi-dialog-title-color: #0B1222;
359
+ > --ipi-dialog-description-color: #5D6068;
360
+ >}
361
+ >```
362
+
363
+ [🔼 Back to top](#components)
364
+
365
+ -----------------------------------------------------------------
366
+
367
+ # IPI Drawer Component
368
+ Simple Drawer component with the option to project everything necessary - title, description, content, actions.
369
+ The styling is only for the Drawer itself, the title and the description. The content and the actions can be anything so their styling is up to the parent component
370
+
371
+ ## Usage
372
+ >**`parent.component.ts`**
373
+ >```typescript
374
+ >import { IpiDrawerComponent }
375
+ >from '@apexara/ng-components/drawer';
376
+ >
377
+ >@Component({
378
+ > imports: [ IpiDrawerComponent ]
379
+ >})
380
+ >
381
+ >export class DrawerExampleComponent { }
382
+ >```
383
+ >**`parent.component.html`**
384
+ >```html
385
+ >@if (shouldRender) {
386
+ > <ipi-drawer #drawer (clickChange)="shouldRender = false">
387
+ > <ng-template #title>Title Here</ng-template>
388
+ >
389
+ > <ng-template #description>Description Here</ng-template>
390
+ >
391
+ > <ng-template #content>
392
+ > <ipi-input [options]="{ label: 'Name' }"></ipi-input>
393
+ > </ng-template>
394
+ >
395
+ > <ng-template #actions>
396
+ > <ipi-button (clickChange)="drawer.close()">
397
+ > Close
398
+ > </ipi-button>
399
+ > </ng-template>
400
+ > </ipi-drawer>
401
+ >}
402
+ >```
403
+
404
+ ### Inputs
405
+
406
+ >#### closeChange
407
+ >This function should close the drawer. It is called by drawer.close() and is used for the closing transition. It must be provided if drawer.close() is used.
408
+
409
+ >#### Drawer Title
410
+ >The title is projected with the Select=['title']. All you need is an HTML element with 'title' set. In example
411
+
412
+ >#### Drawer Description
413
+ >The description is projected with the Select=['description']. All you need is an HTML element with 'description' set. In example
414
+ >```html
415
+ ><ng-template #description>Description Here</ng-template>
416
+ >```
417
+
418
+ >#### Drawer Content
419
+ >You can place anything you want here. From Forms to Lists or whatever other stuff you need.
420
+ >The Content is projected with the Select=['content']. All you need is an HTML element with 'content' set. In example
421
+ >
422
+ >**`parent.component.html`**
423
+ >```html
424
+ ><ng-template #content>
425
+ > <ipi-input [options]="{ label: 'Name' }"></ipi-input>
426
+ ></ng-template>
427
+ >```
428
+ >
429
+ >**`parent.component.css`**
430
+ >```css
431
+ >ipi-input {
432
+ > --ipi-input-error-color: red;
433
+ >}
434
+ >```
435
+
436
+ >#### Drawer Actions
437
+ >**`parent.component.html`**
438
+ >The Actions are projected with the Select=['actions']. All you need is an HTML element with 'actions' set. In example
439
+ >```html
440
+ ><ng-template #actions>
441
+ > <ipi-button>Close</ipi-button>
442
+ ></ng-template>
443
+ >```
444
+ >**`parent.component.html`**
445
+ >Or with multiple actions:
446
+ >```html
447
+ ><ng-template #actions>
448
+ > <ipi-button (clickChange)="triggerAction1()">Trigger Action 1</ipi-button>
449
+ > <ipi-button (clickChange)="triggerAction2()">Trigger Action 2</ipi-button>
450
+ ></ng-template>
451
+ >```
452
+ >Again, the styling of the buttons in this case should happen in the Parent component. You can group them in a div with 'display: flex'
453
+
454
+ ### CSS Variables
455
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-drawer:
456
+ >
457
+ >```css
458
+ >ipi-drawer {
459
+ > /* Sizes: */
460
+ > --ipi-drawer-width: 410px;
461
+ >
462
+ > /* Colors, Fills, Strokes: */
463
+ > --ipi-drawer-backdrop-background: #0B1222;
464
+ > --ipi-drawer-background: #FFFFFF;
465
+ > --ipi-drawer-title-color: #0B1222;
466
+ > --ipi-drawer-description-color: #5D6068;
467
+ > --ipi-drawer-box-shadow: 0px 4px 8px 0px #D6D6D635;
468
+ >}
469
+ >```
470
+
471
+ [🔼 Back to top](#components)
472
+
473
+ -----------------------------------------------------------------
474
+
475
+ # IPI Expander Component
476
+ A simple component that has a title and and expanding option that displays additional text
477
+ by expanding horizontally.
478
+
479
+ ## Usage
480
+ >**`parent.component.ts`**
481
+ >```typescript
482
+ >import { IpiExpanderComponent }
483
+ >from '@apexara/ng-components/expander';
484
+ >
485
+ >@Component({
486
+ > imports: [ IpiExpanderComponent ]
487
+ >})
488
+ >
489
+ >export class ExpanderExampleComponent { }
490
+ >```
491
+ >**`parent.component.html`**
492
+ >```html
493
+ ><ipi-expander [isOpen]="true">
494
+ > <ng-container title>
495
+ > With Variables
496
+ > </ng-container>
497
+ >
498
+ > <ng-container content>
499
+ > Lorem Ipsum is simply dummy text of the printing and typesetting industry.<br> Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.<br> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
500
+ > </ng-container>
501
+ ><ipi-expander>
502
+ >
503
+ >```
504
+
505
+ ### Inputs
506
+
507
+ >#### isOpen -> boolean (false)
508
+ >Set this to "true", to make the expander open by default.
509
+
510
+ >#### maxHeight -> number | null (null)
511
+ >Set this to stop the content's height from going above a certain number (px).
512
+
513
+ ### CSS Variables
514
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-expander:
515
+ >```css
516
+ >ipi-expander {
517
+ > /* Sizes: */
518
+ > --ipi-expander-border: 0px;
519
+ >
520
+ > /* Colors, Fills, Strokes: */
521
+ > --ipi-expander-background-color: #FFFFFF;
522
+ > --ipi-expander-title-color: #0B1222;
523
+ > --ipi-expander-content-color: #5D6068;
524
+ > --ipi-expander-chevron-color: #5D6068;
525
+ > --ipi-expander-chevron-open-color: #F96138;
526
+ >
527
+ > --ipi-expander-outline-color: none;
528
+ > /* Other */
529
+ > --ipi-expander-box-shadow: 0px 4px 8px 0px rgba(214, 214, 214, 0.35);
530
+ >}
531
+ >```
532
+
533
+ [🔼 Back to top](#components)
534
+
535
+ -----------------------------------------------------------------
536
+
537
+ # IPI Image Component
538
+ An image component that fetches an asset and displays it.
539
+
540
+ ## Usage
541
+ >**`parent.component.ts`**
542
+ >```typescript
543
+ >import { IpiIconComponent }
544
+ >from '@apexara/ng-components/image';
545
+ >
546
+ >@Component({
547
+ > imports: [ IpiIconComponent ]
548
+ >})
549
+ >
550
+ >export class IconExampleComponent { }
551
+ >
552
+ >```
553
+ >
554
+ >**`parent.component.html`**
555
+ >```html
556
+ >
557
+ ><ipi-img
558
+ > [src]="assets/img/example.svg"
559
+ > [ariaLabel]="Example aria label for icon.">
560
+ ></ipi-img>
561
+ >
562
+ >```
563
+
564
+ ### Inputs
565
+ >#### src
566
+ >A url path to the desired img.
567
+
568
+ >### ariaLabel
569
+ >a string value that adds accessible name to the image.
570
+
571
+ [🔼 Back to top](#components)
572
+
573
+ -----------------------------------------------------------------
574
+
575
+ # IPI Input Component
576
+ A Simple input field that handles formGroup, outputs validation errors, has helper messages and infos,
577
+ emits click events on customizable icons that can be used to handle input changes.
578
+
579
+ ## Usage
580
+ >**`parent.component.ts`**
581
+ >```typescript
582
+ >import { IpiInputComponent, IpiInputOptions }
583
+ >from '@apexara/ng-components/input';
584
+ >
585
+ >@Component({
586
+ > imports: [ IpiInputComponent ]
587
+ >})
588
+ >
589
+ >export class InputExampleComponent {
590
+ >
591
+ > public formGroup = new FormGroup({
592
+ > inputControl: [[], [Validators.required]],
593
+ > });
594
+ >
595
+ > public inputOptions = {
596
+ > label: 'Sample label',
597
+ > type: 'text',
598
+ > placeholder: 'sample placeholder',
599
+ > info: 'Sample info message on hover',
600
+ > infoImg: 'icon.svg',
601
+ > helperText: 'Sample helperText',
602
+ > helperRoute: '/forgot-password',
603
+ > prefixImg: 'email.svg',
604
+ > suffixImg: 'password-hide.svg'
605
+ > formGroup: this.formGroup,
606
+ > formControlName: 'inputControl',
607
+ > errors: {
608
+ > required: 'error message to display',
609
+ > }
610
+ > }
611
+ >
612
+ >}
613
+ >
614
+ >```
615
+ >**`parent.component.html`**
616
+ >```html
617
+ ><ipi-input [options]="inputOptions">
618
+ ></ipi-input>
619
+ >
620
+ >```
621
+
622
+ ### Inputs
623
+
624
+ >#### label
625
+ >Label above the input field.
626
+
627
+ >#### type
628
+ >You can pass the default input type attribute. Default is 'text'.
629
+
630
+ >#### info && infoImg
631
+ >Info is used together with infoImg to display and icon next to the label that on hover triggers
632
+ >a tooltip with the info string.
633
+
634
+ >#### placeholder
635
+ >Replaces the input placeholder.
636
+
637
+ >#### helperText && helperRoute
638
+ >Positioned above the input on the right side ot the label & info can be used
639
+ >to navigate to a given route.
640
+
641
+ >#### prefixImg && suffixImg
642
+ >Two images for the beggining and end of the input field.
643
+ >suffixImg also emits event on clicks enabling additional logic to be added.
644
+
645
+ >#### formGroup
646
+ >Refference to the FormGroup that the ipi-input will handle
647
+
648
+ >#### formControlName
649
+ >Refference to the name of the control that we will access in the FormGroup
650
+
651
+ >#### errors
652
+ >An object with properties which keys are refferences to Form ValidationErrors and a message to display if
653
+ >the input Control has the error.
654
+
655
+ ### CSS Variables
656
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-input:
657
+ >```css
658
+ >ipi-input {
659
+ > /* Colors, Fills, Strokes: */
660
+ > --ipi-input-header-color: #0B1222;
661
+ > --ipi-input-placeholder-color: #0B1222;
662
+ > --ipi-input-text-color: #0B1222;
663
+ >
664
+ > /* when there are validator errors we make the text pop-up underneath and change its color */
665
+ > --ipi-input-error-color: #F96138;
666
+ > --ipi-input-border-error-width: 1px;
667
+ >
668
+ > /* Tooltip icon styling */
669
+ > --ipi-input-tooltip-icon-fill: transparent;
670
+ > --ipi-input-tooltip-icon-stroke: #C6C6C6;
671
+ >
672
+ > /* on all validators passed we make the text with this color */
673
+ > --ipi-input-success-color: #14BD6C;
674
+ > --ipi-input-border-color: #E9E9E9;
675
+ > --ipi-input-border-width: 1px;
676
+ > --ipi-input-value-color: #0B1222;
677
+ >
678
+ > /* Left icon fill & stroke : */
679
+ > `--ipi-input-icon-left-fill: #FFFFFF;
680
+ > `--ipi-input-icon-left-stroke: transparent;
681
+ >
682
+ > /* Right icon fill & stroke: */
683
+ > --ipi-input-icon-right-fill: #FFFFFF;
684
+ > --ipi-input-icon-right-stroke: transparent;
685
+ >
686
+ > /* Info icon (the one ot top with the label) fill & stroke */
687
+ > `--ipi-input-icon-info-fill: #FFFFFF;
688
+ > `--ipi-input-icon-info-stroke: transparent;
689
+ >
690
+ >/* Note: When you want to setup the color of your icon
691
+ > you should experiment with both these variables or consider
692
+ > using the one your icon is based on. */
693
+ >}
694
+ >```
695
+
696
+ [🔼 Back to top](#components)
697
+
698
+ -----------------------------------------------------------------
699
+
700
+ # IPI Listbox Component
701
+ IPI Listbox provides selectable options in a list format.
702
+
703
+ ## Usage
704
+ >**`parent.component.ts`**
705
+ >```typescript
706
+ >import { IpiListboxComponent, IpiListboxOptions }
707
+ >from '@apexara/ng-components/listbox';
708
+ >
709
+ >@Component({
710
+ > imports: [ IpiListboxComponent ]
711
+ >})
712
+ >
713
+ >export class ListboxExampleComponent {
714
+ >
715
+ > public formGroup = new FormGroup({
716
+ > listboxControl: [[], [Validators.required]],
717
+ > });
718
+ >
719
+ > public listboxOptions = {
720
+ > label: 'Sample label',
721
+ > tooltip: 'Optional tooltip for listbox.'
722
+ > data: [
723
+ > { label: 'Option 1', value: 1 },
724
+ > { label: 'Option 2', value: 2 },
725
+ > { label: 'Option 3', value: 3 },
726
+ > { label: 'Option 4', value: 4 },
727
+ > { label: 'Option 5', value: 5 },
728
+ > ],
729
+ > formGroup: this.formGroup,
730
+ > formControlName: 'listboxControl',
731
+ > }
732
+ >
733
+ > public selectChange(event) {
734
+ > // handle change selection if you are not using a form control.
735
+ > }
736
+ >}
737
+ >
738
+ >```
739
+ >**`parent.component.html`**
740
+ >```html
741
+ >
742
+ ><ipi-listbox
743
+ > [options]="listboxOptions"
744
+ > (selectChange)="$event">
745
+ ></ipi-listbox>
746
+ >
747
+ >```
748
+
749
+ ### Inputs
750
+
751
+ >#### label
752
+ >Label above the listbox container.
753
+
754
+ >#### formGroup
755
+ >Refference to the FormGroup that the ipi-listbox will handle a specific control
756
+
757
+ >#### formControlName
758
+ >Refference to the name of the control that we will access in the FormGroup
759
+
760
+ ### CSS Variables
761
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-listbox:
762
+
763
+ >```css
764
+ >ipi-listbox {
765
+ > /* Colors, Fills, Strokes: */
766
+ > --ipi-listbox-label-color: default;
767
+ > --ipi-listbox-background-color: #FFFFFF;
768
+ >
769
+ > --ipi-listbox-item-color: #00000099;
770
+ > --ipi-listbox-item-selected-color: #F96138;
771
+ >
772
+ > /* Border */
773
+ > --ipi-listbox-border-color: #F2F2F2;
774
+ > --ipi-listbox-border-hovor-color: #4B5368;
775
+ >
776
+ > /* Tooltip icon styling */
777
+ > --ipi-listbox-tooltip-icon-fill: transparent;
778
+ > --ipi-listbox-tooltip-icon-stroke: #C6C6C6;
779
+ >
780
+ >/* Note: When you want to setup the color of the icon you
781
+ > should experiment with both these variables >(fill&stroke)
782
+ > or consider using the one your icon is based on. */
783
+ >}
784
+ >```
785
+
786
+ [🔼 Back to top](#components)
787
+
788
+ -----------------------------------------------------------------
789
+
790
+ # IPI Radio-button Component
791
+ Simple styled radio-button that can accept a formGroup and a control.
792
+
793
+ ## Usage
794
+ >**`parent.component.html`**
795
+ >```html
796
+ ><ipi-radio-button
797
+ > [options]="{
798
+ > data: [dataOptionOne, dataOptionTwo],
799
+ > inline: true
800
+ > formGroup: formGroup
801
+ > formControlName: formGroup.controls[controlName]
802
+ > }">
803
+ ></ipi-radio-button>
804
+ >
805
+ ><ipi-radio-button
806
+ > [options]="{
807
+ > checked: 1
808
+ > data: [dataOptionsOne, dataOptionTwo]
809
+ > }"
810
+ > (selectChange)="handleChange($event)">
811
+ ></ipi-radio-button>
812
+ >```
813
+
814
+ ### Inputs
815
+
816
+ >#### data
817
+ >Array of elements of type IpiRadioData
818
+
819
+ >#### inline
820
+ >Property that sets the flex-direction to row instead of column(default)
821
+
822
+ >#### checked
823
+ >Number refference to the index of the element inside the Array of data that we want to be checked by default.
824
+ >Note: for FormGroup use default value inside the FormControl building.
825
+
826
+ >#### formGroup
827
+ >Refference to the FormGroup that the radio-button will handle
828
+
829
+ >#### formControlName
830
+ >Refference to the name of the control that we will access in the FormGroup
831
+
832
+ ### CSS Variables
833
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-radio-button:
834
+
835
+ >```css
836
+ >ipi-radio-button {
837
+ > --ipi-radio-button-background-color: #FFFFFF;
838
+ >
839
+ > --ipi-radio-button-text-color: #5D6068;
840
+ >
841
+ > --ipi-radio-button-unchecked-border-color: #E9E9E9;
842
+ > --ipi-radio-button-checked-border-color: #F96138;
843
+ > --ipi-radio-button-disabled-border-color: #E7E7E7;
844
+ >
845
+ > --ipi-radio-button-outline-color: none;
846
+ >
847
+ > --ipi-radio-button-tooltip-icon-fill: transparent;
848
+ > --ipi-radio-button-tooltip-icon-stroke: #C6C6C6;
849
+ >}
850
+ >```
851
+
852
+ [🔼 Back to top](#components)
853
+
854
+ -----------------------------------------------------------------
855
+
856
+ # IPI Select Component
857
+
858
+ ## Usage
859
+ >**`parent.component.ts`**
860
+ >```typescript
861
+ >import { IpiSelectComponent, IpiSelectOptions }
862
+ >from '@apexara/ng-components/select';
863
+ >
864
+ >@Component({
865
+ > imports: [ IpiSelectComponent ],
866
+ >})
867
+ >
868
+ >export class SelectExampleComponent {
869
+ >
870
+ > public selectForm = this.formBuilder.group({
871
+ > selectControl: [[], [Validators.required]],
872
+ > });
873
+ >
874
+ > public execute() {
875
+ > // bind any logic to select change or helperText click
876
+ > }
877
+ >
878
+ > public selectOptions: IpiSelectOptions = {
879
+ > label: 'Example label',
880
+ > data: [
881
+ > { label: 'Any string', value: any },
882
+ > { label: '', value: any },
883
+ > { label: '', value: any },
884
+ > ],
885
+ > tooltip: 'tooltip text',
886
+ > placeholder: 'Placeholder value',
887
+ > helperText: 'Forgot password?',
888
+ > prefixImg: 'example.svg',
889
+ > formGroup: this.selectForm,
890
+ > formControlName: 'selectControl',
891
+ > errors: {
892
+ > required: 'Select is required'
893
+ > }
894
+ > ,
895
+ > // Optional: cap dropdown max height (px)
896
+ > maxDropdownHeightPx: 240,
897
+ > }
898
+ >}
899
+ >```
900
+ >**`parent.component.html`**
901
+ >```html
902
+ >
903
+ ><ipi-select
904
+ > [options]='selectOptions'
905
+ > (selectChange)='execute()'
906
+ > (helperTextChange)='execute()'>
907
+ ><ipi-select>
908
+ >```
909
+
910
+ ### CSS Variables
911
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-select:
912
+ >```css
913
+ >ipi-select {
914
+ > /* Dropdown styling */
915
+ > --ipi-select-dropdown-box-shadow: none;
916
+ >
917
+ > /* Input styling */
918
+ > --ipi-select-input-text-color: #0B1222;
919
+ > --ipi-select-input-text-selected-color: #F96138;
920
+ > --ipi-select-input-placeholder-color: #0B1222;
921
+ >
922
+ > /* Chip styling (used on searchable multiple options) */
923
+ > --ipi-select-chip-font-size: 10px;
924
+ > --ipi-select-chip-color: #FFFFFF;
925
+ > --ipi-select-chip-background-color: #0B1222;
926
+ > --ipi-select-chip-icon-color; #FFFFFF;
927
+ >
928
+ > /* tooltip icon styling */
929
+ > --ipi-select-tooltip-icon-fill: transparent;
930
+ > --ipi-input-tooltip-icon-stroke: #C6C6C6;
931
+ >
932
+ > /* Prefix icon styling */
933
+ > --ipi-select-icon-prefix-fill: #C6C6C6;
934
+ > --ipi-select-icon-prefix-stroke: transparent;
935
+ >
936
+ > /* Background color of the input element inside the select */
937
+ > --ipi-select-input-background-color: #FFFFFF00;
938
+ >
939
+ > /* Border color of the input element inside the select */
940
+ > --ipi-select-input-border-color: #E9E9E9;
941
+ > --ipi-select-input-border-width: 1px;
942
+ >
943
+ > /* Options divider color */
944
+ > --ipi-select-options-divider-color: #E9E9E9;
945
+ > --ipi-select-options-divider-height: 1px;
946
+ >
947
+ > /* Border color on hover */
948
+ > --ipi-select-input-border-hover-color: #4B5368;
949
+ >
950
+ > /* Border color on disabled */
951
+ > --ipi-select-input-border-disabled-color: #F2F2F2;
952
+ >
953
+ > /* Border and text color for when Select is invalid */
954
+ > --ipi-select-invalid-color: #F96138;
955
+ > --ipi-select-invalid-border-width: 1px;
956
+ >
957
+ > /* Arrow: */
958
+ > --ipi-select-arrow-color: #5D6068;
959
+ > --ipi-select-arrow-checked-color: #F96138;
960
+ >
961
+ > /* Header: */
962
+ > --ipi-select-header-color: #0B1222;
963
+ > --ipi-select-helper-text-color: #5D6068;
964
+ >
965
+ > /* if type table */
966
+ > --ipi-select-input-table-color: #5D6068;
967
+ >
968
+ > /* Dropdown: */
969
+ > --ipi-select-dropdown-border-color: #E9E9E9;
970
+ > --ipi-select-dropdown-background-color: #FFFFFF;
971
+ >
972
+ >/* Note: When you want to setup the color of your icon
973
+ > you should experiment with both these variables or consider
974
+ > using the one your icon is based on. */
975
+ >}
976
+ >```
977
+
978
+ [🔼 Back to top](#components)
979
+
980
+ -----------------------------------------------------------------
981
+
982
+ # IPI Datepicker Component
983
+ ## Usage
984
+ >**`parent.component.ts`**
985
+ >```typescript
986
+ >import { IpiDatepickerComponent, IpiDatepickerOptions }
987
+ >from '@apexara/ng-components/datepicker';
988
+ >
989
+ >@Component({
990
+ > imports: [ IpiDatepickerComponent ],
991
+ >})
992
+ >
993
+ >export class DatepickerExampleComponent {
994
+ >
995
+ > public datePickerForm = this.formBuilder.group({
996
+ > singleDate: ['', [Validators.required]],
997
+ > fromRange: ['', [Validators.required]],
998
+ > toRange: ['', [Validators.required]],
999
+ > });
1000
+ >
1001
+ > this.singleDateOptions = {
1002
+ > label: 'Pick a single date.',
1003
+ > formGroup: this.formGroup,
1004
+ > formControlName: 'singleDate',
1005
+ > errors: {
1006
+ > required: 'This is a required field.'
1007
+ > },
1008
+ > min: new Date(2000, 1, 1),
1009
+ > max: new Date(2025, 1, 1),
1010
+ > }
1011
+ >
1012
+ > this.rangeDateOptions = {
1013
+ > label: 'Pick a range dates.',
1014
+ > formGroup: this.formGroup,
1015
+ > formControlName: new DateRangeFormControls('fromRange', 'toRange'),
1016
+ > errors: {
1017
+ > required: 'This is a required field',
1018
+ > },
1019
+ > min: new Date(2000, 1, 1),
1020
+ > max: new Date(2025, 1, 1),
1021
+ > };
1022
+ >
1023
+ >}
1024
+ >```
1025
+ >**`parent.component.html`**
1026
+ >```html
1027
+ > <ipi-datepicker [options]="rangeDateOptions"></ipi-datepicker>
1028
+ >
1029
+ > <ipi-datepicker [options]="singleDateOptions"></ipi-datepicker>
1030
+ >```
1031
+
1032
+ ### Inputs
1033
+ >
1034
+ >
1035
+ >#### options
1036
+ >Options are of type IpiDatepickerOptions with the following properties:
1037
+ >
1038
+ > label - string - used for how long the snackbar should be displayed
1039
+ >
1040
+ > formGroup - Refference to the FormGroup that the datepicker will handle
1041
+ >
1042
+ > formControlName - either a string or instance of class DateRangeFormControls
1043
+ >
1044
+ > min - a Minimal value for Date to be selectable.
1045
+ >
1046
+ > max - a Maximum value for Date to be selectable.
1047
+ >
1048
+ > errors - An object with properties which keys are
1049
+ > refferences to Form ValidationErrors and a message to display if
1050
+ > the input Control has the error.
1051
+ >
1052
+ ### CSS Variables
1053
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-datepicker:
1054
+ >```css
1055
+ >ipi-datepicker {
1056
+ >
1057
+ > /* Picker variables */
1058
+ > --ipi-datepicker-svg-background-color:#FF7955;
1059
+ > --ipi-datepicker-border: 1px solid #E9E9E9;
1060
+ > --ipi-datepicker-border-hover-color: #FF7955;
1061
+ >
1062
+ > --ipi-datepicker-error-color: #F96138;
1063
+ > --ipi-datepicker-svg-fill-color #FFFFFF;
1064
+ >
1065
+ > --ipi-datepicker-svg-background-hover-color: #F96138;
1066
+ >
1067
+ > --ipi-datepicker-input-color: #0B1222;
1068
+ >
1069
+ > --ipi-datepicker-header-text-color: #FF7955;
1070
+ >
1071
+ > --ipi-calendar-background-color: #FFFFFF;
1072
+ >
1073
+ > --ipi-calendar-box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
1074
+ >
1075
+ > --ipi-calendar-header-active-date-view-focus-color: #FFFFFF;
1076
+ >
1077
+ > --ipi-calendar-header-active-date-view-focus-background-color: #FF7955;
1078
+ >
1079
+ > --ipi-calendar-header-active-date-view-hover-color: #FFFFFF;
1080
+ >
1081
+ > --ipi-calendar-header-active-date-view-hover-background-color: #FF7955;
1082
+ >
1083
+ > --ipi-calendar-header-chevron-hover-focus-color: #FFFFFF;
1084
+ >
1085
+ > --ipi-calendar-header-chevron-hover-focus-background-color: #FF7955;
1086
+ >
1087
+ > --ipi-calendar-header-chevron-disabled-color: #5D6068;
1088
+ >
1089
+ > --ipi-calendar-month-view-table-header-color: #C6C6C6;
1090
+ >
1091
+ > --ipi-calendar-month-view-table-header-border-bottom-color: #C6C6C6;
1092
+ >
1093
+ > --ipi-calendar-multi-year-view-table-header-border-bottom-color: #C6C6C6;
1094
+ >
1095
+ > --ipi-calendar-year-view-table-header-border-bottom-color: #C6C6C6;
1096
+ >
1097
+ > --ipi-calendar-body-cell-color: #0B1222;
1098
+ >
1099
+ > --ipi-calendar-body-cell-background-color: none;
1100
+ >
1101
+ > --ipi-calendar-body-cell-border: none;
1102
+ >
1103
+ > --ipi-calendar-body-cell-hover-color: white;
1104
+ >
1105
+ > --ipi-calendar-body-cell-hover-background-color: #FFD2C6;
1106
+ >
1107
+ > --ipi-calendar-body-today-cell-border: #FFD2C6;
1108
+ >
1109
+ > --ipi-calendar-body-active-cell-background-color: #f9613880;
1110
+ > --ipi-calendar-body-cell-selected-color: #FFFFFF;
1111
+ > --ipi-calendar-body-cell-selected-background-color: #F96138;
1112
+ > --ipi-calendar-body-cell-in-range-background-color: #FFF2EF;
1113
+ > --ipi-calendar-body-cell-in-range-active-background-color: #FFD2C6;
1114
+ >
1115
+ > --ipi-calendar-body-cell-in-preview-background-color: #F962381C;
1116
+ >
1117
+ > --ipi-calendar-body-cell-in-preview-border: 1px dashed #F96138;
1118
+ > --ipi-calendar-body-cell-in-range-border: 1px solid #F96138;
1119
+ > --ipi-calendar-body-cell-range-start-border: 1px sold #F96138;
1120
+ > --ipi-calendar-body-cell-range-start-background-color: #F96138;
1121
+ >
1122
+ > --ipi-calendar-body-cell-range-start-color: #FFFFFFF;
1123
+ > --ipi-calendar-body-cell-range-end-border: 1px sold #F96138;
1124
+ > --ipi-calendar-body-cell-range-end-background-color: #F96138;
1125
+ >
1126
+ > --ipi-calendar-body-cell-range-end-color: #FFFFFFF;
1127
+ > --ipi-calendar-body-cell-active-in-range-start-end-background-color: #FFD2C6;
1128
+ > --ipi-calendar-body-cell-preview-end-border: 1px dashed #F96138;
1129
+ > --ipi-calendar-body-cell-preview-end-background-color: #FFD2C6;
1130
+ > --ipi-calendar-body-cell-preview-end-color: #FFFFFF;
1131
+ > --ipi-calendar-body-cell-preview-start-border: 1px dashed #F96138;
1132
+ > --ipi-calendar-body-cell-preview-start-background-color: #FFD2C6;
1133
+ >
1134
+ > --ipi-calendar-body-cell-preview-start-color: #FFFFFF;
1135
+ > --ipi-calendar-body-cell-in-preview-range-start-border: 0px;
1136
+ > --ipi-calendar-body-cell-in-preview-range-end-border: 0px;
1137
+ >
1138
+ > --ipi-calendar-body-cell-disabled-background-color: #E0DFDE;
1139
+ >}
1140
+ >```
1141
+
1142
+ [🔼 Back to top](#components)
1143
+
1144
+ -----------------------------------------------------------------
1145
+
1146
+ # IPI Carousel Component
1147
+
1148
+ A dynamic, responsive carousel component designed to enhance user experience. It includes smooth scrolling, keyboard navigation, clickable navigation buttons, and a progress indicator.
1149
+
1150
+ ---
1151
+
1152
+ ## Usage
1153
+ >### `parent.component.ts`
1154
+ >
1155
+ >```typescript
1156
+ >import { Component } from '@angular/core';
1157
+ >import { IpiCarouselComponent } from '@apexara/ng-components/carousel';
1158
+ >
1159
+ >@Component({
1160
+ > imports: [IpiCarouselComponent],
1161
+ > selector: 'app-carousel-example',
1162
+ > templateUrl: './carousel-example.component.html',
1163
+ > styleUrls: ['./carousel-example.component.css']
1164
+ >})
1165
+ >export class CarouselExampleComponent {
1166
+ >
1167
+ >}
1168
+ >```
1169
+ >
1170
+ >### `parent.component.html`
1171
+ >
1172
+ >```html
1173
+ ><ipi-carousel>
1174
+ > @for (let item of [1, 2, 3, 4, 5]; track $index) {
1175
+ > <div>Item {{ item }}</div>
1176
+ > }
1177
+ ></ipi-carousel>```
1178
+
1179
+ ---
1180
+
1181
+ ### Features and Inputs
1182
+
1183
+ #### **Dynamic Content**
1184
+ Wrap any HTML or Angular components within `<ipi-carousel>` to display them in the carousel.
1185
+
1186
+ #### **Progress Bar**
1187
+ Automatically updates as the carousel scrolls.
1188
+
1189
+ #### **Navigation Buttons**
1190
+ Includes "previous" and "next" buttons with accessible keyboard navigation.
1191
+
1192
+ #### **Scroll Behavior**
1193
+ Supports smooth scrolling with `scroll-snap` for seamless transitions.
1194
+
1195
+ #### **Custom CSS Variables**
1196
+ The following variables allow for customization of colors, dimensions, and other styles:
1197
+
1198
+ ---
1199
+
1200
+ ### CSS Variables
1201
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-carousel:
1202
+ >
1203
+ >```css
1204
+ >ipi-carousel {
1205
+ > /* Carousel Background */
1206
+ > --ipi-carousel-background-color: transparent;
1207
+ >
1208
+ > --ipi-carousel-button-border-color: #FFFFFF;
1209
+ > --ipi-carousel-button-border-hover-color: #FFFFFF;
1210
+ >
1211
+ > --ipi-carousel-chevron-color: #FFFFFF;
1212
+ > --ipi-carousel-chevron-hover-color: #FFFFFF;
1213
+ >
1214
+ > /* Progress Bar */
1215
+ > --ipi-carousel-scrollbar-color: #FFFFFF;
1216
+ > --ipi-carousel-scrollbar-container-color: #020617;
1217
+ >
1218
+ >}
1219
+ >```
1220
+
1221
+ [🔼 Back to top](#components)
1222
+
1223
+ -----------------------------------------------------------------
1224
+
1225
+ # IPI Snackbar Service
1226
+ A services that provides a way to display messages on the screen.
1227
+
1228
+ ## Usage
1229
+ >**`parent.component.ts`**
1230
+ >```typescript
1231
+ >
1232
+ >import {
1233
+ > IpiSnackbarService,
1234
+ > IpiSnackbarOptions,
1235
+ > horizontalPosition,
1236
+ > verticalPosition }
1237
+ >from '@apexara/ng-components/snackbar';
1238
+ >
1239
+ >@Component({
1240
+ > imports: [],
1241
+ >})
1242
+ >
1243
+ >export class SnackbarExample {
1244
+ >
1245
+ > public message = 'Message to be displayed';
1246
+ >
1247
+ > public options: IpiSnackbarOptions = {
1248
+ > error: true,
1249
+ > icon: 'example.svg',
1250
+ > animationDuration: 20
1251
+ > };
1252
+ >
1253
+ > // Inject to the component from which you want to execute it
1254
+ > constructor(public snackbarService: IpiSnackbarService) {
1255
+ > // optionally setting the position
1256
+ > this.snackbarService.setPosition({
1257
+ > verticalPosition: verticalPosition.Bottom,
1258
+ > horizontalPosition: horizontalPosition.Center
1259
+ > });
1260
+ > }
1261
+ >
1262
+ >}
1263
+ >```
1264
+ >**`parent.component.html`**
1265
+ >```html
1266
+ ><example-component
1267
+ > (click)="this.snackbarService.open(message, options)">
1268
+ ></example-component>
1269
+ >```
1270
+ >
1271
+
1272
+ ### Inputs
1273
+
1274
+ >#### positionOptions
1275
+ >verticalPosition & horizontalPosition
1276
+ >Optional properties of SnackbarPosition interface that is used to set custom
1277
+ >position of the snackbar
1278
+
1279
+ >#### message
1280
+ >Message to be displayed
1281
+
1282
+ >#### options
1283
+ >Options are of type IpiSnackbarOptions with the following properties:
1284
+ >    title (optional) – string – overrides the default 'Error' or 'Success' title with a custom static header
1285
+ > animation-duration - number - used for how long the snackbar should be displayed
1286
+ > icon (optional) - string - icon name that must be located inside assets/img/ (using ipi-img)
1287
+ > error (optional) - boolean - used to distinguish error message from info.
1288
+ > backgroundColor (optional) - string - sets the background color of the snackbar.
1289
+ > placeholderTextColor (optional) - string; - sets title heading text of snackbar color.
1290
+ > messageTextColor (optional) - string - sets snackbar message color.
1291
+ > progressColor (optional) - string - sets color of animation showing the snackbar showing duration.
1292
+ > xIconColor (optional) - string - sets the closing icon color of the snackbar.
1293
+ >
1294
+ > Note: Default values are set as CSS Variables in the initial component, changing of colors happens as options passed to the open() method.
1295
+
1296
+ ### CSS Variables
1297
+ >
1298
+ >```css
1299
+ >ipi-snackbar {
1300
+ > /* Colors, Fills, Strokes: */
1301
+ > --ipi-snackbar-background-color: #14BD6C;
1302
+ > --ipi-snackbar-error-background-color: #F96138;
1303
+ >
1304
+ > --ipi-snackbar-placeholder-text-color: #FFFFFF;
1305
+ > --ipi-snackbar-message-text-color: #FFFFFF;
1306
+ >
1307
+ > --ipi-snackbar-progress-color: #FFFFFF;
1308
+ >
1309
+ > /* Color of closing icon of the snackbar */
1310
+ > --ipi-snackbar-x-icon-color: #FFFFFF;
1311
+ >
1312
+ > --ipi-snackbar-animation-duration: 10s;
1313
+ >}
1314
+ >```
1315
+
1316
+ [🔼 Back to top](#components)
1317
+
1318
+ -----------------------------------------------------------------
1319
+
1320
+ # IPI Overlay Service
1321
+ Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be used as a low-level building block for other components. Dialogs, tooltips, menus, selects, etc. can all be built using overlays.
1322
+
1323
+ ## Usage
1324
+ >**`parent.component.ts`**
1325
+ >```typescript
1326
+ >
1327
+ >import { Component } from '@angular/core';
1328
+ >import { OverlayService } from '@apexara/ng-components/services';
1329
+ >
1330
+ >@Component({
1331
+ > imports: [],
1332
+ > template: `
1333
+ > <button (click)="openOverlay()">Open Overlay</button>
1334
+ > `,
1335
+ >})
1336
+ >
1337
+ >export class FloatingComponentExample {
1338
+ >
1339
+ > constructor(private overlayService: OverlayService) {}
1340
+ >
1341
+ > openOverlay() {
1342
+ > // Create and open the overlay
1343
+ >
1344
+ > // Add your custom content to the overlay
1345
+ > const overlayContent = document.createElement('div');
1346
+ > overlayContent.innerText = 'This is an overlay!';
1347
+ > const overlayRef = this.overlayService.apendToOverlay(overlayContent, true);
1348
+ >
1349
+ > // Close the overlay after 3 seconds
1350
+ > setTimeout(() => {
1351
+ > overlayRef.removeFromOverlay(overlayContent);
1352
+ > }, 3000);
1353
+ > }
1354
+ >}
1355
+ >```
1356
+ >
1357
+ >#### appendToOverlay(content: HTMLElement, blockable = false)
1358
+ >Adds an HTMLElement in the overlay.
1359
+ >
1360
+ >>#### removeFromOverlay(content: HTMLElement)
1361
+ >Remove an HTMLElement if its inside the overlay.
1362
+ >Also if it is the last removed element inside the overlay clears all the focus logic and removes the
1363
+ >whole overlay.
1364
+ >
1365
+ >#### blockable
1366
+ >When set to true, the `blockable` property triggers scroll block inside the overlay. This prevents
1367
+ >scrolling of the underlying content while the overlay is open, ensuring that the user's focus
1368
+ >remains within the overlay.
1369
+
1370
+ [🔼 Back to top](#components)
1371
+
1372
+ -----------------------------------------------------------------
1373
+
1374
+ # IPI Table Component
1375
+ A simple table that can project data sorted by columns x rows providing editing, sorting and filtering
1376
+ of the data.
1377
+
1378
+ Two types of tables are available. One with local data and local sorting & filtering and a server side one.
1379
+
1380
+ ## Usage
1381
+ >**`parent.component.ts`**
1382
+ >```typescript
1383
+ >import {
1384
+ > IpiTableComponent,
1385
+ > IpiTableColumn,
1386
+ > IpiTableColumnType }
1387
+ >from '@apexara/ng-components/table';
1388
+ >
1389
+ >@Component({
1390
+ > imports: [ IpiTableComponent ]
1391
+ >})
1392
+ >
1393
+ >export class TableExampleComponent {
1394
+ >
1395
+ > // Used for searching and filtering
1396
+ > public tableFilter: string;
1397
+ >
1398
+ > public tableData = [{
1399
+ > id: 'D1954F',
1400
+ > name: 'John Doe',
1401
+ > credits: 333,
1402
+ > cash: 113,
1403
+ > admin: false,
1404
+ > years: 19,
1405
+ > date: new Date()
1406
+ > listName: 'first list'
1407
+ > },
1408
+ > {
1409
+ > id: 'A7D543',
1410
+ > name: 'Alice Cooper',
1411
+ > credits: 500,
1412
+ > cash: 100,
1413
+ > years: 33,
1414
+ > admin: true,
1415
+ > date: new Date()
1416
+ > listName: 'second list'
1417
+ > },
1418
+ > {
1419
+ > id: 'BB13DA',
1420
+ > name: 'Will Smith',
1421
+ > credits: 1000,
1422
+ > cash: 250,
1423
+ > admin: true,
1424
+ > years: 33,
1425
+ > date: new Date()
1426
+ > listName: 'third list',
1427
+ > }]
1428
+ >
1429
+ > public tableColumns: IpiTableColumn[] = [
1430
+ > { label: 'Id', value: 'id', width: '70px' },
1431
+ > { label: 'Name', value: 'name', width: '70px' },
1432
+ > { label: 'Date', value: 'date', type: IpiTableColumnType.Date,
1433
+ > dateFormat:
1434
+ > {
1435
+ > format: 'shortDate',
1436
+ > locale: 'en-US',
1437
+ > timezone: '+0100'
1438
+ > },
1439
+ > width: '60px' }
1440
+ > { label: 'Years', value: 'years', type: IpiTableColumnType.Number, width: '60px'}
1441
+ > { label: 'Credits', value: 'credits', type: IpiTableColumnType.Number width: '70px' },
1442
+ > { label: 'Cash', value: 'cash', type: IpiTableColumnType.Number width: '70px' },
1443
+ > /* We can use +, -, /, * operations on the value property if it's of type NumberMath */
1444
+ > { label: 'Total cash', value: 'credits * 1.5 + cash', type: IpiTableColumnType.NumberMath width: '70px' },
1445
+ > { label: 'Admin', value: 'admin', type: IpiTableColumnType.Chip width: '70px' },
1446
+ > { label: 'List name', value: 'listName', width: '70px' },
1447
+ > { label: 'Actions', type: IpiTableColumnType.Actions, width: '100px',
1448
+ > singleActions: [
1449
+ > label: 'Download',
1450
+ > showOn: [
1451
+ > { property: 'admin', values: [true] }
1452
+ > ],
1453
+ > icon: 'img/download.svg',
1454
+ > execute: (row) = execute(row: any)
1455
+ > ]
1456
+ > }
1457
+ > ]
1458
+ >
1459
+ > public tableChange(from: number, to: number, nextSortingColumn?: any, filter?: string): any {
1460
+ > // Your server side data logic here
1461
+ > }
1462
+ >
1463
+ > public execute(row: any) {
1464
+ > // bind any logic to customizable icon inside the table row
1465
+ > }
1466
+ >
1467
+ >}
1468
+ >```
1469
+ >**`parent.component.html`**
1470
+ >```html
1471
+ ><ipi-table #serverSide
1472
+ > [serverSide]="true"
1473
+ > [data]="tableData" [columns]="tableColumns"
1474
+ > [filter]="tableFilter" [pageable]="true"
1475
+ > [dataLength]="tableData.length"
1476
+ > [isLoading]="true/false"
1477
+ > (tableChange)="tableChange($event.from, $event.to, $event.sort, $event.filter)">
1478
+ ></ipi-table>
1479
+ >
1480
+ ><ipi-table #local
1481
+ > [data]="localData" [columns]="tableColumns"
1482
+ > [filter]="tableFilter" [pageable]="true">
1483
+ ></ipi-table>
1484
+ >```
1485
+
1486
+ ### Inputs
1487
+
1488
+ #### Virtual Scroll Example (Local Data)
1489
+ >```html
1490
+ ><ipi-table
1491
+ [data]="localData"
1492
+ [columns]="tableColumns"
1493
+ [filter]="tableFilter"
1494
+ [pageable]="true"
1495
+ [virtualScroll]="true"
1496
+ [tableHeight]="600">
1497
+ ></ipi-table>
1498
+ >```
1499
+
1500
+ >#### virtualScroll
1501
+ >Enables virtual scrolling for local data tables. Renders only visible rows inside a virtual viewport for better performance with large datasets.
1502
+ >
1503
+
1504
+ >#### tableHeight
1505
+ >Total table height in pixels (including header). The virtual viewport height is automatically calculated from this value. Default is `800`.
1506
+
1507
+ >#### serverSide
1508
+ >When true it make the table emit events when a change happens with the following properties
1509
+ >{from, to, sort, filter} which we can use to create a request and get data.
1510
+ >Also stops local filter and sorting logic from executing.
1511
+
1512
+ >#### data
1513
+ >The data that the table initializes.
1514
+ >
1515
+
1516
+ >#### columns - IpiTableColumn Interface
1517
+ >The columns that will the table have and based on the columns the data will be visualized.
1518
+ >
1519
+ >The IpiTableColumn interface defines the structure of each column in the IPI Table component. Each column can have various properties to customize its behavior and appearance.
1520
+ >
1521
+ >
1522
+ >**label?: string**: The display label for the column header.
1523
+ >
1524
+ >**value?: string**: The key in the data object that corresponds to this column.
1525
+ >
1526
+ >**type?: IpiTableColumnType**: The type of data in the column, which can determine how it's rendered (e.g., date, number, chip, etc.).
1527
+ >
1528
+ >**width?: string**: The width of the column, defined as a CSS width value (e.g., '70px').
1529
+ >
1530
+ >**editable?: boolean**: Indicates whether the column can be edited by the user.
1531
+ >
1532
+ >**prefix?: string**: A string to be displayed before the column value.
1533
+ >
1534
+ >**suffix?: string**: A string to be displayed after the column value.
1535
+ >
1536
+ >**singleActions?: Action[]**: An array of actions available for a single row in this column.
1537
+ >
1538
+ >**multipleActions?: Action[]**: An array of actions available for multiple rows in this column.
1539
+ >
1540
+ >**dateFormat?: IpiDateFormatOptions**: Formatting options for date values in the column.
1541
+ >
1542
+ >**chipLabel?: { [key: string]: string }**: A mapping of labels for chip display in the column.
1543
+ >
1544
+ >**class?: string | { [key: string]: string }**: Custom CSS classes for styling the column.
1545
+ >
1546
+
1547
+ >#### columnType - IpiTableColumnType
1548
+ >```typescript
1549
+ >export enum IpiTableColumnType {
1550
+ > Text, // A standard text column
1551
+ > Date, // A column for displaying dates
1552
+ > Currency, // A column for displaying currencies
1553
+ > Chip, // A column for displaying chip components
1554
+ > Checkbox, // A column for displaying checkboxes
1555
+ > Number, // A column for displaying numbers
1556
+ > NumberMath, // A column for displaying combined properties' values numbers with additional addition, subtraction, multiplication, division logic.
1557
+ > Actions, // A column for action buttons
1558
+ >}
1559
+ >```
1560
+ >
1561
+ >Each column type is handled through specific templates:
1562
+ >
1563
+ >Text Column: Displays standard text, can be editable.
1564
+ >
1565
+ >Date Column: Formats and displays dates.
1566
+ >
1567
+ >Chip Column: Displays chips for categorical data.
1568
+ >
1569
+ >Checkbox Column: Displays checkboxes, currently read-only.
1570
+ >
1571
+ >Number Column: Displays numbers with optional prefix and suffix. This column type also supports calculations based on the numeric values.
1572
+ >
1573
+ >Actions Column: Displays action buttons with dynamic visibility based on context.
1574
+ >```typescript
1575
+ >export interface Action {
1576
+ > icon: string; // Icon source. example: ('assets/icons/icon.svg')
1577
+ > label: string; // Label for icon. Tooltip pops on hover.
1578
+ > class?: string, // Custom class to add to the specific action.
1579
+ > showOn?: ActionShowType, // Array of different objects that represent a condition the row should meet in order to be shown
1580
+ > disabled?: boolean, // A column for displaying numbers
1581
+ > NumberMath, // A column for displaying combined properties' values numbers with additional addition, subtraction, multiplication, division logic.
1582
+ > execute?: (row: any): void, // A column for action buttons
1583
+ >}
1584
+ >```
1585
+ >### **Action ShowOn Examples with Passed Properties to a Column**
1586
+ >```typescript
1587
+ >export type ActionShowType = Array<{ property: string; values: any[], exists?: boolean; }>
1588
+ >
1589
+ >```
1590
+ >
1591
+ >The `showOn` property allows actions to be conditionally displayed based on row values. It supports:
1592
+ >- **Single property conditions**: `{ property: 'status', values: ['pending'] }`
1593
+ >- **Multiple value conditions**: `{ property: 'status', values: ['completed', 'archived'] }`
1594
+ >- **Multiple property & values**: `{ property: 'admin', values: [true] }`, `{ property: 'status', values: ['approved', 'rejected'] }`
1595
+ >- **Check if exists conditions (values are no longer taken into consideration)**: `{ property: 'status', values: [], exists: true/false }`
1596
+ >
1597
+ >#### **Explicit Property Matching**
1598
+ >The action will be displayed **only if all conditions match**.
1599
+ >
1600
+ >```typescript
1601
+ >singleActions: [
1602
+ > {
1603
+ > label: 'Edit',
1604
+ > icon: 'img/edit.svg',
1605
+ > showOn: [
1606
+ > { property: 'status', values: ['pending'] }, // Requires status === 'pending'
1607
+ > { property: 'createdBy.role', values: ['Admin'] } // Requires createdBy.role === 'Admin'
1608
+ > ],
1609
+ > execute: (row) => console.log('Edit action for', row),
1610
+ > }
1611
+ >]
1612
+ >```
1613
+ >
1614
+ >- **Visible if** `status === 'pending'` **and** `createdBy.role === 'Admin'`.
1615
+ >
1616
+ >
1617
+ >
1618
+ >#### **Multiple Possible Values for a Single Property**
1619
+ >The action will be displayed **if the property matches any of the specified values**.
1620
+ >
1621
+ >```typescript
1622
+ >singleActions: [
1623
+ > {
1624
+ > label: 'Delete',
1625
+ > icon: 'img/delete.svg',
1626
+ > showOn: [
1627
+ > { property: 'status', values: ['completed', 'archived'] }, // Matches either 'completed' or 'archived'
1628
+ > ],
1629
+ > execute: (row) => console.log('Delete action for', row),
1630
+ > }
1631
+ >]
1632
+ >```
1633
+ >
1634
+ >---
1635
+ >
1636
+ >### **How It Works**
1637
+ >- **All conditions inside `showOn` must be met for the action to appear**.
1638
+ >- **Supports deeply nested properties** like `createdBy.role`.
1639
+ >
1640
+ >---
1641
+ >
1642
+
1643
+ >#### pageable
1644
+ >Whether or not the table has more than one page
1645
+
1646
+ >#### sortable
1647
+ >Blocks local sorting when set to false
1648
+
1649
+ >#### currentSortedColumn / used with serverSide /
1650
+ >Refference to the column that is used as a sorter needed for keeping track when changes occur (example
1651
+ >page change, new sorting column, sorting same column (reverse sorting), filtering)
1652
+
1653
+ >#### isLoading / used with serverSide /
1654
+ >When true triggers an animation that blocks the table and shows a loading bar.
1655
+
1656
+ >#### dataLength / used with serverSide /
1657
+ >The length of the data passed from parent element needed to display properply the pages and the results count.
1658
+
1659
+
1660
+ ### CSS Variables
1661
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-table:
1662
+ >
1663
+ >```css
1664
+ >ipi-table {
1665
+ > /* Colors, Fills, Strokes: */
1666
+ > --ipi-table-background-color: #FFFFFF;
1667
+ > --ipi-table-row-bottom-border-color: #E9E9E9;
1668
+ > --ipi-table-first-row-text-color: #5D6068;
1669
+ > --ipi-table-arranger-hover-color: #F96138;
1670
+ > --ipi-table-loading-bar-color: #FF7F50;
1671
+ >
1672
+ > /* Color of all icons on hover */
1673
+ > --ipi-table-action-icon-hover-fill: #F96138;
1674
+ > --ipi-table-action-icon-hover-stroke: #FFFFFF00;
1675
+ > --ipi-table-action-hover-background-color: #F7F8FB;
1676
+ >
1677
+ > /* Color of the single icons */
1678
+ > --ipi-table-action-icon-fill: #5D6068;
1679
+ > --ipi-table-action-icon-stroke: #FFFFFF00;
1680
+ >
1681
+ > /* Secondary color of single icons */
1682
+ > --ipi-table-action-secondary-icon-fill: #F96138;
1683
+ > --ipi-table-action-secondary-icon-stroke: #FFFFFF00;
1684
+ >
1685
+ > --ipi-table-action-secondary-icon-hover-fill: #5D6068;
1686
+ > --ipi-table-action-secondary-icon-hover-stroke: #FFFFFF00;
1687
+ >
1688
+ > /* Color of icon that opens the multiple actions */
1689
+ > --ipi-table-action-more-icon-fill: #F96138;
1690
+ > --ipi-table-action-more-icon-stroke: #FFFFFF00;
1691
+ >
1692
+ > /* Color of the icons of multiple actions */
1693
+ > --ipi-table-dropdown-action-icon-fill: #5D6068;
1694
+ > --ipi-table-dropdown-action-icon-stroke: #FFFFFF00;
1695
+ >
1696
+ > /* Background on dropdown if stacked actions are initialized */
1697
+ > --ipi-table-more-actions-dropdown-background-color: #FFFFFF;
1698
+ > --ipi-table-more-actions-dropdown-hover-background-color: #00000010;
1699
+ >
1700
+ > /* Page picker styling */
1701
+ > --ipi-table-page-picker-text-color: #FFFFFF;
1702
+ > --ipi-table-page-picker-background: #F96138;
1703
+ >
1704
+ > /* Chip columns color styling */
1705
+ > --ipi-table-chip-color: #F96138;
1706
+ > --ipi-table-chip-background-color: #FFF2EF;
1707
+ >
1708
+ > --ipi-table-chip-color-secondary: #0B1222;
1709
+ > --ipi-table-chip-background-color-secondary: #E2E2E2;
1710
+ >
1711
+ >/* Note: When you want to setup the color of your icon
1712
+ > you should experiment with both these variables or consider
1713
+ > using the one your icon is based on. */
1714
+ >}
1715
+ >```
1716
+
1717
+ [🔼 Back to top](#components)
1718
+
1719
+ -----------------------------------------------------------------
1720
+
1721
+ # IPI Textarea Component
1722
+ A simple input textarea that handles formGroup control with validators.
1723
+
1724
+ ## Usage
1725
+ >**`parent.component.ts`**
1726
+ >```typescript
1727
+ >import { IpiTextAreaComponent, IpiTextAreaOptions }
1728
+ >from '@apexara/ng-components';
1729
+ >
1730
+ >@Component({
1731
+ > imports: [ IpiTextAreaComponent ]
1732
+ >})
1733
+ >
1734
+ >export class TextAreaExample {
1735
+ >
1736
+ > public formGroup = new FormGroup({
1737
+ > textareaControl: ['', [Validators.required]],
1738
+ > });
1739
+ >
1740
+ > public textAreaOptions = {
1741
+ > label: 'Your message inside the placeholder',
1742
+ > icon: 'icon.svg',
1743
+ > formGroup: formGroup,
1744
+ > formControlName: 'textareaControl',
1745
+ > errors: {
1746
+ > required: 'Textarea is required',
1747
+ > }
1748
+ > }
1749
+ >
1750
+ >}
1751
+ >
1752
+ >```
1753
+ >**`parent.component.html`**
1754
+ >```html
1755
+ >
1756
+ > <ipi-textarea
1757
+ > class="fluid"
1758
+ > [options]="textAreaOptions">
1759
+ > </ipi-textarea>
1760
+ >
1761
+ > <!-- No form group -->
1762
+ ><ipi-textarea
1763
+ > [options]="{ label: 'Placeholder' }"
1764
+ > (textAreaChange)="textAreaChange($event)">
1765
+ ></ipi-textarea>
1766
+ >
1767
+ >```
1768
+ >
1769
+
1770
+ ### Inputs
1771
+
1772
+ >#### options
1773
+ >Options of type IpiTextAreaOptions. Only label is required.
1774
+ >{
1775
+ > label - header label element for the current textarea
1776
+ > placeholder - initial placeholder message
1777
+ > icon - name of an icon that is inside in local assets/ path
1778
+ > formGroup - way to add the textarea to reactive form
1779
+ > formControlName - name of the control inside the formGroup
1780
+ >}
1781
+
1782
+ >#### textAreaChange
1783
+ >EventEmitter when there is a change in the input of the textarea.
1784
+
1785
+ >#### class 'fluid'
1786
+ >Adds custom width and height (100% 100%) based on a parent component.
1787
+
1788
+ ### CSS Variables
1789
+ >Here are all the available CSS variables (and their default values) you can set when using the ipi-textarea:
1790
+
1791
+ >```css
1792
+ >ipi-textarea {
1793
+ > /* Colors, Fills, Strokes: */
1794
+ > --ipi-textarea-header-color: #0B1222;
1795
+ >
1796
+ > --ipi-textarea-text-color: #0B1222;
1797
+ > --ipi-textarea-text-placeholder-color: #C6C6C6;
1798
+ >
1799
+ > --ipi-textarea-background-color: transparent;
1800
+ >
1801
+ > --ipi-textarea-icon-fill: #C6C6C6;
1802
+ >
1803
+ > /* Text area border styling */
1804
+ > --ipi-textarea-border: 1px solid #E9E9E9;
1805
+ > --ipi-textarea-border-radius: 4px;
1806
+ >
1807
+ > --ipi-textarea-border-invalid: 1px solid #F96138;
1808
+ >
1809
+ > --ipi-textarea-border-disabled: 1px dashed #F2F2F2;
1810
+ >
1811
+ > /* Text area scroll styling */
1812
+ > --ipi-textarea-scrollbar-color: #E2E2E2bb;
1813
+ > --ipi-textarea-scrollbar-hover-color: #E2E2E2;
1814
+ >
1815
+ > /* Text area's error text underneath input color */
1816
+ > --ipi-textarea-footer-color: #F96138;
1817
+ >
1818
+ >/* Note: When you want to setup the color of your icon
1819
+ > you should experiment with both these variables or consider
1820
+ > using the one your icon is based on. */
1821
+ >}
1822
+ >```
1823
+
1824
+ [🔼 Back to top](#components)
1825
+
1826
+ -----------------------------------------------------------------
1827
+
1828
+ # IPI Tooltip Component
1829
+ Simple tooltip that pops up on hover on a given parent component implemented as a directive. Custom message can be passed and a position.
1830
+
1831
+ ## Usage
1832
+ Import the tooltip inside the component you want to use it and
1833
+ place it as a directive to a component:
1834
+
1835
+ >**`parent.component.ts`**
1836
+ >```typescript
1837
+ >import { IpiTooltipDirective, TooltipPosition }
1838
+ > from '@apexara/ng-components';
1839
+ >
1840
+ >@Component({
1841
+ > imports: [ IpiTooltipDirective ]
1842
+ >})
1843
+ >
1844
+ >export class TooltipExampleComponent {}
1845
+ >
1846
+ >```
1847
+ >
1848
+ >**`parent.component.html`**
1849
+ >```html
1850
+ >
1851
+ ><div
1852
+ > ipiTooltip='tooltip text'
1853
+ > [tooltipPosition]="TooltipPosition.Above">
1854
+ ></div>
1855
+ >
1856
+ >```
1857
+ >
1858
+
1859
+ ### Inputs
1860
+
1861
+ >#### tooltipPosition
1862
+ >Enum with the following options: Above, After, Before, Below. Used for positioning the tooltip based on parent's position.
1863
+ >Default is Before.
1864
+
1865
+ [🔼 Back to top](#components)
1866
+
1867
+ -----------------------------------------------------------------