@innertia-solutions/nuxt-theme-spark 0.1.26 → 0.1.28

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.
@@ -0,0 +1,43 @@
1
+ <script setup>
2
+ const props = defineProps({ sidebar: { type: Boolean, default: false } })
3
+
4
+ const config = useRuntimeConfig()
5
+ const appEnv = config.public.appEnv
6
+
7
+ const isVisible = computed(() => appEnv && appEnv !== 'production')
8
+
9
+ useHead({
10
+ htmlAttrs: { class: (!props.sidebar && isVisible.value) ? 'has-env-bar' : '' },
11
+ style: [{ children: (!props.sidebar && isVisible.value) ? ':root { --env-bar-height: 1.5rem; }' : ':root { --env-bar-height: 0px; }' }],
12
+ })
13
+
14
+ const envColor = computed(() => {
15
+ const env = appEnv.toLowerCase()
16
+ if (env === 'staging') return props.sidebar ? 'bg-amber-50 text-amber-600 border border-amber-200 dark:bg-amber-500/10 dark:text-amber-400 dark:border-amber-500/30' : 'bg-amber-500 text-white'
17
+ if (env === 'local' || env === 'dev') return props.sidebar ? 'bg-blue-50 text-blue-600 border border-blue-200 dark:bg-blue-500/10 dark:text-blue-400 dark:border-blue-500/30' : 'bg-blue-600 text-white'
18
+ return props.sidebar ? 'bg-red-50 text-red-600 border border-red-200 dark:bg-red-500/10 dark:text-red-400 dark:border-red-500/30' : 'bg-red-600 text-white'
19
+ })
20
+ </script>
21
+
22
+ <template>
23
+ <!-- Sidebar inline variant -->
24
+ <div v-if="isVisible && sidebar"
25
+ :class="['w-full rounded-lg px-3 py-1.5 flex items-center justify-center gap-x-1.5 select-none', envColor]"
26
+ >
27
+ <span class="text-[9px] font-black tracking-widest uppercase">ENTORNO: {{ appEnv }}</span>
28
+ </div>
29
+
30
+ <!-- Full-width fixed bar -->
31
+ <div v-else-if="isVisible && !sidebar"
32
+ class="fixed bottom-0 left-0 right-0 z-[100] h-6 overflow-hidden select-none pointer-events-none"
33
+ >
34
+ <div
35
+ class="flex items-center justify-center w-full h-full text-[10px] font-bold tracking-widest uppercase opacity-90 shadow-lg border-t border-white/10"
36
+ :class="envColor"
37
+ >
38
+ <span class="mr-2">━━━━━</span>
39
+ ENTORNO: {{ appEnv }}
40
+ <span class="ml-2">━━━━━</span>
41
+ </div>
42
+ </div>
43
+ </template>
@@ -545,7 +545,7 @@ defineExpose({
545
545
  </template>
546
546
  <!-- Regular column header -->
547
547
  <template v-else>
548
- <div class="px-6 py-3 flex items-center gap-x-1 text-[11px] font-bold text-gray-500 dark:text-slate-400 uppercase tracking-wider w-full">
548
+ <div class="px-4 py-3 flex items-center gap-x-1 text-xs font-medium text-slate-500 dark:text-slate-400 w-full">
549
549
  {{ header.column.columnDef.meta?.label ?? header.id }}
550
550
  <span v-if="header.column.getCanSort()">
551
551
  <IconArrowsSort v-if="!header.column.getIsSorted()" class="size-4 opacity-40" />
@@ -559,6 +559,8 @@ defineExpose({
559
559
  class="absolute right-0 top-0 h-full w-3 cursor-col-resize group/rz flex items-center justify-center select-none touch-none"
560
560
  @mousedown.stop="header.getResizeHandler()?.($event)"
561
561
  @touchstart.passive.stop="header.getResizeHandler()?.($event)"
562
+ @dragstart.stop.prevent
563
+ @click.stop
562
564
  >
563
565
  <div
564
566
  class="h-4 w-px transition-all"
@@ -604,7 +606,7 @@ defineExpose({
604
606
  <td
605
607
  v-for="header in (table.getHeaderGroups()[0]?.headers ?? [])"
606
608
  :key="'skc-' + header.id"
607
- :class="header.id === 'select' ? 'text-center w-12' : 'px-6'"
609
+ :class="header.id === 'select' ? 'text-center w-12' : 'px-4'"
608
610
  :style="{ height: lastRowHeight + 'px' }"
609
611
  >
610
612
  <div v-if="header.id === 'select'" class="w-4 h-4 bg-gray-300 dark:bg-slate-600 rounded mx-auto"></div>
@@ -622,7 +624,7 @@ defineExpose({
622
624
  <td
623
625
  v-for="header in (table.getHeaderGroups()[0]?.headers ?? [])"
624
626
  :key="'eskc-' + header.id"
625
- :class="header.id === 'select' ? 'text-center w-12' : 'px-6'"
627
+ :class="header.id === 'select' ? 'text-center w-12' : 'px-4'"
626
628
  :style="{ height: lastRowHeight + 'px' }"
627
629
  >
628
630
  <div v-if="header.id === 'select'" class="w-4 h-4 bg-gray-200 dark:bg-slate-600 rounded mx-auto"></div>
@@ -650,7 +652,7 @@ defineExpose({
650
652
  :class="[
651
653
  cell.column.id === 'select'
652
654
  ? 'text-center w-12'
653
- : 'px-6 py-3 text-sm text-slate-600 dark:text-slate-300',
655
+ : 'px-4 py-3 text-sm text-slate-600 dark:text-slate-300',
654
656
  cell.column.id !== 'select' ? cell.column.columnDef.meta?.class ?? '' : '',
655
657
  ]"
656
658
  @click.stop="cell.column.id === 'select' ? null : undefined"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innertia-solutions/nuxt-theme-spark",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "description": "Innertia Solutions — Spark theme: backoffice, landing and mobile components and layouts",
5
5
  "keywords": [
6
6
  "nuxt",
@@ -43,4 +43,4 @@
43
43
  "nuxt": "^4.4.2",
44
44
  "vue": "^3.5.0"
45
45
  }
46
- }
46
+ }
Binary file
Binary file
Binary file
Binary file