@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.
Files changed (193) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +17 -13
  3. package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
  4. package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js +1 -3
  5. package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
  6. package/dist/cjs/cmem/ContentBlobToggler/ContentBlobToggler.js +1 -0
  7. package/dist/cjs/cmem/ContentBlobToggler/ContentBlobToggler.js.map +1 -1
  8. package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +34 -11
  9. package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
  10. package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -1
  11. package/dist/cjs/common/Intent/index.js +1 -1
  12. package/dist/cjs/common/Intent/index.js.map +1 -1
  13. package/dist/cjs/components/Application/ApplicationViewability.js +33 -0
  14. package/dist/cjs/components/Application/ApplicationViewability.js.map +1 -0
  15. package/dist/cjs/components/Application/index.js +1 -0
  16. package/dist/cjs/components/Application/index.js.map +1 -1
  17. package/dist/cjs/components/ContextOverlay/ContextOverlay.js +6 -6
  18. package/dist/cjs/components/ContextOverlay/ContextOverlay.js.map +1 -1
  19. package/dist/cjs/components/DecoupledOverlay/DecoupledOverlay.js +47 -0
  20. package/dist/cjs/components/DecoupledOverlay/DecoupledOverlay.js.map +1 -0
  21. package/dist/cjs/components/Icon/IconButton.js.map +1 -1
  22. package/dist/cjs/components/Icon/canonicalIconNames.js +3 -0
  23. package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
  24. package/dist/cjs/components/Icon/transformIcon.js +14 -0
  25. package/dist/cjs/components/Icon/transformIcon.js.map +1 -0
  26. package/dist/cjs/components/MultiSelect/MultiSelect.js +2 -1
  27. package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
  28. package/dist/cjs/components/Typography/InlineText.js +29 -0
  29. package/dist/cjs/components/Typography/InlineText.js.map +1 -0
  30. package/dist/cjs/components/Typography/index.js +1 -0
  31. package/dist/cjs/components/Typography/index.js.map +1 -1
  32. package/dist/cjs/components/VisualTour/VisualTour.js +24 -32
  33. package/dist/cjs/components/VisualTour/VisualTour.js.map +1 -1
  34. package/dist/cjs/components/index.js +1 -0
  35. package/dist/cjs/components/index.js.map +1 -1
  36. package/dist/cjs/extensions/codemirror/CodeMirror.js +18 -6
  37. package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
  38. package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
  39. package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
  40. package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js +2 -2
  41. package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
  42. package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +1 -1
  43. package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
  44. package/dist/cjs/extensions/react-flow/edges/EdgeNew.js +1 -1
  45. package/dist/cjs/extensions/react-flow/edges/EdgeNew.js.map +1 -1
  46. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +1 -1
  47. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  48. package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +1 -1
  49. package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
  50. package/dist/cjs/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
  51. package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
  52. package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js +19 -14
  53. package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
  54. package/dist/esm/cmem/ActivityControl/SilkActivityControl.js +1 -3
  55. package/dist/esm/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
  56. package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js +1 -0
  57. package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js.map +1 -1
  58. package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +32 -9
  59. package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
  60. package/dist/esm/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -1
  61. package/dist/esm/common/Intent/index.js +1 -1
  62. package/dist/esm/common/Intent/index.js.map +1 -1
  63. package/dist/esm/components/Application/ApplicationViewability.js +28 -0
  64. package/dist/esm/components/Application/ApplicationViewability.js.map +1 -0
  65. package/dist/esm/components/Application/index.js +1 -0
  66. package/dist/esm/components/Application/index.js.map +1 -1
  67. package/dist/esm/components/ContextOverlay/ContextOverlay.js +3 -3
  68. package/dist/esm/components/ContextOverlay/ContextOverlay.js.map +1 -1
  69. package/dist/esm/components/DecoupledOverlay/DecoupledOverlay.js +41 -0
  70. package/dist/esm/components/DecoupledOverlay/DecoupledOverlay.js.map +1 -0
  71. package/dist/esm/components/Icon/IconButton.js.map +1 -1
  72. package/dist/esm/components/Icon/canonicalIconNames.js +3 -0
  73. package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
  74. package/dist/esm/components/Icon/transformIcon.js +21 -0
  75. package/dist/esm/components/Icon/transformIcon.js.map +1 -0
  76. package/dist/esm/components/MultiSelect/MultiSelect.js +3 -2
  77. package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
  78. package/dist/esm/components/Typography/InlineText.js +33 -0
  79. package/dist/esm/components/Typography/InlineText.js.map +1 -0
  80. package/dist/esm/components/Typography/index.js +1 -0
  81. package/dist/esm/components/Typography/index.js.map +1 -1
  82. package/dist/esm/components/VisualTour/VisualTour.js +25 -33
  83. package/dist/esm/components/VisualTour/VisualTour.js.map +1 -1
  84. package/dist/esm/components/index.js +1 -0
  85. package/dist/esm/components/index.js.map +1 -1
  86. package/dist/esm/extensions/codemirror/CodeMirror.js +19 -7
  87. package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
  88. package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
  89. package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
  90. package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js +3 -3
  91. package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
  92. package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +1 -1
  93. package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
  94. package/dist/esm/extensions/react-flow/edges/EdgeNew.js +1 -1
  95. package/dist/esm/extensions/react-flow/edges/EdgeNew.js.map +1 -1
  96. package/dist/esm/extensions/react-flow/handles/HandleDefault.js +1 -1
  97. package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  98. package/dist/esm/extensions/react-flow/minimap/MiniMap.js +1 -1
  99. package/dist/esm/extensions/react-flow/minimap/MiniMap.js.map +1 -1
  100. package/dist/esm/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
  101. package/dist/esm/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
  102. package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +9 -0
  103. package/dist/types/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.d.ts +26 -10
  104. package/dist/types/components/Application/ApplicationViewability.d.ts +36 -0
  105. package/dist/types/components/Application/index.d.ts +1 -0
  106. package/dist/types/components/ContextOverlay/ContextOverlay.d.ts +7 -1
  107. package/dist/types/components/DecoupledOverlay/DecoupledOverlay.d.ts +20 -0
  108. package/dist/types/components/Icon/IconButton.d.ts +1 -1
  109. package/dist/types/components/Icon/canonicalIconNames.d.ts +2 -0
  110. package/dist/types/components/Icon/transformIcon.d.ts +2 -0
  111. package/dist/types/components/MultiSelect/MultiSelect.d.ts +1 -1
  112. package/dist/types/components/Structure/TitleSubsection.d.ts +1 -1
  113. package/dist/types/components/Tabs/Tab.d.ts +2 -2
  114. package/dist/types/components/Typography/InlineText.d.ts +13 -0
  115. package/dist/types/components/Typography/index.d.ts +1 -0
  116. package/dist/types/components/index.d.ts +1 -0
  117. package/dist/types/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.d.ts +1 -1
  118. package/dist/types/extensions/codemirror/tests/codemirrorTestHelper.d.ts +1 -1
  119. package/package.json +50 -51
  120. package/src/cmem/ActivityControl/ActivityControlWidget.tsx +68 -35
  121. package/src/cmem/ActivityControl/SilkActivityControl.tsx +1 -1
  122. package/src/cmem/ContentBlobToggler/ContentBlobToggler.tsx +1 -1
  123. package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +66 -18
  124. package/src/cmem/ContentBlobToggler/stories/StringPreviewContentBlobToggler.stories.tsx +27 -0
  125. package/src/cmem/ContentBlobToggler/tests/StringPreviewContentBlobToggler.test.tsx +98 -0
  126. package/src/cmem/react-flow/ReactFlow/ReactFlowV12.tsx +1 -0
  127. package/src/common/Intent/index.ts +2 -1
  128. package/src/components/Application/ApplicationViewability.tsx +61 -0
  129. package/src/components/Application/_colors.scss +15 -0
  130. package/src/components/Application/_content.scss +7 -0
  131. package/src/components/Application/_header.scss +12 -3
  132. package/src/components/Application/_viewability.scss +13 -0
  133. package/src/components/Application/application.scss +1 -0
  134. package/src/components/Application/index.ts +1 -0
  135. package/src/components/Application/stories/ApplicationViewability.stories.tsx +37 -0
  136. package/src/components/Application/tests/ApplicationViewability.test.tsx +43 -0
  137. package/src/components/AutoSuggestion/tests/ExtendedCodeEditor.test.tsx +1 -1
  138. package/src/components/Card/card.scss +6 -0
  139. package/src/components/Checkbox/checkbox.scss +14 -2
  140. package/src/components/ContentGroup/_contentgroup.scss +9 -0
  141. package/src/components/ContextOverlay/ContextOverlay.tsx +20 -1
  142. package/src/components/DecoupledOverlay/DecoupledOverlay.stories.tsx +30 -0
  143. package/src/components/DecoupledOverlay/DecoupledOverlay.tsx +97 -0
  144. package/src/components/DecoupledOverlay/_decoupledoverlay.scss +46 -0
  145. package/src/components/Depiction/depiction.scss +6 -0
  146. package/src/components/FlexibleLayout/flexiblelayout.scss +16 -0
  147. package/src/components/Grid/grid.scss +17 -0
  148. package/src/components/Grid/stories/Grid.stories.tsx +10 -7
  149. package/src/components/Grid/stories/GridRow.stories.tsx +13 -7
  150. package/src/components/Icon/IconButton.tsx +1 -1
  151. package/src/components/Icon/canonicalIconNames.tsx +3 -0
  152. package/src/components/Icon/transformIcon.tsx +17 -0
  153. package/src/components/Link/Link.stories.tsx +30 -0
  154. package/src/components/Link/link.scss +28 -2
  155. package/src/components/MultiSelect/MultiSelect.tsx +12 -3
  156. package/src/components/Notification/notification.scss +6 -0
  157. package/src/components/OverviewItem/overviewitem.scss +9 -0
  158. package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +28 -0
  159. package/src/components/OverviewItem/stories/OverviewItemActions.stories.tsx +2 -2
  160. package/src/components/OverviewItem/stories/OverviewItemDescription.stories.tsx +1 -1
  161. package/src/components/OverviewItem/stories/OverviewItemLine.stories.tsx +1 -1
  162. package/src/components/PropertyValuePair/propertyvalue.scss +23 -1
  163. package/src/components/Separation/separation.scss +6 -0
  164. package/src/components/Table/table.scss +22 -0
  165. package/src/components/Tabs/stories/TabTitle.stories.tsx +7 -2
  166. package/src/components/Tag/stories/TagList.stories.tsx +2 -2
  167. package/src/components/Tag/tag.scss +19 -9
  168. package/src/components/TextReducer/TextReducer.test.tsx +3 -3
  169. package/src/components/Typography/InlineText.tsx +24 -0
  170. package/src/components/Typography/_reset.scss +1 -0
  171. package/src/components/Typography/index.ts +1 -0
  172. package/src/components/Typography/stories/InlineText.stories.tsx +27 -0
  173. package/src/components/Typography/typography.scss +28 -2
  174. package/src/components/VisualTour/VisualTour.tsx +30 -50
  175. package/src/components/VisualTour/visualTour.scss +0 -34
  176. package/src/components/index.scss +1 -0
  177. package/src/components/index.ts +1 -0
  178. package/src/configuration/_customproperties.scss +32 -0
  179. package/src/configuration/stories/customproperties.stories.tsx +118 -0
  180. package/src/extensions/codemirror/CodeMirror.tsx +20 -9
  181. package/src/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.ts +1 -2
  182. package/src/extensions/codemirror/tests/codemirrorTestHelper.ts +3 -3
  183. package/src/extensions/react-flow/_config.scss +3 -3
  184. package/src/extensions/react-flow/edges/EdgeLabel.tsx +5 -3
  185. package/src/extensions/react-flow/edges/EdgeNew.tsx +2 -1
  186. package/src/extensions/react-flow/edges/_edges.scss +3 -2
  187. package/src/extensions/react-flow/handles/HandleDefault.tsx +2 -2
  188. package/src/extensions/react-flow/minimap/MiniMap.tsx +2 -1
  189. package/src/extensions/react-flow/minimap/MiniMapV12.tsx +1 -1
  190. package/src/extensions/react-flow/nodes/_nodes.scss +4 -3
  191. package/src/extensions/react-flow/nodes/nodeUtils.tsx +1 -0
  192. package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +2 -2
  193. package/src/index.scss +1 -0
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { Meta, StoryFn } from "@storybook/react";
3
+
4
+ import { DecoupledOverlay, DecoupledOverlayProps, Tag, WhiteSpaceContainer } from "../../../index";
5
+
6
+ export default {
7
+ title: "Components/DecoupledOverlay",
8
+ component: DecoupledOverlay,
9
+ argTypes: {},
10
+ } as Meta<typeof DecoupledOverlay>;
11
+
12
+ const Template: StoryFn<typeof DecoupledOverlay> = (args: DecoupledOverlayProps) => {
13
+ return (
14
+ <>
15
+ <Tag id={"decoupledTarget"}>Decoupled target</Tag>
16
+ <DecoupledOverlay {...args} />
17
+ </>
18
+ );
19
+ };
20
+
21
+ export const Default = Template.bind({});
22
+
23
+ Default.args = {
24
+ children: (
25
+ <WhiteSpaceContainer marginTop={"small"} marginRight={"small"} marginBottom={"small"} marginLeft={"small"}>
26
+ Decoupled overlay
27
+ </WhiteSpaceContainer>
28
+ ),
29
+ targetSelectorOrElement: "#decoupledTarget",
30
+ };
@@ -0,0 +1,97 @@
1
+ import React from "react";
2
+ import { createPortal } from "react-dom";
3
+ import { Classes as BlueprintClasses } from "@blueprintjs/core";
4
+ import { createPopper } from "@popperjs/core";
5
+
6
+ import { CLASSPREFIX as eccgui, ContextOverlayProps, TestableComponent, TooltipSize, WhiteSpaceContainer } from "../../index";
7
+
8
+ export interface DecoupledOverlayProps
9
+ extends React.HTMLAttributes<HTMLDivElement>,
10
+ TestableComponent,
11
+ Pick<ContextOverlayProps, "usePortal" | "portalContainer" | "placement" | "minimal" | "paddingSize"> {
12
+ /**
13
+ * Element that should be used. The step content is displayed as a tooltip instead of a modal.
14
+ * In case of an array, the first match is highlighted. */
15
+ targetSelectorOrElement: string | Element;
16
+ /**
17
+ * The size of the overlay.
18
+ * */
19
+ size?: TooltipSize;
20
+ }
21
+
22
+ /**
23
+ * Use an overlay popover without the necessity to use a target that need to be rendered in place.
24
+ * The target is referenced by a selector string or element object.
25
+ * It can exist somewhere in the DOM, but it must exist when the overlay is rendered.
26
+ * It is always displayed, close it by removement.
27
+ */
28
+ export const DecoupledOverlay = ({
29
+ targetSelectorOrElement,
30
+ usePortal = true,
31
+ portalContainer = document.body,
32
+ minimal = false,
33
+ placement = "auto",
34
+ size = "large",
35
+ paddingSize,
36
+ children,
37
+ }: DecoupledOverlayProps) => {
38
+ const overlayRef = React.useCallback(
39
+ (overlay: HTMLDivElement | null) => {
40
+ const target =
41
+ typeof targetSelectorOrElement === "string"
42
+ ? document.querySelector(targetSelectorOrElement)
43
+ : targetSelectorOrElement;
44
+ if (overlay && target) {
45
+ createPopper(target, overlay, {
46
+ placement: placement,
47
+ modifiers: [
48
+ {
49
+ name: "offset",
50
+ options: {
51
+ offset: [0, 15],
52
+ },
53
+ },
54
+ ],
55
+ });
56
+ }
57
+ },
58
+ [targetSelectorOrElement]
59
+ );
60
+
61
+ const overlay = (
62
+ <div
63
+ className={
64
+ `${eccgui}-decoupled-overlay` +
65
+ ` ${eccgui}-decoupled-overlay--${size}` +
66
+ ` ${BlueprintClasses.POPOVER}` +
67
+ (minimal ? ` ${BlueprintClasses.MINIMAL}` : "")
68
+ }
69
+ role="tooltip"
70
+ ref={overlayRef}
71
+ >
72
+ {!minimal && (
73
+ <div
74
+ className={`${eccgui}-decoupled-overlay__arrow ${BlueprintClasses.POPOVER_ARROW}`}
75
+ data-popper-arrow
76
+ aria-hidden
77
+ />
78
+ )}
79
+ <div className={`${BlueprintClasses.POPOVER_CONTENT} ${eccgui}-decoupled-overlay__content`}>
80
+ {paddingSize ? (
81
+ <WhiteSpaceContainer
82
+ paddingTop={paddingSize}
83
+ paddingRight={paddingSize}
84
+ paddingBottom={paddingSize}
85
+ paddingLeft={paddingSize}
86
+ >
87
+ {children}
88
+ </WhiteSpaceContainer>
89
+ ) : children}
90
+ </div>
91
+ </div>
92
+ );
93
+
94
+ return usePortal ? createPortal(overlay, portalContainer) : overlay;
95
+ };
96
+
97
+ export default DecoupledOverlay;
@@ -0,0 +1,46 @@
1
+ .#{$eccgui}-decoupled-overlay__arrow {
2
+ &::before {
3
+ background: $card-background-color;
4
+ }
5
+
6
+ .#{$eccgui}-decoupled-overlay[data-popper-placement="top"] & {
7
+ bottom: -0.5 * $eccgui-size-block-whitespace;
8
+ }
9
+ .#{$eccgui}-decoupled-overlay[data-popper-placement="right"] & {
10
+ left: -0.5 * $eccgui-size-block-whitespace;
11
+ }
12
+ .#{$eccgui}-decoupled-overlay[data-popper-placement="bottom"] & {
13
+ top: -0.5 * $eccgui-size-block-whitespace;
14
+ }
15
+ .#{$eccgui}-decoupled-overlay[data-popper-placement="left"] & {
16
+ right: -0.5 * $eccgui-size-block-whitespace;
17
+ }
18
+ }
19
+
20
+ .#{$eccgui}-decoupled-overlay {
21
+ &.#{$prefix-blueprintjs}-popover {
22
+ z-index: 8001;
23
+ }
24
+
25
+ &--small {
26
+ @extend .#{$eccgui}-tooltip--small;
27
+ }
28
+
29
+ &--medium {
30
+ @extend .#{$eccgui}-tooltip--medium;
31
+ }
32
+
33
+ &--large {
34
+ @extend .#{$eccgui}-tooltip--large;
35
+ }
36
+
37
+ &:has(.#{$eccgui}-decoupled-overlay__arrow) {
38
+ .#{$eccgui}-decoupled-overlay__content {
39
+ min-height: 30px; // height of blueprint arrow
40
+ }
41
+ }
42
+ }
43
+
44
+ .#{$eccgui}-decoupled-overlay__content {
45
+ padding: 0.1px; // force margins of children to stay inside
46
+ }
@@ -220,3 +220,9 @@ $eccgui-size-depiction-border-radius: $pt-border-radius !default;
220
220
  position: fixed;
