@aaamb/ngx-design-system 1.3.9 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/.editorconfig +17 -0
  2. package/.nvmrc +1 -0
  3. package/.postcssrc.json +5 -0
  4. package/.storybook/main.ts +20 -0
  5. package/.storybook/preview.ts +23 -0
  6. package/.storybook/storybook.css +1 -0
  7. package/.storybook/tsconfig.json +19 -0
  8. package/.vscode/extensions.json +4 -0
  9. package/.vscode/launch.json +20 -0
  10. package/.vscode/tasks.json +42 -0
  11. package/CHANGELOG.md +10 -0
  12. package/LOCAL_DEVELOPMENT.md +129 -0
  13. package/angular.json +74 -0
  14. package/bitbucket-pipelines.yml +41 -0
  15. package/iac/bin/app.ts +42 -0
  16. package/iac/cdk.json +82 -0
  17. package/iac/lib/config/environments.ts +19 -0
  18. package/iac/lib/config/types.ts +13 -0
  19. package/iac/lib/stacks/certificate-stack.ts +34 -0
  20. package/iac/lib/stacks/frontend-stack.ts +120 -0
  21. package/iac/lib/stacks/index.ts +2 -0
  22. package/iac/package-lock.json +726 -0
  23. package/iac/package.json +25 -0
  24. package/iac/tsconfig.json +24 -0
  25. package/ng-package.json +8 -0
  26. package/package.json +58 -14
  27. package/src/components/button/button-green.stories.ts +101 -0
  28. package/src/components/button/button-text.stories.ts +105 -0
  29. package/src/components/button/button-white.stories.ts +105 -0
  30. package/src/components/button/button.component.stories.ts +91 -0
  31. package/src/components/button/button.component.ts +93 -0
  32. package/src/components/checkbox/checkbox.component.html +30 -0
  33. package/src/components/checkbox/checkbox.component.stories.ts +183 -0
  34. package/src/components/checkbox/checkbox.component.ts +211 -0
  35. package/src/components/datepicker-selector/datepicker-selector.component.html +103 -0
  36. package/src/components/datepicker-selector/datepicker-selector.component.stories.ts +123 -0
  37. package/src/components/datepicker-selector/datepicker-selector.component.ts +337 -0
  38. package/src/components/error-message/error-message.component.html +3 -0
  39. package/src/components/error-message/error-message.component.ts +13 -0
  40. package/src/components/filter-button/filter-button.component.html +286 -0
  41. package/src/components/filter-button/filter-button.component.stories.ts +123 -0
  42. package/src/components/filter-button/filter-button.component.ts +582 -0
  43. package/src/components/icon/icon.component.ts +20 -0
  44. package/src/components/icon/icon.html +1424 -0
  45. package/src/components/icon/icon.stories.ts +49 -0
  46. package/src/components/icon/icons-list.stories.ts +42 -0
  47. package/src/components/input/input.component.stories.ts +101 -0
  48. package/src/components/input/input.component.ts +317 -0
  49. package/src/components/input/input.html +160 -0
  50. package/src/components/input-datepicker/input-datepicker.component.ts +356 -0
  51. package/src/components/input-datepicker/input-datepicker.html +69 -0
  52. package/src/components/input-datepicker/input-datepicker.stories.ts +99 -0
  53. package/src/components/input-rangepicker/input-rangepicker.component.ts +365 -0
  54. package/src/components/input-rangepicker/input-rangepicker.html +54 -0
  55. package/src/components/input-rangepicker/input-rangepicker.stories.ts +88 -0
  56. package/src/components/input-weekpicker/input-weekpicker.component.ts +417 -0
  57. package/src/components/input-weekpicker/input-weekpicker.html +54 -0
  58. package/src/components/input-weekpicker/input-weekpicker.stories.ts +103 -0
  59. package/src/components/label/label.component.html +20 -0
  60. package/src/components/label/label.component.ts +22 -0
  61. package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.html +32 -0
  62. package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.stories.ts +57 -0
  63. package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.ts +48 -0
  64. package/src/components/modals/feedback-modal/feedback-modal.component.html +118 -0
  65. package/src/components/modals/feedback-modal/feedback-modal.component.stories.ts +93 -0
  66. package/src/components/modals/feedback-modal/feedback-modal.component.ts +187 -0
  67. package/src/components/modals/help-modal/help-modal.component.html +32 -0
  68. package/src/components/modals/help-modal/help-modal.component.stories.ts +76 -0
  69. package/src/components/modals/help-modal/help-modal.component.ts +54 -0
  70. package/src/components/modals/information-modal/information-modal.component.html +24 -0
  71. package/src/components/modals/information-modal/information-modal.component.stories.ts +62 -0
  72. package/src/components/modals/information-modal/information-modal.component.ts +35 -0
  73. package/src/components/modals/main-modal/main-modal.component.html +85 -0
  74. package/src/components/modals/main-modal/main-modal.component.stories.ts +127 -0
  75. package/src/components/modals/main-modal/main-modal.component.ts +85 -0
  76. package/src/components/modals/notification-modal/notification-modal.component.html +22 -0
  77. package/src/components/modals/notification-modal/notification-modal.component.stories.ts +59 -0
  78. package/src/components/modals/notification-modal/notification-modal.component.ts +37 -0
  79. package/src/components/selectors/multiple-selector/multiple-selector.component.html +51 -0
  80. package/src/components/selectors/multiple-selector/multiple-selector.component.stories.ts +306 -0
  81. package/src/components/selectors/multiple-selector/multiple-selector.component.ts +308 -0
  82. package/src/components/selectors/single-selector/single-selector.component.html +46 -0
  83. package/src/components/selectors/single-selector/single-selector.component.stories.ts +294 -0
  84. package/src/components/selectors/single-selector/single-selector.component.ts +239 -0
  85. package/src/components/side-nav/side-nav.component.stories.ts +176 -0
  86. package/src/components/side-nav/side-nav.component.ts +325 -0
  87. package/src/components/snackbar/snackbar.component.ts +150 -0
  88. package/src/components/snackbar/snackbar.html +21 -0
  89. package/src/components/snackbar/snackbar.stories.ts +51 -0
  90. package/src/components/state/state.component.ts +30 -0
  91. package/src/components/state/state.html +13 -0
  92. package/src/components/state/state.stories.ts +74 -0
  93. package/src/components/table/table.component.html +466 -0
  94. package/src/components/table/table.component.scss +28 -0
  95. package/src/components/table/table.component.stories.ts +655 -0
  96. package/src/components/table/table.component.ts +475 -0
  97. package/src/components/tabs/tabs.component.stories.ts +114 -0
  98. package/src/components/tabs/tabs.component.ts +69 -0
  99. package/src/core/types.ts +494 -0
  100. package/src/public-api.ts +23 -0
  101. package/tsconfig.json +37 -0
  102. package/tsconfig.lib.json +17 -0
  103. package/tsconfig.lib.prod.json +9 -0
  104. package/tsconfig.spec.json +13 -0
  105. package/fesm2022/aaamb-ngx-design-system.mjs +0 -4075
  106. package/fesm2022/aaamb-ngx-design-system.mjs.map +0 -1
  107. package/styles/compiled.css +0 -2
  108. package/types/aaamb-ngx-design-system.d.ts +0 -1142
