Skip to content

Commit b8b965f

Browse files
Merge branch 'release/v25.0.0' into fix/reactFlowModal-MT-30
# Conflicts: # CHANGELOG.md
2 parents 836a88a + 590a9ca commit b8b965f

16 files changed

Lines changed: 279 additions & 140 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,25 @@ This is a major release, and it might be not compatible with your current usage
4343
- `eccgui-color-var`: returns a var of a custom property used for palette color
4444
- `eccgui-color-mix`: mix 2 colors in `srgb`, works with all types of color values and CSS custom properties
4545
- `eccgui-color-rgba`: like `rgba()` but it works also for CSS custom properties
46-
- `colorCalculateDistance()`
46+
- `utils.colorCalculateDistance()`
4747
- function to calculate the difference between 2 colors using the simple CIE76 formula
48-
- `textToColorHash()`
48+
- `utils.textToColorHash()`
4949
- function to calculate a color from a text string
5050
- new icons
5151
- `artefact-task-sqlupdatequeryoperator`
5252
- `artefact-task-customsqlexecution`
53+
- `toggler-carettop`
54+
- `toggler-caretleft`
55+
- `toggler-micon`
56+
- `toggler-micoff`
5357
- `<Modal />`:
5458
- `preventReactFlowEvents`: Adds 'nopan', 'nowheel' and 'nodrag' classes to Modal's overlay classes in order to prevent react-flow to react to drag and pan actions in modals.
5559
This is enabled by default for <SimpleDialog />.
5660

5761

5862
### Removed
5963

64+
- support for React Flow v10 was completely removed
6065
- removed direct replacements for legacy components (imported via `@eccenca/gui-elements/src/legacy-replacements` or `LegacyReplacements`)
6166
- `<AffirmativeButton />`, `<Button />`, `<DismissiveButton />`, `<DisruptiveButton />`, `<Checkbox />`, `<RadioButton />`, `<Tabs />`, `<TextField />`
6267
- `<Button />`, `<FieldItem />`, `<FieldSet />`, `<MultiSuggestField />`
@@ -69,15 +74,14 @@ This is a major release, and it might be not compatible with your current usage
6974
- `densityHigh` property was removed
7075
- `<CodeEditor />`
7176
- static fallback for test id `codemirror-wrapper` was removed, add `data-test-id` (or your test id data attribute) always directly to `CodeEditor`.
72-
- `nodeTypes` and `edgeTypes` exports were removed
73-
- use `<ReactFlow/` with `configuration`, or define it yourself
74-
- SCSS variables `$eccgui-color-application-text` and `$eccgui-color-application-background` were removed
75-
- use `$eccgui-color-workspace-text` and `$eccgui-color-workspace-background`
76-
- support for React Flow v10 was completely removed
7777
- `<EdgeDefault />`
7878
- removed `inversePath` property, can be replaced with `arrowDirection: "inversed"` property
7979
- `<Spinner />`
8080
- `description` property was removed because it was defined but not implemented for a very long time, but we plan to add that type of caption later
81+
- `nodeTypes` and `edgeTypes` exports were removed
82+
- use `<ReactFlow />` with `configuration`, or define it yourself
83+
- SCSS variables `$eccgui-color-application-text` and `$eccgui-color-application-background` were removed
84+
- use `$eccgui-color-workspace-text` and `$eccgui-color-workspace-background`
8185

8286
### Fixed
8387

@@ -95,17 +99,17 @@ This is a major release, and it might be not compatible with your current usage
9599
- `<OverflowText />`
96100
- beside explicitly specified properties it allows only basic HTML element properties and testing IDs
97101
- overrite the native SCSS `rgba()` function, so it now works for SCSS color values and CSS custom properties
98-
- `getColorConfiguration()` works with CSS custom properties
99102
- `<SuggestField />`
100103
- Always add class 'nodrag' to popover content element to always prevent dragging of react-flow and dnd-kit elements when interacting with the component.
104+
- `utils.getColorConfiguration()` works with CSS custom properties
105+
- property names returned by `getCOlorConfiguration` were changed to kebab case because they are originally defined via CSS custom properties
106+
- e.g. `graphNode` is now `eccgui-graph-node` and `graphNodeBright` is `eccgui-graph-node-bright`
101107

102108
### Deprecated
103109

104110
- support for React Flow v9 will be removed in v26
105111
- `<EdgeDefs />`
106112
- use `<ReactFlowMarkers />` or build it on single `<ReactFlowMarker />`
107-
- property names returned by `getCOlorConfiguration` were changed to kebab case because they are originally defined via CSS custom properties
108-
- e.g. `graphNode` is now `eccgui-graph-node` and `graphNodeBright` is `eccgui-graph-node-bright`
109113

110114
## [24.4.1] - 2025-08-25
111115

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@eccenca/gui-elements",
33
"description": "GUI elements based on other libraries, usable in React application, written in Typescript.",
4-
"version": "24.4.1",
4+
"version": "25.0.0",
55
"license": "Apache-2.0",
66
"homepage": "https://github.com/eccenca/gui-elements",
77
"bugs": "https://github.com/eccenca/gui-elements/issues",

src/cmem/react-flow/_minimap.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
.#{$eccgui}-graphviz__minimap__node--default {
2+
&:not([fill]) {
3+
fill: $reactflow-node-border-color;
4+
}
5+
6+
&:not([stroke]) {
7+
stroke: $reactflow-node-border-color;
8+
}
9+
}
10+
111
@mixin mapnodestyles($type) {
212
.#{$eccgui}-graphviz__minimap__node--#{$type} {
313
@include mapcoloring($type);
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
.#{eccgui}-configuration--colors__react-flow-linking {
2-
--#{$eccgui}-sourcepath-node: #{eccgui-color-var("layout", "violet", 700)};
3-
--#{$eccgui}-sourcepath-node-bright: #{eccgui-color-var("layout", "violet", 100)};
4-
--#{$eccgui}-targetpath-node: #{eccgui-color-var("layout", "cyan", 900)};
5-
--#{$eccgui}-targetpath-node-bright: #{eccgui-color-var("layout", "cyan", 100)};
2+
--#{$eccgui}-sourcepath-node: #{eccgui-color-var("layout", "purple", 700)};
3+
--#{$eccgui}-sourcepath-node-bright: #{eccgui-color-var("layout", "purple", 300)};
4+
--#{$eccgui}-targetpath-node: #{eccgui-color-var("layout", "petrol", 700)};
5+
--#{$eccgui}-targetpath-node-bright: #{eccgui-color-var("layout", "petrol", 300)};
66
--#{$eccgui}-transformation-node: #{eccgui-color-var("layout", "pink", 700)};
7-
--#{$eccgui}-transformation-node-bright: #{eccgui-color-var("layout", "pink", 100)};
7+
--#{$eccgui}-transformation-node-bright: #{eccgui-color-var("layout", "pink", 300)};
88
--#{$eccgui}-comparator-node: #{eccgui-color-var("layout", "teal", 700)};
9-
--#{$eccgui}-comparator-node-bright: #{eccgui-color-var("layout", "teal", 100)};
9+
--#{$eccgui}-comparator-node-bright: #{eccgui-color-var("layout", "teal", 300)};
1010
--#{$eccgui}-aggregator-node: #{eccgui-color-var("layout", "cyan", 700)};
1111
--#{$eccgui}-aggregator-node-bright: #{eccgui-color-var("layout", "cyan", 100)};
1212
--#{$eccgui}-value-edge: #{eccgui-color-var("layout", "grey", 700)};
13-
--#{$eccgui}-value-edge-bright: #{eccgui-color-var("layout", "grey", 100)};
13+
--#{$eccgui}-value-edge-bright: #{eccgui-color-var("layout", "grey", 300)};
1414
--#{$eccgui}-score-edge: #{eccgui-color-var("layout", "cyan", 900)};
15-
--#{$eccgui}-score-edge-bright: #{eccgui-color-var("layout", "cyan", 100)};
15+
--#{$eccgui}-score-edge-bright: #{eccgui-color-var("layout", "cyan", 300)};
1616
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
.#{$eccgui}-configuration--colors__react-flow-workflow {
22
--#{$eccgui}-project-node: #{eccgui-color-var("layout", "magenta", 700)};
3-
--#{$eccgui}-project-node-bright: #{eccgui-color-var("layout", "magenta", 100)};
4-
--#{$eccgui}-dataset-node: #{eccgui-color-var("layout", "cyan", 900)};
5-
--#{$eccgui}-dataset-node-bright: #{eccgui-color-var("layout", "cyan", 100)};
6-
--#{$eccgui}-linking-node: #{eccgui-color-var("layout", "teal", 900)};
7-
--#{$eccgui}-linking-node-bright: #{eccgui-color-var("layout", "teal", 100)};
8-
--#{$eccgui}-transform-node: #{eccgui-color-var("layout", "pink", 700)};
9-
--#{$eccgui}-transform-node-bright: #{eccgui-color-var("layout", "pink", 100)};
3+
--#{$eccgui}-project-node-bright: #{eccgui-color-var("layout", "magenta", 300)};
4+
--#{$eccgui}-dataset-node: #{eccgui-color-var("layout", "petrol", 700)};
5+
--#{$eccgui}-dataset-node-bright: #{eccgui-color-var("layout", "petrol", 300)};
6+
--#{$eccgui}-linking-node: #{eccgui-color-var("layout", "cyan", 700)};
7+
--#{$eccgui}-linking-node-bright: #{eccgui-color-var("layout", "cyan", 300)};
8+
--#{$eccgui}-transform-node: #{eccgui-color-var("layout", "teal", 700)};
9+
--#{$eccgui}-transform-node-bright: #{eccgui-color-var("layout", "teal", 300)};
1010
--#{$eccgui}-task-node: #{eccgui-color-var("layout", "lime", 700)};
11-
--#{$eccgui}-task-node-bright: #{eccgui-color-var("layout", "lime", 100)};
11+
--#{$eccgui}-task-node-bright: #{eccgui-color-var("layout", "lime", 300)};
1212
--#{$eccgui}-workflow-node: #{eccgui-color-var("layout", "purple", 700)};
13-
--#{$eccgui}-workflow-node-bright: #{eccgui-color-var("layout", "purple", 100)};
14-
--#{$eccgui}-replaceableInput: #{eccgui-color-var("layout", "amber", 700)};
15-
--#{$eccgui}-replaceableInput-bright: #{eccgui-color-var("layout", "amber", 100)};
13+
--#{$eccgui}-workflow-node-bright: #{eccgui-color-var("layout", "purple", 300)};
14+
--#{$eccgui}-replaceable-input: #{eccgui-color-var("layout", "amber", 700)};
15+
--#{$eccgui}-replaceable-input-bright: #{eccgui-color-var("layout", "amber", 300)};
1616
}

