Skip to content

Upgrade Alpine from V2 to V3 #808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion resources/views/components/action-message.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<div x-data="{ shown: false, timeout: null }"
x-init="@this.on('{{ $on }}', () => { clearTimeout(timeout); shown = true; timeout = setTimeout(() => { shown = false }, 2000); })"
x-show.transition.opacity.out.duration.1500ms="shown"
x-show="shown"
x-transition:leave.opacity.duration.1500ms
style="display: none;"
{{ $attributes->merge(['class' => 'text-sm text-gray-600']) }}>
{{ $slot->isEmpty() ? 'Saved.' : $slot }}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/dropdown.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
@endphp

<div class="relative" x-data="{ open: false }" @click.away="open = false" @close.stop="open = false">
<div class="relative" x-data="{ open: false }" @click.outside="open = false" @close.stop="open = false">
<div @click="open = ! open">
{{ $trigger }}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected function configureSession()
protected function installLivewireStack()
{
// Install Livewire...
$this->requireComposerPackages('livewire/livewire:^2.0', 'laravel/sanctum:^2.6');
$this->requireComposerPackages('livewire/livewire:^2.5', 'laravel/sanctum:^2.6');

// Sanctum...
(new Process(['php', 'artisan', 'vendor:publish', '--provider=Laravel\Sanctum\SanctumServiceProvider', '--force'], base_path()))
Expand All @@ -123,7 +123,7 @@ protected function installLivewireStack()
return [
'@tailwindcss/forms' => '^0.3.1',
'@tailwindcss/typography' => '^0.4.0',
'alpinejs' => '^2.7.3',
'alpinejs' => '^3.0.6',
'postcss-import' => '^14.0.1',
'tailwindcss' => '^2.0.1',
] + $packages;
Expand Down
6 changes: 5 additions & 1 deletion stubs/livewire/resources/js/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
require('./bootstrap');

require('alpinejs');
import Alpine from 'alpinejs';

window.Alpine = Alpine;

Alpine.start();