-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/discounts
- Loading branch information
Showing
39 changed files
with
840 additions
and
651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 44 additions & 33 deletions
77
packages/admin/resources/views/components/input/group.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,47 @@ | ||
<div> | ||
<label for="{{ $for }}" class="flex items-center text-sm font-medium text-gray-700"> | ||
<span class="block">{{ $labelPrefix ?? null }}</span> | ||
<span class="block">{{ $label }}@if($required)<sup class="text-xs text-red-600">*</sup>@endif</span> | ||
</label> | ||
<div class="relative mt-1"> | ||
{{ $slot }} | ||
@if($error && $errorIcon) | ||
<div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none"> | ||
<!-- Heroicon name: solid/exclamation-circle --> | ||
<svg class="w-5 h-5 text-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" /> | ||
</svg> | ||
</div> | ||
@endif | ||
</div> | ||
@if($instructions) | ||
<p class="mt-2 text-sm text-gray-500">{{ $instructions }}</p> | ||
@endif | ||
@if($error) | ||
<p class="mt-2 text-sm text-red-600">{{ $error }}</p> | ||
@endif | ||
@if(count($errors)) | ||
<div class="space-y-1"> | ||
@foreach($errors as $error) | ||
@if(is_array($error)) | ||
@foreach($error as $text) | ||
<p class="text-sm text-red-600">{{ $text }}</p> | ||
@endforeach | ||
@else | ||
<p class="text-sm text-red-600">{{ $error }}</p> | ||
@endif | ||
@endforeach | ||
<label for="{{ $for }}" | ||
class="flex items-center text-sm font-medium text-gray-700"> | ||
<span class="block">{{ $labelPrefix ?? null }}</span> | ||
|
||
<span class="block"> | ||
{{ $label }} | ||
|
||
@if ($required) | ||
<sup class="text-xs text-red-600">*</sup> | ||
@endif | ||
</span> | ||
</label> | ||
|
||
<div class="relative mt-1"> | ||
{{ $slot }} | ||
</div> | ||
@endif | ||
|
||
@if ($instructions) | ||
<p class="mt-2 text-sm text-gray-500">{{ $instructions }}</p> | ||
@endif | ||
|
||
@if ($error) | ||
<div class="flex items-center gap-1 mt-2"> | ||
@if ($errorIcon) | ||
<x-hub::icon ref="exclamation-circle" | ||
class="w-5 h-5 text-red-500" /> | ||
@endif | ||
|
||
<p class="text-sm text-red-600">{{ $error }}</p> | ||
</div> | ||
@endif | ||
|
||
@if (count($errors)) | ||
<div class="space-y-1"> | ||
@foreach ($errors as $error) | ||
@if (is_array($error)) | ||
@foreach ($error as $text) | ||
<p class="text-sm text-red-600">{{ $text }}</p> | ||
@endforeach | ||
@else | ||
<p class="text-sm text-red-600">{{ $error }}</p> | ||
@endif | ||
@endforeach | ||
</div> | ||
@endif | ||
</div> |
17 changes: 8 additions & 9 deletions
17
packages/admin/resources/views/components/input/text.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<input | ||
{{ $attributes->merge([ | ||
'type' => 'text', | ||
'class' => 'form-input block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:opacity-50 disabled:cursor-not-allowed', | ||
])->class([ | ||
'border-red-400' => !!$error, | ||
]) }} | ||
maxlength="255" | ||
> | ||
<input {{ $attributes->merge([ | ||
'type' => 'text', | ||
'class' => | ||
'form-input block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm disabled:opacity-50 disabled:cursor-not-allowed', | ||
])->class([ | ||
'border-red-400' => !!$error, | ||
]) }} | ||
maxlength="255"> |
2 changes: 2 additions & 0 deletions
2
packages/admin/resources/views/components/thumbnail.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<img src="{{ $src }}" | ||
{{ $attributes->merge(['class' => 'w-16 h-16 rounded']) }} /> |
80 changes: 42 additions & 38 deletions
80
packages/admin/resources/views/components/translatable.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,46 @@ | ||
<div | ||
x-data="{ showTranslations: {{ $expanded ? 'true' : 'false' }} }" | ||
> | ||
@if($languages->count()) | ||
<div class="absolute top-0 left-0 -ml-10 -mt-7"> | ||
<button | ||
@click.prevent="showTranslations = !showTranslations" | ||
class="inline-flex items-center px-2 py-1 text-sm font-medium text-gray-700 uppercase bg-white border rounded shadow-sm hover:bg-gray-100" | ||
> | ||
<x-hub::icon ref="translate" class="w-3 h-4" /> | ||
</button> | ||
<div x-data="{ showTranslations: {{ $expanded ? 'true' : 'false' }} }"> | ||
<div class="flex items-center gap-2"> | ||
<div x-show="showTranslations" | ||
x-cloak> | ||
<span class="px-2 py-1 text-xs text-gray-600 uppercase bg-gray-100 border rounded"> | ||
{{ $default->code }} | ||
</span> | ||
</div> | ||
|
||
<div class="w-full"> | ||
{{ $slot }} | ||
</div> | ||
</div> | ||
|
||
@if ($languages->count()) | ||
<div class="mt-2 space-y-2" | ||
x-show="showTranslations" | ||
x-cloak> | ||
@foreach ($languages as $language) | ||
@if (${"{$language->code}"} ?? null) | ||
<div class="relative flex items-center gap-2" | ||
wire:key="language-{{ $language->id }}"> | ||
<span class="px-2 py-1 text-xs text-gray-600 uppercase bg-gray-100 border rounded"> | ||
{{ $language->code }} | ||
</span> | ||
|
||
<div class="w-full"> | ||
{{ ${"{$language->code}"} ?? null }} | ||
</div> | ||
</div> | ||
@endif | ||
@endforeach | ||
</div> | ||
@endif | ||
<div class="flex items-center"> | ||
<div x-show="showTranslations" x-cloak> | ||
<span class="p-2 pr-3 text-xs text-gray-600 uppercase bg-gray-100 border rounded-l border-r-none"> | ||
{{ $default->code }} | ||
</span> | ||
</div> | ||
<div class="w-full"> | ||
{{ $slot }} | ||
</div> | ||
</div> | ||
@if($languages->count()) | ||
<div class="pb-2 mt-2 space-y-2" x-show="showTranslations" x-cloak> | ||
@foreach($languages as $language) | ||
@if(${"{$language->code}"} ?? null) | ||
<div class="relative flex items-center" wire:key="language-{{ $language->id }}"> | ||
<div x-show="showTranslations"> | ||
<span class="p-2 pr-3 text-xs text-gray-600 uppercase bg-gray-100 border rounded-l border-r-none"> | ||
{{ $language->code }} | ||
</span> | ||
</div> | ||
<div class="w-full"> | ||
{{ ${"{$language->code}"} ?? null }} | ||
</div> | ||
</div> | ||
@endif | ||
@endforeach | ||
</div> | ||
|
||
@if ($languages->count()) | ||
<button x-on:click.prevent="showTranslations = !showTranslations" | ||
class="inline-flex items-center gap-2 px-2 py-1 mt-2 text-gray-700 bg-white border rounded shadow-sm hover:bg-gray-100" | ||
:class="{ 'bg-gray-100': showTranslations }"> | ||
<x-hub::icon ref="translate" | ||
class="w-4 h-4" /> | ||
|
||
<span class="text-xs font-medium">Locales</span> | ||
</button> | ||
@endif | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.