Skip to content

Commit 80fc2f6

Browse files
committed
Icons mvp
1 parent 1c9c5a8 commit 80fc2f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1171
-1566
lines changed

packages/data/docs/IDEA.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -979,33 +979,8 @@ https://github.com/nevadskiy/laravel-geonames
979979

980980
- Timezones - https://timezonedb.com/download
981981

982-
- beide in Moox packen und verdrahten
983-
- icons folder
984-
- languages
985-
- circle
986-
- ...
987-
- countries
988-
- circle
989-
- ...
990-
- Iterationen ...
991-
992-
moox/locate
993-
994982
https://github.com/tomatophp/filament-locations/
995983

996-
- Area (Continent, Subcontinent, Economic Area)
997-
- Country
998-
- Region (Federal states etc.)
999-
- Config:
1000-
- countries
1001-
- use_flag_style = circle
1002-
- languages
1003-
- use_flag_style = square
1004-
- areas
1005-
- use_flag_style = ...
1006-
1007-
moox/flags
1008-
1009984
- https://de.wikipedia.org/wiki/Liste_der_ISO-639-Sprachcodes vs https://en.wikipedia.org/wiki/IETF_language_tag
1010985
-
1011986
- https://flagpedia.net/us-states
@@ -1021,14 +996,6 @@ moox/flags
1021996
- Blade Flags https://github.com/MohmmedAshraf/blade-flags News https://laravel-news.com/laravel-blade-country-language-icons und Video https://www.youtube.com/watch?v=XTnKU-VCOB8
1022997
- https://github.com/stijnvanouplines/blade-country-flags other one
1023998

1024-
Versions:
1025-
1026-
- Circle - https://github.com/HatScripts/circle-flags/
1027-
- Rounded
1028-
- Square
1029-
- Rectangled
1030-
- Original - https://github.com/hampusborgos/country-flags
1031-
1032999
https://github.com/propaganistas/laravel-phone, see https://laravel-phone.herokuapp.com/
10331000
https://filamentphp.com/plugins/ysfkaya-phone-input
10341001
https://filamentphp.com/plugins/ysfkaya-phone-input

packages/data/src/Filament/Resources/StaticCountryResource.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Filament\Forms\Components\TextInput;
1212
use Filament\Forms\Form;
1313
use Filament\Resources\Resource;
14+
use Filament\Tables\Columns\IconColumn;
1415
use Filament\Tables\Columns\TextColumn;
1516
use Filament\Tables\Table;
1617
use Moox\Core\Traits\Base\BaseInResource;
@@ -167,7 +168,12 @@ public static function table(Table $table): Table
167168
{
168169
return $table
169170
->columns([
170-
TextColumn::make('alpha2')->label(__('data::fields.alpha2')),
171+
IconColumn::make('alpha2')
172+
->label('')
173+
->icon(fn (string $state): ?string => @file_exists(base_path("packages/flag-icons-circle/resources/svg/{$state}.svg")) ? "flag-{$state}" : null),
174+
TextColumn::make('alpha2_')
175+
->label('Alpha-2')
176+
->getStateUsing(fn ($record) => $record->alpha2),
171177
TextColumn::make('alpha3_b')->label(__('data::fields.alpha3_b')),
172178
TextColumn::make('alpha3_t')->label(__('data::fields.alpha3_t')),
173179
TextColumn::make('common_name')->label(__('data::fields.common_name')),

packages/data/src/Filament/Resources/StaticLanguageResource.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Filament\Forms\Components\TextInput;
1212
use Filament\Forms\Form;
1313
use Filament\Resources\Resource;
14-
use Filament\Tables\Columns\IconColumn;
1514
use Filament\Tables\Columns\TextColumn;
1615
use Filament\Tables\Filters\Filter;
1716
use Filament\Tables\Filters\SelectFilter;
@@ -119,12 +118,8 @@ public static function table(Table $table): Table
119118
{
120119
return $table
121120
->columns([
122-
IconColumn::make('alpha2')
123-
->label('')
124-
->icon(fn (string $state): ?string => @file_exists(base_path("packages/flag-icons-circle/resources/svg/{$state}.svg")) ? "flag-{$state}" : null),
125-
TextColumn::make('alpha2_')
126-
->label('Alpha-2')
127-
->getStateUsing(fn ($record) => $record->alpha2),
121+
TextColumn::make('alpha2')
122+
->label(__('data::fields.alpha2')),
128123
TextColumn::make('alpha3_b')
129124
->label(__('data::fields.alpha3_b')),
130125
TextColumn::make('alpha3_t')

packages/file-icons/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# File Icons
2+
3+
https://www.svgrepo.com/collection/file-types/

packages/file-icons/resources/old/ai.svg

Lines changed: 0 additions & 226 deletions
This file was deleted.

packages/file-icons/resources/old/dir.svg

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/file-icons/resources/old/doc.svg

Lines changed: 0 additions & 27 deletions
This file was deleted.

packages/file-icons/resources/old/eml.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)