@innertia-solutions/nuxt-theme-spark 0.1.76 → 0.1.78
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.
- package/components/Table/Standard.vue +58 -64
- package/package.json +1 -1
|
@@ -154,20 +154,40 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
154
154
|
<Forms.Input v-model="search" type="search" :placeholder="searchPlaceholder" :icon-left="IconSearch" />
|
|
155
155
|
</div>
|
|
156
156
|
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
157
|
+
<div v-if="showFilters && hasFilterableColumns" class="relative">
|
|
158
|
+
<button
|
|
159
|
+
type="button"
|
|
160
|
+
@click="showFilterPanel = !showFilterPanel"
|
|
161
|
+
:class="[
|
|
162
|
+
'py-1.5 px-3 inline-flex items-center gap-2 text-sm font-medium rounded-lg border transition-colors',
|
|
163
|
+
showFilterPanel || activeFilterCount > 0
|
|
164
|
+
? 'border-blue-500 bg-blue-50 text-blue-700 dark:bg-blue-900/20 dark:border-blue-500 dark:text-blue-300'
|
|
165
|
+
: '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'
|
|
166
|
+
]"
|
|
167
|
+
>
|
|
168
|
+
<IconAdjustmentsHorizontal class="size-4" stroke="1.5" />
|
|
169
|
+
Filtros{{ activeFilterCount > 0 ? ` (${activeFilterCount})` : '' }}
|
|
170
|
+
</button>
|
|
171
|
+
|
|
172
|
+
<!-- Filter panel — anchored below button -->
|
|
173
|
+
<Transition
|
|
174
|
+
enter-active-class="transition ease-out duration-150"
|
|
175
|
+
enter-from-class="opacity-0 translate-y-1 scale-95"
|
|
176
|
+
enter-to-class="opacity-100 translate-y-0 scale-100"
|
|
177
|
+
leave-active-class="transition ease-in duration-100"
|
|
178
|
+
leave-from-class="opacity-100 translate-y-0 scale-100"
|
|
179
|
+
leave-to-class="opacity-0 translate-y-1 scale-95"
|
|
180
|
+
>
|
|
181
|
+
<div
|
|
182
|
+
v-if="showFilterPanel"
|
|
183
|
+
ref="filterPanelRef"
|
|
184
|
+
class="absolute top-full left-0 z-50 mt-1.5 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl shadow-2xl p-3 min-w-56 max-h-96 overflow-y-auto"
|
|
185
|
+
>
|
|
186
|
+
<p class="text-[10px] font-bold text-slate-400 dark:text-slate-500 uppercase tracking-widest mb-3 px-1">Filtros</p>
|
|
187
|
+
<TableFilter v-model="activeFilters" :columns="filtersConfig" />
|
|
188
|
+
</div>
|
|
189
|
+
</Transition>
|
|
190
|
+
</div>
|
|
171
191
|
|
|
172
192
|
<slot name="actions" />
|
|
173
193
|
|
|
@@ -188,37 +208,32 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
188
208
|
<TableExportable v-if="showExport" :table-ref="tableRef" :name="name" :columns="columns" />
|
|
189
209
|
</div>
|
|
190
210
|
|
|
191
|
-
<!-- Contenido: tabla + preview
|
|
192
|
-
<div
|
|
211
|
+
<!-- Contenido: tabla siempre full width + preview overlay -->
|
|
212
|
+
<div class="relative">
|
|
193
213
|
|
|
194
214
|
<!-- Tabla -->
|
|
195
|
-
<
|
|
196
|
-
|
|
197
|
-
:
|
|
215
|
+
<Table
|
|
216
|
+
ref="tableRef"
|
|
217
|
+
:endpoint="endpoint"
|
|
218
|
+
:columns="columns"
|
|
219
|
+
:name="name"
|
|
220
|
+
:params="mergedParams"
|
|
221
|
+
:search="search"
|
|
222
|
+
:checkable="checkable"
|
|
223
|
+
:cached="cached"
|
|
224
|
+
:show-reload-button="showReloadButton"
|
|
225
|
+
:click-row-to-open="clickRowToOpen"
|
|
226
|
+
:preview-row-id="previewRow?.id ?? null"
|
|
227
|
+
:preview-mode="!!previewEnabled"
|
|
228
|
+
@row-click="handleRowClick"
|
|
229
|
+
@loaded="emit('loaded', $event)"
|
|
198
230
|
>
|
|
199
|
-
<
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
:name="name"
|
|
204
|
-
:params="mergedParams"
|
|
205
|
-
:search="search"
|
|
206
|
-
:checkable="checkable"
|
|
207
|
-
:cached="cached"
|
|
208
|
-
:show-reload-button="showReloadButton"
|
|
209
|
-
:click-row-to-open="clickRowToOpen"
|
|
210
|
-
:preview-row-id="previewRow?.id ?? null"
|
|
211
|
-
:preview-mode="!!previewEnabled"
|
|
212
|
-
@row-click="handleRowClick"
|
|
213
|
-
@loaded="emit('loaded', $event)"
|
|
214
|
-
>
|
|
215
|
-
<template v-for="(_, name) in $slots" #[name]="slotProps">
|
|
216
|
-
<slot :name="name" v-bind="slotProps ?? {}" />
|
|
217
|
-
</template>
|
|
218
|
-
</Table>
|
|
219
|
-
</div>
|
|
231
|
+
<template v-for="(_, name) in $slots" #[name]="slotProps">
|
|
232
|
+
<slot :name="name" v-bind="slotProps ?? {}" />
|
|
233
|
+
</template>
|
|
234
|
+
</Table>
|
|
220
235
|
|
|
221
|
-
<!--
|
|
236
|
+
<!-- Preview panel overlay — slides in from right, tapa la tabla -->
|
|
222
237
|
<Transition
|
|
223
238
|
enter-active-class="transition ease-out duration-200"
|
|
224
239
|
enter-from-class="opacity-0 translate-x-6"
|
|
@@ -229,7 +244,7 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
229
244
|
>
|
|
230
245
|
<div
|
|
231
246
|
v-if="previewRow && previewEnabled"
|
|
232
|
-
class="
|
|
247
|
+
class="absolute inset-y-0 right-0 z-10 flex bg-white dark:bg-slate-800 border-l border-slate-200 dark:border-slate-700 shadow-xl"
|
|
233
248
|
:style="{ width: (100 - currentRatio) + '%' }"
|
|
234
249
|
>
|
|
235
250
|
<!-- Resize handle -->
|
|
@@ -238,7 +253,7 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
238
253
|
@mousedown="startResize"
|
|
239
254
|
/>
|
|
240
255
|
<!-- Preview -->
|
|
241
|
-
<div class="flex flex-col overflow-y-auto
|
|
256
|
+
<div class="flex flex-col overflow-y-auto flex-1">
|
|
242
257
|
<slot name="preview" :row="previewRow" :close="closePreview" />
|
|
243
258
|
</div>
|
|
244
259
|
</div>
|
|
@@ -247,27 +262,6 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
247
262
|
</div>
|
|
248
263
|
</div>
|
|
249
264
|
|
|
250
|
-
<!-- Filter panel — outside overflow-hidden so never clipped -->
|
|
251
|
-
<Transition
|
|
252
|
-
enter-active-class="transition ease-out duration-150"
|
|
253
|
-
enter-from-class="opacity-0 translate-y-1 scale-95"
|
|
254
|
-
enter-to-class="opacity-100 translate-y-0 scale-100"
|
|
255
|
-
leave-active-class="transition ease-in duration-100"
|
|
256
|
-
leave-from-class="opacity-100 translate-y-0 scale-100"
|
|
257
|
-
leave-to-class="opacity-0 translate-y-1 scale-95"
|
|
258
|
-
>
|
|
259
|
-
<div
|
|
260
|
-
v-if="showFilterPanel && hasFilterableColumns"
|
|
261
|
-
ref="filterPanelRef"
|
|
262
|
-
class="absolute top-12 left-0 z-50 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl shadow-2xl p-3 min-w-64 max-h-96 overflow-y-auto"
|
|
263
|
-
>
|
|
264
|
-
<p class="text-[10px] font-bold text-slate-400 dark:text-slate-500 uppercase tracking-widest mb-3 px-1">
|
|
265
|
-
Filtros
|
|
266
|
-
</p>
|
|
267
|
-
<TableFilter v-model="activeFilters" :columns="filtersConfig" />
|
|
268
|
-
</div>
|
|
269
|
-
</Transition>
|
|
270
|
-
|
|
271
265
|
<!-- Column panel — outside overflow-hidden so never clipped -->
|
|
272
266
|
<Transition
|
|
273
267
|
enter-active-class="transition ease-out duration-150"
|