PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.5
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 All 203 releases
betterdocs / react-src / admin / scss / faq-builder / _faq-list.scss

_faq-list.scss in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.9.5, at react-src/admin/scss/faq-builder/_faq-list.scss

289 lines 8.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Spacing between FAQ rows inside an expanded group / search results.
2 .bd-faq-list-droppable {
3 display: flex;
4 flex-direction: column;
5 gap: 10px;
6 }
7
8 // Individual FAQ rows inside an expanded group (and reused for searched FAQs).
9 .bd-faq {
10 display: flex;
11 flex-direction: column;
12 background: var(--base-background, #fff);
13 border: 1px solid var(--text-color-200);
14 border-radius: 8px;
15 transition: box-shadow 0.15s ease, border-color 0.15s ease;
16
17 // Flash a FAQ row right after it's created in / moved into a group — the
18 // same soft mint highlight a new FAQ group gets: the head background washes
19 // mint and the border pulses green, then both settle back.
20 &.bd-faq--highlight {
21 animation: bd-faq-row-flash 2.4s ease-out;
22 border-color: var(--base-color-700, #00b884);
23
24 > .bd-faq-head {
25 animation: bd-faq-row-head-flash 2.4s ease-out;
26 }
27 }
28
29 .bd-faq-head {
30 display: flex;
31 align-items: center;
32 gap: 12px;
33 padding: 12px 16px;
34 background: var(--base-background, #fff);
35 border-radius: 12px;
36 min-height: 44px;
37 box-sizing: border-box;
38
39 .bd-faq-title-wrap {
40 flex: 1;
41 min-width: 0;
42 display: flex;
43 align-items: center;
44 gap: 10px;
45 }
46
47 .bd-faq-title {
48 font-size: 14px;
49 font-weight: 500;
50 line-height: 1.4;
51 margin: 0;
52 color: var(--text-color-900);
53 cursor: pointer;
54 }
55
56 // Uncategorized FAQs render a bare title (no wrap); keep it filling the
57 // row so the action cluster stays right-aligned.
58 > .bd-faq-title {
59 flex: 1;
60 }
61
62 // FAQ-row toggle — smaller than the group / form toggles.
63 .bd-faq-toggler {
64 width: 32px;
65 height: 18px;
66 border-radius: 18px;
67 .knobs:before {
68 top: 2px;
69 left: 2px;
70 width: 14px;
71 height: 14px;
72 padding: 0;
73 }
74 .checkbox:checked + .knobs:before {
75 left: 16px;
76 }
77 }
78
79 // "Drafted" pill badge.
80 .bd-faq-status-badge {
81 flex-shrink: 0;
82 display: inline-flex;
83 align-items: center;
84 padding: 4px 10px;
85 border-radius: 999px;
86 font-size: 11px;
87 font-weight: 600;
88 white-space: nowrap;
89 background: var(--warning-50);
90 color: var(--warning-700);
91 }
92
93 .bd-faq-button-reset {
94 background: transparent;
95 border: none;
96 padding: 0;
97 display: flex;
98 align-items: center;
99 }
100
101 // Drag handle — 6-dot grip (grip.svg uses fill:currentColor).
102 .bd-faq-drag-button {
103 cursor: grab;
104 color: var(--text-color-400);
105 svg,
106 img {
107 width: 15px;
108 height: 15px;
109 }
110 }
111
112 .bd-faq-action-button {
113 cursor: pointer;
114 width: 28px;
115 height: 28px;
116 border-radius: 7px;
117 justify-content: center;
118 transition: background 0.15s ease;
119 img,
120 svg {
121 width: 14px;
122 color: var(--text-color-600);
123 fill: var(--text-color-600);
124 }
125 &:hover {
126 background: var(--text-color-100);
127 img,
128 svg {
129 color: var(--text-color-900);
130 fill: var(--text-color-900);
131 }
132 }
133 }
134
135 .bd-faq-action-button.magic-icon {
136 svg {
137 color: var(--text-color-600);
138 stroke: var(--text-color-600);
139 fill: none !important;
140 path {
141 stroke: var(--text-color-600);
142 }
143 }
144 &:hover {
145 svg path {
146 stroke: var(--text-color-900) !important;
147 }
148 }
149 }
150
151 // Delete uses an outline (stroke) trash icon to match the edit / duplicate
152 // / AI icons. The base .bd-faq-action-button rule forces fill:text-600,
153 // which would fill the open outline paths — null it out and colour the
154 // stroke instead (same treatment as .magic-icon).
155 .bd-faq-action-button.delete-icon {
156 svg {
157 fill: none !important;
158 stroke: var(--text-color-600);
159 }
160 &:hover {
161 svg {
162 stroke: var(--text-color-900);
163 }
164 }
165 }
166
167 // Accordion toggle — rounded square; soft green when open.
168 .bd-faq-accordion-icon {
169 background: transparent;
170 border: 1px solid transparent;
171 height: 32px;
172 width: 32px;
173 min-height: 32px;
174 border-radius: 8px;
175 display: flex;
176 align-items: center;
177 justify-content: center;
178 cursor: pointer;
179 padding: 0;
180 transition: all 0.2s ease;
181 margin-left: 4px;
182 img,
183 svg {
184 width: 11px;
185 color: var(--text-color-600);
186 fill: var(--text-color-600);
187 transition: all 0.15s ease-in-out;
188 }
189 &:hover {
190 background: var(--text-color-100);
191 }
192 &.active {
193 background: var(--base-color-75);
194 img,
195 svg {
196 color: var(--base-color-700);
197 fill: var(--base-color-700);
198 }
199 }
200 &.active {
201 transform: rotate(180deg);
202 }
203 }
204 }
205
206 .bd-faq-body {
207 background: var(--base-background, #fff);
208 border-radius: 0 0 12px 12px;
209 // Slide open/close via the 0fr→1fr grid track so the editor glides in
210 // smoothly instead of snapping (the old max-height:100000px hack jumped
211 // because the visible range was covered in a sliver of the duration).
212 // The inner wrapper does the clipping; the edit form's react-select menu
213 // is portaled to <body> (see EditFaq) so it is never clipped by it.
214 display: grid;
215 grid-template-rows: 0fr;
216 transition: grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1);
217 &.active {
218 grid-template-rows: 1fr;
219 border-top: 1px solid var(--text-color-200);
220 }
221 .bd-faq-body-inner {
222 overflow: hidden;
223 padding: 0;
224 display: flex;
225 flex-direction: column;
226 }
227 }
228
229 // Open row gets a soft lift.
230 &:has(.bd-faq-body.active) {
231 border-color: var(--text-color-300);
232 box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
233 }
234 }
235
236 .bd-faq-loader {
237 height: 250px;
238 width: 100%;
239 display: flex;
240 align-items: center;
241 justify-content: center;
242 flex-direction: column;
243 svg {
244 height: 25px;
245 width: auto;
246 animation: identifier 1.5s linear infinite;
247 padding-bottom: 1.5px;
248 fill: var(--text-color-500);
249 }
250 .bd-title {
251 font-size: 20px;
252 font-weight: 400;
253 margin-top: 10px;
254 margin-bottom: 0;
255 color: var(--text-color-500);
256 }
257 @keyframes identifier {
258 0% {
259 transform: rotate(0deg);
260 }
261 100% {
262 transform: rotate(360deg);
263 }
264 }
265 }
266
267 // Soft mint flash for a freshly created / moved FAQ row — mirrors the group
268 // flash: a gentle mint ring that fades, and the head background washing mint
269 // then settling back to white.
270 @keyframes bd-faq-row-flash {
271 0%,
272 55% {
273 box-shadow: 0 0 0 3px var(--base-color-75, #ecfdf3);
274 }
275 100% {
276 box-shadow: none;
277 }
278 }
279
280 @keyframes bd-faq-row-head-flash {
281 0%,
282 55% {
283 background: var(--base-color-75, #ecfdf3);
284 }
285 100% {
286 background: var(--base-background, #fff);
287 }
288 }
289