refine-rails 2.11.2 → 2.11.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec12ae81254832b4944ed63912029ae7e3b72bd6a148099165639d9722ccffce
4
- data.tar.gz: bd7502535b6c4e135047a9c575d7ae3897943dec9492ff846b466cb0acf28b67
3
+ metadata.gz: da49445eb684d8187ebe0ba05aa919d6293ec55e63e7df2dad3e58051712e901
4
+ data.tar.gz: d732551892233793e9cf3fbba13143b59698fb27a4029c8635a9202e2ca9b5b2
5
5
  SHA512:
6
- metadata.gz: 3463b960fb9f18706ac6bac468f17cb6f82c2a3cebe1f5faf9c99cb6f56afb4f42bd63738d07d57541755e0f675f8863b718d9ba2d22620d3aa6ce9aa6609ed9
7
- data.tar.gz: 2cecf6e61f615e5fbba835545a2e5d5963c4b992233ba4fa194fc4e0e9ce9618520aff2a016225197eaf54c7b1d1385a229449126a20725eb8d943c70ec8d65c
6
+ metadata.gz: b46d8c7809b3c0fa10a1122b2ff16b81e4fdbf36100a426a822c928eccb3d30d6c75b7a073abee80c46a9345b960cf04936cb59d0e77e4373df4484371a17fd4
7
+ data.tar.gz: cb90e961a890efaa351999f60279380ebc51f7bd7e28bd9856f19856b074c0c8b7a39a06e405f70be95525426af76adb6f0f98d57332b5c72469b65160e9e8b9
@@ -1219,7 +1219,14 @@
1219
1219
  }
1220
1220
 
1221
1221
  .refine--groups-wrapper {
1222
- flex-grow: 1;
1222
+ display: flex;
1223
+ gap: 10px;
1224
+ row-gap: 15px;
1225
+ align-items: center;
1226
+ flex-wrap: wrap;
1227
+ }
1228
+
1229
+ .refine--or-group {
1223
1230
  display: flex;
1224
1231
  gap: 10px;
1225
1232
  row-gap: 15px;
@@ -1234,6 +1241,13 @@
1234
1241
  align-items: center;
1235
1242
  }
1236
1243
 
1244
+ @media (max-width: 960px) {
1245
+ .refine--filter-control-group {
1246
+ justify-content: end;
1247
+ width: 25%;
1248
+ }
1249
+ }
1250
+
1237
1251
  .refine--group-join, .refine--condition-join {
1238
1252
  position: relative;
1239
1253
  padding: 5px 0;
@@ -1246,6 +1260,11 @@
1246
1260
  }
1247
1261
  }
1248
1262
 
1263
+ .refine--group-join-stack {
1264
+ width: 100%;
1265
+ text-align: left;
1266
+ }
1267
+
1249
1268
  .refine--group {
1250
1269
  display: flex;
1251
1270
  gap: 10px;
@@ -398,7 +398,14 @@
398
398
  }
399
399
 
400
400
  .refine--groups-wrapper {
401
- flex-grow: 1;
401
+ display: flex;
402
+ gap: 10px;
403
+ row-gap: 15px;
404
+ align-items: center;
405
+ flex-wrap: wrap;
406
+ }
407
+
408
+ .refine--or-group {
402
409
  display: flex;
403
410
  gap: 10px;
404
411
  row-gap: 15px;
@@ -413,6 +420,13 @@
413
420
  align-items: center;
414
421
  }
415
422
 
423
+ @media (max-width: 960px) {
424
+ .refine--filter-control-group {
425
+ justify-content: end;
426
+ width: 25%;
427
+ }
428
+ }
429
+
416
430
  .refine--group-join, .refine--condition-join {
417
431
  position: relative;
418
432
  padding: 5px 0;
@@ -425,6 +439,11 @@
425
439
  }
426
440
  }
427
441
 
442
+ .refine--group-join-stack {
443
+ width: 100%;
444
+ text-align: left;
445
+ }
446
+
428
447
  .refine--group {
429
448
  display: flex;
430
449
  gap: 10px;
@@ -1,4 +1,12 @@
1
+ <% render_stack ||= false %>
2
+
3
+ <% if render_stack %>
4
+ <div class="refine--or-group">
5
+ <% end %>
1
6
  <% group.each.with_index do |criterion, i| %>
2
7
  <%= render "refine/inline/filters/criterion", criterion: criterion, placement: i, size: group.length %>
3
8
  <% end %>
4
9
  <%= render "refine/inline/filters/and_button", position: group.last.position + 1, show_label: (group_count < 2 && condition_count < 2) %>
10
+ <% if render_stack %>
11
+ </div>
12
+ <% end %>
@@ -3,6 +3,7 @@
3
3
 
4
4
  root_data = (defined?(data) && data) || {}
5
5
 
6
+ render_stack = defined?(render_stack) ? render_stack : false
6
7
  main_row_class = class_names "refine--filter-row" => true,
7
8
  "refine--has-many-groups" => groups.many?
8
9
  %>
@@ -15,12 +16,18 @@
15
16
  <div class="refine--groups-wrapper">
16
17
  <% groups.each.with_index do |group, i| %>
17
18
  <% unless i == 0 %>
18
- <div class="refine--group-join"><%= t("refine.inline.filters.or") %></div>
19
+ <% if render_stack %>
20
+ <div class="refine--group-join-stack">
19
21
  <% end %>
20
- <%= render "refine/inline/filters/group", group: group, group_count: groups.count, condition_count: group.count %>
21
- <% if i == groups.length - 1 %>
22
- <%= render "refine/inline/filters/or_button", position: @refine_filter.blueprint.length %>
22
+ <div class="refine--group-join"><%= t("refine.inline.filters.or") %></div>
23
+ <% if render_stack %>
24
+ </div>
23
25
  <% end %>
26
+ <% end %>
27
+ <%= render "refine/inline/filters/group", group: group, group_count: groups.count, condition_count: group.count, render_stack: render_stack %>
28
+ <% if i == groups.length - 1 %>
29
+ <%= render "refine/inline/filters/or_button", position: @refine_filter.blueprint.length %>
30
+ <% end %>
24
31
  <% end %>
25
32
 
26
33
  </div>
@@ -1,5 +1,5 @@
1
1
  module Refine
2
2
  module Rails
3
- VERSION = "2.11.2"
3
+ VERSION = "2.11.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refine-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.2
4
+ version: 2.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colleen Schnettler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-09-10 00:00:00.000000000 Z
12
+ date: 2024-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails