lau-ecom-design-system 1.0.23 → 1.0.26
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/dist/lau-ecom-design-system.esm.css +6 -1
- package/dist/lau-ecom-design-system.esm.js +1614 -398
- package/dist/lau-ecom-design-system.min.css +6 -1
- package/dist/lau-ecom-design-system.min.js +1 -1
- package/dist/lau-ecom-design-system.ssr.css +6 -1
- package/dist/lau-ecom-design-system.ssr.js +1619 -340
- package/dist/style.css +158 -214
- package/package.json +1 -2
- package/src/components/LauEcomIcon/LauEcomUpcIconClose.vue +29 -0
- package/src/components/LauEcomIcon/LauEcomUpcIconNavArrow.vue +1 -1
- package/src/components/LauEcomIcon/LauEcomUpcIconSearch.vue +6 -16
- package/src/components/LauEcomInputSearch/LauEcomInputSearch.vue +85 -150
- package/src/components/LauEcomInputSearch/LauEcomInputSearchDesktop.vue +229 -0
- package/src/components/LauEcomInputSearch/LauEcomInputSearchMobile.vue +187 -0
- package/src/components/LauEcomInputSearchHeader/LauEcomInputSearchHeader.vue +432 -0
- package/src/components/LauEcomInputSearchHeader/LauEcomInputSearchHeaderDesktop.vue +324 -0
- package/src/components/LauEcomInputSearchHeader/LauEcomInputSearchHeaderMobile.vue +279 -0
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "lau-ecom-design-system",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.0.
|
4
|
+
"version": "1.0.26",
|
5
5
|
"sourceType": "module",
|
6
6
|
"sideEffects": false,
|
7
7
|
"main": "dist/lau-ecom-design-system.ssr.js",
|
@@ -30,7 +30,6 @@
|
|
30
30
|
"watch": "rollup -c -w"
|
31
31
|
},
|
32
32
|
"dependencies": {
|
33
|
-
"lau-ecom-design-system": "file:lau-ecom-design-system-1.0.22.tgz",
|
34
33
|
"vue": "^3.5.12"
|
35
34
|
},
|
36
35
|
"devDependencies": {
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
withDefaults(
|
3
|
+
defineProps<{
|
4
|
+
width?: string;
|
5
|
+
height?: string;
|
6
|
+
}>(),
|
7
|
+
{
|
8
|
+
width: "24",
|
9
|
+
height: "24",
|
10
|
+
},
|
11
|
+
);
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<template>
|
15
|
+
<svg
|
16
|
+
:width="width"
|
17
|
+
:height="height"
|
18
|
+
viewBox="0 0 24 24"
|
19
|
+
fill="none"
|
20
|
+
stroke="currentColor"
|
21
|
+
stroke-width="2"
|
22
|
+
stroke-linecap="round"
|
23
|
+
stroke-linejoin="round"
|
24
|
+
xmlns="http://www.w3.org/2000/svg"
|
25
|
+
>
|
26
|
+
<line x1="18" y1="6" x2="6" y2="18" />
|
27
|
+
<line x1="6" y1="6" x2="18" y2="18" />
|
28
|
+
</svg>
|
29
|
+
</template>
|
@@ -1,12 +1,10 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
withDefaults(
|
3
3
|
defineProps<{
|
4
|
-
color?: string;
|
5
4
|
width?: string;
|
6
5
|
height?: string;
|
7
6
|
}>(),
|
8
7
|
{
|
9
|
-
color: "currentColor",
|
10
8
|
width: "24",
|
11
9
|
height: "24",
|
12
10
|
},
|
@@ -19,21 +17,13 @@ withDefaults(
|
|
19
17
|
:height="height"
|
20
18
|
viewBox="0 0 24 24"
|
21
19
|
fill="none"
|
20
|
+
stroke="currentColor"
|
21
|
+
stroke-width="2"
|
22
|
+
stroke-linecap="round"
|
23
|
+
stroke-linejoin="round"
|
22
24
|
xmlns="http://www.w3.org/2000/svg"
|
23
25
|
>
|
24
|
-
<
|
25
|
-
|
26
|
-
:stroke="color"
|
27
|
-
stroke-width="2"
|
28
|
-
stroke-linecap="round"
|
29
|
-
stroke-linejoin="round"
|
30
|
-
/>
|
31
|
-
<path
|
32
|
-
d="M21 21L16.65 16.65"
|
33
|
-
:stroke="color"
|
34
|
-
stroke-width="2"
|
35
|
-
stroke-linecap="round"
|
36
|
-
stroke-linejoin="round"
|
37
|
-
/>
|
26
|
+
<circle cx="11" cy="11" r="8" />
|
27
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
38
28
|
</svg>
|
39
29
|
</template>
|
@@ -6,9 +6,6 @@ import {
|
|
6
6
|
LauEcomUpcIconNavArrow,
|
7
7
|
} from "../LauEcomIcon";
|
8
8
|
|
9
|
-
// Log de versión del componente
|
10
|
-
console.log('🔍 InputSearch Version: 1.0.25 - Debug Mode');
|
11
|
-
|
12
9
|
interface Props {
|
13
10
|
placeholder?: string;
|
14
11
|
isDisabled?: boolean;
|
@@ -35,30 +32,22 @@ const props = withDefaults(defineProps<Props>(), {
|
|
35
32
|
isDisabled: false,
|
36
33
|
modelValue: "",
|
37
34
|
forceClose: false,
|
38
|
-
buttonColorClass: "
|
39
|
-
buttonTextColorClass: "
|
35
|
+
buttonColorClass: "bg-base-color-primary-20",
|
36
|
+
buttonTextColorClass: "text-base-color-primary-60",
|
40
37
|
buttonClass: "",
|
41
38
|
inputClass: "dsEcom-h-10 dsEcom-rounded-lg",
|
42
39
|
containerClass: "",
|
43
40
|
expandedWidth: "50vw",
|
44
41
|
isMobileSearch: false,
|
45
|
-
arrowColorClass: "
|
42
|
+
arrowColorClass: "text-neutral-100",
|
46
43
|
arrowButtonClass: "",
|
47
44
|
mobileInputWidth: "240px",
|
48
45
|
mobileInputHeight: "40px",
|
49
|
-
mobilePanelClass: "
|
46
|
+
mobilePanelClass: "bg-white",
|
50
47
|
expandedBackgroundClass: "dsEcom-bg-white",
|
51
48
|
overlayClass: "dsEcom-bg-black dsEcom-opacity-50"
|
52
49
|
});
|
53
50
|
|
54
|
-
// Log de props iniciales
|
55
|
-
console.log('🔍 InputSearch Props:', {
|
56
|
-
placeholder: props.placeholder,
|
57
|
-
isDisabled: props.isDisabled,
|
58
|
-
modelValue: props.modelValue,
|
59
|
-
forceClose: props.forceClose
|
60
|
-
});
|
61
|
-
|
62
51
|
const emit = defineEmits({
|
63
52
|
"update:modelValue": (value: string) => true,
|
64
53
|
"search": (value: string) => true,
|
@@ -73,12 +62,6 @@ const isMobileView = ref(false);
|
|
73
62
|
const isMobileSearchOpen = ref(false);
|
74
63
|
|
75
64
|
const handleSearch = () => {
|
76
|
-
console.log('🔍 Search triggered:', {
|
77
|
-
query: searchQuery.value,
|
78
|
-
isExpanded: isExpanded.value,
|
79
|
-
showOverlay: showOverlay.value
|
80
|
-
});
|
81
|
-
|
82
65
|
if (searchQuery.value && searchQuery.value.trim()) {
|
83
66
|
emit("search", searchQuery.value);
|
84
67
|
emit("update:modelValue", searchQuery.value);
|
@@ -88,47 +71,33 @@ const handleSearch = () => {
|
|
88
71
|
};
|
89
72
|
|
90
73
|
const handleInput = () => {
|
91
|
-
console.log('🔍 Input changed:', {
|
92
|
-
value: searchQuery.value,
|
93
|
-
length: searchQuery.value.length,
|
94
|
-
isExpanded: isExpanded.value
|
95
|
-
});
|
96
74
|
emit("update:modelValue", searchQuery.value);
|
97
75
|
};
|
98
76
|
|
99
77
|
const clearSearch = () => {
|
100
|
-
console.log('🔍 Clear search triggered');
|
101
78
|
searchQuery.value = "";
|
102
79
|
emit("update:modelValue", "");
|
103
80
|
};
|
104
81
|
|
105
82
|
const closeSearch = () => {
|
106
|
-
console.log('🔍 Close search triggered');
|
107
83
|
showOverlay.value = false;
|
108
84
|
setTimeout(() => {
|
109
|
-
console.log('🔍 Closing search after timeout');
|
110
85
|
isExpanded.value = false;
|
111
86
|
}, 300);
|
112
87
|
};
|
113
88
|
|
114
89
|
const handleFocus = () => {
|
115
|
-
console.log('🔍 Focus triggered:', {
|
116
|
-
currentValue: searchQuery.value,
|
117
|
-
wasExpanded: isExpanded.value
|
118
|
-
});
|
119
90
|
isExpanded.value = true;
|
120
91
|
showOverlay.value = true;
|
121
92
|
};
|
122
93
|
|
123
94
|
const containerClasses = computed(() => {
|
124
|
-
|
95
|
+
return [
|
125
96
|
"dsEcom-transition-transform dsEcom-duration-300 dsEcom-ease-in-out dsEcom-relative",
|
126
97
|
{
|
127
98
|
"dsEcom-w-[250px] md:dsEcom-w-[350px]": !isExpanded.value
|
128
99
|
}
|
129
100
|
];
|
130
|
-
console.log('🔍 Container classes updated:', { isExpanded: isExpanded.value });
|
131
|
-
return classes;
|
132
101
|
});
|
133
102
|
|
134
103
|
const overlayClasses = computed(() => [
|
@@ -175,103 +144,14 @@ const updateExpandedPosition = () => {
|
|
175
144
|
const availableWidth = viewportWidth - rect.left - 32; // 32px de margen
|
176
145
|
expandedContainer.value.style.width = `${availableWidth}px`;
|
177
146
|
}
|
178
|
-
|
179
|
-
// Log para debugging
|
180
|
-
console.log('🔍 Expanded position updated:', {
|
181
|
-
top: topPosition,
|
182
|
-
left: leftPosition,
|
183
|
-
width: expandedContainer.value.style.width,
|
184
|
-
originalLeft: rect.left,
|
185
|
-
viewportWidth,
|
186
|
-
originalWidth: rect.width
|
187
|
-
});
|
188
147
|
}
|
189
148
|
};
|
190
149
|
|
191
|
-
onMounted(() => {
|
192
|
-
console.log('🔍 Component mounted with props:', {
|
193
|
-
buttonColorClass: props.buttonColorClass,
|
194
|
-
buttonTextColorClass: props.buttonTextColorClass,
|
195
|
-
arrowColorClass: props.arrowColorClass,
|
196
|
-
isMobileSearch: props.isMobileSearch,
|
197
|
-
mobileInputWidth: props.mobileInputWidth,
|
198
|
-
mobileInputHeight: props.mobileInputHeight
|
199
|
-
});
|
200
|
-
checkMobileView();
|
201
|
-
window.addEventListener('resize', updateExpandedPosition);
|
202
|
-
window.addEventListener('resize', checkMobileView);
|
203
|
-
});
|
204
|
-
|
205
|
-
onBeforeUnmount(() => {
|
206
|
-
console.log('🔍 Component will unmount');
|
207
|
-
window.removeEventListener('resize', updateExpandedPosition);
|
208
|
-
window.removeEventListener('resize', checkMobileView);
|
209
|
-
});
|
210
|
-
|
211
|
-
watch(isExpanded, (newValue) => {
|
212
|
-
console.log('🔍 isExpanded changed:', {
|
213
|
-
newValue,
|
214
|
-
searchQuery: searchQuery.value,
|
215
|
-
showOverlay: showOverlay.value
|
216
|
-
});
|
217
|
-
if (newValue) {
|
218
|
-
nextTick(updateExpandedPosition);
|
219
|
-
}
|
220
|
-
});
|
221
|
-
|
222
|
-
watch(() => props.forceClose, (newValue) => {
|
223
|
-
console.log('🔍 forceClose prop changed:', newValue);
|
224
|
-
if (newValue) {
|
225
|
-
closeSearch();
|
226
|
-
}
|
227
|
-
});
|
228
|
-
|
229
|
-
watch(() => props.modelValue, (newValue) => {
|
230
|
-
console.log('🔍 modelValue prop changed:', {
|
231
|
-
newValue,
|
232
|
-
currentSearchQuery: searchQuery.value
|
233
|
-
});
|
234
|
-
if (newValue !== searchQuery.value) {
|
235
|
-
searchQuery.value = newValue;
|
236
|
-
}
|
237
|
-
});
|
238
|
-
|
239
|
-
const buttonClasses = computed(() => {
|
240
|
-
const defaultClasses = "dsEcom-absolute dsEcom-right-0 dsEcom-top-1/2 -dsEcom-translate-y-1/2 dsEcom-p-2 dsEcom-rounded-r-lg dsEcom-transition-all dsEcom-duration-300";
|
241
|
-
|
242
|
-
// Si hay buttonClass, usamos esas clases directamente
|
243
|
-
if (props.buttonClass) {
|
244
|
-
return [defaultClasses, props.buttonClass];
|
245
|
-
}
|
246
|
-
|
247
|
-
// Si no, usamos las clases de color tradicionales
|
248
|
-
return [
|
249
|
-
defaultClasses,
|
250
|
-
props.buttonColorClass,
|
251
|
-
props.buttonTextColorClass
|
252
|
-
];
|
253
|
-
});
|
254
|
-
|
255
150
|
const checkMobileView = () => {
|
256
|
-
const wasMobile = isMobileView.value;
|
257
151
|
isMobileView.value = window.innerWidth < 768;
|
258
|
-
if (wasMobile !== isMobileView.value) {
|
259
|
-
console.log('🔍 Mobile view changed:', {
|
260
|
-
isMobileView: isMobileView.value,
|
261
|
-
width: window.innerWidth,
|
262
|
-
buttonColorClass: props.buttonColorClass,
|
263
|
-
buttonTextColorClass: props.buttonTextColorClass
|
264
|
-
});
|
265
|
-
}
|
266
152
|
};
|
267
153
|
|
268
154
|
const handleMobileSearchClick = () => {
|
269
|
-
console.log('🔍 Mobile Search Click:', {
|
270
|
-
buttonColorClass: props.buttonColorClass,
|
271
|
-
buttonTextColorClass: props.buttonTextColorClass,
|
272
|
-
arrowColorClass: props.arrowColorClass,
|
273
|
-
isMobileView: isMobileView.value
|
274
|
-
});
|
275
155
|
isMobileSearchOpen.value = true;
|
276
156
|
nextTick(() => {
|
277
157
|
if (expandedContainer.value) {
|
@@ -282,14 +162,19 @@ const handleMobileSearchClick = () => {
|
|
282
162
|
};
|
283
163
|
|
284
164
|
const handleMobileSearchClose = () => {
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
165
|
+
// Primero ocultamos con la transición
|
166
|
+
const panel = document.querySelector('.dsEcom-fixed') as HTMLElement;
|
167
|
+
if (panel) {
|
168
|
+
panel.style.opacity = '0';
|
169
|
+
panel.style.transform = 'translateY(100%)';
|
170
|
+
}
|
171
|
+
|
172
|
+
// Luego actualizamos el estado después de la transición
|
173
|
+
setTimeout(() => {
|
174
|
+
isMobileSearchOpen.value = false;
|
175
|
+
searchQuery.value = '';
|
176
|
+
emit('update:modelValue', '');
|
177
|
+
}, 300);
|
293
178
|
};
|
294
179
|
|
295
180
|
const handleMobileSearch = () => {
|
@@ -304,15 +189,44 @@ const handleMobileSearch = () => {
|
|
304
189
|
const handleMobileClear = () => {
|
305
190
|
clearSearch();
|
306
191
|
};
|
192
|
+
|
193
|
+
onMounted(() => {
|
194
|
+
checkMobileView();
|
195
|
+
window.addEventListener('resize', updateExpandedPosition);
|
196
|
+
window.addEventListener('resize', checkMobileView);
|
197
|
+
});
|
198
|
+
|
199
|
+
onBeforeUnmount(() => {
|
200
|
+
window.removeEventListener('resize', updateExpandedPosition);
|
201
|
+
window.removeEventListener('resize', checkMobileView);
|
202
|
+
});
|
203
|
+
|
204
|
+
watch(isExpanded, (newValue) => {
|
205
|
+
if (newValue) {
|
206
|
+
nextTick(updateExpandedPosition);
|
207
|
+
}
|
208
|
+
});
|
209
|
+
|
210
|
+
watch(() => props.forceClose, (newValue) => {
|
211
|
+
if (newValue) {
|
212
|
+
closeSearch();
|
213
|
+
}
|
214
|
+
});
|
215
|
+
|
216
|
+
watch(() => props.modelValue, (newValue) => {
|
217
|
+
if (newValue !== searchQuery.value) {
|
218
|
+
searchQuery.value = newValue;
|
219
|
+
}
|
220
|
+
});
|
307
221
|
</script>
|
308
222
|
|
309
223
|
<template>
|
310
224
|
<div class="dsEcom-relative">
|
311
225
|
<!-- Versión móvil - Solo botón de búsqueda -->
|
312
226
|
<button
|
313
|
-
v-
|
227
|
+
v-show="isMobileView && !isMobileSearchOpen"
|
314
228
|
@click="handleMobileSearchClick"
|
315
|
-
class="dsEcom-p-2 dsEcom-rounded-lg"
|
229
|
+
class="dsEcom-p-2 dsEcom-rounded-lg dsEcom-transition-all dsEcom-duration-300 dsEcom-transform-gpu"
|
316
230
|
:class="[buttonColorClass]"
|
317
231
|
>
|
318
232
|
<LauEcomUpcIconSearch
|
@@ -324,28 +238,32 @@ const handleMobileClear = () => {
|
|
324
238
|
|
325
239
|
<!-- Capa blanca móvil -->
|
326
240
|
<div
|
327
|
-
v-
|
328
|
-
class="dsEcom-fixed dsEcom-inset-0 dsEcom-z-50"
|
241
|
+
v-show="isMobileView && isMobileSearchOpen"
|
242
|
+
class="dsEcom-fixed dsEcom-inset-0 dsEcom-z-50 dsEcom-transition-all dsEcom-duration-300 dsEcom-transform-gpu"
|
329
243
|
:class="[mobilePanelClass]"
|
244
|
+
:style="{
|
245
|
+
opacity: isMobileSearchOpen ? '1' : '0',
|
246
|
+
transform: isMobileSearchOpen ? 'translateY(0)' : 'translateY(100%)'
|
247
|
+
}"
|
330
248
|
>
|
331
249
|
<div class="dsEcom-flex dsEcom-items-center dsEcom-gap-2 dsEcom-p-4">
|
332
250
|
<!-- Input y botones -->
|
333
|
-
<div class="dsEcom-flex dsEcom-items-center dsEcom-gap-2 dsEcom-flex-1">
|
251
|
+
<div class="dsEcom-flex dsEcom-items-center dsEcom-gap-2 dsEcom-flex-1 dsEcom-transform-gpu">
|
334
252
|
<button
|
335
253
|
@click="handleMobileSearchClose"
|
336
|
-
class="dsEcom-p-2 dsEcom-rounded-lg"
|
254
|
+
class="dsEcom-p-2 dsEcom-rounded-lg dsEcom-transition-all dsEcom-duration-300 dsEcom-transform-gpu"
|
337
255
|
:class="[arrowButtonClass]"
|
338
256
|
>
|
339
257
|
<LauEcomUpcIconNavArrow
|
340
258
|
width="24"
|
341
259
|
height="24"
|
342
|
-
class="dsEcom-transform dsEcom-rotate-
|
260
|
+
class="dsEcom-transform dsEcom-rotate-90 dsEcom-transition-all dsEcom-duration-300 dsEcom-transform-gpu"
|
343
261
|
:class="[arrowColorClass]"
|
344
262
|
color="currentColor"
|
345
263
|
/>
|
346
264
|
</button>
|
347
265
|
|
348
|
-
<div class="dsEcom-flex dsEcom-items-center dsEcom-gap-0 dsEcom-flex-1">
|
266
|
+
<div class="dsEcom-flex dsEcom-items-center dsEcom-gap-0 dsEcom-flex-1 dsEcom-transform-gpu">
|
349
267
|
<input
|
350
268
|
v-model="searchQuery"
|
351
269
|
type="text"
|
@@ -355,7 +273,7 @@ const handleMobileClear = () => {
|
|
355
273
|
width: props.mobileInputWidth,
|
356
274
|
height: props.mobileInputHeight
|
357
275
|
}"
|
358
|
-
class="lau-ecom-input dsEcom-pl-4 dsEcom-pr-4 dsEcom-border dsEcom-border-neutral-80 dsEcom-rounded-l-lg dsEcom-focus:outline-none dsEcom-focus:ring-2 dsEcom-focus:ring-primary-60 dsEcom-flex-1"
|
276
|
+
class="lau-ecom-input dsEcom-pl-4 dsEcom-pr-4 dsEcom-border dsEcom-border-neutral-80 dsEcom-rounded-l-lg dsEcom-focus:outline-none dsEcom-focus:ring-2 dsEcom-focus:ring-primary-60 dsEcom-flex-1 dsEcom-transition-all dsEcom-duration-300 dsEcom-transform-gpu"
|
359
277
|
@input="handleInput"
|
360
278
|
@keyup.enter="handleMobileSearch"
|
361
279
|
/>
|
@@ -363,7 +281,7 @@ const handleMobileClear = () => {
|
|
363
281
|
@click="handleMobileSearch"
|
364
282
|
:style="{ height: props.mobileInputHeight }"
|
365
283
|
:class="[
|
366
|
-
'dsEcom-px-3 dsEcom-rounded-r-lg dsEcom-border-0',
|
284
|
+
'dsEcom-px-3 dsEcom-rounded-r-lg dsEcom-border-0 dsEcom-transition-all dsEcom-duration-300 dsEcom-transform-gpu',
|
367
285
|
buttonColorClass,
|
368
286
|
buttonTextColorClass
|
369
287
|
]"
|
@@ -373,9 +291,9 @@ const handleMobileClear = () => {
|
|
373
291
|
</div>
|
374
292
|
|
375
293
|
<button
|
376
|
-
v-
|
294
|
+
v-show="searchQuery.length >= 3"
|
377
295
|
@click="handleMobileClear"
|
378
|
-
class="dsEcom-p-2 dsEcom-text-neutral-100 hover:dsEcom-text-neutral-80"
|
296
|
+
class="dsEcom-p-2 dsEcom-text-neutral-100 hover:dsEcom-text-neutral-80 dsEcom-transition-all dsEcom-duration-300 dsEcom-transform-gpu"
|
379
297
|
>
|
380
298
|
<LauEcomUpcIconClose width="16" height="16" />
|
381
299
|
</button>
|
@@ -384,7 +302,7 @@ const handleMobileClear = () => {
|
|
384
302
|
</div>
|
385
303
|
|
386
304
|
<!-- Versión desktop -->
|
387
|
-
<div v-
|
305
|
+
<div v-show="!isMobileView" class="dsEcom-transition-all dsEcom-duration-300 dsEcom-transform-gpu">
|
388
306
|
<div
|
389
307
|
:class="[containerClasses, props.containerClass]"
|
390
308
|
ref="originalContainer"
|
@@ -396,7 +314,7 @@ const handleMobileClear = () => {
|
|
396
314
|
:placeholder="placeholder"
|
397
315
|
:disabled="isDisabled"
|
398
316
|
:class="[
|
399
|
-
'lau-ecom-input dsEcom-border dsEcom-border-neutral-80 dsEcom-pl-4 dsEcom-pr-24 dsEcom-w-full dsEcom-focus:outline-none dsEcom-focus:ring-2 dsEcom-focus:ring-primary-60',
|
317
|
+
'lau-ecom-input dsEcom-border dsEcom-border-neutral-80 dsEcom-pl-4 dsEcom-pr-24 dsEcom-w-full dsEcom-focus:outline-none dsEcom-focus:ring-2 dsEcom-focus:ring-primary-60 dsEcom-transition-all dsEcom-duration-300',
|
400
318
|
props.inputClass,
|
401
319
|
{ 'dsEcom-opacity-0': isExpanded }
|
402
320
|
]"
|
@@ -436,14 +354,17 @@ const handleMobileClear = () => {
|
|
436
354
|
<!-- Overlay -->
|
437
355
|
<div
|
438
356
|
v-show="isExpanded"
|
439
|
-
:class="
|
357
|
+
:class="[
|
358
|
+
overlayClasses,
|
359
|
+
'dsEcom-transition-opacity dsEcom-duration-300 dsEcom-ease-in-out'
|
360
|
+
]"
|
440
361
|
@click="closeSearch"
|
441
362
|
></div>
|
442
363
|
|
443
364
|
<!-- Versión expandida -->
|
444
365
|
<div
|
445
366
|
v-show="isExpanded"
|
446
|
-
class="dsEcom-fixed dsEcom-z-50 dsEcom-shadow-lg dsEcom-overflow-hidden"
|
367
|
+
class="dsEcom-fixed dsEcom-z-50 dsEcom-shadow-lg dsEcom-overflow-hidden dsEcom-transition-all dsEcom-duration-300"
|
447
368
|
:class="[
|
448
369
|
props.inputClass?.includes('rounded') ? props.inputClass : 'dsEcom-rounded-lg',
|
449
370
|
expandedBackgroundClass
|
@@ -457,7 +378,7 @@ const handleMobileClear = () => {
|
|
457
378
|
:placeholder="placeholder"
|
458
379
|
:disabled="isDisabled"
|
459
380
|
:class="[
|
460
|
-
'lau-ecom-input dsEcom-border dsEcom-border-neutral-80 dsEcom-pl-4 dsEcom-pr-24 dsEcom-w-full dsEcom-focus:outline-none dsEcom-focus:ring-2 dsEcom-focus:ring-primary-60',
|
381
|
+
'lau-ecom-input dsEcom-border dsEcom-border-neutral-80 dsEcom-pl-4 dsEcom-pr-24 dsEcom-w-full dsEcom-focus:outline-none dsEcom-focus:ring-2 dsEcom-focus:ring-primary-60 dsEcom-transition-all dsEcom-duration-300',
|
461
382
|
props.inputClass
|
462
383
|
]"
|
463
384
|
@input="handleInput"
|
@@ -499,12 +420,26 @@ const handleMobileClear = () => {
|
|
499
420
|
<style scoped>
|
500
421
|
.lau-ecom-input {
|
501
422
|
transition: all 0.3s ease-in-out;
|
423
|
+
backface-visibility: hidden;
|
424
|
+
transform: translateZ(0);
|
425
|
+
-webkit-font-smoothing: antialiased;
|
426
|
+
-moz-osx-font-smoothing: grayscale;
|
427
|
+
will-change: transform, opacity;
|
502
428
|
}
|
503
429
|
|
504
430
|
.dsEcom-transform-gpu {
|
505
431
|
transform: translateZ(0);
|
506
432
|
backface-visibility: hidden;
|
507
433
|
perspective: 1000px;
|
434
|
+
will-change: transform, opacity;
|
435
|
+
}
|
436
|
+
|
437
|
+
/* Agregamos transiciones específicas para móvil */
|
438
|
+
@media (max-width: 768px) {
|
439
|
+
.dsEcom-fixed {
|
440
|
+
transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
441
|
+
will-change: transform, opacity;
|
442
|
+
}
|
508
443
|
}
|
509
444
|
</style>
|
510
445
|
|