adminforth 3.35.1 → 4.0.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 (94) hide show
  1. package/dist/modules/codeInjector.d.ts.map +1 -1
  2. package/dist/modules/codeInjector.js +20 -3
  3. package/dist/modules/codeInjector.js.map +1 -1
  4. package/dist/modules/styleGenerator.d.ts +13 -0
  5. package/dist/modules/styleGenerator.d.ts.map +1 -1
  6. package/dist/modules/styleGenerator.js +274 -1
  7. package/dist/modules/styleGenerator.js.map +1 -1
  8. package/dist/modules/styles.d.ts +24 -0
  9. package/dist/modules/styles.d.ts.map +1 -1
  10. package/dist/modules/styles.js +452 -427
  11. package/dist/modules/styles.js.map +1 -1
  12. package/dist/modules/utils.d.ts +1 -13
  13. package/dist/modules/utils.d.ts.map +1 -1
  14. package/dist/modules/utils.js +2 -275
  15. package/dist/modules/utils.js.map +1 -1
  16. package/dist/spa/index.html +2 -2
  17. package/dist/spa/package-lock.json +1373 -1136
  18. package/dist/spa/package.json +18 -15
  19. package/dist/spa/pnpm-lock.yaml +1067 -648
  20. package/dist/spa/src/App.vue +84 -92
  21. package/dist/spa/src/afcl/AreaChart.vue +8 -24
  22. package/dist/spa/src/afcl/BarChart.vue +8 -23
  23. package/dist/spa/src/afcl/Button.vue +8 -2
  24. package/dist/spa/src/afcl/ButtonGroup.vue +9 -9
  25. package/dist/spa/src/afcl/Card.vue +40 -19
  26. package/dist/spa/src/afcl/Checkbox.vue +6 -6
  27. package/dist/spa/src/afcl/CountryFlag.vue +17 -11
  28. package/dist/spa/src/afcl/DatePicker.vue +7 -7
  29. package/dist/spa/src/afcl/Dialog.vue +8 -9
  30. package/dist/spa/src/afcl/DropdownMenu.vue +210 -0
  31. package/dist/spa/src/afcl/DropdownMenuAccordion.vue +56 -0
  32. package/dist/spa/src/afcl/DropdownMenuItem.vue +86 -0
  33. package/dist/spa/src/afcl/Dropzone.vue +10 -26
  34. package/dist/spa/src/afcl/Input.vue +4 -4
  35. package/dist/spa/src/afcl/Link.vue +1 -1
  36. package/dist/spa/src/afcl/LinkButton.vue +15 -1
  37. package/dist/spa/src/afcl/MixedChart.vue +4 -18
  38. package/dist/spa/src/afcl/Modal.vue +9 -9
  39. package/dist/spa/src/afcl/PieChart.vue +8 -29
  40. package/dist/spa/src/afcl/ProgressBar.vue +2 -2
  41. package/dist/spa/src/afcl/Select.vue +20 -20
  42. package/dist/spa/src/afcl/Skeleton.vue +1 -1
  43. package/dist/spa/src/afcl/Spinner.vue +1 -1
  44. package/dist/spa/src/afcl/Table.vue +19 -26
  45. package/dist/spa/src/afcl/Textarea.vue +1 -1
  46. package/dist/spa/src/afcl/Toggle.vue +4 -4
  47. package/dist/spa/src/afcl/Tooltip.vue +1 -1
  48. package/dist/spa/src/afcl/TreeMapChart.vue +5 -20
  49. package/dist/spa/src/afcl/VerticalTabs.vue +4 -4
  50. package/dist/spa/src/afcl/buttonStyles.ts +73 -33
  51. package/dist/spa/src/afcl/chartUtils.ts +19 -0
  52. package/dist/spa/src/afcl/classMerge.ts +11 -0
  53. package/dist/spa/src/afcl/dropdownMenuContext.ts +10 -0
  54. package/dist/spa/src/afcl/fileSize.ts +12 -0
  55. package/dist/spa/src/afcl/index.ts +3 -0
  56. package/dist/spa/src/components/AcceptModal.vue +17 -19
  57. package/dist/spa/src/components/Breadcrumbs.vue +11 -13
  58. package/dist/spa/src/components/BreadcrumbsWithButtons.vue +2 -2
  59. package/dist/spa/src/components/CallActionWrapper.vue +3 -0
  60. package/dist/spa/src/components/ColumnValueInput.vue +5 -5
  61. package/dist/spa/src/components/ColumnValueInputWrapper.vue +7 -6
  62. package/dist/spa/src/components/CustomDateRangePicker.vue +8 -8
  63. package/dist/spa/src/components/CustomRangePicker.vue +2 -2
  64. package/dist/spa/src/components/ErrorMessage.vue +3 -4
  65. package/dist/spa/src/components/Filters.vue +13 -13
  66. package/dist/spa/src/components/GroupsTable.vue +12 -12
  67. package/dist/spa/src/components/ListActionsThreeDots.vue +89 -207
  68. package/dist/spa/src/components/MenuLink.vue +23 -20
  69. package/dist/spa/src/components/RangePicker.vue +9 -10
  70. package/dist/spa/src/components/ResourceListTable.vue +68 -65
  71. package/dist/spa/src/components/ShowTable.vue +8 -8
  72. package/dist/spa/src/components/Sidebar.vue +31 -38
  73. package/dist/spa/src/components/ThreeDotsMenu.vue +88 -136
  74. package/dist/spa/src/components/Toast.vue +16 -23
  75. package/dist/spa/src/components/UserMenuSettingsButton.vue +15 -36
  76. package/dist/spa/src/components/ValueRenderer.vue +13 -8
  77. package/dist/spa/src/components/icons/IconCalendar.vue +3 -3
  78. package/dist/spa/src/components/icons/IconTime.vue +3 -3
  79. package/dist/spa/src/index.scss +6 -2
  80. package/dist/spa/src/main.ts +2 -0
  81. package/dist/spa/src/renderers/CompactField.vue +3 -3
  82. package/dist/spa/src/renderers/CompactUUID.vue +3 -3
  83. package/dist/spa/src/renderers/SensitiveBlurCell.vue +9 -9
  84. package/dist/spa/src/utils/threeDotsMenu.ts +7 -0
  85. package/dist/spa/src/utils/userMenu.ts +5 -0
  86. package/dist/spa/src/utils/utils.ts +12 -39
  87. package/dist/spa/src/views/CreateEditSkeleton.vue +3 -3
  88. package/dist/spa/src/views/CreateView.vue +5 -6
  89. package/dist/spa/src/views/EditView.vue +5 -6
  90. package/dist/spa/src/views/ListView.vue +114 -115
  91. package/dist/spa/src/views/LoginView.vue +4 -4
  92. package/dist/spa/src/views/ShowView.vue +17 -18
  93. package/dist/spa/vite.config.ts +23 -16
  94. package/package.json +1 -2
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <!-- table -->
3
- <div class="relative shadow-listTableShadow dark:shadow-darkListTableShadow overflow-auto overscroll-x-contain border dark:border-gray-700"
4
- :class="{'rounded-default': !noRoundings}"
3
+ <div class="relative shadow-listTableShadow dark:shadow-darkListTableShadow overflow-auto overscroll-x-contain border border-lightListBorder bg-lightListTable dark:border-darkListBorder dark:bg-darkListTable"
4
+ :class="{'rounded-lg': !noRoundings}"
5
5
  :style="isVirtualScrollEnabled ? { maxHeight: `${containerHeight}px` } : {}"
