refine-rails 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +413 -0
  3. data/Rakefile +8 -0
  4. data/app/assets/config/refine_rails_manifest.js +0 -0
  5. data/app/assets/javascripts/refine-stimulus.esm.js +2 -0
  6. data/app/assets/javascripts/refine-stimulus.esm.js.map +1 -0
  7. data/app/assets/javascripts/refine-stimulus.js +2 -0
  8. data/app/assets/javascripts/refine-stimulus.js.map +1 -0
  9. data/app/assets/javascripts/refine-stimulus.modern.js +2 -0
  10. data/app/assets/javascripts/refine-stimulus.modern.js.map +1 -0
  11. data/app/assets/javascripts/refine-stimulus.umd.js +2 -0
  12. data/app/assets/javascripts/refine-stimulus.umd.js.map +1 -0
  13. data/app/assets/stylesheets/index.css +1873 -0
  14. data/app/assets/stylesheets/index.tailwind.css +1035 -0
  15. data/app/controllers/refine/blueprints_controller.rb +80 -0
  16. data/app/controllers/refine/filter_application_controller.rb +29 -0
  17. data/app/controllers/refine/inline/criteria_controller.rb +161 -0
  18. data/app/controllers/refine/inline/stored_filters_controller.rb +84 -0
  19. data/app/controllers/refine/stored_filters_controller.rb +69 -0
  20. data/app/javascript/controllers/index.js +66 -0
  21. data/app/javascript/controllers/refine/add-controller.js +42 -0
  22. data/app/javascript/controllers/refine/criterion-form-controller.js +31 -0
  23. data/app/javascript/controllers/refine/date-controller.js +113 -0
  24. data/app/javascript/controllers/refine/defaults-controller.js +32 -0
  25. data/app/javascript/controllers/refine/delete-controller.js +13 -0
  26. data/app/javascript/controllers/refine/filter-pills-controller.js +63 -0
  27. data/app/javascript/controllers/refine/form-controller.js +51 -0
  28. data/app/javascript/controllers/refine/inline-conditions-controller.js +33 -0
  29. data/app/javascript/controllers/refine/popup-controller.js +46 -0
  30. data/app/javascript/controllers/refine/search-filter-controller.js +50 -0
  31. data/app/javascript/controllers/refine/server-refresh-controller.js +43 -0
  32. data/app/javascript/controllers/refine/state-controller.js +220 -0
  33. data/app/javascript/controllers/refine/stored-filter-controller.js +23 -0
  34. data/app/javascript/controllers/refine/submit-form-controller.js +8 -0
  35. data/app/javascript/controllers/refine/toggle-controller.js +12 -0
  36. data/app/javascript/controllers/refine/turbo-stream-form-controller.js +24 -0
  37. data/app/javascript/controllers/refine/turbo-stream-link-controller.js +24 -0
  38. data/app/javascript/controllers/refine/update-controller.js +86 -0
  39. data/app/javascript/index.js +1 -0
  40. data/app/javascript/refine/helpers/index.js +77 -0
  41. data/app/models/refine/blueprints/blueprint.rb +58 -0
  42. data/app/models/refine/blueprints/blueprint_example.json +25 -0
  43. data/app/models/refine/conditions/boolean_condition.rb +112 -0
  44. data/app/models/refine/conditions/clause.rb +38 -0
  45. data/app/models/refine/conditions/clauses.rb +38 -0
  46. data/app/models/refine/conditions/condition.rb +285 -0
  47. data/app/models/refine/conditions/condition_error.rb +1 -0
  48. data/app/models/refine/conditions/date_condition.rb +464 -0
  49. data/app/models/refine/conditions/date_with_time_condition.rb +8 -0
  50. data/app/models/refine/conditions/errors/condition_clause_error.rb +7 -0
  51. data/app/models/refine/conditions/errors/criteria_limit_exceeded_error.rb +2 -0
  52. data/app/models/refine/conditions/errors/option_error.rb +2 -0
  53. data/app/models/refine/conditions/errors/relationship_error.rb +1 -0
  54. data/app/models/refine/conditions/filter_condition.rb +93 -0
  55. data/app/models/refine/conditions/has_clauses.rb +117 -0
  56. data/app/models/refine/conditions/has_meta.rb +10 -0
  57. data/app/models/refine/conditions/has_refinements.rb +156 -0
  58. data/app/models/refine/conditions/numeric_condition.rb +224 -0
  59. data/app/models/refine/conditions/option_condition.rb +260 -0
  60. data/app/models/refine/conditions/text_condition.rb +152 -0
  61. data/app/models/refine/conditions/uses_attributes.rb +168 -0
  62. data/app/models/refine/filter.rb +302 -0
  63. data/app/models/refine/filters/blueprint_editor.rb +102 -0
  64. data/app/models/refine/filters/builder.rb +59 -0
  65. data/app/models/refine/filters/criterion.rb +87 -0
  66. data/app/models/refine/filters/query.rb +82 -0
  67. data/app/models/refine/inline/criteria/input.rb +50 -0
  68. data/app/models/refine/inline/criteria/numeric_refinement.rb +13 -0
  69. data/app/models/refine/inline/criteria/option.rb +2 -0
  70. data/app/models/refine/inline/criterion.rb +141 -0
  71. data/app/models/refine/invalid_filter_error.rb +8 -0
  72. data/app/models/refine/stabilize.rb +29 -0
  73. data/app/models/refine/stabilizers/database_stabilizer.rb +21 -0
  74. data/app/models/refine/stabilizers/errors/url_stabilizer_error.rb +2 -0
  75. data/app/models/refine/stabilizers/url_encoded_stabilizer.rb +21 -0
  76. data/app/models/refine/stored_filter.rb +14 -0
  77. data/app/models/refine/tracks_pending_relationship_subqueries.rb +196 -0
  78. data/app/views/_filter_builder_dropdown.html.erb +63 -0
  79. data/app/views/_filter_pills.html.erb +40 -0
  80. data/app/views/_loading.html.erb +32 -0
  81. data/app/views/refine/blueprints/_add_and.html.erb +25 -0
  82. data/app/views/refine/blueprints/_add_group.html.erb +24 -0
  83. data/app/views/refine/blueprints/_clause_select.html.erb +24 -0
  84. data/app/views/refine/blueprints/_condition_select.html.erb +53 -0
  85. data/app/views/refine/blueprints/_criterion.html.erb +41 -0
  86. data/app/views/refine/blueprints/_criterion_errors.html.erb +7 -0
  87. data/app/views/refine/blueprints/_delete_criterion.html.erb +11 -0
  88. data/app/views/refine/blueprints/_group.html.erb +13 -0
  89. data/app/views/refine/blueprints/_query.html.erb +34 -0
  90. data/app/views/refine/blueprints/_stored_filters.html.erb +23 -0
  91. data/app/views/refine/blueprints/clauses/_date_condition.html.erb +80 -0
  92. data/app/views/refine/blueprints/clauses/_date_picker.html.erb +26 -0
  93. data/app/views/refine/blueprints/clauses/_filter_condition.html.erb +36 -0
  94. data/app/views/refine/blueprints/clauses/_numeric_condition.html.erb +35 -0
  95. data/app/views/refine/blueprints/clauses/_option_condition.html.erb +37 -0
  96. data/app/views/refine/blueprints/clauses/_text_condition.html.erb +13 -0
  97. data/app/views/refine/blueprints/create.turbo_stream.erb +22 -0
  98. data/app/views/refine/blueprints/new.html.erb +7 -0
  99. data/app/views/refine/blueprints/show.html.erb +4 -0
  100. data/app/views/refine/blueprints/show.turbo_stream.erb +22 -0
  101. data/app/views/refine/inline/criteria/_form_fields.html.erb +62 -0
  102. data/app/views/refine/inline/criteria/create.turbo_stream.erb +19 -0
  103. data/app/views/refine/inline/criteria/edit.turbo_stream.erb +26 -0
  104. data/app/views/refine/inline/criteria/index.html.erb +64 -0
  105. data/app/views/refine/inline/criteria/new.turbo_stream.erb +24 -0
  106. data/app/views/refine/inline/filters/_add_first_condition_button.html.erb +19 -0
  107. data/app/views/refine/inline/filters/_and_button.html.erb +26 -0
  108. data/app/views/refine/inline/filters/_criterion.html.erb +23 -0
  109. data/app/views/refine/inline/filters/_group.html.erb +13 -0
  110. data/app/views/refine/inline/filters/_load_button.html.erb +15 -0
  111. data/app/views/refine/inline/filters/_or_button.html.erb +26 -0
  112. data/app/views/refine/inline/filters/_popup.html.erb +26 -0
  113. data/app/views/refine/inline/filters/_save_button.html.erb +15 -0
  114. data/app/views/refine/inline/filters/_show.html.erb +40 -0
  115. data/app/views/refine/inline/inputs/_date_condition.html.erb +7 -0
  116. data/app/views/refine/inline/inputs/_date_condition_days.html.erb +18 -0
  117. data/app/views/refine/inline/inputs/_date_condition_range.html.erb +22 -0
  118. data/app/views/refine/inline/inputs/_date_condition_single.html.erb +9 -0
  119. data/app/views/refine/inline/inputs/_date_picker.html.erb +20 -0
  120. data/app/views/refine/inline/inputs/_numeric_condition.html.erb +23 -0
  121. data/app/views/refine/inline/inputs/_option_condition.html.erb +14 -0
  122. data/app/views/refine/inline/inputs/_text_condition.html.erb +8 -0
  123. data/app/views/refine/inline/stored_filters/find.turbo_stream.erb +19 -0
  124. data/app/views/refine/inline/stored_filters/index.html.erb +28 -0
  125. data/app/views/refine/inline/stored_filters/new.turbo_stream.erb +47 -0
  126. data/app/views/refine/stored_filters/create.turbo_stream.erb +2 -0
  127. data/app/views/refine/stored_filters/find.turbo_stream.erb +5 -0
  128. data/app/views/refine/stored_filters/index.html.erb +39 -0
  129. data/app/views/refine/stored_filters/new.html.erb +29 -0
  130. data/app/views/refine/stored_filters/show.html.erb +1 -0
  131. data/config/locales/en/dates.en.yml +29 -0
  132. data/config/locales/en/en.yml +20 -0
  133. data/config/locales/en/refine.en.yml +187 -0
  134. data/config/routes.rb +17 -0
  135. data/lib/generators/filter/filter_generator.rb +27 -0
  136. data/lib/generators/filter/templates/filter.rb.erb +20 -0
  137. data/lib/refine/rails/engine.rb +15 -0
  138. data/lib/refine/rails/version.rb +5 -0
  139. data/lib/refine/rails.rb +38 -0
  140. data/lib/tasks/refine/rails_tasks.rake +13 -0
  141. metadata +202 -0
