-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
321 additions
and
84 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
.fi-grid { | ||
&:not(.fi-grid-direction-col) { | ||
@apply grid grid-cols-[--cols-default]; | ||
|
||
&.sm\:fi-grid-cols { | ||
@apply sm:grid-cols-[--cols-sm]; | ||
} | ||
|
||
&.md\:fi-grid-cols { | ||
@apply md:grid-cols-[--cols-md]; | ||
} | ||
|
||
&.lg\:fi-grid-cols { | ||
@apply lg:grid-cols-[--cols-lg]; | ||
} | ||
|
||
&.xl\:fi-grid-cols { | ||
@apply xl:grid-cols-[--cols-xl]; | ||
} | ||
|
||
&.\32xl\:fi-grid-cols { | ||
@apply 2xl:grid-cols-[--cols-2xl]; | ||
} | ||
} | ||
|
||
&.fi-grid-direction-col { | ||
@apply columns-[--cols-default]; | ||
|
||
&.sm\:fi-grid-cols { | ||
@apply sm:columns-[--cols-sm]; | ||
} | ||
|
||
&.md\:fi-grid-cols { | ||
@apply md:columns-[--cols-md]; | ||
} | ||
|
||
&.lg\:fi-grid-cols { | ||
@apply lg:columns-[--cols-lg]; | ||
} | ||
|
||
&.xl\:fi-grid-cols { | ||
@apply xl:columns-[--cols-xl]; | ||
} | ||
|
||
&.\32xl\:fi-grid-cols { | ||
@apply 2xl:columns-[--cols-2xl]; | ||
} | ||
} | ||
|
||
& .fi-grid-col { | ||
&:not(.fi-hidden) { | ||
@apply col-[--col-span-default]; | ||
|
||
&.sm\:fi-grid-col-span { | ||
@apply sm:col-[--col-span-sm]; | ||
} | ||
|
||
&.md\:fi-grid-col-span { | ||
@apply md:col-[--col-span-md]; | ||
} | ||
|
||
&.lg\:fi-grid-col-span { | ||
@apply lg:col-[--col-span-lg]; | ||
} | ||
|
||
&.xl\:fi-grid-col-span { | ||
@apply xl:col-[--col-span-xl]; | ||
} | ||
|
||
&.\32xl\:fi-grid-col-span { | ||
@apply 2xl:col-[--col-span-2xl]; | ||
} | ||
|
||
&.fi-grid-col-start { | ||
@apply col-start-[--col-start-default]; | ||
} | ||
|
||
&.sm\:fi-grid-col-start { | ||
@apply sm:col-start-[--col-start-sm]; | ||
} | ||
|
||
&.md\:fi-grid-col-start { | ||
@apply md:col-start-[--col-start-md]; | ||
} | ||
|
||
&.lg\:fi-grid-col-start { | ||
@apply lg:col-start-[--col-start-lg]; | ||
} | ||
|
||
&.xl\:fi-grid-col-start { | ||
@apply xl:col-start-[--col-start-xl]; | ||
} | ||
|
||
&.\32xl\:fi-grid-col-start { | ||
@apply 2xl:col-start-[--col-start-2xl]; | ||
} | ||
} | ||
|
||
&.fi-hidden { | ||
@apply hidden; | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
packages/support/resources/css/components/tables/columns/layout/grid.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.fi-ta-grid { | ||
&.fi-gap-sm { | ||
@apply gap-1; | ||
} | ||
|
||
&.sm\:fi-gap-sm { | ||
@apply sm:gap-1; | ||
} | ||
|
||
&.md\:fi-gap-sm { | ||
@apply md:gap-1; | ||
} | ||
|
||
&.lg\:fi-gap-sm { | ||
@apply lg:gap-1; | ||
} | ||
|
||
&.xl\:fi-gap-sm { | ||
@apply xl:gap-1; | ||
} | ||
|
||
&.\32xl\:fi-gap-sm { | ||
@apply 2xl:gap-1; | ||
} | ||
|
||
&.fi-gap-lg { | ||
@apply gap-3; | ||
} | ||
|
||
&.sm\:fi-gap-lg { | ||
@apply sm:gap-3; | ||
} | ||
|
||
&.md\:fi-gap-lg { | ||
@apply md:gap-3; | ||
} | ||
|
||
&.lg\:fi-gap-lg { | ||
@apply lg:gap-3; | ||
} | ||
|
||
&.xl\:fi-gap-lg { | ||
@apply xl:gap-3; | ||
} | ||
|
||
&.\32xl\:fi-gap-lg { | ||
@apply 2xl:gap-3; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/support/resources/css/components/tables/columns/layout/panel.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.fi-ta-panel { | ||
@apply rounded-lg bg-gray-50 p-4 ring-1 ring-inset ring-gray-950/5 dark:bg-white/5 dark:ring-white/10; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Filament\Support\Enums; | ||
|
||
enum GridDirection: string | ||
{ | ||
case Row = 'row'; | ||
|
||
case Column = 'column'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 22 additions & 28 deletions
50
packages/tables/resources/views/columns/layout/grid.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
@php | ||
$columns = $getGridColumns(); | ||
@endphp | ||
|
||
<div {{ $attributes->merge($getExtraAttributes(), escape: false) }}> | ||
<x-filament::grid | ||
:default="$columns['default'] ?? 1" | ||
:sm="$columns['sm'] ?? null" | ||
:md="$columns['md'] ?? null" | ||
:lg="$columns['lg'] ?? null" | ||
:xl="$columns['xl'] ?? null" | ||
:two-xl="$columns['2xl'] ?? null" | ||
@class([ | ||
(($columns['default'] ?? 1) === 1) ? 'gap-1' : 'gap-3', | ||
($columns['sm'] ?? null) ? (($columns['sm'] === 1) ? 'sm:gap-1' : 'sm:gap-3') : null, | ||
($columns['md'] ?? null) ? (($columns['md'] === 1) ? 'md:gap-1' : 'md:gap-3') : null, | ||
($columns['lg'] ?? null) ? (($columns['lg'] === 1) ? 'lg:gap-1' : 'lg:gap-3') : null, | ||
($columns['xl'] ?? null) ? (($columns['xl'] === 1) ? 'xl:gap-1' : 'xl:gap-3') : null, | ||
($columns['2xl'] ?? null) ? (($columns['2xl'] === 1) ? '2xl:gap-1' : '2xl:gap-3') : null, | ||
]) | ||
> | ||
<x-filament-tables::columns.layout | ||
:components="$getComponents()" | ||
grid | ||
:record="$getRecord()" | ||
:record-key="$getRecordKey()" | ||
/> | ||
</x-filament::grid> | ||
<div | ||
{{ | ||
$attributes | ||
->merge($getExtraAttributes(), escape: false) | ||
->grid($columns = $getGridColumns()) | ||
->class([ | ||
'fi-ta-grid', | ||
(($columns['default'] ?? 1) === 1) ? 'fi-gap-sm' : 'fi-gap-lg', | ||
($columns['sm'] ?? null) ? (($columns['sm'] === 1) ? 'sm:fi-gap-sm' : 'sm:fi-gap-lg') : null, | ||
($columns['md'] ?? null) ? (($columns['md'] === 1) ? 'md:fi-gap-sm' : 'md:fi-gap-lg') : null, | ||
($columns['lg'] ?? null) ? (($columns['lg'] === 1) ? 'lg:fi-gap-sm' : 'lg:fi-gap-lg') : null, | ||
($columns['xl'] ?? null) ? (($columns['xl'] === 1) ? 'xl:fi-gap-sm' : 'xl:fi-gap-lg') : null, | ||
($columns['2xl'] ?? null) ? (($columns['2xl'] === 1) ? '2xl:fi-gap-sm' : '2xl:fi-gap-lg') : null, | ||
]) | ||
}} | ||
> | ||
<x-filament-tables::columns.layout | ||
:components="$getComponents()" | ||
grid | ||
:record="$getRecord()" | ||
:record-key="$getRecordKey()" | ||
/> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.