221
221
  left: -5000rem;
222
222
  }
223
+
224
+ @media print {
225
+ .#{$eccgui}-depiction {
226
+ print-color-adjust: exact;
227
+ }
228
+ }
@@ -46,3 +46,19 @@
46
46
  flex-basis: auto;
47
47
  }
48
48
  }
49
+
50
+ @media print {
51
+ .#{$eccgui}-flexible__container,
52
+ .#{$eccgui}-flexible__item {
53
+ position: relative;
54
+ display: block;
55
+ width: auto;
56
+ height: auto;
57
+ padding: 0;
58
+ margin: 0;
59
+
60
+ &:is(.#{$eccgui}-flexible__item) {
61
+ margin-bottom: $eccgui-size-block-whitespace;
62
+ }
63
+ }
64
+ }
@@ -86,3 +86,20 @@ $grid-gutter: rem($eccgui-size-grid-gutter);
86
86
  flex-wrap: nowrap;
87
87
  }
88
88
  }
89
+
90
+ @media print {
91
+ .#{$eccgui}-grid,
92
+ .#{$eccgui}-grid__row,
93
+ .#{$eccgui}-grid__column {
94
+ position: relative;
95
+ display: block;
96
+ width: auto;
97
+ height: auto;
98
+ padding: 0;
99
+ margin: 0;
100
+
101
+ &:is(.#{$eccgui}-grid__column) {
102
+ margin-bottom: $eccgui-size-block-whitespace;
103
+ }
104
+ }
105
+ }
@@ -11,19 +11,22 @@ export default {
11
11
  subcomponents: { GridRow, GridColumn },
12
12
  argTypes: {
13
13
  children: {
14
- control: "none",
14
+ control: false,
15
15
  },
16
16
  },
17
+ decorators: [
18
+ (Story) => (
19
+ <div style={{ minHeight: "30vh", position: "relative" }}>
20
+ <Story />
21
+ </div>
22
+ ),
23
+ ],
17
24
  } as Meta<typeof Grid>;
