@exhaustive-ui/mcp 22.4.0 → 22.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -1
- package/data/cards/accordion.md +88 -0
- package/data/cards/animateonscroll.md +152 -0
- package/data/cards/autocomplete.md +104 -0
- package/data/cards/autofocus.md +34 -0
- package/data/cards/avatar.md +43 -0
- package/data/cards/badge.md +43 -0
- package/data/cards/blockui.md +51 -0
- package/data/cards/breadcrumb.md +54 -0
- package/data/cards/button.md +77 -0
- package/data/cards/card.md +48 -0
- package/data/cards/carousel.md +99 -0
- package/data/cards/cascadeselect.md +81 -0
- package/data/cards/chart.md +103 -0
- package/data/cards/checkbox.md +58 -0
- package/data/cards/chip.md +49 -0
- package/data/cards/classnames.md +73 -0
- package/data/cards/colorpicker.md +51 -0
- package/data/cards/confirmdialog.md +89 -0
- package/data/cards/confirmpopup.md +74 -0
- package/data/cards/contextmenu.md +66 -0
- package/data/cards/dataview.md +115 -0
- package/data/cards/datepicker.md +102 -0
- package/data/cards/dialog.md +89 -0
- package/data/cards/divider.md +54 -0
- package/data/cards/dock.md +85 -0
- package/data/cards/dragdrop.md +102 -0
- package/data/cards/drawer.md +62 -0
- package/data/cards/dynamicdialog.md +76 -0
- package/data/cards/editor.md +55 -0
- package/data/cards/fieldset.md +53 -0
- package/data/cards/fileinput.md +72 -0
- package/data/cards/fileupload.md +89 -0
- package/data/cards/floatlabel.md +41 -0
- package/data/cards/fluid.md +47 -0
- package/data/cards/focustrap.md +60 -0
- package/data/cards/galleria.md +101 -0
- package/data/cards/iconfield.md +44 -0
- package/data/cards/iftalabel.md +38 -0
- package/data/cards/image.md +56 -0
- package/data/cards/imagecompare.md +44 -0
- package/data/cards/inplace.md +55 -0
- package/data/cards/inputgroup.md +66 -0
- package/data/cards/inputmask.md +71 -0
- package/data/cards/inputnumber.md +77 -0
- package/data/cards/inputotp.md +60 -0
- package/data/cards/inputtext.md +41 -0
- package/data/cards/keyfilter.md +48 -0
- package/data/cards/knob.md +54 -0
- package/data/cards/listbox.md +103 -0
- package/data/cards/megamenu.md +97 -0
- package/data/cards/menu.md +68 -0
- package/data/cards/menubar.md +106 -0
- package/data/cards/message.md +50 -0
- package/data/cards/metergroup.md +57 -0
- package/data/cards/multiselect.md +119 -0
- package/data/cards/orderlist.md +94 -0
- package/data/cards/organizationchart.md +57 -0
- package/data/cards/overlay.md +62 -0
- package/data/cards/paginator.md +61 -0
- package/data/cards/panel.md +56 -0
- package/data/cards/panelmenu.md +103 -0
- package/data/cards/password.md +78 -0
- package/data/cards/picklist.md +102 -0
- package/data/cards/popover.md +52 -0
- package/data/cards/progressbar.md +41 -0
- package/data/cards/progressspinner.md +37 -0
- package/data/cards/radiobutton.md +51 -0
- package/data/cards/rating.md +56 -0
- package/data/cards/ripple.md +36 -0
- package/data/cards/scroller.md +32 -0
- package/data/cards/scrollpanel.md +49 -0
- package/data/cards/scrolltop.md +46 -0
- package/data/cards/select.md +107 -0
- package/data/cards/selectbutton.md +60 -0
- package/data/cards/skeleton.md +53 -0
- package/data/cards/slider.md +51 -0
- package/data/cards/speeddial.md +99 -0
- package/data/cards/splitbutton.md +93 -0
- package/data/cards/splitter.md +51 -0
- package/data/cards/stepper.md +120 -0
- package/data/cards/styleclass.md +44 -0
- package/data/cards/table.md +270 -0
- package/data/cards/tabs.md +96 -0
- package/data/cards/tag.md +40 -0
- package/data/cards/terminal.md +67 -0
- package/data/cards/textarea.md +44 -0
- package/data/cards/tieredmenu.md +126 -0
- package/data/cards/timeline.md +58 -0
- package/data/cards/toast.md +59 -0
- package/data/cards/togglebutton.md +59 -0
- package/data/cards/toggleswitch.md +51 -0
- package/data/cards/toolbar.md +74 -0
- package/data/cards/tooltip.md +42 -0
- package/data/cards/tree.md +96 -0
- package/data/cards/treeselect.md +99 -0
- package/data/cards/treetable.md +210 -0
- package/data/components/checkbox.md +0 -24
- package/data/components/dock.md +2 -2
- package/data/components/galleria.md +7 -7
- package/data/components/inputnumber.md +2 -2
- package/data/components/llms.md +4 -0
- package/data/components/password.md +3 -3
- package/data/components/picklist.md +1 -1
- package/data/components/table.md +1 -1
- package/data/components.json +26 -22
- package/data/llms-full.txt +49 -42
- package/data/llms.txt +100 -96
- package/data/manifest.json +30 -1
- package/data/pages/llms.md +29 -0
- package/data/snapshot.json +2 -2
- package/dist/index.d.mts +35 -2
- package/dist/index.mjs +1393 -1077
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Dock
|
|
2
|
+
|
|
3
|
+
Dock is a navigation component consisting of menuitems.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { Dock } from '@exhaustive-ui/core/dock'; // standalone; or DockModule for all its parts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## `p-dock`: Dock
|
|
10
|
+
|
|
11
|
+
Inputs:
|
|
12
|
+
- `model`: `MenuItem[] | null | undefined`: MenuModel instance to define the action items.
|
|
13
|
+
- `position`: `"top" | "bottom" | "left" | "right"` = `'bottom'`: Position of element.
|
|
14
|
+
- Other inputs: `ariaLabel`, `ariaLabelledBy`, `breakpoint`, `id`.
|
|
15
|
+
|
|
16
|
+
Outputs:
|
|
17
|
+
- `(onBlur)`: `FocusEvent`
|
|
18
|
+
- `(onFocus)`: `FocusEvent`
|
|
19
|
+
|
|
20
|
+
Templates (`<ng-template #name let-…>` inside the element):
|
|
21
|
+
- `#item`: context { $implicit: MenuItem }. Custom item template.
|
|
22
|
+
|
|
23
|
+
Read a context with `let-`: `<ng-template #item let-item>` (`$implicit` is the bare `let-x`).
|
|
24
|
+
|
|
25
|
+
## Example: Basic
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { Component, OnInit } from '@angular/core';
|
|
29
|
+
import { FormsModule } from '@angular/forms';
|
|
30
|
+
import { DockModule } from '@exhaustive-ui/core/dock';
|
|
31
|
+
import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
32
|
+
import { TooltipModule } from '@exhaustive-ui/core/tooltip';
|
|
33
|
+
import { MenuItem } from '@exhaustive-ui/core/api';
|
|
34
|
+
|
|
35
|
+
@Component({
|
|
36
|
+
template: `
|
|
37
|
+
<div class="card">
|
|
38
|
+
<div class="flex flex-wrap gap-4 mb-8">
|
|
39
|
+
<div *ngFor="let pos of positionOptions" class="flex items-center">
|
|
40
|
+
<p-radio-button name="dock" [value]="pos.value" [(ngModel)]="position" [inputId]="pos.label" />
|
|
41
|
+
<label [for]="pos.label" class="ml-2"> {{ pos.label }} </label>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="dock-window">
|
|
45
|
+
<p-dock [model]="items" [position]="position">
|
|
46
|
+
<ng-template #item let-item>
|
|
47
|
+
<img [pTooltip]="item.label" tooltipPosition="top" [src]="item.icon" [alt]="item.label" width="100%" />
|
|
48
|
+
</ng-template>
|
|
49
|
+
</p-dock>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
`,
|
|
53
|
+
standalone: true,
|
|
54
|
+
imports: [DockModule, RadioButtonModule, TooltipModule, FormsModule]
|
|
55
|
+
})
|
|
56
|
+
export class DockBasicDemo implements OnInit {
|
|
57
|
+
items: MenuItem[] | undefined;
|
|
58
|
+
positionOptions: any[];
|
|
59
|
+
|
|
60
|
+
ngOnInit() {
|
|
61
|
+
this.items = [
|
|
62
|
+
{
|
|
63
|
+
label: 'Finder',
|
|
64
|
+
icon: 'https://exhaustive-ui.com/demo/dock/finder.svg'
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: 'App Store',
|
|
68
|
+
icon: 'https://exhaustive-ui.com/demo/dock/appstore.svg'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: 'Photos',
|
|
72
|
+
icon: 'https://exhaustive-ui.com/demo/dock/photos.svg'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: 'Trash',
|
|
76
|
+
icon: 'https://exhaustive-ui.com/demo/dock/trash.png'
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
|
|
84
|
+
|
|
85
|
+
Full documentation (every input, pass through, styling, all examples): https://exhaustive-ui.com/llms/components/dock.md
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Drag and Drop
|
|
2
|
+
|
|
3
|
+
pDraggable directive apply draggable behavior to any element.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { Draggable } from '@exhaustive-ui/core/dragdrop'; // standalone; or DragDropModule for all its parts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## `[pDraggable]`: Draggable
|
|
10
|
+
|
|
11
|
+
Inputs:
|
|
12
|
+
- `dragHandle`: `string | undefined`: Selector to define the drag handle, by default anywhere on the target element is a drag handle to start dragging.
|
|
13
|
+
- `pDraggable`: `string | undefined`:
|
|
14
|
+
- Other inputs: `dragEffect`, `pDraggableDisabled`.
|
|
15
|
+
|
|
16
|
+
Outputs:
|
|
17
|
+
- `(onDrag)`: `DragEvent`
|
|
18
|
+
- `(onDragEnd)`: `DragEvent`
|
|
19
|
+
- `(onDragStart)`: `DragEvent`
|
|
20
|
+
|
|
21
|
+
### `[pDroppable]`: Droppable
|
|
22
|
+
|
|
23
|
+
pDroppable directive apply droppable behavior to any element.
|
|
24
|
+
|
|
25
|
+
- Inputs: `dropEffect`, `pDroppable`, `pDroppableDisabled`.
|
|
26
|
+
- Outputs: `(onDragEnter)`, `(onDragLeave)`, `(onDrop)`.
|
|
27
|
+
|
|
28
|
+
## Example: Basic
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { Component, OnInit } from '@angular/core';
|
|
32
|
+
import { Product } from '@/domain/product';
|
|
33
|
+
|
|
34
|
+
@Component({
|
|
35
|
+
template: `
|
|
36
|
+
<div class="card flex flex-wrap gap-4">
|
|
37
|
+
<div class="p-2 border border-surface rounded-border w-60">
|
|
38
|
+
<ul class="list-none flex flex-col gap-2 p-0 m-0">
|
|
39
|
+
<li *ngFor="let product of availableProducts" class="p-2 rounded-border shadow-xs" pDraggable (onDragStart)="dragStart(product)" (onDragEnd)="dragEnd()">
|
|
40
|
+
{{ product.name }}
|
|
41
|
+
</li>
|
|
42
|
+
</ul>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="p-2 border border-surface rounded-border w-60" pDroppable (onDrop)="drop()">
|
|
45
|
+
<p class="text-center border-surface border-b">Drop Zone</p>
|
|
46
|
+
<ul class="list-none flex flex-col gap-2 p-0 m-0" *ngIf="selectedProducts">
|
|
47
|
+
<li *ngFor="let product of selectedProducts" class="p-2 rounded-border shadow-xs">
|
|
48
|
+
{{ product.name }}
|
|
49
|
+
</li>
|
|
50
|
+
</ul>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
`,
|
|
54
|
+
standalone: true,
|
|
55
|
+
imports: []
|
|
56
|
+
})
|
|
57
|
+
export class DragdropBasicDemo implements OnInit {
|
|
58
|
+
availableProducts: Product[] | undefined;
|
|
59
|
+
selectedProducts: Product[] | undefined;
|
|
60
|
+
draggedProduct: Product | undefined | null;
|
|
61
|
+
|
|
62
|
+
ngOnInit() {
|
|
63
|
+
this.selectedProducts = [];
|
|
64
|
+
this.availableProducts = [
|
|
65
|
+
{ id: '1', name: 'Black Watch' },
|
|
66
|
+
{ id: '2', name: 'Bamboo Watch' }
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
dragStart(product: Product) {
|
|
71
|
+
this.draggedProduct = product;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
drop() {
|
|
75
|
+
if (this.draggedProduct) {
|
|
76
|
+
let draggedProductIndex = this.findIndex(this.draggedProduct);
|
|
77
|
+
this.selectedProducts = [...(this.selectedProducts as Product[]), this.draggedProduct];
|
|
78
|
+
this.availableProducts = this.availableProducts?.filter((val, i) => i != draggedProductIndex);
|
|
79
|
+
this.draggedProduct = null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
dragEnd() {
|
|
84
|
+
this.draggedProduct = null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
findIndex(product: Product) {
|
|
88
|
+
let index = -1;
|
|
89
|
+
for (let i = 0; i < (this.availableProducts as Product[]).length; i++) {
|
|
90
|
+
if (product.id === (this.availableProducts as Product[])[i].id) {
|
|
91
|
+
index = i;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return index;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
|
|
101
|
+
|
|
102
|
+
Full documentation (every input, pass through, styling, all examples): https://exhaustive-ui.com/llms/components/dragdrop.md
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Drawer
|
|
2
|
+
|
|
3
|
+
Sidebar is a panel component displayed as an overlay at the edges of the screen.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { Drawer } from '@exhaustive-ui/core/drawer'; // standalone; or DrawerModule for all its parts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## `p-drawer`: Drawer
|
|
10
|
+
|
|
11
|
+
Inputs:
|
|
12
|
+
- `closable`: `boolean` = `true`: Whether to display close button.
|
|
13
|
+
- `fullScreen`: `boolean` = `false`: Adds a close icon to the header to hide the dialog.
|
|
14
|
+
- `header`: `string | undefined`: Title content of the dialog.
|
|
15
|
+
- `position`: `"top" | "bottom" | "left" | "right" | "full"` = `'left'`: Specifies the position of the drawer, valid values are "left", "right", "bottom" and "top".
|
|
16
|
+
- `style`: `{ [klass: string]: any; } | null | undefined`: Inline style of the component.
|
|
17
|
+
- `styleClass`: `string | undefined`: Style class of the component.
|
|
18
|
+
- `visible`: `boolean` = `false` (two-way: `[(${input.name})]`): The visible property is an input that determines the visibility of the component.
|
|
19
|
+
- Other inputs: `appendTo`, `autoZIndex`, `baseZIndex`, `blockScroll`, `closeAriaLabel`, `closeButtonProps`, `closeOnEscape`, `dismissible`, `maskStyle`, `modal`, `motionOptions`.
|
|
20
|
+
|
|
21
|
+
Outputs:
|
|
22
|
+
- `(onHide)`: `any`
|
|
23
|
+
- `(onShow)`: `any`
|
|
24
|
+
- `(visibleChange)`: `boolean`
|
|
25
|
+
|
|
26
|
+
Templates (`<ng-template #name let-…>` inside the element):
|
|
27
|
+
- `#header`: no context. Custom header template.
|
|
28
|
+
- `#footer`: no context. Custom footer template.
|
|
29
|
+
- `#content`: no context. Custom content template.
|
|
30
|
+
- `#closeicon`: no context. Custom close icon template.
|
|
31
|
+
- `#headless`: no context. Custom headless template to replace the entire drawer content.
|
|
32
|
+
|
|
33
|
+
## Example: Basic
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { Component } from '@angular/core';
|
|
37
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
38
|
+
import { DrawerModule } from '@exhaustive-ui/core/drawer';
|
|
39
|
+
|
|
40
|
+
@Component({
|
|
41
|
+
template: `
|
|
42
|
+
<div class="card flex justify-center">
|
|
43
|
+
<p-drawer [(visible)]="visible" header="Drawer">
|
|
44
|
+
<p>
|
|
45
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
46
|
+
consequat.
|
|
47
|
+
</p>
|
|
48
|
+
</p-drawer>
|
|
49
|
+
<p-button (click)="visible = true" icon="pi pi-arrow-right" />
|
|
50
|
+
</div>
|
|
51
|
+
`,
|
|
52
|
+
standalone: true,
|
|
53
|
+
imports: [ButtonModule, DrawerModule]
|
|
54
|
+
})
|
|
55
|
+
export class DrawerBasicDemo {
|
|
56
|
+
visible: boolean = false;
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
|
|
61
|
+
|
|
62
|
+
Full documentation (every input, pass through, styling, all examples): https://exhaustive-ui.com/llms/components/drawer.md
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Dynamic Dialog
|
|
2
|
+
|
|
3
|
+
Dialogs can be created dynamically with any component as the content using a DialogService.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { DynamicDialog } from '@exhaustive-ui/core/dynamicdialog'; // standalone; or DynamicDialogModule for all its parts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## `p-dynamic-dialog` (also `p-dynamicDialog`, `p-dynamicdialog`, legacy): DynamicDialog
|
|
10
|
+
|
|
11
|
+
## Example: Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Component, inject } from '@angular/core';
|
|
15
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
16
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
17
|
+
import { MessageService, DialogService } from '@exhaustive-ui/core/api';
|
|
18
|
+
import { Product } from '@/domain/product';
|
|
19
|
+
import { Dialog } from '@exhaustive-ui/core/dialog';
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
template: `
|
|
23
|
+
<div class="card flex justify-center">
|
|
24
|
+
<p-toast />
|
|
25
|
+
<p-button (click)="show()" icon="pi pi-search" label="Select a Product" />
|
|
26
|
+
</div>
|
|
27
|
+
`,
|
|
28
|
+
standalone: true,
|
|
29
|
+
imports: [ButtonModule, ToastModule],
|
|
30
|
+
providers: [DialogService, MessageService]
|
|
31
|
+
})
|
|
32
|
+
export class DynamicdialogExampleDemo {
|
|
33
|
+
private dialogService = inject(DialogService);
|
|
34
|
+
private messageService = inject(MessageService);
|
|
35
|
+
|
|
36
|
+
show() {
|
|
37
|
+
this.ref = this.dialogService.open(ProductListDemo, {
|
|
38
|
+
header: 'Product List',
|
|
39
|
+
modal: true,
|
|
40
|
+
width: '50vw',
|
|
41
|
+
closable: true,
|
|
42
|
+
contentStyle: { overflow: 'auto' },
|
|
43
|
+
breakpoints: {
|
|
44
|
+
'960px': '75vw',
|
|
45
|
+
'640px': '90vw'
|
|
46
|
+
},
|
|
47
|
+
templates: {
|
|
48
|
+
footer: Footer
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
this.ref.onClose.subscribe((data: any) => {
|
|
53
|
+
let summary_and_detail;
|
|
54
|
+
if (data) {
|
|
55
|
+
const buttonType = data?.buttonType;
|
|
56
|
+
summary_and_detail = buttonType ? { summary: 'No Product Selected', detail: `Pressed '${buttonType}' button` } : { summary: 'Product Selected', detail: data?.name };
|
|
57
|
+
} else {
|
|
58
|
+
summary_and_detail = { summary: 'No Product Selected', detail: 'Pressed Close button' };
|
|
59
|
+
}
|
|
60
|
+
this.messageService.add({ severity: 'info', ...summary_and_detail, life: 3000 });
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
this.ref.onMaximize.subscribe((value) => {
|
|
64
|
+
this.messageService.add({
|
|
65
|
+
severity: 'info',
|
|
66
|
+
summary: 'Maximized',
|
|
67
|
+
detail: `maximized: ${value.maximized}`
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
|
|
75
|
+
|
|
76
|
+
Full documentation (every input, pass through, styling, all examples): https://exhaustive-ui.com/llms/components/dynamicdialog.md
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Editor
|
|
2
|
+
|
|
3
|
+
Editor groups a collection of contents in tabs.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { Editor } from '@exhaustive-ui/core/editor'; // standalone; or EditorModule for all its parts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## `p-editor`: Editor
|
|
10
|
+
|
|
11
|
+
Form control: use `[(ngModel)]`, `formControlName` or `[formControl]`.
|
|
12
|
+
|
|
13
|
+
Inputs:
|
|
14
|
+
- `invalid`: `boolean | undefined`: When present, it specifies that the component should have invalid state style.
|
|
15
|
+
- `name`: `string | undefined`: When present, it specifies that the name of the input.
|
|
16
|
+
- `readonly`: `boolean` = `false`: Whether to instantiate the editor to read-only mode.
|
|
17
|
+
- `required`: `boolean | undefined`: There must be a value (if set).
|
|
18
|
+
- `style`: `{ [klass: string]: any; } | null | undefined`: Inline style of the container.
|
|
19
|
+
- Other inputs: `bounds`, `debug`, `disabled`, `formats`, `modules`, `placeholder`, `scrollingContainer`.
|
|
20
|
+
|
|
21
|
+
Outputs:
|
|
22
|
+
- `(onBlur)`: `EditorBlurEvent`
|
|
23
|
+
- `(onEditorChange)`: `EditorChangeEvent`
|
|
24
|
+
- `(onFocus)`: `EditorFocusEvent`
|
|
25
|
+
- `(onInit)`: `EditorInitEvent`
|
|
26
|
+
- `(onSelectionChange)`: `EditorSelectionChangeEvent`
|
|
27
|
+
- `(onTextChange)`: `EditorTextChangeEvent`
|
|
28
|
+
|
|
29
|
+
Templates (`<ng-template #name let-…>` inside the element):
|
|
30
|
+
- `#header`: no context. Custom item template.
|
|
31
|
+
|
|
32
|
+
## Example: Basic
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { Component } from '@angular/core';
|
|
36
|
+
import { FormsModule } from '@angular/forms';
|
|
37
|
+
import { EditorModule } from '@exhaustive-ui/core/editor';
|
|
38
|
+
|
|
39
|
+
@Component({
|
|
40
|
+
template: `
|
|
41
|
+
<div class="card">
|
|
42
|
+
<p-editor [(ngModel)]="text" [style]="{ height: '320px' }" />
|
|
43
|
+
</div>
|
|
44
|
+
`,
|
|
45
|
+
standalone: true,
|
|
46
|
+
imports: [EditorModule, FormsModule]
|
|
47
|
+
})
|
|
48
|
+
export class EditorBasicDemo {
|
|
49
|
+
text: string | undefined;
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
|
|
54
|
+
|
|
55
|
+
Full documentation (every input, pass through, styling, all examples): https://exhaustive-ui.com/llms/components/editor.md
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Fieldset
|
|
2
|
+
|
|
3
|
+
Fieldset is a grouping component with the optional content toggle feature.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { Fieldset } from '@exhaustive-ui/core/fieldset'; // standalone; or FieldsetModule for all its parts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## `p-fieldset`: Fieldset
|
|
10
|
+
|
|
11
|
+
Inputs:
|
|
12
|
+
- `legend`: `string | undefined`: Header text of the fieldset.
|
|
13
|
+
- `style`: `{ [klass: string]: any; } | null | undefined`: Inline style of the component.
|
|
14
|
+
- `toggleable`: `boolean | undefined`: When specified, content can toggled by clicking the legend.
|
|
15
|
+
- Other inputs: `collapsed`, `motionOptions`, `styleClass`.
|
|
16
|
+
|
|
17
|
+
Outputs:
|
|
18
|
+
- `(collapsedChange)`: `boolean | undefined`
|
|
19
|
+
- `(onAfterToggle)`: `FieldsetAfterToggleEvent`
|
|
20
|
+
- `(onBeforeToggle)`: `FieldsetBeforeToggleEvent`
|
|
21
|
+
|
|
22
|
+
Templates (`<ng-template #name let-…>` inside the element):
|
|
23
|
+
- `#header`: no context. Custom header template.
|
|
24
|
+
- `#expandicon`: no context. Custom expand icon template.
|
|
25
|
+
- `#collapseicon`: no context. Custom collapse icon template.
|
|
26
|
+
- `#content`: no context. Custom content template.
|
|
27
|
+
|
|
28
|
+
## Example: Basic
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { Component } from '@angular/core';
|
|
32
|
+
import { FieldsetModule } from '@exhaustive-ui/core/fieldset';
|
|
33
|
+
|
|
34
|
+
@Component({
|
|
35
|
+
template: `
|
|
36
|
+
<div class="card">
|
|
37
|
+
<p-fieldset legend="Header">
|
|
38
|
+
<p class="m-0">
|
|
39
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
40
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
41
|
+
</p>
|
|
42
|
+
</p-fieldset>
|
|
43
|
+
</div>
|
|
44
|
+
`,
|
|
45
|
+
standalone: true,
|
|
46
|
+
imports: [FieldsetModule]
|
|
47
|
+
})
|
|
48
|
+
export class FieldsetBasicDemo {}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
|
|
52
|
+
|
|
53
|
+
Full documentation (every input, pass through, styling, all examples): https://exhaustive-ui.com/llms/components/fieldset.md
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# FileInput
|
|
2
|
+
|
|
3
|
+
FileInput selects files by drag and drop, paste or the file picker, validates each file and uploads it with its own progress.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { FileInput } from '@exhaustive-ui/core/fileinput'; // standalone; or FileInputModule for all its parts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## `p-file-input` (also `p-file`, `p-fileinput`, legacy): FileInput
|
|
10
|
+
|
|
11
|
+
Form control: use `[(ngModel)]`, `formControlName` or `[formControl]`.
|
|
12
|
+
|
|
13
|
+
Inputs:
|
|
14
|
+
- `accept`: `string | undefined`: Accepted file types, as in the accept attribute of a file input: extensions such as `.pdf` and MIME types such as `image/*`.
|
|
15
|
+
- `ariaLabel`: `string | undefined`: Accessible label of the dropzone, the add tile or the avatar.
|
|
16
|
+
- `ariaLabelledBy`: `string | undefined`: Identifier of the element that labels the dropzone, the add tile or the avatar.
|
|
17
|
+
- `avatarShape`: `"circle" | "square"` = `'circle'`: Shape of the avatar variant.
|
|
18
|
+
- `capture`: `"user" | "environment" | undefined`: On mobile devices, opens the camera directly: `user` for the front camera, `environment` for the back camera.
|
|
19
|
+
- `disabled`: `boolean | undefined`: When present, it specifies that the component should have disabled state style.
|
|
20
|
+
- `existing`: `FileInputExistingFile[] | undefined`: Files already stored on the server, shown with a download and a delete button.
|
|
21
|
+
- `hint`: `string | undefined`: Text under the dropzone label, such as the accepted types and sizes.
|
|
22
|
+
- `invalid`: `boolean | undefined`: When present, it specifies that the component should have invalid state style.
|
|
23
|
+
- `labels`: `Partial<FileInputLabels> | undefined`: Texts of the component, merged with the English defaults.
|
|
24
|
+
- `maxFiles`: `number | undefined`: Maximum number of files, existing files included.
|
|
25
|
+
- `maxFileSize`: `number | undefined`: Maximum size of a file, in bytes.
|
|
26
|
+
- `maxTotalSize`: `number | undefined`: Maximum size of all the files together, in bytes.
|
|
27
|
+
- `name`: `string | undefined`: When present, it specifies that the name of the input.
|
|
28
|
+
- `required`: `boolean | undefined`: There must be a value (if set).
|
|
29
|
+
- `size`: `"large" | "small" | undefined`: Size of the component.
|
|
30
|
+
- `uploadHandler`: `FileInputUploadHandler | undefined`: Function that uploads one file, used instead of url: to upload straight to cloud storage, or through your own service.
|
|
31
|
+
- `variant`: `FileInputVariant` = `'list'`: Layout of the component: a dropzone with a list, a grid of images, or a single avatar.
|
|
32
|
+
- Other inputs: `auto`, `concurrency`, `directory`, `fieldName`, `headers`, `inputId`, `method`, `minFileSize`, `multiple`, `showSummary`, `url`, `withCredentials`.
|
|
33
|
+
|
|
34
|
+
Outputs:
|
|
35
|
+
- `(onCancel)`: `FileInputItemEvent`
|
|
36
|
+
- `(onComplete)`: `FileInputCompleteEvent`
|
|
37
|
+
- `(onError)`: `FileInputErrorEvent`
|
|
38
|
+
- `(onRemove)`: `FileInputItemEvent`
|
|
39
|
+
- `(onRemoveExisting)`: `FileInputRemoveExistingEvent`
|
|
40
|
+
- `(onSelect)`: `FileInputSelectEvent`
|
|
41
|
+
- `(onUpload)`: `FileInputUploadEvent`
|
|
42
|
+
|
|
43
|
+
Templates (`<ng-template #name let-…>` inside the element):
|
|
44
|
+
- `#dropzone`: context { open: () => void, active: boolean }. Custom content of the dropzone.
|
|
45
|
+
- `#item`: context { $implicit: FileInputItem, remove: () => void, retry: () => void, cancel: () => void }. Custom row of the list variant.
|
|
46
|
+
|
|
47
|
+
Read a context with `let-`: `<ng-template #dropzone let-open="open" let-active="active">` (`$implicit` is the bare `let-x`).
|
|
48
|
+
|
|
49
|
+
## Example: Basic
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { Component } from '@angular/core';
|
|
53
|
+
import { FormsModule } from '@angular/forms';
|
|
54
|
+
import { FileInputModule } from '@exhaustive-ui/core/fileinput';
|
|
55
|
+
|
|
56
|
+
@Component({
|
|
57
|
+
template: `
|
|
58
|
+
<div class="card">
|
|
59
|
+
<p-file-input [(ngModel)]="files" />
|
|
60
|
+
</div>
|
|
61
|
+
`,
|
|
62
|
+
standalone: true,
|
|
63
|
+
imports: [FileInputModule, FormsModule]
|
|
64
|
+
})
|
|
65
|
+
export class FileinputBasicDemo {
|
|
66
|
+
files: File[] = [];
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
|
|
71
|
+
|
|
72
|
+
Full documentation (every input, pass through, styling, all examples): https://exhaustive-ui.com/llms/components/fileinput.md
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# FileUpload
|
|
2
|
+
|
|
3
|
+
FileUpload is an advanced uploader with dragdrop support, multi file uploads, auto uploading, progress tracking and validations.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { FileUpload } from '@exhaustive-ui/core/fileupload'; // standalone; or FileUploadModule for all its parts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## `p-file-upload` (also `p-fileupload`, `p-fileUpload`, legacy): FileUpload
|
|
10
|
+
|
|
11
|
+
Inputs:
|
|
12
|
+
- `accept`: `string | undefined`: Comma-separated list of pattern to restrict the allowed file types.
|
|
13
|
+
- `auto`: `boolean | undefined`: When enabled, upload begins automatically after selection is completed.
|
|
14
|
+
- `chooseIcon`: `string | undefined`: Icon of the choose button.
|
|
15
|
+
- `chooseLabel`: `string | undefined`: Label of the choose button.
|
|
16
|
+
- `customUpload`: `boolean | undefined`: Whether to use the default upload or a manual implementation defined in uploadHandler callback.
|
|
17
|
+
- `disabled`: `boolean | undefined`: Disables the upload functionality.
|
|
18
|
+
- `maxFileSize`: `number | undefined`: Maximum file size allowed in bytes.
|
|
19
|
+
- `mode`: `"advanced" | "basic" | undefined` = `'advanced'`: Defines the UI of the component.
|
|
20
|
+
- `multiple`: `boolean | undefined`: Used to select multiple files at once from file dialog.
|
|
21
|
+
- `name`: `string | undefined`: Name of the request parameter to identify the files at backend.
|
|
22
|
+
- `url`: `string | undefined`: Remote url to upload the files.
|
|
23
|
+
- Other inputs: `cancelButtonProps`, `cancelIcon`, `cancelLabel`, `cancelStyleClass`, `chooseButtonProps`, `chooseStyleClass`, `fileLimit`, `files`, `headers`, `invalidFileLimitMessageDetail`, `invalidFileLimitMessageSummary`, `invalidFileSizeMessageDetail`, `invalidFileSizeMessageSummary`, `invalidFileTypeMessageDetail`, `invalidFileTypeMessageSummary`, `method`, `previewWidth`, `showCancelButton`, `showUploadButton`, `style`, `styleClass`, `uploadButtonProps`, `uploadIcon`, `uploadLabel`, `uploadStyleClass`, `withCredentials`.
|
|
24
|
+
|
|
25
|
+
Outputs:
|
|
26
|
+
- `(onBeforeUpload)`: `FileBeforeUploadEvent`
|
|
27
|
+
- `(onClear)`: `Event | undefined`
|
|
28
|
+
- `(onError)`: `FileUploadErrorEvent`
|
|
29
|
+
- `(onImageError)`: `Event`
|
|
30
|
+
- `(onProgress)`: `FileProgressEvent`
|
|
31
|
+
- `(onRemove)`: `FileRemoveEvent`
|
|
32
|
+
- `(onRemoveUploadedFile)`: `RemoveUploadedFileEvent`
|
|
33
|
+
- `(onSelect)`: `FileSelectEvent`
|
|
34
|
+
- `(onSend)`: `FileSendEvent`
|
|
35
|
+
- `(onUpload)`: `FileUploadEvent`
|
|
36
|
+
- `(uploadHandler)`: `FileUploadHandlerEvent`
|
|
37
|
+
|
|
38
|
+
Templates (`<ng-template #name let-…>` inside the element):
|
|
39
|
+
- `#file`: context { $implicit: File, ngForOf: File[], index: number, count: number, first: boolean, last: boolean, even: boolean, odd: boolean }. Custom file template.
|
|
40
|
+
- `#header`: context { $implicit: File[], uploadedFiles: File[], chooseCallback: () => void, clearCallback: () => void, uploadCallback: () => void }. Custom header template.
|
|
41
|
+
- `#content`: context { $implicit: File[], uploadedFiles: File[], progress: number, messages: any[], chooseCallback: () => void, removeFileCallback: (event: Event, index: number) => void, clearCallback: () => void, removeUploadedFileCallback: (index: number) => void }. Custom content template.
|
|
42
|
+
- `#toolbar`: no context. Custom toolbar template.
|
|
43
|
+
- `#chooseicon`: no context. Custom choose icon template.
|
|
44
|
+
- `#filelabel`: context { $implicit: File[] }. Custom file label template.
|
|
45
|
+
- `#uploadicon`: no context. Custom upload icon template.
|
|
46
|
+
- `#cancelicon`: no context. Custom cancel icon template.
|
|
47
|
+
- `#empty`: no context. Custom empty state template.
|
|
48
|
+
|
|
49
|
+
Read a context with `let-`: `<ng-template #file let-item let-ngForOf="ngForOf" let-index="index">` (`$implicit` is the bare `let-x`).
|
|
50
|
+
|
|
51
|
+
### `[pFileContent]`: FileContent
|
|
52
|
+
|
|
53
|
+
- Inputs: `badgeSeverity`, `badgeValue`, `fileRemoveIconTemplate`, `files`, `previewWidth`.
|
|
54
|
+
- Outputs: `(onRemove)`.
|
|
55
|
+
|
|
56
|
+
## Example: Basic
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { Component, inject } from '@angular/core';
|
|
60
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
61
|
+
import { FileUploadModule } from '@exhaustive-ui/core/fileupload';
|
|
62
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
63
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
64
|
+
|
|
65
|
+
interface UploadEvent {
|
|
66
|
+
originalEvent: Event;
|
|
67
|
+
files: File[];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@Component({
|
|
71
|
+
template: `
|
|
72
|
+
<p-toast />
|
|
73
|
+
<div class="card flex flex-wrap gap-6 items-center justify-between">
|
|
74
|
+
<p-file-upload #fu mode="basic" chooseLabel="Choose" chooseIcon="pi pi-upload" name="demo[]" url="https://exhaustive-ui.com/api/upload" accept="image/*" maxFileSize="1000000" (onUpload)="onUpload($event)" />
|
|
75
|
+
<p-button label="Upload" (onClick)="fu.upload()" severity="secondary" />
|
|
76
|
+
</div>
|
|
77
|
+
`,
|
|
78
|
+
standalone: true,
|
|
79
|
+
imports: [ButtonModule, FileUploadModule, ToastModule],
|
|
80
|
+
providers: [MessageService]
|
|
81
|
+
})
|
|
82
|
+
export class FileuploadBasicDemo {
|
|
83
|
+
private messageService = inject(MessageService);
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
|
|
88
|
+
|
|
89
|
+
Full documentation (every input, pass through, styling, all examples): https://exhaustive-ui.com/llms/components/fileupload.md
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Float Label
|
|
2
|
+
|
|
3
|
+
FloatLabel appears on top of the input field when focused.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { FloatLabel } from '@exhaustive-ui/core/floatlabel'; // standalone; or FloatLabelModule for all its parts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## `p-float-label` (also `p-floatlabel`, `p-floatLabel`, legacy): FloatLabel
|
|
10
|
+
|
|
11
|
+
Inputs:
|
|
12
|
+
- `variant`: `"over" | "on" | "in"` = `'over'`: Defines the positioning of the label relative to the input.
|
|
13
|
+
|
|
14
|
+
## Example: Basic
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { Component } from '@angular/core';
|
|
18
|
+
import { FormsModule } from '@angular/forms';
|
|
19
|
+
import { FloatLabelModule } from '@exhaustive-ui/core/floatlabel';
|
|
20
|
+
import { InputTextModule } from '@exhaustive-ui/core/inputtext';
|
|
21
|
+
|
|
22
|
+
@Component({
|
|
23
|
+
template: `
|
|
24
|
+
<div class="card flex justify-center">
|
|
25
|
+
<p-float-label>
|
|
26
|
+
<input id="username" pInputText [(ngModel)]="value" autocomplete="off" />
|
|
27
|
+
<label for="username">Username</label>
|
|
28
|
+
</p-float-label>
|
|
29
|
+
</div>
|
|
30
|
+
`,
|
|
31
|
+
standalone: true,
|
|
32
|
+
imports: [FloatLabelModule, InputTextModule, FormsModule]
|
|
33
|
+
})
|
|
34
|
+
export class FloatlabelBasicDemo {
|
|
35
|
+
value: string | undefined;
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
|
|
40
|
+
|
|
41
|
+
Full documentation (every input, pass through, styling, all examples): https://exhaustive-ui.com/llms/components/floatlabel.md
|