|
13 | 13 | use Filament\Forms\Components\Toggle; |
14 | 14 | use Filament\Infolists\Components\TextEntry; |
15 | 15 | use Filament\Schemas\Components\Actions; |
| 16 | +use Filament\Schemas\Components\Callout; |
16 | 17 | use Filament\Schemas\Components\EmptyState; |
17 | 18 | use Filament\Schemas\Components\Fieldset; |
18 | 19 | use Filament\Schemas\Components\Flex; |
|
21 | 22 | use Filament\Schemas\Components\Section; |
22 | 23 | use Filament\Schemas\Components\Tabs; |
23 | 24 | use Filament\Schemas\Components\Tabs\Tab; |
| 25 | +use Filament\Schemas\Components\Text; |
24 | 26 | use Filament\Schemas\Components\Wizard; |
25 | 27 | use Filament\Schemas\Concerns\InteractsWithSchemas; |
26 | 28 | use Filament\Schemas\Contracts\HasSchemas; |
@@ -758,6 +760,118 @@ public function form(Schema $form): Schema |
758 | 760 | ])->verticalAlignment(VerticalAlignment::End), |
759 | 761 | ]), |
760 | 762 | ]), |
| 763 | + Group::make() |
| 764 | + ->id('callout') |
| 765 | + ->extraAttributes([ |
| 766 | + 'class' => 'p-16 max-w-2xl', |
| 767 | + ]) |
| 768 | + ->schema([ |
| 769 | + Callout::make('New version available') |
| 770 | + ->description('Filament v4 has been released with exciting new features and improvements.') |
| 771 | + ->info(), |
| 772 | + ]), |
| 773 | + Group::make() |
| 774 | + ->id('calloutStatuses') |
| 775 | + ->extraAttributes([ |
| 776 | + 'class' => 'p-16 max-w-2xl space-y-4', |
| 777 | + ]) |
| 778 | + ->schema([ |
| 779 | + Callout::make('Payment successful') |
| 780 | + ->description('Your order has been confirmed and is being processed.') |
| 781 | + ->success(), |
| 782 | + Callout::make('Session expiring soon') |
| 783 | + ->description('Your session will expire in 5 minutes. Save your work to avoid losing changes.') |
| 784 | + ->warning(), |
| 785 | + Callout::make('Connection failed') |
| 786 | + ->description('Unable to connect to the server. Please check your internet connection.') |
| 787 | + ->danger(), |
| 788 | + ]), |
| 789 | + Group::make() |
| 790 | + ->id('calloutWithoutBackground') |
| 791 | + ->extraAttributes([ |
| 792 | + 'class' => 'p-16 max-w-2xl', |
| 793 | + ]) |
| 794 | + ->schema([ |
| 795 | + Callout::make('Scheduled maintenance') |
| 796 | + ->description('The system will be unavailable on Sunday from 2:00 AM to 4:00 AM.') |
| 797 | + ->warning() |
| 798 | + ->color(null), |
| 799 | + ]), |
| 800 | + Group::make() |
| 801 | + ->id('calloutCustomColor') |
| 802 | + ->extraAttributes([ |
| 803 | + 'class' => 'p-16 max-w-2xl', |
| 804 | + ]) |
| 805 | + ->schema([ |
| 806 | + Callout::make('Pro tip') |
| 807 | + ->description('You can use keyboard shortcuts to navigate faster. Press ? to see all available shortcuts.') |
| 808 | + ->color('primary') |
| 809 | + ->icon(Heroicon::OutlinedLightBulb) |
| 810 | + ->iconColor('primary'), |
| 811 | + ]), |
| 812 | + Group::make() |
| 813 | + ->id('calloutActions') |
| 814 | + ->extraAttributes([ |
| 815 | + 'class' => 'p-16 max-w-2xl', |
| 816 | + ]) |
| 817 | + ->schema([ |
| 818 | + Callout::make('Your trial ends in 3 days') |
| 819 | + ->description('Upgrade now to keep access to all premium features.') |
| 820 | + ->warning() |
| 821 | + ->actions([ |
| 822 | + Action::make('upgrade') |
| 823 | + ->label('Upgrade to Pro') |
| 824 | + ->button(), |
| 825 | + Action::make('compare') |
| 826 | + ->label('Compare plans'), |
| 827 | + ]), |
| 828 | + ]), |
| 829 | + Group::make() |
| 830 | + ->id('calloutCustomIcon') |
| 831 | + ->extraAttributes([ |
| 832 | + 'class' => 'p-16 max-w-2xl', |
| 833 | + ]) |
| 834 | + ->schema([ |
| 835 | + Callout::make('Pro tip') |
| 836 | + ->description('You can use keyboard shortcuts to navigate faster. Press ? to see all available shortcuts.') |
| 837 | + ->icon(Heroicon::OutlinedLightBulb) |
| 838 | + ->iconColor('primary'), |
| 839 | + ]), |
| 840 | + Group::make() |
| 841 | + ->id('calloutFooter') |
| 842 | + ->extraAttributes([ |
| 843 | + 'class' => 'p-16 max-w-2xl', |
| 844 | + ]) |
| 845 | + ->schema([ |
| 846 | + Callout::make('Backup complete') |
| 847 | + ->description('Your data has been successfully backed up to the cloud.') |
| 848 | + ->success() |
| 849 | + ->footer([ |
| 850 | + Text::make('Last backup: 5 minutes ago') |
| 851 | + ->color('gray'), |
| 852 | + Action::make('viewBackups') |
| 853 | + ->label('View All Backups') |
| 854 | + ->button(), |
| 855 | + ]), |
| 856 | + ]), |
| 857 | + Group::make() |
| 858 | + ->id('calloutActionsAlignedEnd') |
| 859 | + ->extraAttributes([ |
| 860 | + 'class' => 'p-16 max-w-2xl', |
| 861 | + ]) |
| 862 | + ->schema([ |
| 863 | + Callout::make('Updates available') |
| 864 | + ->description('New features and improvements are ready to install.') |
| 865 | + ->info() |
| 866 | + ->actions([ |
| 867 | + Action::make('install') |
| 868 | + ->label('Install Now') |
| 869 | + ->button(), |
| 870 | + Action::make('later') |
| 871 | + ->label('Remind Me Later'), |
| 872 | + ]) |
| 873 | + ->footerActionsAlignment(Alignment::End), |
| 874 | + ]), |
761 | 875 | Group::make() |
762 | 876 | ->id('emptyState') |
763 | 877 | ->extraAttributes([ |
|
0 commit comments