@eccenca/gui-elements 25.0.0-bugfixcenterednodecontentmenuitemscmem7184.0 → 25.0.0-featurecolorwheelinputcmem7327.0
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 +34 -4
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +17 -13
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/common/index.js +1 -0
- package/dist/cjs/common/index.js.map +1 -1
- package/dist/cjs/common/utils/colorHash.js +25 -11
- package/dist/cjs/common/utils/colorHash.js.map +1 -1
- package/dist/cjs/components/ContextOverlay/ContextOverlay.js +6 -6
- package/dist/cjs/components/ContextOverlay/ContextOverlay.js.map +1 -1
- package/dist/cjs/components/DecoupledOverlay/DecoupledOverlay.js +47 -0
- package/dist/cjs/components/DecoupledOverlay/DecoupledOverlay.js.map +1 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js +3 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Icon/transformIcon.js +14 -0
- package/dist/cjs/components/Icon/transformIcon.js.map +1 -0
- package/dist/cjs/components/MultiSelect/MultiSelect.js +2 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/RadioButton/RadioButton.js +5 -2
- package/dist/cjs/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/cjs/components/VisualTour/VisualTour.js +24 -32
- package/dist/cjs/components/VisualTour/VisualTour.js.map +1 -1
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +10 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js +19 -14
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/esm/common/index.js +2 -1
- package/dist/esm/common/index.js.map +1 -1
- package/dist/esm/common/utils/colorHash.js +25 -12
- package/dist/esm/common/utils/colorHash.js.map +1 -1
- package/dist/esm/components/ContextOverlay/ContextOverlay.js +3 -3
- package/dist/esm/components/ContextOverlay/ContextOverlay.js.map +1 -1
- package/dist/esm/components/DecoupledOverlay/DecoupledOverlay.js +41 -0
- package/dist/esm/components/DecoupledOverlay/DecoupledOverlay.js.map +1 -0
- package/dist/esm/components/Icon/canonicalIconNames.js +3 -0
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Icon/transformIcon.js +21 -0
- package/dist/esm/components/Icon/transformIcon.js.map +1 -0
- package/dist/esm/components/MultiSelect/MultiSelect.js +3 -2
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/RadioButton/RadioButton.js +6 -2
- package/dist/esm/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/esm/components/VisualTour/VisualTour.js +25 -33
- package/dist/esm/components/VisualTour/VisualTour.js.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +10 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +9 -0
- package/dist/types/common/index.d.ts +2 -1
- package/dist/types/common/utils/colorHash.d.ts +4 -3
- package/dist/types/components/ContextOverlay/ContextOverlay.d.ts +7 -1
- package/dist/types/components/DecoupledOverlay/DecoupledOverlay.d.ts +20 -0
- package/dist/types/components/Icon/canonicalIconNames.d.ts +2 -0
- package/dist/types/components/Icon/transformIcon.d.ts +2 -0
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/types/components/RadioButton/RadioButton.d.ts +8 -2
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +68 -35
- package/src/common/index.ts +2 -1
- package/src/common/utils/colorHash.ts +36 -18
- package/src/components/Application/_colors.scss +15 -0
- package/src/components/ColorField/ColorField.stories.tsx +69 -0
- package/src/components/ColorField/ColorField.tsx +200 -0
- package/src/components/ColorField/_colorfield.scss +56 -0
- package/src/components/ContextOverlay/ContextOverlay.tsx +20 -1
- package/src/components/DecoupledOverlay/DecoupledOverlay.stories.tsx +30 -0
- package/src/components/DecoupledOverlay/DecoupledOverlay.tsx +97 -0
- package/src/components/DecoupledOverlay/_decoupledoverlay.scss +46 -0
- package/src/components/Icon/canonicalIconNames.tsx +3 -0
- package/src/components/Icon/transformIcon.tsx +17 -0
- package/src/components/Link/Link.stories.tsx +30 -0
- package/src/components/Link/link.scss +28 -2
- package/src/components/MultiSelect/MultiSelect.tsx +12 -3
- package/src/components/RadioButton/RadioButton.tsx +15 -3
- package/src/components/RadioButton/radiobutton.scss +13 -0
- package/src/components/Tabs/stories/TabTitle.stories.tsx +7 -2
- package/src/components/Typography/_reset.scss +1 -0
- package/src/components/Typography/typography.scss +5 -0
- package/src/components/VisualTour/VisualTour.tsx +30 -50
- package/src/components/VisualTour/visualTour.scss +0 -34
- package/src/components/index.scss +2 -0
- package/src/components/index.ts +1 -0
- package/src/configuration/_customproperties.scss +32 -0
- package/src/configuration/stories/customproperties.stories.tsx +118 -0
- package/src/extensions/codemirror/CodeMirror.tsx +14 -6
- package/src/extensions/react-flow/_config.scss +3 -3
- package/src/extensions/react-flow/edges/EdgeLabel.tsx +5 -3
- package/src/extensions/react-flow/edges/_edges.scss +3 -2
- package/src/index.scss +1 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We mirror our SCSS variables here to improve availability in inline styles
|
|
3
|
+
* and module styles without included SCSS config stack.
|
|
4
|
+
* Colors are set in `src/components/Application/_colors.scss`.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--#{$eccgui}-size-typo-caption: #{$eccgui-size-typo-caption};
|
|
9
|
+
--#{$eccgui}-size-typo-caption-lineheight: #{$eccgui-size-typo-caption-lineheight};
|
|
10
|
+
--#{$eccgui}-size-typo-text: #{$eccgui-size-typo-text};
|
|
11
|
+
--#{$eccgui}-size-typo-text-lineheight: #{$eccgui-size-typo-text-lineheight};
|
|
12
|
+
--#{$eccgui}-size-typo-subtitle: #{$eccgui-size-typo-subtitle};
|
|
13
|
+
--#{$eccgui}-size-typo-subtitle-lineheight: #{$eccgui-size-typo-subtitle-lineheight};
|
|
14
|
+
--#{$eccgui}-size-typo-title: #{$eccgui-size-typo-title};
|
|
15
|
+
--#{$eccgui}-size-typo-title-lineheight: #{$eccgui-size-typo-title-lineheight};
|
|
16
|
+
--#{$eccgui}-size-typo-headline: #{$eccgui-size-typo-headline};
|
|
17
|
+
--#{$eccgui}-size-typo-headline-lineheight: #{$eccgui-size-typo-headline-lineheight};
|
|
18
|
+
--#{$eccgui}-font-weight-light: #{$eccgui-font-weight-light};
|
|
19
|
+
--#{$eccgui}-font-weight-regular: #{$eccgui-font-weight-regular};
|
|
20
|
+
--#{$eccgui}-font-weight-bold: #{$eccgui-font-weight-bold};
|
|
21
|
+
--#{$eccgui}-font-spacing-condensed: #{$eccgui-font-spacing-condensed};
|
|
22
|
+
--#{$eccgui}-font-spacing-regular: #{$eccgui-font-spacing-regular};
|
|
23
|
+
--#{$eccgui}-font-spacing-wide: #{$eccgui-font-spacing-wide};
|
|
24
|
+
--#{$eccgui}-size-block-whitespace: #{$eccgui-size-block-whitespace};
|
|
25
|
+
--#{$eccgui}-size-inline-whitespace: #{$eccgui-size-inline-whitespace};
|
|
26
|
+
--#{$eccgui}-opacity-regular: #{$eccgui-opacity-regular};
|
|
27
|
+
--#{$eccgui}-opacity-narrow: #{$eccgui-opacity-narrow};
|
|
28
|
+
--#{$eccgui}-opacity-muted: #{$eccgui-opacity-muted};
|
|
29
|
+
--#{$eccgui}-opacity-disabled: #{$eccgui-opacity-disabled};
|
|
30
|
+
--#{$eccgui}-opacity-ghostly: #{$eccgui-opacity-ghostly};
|
|
31
|
+
--#{$eccgui}-opacity-invisible: #{$eccgui-opacity-invisible};
|
|
32
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import CssCustomProperties from "../../common/utils/CssCustomProperties";
|
|
5
|
+
import {
|
|
6
|
+
Section,
|
|
7
|
+
SectionHeader,
|
|
8
|
+
Spacing,
|
|
9
|
+
Table,
|
|
10
|
+
TableBody,
|
|
11
|
+
TableCell,
|
|
12
|
+
TableContainer,
|
|
13
|
+
TableHead,
|
|
14
|
+
TableHeader,
|
|
15
|
+
TableRow,
|
|
16
|
+
TitleSubsection,
|
|
17
|
+
} from "../../components";
|
|
18
|
+
import { CLASSPREFIX as eccgui } from "../../index";
|
|
19
|
+
|
|
20
|
+
const groups: { title: string; filterName: (name: string) => boolean }[] = [
|
|
21
|
+
{
|
|
22
|
+
title: "Typography",
|
|
23
|
+
filterName: (name) => name.startsWith(`--${eccgui}-size-typo`),
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: "Font weights and spacing",
|
|
27
|
+
filterName: (name) => name.startsWith(`--${eccgui}-font`),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: "Whitespace",
|
|
31
|
+
filterName: (name) => name.startsWith(`--${eccgui}-size-block`) || name.startsWith(`--${eccgui}-size-inline`),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: "Color aliases",
|
|
35
|
+
filterName: (name) => name.startsWith(`--${eccgui}-color`) && !name.startsWith(`--${eccgui}-color-palette`),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: "Opacity",
|
|
39
|
+
filterName: (name) => name.startsWith(`--${eccgui}-opacity`),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: "Palette colors",
|
|
43
|
+
filterName: (name) => name.startsWith(`--${eccgui}-color-palette`),
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
const CssCustomPropertiesOverview = () => {
|
|
48
|
+
return (
|
|
49
|
+
<>
|
|
50
|
+
{groups.map(({ title, filterName }) => {
|
|
51
|
+
const properties = new CssCustomProperties({
|
|
52
|
+
selectorText: ":root",
|
|
53
|
+
filterName,
|
|
54
|
+
removeDashPrefix: false,
|
|
55
|
+
returnObject: false,
|
|
56
|
+
}).customProperties() as string[][];
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<React.Fragment key={title}>
|
|
60
|
+
<Section>
|
|
61
|
+
<SectionHeader>
|
|
62
|
+
<TitleSubsection>{title}</TitleSubsection>
|
|
63
|
+
</SectionHeader>
|
|
64
|
+
<Spacing size="tiny" />
|
|
65
|
+
<TableContainer>
|
|
66
|
+
<Table columnWidths={["60%", "40%"]}>
|
|
67
|
+
<TableHead>
|
|
68
|
+
<TableRow>
|
|
69
|
+
<TableHeader>CSS custom property</TableHeader>
|
|
70
|
+
<TableHeader>Current value</TableHeader>
|
|
71
|
+
</TableRow>
|
|
72
|
+
</TableHead>
|
|
73
|
+
<TableBody>
|
|
74
|
+
{properties.map(([name, value]) => (
|
|
75
|
+
<TableRow key={name}>
|
|
76
|
+
<TableCell>
|
|
77
|
+
<code>{name}</code>
|
|
78
|
+
</TableCell>
|
|
79
|
+
<TableCell>
|
|
80
|
+
{name.startsWith(`--${eccgui}-color`) && (
|
|
81
|
+
<span
|
|
82
|
+
style={{
|
|
83
|
+
display: "inline-block",
|
|
84
|
+
width: `var(--${eccgui}-size-block-whitespace)`,
|
|
85
|
+
height: `var(--${eccgui}-size-block-whitespace)`,
|
|
86
|
+
backgroundColor: value,
|
|
87
|
+
verticalAlign: "middle",
|
|
88
|
+
marginRight: `var(--${eccgui}-size-inline-whitespace)`,
|
|
89
|
+
border: "1px solid currentColor",
|
|
90
|
+
}}
|
|
91
|
+
/>
|
|
92
|
+
)}
|
|
93
|
+
<code>{value}</code>
|
|
94
|
+
</TableCell>
|
|
95
|
+
</TableRow>
|
|
96
|
+
))}
|
|
97
|
+
</TableBody>
|
|
98
|
+
</Table>
|
|
99
|
+
</TableContainer>
|
|
100
|
+
</Section>
|
|
101
|
+
<Spacing size="large" />
|
|
102
|
+
</React.Fragment>
|
|
103
|
+
);
|
|
104
|
+
})}
|
|
105
|
+
</>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* We mirror our SCSS configuration variables as CSS custom vars.
|
|
111
|
+
* This way they can be easily used for inline styles or in CSS modules without SCSS includes.
|
|
112
|
+
*/
|
|
113
|
+
export default {
|
|
114
|
+
title: "Configuration/CSS Custom Properties",
|
|
115
|
+
component: CssCustomPropertiesOverview,
|
|
116
|
+
} as Meta<typeof CssCustomPropertiesOverview>;
|
|
117
|
+
|
|
118
|
+
export const Default: StoryFn = () => <CssCustomPropertiesOverview />;
|
|
@@ -227,10 +227,11 @@ export const CodeEditor = ({
|
|
|
227
227
|
}: CodeEditorProps) => {
|
|
228
228
|
const parent = useRef<any>(undefined);
|
|
229
229
|
const [view, setView] = React.useState<EditorView | undefined>();
|
|
230
|
-
const currentView = React.useRef<EditorView>()
|
|
231
|
-
currentView.current = view
|
|
232
|
-
const currentReadOnly = React.useRef(readOnly)
|
|
233
|
-
currentReadOnly.current = readOnly
|
|
230
|
+
const currentView = React.useRef<EditorView>();
|
|
231
|
+
currentView.current = view;
|
|
232
|
+
const currentReadOnly = React.useRef(readOnly);
|
|
233
|
+
currentReadOnly.current = readOnly;
|
|
234
|
+
//const currentDisabled = React.useRef(disabled);
|
|
234
235
|
const [showPreview, setShowPreview] = React.useState<boolean>(false);
|
|
235
236
|
// CodeMirror Compartments in order to allow for re-configuration after initialization
|
|
236
237
|
const readOnlyCompartment = React.useRef<Compartment>(compartment())
|
|
@@ -377,7 +378,7 @@ export const CodeEditor = ({
|
|
|
377
378
|
}
|
|
378
379
|
|
|
379
380
|
if (disabled) {
|
|
380
|
-
view.dom.
|
|
381
|
+
view.dom.classList.add(`${eccgui}-disabled`);
|
|
381
382
|
}
|
|
382
383
|
|
|
383
384
|
if (intent) {
|
|
@@ -432,7 +433,14 @@ export const CodeEditor = ({
|
|
|
432
433
|
}, [tabIntentSize])
|
|
433
434
|
|
|
434
435
|
React.useEffect(() => {
|
|
435
|
-
updateExtension(EditorView?.editable.of(!disabled), disabledCompartment.current)
|
|
436
|
+
updateExtension(EditorView?.editable.of(!disabled), disabledCompartment.current);
|
|
437
|
+
if (view?.dom) {
|
|
438
|
+
if (disabled) {
|
|
439
|
+
view.dom.classList.add(`${eccgui}-disabled`);
|
|
440
|
+
} else {
|
|
441
|
+
view.dom.classList.remove(`${eccgui}-disabled`);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
436
444
|
}, [disabled])
|
|
437
445
|
|
|
438
446
|
React.useEffect(() => {
|
|
@@ -8,9 +8,9 @@ $reactflow-node-font-size: $eccgui-size-typo-caption !default;
|
|
|
8
8
|
$reactflow-node-border-width: 2 * $button-border-width !default;
|
|
9
9
|
$reactflow-node-border-radius: $button-border-radius !default;
|
|
10
10
|
$reactflow-edge-rendering: geometricprecision !default;
|
|
11
|
-
$reactflow-edge-stroke-width-default:
|
|
12
|
-
$reactflow-edge-stroke-width-hover:
|
|
13
|
-
$reactflow-edge-stroke-width-selected:
|
|
11
|
+
$reactflow-edge-stroke-width-default: 1px !default;
|
|
12
|
+
$reactflow-edge-stroke-width-hover: 1px !default;
|
|
13
|
+
$reactflow-edge-stroke-width-selected: 1px !default;
|
|
14
14
|
$reactflow-edge-stroke-opacity-default: $eccgui-opacity-muted !default;
|
|
15
15
|
$reactflow-edge-stroke-opacity-hover: $eccgui-opacity-narrow !default;
|
|
16
16
|
$reactflow-edge-stroke-opacity-selected: $eccgui-opacity-regular !default;
|
|
@@ -81,9 +81,11 @@ export const EdgeLabel = memo(
|
|
|
81
81
|
})}
|
|
82
82
|
</div>
|
|
83
83
|
)}
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
|
|
84
|
+
{(title || text) && (
|
|
85
|
+
<div className={`${eccgui}-graphviz__edge-label__text`} title={title??undefined}>
|
|
86
|
+
{text && (typeof text === "string" ? <OverflowText>{text}</OverflowText> : text)}
|
|
87
|
+
</div>
|
|
88
|
+
)}
|
|
87
89
|
{!!actions && <div className={`${eccgui}-graphviz__edge-label__aux`}>{actions}</div>}
|
|
88
90
|
</div>
|
|
89
91
|
);
|
|
@@ -258,6 +258,7 @@ path.react-flow__edge-path-highlight {
|
|
|
258
258
|
min-height: $reactflow-node-basesize;
|
|
259
259
|
max-height: $reactflow-node-basesize * 13;
|
|
260
260
|
padding: $eccgui-size-block-whitespace * 0.5;
|
|
261
|
+
overflow-y: auto;
|
|
261
262
|
}
|
|
262
263
|
|
|
263
264
|
// Arrows
|
|
@@ -288,6 +289,7 @@ path.react-flow__edge-path-highlight {
|
|
|
288
289
|
width: auto;
|
|
289
290
|
max-width: 20rem;
|
|
290
291
|
height: 0.5 * $reactflow-node-largesize;
|
|
292
|
+
padding: 0 $eccgui-size-block-whitespace * 0.25;
|
|
291
293
|
font-size: $reactflow-node-font-size;
|
|
292
294
|
color: var(--#{$eccgui}-reactflow-edge-label-color, currentColor);
|
|
293
295
|
background-color: var(--#{$eccgui}-reactflow-edge-label-color-background, #{$card-background-color});
|
|
@@ -330,7 +332,6 @@ path.react-flow__edge-path-highlight {
|
|
|
330
332
|
display: inline-flex;
|
|
331
333
|
flex-grow: 0;
|
|
332
334
|
flex-shrink: 0;
|
|
333
|
-
margin-left: 2px;
|
|
334
335
|
.#{$eccgui}-depiction__image {
|
|
335
336
|
height: calc(#{0.5 * $reactflow-node-largesize} - 4px);
|
|
336
337
|
|
|
@@ -342,7 +343,7 @@ path.react-flow__edge-path-highlight {
|
|
|
342
343
|
.#{$eccgui}-graphviz__edge-label__text {
|
|
343
344
|
flex-grow: 1;
|
|
344
345
|
flex-shrink: 1;
|
|
345
|
-
margin: 0 $eccgui-size-block-whitespace * 0.25;
|
|
346
|
+
margin: 0 0 0 $eccgui-size-block-whitespace * 0.25;
|
|
346
347
|
overflow: hidden;
|
|
347
348
|
text-overflow: ellipsis;
|
|
348
349
|
text-align: center;
|
package/src/index.scss
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
// == load default configuration ===============================================
|
|
10
10
|
|
|
11
11
|
@import "./configuration/variables";
|
|
12
|
+
@import "./configuration/customproperties"; // mirror config as custom properties
|
|
12
13
|
|
|
13
14
|
// == Necessary imports from libraries =========================================
|
|
14
15
|
|