6
6
  @scroll="handleScroll"
7
7
  ref="containerRef"
@@ -25,7 +25,7 @@
25
25
  <tbody>
26
26
  <!-- table header -->
27
27
  <tr :class="HEADER_ROW_CLASSES">
28
- <td scope="col" class="list-table-header-cell p-4 sticky-column bg-lightListTableHeading dark:bg-darkListTableHeading">
28
+ <td scope="col" class="list-table-header-cell px-4 py-2.5 sticky-column bg-lightListTableHeading dark:bg-darkListTableHeading">
29
29
  <Checkbox
30
30
  :modelValue="allFromThisPageChecked"
31
31
  :disabled="!rows || !rows.length"
@@ -39,33 +39,26 @@
39
39
  v-for="c in columnsListed"
40
40
  ref="headerRefs"
41
41
  scope="col"
42
- class="list-table-header-cell px-2 md:px-3 lg:px-6 py-3"
42
+ class="list-table-header-cell px-2 md:px-3 lg:px-4 py-2.5"
43
43
  :class="[c.listCssClass, {'sticky-column bg-lightListTableHeading dark:bg-darkListTableHeading': c.listSticky}]"
44
44
  >
45
45
 
46
46
  <div @click="(evt) => c.sortable && onSortButtonClick(evt, c.name)"
47
- class="flex items-center font-semibold" :class="{'cursor-pointer':c.sortable}">
47
+ class="flex items-center font-medium whitespace-nowrap" :class="{'cursor-pointer':c.sortable}">
48
48
  {{ c.label }}
49
49
 
50
50
  <div v-if="c.sortable">
51
- <svg
52
- v-if="ascArr.includes(c.name) || descArr.includes(c.name)" class="w-3 h-3 ms-1.5"
53
- fill='currentColor'
54
- :class="{'rotate-180':descArr.includes(c.name)}" viewBox="0 0 24 24"
55
- >
56
- <path d="M8.574 11.024h6.852a2.075 2.075 0 0 0 1.847-1.086 1.9 1.9 0 0 0-.11-1.986L13.736 2.9a2.122 2.122 0 0 0-3.472 0L6.837 7.952a1.9 1.9 0 0 0-.11 1.986 2.074 2.074 0 0 0 1.847 0z"/>
57
- </svg>
58
- <svg
59
- v-else class="w-3 h-3 ms-1.5 opacity-30" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
60
- fill='currentColor'
61
- viewBox="0 0 24 24"
62
- >
63
- <path d="M8.574 11.024h6.852a2.075 2.075 0 0 0 1.847-1.086 1.9 1.9 0 0 0-.11-1.986L13.736 2.9a2.122 2.122 0 0 0-3.472 0L6.837 7.952a1.9 1.9 0 0 0-.11 1.986 2.074 2.074 0 0 0 1.847 1.086Zm6.852 1.952H8.574a2.072 2.072 0 0 0-1.847 1.087 1.9 1.9 0 0 0 .11 1.985l3.426 5.05a2.123 2.123 0 0 0 3.472 0l3.427-5.05a1.9 1.9 0 0 0 .11-1.985 2.074 2.074 0 0 0-1.846-1.087Z"/>
64
- </svg>
51
+ <IconArrowUp
52
+ v-if="ascArr.includes(c.name) || descArr.includes(c.name)" class="w-3.5 h-3.5 ms-1"
53
+ :class="{'rotate-180':descArr.includes(c.name)}" aria-hidden="true"
54
+ />
55
+ <IconChevronsUpDown
56
+ v-else class="w-3.5 h-3.5 ms-1 opacity-40" aria-hidden="true"
57
+ />
65
58
  </div>
66
59
 
67
60
  <span
68
- class="bg-red-100 text-red-800 text-xs font-medium me-1 px-1 py-0.5 rounded dark:bg-gray-700 dark:text-red-400 border border-red-400"
61
+ class="inline-flex items-center justify-center min-w-[1rem] h-4 ms-1 px-1 rounded-full text-[10px] font-semibold tabular-nums bg-lightButtonGroupActiveBackground text-lightButtonGroupActiveText dark:bg-darkButtonGroupActiveBackground dark:text-darkButtonGroupActiveText"
69
62
  v-if="sort.findIndex((s: any) => s.field === c.name) !== -1 && sort?.length > 1"
70
63
  >
71
64
  {{ sort.findIndex((s: any) => s.field === c.name) + 1 }}
@@ -74,7 +67,7 @@
74
67
  </div>
75
68
  </td>
76
69
 
77
- <td scope="col" class="px-6 py-3 font-semibold">
70
+ <td scope="col" class="px-2 md:px-3 lg:px-4 py-2.5 font-medium">
78
71
  {{ $t('Actions') }}
79
72
  </td>
80
73
  </tr>
@@ -94,11 +87,11 @@
94
87
  <td :colspan="resource?.columns.length + 2">
95
88
  <div
96
89
  id="toast-simple"
97
- class=" mx-auto my-5 flex items-center w-full max-w-xs p-4 space-x-4 rtl:space-x-reverse text-gray-500 divide-x rtl:divide-x-reverse divide-gray-200 dark:text-gray-400 dark:divide-gray-700 space-x dark:bg-gray-800"
90
+ class=" mx-auto my-8 flex items-center justify-center w-full max-w-xs p-4 gap-2.5 text-lightListTablePaginationHelpText dark:text-darkListTablePaginationHelpText"
98
91
  role="alert"
99
92
  >
100
- <IconInboxOutline class="w-6 h-6 text-gray-500 dark:text-gray-400"/>
101
- <div class="ps-4 text-sm font-normal">{{ $t('No items here yet') }}</div>
93
+ <IconInbox class="w-5 h-5"/>
94
+ <div class="text-sm font-normal">{{ $t('No items here yet') }}</div>
102
95
  </div>
103
96
  </td>
