diff --git a/composer.json b/composer.json index 0215745..26618da 100644 --- a/composer.json +++ b/composer.json @@ -39,6 +39,7 @@ "filament/spatie-laravel-settings-plugin": "^3.0", "filament/spatie-laravel-tags-plugin": "^3.0-stable", "filament/spatie-laravel-translatable-plugin": "^3.0-stable", + "filament/support": "^3.2", "google/apiclient": "^2.15", "illuminate/contracts": "^10.0", "illuminate/database": "^10.0", diff --git a/package.json b/package.json index 1499993..ab90a72 100644 --- a/package.json +++ b/package.json @@ -2,20 +2,8 @@ "private": true, "type": "module", "scripts": { - "dev:core-styles": "npx tailwind -i resources/css/index.css -o resources/dist/catalyst-core-plugin.css --postcss --watch", - "dev:admin-styles": "npx tailwind -i resources/css/filament/admin/theme.css -o resources/dist/catalyst-admin.css --postcss --watch", - "dev:social-styles": "npx tailwind -i resources/css/filament/social/theme.css -o resources/dist/catalyst-social.css --postcss --watch", - "dev:jobs-styles": "npx tailwind -i resources/css/filament/jobs/theme.css -o resources/dist/catalyst-jobs.css --postcss --watch", "dev:scripts": "node bin/build.js --dev", - "build:core-styles": "npx tailwind -i resources/css/index.css -o resources/dist/catalyst-core-plugin.css --postcss --minify && npm run purge", - "build:admin-styles": "npx tailwind -i resources/css/filament/admin/theme.css -o resources/dist/catalyst-admin.css --postcss --minify && npm run purge", - "build:social-styles": "npx tailwind -i resources/css/filament/social/theme.css -o resources/dist/catalyst-social.css --postcss --minify && npm run purge", - "build:jobs-styles": "npx tailwind -i resources/css/filament/jobs/theme.css -o resources/dist/catalyst-core-jobs.css --postcss --minify && npm run purge", "build:scripts": "node bin/build.js", - "purge:core-styles": "filament-purge -i resources/dist/catalyst-core-plugin.css -o resources/dist/catalyst-core-plugin.css -v 3.x", - "purge:admin-styles": "filament-purge -i resources/dist/catalyst-admin.css -o resources/dist/catalyst-admin.css -v 3.x", - "purge:social-styles": "filament-purge -i resources/dist/catalyst-social.css -o resources/dist/catalyst-social.css -v 3.x", - "purge:jobs-styles": "filament-purge -i resources/dist/catalyst-jobs.css -o resources/dist/catalyst-jobs.css -v 3.x", "purge": "npm-run-all purge:*", "dev": "npm-run-all --parallel dev:*", "build": "npm-run-all build:*" diff --git a/resources/views/layouts/partials/head-end.blade.php b/resources/views/layouts/partials/head-end.blade.php index bfb59fd..8d2a547 100644 --- a/resources/views/layouts/partials/head-end.blade.php +++ b/resources/views/layouts/partials/head-end.blade.php @@ -1,10 +1,4 @@ -{{----}} - -{{--@filamentStyles--}} @libraryStyles @include('catalyst::components.layouts.partials.fontawesome') -{{--@vite(['public/css/omnia-digital/catalyst-core-plugin/catalyst-core-plugin-styles.css'])--}} -{{--@vite(['public/css/omnia-digital/catalyst-core-plugin/catalyst-social-styles.css'])--}} -{{--@vite(['public/css/omnia-digital/catalyst-core-plugin/catalyst-admin-styles.css'])--}} -{{--@vite(['public/css/omnia-digital/catalyst-core-plugin/catalyst-jobs-styles.css'])--}} +@vite(['resources/css/app.css']) @stack('styles') diff --git a/src/CatalystCoreServiceProvider.php b/src/CatalystCoreServiceProvider.php index c1ec5a3..8f8bf46 100644 --- a/src/CatalystCoreServiceProvider.php +++ b/src/CatalystCoreServiceProvider.php @@ -8,7 +8,6 @@ use Filament\Support\Assets\Js; use Filament\Support\Assets\Theme; use Filament\Support\Facades\FilamentAsset; -use Filament\Support\Facades\FilamentColor; use Filament\Support\Facades\FilamentIcon; use Filament\Support\Facades\FilamentView; use Illuminate\Filesystem\Filesystem; @@ -49,14 +48,10 @@ class CatalystCoreServiceProvider extends PackageServiceProvider public function configurePackage(Package $package): void { - /* - * This class is a Package Service Provider - * - * More info: https://github.com/spatie/laravel-package-tools - */ $package->name(static::$name) ->hasCommands($this->getCommands()) ->hasRoutes($this->getRoutes()) + ->hasViews() ->hasInstallCommand(function (InstallCommand $command) { $command ->publishConfigFile() @@ -290,8 +285,8 @@ private function registerSingleLivewireComponent(string $class, string $namespac public function packageRegistered(): void { $this->app->register(LivewireServiceProvider::class); - $this->app->register(AdminPanelProvider::class); - $this->app->register(SocialPanelProvider::class); +// $this->app->register(AdminPanelProvider::class); +// $this->app->register(SocialPanelProvider::class); $this->app->register(JobsPanelProvider::class); $this->app->register(StripeConnectServiceProvider::class); $this->app->register(TeamLensesServiceProvider::class); @@ -376,11 +371,7 @@ protected function getAssets(): array { return [ // AlpineComponent::make('catalyst-core-plugin', __DIR__ . '/../resources/dist/components/catalyst-core-plugin.js'), -// Css::make('catalyst-core-plugin-styles', __DIR__ . '/../resources/dist/catalyst-core-plugin.css')->loadedOnRequest(), -// Css::make('catalyst-admin-styles', __DIR__ . '/../resources/dist/catalyst-admin.css')->loadedOnRequest(), -// Css::make('catalyst-social-styles', __DIR__ . '/../resources/dist/catalyst-social.css')->loadedOnRequest(), -// Css::make('catalyst-jobs-styles', __DIR__ . '/../resources/dist/catalyst-jobs.css')->loadedOnRequest(), - +// Css::make('catalyst-core-plugin-styles', __DIR__ . '/../resources/dist/catalyst-core-plugin.css'), Js::make('catalyst-core-plugin-scripts', __DIR__ . '/../resources/dist/catalyst-core-plugin.js'), ]; } diff --git a/src/Providers/Filament/AdminPanelProvider.php b/src/Providers/Filament/AdminPanelProvider.php index 0b6a774..a723f56 100644 --- a/src/Providers/Filament/AdminPanelProvider.php +++ b/src/Providers/Filament/AdminPanelProvider.php @@ -7,7 +7,6 @@ use Filament\Http\Middleware\DispatchServingFilamentEvent; use Filament\Panel; use Filament\PanelProvider; -use Filament\Support\Colors\Color; use Filament\Widgets; use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse; use Illuminate\Cookie\Middleware\EncryptCookies; @@ -28,9 +27,6 @@ public function panel(Panel $panel): Panel ->id('admin') ->path('admin') ->login() - ->colors([ - 'primary' => Color::Amber, - ]) ->discoverResources(in: __DIR__ . '/../../Filament/Admin/Resources', for: 'OmniaDigital\\CatalystCore\\Filament\\Admin\\Resources') ->discoverPages(in: __DIR__ . '/../../Filament/Admin/Pages/', diff --git a/src/Providers/Filament/JobsPanelProvider.php b/src/Providers/Filament/JobsPanelProvider.php index 1728fe2..7d67afd 100644 --- a/src/Providers/Filament/JobsPanelProvider.php +++ b/src/Providers/Filament/JobsPanelProvider.php @@ -25,14 +25,6 @@ public function panel(Panel $panel): Panel ->id('jobs') ->path('jobs') ->login() - ->colors([ - 'primary' => Color::Amber, - 'danger' => Color::Rose, - 'gray' => Color::Gray, - 'info' => Color::Blue, - 'success' => Color::Emerald, - 'warning' => Color::Orange, - ]) ->discoverResources( in: __DIR__ . '/../../Filament/Jobs/Resources', for: 'OmniaDigital\\CatalystCore\\Filament\\Jobs\\Resources' @@ -41,19 +33,14 @@ public function panel(Panel $panel): Panel in: __DIR__ . '/../../Filament/Jobs/Pages', for: 'OmniaDigital\\CatalystCore\\Filament\\Jobs\\Pages' ) -// ->pages([ -// Home::class -// // Pages\Dashboard::class, -// ]) - ->discoverWidgets( in: '../../Filament/Jobs/Widgets', for: 'OmniaDigital\\CatalystCore\\Filament\\Jobs\\Widgets' ) - ->widgets([ - Widgets\AccountWidget::class, - Widgets\FilamentInfoWidget::class, - ]) +// ->widgets([ +// Widgets\AccountWidget::class, +// Widgets\FilamentInfoWidget::class, +// ]) // ->topNavigation() // ->sidebarCollapsibleOnDesktop() // Render Hooks for Jobs diff --git a/src/Providers/Filament/SocialPanelProvider.php b/src/Providers/Filament/SocialPanelProvider.php index eebbc2f..c060114 100644 --- a/src/Providers/Filament/SocialPanelProvider.php +++ b/src/Providers/Filament/SocialPanelProvider.php @@ -12,7 +12,6 @@ use Filament\Navigation\NavigationItem; use Filament\Panel; use Filament\PanelProvider; -use Filament\Support\Colors\Color; use Filament\Widgets; use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse; use Illuminate\Cookie\Middleware\EncryptCookies; @@ -34,14 +33,6 @@ public function panel(Panel $panel): Panel ->id('social') ->path('social') ->login() - ->colors([ - 'primary' => Color::Orange, - 'danger' => Color::Rose, - 'gray' => Color::Gray, - 'info' => Color::Blue, - 'success' => Color::Emerald, - 'warning' => Color::Orange, - ]) ->discoverResources( in: __DIR__ . '/../../Filament/Social/Resources', for: 'OmniaDigital\\CatalystCore\\Filament\\Social\\Resources' diff --git a/tailwind.config.example.js b/tailwind.config.example.js new file mode 100644 index 0000000..b26ffec --- /dev/null +++ b/tailwind.config.example.js @@ -0,0 +1,169 @@ +const plugin = require('tailwindcss/plugin'); +const defaultTheme = require('tailwindcss/defaultTheme'); +const colors = require('tailwindcss/colors') +import preset from './vendor/filament/filament/tailwind.config.preset' + +module.exports = { + presets: [preset], + content: [ + './vendor/omnia-digital/catalyst-core-plugin/resources/views/**/*.blade.php', + './storage/framework/views/*.php', + './resources/views/**/*.blade.php', + './vendor/filament/**/*.blade.php', + './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', + './vendor/laravel/jetstream/**/*.blade.php', + './vendor/omnia-digital/library/resources/views/**/*.blade.php', + './vendor/omnia-digital/library/resources/js/**/*.js', + './vendor/omnia-digital/media-manager/resources/views/**/*.blade.php', + './node_modules/tw-elements/dist/js/**/*.js' + ], + + theme: { + themeVariants: [ + 'default', + 'dark', + 'hatchet', + 'cfanea', + 'newyear', + 'valentines', + 'patrick', + 'easter', + 'spring', + 'summer', + 'independence', + 'fall', + 'halloween', + 'christmas', + 'winter' + ], + extend: { + fontFamily: { + sans: ["SF Pro Display", "Helvetica", "Roboto", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Arial", "sans-serif", ...defaultTheme.fontFamily.sans], + }, + fontSize: { + 'dot': '.15rem', + '2xs': '0.65rem', + '3xs': '0.55rem', + 'base': '0.9375rem', + }, + height: { + '13': '3.2rem', + 'full-with-nav': 'calc(100vh - 56px)' + }, + maxWidth: { + 'sm': '22rem', + '2xl': '40rem', + '8xl': '82rem', + '9xl': '90rem', + 'post-card-max-w': '680px' + }, + colors: { + 'base-text-color': 'var(--base-text-color)', + 'white-text-color': 'var(--white-text-color)', + 'light-text-color': 'var(--light-text-color)', + 'dark-text-color': 'var(--dark-text-color)', + neutral: { + DEFAULT: 'var(--neutral)', + 'light': 'var(--neutral-light)', + 'dark': 'var(--neutral-dark)', + 'hover': 'var(--neutral-hover)', + }, + primary: { + DEFAULT: process.env.PRIMARY_COLOR || 'var(--primary)', + "50": "var(--primary-50)", + "100": "var(--primary-100)", + "200": "var(--primary-200)", + "300": "var(--primary-300)", + "400": "var(--primary-400)", + "500": process.env.PRIMARY_COLOR_500 || process.env.PRIMARY_COLOR || "var(--primary-500)" || "var(--primary)", + "600": "var(--primary-600)", + "700": "var(--primary-700)", + "800": "var(--primary-800)", + "900": "var(--primary-900)" + }, + secondary: { + DEFAULT: process.env.SECONDARY_COLOR || 'var(--secondary)', + "50": "var(--secondary-50)", + "100": "var(--secondary-100)", + "200": "var(--secondary-200)", + "300": "var(--secondary-300)", + "400": "var(--secondary-400)", + "500": "var(--secondary-500)", + "600": "var(--secondary-600)", + "700": "var(--secondary-700)", + "800": "var(--secondary-800)", + "900": "var(--secondary-900)" + }, + tertiary: { + DEFAULT: process.env.TERTIARY_COLOR || 'var(--tertiary)', + "50": "var(--tertiary-50)", + "100": "var(--tertiary-100)", + "200": "var(--tertiary-200)", + "300": "var(--tertiary-300)", + "400": "var(--tertiary-400)", + "500": "var(--tertiary-500)", + "600": "var(--tertiary-600)", + "700": "var(--tertiary-700)", + "800": "var(--tertiary-800)", + "900": "var(--tertiary-900)" + }, + danger: colors.rose, + success: colors.green, + warning: colors.yellow, + 'main-nav-active-hover-text-color': 'var(--main-nav-active-hover-text-color)', + 'main-nav-active-text-color': 'var(--main-nav-active-text-color)', + 'main-nav-active-bg-color': 'var(--main-nav-active-bg-color)', + 'main-nav-text-color': 'var(--main-nav-text-color)', + 'main-nav-hover-text-color': 'var(--main-nav-hover-text-color)', + 'main-nav-hover-bg-color': 'var(--main-nav-hover-bg-color)', + 'post-card-bg-color': 'var(--post-card-bg-color)', + 'post-card-border-color': 'var(--post-card-border-color)', + 'post-card-border-hover-color': 'var(--post-card-border-hover-color)', + 'post-card-title-color': 'var(--post-card-title-color)', + 'post-card-meta-color': 'var(--post-card-meta-color)', + 'post-card-body-color': 'var(--post-card-body-color)', + 'post-card-shadows': 'var(--post-card-shadows)', + 'heading-default-color': 'var(--heading-default-color)', + 'h1-color': 'var(--h1-color)', + 'h2-color': 'var(--h2-color)', + 'h3-color': 'var(--h3-color)', + 'h4-color': 'var(--h4-color)', + 'h5-color': 'var(--h5-color)', + 'h6-color': 'var(--h6-color)', + } + } + }, + + variants: { + extend: { + textOpacity: ['dark'], + display: ["group-hover"] + } + }, + + plugins: [ + require('@tailwindcss/forms'), + require('@tailwindcss/typography'), + /* require('tailwindcss-multi-theme'), */ + require('@tailwindcss/aspect-ratio'), + require('tailwind-scrollbar-hide'), + require('tw-elements/dist/plugin'), + plugin(function ({matchUtilities, theme}) { + matchUtilities( + { + 'h-full-minus': (value) => { + return { + height: 'calc(100vh - ' + value + ')', + } + }, + 'max-h-full-minus': (value) => { + return { + maxHeight: 'calc(100vh - ' + value + ')', + } + }, + }, + ) + }), + ] +}; + diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index 0183c71..0000000 --- a/tailwind.config.js +++ /dev/null @@ -1,10 +0,0 @@ -const preset = require('./vendor/filament/filament/tailwind.config.preset') - -module.exports = { - presets: [preset], - content: [ - './app/**/*.php', - './resources/views/**/*.blade.php', - './vendor/filament/**/*.blade.php', - ], -}