@saltcorn/workflow-editor 1.6.0-alpha.6 → 1.6.0-alpha.8

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.
package/src/workflow.css CHANGED
@@ -1,15 +1,21 @@
1
1
  .wf-shell {
2
2
  padding: 0;
3
+ padding-right: var(--wf-shell-padding-right, 0px);
3
4
  height: 100%;
4
5
  min-height: 0;
5
6
  display: flex;
6
7
  flex-direction: column;
8
+ position: relative;
9
+ transition: padding-right 0.25s ease;
7
10
  --wf-edge: #6c757d;
8
11
  --wf-edge-adder: #0d6efd;
9
12
  --wf-edge-loop: #f59f00;
10
13
  --wf-edge-label: #495057;
11
14
  --wf-handle-border: #3f3f3f;
12
15
  --wf-handle-bg: #fff;
16
+ --wf-handle-source-bg: #5a5a5a;
17
+ --wf-drawer-width: 50vw;
18
+ --wf-drawer-offset: -4px;
13
19
  }
14
20
 
15
21
  .wf-toolbar {
@@ -33,6 +39,19 @@
33
39
  background: #fafbfc;
34
40
  }
35
41
 
42
+ /* Ensure nodes visually sit above edge labels/buttons */
43
+ .wf-shell .react-flow__node {
44
+ z-index: 5;
45
+ }
46
+
47
+ .wf-shell .react-flow__edge-labels {
48
+ z-index: 2;
49
+ }
50
+ .react-flow .react-flow__edges svg {
51
+ overflow: visible !important;
52
+ z-index: 1040;
53
+ }
54
+
36
55
  .wf-empty {
37
56
  padding: 12px;
38
57
  color: #6c757d;
@@ -156,6 +175,61 @@
156
175
  outline-offset: 2px;
157
176
  }
158
177
 
178
+ .wf-drawer {
179
+ position: fixed;
180
+ top: 0;
181
+ right: 0;
182
+ height: 100%;
183
+ width: min(95vw, max(var(--wf-drawer-width), 600px));
184
+ background: var(--bs-body-bg, #fff);
185
+ color: var(--bs-body-color, #212529);
186
+ border-left: 1px solid var(--bs-card-border-color, #e2e6ea);
187
+ display: flex;
188
+ flex-direction: column;
189
+ z-index: 1050;
190
+ box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
191
+ transform: translateX(100%);
192
+ transition: transform 0.25s ease;
193
+ overflow: visible;
194
+ }
195
+
196
+ .wf-drawer--open {
197
+ transform: translateX(0);
198
+ }
199
+
200
+ .wf-drawer__resize {
201
+ position: absolute;
202
+ left: -6px;
203
+ top: 0;
204
+ width: 10px;
205
+ height: 100%;
206
+ cursor: ew-resize;
207
+ z-index: 1;
208
+ background: linear-gradient(
209
+ 90deg,
210
+ rgba(0, 0, 0, 0) 0%,
211
+ rgba(0, 0, 0, 0.08) 50%,
212
+ rgba(0, 0, 0, 0) 100%
213
+ );
214
+ }
215
+
216
+ .wf-drawer__header {
217
+ padding: 16px 18px 12px;
218
+ border-bottom: 1px solid var(--bs-card-border-color, #e2e6ea);
219
+ }
220
+
221
+ .wf-drawer__body {
222
+ padding: 16px 18px;
223
+ flex: 1 1 auto;
224
+ min-height: 0;
225
+ overflow-y: auto;
226
+ }
227
+
228
+ .wf-drawer__footer {
229
+ padding: 12px 18px;
230
+ border-top: 1px solid var(--bs-card-border-color, #e2e6ea);
231
+ }
232
+
159
233
  .wf-modal-backdrop {
160
234
  position: fixed;
161
235
  top: 0;
@@ -170,7 +244,7 @@
170
244
  }
171
245
 
172
246
  .wf-modal {
173
- /* background: var(--bs-card-bg, #fff); */
247
+ /* background: var(--bs-body-bg, #fff); */
174
248
  /* color: var(--bs-body-color, #212529); */
175
249
  border-radius: 10px;
176
250
  /* border: 1px solid var(--bs-card-border-color, #e2e6ea); */
@@ -182,9 +256,30 @@
182
256
  /* box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); */
183
257
  }
184
258
 
259
+ @media (max-width: 768px) {
260
+ .wf-shell--drawer-open {
261
+ padding-right: var(--wf-shell-padding-right, 0px);
262
+ }
263
+
264
+ .wf-drawer {
265
+ width: min(480px, 100vw);
266
+ }
267
+ }
268
+
185
269
  .wf-shell .react-flow__edge-path {
186
270
  stroke: var(--wf-edge);
187
271
  fill: none;
272
+ stroke-width: 1.5px;
273
+ }
274
+
275
+ .wf-shell .wf-edge-selected .react-flow__edge-path {
276
+ stroke: var(--wf-edge-selected, #0d6efd) !important;
277
+ stroke-width: 2.4px;
278
+ filter: drop-shadow(0 0 4px rgba(13, 110, 253, 0.35));
279
+ }
280
+
281
+ .wf-shell .react-flow__connection-path {
282
+ stroke-width: 1.5px;
188
283
  }
189
284
 
190
285
  .wf-shell .react-flow__edge-text {
@@ -196,6 +291,20 @@
196
291
  border-color: var(--wf-handle-border);
197
292
  }
198
293
 
294
+ .wf-shell .react-flow__handle.wf-handle-source {
295
+ background: var(--wf-handle-source-bg) !important;
296
+ border-color: var(--wf-handle-source-bg) !important;
297
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
298
+ }
299
+ .wf-shell .react-flow__handle.wf-handle-source-loop {
300
+ background: var(--wf-edge-loop) !important;
301
+ border-color: var(--wf-edge-loop) !important;
302
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
303
+ }
304
+ .wf-shell .react-flow__handle.wf-handle-target-loop {
305
+ border-color: var(--wf-edge-loop) !important;
306
+ }
307
+
199
308
  .wf-edge-add-button {
200
309
  width: 18px;
201
310
  height: 18px;
@@ -230,4 +339,17 @@
230
339
  --wf-edge-label: #c0c4cf;
231
340
  --wf-handle-border: #c0c4cf;
232
341
  --wf-handle-bg: #2f3139;
342
+ --wf-handle-source-bg: #8a8a8a;
343
+ }
344
+
345
+ /* Temporary vars fallbacks */
346
+ .wf-drawer {
347
+ --bs-body-bg: #fff;
348
+ --bs-body-color: #212529;
349
+ --bs-card-border-color: #e2e6ea;
350
+ }
351
+ [data-bs-theme="dark"] .wf-drawer {
352
+ --bs-body-bg: #303030;
353
+ --bs-body-color: #fff;
354
+ --bs-card-border-color: #44484e;
233
355
  }