104
97
  </tr>
@@ -118,11 +111,11 @@
118
111
  :meta="tableRowReplaceInjection ? formatComponent(tableRowReplaceInjection).meta : undefined"
119
112
  @click="onClick($event, row)"
120
113
  ref="rowRefs"
121
- class="list-table-body-row bg-lightListTable dark:bg-darkListTable border-lightListBorder dark:border-gray-700 hover:bg-lightListTableRowHover dark:hover:bg-darkListTableRowHover"
114
+ class="list-table-body-row bg-lightListTable dark:bg-darkListTable border-lightListBorder/60 dark:border-darkListBorder hover:bg-lightListTableRowHover dark:hover:bg-darkListTableRowHover"
122
115
  :class="{'border-b': rowI !== rowsToRender.length - 1, 'cursor-pointer': row._clickUrl !== null}"
123
116
  @mounted="(el: any) => updateRowHeight(`row_${row._primaryKeyValue}`, el.offsetHeight)"
124
117
  >
125
- <td class="w-4 p-4 cursor-default sticky-column bg-lightListTable dark:bg-darkListTable" @click="(e)=>e.stopPropagation()">
118
+ <td class="w-4 px-4 py-3 cursor-default sticky-column bg-lightListTable dark:bg-darkListTable" @click="(e)=>e.stopPropagation()">
126
119
  <Checkbox
127
120
  :model-value="checkboxesInternal.includes(row._primaryKeyValue)"
128
121
  @change="(e: any)=>{addToCheckedValues(row._primaryKeyValue)}"
@@ -134,7 +127,7 @@
134
127
 
135
128
  <td
136
129
  v-for="c in columnsListed"
137
- class="px-2 md:px-3 lg:px-6 py-4"
130
+ class="px-2 md:px-3 lg:px-4 py-3"
138
131
  :class="[c.listCssClass, {'sticky-column bg-lightListTable dark:bg-darkListTable': c.listSticky}]"
139
132
  >
140
133
  <!-- if c.name in listComponentsPerColumn, render it. If not, render ValueRenderer -->
@@ -147,10 +140,10 @@
147
140
  :resource="resource"
148
141
  />
149
142
  </td>
150
- <td class=" items-center px-2 md:px-3 lg:px-6 py-4 cursor-default" @click="(e)=>{e.stopPropagation()}">
151
- <div class="flex text-lightPrimary dark:text-darkPrimary items-center gap-2">
143
+ <td class=" items-center px-2 md:px-3 lg:px-4 py-2 cursor-default" @click="(e)=>{e.stopPropagation()}">
144
+ <div class="flex text-lightInputIconColor dark:text-darkInputIconColor items-center gap-0.5">
152
145
  <Tooltip v-if="resource.options?.baseActionsAsQuickIcons && resource.options?.baseActionsAsQuickIcons.includes('show')">
153
- <RouterLink
146
+ <LinkButton
154
147
  v-if="resource.options?.allowedActions?.show"
155
148
  :to="{
156
149
  name: 'resource-show',
@@ -159,16 +152,19 @@
159
152
  primaryKey: row._primaryKeyValue,
160
153
  }
161
154
  }"
155
+ variant="ghost"
156
+ size="sm"
157
+ iconOnly
162
158
  >
163
- <IconEyeSolid class="af-show-icon w-5 h-5 me-2"/>
164
- </RouterLink>
159
+ <IconEye class="af-show-icon"/>
160
+ </LinkButton>
165
161
 
166
162
  <template v-slot:tooltip>
167
163
  {{ $t('Show item') }}
168
164
  </template>
169
165
  </Tooltip>
170
166
  <Tooltip v-if="resource.options?.baseActionsAsQuickIcons && resource.options?.baseActionsAsQuickIcons.includes('edit')" >
171
- <RouterLink
167
+ <LinkButton
172
168
  v-if="resource.options?.allowedActions?.edit"
173
169
  :to="{
174
170
  name: 'resource-edit',
@@ -177,20 +173,26 @@
177
173
  primaryKey: row._primaryKeyValue,
178
174
  }
179
175
  }"
176
+ variant="ghost"
177
+ size="sm"
178
+ iconOnly
180
179
  >
181
- <IconPenSolid class="af-edit-icon w-5 h-5 me-2"/>
182
- </RouterLink>
180
+ <IconPencil class="af-edit-icon"/>
181
+ </LinkButton>
183
182
  <template v-slot:tooltip>
184
183
  {{ $t('Edit item') }}
185
184
  </template>
186
185
  </Tooltip>
187
186
  <Tooltip v-if="resource.options?.baseActionsAsQuickIcons && resource.options?.baseActionsAsQuickIcons.includes('delete')">
188
- <button
187
+ <Button
189
188
  v-if="resource.options?.allowedActions?.delete"
190
189
  @click="deleteRecord(row)"
190
+ variant="ghost"
191
+ size="sm"
192
+ iconOnly
191
193
  >
192
- <IconTrashBinSolid class="af-delete-icon w-5 h-5 me-2"/>
193
- </button>
194
+ <IconTrash2 class="af-delete-icon"/>
195
+ </Button>
194
196
 
195
197
  <template v-slot:tooltip>
196
198
  {{ $t('Delete item') }}
@@ -222,22 +224,23 @@
222
224
  :adminUser="coreStore.adminUser"
223
225
  @callAction="(payload? : Object) => startCustomAction(action.id as string | number, row, payload)"
224
226
  >
225
- <button
227
+ <Button
226
228
  type="button"
227
- class="border border-gray-300 dark:border-gray-700 dark:border-opacity-0 border-opacity-0 hover:border-opacity-100 dark:hover:border-opacity-100 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer"
229
+ variant="ghost"
230
+ size="sm"
231
+ iconOnly
228
232
  :disabled="!!actionLoadingStates[`${action.id}_${row._primaryKeyValue}`]"
229
233
  >
230
234
  <component
231
235
  v-if="action.icon && !actionLoadingStates[`${action.id}_${row._primaryKeyValue}`]"
232
236
  :is="getIcon(action.icon)"
233
- class="w-6 h-6 text-lightPrimary dark:text-darkPrimary dark:brightness-150"
234
237
  />
235
238
  <Spinner
236
239
  v-if="actionLoadingStates[`${action.id}_${row._primaryKeyValue}`]"
237
- class="w-5 h-5 text-gray-200 dark:text-gray-500 fill-gray-500 dark:fill-gray-300"
240
+ class="w-4 h-4 text-lightSkeletonBackgroundColor dark:text-darkSkeletonBackgroundColor fill-lightListTableText dark:fill-darkListTableText"
238
241
  />
