Skip to content

Commit

Permalink
Merge pull request #53 from mkocansey/development
Browse files Browse the repository at this point in the history
Several minor fixes
  • Loading branch information
mkocansey authored Jun 30, 2022
2 parents 7614e31 + 2cea2d1 commit 01f33c8
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/resources/assets/compiled/css/bladewind-ui.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/resources/views/components/card.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{{$header}}
</div>
@endif
@if($title !== '' && $header == '')<div class="uppercase tracking-wide text-xs text-gray-400/90 mb-2">{{ $title}}</div>@endif
@if($title !== '' && $header == '')<div class="uppercase tracking-wide text-xs text-gray-500/90 mb-2">{{ $title}}</div>@endif
<div @if($title !== '' && $header == '')class="mt-6"@endif>
{{ $slot }}
</div>
Expand Down
10 changes: 8 additions & 2 deletions src/resources/views/components/contact-card.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,33 @@
@endphp
<div class="bw-contact-card bg-white px-4 pb-4 pt-2 rounded-lg @if($has_shadow=='true') shadow-2xl shadow-gray-200/40 @endif {{$css}}">
<div class="flex items-start">
<div><x-bladewind::avatar url="{{$image}}" /></div>
<div><x-bladewind::avatar image="{{$image}}" /></div>
<div class="grow pl-2 pt-1">
<b>{{$name}}</b>
<div class="text-sm mb-2 @if($department != '' || $position != '') border-b border-gray-100/80 pb-2 @endif">
{{$position}}
{!!$position!!}
@if($department != '' && $position != '')
<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3 inline-block" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
</svg>
@endif
{{$department}}
</div>
@if($mobile != '')
<div class="text-sm mb-1"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 inline-block mr-2 opacity-60" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" />
</svg>{{$mobile}}</div>
@endif
@if($email != '')
<div class="text-sm mb-1"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 inline-block mr-2 opacity-60" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" />
</svg>{!!$email!!}</div>
@endif
@if($birthday != '')
<div class="text-sm mb-1"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 inline-block mr-2 opacity-60" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" />
</svg>{{$birthday}}</div>
@endif
{{$slot}}
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/resources/views/components/datepicker.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class="bw-datepicker bw-input block w-full peer {{$name}} {{$is_required}}"
type="text"
id="dtp-{{ $name }}"
max_date="today"
required="{{$required}}"
label="{{ ($has_label == 'true') ? $label : '' }}"
placeholder="{{ $placeholder }}{{$required_symbol}}" />

Expand Down Expand Up @@ -167,7 +168,7 @@ class="bw-datepicker bw-input block w-full peer {{$name}} {{$is_required}}"
default_date="{{ $default_date_to??'' }}"
required="{{ $required }}"
has_label="{{$has_label}}"
label="{{$date_to_label}}}"
label="{{$date_to_label}}"
format="{{$format}}" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/components/dropdown.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ class="bw-{{ $name }} {{ ($required == 'true') ? ' required' : '' }}"
</div>

<script>el_name = '{{ $name }}';</script>
@once<script src="{{ asset('bladewind/js/dropdown.js') }}"></script>@endonce
<script src="{{ asset('bladewind/js/dropdown.js') }}"></script>
2 changes: 1 addition & 1 deletion src/resources/views/components/input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

