Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored and github-actions[bot] committed Dec 11, 2024
1 parent 91fe219 commit 8f3b192
Show file tree
Hide file tree
Showing 28 changed files with 26 additions and 56 deletions.
2 changes: 0 additions & 2 deletions src/Traits/Configuration/ActionsConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

trait ActionsConfiguration
{


public function setActionsInToolbar(bool $status): self
{
$this->displayActionsInToolbar = $status;
Expand Down
2 changes: 0 additions & 2 deletions src/Traits/Configuration/CollapsingColumnConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ public function setCollapsingColumnsDisabled(): self

return $this;
}


}
1 change: 0 additions & 1 deletion src/Traits/Configuration/PaginationConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,4 @@ public function setShouldRetrieveTotalItemCountDisabled(): self

return $this;
}

}
1 change: 0 additions & 1 deletion src/Traits/Configuration/ReorderingConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,4 @@ public function setDefaultReorderSort(string $field, string $direction = 'asc'):

return $this;
}

}
1 change: 0 additions & 1 deletion src/Traits/Helpers/ActionsHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public function getActionsPosition(): string
return $this->actionsPosition ?? 'right';
}


#[Computed]
public function hasActions(): bool
{
Expand Down
1 change: 0 additions & 1 deletion src/Traits/Helpers/FooterHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ public function useHeaderAsFooterIsDisabled(): bool
{
return $this->getUseHeaderAsFooterStatus() === false;
}

}
1 change: 0 additions & 1 deletion src/Traits/Helpers/PaginationHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,4 @@ public function getShouldRetrieveTotalItemCount(): bool
{
return $this->shouldRetrieveTotalItemCount;
}

}
1 change: 0 additions & 1 deletion src/Traits/Helpers/SecondaryHeaderHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ public function secondaryHeaderIsDisabled(): bool
{
return $this->getSecondaryHeaderStatus() === false;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public function setActionWrapperAttributes(array $actionWrapperAttributes): self

return $this;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ public function setCollapsingColumnButtonExpandAttributes(array $collapsingColum

return $this;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ public function setFooterTdAttributes(Closure $callback): self

return $this;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

trait PaginationStylingConfiguration
{

public function setPerPageFieldAttributes(array $attributes = []): self
{
$this->perPageFieldAttributes = [...$this->perPageFieldAttributes, ...$attributes];
Expand All @@ -18,4 +17,4 @@ public function setPaginationWrapperAttributes(array $paginationWrapperAttribute

return $this;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

trait ReorderStylingConfiguration
{

/**
* Used to set attributes for the <th> for Reorder Column
*/
Expand All @@ -14,5 +13,4 @@ public function setReorderThAttributes(array $reorderThAttributes): self

return $this;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public function setSecondaryHeaderTdAttributes(Closure $callback): self

return $this;
}
}
}
3 changes: 1 addition & 2 deletions src/Traits/Styling/HasActionsStyling.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ trait HasActionsStyling
ActionsStylingHelpers;

protected array $actionWrapperAttributes = ['class' => '', 'default-styling' => true, 'default-colors' => true];

}
}
7 changes: 3 additions & 4 deletions src/Traits/Styling/HasCollapsingColumnsStyling.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
trait HasCollapsingColumnsStyling
{
use CollapsingColumnsStylingConfiguration,
CollapsingColumnsStylingHelpers;
CollapsingColumnsStylingHelpers;

protected array $collapsingColumnButtonCollapseAttributes = ['default-styling' => true, 'default-colors' => true];

protected array $collapsingColumnButtonExpandAttributes = ['default-styling' => true, 'default-colors' => true];

}
}
3 changes: 1 addition & 2 deletions src/Traits/Styling/HasFooterStyling.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ trait HasFooterStyling
protected ?Closure $footerTrAttributesCallback;

protected ?Closure $footerTdAttributesCallback;

}
}
2 changes: 1 addition & 1 deletion src/Traits/Styling/HasPaginationStyling.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ trait HasPaginationStyling
protected array $perPageFieldAttributes = ['default-styling' => true, 'default-colors' => true, 'class' => ''];

