anchor_view_components 0.3.0 → 0.4.1

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: c15f2899d93f4759d405a23597df14d1a6835a29d9ffa74064d91d9e01ef484c
4
- data.tar.gz: 6c4e9dacecc0017a83e2d990d4986edbd71e64c1ff910bca251bba8f4efce11a
3
+ metadata.gz: d553531d55d9f15ab1a3ed167894bfad2efff9863884e8fc8828d7c9cd5e284f
4
+ data.tar.gz: d247a85f665563f4ed7f0d15b19e7a4313e781845956d6771b9772080641d219
5
5
  SHA512:
6
- metadata.gz: 33d141efd9f61897daa5a13726e5daee08e104da433a05ae2f7d5871f5a8e9638930a862d49f5800badca7cc46e0bcf272f22e2b3d0170e03c67ddf164cc0582
7
- data.tar.gz: bba7a3f69df667e9e6e0259ff48f6695e11b0fca4483d47e6b9fb0f7ce0e1d6b5bed69b470691cc847334e44d941a263cc375aefa549b44eed4e01b1d7d7c613
6
+ metadata.gz: a271b41c7b9b95063771546b69c5721d90a00ee2eec551675e6c31f5e31427dca1b241cf7a626e29f92ba41248c3d967faec089746bd88c845d0a94018d1e7c8
7
+ data.tar.gz: bbee7c605b4575cc1cde9e6b40c3837283813737c5b6c43ef150d0e06fe58d3425834c4437228ad843b24c96b2dede580cf09aaabc900c57a076a6bb9211cbc3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.1 - 2023-08-01
4
+
5
+ ### Fixed
6
+
7
+ - Removed a trailing comma causing a syntax error
8
+
9
+ ## 0.4.0 - 2023-08-01
10
+
11
+ ### Added
12
+
13
+ - Autocomplete and Loading Indicator now allow more data attributes to be
14
+ passed in
15
+
3
16
  ## 0.3.0 - 2023-07-31
4
17
 
5
18
  ### Added
@@ -1,6 +1,6 @@
1
- <div
2
- data-controller="autocomplete"
3
- data-autocomplete-url-value="<%= src %>"
1
+ <div
2
+ data-controller="autocomplete"
3
+ data-autocomplete-url-value="<%= src %>"
4
4
  role="combobox"
5
5
  class="group relative"
6
6
  >
@@ -22,11 +22,15 @@
22
22
  data: { autocomplete_target: "hidden" }
23
23
  }) %>
24
24
  </div>
25
- <ul
26
- data-autocomplete-target="results"
27
- class="<%= list_box_classes %> group-data-[empty='true']:hidden group-data-[loading='true']:hidden [&>li]:py-2 [&>li]:px-3 [&>li]:cursor-pointer [&>[aria-selected='true']]:bg-blue-20"
28
- >
29
- </ul>
25
+ <%= tag.ul(
26
+ class: class_names(
27
+ list_box_classes,
28
+ "group-data-[empty='true']:hidden group-data-[loading='true']:hidden [&>li]:py-2 [&>li]:px-3 [&>li]:cursor-pointer [&>[aria-selected='true']]:bg-blue-20",
29
+ ),
30
+ data: {
31
+ autocomplete_target: "results",
32
+ }.merge(list_data),
33
+ ) %>
30
34
  <div class="<%= list_box_classes %> text-center text-gray-500 hidden group-aria-[expanded][data-empty='true'][data-loading='false']:block">
31
35
  <%= t(".no_options") %>
32
36
  </div>
@@ -20,12 +20,14 @@ module Anchor
20
20
  name:,
21
21
  src:,
22
22
  readonly: false,
23
- input_data: {}
23
+ input_data: {},
24
+ list_data: {}
24
25
  )
25
26
  @form_builder = form_builder
26
27
  @name = name
27
28
  @readonly = readonly
28
29
  @input_data = input_data
30
+ @list_data = list_data
29
31
  @src = src
30
32
 
31
33
  super
@@ -37,6 +39,6 @@ module Anchor
37
39
 
38
40
  private
39
41
 
40
- attr_reader :form_builder, :name, :readonly, :input_data, :src
42
+ attr_reader :form_builder, :name, :readonly, :input_data, :list_data, :src
41
43
  end
42
44
  end
@@ -16,6 +16,6 @@ module Anchor
16
16
 
17
17
  private
18
18
 
19
- attr_reader :classes
19
+ attr_reader :classes, :data
20
20
  end
21
21
  end
@@ -2,5 +2,6 @@
2
2
  class: class_names(
3
3
  "inline-block animate-spin border-grey-100 border-b-transparent rounded-full",
4
4
  variant
5
- )
5
+ ),
6
+ data: data,
6
7
  ) %>
@@ -1,5 +1,5 @@
1
1
  module Anchor
2
2
  module ViewComponents
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anchor_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Buoy Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-31 00:00:00.000000000 Z
11
+ date: 2023-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inline_svg