8000 fix backgrounds colors and improve UI by atmonshi · Pull Request #22 · lara-zeus/accordion · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix backgrounds colors and improve UI #22

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 2 commits into from
Mar 17, 2025
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
10 changes: 8 additions & 2 deletions resources/views/components/accordion/index.blade.php
Original file line number Diff line number Diff line change
Exp 8000 and Up @@ -7,7 +7,13 @@
this.activeAccordion = (this.activeAccordion == id) ? '' : id
}
}"
class="fi-accordion rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10 relative w-full mx-auto divide-y divide-gray-200 dark:divide-white/5"
class="fi-accordion rounded-xl shadow-sm
bg-white dark:bg-gray-900
ring-1 ring-gray-950/10 dark:ring-white/10
divide-y divide-gray-300 dark:divide-white/10
"
>
{{ $slot }}
<div class="p-2">
{{ $slot }}
</div>
</div>
13 changes: 9 additions & 4 deletions resources/views/components/accordion/item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
setActiveAccordion($id('accordion'));
})
"
class="fi-accordion-item group"
:class="{
'bg-gray-100 dark:bg-gray-800': activeAccordion == id,
'bg-white dark:bg-gray-900': activeAccordion != id,
}"
class="fi-accordion-item group first:rounded-t-xl last:rounded-b-xl"
>
<button
type="button"
Expand All @@ -39,7 +43,7 @@ class="flex gap-2 font-medium items-center justify-center text-gray-500 group-ho
@if ($icon !== null)
<x-filament::icon
:icon="$icon"
class="fi-accordion-item-icon h-5 w-5 shrink-0 transition duration-75"
class="fi-accordion-item-icon h-5 w-5 group-hover:text-primary-600"
/>
@endif

Expand All @@ -61,7 +65,8 @@ class="w-4 h-4"
/>
</span>
</button>
<div x-show="activeAccordion == id" x-collapse x-cloak>
{{ $slot }}
<div
x-show="activeAccordion == id" x-collapse x-cloak>
<div class="p-4 bg-white dark:bg-gray-900">{{ $slot }}</div>
</div>
</div>
2 changes: 1 addition & 1 deletion resources/views/forms/accordion.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="p-4">
<div class="px-4 py-2">
{{ $getChildComponentContainer() }}
</div>
5 changes: 1 addition & 4 deletions resources/views/forms/accordions.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
$attributes
->merge([
'id' => $getId(),
'wire:key' => "{$this->getId()}.{$getStatePath()}." . Accordions::class . '.container',
'wire:key' => "{$this->getId()}.{$getStatePath()}." . 'accordions.container',
], escape: false)
->merge($getExtraAttributes(), escape: false)
->merge($getExtraAlpineAttributes(), escape: false)
->class([
'rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10',
])
}}
>
<x-zeus-accordion::accordion :activeAccordion="$getActiveAccordion">
Expand Down
3 changes: 0 additions & 3 deletions resources/views/infolists/accordion.blade.php

This file was deleted.

36 changes: 0 additions & 36 deletions resources/views/infolists/accordions.blade.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Infolists/Accordion.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Accordion extends Component
use HasBadge;
use HasIcon;

protected string $view = 'zeus-accordion::infolists.accordion';
protected string $view = 'zeus-accordion::forms.accordion';

final public function __construct(string $label)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Infolists/Accordions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Accordions extends Component
use CanBeIsolated;
use Concerns\HasExtraAlpineAttributes;

protected string $view = 'zeus-accordion::infolists.accordions';
protected string $view = 'zeus-accordion::forms.accordions';

protected int | Closure $activeAccordion = 1;

Expand Down
137 changes: 137 additions & 0 deletions tailwind.config.js
AE96
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
const colors = require('tailwindcss/colors')

const plugin = require('tailwindcss/plugin')

