@exhaustive-ui/mcp 0.0.0-stage → 22.0.0-alpha.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 (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,217 @@
1
+ # Overlay API
2
+
3
+ This API allows overlay components to be controlled from the ExhaustiveUI. In this way, all overlay components in the application can have the same behavior.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader Overlay component uses dialog role and since any attribute is passed to the root element you may define attributes like aria-label or aria-labelledby to describe the popup contents. In addition aria-modal is added since focus is kept within the popup. It is recommended to use a trigger component that can be accessed with keyboard such as a button, if not adding tabIndex would be necessary. Overlay adds aria-expanded state attribute and aria-controls to the trigger so that the relation between the trigger and the popup is defined. Overlay Keyboard Support When the popup gets opened, the first focusable element receives the focus and this can be customized by adding autofocus to an element within the popup. Key Function tab Moves focus to the next the focusable element within the popup. shift + tab Moves focus to the previous the focusable element within the popup. escape Closes the popup and moves focus to the trigger. Close Button Keyboard Support Key Function enter Closes the popup and moves focus to the trigger. space Closes the popup and moves focus to the trigger.
8
+
9
+ ## appendto-doc
10
+
11
+ Overlay can be mounted into its location, body or DOM element instance using this option.
12
+
13
+ ## autozindex-doc
14
+
15
+ The autoZIndex determines whether to automatically manage layering. Its default value is 'false'.
16
+
17
+ ## basezindex-doc
18
+
19
+ The baseZIndex is base zIndex value to use in layering. Its default value is 0.
20
+
21
+ ## Basic
22
+
23
+ Overlay is a container to display content in an overlay window. All the options mentioned above can be used as props for this component.
24
+
25
+ ```typescript
26
+ import { Component } from '@angular/core';
27
+ import { ButtonModule } from '@exhaustive-ui/core/button';
28
+
29
+ @Component({
30
+ template: `
31
+ <div class="card flex justify-center">
32
+ <p-button (click)="toggle()" label="Show Overlay"></p-button>
33
+ <p-overlay [(visible)]="overlayVisible" [responsive]="{ breakpoint: '640px', direction: 'bottom', contentStyleClass: 'h-20rem' }" contentStyleClass="p-6 bg-surface-0 dark:bg-surface-900 shadow rounded-border"> Content </p-overlay>
34
+ </div>
35
+ `,
36
+ standalone: true,
37
+ imports: [ButtonModule]
38
+ })
39
+ export class OverlayBasicDemo {
40
+ overlayVisible: boolean = false;
41
+
42
+ toggle() {
43
+ this.overlayVisible = !this.overlayVisible;
44
+ }
45
+ }
46
+ ```
47
+
48
+ ## Events
49
+
50
+ ```typescript
51
+ import { Component } from '@angular/core';
52
+
53
+ @Component({
54
+ template: `
55
+ <section class="py-6">
56
+ </section>
57
+ `,
58
+ standalone: true,
59
+ imports: []
60
+ })
61
+ export class OverlayEventsDemo {}
62
+ ```
63
+
64
+ ## hideonescape-doc
65
+
66
+ The hideOnEscape determines to hide the overlay when escape key pressed. Accepts boolean, default value is false .
67
+
68
+ ## Mode
69
+
70
+ It has two valid values; overlay and modal . In overlay mode, a container element is opened like overlaypanel or dropdown's panel. In modal mode, the container element behaves like popup. This behaviour is similar to a dialog component.
71
+
72
+ ## Responsive
73
+
74
+ It is the option used to determine in which mode it should appear according to the given media or breakpoint .
75
+
76
+ ```typescript
77
+ import { Component } from '@angular/core';
78
+
79
+ @Component({
80
+ template: `
81
+ <p class="doc-section-description">Valid values of the <i>direction</i> property would be;</p>
82
+ <div class="card">
83
+ <ul>
84
+ <li>center (default)</li>
85
+ <li>top</li>
86
+ <li>top-start</li>
87
+ <li>top-end</li>
88
+ <li>bottom</li>
89
+ <li>bottom-start</li>
90
+ <li>bottom-end</li>
91
+ <li>left</li>
92
+ <li>left-start</li>
93
+ <li>left-end</li>
94
+ <li>right</li>
95
+ <li>right-start</li>
96
+ <li>right-end</li>
97
+ </ul>
98
+ </div>
99
+ `,
100
+ standalone: true,
101
+ imports: []
102
+ })
103
+ export class OverlayResponsiveDemo {}
104
+ ```
105
+
106
+ ## Target
107
+
108
+ The target is used to detect the element that will be used to position the overlay. Valid values would be;
109
+
110
+ ```typescript
111
+ import { Component } from '@angular/core';
112
+
113
+ @Component({
114
+ template: `
115
+ <div class="card">
116
+ <ul>
117
+ <li>&#64;prev (default)</li>
118
+ <li>&#64;next</li>
119
+ <li>&#64;parent</li>
120
+ <li>&#64;grandparent</li>
121
+ <li>Use <em>CSS selector</em></li>
122
+ <li>Use <em>() =&gt; HTMLElement</em></li>
123
+ </ul>
124
+ </div>
125
+ `,
126
+ standalone: true,
127
+ imports: []
128
+ })
129
+ export class OverlayTargetDemo {}
130
+ ```
131
+
132
+ ## Template
133
+
134
+ Content can be customized with the content template.
135
+
136
+ ```typescript
137
+ import { Component } from '@angular/core';
138
+ import { ButtonModule } from '@exhaustive-ui/core/button';
139
+
140
+ @Component({
141
+ template: `
142
+ <div class="card flex justify-center">
143
+ <p-button (click)="toggle()" label="Show Overlay"></p-button>
144
+ <p-overlay [(visible)]="overlayVisible" [responsive]="{ breakpoint: '640px', direction: 'bottom', contentStyleClass: 'h-20rem' }" contentStyleClass="p-6 bg-surface-0 dark:bg-surface-900 shadow rounded-border">
145
+ <ng-template #content let-option> Content - {{ option.mode }} </ng-template>
146
+ </p-overlay>
147
+ </div>
148
+ `,
149
+ standalone: true,
150
+ imports: [ButtonModule]
151
+ })
152
+ export class OverlayTemplateDemo {
153
+ overlayVisible: boolean = false;
154
+
155
+ toggle() {
156
+ this.overlayVisible = !this.overlayVisible;
157
+ }
158
+ }
159
+ ```
160
+
161
+ ## Overlay
162
+
163
+ This API allows overlay components to be controlled from Exhaustive. In this way, all overlay components in the application can have the same behavior.
164
+
165
+ ### Props
166
+
167
+ | Name | Type | Default | Description |
168
+ |------|------|---------|-------------|
169
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
170
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
171
+ | pt | InputSignal<any> | undefined | Used to pass attributes to DOM elements inside the component. |
172
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
173
+ | visible | ModelSignal<boolean> | false | The visible property is an input that determines the visibility of the component. Emits its new value whenever the visibility state of the component changes. |
174
+ | mode | InputSignal<string> | null | The mode property is an input that determines the overlay mode type or string. |
175
+ | style | InputSignal<{ [klass: string]: any }> | null | The style property is an input that determines the style object for the component. |
176
+ | styleClass | InputSignal<string> | null | The styleClass property is an input that determines the CSS class(es) for the component. |
177
+ | contentStyle | InputSignal<{ [klass: string]: any }> | null | The contentStyle property is an input that determines the style object for the content of the component. |
178
+ | contentStyleClass | InputSignal<string> | null | The contentStyleClass property is an input that determines the CSS class(es) for the content of the component. |
179
+ | target | InputSignal<string> | null | The target property is an input that specifies the target element or selector for the component. |
180
+ | autoZIndex | InputSignal<boolean> | false | The autoZIndex determines whether to automatically manage layering. Its default value is 'false'. |
181
+ | baseZIndex | InputSignal<number> | null | The baseZIndex is base zIndex value to use in layering. |
182
+ | listener | InputSignal<any> | null | The listener property is an input that specifies the listener object for the component. |
183
+ | responsive | InputSignal<ResponsiveOverlayOptions> | null | It is the option used to determine in which mode it should appear according to the given media or breakpoint. |
184
+ | options | InputSignal<OverlayOptions> | null | The options property is an input that specifies the overlay options for the component. |
185
+ | appendTo | InputSignal<any> | 'self' | 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. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
186
+ | inline | InputSignal<boolean> | false | Specifies whether the overlay should be rendered inline within the current component's template. |
187
+ | motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
188
+
189
+ ### Emits
190
+
191
+ | Name | Parameters | Description |
192
+ |------|------------|-------------|
193
+ | onBeforeShow | event: OverlayOnBeforeShowEvent | Callback to invoke before the overlay is shown. |
194
+ | onShow | event: OverlayOnShowEvent | Callback to invoke when the overlay is shown. |
195
+ | onBeforeHide | event: OverlayOnBeforeHideEvent | Callback to invoke before the overlay is hidden. |
196
+ | onHide | event: OverlayOnHideEvent | Callback to invoke when the overlay is hidden |
197
+ | onBeforeEnter | event: MotionEvent | Callback to invoke before the overlay enters. |
198
+ | onEnter | event: MotionEvent | Callback to invoke when the overlay enters. |
199
+ | onAfterEnter | event: MotionEvent | Callback to invoke after the overlay has entered. |
200
+ | onBeforeLeave | event: MotionEvent | Callback to invoke before the overlay leaves. |
201
+ | onLeave | event: MotionEvent | Callback to invoke when the overlay leaves. |
202
+ | onAfterLeave | event: MotionEvent | Callback to invoke after the overlay has left. |
203
+
204
+ ### Templates
205
+
206
+ | Name | Type | Description |
207
+ |------|------|-------------|
208
+ | content | TemplateRef<OverlayContentTemplateContext> | Content template of the component. |
209
+
210
+ ## Pass Through Options
211
+
212
+ | Name | Type | Description |
213
+ |------|------|-------------|
214
+ | root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
215
+ | content | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the content's DOM element. |
216
+ | motion | MotionOptions | Used to pass options to the motion component/directive. |
217
+
@@ -0,0 +1,314 @@
1
+ # Angular Paginator Component
2
+
3
+ Paginator displays data in paged format and provides navigation between pages.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader Paginator is placed inside a nav element to indicate a navigation section. All of the paginator elements can be customized using templating however the default behavious is listed below. First, previous, next and last page navigators elements with aria-label attributes referring to the aria.firstPageLabel , aria.prevPageLabel , aria.nextPageLabel and aria.lastPageLabel properties of the locale API respectively. Page links are also button elements with an aria-label attribute derived from the aria.pageLabel of the locale API. Current page is marked with aria-current set to "page" as well. Current page report uses aria-live="polite" to instruct screen reader about the changes to the pagination state. Rows per page dropdown internally uses a Select component, refer to the Select documentation for accessibility details. Additionally, the Select uses an aria-label from the aria.rowsPerPage property of the locale API. Jump to page input is an input element with an aria-label that refers to the aria.jumpToPage property of the locale API. Keyboard Support Key Function tab Moves focus through the paginator elements. enter Executes the paginator element action. space Executes the paginator element action. Rows Per Page Dropdown Keyboard Support Refer to the Select documentation for more details about keyboard support.
8
+
9
+ ## Basic
10
+
11
+ Paginator is used as a controlled component with first , rows and onPageChange properties to manage the first index and number of records to display per page. Total number of records need to be with totalRecords property. Default template includes a dropdown to change the rows so rowsPerPageOptions is also necessary for the dropdown options.
12
+
13
+ ```typescript
14
+ import { Component } from '@angular/core';
15
+ import { Paginator, PaginatorModule } from '@exhaustive-ui/core/paginator';
16
+
17
+ @Component({
18
+ template: `
19
+ <div class="card flex justify-center">
20
+ <p-paginator (onPageChange)="onPageChange($event)" [first]="first" [rows]="rows" [totalRecords]="120" [rowsPerPageOptions]="[10, 20, 30]" />
21
+ </div>
22
+ `,
23
+ standalone: true,
24
+ imports: [PaginatorModule]
25
+ })
26
+ export class PaginatorBasicDemo {
27
+ first: number = 0;
28
+ rows: number = 10;
29
+
30
+ onPageChange(event: PaginatorState) {
31
+ this.first = event.first ?? 0;
32
+ this.rows = event.rows ?? 10;
33
+ }
34
+ }
35
+ ```
36
+
37
+ ## currentpagereport-doc
38
+
39
+ Current page report item in the template displays information about the pagination state. Default value is ({{ '{' }}currentPage{{ '}' }} of {{ '{' }}totalPages{{ '}' }}) whereas available placeholders are the following; {{ '{' }}currentPage{{ '}' }} {{ '{' }}totalPages{{ '}' }} {{ '{' }}rows{{ '}' }} {{ '{' }}first{{ '}' }} {{ '{' }}last{{ '}' }} {{ '{' }}totalRecords{{ '}' }}
40
+
41
+ ```typescript
42
+ import { Component } from '@angular/core';
43
+ import { PaginatorModule } from '@exhaustive-ui/core/paginator';
44
+
45
+ @Component({
46
+ template: `
47
+ <div class="card flex justify-center">
48
+ <p-paginator
49
+ (onPageChange)="onPageChange($event)"
50
+ [first]="first"
51
+ [rows]="rows"
52
+ [totalRecords]="120"
53
+ [showCurrentPageReport]="true"
54
+ [showPageLinks]="false"
55
+ [showJumpToPageDropdown]="false"
56
+ currentPageReportTemplate="Showing {first} to {last} of {totalRecords}"
57
+ />
58
+ </div>
59
+ `,
60
+ standalone: true,
61
+ imports: [PaginatorModule]
62
+ })
63
+ export class PaginatorCurrentpagereportDemo {
64
+ first: number = 0;
65
+ rows: number = 10;
66
+
67
+ onPageChange(event: PaginatorState) {
68
+ this.first = event.first ?? 0;
69
+ this.rows = event.rows ?? 10;
70
+ }
71
+ }
72
+ ```
73
+
74
+ ## Images
75
+
76
+ Sample image gallery implementation using paginator.
77
+
78
+ ```typescript
79
+ import { Component } from '@angular/core';
80
+ import { PaginatorModule } from '@exhaustive-ui/core/paginator';
81
+
82
+ @Component({
83
+ template: `
84
+ <div class="card flex flex-col gap-4 justify-center items-center">
85
+ <p-paginator [first]="first" [rows]="1" [totalRecords]="12" (onPageChange)="onPageChange($event)" [showJumpToPageDropdown]="true" [showPageLinks]="false"></p-paginator>
86
+ <img [src]="'https://exhaustive-ui.e-xiste.com/demo/nature/nature' + (first + 1) + '.jpg'" class="max-w-full rounded-xl" />
87
+ </div>
88
+ `,
89
+ standalone: true,
90
+ imports: [PaginatorModule]
91
+ })
92
+ export class PaginatorImagesDemo {
93
+ first: number = 0;
94
+ rows: number = 10;
95
+
96
+ onPageChange(event: PaginatorState) {
97
+ this.first = event.first ?? 0;
98
+ this.rows = event.rows ?? 10;
99
+ }
100
+ }
101
+ ```
102
+
103
+ ## Template
104
+
105
+ Templating allows overriding the default content of the UI elements by defining callbacks using the element name.
106
+
107
+ ```typescript
108
+ import { Component } from '@angular/core';
109
+ import { FormsModule } from '@angular/forms';
110
+ import { ButtonModule } from '@exhaustive-ui/core/button';
111
+ import { DividerModule } from '@exhaustive-ui/core/divider';
112
+ import { SelectModule } from '@exhaustive-ui/core/select';
113
+ import { PaginatorModule } from '@exhaustive-ui/core/paginator';
114
+ import { SliderModule } from '@exhaustive-ui/core/slider';
115
+
116
+ @Component({
117
+ template: `
118
+ <div class="card flex flex-col gap-4">
119
+ <div class="flex items-center justify-center">
120
+ <div>
121
+ <p-button icon="pi pi-star" outlined />
122
+ </div>
123
+ <div class="flex-1">
124
+ <p-paginator (onPageChange)="onPageChange1($event)" [first]="first1" [rows]="rows1" [totalRecords]="120" [rowsPerPageOptions]="[10, 20, 30]" [showFirstLastIcon]="false" />
125
+ </div>
126
+ <div class="justify-end">
127
+ <p-button icon="pi pi-search" />
128
+ </div>
129
+ </div>
130
+ <p-divider />
131
+ <div class="flex items-center justify-end">
132
+ <span class="mx-1 text-color">Items per page: </span>
133
+ <p-select [options]="options" optionLabel="label" optionValue="value" [(ngModel)]="rows2" (ngModelChange)="first2 = 0" />
134
+ <p-paginator
135
+ [first]="first2"
136
+ [rows]="rows2"
137
+ [totalRecords]="120"
138
+ (onPageChange)="onPageChange2($event)"
139
+ [showCurrentPageReport]="true"
140
+ currentPageReportTemplate="{first} - {last} of {totalRecords}"
141
+ [showPageLinks]="false"
142
+ [showFirstLastIcon]="false"
143
+ ></p-paginator>
144
+ </div>
145
+ <p-divider />
146
+ <div class="flex items-center justify-start">
147
+ <div class="flex justify-center items-center gap-4">
148
+ <span>Items per page: </span>
149
+ <p-slider [(ngModel)]="rows3" (ngModelChange)="first3 = 0" [style]="{ width: '10rem' }" [min]="10" [max]="120" [step]="30" />
150
+ </div>
151
+ <p-paginator
152
+ (onPageChange)="onPageChange3($event)"
153
+ [first]="first3"
154
+ [rows]="rows3"
155
+ [totalRecords]="totalRecords"
156
+ [showFirstLastIcon]="false"
157
+ [showCurrentPageReport]="true"
158
+ currentPageReportTemplate="{first} - {last} of {totalRecords}"
159
+ ></p-paginator>
160
+ </div>
161
+ </div>
162
+ `,
163
+ standalone: true,
164
+ imports: [ButtonModule, DividerModule, SelectModule, PaginatorModule, SliderModule, FormsModule]
165
+ })
166
+ export class PaginatorTemplateDemo {
167
+ first1: number = 0;
168
+ rows1: number = 10;
169
+ first2: number = 0;
170
+ rows2: number = 10;
171
+ first3: number = 0;
172
+ rows3: number = 10;
173
+ totalRecords: number = 120;
174
+ options: any[];
175
+
176
+ onPageChange1(event: PaginatorState) {
177
+ this.first1 = event.first ?? 0;
178
+ this.rows1 = event.rows ?? 10;
179
+ }
180
+
181
+ onPageChange2(event: PaginatorState) {
182
+ this.first2 = event.first ?? 0;
183
+ this.rows2 = event.rows ?? 10;
184
+ }
185
+
186
+ onPageChange3(event: PaginatorState) {
187
+ this.first3 = event.first ?? 0;
188
+ this.rows3 = event.rows ?? 10;
189
+ }
190
+ }
191
+ ```
192
+
193
+ ## Paginator
194
+
195
+ Paginator is a generic component to display content in paged format.
196
+
197
+ ### Props
198
+
199
+ | Name | Type | Default | Description |
200
+ |------|------|---------|-------------|
201
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
202
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
203
+ | pt | InputSignal<PaginatorPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
204
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
205
+ | pageLinkSize | InputSignalWithTransform<number, unknown> | ... | Number of page links to display. |
206
+ | alwaysShow | InputSignalWithTransform<boolean, unknown> | ... | Whether to show it even there is only one page. |
207
+ | templateLeft | InputSignal<TemplateRef<PaginatorTemplateContext>> | ... | Template instance to inject into the left side of the paginator. |
208
+ | templateRight | InputSignal<TemplateRef<PaginatorTemplateContext>> | ... | Template instance to inject into the right side of the paginator. |
209
+ | dropdownScrollHeight | InputSignal<string> | ... | Dropdown height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value. |
210
+ | currentPageReportTemplate | InputSignal<string> | ... | Template of the current page report element. Available placeholders are {currentPage},{totalPages},{rows},{first},{last} and {totalRecords} |
211
+ | showCurrentPageReport | InputSignalWithTransform<boolean, unknown> | ... | Whether to display current page report. |
212
+ | showFirstLastIcon | InputSignalWithTransform<boolean, unknown> | ... | When enabled, icons are displayed on paginator to go first and last page. |
213
+ | totalRecords | InputSignalWithTransform<number, unknown> | ... | Number of total records. |
214
+ | rows | InputSignalWithTransform<number, unknown> | ... | Data count to display per page. |
215
+ | rowsPerPageOptions | InputSignal<any[]> | ... | Array of integer/object values to display inside rows per page dropdown. A object that have 'showAll' key can be added to it to show all data. Exp; [10,20,30,{showAll:'All'}] |
216
+ | showJumpToPageDropdown | InputSignalWithTransform<boolean, unknown> | ... | Whether to display a dropdown to navigate to any page. |
217
+ | showJumpToPageInput | InputSignalWithTransform<boolean, unknown> | ... | Whether to display a input to navigate to any page. |
218
+ | jumpToPageItemTemplate | InputSignal<TemplateRef<PaginatorDropdownItemTemplateContext>> | ... | Template instance to inject into the jump to page dropdown item inside in the paginator. |
219
+ | showPageLinks | InputSignalWithTransform<boolean, unknown> | ... | Whether to show page links. |
220
+ | locale | InputSignal<string> | ... | Locale to be used in formatting. |
221
+ | dropdownItemTemplate | InputSignal<TemplateRef<PaginatorDropdownItemTemplateContext>> | ... | Template instance to inject into the rows per page dropdown item inside in the paginator. |
222
+ | first | InputSignal<number> | ... | Zero-relative number of the first row to be displayed. |
223
+ | appendTo | InputSignal<any> | 'self' | 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. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
224
+
225
+ ### Emits
226
+
227
+ | Name | Parameters | Description |
228
+ |------|------------|-------------|
229
+ | onPageChange | value: PaginatorState | Callback to invoke when page changes, the event object contains information about the new state. |
230
+
231
+ ### Templates
232
+
233
+ | Name | Type | Description |
234
+ |------|------|-------------|
235
+ | dropdownicon | TemplateRef<void> | Template for the dropdown icon. |
236
+ | firstpagelinkicon | TemplateRef<void> | Template for the first page link icon. |
237
+ | previouspagelinkicon | TemplateRef<void> | Template for the previous page link icon. |
238
+ | lastpagelinkicon | TemplateRef<void> | Template for the last page link icon. |
239
+ | nextpagelinkicon | TemplateRef<void> | Template for the next page link icon. |
240
+
241
+ ## Pass Through Options
242
+
243
+ | Name | Type | Description |
244
+ |------|------|-------------|
245
+ | host | PassThroughOption<HTMLElement, I> | Used to pass attributes to the host's DOM element. |
246
+ | root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
247
+ | contentStart | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the content start's DOM element. |
248
+ | current | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the current page report's DOM element. |
249
+ | first | PassThroughOption<HTMLButtonElement, I> | Used to pass attributes to the first page button's DOM element. |
250
+ | firstIcon | PassThroughOption<SVGElement, I> | Used to pass attributes to the first page button icon's DOM element. |
251
+ | prev | PassThroughOption<HTMLButtonElement, I> | Used to pass attributes to the previous page button's DOM element. |
252
+ | prevIcon | PassThroughOption<SVGElement, I> | Used to pass attributes to the previous page button icon's DOM element. |
253
+ | pages | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the pages container's DOM element. |
254
+ | page | PassThroughOption<HTMLButtonElement, I> | Used to pass attributes to the page button's DOM element. |
255
+ | next | PassThroughOption<HTMLButtonElement, I> | Used to pass attributes to the next page button's DOM element. |
256
+ | nextIcon | PassThroughOption<SVGElement, I> | Used to pass attributes to the next page button icon's DOM element. |
257
+ | last | PassThroughOption<HTMLButtonElement, I> | Used to pass attributes to the last page button's DOM element. |
258
+ | lastIcon | PassThroughOption<SVGElement, I> | Used to pass attributes to the last page button icon's DOM element. |
259
+ | contentEnd | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the content end's DOM element. |
260
+ | pcJumpToPageDropdown | SelectPassThrough | Used to pass attributes to the Select component (jump to page dropdown). |
261
+ | pcJumpToPageInput | InputNumberPassThrough | Used to pass attributes to the InputNumber component (jump to page input). |
262
+ | pcRowPerPageDropdown | SelectPassThrough | Used to pass attributes to the Select component (rows per page dropdown). |
263
+
264
+ ## Theming
265
+
266
+ ### CSS Classes
267
+
268
+ | Class | Description |
269
+ |-------|-------------|
270
+ | p-paginator | Class name of the paginator element |
271
+ | p-paginator-content-start | Class name of the content start element |
272
+ | p-paginator-content-end | Class name of the content end element |
273
+ | p-paginator-first | Class name of the first element |
274
+ | p-paginator-first-icon | Class name of the first icon element |
275
+ | p-paginator-prev | Class name of the prev element |
276
+ | p-paginator-prev-icon | Class name of the prev icon element |
277
+ | p-paginator-next | Class name of the next element |
278
+ | p-paginator-next-icon | Class name of the next icon element |
279
+ | p-paginator-last | Class name of the last element |
280
+ | p-paginator-last-icon | Class name of the last icon element |
281
+ | p-paginator-pages | Class name of the pages element |
282
+ | p-paginator-page | Class name of the page element |
283
+ | p-paginator-current | Class name of the current element |
284
+ | p-paginator-rpp-dropdown | Class name of the row per page dropdown element |
285
+ | p-paginator-jtp-dropdown | Class name of the jump to page dropdown element |
286
+ | p-paginator-jtp-input | Class name of the jump to page input element |
287
+
288
+ ### Design Tokens
289
+
290
+ | Token | CSS Variable | Description |
291
+ |-------|--------------|-------------|
292
+ | paginator.padding | --p-paginator-padding | Padding of root |
293
+ | paginator.gap | --p-paginator-gap | Gap of root |
294
+ | paginator.border.radius | --p-paginator-border-radius | Border radius of root |
295
+ | paginator.background | --p-paginator-background | Background of root |
296
+ | paginator.color | --p-paginator-color | Color of root |
297
+ | paginator.transition.duration | --p-paginator-transition-duration | Transition duration of root |
298
+ | paginator.nav.button.background | --p-paginator-nav-button-background | Background of nav button |
299
+ | paginator.nav.button.hover.background | --p-paginator-nav-button-hover-background | Hover background of nav button |
300
+ | paginator.nav.button.selected.background | --p-paginator-nav-button-selected-background | Selected background of nav button |
301
+ | paginator.nav.button.color | --p-paginator-nav-button-color | Color of nav button |
302
+ | paginator.nav.button.hover.color | --p-paginator-nav-button-hover-color | Hover color of nav button |
303
+ | paginator.nav.button.selected.color | --p-paginator-nav-button-selected-color | Selected color of nav button |
304
+ | paginator.nav.button.width | --p-paginator-nav-button-width | Width of nav button |
305
+ | paginator.nav.button.height | --p-paginator-nav-button-height | Height of nav button |
306
+ | paginator.nav.button.border.radius | --p-paginator-nav-button-border-radius | Border radius of nav button |
307
+ | paginator.nav.button.focus.ring.width | --p-paginator-nav-button-focus-ring-width | Focus ring width of nav button |
308
+ | paginator.nav.button.focus.ring.style | --p-paginator-nav-button-focus-ring-style | Focus ring style of nav button |
309
+ | paginator.nav.button.focus.ring.color | --p-paginator-nav-button-focus-ring-color | Focus ring color of nav button |
310
+ | paginator.nav.button.focus.ring.offset | --p-paginator-nav-button-focus-ring-offset | Focus ring offset of nav button |
311
+ | paginator.nav.button.focus.ring.shadow | --p-paginator-nav-button-focus-ring-shadow | Focus ring shadow of nav button |
312
+ | paginator.current.page.report.color | --p-paginator-current-page-report-color | Color of current page report |
313
+ | paginator.jump.to.page.input.max.width | --p-paginator-jump-to-page-input-max-width | Max width of jump to page input |
314
+