diff --git a/.env.example b/.env.example new file mode 100644 index 0000000000..c5082c678c --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +# BrowserSync +# BROWSERSYNC_PROXY='http://127.0.0.1:8000' +# BROWSERSYNC_HTTPS=false \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2ecd0f3017..c06ef9e35a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ -/vendor +/vendor/ +/node_modules/ +SCRATCH.md +COMMIT_MSG.aim.txt composer.lock -/phpunit.xml -.phpunit.result.cache \ No newline at end of file +.phpunit.result.cache +.idea diff --git a/.prettierrc b/.prettierrc new file mode 100755 index 0000000000..fa51da29e7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "trailingComma": "es5", + "tabWidth": 2, + "semi": false, + "singleQuote": true +} diff --git a/README.md b/README.md index 84036eb992..0f2dec0bca 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,5 @@ # Filament -Extend Laravel Jetstream with Filament. +A lightweight admin for your Laravel app. -## Features - -### User management - -- [ ] Register new users from within Jetstream. - -#### Permissions - -- [ ] User permissions not bound to teams for more granular access control. +> This is a new version that is very much a work in progress! diff --git a/composer.json b/composer.json index a84a4f3504..7cfb4e3321 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,10 @@ { "name": "filament/filament", - "description": "Extend Laravel Jetstream with Filament.", - "keywords": ["laravel", "laravel-jetstream", "tailwind", "livewire"], + "description": "A lightweight admin for your Laravel app.", + "keywords": ["laravel", "tailwind", "livewire"], "license": "MIT", "require": { - "laravel/jetstream": "^1.1", - "livewire/livewire": "^2.0" + "livewire/livewire": "^2.2" }, "require-dev": { "mockery/mockery": "^1.0", @@ -26,7 +25,10 @@ "laravel": { "providers": [ "Filament\\FilamentServiceProvider" - ] + ], + "aliases": { + "Filament": "Filament\\FilamentFacade" + } } }, "scripts": { diff --git a/config/filament.php b/config/filament.php index 4e824f15e0..6d72b768c9 100644 --- a/config/filament.php +++ b/config/filament.php @@ -3,32 +3,90 @@ use Filament\Features; return [ - - /* - |-------------------------------------------------------------------------- - | Filament Stack - |-------------------------------------------------------------------------- - | - | This configuration value informs Filament which "stack" you will be - | using for Jetstream. Livewire is currently the only available - | stack for this package. - | - */ - - 'stack' => 'livewire', /* |-------------------------------------------------------------------------- | Features |-------------------------------------------------------------------------- | - | By default all of Filament's features are optional. You may enable - | features as needed by your application. + | By default all of Filament's features are enabled. You may enable + | or disable features as needed by your application. | */ 'features' => [ - Features::managesUsers(), + Features::users(), + ], + + 'prefix' => [ + + /* + |-------------------------------------------------------------------------- + | Route Name Prefix + |-------------------------------------------------------------------------- + | + | This value will set a prefix for all Filament route names. + | + */ + + 'name' => 'filament.', + + /* + |-------------------------------------------------------------------------- + | Route Prefix + |-------------------------------------------------------------------------- + | + | This value will set a prefix for all Filament routes. + | + */ + + 'route' => 'filament', + + /* + |-------------------------------------------------------------------------- + | Component Prefix + |-------------------------------------------------------------------------- + | + | This value will set a prefix for all Filament components. + | + | If set with the default "filament", for example, you can reference components like: + | + | + | + | + */ + + 'component' => 'filament', + + ], + + /* + |-------------------------------------------------------------------------- + | Components + |-------------------------------------------------------------------------- + | + | Below you reference all components that should be loaded for your app. + | By default all components from Filament are loaded in. You can + | disable or overwrite any component class or alias that you want. + | + */ + + 'components' => [ + //... + ], + + /* + |-------------------------------------------------------------------------- + | Livewire Components + |-------------------------------------------------------------------------- + | + | Below you reference all the Livewire components that should be loaded + | for your app. By default all components from Filament are loaded in. + | + */ + + 'livewire' => [ + 'login' => Filament\Http\Livewire\Auth\Login::class, ], ]; diff --git a/dist/css/filament.css b/dist/css/filament.css new file mode 100644 index 0000000000..35e5cd3bc2 --- /dev/null +++ b/dist/css/filament.css @@ -0,0 +1,2 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button{-webkit-appearance:button}button::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}details{display:block}summary{display:list-item}template{display:none}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{box-sizing:border-box;border:0 solid #e2e8f0}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#a0aec0}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#a0aec0}input::placeholder,textarea::placeholder{color:#a0aec0}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}.table{display:table}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}} +/*# sourceMappingURL=filament.css.map*/ \ No newline at end of file diff --git a/dist/css/filament.css.map b/dist/css/filament.css.map new file mode 100644 index 0000000000..7d6a226fad --- /dev/null +++ b/dist/css/filament.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/tailwindcss/base.css","webpack:///./node_modules/tailwindcss/utilities.css"],"names":[],"mappings":"AAAA,+HAAc,CAAd,aAAc,CAAd,kBAAc,CAAd,+BAAc,CAAd,mDAAc,CAAd,iDAAc,CAAd,8BAAc,CAAd,kIAAc,CAAd,2BAAc,CAAd,2DAAc,CAAd,mBAAc,CAAd,6EAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,qBAAc,CAAd,kGAAc,CAAd,6BAAc,CAAd,iCAAc,CAAd,gCAAc,CAAd,oDAAc,CAAd,mDAAc,CAAd,mCAAc,CAAd,oGAAc,CAAd,gCAAc,CAAd,sBAAc,CAAd,qBAAc,CAAd,yBAAc,CAAd,qBAAc,CAAd,2DAAc,CAAd,yDAAc,CAAd,yEAAc,CAAd,iCAAc,CAAd,qBAAc,CAAd,uMAAc,CAAd,6DAAc,CAAd,uBAAc,CAAd,sBAAc,CAAd,wBAAc,CAAd,gEAAc,CAAd,wEAAc,CAAd,sDAAc,CAAd,qBAAc,CAAd,8BAAc,CAAd,uDAAc,CAAd,uCAAc,CAAd,iFAAc,CAAd,yFAAc,CAAd,kFAAc,CAAd,oCAAc,CCAd,oBAAmB,CAAnB,kDAAmB,EAAnB,0CAAmB,EAAnB,2DAAmB,EAAnB,mDAAmB,EAAnB,uCAAmB,EAAnB,+BAAmB,EAAnB,oKAAmB,CAAnB,4HAAmB,EAAnB,4JAAmB,CAAnB,4HAAmB","file":"css/filament.css","sourcesContent":["@tailwind base;\n","@tailwind utilities;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/filament.js b/dist/js/filament.js new file mode 100644 index 0000000000..b54f3d26c1 --- /dev/null +++ b/dist/js/filament.js @@ -0,0 +1,2 @@ +!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}({0:function(e,t,n){n("y0MP"),e.exports=n("Wp+t")},"3yRE":function(e,t,n){e.exports=function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(n){for(var i=1;i tags. See https://github.com/alpinejs/alpine#${t}`):1!==e.content.childElementCount&&console.warn(`Alpine: