@eccenca/gui-elements 25.0.0-rc.2 → 25.1.0-featurev2510colorfield.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 +94 -18
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +17 -13
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js +1 -3
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/cjs/cmem/ContentBlobToggler/ContentBlobToggler.js +1 -0
- package/dist/cjs/cmem/ContentBlobToggler/ContentBlobToggler.js.map +1 -1
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +34 -11
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -1
- package/dist/cjs/common/Intent/index.js +1 -1
- package/dist/cjs/common/Intent/index.js.map +1 -1
- package/dist/cjs/common/index.js +4 -1
- 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/common/utils/reduceToText.js +26 -1
- package/dist/cjs/common/utils/reduceToText.js.map +1 -1
- package/dist/cjs/components/Application/ApplicationViewability.js +33 -0
- package/dist/cjs/components/Application/ApplicationViewability.js.map +1 -0
- package/dist/cjs/components/Application/index.js +1 -0
- package/dist/cjs/components/Application/index.js.map +1 -1
- package/dist/cjs/components/ColorField/ColorField.js +115 -0
- package/dist/cjs/components/ColorField/ColorField.js.map +1 -0
- package/dist/cjs/components/ContextOverlay/ContextMenu.js +2 -2
- package/dist/cjs/components/ContextOverlay/ContextMenu.js.map +1 -1
- package/dist/cjs/components/ContextOverlay/ContextOverlay.js +67 -29
- 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/IconButton.js.map +1 -1
- 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/TextReducer/TextReducer.js +15 -3
- package/dist/cjs/components/TextReducer/TextReducer.js.map +1 -1
- package/dist/cjs/components/Typography/InlineText.js +29 -0
- package/dist/cjs/components/Typography/InlineText.js.map +1 -0
- package/dist/cjs/components/Typography/index.js +1 -0
- package/dist/cjs/components/Typography/index.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 +2 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +18 -6
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
- package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
- package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js +2 -2
- package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.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/cjs/extensions/react-flow/edges/EdgeNew.js +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeNew.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.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/cmem/ActivityControl/SilkActivityControl.js +1 -3
- package/dist/esm/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js +1 -0
- package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js.map +1 -1
- package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +32 -9
- package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -1
- package/dist/esm/common/Intent/index.js +1 -1
- package/dist/esm/common/Intent/index.js.map +1 -1
- package/dist/esm/common/index.js +5 -2
- 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/common/utils/reduceToText.js +37 -1
- package/dist/esm/common/utils/reduceToText.js.map +1 -1
- package/dist/esm/components/Application/ApplicationViewability.js +28 -0
- package/dist/esm/components/Application/ApplicationViewability.js.map +1 -0
- package/dist/esm/components/Application/index.js +1 -0
- package/dist/esm/components/Application/index.js.map +1 -1
- package/dist/esm/components/ColorField/ColorField.js +141 -0
- package/dist/esm/components/ColorField/ColorField.js.map +1 -0
- package/dist/esm/components/ContextOverlay/ContextMenu.js +2 -2
- package/dist/esm/components/ContextOverlay/ContextMenu.js.map +1 -1
- package/dist/esm/components/ContextOverlay/ContextOverlay.js +67 -29
- 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/IconButton.js.map +1 -1
- 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/TextReducer/TextReducer.js +14 -3
- package/dist/esm/components/TextReducer/TextReducer.js.map +1 -1
- package/dist/esm/components/Typography/InlineText.js +33 -0
- package/dist/esm/components/Typography/InlineText.js.map +1 -0
- package/dist/esm/components/Typography/index.js +1 -0
- package/dist/esm/components/Typography/index.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 +2 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +19 -7
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
- package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
- package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js +3 -3
- package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.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/esm/extensions/react-flow/edges/EdgeNew.js +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeNew.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +9 -0
- package/dist/types/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.d.ts +26 -10
- package/dist/types/common/index.d.ts +4 -1
- package/dist/types/common/utils/colorHash.d.ts +4 -3
- package/dist/types/common/utils/reduceToText.d.ts +1 -1
- package/dist/types/components/Application/ApplicationViewability.d.ts +36 -0
- package/dist/types/components/Application/index.d.ts +1 -0
- package/dist/types/components/ColorField/ColorField.d.ts +31 -0
- package/dist/types/components/ContextOverlay/ContextMenu.d.ts +1 -1
- 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/IconButton.d.ts +1 -1
- 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/Structure/TitleSubsection.d.ts +1 -1
- package/dist/types/components/Tabs/Tab.d.ts +2 -2
- package/dist/types/components/TextReducer/TextReducer.d.ts +13 -1
- package/dist/types/components/Typography/InlineText.d.ts +13 -0
- package/dist/types/components/Typography/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.d.ts +1 -1
- package/dist/types/extensions/codemirror/tests/codemirrorTestHelper.d.ts +1 -1
- package/package.json +54 -53
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +68 -35
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +1 -1
- package/src/cmem/ContentBlobToggler/ContentBlobToggler.tsx +1 -1
- package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +66 -18
- package/src/cmem/ContentBlobToggler/stories/StringPreviewContentBlobToggler.stories.tsx +27 -0
- package/src/cmem/ContentBlobToggler/tests/StringPreviewContentBlobToggler.test.tsx +98 -0
- package/src/cmem/react-flow/ReactFlow/ReactFlowV12.tsx +1 -0
- package/src/common/Intent/index.ts +2 -1
- package/src/common/index.ts +8 -3
- package/src/common/utils/colorHash.ts +36 -18
- package/src/common/utils/reduceToText.tsx +30 -2
- package/src/components/Application/ApplicationViewability.tsx +61 -0
- package/src/components/Application/_colors.scss +15 -0
- package/src/components/Application/_content.scss +7 -0
- package/src/components/Application/_header.scss +12 -3
- package/src/components/Application/_viewability.scss +13 -0
- package/src/components/Application/application.scss +1 -0
- package/src/components/Application/index.ts +1 -0
- package/src/components/Application/stories/ApplicationViewability.stories.tsx +37 -0
- package/src/components/Application/tests/ApplicationViewability.test.tsx +43 -0
- package/src/components/AutoSuggestion/tests/ExtendedCodeEditor.test.tsx +1 -1
- package/src/components/Card/card.scss +6 -0
- package/src/components/Checkbox/checkbox.scss +14 -2
- package/src/components/ColorField/ColorField.stories.tsx +69 -0
- package/src/components/ColorField/ColorField.test.tsx +125 -0
- package/src/components/ColorField/ColorField.tsx +200 -0
- package/src/components/ColorField/_colorfield.scss +56 -0
- package/src/components/ContentGroup/_contentgroup.scss +9 -0
- package/src/components/ContextOverlay/ContextMenu.tsx +4 -1
- package/src/components/ContextOverlay/ContextOverlay.tsx +94 -25
- package/src/components/ContextOverlay/tests/ContextMenu.test.tsx +43 -0
- package/src/components/ContextOverlay/tests/ContextOverlay.test.tsx +71 -0
- 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/Depiction/depiction.scss +6 -0
- package/src/components/Dialog/stories/Modal.stories.tsx +12 -150
- package/src/components/Dialog/stories/ModalContext.stories.tsx +153 -0
- package/src/components/FlexibleLayout/flexiblelayout.scss +16 -0
- package/src/components/Grid/grid.scss +17 -0
- package/src/components/Grid/stories/Grid.stories.tsx +10 -7
- package/src/components/Grid/stories/GridRow.stories.tsx +13 -7
- package/src/components/Icon/IconButton.tsx +1 -1
- 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/Notification/notification.scss +6 -0
- package/src/components/OverviewItem/overviewitem.scss +9 -0
- package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +28 -0
- package/src/components/OverviewItem/stories/OverviewItemActions.stories.tsx +2 -2
- package/src/components/OverviewItem/stories/OverviewItemDescription.stories.tsx +1 -1
- package/src/components/OverviewItem/stories/OverviewItemLine.stories.tsx +1 -1
- package/src/components/PropertyValuePair/propertyvalue.scss +23 -1
- package/src/components/RadioButton/RadioButton.tsx +15 -3
- package/src/components/RadioButton/radiobutton.scss +13 -0
- package/src/components/Separation/separation.scss +6 -0
- package/src/components/Table/table.scss +22 -0
- package/src/components/Tabs/stories/TabTitle.stories.tsx +7 -2
- package/src/components/Tag/stories/TagList.stories.tsx +2 -2
- package/src/components/Tag/tag.scss +19 -9
- package/src/components/TextReducer/TextReducer.stories.tsx +2 -1
- package/src/components/TextReducer/TextReducer.test.tsx +44 -0
- package/src/components/TextReducer/TextReducer.tsx +14 -4
- package/src/components/Typography/InlineText.tsx +24 -0
- package/src/components/Typography/_reset.scss +1 -0
- package/src/components/Typography/index.ts +1 -0
- package/src/components/Typography/stories/InlineText.stories.tsx +27 -0
- package/src/components/Typography/typography.scss +28 -2
- 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 +2 -0
- package/src/configuration/_customproperties.scss +32 -0
- package/src/configuration/stories/customproperties.stories.tsx +118 -0
- package/src/extensions/codemirror/CodeMirror.tsx +20 -9
- package/src/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.ts +1 -2
- package/src/extensions/codemirror/tests/codemirrorTestHelper.ts +3 -3
- 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/EdgeNew.tsx +2 -1
- package/src/extensions/react-flow/edges/_edges.scss +3 -2
- package/src/extensions/react-flow/handles/HandleDefault.tsx +2 -2
- package/src/extensions/react-flow/minimap/MiniMap.tsx +2 -1
- package/src/extensions/react-flow/minimap/MiniMapV12.tsx +1 -1
- package/src/extensions/react-flow/nodes/_nodes.scss +4 -3
- package/src/extensions/react-flow/nodes/nodeUtils.tsx +1 -0
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +2 -2
- package/src/index.scss +1 -0
|
@@ -17,6 +17,11 @@ body {
|
|
|
17
17
|
text-rendering: optimizelegibility;
|
|
18
18
|
-webkit-font-smoothing: antialiased;
|
|
19
19
|
-moz-osx-font-smoothing: grayscale;
|
|
20
|
+
// User-facing text may contain Unicode symbols (e.g. "★") that fall outside the primary font stack.
|
|
21
|
+
// Browsers pick different system fallback fonts for such characters, causing glyphs to render at
|
|
22
|
+
// different optical sizes (smaller in Firefox). font-size-adjust normalises the fallback font size
|
|
23
|
+
// by matching the primary font's x-height, reducing the visual size discrepancy across browsers.
|
|
24
|
+
font-size-adjust: from-font;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
code {
|
|
@@ -68,6 +73,11 @@ mark {
|
|
|
68
73
|
line-height: $eccgui-size-typo-caption-lineheight;
|
|
69
74
|
}
|
|
70
75
|
|
|
76
|
+
.#{$eccgui}-typography__contentblock.#{$eccgui}-typography--large {
|
|
77
|
+
font-size: $eccgui-size-typo-subtitle;
|
|
78
|
+
line-height: $eccgui-size-typo-subtitle-lineheight;
|
|
79
|
+
}
|
|
80
|
+
|
|
71
81
|
h1 {
|
|
72
82
|
.#{$eccgui}-typography__contentblock &,
|
|
73
83
|
&.#{$eccgui}-typography__text {
|
|
@@ -223,9 +233,9 @@ table {
|
|
|
223
233
|
max-width: 100%;
|
|
224
234
|
overflow: hidden;
|
|
225
235
|
text-overflow: ellipsis;
|
|
236
|
+
vertical-align: middle;
|
|
226
237
|
overflow-wrap: normal;
|
|
227
238
|
white-space: nowrap;
|
|
228
|
-
vertical-align: middle;
|
|
229
239
|
}
|
|
230
240
|
|
|
231
241
|
.#{$eccgui}-typography__overflowtext--inline {
|
|
@@ -241,8 +251,8 @@ table {
|
|
|
241
251
|
}
|
|
242
252
|
|
|
243
253
|
.#{$eccgui}-typography__overflowtext--ellipsis-reverse {
|
|
244
|
-
text-align: left;
|
|
245
254
|
text-overflow: ellipsis;
|
|
255
|
+
text-align: left;
|
|
246
256
|
direction: rtl;
|
|
247
257
|
unicode-bidi: embed;
|
|
248
258
|
|
|
@@ -263,6 +273,22 @@ table {
|
|
|
263
273
|
}
|
|
264
274
|
}
|
|
265
275
|
|
|
276
|
+
// InlineText
|
|
277
|
+
|
|
278
|
+
.#{$eccgui}-typography__inlinetext {
|
|
279
|
+
display: inline;
|
|
280
|
+
|
|
281
|
+
* {
|
|
282
|
+
display: inline;
|
|
283
|
+
|
|
284
|
+
& + * {
|
|
285
|
+
&::before {
|
|
286
|
+
content: " ";
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
266
292
|
// helpers
|
|
267
293
|
|
|
268
294
|
.#{$eccgui}-typography--nooverflow {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { createPortal } from "react-dom";
|
|
3
|
-
import { Classes as BlueprintClasses } from "@blueprintjs/core";
|
|
4
|
-
import { createPopper } from "@popperjs/core";
|
|
5
3
|
|
|
6
4
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
7
5
|
import {
|
|
@@ -14,6 +12,7 @@ import {
|
|
|
14
12
|
CardHeader,
|
|
15
13
|
CardOptions,
|
|
16
14
|
CardTitle,
|
|
15
|
+
DecoupledOverlay,
|
|
17
16
|
IconButton,
|
|
18
17
|
Markdown,
|
|
19
18
|
ModalSize,
|
|
@@ -130,7 +129,7 @@ export const VisualTour = ({
|
|
|
130
129
|
<Button
|
|
131
130
|
key={"next"}
|
|
132
131
|
variant="outlined"
|
|
133
|
-
|
|
132
|
+
elevated
|
|
134
133
|
onClick={() => {
|
|
135
134
|
setCurrentStepIndex(currentStepIndex + 1);
|
|
136
135
|
}}
|
|
@@ -144,7 +143,7 @@ export const VisualTour = ({
|
|
|
144
143
|
text={closeLabel}
|
|
145
144
|
onClick={closeTour}
|
|
146
145
|
variant="outlined"
|
|
147
|
-
|
|
146
|
+
elevated
|
|
148
147
|
rightIcon={"navigation-close"}
|
|
149
148
|
/>
|
|
150
149
|
),
|
|
@@ -292,25 +291,6 @@ interface StepPopoverProps {
|
|
|
292
291
|
|
|
293
292
|
/** Popover that is displayed and points at the highlighted element. */
|
|
294
293
|
const StepPopover = ({ highlightedElement, step, titleOption, actionButtons }: StepPopoverProps) => {
|
|
295
|
-
const tooltipRef = React.useCallback(
|
|
296
|
-
(tooltip: HTMLDivElement | null) => {
|
|
297
|
-
if (tooltip) {
|
|
298
|
-
createPopper(highlightedElement, tooltip, {
|
|
299
|
-
placement: "auto",
|
|
300
|
-
modifiers: [
|
|
301
|
-
{
|
|
302
|
-
name: "offset",
|
|
303
|
-
options: {
|
|
304
|
-
offset: [0, 15],
|
|
305
|
-
},
|
|
306
|
-
},
|
|
307
|
-
],
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
[highlightedElement]
|
|
312
|
-
);
|
|
313
|
-
|
|
314
294
|
const backdropRef = React.useCallback(
|
|
315
295
|
(backdrop: HTMLDivElement | null) => {
|
|
316
296
|
const highlightStencil = () => {
|
|
@@ -340,39 +320,39 @@ const StepPopover = ({ highlightedElement, step, titleOption, actionButtons }: S
|
|
|
340
320
|
[highlightedElement]
|
|
341
321
|
);
|
|
342
322
|
|
|
323
|
+
// map to only tooltip size because the `DecoupledOverlay` only supports them
|
|
324
|
+
let overlaySize: TooltipSize = "large";
|
|
325
|
+
switch (step.size) {
|
|
326
|
+
case "tiny":
|
|
327
|
+
overlaySize = "small";
|
|
328
|
+
break;
|
|
329
|
+
case "regular":
|
|
330
|
+
overlaySize = "medium";
|
|
331
|
+
break;
|
|
332
|
+
case "xlarge":
|
|
333
|
+
case "fullscreen":
|
|
334
|
+
overlaySize = "large";
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
|
|
343
338
|
return createPortal(
|
|
344
339
|
<div className={`${eccgui}-visual-tour`}>
|
|
345
340
|
<div className={`${eccgui}-visual-tour__focushelper`} ref={backdropRef} />
|
|
346
341
|
<div>
|
|
347
342
|
<div className={`${eccgui}-visual-tour__backdrop`} />
|
|
348
343
|
</div>
|
|
349
|
-
<
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
aria-hidden
|
|
362
|
-
/>
|
|
363
|
-
<div className={`${BlueprintClasses.POPOVER_CONTENT} ${eccgui}-visual-tour__overlay__content`}>
|
|
364
|
-
<Card isOnlyLayout elevation={-1} whitespaceAmount="small">
|
|
365
|
-
<CardHeader>
|
|
366
|
-
<CardTitle>{step.title}</CardTitle>
|
|
367
|
-
<CardOptions>{titleOption}</CardOptions>
|
|
368
|
-
</CardHeader>
|
|
369
|
-
<CardContent>
|
|
370
|
-
<StepContent step={step} />
|
|
371
|
-
</CardContent>
|
|
372
|
-
<CardActions inverseDirection>{actionButtons}</CardActions>
|
|
373
|
-
</Card>
|
|
374
|
-
</div>
|
|
375
|
-
</div>
|
|
344
|
+
<DecoupledOverlay targetSelectorOrElement={highlightedElement} size={overlaySize} usePortal={false}>
|
|
345
|
+
<Card isOnlyLayout elevation={-1} whitespaceAmount="small">
|
|
346
|
+
<CardHeader>
|
|
347
|
+
<CardTitle>{step.title}</CardTitle>
|
|
348
|
+
<CardOptions>{titleOption}</CardOptions>
|
|
349
|
+
</CardHeader>
|
|
350
|
+
<CardContent>
|
|
351
|
+
<StepContent step={step} />
|
|
352
|
+
</CardContent>
|
|
353
|
+
<CardActions inverseDirection>{actionButtons}</CardActions>
|
|
354
|
+
</Card>
|
|
355
|
+
</DecoupledOverlay>
|
|
376
356
|
</div>,
|
|
377
357
|
document.body
|
|
378
358
|
);
|
|
@@ -31,40 +31,6 @@
|
|
|
31
31
|
opacity: 0;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.#{$eccgui}-visual-tour__arrow {
|
|
35
|
-
&::before {
|
|
36
|
-
background: $card-background-color;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.#{$eccgui}-visual-tour__overlay[data-popper-placement="top"] & {
|
|
40
|
-
bottom: -0.5 * $eccgui-size-block-whitespace;
|
|
41
|
-
}
|
|
42
|
-
.#{$eccgui}-visual-tour__overlay[data-popper-placement="right"] & {
|
|
43
|
-
left: -0.5 * $eccgui-size-block-whitespace;
|
|
44
|
-
}
|
|
45
|
-
.#{$eccgui}-visual-tour__overlay[data-popper-placement="bottom"] & {
|
|
46
|
-
top: -0.5 * $eccgui-size-block-whitespace;
|
|
47
|
-
}
|
|
48
|
-
.#{$eccgui}-visual-tour__overlay[data-popper-placement="left"] & {
|
|
49
|
-
right: -0.5 * $eccgui-size-block-whitespace;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.#{$eccgui}-visual-tour__overlay {
|
|
54
|
-
z-index: 8002; // 2 over application header
|
|
55
|
-
&--small {
|
|
56
|
-
@extend .#{$eccgui}-tooltip--small;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&--medium {
|
|
60
|
-
@extend .#{$eccgui}-tooltip--medium;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&--large {
|
|
64
|
-
@extend .#{$eccgui}-tooltip--large;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
34
|
.#{$eccgui}-card__content {
|
|
69
35
|
.#{$eccgui}-visual-tour__overlay__content & {
|
|
70
36
|
max-height: 45vh;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@import "./Card/card";
|
|
6
6
|
@import "./Chat/chat";
|
|
7
7
|
@import "./Checkbox/checkbox";
|
|
8
|
+
@import "./DecoupledOverlay/decoupledoverlay";
|
|
8
9
|
@import "./Depiction/depiction";
|
|
9
10
|
@import "./Dialog/dialog";
|
|
10
11
|
@import "./FlexibleLayout/flexiblelayout";
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
@import "./Tabs/tabs";
|
|
33
34
|
@import "./Tag/tag";
|
|
34
35
|
@import "./TextField/textfield";
|
|
36
|
+
@import "./ColorField/colorfield";
|
|
35
37
|
@import "./TagInput/taginput";
|
|
36
38
|
@import "./Toolbar/toolbar";
|
|
37
39
|
@import "./Tooltip/tooltip";
|
package/src/components/index.ts
CHANGED
|
@@ -7,8 +7,10 @@ export * from "./Card";
|
|
|
7
7
|
export * from "./Chat";
|
|
8
8
|
export * from "./Checkbox/Checkbox";
|
|
9
9
|
export * from "./CodeAutocompleteField";
|
|
10
|
+
export * from "./ColorField/ColorField";
|
|
10
11
|
export * from "./ContentGroup/ContentGroup";
|
|
11
12
|
export * from "./ContextOverlay";
|
|
13
|
+
export * from "./DecoupledOverlay/DecoupledOverlay";
|
|
12
14
|
export * from "./Depiction/Depiction";
|
|
13
15
|
export * from "./Dialog";
|
|
14
16
|
export * from "./FlexibleLayout";
|
|
@@ -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 />;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React, { useMemo, useRef } from "react";
|
|
2
2
|
import { defaultKeymap, indentWithTab } from "@codemirror/commands";
|
|
3
3
|
import { defaultHighlightStyle, foldKeymap } from "@codemirror/language";
|
|
4
|
-
import { EditorState, Extension
|
|
4
|
+
import { Compartment,EditorState, Extension } from "@codemirror/state";
|
|
5
5
|
import { DOMEventHandlers, EditorView, KeyBinding, keymap, Rect, ViewUpdate } from "@codemirror/view";
|
|
6
6
|
import { minimalSetup } from "codemirror";
|
|
7
7
|
|
|
8
|
+
import { Markdown } from "../../cmem/markdown/Markdown";
|
|
8
9
|
import { IntentTypes } from "../../common/Intent";
|
|
9
10
|
import { markField } from "../../components/AutoSuggestion/extensions/markText";
|
|
10
11
|
import { TestableComponent } from "../../components/interfaces";
|
|
11
|
-
import { MarkdownToolbar } from "./toolbars/markdown.toolbar";
|
|
12
|
-
import { Markdown } from "../../cmem/markdown/Markdown";
|
|
13
12
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
14
13
|
|
|
15
14
|
//hooks
|
|
@@ -31,9 +30,10 @@ import {
|
|
|
31
30
|
adaptedLineNumbers,
|
|
32
31
|
adaptedLintGutter,
|
|
33
32
|
adaptedPlaceholder,
|
|
34
|
-
compartment,
|
|
35
33
|
adaptedSyntaxHighlighting,
|
|
34
|
+
compartment,
|
|
36
35
|
} from "./tests/codemirrorTestHelper";
|
|
36
|
+
import { MarkdownToolbar } from "./toolbars/markdown.toolbar";
|
|
37
37
|
import { ExtensionCreator } from "./types";
|
|
38
38
|
|
|
39
39
|
export interface CodeEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "translate" | "onChange" | "onKeyDown" | "onMouseDown" | "onScroll">, TestableComponent {
|
|
@@ -231,6 +231,10 @@ export const CodeEditor = ({
|
|
|
231
231
|
currentView.current = view
|
|
232
232
|
const currentReadOnly = React.useRef(readOnly)
|
|
233
233
|
currentReadOnly.current = readOnly
|
|
234
|
+
const currentOnChange = React.useRef(onChange)
|
|
235
|
+
currentOnChange.current = onChange
|
|
236
|
+
const currentDisabled = React.useRef(disabled)
|
|
237
|
+
currentDisabled.current = disabled
|
|
234
238
|
const [showPreview, setShowPreview] = React.useState<boolean>(false);
|
|
235
239
|
// CodeMirror Compartments in order to allow for re-configuration after initialization
|
|
236
240
|
const readOnlyCompartment = React.useRef<Compartment>(compartment())
|
|
@@ -319,11 +323,11 @@ export const CodeEditor = ({
|
|
|
319
323
|
disabledCompartment.current.of(EditorView?.editable.of(!disabled)),
|
|
320
324
|
AdaptedEditorViewDomEventHandlers(domEventHandlers) as Extension,
|
|
321
325
|
EditorView?.updateListener.of((v: ViewUpdate) => {
|
|
322
|
-
if (
|
|
326
|
+
if (currentDisabled.current) return;
|
|
323
327
|
|
|
324
|
-
if (
|
|
328
|
+
if (currentOnChange.current && v.docChanged) {
|
|
325
329
|
// Only fire if the text has actually been changed
|
|
326
|
-
|
|
330
|
+
currentOnChange.current(v.state.doc.toString());
|
|
327
331
|
}
|
|
328
332
|
|
|
329
333
|
if (onSelection)
|
|
@@ -377,7 +381,7 @@ export const CodeEditor = ({
|
|
|
377
381
|
}
|
|
378
382
|
|
|
379
383
|
if (disabled) {
|
|
380
|
-
view.dom.
|
|
384
|
+
view.dom.classList.add(`${eccgui}-disabled`);
|
|
381
385
|
}
|
|
382
386
|
|
|
383
387
|
if (intent) {
|
|
@@ -432,7 +436,14 @@ export const CodeEditor = ({
|
|
|
432
436
|
}, [tabIntentSize])
|
|
433
437
|
|
|
434
438
|
React.useEffect(() => {
|
|
435
|
-
updateExtension(EditorView?.editable.of(!disabled), disabledCompartment.current)
|
|
439
|
+
updateExtension(EditorView?.editable.of(!disabled), disabledCompartment.current);
|
|
440
|
+
if (view?.dom) {
|
|
441
|
+
if (disabled) {
|
|
442
|
+
view.dom.classList.add(`${eccgui}-disabled`);
|
|
443
|
+
} else {
|
|
444
|
+
view.dom.classList.remove(`${eccgui}-disabled`);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
436
447
|
}, [disabled])
|
|
437
448
|
|
|
438
449
|
React.useEffect(() => {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//adapted v6 modes imports
|
|
2
|
+
import {html} from "@codemirror/lang-html"
|
|
2
3
|
import { javascript } from "@codemirror/lang-javascript";
|
|
3
4
|
import { json } from "@codemirror/lang-json";
|
|
4
5
|
import { markdown } from "@codemirror/lang-markdown";
|
|
5
6
|
import { sql } from "@codemirror/lang-sql";
|
|
6
7
|
import { xml } from "@codemirror/lang-xml";
|
|
7
8
|
import { yaml } from "@codemirror/lang-yaml";
|
|
8
|
-
import {html} from "@codemirror/lang-html"
|
|
9
|
-
|
|
10
9
|
import { defaultHighlightStyle, LanguageSupport, StreamLanguage, StreamParser } from "@codemirror/language";
|
|
11
10
|
//legacy mode imports
|
|
12
11
|
import { jinja2 } from "@codemirror/legacy-modes/mode/jinja2";
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
//Todo this should become redundant with later patches that avoid this error
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import { syntaxHighlighting, foldGutter, codeFolding } from "@codemirror/language";
|
|
12
|
-
import {Extension, Compartment, StateEffect, EditorState} from "@codemirror/state";
|
|
10
|
+
import { codeFolding,foldGutter, syntaxHighlighting } from "@codemirror/language";
|
|
13
11
|
import { lintGutter } from "@codemirror/lint";
|
|
12
|
+
import {Compartment, EditorState,Extension, StateEffect} from "@codemirror/state";
|
|
13
|
+
import { EditorView, highlightActiveLine,highlightSpecialChars, lineNumbers, placeholder } from "@codemirror/view";
|
|
14
14
|
|
|
15
15
|
/** placeholder extension, current error '_view.placeholder is not a function' */
|
|
16
16
|
export const adaptedPlaceholder = (text?: string) =>
|
|
@@ -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
|
);
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
ConnectionLineComponentProps,
|
|
4
4
|
ConnectionLineType,
|
|
5
5
|
} from "@xyflow/react";
|
|
6
|
-
import { EdgeStraight, EdgeStep, EdgeBezier, EdgeDefaultV12Props } from "./../index";
|
|
7
6
|
|
|
8
7
|
import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
|
|
9
8
|
|
|
9
|
+
import { EdgeBezier, EdgeDefaultV12Props,EdgeStep, EdgeStraight } from "./../index";
|
|
10
|
+
|
|
10
11
|
export const EdgeNew = (edgeNewProps: ConnectionLineComponentProps) => {
|
|
11
12
|
|
|
12
13
|
const {
|
|
@@ -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;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { memo } from "react";
|
|
2
2
|
import { Handle as HandleV9, HandleProps as ReactFlowHandleV9Props } from "react-flow-renderer";
|
|
3
|
-
import { Handle as HandleV12, HandleProps as ReactFlowHandleV12Props } from "@xyflow/react";
|
|
4
3
|
import { Classes as BlueprintClasses } from "@blueprintjs/core";
|
|
4
|
+
import {Intent} from "@blueprintjs/core/src/common/intent";
|
|
5
|
+
import { Handle as HandleV12, HandleProps as ReactFlowHandleV12Props } from "@xyflow/react";
|
|
5
6
|
|
|
6
7
|
import { intentClassName, IntentTypes } from "../../../common/Intent";
|
|
7
8
|
import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
|
|
@@ -9,7 +10,6 @@ import { TooltipProps } from "../../../index";
|
|
|
9
10
|
import { ReacFlowVersionSupportProps, useReactFlowVersion } from "../versionsupport";
|
|
10
11
|
|
|
11
12
|
import { HandleContent, HandleContentProps } from "./HandleContent";
|
|
12
|
-
import {Intent} from "@blueprintjs/core/src/common/intent";
|
|
13
13
|
|
|
14
14
|
export type HandleCategory = "configuration" | "flexible" | "fixed" | "unknown" | "dependency";
|
|
15
15
|
|
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
} from "react-flow-renderer";
|
|
7
7
|
import { FlowTransform } from "react-flow-renderer/dist/types";
|
|
8
8
|
|
|
9
|
-
import { miniMapUtils } from "./utils";
|
|
10
9
|
import { ReacFlowVersionSupportProps, ReactFlowVersions, useReactFlowVersion } from "../versionsupport";
|
|
10
|
+
|
|
11
11
|
import { MiniMapV12, MiniMapV12Props } from "./MiniMapV12";
|
|
12
|
+
import { miniMapUtils } from "./utils";
|
|
12
13
|
|
|
13
14
|
export interface MiniMapBasicProps {
|
|
14
15
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { memo } from "react";
|
|
2
2
|
import { MiniMap as ReactFlowMiniMap, MiniMapProps as ReactFlowMiniMapProps } from "@xyflow/react";
|
|
3
3
|
|
|
4
|
-
import { miniMapUtils } from "./utils";
|
|
5
4
|
import { MiniMapBasicProps } from "./MiniMap";
|
|
5
|
+
import { miniMapUtils } from "./utils";
|
|
6
6
|
|
|
7
7
|
export interface MiniMapV12Props extends MiniMapBasicProps, Omit<ReactFlowMiniMapProps, "maskColor"> {
|
|
8
8
|
}
|