src/common/scss/_color-functions.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686
* Created to replace them easily for CSS custom properties.
8787
*/
8888
@function eccgui-color-rgba($color, $alpha) {
89+
@if meta.type-of($alpha) != "number" {
90+
// in case it is for example a CSS custom property
91+
@return eccgui-color-mix($color $alpha, transparent);
92+
}
93+
8994
@if $alpha > 0 {
9095
@return eccgui-color-mix($color 100% * $alpha, transparent);
9196
} @else {

src/components/Chat/stories/ChatField.stories.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { Meta, StoryFn } from "@storybook/react";
33

4-
import { ChatField } from "../../../index";
4+
import { ChatField, ContextMenu, MenuItem } from "../../../index";
55

66
export default {
77
title: "Components/Chat/ChatField",
@@ -15,4 +15,9 @@ const TemplateFull: StoryFn<typeof ChatField> = (args) => <ChatField {...args} k
1515
export const Default = TemplateFull.bind({});
1616
Default.args = {
1717
onTextSubmit: (value) => alert(value),
18+
rightElement: (
19+
<ContextMenu>
20+
<MenuItem text="Just a test" />
21+
</ContextMenu>
22+
),
1823
};

src/components/Icon/canonicalIconNames.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,14 @@ const canonicalIcons = {
171171
"state-warning": icons.WarningAltFilled,
172172

173173
"toggler-caret": icons.CaretSort,
174+
"toggler-carettop": icons.CaretUp,
174175
"toggler-caretright": icons.CaretRight,
175176
"toggler-caretdown": icons.CaretDown,
177+
"toggler-caretleft": icons.CaretLeft,
176178
"toggler-maximize": icons.Maximize,
177179
"toggler-minimize": icons.Minimize,
180+
"toggler-micon": icons.Microphone,
181+
"toggler-micoff": icons.MicrophoneOff,
178182
"toggler-moveleft": icons.ChevronLeft,
179183
"toggler-moveright": icons.ChevronRight,
180184
"toggler-list": icons.List,

src/components/Icon/icon.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
.#{$eccgui}-icon {
22
vertical-align: text-bottom;
33

4+
&.#{$eccgui}-intent--primary {
5+
color: $eccgui-color-primary;
6+
}
7+
&.#{$eccgui}-intent--accent {
8+
color: $eccgui-color-accent;
9+
}
410
&.#{$eccgui}-intent--info {
511
color: $eccgui-color-info-text;
612
}

src/components/Icon/stories/Icon.stories.tsx

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@ import React from "react";
22
import { OverlaysProvider } from "@blueprintjs/core";
33
import { Meta, StoryFn } from "@storybook/react";
44

5-
import { Button, Icon } from "../../../../index";
5+
import {
6+
Card,
7+
FlexibleLayoutContainer,
8+
FlexibleLayoutItem,
9+
Icon,
10+
OverflowText,
11+
OverviewItem,
12+
OverviewItemDepiction,
13+
OverviewItemDescription,
14+
OverviewItemLine,
15+
TitleSubsection,
16+
} from "../../../../index";
617
import { Definitions } from "../../../common/Intent";
718
import BaseIcon from "../BaseIcon";
819

@@ -19,7 +30,8 @@ export default {
1930
},
2031
intent: {
2132
control: "select",
22-
options: { ...Definitions },
33+
options: [...Object.keys(Definitions)],
34+
mapping: { ...Definitions },
2335
},
2436
},
2537
} as Meta<typeof Icon>;
@@ -49,12 +61,60 @@ IconSizes.args = {
4961
name: "undefined",
5062
};
5163