@@ -0,0 +1,466 @@
1
+ @if (getRows().length > 0 || isLoading) {
2
+ <!-- Main table layout: data grid + footer pagination area -->
3
+ <div class="flex min-h-[60vh] w-full flex-col justify-between gap-4">
4
+ <div class="relative min-h-40 w-full overflow-x-auto">
5
+ <table
6
+ [attr.data-testid]="contentTestId"
7
+ class="min-w-full table-fixed border-separate border-spacing-0"
8
+ >
9
+ <!-- Interactive header row: sorting, drag-and-drop, and column resizing -->
10
+ <thead class="bg-green-1 text-white-base">
11
+ <tr
12
+ cdkDropList
13
+ cdkDropListOrientation="horizontal"
14
+ class="h-10 min-h-10 max-h-11.25"
15
+ (cdkDropListDropped)="drop($event)"
16
+ [ngStyle]="allContentLeft ? { 'text-align': 'left' } : null"
17
+ >
18
+ @for (
19
+ column of getHeaderCells();
20
+ track column.id + "-" + headerRenderVersion
21
+ ) {
22
+ @if (isColumnSortable(column)) {
23
+ @if (areColumnsDraggable) {
24
+ <!-- Sortable + draggable header cell -->
25
+ <th
26
+ cdkDrag
27
+ cdkDragLockAxis="x"
28
+ [ngStyle]="getColumnHeaderStyles(column)"
29
+ class="relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0 overflow-hidden cursor-grab active:cursor-grabbing"
30
+ [attr.data-testid]="getHeaderTestId(column)"
31
+ >
32
+ <button
33
+ type="button"
34
+ cdkDragHandle
35
+ class="group flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 border-none outline-0 bg-transparent hover:bg-white/10"
36
+ [ngClass]="headerAlignmentClass(column)"
37
+ (click)="sort(column, $event)"
38
+ [title]="
39
+ enableMultiSort ? 'Shift+click to add to sort' : null
40
+ "
41
+ >
42
+ <!-- When right-aligned, the sort indicator is shown before the header text -->
43
+ @if (getSortEntry(column); as entry) {
44
+ @if (isSortIconLeading(column)) {
45
+ @if (multiSortCriteria.length > 1) {
46
+ <span
47
+ class="inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px"
48
+ >
49
+ {{ entry.index + 1 }}
50
+ </span>
51
+ }
52
+ <ads-icon
53
+ class="text-current transition-transform duration-200 -rotate-90"
54
+ [class.rotate-90]="entry.direction === 'ASC'"
55
+ [iconName]="'arrow_right'"
56
+ [size]="16"
57
+ ></ads-icon>
58
+ }
59
+ }
60
+ <span class="truncate">{{
61
+ column.column.columnDef.header
62
+ }}</span>
63
+ <!-- For left/center aligned headers, the sort indicator is shown after the text -->
64
+ @if (getSortEntry(column); as entry) {
65
+ @if (!isSortIconLeading(column)) {
66
+ @if (multiSortCriteria.length > 1) {
67
+ <span
68
+ class="inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px"
69
+ >
70
+ {{ entry.index + 1 }}
71
+ </span>
72
+ }
73
+ <ads-icon
74
+ class="text-current transition-transform duration-200 -rotate-90"
75
+ [class.rotate-90]="entry.direction === 'ASC'"
76
+ [iconName]="'arrow_right'"
77
+ [size]="16"
78
+ ></ads-icon>
79
+ }
80
+ }
81
+ </button>
82
+ <div
83
+ class="absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1"
84
+ (mousedown)="startResize($event, column)"
85
+ (touchstart)="startResize($event, column)"
86
+ ></div>
87
+ </th>
88
+ } @else {
89
+ <!-- Sortable header cell without drag-and-drop -->
90
+ <th
91
+ [ngStyle]="getColumnHeaderStyles(column)"
92
+ class="relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0"
93
+ [attr.data-testid]="getHeaderTestId(column)"
94
+ >
95
+ <button
96
+ type="button"
97
+ class="flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 hover:bg-white/10 bg-green-base"
98
+ [ngClass]="headerAlignmentClass(column)"
99
+ (click)="sort(column, $event)"
100
+ [title]="
101
+ enableMultiSort ? 'Shift+click to add to sort' : null
102
+ "
103
+ >
104
+ @if (getSortEntry(column); as entry) {
105
+ @if (isSortIconLeading(column)) {
106
+ @if (multiSortCriteria.length > 1) {
107
+ <span
108
+ class="inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base"
109
+ >
110
+ {{ entry.index + 1 }}
111
+ </span>
112
+ }
113
+ <ads-icon
114
+ class="text-current transition-transform duration-200 -rotate-90"
115
+ [class.rotate-90]="entry.direction === 'ASC'"
116
+ [iconName]="'arrow_right'"
117
+ [size]="16"
118
+ ></ads-icon>
119
+ }
120
+ }
121
+ <span class="truncate">{{
122
+ column.column.columnDef.header
123
+ }}</span>
124
+ @if (getSortEntry(column); as entry) {
125
+ @if (!isSortIconLeading(column)) {
126
+ @if (multiSortCriteria.length > 1) {
127
+ <span
128
+ class="inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base"
129
+ >
130
+ {{ entry.index + 1 }}
131
+ </span>
132
+ }
133
+ <ads-icon
134
+ class="text-current transition-transform duration-200 -rotate-90"
135
+ [class.rotate-90]="entry.direction === 'ASC'"
136
+ [iconName]="'arrow_right'"
137
+ [size]="16"
138
+ ></ads-icon>
139
+ }
140
+ }
141
+ </button>
142
+ <div
143
+ class="absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1"
144
+ (mousedown)="startResize($event, column)"
145
+ (touchstart)="startResize($event, column)"
146
+ ></div>
147
+ </th>
148
+ }
149
+ } @else {
150
+ @if (areColumnsDraggable) {
151
+ <!-- Non-sortable but draggable header cell -->
152
+ <th
153
+ cdkDrag
154
+ cdkDragLockAxis="x"
155
+ [ngStyle]="getColumnHeaderStyles(column)"
156
+ class="relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0"
157
+ [attr.data-testid]="getHeaderTestId(column)"
158
+ >
159
+ <div
160
+ cdkDragHandle
161
+ class="flex h-full w-full items-center px-3"
162
+ [ngClass]="headerAlignmentClass(column)"
163
+ >
164
+ <span class="truncate">{{
165
+ column.column.columnDef.header
166
+ }}</span>
167
+ </div>
168
+ <div
169
+ class="absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1"
170
+ (mousedown)="startResize($event, column)"
171
+ (touchstart)="startResize($event, column)"
172
+ ></div>
173
+ </th>
174
+ } @else {
175
+ <!-- Plain header cell (no sort, no drag) -->
176
+ <th
177
+ [ngStyle]="getColumnHeaderStyles(column)"
178
+ class="relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0"
179
+ [attr.data-testid]="getHeaderTestId(column)"
180
+ >
181
+ <div
182
+ class="flex h-full w-full items-center px-3"
183
+ [ngClass]="headerAlignmentClass(column)"
184
+ >
185
+ <span class="truncate">{{
186
+ column.column.columnDef.header
187
+ }}</span>
188
+ </div>
189
+ <div
190
+ class="absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1"
191
+ (mousedown)="startResize($event, column)"
192
+ (touchstart)="startResize($event, column)"
193
+ ></div>
194
+ </th>
195
+ }
196
+ }
197
+ }
198
+
199
+ @if (showButtons) {
200
+ <!-- Optional actions column header -->
201
+ <th
202
+ [attr.data-testid]="contentTestId + '-header-actions'"
203
+ class="h-10 min-h-10 max-h-11.25 px-3 text-center font-medium whitespace-nowrap rounded-r-2xl"
204
+ [ngStyle]="{ width: '1%' }"
205
+ >
206
+ Actions
207
+ </th>
208
+ }
209
+ </tr>
210
+ </thead>
211
+
212
+ <tbody class="relative">
213
+ @if (isLoading && getRows().length === 0) {
214
+ <tr>
215
+ <td [attr.colspan]="getEmptyColspan()" class="p-0">
216
+ <div
217
+ class="flex min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm"
218
+ aria-live="polite"
219
+ aria-busy="true"
220
+ >
221
+ <span
222
+ class="h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1"
223
+ aria-hidden="true"
224
+ ></span>
225
+ <span class="sr-only">Loading table data</span>
226
+ </div>
227
+ </td>
228
+ </tr>
229
+ }
230
+
231
+ <!-- Data rows -->
232
+ @for (row of getRows(); track trackByFn($index, row)) {
233
+ <tr
234
+ [attr.data-testid]="getRowTestId(row, $index)"
235
+ class="h-10 min-h-10 max-h-11.25"
236
+ >
237
+ @for (cell of row.getVisibleCells(); track cell.id) {
238
+ <td
239
+ class="border-b border-[#aedad8] px-3 py-0 text-sm whitespace-pre-line wrap-break-word text-black-base"
240
+ [ngClass]="cellAlignmentClass(cell)"
241
+ [ngStyle]="allContentLeft ? { padding: '0' } : null"
242
+ >
243
+ @if (isStateCell(cell)) {
244
+ <!-- State-like values (status/active) are rendered with ads-state for a consistent visual token -->
245
+ <ads-state
246
+ [shape]="getStateStyle(cell).shape ?? statusShape"
247
+ [containerShapes]="
248
+ getStateStyle(cell).shape ?? statusShape
249
+ "
250
+ [borderColor]="getStateStyle(cell).borderColor"
251
+ [bgColor]="getStateStyle(cell).bgColor"
252
+ [textColor]="getStateStyle(cell).textColor"
253
+ [text]="getStateText(cell)"
254
+ [fullWidth]="getStateStyle(cell).fullWidth ?? false"
255
+ [boldText]="getStateStyle(cell).boldText ?? true"
256
+ ></ads-state>
257
+ } @else {
258
+ <!-- Generic cell rendering for non-state columns via TanStack flexRender output -->
259
+ <ng-container
260
+ *flexRender="
261
+ cell.column.columnDef.cell;
262
+ props: cell.getContext();
263
+ let renderedCell
264
+ "
265
+ >
266
+ <div
267
+ [innerHTML]="renderedCell"
268
+ [ngStyle]="
269
+ allContentLeft ? { 'text-align': 'left' } : null
270
+ "
271
+ ></div>
272
+ </ng-container>
273
+ }
274
+ </td>
275
+ }
276
+
277
+ @if (showButtons && actionButtons.length > 0) {
278
+ <!-- Optional row action buttons -->
279
+ <td
280
+ class="border-b border-[#aedad8] px-1 py-1 align-middle text-center whitespace-nowrap"
281
+ >
282
+ <div
283
+ class="flex w-full items-center justify-center gap-1 p-0"
284
+ >
285
+ @for (button of actionButtons; track $index) {
286
+ @if (
287
+ !button.condition || button.condition(row.original)
288
+ ) {
289
+ <button
290
+ nz-tooltip
291
+ [nzTooltipTitle]="
292
+ getTooltipText(button, row.original)
293
+ "
294
+ ads-button
295
+ type="button"
296
+ [onlyIconButton]="true"
297
+ color="text"
298
+ [attr.data-testid]="
299
+ getActionButtonTestId(row, button, $index)
300
+ "
301
+ [title]="getTooltipText(button, row.original)"
302
+ [disabled]="
303
+ isActionButtonDisabled(button, row.original)
304
+ "
305
+ (click)="button.callback(row.original)"
306
+ >
307
+ <ads-icon
308
+ [ngClass]="
309
+ isActionButtonDisabled(button, row.original)
310
+ ? 'text-neutral-disabled-text'
311
+ : 'text-green-1'
312
+ "
313
+ [iconName]="iconNameFor(button.icon)"
314
+ [size]="16"
315
+ ></ads-icon>
316
+ </button>
317
+ }
318
+ }
319
+ </div>
320
+ </td>
321
+ }
322
+ </tr>
323
+ }
324
+
325
+ @if (isLoading && getRows().length > 0) {
326
+ <tr class="absolute inset-0 z-10 block">
327
+ <td [attr.colspan]="getEmptyColspan()" class="block h-full p-0">
328
+ <div
329
+ class="flex h-full min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm"
330
+ aria-live="polite"
331
+ aria-busy="true"
332
+ >
333
+ <span
334
+ class="h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1"
335
+ aria-hidden="true"
336
+ ></span>
337
+ <span class="sr-only">Loading table data</span>
338
+ </div>
339
+ </td>
340
+ </tr>
341
+ }
342
+ </tbody>
343
+ </table>
344
+ </div>
345
+
346
+ <!-- Footer controls: page size selector, page navigation, and total record counter -->
347
+ <div class="flex w-full flex-wrap items-center justify-end gap-4 py-2">
348
+ <div class="mr-auto flex items-center gap-2 text-sm text-green-1">
349
+ <span class="whitespace-nowrap font-medium">Rows per page</span>
350
+ <select
351
+ class="h-8 cursor-pointer rounded border border-aqua-1 bg-white-base px-2 text-sm text-green-1 outline-none transition hover:border-green-1 focus:border-green-1 focus:ring-2 focus:ring-green-1/20"
352
+ [value]="pageSize"
353
+ (change)="onPageSizeChange($event)"
354
+ [attr.data-testid]="contentTestId + '-page-size-select'"
355
+ >
356
+ <option value="10">10</option>
357
+ <option value="25">25</option>
358
+ <option value="50">50</option>
359
+ <option value="100">100</option>
360
+ </select>
361
+ </div>
362
+
363
+ <div class="flex w-fit items-center justify-center gap-1">
364
+ <button
365
+ type="button"
366
+ class="inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent"
367
+ [disabled]="currentPage === 1"
368
+ (click)="previousPage()"
369
+ [attr.data-testid]="contentTestId + '-pagination-previous'"
370
+ >
371
+ <span class="text-lg leading-none">‹</span>
372
+ Previous
373
+ </button>
374
+
375
+ <div class="flex items-center justify-center gap-1">
376
+ @for (page of getPageNumbers(); track $index) {
377
+ @if (page === null) {
378
+ <span
379
+ class="inline-flex h-8 min-w-8 select-none items-center justify-center px-2 font-medium text-neutral-disabled-text"
380
+ >...</span
381
+ >
382
+ } @else {
383
+ <button
384
+ type="button"
385
+ class="inline-flex h-8 min-w-8 items-center justify-center rounded px-2 font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 outline-0 border-none"
386
+ [ngClass]="{
387
+ 'bg-green-1 text-white-base hover:text-white-base':
388
+ currentPage === page,
389
+ 'bg-transparent': currentPage !== page,
390
+ }"
391
+ [disabled]="false"
392
+ (click)="goToPage(page)"
393
+ [attr.data-testid]="contentTestId + '-pagination-page-' + page"
394
+ >
395
+ {{ page }}
396
+ </button>
397
+ }
398
+ }
399
+ </div>
400
+
401
+ <button
402
+ type="button"
403
+ class="inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent"
404
+ [disabled]="currentPage === totalPages"
405
+ (click)="nextPage()"
406
+ [attr.data-testid]="contentTestId + '-pagination-next'"
407
+ >
408
+ Next
409
+ <span class="text-lg leading-none">›</span>
410
+ </button>
411
+ </div>
412
+
413
+ @if (totalRegisters) {
414
+ <div
415
+ class="w-fit min-w-20 text-sm font-medium text-neutral-disabled-text"
416
+ [attr.data-testid]="contentTestId + '-pagination-info'"
417
+ >
418
+ Total Records: {{ totalRegisters }}
419
+ </div>
420
+ }
421
+ </div>
422
+ </div>
423
+ } @else {
424
+ <!-- Empty state layout when there are no rows to display -->
425
+ <div class="w-full overflow-x-auto">
426
+ <table
427
+ [attr.data-testid]="contentTestId"
428
+ class="min-w-full table-fixed border-separate border-spacing-0"
429
+ >
430
+ <thead class="bg-green-1 text-white-base">
431
+ <tr class="h-10 min-h-10 max-h-11.25">
432
+ @for (column of getHeaderCells(); track column.id) {
433
+ <th
434
+ class="h-10 min-h-10 max-h-11.25 px-3 text-left font-medium first:rounded-l-2xl"
435
+ >
436
+ {{ column.column.columnDef.header }}
437
+ </th>
438
+ }
439
+ @if (showButtons) {
440
+ <th
441
+ class="h-10 min-h-10 max-h-11.25 px-3 text-center font-medium rounded-r-2xl"
442
+ >
443
+ Options
444
+ </th>
445
+ }
446
+ </tr>
447
+ </thead>
448
+ <tbody>
449
+ <tr>
450
+ <td [attr.colspan]="getEmptyColspan()" class="py-2">
451
+ <div
452
+ class="flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-aqua-2 bg-aqua-5/40 px-6 py-5 text-center"
453
+ >
454
+ <span class="text-base font-semibold text-green-1"
455
+ >No available data</span
456
+ >
457
+ <span class="text-sm text-neutral-disabled-text"
458
+ >No data to display right now.</span
459
+ >
460
+ </div>
461
+ </td>
462
+ </tr>
463
+ </tbody>
464
+ </table>
465
+ </div>
466
+ }
@@ -0,0 +1,28 @@
1
+ :host ::ng-deep .cdk-drag-preview {
2
+ background-color: #014744 !important;
3
+ color: #ffffff !important;
4
+ border-radius: 1rem !important;
5
+ border-right: 1px solid #ffffff33 !important;
6
+ box-shadow: 0 12px 28px #01474447 !important;
7
+ overflow: hidden !important;
8
+ }
9
+
10
+ :host ::ng-deep .cdk-drag-placeholder {
11
+ opacity: 0;
12
+ }
13
+
14
+ :host ::ng-deep .cdk-drop-list-dragging th.cdk-drag:not(.cdk-drag-placeholder) {
15
+ transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
16
+ }
17
+
18
+ :host ::ng-deep th.cdk-drag-animating {
19
+ transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
20
+ }
21
+
22
+ ::ng-deep .cdk-drag-preview {
23
+ background: #014743a9 !important;
24
+ color: white !important;
25
+ box-shadow: none !important;
26
+ border: none !important;
27
+ border-radius: 10rem !important;
28
+ }