Skip to content

Commit e4f4ee9

Browse files
committed
Replace blade ui kit
1 parent 60c86ce commit e4f4ee9

19 files changed

+72
-45
lines changed

config/blade-ui-kit.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@
2525
// 'cron' => Components\Support\Cron::class,
2626
// 'dropdown' => Components\Navigation\Dropdown::class,
2727
// 'easy-mde' => Components\Editors\EasyMDE::class,
28-
'email' => Components\Forms\Inputs\Email::class,
28+
// 'email' => Components\Forms\Inputs\Email::class,
2929
// 'error' => Components\Forms\Error::class,
3030
'form' => Components\Forms\Form::class,
31-
'form-button' => Components\Buttons\FormButton::class,
31+
// 'form-button' => Components\Buttons\FormButton::class,
3232
// 'html' => Components\Layouts\Html::class,
33-
'input' => Components\Forms\Inputs\Input::class,
34-
'label' => Components\Forms\Label::class,
35-
'logout' => Components\Buttons\Logout::class,
33+
// 'input' => Components\Forms\Inputs\Input::class,
34+
// 'label' => Components\Forms\Label::class,
35+
// 'logout' => Components\Buttons\Logout::class,
3636
// 'mapbox' => Components\Maps\Mapbox::class,
37-
'markdown' => Components\Markdown\Markdown::class,
38-
'password' => Components\Forms\Inputs\Password::class,
37+
// 'markdown' => Components\Markdown\Markdown::class,
38+
// 'password' => Components\Forms\Inputs\Password::class,
3939
// 'pikaday' => Components\Forms\Inputs\Pikaday::class,
4040
// 'social-meta' => Components\Layouts\SocialMeta::class,
41-
'textarea' => Components\Forms\Inputs\Textarea::class,
41+
// 'textarea' => Components\Forms\Inputs\Textarea::class,
4242
// 'toc' => Components\Markdown\ToC::class,
4343
// 'trix' => Components\Editors\Trix::class,
4444
// 'unsplash' => Components\Support\Unsplash::class,

resources/views/auth/login.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@extends('layouts.small')
44

55
@section('small-content')
6-
<x-buk-form action="{{ route('login.post') }}" method="POST" class="space-y-6">
6+
<x-forms.form action="{{ route('login.post') }}" method="POST" class="space-y-6">
77
<div>
88
<x-forms.label for="username" />
99

@@ -33,7 +33,7 @@
3333
Sign in
3434
</x-buttons.primary-button>
3535
</div>
36-
</x-buk-form>
36+
</x-forms.form>
3737

3838
<div class="mt-6">
3939
<div class="relative">

resources/views/auth/passwords/email.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@section('small-content')
66
<p class="mb-4">{{ Session::get('status', 'Please fill in your email address below.') }}</p>
77

8-
<x-buk-form action="{{ route('password.forgot.post') }}" method="POST" class="space-y-6">
8+
<x-forms.form action="{{ route('password.forgot.post') }}" method="POST" class="space-y-6">
99
<div>
1010
<x-forms.label for="email" />
1111

@@ -15,5 +15,5 @@
1515
<x-buttons.primary-button type="submit" fullWidth>
1616
Send Password Reset Link
1717
</x-buttons.primary-button>
18-
</x-buk-form>
18+
</x-forms.form>
1919
@endsection

resources/views/auth/passwords/reset.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@extends('layouts.small')
44

55
@section('small-content')
6-
<x-buk-form action="{{ route('password.reset.post') }}" method="POST" class="space-y-6">
6+
<x-forms.form action="{{ route('password.reset.post') }}" method="POST" class="space-y-6">
77
<input type="hidden" name="token" value="{{ $token }}" />
88

99
<div>
@@ -27,5 +27,5 @@
2727
<x-buttons.primary-button type="submit" fullWidth>
2828
Reset Password
2929
</x-buttons.primary-button>
30-
</x-buk-form>
30+
</x-forms.form>
3131
@endsection

resources/views/auth/register.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</span>
1414
</x-buttons.secondary-button>
1515
@else
16-
<x-buk-form action="{{ route('register.post') }}" method="POST" class="space-y-6">
16+
<x-forms.form action="{{ route('register.post') }}" method="POST" class="space-y-6">
1717
<div>
1818
<x-forms.label for="name" />
1919

@@ -47,6 +47,6 @@
4747
<x-buttons.primary-button type="submit" fullWidth>
4848
Register
4949
</x-buttons.primary-button>
50-
</x-buk-form>
50+
</x-forms.form>
5151
@endif
5252
@endsection