64+
/**
65+
* Available icons by their canonical names.
66+
* If you need another icon then use `<TestIcon /`> component.
67+
*/
5268
export const IconsOverview = () => {
69+
let section = "";
70+
let separation = <></>;
5371
return (
5472
<OverlaysProvider>
55-
{Object.keys(canonicalIcons).map((iconName) => {
56-
return <Button icon={iconName as ValidIconName} outlined large tooltip={iconName} key={iconName} />;
57-
})}
73+
<FlexibleLayoutContainer
74+
noEqualItemSpace
75+
gapSize="small"
76+
style={{ flexWrap: "wrap", justifyContent: "flex-start" }}
77+
>
78+
{Object.keys(canonicalIcons)
79+
.sort()
80+
.map((iconName) => {
81+
if (
82+
section !==
83+
iconName.substring(0, iconName.indexOf("-") > 0 ? iconName.indexOf("-") : iconName.length)
84+
) {
85+
section = iconName.substring(
86+
0,
87+
iconName.indexOf("-") > 0 ? iconName.indexOf("-") : iconName.length
88+
);
89+
separation = (
90+
<FlexibleLayoutItem style={{ width: "100%", padding: "1rem 0 0.5rem 0" }}>
91+
<TitleSubsection>{section}</TitleSubsection>
92+
</FlexibleLayoutItem>
93+
);
94+
} else {
95+
separation = <></>;
96+
}
97+
return (
98+
<React.Fragment key={iconName}>
99+
{separation}
100+
<FlexibleLayoutItem growFactor={0} style={{ width: "20rem" }}>
101+
<Card>
102+
<OverviewItem>
103+
<OverviewItemDepiction keepColors>
104+
<Icon name={iconName as ValidIconName} />
105+
</OverviewItemDepiction>
106+
<OverviewItemDescription>
107+
<OverviewItemLine small>
108+
<OverflowText>{iconName}</OverflowText>
109+
</OverviewItemLine>
110+
</OverviewItemDescription>
111+
</OverviewItem>
112+
</Card>
113+
</FlexibleLayoutItem>
114+
</React.Fragment>
115+
);
116+
})}
117+
</FlexibleLayoutContainer>
58118
</OverlaysProvider>
59119
);
60120
};

0 commit comments

Comments
 (0)