Skip to content

Commit 28b235c

Browse files
authored
Upgrade Alpine from V2 to V3 (#808)
1 parent 16393e2 commit 28b235c

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

Diff for: resources/views/components/action-message.blade.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
<div x-data="{ shown: false, timeout: null }"
44
x-init="@this.on('{{ $on }}', () => { clearTimeout(timeout); shown = true; timeout = setTimeout(() => { shown = false }, 2000); })"
5-
x-show.transition.opacity.out.duration.1500ms="shown"
5+
x-show="shown"
6+
x-transition:leave.opacity.duration.1500ms
67
style="display: none;"
78
{{ $attributes->merge(['class' => 'text-sm text-gray-600']) }}>
89
{{ $slot->isEmpty() ? 'Saved.' : $slot }}

Diff for: resources/views/components/dropdown.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626
@endphp
2727

28-
<div class="relative" x-data="{ open: false }" @click.away="open = false" @close.stop="open = false">
28+
<div class="relative" x-data="{ open: false }" @click.outside="open = false" @close.stop="open = false">
2929
<div @click="open = ! open">
3030
{{ $trigger }}
3131
</div>

Diff for: src/Console/InstallCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected function configureSession()
105105
protected function installLivewireStack()
106106
{
107107
// Install Livewire...
108-
$this->requireComposerPackages('livewire/livewire:^2.0', 'laravel/sanctum:^2.6');
108+
$this->requireComposerPackages('livewire/livewire:^2.5', 'laravel/sanctum:^2.6');
109109

110110
// Sanctum...
111111
(new Process(['php', 'artisan', 'vendor:publish', '--provider=Laravel\Sanctum\SanctumServiceProvider', '--force'], base_path()))
@@ -123,7 +123,7 @@ protected function installLivewireStack()
123123
return [
124124
'@tailwindcss/forms' => '^0.3.1',
125125
'@tailwindcss/typography' => '^0.4.0',
126-
'alpinejs' => '^2.7.3',
126+
'alpinejs' => '^3.0.6',
127127
'postcss-import' => '^14.0.1',
128128
'tailwindcss' => '^2.0.1',
129129
] + $packages;

Diff for: stubs/livewire/resources/js/app.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
require('./bootstrap');
22

3-
require('alpinejs');
3+
import Alpine from 'alpinejs';
4+
5+
window.Alpine = Alpine;
6+
7+
Alpine.start();

0 commit comments

Comments
 (0)