@exhaustive-ui/mcp 22.5.0 → 22.6.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 (199) hide show
  1. package/data/cards/accordion.md +5 -2
  2. package/data/cards/animateonscroll.md +8 -5
  3. package/data/cards/autocomplete.md +8 -3
  4. package/data/cards/autofocus.md +4 -2
  5. package/data/cards/avatar.md +4 -2
  6. package/data/cards/badge.md +2 -1
  7. package/data/cards/breadcrumb.md +3 -1
  8. package/data/cards/button.md +8 -2
  9. package/data/cards/card.md +2 -1
  10. package/data/cards/carousel.md +7 -5
  11. package/data/cards/cascadeselect.md +2 -6
  12. package/data/cards/chart.md +9 -7
  13. package/data/cards/checkbox.md +4 -3
  14. package/data/cards/chip.md +2 -1
  15. package/data/cards/classnames.md +21 -3
  16. package/data/cards/colorpicker.md +2 -1
  17. package/data/cards/confirmdialog.md +35 -5
  18. package/data/cards/confirmpopup.md +25 -3
  19. package/data/cards/contextmenu.md +1 -7
  20. package/data/cards/dataview.md +28 -9
  21. package/data/cards/datepicker.md +4 -3
  22. package/data/cards/dialog.md +3 -3
  23. package/data/cards/divider.md +2 -1
  24. package/data/cards/dock.md +24 -3
  25. package/data/cards/dragdrop.md +5 -1
  26. package/data/cards/drawer.md +3 -3
  27. package/data/cards/dynamicdialog.md +41 -14
  28. package/data/cards/editor.md +1 -1
  29. package/data/cards/fieldset.md +2 -1
  30. package/data/cards/fileinput.md +1 -1
  31. package/data/cards/fileupload.md +7 -8
  32. package/data/cards/floatlabel.md +1 -1
  33. package/data/cards/fluid.md +7 -5
  34. package/data/cards/focustrap.md +6 -2
  35. package/data/cards/galleria.md +18 -25
  36. package/data/cards/iconfield.md +3 -2
  37. package/data/cards/iftalabel.md +1 -1
  38. package/data/cards/image.md +4 -2
  39. package/data/cards/imagecompare.md +4 -3
  40. package/data/cards/inplace.md +2 -1
  41. package/data/cards/inputgroup.md +14 -3
  42. package/data/cards/inputmask.md +2 -2
  43. package/data/cards/inputnumber.md +4 -3
  44. package/data/cards/inputotp.md +2 -2
  45. package/data/cards/inputtext.md +2 -2
  46. package/data/cards/keyfilter.md +2 -1
  47. package/data/cards/knob.md +3 -2
  48. package/data/cards/listbox.md +5 -3
  49. package/data/cards/megamenu.md +7 -8
  50. package/data/cards/menu.md +3 -7
  51. package/data/cards/menubar.md +3 -7
  52. package/data/cards/message.md +2 -1
  53. package/data/cards/metergroup.md +3 -7
  54. package/data/cards/multiselect.md +5 -9
  55. package/data/cards/orderlist.md +6 -4
  56. package/data/cards/organizationchart.md +33 -6
  57. package/data/cards/overlay.md +2 -1
  58. package/data/cards/paginator.md +2 -1
  59. package/data/cards/panel.md +2 -1
  60. package/data/cards/panelmenu.md +4 -13
  61. package/data/cards/password.md +6 -3
  62. package/data/cards/picklist.md +9 -5
  63. package/data/cards/popover.md +6 -5
  64. package/data/cards/progressbar.md +4 -3
  65. package/data/cards/progressspinner.md +2 -1
  66. package/data/cards/radiobutton.md +4 -3
  67. package/data/cards/rating.md +1 -1
  68. package/data/cards/ripple.md +2 -1
  69. package/data/cards/scrollpanel.md +2 -1
  70. package/data/cards/scrolltop.md +5 -3
  71. package/data/cards/select.md +2 -1
  72. package/data/cards/selectbutton.md +6 -2
  73. package/data/cards/skeleton.md +2 -1
  74. package/data/cards/slider.md +4 -3
  75. package/data/cards/speeddial.md +7 -4
  76. package/data/cards/splitbutton.md +21 -18
  77. package/data/cards/splitter.md +2 -1
  78. package/data/cards/stepper.md +8 -3
  79. package/data/cards/styleclass.md +4 -2
  80. package/data/cards/table.md +46 -11
  81. package/data/cards/tabs.md +2 -1
  82. package/data/cards/tag.md +2 -1
  83. package/data/cards/terminal.md +31 -22
  84. package/data/cards/textarea.md +3 -2
  85. package/data/cards/tieredmenu.md +1 -6
  86. package/data/cards/timeline.md +5 -5
  87. package/data/cards/toast.md +7 -8
  88. package/data/cards/togglebutton.md +1 -1
  89. package/data/cards/toggleswitch.md +4 -3
  90. package/data/cards/toolbar.md +8 -8
  91. package/data/cards/tooltip.md +2 -1
  92. package/data/cards/tree.md +3 -6
  93. package/data/cards/treeselect.md +6 -7
  94. package/data/cards/treetable.md +52 -31
  95. package/data/components/accordion.md +31 -23
  96. package/data/components/animateonscroll.md +18 -15
  97. package/data/components/autocomplete.md +162 -93
  98. package/data/components/autofocus.md +9 -7
  99. package/data/components/avatar.md +56 -43
  100. package/data/components/badge.md +27 -18
  101. package/data/components/blockui.md +15 -8
  102. package/data/components/breadcrumb.md +20 -14
  103. package/data/components/button.md +121 -94
  104. package/data/components/card.md +12 -10
  105. package/data/components/carousel.md +75 -53
  106. package/data/components/cascadeselect.md +271 -238
  107. package/data/components/chart.md +88 -74
  108. package/data/components/checkbox.md +107 -73
  109. package/data/components/chip.md +20 -16
  110. package/data/components/classnames.md +22 -4
  111. package/data/components/colorpicker.md +54 -36
  112. package/data/components/confirmdialog.md +146 -43
  113. package/data/components/confirmpopup.md +95 -22
  114. package/data/components/contextmenu.md +110 -39
  115. package/data/components/dataview.md +176 -83
  116. package/data/components/datepicker.md +171 -141
  117. package/data/components/dialog.md +80 -68
  118. package/data/components/divider.md +17 -12
  119. package/data/components/dock.md +63 -27
  120. package/data/components/dragdrop.md +26 -12
  121. package/data/components/drawer.md +67 -48
  122. package/data/components/dynamicdialog.md +22 -13
  123. package/data/components/editor.md +42 -33
  124. package/data/components/fieldset.md +20 -17
  125. package/data/components/fileinput.md +92 -35
  126. package/data/components/fileupload.md +101 -61
  127. package/data/components/floatlabel.md +20 -11
  128. package/data/components/fluid.md +11 -9
  129. package/data/components/focustrap.md +11 -7
  130. package/data/components/galleria.md +224 -83
  131. package/data/components/iconfield.md +23 -15
  132. package/data/components/iftalabel.md +15 -9
  133. package/data/components/image.md +31 -26
  134. package/data/components/imagecompare.md +8 -6
  135. package/data/components/inplace.md +27 -22
  136. package/data/components/inputgroup.md +53 -29
  137. package/data/components/inputmask.md +107 -85
  138. package/data/components/inputnumber.md +127 -89
  139. package/data/components/inputotp.md +55 -42
  140. package/data/components/inputtext.md +72 -50
  141. package/data/components/keyfilter.md +6 -3
  142. package/data/components/knob.md +70 -58
  143. package/data/components/listbox.md +171 -141
  144. package/data/components/megamenu.md +24 -23
  145. package/data/components/menu.md +37 -34
  146. package/data/components/menubar.md +27 -22
  147. package/data/components/message.md +44 -32
  148. package/data/components/metergroup.md +48 -17
  149. package/data/components/multiselect.md +232 -168
  150. package/data/components/orderlist.md +55 -48
  151. package/data/components/organizationchart.md +182 -13
  152. package/data/components/overlay.md +31 -26
  153. package/data/components/paginator.md +49 -34
  154. package/data/components/panel.md +23 -19
  155. package/data/components/panelmenu.md +51 -25
  156. package/data/components/password.md +104 -91
  157. package/data/components/picklist.md +92 -70
  158. package/data/components/popover.md +68 -46
  159. package/data/components/progressbar.md +28 -22
  160. package/data/components/progressspinner.md +13 -11
  161. package/data/components/radiobutton.md +69 -35
  162. package/data/components/rating.md +48 -40
  163. package/data/components/ripple.md +8 -6
  164. package/data/components/scroller.md +29 -29
  165. package/data/components/scrollpanel.md +9 -7
  166. package/data/components/scrolltop.md +20 -18
  167. package/data/components/select.md +248 -169
  168. package/data/components/selectbutton.md +118 -56
  169. package/data/components/skeleton.md +22 -18
  170. package/data/components/slider.md +73 -49
  171. package/data/components/speeddial.md +77 -59
  172. package/data/components/splitbutton.md +354 -329
  173. package/data/components/splitter.md +22 -18
  174. package/data/components/stepper.md +38 -21
  175. package/data/components/styleclass.md +12 -6
  176. package/data/components/table.md +523 -314
  177. package/data/components/tabs.md +44 -26
  178. package/data/components/tag.md +18 -14
  179. package/data/components/terminal.md +38 -27
  180. package/data/components/textarea.md +82 -47
  181. package/data/components/tieredmenu.md +34 -29
  182. package/data/components/timeline.md +29 -28
  183. package/data/components/toast.md +115 -57
  184. package/data/components/togglebutton.md +53 -39
  185. package/data/components/toggleswitch.md +41 -28
  186. package/data/components/toolbar.md +19 -18
  187. package/data/components/tooltip.md +43 -32
  188. package/data/components/tree.md +114 -81
  189. package/data/components/treeselect.md +176 -174
  190. package/data/components/treetable.md +1250 -1045
  191. package/data/components.json +4122 -4080
  192. package/data/llms-full.txt +8784 -6249
  193. package/data/manifest.json +154 -15
  194. package/data/pages/tailwind.md +20 -10
  195. package/data/snapshot.json +2 -2
  196. package/dist/index.d.mts +2 -0
  197. package/dist/index.mjs +3 -3
  198. package/dist/index.mjs.map +1 -1
  199. package/package.json +1 -1
