sn_filterable 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/components/sn_filterable/category_component.html.erb +1 -0
- data/app/components/sn_filterable/chips_component.html.erb +1 -0
- data/app/components/sn_filterable/filter_category_component.html.erb +6 -6
- data/app/components/sn_filterable/main_component.html.erb +1 -1
- data/lib/sn_filterable/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d74adc6d01abe06d37822d2cd5f5edfd7392c8a6f3740a18e9f48f4b4c0f329
|
4
|
+
data.tar.gz: f39fe686a1719b5441a1704efc5cdf5b58ef65f853869eebd2883143d8e47919
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9037df6e6b0927fa22d39fbc36ce57e9424e670cdd8fc1592ba6a4cbf26946b986ff7d57107eb15b6a47cf5fe8dd003d7165623873a3269f08396ecc84d05227
|
7
|
+
data.tar.gz: 295e52cfe405660bc79e5b297cd56fa2183bb4fbac127d167f8b810f027c9288e4ad0825f809553c290ca5faaf9ae45965a7fcb3fa4a3c1d98351bcd9afcd0a7
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<%= content_tag :fieldset,
|
2
2
|
class: "w-full text-xs lg:text-sm app-word-break dark:bg-gray-800",
|
3
3
|
"x-data": { open: @open }.to_json do %>
|
4
|
+
<legend><%= @title %></legend>
|
4
5
|
<button class="flex border-b dark:border-gray-700 justify-between w-full px-4 py-3 font-medium text-left text-gray-900 dark:text-white transition-colors hover:bg-gray-200 dark:hover:bg-gray-700 rounded-sm focus:outline-none focus-visible:ring focus-visible:ring-gray-500 dark:focus-visible:ring-gray-400 focus-visible:ring-opacity-75"
|
5
6
|
type="button"
|
6
7
|
@click="open = !open">
|
@@ -20,6 +20,7 @@
|
|
20
20
|
"@click": "$event.preventDefault(); onClick()" do %>
|
21
21
|
<span class="sr-only">Remove filter for Objects</span>
|
22
22
|
<svg class="h-2 w-2" stroke="currentColor" fill="none" viewBox="0 0 8 8">
|
23
|
+
<title>Remove filter for Objects</title>
|
23
24
|
<path stroke-linecap="round" stroke-width="1.5" d="M1 1l6 6m0-6L1 7" />
|
24
25
|
</svg>
|
25
26
|
<% end %>
|
@@ -1,11 +1,5 @@
|
|
1
1
|
<% @filter[:filters].each_with_index do |sub_filter, index| %>
|
2
2
|
<div class="relative flex items-start px-4 transition-colors hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
|
3
|
-
<div class="min-w-0 flex-1 flex-grow">
|
4
|
-
<%= content_tag :label,
|
5
|
-
sub_filter[:name],
|
6
|
-
class: "block py-2 pr-4 text-gray-600 dark:text-gray-400 select-none w-full cursor-pointer",
|
7
|
-
for: "filter-#{@filter[:filter_name]}-#{index}" %>
|
8
|
-
</div>
|
9
3
|
<div class="my-2 flex items-center">
|
10
4
|
<% if @filter[:multi] %>
|
11
5
|
<%= content_tag :input, "",
|
@@ -31,5 +25,11 @@
|
|
31
25
|
%>
|
32
26
|
<% end %>
|
33
27
|
</div>
|
28
|
+
<div class="min-w-0 flex-1 flex-grow">
|
29
|
+
<%= content_tag :label,
|
30
|
+
sub_filter[:name],
|
31
|
+
class: "block py-2 pr-4 text-gray-600 dark:text-gray-400 select-none w-full cursor-pointer",
|
32
|
+
for: "filter-#{@filter[:filter_name]}-#{index}" %>
|
33
|
+
</div>
|
34
34
|
</div>
|
35
35
|
<% end %>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<%= heroicon "x-mark", variant: :outline, options: { class: "h-6 w-6 text-grey-500 dark:text-gray-400" } %>
|
35
35
|
</button>
|
36
36
|
</div>
|
37
|
-
<div name="Filter Options" role="menu" aria-orientation="vertical" aria-
|
37
|
+
<div name="Filter Options" role="menu" aria-orientation="vertical" aria-label="options-menu" class="overflow-y-auto max-h-full">
|
38
38
|
<% @filters.each do |filter| %>
|
39
39
|
<%= render SnFilterable::CategoryComponent.new(title: filter[:title], open: @filtered.queries.dig("filter", filter.try(:[], :filter_name)).present?) do |c| %>
|
40
40
|
<% c.with_filter(filtered: @filtered, filter: filter) %>
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sn_filterable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IBM Skills Network
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-
|
10
|
+
date: 2025-03-03 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: heroicon
|
@@ -272,7 +271,6 @@ metadata:
|
|
272
271
|
homepage_uri: https://github.com/ibm-skills-network/sn_filterable
|
273
272
|
source_code_uri: https://github.com/ibm-skills-network/sn_filterable
|
274
273
|
changelog_uri: https://github.com/ibm-skills-network/sn_filterable/releases
|
275
|
-
post_install_message:
|
276
274
|
rdoc_options: []
|
277
275
|
require_paths:
|
278
276
|
- lib
|
@@ -287,8 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
287
285
|
- !ruby/object:Gem::Version
|
288
286
|
version: '0'
|
289
287
|
requirements: []
|
290
|
-
rubygems_version: 3.
|
291
|
-
signing_key:
|
288
|
+
rubygems_version: 3.6.2
|
292
289
|
specification_version: 4
|
293
290
|
summary: Skills Network - Item filtering component
|
294
291
|
test_files: []
|