@exhaustive-ui/mcp 0.0.0-stage → 3.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +167 -2
  3. package/data/components/accordion.md +421 -0
  4. package/data/components/animateonscroll.md +163 -0
  5. package/data/components/autocomplete.md +1077 -0
  6. package/data/components/autofocus.md +38 -0
  7. package/data/components/avatar.md +417 -0
  8. package/data/components/badge.md +234 -0
  9. package/data/components/blockui.md +108 -0
  10. package/data/components/breadcrumb.md +178 -0
  11. package/data/components/button.md +774 -0
  12. package/data/components/card.md +138 -0
  13. package/data/components/carousel.md +440 -0
  14. package/data/components/cascadeselect.md +1387 -0
  15. package/data/components/chart.md +1178 -0
  16. package/data/components/checkbox.md +529 -0
  17. package/data/components/chip.md +180 -0
  18. package/data/components/colorpicker.md +301 -0
  19. package/data/components/confirmdialog.md +287 -0
  20. package/data/components/confirmpopup.md +417 -0
  21. package/data/components/contextmenu.md +491 -0
  22. package/data/components/dataview.md +600 -0
  23. package/data/components/datepicker.md +1262 -0
  24. package/data/components/dialog.md +622 -0
  25. package/data/components/divider.md +250 -0
  26. package/data/components/dock.md +500 -0
  27. package/data/components/dragdrop.md +285 -0
  28. package/data/components/drawer.md +510 -0
  29. package/data/components/dynamicdialog.md +109 -0
  30. package/data/components/editor.md +291 -0
  31. package/data/components/fieldset.md +182 -0
  32. package/data/components/fileupload.md +430 -0
  33. package/data/components/floatlabel.md +155 -0
  34. package/data/components/fluid.md +72 -0
  35. package/data/components/focustrap.md +65 -0
  36. package/data/components/galleria.md +627 -0
  37. package/data/components/iconfield.md +246 -0
  38. package/data/components/iftalabel.md +105 -0
  39. package/data/components/imagecompare.md +97 -0
  40. package/data/components/inplace.md +233 -0
  41. package/data/components/inputgroup.md +306 -0
  42. package/data/components/inputmask.md +518 -0
  43. package/data/components/inputnumber.md +675 -0
  44. package/data/components/inputotp.md +336 -0
  45. package/data/components/inputtext.md +488 -0
  46. package/data/components/keyfilter.md +85 -0
  47. package/data/components/knob.md +462 -0
  48. package/data/components/listbox.md +798 -0
  49. package/data/components/llms.md +28 -0
  50. package/data/components/megamenu.md +587 -0
  51. package/data/components/menu.md +483 -0
  52. package/data/components/menubar.md +462 -0
  53. package/data/components/message.md +449 -0
  54. package/data/components/metergroup.md +241 -0
  55. package/data/components/multiselect.md +1047 -0
  56. package/data/components/orderlist.md +342 -0
  57. package/data/components/organizationchart.md +197 -0
  58. package/data/components/overlay.md +217 -0
  59. package/data/components/paginator.md +314 -0
  60. package/data/components/panel.md +214 -0
  61. package/data/components/panelmenu.md +699 -0
  62. package/data/components/password.md +570 -0
  63. package/data/components/picklist.md +420 -0
  64. package/data/components/popover.md +378 -0
  65. package/data/components/progressbar.md +181 -0
  66. package/data/components/progressspinner.md +91 -0
  67. package/data/components/radiobutton.md +377 -0
  68. package/data/components/rating.md +312 -0
  69. package/data/components/ripple.md +89 -0
  70. package/data/components/scroller.md +122 -0
  71. package/data/components/scrollpanel.md +149 -0
  72. package/data/components/scrolltop.md +105 -0
  73. package/data/components/select.md +1206 -0
  74. package/data/components/selectbutton.md +356 -0
  75. package/data/components/skeleton.md +242 -0
  76. package/data/components/slider.md +337 -0
  77. package/data/components/speeddial.md +589 -0
  78. package/data/components/splitbutton.md +945 -0
  79. package/data/components/splitter.md +196 -0
  80. package/data/components/stepper.md +411 -0
  81. package/data/components/styleclass.md +126 -0
  82. package/data/components/table.md +4557 -0
  83. package/data/components/tabs.md +467 -0
  84. package/data/components/tag.md +200 -0
  85. package/data/components/terminal.md +118 -0
  86. package/data/components/textarea.md +416 -0
  87. package/data/components/tieredmenu.md +578 -0
  88. package/data/components/timeline.md +310 -0
  89. package/data/components/toast.md +596 -0
  90. package/data/components/togglebutton.md +356 -0
  91. package/data/components/toggleswitch.md +285 -0
  92. package/data/components/toolbar.md +182 -0
  93. package/data/components/tooltip.md +211 -0
  94. package/data/components/tree.md +746 -0
  95. package/data/components/treeselect.md +912 -0
  96. package/data/components/treetable.md +2814 -0
  97. package/data/components.json +43751 -0
  98. package/data/llms-full.txt +47433 -0
  99. package/data/llms.txt +121 -0
  100. package/data/manifest.json +46513 -0
  101. package/data/pages/accessibility.md +28 -0
  102. package/data/pages/animations.md +28 -0
  103. package/data/pages/configuration.md +210 -0
  104. package/data/pages/contribution.md +20 -0
  105. package/data/pages/customicons.md +20 -0
  106. package/data/pages/faq.md +20 -0
  107. package/data/pages/icons.md +66 -0
  108. package/data/pages/installation.md +71 -0
  109. package/data/pages/llms.md +61 -0
  110. package/data/pages/passthrough.md +32 -0
  111. package/data/pages/philosophy.md +28 -0
  112. package/data/pages/primeflex.md +20 -0
  113. package/data/pages/rtl.md +12 -0
  114. package/data/pages/styled.md +132 -0
  115. package/data/pages/tailwind.md +40 -0
  116. package/data/pages/unstyled.md +39 -0
  117. package/data/snapshot.json +9 -0
  118. package/dist/index.d.mts +448 -0
  119. package/dist/index.mjs +2501 -0
  120. package/dist/index.mjs.map +1 -0
  121. package/package.json +67 -3
