@eccenca/gui-elements 23.1.0-easynav.1 → 23.1.0-easynav.2
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/CHANGELOG.md +5 -0
- package/dist/cjs/components/Depiction/Depiction.js +13 -13
- package/dist/cjs/components/Depiction/Depiction.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js +20 -5
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +17 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/edgeTypes.js +10 -9
- package/dist/cjs/extensions/react-flow/edges/edgeTypes.js.map +1 -1
- package/dist/cjs/extensions/react-flow/index.js +2 -3
- package/dist/cjs/extensions/react-flow/index.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +54 -6
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/components/Depiction/Depiction.js +15 -14
- package/dist/esm/components/Depiction/Depiction.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js +20 -4
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +17 -1
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/edgeTypes.js +10 -9
- package/dist/esm/extensions/react-flow/edges/edgeTypes.js.map +1 -1
- package/dist/esm/extensions/react-flow/index.js +1 -1
- package/dist/esm/extensions/react-flow/index.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +54 -5
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/types/extensions/react-flow/edges/EdgeDefault.d.ts +16 -1
- package/dist/types/extensions/react-flow/edges/EdgeLabel.d.ts +12 -0
- package/dist/types/extensions/react-flow/edges/edgeTypes.d.ts +10 -9
- package/dist/types/extensions/react-flow/index.d.ts +1 -2
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +26 -3
- package/package.json +1 -1
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +2 -2
- package/src/cmem/react-flow/_edges.scss +3 -2
- package/src/components/Depiction/Depiction.tsx +11 -10
- package/src/extensions/react-flow/_config.scss +7 -4
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +60 -5
- package/src/extensions/react-flow/edges/EdgeLabel.tsx +45 -1
- package/src/extensions/react-flow/edges/_edges.scss +131 -33
- package/src/extensions/react-flow/edges/edgeTypes.ts +13 -9
- package/src/extensions/react-flow/edges/stories/EdgeDefault.stories.tsx +34 -13
- package/src/extensions/react-flow/index.ts +2 -2
- package/src/extensions/react-flow/nodes/NodeContent.tsx +93 -7
- package/src/extensions/react-flow/nodes/_nodes.scss +177 -50
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +30 -0
|
@@ -51,22 +51,6 @@
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.#{$eccgui}-graphviz__node--animated {
|
|
55
|
-
animation: pumpingshadow 4 * $reactflow-transition-time linear infinite;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@keyframes pumpingshadow {
|
|
59
|
-
0% {
|
|
60
|
-
box-shadow: 0 0 2 * $reactflow-node-border-width 0 rgba(#fff, 0.9), 0 0 1 * $reactflow-node-border-width 0 rgba($reactflow-edge-stroke-color-selected, 0);
|
|
61
|
-
}
|
|
62
|
-
50% {
|
|
63
|
-
box-shadow: 0 0 2 * $reactflow-node-border-width 6 * $reactflow-node-border-width rgba(#fff, 0.9), 0 0 1 * $reactflow-node-border-width 6 * $reactflow-node-border-width $reactflow-edge-stroke-color-selected;
|
|
64
|
-
}
|
|
65
|
-
100% {
|
|
66
|
-
box-shadow: 0 0 2 * $reactflow-node-border-width 0 rgba(#fff, 0.9), 0 0 1 * $reactflow-node-border-width 0 rgba($reactflow-edge-stroke-color-selected, 0);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
54
|
.#{$eccgui}-graphviz__node--minimal-rectangular,
|
|
71
55
|
.#{$eccgui}-graphviz__node--minimal-circular {
|
|
72
56
|
|
|
@@ -264,12 +248,43 @@
|
|
|
264
248
|
width: 100%;
|
|
265
249
|
}
|
|
266
250
|
|
|
267
|
-
// Node
|
|
251
|
+
// Node border overwrites
|
|
268
252
|
|
|
269
|
-
.#{$eccgui}-graphviz__node--
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
253
|
+
.#{$eccgui}-graphviz__node--border-solid {
|
|
254
|
+
border-style: solid;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.#{$eccgui}-graphviz__node--border-double {
|
|
258
|
+
border-width: 1.5 * $reactflow-node-border-width;
|
|
259
|
+
border-style: double;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.#{$eccgui}-graphviz__node--border-dashed {
|
|
263
|
+
border-style: dashed;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.#{$eccgui}-graphviz__node--border-dotted {
|
|
267
|
+
border-style: dotted;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// Node intent
|
|
271
|
+
|
|
272
|
+
@mixin node-intent-gradient {
|
|
273
|
+
border-image-source: conic-gradient(
|
|
274
|
+
from var(--node-intent-angle),
|
|
275
|
+
transparent,
|
|
276
|
+
var(--node-intent-color) 0.05turn,
|
|
277
|
+
var(--node-intent-color) 0.2turn,
|
|
278
|
+
transparent 0.25turn
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.#{$eccgui}-graphviz__node[class*="#{$eccgui}-intent--"],
|
|
283
|
+
.#{$eccgui}-graphviz__node--animated:not([class*="#{$eccgui}-intent--"]) {
|
|
284
|
+
--node-intent-color: #{$eccgui-color-workspace-text};
|
|
285
|
+
|
|
286
|
+
&:after {
|
|
287
|
+
--node-intent-angle: #{$reactflow-transition-anglestart};
|
|
273
288
|
content: " ";
|
|
274
289
|
display: block;
|
|
275
290
|
position: absolute;
|
|
@@ -277,15 +292,45 @@
|
|
|
277
292
|
left: -2 * $reactflow-node-border-width;
|
|
278
293
|
bottom: -2 * $reactflow-node-border-width;
|
|
279
294
|
right: -2 * $reactflow-node-border-width;
|
|
280
|
-
border-radius: inherit;
|
|
281
|
-
box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-danger-text;
|
|
282
295
|
z-index: -1;
|
|
296
|
+
border-style: solid;
|
|
297
|
+
border-width: 2 * $reactflow-node-border-width;
|
|
298
|
+
@include node-intent-gradient;
|
|
299
|
+
border-image-slice: 1;
|
|
300
|
+
border-image-width: 2 * $reactflow-node-border-width;
|
|
283
301
|
}
|
|
284
302
|
}
|
|
285
303
|
|
|
286
|
-
.#{$eccgui}-graphviz__node--
|
|
287
|
-
|
|
288
|
-
|
|
304
|
+
.#{$eccgui}-graphviz__node.#{$eccgui}-intent--primary {
|
|
305
|
+
--node-intent-color: #{$eccgui-color-primary};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.#{$eccgui}-graphviz__node.#{$eccgui}-intent--accent {
|
|
309
|
+
--node-intent-color: #{$eccgui-color-accent};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.#{$eccgui}-graphviz__node.#{$eccgui}-intent--info {
|
|
313
|
+
--node-intent-color: #{$eccgui-color-info-text};
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.#{$eccgui}-graphviz__node.#{$eccgui}-intent--success {
|
|
317
|
+
--node-intent-color: #{$eccgui-color-success-text};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.#{$eccgui}-graphviz__node.#{$eccgui}-intent--warning {
|
|
321
|
+
--node-intent-color: #{$eccgui-color-warning-text};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.#{$eccgui}-graphviz__node.#{$eccgui}-intent--danger {
|
|
325
|
+
--node-intent-color: #{$eccgui-color-danger-text};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// hode highlight mark
|
|
329
|
+
|
|
330
|
+
.#{$eccgui}-graphviz__node[class*="#{$eccgui}-graphviz__node--highlight-"] {
|
|
331
|
+
|
|
332
|
+
&:before {
|
|
333
|
+
opacity: $eccgui-opacity-disabled;
|
|
289
334
|
content: " ";
|
|
290
335
|
display: block;
|
|
291
336
|
position: absolute;
|
|
@@ -293,38 +338,56 @@
|
|
|
293
338
|
left: -2 * $reactflow-node-border-width;
|
|
294
339
|
bottom: -2 * $reactflow-node-border-width;
|
|
295
340
|
right: -2 * $reactflow-node-border-width;
|
|
296
|
-
|
|
297
|
-
box-shadow:
|
|
298
|
-
|
|
341
|
+
z-index: -2;
|
|
342
|
+
box-shadow:
|
|
343
|
+
0 0 0 2 * $reactflow-node-border-width var(--node-highlight-default-color),
|
|
344
|
+
0 0 0 3.5 * $reactflow-node-border-width var(--node-highlight-alternate-color, var(--node-highlight-default-color));
|
|
345
|
+
border: 0.1px solid transparent; // workaround for Firefox, otherwise shadows are overlayed
|
|
299
346
|
}
|
|
347
|
+
}
|
|
300
348
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
&:after {
|
|
305
|
-
top: -4 * $reactflow-node-border-width;
|
|
306
|
-
left: -4 * $reactflow-node-border-width;
|
|
307
|
-
bottom: -4 * $reactflow-node-border-width;
|
|
308
|
-
right: -4 * $reactflow-node-border-width;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
349
|
+
.#{$eccgui}-graphviz__node--highlight-default {
|
|
350
|
+
--node-highlight-default-color: #{$eccgui-color-accent};
|
|
351
|
+
--node-highlight-alternate-color: #{$eccgui-color-accent};
|
|
311
352
|
}
|
|
312
353
|
|
|
313
|
-
.#{$eccgui}-graphviz__node--highlight-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
}
|
|
354
|
+
.#{$eccgui}-graphviz__node--highlight-alternate {
|
|
355
|
+
--node-highlight-default-color: #{$eccgui-color-primary};
|
|
356
|
+
--node-highlight-alternate-color: #{$eccgui-color-primary};
|
|
317
357
|
}
|
|
318
358
|
|
|
319
|
-
.#{$eccgui}-graphviz__node--highlight-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
359
|
+
.#{$eccgui}-graphviz__node--highlight-default.#{$eccgui}-graphviz__node--highlight-alternate {
|
|
360
|
+
--node-highlight-default-color: #{$eccgui-color-accent};
|
|
361
|
+
--node-highlight-alternate-color: #{$eccgui-color-primary};
|
|
323
362
|
}
|
|
324
363
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
364
|
+
// Node animation
|
|
365
|
+
|
|
366
|
+
@property --node-intent-angle {
|
|
367
|
+
// rule necessary, otherwise increasing --node-intent-angle for animation does not work correctly
|
|
368
|
+
syntax: '<angle>';
|
|
369
|
+
initial-value: #{$reactflow-transition-anglestart};
|
|
370
|
+
inherits: true;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.#{$eccgui}-graphviz__node--animated:after {
|
|
374
|
+
animation: spinningborder 8 * $reactflow-transition-time linear infinite;
|
|
375
|
+
|
|
376
|
+
@keyframes spinningborder {
|
|
377
|
+
to {
|
|
378
|
+
--node-intent-angle: #{$reactflow-transition-anglestart + 360deg};
|
|
379
|
+
}
|
|
380
|
+
@for $step from 1 through 10 {
|
|
381
|
+
/*
|
|
382
|
+
This is a fix/workaround for Firefox/Gecko.
|
|
383
|
+
Looks like "animation" the custom property is not enough.
|
|
384
|
+
It is also necessary to repeat the rule.
|
|
385
|
+
*/
|
|
386
|
+
#{$step*10}#{"%"} {
|
|
387
|
+
--node-intent-angle: #{$reactflow-transition-anglestart + $step * 36deg};
|
|
388
|
+
@include node-intent-gradient;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
328
391
|
}
|
|
329
392
|
}
|
|
330
393
|
|
|
@@ -424,3 +487,67 @@
|
|
|
424
487
|
flex-grow: 0;
|
|
425
488
|
flex-shrink: 0;
|
|
426
489
|
}
|
|
490
|
+
|
|
491
|
+
// Node highlights (@deprecated) // FIXME: remove in v24.0.0
|
|
492
|
+
|
|
493
|
+
.#{$eccgui}-graphviz__node--highlight-success,
|
|
494
|
+
.#{$eccgui}-graphviz__node--highlight-warning,
|
|
495
|
+
.#{$eccgui}-graphviz__node--highlight-danger {
|
|
496
|
+
&:before {
|
|
497
|
+
content: " ";
|
|
498
|
+
display: block;
|
|
499
|
+
position: absolute;
|
|
500
|
+
top: -2 * $reactflow-node-border-width;
|
|
501
|
+
left: -2 * $reactflow-node-border-width;
|
|
502
|
+
bottom: -2 * $reactflow-node-border-width;
|
|
503
|
+
right: -2 * $reactflow-node-border-width;
|
|
504
|
+
border-radius: inherit;
|
|
505
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-danger-text;
|
|
506
|
+
z-index: -1;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.#{$eccgui}-graphviz__node--highlight-match,
|
|
511
|
+
.#{$eccgui}-graphviz__node--highlight-altmatch {
|
|
512
|
+
&:after {
|
|
513
|
+
content: " ";
|
|
514
|
+
display: block;
|
|
515
|
+
position: absolute;
|
|
516
|
+
top: -2 * $reactflow-node-border-width;
|
|
517
|
+
left: -2 * $reactflow-node-border-width;
|
|
518
|
+
bottom: -2 * $reactflow-node-border-width;
|
|
519
|
+
right: -2 * $reactflow-node-border-width;
|
|
520
|
+
border-radius: inherit;
|
|
521
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-accent;
|
|
522
|
+
z-index: -1;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
&.#{$eccgui}-graphviz__node--highlight-success,
|
|
526
|
+
&.#{$eccgui}-graphviz__node--highlight-warning,
|
|
527
|
+
&.#{$eccgui}-graphviz__node--highlight-danger {
|
|
528
|
+
&:after {
|
|
529
|
+
top: -4 * $reactflow-node-border-width;
|
|
530
|
+
left: -4 * $reactflow-node-border-width;
|
|
531
|
+
bottom: -4 * $reactflow-node-border-width;
|
|
532
|
+
right: -4 * $reactflow-node-border-width;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.#{$eccgui}-graphviz__node--highlight-success {
|
|
538
|
+
&:before {
|
|
539
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-success-text;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.#{$eccgui}-graphviz__node--highlight-warning {
|
|
544
|
+
&:before {
|
|
545
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-warning-text;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.#{$eccgui}-graphviz__node--highlight-altmatch {
|
|
550
|
+
&:after {
|
|
551
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width complement($eccgui-color-primary);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
TagList,
|
|
14
14
|
} from "./../../../../index";
|
|
15
15
|
import canonicalIcons from "./../../../../components/Icon/canonicalIconNames";
|
|
16
|
+
import { Definitions } from "../../../../common/Intent";
|
|
16
17
|
|
|
17
18
|
import { NodeContent } from "./../NodeContent";
|
|
18
19
|
import { nodeTypes } from "./../nodeTypes";
|
|
@@ -65,6 +66,35 @@ export default {
|
|
|
65
66
|
control: "select",
|
|
66
67
|
options: [...(Object.keys(canonicalIcons))],
|
|
67
68
|
},
|
|
69
|
+
highlightedState: {
|
|
70
|
+
control: "select",
|
|
71
|
+
options: ["Not set", "success", "warning", "danger", "match", "altmatch", "danger + match"],
|
|
72
|
+
mapping: {
|
|
73
|
+
"Not set": undefined,
|
|
74
|
+
"danger + match": ["danger", "match"],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
border: {
|
|
78
|
+
control: "select",
|
|
79
|
+
options: [undefined, "solid", "double", "dashed", "dotted"],
|
|
80
|
+
},
|
|
81
|
+
intent: {
|
|
82
|
+
control: "select",
|
|
83
|
+
options: {"Not set": undefined, ...Definitions},
|
|
84
|
+
},
|
|
85
|
+
highlightColor: {
|
|
86
|
+
control: "select",
|
|
87
|
+
options: {
|
|
88
|
+
"Not set": undefined,
|
|
89
|
+
"Default": "default",
|
|
90
|
+
"Alternate": "alternate",
|
|
91
|
+
"Default + alternate": ["default" , "alternate"],
|
|
92
|
+
"Custom (red)": "red",
|
|
93
|
+
"Default + Custom (red)": ["default", "red"],
|
|
94
|
+
"Custom (green) + alternate": ["green", "alternate"],
|
|
95
|
+
"Custom (purple) + custom (yellow)": ["purple", "yellow"],
|
|
96
|
+
}
|
|
97
|
+
},
|
|
68
98
|
content: { control: "none" },
|
|
69
99
|
footerContent: { control: "none" },
|
|
70
100
|
isConnectable: { table: { disable: true } },
|