@eccenca/gui-elements 25.0.0 → 25.1.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.
Files changed (129) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js +1 -3
  3. package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
  4. package/dist/cjs/cmem/ContentBlobToggler/ContentBlobToggler.js +1 -0
  5. package/dist/cjs/cmem/ContentBlobToggler/ContentBlobToggler.js.map +1 -1
  6. package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +34 -11
  7. package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
  8. package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -1
  9. package/dist/cjs/common/Intent/index.js +1 -1
  10. package/dist/cjs/common/Intent/index.js.map +1 -1
  11. package/dist/cjs/components/Application/ApplicationViewability.js +33 -0
  12. package/dist/cjs/components/Application/ApplicationViewability.js.map +1 -0
  13. package/dist/cjs/components/Application/index.js +1 -0
  14. package/dist/cjs/components/Application/index.js.map +1 -1
  15. package/dist/cjs/components/Icon/IconButton.js.map +1 -1
  16. package/dist/cjs/components/Typography/InlineText.js +29 -0
  17. package/dist/cjs/components/Typography/InlineText.js.map +1 -0
  18. package/dist/cjs/components/Typography/index.js +1 -0
  19. package/dist/cjs/components/Typography/index.js.map +1 -1
  20. package/dist/cjs/extensions/codemirror/CodeMirror.js +2 -2
  21. package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
  22. package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
  23. package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
  24. package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js +2 -2
  25. package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
  26. package/dist/cjs/extensions/react-flow/edges/EdgeNew.js +1 -1
  27. package/dist/cjs/extensions/react-flow/edges/EdgeNew.js.map +1 -1
  28. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +1 -1
  29. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  30. package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +1 -1
  31. package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
  32. package/dist/cjs/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
  33. package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
  34. package/dist/esm/cmem/ActivityControl/SilkActivityControl.js +1 -3
  35. package/dist/esm/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
  36. package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js +1 -0
  37. package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js.map +1 -1
  38. package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +32 -9
  39. package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
  40. package/dist/esm/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -1
  41. package/dist/esm/common/Intent/index.js +1 -1
  42. package/dist/esm/common/Intent/index.js.map +1 -1
  43. package/dist/esm/components/Application/ApplicationViewability.js +28 -0
  44. package/dist/esm/components/Application/ApplicationViewability.js.map +1 -0
  45. package/dist/esm/components/Application/index.js +1 -0
  46. package/dist/esm/components/Application/index.js.map +1 -1
  47. package/dist/esm/components/Icon/IconButton.js.map +1 -1
  48. package/dist/esm/components/Typography/InlineText.js +33 -0
  49. package/dist/esm/components/Typography/InlineText.js.map +1 -0
  50. package/dist/esm/components/Typography/index.js +1 -0
  51. package/dist/esm/components/Typography/index.js.map +1 -1
  52. package/dist/esm/extensions/codemirror/CodeMirror.js +3 -3
  53. package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
  54. package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
  55. package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
  56. package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js +3 -3
  57. package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
  58. package/dist/esm/extensions/react-flow/edges/EdgeNew.js +1 -1
  59. package/dist/esm/extensions/react-flow/edges/EdgeNew.js.map +1 -1
  60. package/dist/esm/extensions/react-flow/handles/HandleDefault.js +1 -1
  61. package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  62. package/dist/esm/extensions/react-flow/minimap/MiniMap.js +1 -1
  63. package/dist/esm/extensions/react-flow/minimap/MiniMap.js.map +1 -1
  64. package/dist/esm/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
  65. package/dist/esm/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
  66. package/dist/types/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.d.ts +26 -10
  67. package/dist/types/components/Application/ApplicationViewability.d.ts +36 -0
  68. package/dist/types/components/Application/index.d.ts +1 -0
  69. package/dist/types/components/Icon/IconButton.d.ts +1 -1
  70. package/dist/types/components/Structure/TitleSubsection.d.ts +1 -1
  71. package/dist/types/components/Tabs/Tab.d.ts +2 -2
  72. package/dist/types/components/Typography/InlineText.d.ts +13 -0
  73. package/dist/types/components/Typography/index.d.ts +1 -0
  74. package/dist/types/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.d.ts +1 -1
  75. package/dist/types/extensions/codemirror/tests/codemirrorTestHelper.d.ts +1 -1
  76. package/package.json +50 -51
  77. package/src/cmem/ActivityControl/SilkActivityControl.tsx +1 -1
  78. package/src/cmem/ContentBlobToggler/ContentBlobToggler.tsx +1 -1
  79. package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +66 -18
  80. package/src/cmem/ContentBlobToggler/stories/StringPreviewContentBlobToggler.stories.tsx +27 -0
  81. package/src/cmem/ContentBlobToggler/tests/StringPreviewContentBlobToggler.test.tsx +98 -0
  82. package/src/cmem/react-flow/ReactFlow/ReactFlowV12.tsx +1 -0
  83. package/src/common/Intent/index.ts +2 -1
  84. package/src/components/Application/ApplicationViewability.tsx +61 -0
  85. package/src/components/Application/_content.scss +7 -0
  86. package/src/components/Application/_header.scss +12 -3
  87. package/src/components/Application/_viewability.scss +13 -0
  88. package/src/components/Application/application.scss +1 -0
  89. package/src/components/Application/index.ts +1 -0
  90. package/src/components/Application/stories/ApplicationViewability.stories.tsx +37 -0
  91. package/src/components/Application/tests/ApplicationViewability.test.tsx +43 -0
  92. package/src/components/AutoSuggestion/tests/ExtendedCodeEditor.test.tsx +1 -1
  93. package/src/components/Card/card.scss +6 -0
  94. package/src/components/Checkbox/checkbox.scss +14 -2
  95. package/src/components/ContentGroup/_contentgroup.scss +9 -0
  96. package/src/components/Depiction/depiction.scss +6 -0
  97. package/src/components/FlexibleLayout/flexiblelayout.scss +16 -0
  98. package/src/components/Grid/grid.scss +17 -0
  99. package/src/components/Grid/stories/Grid.stories.tsx +10 -7
  100. package/src/components/Grid/stories/GridRow.stories.tsx +13 -7
  101. package/src/components/Icon/IconButton.tsx +1 -1
  102. package/src/components/Notification/notification.scss +6 -0
  103. package/src/components/OverviewItem/overviewitem.scss +9 -0
  104. package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +28 -0
  105. package/src/components/OverviewItem/stories/OverviewItemActions.stories.tsx +2 -2
  106. package/src/components/OverviewItem/stories/OverviewItemDescription.stories.tsx +1 -1
  107. package/src/components/OverviewItem/stories/OverviewItemLine.stories.tsx +1 -1
  108. package/src/components/PropertyValuePair/propertyvalue.scss +23 -1
  109. package/src/components/Separation/separation.scss +6 -0
  110. package/src/components/Table/table.scss +22 -0
  111. package/src/components/Tabs/stories/TabTitle.stories.tsx +7 -2
  112. package/src/components/Tag/stories/TagList.stories.tsx +2 -2
  113. package/src/components/Tag/tag.scss +19 -9
  114. package/src/components/TextReducer/TextReducer.test.tsx +3 -3
  115. package/src/components/Typography/InlineText.tsx +24 -0
  116. package/src/components/Typography/_reset.scss +1 -0
  117. package/src/components/Typography/index.ts +1 -0
  118. package/src/components/Typography/stories/InlineText.stories.tsx +27 -0
  119. package/src/components/Typography/typography.scss +28 -2
  120. package/src/extensions/codemirror/CodeMirror.tsx +4 -4
  121. package/src/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.ts +1 -2
  122. package/src/extensions/codemirror/tests/codemirrorTestHelper.ts +3 -3
  123. package/src/extensions/react-flow/edges/EdgeNew.tsx +2 -1
  124. package/src/extensions/react-flow/handles/HandleDefault.tsx +2 -2
  125. package/src/extensions/react-flow/minimap/MiniMap.tsx +2 -1
  126. package/src/extensions/react-flow/minimap/MiniMapV12.tsx +1 -1
  127. package/src/extensions/react-flow/nodes/_nodes.scss +4 -3
  128. package/src/extensions/react-flow/nodes/nodeUtils.tsx +1 -0
  129. package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +2 -2
