@innertia-solutions/nuxt-theme-spark 0.1.33 → 0.1.35
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { IconSearch, IconAdjustmentsHorizontal, IconLayoutColumns, IconGripVertical } from '@tabler/icons-vue'
|
|
2
|
+
import { IconSearch, IconAdjustmentsHorizontal, IconLayoutColumns, IconGripVertical, IconBolt, IconReload } from '@tabler/icons-vue'
|
|
3
3
|
|
|
4
4
|
const props = defineProps({
|
|
5
5
|
endpoint: { type: String, required: true },
|
|
@@ -92,15 +92,12 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
92
92
|
<!-- Toolbar -->
|
|
93
93
|
<div class="flex flex-wrap items-center gap-3 px-4 py-3 border-b border-slate-200 dark:border-slate-700">
|
|
94
94
|
<!-- Search -->
|
|
95
|
-
<div v-if="showSearch" class="
|
|
96
|
-
<
|
|
97
|
-
<IconSearch class="size-4 text-slate-400" stroke="1.5" />
|
|
98
|
-
</div>
|
|
99
|
-
<input
|
|
95
|
+
<div v-if="showSearch" class="flex-1 min-w-48">
|
|
96
|
+
<Forms.Input
|
|
100
97
|
v-model="search"
|
|
101
98
|
type="search"
|
|
102
99
|
:placeholder="searchPlaceholder"
|
|
103
|
-
|
|
100
|
+
:icon-left="IconSearch"
|
|
104
101
|
/>
|
|
105
102
|
</div>
|
|
106
103
|
|
|
@@ -126,6 +123,31 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
126
123
|
|
|
127
124
|
<slot name="actions" />
|
|
128
125
|
|
|
126
|
+
<!-- Reload -->
|
|
127
|
+
<button
|
|
128
|
+
type="button"
|
|
129
|
+
@click="reload()"
|
|
130
|
+
class="py-1.5 px-2.5 inline-flex items-center gap-2 text-sm font-medium rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800 text-slate-600 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors"
|
|
131
|
+
title="Recargar"
|
|
132
|
+
>
|
|
133
|
+
<IconReload class="size-4" />
|
|
134
|
+
</button>
|
|
135
|
+
|
|
136
|
+
<!-- Cache badge -->
|
|
137
|
+
<div v-if="tableRef?.isDataFromCache && tableRef?.cached" class="group relative flex items-center">
|
|
138
|
+
<div class="flex items-center gap-x-1.5 py-1.5 px-2.5 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 rounded-lg cursor-help hover:bg-emerald-500/20 transition-colors border border-emerald-200 dark:border-emerald-800">
|
|
139
|
+
<IconBolt class="size-3.5 fill-current" />
|
|
140
|
+
<span class="text-[10px] font-bold uppercase tracking-wider">Instant</span>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="absolute top-full mt-2 right-0 hidden group-hover:block w-48 p-2.5 bg-slate-900 text-white text-[11px] leading-relaxed rounded-xl shadow-2xl z-50">
|
|
143
|
+
<div class="font-bold mb-1 flex items-center gap-x-1.5 text-emerald-400">
|
|
144
|
+
<IconBolt class="size-3" /> Datos en Caché
|
|
145
|
+
</div>
|
|
146
|
+
Cargados desde memoria local. Recarga para sincronizar.
|
|
147
|
+
<div class="absolute bottom-full right-4 mb-[-1px] border-4 border-transparent border-b-slate-900"></div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
129
151
|
<!-- Column visibility toggle -->
|
|
130
152
|
<button
|
|
131
153
|
type="button"
|
package/components/Table.vue
CHANGED