18
25
 
19
- const Template: StoryFn<typeof Grid> = (args) => (
20
- <div style={{ minHeight: "30vh", position: "relative" }}>
21
- <Grid {...args} />
22
- </div>
23
- );
26
+ const Template: StoryFn<typeof Grid> = (args) => <Grid {...args} />;
24
27
 
25
28
  export const Default = Template.bind({});
26
29
  Default.args = {
27
- children: <GridRow {...RowExample.args} verticalStretched />,
30
+ children: [<GridRow {...RowExample.args} verticalStretched />, <GridRow {...RowExample.args} verticalStretched />],
28
31
  verticalStretchable: true,
29
32
  };
@@ -10,21 +10,27 @@ export default {
10
10
  component: GridRow,
11
11
  argTypes: {
12
12
  children: {
13
- control: "none",
13
+ control: false,
14
14
  },
15
15
  },
16
16
  } as Meta<typeof GridRow>;
17
17
 
18
- const Template: StoryFn<typeof GridRow> = (args) => (
19
- <Grid style={{ minHeight: "30vh" }} verticalStretchable>
20
- <GridRow {...args} />
21
- </Grid>
22
- );
18
+ const Template: StoryFn<typeof GridRow> = (args) => <GridRow {...args} />;
23
19
 
24
20
  export const Default = Template.bind({});