239
242
  <span v-if="actionLoadingStates[`${action.id}_${row._primaryKeyValue}`]" class="sr-only">Loading...</span>
240
- </button>
243
+ </Button>
241
244
  </component>
242
245
 
243
246
  <template #tooltip>
@@ -278,19 +281,17 @@
278
281
  >
279
282
  <!-- Buttons -->
280
283
  <button
281
- class="af-pagination-prev-button flex items-center py-1 px-3 gap-1 text-sm font-medium text-lightListTablePaginationText focus:outline-none bg-lightListTablePaginationBackgoround border-r-0 rounded-s border border-lightListTablePaginationBorder hover:bg-lightListTablePaginationBackgoroundHover hover:text-lightListTablePaginationTextHover focus:z-20 focus:ring-4 focus:ring-lightListTablePaginationFocusRing dark:focus:ring-darkListTablePaginationFocusRing dark:bg-darkListTablePaginationBackgoround dark:text-darkListTablePaginationText dark:border-darkListTablePaginationBorder dark:hover:text-darkListTablePaginationTextHover dark:hover:bg-darkListTablePaginationBackgoroundHover disabled:opacity-50"
284
+ class="af-pagination-prev-button flex items-center h-7 px-2.5 gap-1 text-sm font-medium text-lightListTablePaginationText focus:outline-none bg-lightListTablePaginationBackgoround border-r-0 rounded-s-default border border-lightListTablePaginationBorder hover:bg-lightListTablePaginationBackgoroundHover hover:text-lightListTablePaginationTextHover focus-visible:z-20 focus-visible:ring-[3px] focus-visible:ring-lightListTablePaginationFocusRing dark:focus-visible:ring-darkListTablePaginationFocusRing dark:bg-darkListTablePaginationBackgoround dark:text-darkListTablePaginationText dark:border-darkListTablePaginationBorder dark:hover:text-darkListTablePaginationTextHover dark:hover:bg-darkListTablePaginationBackgoroundHover disabled:opacity-50"
282
285
  @click="page--; pageInput = page.toString();"
283
286
  :disabled="page <= 1"
284
287
  >
285
- <svg class="w-3.5 h-3.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
286
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5H1m0 0 4 4M1 5l4-4"/>
287
- </svg>
288
+ <IconChevronLeft class="w-4 h-4 rtl:rotate-180" aria-hidden="true" />
288
289
  <span class="hidden sm:inline">
289
290
  {{ $t('Prev') }}
290
291
  </span>
291
292
  </button>
292
293
  <button
293
- class="af-pagination-first-page-button flex items-center py-1 px-3 text-sm font-medium text-lightListTablePaginationText focus:outline-none bg-lightListTablePaginationBackgoround border-r-0 border border-lightListTablePaginationBorder hover:bg-lightListTablePaginationBackgoroundHover hover:text-lightListTablePaginationTextHover z-10 focus:z-20 focus:ring-4 focus:ring-lightListTablePaginationFocusRing dark:focus:ring-darkListTablePaginationFocusRing dark:bg-darkListTablePaginationBackgoround dark:text-darkListTablePaginationText dark:border-darkListTablePaginationBorder dark:hover:text-darkListTablePaginationTextHover dark:hover:bg-darkListTablePaginationBackgoroundHover disabled:opacity-50"
294
+ class="af-pagination-first-page-button flex items-center h-7 px-3 tabular-nums text-sm font-medium text-lightListTablePaginationText focus:outline-none bg-lightListTablePaginationBackgoround border-r-0 border border-lightListTablePaginationBorder hover:bg-lightListTablePaginationBackgoroundHover hover:text-lightListTablePaginationTextHover z-10 focus-visible:z-20 focus-visible:ring-[3px] focus-visible:ring-lightListTablePaginationFocusRing dark:focus-visible:ring-darkListTablePaginationFocusRing dark:bg-darkListTablePaginationBackgoround dark:text-darkListTablePaginationText dark:border-darkListTablePaginationBorder dark:hover:text-darkListTablePaginationTextHover dark:hover:bg-darkListTablePaginationBackgoroundHover disabled:opacity-50"
294
295
  @click="page = 1;
295
296
  pageInput = page.toString();"
296
297
  :disabled="page <= 1"
@@ -301,28 +302,26 @@
301
302
  type="text"
302
303
  v-model="pageInput"
303
304
  :style="{ width: `${Math.max(1, pageInput.length+4)}ch` }"
304
- class="af-pagination-input z-10 min-w-10 outline-none inline-block py-1.5 px-3 text-sm text-center text-lightListTablePaginationCurrentPageText border border-lightListTablePaginationBorder dark:border-darkListTablePaginationBorder dark:text-darkListTablePaginationCurrentPageText dark:bg-darkListTablePaginationBackgoround"
305
+ class="af-pagination-input z-10 min-w-10 outline-none inline-block h-7 px-3 text-sm font-medium tabular-nums text-center text-lightListTablePaginationCurrentPageText bg-lightPrimaryOpacity border border-lightPrimary dark:border-darkPrimary dark:text-darkListTablePaginationCurrentPageText dark:bg-darkPrimaryOpacity focus:ring-[3px] focus:ring-lightListTablePaginationFocusRing dark:focus:ring-darkListTablePaginationFocusRing"
305
306
  @keydown="onPageKeydown($event)"
306
307
  @blur="validatePageInput()"
307
308
  />
308
309
 
309
310
  <button
310
- class="af-pagination-last-page-button z-10 flex items-center py-1 px-3 text-sm font-medium text-lightListTablePaginationText focus:outline-none bg-lightListTablePaginationBackgoround border-l-0 border border-lightListTablePaginationBorder hover:bg-lightListTablePaginationBackgoroundHover hover:text-lightListTablePaginationTextHover focus:ring-4 focus:z-20 focus:ring-lightListTablePaginationFocusRing dark:focus:ring-darkListTablePaginationFocusRing dark:bg-darkListTablePaginationBackgoround dark:text-darkListTablePaginationText dark:border-darkListTablePaginationBorder dark:hover:text-white dark:hover:bg-darkListTablePaginationBackgoroundHover disabled:opacity-50"
311
+ class="af-pagination-last-page-button z-10 flex items-center h-7 px-3 tabular-nums text-sm font-medium text-lightListTablePaginationText focus:outline-none bg-lightListTablePaginationBackgoround border-l-0 border border-lightListTablePaginationBorder hover:bg-lightListTablePaginationBackgoroundHover hover:text-lightListTablePaginationTextHover focus-visible:ring-[3px] focus-visible:z-20 focus-visible:ring-lightListTablePaginationFocusRing dark:focus-visible:ring-darkListTablePaginationFocusRing dark:bg-darkListTablePaginationBackgoround dark:text-darkListTablePaginationText dark:border-darkListTablePaginationBorder dark:hover:text-white dark:hover:bg-darkListTablePaginationBackgoroundHover disabled:opacity-50"
311
312
  @click="page = totalPages; pageInput = page.toString();" :disabled="page >= totalPages">
