Skip to content

Commit

Permalink
Merge pull request #289 from mkocansey/v2-6-0
Browse files Browse the repository at this point in the history
Show default blue theme until user overwrites it
  • Loading branch information
mkocansey authored Jun 20, 2024
2 parents ed293cf + 276601d commit 52fad95
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 15 deletions.
1 change: 1 addition & 0 deletions config/bladewind.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@
'searchable' => false,
'selectable' => false,
'checkable' => false,
'transparent' => false,
'search_placeholder' => 'Search table below...',
'no_data_message' => 'No records to display',
'message_as_empty_state' => false,
Expand Down
2 changes: 1 addition & 1 deletion public/css/bladewind-ui.min.css

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions resources/assets/css/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@
@apply pt-[19px] pb-[20px] px-8 !text-[16px]
}

.bw-button.primary:not(.outlined), .bw-button-circle.primary:not(.outlined) {
@apply active:translate-y-0.5 text-white text-opacity-90 hover:text-opacity-100
}

.bw-button.primary:not(.outlined), .bw-button-circle.primary:not(.outlined),
.bw-button.secondary:not(.outlined), .bw-button-circle.secondary:not(.outlined) {
@apply active:translate-y-0.5 transition text-white text-opacity-90 hover:text-opacity-100
@apply active:translate-y-0.5 text-white text-opacity-90 hover:text-opacity-100 hover:!no-underline
active:opacity-100 focus:outline-none focus:!ring-opacity-25 focus:!ring-offset-0
}

.bw-button.primary.outlined, .bw-button-circle.primary.outlined, .bw-button.secondary.outlined, .bw-button-circle.secondary.outlined {
@apply bg-transparent
.bw-button.primary.outlined, .bw-button-circle.primary.outlined,
.bw-button.secondary.outlined, .bw-button-circle.secondary.outlined {
@apply bg-transparent focus:outline-none focus:!ring-opacity-25 focus:!ring-offset-0
}

.bw-button.disabled, .bw-button-circle.disabled {
Expand Down
5 changes: 4 additions & 1 deletion resources/views/components/button/circle.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
])
@aware([
'type' => 'primary',
'color' => 'primary',
'color' => '',
'size' => config('bladewind.button.circle.size', 'regular'),
'name' => null,
'can_submit' => false,
Expand All @@ -18,6 +18,9 @@
'show_focus_ring' => true,
'outline' => false,
])

@php if($color == 'secondary') $type = 'secondary'; @endphp

<x-bladewind::button
:color="$color"
:size="$size"
Expand Down
10 changes: 6 additions & 4 deletions resources/views/components/button/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@
if($canSubmit) $can_submit = $canSubmit;
if(!$showFocusRing) $show_focus_ring = $showFocusRing;
$colour = (!empty($color)) ? $color : $type;
$outline_colour = "border-$colour-500/50 focus:ring-$colour-500 focus:outline-none focus:ring-opacity-25 focus:ring-offset-0 hover:border-$colour-600 dark:hover:border-$colour-500 active:border-$colour-600 text-$colour-600 %s";
$button_colour = "bg-$colour-500 hover:bg-$colour-600 hover:!no-underline focus:ring-$colour-500 active:bg-$colour-600 active:opacity-100 focus:outline-none focus:ring-opacity-25 focus:ring-offset-0 %s";
$colour = (!empty($color)) ? $color : $type;
$outline_colour = "border-$colour-500/50 focus:ring-$colour-500 hover:border-$colour-600
dark:hover:border-$colour-500 active:border-$colour-600 text-$colour-600 %s";
$button_colour = "!bg-$colour-500 hover:!bg-$colour-600 focus:ring-$colour-500 active:bg-$colour-600 %s";
if($colour == 'black') {
$outline_colour = preg_replace('/-\d+/', '', $outline_colour);
$outline_colour = preg_replace('/(-)?(\/)?\d+/', '', $outline_colour);
$button_colour = preg_replace('/-\d+/', '', $button_colour);
}
$button_type = ($can_submit) ? 'submit' : 'button';
Expand Down
9 changes: 7 additions & 2 deletions resources/views/components/compile-for-tailwind.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@
bg-indigo-300 bg-fuchsia-300
bg-primary-500 bg-secondary-500 bg-blue-500 bg-red-500 bg-yellow-500 bg-green-500 bg-purple-500 bg-orange-500 bg-slate-500
bg-gray-500 bg-pink-500 bg-cyan-500 bg-violet-500 bg-indigo-500 bg-fuchsia-500
bg-gray-500 bg-pink-500 bg-cyan-500 bg-violet-500 bg-indigo-500 bg-fuchsia-500 bg-black
!bg-primary-500 !bg-secondary-500 !bg-blue-500 !bg-red-500 !bg-yellow-500 !bg-green-500 !bg-purple-500 !bg-orange-500 !bg-slate-500
!bg-gray-500 !bg-pink-500 !bg-cyan-500 !bg-violet-500 !bg-indigo-500 !bg-fuchsia-500 !bg-black
hover:bg-primary-600 hover:bg-secondary-600 hover:bg-blue-600 hover:bg-red-600 hover:bg-yellow-600 hover:bg-green-600
hover:bg-purple-600 hover:bg-orange-600 hover:bg-slate-600 hover:bg-gray-600 hover:bg-pink-600
hover:bg-cyan-600 hover:bg-violet-600 hover:bg-indigo-600 hover:bg-fuchsia-600
hover:!bg-primary-600 hover:!bg-secondary-600 hover:!bg-blue-600 hover:!bg-red-600 hover:!bg-yellow-600 hover:!bg-green-600
hover:!bg-purple-600 hover:!bg-orange-600 hover:!bg-slate-600 hover:!bg-gray-600 hover:!bg-pink-600
hover:!bg-cyan-600 hover:!bg-violet-600 hover:!bg-indigo-600 hover:!bg-fuchsia-600
dark:bg-primary-600 dark:bg-secondary-600 dark:bg-blue-600 dark:bg-red-600 dark:bg-yellow-600 dark:bg-green-600
dark:bg-purple-600 dark:bg-orange-600 dark:bg-slate-600 dark:bg-gray-600 dark:bg-pink-600
Expand Down Expand Up @@ -51,7 +56,7 @@
dark:!text-violet-300 dark:!text-indigo-300 dark:!text-fuchsia-300',
'lines' => [
'borders' => 'border-2 border-4 border-8
'borders' => 'border-2 border-4 border-8 border-black
after:border-primary-100 after:border-blue-100 after:border-red-100 after:border-yellow-100
after:border-green-100 after:border-purple-100 after:border-orange-100 after:border-slate-100
after:border-gray-100 after:border-pink-100 after:border-cyan-100 after:border-violet-100
Expand Down

0 comments on commit 52fad95

Please sign in to comment.