resources/views/auth/verify.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
<p class="mb-4">If you did not receive the email, click below to request another.</p>
99

10-
<x-buk-form action="{{ route('verification.resend') }}" method="POST" class="w-full">
10+
<x-forms.form action="{{ route('verification.resend') }}" method="POST" class="w-full">
1111
<x-buttons.primary-button type="submit" fullWidth>
1212
Request Another
1313
</x-buttons.primary-button>
14-
</x-buk-form>
14+
</x-forms.form>
1515
@endsection

resources/views/components/articles/form.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'selectedTags' => []
77
])
88

9-
<x-buk-form
9+
<x-forms.form
1010
action="{{ route(...$route) }}"
1111
:method="$method"
1212
>
@@ -154,4 +154,4 @@ class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:t
154154
@endunless
155155
</div>
156156
</div>
157-
</x-buk-form>
157+
</x-forms.form>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@props(['action' => null, 'method' => 'POST'])
2+
3+
<form method="POST" @isset($action) action="{{ $action }}" @endisset>
4+
@csrf
5+
@method($method)
6+
7+
<button type="submit" {{ $attributes }}>
8+
{{ $slot }}
9+
</button>
10+
</form>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@props([
2+
'action' => null,
3+
'method' => 'POST',
4+
])
5+
6+
<form method="{{ $method !== 'GET' ? 'POST' : 'GET' }}" @isset($action) action="{{ $action }}" @endisset {{ $attributes }}>
7+
@csrf
8+
@method($method)
9+
10+
{{ $slot }}
11+
</form>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
<x-buk-label :for="$for" {{ $attributes->merge(['class' => 'block text-sm font-medium leading-5 text-gray-700']) }}>
2-
{{ $slot->isNotEmpty() ? $slot : $fallback }}
3-
</x-buk-label>
1+
@props(['for'])
2+
3+
<label :for="$for" {{ $attributes->merge(['class' => 'block text-sm font-medium leading-5 text-gray-700']) }}>
4+
{{ $slot->isNotEmpty() ? $slot : Str::ucfirst(str_replace('_', ' ', $for)) }}
5+
</label>

resources/views/components/modal.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@push('modals')
22
<div class="modal" x-show="activeModal == '{{ $identifier }}'" x-cloak>
33
<div class="modal-content" @click.outside="activeModal = false">
4-
<x-buk-form :action="$action" :method="$method()">
4+
<x-forms.form :action="$action" :method="$method()">
55
<div class="flex flex-col justify-between h-full">
66
<div class="overflow-auto">
77
<div class="modal-header">
@@ -21,7 +21,7 @@
2121
<button type="submit" class="button {{ $type === 'delete' ? 'button-danger' : 'button-primary' }}">{{ $submit ?? $title }}</button>
2222
</div>
2323
</div>
24-
</x-buk-form>
24+
</x-forms.form>
2525
</div>
2626
</div>
2727
@endpush

resources/views/components/threads/form.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'selectedTags' => []
77
])
88

9-
<x-buk-form
9+
<x-forms.form
1010
action="{{ route(...$route) }}"
1111
:method="$method"
1212
x-data="{}"
@@ -73,4 +73,4 @@
7373
</div>
7474
</div>
7575
</div>
76-
</x-buk-form>
76+
</x-forms.form>

resources/views/components/threads/thread-menu.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ class="inline-block p-2 rounded-sm hover:bg-gray-100"
1515
class="absolute top-12 right-1 flex flex-col bg-white rounded-sm shadow-sm w-48"
1616
>
1717
@can(App\Policies\ThreadPolicy::LOCK, $thread)
18-
<x-buk-form-button class="flex gap-x-2 p-3 w-full rounded-sm hover:bg-gray-100" action="{{ route('threads.lock', $thread->slug()) }}">
18+
<x-forms.button class="flex gap-x-2 p-3 w-full rounded-sm hover:bg-gray-100" action="{{ route('threads.lock', $thread->slug()) }}">
1919
@if ($thread->isLocked())
2020
<x-heroicon-o-lock-closed class="w-6 h-6"/>
2121
Unlock
2222
@else
2323
<x-heroicon-o-lock-open class="w-6 h-6"/>
2424
Lock
2525
@endif
26-
</x-buk-form-button>
26+
</x-forms.button>
2727
@endcan
2828

2929
@can(App\Policies\ThreadPolicy::UPDATE, $thread)

resources/views/layouts/_nav.blade.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,14 @@
217217
@endcan
218218