module.exports = {
presets: [preset],
content: [
//App
'./resources/views/**/*.blade.php',
'./vendor/lara-zeus/core/resources/views/**/*.blade.php',
'./vendor/lara-zeus/core/src/CoreServiceProvider.php',
'./vendor/awcodes/preset-color-picker/resources/**/*.blade.php',

'./vendor/lara-zeus/wind/resources/views/**/*.blade.php',
'./vendor/lara-zeus/wind/src/Filament/Resources/LetterResource.php',
'./vendor/lara-zeus/wind/src/Livewire/ContactsForm.php',

'./vendor/lara-zeus/replies/resources/views/**/*.blade.php',

'./vendor/lara-zeus/sky/resources/views/**/*.blade.php',
'./vendor/lara-zeus/sky/src/Models/PostStatus.php',

'./vendor/lara-zeus/bolt/resources/views/**/*.blade.php',

'./vendor/lara-zeus/thunder/resources/views/**/*.blade.php',
'./vendor/lara-zeus/thunder/src/Models/TicketsStatus.php',
'./vendor/lara-zeus/thunder/src/Filament/Resources/TicketResource.php',

'./vendor/lara-zeus/athena/resources/views/**/*.blade.php',

'./vendor/lara-zeus/artemis/resources/views/**/*.blade.php',

'./vendor/lara-zeus/quantity/resources/views/**/*.blade.php',

'./vendor/lara-zeus/dynamic-dashboard/resources/views/**/*.blade.php',
'./vendor/lara-zeus/dynamic-dashboard/src/Models/Columns.php',

'./vendor/lara-zeus/rhea/resources/views/**/*.blade.php',

// hermes
'./vendor/lara-zeus/hermes/resources/views/**/*.blade.php',

// Bolt Pro
'./vendor/lara-zeus/bolt-pro/resources/views/**/*.blade.php',
'./vendor/sawirricardo/filament-nouislider/resources/views/forms/components/nouislider.blade.php',

// matrix-choice
'./vendor/lara-zeus/matrix-choice/resources/views/**/*.blade.php',
'./vendor/lara-zeus/accordion/resources/views/**/*.blade.php',
'./vendor/lara-zeus/list-group/resources/views/**/*.blade.php',

// helen
'./vendor/lara-zeus/helen/resources/views/**/*.blade.php',
'./vendor/lara-zeus/helen/src/Filament/Resources/LinksResource.php',
'./vendor/lara-zeus/helen/src/Facades/Helen.php',

// filament
'./app/Filament/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./vendor/filament/**/*.blade.php',

'./vendor/awcodes/recently/resources/**/*.blade.php',
'./vendor/awcodes/filament-tiptap-editor/resources/**/*.blade.php',
'./vendor/awcodes/filament-versions/resources/**/*.blade.php',
'./vendor/awcodes/filament-quick-create/resources/**/*.blade.php',
'./vendor/awcodes/overlook/resources/**/*.blade.php',
'./vendor/ryangjchandler/filament-navigation/resources/**/*.blade.php',
'./vendor/wire-elements/spotlight/resources/views/spotlight.blade.php',
'./vendor/awcodes/filament-curator/resources/**/*.blade.php',
'./vendor/archilex/filament-filter-sets/**/*.php',
'./vendor/bezhansalleh/filament-panel-switch/resources/views/panel-switch-menu.blade.php',
'./vendor/jaocero/radio-deck/resources/views/**/*.blade.php',
'./vendor/jaocero/activity-timeline/resources/views/**/*.blade.php',
],
darkMode: 'class',
theme: {
extend: {
colors: {
primary: {
DEFAULT: '#45B39D',
50: '#C6E9E2',
100: '#B8E4DB',
200: '#9AD8CC',
300: '#7DCDBD',
400: '#5FC1AE',
500: '#45B39D',
600: '#358B79',
700: '#266256',
800: '#163A32',
900: '#07110F',
950: '#000000'
},
secondary: {
DEFAULT: '#F1948A',
50: '#FDF2F0',
100: '#FCE7E5',
200: '#F9D2CE',
300: '#F6BEB8',
400: '#F4A9A1',
500: '#F1948A',
600: '#EB6658',
700: '#E53826',
800: '#BC2717',
900: '#8A1C11',
950: '#71170E'
},
danger: colors.red,
success: colors.green,
warning: colors.yellow,
info: colors.blue,
}
},
},
plugins: [
plugin(function ({addUtilities, addComponents, e, config}) {
const sketchyBorders = {
'.border-sketchy-sm': {
borderRadius: '255px 25px 225px 25px/25px 225px 25px 255px',
transition: 'all 0.3s ease-in-out'
},
'.border-sketchy-md': {
borderRadius: '25px 55px 10px 45px/85px 20px 55px 20px',
transition: 'all 0.3s ease-in-out'
},
'.border-sketchy-lg': {
borderRadius: '5px 55px 25px 25px/85px 20px 55px 20px',
transition: 'all 0.3s ease-in-out'
},
}

addUtilities(sketchyBorders, {
variants: ['responsive', 'hover'],
})
}),
require('tailwindcss-debug-screens'),
],
}
Loading
0