@@ -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;
@@ -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) 0;
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
+ }
@@ -10,3 +10,4 @@
10
10
  // @import '~@carbon/react/scss/components/ui-shell/navigation-menu';
11
11
  @import "content";
12
12
  @import "dropzone";
13
+ @import "viewability";
@@ -8,4 +8,5 @@ export * from "./ApplicationToolbar";
8
8
  export * from "./ApplicationToolbarSection";
9
9
  export * from "./ApplicationToolbarAction";
10
10
  export * from "./ApplicationToolbarPanel";
11
+ export * from "./ApplicationViewability";
11
12
  export * from "./helper";
@@ -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
+ });
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { render } from "@testing-library/react";
3
2
  import { EditorView } from "@codemirror/view";
3
+ import { render } from "@testing-library/react";
4
4
 
5
5
  import "@testing-library/jest-dom";
6
6
 
@@ -288,3 +288,9 @@ $eccgui-size-card-spacing: $eccgui-size-typo-base !default;
288
288
  }
289
289
  }
290
290
  }
291
+
292
+ @media print {
293
+ .#{$eccgui}-card__actions {
294
+ display: none;
295
+ }
296
+ }
@@ -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($switch-checked-background-color, $eccgui-opacity-narrow) !default;
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($switch-checked-background-color, $eccgui-opacity-disabled) !default;
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
+ }
@@ -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 {
@@ -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
+ };
@@ -8,7 +8,7 @@ export default {
8
8
  component: TagList,
9
9
  argTypes: {
10
10
  children: {
11
- control: "none",
11
+ control: false,
12
12
  },
13
13
  },
14
14
  } as Meta<typeof TagList>;
@@ -18,5 +18,5 @@ const Template: StoryFn<typeof TagList> = (args) => <TagList {...args} />;
18
18
  export const List = Template.bind({});
19
19
  List.args = {
20
20
  label: "Tag list",
21
- children: [<Tag>Short</Tag>, <Tag>List</Tag>, <Tag>Of</Tag>, <Tag>Tags</Tag>],
21
+ children: [<Tag small>Short</Tag>, <Tag>List</Tag>, <Tag>Of</Tag>, <Tag large>Tags</Tag>],
22
22
  };