protected array $paginationWrapperAttributes = ['class' => ''];
}
}
3 changes: 1 addition & 2 deletions src/Traits/Styling/HasReorderStyling.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ trait HasReorderStyling
ReorderStylingHelpers;

protected array $reorderThAttributes = ['default' => true];

}
}
9 changes: 4 additions & 5 deletions src/Traits/Styling/HasSecondaryHeaderStyling.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

namespace Rappasoft\LaravelLivewireTables\Traits\Styling;

use Closure;
use Rappasoft\LaravelLivewireTables\Traits\Styling\Configuration\SecondaryHeaderStylingConfiguration;
use Rappasoft\LaravelLivewireTables\Traits\Styling\Helpers\SecondaryHeaderStylingHelpers;
use Closure;

trait HasSecondaryHeaderStyling
{
use SecondaryHeaderStylingConfiguration,
SecondaryHeaderStylingHelpers;

protected ?Closure $secondaryHeaderTrAttributesCallback;
protected ?Closure $secondaryHeaderTrAttributesCallback;

protected ?Closure $secondaryHeaderTdAttributesCallback;

}
protected ?Closure $secondaryHeaderTdAttributesCallback;
}
4 changes: 1 addition & 3 deletions src/Traits/Styling/Helpers/ActionsStylingHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ public function getActionWrapperAttributes(): array
{
return [...['class' => '', 'default-styling' => true, 'default-colors' => true], ...$this->actionWrapperAttributes];
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use Livewire\Attributes\Computed;

trait CollapsingColumnsStylingHelpers {

trait CollapsingColumnsStylingHelpers
{
/**
* Retrieves attributes for the Collapsed Column Collapse Button
*
Expand All @@ -27,6 +27,4 @@ public function getCollapsingColumnButtonExpandAttributes(): array
{
return [...['default-styling' => true, 'default-colors' => true], ...$this->collapsingColumnButtonExpandAttributes];
}


}
}
3 changes: 1 addition & 2 deletions src/Traits/Styling/Helpers/FooterStylingHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ public function getFooterTdAttributes(Column $column, $rows, int $index): array
{
return isset($this->footerTdAttributesCallback) ? call_user_func($this->footerTdAttributesCallback, $column, $rows, $index) : ['default' => true];
}

}
}
3 changes: 1 addition & 2 deletions src/Traits/Styling/Helpers/PaginationStylingHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ public function getPaginationWrapperAttributesBag(): ComponentAttributeBag
{
return new ComponentAttributeBag($this->getPaginationWrapperAttributes());
}

}
}
4 changes: 1 addition & 3 deletions src/Traits/Styling/Helpers/ReorderStylingHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

trait ReorderStylingHelpers
{

/**
* Used to get attributes for the <th> for Bulk Actions
*
Expand All @@ -23,5 +22,4 @@ public function hasReorderThAttributes(): bool
{
return $this->getReorderThAttributes() != ['default' => true];
}

}
}
3 changes: 1 addition & 2 deletions src/Traits/Styling/Helpers/SecondaryHeaderStylingHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ public function getSecondaryHeaderTdAttributes(Column $column, $rows, int $index
{
return isset($this->secondaryHeaderTdAttributesCallback) ? call_user_func($this->secondaryHeaderTdAttributesCallback, $column, $rows, $index) : ['default' => true];
}

}
}
2 changes: 1 addition & 1 deletion src/Traits/WithActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trait WithActions
use ActionsConfiguration,
ActionsHelpers,
HasActionsStyling;

protected bool $displayActionsInToolbar = false;

protected string $actionsPosition = 'right';
Expand Down
1 change: 0 additions & 1 deletion src/Traits/WithSecondaryHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ trait WithSecondaryHeader

protected bool $columnsWithSecondaryHeader = false;


public function bootedWithSecondaryHeader(): void
{
$this->setupSecondaryHeader();
Expand Down

0 comments on commit 8f3b192

Please sign in to comment.