219219
<li class="mb-4 lg:hover:bg-gray-100 lg:mb-0">
220-
<x-buk-logout class="flex items-center w-full text-left lg:px-3 lg:py-2">
221-
<x-heroicon-o-arrow-left-on-rectangle class="w-4 h-4 mr-2" />
222-
Sign out
223-
</x-buk-logout>
220+
<form method="POST" action="{{ route('logout') }}">
221+
@csrf
222+
223+
<button type="submit" class="flex items-center w-full text-left lg:px-3 lg:py-2">
224+
<x-heroicon-o-arrow-left-on-rectangle class="w-4 h-4 mr-2" />
225+
Sign out
226+
</button>
227+
</form>
224228
</li>
225229
</ul>
226230
</div>

resources/views/users/settings/api_tokens.blade.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
</time>
2727
</div>
2828

29-
<x-buk-form method="DELETE" :action="route('settings.api-tokens.delete')">
29+
<x-forms.form method="DELETE" :action="route('settings.api-tokens.delete')">
3030
<input type="hidden" name="id" value="{{ $token->getKey() }}" />
3131

3232
<x-buttons.danger-button>
3333
Delete Token
3434
</x-buttons.danger-button>
35-
</x-buk-form>
35+
</x-forms.form>
3636
</li>
3737
@endforeach
3838
</ul>
@@ -46,12 +46,12 @@
4646
</div>
4747
</div>
4848

49-
<x-buk-form id="api_token_settings_form" method="POST" action="{{ route('settings.api-tokens.store') }}">
49+
<x-forms.form id="api_token_settings_form" method="POST" action="{{ route('settings.api-tokens.store') }}">
5050
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6">
5151
<x-buttons.primary-button type="submit">
5252
Generate New Token
5353
</x-buttons.primary-button>
5454
</div>
55-
</x-buk-form>
55+
</x-forms.form>
5656
</div>
5757
</section>

resources/views/users/settings/blocked.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
</div>
2828
</div>
2929

30-
<x-buk-form-button action="{{ route('settings.users.unblock', $user->username()) }}" method="PUT">
30+
<x-forms.button action="{{ route('settings.users.unblock', $user->username()) }}" method="PUT">
3131
<x-heroicon-s-x-mark class="h-4 w-4 text-gray-500 hover:text-red-500" />
32-
</x-buk-form-button>
32+
</x-forms.button>
3333
</li>
3434
@empty
3535
<p class="mt-1 text-sm leading-5 text-gray-500">

resources/views/users/settings/notification_settings.blade.php

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

33
<section class="mt-6">
44
<div class="shadow-sm sm:rounded-md sm:overflow-hidden">
5-
<x-buk-form action="{{ route('settings.notifications.store') }}">
5+
<x-forms.form action="{{ route('settings.notifications.store') }}">
66
<div class="bg-white py-6 px-4 space-y-6 sm:p-6">
77
<div>
88
<h2 class="text-lg leading-6 font-medium text-gray-900">
@@ -41,6 +41,6 @@
4141
Save notification settings
4242
</x-buttons.primary-button>
4343
</div>
44-
</x-buk-form>
44+
</x-forms.form>
4545
</div>
4646
</section>

resources/views/users/settings/password.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@title('Password')
22

33
<section aria-labelledby="password_settings_heading" class="mt-6">
4-
<x-buk-form method="PUT" action="{{ route('settings.password.update') }}">
4+
<x-forms.form method="PUT" action="{{ route('settings.password.update') }}">
55
<div class="shadow-sm sm:rounded-md sm:overflow-hidden">
66
<div class="bg-white py-6 px-4 space-y-6 sm:p-6">
77
<div>
@@ -42,5 +42,5 @@
4242
</x-buttons.primary-button>
4343
</div>
4444
</div>
45-
</x-buk-form>
45+
</x-forms.form>
4646
</section>

resources/views/users/settings/profile.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@title('Profile')
22

33
<section aria-labelledby="profile_settings_heading">
4-
<x-buk-form method="PUT" action="{{ route('settings.profile.update') }}">
4+
<x-forms.form method="PUT" action="{{ route('settings.profile.update') }}">
55
<div class="shadow-sm sm:rounded-md sm:overflow-hidden">
66
<div class="bg-white py-6 px-4 space-y-6 sm:p-6">
77
<div>
@@ -114,5 +114,5 @@
114114
</span>
115115
</div>
116116
</div>
117-
</x-buk-form>
117+
</x-forms.form>
118118
</section>

0 commit comments

Comments
 (0)