@saltcorn/workflow-editor 1.6.0-alpha.5 → 1.6.0-alpha.7

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
@@ -4,12 +4,20 @@
4
4
  min-height: 0;
5
5
  display: flex;
6
6
  flex-direction: column;
7
+ position: relative;
8
+ transition: padding-right 0.25s ease;
7
9
  --wf-edge: #6c757d;
8
10
  --wf-edge-adder: #0d6efd;
9
11
  --wf-edge-loop: #f59f00;
10
12
  --wf-edge-label: #495057;
11
13
  --wf-handle-border: #3f3f3f;
12
14
  --wf-handle-bg: #fff;
15
+ --wf-handle-source-bg: #5a5a5a;
16
+ --wf-drawer-width: 50vw;
17
+ }
18
+
19
+ .wf-shell--drawer-open {
20
+ padding-right: calc(var(--wf-drawer-width) - 44px);
13
21
  }
14
22
 
15
23
  .wf-toolbar {
@@ -33,6 +41,15 @@
33
41
  background: #fafbfc;
34
42
  }
35
43
 
44
+ /* Ensure nodes visually sit above edge labels/buttons */
45
+ .wf-shell .react-flow__node {
46
+ z-index: 5;
47
+ }
48
+
49
+ .wf-shell .react-flow__edge-labels {
50
+ z-index: 2;
51
+ }
52
+
36
53
  .wf-empty {
37
54
  padding: 12px;
38
55
  color: #6c757d;
@@ -156,6 +173,61 @@
156
173
  outline-offset: 2px;
157
174
  }
158
175
 
