@eccenca/gui-elements 25.0.0 → 25.1.0-rc.1
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 +65 -0
- 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/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/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/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/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 +1 -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/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/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/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/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 +1 -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/components/Application/ApplicationViewability.d.ts +36 -0
- package/dist/types/components/Application/index.d.ts +1 -0
- 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/Structure/TitleSubsection.d.ts +1 -1
- package/dist/types/components/Tabs/Tab.d.ts +2 -2
- 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 +1 -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 +50 -51
- 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/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/ContentGroup/_contentgroup.scss +9 -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/Depiction/depiction.scss +6 -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/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.test.tsx +3 -3
- 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 +1 -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 +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
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import { ContentBlobToggler, ContentBlobTogglerProps, Markdown } from "
|
|
3
|
+
import { ContentBlobToggler, ContentBlobTogglerProps, InlineText, Markdown, utils } from "./../../index";
|
|
4
4
|
|
|
5
5
|
export interface StringPreviewContentBlobTogglerProps
|
|
6
6
|
extends Omit<ContentBlobTogglerProps, "previewContent" | "enableToggler"> {
|
|
7
7
|
/**
|
|
8
|
-
The preview content will be cut to this length if it is too long.
|
|
8
|
+
* The preview content will be cut to this length if it is too long.
|
|
9
9
|
*/
|
|
10
10
|
previewMaxLength?: number;
|
|
11
11
|
/**
|
|
12
|
-
The content string.
|
|
12
|
+
* The content string.
|
|
13
|
+
* If it is smaller than `previewMaxLength` this will be displayed in full, else `fullviewContent` will be displayed.
|
|
13
14
|
*/
|
|
14
15
|
content: string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Use only parts of `content` in the preview.
|
|
18
|
+
* `firstMarkdownSection` uses the content until the first double line return.
|
|
19
|
+
* Currently overwritten by `firstNonEmptyLineOnly`.
|
|
20
|
+
*/
|
|
21
|
+
useOnly?: "firstNonEmptyLine" | "firstMarkdownSection";
|
|
22
|
+
/**
|
|
23
|
+
* If enabled the preview is rendered as Markdown.
|
|
24
|
+
*/
|
|
18
25
|
renderPreviewAsMarkdown?: boolean;
|
|
19
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* White-listing of HTML elements that will be rendered when renderPreviewAsMarkdown is enabled.
|
|
28
|
+
*/
|
|
20
29
|
allowedHtmlElementsInPreview?: string[];
|
|
21
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Allows to add non-string elements at the end of the content if the full description is shown, i.e. no toggler is necessary.
|
|
22
32
|
* This allows to add non-string elements to both the full-view content and the pure string content.
|
|
23
33
|
*/
|
|
24
34
|
noTogglerContentSuffix?: JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* If only the first non-empty line should be shown in the preview.
|
|
37
|
+
* This will in addition also be shortened according to `previewMaxLength`.
|
|
38
|
+
* @deprecated (v26) use `useOnly="firstNonEmptyLine"` instead
|
|
39
|
+
*/
|
|
40
|
+
firstNonEmptyLineOnly?: boolean;
|
|
25
41
|
}
|
|
26
42
|
|
|
27
|
-
/** Version of the content toggler for text
|
|
43
|
+
/** Version of the content toggler for text centric content. */
|
|
28
44
|
export function StringPreviewContentBlobToggler({
|
|
29
45
|
className = "",
|
|
30
46
|
previewMaxLength,
|
|
@@ -33,14 +49,28 @@ export function StringPreviewContentBlobToggler({
|
|
|
33
49
|
content,
|
|
34
50
|
fullviewContent,
|
|
35
51
|
startExtended,
|
|
36
|
-
|
|
52
|
+
useOnly,
|
|
37
53
|
renderPreviewAsMarkdown = false,
|
|
38
54
|
allowedHtmlElementsInPreview,
|
|
39
55
|
noTogglerContentSuffix,
|
|
56
|
+
firstNonEmptyLineOnly,
|
|
40
57
|
}: StringPreviewContentBlobTogglerProps) {
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
58
|
+
// need to test `firstNonEmptyLineOnly` until property is removed
|
|
59
|
+
const useOnlyTest: StringPreviewContentBlobTogglerProps["useOnly"] = firstNonEmptyLineOnly
|
|
60
|
+
? "firstNonEmptyLine"
|
|
61
|
+
: useOnly;
|
|
62
|
+
|
|
63
|
+
let previewString = content;
|
|
64
|
+
switch (useOnlyTest) {
|
|
65
|
+
case "firstNonEmptyLine":
|
|
66
|
+
previewString = useOnlyPart(content, regexFirstNonEmptyLine);
|
|
67
|
+
break;
|
|
68
|
+
case "firstMarkdownSection":
|
|
69
|
+
previewString = useOnlyPart(content, regexFirstMarkdownSection);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let enableToggler = previewString !== content;
|
|
73
|
+
|
|
44
74
|
let previewContent = renderPreviewAsMarkdown ? (
|
|
45
75
|
<Markdown key="markdown-content" allowedElements={allowedHtmlElementsInPreview}>
|
|
46
76
|
{previewString}
|
|
@@ -48,6 +78,15 @@ export function StringPreviewContentBlobToggler({
|
|
|
48
78
|
) : (
|
|
49
79
|
previewString
|
|
50
80
|
);
|
|
81
|
+
|
|
82
|
+
if (
|
|
83
|
+
previewMaxLength &&
|
|
84
|
+
utils.reduceToText(previewContent, { decodeHtmlEntities: true }).length > previewMaxLength
|
|
85
|
+
) {
|
|
86
|
+
previewContent = utils.reduceToText(previewContent, { decodeHtmlEntities: true }).slice(0, previewMaxLength);
|
|
87
|
+
enableToggler = true;
|
|
88
|
+
}
|
|
89
|
+
|
|
51
90
|
if (!enableToggler && noTogglerContentSuffix) {
|
|
52
91
|
previewContent = (
|
|
53
92
|
<>
|
|
@@ -60,7 +99,7 @@ export function StringPreviewContentBlobToggler({
|
|
|
60
99
|
return (
|
|
61
100
|
<ContentBlobToggler
|
|
62
101
|
className={className}
|
|
63
|
-
previewContent={previewContent}
|
|
102
|
+
previewContent={<InlineText>{previewContent}</InlineText>}
|
|
64
103
|
toggleExtendText={toggleExtendText}
|
|
65
104
|
toggleReduceText={toggleReduceText}
|
|
66
105
|
fullviewContent={fullviewContent}
|
|
@@ -70,17 +109,26 @@ export function StringPreviewContentBlobToggler({
|
|
|
70
109
|
);
|
|
71
110
|
}
|
|
72
111
|
|
|
73
|
-
const
|
|
112
|
+
const regexFirstNonEmptyLine = new RegExp("\r|\n"); // eslint-disable-line
|
|
113
|
+
const regexFirstMarkdownSection = new RegExp("\r\n\r\n|\n\n"); // eslint-disable-line
|
|
74
114
|
|
|
75
115
|
/**
|
|
76
116
|
* Takes the first non-empty line from a preview string.
|
|
77
117
|
*/
|
|
78
118
|
function firstNonEmptyLine(preview: string) {
|
|
119
|
+
return useOnlyPart(preview, regexFirstNonEmptyLine);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Returns only the first part from a preview string.
|
|
124
|
+
* Or the full string as fallback.
|
|
125
|
+
*/
|
|
126
|
+
function useOnlyPart(preview: string, regexTest: RegExp): string {
|
|
79
127
|
const previewString = preview.trim();
|
|
80
|
-
const result =
|
|
81
|
-
return result !== null ?
|
|
128
|
+
const result = regexTest.exec(previewString);
|
|
129
|
+
return result !== null ? result.input.slice(0, result.index) : previewString;
|
|
82
130
|
}
|
|
83
131
|
|
|
84
132
|
export const stringPreviewContentBlobTogglerUtils = {
|
|
85
133
|
firstNonEmptyLine,
|
|
86
|
-
};
|
|
134
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import { Markdown, StringPreviewContentBlobToggler } from "../../../index";
|
|
5
|
+
|
|
6
|
+
const config = {
|
|
7
|
+
title: "CMEM/ContentBlobToggler/StringPreview",
|
|
8
|
+
component: StringPreviewContentBlobToggler,
|
|
9
|
+
} as Meta<typeof StringPreviewContentBlobToggler>;
|
|
10
|
+
export default config;
|
|
11
|
+
|
|
12
|
+
const Template: StoryFn<typeof StringPreviewContentBlobToggler> = (args) => (
|
|
13
|
+
<StringPreviewContentBlobToggler {...args} />
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const initialTeststring =
|
|
17
|
+
"A library for GUI elements.\nIn order to create graphical user interfaces, please have look at the documentation at [Github](https://github.com/eccenca/gui-elements).";
|
|
18
|
+
|
|
19
|
+
export const Default = Template.bind({});
|
|
20
|
+
Default.args = {
|
|
21
|
+
content: initialTeststring,
|
|
22
|
+
fullviewContent: <Markdown htmlContentBlockProps={{ large: true }}>{initialTeststring}</Markdown>,
|
|
23
|
+
previewMaxLength: 64,
|
|
24
|
+
renderPreviewAsMarkdown: true,
|
|
25
|
+
toggleExtendText: "show more",
|
|
26
|
+
toggleReduceText: "show less",
|
|
27
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render, RenderResult } from "@testing-library/react";
|
|
3
|
+
|
|
4
|
+
import "@testing-library/jest-dom";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
StringPreviewContentBlobToggler,
|
|
8
|
+
StringPreviewContentBlobTogglerProps,
|
|
9
|
+
} from "../StringPreviewContentBlobToggler";
|
|
10
|
+
|
|
11
|
+
import { Default as StringPreviewContentBlobTogglerStory } from "./../stories/StringPreviewContentBlobToggler.stories";
|
|
12
|
+
|
|
13
|
+
describe("StringPreviewContentBlobToggler", () => {
|
|
14
|
+
const textMustExist = (queryByText: RenderResult["queryByText"], text: string) => {
|
|
15
|
+
expect(queryByText(text, { exact: false })).not.toBeNull();
|
|
16
|
+
};
|
|
17
|
+
const textMustNotExist = (queryByText: RenderResult["queryByText"], text: string) => {
|
|
18
|
+
expect(queryByText(text, { exact: false })).toBeNull();
|
|
19
|
+
};
|
|
20
|
+
it("should cut preview and show toggler to extend", () => {
|
|
21
|
+
const { queryByText } = render(
|
|
22
|
+
<StringPreviewContentBlobToggler
|
|
23
|
+
{...(StringPreviewContentBlobTogglerStory.args as StringPreviewContentBlobTogglerProps)}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
textMustExist(queryByText, "A library for GUI elements.");
|
|
27
|
+
textMustNotExist(
|
|
28
|
+
queryByText,
|
|
29
|
+
"In order to create graphical user interfaces, please have look at the documentation at"
|
|
30
|
+
);
|
|
31
|
+
textMustExist(queryByText, "show more");
|
|
32
|
+
});
|
|
33
|
+
it("should display full view if `startExtended` is enabled, and show toggler to reduce", () => {
|
|
34
|
+
const { queryByText } = render(
|
|
35
|
+
<StringPreviewContentBlobToggler
|
|
36
|
+
{...(StringPreviewContentBlobTogglerStory.args as StringPreviewContentBlobTogglerProps)}
|
|
37
|
+
startExtended
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
textMustExist(
|
|
41
|
+
queryByText,
|
|
42
|
+
"In order to create graphical user interfaces, please have look at the documentation at"
|
|
43
|
+
);
|
|
44
|
+
textMustExist(queryByText, "show less");
|
|
45
|
+
});
|
|
46
|
+
it('should display only first content line on `useOnly={"firstNonEmptyLine"}`', () => {
|
|
47
|
+
const { queryByText } = render(
|
|
48
|
+
<StringPreviewContentBlobToggler
|
|
49
|
+
{...(StringPreviewContentBlobTogglerStory.args as StringPreviewContentBlobTogglerProps)}
|
|
50
|
+
useOnly={"firstNonEmptyLine"}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
textMustExist(queryByText, "A library for GUI elements.");
|
|
54
|
+
textMustNotExist(queryByText, "In order to create");
|
|
55
|
+
});
|
|
56
|
+
it('should use first Markdown paragraph as preview content on `useOnly={"firstMarkdownSection"}` but shorten it', () => {
|
|
57
|
+
const { queryByText } = render(
|
|
58
|
+
<StringPreviewContentBlobToggler
|
|
59
|
+
{...(StringPreviewContentBlobTogglerStory.args as StringPreviewContentBlobTogglerProps)}
|
|
60
|
+
useOnly={"firstMarkdownSection"}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
textMustExist(queryByText, "A library for GUI elements.");
|
|
64
|
+
textMustExist(queryByText, "In order to create");
|
|
65
|
+
textMustNotExist(queryByText, "please have look at the documentation at");
|
|
66
|
+
});
|
|
67
|
+
it("should display full preview and no toggler if content is short enough", () => {
|
|
68
|
+
const { queryByText } = render(
|
|
69
|
+
<StringPreviewContentBlobToggler
|
|
70
|
+
{...(StringPreviewContentBlobTogglerStory.args as StringPreviewContentBlobTogglerProps)}
|
|
71
|
+
previewMaxLength={144}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
textMustExist(queryByText, "A library for GUI elements.");
|
|
75
|
+
textMustExist(
|
|
76
|
+
queryByText,
|
|
77
|
+
"In order to create graphical user interfaces, please have look at the documentation at"
|
|
78
|
+
);
|
|
79
|
+
textMustNotExist(queryByText, "https://github.com/"); // test if Markdown was rendered
|
|
80
|
+
textMustNotExist(queryByText, "show more");
|
|
81
|
+
});
|
|
82
|
+
it("should not use Markdown rendering on `renderPreviewAsMarkdown={false}`", () => {
|
|
83
|
+
const { queryByText } = render(
|
|
84
|
+
<StringPreviewContentBlobToggler
|
|
85
|
+
{...(StringPreviewContentBlobTogglerStory.args as StringPreviewContentBlobTogglerProps)}
|
|
86
|
+
previewMaxLength={144}
|
|
87
|
+
renderPreviewAsMarkdown={false}
|
|
88
|
+
/>
|
|
89
|
+
);
|
|
90
|
+
textMustExist(queryByText, "A library for GUI elements.");
|
|
91
|
+
textMustExist(
|
|
92
|
+
queryByText,
|
|
93
|
+
"In order to create graphical user interfaces, please have look at the documentation at"
|
|
94
|
+
);
|
|
95
|
+
textMustExist(queryByText, "https://github.com/"); // test if Markdown was rendered
|
|
96
|
+
textMustExist(queryByText, "show more");
|
|
97
|
+
});
|
|
98
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
2
1
|
import { Intent as BlueprintIntent } from "@blueprintjs/core";
|
|
3
2
|
|
|
3
|
+
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
4
|
+
|
|
4
5
|
export type IntentBlueprint = BlueprintIntent;
|
|
5
6
|
export const DefinitionsBlueprint = BlueprintIntent;
|
|
6
7
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
|
|
4
|
+
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
5
|
+
|
|
6
|
+
type media = "print" | "screen";
|
|
7
|
+
|
|
8
|
+
interface ApplicationViewabilityShow {
|
|
9
|
+
/**
|
|
10
|
+
* Show on media type.
|
|
11
|
+
* If used, `hide` cannot be set.
|
|
12
|
+
*/
|
|
13
|
+
show: media;
|
|
14
|
+
hide?: never;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface ApplicationViewabilityHide {
|
|
18
|
+
/**
|
|
19
|
+
* Hide on media type.
|
|
20
|
+
* If used, `show` cannot be set.
|
|
21
|
+
*/
|
|
22
|
+
hide: media;
|
|
23
|
+
show?: never;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface ApplicationViewabilityUndecided {
|
|
27
|
+
/**
|
|
28
|
+
* Only one child allowed.
|
|
29
|
+
* Need to process the `className` property.
|
|
30
|
+
*/
|
|
31
|
+
children: React.ReactElement<{ className?: string }>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ApplicationViewabilityProps = ApplicationViewabilityUndecided &
|
|
35
|
+
(ApplicationViewabilityShow | ApplicationViewabilityHide);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Sets the viewability of the the contained element regarding media.
|
|
39
|
+
* Can be used to hide elements, e.g. when the page is printed.
|
|
40
|
+
*/
|
|
41
|
+
export const ApplicationViewability = ({ children, show, hide }: ApplicationViewabilityProps) => {
|
|
42
|
+
if (!show && !hide) {
|
|
43
|
+
return children;
|
|
44
|
+
}
|
|
45
|
+
if (show === hide) {
|
|
46
|
+
// eslint-disable-next-line no-console
|
|
47
|
+
console.warn("`<ApplicationViewability/>` used with same media type for `hide` and `show`.");
|
|
48
|
+
return children;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const enhancedClone = React.cloneElement(children, {
|
|
52
|
+
className: classNames(children.props.className, {
|
|
53
|
+
[`${eccgui}-application__hide--${hide}`]: hide,
|
|
54
|
+
[`${eccgui}-application__show--${show}`]: show,
|
|
55
|
+
}),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
return enhancedClone;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default ApplicationViewability;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use "sass:list";
|
|
3
3
|
|
|
4
4
|
:root {
|
|
5
|
+
// creating css custom properties from palette colors
|
|
5
6
|
@each $palette-group-name, $palette-group-tints in $eccgui-color-palette-light {
|
|
6
7
|
@each $palette-tint-name, $palette-tint-colors in $palette-group-tints {
|
|
7
8
|
@for $i from 1 through list.length($palette-tint-colors) {
|
|
@@ -12,4 +13,18 @@
|
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
}
|
|
16
|
+
|
|
17
|
+
// set aliases for base colors
|
|
18
|
+
--#{$eccgui}-color-primary: #{$eccgui-color-primary};
|
|
19
|
+
--#{$eccgui}-color-primary-contrast: #{$eccgui-color-primary-contrast};
|
|
20
|
+
--#{$eccgui}-color-accent: #{$eccgui-color-accent};
|
|
21
|
+
--#{$eccgui}-color-accent-contrast: #{$eccgui-color-accent-contrast};
|
|
22
|
+
--#{$eccgui}-color-success-foreground: #{$eccgui-color-success-text};
|
|
23
|
+
--#{$eccgui}-color-success-background: #{$eccgui-color-success-background};
|
|
24
|
+
--#{$eccgui}-color-info-foreground: #{$eccgui-color-info-text};
|
|
25
|
+
--#{$eccgui}-color-info-background: #{$eccgui-color-info-background};
|
|
26
|
+
--#{$eccgui}-color-warning-foreground: #{$eccgui-color-warning-text};
|
|
27
|
+
--#{$eccgui}-color-warning-background: #{$eccgui-color-warning-background};
|
|
28
|
+
--#{$eccgui}-color-danger-foreground: #{$eccgui-color-danger-text};
|
|
29
|
+
--#{$eccgui}-color-danger-background: #{$eccgui-color-danger-background};
|
|
15
30
|
}
|
|
@@ -25,3 +25,10 @@ $ui-02: $eccgui-color-workspace-background !default;
|
|
|
25
25
|
.#{$eccgui}-application__content--railsidebar {
|
|
26
26
|
margin-left: mini-units(8);
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
@media print {
|
|
30
|
+
.#{$eccgui}-application__content {
|
|
31
|
+
padding: $eccgui-size-block-whitespace 0 0 0 !important;
|
|
32
|
+
margin: 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -98,10 +98,10 @@ span.#{$prefix}--header__name {
|
|
|
98
98
|
.#{$eccgui}-application__title--content {
|
|
99
99
|
display: inline-block;
|
|
100
100
|
overflow: hidden;
|
|
101
|
+
text-overflow: ellipsis;
|
|
101
102
|
font-size: $eccgui-size-typo-caption;
|
|
102
103
|
font-weight: $eccgui-font-weight-bold;
|
|
103
104
|
line-height: $eccgui-size-typo-caption-lineheight;
|
|
104
|
-
text-overflow: ellipsis;
|
|
105
105
|
letter-spacing: $eccgui-font-spacing-wide;
|
|
106
106
|
white-space: nowrap;
|
|
107
107
|
}
|
|
@@ -122,7 +122,7 @@ span.#{$prefix}--header__name {
|
|
|
122
122
|
height: auto;
|
|
123
123
|
max-height: mini-units(5);
|
|
124
124
|
padding: 0;
|
|
125
|
-
margin: mini-units(1.4) 0 mini-units(1.6)
|
|
125
|
+
margin: mini-units(1.4) 0 mini-units(1.6);
|
|
126
126
|
vertical-align: middle;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -195,9 +195,9 @@ a.#{$prefix}--header__menu-item:active {
|
|
|
195
195
|
.#{$prefix}--header__action.#{$prefix}--btn--primary:focus,
|
|
196
196
|
a.#{$prefix}--header__name:focus,
|
|
197
197
|
a.#{$prefix}--header__menu-item:focus {
|
|
198
|
-
border: none;
|
|
199
198
|
outline: 1px dotted $shell-header-focus;
|
|
200
199
|
outline-offset: -1px;
|
|
200
|
+
border: none;
|
|
201
201
|
box-shadow: none;
|
|
202
202
|
}
|
|
203
203
|
.#{$prefix}--header__menu-title[aria-expanded="true"] {
|
|
@@ -267,3 +267,12 @@ a.#{$prefix}--header__menu-item:focus > svg {
|
|
|
267
267
|
margin: 0;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
+
|
|
271
|
+
@media print {
|
|
272
|
+
.#{$eccgui}-application__header {
|
|
273
|
+
position: relative;
|
|
274
|
+
& > :not(.#{$eccgui}-workspace__header) {
|
|
275
|
+
display: none;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@media print {
|
|
2
|
+
.#{eccgui}-application__hide--print,
|
|
3
|
+
.#{eccgui}-application__show--screen {
|
|
4
|
+
display: none !important;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@media screen {
|
|
9
|
+
.#{eccgui}-application__hide--screen,
|
|
10
|
+
.#{eccgui}-application__show--print {
|
|
11
|
+
display: none !important;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { LoremIpsum } from "react-lorem-ipsum";
|
|
3
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
4
|
+
|
|
5
|
+
import { ApplicationViewability } from "../../../index";
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/Application/Viewability",
|
|
8
|
+
component: ApplicationViewability,
|
|
9
|
+
argTypes: {
|
|
10
|
+
children: {
|
|
11
|
+
control: false,
|
|
12
|
+
},
|
|
13
|
+
hide: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "radio",
|
|
16
|
+
},
|
|
17
|
+
options: ["print", "screen"],
|
|
18
|
+
},
|
|
19
|
+
show: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "radio",
|
|
22
|
+
},
|
|
23
|
+
options: ["print", "screen"],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
} as Meta<typeof ApplicationViewability>;
|
|
27
|
+
|
|
28
|
+
const TemplateBasicExample: StoryFn<typeof ApplicationViewability> = (args) => <ApplicationViewability {...args} />;
|
|
29
|
+
|
|
30
|
+
export const Default = TemplateBasicExample.bind({});
|
|
31
|
+
Default.args = {
|
|
32
|
+
children: (
|
|
33
|
+
<div>
|
|
34
|
+
<LoremIpsum random={false} />
|
|
35
|
+
</div>
|
|
36
|
+
),
|
|
37
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { expect } from "@storybook/test";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
|
|
5
|
+
import "@testing-library/jest-dom";
|
|
6
|
+
|
|
7
|
+
import { ApplicationViewability, ApplicationViewabilityProps, CLASSPREFIX as eccgui } from "../../../index";
|
|
8
|
+
|
|
9
|
+
import { Default as ApplicationViewabilityStory } from "./../stories/ApplicationViewability.stories";
|
|
10
|
+
|
|
11
|
+
const applyViewabilityAndCheckClass = (props: Omit<ApplicationViewabilityProps, "children">) => {
|
|
12
|
+
const { container } = render(<ApplicationViewability {...ApplicationViewabilityStory.args} {...props} />);
|
|
13
|
+
const element = container.getElementsByClassName(
|
|
14
|
+
props.hide ? `${eccgui}-application__hide--${props.hide}` : `${eccgui}-application__show--${props.show}`
|
|
15
|
+
);
|
|
16
|
+
expect(element.length).toBe(1);
|
|
17
|
+
return element;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
describe("ApplicationViewability", () => {
|
|
21
|
+
it("should be visible on `show=screen`", () => {
|
|
22
|
+
applyViewabilityAndCheckClass({ show: "screen" });
|
|
23
|
+
/**
|
|
24
|
+
* Currently we cannot really test visibility via jest if it is defined by S/CSS rules because those styles are not known.
|
|
25
|
+
* Looks like it is not too easy to include and test them.
|
|
26
|
+
* So we only test for the correct CSS class.
|
|
27
|
+
*/
|
|
28
|
+
// console.log(window.getComputedStyle(element.item(0)??new Element).getPropertyValue("display"));
|
|
29
|
+
// waitFor(() => expect(element).toBeVisible());
|
|
30
|
+
});
|
|
31
|
+
it("should not be visible on `hide=screen`", () => {
|
|
32
|
+
applyViewabilityAndCheckClass({ hide: "screen" });
|
|
33
|
+
// waitFor(() => expect(element).not.toBeVisible());
|
|
34
|
+
});
|
|
35
|
+
it("should be visible on `hide=print`", () => {
|
|
36
|
+
applyViewabilityAndCheckClass({ hide: "print" });
|
|
37
|
+
// waitFor(() => expect(element).toBeVisible());
|
|
38
|
+
});
|
|
39
|
+
it("should not be visible on `show=print`", () => {
|
|
40
|
+
applyViewabilityAndCheckClass({ show: "print" });
|
|
41
|
+
// waitFor(() => expect(element).not.toBeVisible());
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -24,9 +24,15 @@ $control-indicator-spacing: $eccgui-size-inline-whitespace !default;
|
|
|
24
24
|
// $switch-background-color-active: rgba($gray1, 0.5) !default;
|
|
25
25
|
// $switch-background-color-disabled: $button-background-color-disabled !default;
|
|
26
26
|
$switch-checked-background-color: $eccgui-color-accent !default;
|
|
27
|
-
$switch-checked-background-color-hover: eccgui-color-rgba(
|
|
27
|
+
$switch-checked-background-color-hover: eccgui-color-rgba(
|
|
28
|
+
$switch-checked-background-color,
|
|
29
|
+
$eccgui-opacity-narrow
|
|
30
|
+
) !default;
|
|
28
31
|
$switch-checked-background-color-active: $switch-checked-background-color-hover !default;
|
|
29
|
-
$switch-checked-background-color-disabled: eccgui-color-rgba(
|
|
32
|
+
$switch-checked-background-color-disabled: eccgui-color-rgba(
|
|
33
|
+
$switch-checked-background-color,
|
|
34
|
+
$eccgui-opacity-disabled
|
|
35
|
+
) !default;
|
|
30
36
|
|
|
31
37
|
@import "~@blueprintjs/core/src/components/forms/controls"; // Checkbox, Radio, Switch
|
|
32
38
|
|
|
@@ -73,3 +79,9 @@ $switch-checked-background-color-disabled: eccgui-color-rgba($switch-checked-bac
|
|
|
73
79
|
display: inline-block;
|
|
74
80
|
vertical-align: text-top;
|
|
75
81
|
}
|
|
82
|
+
|
|
83
|
+
@media print {
|
|
84
|
+
.#{$ns}-control {
|
|
85
|
+
print-color-adjust: exact;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -60,3 +60,12 @@ $eccgui-color-scontentgroup-border-sub: eccgui-color-rgba(
|
|
|
60
60
|
flex-shrink: 1;
|
|
61
61
|
width: 100%;
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
@media print {
|
|
65
|
+
.#{$eccgui}-contentgroup__header__options {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
.#{$eccgui}-contentgroup--border-sub::after {
|
|
69
|
+
print-color-adjust: exact;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Utils as BlueprintUtils,
|
|
8
8
|
} from "@blueprintjs/core";
|
|
9
9
|
|
|
10
|
-
import { CLASSPREFIX as eccgui } from "../../
|
|
10
|
+
import { CLASSPREFIX as eccgui, WhiteSpaceContainer, WhiteSpaceContainerProps } from "../../index";
|
|
11
11
|
|
|
12
12
|
export interface ContextOverlayProps extends Omit<BlueprintPopoverProps, "position"> {
|
|
13
13
|
/**
|
|
@@ -24,6 +24,11 @@ export interface ContextOverlayProps extends Omit<BlueprintPopoverProps, "positi
|
|
|
24
24
|
* Currently experimental.
|
|
25
25
|
*/
|
|
26
26
|
usePlaceholder?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Adds white space to each side of the overlay content.
|
|
29
|
+
* For more control use `WhiteSpaceContainer` directly as wrapper for the content children.
|
|
30
|
+
*/
|
|
31
|
+
paddingSize?: WhiteSpaceContainerProps["paddingTop"];
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
/**
|
|
@@ -36,6 +41,8 @@ export const ContextOverlay = ({
|
|
|
36
41
|
preventTopPosition,
|
|
37
42
|
className = "",
|
|
38
43
|
usePlaceholder = false,
|
|
44
|
+
paddingSize,
|
|
45
|
+
content,
|
|
39
46
|
...otherPopoverProps
|
|
40
47
|
}: ContextOverlayProps) => {
|
|
41
48
|
const placeholderRef = React.useRef<HTMLElement>(null);
|
|
@@ -169,6 +176,18 @@ export const ContextOverlay = ({
|
|
|
169
176
|
) : (
|
|
170
177
|
<BlueprintPopover
|
|
171
178
|
placement="bottom"
|
|
179
|
+
content={content ? (
|
|
180
|
+
paddingSize ? (
|
|
181
|
+
<WhiteSpaceContainer
|
|
182
|
+
paddingTop={paddingSize}
|
|
183
|
+
paddingRight={paddingSize}
|
|
184
|
+
paddingBottom={paddingSize}
|
|
185
|
+
paddingLeft={paddingSize}
|
|
186
|
+
>
|
|
187
|
+
{content}
|
|
188
|
+
</WhiteSpaceContainer>
|
|
189
|
+
) : content
|
|
190
|
+
) : undefined}
|
|
172
191
|
{...otherPopoverProps}
|
|
173
192
|
className={targetClassName}
|
|
174
193
|
portalClassName={portalClassNameFinal.trim() ?? undefined}
|