312
313
  {{ totalPages }}
313
314
  </button>
314
315
  <button
315
- class="af-pagination-next-button flex items-center py-1 px-3 gap-1 text-sm font-medium text-lightListTablePaginationText focus:outline-none bg-lightListTablePaginationBackgoround border-l-0 rounded-e border border-lightListTablePaginationBorder hover:bg-lightListTablePaginationBackgoroundHover hover:text-lightListTablePaginationTextHover focus:z-10 focus:ring-4 focus:ring-lightListTablePaginationFocusRing dark:focus:ring-darkListTablePaginationFocusRing dark:bg-darkListTablePaginationBackgoround dark:text-darkListTablePaginationText dark:border-darkListTablePaginationBorder dark:hover:text-white dark:hover:bg-darkListTablePaginationBackgoroundHover disabled:opacity-50"
316
+ class="af-pagination-next-button flex items-center h-7 px-2.5 gap-1 text-sm font-medium text-lightListTablePaginationText focus:outline-none bg-lightListTablePaginationBackgoround border-l-0 rounded-e-default border border-lightListTablePaginationBorder hover:bg-lightListTablePaginationBackgoroundHover hover:text-lightListTablePaginationTextHover focus-visible:z-10 focus-visible:ring-[3px] focus-visible:ring-lightListTablePaginationFocusRing dark:focus-visible:ring-darkListTablePaginationFocusRing dark:bg-darkListTablePaginationBackgoround dark:text-darkListTablePaginationText dark:border-darkListTablePaginationBorder dark:hover:text-white dark:hover:bg-darkListTablePaginationBackgoroundHover disabled:opacity-50"
316
317
  @click="page++; pageInput = page.toString();" :disabled="page >= totalPages">
317
318
  <span class="hidden sm:inline">{{ $t('Next') }}</span>
318
- <svg class="w-3.5 h-3.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
319
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>
320
- </svg>
319
+ <IconChevronRight class="w-4 h-4 rtl:rotate-180" aria-hidden="true" />
321
320
  </button>
322
321
  </div>
323
322
 
324
323
  <!-- Help text -->
325
- <span class="ml-4 text-sm text-lightListTablePaginationHelpText dark:text-darkListTablePaginationHelpText">
324
+ <span class="ml-2 text-[13px] text-lightListTablePaginationHelpText dark:text-darkListTablePaginationHelpText [&_strong]:font-medium [&_strong]:text-lightListTablePaginationCurrentPageText dark:[&_strong]:text-darkListTablePaginationCurrentPageText">
326
325
  <span v-if="((((page || 1) - 1) * pageSize + 1 > totalRows) && totalRows > 0)">{{ $t('Wrong Page') }} </span>
327
326
  <template v-else-if="resource && totalRows > 0">
328
327
 
@@ -356,7 +355,7 @@
356
355
  </span>
357
356
  <div v-if="totalRows > 0 && resource?.options?.listPageSizeOptions?.length"
358
357
  class="flex items-center gap-2 ml-auto" >
359
- <span class="text-sm text-lightListTablePaginationHelpText dark:text-darkListTablePaginationHelpText whitespace-nowrap">
358
+ <span class="text-[13px] text-lightListTablePaginationHelpText dark:text-darkListTablePaginationHelpText whitespace-nowrap">
360
359
  {{ $t('Rows per page') }}
361
360
  </span>
362
361
  <Select
@@ -368,7 +367,7 @@
368
367
  :placeholder="pageSizeInternal?.toString()"
369
368
  class="text-sm min-w-20 af-page-size-button"
370
369
  classesForInput="
371
- af-page-size-btn h-[2.125rem] min-h-0 py-1 pl-2 pr-6 text-left text-sm font-medium transition-all
370
+ af-page-size-btn h-7 min-h-0 py-1 pl-2.5 pr-7 text-left text-sm font-medium transition-all
372
371
  outline-none cursor-pointer af-button-shadow rounded-default bg-lightListViewButtonBackground
373
372
  text-lightListViewButtonText border-lightListViewButtonBorder
374
373
  dark:bg-darkListViewButtonBackground dark:text-darkListViewButtonText dark:border-darkListViewButtonBorder
@@ -392,13 +391,17 @@ import { showSuccesTost, showErrorTost } from '@/composables/useFrontendApi';
392
391
  import SkeleteLoader from '@/components/SkeleteLoader.vue';
393
392
  import { getIcon } from '@/utils';
394
393
  import {
395
- IconEyeSolid,
396
- IconPenSolid,
397
- IconTrashBinSolid,
398
- IconInboxOutline
399
- } from '@iconify-prerendered/vue-flowbite';
394
+ IconEye,
395
+ IconPencil,
396
+ IconTrash2,
397
+ IconInbox,
398
+ IconArrowUp,
399
+ IconChevronsUpDown,
400
+ IconChevronLeft,
401
+ IconChevronRight
402
+ } from '@iconify-prerendered/vue-lucide';
400
403
  import router from '@/router';
401
- import { Tooltip, Spinner } from '@/afcl';
404
+ import { Tooltip, Spinner, Button, LinkButton } from '@/afcl';
402
405
  import type { AdminForthResourceFrontend, AdminForthResourceColumnCommon, AdminForthComponentDeclarationFull, AdminForthComponentDeclaration } from '@/types/Common';
403
406
  import { useAdminforth } from '@/adminforth';
404
407
  import Checkbox from '@/afcl/Checkbox.vue';
@@ -406,8 +409,8 @@ import ListActionsThreeDots from '@/components/ListActionsThreeDots.vue';
406
409
  import CallActionWrapper from '@/components/CallActionWrapper.vue'
407
410
  import { Select } from '@/afcl';
408
411
 
409
- const TABLE_CLASSES = 'w-full text-sm text-left rtl:text-right text-lightListTableText dark:text-darkListTableText rounded-default';
410
- const HEADER_ROW_CLASSES = 'border-b dark:border-gray-700 t-header sticky z-20 top-0 text-xs text-lightListTableHeadingText bg-lightListTableHeading dark:bg-darkListTableHeading dark:text-darkListTableHeadingText';
412
+ const TABLE_CLASSES = 'w-full text-[13px] text-left rtl:text-right text-lightListTableText dark:text-darkListTableText rounded-default';
413
+ const HEADER_ROW_CLASSES = 'border-b border-lightListBorder dark:border-darkListBorder t-header sticky z-20 top-0 text-xs text-lightListTableHeadingText bg-lightListTableHeading dark:bg-darkListTableHeading dark:text-darkListTableHeadingText';
411
414
  const SKELETON_COLUMNS_COUNT = 5;