@@ -41,20 +41,21 @@ Types used in the contexts:
41
41
  - `DataViewPaginatorState`: { page?: number | undefined, first?: number | undefined, rows?: number | undefined, pageCount?: number | undefined, totalRecords?: number | undefined }
42
42
  - `SelectItem`: { label?: string | undefined, value: T, styleClass?: string | undefined, icon?: string | undefined, title?: string | undefined, disabled?: boolean | undefined }
43
43
 
44
- ## Example: Pagination
44
+ ## Example: Basic
45
45
 
46
46
  ```typescript
47
- import { Component, OnInit, inject, signal } from '@angular/core';
47
+ import { CommonModule } from '@angular/common';
48
+ import { Component, inject, signal } from '@angular/core';
48
49
  import { ButtonModule } from '@exhaustive-ui/core/button';
49
50
  import { DataViewModule } from '@exhaustive-ui/core/dataview';
50
51
  import { TagModule } from '@exhaustive-ui/core/tag';
51
- import { ProductService } from '@/service/productservice';
52
52
  import { Product } from '@/domain/product';
53
+ import { ProductService } from '@/service/productservice';
53
54
 
54
55
  @Component({
55
56
  template: `
56
57
  <div class="card">
57
- <p-data-view #dv [value]="products()" [rows]="5" [paginator]="true">
58
+ <p-data-view #dv [value]="products()">
58
59
  <ng-template #list let-items>
