active_admin_prism 0.1.1 → 0.1.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 +4 -4
- data/CHANGELOG.md +121 -0
- data/INTEGRATION.md +324 -14
- data/README.md +49 -0
- data/app/assets/javascripts/active_admin_prism/prism.js +3 -1
- data/app/assets/stylesheets/active_admin_prism/prism.css +1 -1
- data/app/views/layouts/active_admin_logged_out.html.erb +76 -0
- data/js-src/prism.js +141 -6
- data/lib/active_admin/views/active_filters_bar.rb +94 -0
- data/lib/active_admin/views/flash_messages.rb +45 -25
- data/lib/active_admin/views/prism_sidebar.rb +35 -3
- data/lib/active_admin_prism/configuration.rb +53 -0
- data/lib/active_admin_prism/version.rb +1 -1
- data/lib/active_admin_prism.rb +1 -0
- data/lib/prism_icons.rb +26 -1
- data/scss-src/_base.scss +161 -24
- data/scss-src/_forms.scss +35 -4
- data/scss-src/_login.scss +5 -4
- data/scss-src/_panels.scss +172 -0
- data/scss-src/_select2.scss +281 -0
- data/scss-src/_select2_vendor.scss +695 -0
- data/scss-src/_sidebar.scss +145 -4
- data/scss-src/_variables.scss +3 -0
- data/scss-src/prism.scss +2 -0
- data/vendor/select2/LICENSE.md +21 -0
- data/vendor/select2/select2.full.min.js +2 -0
- metadata +9 -6
data/scss-src/_base.scss
CHANGED
|
@@ -57,11 +57,44 @@ a {
|
|
|
57
57
|
|
|
58
58
|
// Flash messages — ActiveAdmin renders these with a heavy full-width
|
|
59
59
|
// gradient bar (padding: 13px 30px 11px, font-size: 1.1em); this reskins
|
|
60
|
-
// them into a
|
|
61
|
-
//
|
|
62
|
-
//
|
|
60
|
+
// them into a floating toast stack, pinned to the viewport rather than
|
|
61
|
+
// pushed into the page's own grid flow (a toast that shifted #main_content
|
|
62
|
+
// down every time one appeared, then snapped back up when it auto-hid,
|
|
63
|
+
// would be its own layout-jank bug). ".flashes" still gets a grid-row/
|
|
64
|
+
// grid-column from _sidebar.scss for its notional *static* position (some
|
|
65
|
+
// tooling/AT expects every grid child to have one), but `position: fixed`
|
|
66
|
+
// below is what actually places it — relative to the viewport, ignoring
|
|
67
|
+
// that grid area entirely.
|
|
63
68
|
.flashes {
|
|
64
|
-
|
|
69
|
+
position: fixed;
|
|
70
|
+
top: 20px;
|
|
71
|
+
right: 20px;
|
|
72
|
+
z-index: 1000;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
gap: 12px;
|
|
76
|
+
width: 340px;
|
|
77
|
+
max-width: calc(100vw - 24px);
|
|
78
|
+
padding: 0;
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
|
|
81
|
+
// Individual toasts opt back into being interactive (hoverable/
|
|
82
|
+
// clickable dismiss button) — the wrapper itself must stay
|
|
83
|
+
// non-interactive, or it would sit as an invisible 340px-wide click
|
|
84
|
+
// blocker over the top-right corner of every page even between toasts.
|
|
85
|
+
> * {
|
|
86
|
+
pointer-events: auto;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media (max-width: 480px) {
|
|
91
|
+
.flashes {
|
|
92
|
+
top: 12px;
|
|
93
|
+
right: 12px;
|
|
94
|
+
left: 12px;
|
|
95
|
+
width: auto;
|
|
96
|
+
max-width: none;
|
|
97
|
+
}
|
|
65
98
|
}
|
|
66
99
|
|
|
67
100
|
// "body.active_admin .flash" (not a flat ".flash") on purpose: ActiveAdmin
|
|
@@ -83,21 +116,25 @@ body.active_admin .flash {
|
|
|
83
116
|
position: relative;
|
|
84
117
|
display: flex;
|
|
85
118
|
align-items: flex-start;
|
|
86
|
-
gap:
|
|
87
|
-
background: $prism-bg-
|
|
119
|
+
gap: 10px;
|
|
120
|
+
background: $prism-bg-card;
|
|
88
121
|
border: 1px solid $prism-border-color;
|
|
89
|
-
border-
|
|
90
|
-
|
|
91
|
-
|
|
122
|
+
border-radius: $prism-radius;
|
|
123
|
+
// overflow: hidden clips .prism-flash-progress's square corners to this
|
|
124
|
+
// card's own rounded ones.
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
box-shadow: $prism-shadow-popover;
|
|
92
127
|
text-shadow: none;
|
|
93
128
|
color: $prism-text-heading;
|
|
94
|
-
font-size: 0.
|
|
129
|
+
font-size: 0.88em;
|
|
95
130
|
font-weight: 600;
|
|
96
131
|
line-height: 1.4;
|
|
97
|
-
padding
|
|
132
|
+
// Right padding clears .prism-flash-dismiss, absolutely positioned in
|
|
133
|
+
// this corner rather than sitting inline — see below.
|
|
134
|
+
padding: 14px 34px 16px 14px;
|
|
98
135
|
margin-bottom: 0;
|
|
99
136
|
opacity: 1;
|
|
100
|
-
transform:
|
|
137
|
+
transform: translateX(0) scale(1);
|
|
101
138
|
// 320ms/cubic-bezier here matches Configuration#flash_transition_ms's
|
|
102
139
|
// default and is overridden inline by prism.js (transition-duration) if a
|
|
103
140
|
// host configures a different value — see that file's flash-dismiss IIFE.
|
|
@@ -109,47 +146,147 @@ body.active_admin .flash {
|
|
|
109
146
|
// outright once the transition finishes.
|
|
110
147
|
&.prism-flash-hide {
|
|
111
148
|
opacity: 0;
|
|
112
|
-
transform:
|
|
149
|
+
transform: translateX(24px) scale(0.98);
|
|
113
150
|
}
|
|
114
151
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
152
|
+
// "notice"/"success" both read as the positive/affirmative case (Rails'
|
|
153
|
+
// own convention already treats :notice that way) — same color, same
|
|
154
|
+
// :check_circle icon (see flash_messages.rb#FLASH_ICONS).
|
|
155
|
+
//
|
|
156
|
+
// background/border/color are redeclared here (not just left to the
|
|
157
|
+
// base .flash rule above) because ActiveAdmin core itself carries a
|
|
158
|
+
// "body.logged_in .flash.flash_notice"/".flash_error" rule of its own
|
|
159
|
+
// (active_admin/components/_flash_messages.scss — a pale gradient +
|
|
160
|
+
// colored border-bottom), and THAT selector is one class more specific
|
|
161
|
+
// than the base ".flash" rule above (0,3,1 vs 0,2,1) — more specific
|
|
162
|
+
// than "body.active_admin .flash" even though this gem's own class list
|
|
163
|
+
// ties AA's elsewhere. Only ".flash_notice"/".flash_error" get this
|
|
164
|
+
// treatment because those are the only two AA core actually special-
|
|
165
|
+
// cases; every other type here already wins on the base rule alone.
|
|
166
|
+
&.flash_notice,
|
|
167
|
+
&.flash_success {
|
|
168
|
+
background: $prism-bg-card;
|
|
169
|
+
border-bottom-color: $prism-border-color;
|
|
170
|
+
color: $prism-text-heading;
|
|
171
|
+
|
|
172
|
+
.prism-flash-icon {
|
|
173
|
+
color: $prism-color-success;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.prism-flash-progress {
|
|
177
|
+
background: $prism-color-success;
|
|
178
|
+
}
|
|
119
179
|
}
|
|
120
180
|
|
|
121
181
|
&.flash_error,
|
|
122
182
|
&.flash_alert {
|
|
123
|
-
background: $prism-
|
|
124
|
-
border-
|
|
125
|
-
color:
|
|
183
|
+
background: $prism-bg-card;
|
|
184
|
+
border-bottom-color: $prism-border-color;
|
|
185
|
+
color: $prism-text-heading;
|
|
186
|
+
|
|
187
|
+
.prism-flash-icon {
|
|
188
|
+
color: $prism-color-danger;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.prism-flash-progress {
|
|
192
|
+
background: $prism-color-danger;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&.flash_warning {
|
|
197
|
+
.prism-flash-icon {
|
|
198
|
+
color: $prism-color-warning;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.prism-flash-progress {
|
|
202
|
+
background: $prism-color-warning;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Any other flash key (a host's own custom one) falls back here too —
|
|
207
|
+
// flash_messages.rb#flash_icon already defaults to the same :info icon
|
|
208
|
+
// for anything not in FLASH_ICONS, so this default color matches it.
|
|
209
|
+
&.flash_info,
|
|
210
|
+
&:not(.flash_notice):not(.flash_success):not(.flash_error):not(.flash_alert):not(.flash_warning) {
|
|
211
|
+
.prism-flash-icon {
|
|
212
|
+
color: $prism-color-info;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.prism-flash-progress {
|
|
216
|
+
background: $prism-color-info;
|
|
217
|
+
}
|
|
126
218
|
}
|
|
127
219
|
}
|
|
128
220
|
|
|
221
|
+
.prism-flash-icon {
|
|
222
|
+
flex: 0 0 auto;
|
|
223
|
+
margin-top: 1px;
|
|
224
|
+
}
|
|
225
|
+
|
|
129
226
|
.prism-flash-message {
|
|
130
227
|
flex: 1 1 auto;
|
|
228
|
+
padding-top: 1px;
|
|
131
229
|
}
|
|
132
230
|
|
|
133
231
|
.prism-flash-dismiss {
|
|
232
|
+
position: absolute;
|
|
233
|
+
top: 10px;
|
|
234
|
+
right: 10px;
|
|
134
235
|
flex: 0 0 auto;
|
|
135
236
|
display: inline-flex;
|
|
136
237
|
align-items: center;
|
|
137
238
|
justify-content: center;
|
|
138
239
|
width: 22px;
|
|
139
240
|
height: 22px;
|
|
140
|
-
margin: -2px -4px -2px 0;
|
|
141
241
|
padding: 0;
|
|
142
242
|
border: none;
|
|
143
243
|
border-radius: $prism-radius-sm;
|
|
144
244
|
background: transparent !important;
|
|
145
|
-
color:
|
|
146
|
-
opacity: 0.
|
|
245
|
+
color: $prism-text-muted !important;
|
|
246
|
+
opacity: 0.8;
|
|
147
247
|
cursor: pointer;
|
|
148
248
|
transition: opacity $prism-transition-fast, background $prism-transition-fast;
|
|
149
249
|
|
|
150
250
|
&:hover {
|
|
151
251
|
opacity: 1;
|
|
152
|
-
background:
|
|
252
|
+
background: $prism-bg-page !important;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// The countdown bar along the card's bottom edge — only rendered when
|
|
257
|
+
// ActiveAdminPrism::Configuration#flash_auto_dismiss is on (see
|
|
258
|
+
// flash_messages.rb), so its presence already implies a duration to
|
|
259
|
+
// animate against. "--prism-flash-duration" is set inline per-flash
|
|
260
|
+
// (flash_messages.rb) rather than read from js-src/prism.js's own
|
|
261
|
+
// "data-prism-auto-dismiss-ms" (rendered once on the whole ".flashes"
|
|
262
|
+
// wrapper, not per card) — CSS can't read a JS-parsed value, so the same
|
|
263
|
+
// number is rendered twice rather than having JS set the animation
|
|
264
|
+
// itself. scaleX (not animating `width` directly) is what lets the
|
|
265
|
+
// browser run this on the compositor instead of laying out every frame.
|
|
266
|
+
.prism-flash-progress {
|
|
267
|
+
position: absolute;
|
|
268
|
+
left: 0;
|
|
269
|
+
right: 0;
|
|
270
|
+
bottom: 0;
|
|
271
|
+
height: 3px;
|
|
272
|
+
transform-origin: left center;
|
|
273
|
+
animation: prism-flash-countdown var(--prism-flash-duration, 5000ms) linear forwards;
|
|
274
|
+
|
|
275
|
+
// Paused (not hidden) rather than reset to full width — a flash a
|
|
276
|
+
// visitor is actively reading (mouse over it) shouldn't keep silently
|
|
277
|
+
// ticking down and vanish out from under them.
|
|
278
|
+
body.active_admin .flash:hover & {
|
|
279
|
+
animation-play-state: paused;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
@keyframes prism-flash-countdown {
|
|
284
|
+
from {
|
|
285
|
+
transform: scaleX(1);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
to {
|
|
289
|
+
transform: scaleX(0);
|
|
153
290
|
}
|
|
154
291
|
}
|
|
155
292
|
|
data/scss-src/_forms.scss
CHANGED
|
@@ -20,6 +20,21 @@ form {
|
|
|
20
20
|
font-weight: 600;
|
|
21
21
|
font-size: 0.9em;
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
// ActiveAdmin core's form layout floats each field row's <label>
|
|
25
|
+
// (float: left; width: 20% — active_admin's own _forms.scss) as its
|
|
26
|
+
// two-column label/input technique. Without a clearfix, a floated
|
|
27
|
+
// label's height doesn't count toward its own <li>'s box, so a short
|
|
28
|
+
// row right after one whose label this theme deliberately does NOT
|
|
29
|
+
// float (e.g. a boolean field, or `as: :prism_toggle` above) can let
|
|
30
|
+
// the *next* row's own floated label render up alongside the previous
|
|
31
|
+
// row instead of starting its own line below it. Same class of
|
|
32
|
+
// fragility the button row below already had (float has no effect on
|
|
33
|
+
// siblings once contained) — same fix here, kept to a plain clearfix
|
|
34
|
+
// rather than a full flex rewrite of every field row.
|
|
35
|
+
> ol > li {
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
}
|
|
23
38
|
}
|
|
24
39
|
|
|
25
40
|
input[type="text"],
|
|
@@ -162,12 +177,28 @@ form {
|
|
|
162
177
|
}
|
|
163
178
|
}
|
|
164
179
|
|
|
180
|
+
// ActiveAdmin's own CSS lays these out via `float: left` on each `li`
|
|
181
|
+
// (mixins/_buttons.scss's basic-button + _forms.scss's `fieldset.buttons
|
|
182
|
+
// li, fieldset.actions li { float: left; }`) — fragile in practice: it
|
|
183
|
+
// only takes one host app's own CSS reset (or a form with an unusually
|
|
184
|
+
// long submit label, or a differently-structured actions bar) for that
|
|
185
|
+
// float to be lost, at which point every `li` (a block-level list item
|
|
186
|
+
// by default) stacks vertically instead of sitting in a row. Flexbox
|
|
187
|
+
// sidesteps this rather than trying to out-specificity AA's float rule:
|
|
188
|
+
// per spec, `float` has no effect on a flex item at all, so this simply
|
|
189
|
+
// wins outright regardless of load order/specificity, and doesn't
|
|
190
|
+
// depend on every button happening to fit on one line the way floats do.
|
|
165
191
|
.buttons,
|
|
166
192
|
.actions {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
193
|
+
> ol {
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-wrap: wrap;
|
|
196
|
+
align-items: center;
|
|
197
|
+
gap: 10px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
li {
|
|
201
|
+
padding: 0;
|
|
171
202
|
}
|
|
172
203
|
}
|
|
173
204
|
}
|
data/scss-src/_login.scss
CHANGED
|
@@ -71,10 +71,11 @@ body.logged_out:has(.prism-login-brand) {
|
|
|
71
71
|
margin: 0 auto;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
.flashes
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
// No login-specific ".flashes" override here (there used to be one,
|
|
75
|
+
// sizing it to the centered login card's own width) — .flashes is a
|
|
76
|
+
// fixed-position toast stack now (scss-src/_base.scss), anchored to the
|
|
77
|
+
// viewport corner rather than laid out inline above the card, so the
|
|
78
|
+
// same global sizing/position applies here unmodified too.
|
|
78
79
|
|
|
79
80
|
#active_admin_content {
|
|
80
81
|
width: 100%;
|
data/scss-src/_panels.scss
CHANGED
|
@@ -156,6 +156,15 @@ body:has(.prism-collapsible-panel):not(.prism-filters-open) {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
&.open {
|
|
159
|
+
// Both this element and .panel_contents inherit overflow:hidden from
|
|
160
|
+
// the collapsed state above (needed there to clip the height-0
|
|
161
|
+
// content and, on .panel itself, to keep the base .panel rule's
|
|
162
|
+
// rounded-corner clipping) — reset to visible once open, otherwise a
|
|
163
|
+
// filter using a Select2 dropdown (e.g. a belongs_to filter's
|
|
164
|
+
// .select_and_search field) gets its open dropdown list clipped/
|
|
165
|
+
// garbled against this panel's own bounds, since Select2 renders its
|
|
166
|
+
// dropdown as a sibling near the input rather than inside it.
|
|
167
|
+
overflow: visible;
|
|
159
168
|
background: $prism-bg-card;
|
|
160
169
|
border-color: $prism-border-color;
|
|
161
170
|
box-shadow: $prism-shadow-card;
|
|
@@ -186,6 +195,7 @@ body:has(.prism-collapsible-panel):not(.prism-filters-open) {
|
|
|
186
195
|
}
|
|
187
196
|
|
|
188
197
|
.panel_contents {
|
|
198
|
+
overflow: visible;
|
|
189
199
|
max-height: 1200px;
|
|
190
200
|
opacity: 1;
|
|
191
201
|
padding-top: 20px;
|
|
@@ -200,6 +210,7 @@ body:has(.prism-collapsible-panel):not(.prism-filters-open) {
|
|
|
200
210
|
// filters_sidebar.rb skips adding the icon/label markup entirely, so this
|
|
201
211
|
// rule is mostly a no-op safety net rather than the primary mechanism).
|
|
202
212
|
body.prism-filters-collapsible-disabled .prism-collapsible-panel {
|
|
213
|
+
overflow: visible;
|
|
203
214
|
background: $prism-bg-card;
|
|
204
215
|
border-color: $prism-border-color;
|
|
205
216
|
box-shadow: $prism-shadow-card;
|
|
@@ -225,6 +236,167 @@ body.prism-filters-collapsible-disabled .prism-collapsible-panel {
|
|
|
225
236
|
}
|
|
226
237
|
}
|
|
227
238
|
|
|
239
|
+
// AA core's own ".table_tools" (active_admin/views/pages/index.rb,
|
|
240
|
+
// styled by its components/_table_tools.scss) is a clearfixed block whose
|
|
241
|
+
// children (the Batch Actions dropdown, scope tabs) float left. Flexbox
|
|
242
|
+
// is what puts .prism-active-filters-bar below on the same row — floats
|
|
243
|
+
// have no effect on flex items regardless of specificity/load order, same
|
|
244
|
+
// rationale as the form actions row in _forms.scss.
|
|
245
|
+
.table_tools {
|
|
246
|
+
display: flex;
|
|
247
|
+
flex-wrap: wrap;
|
|
248
|
+
align-items: center;
|
|
249
|
+
// row-gap only (not the shorthand "gap", i.e. no column-gap) —
|
|
250
|
+
// .prism-active-filters-bar below is pushed to this row's far end via
|
|
251
|
+
// `margin-left: auto`, not `justify-content`, and a nonzero column-gap
|
|
252
|
+
// on the same axis as that auto margin gets double-counted by the auto
|
|
253
|
+
// margin's own free-space math, leaving exactly one gap's worth of
|
|
254
|
+
// unclaimed space *after* the last item instead of before it — the bar
|
|
255
|
+
// fell short of the table's own right edge by exactly 12px. row-gap
|
|
256
|
+
// still spaces .table_tools_actions from the bar vertically if they
|
|
257
|
+
// wrap onto separate lines on a narrow viewport, without that bug.
|
|
258
|
+
row-gap: 12px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// New wrapper (not AA's own markup) around whatever .table_tools would
|
|
262
|
+
// have rendered directly before — see
|
|
263
|
+
// lib/active_admin/views/active_filters_bar.rb#build_table_tools. Only
|
|
264
|
+
// present when any_table_tools? is true.
|
|
265
|
+
.table_tools_actions {
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-wrap: wrap;
|
|
268
|
+
align-items: center;
|
|
269
|
+
gap: 10px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Compact "current scope + active filters" bar, rendered beside the Batch
|
|
273
|
+
// Actions button/scope tabs instead of ActiveAdmin core's own
|
|
274
|
+
// #sidebar-based "Search status" panel — see
|
|
275
|
+
// lib/active_admin/views/active_filters_bar.rb (Ruby side,
|
|
276
|
+
// ActiveAdminPrism::Configuration#active_filters_bar) for why: that
|
|
277
|
+
// sidebar panel is a child of #sidebar, so it gets squeezed down to the
|
|
278
|
+
// same 72px icon gutter as the Filters form whenever collapsible_filters
|
|
279
|
+
// has it collapsed, and its content (one "field contains value" sentence
|
|
280
|
+
// per active filter) has nowhere to fit in 72px and overflows out over
|
|
281
|
+
// the table instead of shrinking cleanly. This reuses that same Ruby
|
|
282
|
+
// component's markup/i18n (ActiveAdmin::Views::ActiveFiltersSidebarContent)
|
|
283
|
+
// wholesale — restyled here as a single horizontal row of pill tags
|
|
284
|
+
// instead of a vertical sidebar list, rather than reimplemented.
|
|
285
|
+
//
|
|
286
|
+
// Given its own tinted background/border (the theme's primary color,
|
|
287
|
+
// same tokens as an active nav item or a focused input's ring) rather
|
|
288
|
+
// than a plain card, so it reads as a distinct, "something is filtered"
|
|
289
|
+
// signal at a glance next to the neutral Batch Actions button beside it —
|
|
290
|
+
// not just another gray panel a visitor could mistake for chrome.
|
|
291
|
+
.prism-active-filters-bar {
|
|
292
|
+
// inline-flex (not the plain block a bare `div` defaults to) sizes this
|
|
293
|
+
// to its own content instead of stretching to fill .table_tools's
|
|
294
|
+
// remaining width. margin-left: auto pushes it to the row's far end
|
|
295
|
+
// regardless of whether .table_tools_actions exists beside it (only
|
|
296
|
+
// rendered `if any_table_tools?` — a resource with filters active but
|
|
297
|
+
// no batch actions/scopes has nothing else in this row at all).
|
|
298
|
+
display: inline-flex;
|
|
299
|
+
max-width: 100%;
|
|
300
|
+
margin-left: auto;
|
|
301
|
+
padding: 8px 14px;
|
|
302
|
+
background: $prism-color-primary-light;
|
|
303
|
+
border: 1px solid rgba($prism-color-primary, 0.3);
|
|
304
|
+
border-left: 3px solid $prism-color-primary;
|
|
305
|
+
border-radius: $prism-radius;
|
|
306
|
+
font-size: 0.85em;
|
|
307
|
+
// Clicking it opens the Filters panel (js-src/prism.js) — a plain
|
|
308
|
+
// hover/focus cue rather than restyling the whole card on hover, so it
|
|
309
|
+
// doesn't fight with the already-deliberate "eye-catching" tinted look.
|
|
310
|
+
cursor: pointer;
|
|
311
|
+
transition: box-shadow $prism-transition-fast;
|
|
312
|
+
|
|
313
|
+
&:hover,
|
|
314
|
+
&:focus-visible {
|
|
315
|
+
box-shadow: 0 0 0 3px rgba($prism-color-primary, 0.15);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
&:focus-visible {
|
|
319
|
+
outline: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// The builder_method wraps ActiveFiltersSidebarContent's own output in a
|
|
323
|
+
// ".active_filters_sidebar_content" div (Arbre::Component's own
|
|
324
|
+
// convention) — this, not .prism-active-filters-bar itself, is the
|
|
325
|
+
// direct parent of the "Scope:"/"Current filters:" markup below.
|
|
326
|
+
.active_filters_sidebar_content {
|
|
327
|
+
display: flex;
|
|
328
|
+
flex-wrap: wrap;
|
|
329
|
+
align-items: center;
|
|
330
|
+
gap: 8px 14px;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// ActiveFiltersSidebarContent#scope_block's "Scope:" <h4> (only present
|
|
334
|
+
// when a scope is active) + its value <b class="current_scope_name">.
|
|
335
|
+
> .active_filters_sidebar_content > h4 {
|
|
336
|
+
margin: 0;
|
|
337
|
+
font-size: 1em;
|
|
338
|
+
font-weight: 700;
|
|
339
|
+
text-transform: uppercase;
|
|
340
|
+
letter-spacing: 0.04em;
|
|
341
|
+
color: $prism-color-primary-dark;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.current_scope_name {
|
|
345
|
+
color: $prism-color-primary-dark;
|
|
346
|
+
font-weight: 700;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// #filters_list wraps its own "Current filters:" <h4> + <ul> in a
|
|
350
|
+
// `div style="margin-top: 10px"`, sized for stacking under the scope
|
|
351
|
+
// line in a vertical sidebar — reset that now that everything sits
|
|
352
|
+
// inline in the same row instead.
|
|
353
|
+
> .active_filters_sidebar_content > div {
|
|
354
|
+
display: flex;
|
|
355
|
+
flex-wrap: wrap;
|
|
356
|
+
align-items: center;
|
|
357
|
+
gap: 8px 14px;
|
|
358
|
+
margin-top: 0 !important;
|
|
359
|
+
|
|
360
|
+
> h4 {
|
|
361
|
+
margin: 0 !important;
|
|
362
|
+
font-size: 1em;
|
|
363
|
+
font-weight: 700;
|
|
364
|
+
text-transform: uppercase;
|
|
365
|
+
letter-spacing: 0.04em;
|
|
366
|
+
color: $prism-color-primary-dark;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
> ul {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-wrap: wrap;
|
|
372
|
+
gap: 6px;
|
|
373
|
+
margin: 0;
|
|
374
|
+
padding: 0;
|
|
375
|
+
list-style: none;
|
|
376
|
+
|
|
377
|
+
li {
|
|
378
|
+
display: inline-flex;
|
|
379
|
+
align-items: center;
|
|
380
|
+
gap: 4px;
|
|
381
|
+
padding: 4px 10px;
|
|
382
|
+
border-radius: $prism-radius-pill;
|
|
383
|
+
background: $prism-bg-card;
|
|
384
|
+
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
|
|
385
|
+
line-height: 1.4;
|
|
386
|
+
|
|
387
|
+
span {
|
|
388
|
+
color: $prism-text-muted;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
b {
|
|
392
|
+
font-weight: 700;
|
|
393
|
+
color: $prism-color-primary-dark;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
228
400
|
.blank_slate_container {
|
|
229
401
|
.blank_slate {
|
|
230
402
|
background: $prism-bg-card;
|