412
415
 
413
416
  const coreStore = useCoreStore();
@@ -1,17 +1,17 @@
1
1
  <template>
2
- <div class="overflow-x-auto overscroll-x-contain shadow-resourseFormShadow dark:shadow-darkResourseFormShadow border dark:border-gray-700"
3
- :class="{'rounded-default' : isRounded}"
2
+ <div class="overflow-x-auto overscroll-x-contain shadow-resourseFormShadow dark:shadow-darkResourseFormShadow border border-lightFormBorder dark:border-darkFormBorder"
3
+ :class="{'rounded-lg' : isRounded}"
4
4
  >
5
- <div v-if="groupName && !noTitle" class="text-md font-semibold px-6 py-3 flex flex-1 items-center text-lightShowTableHeadingText bg-lightShowTableHeadingBackground dark:bg-darkShowTableHeadingBackground dark:text-darkShowTableHeadingText rounded-t-lg">
5
+ <div v-if="groupName && !noTitle" class="text-sm font-semibold px-5 py-3 flex flex-1 items-center text-lightShowTableHeadingText bg-lightShowTableHeadingBackground dark:bg-darkShowTableHeadingBackground dark:text-darkShowTableHeadingText rounded-t-lg">
6
6
  {{ groupName }}
7
7
  </div>
8
8
  <table class="w-full text-sm text-left rtl:text-right text-lightShowTableBodyText dark:text-darkShowTableBodyText table-fixed">
9
9
  <thead v-if="!allColumnsHaveCustomComponent" class="text-lightShowTableUnderHeadingText dark:text-darkShowTableUnderHeadingText bg-lightShowTableUnderHeadingBackground dark:bg-darkShowTableUnderHeadingBackground dark:border-darkFormBorder block md:table-row-group">
10
10
  <tr>
11
- <th scope="col" class="px-6 py-3 text-xs uppercase hidden md:w-52 md:table-cell">
11
+ <th scope="col" class="px-5 py-2.5 text-xs font-medium hidden md:w-56 md:table-cell">
12
12
  {{ $t('Field') }}
13
13
  </th>
14
- <th scope="col" class="px-6 py-3 text-xs uppercase hidden md:table-cell">
14
+ <th scope="col" class="px-5 py-2.5 text-xs font-medium hidden md:table-cell">
15
15
  {{ $t('Value') }}
16
16
  </th>
17
17
  </tr>
@@ -32,12 +32,12 @@
32
32
  :record="coreStore.record"
33
33
  />
34
34
  <template v-else-if="checkShowIf(column, record, resource?.columns || [])">
35
- <td class="px-6 py-4 relative block flex justify-start font-bold md:font-normal pb-0 md:pb-4 relative md:table-cell">
36
- <div class="absolute inset-0 flex items-center overflow-hidden px-6 py-4 max-h-32">
35
+ <td class="px-5 py-3 relative block flex justify-start font-medium text-lightFormFieldTextColor dark:text-darkFormFieldTextColor pb-0 md:pb-3 relative md:table-cell">
36
+ <div class="absolute inset-0 flex items-center overflow-hidden px-5 py-3 max-h-32">
37
37
  {{ column.label }}
38
38
  </div>
39
39
  </td>
40
- <td class="px-6 py-4 whitespace-pre-wrap" :data-af-column="column.name">
40
+ <td class="px-5 py-3 whitespace-pre-wrap" :data-af-column="column.name">
41
41
  <component
42
42
  v-if="column?.components?.show"
43
43
  :is="getCustomComponent(column?.components?.show)"
@@ -46,38 +46,38 @@
46
46
  </div>
47
47
  <div class="absolute top-1.5 -right-4 z-10 hidden sm:block" v-if="!forceIconOnly && iconOnlySidebarEnabled && (!isSidebarIconOnly || (isSidebarIconOnly && isSidebarHovering))">
48
48
  <button class="text-sm text-lightSidebarIcons group-hover:text-lightSidebarIconsHover dark:group-hover:text-darkSidebarIconsHover dark:text-darkSidebarIcons" @click="toggleSidebar">
49
- <IconCloseSidebarSolid v-if="!isSidebarIconOnly" class="w-5 h-5 active:scale-95 transition-all duration-200 hover:text-lightSidebarIconsHover dark:hover:text-darkSidebarIconsHover" />
50
- <IconOpenSidebarSolid v-else class="w-5 h-5 active:scale-95 transition-all duration-200 hover:text-lightSidebarIconsHover dark:hover:text-darkSidebarIconsHover" />
51
- </button>
49
+ <IconPanelLeftClose v-if="!isSidebarIconOnly" class="w-4 h-4 active:scale-95 transition-all duration-200 hover:text-lightSidebarIconsHover dark:hover:text-darkSidebarIconsHover" />
50
+ <IconPanelLeftOpen v-else class="w-4 h-4 active:scale-95 transition-all duration-200 hover:text-lightSidebarIconsHover dark:hover:text-darkSidebarIconsHover" />
51
+ </button>
52
52
  </div>
53
53
  </div>
54
54
 
55
55
  <div
56
56
  v-if="coreStore?.config?.defaultUserExists && !isLocalhost"
57
- class="mb-4 text-white rounded-lg bg-red-700/80 fill-white text-sm"
58
- :class="iconOnlySidebarEnabled && isSidebarIconOnly && !isSidebarHovering ? 'flex w-10 h-10 ml-1 items-center justify-center' : 'p-4'"
57
+ class="mb-4 rounded-lg border border-lightInputErrorColor/30 bg-lightInputErrorColor/10 text-lightInputErrorColor dark:border-darkInputErrorColor/30 dark:bg-darkInputErrorColor/10 dark:text-darkInputErrorColor text-sm"
58
+ :class="iconOnlySidebarEnabled && isSidebarIconOnly && !isSidebarHovering ? 'flex w-10 h-10 ml-1 items-center justify-center' : 'p-3'"
59
59
  >
60
- <IconExclamationCircleOutline class="inline-block align-text-bottom w-5 h-5 shrink-0" />
60
+ <IconCircleAlert class="inline-block align-text-bottom w-4 h-4 shrink-0" />
61
61
  <template v-if="!iconOnlySidebarEnabled || !isSidebarIconOnly || isSidebarHovering">
62
62
  {{ $t('Default user') }} <strong>"adminforth"</strong> {{ $t('detected. Delete it and create your own account.') }}
63
63
  </template>
64
64
  </div>
65
65
 