@@ -0,0 +1,430 @@
1
+ # Angular FileUpload Component
2
+
3
+ FileUpload is an advanced uploader with dragdrop support, multi file uploads, auto uploading, progress tracking and validations.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader FileUpload uses a hidden native input element with type="file" for screen readers. Keyboard Support Interactive elements of the uploader are buttons, visit the Button accessibility section for more information.
8
+
9
+ ## Advanced
10
+
11
+ Advanced uploader provides dragdrop support, multi file uploads, auto uploading, progress tracking and validations.
12
+
13
+ ```typescript
14
+ import { Component, inject } from '@angular/core';
15
+ import { FileUploadModule } from '@exhaustive-ui/core/fileupload';
16
+ import { ToastModule } from '@exhaustive-ui/core/toast';
17
+ import { MessageService } from '@exhaustive-ui/core/api';
18
+
19
+ interface UploadEvent {
20
+ originalEvent: Event;
21
+ files: File[];
22
+ }
23
+
24
+ @Component({
25
+ template: `
26
+ <div class="card">
27
+ <p-toast />
28
+ <p-fileupload name="demo[]" url="https://exhaustive-ui.e-xiste.com/api/upload" (onUpload)="onUpload($event)" [multiple]="true" accept="image/*" maxFileSize="1000000" mode="advanced">
29
+ <ng-template #empty>
30
+ <div>Drag and drop files to here to upload.</div>
31
+ </ng-template>
32
+ </p-fileupload>
33
+ </div>
34
+ `,
35
+ standalone: true,
36
+ imports: [FileUploadModule, ToastModule],
37
+ providers: [MessageService]
38
+ })
39
+ export class FileuploadAdvancedDemo {
40
+ private messageService = inject(MessageService);
41
+ uploadedFiles: any[] = [];
42
+ }
43
+ ```
44
+
45
+ ## Auto
46
+
47
+ When auto property is enabled, a file gets uploaded instantly after selection.
48
+
49
+ ```typescript
50
+ import { Component, inject } from '@angular/core';
51
+ import { FileUploadModule } from '@exhaustive-ui/core/fileupload';
52
+ import { ToastModule } from '@exhaustive-ui/core/toast';
53
+ import { MessageService } from '@exhaustive-ui/core/api';
54
+
55
+ interface UploadEvent {
56
+ originalEvent: Event;
57
+ files: File[];
58
+ }
59
+
60
+ @Component({
61
+ template: `
62
+ <div class="card flex justify-center">
63
+ <p-toast />
64
+ <p-fileupload mode="basic" name="demo[]" chooseIcon="pi pi-upload" url="https://exhaustive-ui.e-xiste.com/api/upload" accept="image/*" maxFileSize="1000000" (onUpload)="onBasicUploadAuto($event)" [auto]="true" chooseLabel="Browse" />
65
+ </div>
66
+ `,
67
+ standalone: true,
68
+ imports: [FileUploadModule, ToastModule],
69
+ providers: [MessageService]
70
+ })
71
+ export class FileuploadAutoDemo {
72
+ private messageService = inject(MessageService);
73
+ }
74
+ ```
75
+
76
+ ## Basic
77
+
78
+ FileUpload basic mode provides a simpler UI as an alternative to default advanced mode.
79
+
80
+ ```typescript
81
+ import { Component, inject } from '@angular/core';
82
+ import { ButtonModule } from '@exhaustive-ui/core/button';
83
+ import { FileUploadModule } from '@exhaustive-ui/core/fileupload';
84
+ import { ToastModule } from '@exhaustive-ui/core/toast';
85
+ import { MessageService } from '@exhaustive-ui/core/api';
86
+
87
+ interface UploadEvent {
88
+ originalEvent: Event;
89
+ files: File[];
90
+ }
91
+
92
+ @Component({
93
+ template: `
94
+ <p-toast />
95
+ <div class="card flex flex-wrap gap-6 items-center justify-between">
96
+ <p-fileupload #fu mode="basic" chooseLabel="Choose" chooseIcon="pi pi-upload" name="demo[]" url="https://exhaustive-ui.e-xiste.com/api/upload" accept="image/*" maxFileSize="1000000" (onUpload)="onUpload($event)" />
97
+ <p-button label="Upload" (onClick)="fu.upload()" severity="secondary" />
98
+ </div>
99
+ `,
100
+ standalone: true,
101
+ imports: [ButtonModule, FileUploadModule, ToastModule],
102
+ providers: [MessageService]
103
+ })
104
+ export class FileuploadBasicDemo {
105
+ private messageService = inject(MessageService);
106
+ }
107
+ ```
108
+
109
+ ## custom-doc
110
+
111
+ FileUpload basic mode provides a simpler UI as an alternative to default advanced mode.
112
+
113
+ ```typescript
114
+ import { Component, inject } from '@angular/core';
115
+ import { FileUploadModule } from '@exhaustive-ui/core/fileupload';
116
+ import { ToastModule } from '@exhaustive-ui/core/toast';
117
+ import { MessageService } from '@exhaustive-ui/core/api';
118
+
119
+ @Component({
120
+ template: `
121
+ <div class="card flex justify-center">
122
+ <p-toast></p-toast>
123
+ <p-fileupload name="myfile[]" [customUpload]="true" (uploadHandler)="customUploader($event)"></p-fileupload>
124
+ </div>
125
+ `,
126
+ standalone: true,
127
+ imports: [FileUploadModule, ToastModule],
128
+ providers: [MessageService]
129
+ })
130
+ export class FileuploadCustomDemo {
131
+ private messageService = inject(MessageService);
132
+ }
133
+ ```
134
+
135
+ ## Template
136
+
137
+ ```typescript
138
+ import { Component, inject } from '@angular/core';
139
+ import { BadgeModule } from '@exhaustive-ui/core/badge';
140
+ import { ButtonModule } from '@exhaustive-ui/core/button';
141
+ import { FileUploadModule } from '@exhaustive-ui/core/fileupload';
142
+ import { ProgressBarModule } from '@exhaustive-ui/core/progressbar';
143
+ import { ToastModule } from '@exhaustive-ui/core/toast';
144
+ import { Exhaustive } from '@exhaustive-ui/core/config';
145
+ import { MessageService } from '@exhaustive-ui/core/api';
146
+
147
+ @Component({
148
+ template: `
149
+ <app-docsectiontext>
150
+ <p>
151
+ Uploader UI is customizable using a ng-template called <i>file</i> that gets the <a href="https://www.w3.org/TR/FileAPI/">File</a> instance as the implicit variable. Second ng-template named <i>content</i> can be used to place custom
152
+ content inside the content section which would be useful to implement a user interface to manage the uploaded files such as removing them. This template gets the selected files as the implicit variable. Third and final ng-template
153
+ option is <i>toolbar</i> to display custom content at toolbar.
154
+ </p></app-docsectiontext
155
+ >
156
+ <div class="card">
157
+ <p-toast />
158
+ <p-fileupload name="myfile[]" url="https://exhaustive-ui.e-xiste.com/api/upload" [multiple]="true" accept="image/*" maxFileSize="1000000" (onUpload)="onTemplatedUpload()" (onSelect)="onSelectedFiles($event)">
159
+ <ng-template #header let-files let-chooseCallback="chooseCallback" let-clearCallback="clearCallback" let-uploadCallback="uploadCallback">
160
+ <div class="flex flex-wrap justify-between items-center flex-1 gap-4">
161
+ <div class="flex gap-2">
162
+ <p-button (onClick)="choose($event, chooseCallback)" icon="pi pi-images" [rounded]="true" [outlined]="true" />
163
+ <p-button (onClick)="uploadEvent(uploadCallback)" icon="pi pi-cloud-upload" [rounded]="true" [outlined]="true" severity="success" [disabled]="!files || files.length === 0" />
164
+ <p-button (onClick)="clearCallback()" icon="pi pi-times" [rounded]="true" [outlined]="true" severity="danger" [disabled]="!files || files.length === 0" />
165
+ </div>
166
+ <p-progressbar [value]="totalSizePercent" [showValue]="false" class="w-full" class="md:w-20rem h-1 w-full md:ml-auto">
167
+ <span class="whitespace-nowrap">{{ totalSize }}B / 1Mb</span>
168
+ </p-progressbar>
169
+ </div>
170
+ </ng-template>
171
+ <ng-template #content let-files let-uploadedFiles="uploadedFiles" let-removeFileCallback="removeFileCallback" let-removeUploadedFileCallback="removeUploadedFileCallback">
172
+ <div class="flex flex-col gap-8 pt-4">
173
+ <div *ngIf="files?.length > 0">
174
+ <h5>Pending</h5>
175
+ <div class="flex flex-wrap gap-4">
176
+ <div *ngFor="let file of files; let i = index" class="p-8 rounded-border flex flex-col border border-surface items-center gap-4">
177
+ <div>
178
+ <img role="presentation" [alt]="file.name" [src]="file.objectURL" width="100" height="50" />
179
+ </div>
180
+ <span class="font-semibold text-ellipsis max-w-60 whitespace-nowrap overflow-hidden">{{ file.name }}</span>
181
+ <div>{{ formatSize(file.size) }}</div>
182
+ <p-badge value="Pending" severity="warn" />
183
+ <p-button icon="pi pi-times" (click)="onRemoveTemplatingFile($event, file, removeFileCallback, index)" [outlined]="true" [rounded]="true" severity="danger" />
184
+ </div>
185
+ </div>
186
+ </div>
187
+ <div *ngIf="uploadedFiles?.length > 0">
188
+ <h5>Completed</h5>
189
+ <div class="flex flex-wrap gap-4">
190
+ <div *ngFor="let file of uploadedFiles; let i = index" class="card m-0 px-12 flex flex-col border border-surface items-center gap-4">
191
+ <div>
192
+ <img role="presentation" [alt]="file.name" [src]="file.objectURL" width="100" height="50" />
193
+ </div>
194
+ <span class="font-semibold text-ellipsis max-w-60 whitespace-nowrap overflow-hidden">{{ file.name }}</span>
195
+ <div>{{ formatSize(file.size) }}</div>
196
+ <p-badge value="Completed" class="mt-4" severity="success" />
197
+ <p-button icon="pi pi-times" (onClick)="removeUploadedFileCallback(index)" [outlined]="true" [rounded]="true" severity="danger" />
198
+ </div>
199
+ </div>
200
+ </div>
201
+ </div>
202
+ </ng-template>
203
+ <ng-template #file></ng-template>
204
+ <ng-template #empty>
205
+ <div class="flex items-center justify-center flex-col">
206
+ <i class="pi pi-cloud-upload !border-2 !rounded-full !p-8 !text-4xl !text-muted-color"></i>
207
+ <p class="mt-6 mb-0">Drag and drop files to here to upload.</p>
208
+ </div>
209
+ </ng-template>
210
+ </p-fileupload>
211
+ </div>
212
+ `,
213
+ standalone: true,
214
+ imports: [BadgeModule, ButtonModule, FileUploadModule, ProgressBarModule, ToastModule],
215
+ providers: [MessageService]
216
+ })
217
+ export class FileuploadTemplateDemo {
218
+ private messageService = inject(MessageService);
219
+ files: any[] = [];
220
+ totalSize: number = 0;
221
+ totalSizePercent: number = 0;
222
+
223
+ onRemoveTemplatingFile(event, file, removeFileCallback, index) {
224
+ removeFileCallback(event, index);
225
+ this.totalSize -= parseInt(this.formatSize(file.size));
226
+ this.totalSizePercent = this.totalSize / 10;
227
+ }
228
+
229
+ onClearTemplatingUpload(clear) {
230
+ clear();
231
+ this.totalSize = 0;
232
+ this.totalSizePercent = 0;
233
+ }
234
+
235
+ onTemplatedUpload() {
236
+ this.messageService.add({ severity: 'info', summary: 'Success', detail: 'File Uploaded', life: 3000 });
237
+ }
238
+
239
+ onSelectedFiles(event) {
240
+ this.files = event.currentFiles;
241
+ this.files.forEach((file) => {
242
+ this.totalSize += parseInt(this.formatSize(file.size));
243
+ });
244
+ this.totalSizePercent = this.totalSize / 10;
245
+ }
246
+
247
+ uploadEvent(callback) {
248
+ callback();
249
+ }
250
+
251
+ formatSize(bytes) {
252
+ const k = 1024;
253
+ const dm = 3;
254
+ const sizes = this.config.translation.fileSizeTypes;
255
+ if (bytes === 0) {
256
+ return `0 ${sizes[0]}`;
257
+ }
258
+
259
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
260
+ const formattedSize = parseFloat((bytes / Math.pow(k, i)).toFixed(dm));
261
+
262
+ return `${formattedSize} ${sizes[i]}`;
263
+ }
264
+ }
265
+ ```
266
+
267
+ ## File Upload
268
+
269
+ FileUpload is an advanced uploader with dragdrop support, multi file uploads, auto uploading, progress tracking and validations.
270
+
271
+ ### Props
272
+
273
+ | Name | Type | Default | Description |
274
+ |------|------|---------|-------------|
275
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
276
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
277
+ | pt | InputSignal<FileUploadPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
278
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
279
+ | name | InputSignal<string> | ... | Name of the request parameter to identify the files at backend. |
280
+ | url | InputSignal<string> | ... | Remote url to upload the files. |
281
+ | method | InputSignal<"post" \| "put"> | ... | HTTP method to send the files to the url such as "post" and "put". |
282
+ | multiple | InputSignalWithTransform<boolean, unknown> | ... | Used to select multiple files at once from file dialog. |
283
+ | accept | InputSignal<string> | ... | Comma-separated list of pattern to restrict the allowed file types. Can be any combination of either the MIME types (such as "image/*") or the file extensions (such as ".jpg"). |
284
+ | disabled | InputSignalWithTransform<boolean, unknown> | ... | Disables the upload functionality. |
285
+ | auto | InputSignalWithTransform<boolean, unknown> | ... | When enabled, upload begins automatically after selection is completed. |
286
+ | withCredentials | InputSignalWithTransform<boolean, unknown> | ... | Cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. |
287
+ | maxFileSize | InputSignalWithTransform<number, unknown> | ... | Maximum file size allowed in bytes. |
288
+ | invalidFileSizeMessageSummary | InputSignal<string> | ... | Summary message of the invalid file size. |
289
+ | invalidFileSizeMessageDetail | InputSignal<string> | ... | Detail message of the invalid file size. |
290
+ | invalidFileTypeMessageSummary | InputSignal<string> | ... | Summary message of the invalid file type. |
291
+ | invalidFileTypeMessageDetail | InputSignal<string> | ... | Detail message of the invalid file type. |
292
+ | invalidFileLimitMessageDetail | InputSignal<string> | ... | Detail message of the invalid file type. |
293
+ | invalidFileLimitMessageSummary | InputSignal<string> | ... | Summary message of the invalid file type. |
294
+ | style | InputSignal<{ [klass: string]: any }> | ... | Inline style of the element. |
295
+ | styleClass | InputSignal<string> | ... | Class of the element. |
296
+ | previewWidth | InputSignalWithTransform<number, unknown> | ... | Width of the image thumbnail in pixels. |
297
+ | chooseLabel | InputSignal<string> | ... | Label of the choose button. Defaults to Exhaustive Locale configuration. |
298
+ | uploadLabel | InputSignal<string> | ... | Label of the upload button. Defaults to Exhaustive Locale configuration. |
299
+ | cancelLabel | InputSignal<string> | ... | Label of the cancel button. Defaults to Exhaustive Locale configuration. |
300
+ | chooseIcon | InputSignal<string> | ... | Icon of the choose button. |
301
+ | uploadIcon | InputSignal<string> | ... | Icon of the upload button. |
302
+ | cancelIcon | InputSignal<string> | ... | Icon of the cancel button. |
303
+ | showUploadButton | InputSignalWithTransform<boolean, unknown> | ... | Whether to show the upload button. |
304
+ | showCancelButton | InputSignalWithTransform<boolean, unknown> | ... | Whether to show the cancel button. |
305
+ | mode | InputSignal<"basic" \| "advanced"> | ... | Defines the UI of the component. |
306
+ | headers | InputSignal<HttpHeaders> | ... | HttpHeaders class represents the header configuration options for an HTTP request. |
307
+ | customUpload | InputSignalWithTransform<boolean, unknown> | ... | Whether to use the default upload or a manual implementation defined in uploadHandler callback. Defaults to Exhaustive Locale configuration. |
308
+ | fileLimit | InputSignalWithTransform<number, unknown> | ... | Maximum number of files that can be uploaded. |
309
+ | uploadStyleClass | InputSignal<string> | ... | Style class of the upload button. |
310
+ | cancelStyleClass | InputSignal<string> | ... | Style class of the cancel button. |
311
+ | chooseStyleClass | InputSignal<string> | ... | Style class of the choose button. |
312
+ | chooseButtonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the choose button inside the component. |
313
+ | uploadButtonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the upload button inside the component. |
314
+ | cancelButtonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the cancel button inside the component. |
315
+
316
+ ### Emits
317
+
318
+ | Name | Parameters | Description |
319
+ |------|------------|-------------|
320
+ | onBeforeUpload | event: FileBeforeUploadEvent | Callback to invoke before file upload is initialized. |
321
+ | onSend | event: FileSendEvent | An event indicating that the request was sent to the server. Useful when a request may be retried multiple times, to distinguish between retries on the final event stream. |
322
+ | onUpload | event: FileUploadEvent | Callback to invoke when file upload is complete. |
323
+ | onError | event: FileUploadErrorEvent | Callback to invoke if file upload fails. |
324
+ | onClear | event: Event | Callback to invoke when files in queue are removed without uploading using clear all button. |
325
+ | onRemove | event: FileRemoveEvent | Callback to invoke when a file is removed without uploading using clear button of a file. |
326
+ | onSelect | event: FileSelectEvent | Callback to invoke when files are selected. |
327
+ | onProgress | event: FileProgressEvent | Callback to invoke when files are being uploaded. |
328
+ | uploadHandler | event: FileUploadHandlerEvent | Callback to invoke in custom upload mode to upload the files manually. |
329
+ | onImageError | event: Event | This event is triggered if an error occurs while loading an image file. |
330
+ | onRemoveUploadedFile | event: RemoveUploadedFileEvent | This event is triggered if an error occurs while loading an image file. |
331
+
332
+ ### Templates
333
+
334
+ | Name | Type | Description |
335
+ |------|------|-------------|
336
+ | file | TemplateRef<void> | Custom file template. |
337
+ | header | TemplateRef<FileUploadHeaderTemplateContext> | Custom header template. |
338
+ | content | TemplateRef<FileUploadContentTemplateContext> | Custom content template. |
339
+ | toolbar | TemplateRef<void> | Custom toolbar template. |
340
+ | chooseicon | TemplateRef<void> | Custom choose icon template. |
341
+ | filelabel | TemplateRef<FileUploadFileLabelTemplateContext> | Custom file label template. |
342
+ | uploadicon | TemplateRef<void> | Custom upload icon template. |
343
+ | cancelicon | TemplateRef<void> | Custom cancel icon template. |
344
+ | empty | TemplateRef<void> | Custom empty state template. |
345
+
346
+ ### Methods
347
+
348
+ | Name | Parameters | Return Type | Description |
349
+ |------|------------|-------------|-------------|
350
+ | uploader | | void | Uploads the selected files. |
351
+ | clear | | void | Clears the files list. |
352
+ | remove | event: Event, index: number | void | Removes a single file. |
353
+ | removeUploadedFile | index: number | void | Removes uploaded file. |
354
+
355
+ ## Pass Through Options
356
+
357
+ | Name | Type | Description |
358
+ |------|------|-------------|
359
+ | host | PassThroughOption<HTMLElement, I> | Used to pass attributes to the host's DOM element. |
360
+ | root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
361
+ | input | PassThroughOption<HTMLInputElement, I> | Used to pass attributes to the input's DOM element. |
362
+ | header | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the header's DOM element. |
363
+ | pcChooseButton | ButtonPassThrough | Used to pass attributes to the choose button component. |
364
+ | pcUploadButton | ButtonPassThrough | Used to pass attributes to the upload button component. |
365
+ | pcCancelButton | ButtonPassThrough | Used to pass attributes to the cancel button component. |
366
+ | content | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the content's DOM element. |
367
+ | pcProgressBar | ProgressBarPassThrough | Used to pass attributes to the progress bar component. |
368
+ | pcMessage | MessagePassThrough | Used to pass attributes to the message component. |
369
+ | fileList | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the file list's DOM element. |
370
+ | file | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the file's DOM element. |
371
+ | fileThumbnail | PassThroughOption<HTMLImageElement, I> | Used to pass attributes to the file thumbnail's DOM element. |
372
+ | fileInfo | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the file info's DOM element. |
373
+ | fileName | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the file name's DOM element. |
374
+ | fileSize | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the file size's DOM element. |
375
+ | pcFileBadge | BadgePassThrough | Used to pass attributes to the file badge component. |
376
+ | fileActions | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the file actions's DOM element. |
377
+ | pcFileRemoveButton | ButtonPassThrough | Used to pass attributes to the file remove button component. |
378
+ | basicContent | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the basic content's DOM element. |
379
+ | empty | PassThroughOption<HTMLElement, I> | Used to pass attributes to the empty's DOM element. |
380
+
381
+ ## Theming
382
+
383
+ ### CSS Classes
384
+
385
+ | Class | Description |
386
+ |-------|-------------|
387
+ | p-fileupload | Class name of the root element |
388
+ | p-fileupload-header | Class name of the header element |
389
+ | p-fileupload-choose-button | Class name of the choose button element |
390
+ | p-fileupload-upload-button | Class name of the upload button element |
391
+ | p-fileupload-cancel-button | Class name of the cancel button element |
392
+ | p-fileupload-content | Class name of the content element |
393
+ | p-fileupload-file-list | Class name of the file list element |
394
+ | p-fileupload-file | Class name of the file element |
395
+ | p-fileupload-file-thumbnail | Class name of the file thumbnail element |
396
+ | p-fileupload-file-info | Class name of the file info element |
397
+ | p-fileupload-file-name | Class name of the file name element |
398
+ | p-fileupload-file-size | Class name of the file size element |
399
+ | p-fileupload-file-badge | Class name of the file badge element |
400
+ | p-fileupload-file-actions | Class name of the file actions element |
401
+ | p-fileupload-file-remove-button | Class name of the file remove button element |
402
+ | p-fileupload-basic-content | Class name of the content in basic mode |
403
+
404
+ ### Design Tokens
405
+
406
+ | Token | CSS Variable | Description |
407
+ |-------|--------------|-------------|
408
+ | fileupload.background | --p-fileupload-background | Background of root |
409
+ | fileupload.border.color | --p-fileupload-border-color | Border color of root |
410
+ | fileupload.color | --p-fileupload-color | Color of root |
411
+ | fileupload.border.radius | --p-fileupload-border-radius | Border radius of root |
412
+ | fileupload.transition.duration | --p-fileupload-transition-duration | Transition duration of root |
413
+ | fileupload.header.background | --p-fileupload-header-background | Background of header |
414
+ | fileupload.header.color | --p-fileupload-header-color | Color of header |
415
+ | fileupload.header.padding | --p-fileupload-header-padding | Padding of header |
416
+ | fileupload.header.border.color | --p-fileupload-header-border-color | Border color of header |
417
+ | fileupload.header.border.width | --p-fileupload-header-border-width | Border width of header |
418
+ | fileupload.header.border.radius | --p-fileupload-header-border-radius | Border radius of header |
419
+ | fileupload.header.gap | --p-fileupload-header-gap | Gap of header |
420
+ | fileupload.content.highlight.border.color | --p-fileupload-content-highlight-border-color | Highlight border color of content |
421
+ | fileupload.content.padding | --p-fileupload-content-padding | Padding of content |
422
+ | fileupload.content.gap | --p-fileupload-content-gap | Gap of content |
423
+ | fileupload.file.padding | --p-fileupload-file-padding | Padding of file |
424
+ | fileupload.file.gap | --p-fileupload-file-gap | Gap of file |
425
+ | fileupload.file.border.color | --p-fileupload-file-border-color | Border color of file |
426
+ | fileupload.file.info.gap | --p-fileupload-file-info-gap | Info gap of file |
427
+ | fileupload.file.list.gap | --p-fileupload-file-list-gap | Gap of file list |
428
+ | fileupload.progressbar.height | --p-fileupload-progressbar-height | Height of progressbar |
429
+ | fileupload.basic.gap | --p-fileupload-basic-gap | Gap of basic |
430
+
@@ -0,0 +1,155 @@
1
+ # Angular Float Label Component
2
+
3
+ FloatLabel appears on top of the input field when focused.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader FloatLabel does not require any roles and attributes. Keyboard Support Component does not include any interactive elements.
8
+
9
+ ## Basic
10
+
11
+ FloatLabel is used by wrapping the input and its label.
12
+
13
+ ```typescript
14
+ import { Component } from '@angular/core';
15
+ import { FormsModule } from '@angular/forms';
16
+ import { FloatLabelModule } from '@exhaustive-ui/core/floatlabel';
17
+ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
18
+
19
+ @Component({
20
+ template: `
21
+ <div class="card flex justify-center">
22
+ <p-floatlabel>
23
+ <input id="username" pInputText [(ngModel)]="value" autocomplete="off" />
24
+ <label for="username">Username</label>
25
+ </p-floatlabel>
26
+ </div>
27
+ `,
28
+ standalone: true,
29
+ imports: [FloatLabelModule, InputTextModule, FormsModule]
30
+ })
31
+ export class FloatlabelBasicDemo {
32
+ value: string | undefined;
33
+ }
34
+ ```
35
+
36
+ ## Invalid
37
+
38
+ When the form element is invalid, the label is also highlighted.
39
+
40
+ ```typescript
41
+ import { Component } from '@angular/core';
42
+ import { FormsModule } from '@angular/forms';
43
+ import { FloatLabelModule } from '@exhaustive-ui/core/floatlabel';
44
+ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
45
+
46
+ @Component({
47
+ template: `
48
+ <div class="card flex flex-wrap justify-center items-end gap-4">
49
+ <p-floatlabel>
50
+ <input pInputText id="value1" [(ngModel)]="value1" [invalid]="!value1" autocomplete="off" />
51
+ <label for="value1">Username</label>
52
+ </p-floatlabel>
53
+ <p-floatlabel variant="in">
54
+ <input pInputText id="value2" [(ngModel)]="value2" [invalid]="!value2" autocomplete="off" />
55
+ <label for="value2">Username</label>
56
+ </p-floatlabel>
57
+ <p-floatlabel variant="on">
58
+ <input pInputText id="value3" [(ngModel)]="value3" [invalid]="!value3" autocomplete="off" />
59
+ <label for="value3">Username</label>
60
+ </p-floatlabel>
61
+ </div>
62
+ `,
63
+ standalone: true,
64
+ imports: [FloatLabelModule, InputTextModule, FormsModule]
65
+ })
66
+ export class FloatlabelInvalidDemo {
67
+ value1: string | undefined;
68
+ value2: string | undefined;
69
+ value3: string | undefined;
70
+ }
71
+ ```
72
+
73
+ ## Variants
74
+
75
+ The variant property defines the position of the label. Default value is over , whereas in and on are the alternatives.
76
+
77
+ ```typescript
78
+ import { Component } from '@angular/core';
79
+ import { FormsModule } from '@angular/forms';
80
+ import { FloatLabelModule } from '@exhaustive-ui/core/floatlabel';
81
+ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
82
+
83
+ @Component({
84
+ template: `
85
+ <div class="card flex flex-wrap justify-center items-end gap-4">
86
+ <p-floatlabel variant="in">
87
+ <input pInputText id="in_label" [(ngModel)]="value1" autocomplete="off" />
88
+ <label for="in_label">In Label</label>
89
+ </p-floatlabel>
90
+ <p-floatlabel variant="on">
91
+ <input pInputText id="on_label" [(ngModel)]="value2" autocomplete="off" />
92
+ <label for="on_label">On Label</label>
93
+ </p-floatlabel>
94
+ </div>
95
+ `,
96
+ standalone: true,
97
+ imports: [FloatLabelModule, InputTextModule, FormsModule]
98
+ })
99
+ export class FloatlabelVariantsDemo {
100
+ value1: string | undefined;
101
+ value2: string | undefined;
102
+ }
103
+ ```
104
+
105
+ ## Float Label
106
+
107
+ FloatLabel appears on top of the input field when focused.
108
+
109
+ ### Props
110
+
111
+ | Name | Type | Default | Description |
112
+ |------|------|---------|-------------|
113
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
114
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
115
+ | pt | InputSignal<FloatLabelPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
116
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
117
+ | variant | InputSignal<"in" \| "on" \| "over"> | ... | Defines the positioning of the label relative to the input. |
118
+
119
+ ## Pass Through Options
120
+
121
+ | Name | Type | Description |
122
+ |------|------|-------------|
123
+ | host | PassThroughOption<HTMLElement, I> | Used to pass attributes to the host's DOM element. |
124
+ | root | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the root's DOM element. |
125
+
126
+ ## Theming
127
+
128
+ ### CSS Classes
129
+
130
+ | Class | Description |
131
+ |-------|-------------|
132
+ | p-floatlabel | Class name of the root element |
133
+
134
+ ### Design Tokens
135
+
136
+ | Token | CSS Variable | Description |
137
+ |-------|--------------|-------------|
138
+ | floatlabel.color | --p-floatlabel-color | Color of root |
139
+ | floatlabel.focus.color | --p-floatlabel-focus-color | Focus color of root |
140
+ | floatlabel.active.color | --p-floatlabel-active-color | Active color of root |
141
+ | floatlabel.invalid.color | --p-floatlabel-invalid-color | Invalid color of root |
142
+ | floatlabel.transition.duration | --p-floatlabel-transition-duration | Transition duration of root |
143
+ | floatlabel.position.x | --p-floatlabel-position-x | Position x of root |
144
+ | floatlabel.position.y | --p-floatlabel-position-y | Position y of root |
145
+ | floatlabel.font.weight | --p-floatlabel-font-weight | Font weight of root |
146
+ | floatlabel.active.font.size | --p-floatlabel-active-font-size | Active font size of root |
147
+ | floatlabel.active.font.weight | --p-floatlabel-active-font-weight | Active font weight of root |
148
+ | floatlabel.over.active.top | --p-floatlabel-over-active-top | Active top of over |
149
+ | floatlabel.in.input.padding.top | --p-floatlabel-in-input-padding-top | Input padding top of in |
150
+ | floatlabel.in.input.padding.bottom | --p-floatlabel-in-input-padding-bottom | Input padding bottom of in |
151
+ | floatlabel.in.active.top | --p-floatlabel-in-active-top | Active top of in |
152
+ | floatlabel.on.border.radius | --p-floatlabel-on-border-radius | Border radius of on |
153
+ | floatlabel.on.active.background | --p-floatlabel-on-active-background | Active background of on |
154
+ | floatlabel.on.active.padding | --p-floatlabel-on-active-padding | Active padding of on |
155
+
@@ -0,0 +1,72 @@
1
+ # Angular Fluid Component
2
+
3
+ Fluid is a layout component to make descendant components span full width of their container.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader Fluid does not require any roles and attributes. Keyboard Support Component does not include any interactive elements.
8
+
9
+ ## Basic
10
+
11
+ Components with the fluid option like InputText have the ability to span the full width of their component. Enabling the fluid for each component individually may be cumbersome so wrap the content with Fluid to instead for an easier alternative. Any component that has the fluid property can be nested inside the Fluid component. The fluid property of a child component has higher precedence than the fluid container as shown in the last sample.
12
+
13
+ ```typescript
14
+ import { Component } from '@angular/core';
15
+ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
16
+
17
+ @Component({
18
+ template: `
19
+ <div class="card flex flex-col gap-6">
20
+ <div>
21
+ <label for="non-fluid" class="font-bold mb-2 block">Non-Fluid</label>
22
+ <input type="text" pInputText id="non-fluid" />
23
+ </div>
24
+ <div>
25
+ <label for="fluid" class="font-bold mb-2 block">Fluid Prop</label>
26
+ <input type="text" pInputText id="fluid" fluid />
27
+ </div>
28
+ <p-fluid>
29
+ <span class="font-bold mb-2 block">Fluid Container</span>
30
+ <div class="grid grid-cols-2 gap-4">
31
+ <div><input type="text" pInputText /></div>
32
+ <div><input type="text" pInputText /></div>
33
+ <div class="col-span-full"><input type="text" pInputText /></div>
34
+ <div><input type="text" pInputText [fluid]="false" placeholder="Non-Fluid" /></div>
35
+ </div>
36
+ </p-fluid>
37
+ </div>
38
+ `,
39
+ standalone: true,
40
+ imports: [InputTextModule]
41
+ })
42
+ export class FluidBasicDemo {}
43
+ ```
44
+
45
+ ## Fluid
46
+
47
+ Fluid is a layout component to make descendant components span full width of their container.
48
+
49
+ ### Props
50
+
51
+ | Name | Type | Default | Description |
52
+ |------|------|---------|-------------|
53
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
54
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
55
+ | pt | InputSignal<FluidPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
56
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
57
+
58
+ ## Pass Through Options
59
+
60
+ | Name | Type | Description |
61
+ |------|------|-------------|
62
+ | host | PassThroughOption<HTMLElement, I> | Used to pass attributes to the host's DOM element. |
63
+ | root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
64
+
65
+ ## Theming
66
+
67
+ ### CSS Classes
68
+
69
+ | Class | Description |
70
+ |-------|-------------|
71
+ | p-fluid | Class name of the root element |
72
+