@@ -0,0 +1,1035 @@
1
+ @tailwind components;
2
+
3
+ @layer components {
4
+ .refine-button {
5
+ @apply shadow-sm text-white hover:text-white bg-blue-500 hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-600 hover:no-underline;
6
+
7
+ &.button-red {
8
+ @apply bg-red-500 hover:bg-red-600 focus:ring-red-600;
9
+ }
10
+ }
11
+
12
+ .refine-button-secondary {
13
+ @apply text-blue-600 hover:text-blue-600 hover:underline;
14
+ &.button-increase-contrast {
15
+ @apply text-blue-700 hover:text-blue-900;
16
+ }
17
+
18
+ &.button-red {
19
+ @apply text-red-500 hover:text-red-600;
20
+ &.button-increase-contrast {
21
+ @apply text-red-700 hover:text-red-900;
22
+ }
23
+ }
24
+ }
25
+
26
+ .refine-button, .refine-button-secondary {
27
+ @apply py-2 px-4 border border-transparent rounded-md;
28
+ @apply inline-flex items-center whitespace-nowrap;
29
+ &.button-smaller {
30
+ @apply py-1 px-3 text-xs;
31
+ }
32
+ }
33
+
34
+ /* _head.html.erb */
35
+ .refine-stored-filter-head-container {
36
+ @apply flex w-full py-4;
37
+ }
38
+
39
+ .refine-stored-filter-header {
40
+ @apply text-gray-800 font-semibold text-base;
41
+ }
42
+
43
+ .refine-stored-filter-link {
44
+ @apply text-blue-600 bg-transparent font-bold underline text-xs ml-auto leading-6 outline-none focus:outline-none;
45
+ }
46
+
47
+
48
+ /* edit.html.erb / new.html.erb */
49
+ .refine-stored-filter-container {
50
+ @apply py-4;
51
+ }
52
+
53
+ .refine-stored-filter-form {
54
+ @apply flex w-full;
55
+ }
56
+
57
+ .refine-stored-filter-error {
58
+ @apply mb-2 text-xs text-red-600;
59
+ }
60
+
61
+ .refine-stored-filter-input {
62
+ @apply w-full mr-4 block w-full pl-9 rounded border border-solid border-gray-200 focus:ring-blue-500 focus:border-blue-500 sm:text-sm;
63
+ }
64
+
65
+ .refine-stored-filter-button-cancel {
66
+ @apply refine-button-secondary ml-auto mr-4;
67
+ }
68
+
69
+ .refine-stored-filter-button-submit {
70
+ @apply refine-button text-center;
71
+ }
72
+
73
+ /* _find.html.erb */
74
+ .refine-stored-filter-search-container {
75
+ @apply flex w-full py-4;
76
+ }
77
+
78
+ .refine-stored-filter-search-form {
79
+ @apply flex w-full;
80
+ }
81
+
82
+ .refine-stored-filter-search-selector-container {
83
+ @apply w-full mr-4;
84
+ }
85
+
86
+ .refine-stored-filter-search-button-cancel {
87
+ @apply refine-button-secondary ml-auto mr-4;
88
+ }
89
+
90
+
91
+ .refine-stored-filter-search-button-submit {
92
+ @apply refine-button text-center;
93
+ }
94
+
95
+
96
+ /* _filter_builder_dropdown.html.erb */
97
+ .refine-filter-builder-dropdown-container {
98
+ @apply px-8 hidden md:block w-auto p-6 relative;
99
+ }
100
+
101
+ .refine-filter-builder-dropdown-search-box {
102
+ @apply px-4 mt-2 origin-top-right absolute z-[100] right-0 rounded shadow-2xl bg-white opacity-100 scale-100 w-screen sm:max-w-max;
103
+ }
104
+
105
+ .refine-filter-builder-dropdown-toggle-button {
106
+ @apply px-8 bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded;
107
+ }
108
+
109
+
110
+
111
+ .refine-filter-builder-dropdown-button-container {
112
+ @apply py-6 flex sticky bottom-0 bg-white;
113
+ }
114
+
115
+ .refine-filter-builder-dropdown-cancel-button {
116
+ @apply refine-button-secondary ml-auto mr-4;
117
+ }
118
+
119
+ .refine-filter-builder-dropdown-apply-button {
120
+ @apply refine-button text-center mr-4;
121
+ }
122
+
123
+ .refine-filter-builder-dropdown-loading-container {
124
+ @apply py-4;
125
+ }
126
+
127
+ .postfixed {
128
+ /* keep it because the dropdown select uses it */
129
+ }
130
+
131
+ /* _filter_condition.html.erb */
132
+ .refine-filter-condition-container {
133
+ @apply w-full mt-3 sm:w-auto sm:flex-shrink-0 sm:mr-3 flex postfixed;
134
+ }
135
+
136
+ .refine-filter-condition-select {
137
+ @apply font-sans mt-1 block pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md;
138
+ }
139
+
140
+ .refine-filter-condition-postfix {
141
+ @apply flex-shrink-0 bg-gray-50 border border-gray-300 rounded-md rounded-l-none p-2;
142
+ }
143
+
144
+ /* _option_condition.html.erb */
145
+ .refine-option-condition-container {
146
+ @apply w-full mt-3 sm:w-auto sm:flex-shrink-0 sm:mr-3 flex postfixed;
147
+ }
148
+
149
+ .refine-option-condition-select {
150
+ @apply font-sans mt-1 block pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md;
151
+ }
152
+
153
+ .refine-option-condition-postfix {
154
+ @apply flex-shrink-0 bg-gray-50 border border-gray-300 rounded-md rounded-l-none p-2;
155
+ }
156
+
157
+ /* _add_and.html.erb */
158
+ .refine-add-container {
159
+ @apply pt-4 flex;
160
+ }
161
+
162
+ .refine-add-button {
163
+ @apply refine-button-secondary text-gray-900 uppercase font-semibold text-center cursor-pointer px-3 block;
164
+ }
165
+
166
+ .refine-add-button-text {
167
+ }
168
+
169
+ .refine-add-icon {
170
+ @apply pl-2 text-gray-500;
171
+ }
172
+
173
+ /* _add_group.html.erb */
174
+ .refine-add-group-container {
175
+ @apply flex items-center;
176
+ }
177
+
178
+ .refine-add-group {
179
+ @apply cursor-pointer text-blue-600 bg-transparent font-bold underline pt-4 text-sm outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150;
180
+ }
181
+
182
+ .refine-add-group.refine-add-disabled {
183
+ cursor: not-allowed;
184
+ }
185
+
186
+ .prefixed {
187
+ /* keep it because the dropdown select uses it */
188
+ }
189
+
190
+ /* _clause_select.html.erb */
191
+ .refine-clause-select-prefixed {
192
+ @apply flex prefixed;
193
+ }
194
+
195
+ .refine-clause-select-prefix {
196
+ @apply flex-shrink-0 bg-gray-50 border border-gray-300 rounded-md rounded-r-none p-2;
197
+ }
198
+
199
+ .refine-clause-select {
200
+ @apply w-full flex-grow flex-shrink-0 sm:w-auto;
201
+ }
202
+
203
+ /* _condition_select.html.erb */
204
+ .refine-condition-select {
205
+ @apply w-full sm:w-auto;
206
+ }
207
+
208
+
209
+ /* _criterion_errors.html.erb */
210
+ .refine-criterion-error {
211
+ @apply mt-2 text-xs text-red-600;
212
+ }
213
+
214
+ /* _criterion.html.erb */
215
+ .refine-criterion-container {
216
+ @apply flex flex-wrap flex-grow items-baseline w-full sm:w-auto sm:pr-12;
217
+ }
218
+ .refine-criterion-condition-container {
219
+ @apply w-full sm:w-auto sm:flex-shrink-0 sm:mr-3 pt-3;
220
+ }
221
+
222
+ .refine-criterion-clause-container {
223
+ @apply w-full pt-3 sm:w-auto sm:flex-shrink-0 sm:mr-3;
224
+ }
225
+
226
+ .refine-criterion-refinement-container {
227
+ @apply w-full pt-3 sm:w-auto sm:flex-shrink-0 sm:mr-3;
228
+ }
229
+
230
+ /* _delete_criterion.html.erb */
231
+ .refine-delete-container {
232
+ @apply pt-5 ml-auto flex-none;
233
+ }
234
+
235
+ .refine-delete-button {
236
+ @apply ml-auto flex items-center;
237
+ }
238
+
239
+ .refine-delete-criterion-icon {
240
+ @apply text-gray-600;
241
+ }
242
+
243
+ .refine-delete-criterion-label {
244
+ @apply text-gray-500 pl-2 hidden;
245
+ }
246
+
247
+ /* _group.html.erb */
248
+ .refine-group-container {
249
+ @apply bg-gray-50 rounded p-4 font-sans;
250
+ }
251
+
252
+ .refine-group-criterion-container {
253
+ @apply flex items-start pb-3 flex-wrap;
254
+ }
255
+
256
+ .refine-group-and {
257
+ @apply text-gray-400 pl-2;
258
+ }
259
+
260
+ /* _query.html.erb */
261
+ .refine-query-container {
262
+ @apply relative;
263
+ }
264
+
265
+ .refine-query-content-container {
266
+ @apply relative w-full h-full;
267
+ }
268
+
269
+ .refine-query-loading-container {
270
+ @apply flex items-center justify-center absolute left-0 top-0 w-full h-full bg-gray-300 bg-opacity-50 z-10 rounded;
271
+ }
272
+
273
+ .refine-query-loading-text {
274
+ @apply text-black text-xl;
275
+ }
276
+
277
+ .refine-query-or {
278
+ @apply py-3;
279
+ }
280
+
281
+ /* _date_picker.html.erb */
282
+ .refine-date-picker-container {
283
+ @apply relative;
284
+ }
285
+
286
+ .refine-date-picker-input {
287
+ @apply rounded w-36 border border-solid border-gray-200 focus:ring-blue-500 focus:border-blue-500 sm:text-sm;
288
+ }
289
+
290
+ /* _text_condition.html.erb */
291
+ .refine-text-condition-container {
292
+ @apply mt-3 mr-3;
293
+ }
294
+
295
+ .refine-text-condition-input {
296
+ @apply rounded border border-solid border-gray-200 focus:ring-blue-500 focus:border-blue-500 sm:text-sm;
297
+ }
298
+
299
+ /* _numeric_condition_html.erb */
300
+
301
+ .refine-numeric-condition-container {
302
+ @apply flex-grow-0 mt-3;
303
+ }
304
+
305
+ .refine-numeric-condition-container-btwn {
306
+ @apply flex-grow-0 mt-3 sm:mr-3;
307
+ }
308
+
309
+ .refine-numeric-condition-input {
310
+ @apply shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md;
311
+ }
312
+
313
+ .refine-numeric-condition-and {
314
+ @apply px-2 mt-3;
315
+ }
316
+
317
+ .refine-numeric-condition-second-container {
318
+ @apply flex-grow-0 mt-3 sm:mr-3;
319
+ }
320
+ .refine-numeric-condition-second-input {
321
+ @apply shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md;
322
+ }
323
+
324
+ /* _date_condition.html.erb */
325
+ .refine-date-condition-days-container {
326
+ @apply mt-3;
327
+ }
328
+ .refine-date-condition-days-input {
329
+ @apply shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block sm:text-sm border-gray-300 rounded-md w-28;
330
+ }
331
+ .refine-date-condition-days-text {
332
+ @apply px-2 mt-3;
333
+ }
334
+
335
+ .refine-date-condition-days-modifier-container {
336
+ @apply w-32 mt-3 sm:mr-3;
337
+ }
338
+
339
+ .refine-date-condition-days-modifier-select {
340
+ @apply w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md;
341
+ }
342
+
343
+ .refine-date-condition-first-date-container {
344
+ @apply flex-grow-0 mt-3 sm:mr-3;
345
+ }
346
+ .refine-date-condition-first-date-container-btwn {
347
+ @apply flex-grow-0 mt-3;
348
+ }
349
+
350
+ .refine-date-condition-and {
351
+ @apply px-2 mt-3;
352
+ }
353
+
354
+ .refine-date-condition-second-date-container {
355
+ @apply flex-grow-0 mt-3 sm:mr-3;
356
+ }
357
+ }
358
+
359
+ /*
360
+ *********************************************
361
+ Inline
362
+ *********************************************
363
+ */
364
+
365
+ /* buttons and popups */
366
+ .refine--inline-popup {
367
+ position: absolute;
368
+ z-index: 100;
369
+ margin-top: 0.5rem;
370
+ width: 100vw;
371
+ border-radius: 0.25rem;
372
+ background-color: white;
373
+ padding-left: 1rem;
374
+ padding-right: 1rem;
375
+ max-width: max-content;
376
+ max-height: 66vh;
377
+ overflow: visible;
378
+ display: block;
379
+ }
380
+
381
+ /* groups and filter pills */
382
+ .refine--filter-wrapper {
383
+ font-size: 14px;
384
+ display: flex;
385
+ flex-direction: column;
386
+ gap: 12px;
387
+ margin-top: 12px;
388
+ }
389
+
390
+ .refine--filter-row {
391
+ display: flex;
392
+ gap: 10px;
393
+ row-gap: 15px;
394
+ align-items: center;
395
+ flex-wrap: wrap;
396
+ }
397
+
398
+ .refine--groups-wrapper {
399
+ display: flex;
400
+ gap: 10px;
401
+ row-gap: 15px;
402
+ align-items: center;
403
+ flex-wrap: wrap;
404
+ }
405
+
406
+ .refine--group-join, .refine--condition-join {
407
+ position: relative;
408
+ padding: 5px 0;
409
+ width: 35px;
410
+ text-align: center;
411
+ border-radius: 6px;
412
+ cursor: default;
413
+ &:hover {
414
+ background-color: #f8f8f8;
415
+ }
416
+ }
417
+
418
+ .refine--group {
419
+ display: flex;
420
+ gap: 10px;
421
+ align-items: center;
422
+ position: relative;
423
+ flex-wrap: wrap;
424
+ }
425
+
426
+ .refine--group-conditions-wrapper {
427
+ display: flex;
428
+ gap: 5px;
429
+ position: relative;
430
+ padding: 0 10px;
431
+ &:before , &:after {
432
+ content: "";
433
+ position: absolute;
434
+ top: -2px;
435
+ bottom: -2px;
436
+ border: 2px solid #eee;
437
+ width: 3px;
438
+ }
439
+ &:hover {
440
+ &:before, &:after {
441
+ border-color: #aaa;
442
+ }
443
+ }
444
+ &:before {
445
+ border-radius: 6px 0 0 6px;
446
+ left: 0;
447
+ border-right: none;
448
+ }
449
+ &:after {
450
+ border-radius: 0 6px 6px 0;
451
+ right: 0;
452
+ border-left: none;
453
+ }
454
+ }
455
+
456
+ .refine--group-conditions {
457
+ display: flex;
458
+ gap: 5px;
459
+ align-items: center;
460
+ }
461
+
462
+
463
+ /* Condition List */
464
+ .refine--condition-list {
465
+ margin-top: 5px;
466
+ max-height: 180px;
467
+ overflow: auto;
468
+ }
469
+
470
+ .refine--condition-list-item {
471
+ color: black;
472
+ display: block;
473
+ padding: 3px 5px;
474
+ color: #111;
475
+ border-radius: 6px;
476
+ line-height: 1.15;
477
+ }
478
+
479
+ .refine--condition-list-item:hover {
480
+ background-color: #eee;
481
+ color: #111;
482
+ text-decoration: none;
483
+ }
484
+
485
+ .refine--condition-pill-wrapper-wrapper {
486
+ display: flex;
487
+ align-items: center;
488
+ gap: 5px;
489
+ position: relative;
490
+ }
491
+
492
+ .refine--condition-pill {
493
+ background-color: #fff;
494
+ border: 1px solid #bbb;
495
+ border-bottom-color: #999;
496
+ box-shadow: 0 1px 1px rgba(0,0,0,0.1);
497
+ border-radius: 6px;
498
+ font-size: 14px;
499
+ cursor: pointer;
500
+ position: relative;
501
+ white-space: nowrap;
502
+ &:hover {
503
+ border-color: #999;
504
+ .refine--remove-condition {
505
+ display: block;
506
+ }
507
+ }
508
+ &:not(:hover){
509
+ .refine--condition-value-wrapper {
510
+ display: none;
511
+ }
512
+ }
513
+ }
514
+
515
+ .refine--filter-condition {
516
+ display: flex;
517
+ align-items: center;
518
+ font-size: 14px;
519
+ position: relative;
520
+ background-color: #efeff2;
521
+ border-radius: 6px;
522
+ padding: 4px;
523
+ }
524
+
525
+ .refine--condition-pill-name {
526
+ padding: 4px 8px;
527
+ display: block;
528
+ }
529
+
530
+ .refine--remove-condition {
531
+ display: none;
532
+ border: 2px solid #fff;
533
+ padding: 6px 4px;
534
+ border-radius: 50%;
535
+ position: absolute;
536
+ top: -8px;
537
+ right:-8px;
538
+ background-color: #aaa;
539
+ z-index: 999;
540
+ &:hover {
541
+ background-color: #ee3f3f;
542
+ }
543
+ &:before {
544
+ display: block;
545
+ content: "";
546
+ width: 6px;
547
+ height: 2px;
548
+ background-color: #fff;
549
+ }
550
+ }
551
+ &:hover {
552
+ border-color: #999;
553
+ .remove-applied-condition {
554
+ display: block;
555
+ }
556
+ }
557
+
558
+ .refine--condition-value-wrapper {
559
+ position: absolute;
560
+ top: 100%;
561
+ background-color: #000;
562
+ box-shadow: 0 2px 4px 0 rgba(0,0,0,0.1);
563
+ border-radius: 6px;
564
+ color: #fff;
565
+ padding: 5px 10px;
566
+ display: flex;
567
+ gap: 5px;
568
+ font-size: 12px;
569
+ z-index: 9999;
570
+ left: 50%;
571
+ transform: translate3d(-50%, 4px, 0);
572
+ animation: 0.25s cubic-bezier(.45,1.1,.7,1) 0s pillValueTooltip;
573
+ animation-fill-mode: both;
574
+ }
575
+
576
+ .refine--condition-value-clause {
577
+ color: rgba(255,255,255,0.7);
578
+ }
579
+
580
+ /* Form widgets */
581
+ .refine--select {
582
+ line-height: 1.125;
583
+ color: #111;
584
+ border: 1px solid #ddd;
585
+ border-bottom-color: #aaa;
586
+ box-shadow: 0 1px 2px rgba(0,0,0,.1);
587
+ border-radius: 6px;
588
+ padding: 3px 3px 3px 6px;
589
+ background-color: #fff;
590
+
591
+ }
592
+
593
+ .refine--clause-select {
594
+ flex: 1;
595
+ margin-left: 10px;
596
+ }
597
+
598
+
599
+ .refine--criterion-fields {
600
+ width: 100%;
601
+ padding: 0.5rem 0;
602
+ }
603
+
604
+
605
+ /* _date_condition.html.erb */
606
+ .refine--date-condition-days-text {
607
+ margin-top: 0.75rem;
608
+ }
609
+
610
+ .refine--date-condition-days-modifier-container {
611
+ margin-top: 0.75rem;
612
+ }
613
+
614
+ .refine--date-picker-input {
615
+ font-size: 0.875rem;
616
+ line-height: 1.25rem;
617
+ border-radius: 4px;
618
+ border-width: 1px;
619
+ border-style: solid;
620
+ border-color: rgba(183, 198, 206, 1);
621
+ }
622
+
623
+ .refine--date-picker-container {
624
+ position: relative;
625
+ }
626
+
627
+ .refine--date-picker-input {
628
+ font-size: 0.875rem;
629
+ line-height: 1.25rem;
630
+ border-radius: 4px;
631
+ border-width: 1px;
632
+ border-style: solid;
633
+ border-color: rgba(183, 198, 206, 1);
634
+ }
635
+
636
+ .refine-date-condition-first-date-container-btwn {
637
+ margin-top: 0px;
638
+ padding-top: 0;
639
+ margin-right: 6px;
640
+ margin-top: 0;
641
+ flex: 1;
642
+ }
643
+
644
+ .refine--date-condition-and {
645
+ margin-top: 0.75rem;
646
+ }
647
+
648
+ .refine--date-condition-second-date-container {
649
+ margin-top: 0.75rem;
650
+ }
651
+
652
+ .refine--date-condition-days-modifier-select {
653
+ font-size: 0.875rem;
654
+ line-height: 1.25rem;
655
+ width: 100%;
656
+ border-radius: 0.375rem;
657
+ border-color: rgba(209, 213, 219, 1);
658
+ padding-top: 0.5rem;
659
+ padding-bottom: 0.5rem;
660
+ padding-left: 0.75rem;
661
+ padding-right: 2.5rem;
662
+ font-size: 1rem;
663
+ line-height: 1.5rem;
664
+ }
665
+
666
+ /* _numeric_condition_html.erb */
667
+ .refine--numeric-condition-container {
668
+ margin-top: 0.75rem;
669
+ flex-grow: 0;
670
+ }
671
+
672
+ .refine--numeric-condition-container-btwn {
673
+ margin-top: 0.75rem;
674
+ flex-grow: 0;
675
+ }
676
+
677
+ .refine--numeric-condition-and {
678
+ margin-top: 0.75rem;
679
+ }
680
+
681
+ .refine--numeric-condition-second-container {
682
+ margin-top: 0.75rem;
683
+ flex-grow: 0;
684
+ }
685
+
686
+ @media (min-width: 640px) {
687
+ .refine--numeric-condition-second-container {
688
+ margin-right: 0.75rem;
689
+ }
690
+ }
691
+
692
+ .refine--numeric-condition-second-input {
693
+ display: block;
694
+ width: 100%;
695
+ border-radius: 0.375rem;
696
+ border-color: rgba(209, 213, 219, 1);
697
+ }
698
+
699
+ .refine--numeric-condition-second-input:focus {
700
+ border-color: rgba(99, 102, 241, 1);
701
+ }
702
+
703
+ @media (min-width: 640px) {
704
+ .refine--numeric-condition-second-input {
705
+ font-size: 0.875rem;
706
+ line-height: 1.25rem;
707
+ }
708
+ }
709
+
710
+ /* _option_condition.html.erb */
711
+ .refine--option-condition-container {
712
+ /* keep it because the dropdown select uses it */
713
+ display: flex;
714
+ width: 100%;
715
+ }
716
+
717
+ @media (min-width: 640px) {
718
+ .refine--option-condition-container {
719
+ margin-right: 0.75rem;
720
+ width: auto;
721
+ flex-shrink: 0;
722
+ }
723
+ }
724
+
725
+ .refine--option-select {
726
+ width: 100%;
727
+ }
728
+
729
+ .refine--option-condition-select:focus {
730
+ border-color: rgba(99, 102, 241, 1);
731
+ outline: 2px solid transparent;
732
+ outline-offset: 2px;
733
+ }
734
+
735
+ @media (min-width: 640px) {
736
+ .refine--option-condition-select {
737
+ font-size: 0.875rem;
738
+ line-height: 1.25rem;
739
+ }
740
+ }
741
+
742
+ .refine--option-condition-postfix {
743
+ flex-shrink: 0;
744
+ border-radius: 0.375rem;
745
+ border-top-left-radius: 0px;
746
+ border-bottom-left-radius: 0px;
747
+ border-width: 1px;
748
+ border-color: rgba(209, 213, 219, 1);
749
+ background-color: rgba(249, 250, 251, 1);
750
+ padding: 0.5rem;
751
+ }
752
+
753
+ /* _text_condition.html.erb */
754
+ input.refine--input {
755
+ width: 100%;
756
+ font-size: 14px;
757
+ display: block;
758
+ /* TODO 25px L for icon */
759
+ padding: 5px;
760
+ border: 1px solid #bbb;
761
+ border-radius: 6px;
762
+ outline: 0;
763
+ line-height: 1.125;
764
+ }
765
+
766
+ input.refine--input::placeholder {
767
+ color: #aaa;
768
+ }
769
+
770
+ input.refine--text-condition-input:focus {
771
+ border-color: rgba(59, 130, 246, 1);
772
+ }
773
+
774
+ /* stored filters */
775
+ .refine--stored-filter-list {
776
+ padding: 10px;
777
+ max-height: 180px;
778
+ overflow: auto;
779
+ }
780
+
781
+ .refine--stored-filter-list-item {
782
+ color: black;
783
+ display: block;
784
+ padding: 3px 5px;
785
+ color: #111;
786
+ border-radius: 6px;
787
+ line-height: 1.15;
788
+ }
789
+
790
+ .refine--stored-filter-list-item:hover {
791
+ background-color: #eee;
792
+ color: #111;
793
+ text-decoration: none;
794
+ }
795
+
796
+ .refine--save-filter-link-label {
797
+ border-bottom: 1px dotted #111;
798
+ }
799
+ /*
800
+ *********************************************
801
+ Inline Final Styles
802
+ *********************************************
803
+ */
804
+ .refine--filter-label {
805
+ white-space: nowrap;
806
+ color: #767676;
807
+ }
808
+
809
+
810
+ .refine--add-condition-button.refine--add-first-condition-button,
811
+ .refine--add-condition-group-button.refine--add-first-condition-button {
812
+ border: 1px dotted #aaa;
813
+ padding-right: 8px;
814
+ line-height: 16px;
815
+ &:hover {
816
+ background-color: #fff;
817
+ border-style: solid;
818
+ color: #111;
819
+ }
820
+ }
821
+
822
+ .refine--add-condition-button, .refine--add-group-button {
823
+ display: flex;
824
+ gap: 5px;
825
+ color: #767676;
826
+ font-size: 14px;
827
+ border-radius: 6px;
828
+ padding: 5px;
829
+ align-items: center;
830
+ background-color: #fff;
831
+ &:hover {
832
+ color: #111;
833
+ background-color: #f8f8f8;
834
+ }
835
+ }
836
+
837
+ .refine--has-many-groups .refine--add-button-label {
838
+ display: none;
839
+ }
840
+
841
+ .refine--has-many-groups .refine--add-condition-button .refine--add-button-icon {
842
+ position: relative;
843
+ top: 0;
844
+ }
845
+
846
+ .refine--inline-popup-container {
847
+ display: block;
848
+ width: auto;
849
+ position: relative;
850
+ }
851
+
852
+ .refine--inline-popup {
853
+ animation: .15s cubic-bezier(.45,1.1,.7,1) 0s up10;
854
+ animation-fill-mode: both;
855
+ box-shadow: 0 2px 4px -1px rgba(0,0,0,.3), 0 8px 30px -3px rgba(0,0,0,.25);
856
+ border-radius: 8px;
857
+ z-index: 9999;
858
+ background-color: #ffffff;
859
+ position: absolute;
860
+
861
+ /* TODO see if these are still needed */
862
+ margin-top: 3px;
863
+ width: 100vw;
864
+ padding: 0 0.5rem;
865
+ max-width: max-content;
866
+ max-height: 66vh;
867
+ overflow: visible;
868
+ display: block;
869
+ }
870
+
871
+ .refine--stored-filter-list-popup {
872
+ animation: .15s cubic-bezier(.45,1.1,.7,1) 0s up10;
873
+ animation-fill-mode: both;
874
+ box-shadow: 0 2px 4px -1px rgba(0,0,0,.3), 0 8px 30px -3px rgba(0,0,0,.25);
875
+ border-radius: 8px;
876
+ z-index: 9999;
877
+ background-color: #ffffff;
878
+ position: absolute;
879
+ top: -8px;
880
+ left: 100%;
881
+
882
+ /* TODO see if these are still needed */
883
+ margin-top: 3px;
884
+ width: 100vw;
885
+ padding: 0 0.5rem;
886
+ max-width: max-content;
887
+ max-height: 66vh;
888
+ display: block;
889
+ }
890
+
891
+ .refine--separator {
892
+ height: 1px;
893
+ background-color: #eee;
894
+ margin: 5px 0;
895
+ }
896
+
897
+ .refine--separator-m0 {
898
+ height: 1px;
899
+ background-color: #eee;
900
+ }
901
+
902
+ button.refine--apply-button {
903
+ padding: 4px 6px;
904
+ cursor: pointer;
905
+ border: 1px solid #ddd;
906
+ font-weight: 500;
907
+ box-shadow: 0 2px 2px rgba(0,0,0,.08), 0 1px 5px -2px rgba(0,0,0,.04);
908
+ font-size: 14px;
909
+ border-radius: 6px;
910
+ margin-left: 4px;
911
+ background-color: #0c5cef;
912
+ color: #fff;
913
+ border-color: #0c5cef;
914
+ }
915
+
916
+ .refine--stored-filters-link {
917
+ color: black;
918
+ display: flex;
919
+ align-items: center;
920
+ padding: 3px 5px;
921
+ color: #111;
922
+ border-radius: 6px;
923
+ line-height: 1.15;
924
+ margin-bottom: 5px;
925
+ &:hover {
926
+ background-color: #eee;
927
+ color: #111;
928
+ text-decoration: none;
929
+ }
930
+ &:before {
931
+ content: "chevron_right";
932
+ font-family: "Material Icons";
933
+ font-size: 14px;
934
+ position: absolute;
935
+ right: 0;
936
+ top: 50%;
937
+ transform: translateY(-50%);
938
+ }
939
+ }
940
+
941
+ .refine--save-filter-link {
942
+ display: flex;
943
+ align-items: center;
944
+ gap: 5px;
945
+ font-size: 14px;
946
+ padding: 3px 0;
947
+ border: 1px solid transparent;
948
+ border-radius: 6px;
949
+ }
950
+
951
+ .refine--save-filter-input-wrapper {
952
+ display: flex;
953
+ gap: 5px;
954
+ align-items: center;
955
+ color: #111;
956
+ position: relative;
957
+ }
958
+
959
+ input.refine--save-filter-input {
960
+ border: none;
961
+ padding: 0;
962
+ font-size: 14px;
963
+ &:focus {
964
+ outline: unset;
965
+ border: none;
966
+ box-shadow: none;
967
+ }
968
+ }
969
+
970
+ .refine--save-filter-input-wrapper .refine--tooltip {
971
+ display: block;
972
+ transform: translate3d(-50%,-4px,0);
973
+ position: absolute;
974
+ left: 50%;
975
+ bottom: 100%;
976
+ white-space: nowrap;
977
+ background-color: #000;
978
+ color: #fff;
979
+ border-radius: 6px;
980
+ box-shadow: 0 2px 12px -2px rgba(0,0,0,.15);
981
+ padding: 4px 8px;
982
+ font-size: 12px;
983
+ z-index: 9999;
984
+ }
985
+
986
+ .refine--hotkey {
987
+ border-radius: 4px;
988
+ background-color: rgba(255,255,255,.3);
989
+ display: inline-block;
990
+ padding: 0 4px;
991
+ }
992
+
993
+ .refine--condition-list .refine--list-icon,
994
+ .refine--stored-filters-link .refine--list-icon {
995
+ width: 16px;
996
+ text-align: center;
997
+ margin-right: 10px;
998
+ font-size: 16px;
999
+ }
1000
+
1001
+ .material-icons-outlined.refine--icon-sm,
1002
+ .material-icons.refine--icon-sm,
1003
+ .icon.refine--icon-sm {
1004
+ font-size: 14px;
1005
+ }
1006
+
1007
+ .refine--search-box {
1008
+ position: relative;
1009
+ padding: 10px;
1010
+ margin-left: -6px;
1011
+ margin-right: 6px;
1012
+ }
1013
+
1014
+ input.refine--search-trigger[type="text"] {
1015
+ width: 100%;
1016
+ font-size: 14px;
1017
+ display: block;
1018
+ padding: 5px 5px 5px 25px;
1019
+ border: 1px solid #bbb;
1020
+ border-radius: 6px;
1021
+ outline: 0;
1022
+ line-height: 1.15;
1023
+ }
1024
+
1025
+ .material-icons.refine--icon-search {
1026
+ position: absolute;
1027
+ top: 50%;
1028
+ left: 16px;
1029
+ font-size: 16px;
1030
+ color: #999;
1031
+ transform: translateY(-50%);
1032
+ line-height: 18px;
1033
+ }
1034
+
1035
+