66
- <ul class="af-sidebar-container space-y-2 font-medium" >
66
+ <ul class="af-sidebar-container space-y-0.5 text-sm" >
67
67
  <template v-if="!iconOnlySidebarEnabled || !isSidebarIconOnly" v-for="(item, i) in coreStore.menu" :key="`menu-${i}`">
68
- <div v-if="item.type === 'divider'" class="border-t border-lightSidebarDevider dark:border-darkSidebarDevider"></div>
69
- <div v-else-if="item.type === 'gap'" class="flex items-center justify-center h-8"></div>
70
- <div v-else-if="item.type === 'heading'" class="flex items-center justify-left pl-2 h-8 text-lightSidebarHeading dark:text-darkSidebarHeading
68
+ <div v-if="item.type === 'divider'" class="my-2 mx-2 border-t border-lightSidebarDevider dark:border-darkSidebarDevider"></div>
69
+ <div v-else-if="item.type === 'gap'" class="flex items-center justify-center h-4"></div>
70
+ <div v-else-if="item.type === 'heading'" class="flex items-center justify-left px-3 pt-3 pb-1 text-xs font-medium tracking-wide text-lightSidebarHeading dark:text-darkSidebarHeading
71
71
  ">{{ item.label }}</div>
72
72
  <li v-else-if="item.children" class="af-sidebar-expand-container">
73
- <button @click="clickOnMenuItem(i)" type="button" class="af-sidebar-expand-button flex items-center w-full px-3.5 py-2 text-base text-lightSidebarText rounded-default transition duration-75 group hover:bg-lightSidebarItemHover hover:text-lightSidebarTextHover dark:text-darkSidebarText dark:hover:bg-darkSidebarHover dark:hover:text-darkSidebarTextHover"
73
+ <button @click="clickOnMenuItem(i)" type="button" class="af-sidebar-expand-button flex items-center w-full px-3 py-1.5 text-sm text-lightSidebarText rounded-default transition duration-75 group hover:bg-lightSidebarItemHover hover:text-lightSidebarTextHover dark:text-darkSidebarText dark:hover:bg-darkSidebarItemHover dark:hover:text-darkSidebarTextHover"
74
74
  :class="opened.includes(i) ? 'af-sidebar-dropdown-expanded' : 'af-sidebar-dropdown-collapsed'"
75
75
  :aria-controls="`dropdown-example${i}`"
76
76
  >
77
- <component v-if="item.icon" :is="getIcon(item.icon)" class="w-5 h-5 text-lightSidebarIcons group-hover:text-lightSidebarIconsHover transition duration-75 dark:group-hover:text-darkSidebarIconsHover dark:text-darkSidebarIcons" ></component>
77
+ <component v-if="item.icon" :is="getIcon(item.icon)" class="w-4 h-4 text-lightSidebarIcons group-hover:text-lightSidebarIconsHover transition duration-75 dark:group-hover:text-darkSidebarIconsHover dark:text-darkSidebarIcons" ></component>
78
78
  <span class="overflow-hidden flex-1 ms-3 text-left rtl:text-right whitespace-nowrap">{{ item.label }}
79
- <span v-if="item.badge || item.badge === 0" class="inline-flex items-center justify-center w-3 h-3 p-3 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
80
- fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent">
79
+ <span v-if="item.badge || item.badge === 0" class="inline-flex items-center justify-center min-w-[1.25rem] h-5 px-1.5 ms-2 text-[11px] font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
80
+ fill-lightAnnouncementText dark:fill-darkAnnouncementText text-lightAnnouncementText dark:text-darkAnnouncementText">
81
81
  <Tooltip v-if="item.badgeTooltip">
82
82
  {{ item.badge }}
83
83
  <template #tooltip>
@@ -90,13 +90,11 @@
90
90
  </span>
91
91
  </span>
92
92
 
93
- <svg :class="{'rotate-180': opened.includes(i) }" class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
94
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
95
- </svg>
93
+ <IconChevronDown :class="{'rotate-180': opened.includes(i) }" class="w-3 h-3 text-lightSidebarIcons dark:text-darkSidebarIcons transition-transform duration-200" aria-hidden="true" />
96
94
  </button>
97
95
 
98
96
  <transition name="slow-drop">
99
- <ul v-show="opened.includes(i)" :id="`dropdown-example${i}`" role="none" class="af-sidebar-dropdown pt-1 space-y-1 overflow-hidden">
97
+ <ul v-show="opened.includes(i)" :id="`dropdown-example${i}`" role="none" class="af-sidebar-dropdown mt-0.5 ml-[1.25rem] pl-2 border-l border-lightSidebarDevider dark:border-darkSidebarDevider space-y-0.5 overflow-hidden">
100
98
  <template v-for="(child, j) in item.children" :key="`menu-${i}-${j}`">
101
99
  <li class="af-sidebar-menu-link">
102
100
  <MenuLink :item="child" isChild="true" @click="$emit('hideSidebar')"/>
@@ -110,20 +108,20 @@
110
108
  </li>
111
109
  </template>
112
110
  <template v-if="iconOnlySidebarEnabled && isSidebarIconOnly" v-for="(item, i) in coreStore.menu" :key="`menu-${i}`">
113
- <div v-if="item.type === 'divider'" class="border-t border-lightSidebarDevider dark:border-darkSidebarDevider"></div>
114
- <div v-else-if="item.type === 'gap'" class="flex items-center justify-center h-8"></div>
115
- <div v-else-if="item.type === 'heading' && isSidebarHovering" class="flex items-center justify-left pl-2 h-8 text-lightSidebarHeading dark:text-darkSidebarHeading
111
+ <div v-if="item.type === 'divider'" class="my-2 mx-2 border-t border-lightSidebarDevider dark:border-darkSidebarDevider"></div>
112
+ <div v-else-if="item.type === 'gap'" class="flex items-center justify-center h-4"></div>
113
+ <div v-else-if="item.type === 'heading' && isSidebarHovering" class="flex items-center justify-left px-3 h-8 text-xs font-medium tracking-wide text-lightSidebarHeading dark:text-darkSidebarHeading
116
114
  ">{{ item.label }}</div>
117
115
  <div v-else-if="item.type === 'heading' && !isSidebarHovering" class="opacity-0 w-1 h-8">{{ item.label }}</div>
118
116
  <li v-else-if="item.children" class="af-sidebar-expand-container">
