@innertia-solutions/innertia-nuxt 0.1.87 → 0.1.89
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.
|
@@ -61,9 +61,18 @@ async function launch() {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
/**
|
|
64
|
+
/** Hay algo que decidir antes de importar: el formato de los documentos de Google o carpetas que no se admiten. */
|
|
65
|
+
const needsOptions = computed(() => flags.value.hasNatives || blockedFolders.value)
|
|
66
|
+
|
|
67
|
+
/** Sin nada que decidir (p. ej. una imagen o un PDF) se importa de inmediato; si no, pasa por opciones. */
|
|
65
68
|
function next() {
|
|
66
|
-
step.value = 'options'
|
|
69
|
+
if (needsOptions.value) step.value = 'options'
|
|
70
|
+
else launch()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function removeFromSelection(entry) {
|
|
74
|
+
selection.value = selection.value.filter(e => e.id !== entry.id)
|
|
75
|
+
if (!selection.value.length) step.value = 'pick'
|
|
67
76
|
}
|
|
68
77
|
|
|
69
78
|
const percent = computed(() => (current.value ? progressPercent(current.value) : null))
|
|
@@ -81,7 +90,15 @@ const expanded = reactive({})
|
|
|
81
90
|
|
|
82
91
|
<!-- 2. Opciones -->
|
|
83
92
|
<div v-else-if="step === 'options'" class="space-y-4">
|
|
84
|
-
<
|
|
93
|
+
<div class="space-y-1.5">
|
|
94
|
+
<p class="text-sm text-foreground">{{ selection.length === 1 ? '1 elemento seleccionado' : `${selection.length} elementos seleccionados` }}:</p>
|
|
95
|
+
<ul class="max-h-40 overflow-y-auto rounded-control border border-card-line divide-y divide-card-line">
|
|
96
|
+
<li v-for="entry in selection" :key="entry.id" class="flex items-center justify-between gap-3 px-3 py-1.5 text-sm">
|
|
97
|
+
<span class="min-w-0 truncate text-foreground">{{ entry.name }}</span>
|
|
98
|
+
<button type="button" class="shrink-0 text-xs text-muted-foreground hover:text-red-600" @click="removeFromSelection(entry)">Quitar</button>
|
|
99
|
+
</li>
|
|
100
|
+
</ul>
|
|
101
|
+
</div>
|
|
85
102
|
|
|
86
103
|
<div v-if="flags.hasNatives" class="space-y-2">
|
|
87
104
|
<p class="text-sm font-medium text-foreground">Documentos de Google (Docs, Sheets, Slides)</p>
|
|
@@ -147,7 +164,8 @@ const expanded = reactive({})
|
|
|
147
164
|
<span v-else />
|
|
148
165
|
<div class="flex gap-2">
|
|
149
166
|
<AppButton :text="step === 'progress' ? 'Cerrar' : 'Cancelar'" severity="secondary" size="sm" @click="close" />
|
|
150
|
-
<AppButton v-if="step === 'pick'" text="Siguiente" severity="primary" size="sm"
|
|
167
|
+
<AppButton v-if="step === 'pick'" :text="needsOptions ? 'Siguiente' : 'Importar'" severity="primary" size="sm"
|
|
168
|
+
:disabled="!selection.length" :loading="start.isPending.value" @click="next" />
|
|
151
169
|
<AppButton v-else-if="step === 'options'" text="Importar" severity="primary" size="sm"
|
|
152
170
|
:disabled="!selection.length || blockedFolders" :loading="start.isPending.value" @click="launch" />
|
|
153
171
|
</div>
|
package/components/Modal.vue
CHANGED
|
@@ -4,7 +4,7 @@ import { IconX } from '@tabler/icons-vue'
|
|
|
4
4
|
/**
|
|
5
5
|
* <Modal> — Core modal. Sigue tokens semánticos (rounded-modal, bg-card,
|
|
6
6
|
* border-card-line). Variantes: center (default), drawer-right, drawer-left,
|
|
7
|
-
* fullscreen. Tamaños xs..
|
|
7
|
+
* fullscreen. Tamaños xs..7xl.
|
|
8
8
|
*
|
|
9
9
|
* No tiene lógica de negocio. Para casos típicos preferir:
|
|
10
10
|
* - <ModalConfirm> → confirmaciones con severities
|
|
@@ -14,7 +14,7 @@ import { IconX } from '@tabler/icons-vue'
|
|
|
14
14
|
const props = defineProps({
|
|
15
15
|
modelValue: { type: Boolean, default: false },
|
|
16
16
|
title: { type: String, default: '' },
|
|
17
|
-
size: { type: String, default: 'md', validator: v => ['xs','sm','md','lg','xl','2xl','3xl','fullscreen'].includes(v) },
|
|
17
|
+
size: { type: String, default: 'md', validator: v => ['xs','sm','md','lg','xl','2xl','3xl','4xl','5xl','6xl','7xl','fullscreen'].includes(v) },
|
|
18
18
|
variant: { type: String, default: 'center', validator: v => ['center','drawer-right','drawer-left','fullscreen'].includes(v) },
|
|
19
19
|
closable: { type: Boolean, default: true },
|
|
20
20
|
backdropDismiss: { type: Boolean, default: true },
|
|
@@ -38,6 +38,8 @@ const sizeClass = computed(() => {
|
|
|
38
38
|
return ({
|
|
39
39
|
xs: 'max-w-xs', sm: 'max-w-sm', md: 'max-w-md',
|
|
40
40
|
lg: 'max-w-lg', xl: 'max-w-xl', '2xl': 'max-w-2xl', '3xl': 'max-w-3xl',
|
|
41
|
+
// Wide modals (tables, side-by-side panels) that still read as a modal, not a full screen.
|
|
42
|
+
'4xl': 'max-w-4xl', '5xl': 'max-w-5xl', '6xl': 'max-w-6xl', '7xl': 'max-w-7xl',
|
|
41
43
|
}[props.size] ?? 'max-w-md')
|
|
42
44
|
})
|
|
43
45
|
|