@innertia-solutions/nuxt-theme-spark 0.1.30 → 0.1.31

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 } from '@tabler/icons-vue'
2
+ import { IconSearch, IconAdjustmentsHorizontal, IconLayoutColumns } from '@tabler/icons-vue'
3
3
 
4
4
  // Standard admin table: search + filters + Table (TanStack) + export
5
5
  const props = defineProps({
@@ -85,6 +85,21 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
85
85
 
86
86
  <slot name="actions" />
87
87
 
88
+ <!-- Column visibility -->
89
+ <button
90
+ type="button"
91
+ @click="tableRef?.toggleColumnPanel()"
92
+ :class="[
93
+ 'py-1.5 px-3 inline-flex items-center gap-2 text-sm font-medium rounded-lg border transition-colors',
94
+ tableRef?.showColumnPanel
95
+ ? 'border-indigo-500 bg-indigo-50 text-indigo-700 dark:bg-indigo-900/20 dark:border-indigo-500 dark:text-indigo-300'
96
+ : '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'
97
+ ]"
98
+ >
99
+ <IconLayoutColumns class="size-4" />
100
+ Columnas
101
+ </button>
102
+
88
103
  <!-- Export -->
89
104
  <TableExportable
90
105
  v-if="showExport"
@@ -446,6 +446,8 @@ const reloadTable = () => {
446
446
  fetchData()
447
447
  }
448
448
 
449
+ const toggleColumnPanel = () => { showColumnPanel.value = !showColumnPanel.value }
450
+
449
451
  defineExpose({
450
452
  getSelectedRows,
451
453
  loading,
@@ -453,6 +455,8 @@ defineExpose({
453
455
  reload: reloadTable,
454
456
  clearCache,
455
457
  table,
458
+ showColumnPanel,
459
+ toggleColumnPanel,
456
460
  })
457
461
  </script>
458
462
 
@@ -471,7 +475,7 @@ defineExpose({
471
475
  <div
472
476
  v-if="showColumnPanel"
473
477
  ref="columnPanelRef"
474
- class="absolute bottom-16 right-6 z-50 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-80 overflow-y-auto"
478
+ class="absolute top-0 right-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-56 max-h-80 overflow-y-auto"
475
479
  >
476
480
  <p class="text-[10px] font-bold text-slate-400 dark:text-slate-500 uppercase tracking-widest mb-2 px-1">
477
481
  Columnas visibles
@@ -797,15 +801,6 @@ defineExpose({
797
801
  </div>
798
802
  </div>
799
803
 
800
- <!-- Columns panel button -->
801
- <button
802
- @click="showColumnPanel = !showColumnPanel"
803
- class="flex items-center gap-x-1.5 py-1 px-2.5 rounded-lg text-[11px] font-bold text-slate-500 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors border border-transparent"
804
- :class="showColumnPanel ? 'bg-slate-100 dark:bg-slate-700 border-slate-200 dark:border-slate-600' : ''"
805
- >
806
- <IconLayoutColumns class="size-4" />
807
- Columnas
808
- </button>
809
804
  </div>
810
805
 
811
806
  <!-- Right: per-page + pagination -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innertia-solutions/nuxt-theme-spark",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "Innertia Solutions — Spark theme: backoffice, landing and mobile components and layouts",
5
5
  "keywords": [
6
6
  "nuxt",