Sha256: fa0de172c9382b0123e0251b7dbce797553f85abcfc7604fd1a10ac811d8fed0

Contents?: true

Size: 859 Bytes

Versions: 931

Compression:

Stored size: 859 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module Cursor
    def self.included(base)
      base.prop :cursor
    end

    def cursor_props
      selected_props = cursor_options.keys.select { |sk| try(sk) }
      return nil unless selected_props.present?

      selected_props.map do |k|
        cursor_value = send(k)
        "cursor_#{cursor_value.underscore}" if cursor_values.include? cursor_value
      end.compact.join(" ")
    end

    def cursor_options
      {
        cursor: "cursor",
      }
    end

    def cursor_values
      %w[auto default none contextMenu help pointer progress wait cell crosshair text verticalText alias copy move noDrop notAllowed grab grabbing eResize nResize neResize nwResize sResize seResize swResize wResize ewResize nsResize neswResize nwseResize colResize rowResize allScroll zoomIn zoomOut]
    end
  end
end

Version data entries

931 entries across 931 versions & 1 rubygems

Version Path
playbook_ui-14.12.0.pre.alpha.play1790darkaudittable5802 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.play1752updatecontenttag5801 lib/playbook/cursor.rb
playbook_ui-14.13.0.pre.rc.6 lib/playbook/cursor.rb
playbook_ui-14.13.0.pre.rc.5 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobug5781 lib/playbook/cursor.rb
playbook_ui-14.13.0.pre.rc.4 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.playrailsinputmaskissue5775 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5757 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5754 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobugzindextoken5751 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5738 lib/playbook/cursor.rb
playbook_ui-14.13.0.pre.rc.3 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.PLAY1865reactdatepickerreinitializingbug5732 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5728 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.play1862buttondisabledlinkbug5716 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.play1862buttondisabledlinkbug5714 lib/playbook/cursor.rb
playbook_ui-14.13.0.pre.rc.2 lib/playbook/cursor.rb
playbook_ui-14.13.0.pre.rc.1 lib/playbook/cursor.rb
playbook_ui-14.13.0.pre.rc.0 lib/playbook/cursor.rb
playbook_ui-14.12.0.pre.alpha.advancedtablealignmentfixes5693 lib/playbook/cursor.rb