refine-rails 2.11.1 → 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: 067afd99260828f8192b8ce127189aa5c0cab8514529f4ccab9215317ad059fc
4
- data.tar.gz: c147b239f2a4d0842dfc2d2dfd5a401373cbcf79e2612466d97110013084ea6c
3
+ metadata.gz: da49445eb684d8187ebe0ba05aa919d6293ec55e63e7df2dad3e58051712e901
4
+ data.tar.gz: d732551892233793e9cf3fbba13143b59698fb27a4029c8635a9202e2ca9b5b2
5
5
  SHA512:
6
- metadata.gz: c06cf0c4e004a1155377ce81786d404b764ada2bd1b9cac9d080f9575cb0c6e874b9fbcd58a7a220f3f8d2eadbfe9311a412d8d52a50bb148a45065824aa2417
7
- data.tar.gz: 4296eb537929877a63fd60e7cb4907db7b5ad62a842ee3e186bb6a04708d84172c828e902bb7738de177e2fe0d4fbc6247650b7b17d11988334bf0f83ca03c57
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;
@@ -1229,7 +1236,16 @@
1229
1236
 
1230
1237
  .refine--filter-control-group {
1231
1238
  text-wrap: nowrap;
1239
+ flex-wrap: wrap;
1232
1240
  display: flex;
1241
+ align-items: center;
1242
+ }
1243
+
1244
+ @media (max-width: 960px) {
1245
+ .refine--filter-control-group {
1246
+ justify-content: end;
1247
+ width: 25%;
1248
+ }
1233
1249
  }
1234
1250
 
1235
1251
  .refine--group-join, .refine--condition-join {
@@ -1244,6 +1260,11 @@
1244
1260
  }
1245
1261
  }
1246
1262
 
1263
+ .refine--group-join-stack {
1264
+ width: 100%;
1265
+ text-align: left;
1266
+ }
1267
+
1247
1268
  .refine--group {
1248
1269
  display: flex;
1249
1270
  gap: 10px;
@@ -1320,67 +1341,27 @@
1320
1341
  position: relative;
1321
1342
  }
1322
1343
 