59
60
  <div class="grid grid-cols-12 gap-4 grid-nogutter">
60
61
  <div class="col-span-12" *ngFor="let item of items; let first = first">
@@ -82,7 +83,7 @@ import { Product } from '@/domain/product';
82
83
  <div class="flex flex-col md:items-end gap-8">
83
84
  <span class="text-xl font-semibold text-surface-900 dark:text-surface-0">{{ '$' + item.price }}</span>
84
85
  <div class="flex flex-row-reverse md:flex-row gap-2">
85
- <p-button icon="pi pi-heart" [outlined]="true" />
86
+ <p-button icon="pi pi-heart" ariaLabel="Add to favorites" [outlined]="true" />
86
87
  <p-button icon="pi pi-shopping-cart" class="flex-auto md:flex-initial whitespace-nowrap" label="Buy Now" [disabled]="item.inventoryStatus === 'OUTOFSTOCK'" />
87
88
  </div>
88
89
  </div>
@@ -95,16 +96,34 @@ import { Product } from '@/domain/product';
95
96
  </div>
96
97
  `,
97
98
  standalone: true,
98
- imports: [ButtonModule, DataViewModule, TagModule],
99
+ imports: [CommonModule, DataViewModule, ButtonModule, TagModule],
99
100
  providers: [ProductService]
100
101
  })
101
- export class DataviewPaginationDemo implements OnInit {
102
- private productService = inject(ProductService);
102
+ export class DataviewBasicDemo {
103
103
  products = signal<any>([]);
104
104
 
105
+ productService = inject(ProductService);
106
+
107
+ getSeverity(product: Product) {
108
+ switch (product.inventoryStatus) {
109
+ case 'INSTOCK':
110
+ return 'success';
111
+
112
+ case 'LOWSTOCK':
113
+ return 'warn';
114
+
115
+ case 'OUTOFSTOCK':
116
+ return 'danger';
117
+
118
+ default:
119
+ return null;
120
+ }
121
+ }
122
+
105
123
  ngOnInit() {
106
124
  this.productService.getProducts().then((data) => {
107
- this.products.set(data);
125
+ const d = data.slice(0, 5);
126
+ this.products.set([...d]);
108
127
  });
109
128
  }
110
129
  }
@@ -11,6 +11,7 @@ import { DatePicker } from '@exhaustive-ui/core/datepicker'; // standalone; or D
11
11
  Form control: use `[(ngModel)]`, `formControlName` or `[formControl]`.
12
12
 
13
13
  Inputs:
14
+ - `ariaLabel`: `string | undefined`: Defines a string that labels the input for accessibility.
14
15
  - `dateFormat`: `string | undefined`: Format of the date which can also be defined at locale settings.
15
16
  - `disabled`: `boolean | undefined`: When present, it specifies that the component should have disabled state style.
16
17
  - `fluid`: `boolean | undefined`: Spans 100% width of the container when enabled.
@@ -40,7 +41,7 @@ Inputs:
40
41
  - `touchUI`: `boolean | undefined`: When enabled, datepicker overlay is displayed as optimized for touch devices.
41
42
  - `variant`: `"filled" | "outlined" | undefined` = `'outlined'`: Specifies the input variant of the component.
42
43
  - `view`: `DatePickerTypeView` = `'date'`: Type of view to display, valid values are "date" for datepicker and "month" for month picker.
43
- - Other inputs: `appendTo`, `ariaDescribedBy`, `ariaLabel`, `ariaLabelledBy`, `autofocus`, `autoZIndex`, `baseZIndex`, `clearButtonStyleClass`, `dataType`, `defaultDate`, `disabledDates`, `disabledDays`, `firstDayOfWeek`, `focusTrap`, `hideOnDateTimeSelect`, `iconAriaLabel`, `inputSize`, `inputStyle`, `keepInvalid`, `max`, `maxDateCount`, `maxlength`, `min`, `minlength`, `motionOptions`, `multipleSeparator`, `panelStyle`, `panelStyleClass`, `pattern`, `rangeSeparator`, `responsiveOptions`, `selectOtherMonths`, `shortYearCutoff`, `showOtherMonths`, `showSeconds`, `startWeekFromFirstDayOfYear`, `step`, `stepHour`, `stepMinute`, `stepSecond`, `tabindex`, `timeSeparator`, `todayButtonStyleClass`.
44
+ - Other inputs: `appendTo`, `ariaDescribedBy`, `ariaLabelledBy`, `autofocus`, `autoZIndex`, `baseZIndex`, `clearButtonStyleClass`, `dataType`, `defaultDate`, `disabledDates`, `disabledDays`, `firstDayOfWeek`, `focusTrap`, `hideOnDateTimeSelect`, `iconAriaLabel`, `inputSize`, `inputStyle`, `keepInvalid`, `max`, `maxDateCount`, `maxlength`, `min`, `minlength`, `motionOptions`, `multipleSeparator`, `panelStyle`, `panelStyleClass`, `pattern`, `rangeSeparator`, `responsiveOptions`, `selectOtherMonths`, `shortYearCutoff`, `showOtherMonths`, `showSeconds`, `startWeekFromFirstDayOfYear`, `step`, `stepHour`, `stepMinute`, `stepSecond`, `tabindex`, `timeSeparator`, `todayButtonStyleClass`.
44
45
 
45
46
  Outputs:
46
47
  - `(onBlur)`: `Event`
@@ -86,11 +87,11 @@ import { DatePickerModule } from '@exhaustive-ui/core/datepicker';
86
87
  @Component({
87
88
  template: `
88
89
  <div class="card flex justify-center">
89
- <p-date-picker [(ngModel)]="date" />
90
+ <p-date-picker [(ngModel)]="date" ariaLabel="Date" />
90
91
  </div>
91
92
  `,
92
93
  standalone: true,
93
- imports: [DatePickerModule, FormsModule]
94
+ imports: [FormsModule, DatePickerModule]
94
95
  })
95
96
  export class DatepickerBasicDemo {
96
97
  date: Date | undefined;
@@ -10,7 +10,7 @@ import { Dialog } from '@exhaustive-ui/core/dialog'; // standalone; or DialogMod
10
10
 
11
11
  Inputs:
12
12
  - `appendTo`: `any`: Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g.
13
- - `breakpoints`: `any`: Object literal to define widths per screen size.
13
+ - `breakpoints`: `{ [maxWidth: string]: string; } | undefined`: Object literal to define widths per screen size.
14
14
  - `draggable`: `boolean` = `true`: Enables dragging to change the position using header.
15
15
  - `header`: `string | undefined`: Title text of the dialog.
16
16
  - `maskStyleClass`: `string | undefined`: Style class of the mask.
@@ -18,7 +18,7 @@ Inputs:
18
18
  - `modal`: `boolean` = `false`: Defines if background should be blocked when dialog is displayed.
19
19
  - `position`: `"center" | "top" | "bottom" | "left" | "right" | "topleft" | "topright" | "bottomleft" | "bottomright" | undefined`: Position of the dialog.
20
20
  - `resizable`: `boolean` = `true`: Enables resizing of the content.
21
- - `style`: `any`: Inline style of the component.
21
+ - `style`: `{ [key: string]: any; } | null | undefined`: Inline style of the component.
22
22
  - `styleClass`: `string | undefined`: Style class of the component.
23
23
  - `visible`: `boolean` = `false` (two-way: `[(${input.name})]`): Specifies the visibility of the dialog.
24
24
  - Other inputs: `ariaLabelledBy`, `autoZIndex`, `baseZIndex`, `blockScroll`, `closable`, `closeAriaLabel`, `closeButtonProps`, `closeIcon`, `closeIconTemplate`, `closeOnEscape`, `closeTabindex`, `contentStyle`, `contentStyleClass`, `contentTemplate`, `dismissableMask`, `focusOnShow`, `focusTrap`, `footerTemplate`, `headerTemplate`, `headlessTemplate`, `hostName`, `keepInViewport`, `maskMotionOptions`, `maskStyle`, `maximizeButtonProps`, `maximizeIcon`, `maximizeIconTemplate`, `minimizeIcon`, `minimizeIconTemplate`, `minX`, `minY`, `motionOptions`, `role`, `showHeader`.
@@ -73,7 +73,7 @@ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
73
73
  </div>
74
74
  `,
75
75
  standalone: true,
76
- imports: [ButtonModule, DialogModule, InputTextModule]
76
+ imports: [DialogModule, ButtonModule, InputTextModule]
77
77
  })
78
78
  export class DialogBasicDemo {
79
79
  visible: boolean = false;
@@ -46,7 +46,8 @@ import { DividerModule } from '@exhaustive-ui/core/divider';
46
46
  standalone: true,
47
47
  imports: [DividerModule]
48
48
  })
49
- export class DividerBasicDemo {}
49
+ export class DividerBasicDemo {
50
+ }
50
51
  ```
51
52
 
52
53
  Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
@@ -26,11 +26,12 @@ Read a context with `let-`: `<ng-template #item let-item>` (`$implicit` is the b
26
26
 
27
27
  ```typescript
28
28
  import { Component, OnInit } from '@angular/core';
29
+ import { CommonModule } from '@angular/common';
29
30
  import { FormsModule } from '@angular/forms';
31
+ import { MenuItem } from '@exhaustive-ui/core/api';
30
32
  import { DockModule } from '@exhaustive-ui/core/dock';
31
33
  import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
32
34
  import { TooltipModule } from '@exhaustive-ui/core/tooltip';
33
- import { MenuItem } from '@exhaustive-ui/core/api';
34
35
 
35
36
  @Component({
36
37
  template: `
@@ -51,11 +52,31 @@ import { MenuItem } from '@exhaustive-ui/core/api';
51
52
  </div>
