@eccenca/gui-elements 25.1.0-rc.4 → 25.2.0-rc.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 +21 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +9 -5
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +8 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +16 -4
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js +9 -5
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +8 -1
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +16 -4
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/types/components/AutoSuggestion/AutoSuggestion.d.ts +4 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +8 -1
- package/package.json +20 -13
- package/src/cmem/markdown/markdown.scss +1 -1
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +14 -7
- package/src/components/Breadcrumb/breadcrumb.scss +2 -2
- package/src/components/Button/button.scss +2 -0
- package/src/components/CodeAutocompleteField/CodeAutocompleteField.stories.tsx +7 -1
- package/src/components/Form/form.scss +2 -2
- package/src/components/Icon/canonicalIconNames.tsx +10 -2
- package/src/components/Pagination/Stories/Pagination.stories.tsx +32 -0
- package/src/components/Pagination/pagination.scss +55 -5
- package/src/components/Tabs/tabs.scss +2 -2
- package/src/components/Toolbar/toolbar.scss +1 -2
- package/src/components/Typography/_reset.scss +1 -0
- package/src/extensions/codemirror/CodeMirror.tsx +20 -4
- package/src/extensions/react-flow/_react-flow_v12.scss +1 -1
- package/src/extensions/react-flow/handles/_handles.scss +3 -3
- package/src/includes/carbon-components/_requisits.scss +3 -1
|
@@ -326,6 +326,20 @@ export const CodeEditor = ({
|
|
|
326
326
|
];
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
+
const syncIntentClass = React.useCallback((editorView: EditorView | undefined, nextIntent?: CodeEditorProps["intent"]) => {
|
|
330
|
+
if (!editorView?.dom) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
Array.from(editorView.dom.classList)
|
|
335
|
+
.filter((className) => className.startsWith(`${eccgui}-intent--`))
|
|
336
|
+
.forEach((className) => editorView.dom.classList.remove(className));
|
|
337
|
+
|
|
338
|
+
if (nextIntent) {
|
|
339
|
+
editorView.dom.classList.add(`${eccgui}-intent--${nextIntent}`);
|
|
340
|
+
}
|
|
341
|
+
}, []);
|
|
342
|
+
|
|
329
343
|
React.useEffect(() => {
|
|
330
344
|
const domEventHandlers = {
|
|
331
345
|
...addHandlersFor(!!onScroll, "scroll", onScroll),
|
|
@@ -360,7 +374,7 @@ export const CodeEditor = ({
|
|
|
360
374
|
onSelection(v.state.selection.ranges.filter((r) => !r.empty).map(({ from, to }) => ({ from, to })));
|
|
361
375
|
|
|
362
376
|
if (onFocusChange && currentIntent.current && !v.view.dom.classList?.contains(`${eccgui}-intent--${currentIntent.current}`)) {
|
|
363
|
-
v.view
|
|
377
|
+
syncIntentClass(v.view, currentIntent.current);
|
|
364
378
|
}
|
|
365
379
|
|
|
366
380
|
if (onCursorChange) {
|
|
@@ -410,9 +424,7 @@ export const CodeEditor = ({
|
|
|
410
424
|
view.dom.classList.add(`${eccgui}-disabled`);
|
|
411
425
|
}
|
|
412
426
|
|
|
413
|
-
|
|
414
|
-
view.dom.className += ` ${eccgui}-intent--${currentIntent.current}`;
|
|
415
|
-
}
|
|
427
|
+
syncIntentClass(view, currentIntent.current);
|
|
416
428
|
|
|
417
429
|
if (autoFocus) {
|
|
418
430
|
view.focus();
|
|
@@ -472,6 +484,10 @@ export const CodeEditor = ({
|
|
|
472
484
|
}
|
|
473
485
|
}, [disabled])
|
|
474
486
|
|
|
487
|
+
React.useEffect(() => {
|
|
488
|
+
syncIntentClass(view, intent);
|
|
489
|
+
}, [intent, view, syncIntentClass]);
|
|
490
|
+
|
|
475
491
|
React.useEffect(() => {
|
|
476
492
|
setEditorAppearance({
|
|
477
493
|
...editorAppearance,
|
|
@@ -62,10 +62,10 @@ div.react-flow__handle {
|
|
|
62
62
|
inset: 0;
|
|
63
63
|
display: none;
|
|
64
64
|
cursor: pointer;
|
|
65
|
-
content: " ";
|
|
66
|
-
border-radius: 100%;
|
|
67
65
|
outline: dotted $eccgui-size-flow-handle-border currentcolor;
|
|
68
66
|
outline-offset: $eccgui-size-flow-handle * 0.75 + $eccgui-size-flow-handle-border * 0.5;
|
|
67
|
+
content: " ";
|
|
68
|
+
border-radius: 100%;
|
|
69
69
|
|
|
70
70
|
.react-flow__node:hover & {
|
|
71
71
|
display: block;
|
|
@@ -207,9 +207,9 @@ div.react-flow__handle-bottom {
|
|
|
207
207
|
.#{$eccgui}-graphviz__node--hidehandles {
|
|
208
208
|
& ~ .react-flow__handle:not(.connectable) {
|
|
209
209
|
z-index: -1;
|
|
210
|
+
visibility: hidden;
|
|
210
211
|
width: 1px;
|
|
211
212
|
height: 1px;
|
|
212
|
-
visibility: hidden;
|
|
213
213
|
border: none;
|
|
214
214
|
|
|
215
215
|
&.react-flow__handle-top {
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
$use-flexbox-grid: $use-flexbox-grid
|
|
9
9
|
);
|
|
10
10
|
@use "~@carbon/react/scss/utilities/_visually-hidden";
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
// we replicate the function here because the distinct import is not possible via @carbon/react
|
|
12
13
|
// @import "~@carbon/styles/scss/components/ui-shell/functions";
|
|
13
14
|
@function mini-units($count) {
|
|
14
15
|
@return 0.5rem * $count;
|
|
15
16
|
}
|
|
17
|
+
|
|
16
18
|
@import "~@carbon/react/scss/feature-flags";
|
|
17
19
|
@import "~@carbon/react/scss/colors";
|
|
18
20
|
@import "~@carbon/react/scss/theme";
|