Sha256: b0a4a7e44d0d050570f3b5471327d475ef94eb951dbf93b2ef135c9d28a607ba

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

module Playbook
  module PbPassphrase
    class Passphrase < Playbook::KitBase
      prop :average_threshold
      prop :confirmation, type: Playbook::Props::Boolean, default: false
      prop :input_props, type: Playbook::Props::Hash, default: {}
      prop :label
      prop :min_length
      prop :show_tips_below
      prop :strong_threshold
      prop :tips, type: Playbook::Props::Array, default: []

      # prop :on_strength_change
      # might not need these?
      # prop :common
      # prop :on_change

      def classname
        generate_classname("pb_passphrase")
      end

      def passphrase_options
        {
          dark: dark,
          id: id,
          averageThreshold: average_threshold,
          confirmation: confirmation,
          inputProps: input_props,
          label: label,
          minLength: min_length,
          showTipsBelow: show_tips_below,
          strongThreshold: strong_threshold,
          tips: tips,
          uncontrolled: true,
        }.compact
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
playbook_ui-9.3.0.pre.alpha.password.strength.2 app/pb_kits/playbook/pb_passphrase/passphrase.rb
playbook_ui-9.3.0.pre.alpha.password.strength.1 app/pb_kits/playbook/pb_passphrase/passphrase.rb