mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Rename
This commit is contained in:
@@ -568,7 +568,7 @@ trait InteractsWithActions
|
||||
->pluck('name')
|
||||
->implode('.'),
|
||||
)
|
||||
->defaultHeadingLevel(3),
|
||||
->rootHeadingLevel(3),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ trait HasHeadings
|
||||
{
|
||||
public function getHeadingLevel(int $index = 0): int
|
||||
{
|
||||
return $this->getContainer()->getDefaultHeadingLevel() + $index;
|
||||
return $this->getContainer()->getRootHeadingLevel() + $index;
|
||||
}
|
||||
|
||||
public function getHeadingTag(int $index = 0): string
|
||||
@@ -20,7 +20,7 @@ trait HasHeadings
|
||||
return "h{$level}";
|
||||
}
|
||||
|
||||
public function getChildComponentContainerDefaultHeadingLevel(): int
|
||||
public function getChildComponentContainerRootHeadingLevel(): int
|
||||
{
|
||||
return $this->getHeadingLevel() + $this->getHeadingsCount();
|
||||
}
|
||||
|
||||
@@ -4,21 +4,21 @@ namespace Filament\Schemas\Concerns;
|
||||
|
||||
trait HasHeadings
|
||||
{
|
||||
protected int $defaultHeadingLevel = 2;
|
||||
protected int $rootHeadingLevel = 2;
|
||||
|
||||
public function defaultHeadingLevel(int $level): static
|
||||
public function rootHeadingLevel(int $level): static
|
||||
{
|
||||
$this->defaultHeadingLevel = $level;
|
||||
$this->rootHeadingLevel = $level;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDefaultHeadingLevel(): int
|
||||
public function getRootHeadingLevel(): int
|
||||
{
|
||||
if ($parentComponent = $this->getParentComponent()) {
|
||||
return $parentComponent->getChildComponentContainerDefaultHeadingLevel();
|
||||
return $parentComponent->getChildComponentContainerRootHeadingLevel();
|
||||
}
|
||||
|
||||
return $this->defaultHeadingLevel;
|
||||
return $this->rootHeadingLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,9 @@
|
||||
@if ($heading || $description)
|
||||
<div>
|
||||
@if ($heading)
|
||||
<{{ $headingTag }} class="fi-ta-header-heading">
|
||||
<{{ $headingTag }}
|
||||
class="fi-ta-header-heading"
|
||||
>
|
||||
{{ $heading }}
|
||||
</{{ $headingTag }}>
|
||||
@endif
|
||||
@@ -451,7 +453,9 @@
|
||||
</x-slot>
|
||||
|
||||
<div class="fi-ta-col-toggle-form-ctn">
|
||||
<{{ $secondLevelHeadingTag }} class="fi-ta-col-toggle-heading">
|
||||
<{{ $secondLevelHeadingTag }}
|
||||
class="fi-ta-col-toggle-heading"
|
||||
>
|
||||
{{ __('filament-tables::table.column_toggle.heading') }}
|
||||
</{{ $secondLevelHeadingTag }}>
|
||||
|
||||
@@ -827,7 +831,9 @@
|
||||
@endif
|
||||
|
||||
<div>
|
||||
<{{ $secondLevelHeadingTag }} class="fi-ta-group-heading">
|
||||
<{{ $secondLevelHeadingTag }}
|
||||
class="fi-ta-group-heading"
|
||||
>
|
||||
@if (filled($recordGroupLabel = ($group->isTitlePrefixedWithLabel() ? $group->getLabel() : null)))
|
||||
{{ $recordGroupLabel }}:
|
||||
@endif
|
||||
@@ -1821,7 +1827,9 @@
|
||||
{{ \Filament\Support\generate_icon_html($getEmptyStateIcon()) }}
|
||||
</div>
|
||||
|
||||
<{{ $secondLevelHeadingTag }} class="fi-ta-empty-state-heading">
|
||||
<{{ $secondLevelHeadingTag }}
|
||||
class="fi-ta-empty-state-heading"
|
||||
>
|
||||
{{ $getEmptyStateHeading() }}
|
||||
</{{ $secondLevelHeadingTag }}>
|
||||
|
||||
|
||||
@@ -4,23 +4,23 @@ namespace Filament\Tables\Table\Concerns;
|
||||
|
||||
trait HasHeadings
|
||||
{
|
||||
protected int $defaultHeadingLevel = 2;
|
||||
protected int $rootHeadingLevel = 2;
|
||||
|
||||
public function defaultHeadingLevel(int $level): static
|
||||
public function rootHeadingLevel(int $level): static
|
||||
{
|
||||
$this->defaultHeadingLevel = $level;
|
||||
$this->rootHeadingLevel = $level;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDefaultHeadingLevel(): int
|
||||
public function getRootHeadingLevel(): int
|
||||
{
|
||||
return $this->defaultHeadingLevel;
|
||||
return $this->rootHeadingLevel;
|
||||
}
|
||||
|
||||
public function getHeadingLevel(int $index = 0): int
|
||||
{
|
||||
return $this->getDefaultHeadingLevel() + $index;
|
||||
return $this->getRootHeadingLevel() + $index;
|
||||
}
|
||||
|
||||
public function getHeadingTag(int $index = 0): string
|
||||
|
||||
Reference in New Issue
Block a user