1323
- .refine--condition-pill-start {
1324
- padding: 0 0 0 10px;
1325
- &:before {
1326
- content: "";
1327
- position: absolute;
1328
- left: -10px;
1329
- top: -2px;
1330
- bottom: -2px;
1331
- border: 2px solid #eee;
1332
- width: 3px;
1333
- }
1334
- &:hover {
1335
- &:before{
1336
- border-color: #aaa;
1337
- }
1338
- }
1339
- &:before {
1340
- border-radius: 6px 0 0 6px;
1341
- left: 0;
1342
- border-right: none;
1343
- }
1344
- }
1345
-
1346
- .refine--condition-pill-end {
1347
- padding: 0 10px 0 0;
1348
- &:after {
1349
- content: "";
1350
- position: absolute;
1351
- right: -10px;
1352
- top: -6px;
1353
- bottom: -6px;
1354
- border: 2px solid #eee;
1355
- width: 3px;
1356
- }
1357
- &:hover {
1358
- &:after {
1359
- border-color: #aaa;
1360
- }
1361
- }
1362
- &:after {
1363
- border-radius: 0 6px 6px 0;
1364
- border-left: none;
1365
- }
1366
- }
1367
-
1368
1344
  .refine--condition-pill {
1369
- background-color: #fff;
1370
- border: 1px solid #bbb;
1371
- border-bottom-color: #999;
1372
- box-shadow: 0 1px 1px rgba(0,0,0,0.1);
1345
+ display: flex;
1346
+ align-items: center;
1347
+ background-color: #F2F4F7;
1348
+ border: 1px solid #EBEBEB;
1373
1349
  border-radius: 6px;
1374
1350
  font-size: 14px;
1375
1351
  cursor: pointer;
1376
1352
  position: relative;
1377
1353
  white-space: nowrap;
1354
+ padding: 4px 8px;
1378
1355
  &:hover {
1379
- border-color: #999;
1356
+ border-color: #D1D5DB;
1357
+ background-color: #E5E7EB;
1380
1358
  .refine--remove-condition {
1381
1359
  display: block;
1382
1360
  }
1383
1361
  }
1362
+ &:active {
1363
+ border-color: #E5E7EB;
1364
+ }
1384
1365
  &:not(:hover){
1385
1366
  .refine--condition-value-wrapper {
1386
1367
  display: none;
@@ -1388,6 +1369,10 @@
1388
1369
  }
1389
1370
  }
1390
1371
 
1372
+ .refine--condition-pill-button {
1373
+ display: flex;
1374
+ }
1375
+
1391
1376
  .refine--filter-condition {
1392
1377
  display: flex;
1393
1378
  align-items: center;
@@ -1398,30 +1383,22 @@
1398
1383
  padding: 4px;
1399
1384
  }
1400
1385
 
1401
- .refine--condition-pill-name {
1402
- padding: 4px 8px;
1403
- display: block;
1404
- }
1405
-
1406
1386
  .refine--remove-condition {
1407
1387
  display: none;
1408
- border: 2px solid #fff;
1409
- padding: 6px 4px;
1388
+ color: #fff;
1389
+ padding: 0px 2px 0px 2px;
1410
1390
  border-radius: 50%;
1411
1391
  position: absolute;
1412
1392
  top: -8px;
1413
1393
  right:-8px;
1414
- background-color: #aaa;
1394
+ background-color: #ee3f3f;
1415
1395
  z-index: 999;
1416
- &:hover {
1417
- background-color: #ee3f3f;
1418
- }
1419
- &:before {
1420
- display: block;
1421
- content: "";
1422
- width: 6px;
1423
- height: 2px;
1424
- background-color: #fff;
1396
+ line-height: 1;
1397
+ border: 1.5px solid #fff;
1398
+ .material-icons-outlined.refine--icon-sm,
1399
+ .material-icons.refine--icon-sm,
1400
+ .icon.refine--icon-sm {
1401
+ padding: 2px 0 ;
1425
1402
  }
1426
1403
  }
1427
1404
 
@@ -1452,8 +1429,18 @@
1452
1429
  animation-fill-mode: both;
1453
1430
  }
1454
1431
 
1455
- .refine--condition-value-clause {
1456
- color: rgba(255,255,255,0.7);
1432
+ .refine--condition-value-clause, .refine--condition-value-self {
1433
+ padding-left: 4px;
1434
+ }
1435
+
1436
+ .refine--condition-pill-name, .refine--condition-value-self {
1437
+ font-weight: 600;
1438
+ }
1439
+
1440
+ .refine--condition-value-self {
1441
+ max-width: 150px;
1442
+ text-overflow: ellipsis;
1443
+ overflow: hidden;
1457
1444
  }
1458
1445
 
1459
1446
  /* Form widgets */
@@ -1699,41 +1686,36 @@ input.refine--text-condition-input:focus {
1699
1686
  color: #767676;
1700
1687
  }
1701
1688
 
1702
- .refine--add-condition-button.refine--add-first-condition-button,
1703
- .refine--add-condition-group-button.refine--add-first-condition-button {
1704
- border: 1px dotted #aaa;
1705
- padding-right: 8px;
1706
- line-height: 16px;
1707
- &:hover {
1708
- background-color: #fff;
1709
- border-style: solid;
1710
- color: #111;
1711
- }
1712
- }
1713
-
1714
1689
  .refine--add-condition-button, .refine--add-group-button {
1715
1690
  display: flex;
1716
1691
  gap: 5px;
1717
1692
  color: #767676;
1718
1693
  font-size: 14px;
1719
1694
  border-radius: 6px;
1720
- padding: 5px;
1721
1695
  align-items: center;
1722
- background-color: #fff;
1696
+ background-color: #F2F4F7;
1697
+ border: 1px solid #EBEBEB;
1698
+ cursor: pointer;
1723
1699
  position: relative;
1700
+ white-space: nowrap;
1701
+ padding: 4px 8px;
1702
+ font-weight: 600;
1703
+ &:hover {
1704
+ border-color: #D1D5DB;
1705
+ background-color: #E5E7EB;
1706
+ }
1707
+ &:active {
1708
+ border-color: #E5E7EB;
1709
+ }
1724
1710
  &:disabled {
1725
- color: #111;
1726
- background-color: #f8f8f8;
1711
+ opacity: 0.5;
1727
1712
  cursor: not-allowed;
1728
1713
  }
1729
- &:not([disabled]):hover {
1730
- color: #111;
1731
- background-color: #f8f8f8;
1732
- }
1733
1714
  }
1734
1715
 
1735
- .refine--add-group-button {
1736
- margin-left: 10px;
1716
+ .refine--add-group-wrapper {
1717
+ padding-left: 10px;
1718
+ border-left: 1px solid #E5E7EB;
1737
1719
  }
1738
1720
 
1739
1721
  .refine--has-many-groups .refine--add-button-label {
@@ -1857,7 +1839,9 @@ button.refine--apply-button {
1857
1839
  }
1858
1840
 
1859
1841
  .refine--save-filter-link-label, .refine--clear-filter-link-label {
1860
- border-bottom: 1px dotted #111;
1842
+ &:hover {
1843
+ border-bottom: 1px dotted #111;
1844
+ }
1861
1845
  }
1862
1846
 
1863
1847
  .refine--save-filter-input-wrapper {
@@ -1895,6 +1879,10 @@ input.refine--save-filter-input {
1895
1879
  z-index: 9999;
1896
1880
  }
1897
1881
 
1882
+ .refine--save-filter-form {
1883
+ margin-left: 8px;
1884
+ }
1885
+
1898
1886
  .refine--hotkey {
1899
1887
  border-radius: 4px;
1900
1888
  background-color: rgba(255,255,255,.3);
@@ -1914,6 +1902,7 @@ input.refine--save-filter-input {
1914
1902
  .material-icons.refine--icon-sm,
1915
1903
  .icon.refine--icon-sm {
1916
1904
  font-size: 14px;
1905
+ padding: 3px 0;
1917
1906
  }
1918
1907
 
1919
1908
  .refine--search-box {
@@ -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;
@@ -408,7 +415,16 @@
408
415
 
409
416
  .refine--filter-control-group {
410
417
  text-wrap: nowrap;
418
+ flex-wrap: wrap;
411
419
  display: flex;
420
+ align-items: center;
421
+ }
422
+
423
+ @media (max-width: 960px) {
424
+ .refine--filter-control-group {
425
+ justify-content: end;
426
+ width: 25%;
427
+ }
412
428
  }
413
429
 
414
430
  .refine--group-join, .refine--condition-join {
@@ -423,6 +439,11 @@
423
439
  }
424
440
  }
425
441
 
442
+ .refine--group-join-stack {
443
+ width: 100%;
444
+ text-align: left;
445
+ }
446
+
426
447
  .refine--group {
427
448
  display: flex;
428
449
  gap: 10px;
@@ -500,68 +521,27 @@
500
521
  position: relative;
501
522
  }
502
523
 
503
- .refine--condition-pill-start {
504
- padding: 0 0 0 10px;
505
- &:before {
506
- content: "";
507
- position: absolute;
508
- left: -10px;
509
- top: -2px;
510
- bottom: -2px;
511
- border: 2px solid #eee;
512
- width: 3px;
513
- }
514
- &:hover {
515
- &:before{
516
- border-color: #aaa;
517
- }
518
- }
519
- &:before {
520
- border-radius: 6px 0 0 6px;
521
- left: 0;
522
- border-right: none;
523
- }
524
-
525
- }
526
-
527
- .refine--condition-pill-end {
528
- padding: 0 10px 0 0;
529
- &:after {
530
- content: "";
531
- position: absolute;
532
- right: -10px;
533
- top: -6px;
534
- bottom: -6px;
535
- border: 2px solid #eee;
536
- width: 3px;
537
- }
538
- &:hover {
539
- &:after {
540
- border-color: #aaa;
541
- }
542
- }
543
- &:after {
544
- border-radius: 0 6px 6px 0;
545
- border-left: none;
546
- }
547
- }
548
-
549
524
  .refine--condition-pill {
550
- background-color: #fff;
551
- border: 1px solid #bbb;
552
- border-bottom-color: #999;
553
- box-shadow: 0 1px 1px rgba(0,0,0,0.1);
525
+ display: flex;
526
+ align-items: center;
527
+ background-color: #F2F4F7;
528
+ border: 1px solid #EBEBEB;
554
529
  border-radius: 6px;
555
530
  font-size: 14px;
556
531
  cursor: pointer;
557
532
  position: relative;
558
533
  white-space: nowrap;
534
+ padding: 4px 8px;
559
535
  &:hover {
560
- border-color: #999;
536
+ border-color: #D1D5DB;
537
+ background-color: #E5E7EB;
561
538
  .refine--remove-condition {
562
539
  display: block;
563
540
  }
564
541
  }
542
+ &:active {
543
+ border-color: #E5E7EB;
544
+ }
565
545
  &:not(:hover){
566
546
  .refine--condition-value-wrapper {
567
547
  display: none;
@@ -569,6 +549,10 @@
569
549
  }
570
550
  }
571
551
 
552
+ .refine--condition-pill-button {
553
+ display: flex;
554
+ }
555
+
572
556
  .refine--filter-condition {
573
557
  display: flex;
574
558
  align-items: center;
@@ -579,31 +563,24 @@
579
563
  padding: 4px;
580
564
  }
581
565
 
582
- .refine--condition-pill-name {
583
- padding: 4px 8px;
584
- display: block;
585
- }
586
-
587
566
  .refine--remove-condition {
588
567
  display: none;
589
- border: 2px solid #fff;
590
- padding: 6px 4px;
568
+ color: #fff;
569
+ padding: 0px 2px 0px 2px;
591
570
  border-radius: 50%;
592
571
  position: absolute;
593
572
  top: -8px;
594
573
  right:-8px;
595
- background-color: #aaa;
574
+ background-color: #ee3f3f;
596
575
  z-index: 999;
597
- &:hover {
598
- background-color: #ee3f3f;
599
- }
600
- &:before {
601
- display: block;
602
- content: "";
603
- width: 6px;
604
- height: 2px;
605
- background-color: #fff;
576
+ line-height: 1;
577
+ border: 1.5px solid #fff;
578
+ .material-icons-outlined.refine--icon-sm,
579
+ .material-icons.refine--icon-sm,
580
+ .icon.refine--icon-sm {
581
+ padding: 2px 0 ;
606
582
  }
583
+
607
584
  }
608
585
  &:hover {
609
586
  border-color: #999;
@@ -630,8 +607,18 @@
630
607
  animation-fill-mode: both;
631
608
  }
632
609
 
633
- .refine--condition-value-clause {
634
- color: rgba(255,255,255,0.7);
610
+ .refine--condition-value-clause, .refine--condition-value-self {
611
+ padding-left: 4px;
612
+ }
613
+
614
+ .refine--condition-pill-name, .refine--condition-value-self {
615
+ font-weight: 600;
616
+ }
617
+
618
+ .refine--condition-value-self {
619
+ max-width: 150px;
620
+ text-overflow: ellipsis;
621
+ overflow: hidden;
635
622
  }
636
623
 
637
624
  /* Form widgets */
@@ -870,42 +857,36 @@ input.refine--text-condition-input:focus {
870
857
  color: #767676;
871
858
  }
872
859
 
873
-
874
- .refine--add-condition-button.refine--add-first-condition-button,
875
- .refine--add-condition-group-button.refine--add-first-condition-button {
876
- border: 1px dotted #aaa;
877
- padding-right: 8px;
878
- line-height: 16px;
879
- &:hover {
880
- background-color: #fff;
881
- border-style: solid;
882
- color: #111;
883
- }
884
- }
885
-
886
860
  .refine--add-condition-button, .refine--add-group-button {
887
861
  display: flex;
888
862
  gap: 5px;
889
863
  color: #767676;
890
864
  font-size: 14px;
891
865
  border-radius: 6px;
892
- padding: 5px;
893
866
  align-items: center;
894
- background-color: #fff;
867
+ background-color: #F2F4F7;
868
+ border: 1px solid #EBEBEB;
869
+ cursor: pointer;
895
870
  position: relative;
871
+ white-space: nowrap;
872
+ padding: 4px 8px;
873
+ font-weight: 600;
874
+ &:hover {
875
+ border-color: #D1D5DB;
876
+ background-color: #E5E7EB;
877
+ }
878
+ &:active {
879
+ border-color: #E5E7EB;
880
+ }
896
881
  &:disabled {
897
- color: #111;
898
- background-color: #f8f8f8;
882
+ opacity: 0.5;
899
883
  cursor: not-allowed;
900
884
  }
901
- &:not([disabled]):hover {
902
- color: #111;
903
- background-color: #f8f8f8;
904
- }
905
885
  }
906
886
 
907
- .refine--add-group-button {
908
- margin-left: 10px;
887
+ .refine--add-group-wrapper {
888
+ padding-left: 10px;
889
+ border-left: 1px solid #E5E7EB;
909
890
  }
910
891
 
911
892
  .refine--has-many-groups .refine--add-button-label {
@@ -1023,7 +1004,9 @@ button.refine--apply-button {
1023
1004
  }
1024
1005
 
1025
1006
  .refine--save-filter-link-label, .refine--clear-filter-link-label {
1026
- border-bottom: 1px dotted #111;
1007
+ &:hover {
1008
+ border-bottom: 1px dotted #111;
1009
+ }
1027
1010
  }
1028
1011
  .refine--save-filter-input-wrapper {
1029
1012
  display: flex;
@@ -1060,6 +1043,10 @@ input.refine--save-filter-input {
1060
1043
  z-index: 9999;
1061
1044
  }
1062
1045
 
1046
+ .refine--save-filter-form {
1047
+ margin-left: 8px;
1048
+ }
1049
+
1063
1050
  .refine--hotkey {
1064
1051
  border-radius: 4px;
1065
1052
  background-color: rgba(255,255,255,.3);
@@ -1079,6 +1066,7 @@ input.refine--save-filter-input {
1079
1066
  .material-icons.refine--icon-sm,
1080
1067
  .icon.refine--icon-sm {
1081
1068
  font-size: 14px;
1069
+ padding: 3px 0;
1082
1070
  }
1083
1071
 
1084
1072
  .refine--search-box {
@@ -13,7 +13,7 @@
13
13
  src: refine_inline_criteria_path(criterion.to_params) do
14
14
  %>
15
15
  <button class="refine--add-condition-button refine--add-first-condition-button" href="#" data-action="click->refine--popup#show" type="button">
16
- <span class="icon material-icons-outlined refine--icon-sm">add</span>
17
16
  <span><%= t(".filter") %></span>
17
+ <span class="icon material-icons-outlined refine--icon-sm">add</span>
18
18
  </button>
19
19
  <% end %>
@@ -10,8 +10,10 @@
10
10
 
11
11
  <% if @refine_filter.criteria_limit_reached? %>
12
12
  <button disabled class="refine--add-condition-button refine--group-last-item refine--condition-pill-end" type="button" title="<%= t(".criteria_limit", criteria_limit: @refine_filter.criteria_limit) %>">
13
+ <% if show_label %>
14
+ <span class="refine--add-button-label"><%= t("refine.inline.filters.and_button.condition") %></span>
15
+ <% end %>
13
16
  <span class="icon material-icons-outlined refine--icon-sm">add</span>
14
- <span class="refine--add-button-label"><%= t("refine.inline.filters.and_button.condition") %></span>
15
17
  </button>
16
18
  <% else %>
17
19
  <%= render "refine/inline/filters/popup",
@@ -19,8 +21,10 @@
19
21
  src: refine_inline_criteria_path(criterion.to_params) do
20
22
  %>
21
23
  <button class="refine--add-condition-button refine--group-last-item refine--condition-pill-end" type="button" data-action="click->refine--popup#show">
24
+ <% if show_label %>
25
+ <span class="refine--add-button-label"><%= t("refine.inline.filters.and_button.condition") %></span>
26
+ <% end %>
22
27
  <span class="icon material-icons-outlined refine--icon-sm">add</span>
23
- <span class="refine--add-button-label"><%= t("refine.inline.filters.and_button.condition") %></span>
24
28
  </button>
25
29
  <% end %>
26
30
  <% end %>
@@ -1,26 +1,21 @@
1
1
  <%# Filter Pill partial %>
2
- <%
3
- pill_class = if placement == 0
4
- "refine--condition-pill-start"
5
- end
6
- %>
7
2
 
8
3
  <%= render "refine/inline/filters/popup",
9
4
  frame_id: dom_id(criterion) do
10
5
  %>
11
6
 
12
- <div class="refine--condition-pill-wrapper <%= pill_class %>">
7
+ <div class="refine--condition-pill-wrapper">
13
8
  <div class="refine--condition-pill">
14
- <%= link_to criterion.condition_display, edit_refine_inline_criterion_path(criterion.position, criterion.to_params), class: "refine--condition-pill-name", data: {controller: "refine--turbo-stream-link", action: "refine--turbo-stream-link#visit"} %>
15
- <div class="refine--remove-condition"></div>
16
9
  <%= link_to refine_inline_criterion_path(criterion.position, criterion.to_params), class: "refine--remove-condition", data: {turbo_method: :delete, controller: "refine--turbo-stream-link", action: "refine--turbo-stream-link#visit"} do %>
10
+ <span class="material-icons-outlined refine--icon-sm">clear</span>
11
+ <% end %>
12
+ <%= link_to edit_refine_inline_criterion_path(criterion.position, criterion.to_params), class:"refine--condition-pill-button", data: {controller: "refine--turbo-stream-link", action: "refine--turbo-stream-link#visit"} do %>
13
+ <div class="refine--condition-pill-name"><%= criterion.condition_display %></div>
14
+ <div class="refine--condition-value-clause"><%= criterion.clause_display %></div>
15
+ <div class="refine--condition-value-self" title="<%= criterion.human_readable_value %>">
16
+ <%= criterion.human_readable_value %>
17
+ </div>
17
18
  <% end %>
18
- <div class="refine--condition-value-wrapper">
19
- <div class="refine--condition-value-clause"><%= criterion.clause_display %></div>
20
- <div class="refine--condition-value-self">
21
- <div><%= criterion.human_readable_value.truncate(64) %></div>
22
- </div>
23
- </div>
24
19
  </div>
25
20
  </div>
26
21
 
@@ -1,7 +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
- <% unless i == 0 %>
3
- <div class="refine--condition-join"><%= t(".and") %></div>
4
- <% end %>
5
7
  <%= render "refine/inline/filters/criterion", criterion: criterion, placement: i, size: group.length %>
6
8
  <% end %>
7
- <%= render "refine/inline/filters/and_button", position: group.last.position + 1 %>
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 %>
@@ -9,18 +9,20 @@
9
9
  %>
10
10
 
11
11
  <% if @refine_filter.criteria_limit_reached? %>
12
- <button disabled class="refine--add-group-button" type="button" title="<%= t(".criteria_limit", criteria_limit: @refine_filter.criteria_limit) %>">
13
- <span class="icon material-icons-outlined refine--icon-sm">add</span>
14
- <span class="refine--add-group-button-label"><%= t(".group") %></span>
15
- </button>
12
+ <div class="refine--add-group-wrapper">
13
+ <button disabled class="refine--add-group-button" type="button" title="<%= t(".criteria_limit", criteria_limit: @refine_filter.criteria_limit) %>">
14
+ <span class="refine--add-group-button-label"><%= t(".group") %></span>
15
+ </button>
16
+ </div>
16
17
  <% else %>
17
18
  <%= render "refine/inline/filters/popup",
18
19
  frame_id: dom_id(criterion),
19
20
  src: refine_inline_criteria_path(criterion.to_params) do
20
21
  %>
21
- <button class="refine--add-group-button" type="button" data-action="click->refine--popup#show">
22
- <span class="icon material-icons-outlined refine--icon-sm">add</span>
23
- <span class="refine--add-group-button-label"><%= t(".group") %></span>
24
- </button>
22
+ <div class="refine--add-group-wrapper">
23
+ <button class="refine--add-group-button" type="button" data-action="click->refine--popup#show">
24
+ <span class="refine--add-group-button-label"><%= t(".group") %></span>
25
+ </button>
26
+ </div>
25
27
  <% end %>
26
28
  <% 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 %>
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.1"
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.1
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-09 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