176
+ .wf-drawer {
177
+ position: fixed;
178
+ top: 0;
179
+ right: 0;
180
+ height: 100%;
181
+ width: min(95vw, max(var(--wf-drawer-width), 600px));
182
+ background: var(--bs-body-bg, #fff);
183
+ color: var(--bs-body-color, #212529);
184
+ border-left: 1px solid var(--bs-card-border-color, #e2e6ea);
185
+ display: flex;
186
+ flex-direction: column;
187
+ z-index: 1050;
188
+ box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
189
+ transform: translateX(100%);
190
+ transition: transform 0.25s ease;
191
+ overflow: visible;
192
+ }
193
+
194
+ .wf-drawer--open {
195
+ transform: translateX(0);
196
+ }
197
+
198
+ .wf-drawer__resize {
199
+ position: absolute;
200
+ left: -6px;
201
+ top: 0;
202
+ width: 10px;
203
+ height: 100%;
204
+ cursor: ew-resize;
205
+ z-index: 1;
206
+ background: linear-gradient(
207
+ 90deg,
208
+ rgba(0, 0, 0, 0) 0%,
209
+ rgba(0, 0, 0, 0.08) 50%,
210
+ rgba(0, 0, 0, 0) 100%
211
+ );
212
+ }
213
+
214
+ .wf-drawer__header {
215
+ padding: 16px 18px 12px;
216
+ border-bottom: 1px solid var(--bs-card-border-color, #e2e6ea);
217
+ }
218
+
219
+ .wf-drawer__body {
220
+ padding: 16px 18px;
221
+ flex: 1 1 auto;
222
+ min-height: 0;
223
+ overflow-y: auto;
224
+ }
225
+
226
+ .wf-drawer__footer {
227
+ padding: 12px 18px;
228
+ border-top: 1px solid var(--bs-card-border-color, #e2e6ea);
229
+ }
230
+
159
231
  .wf-modal-backdrop {
160
232
  position: fixed;
161
233
  top: 0;
@@ -170,7 +242,7 @@
170
242
  }
171
243
 
172
244
  .wf-modal {
173
- /* background: var(--bs-card-bg, #fff); */
245
+ /* background: var(--bs-body-bg, #fff); */
174
246
  /* color: var(--bs-body-color, #212529); */
175
247
  border-radius: 10px;
176
248
  /* border: 1px solid var(--bs-card-border-color, #e2e6ea); */
@@ -182,9 +254,30 @@
182
254
  /* box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); */
183
255
  }
184
256
 
257
+ @media (max-width: 768px) {
258
+ .wf-shell--drawer-open {
259
+ padding-right: 0;
260
+ }
261
+
262
+ .wf-drawer {
263
+ width: min(480px, 100vw);
264
+ }
265
+ }
266
+
185
267
  .wf-shell .react-flow__edge-path {
186
268
  stroke: var(--wf-edge);
187
269
  fill: none;
270
+ stroke-width: 1.5px;
271
+ }
272
+
273
+ .wf-shell .wf-edge-selected .react-flow__edge-path {
274
+ stroke: var(--wf-edge-selected, #0d6efd) !important;
275
+ stroke-width: 2.4px;
276
+ filter: drop-shadow(0 0 4px rgba(13, 110, 253, 0.35));
277
+ }
278
+
279
+ .wf-shell .react-flow__connection-path {
280
+ stroke-width: 1.5px;
188
281
  }
189
282
 
190
283
  .wf-shell .react-flow__edge-text {
@@ -196,6 +289,20 @@
196
289
  border-color: var(--wf-handle-border);
197
290
  }
198
291
 
292
+ .wf-shell .react-flow__handle.wf-handle-source {
293
+ background: var(--wf-handle-source-bg) !important;
294
+ border-color: var(--wf-handle-source-bg) !important;
295
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
296
+ }
297
+ .wf-shell .react-flow__handle.wf-handle-source-loop {
298
+ background: var(--wf-edge-loop) !important;
299
+ border-color: var(--wf-edge-loop) !important;
300
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
301
+ }
302
+ .wf-shell .react-flow__handle.wf-handle-target-loop {
303
+ border-color: var(--wf-edge-loop) !important;
304
+ }
305
+
199
306
  .wf-edge-add-button {
200
307
  width: 18px;
201
308
  height: 18px;
@@ -230,4 +337,17 @@
230
337
  --wf-edge-label: #c0c4cf;
231
338
  --wf-handle-border: #c0c4cf;
232
339
  --wf-handle-bg: #2f3139;
340
+ --wf-handle-source-bg: #8a8a8a;
341
+ }
342
+
343
+ /* Temporary vars fallbacks */
344
+ .wf-drawer {
345
+ --bs-body-bg: #fff;
346
+ --bs-body-color: #212529;
347
+ --bs-card-border-color: #e2e6ea;
348
+ }
349
+ [data-bs-theme="dark"] .wf-drawer {
350
+ --bs-body-bg: #303030;
351
+ --bs-body-color: #fff;
352
+ --bs-card-border-color: #44484e;
233
353
  }
@@ -1,61 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
2
-
3
- /**
4
- * @license React
5
- * react-dom.production.min.js
6
- *
7
- * Copyright (c) Facebook, Inc. and its affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */
12
-
13
- /**
14
- * @license React
15
- * react-jsx-runtime.production.min.js
16
- *
17
- * Copyright (c) Facebook, Inc. and its affiliates.
18
- *
19
- * This source code is licensed under the MIT license found in the
20
- * LICENSE file in the root directory of this source tree.
21
- */
22
-
23
- /**
24
- * @license React
25
- * react.production.min.js
26
- *
27
- * Copyright (c) Facebook, Inc. and its affiliates.
28
- *
29
- * This source code is licensed under the MIT license found in the
30
- * LICENSE file in the root directory of this source tree.
31
- */
32
-
33
- /**
34
- * @license React
35
- * scheduler.production.min.js
36
- *
37
- * Copyright (c) Facebook, Inc. and its affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */
42
-
43
- /**
44
- * @license React
45
- * use-sync-external-store-shim.production.js
46
- *
47
- * Copyright (c) Meta Platforms, Inc. and affiliates.
48
- *
49
- * This source code is licensed under the MIT license found in the
50
- * LICENSE file in the root directory of this source tree.
51
- */
52
-
53
- /**
54
- * @license React
55
- * use-sync-external-store-shim/with-selector.production.js
56
- *
57
- * Copyright (c) Meta Platforms, Inc. and affiliates.
58
- *
59
- * This source code is licensed under the MIT license found in the
60
- * LICENSE file in the root directory of this source tree.
61
- */