119
- <button @click="clickOnMenuItem(i)" type="button" class="af-sidebar-expand-button relative flex items-center h-10 py-2 text-base text-lightSidebarText rounded-default group hover:bg-lightSidebarItemHover hover:text-lightSidebarTextHover dark:text-darkSidebarText dark:hover:bg-darkSidebarHover dark:hover:text-darkSidebarTextHover"
117
+ <button @click="clickOnMenuItem(i)" type="button" class="af-sidebar-expand-button relative flex items-center h-9 py-2 text-sm text-lightSidebarText rounded-default group hover:bg-lightSidebarItemHover hover:text-lightSidebarTextHover dark:text-darkSidebarText dark:hover:bg-darkSidebarItemHover dark:hover:text-darkSidebarTextHover"
120
118
  :class="[
121
119
  opened.includes(i) ? 'af-sidebar-dropdown-expanded' : 'af-sidebar-dropdown-collapsed',
122
- isSidebarIconOnly && !isSidebarHovering ? 'w-10 ml-1 px-2.5' : 'w-full px-3.5'
120
+ isSidebarIconOnly && !isSidebarHovering ? 'w-10 ml-1 px-3' : 'w-full px-3'
123
121
  ]"
124
122
  :aria-controls="`dropdown-example${i}`"
125
123
  >
126
- <component v-if="item.icon" :is="getIcon(item.icon)" class="min-w-5 min-h-5 text-lightSidebarIcons group-hover:text-lightSidebarIconsHover transition duration-75 dark:group-hover:text-darkSidebarIconsHover dark:text-darkSidebarIcons" ></component>
124
+ <component v-if="item.icon" :is="getIcon(item.icon)" class="min-w-4 w-4 h-4 text-lightSidebarIcons group-hover:text-lightSidebarIconsHover transition duration-75 dark:group-hover:text-darkSidebarIconsHover dark:text-darkSidebarIcons" ></component>
127
125
 
128
126
  <span
129
127
  class="overflow-hidden block ms-3 text-left rtl:text-right transition-all duration-200 ease-in-out"
@@ -133,13 +131,13 @@
133
131
  'opacity-100 ms-3 translate-x-0 flex-1': !isSidebarIconOnly
134
132
  }"
135
133
  :style="isSidebarIconOnly ? {
136
- minWidth: `calc(${expandedWidth} - 0.75rem*2 - 0.875rem*2 - 1.25rem - 0.75rem)`,
137
- width: `calc(${expandedWidth} - 0.75rem*2 - 0.875rem*2 - 1.25rem - 0.75rem)`
134
+ minWidth: `calc(${expandedWidth} - 0.75rem*2 - 0.75rem*2 - 1rem - 0.75rem)`,
135
+ width: `calc(${expandedWidth} - 0.75rem*2 - 0.75rem*2 - 1rem - 0.75rem)`
138
136
  } : {}"
139
137
  >{{ item.label }}
140
138
 
141
- <span v-if="item.badge || item.badge === 0" class="inline-flex items-center justify-center w-3 h-3 p-3 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
142
- fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent">
139
+ <span v-if="item.badge || item.badge === 0" class="inline-flex items-center justify-center min-w-[1.25rem] h-5 px-1.5 ms-2 text-[11px] font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
140
+ fill-lightAnnouncementText dark:fill-darkAnnouncementText text-lightAnnouncementText dark:text-darkAnnouncementText">
143
141
  <Tooltip v-if="item.badgeTooltip">
144
142
  {{ item.badge }}
145
143
  <template #tooltip>
@@ -152,12 +150,10 @@
152
150
  </span>
153
151
  </span>
154
152
 
155
- <svg :class="{'rotate-180': opened.includes(i) }" class="w-3 h-3 ml-2 absolute right-3.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
156
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
157
- </svg>
153
+ <IconChevronDown :class="{'rotate-180': opened.includes(i) }" class="w-3 h-3 ml-2 absolute right-3 text-lightSidebarIcons dark:text-darkSidebarIcons transition-transform duration-200" aria-hidden="true" />
158
154
  </button>
159
155
 
160
- <ul :id="`dropdown-example${i}`" role="none" class="af-sidebar-dropdown pt-1 space-y-1" :class="{ 'hidden': !opened.includes(i) }">
156
+ <ul :id="`dropdown-example${i}`" role="none" class="af-sidebar-dropdown pt-0.5 space-y-0.5" :class="{ 'hidden': !opened.includes(i) }">
161
157
  <template v-for="(child, j) in item.children" :key="`menu-${i}-${j}`">
162
158
  <li class="af-sidebar-menu-link">
163
159
  <MenuLink :item="child" isChild="true" @click="$emit('hideSidebar')" :isSidebarIconOnly="isSidebarIconOnly" :isSidebarHovering="isSidebarHovering"/>
@@ -173,7 +169,7 @@
173
169
 
174
170
 
175
171
  <div id="dropdown-cta" class="p-4 mt-6 w-[14.375rem] rounded-lg bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
176
- fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent text-sm" role="alert"
172
+ fill-lightAnnouncementText dark:fill-darkAnnouncementText text-lightAnnouncementText dark:text-darkAnnouncementText text-sm" role="alert"
177
173
  v-if="(ctaBadge && !isSidebarIconOnly) || (ctaBadge && isSidebarIconOnly && isSidebarHovering)"
178
174
  >
179
175
  <div class="flex items-center mb-3" :class="!ctaBadge.title ? 'float-right' : ''">
@@ -190,9 +186,7 @@
190
186
  v-if="ctaBadge?.closable" @click="closeCTA"
191
187
  >
192
188
  <span class="sr-only">Close</span>
193
- <svg class="w-2.5 h-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
194
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
195
- </svg>
189
+ <IconX class="w-3.5 h-3.5" aria-hidden="true" />
196
190
  </button>
197
191
  </div>
198
192
  <p class="mb-3 text-sm" v-if="ctaBadge.html" v-html="ctaBadge.html"></p>
@@ -332,12 +326,11 @@
332
326
  import { computed, ref, watch, nextTick, onMounted, onUnmounted, type Ref } from 'vue';
333
327
  import { useCoreStore } from '@/stores/core';
334
328
  import MenuLink from './MenuLink.vue';
335
- import { IconCloseSidebarSolid, IconOpenSidebarSolid } from '@iconify-prerendered/vue-flowbite';
329
+ import { IconPanelLeftClose, IconPanelLeftOpen, IconChevronDown, IconX, IconCircleAlert } from '@iconify-prerendered/vue-lucide';
336
330
  import { getIcon, verySimpleHash, loadFile, getCustomComponent } from '@/utils';
337
331
  import { Tooltip } from '@/afcl';
338
332
  import type { AnnouncementBadgeResponse } from '@/types/Common';
339
333
  import { useAdminforth } from '@/adminforth';
340
- import { IconExclamationCircleOutline} from '@iconify-prerendered/vue-flowbite';
341
334
  import { useI18n } from 'vue-i18n';
342
335
 
343
336
  const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1' || window.location.hostname === '::1';