Giter Club home page Giter Club logo

filament-password-reveal's Introduction

Latest Version on Packagist Semantic Release Total Downloads

Filament Password Input

Password input that allows shows/hide, copy and generate

Installation

You can install the package via composer:

composer require phpsa/filament-password-reveal

Usage

Password::make('password')->autocomplete('new_password')->...

additional methods:

Methods that allow some extendability

  • Password Reveal

    • ...->revealable(bool|Closure $condition) - default: true
    • ...->initiallyHidden(bool|Closure $condition) - default: true
    • ...->showIcon(string $icon) - default: heroicon-o-eye
    • ...->hideIcon(string $hide)] - default: heroicon-o-eye-open
  • Password Copy to Clipboard

    • ...->copyable(bool|Closure) default: false
    • ...->copyIcon(string $icon)] default: heroicon-o-clipboard
  • Generate Password ...->generatable(bool|Closure) default: false ...->generateIcon($icon) default: heroicon-o-key ...->passwordLength(int) default: 8 ...->passwordUsesNumbers(bool) default: true ...->passwordUsesSymbols(bool) default: true

All three can be enabled at the same time.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

filament-password-reveal's People

Contributors

craigatcd avatar divdax avatar intrepidws avatar josefbehr avatar lukas-frey avatar mstfkhazaal avatar phpsa avatar semantic-release-bot avatar steveneppler avatar sweebee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

filament-password-reveal's Issues

Change icon size

Hello,

it would be really cool if I could change the size of the button. Specifically I would like to make the icon a little bit smaller.

How to use the Filament Password Reveal plugin in my Filament PHP project?

Hi there,

I'm trying to use the phpsa/filament-password-reveal plugin in my Filament PHP project, but I'm not sure how to get it working. I've installed the package using Composer, but I'm not sure how to enable the password reveal feature in my forms.

Could you provide some guidance on how to set up the plugin?

Any help or guidance you can provide would be greatly appreciated!

Thanks in advance for your help.

Support laravel 8

return Str::of($this->getId())->replace(".", "_")->prepend('input_')->studly()->snake()->toString();

Maybe we can have a condition like this

if(app()->version() == 8.0.0){
        return Str::of($this->getId())->replace(".", "_")->prepend('input_')->studly()->snake()->toHtmlString();
}
        return Str::of($this->getId())->replace(".", "_")->prepend('input_')->studly()->snake()->toString();

filament v2?

currently not working with ONLY form-builder from filament (v2).
I think the issue is:

    "require": {
        "php": "^8.0",
        "filament/forms": "^3.0",
        "spatie/laravel-package-tools": "^1.10"
    },

it should be filament/forms ^2.0

Copyable throws console error and doesn't work

Getting an error using the copy button.

Alpine Expression Error: can't access property "writeText", navigator.clipboard is undefined

Expression: "copyPassword()"
 
<button type="button" x-on:click.prevent="copyPassword()">
[module.esm.js:419:10](webpack://filament/node_modules/alpinejs/dist/module.esm.js)

Uncaught TypeError: can't access property "writeText", navigator.clipboard is undefined
Password::make('password')
  ->required()
  ->maxLength(255)
  ->copyable()
  ->generatable()
  ->passwordLength('20'),

Package update for filament V3

Hello,

I hope this message finds you well. I've been using the phpsa/filament-password-reveal package and have found it to be extremely useful in my projects. I recently noticed that it might not be fully compatible with version 3 of Filament. It would be fantastic if the package could be updated to ensure compatibility with this newer version.

Ensuring this compatibility would greatly benefit the community and users like myself who rely on both tools for our projects. I understand that maintaining and updating packages takes time and effort, and I truly appreciate all the work you've put into this package.

Thank you for considering this request. Looking forward to the continued success and evolution of phpsa/filament-password-reveal.

Best regards,

David Gironella

can't change the icons?

use Phpsa\FilamentPasswordReveal\Password as PasswordReveal;

PasswordReveal::make('password')     
->showIcon('bi-eye')
->hideIcon('bi-eye-slash');

Generated password should respect password rules

Sometimes it happens that the generated password does not contain all required elements:

Password::make('password')
    ->generatable()
    ->copyable()
    ->rules(
        \Illuminate\Validation\Rules\Password::min(8)
            ->letters()
            ->mixedCase()
            ->numbers()
            ->symbols()        
    ),

In some cases the generated password is missing the number.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.