Skip to content

Commit

Permalink
Require forms instead of filament(admin) (#8)
Browse files Browse the repository at this point in the history
* Require forms instead of filament(admin)

This package only should require filament forms. When requiring filament/filament the whole filament admin will be installed in projects which don't use it.

* fix: autocomplete in password status
* fix: use forms instead of full admin package as a depenancy

Co-authored-by: Craig Smith <952595+phpsa@users.noreply.github.com>
  • Loading branch information
sweebee and phpsa authored Aug 30, 2022
1 parent 8e238a4 commit a1617d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phpsa/filament-password-reveal",
"description": "Password Input with optino to show",
"description": "Password Input with option to show",
"keywords": [
"laravel",
"user",
Expand All @@ -27,7 +27,7 @@
"minimum-stability": "dev",
"require": {
"php": "^8.0",
"filament/filament": "^2.9",
"filament/forms": "^2.9",
"spatie/laravel-package-tools": "^1.10"
},
"config": {
Expand Down
6 changes: 3 additions & 3 deletions resources/views/password.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ class="relative flex-1"
:type="show ? 'text' : 'password'"
{{ $applyStateBindingModifiers('wire:model') }}="{{ $getStatePath() }}"
dusk="filament.forms.{{ $getStatePath() }}"
{!! ($autocomplete = $getAutocomplete()) ? "autocomplete=\" {$autocomplete}\"" : null !!}
{!! ($autocomplete = $getAutocomplete()) ? "autocomplete=\"{$autocomplete}\"" : null !!}
{!! $isAutofocused() ? 'autofocus' : null !!}
{!! $isDisabled() ? 'disabled' : null !!}
id="{{ $getId() }}"
{!! filled($value = $getMaxValue()) ? "max=\" {$value}\"" : null !!}
{!! ($placeholder = $getPlaceholder()) ? "placeholder=\" {$placeholder}\"" : null !!}
{!! filled($value = $getMaxValue()) ? "max=\"{$value}\"" : null !!}
{!! ($placeholder = $getPlaceholder()) ? "placeholder=\"{$placeholder}\"" : null !!}
{!! $isRequired() ? 'required' : null !!}
{{ $getExtraInputAttributeBag()->class([
'block w-full transition duration-75 rounded-lg shadow-sm focus:border-primary-600 focus:ring-1 focus:ring-inset focus:ring-primary-600 disabled:opacity-70',
Expand Down

0 comments on commit a1617d1

Please sign in to comment.