25
21
  Default.args = {
26
- children: <GridColumn {...ColumnExample.args} verticalAlign="center" />,
22
+ children: [
23
+ <GridColumn {...ColumnExample.args} verticalAlign="center" key="col1" />,
24
+ <GridColumn {...ColumnExample.args} verticalAlign="center" key="col1" />,
25
+ ],
27
26
  };
27
+ Default.decorators = [
28
+ (Story) => (
29
+ <Grid style={{ minHeight: "30vh" }} verticalStretchable>
30
+ <Story />
31
+ </Grid>
32
+ ),
33
+ ];
28
34
 
29
35
  const TemplateStretched: StoryFn<typeof GridRow> = (args) => (
30
36
  <Grid style={{ minHeight: "50vh" }} verticalStretchable>
@@ -2,11 +2,11 @@ import React from "react";
2
2
 
3
3
  import { CLASSPREFIX as eccgui } from "../../configuration/constants";
4
4
  import Button, { ButtonProps } from "../Button/Button";
5
+ import {TestableComponent} from "../interfaces";
5
6
 
6
7
  import { ValidIconName } from "./canonicalIconNames";
7
8
  import Icon, { IconProps } from "./Icon";
8
9
  import { TestIconProps } from "./TestIcon";
9
- import {TestableComponent} from "../interfaces";
10
10
 
11
11
  interface ExtendedButtonProps
12
12
  extends Omit<ButtonProps, "name" | "icon" | "rightIcon" | "text" | "minimal" | "tooltip">, TestableComponent {
@@ -1,5 +1,6 @@
1
1
  import * as icons from "@carbon/react/icons";
2
2
  import { CarbonIconType as IconType } from "@carbon/react/icons";
3
+ import { transform} from "./transformIcon";
3
4
 
4
5
  const canonicalIcons = {
5
6
  "application-activities": icons.Activity,
@@ -172,8 +173,10 @@ const canonicalIcons = {
172
173
  "state-checked": icons.CheckboxChecked,
173
174
  "state-checkedsimple": icons.Checkmark,
174
175
  "state-confirmed": icons.ThumbsUp,
176
+ "state-confirmed-all": icons.ThumbsUpDouble,
175
177
  "state-danger": icons.ErrorFilled,
176
178
  "state-declined": icons.ThumbsDown,
179
+ "state-declined-all": transform(icons.ThumbsUpDouble, 0, false, true),
177
180
  "state-flagged": icons.Flag,
178
181
  "state-info": icons.InformationFilled,
179
182
  "state-locked": icons.Locked,
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { CarbonIconType, CarbonIconProps } from "@carbon/react/icons";
3
+
4
+ export const transform = (IconSymbol: CarbonIconType, rotate: number = 0, flipH: boolean = false, flipV: boolean = false) : CarbonIconType => {
5
+ return React.forwardRef((props: CarbonIconProps, ref: React.ForwardedRef<React.ReactSVGElement>) => {
6
+ return (
7
+ <IconSymbol
8
+ {...props}
9
+ ref={ref}
10
+ transform={
11
+ `scale(${flipH ? "-1" : "1"}, ${flipV ? "-1" : "1"}) rotate(${rotate})`
12
+ }
13
+ />
14
+ );
15
+ })
16
+ }
17
+
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { Meta, StoryFn } from "@storybook/react";
3
+
4
+ import { Link } from "../../../index";
5
+
6
+ export default {
7
+ title: "Components/Link",
8
+ component: Link,
9
+ argTypes: {
10
+ target: {
11
+ control: "select",
12
+ options: ["_self", "_blank", "_parent", "_top"],
13
+ },
14
+ },
15
+ } as Meta<typeof Link>;
16
+
17
+ const Template: StoryFn<typeof Link> = (args) => <Link {...args} />;
18
+
19
+ export const Default = Template.bind({});
20
+ Default.args = {
21
+ children: "Example link",
22
+ href: "https://example.com/",
23
+ };
24
+
25
+ export const Disabled = Template.bind({});
26
+ Disabled.args = {
27
+ children: "Disabled link",
28
+ href: "https://example.com/",
29
+ disabled: true,
30
+ };
@@ -2,8 +2,34 @@
2
2
  @include link.link;
3
3
 
4
4
  .#{$prefix}--link {
5
- font-size: 1em;
6
- line-height: inherit;
5
+ &,
6
+ &:hover {
7
+ // default case: use font size from context
8
+ font-size: inherit;
9
+ line-height: inherit;
10
+ }
11
+
12
+ &.#{$prefix}--link--sm {
13
+ &,
14
+ &:hover {
15
+ font-size: $eccgui-size-typo-caption;
16
+ line-height: $eccgui-size-typo-caption-lineheight;
17
+ }
18
+ }
19
+ &.#{$prefix}--link--md {
20
+ &,
21
+ &:hover {
22
+ font-size: $eccgui-size-typo-text;
23
+ line-height: $eccgui-size-typo-text-lineheight;
24
+ }
25
+ }
26
+ &.#{$prefix}--link--lg {
27
+ &,
28
+ &:hover {
29
+ font-size: $eccgui-size-typo-subtitle;
30
+ line-height: $eccgui-size-typo-subtitle-lineheight;
31
+ }
32
+ }
7
33
 
8
34
  &:focus {
9
35
  outline: none;
@@ -10,7 +10,15 @@ import { removeExtraSpaces } from "../../common/utils/stringUtils";
10
10
  import { CLASSPREFIX as eccgui } from "../../configuration/constants";
11
11
  import { TestableComponent } from "../interfaces";
12
12
 
13
- import { ContextOverlayProps, Highlighter, IconButton, MenuItem, OverflowText, Spinner } from "./../../index";
13
+ import {
14
+ ContextOverlayProps,
15
+ Highlighter,
16
+ highlighterUtils,
17
+ IconButton,
18
+ MenuItem,
19
+ OverflowText,
20
+ Spinner
21
+ } from "./../../index";
14
22
 
15
23
  export interface MultiSuggestFieldSelectionProps<T> {
16
24
  newlySelected?: T;
@@ -53,7 +61,7 @@ interface MultiSuggestFieldCommonProps<T>
53
61
  /**
54
62
  * prop to listen for query changes, when text is entered in the multi-select input
55
63
  */
56
- runOnQueryChange?: (query: string) => Promise<T[] | undefined>;
64
+ runOnQueryChange?: (query: string) => Promise<T[] | undefined> | (T[] | undefined);
57
65
  /**
58
66
  * Whether the component should take up the full width of its container.
59
67
  * This overrides `tagInputProps.fill`.
@@ -265,7 +273,8 @@ export function MultiSuggestField<T>({
265
273
  };
266
274
 
267
275
  const defaultFilterPredicate = (item: T, query: string) => {
268
- return itemLabel(item).toLowerCase().includes(query);
276
+ const searchWords = highlighterUtils.extractSearchWords(query, true)
277
+ return highlighterUtils.matchesAllWords(itemLabel(item).toLowerCase(), searchWords)
269
278
  };
270
279
 
271
280
  /**
@@ -91,3 +91,9 @@
91
91
  color: inherit;
92
92
  }
93
93
  }
94
+
95
+ @media print {
96
+ .#{$eccgui}-notification__actions {
97
+ display: none;
98
+ }
99
+ }
@@ -197,3 +197,12 @@ $eccgui-size-overviewitem-line-typo-large-lineheight: $eccgui-size-typo-subtitle
197
197
  display: flex;
198
198
  }
199
199
  }
200
+
201
+ @media print {
202
+ .#{$eccgui}-overviewitem__actions {
203
+ display: none;
204
+ }
205
+ .#{$eccgui}-overviewitem__depiction {
206
+ print-color-adjust: exact;
207
+ }
208
+ }
@@ -6,15 +6,20 @@ import {
6
6
  Badge,
7
7
  Card,
8
8
  Depiction,
9
+ OverflowText,
9
10
  OverviewItem,
10
11
  OverviewItemActions,
11
12
  OverviewItemDepiction,
12
13
  OverviewItemDescription,
14
+ OverviewItemLine,
15
+ Tag,
16
+ TagList,
13
17
  } from "./../../../../index";
14
18
  import { FullExample as OtherDepictionExample } from "./../../Depiction/stories/Depiction.stories";
15
19
  import { Default as ActionsExample } from "./OverviewItemActions.stories";
16
20
  import { AutoTransform as DepictionExample } from "./OverviewItemDepiction.stories";
17
21
  import { Default as DescriptionExample } from "./OverviewItemDescription.stories";
22
+ import { Default as LineExample } from "./OverviewItemLine.stories";
18
23
 
19
24
  export default {
20
25
  title: "Components/OverviewItem",
@@ -76,3 +81,26 @@ ItemWithDepictionElement.args = {
76
81
  hasSpacing: true,
77
82
  hasCardWrapper: true,
78
83
  };
84
+
85
+ export const ItemWithTags = Template.bind({});
86
+ ItemWithTags.args = {
87
+ children: [
88
+ <OverviewItemDepiction {...DepictionExample.args} key={"depiction"} />,
89
+ <OverviewItemDescription key={"description"}>
90
+ <OverviewItemLine {...LineExample.args} />
91
+ <OverviewItemLine small>
92
+ <OverflowText>
93
+ <TagList>
94
+ <Tag small>Test</Tag>
95
+ <Tag small>Tag</Tag>
96
+ <Tag small>List</Tag>
97
+ </TagList>
98
+ </OverflowText>
99
+ </OverviewItemLine>
100
+ </OverviewItemDescription>,
101
+ <OverviewItemActions children={ActionsExample.args.children[0]} key={"actions"} />,
102
+ ],
103
+ densityHigh: false,
104
+ hasSpacing: true,
105
+ hasCardWrapper: true,
106
+ };
@@ -9,7 +9,7 @@ export default {
9
9
  subcomponents: { Button, IconButton, ContextMenu },
10
10
  argTypes: {
11
11
  children: {
12
- control: "none",
12
+ control: false,
13
13
  description: "User-interactive elements.",
14
14
  },
15
15
  },
@@ -20,7 +20,7 @@ const Template: StoryFn<typeof OverviewItemActions> = (args) => <OverviewItemAct
20
20
  export const Default = Template.bind({});
21
21
  Default.args = {
22
22
  children: [
23
- <IconButton name="item-remove" tooltip="Remove this item" disruptive />,
23
+ <IconButton name="item-remove" text="Remove this item" disruptive />,
24
24
  <Button affirmative>Other action</Button>,
25
25
  ],
26
26
  };
@@ -12,7 +12,7 @@ export default {
12
12
  },
13
13
  argTypes: {
14
14
  children: {
15
- control: "none",
15
+ control: false,
16
16
  description: "Elements for text content.",
17
17
  },
18
18
  },
@@ -9,7 +9,7 @@ export default {
9
9
  component: OverviewItemLine,
10
10
  argTypes: {
11
11
  children: {
12
- control: "none",
12
+ control: false,
13
13
  description: "Elements for line content.",
14
14
  },
15
15
  },
@@ -5,9 +5,9 @@
5
5
  }
6
6
 
7
7
  .#{$eccgui}-propertyvalue__pair {
8
+ clear: both;
8
9
  display: block;
9
10
  width: 100%;
10
- clear: both;
11
11
 
12
12
  &.#{$eccgui}-propertyvalue__pair--hasdivider {
13
13
  &:not(:last-child) {
@@ -94,3 +94,25 @@
94
94
  }
95
95
  }
96
96
  }
97
+
98
+ @media print {
99
+ .#{$eccgui}-propertyvalue__pair,
100
+ .#{$eccgui}-propertyvalue__property,
101
+ .#{$eccgui}-propertyvalue__value {
102
+ position: relative;
103
+ float: none !important;
104
+ display: block;
105
+ width: auto;
106
+ height: auto;
107
+ min-height: 0 !important;
108
+ padding: 0;
109
+ margin: 0 !important;
110
+
111
+ &:is(.#{$eccgui}-propertyvalue__property) {
112
+ margin-bottom: 0.25 * $eccgui-size-block-whitespace !important;
113
+ }
114
+ &:is(.#{$eccgui}-propertyvalue__pair) {
115
+ margin-bottom: 0.5 * $eccgui-size-block-whitespace !important;
116
+ }
117
+ }
118
+ }
@@ -101,3 +101,9 @@ $eccgui-color-separation-divider: $pt-divider-black !default;
101
101
  margin: 0 $eccgui-size-separation-spacing-medium;
102
102
  }
103
103
  }
104
+
105
+ @media print {
106
+ .#{$eccgui}-separation__divider-horizontal {
107
+ print-color-adjust: exact;
108
+ }
109
+ }
@@ -356,3 +356,25 @@ tr.#{$prefix}--parent-row.#{$prefix}--expandable-row + tr[data-child-row] {
356
356
  min-height: $eccgui-size-tablecell-height-regular;
357
357
  }
358
358
  }
359
+
360
+ @media print {
361
+ .#{$eccgui}-simpletable:has(.#{$eccgui}-simpletable__cell > .#{$eccgui}-typography__overflowtext) {
362
+ // allow 2 lines of text in `<OverflowText />` elements that are direct children of table cells
363
+ .#{$eccgui}-simpletable__cell {
364
+ & > .#{$eccgui}-typography__overflowtext,
365
+ & > .#{$eccgui}-typography__overflowtext--passdown {
366
+ display: inline;
367
+ overflow: visible;
368
+ text-overflow: unset;
369
+ white-space: unset;
370
+ }
371
+ & > .#{$eccgui}-typography__overflowtext {
372
+ display: -webkit-box;
373
+ overflow: hidden;
374
+ -webkit-line-clamp: 2;
375
+ line-clamp: 2;
376
+ -webkit-box-orient: vertical;
377
+ }
378
+ }
379
+ }
380
+ }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Meta, StoryFn } from "@storybook/react";
3
3
 
4
- import { Tabs, TabTitle as TabTitleOrg } from "./../../../";
4
+ import { Tabs, TabTitle as TabTitleOrg, TabTitleProps } from "./../../../";
5
5
 
6
6
  export default {
7
7
  title: "Components/Tabs/TabTitle",
@@ -9,7 +9,7 @@ export default {
9
9
  argTypes: {},
10
10
  } as Meta<typeof TabTitleOrg>;
11
11
 
12
- const TabTitle = (args) => {
12
+ const TabTitle = (args: React.JSX.IntrinsicAttributes & TabTitleProps) => {
13
13
  return (
14
14
  <Tabs
15
15
  id="titledemo"
@@ -31,3 +31,8 @@ TabTitleElement.args = {
31
31
  titlePrefix: "[",
32
32
  titleSuffix: <span>]</span>,
33
33
  };
34
+
35
+ export const TabTitleSymbolElement = TemplateFull.bind({});
36
+ TabTitleSymbolElement.args = {
37
+ text: "★",
38
+ };