hotwire_combobox 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f21dd202e0a59116a7d505c6b79df8ba287db06dfa66fd6c9159cbaad15f119d
4
- data.tar.gz: 9eb4d23df658d14948200e88ee39f9dad471a61782cde5f4132767a6c81763e1
3
+ metadata.gz: 4f868770ad8adc907437ea9d7c0f2a9550b848a1ab0ca3dddb3592aacd4ce75a
4
+ data.tar.gz: 6d1932f507fd650da412d2bacc1d6dc01faed6b8d3f2230fe9df1251b66baaf9
5
5
  SHA512:
6
- metadata.gz: 4013316a7bcbaf7080f25987c32f0f2dc4b2a38f11e8cfb62292155d626ab2bbc7d46f5116125b351eacabeb40856e50fb03335f69c95c7e09a919a0a0ed26ca
7
- data.tar.gz: 6ca62cf9479f2d6951823affeb07320e572ff02dbb34681cf3ef33dabb579103410f7ad6123ee02cd21252c2cdcbb0e06c2efb564913c52b289beaae57e1fb36
6
+ metadata.gz: 31127e0fa02f231b604b10b25f5ff514b33065814a3283ae4d6c338ab59835ef8696e19496f867bec8ddc564066a1b5af2c6c7fa1a88e88507c1943bb741f6ce
7
+ data.tar.gz: 77070143486b82fa1b0d3179e1fb74fe43300988a6a6c2c3654dc883a06d1b4b3a9e069e10d8e71f543ee72ee6a242cba42ef7e595e6ba377a530e73954a1aca
@@ -3,26 +3,28 @@ module HotwireCombobox
3
3
  class << self
4
4
  delegate :bypass_convenience_methods?, to: :HotwireCombobox
5
5
 
6
- def hw(method_name)
6
+ def hw_alias(method_name)
7
7
  unless bypass_convenience_methods?
8
8
  alias_method method_name.to_s.sub(/^hw_/, ""), method_name
9
9
  end
10
10
  end
11
11
  end
12
12
 
13
- hw def hw_combobox_style_tag(*args, **kwargs)
13
+ def hw_combobox_style_tag(*args, **kwargs)
14
14
  stylesheet_link_tag HotwireCombobox.stylesheet_path, *args, **kwargs
15
15
  end
16
+ hw_alias :hw_combobox_style_tag
16
17
 
17
- hw def hw_combobox_tag(*args, async_src: nil, options: [], render_in: {}, **kwargs)
18
+ def hw_combobox_tag(*args, async_src: nil, options: [], render_in: {}, **kwargs)
18
19
  options = hw_combobox_options options, render_in: render_in
19
20
  src = hw_uri_with_params async_src, format: :turbo_stream
20
21
  component = HotwireCombobox::Component.new self, *args, options: options, async_src: src, **kwargs
21
22
 
22
23
  render "hotwire_combobox/combobox", component: component
23
24
  end
25
+ hw_alias :hw_combobox_tag
24
26
 
25
- hw def hw_combobox_options(options, render_in: {}, display: :to_combobox_display, **methods)
27
+ def hw_combobox_options(options, render_in: {}, display: :to_combobox_display, **methods)
26
28
  if options.first.is_a? HotwireCombobox::Listbox::Option
27
29
  options
28
30
  else
@@ -35,17 +37,20 @@ module HotwireCombobox
35
37
  hw_parse_combobox_options options, **methods.merge(display: display, content: content)
36
38
  end
37
39
  end
40
+ hw_alias :hw_combobox_options
38
41
 
39
- hw def hw_paginated_combobox_options(options, for_id:, src:, next_page:, render_in: {}, **methods)
42
+ def hw_paginated_combobox_options(options, for_id:, src:, next_page:, render_in: {}, **methods)
40
43
  this_page = render("hotwire_combobox/paginated_options", for_id: for_id, options: hw_combobox_options(options, render_in: render_in, **methods), format: :turbo_stream)
41
44
  next_page = render("hotwire_combobox/next_page", src: src, next_page: next_page, format: :turbo_stream)
42
45
 
43
46
  safe_join [ this_page, next_page ]
44
47
  end
48
+ hw_alias :hw_paginated_combobox_options
45
49
 
46
- hw def hw_listbox_options_id(id)
50
+ def hw_listbox_options_id(id)
47
51
  "#{id}-hw-listbox__options"
48
52
  end
53
+ hw_alias :hw_listbox_options_id
49
54
 
50
55
  private
51
56
  def hw_uri_with_params(url_or_path, **params)
@@ -21,7 +21,6 @@ class HotwireCombobox::Listbox::Option
21
21
  id: id,
22
22
  role: :option,
23
23
  class: "hw-combobox__option",
24
- tabindex: 0,
25
24
  data: data
26
25
  }
27
26
  end
@@ -1,3 +1,3 @@
1
1
  module HotwireCombobox
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotwire_combobox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Farias