<div class="relative w-full @if($add_clearing == 'true') mb-3 @endif">
<input
{{ $attributes->merge(['class' => "bw-input w-full border border-slate-300/50 dark:text-white dark:border-slate-700 dark:bg-slate-600 dark:focus:border-slate-900 peer $is_required $name $placeholder_color"]) }}
{{ $attributes->merge(['class' => "bw-input w-full text-slate-600 border border-slate-300/50 dark:text-white dark:border-slate-700 dark:bg-slate-600 dark:focus:border-slate-900 text-sm peer $is_required $name $placeholder_color"]) }}
type="{{ $type }}"
id="{{ $name }}"
name="{{ $name }}"
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/components/modal.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class="w-full h-full bg-black/40 fixed left-0 top-0 backdrop-blur-md z-40 flex b
<x-bladewind::modal-icon type="{{ $type }}"></x-bladewind::modal-icon>
</div>
@endif
<div class="modal-body p-6">
<div class="modal-body grow p-6">
<h1 class="text-lg text-gray-800 modal-title text-left">{{ $title }}</h1>
<div class="modal-text text-gray-600 pt-2 text-base leading-6 tracking-wide text-left">
{{ $slot }}
Expand Down
3 changes: 2 additions & 1 deletion src/resources/views/components/textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@
$placeholder_color = ($label !== '') ? 'placeholder-transparent' : '';
@endphp
<div class="relative w-full @if($add_clearing == 'true') mb-3 @endif">
<textarea {{ $attributes->merge(['class' => "bw-input w-full border border-slate-300/50 dark:text-white dark:border-slate-700 dark:bg-slate-600 dark:focus:border-slate-900 peer $is_required $name $placeholder_color"]) }}
<textarea {{ $attributes->merge(['class' => "bw-input w-full text-slate-600 border border-slate-300/50 dark:text-white dark:border-slate-700 dark:bg-slate-600 dark:focus:border-slate-900 text-sm peer $is_required $name $placeholder_color"]) }}
id="{{ $name }}"
name="{{ $name }}"
rows="{{ $rows }}"
@if($error_message != '')
data-error-message="{{$error_message}}"
data-error-inline="{{$show_error_inline}}"
Expand Down
8 changes: 5 additions & 3 deletions src/resources/views/components/toggle.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
'bar' => 'thick',
// javascript function to run when toggle is clicked
'onclick' => 'javascript:void(0)',
// css for label
'class' => '',
])
@php
// reset variables for Laravel 8 support
Expand All @@ -28,10 +30,10 @@
@endphp

<label class="relative @if($justified=='false')inline-flex @else flex @endif justify-between items-center group" onclick="{!!$onclick!!}">
@if($label_position == 'left' && $label !== '')<span class="pr-4">{!!$label!!}</span>@endif
@if($label_position == 'left' && $label !== '')<span class="pr-4 {{$class}}">{!!$label!!}</span>@endif
<input type="checkbox" name="{{$name}}" @if($checked=='true')checked="checked"@endif @if($disabled=='true')disabled="disabled"@endif class="absolute left-1/2 -translate-x-1/2 w-full h-full peer appearance-none rounded-md" />
<span class="w-20 @if($bar=='thick')h-10 @else h-5 @endif flex items-center flex-shrink-0 p-1 bg-gray-300 rounded-full duration-300 ease-in-out
<span style="zoom: 80%" class="w-20 @if($bar=='thick')h-10 @else h-5 @endif flex items-center flex-shrink-0 p-1 bg-gray-300 rounded-full duration-300 ease-in-out
peer-disabled:opacity-40 @if($color=='red')peer-checked:bg-red-500/80 @endif @if($color=='yellow')peer-checked:bg-yellow-500/80 @endif @if($color=='green')peer-checked:bg-green-500/80 @endif @if($color=='pink')peer-checked:bg-pink-500/80 @endif @if($color=='cyan')peer-checked:bg-cyan-500/80 @endif @if($color=='gray')peer-checked:bg-slate-500 @endif @if($color=='purple')peer-checked:bg-purple-500/80 @endif @if($color=='orange')peer-checked:bg-orange-500/80 @endif @if($color=='blue')peer-checked:bg-blue-500/80 @endif after:w-8 after:h-8 after:bg-white after:rounded-full after:shadow-md after:duration-300
peer-checked:after:translate-x-10 group-hover:after:translate-x-0"></span>
@if($label_position=='right' && $label !== '')<span class="pl-4">{!!$label!!}</span>@endif
@if($label_position=='right' && $label !== '')<span class="pl-4 {{$class}}">{!!$label!!}</span>@endif
</label>

0 comments on commit 01f33c8

Please sign in to comment.