52
53
  `,
53
54
  standalone: true,
54
- imports: [DockModule, RadioButtonModule, TooltipModule, FormsModule]
55
+ imports: [CommonModule, FormsModule, DockModule, RadioButtonModule, TooltipModule]
55
56
  })
56
57
  export class DockBasicDemo implements OnInit {
57
58
  items: MenuItem[] | undefined;
58
- positionOptions: any[];
59
+
60
+ position: 'left' | 'right' | 'top' | 'bottom' = 'bottom';
61
+
62
+ positionOptions = [
63
+ {
64
+ label: 'Bottom',
65
+ value: 'bottom'
66
+ },
67
+ {
68
+ label: 'Top',
69
+ value: 'top'
70
+ },
71
+ {
72
+ label: 'Left',
73
+ value: 'left'
74
+ },
75
+ {
76
+ label: 'Right',
77
+ value: 'right'
78
+ }
79
+ ];
59
80
 
60
81
  ngOnInit() {
61
82
  this.items = [
@@ -28,7 +28,9 @@ pDroppable directive apply droppable behavior to any element.
28
28
  ## Example: Basic
29
29
 
30
30
  ```typescript
31
+ import { CommonModule } from '@angular/common';
31
32
  import { Component, OnInit } from '@angular/core';
33
+ import { DragDropModule } from '@exhaustive-ui/core/dragdrop';
32
34
  import { Product } from '@/domain/product';
33
35
 
