@innertia-solutions/nuxt-theme-spark 0.1.75 → 0.1.77
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 +59 -49
- 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
|
|
|
@@ -189,11 +209,12 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
189
209
|
</div>
|
|
190
210
|
|
|
191
211
|
<!-- Contenido: tabla + preview en flex -->
|
|
192
|
-
<div :class="
|
|
212
|
+
<div :class="previewEnabled ? 'flex items-stretch overflow-hidden' : ''">
|
|
193
213
|
|
|
194
214
|
<!-- Tabla -->
|
|
195
215
|
<div
|
|
196
|
-
|
|
216
|
+
class="min-w-0 transition-[width] duration-200 ease-out"
|
|
217
|
+
:style="previewEnabled ? { width: (previewRow ? currentRatio : 100) + '%', flexShrink: 0 } : {}"
|
|
197
218
|
>
|
|
198
219
|
<Table
|
|
199
220
|
ref="tableRef"
|
|
@@ -217,46 +238,35 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
217
238
|
</Table>
|
|
218
239
|
</div>
|
|
219
240
|
|
|
220
|
-
<!-- Divider + preview -->
|
|
221
|
-
<
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
241
|
+
<!-- Divider + preview con animación slide -->
|
|
242
|
+
<Transition
|
|
243
|
+
enter-active-class="transition ease-out duration-200"
|
|
244
|
+
enter-from-class="opacity-0 translate-x-6"
|
|
245
|
+
enter-to-class="opacity-100 translate-x-0"
|
|
246
|
+
leave-active-class="transition ease-in duration-150"
|
|
247
|
+
leave-from-class="opacity-100 translate-x-0"
|
|
248
|
+
leave-to-class="opacity-0 translate-x-6"
|
|
249
|
+
>
|
|
228
250
|
<div
|
|
229
|
-
|
|
230
|
-
|
|
251
|
+
v-if="previewRow && previewEnabled"
|
|
252
|
+
class="flex items-stretch shrink-0 min-w-0"
|
|
253
|
+
:style="{ width: (100 - currentRatio) + '%' }"
|
|
231
254
|
>
|
|
232
|
-
|
|
255
|
+
<!-- Resize handle -->
|
|
256
|
+
<div
|
|
257
|
+
class="w-1 shrink-0 cursor-col-resize bg-slate-100 dark:bg-slate-700/60 hover:bg-indigo-300 dark:hover:bg-indigo-600 transition-colors"
|
|
258
|
+
@mousedown="startResize"
|
|
259
|
+
/>
|
|
260
|
+
<!-- Preview -->
|
|
261
|
+
<div class="flex flex-col overflow-y-auto border-l border-slate-200 dark:border-slate-700 flex-1">
|
|
262
|
+
<slot name="preview" :row="previewRow" :close="closePreview" />
|
|
263
|
+
</div>
|
|
233
264
|
</div>
|
|
234
|
-
</
|
|
265
|
+
</Transition>
|
|
235
266
|
|
|
236
267
|
</div>
|
|
237
268
|
</div>
|
|
238
269
|
|
|
239
|
-
<!-- Filter panel — outside overflow-hidden so never clipped -->
|
|
240
|
-
<Transition
|
|
241
|
-
enter-active-class="transition ease-out duration-150"
|
|
242
|
-
enter-from-class="opacity-0 translate-y-1 scale-95"
|
|
243
|
-
enter-to-class="opacity-100 translate-y-0 scale-100"
|
|
244
|
-
leave-active-class="transition ease-in duration-100"
|
|
245
|
-
leave-from-class="opacity-100 translate-y-0 scale-100"
|
|
246
|
-
leave-to-class="opacity-0 translate-y-1 scale-95"
|
|
247
|
-
>
|
|
248
|
-
<div
|
|
249
|
-
v-if="showFilterPanel && hasFilterableColumns"
|
|
250
|
-
ref="filterPanelRef"
|
|
251
|
-
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"
|
|
252
|
-
>
|
|
253
|
-
<p class="text-[10px] font-bold text-slate-400 dark:text-slate-500 uppercase tracking-widest mb-3 px-1">
|
|
254
|
-
Filtros
|
|
255
|
-
</p>
|
|
256
|
-
<TableFilter v-model="activeFilters" :columns="filtersConfig" />
|
|
257
|
-
</div>
|
|
258
|
-
</Transition>
|
|
259
|
-
|
|
260
270
|
<!-- Column panel — outside overflow-hidden so never clipped -->
|
|
261
271
|
<Transition
|
|
262
272
|
enter-active-class="transition ease-out duration-150"
|