34
36
  @Component({
@@ -52,11 +54,13 @@ import { Product } from '@/domain/product';
52
54
  </div>
53
55
  `,
54
56
  standalone: true,
55
- imports: []
57
+ imports: [CommonModule, DragDropModule]
56
58
  })
57
59
  export class DragdropBasicDemo implements OnInit {
58
60
  availableProducts: Product[] | undefined;
61
+
59
62
  selectedProducts: Product[] | undefined;
63
+
60
64
  draggedProduct: Product | undefined | null;
61
65
 
62
66
  ngOnInit() {
@@ -34,8 +34,8 @@ Templates (`<ng-template #name let-…>` inside the element):
34
34
 
35
35
  ```typescript
36
36
  import { Component } from '@angular/core';
37
- import { ButtonModule } from '@exhaustive-ui/core/button';
38
37
  import { DrawerModule } from '@exhaustive-ui/core/drawer';
38
+ import { ButtonModule } from '@exhaustive-ui/core/button';
39
39
 
40
40
  @Component({
41
41
  template: `
@@ -46,11 +46,11 @@ import { DrawerModule } from '@exhaustive-ui/core/drawer';
46
46
  consequat.
47
47
  </p>
48
48
  </p-drawer>
49
- <p-button (click)="visible = true" icon="pi pi-arrow-right" />
49
+ <p-button (click)="visible = true" icon="pi pi-arrow-right" ariaLabel="Open drawer" />
50
50
  </div>
51
51
  `,
52
52
  standalone: true,
53
- imports: [ButtonModule, DrawerModule]
53
+ imports: [DrawerModule, ButtonModule]
54
54
  })
55
55
  export class DrawerBasicDemo {
56
56
  visible: boolean = false;
@@ -3,20 +3,39 @@
3
3
  Dialogs can be created dynamically with any component as the content using a DialogService.
4
4
 
5
5
  ```typescript
6
- import { DynamicDialog } from '@exhaustive-ui/core/dynamicdialog'; // standalone; or DynamicDialogModule for all its parts
6
+ import { DialogService } from '@exhaustive-ui/core/dynamicdialog';
7
7
  ```
8
8
 
9
- ## `p-dynamic-dialog` (also `p-dynamicDialog`, `p-dynamicdialog`, legacy): DynamicDialog
9
+ ## Service `DialogService`
10
+
11
+ Provide it (`providers: [DialogService]`) and inject it; it renders the component for you.
12
+
13
+ ### `DynamicDialogConfig`
14
+
15
+ Dialogs can be created dynamically with any component as the content using a DialogService.
16
+
17
+ - Members: `data`, `inputValues`, `header`, `ariaLabelledBy`, `footer`, `width`, `height`, `closeOnEscape`, `focusOnShow`, `focusTrap`, `baseZIndex`, `autoZIndex`, `dismissableMask`, `style`, `contentStyle`, `styleClass`, `closable`, `showHeader`, `modal`, `maskStyleClass`, `resizable`, `draggable`, `keepInViewport`, `minX`, `minY`, `maximizable`, `maximizeIcon`, `minimizeIcon`, `position`, `closeAriaLabel`, `appendTo`, `duplicate`, `breakpoints`, `templates`.
18
+
19
+ ### `DynamicDialogInjector`
20
+
21
+ - Members: `get()`.
22
+
23
+ ### `DynamicDialogRef`
24
+
25
+ Dynamic Dialog instance.
26
+
27
+ - Members: `close()`, `destroy()`, `dragStart()`, `dragEnd()`, `resizeInit()`, `resizeEnd()`, `maximize()`, `onClose`, `onDestroy`, `onDragStart`, `onDragEnd`, `onResizeInit`, `onResizeEnd`, `onMaximize`, `onChildComponentLoaded`.
10
28
 
11
29
  ## Example: Example
12
30
 
13
31
  ```typescript
14
- import { Component, inject } from '@angular/core';
32
+ import { Component, OnDestroy, inject } from '@angular/core';
33
+ import { MessageService } from '@exhaustive-ui/core/api';
15
34
  import { ButtonModule } from '@exhaustive-ui/core/button';
35
+ import { DialogService, DynamicDialogRef } from '@exhaustive-ui/core/dynamicdialog';
16
36
  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';
37
+ import { Footer } from './demo/footer';
38
+ import { ProductListDemo } from './demo/productlistdemo';
20
39
 
21
40
  @Component({
22
41
  template: `
@@ -26,12 +45,20 @@ import { Dialog } from '@exhaustive-ui/core/dialog';
26
45
  </div>
27
46
  `,
28
47
  standalone: true,
29
- imports: [ButtonModule, ToastModule],
48
+ imports: [ToastModule, ButtonModule],
30
49
  providers: [DialogService, MessageService]
31
50
  })
32
- export class DynamicdialogExampleDemo {
33
- private dialogService = inject(DialogService);
34
- private messageService = inject(MessageService);
51
+ export class DynamicdialogExampleDemo implements OnDestroy {
52
+ public dialogService = inject(DialogService);
53
+ public messageService = inject(MessageService);
54
+
55
+ ref: DynamicDialogRef | undefined;
56
+
57
+ ngOnDestroy() {
58
+ if (this.ref) {
59
+ this.ref.close();
60
+ }
61
+ }
35
62
 
36
63
  show() {
37
64
  this.ref = this.dialogService.open(ProductListDemo, {
@@ -48,8 +75,8 @@ export class DynamicdialogExampleDemo {
48
75
  footer: Footer
49
76
  }
50
77
  });
51
-
52
- this.ref.onClose.subscribe((data: any) => {
78
+
79
+ this.ref?.onClose.subscribe((data: any) => {
53
80
  let summary_and_detail;
54
81
  if (data) {
55
82
  const buttonType = data?.buttonType;
@@ -59,8 +86,8 @@ export class DynamicdialogExampleDemo {
59
86
  }
60
87
  this.messageService.add({ severity: 'info', ...summary_and_detail, life: 3000 });
61
88
  });
62
-
63
- this.ref.onMaximize.subscribe((value) => {
89
+
90
+ this.ref?.onMaximize.subscribe((value) => {
64
91
  this.messageService.add({
65
92
  severity: 'info',
66
93
  summary: 'Maximized',
@@ -43,7 +43,7 @@ import { EditorModule } from '@exhaustive-ui/core/editor';
43
43
  </div>
44
44
  `,
45
45
  standalone: true,
46
- imports: [EditorModule, FormsModule]
46
+ imports: [FormsModule, EditorModule]
47
47
  })
48
48
  export class EditorBasicDemo {
49
49
  text: string | undefined;
@@ -45,7 +45,8 @@ import { FieldsetModule } from '@exhaustive-ui/core/fieldset';
45
45
  standalone: true,
46
46
  imports: [FieldsetModule]
47
47
  })
48
- export class FieldsetBasicDemo {}
48
+ export class FieldsetBasicDemo {
49
+ }
49
50
  ```
50
51
 
51
52
  Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
@@ -60,7 +60,7 @@ import { FileInputModule } from '@exhaustive-ui/core/fileinput';
60
60
  </div>
61
61
  `,
62
62
  standalone: true,
63
- imports: [FileInputModule, FormsModule]
63
+ imports: [FormsModule, FileInputModule]
64
64
  })
65
65
  export class FileinputBasicDemo {
66
66
  files: File[] = [];
@@ -48,19 +48,14 @@ Templates (`<ng-template #name let-…>` inside the element):
48
48
 
49
49
  Read a context with `let-`: `<ng-template #file let-item let-ngForOf="ngForOf" let-index="index">` (`$implicit` is the bare `let-x`).
50
50
 
51
- ### `[pFileContent]`: FileContent
52
-
53
- - Inputs: `badgeSeverity`, `badgeValue`, `fileRemoveIconTemplate`, `files`, `previewWidth`.
54
- - Outputs: `(onRemove)`.
55
-
56
51
  ## Example: Basic
57
52
 
58
53
  ```typescript
59
54
  import { Component, inject } from '@angular/core';
60
- import { ButtonModule } from '@exhaustive-ui/core/button';
55
+ import { MessageService } from '@exhaustive-ui/core/api';
61
56
  import { FileUploadModule } from '@exhaustive-ui/core/fileupload';
62
57
  import { ToastModule } from '@exhaustive-ui/core/toast';
63
- import { MessageService } from '@exhaustive-ui/core/api';
58
+ import { ButtonModule } from '@exhaustive-ui/core/button';
64
59
 
65
60
  interface UploadEvent {
66
61
  originalEvent: Event;
@@ -76,11 +71,15 @@ interface UploadEvent {
76
71
  </div>
77
72
  `,
78
73
  standalone: true,
79
- imports: [ButtonModule, FileUploadModule, ToastModule],
74
+ imports: [FileUploadModule, ToastModule, ButtonModule],
80
75
  providers: [MessageService]
81
76
  })
82
77
  export class FileuploadBasicDemo {
83
78
  private messageService = inject(MessageService);
79
+
80
+ onUpload(event: UploadEvent) {
81
+ this.messageService.add({ severity: 'info', summary: 'Success', detail: 'File Uploaded with Basic Mode' });
82
+ }
84
83
  }
85
84
  ```
86
85
 
@@ -29,7 +29,7 @@ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
29
29
  </div>
30
30
  `,
31
31
  standalone: true,
32
- imports: [FloatLabelModule, InputTextModule, FormsModule]
32
+ imports: [FormsModule, FloatLabelModule, InputTextModule]
33
33
  })
34
34
  export class FloatlabelBasicDemo {
35
35
  value: string | undefined;
@@ -12,6 +12,7 @@ import { Fluid } from '@exhaustive-ui/core/fluid'; // standalone; or FluidModule
12
12
 
13
13
  ```typescript
14
14
  import { Component } from '@angular/core';
15
+ import { Fluid } from '@exhaustive-ui/core/fluid';
15
16
  import { InputTextModule } from '@exhaustive-ui/core/inputtext';
16
17
 
17
18
  @Component({
@@ -28,18 +29,19 @@ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
28
29
  <p-fluid>
29
30
  <span class="font-bold mb-2 block">Fluid Container</span>
30
31
  <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>
32
+ <div><input type="text" pInputText aria-label="First name" /></div>
33
+ <div><input type="text" pInputText aria-label="Last name" /></div>
34
+ <div class="col-span-full"><input type="text" pInputText aria-label="Address" /></div>
34
35
  <div><input type="text" pInputText [fluid]="false" placeholder="Non-Fluid" /></div>
35
36
  </div>
36
37
  </p-fluid>
37
38
  </div>
38
39
  `,
39
40
  standalone: true,
40
- imports: [InputTextModule]
41
+ imports: [Fluid, InputTextModule]
41
42
  })
42
- export class FluidBasicDemo {}
43
+ export class FluidBasicDemo {
44
+ }
43
45
  ```
44
46
 
45
47
  Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
@@ -15,8 +15,10 @@ import { FocusTrap } from '@exhaustive-ui/core/focustrap'; // standalone; or Foc
15
15
  ```typescript
16
16
  import { Component } from '@angular/core';
17
17
  import { FormsModule } from '@angular/forms';
18
+ import { AutoFocusModule } from '@exhaustive-ui/core/autofocus';
18
19
  import { ButtonModule } from '@exhaustive-ui/core/button';
19
20
  import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
21
+ import { FocusTrapModule } from '@exhaustive-ui/core/focustrap';
20
22
  import { IconFieldModule } from '@exhaustive-ui/core/iconfield';
21
23
  import { InputIconModule } from '@exhaustive-ui/core/inputicon';
22
24
  import { InputTextModule } from '@exhaustive-ui/core/inputtext';
@@ -38,7 +40,7 @@ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
38
40
  <input type="text" pInputText id="email" [(ngModel)]="email" type="email" placeholder="Email" [fluid]="true" />
39
41
  </p-icon-field>
40
42
  <div class="flex items-center gap-2">
41
- <p-checkbox id="accept" [(ngModel)]="accept" name="accept" value="Accept" />
43
+ <p-checkbox inputId="accept" [(ngModel)]="accept" name="accept" value="Accept" />
42
44
  <label for="accept">I agree to the terms and conditions.</label>
43
45
  </div>
44
46
  <p-button type="submit" label="Submit" class="mt-2" styleClass="w-full" />
@@ -46,11 +48,13 @@ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
46
48
  </div>
47
49
  `,
48
50
  standalone: true,
49
- imports: [ButtonModule, CheckboxModule, IconFieldModule, InputIconModule, InputTextModule, FormsModule]
51
+ imports: [FormsModule, AutoFocusModule, ButtonModule, CheckboxModule, FocusTrapModule, IconFieldModule, InputIconModule, InputTextModule]
50
52
  })
51
53
  export class FocustrapBasicDemo {
52
54
  name: string = '';
55
+
53
56
  email: string = '';
57
+
54
58
  accept: boolean = false;
55
59
  }
56
60
  ```
@@ -42,29 +42,11 @@ Templates (`<ng-template #name let-…>` inside the element):
42
42
 
43
43
  Read a context with `let-`: `<ng-template #indicator let-item>` (`$implicit` is the bare `let-x`).
44
44
 
45
- ### `div[pGalleriaContent]`: GalleriaContent
46
-
47
- - Inputs: `activeIndex`, `numVisible`, `value`.
48
- - Outputs: `(activeItemChange)`, `(maskHide)`.
49
-
50
- ### `div[pGalleriaItem]`: GalleriaItem
51
-
52
- - Inputs: `activeIndex`, `autoPlay`, `captionFacet`, `changeItemOnIndicatorHover`, `circular`, `id`, `indicatorFacet`, `showIndicators`, `showItemNavigators`, `slideShowActive`, `templates`, `value`.
53
- - Outputs: `(onActiveIndexChange)`, `(startSlideShow)`, `(stopSlideShow)`.
54
-
55
- ### `div[pGalleriaItemSlot]`: GalleriaItemSlot
56
-
57
- - Inputs: `index`, `item`, `templates`, `type`.
58
-
59
- ### `div[pGalleriaThumbnails]`: GalleriaThumbnails
60
-
61
- - Inputs: `activeIndex`, `circular`, `containerId`, `contentHeight`, `isVertical`, `numVisible`, `responsiveOptions`, `showThumbnailNavigators`, `slideShowActive`, `templates`, `value`.
62
- - Outputs: `(onActiveIndexChange)`, `(stopSlideShow)`.
63
-
64
45
  ## Example: Basic
65
46
 
66
47
  ```typescript
67
- import { Component, OnInit, inject } from '@angular/core';
48
+ import { Component, inject, model, OnInit } from '@angular/core';
49
+ import { CommonModule } from '@angular/common';
68
50
  import { GalleriaModule } from '@exhaustive-ui/core/galleria';
69
51
  import { PhotoService } from '@/service/photoservice';
70
52
 
@@ -73,22 +55,33 @@ import { PhotoService } from '@/service/photoservice';
73
55
  <div class="card">
74
56
  <p-galleria [value]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5">
75
57
  <ng-template #item let-item>
76
- <img [src]="item.itemImageSrc" style="width:100%" />
58
+ <img [src]="item.itemImageSrc" [alt]="item.alt" style="width:100%" />
77
59
  </ng-template>
78
60
  <ng-template #thumbnail let-item>
79
- <img [src]="item.thumbnailImageSrc" />
61
+ <img [src]="item.thumbnailImageSrc" [alt]="item.alt" />
80
62
  </ng-template>
81
63
  </p-galleria>
82
64
  </div>
83
65
  `,
84
66
  standalone: true,
85
- imports: [GalleriaModule],
67
+ imports: [CommonModule, GalleriaModule],
86
68
  providers: [PhotoService]
87
69
  })
88
70
  export class GalleriaBasicDemo implements OnInit {
89
71
  private photoService = inject(PhotoService);
90
- images: any = model([]);
91
- responsiveOptions: any[];
72
+
73
+ images = model([]);
74
+
75
+ responsiveOptions: any[] = [
76
+ {
77
+ breakpoint: '1300px',
78
+ numVisible: 4
79
+ },
80
+ {
81
+ breakpoint: '575px',
82
+ numVisible: 1
83
+ }
84
+ ];
92
85
 
93
86
  ngOnInit() {
94
87
  this.photoService.getImages().then((images) => this.images.set(images));
@@ -28,7 +28,7 @@ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
28
28
  <input type="text" pInputText placeholder="Search" />
29
29
  </p-icon-field>
30
30
  <p-icon-field>
31
- <input type="text" pInputText />
31
+ <input type="text" pInputText aria-label="Username" />
32
32
  <p-input-icon class="pi pi-spinner pi-spin" />
33
33
  </p-icon-field>
34
34
  </div>
@@ -36,7 +36,8 @@ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
36
36
  standalone: true,
37
37
  imports: [IconFieldModule, InputIconModule, InputTextModule]
38
38
  })
39
- export class IconfieldBasicDemo {}
39
+ export class IconfieldBasicDemo {
40
+ }
40
41
  ```
41
42
 
42
43
  Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
@@ -26,7 +26,7 @@ import { InputTextModule } from '@exhaustive-ui/core/inputtext';
26
26
  </div>
27
27
  `,
28
28
  standalone: true,
29
- imports: [IftaLabelModule, InputTextModule, FormsModule]
29
+ imports: [FormsModule, IftaLabelModule, InputTextModule]
30
30
  })
31
31
  export class IftalabelBasicDemo {
32
32
  value: string | undefined;
@@ -37,6 +37,7 @@ Read a context with `let-`: `<ng-template #preview let-class="class" let-style="
37
37
 
38
38
  ```typescript
39
39
  import { Component } from '@angular/core';
40
+ import { RouterModule } from '@angular/router';
40
41
  import { ImageModule } from '@exhaustive-ui/core/image';
41
42
 
42
43
  @Component({
@@ -46,9 +47,10 @@ import { ImageModule } from '@exhaustive-ui/core/image';
46
47
  </div>
47
48
  `,
48
49
  standalone: true,
49
- imports: [ImageModule]
50
+ imports: [ImageModule, RouterModule]
50
51
  })
51
- export class ImageBasicDemo {}
52
+ export class ImageBasicDemo {
53
+ }
52
54
  ```
53
55
 
54
56
  Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
@@ -25,10 +25,10 @@ import { ImageCompareModule } from '@exhaustive-ui/core/imagecompare';
25
25
  <div class="card flex justify-center">
26
26
  <p-image-compare class="shadow-lg rounded-2xl">
27
27
  <ng-template #left>
28
- <img src="https://exhaustive-ui.com/demo/compare/island1.jpg" />
28
+ <img src="https://exhaustive-ui.com/demo/compare/island1.jpg" alt="Island, before" />
29
29
  </ng-template>
30
30
  <ng-template #right>
31
- <img src="https://exhaustive-ui.com/demo/compare/island2.jpg" />
31
+ <img src="https://exhaustive-ui.com/demo/compare/island2.jpg" alt="Island, after" />
32
32
  </ng-template>
33
33
  </p-image-compare>
34
34
  </div>
@@ -36,7 +36,8 @@ import { ImageCompareModule } from '@exhaustive-ui/core/imagecompare';
36
36
  standalone: true,
37
37
  imports: [ImageCompareModule]
38
38
  })
39
- export class ImagecompareBasicDemo {}
39
+ export class ImagecompareBasicDemo {
40
+ }
40
41
  ```
41
42
 
42
43
  Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.
@@ -47,7 +47,8 @@ import { InplaceModule } from '@exhaustive-ui/core/inplace';
47
47
  standalone: true,
48
48
  imports: [InplaceModule]
49
49
  })
50
- export class InplaceBasicDemo {}
50
+ export class InplaceBasicDemo {
51
+ }
51
52
  ```
52
53
 
53
54
  Every component and directive also accepts `pt` (pass through attributes), `ptOptions`, `dt` (design tokens) and `unstyled`.