@eccenca/gui-elements 25.0.0-rc.2 → 25.1.0-featurev2510colorfield.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/CHANGELOG.md +94 -18
  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/common/index.js +4 -1
  14. package/dist/cjs/common/index.js.map +1 -1
  15. package/dist/cjs/common/utils/colorHash.js +25 -11
  16. package/dist/cjs/common/utils/colorHash.js.map +1 -1
  17. package/dist/cjs/common/utils/reduceToText.js +26 -1
  18. package/dist/cjs/common/utils/reduceToText.js.map +1 -1
  19. package/dist/cjs/components/Application/ApplicationViewability.js +33 -0
  20. package/dist/cjs/components/Application/ApplicationViewability.js.map +1 -0
  21. package/dist/cjs/components/Application/index.js +1 -0
  22. package/dist/cjs/components/Application/index.js.map +1 -1
  23. package/dist/cjs/components/ColorField/ColorField.js +115 -0
  24. package/dist/cjs/components/ColorField/ColorField.js.map +1 -0
  25. package/dist/cjs/components/ContextOverlay/ContextMenu.js +2 -2
  26. package/dist/cjs/components/ContextOverlay/ContextMenu.js.map +1 -1
  27. package/dist/cjs/components/ContextOverlay/ContextOverlay.js +67 -29
  28. package/dist/cjs/components/ContextOverlay/ContextOverlay.js.map +1 -1
  29. package/dist/cjs/components/DecoupledOverlay/DecoupledOverlay.js +47 -0
  30. package/dist/cjs/components/DecoupledOverlay/DecoupledOverlay.js.map +1 -0
  31. package/dist/cjs/components/Icon/IconButton.js.map +1 -1
  32. package/dist/cjs/components/Icon/canonicalIconNames.js +3 -0
  33. package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
  34. package/dist/cjs/components/Icon/transformIcon.js +14 -0
  35. package/dist/cjs/components/Icon/transformIcon.js.map +1 -0
  36. package/dist/cjs/components/MultiSelect/MultiSelect.js +2 -1
  37. package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
  38. package/dist/cjs/components/RadioButton/RadioButton.js +5 -2
  39. package/dist/cjs/components/RadioButton/RadioButton.js.map +1 -1
  40. package/dist/cjs/components/TextReducer/TextReducer.js +15 -3
  41. package/dist/cjs/components/TextReducer/TextReducer.js.map +1 -1
  42. package/dist/cjs/components/Typography/InlineText.js +29 -0
  43. package/dist/cjs/components/Typography/InlineText.js.map +1 -0
  44. package/dist/cjs/components/Typography/index.js +1 -0
  45. package/dist/cjs/components/Typography/index.js.map +1 -1
  46. package/dist/cjs/components/VisualTour/VisualTour.js +24 -32
  47. package/dist/cjs/components/VisualTour/VisualTour.js.map +1 -1
  48. package/dist/cjs/components/index.js +2 -0
  49. package/dist/cjs/components/index.js.map +1 -1
  50. package/dist/cjs/extensions/codemirror/CodeMirror.js +18 -6
  51. package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
  52. package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
  53. package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
  54. package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js +2 -2
  55. package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
  56. package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +1 -1
  57. package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
  58. package/dist/cjs/extensions/react-flow/edges/EdgeNew.js +1 -1
  59. package/dist/cjs/extensions/react-flow/edges/EdgeNew.js.map +1 -1
  60. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +1 -1
  61. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  62. package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +1 -1
  63. package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
  64. package/dist/cjs/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
  65. package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
  66. package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js +19 -14
  67. package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
  68. package/dist/esm/cmem/ActivityControl/SilkActivityControl.js +1 -3
  69. package/dist/esm/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
  70. package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js +1 -0
  71. package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js.map +1 -1
  72. package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +32 -9
  73. package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
  74. package/dist/esm/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -1
  75. package/dist/esm/common/Intent/index.js +1 -1
  76. package/dist/esm/common/Intent/index.js.map +1 -1
  77. package/dist/esm/common/index.js +5 -2
  78. package/dist/esm/common/index.js.map +1 -1
  79. package/dist/esm/common/utils/colorHash.js +25 -12
  80. package/dist/esm/common/utils/colorHash.js.map +1 -1
  81. package/dist/esm/common/utils/reduceToText.js +37 -1
  82. package/dist/esm/common/utils/reduceToText.js.map +1 -1
  83. package/dist/esm/components/Application/ApplicationViewability.js +28 -0
  84. package/dist/esm/components/Application/ApplicationViewability.js.map +1 -0
  85. package/dist/esm/components/Application/index.js +1 -0
  86. package/dist/esm/components/Application/index.js.map +1 -1
  87. package/dist/esm/components/ColorField/ColorField.js +141 -0
  88. package/dist/esm/components/ColorField/ColorField.js.map +1 -0
  89. package/dist/esm/components/ContextOverlay/ContextMenu.js +2 -2
  90. package/dist/esm/components/ContextOverlay/ContextMenu.js.map +1 -1
  91. package/dist/esm/components/ContextOverlay/ContextOverlay.js +67 -29
  92. package/dist/esm/components/ContextOverlay/ContextOverlay.js.map +1 -1
  93. package/dist/esm/components/DecoupledOverlay/DecoupledOverlay.js +41 -0
  94. package/dist/esm/components/DecoupledOverlay/DecoupledOverlay.js.map +1 -0
  95. package/dist/esm/components/Icon/IconButton.js.map +1 -1
  96. package/dist/esm/components/Icon/canonicalIconNames.js +3 -0
  97. package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
  98. package/dist/esm/components/Icon/transformIcon.js +21 -0
  99. package/dist/esm/components/Icon/transformIcon.js.map +1 -0
  100. package/dist/esm/components/MultiSelect/MultiSelect.js +3 -2
  101. package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
  102. package/dist/esm/components/RadioButton/RadioButton.js +6 -2
  103. package/dist/esm/components/RadioButton/RadioButton.js.map +1 -1
  104. package/dist/esm/components/TextReducer/TextReducer.js +14 -3
  105. package/dist/esm/components/TextReducer/TextReducer.js.map +1 -1
  106. package/dist/esm/components/Typography/InlineText.js +33 -0
  107. package/dist/esm/components/Typography/InlineText.js.map +1 -0
  108. package/dist/esm/components/Typography/index.js +1 -0
  109. package/dist/esm/components/Typography/index.js.map +1 -1
  110. package/dist/esm/components/VisualTour/VisualTour.js +25 -33
  111. package/dist/esm/components/VisualTour/VisualTour.js.map +1 -1
  112. package/dist/esm/components/index.js +2 -0
  113. package/dist/esm/components/index.js.map +1 -1
  114. package/dist/esm/extensions/codemirror/CodeMirror.js +19 -7
  115. package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
  116. package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
  117. package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
  118. package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js +3 -3
  119. package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
  120. package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +1 -1
  121. package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
  122. package/dist/esm/extensions/react-flow/edges/EdgeNew.js +1 -1
  123. package/dist/esm/extensions/react-flow/edges/EdgeNew.js.map +1 -1
  124. package/dist/esm/extensions/react-flow/handles/HandleDefault.js +1 -1
  125. package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  126. package/dist/esm/extensions/react-flow/minimap/MiniMap.js +1 -1
  127. package/dist/esm/extensions/react-flow/minimap/MiniMap.js.map +1 -1
  128. package/dist/esm/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
  129. package/dist/esm/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
  130. package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +9 -0
  131. package/dist/types/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.d.ts +26 -10
  132. package/dist/types/common/index.d.ts +4 -1
  133. package/dist/types/common/utils/colorHash.d.ts +4 -3
  134. package/dist/types/common/utils/reduceToText.d.ts +1 -1
  135. package/dist/types/components/Application/ApplicationViewability.d.ts +36 -0
  136. package/dist/types/components/Application/index.d.ts +1 -0
  137. package/dist/types/components/ColorField/ColorField.d.ts +31 -0
  138. package/dist/types/components/ContextOverlay/ContextMenu.d.ts +1 -1
  139. package/dist/types/components/ContextOverlay/ContextOverlay.d.ts +7 -1
  140. package/dist/types/components/DecoupledOverlay/DecoupledOverlay.d.ts +20 -0
  141. package/dist/types/components/Icon/IconButton.d.ts +1 -1
  142. package/dist/types/components/Icon/canonicalIconNames.d.ts +2 -0
  143. package/dist/types/components/Icon/transformIcon.d.ts +2 -0
  144. package/dist/types/components/MultiSelect/MultiSelect.d.ts +1 -1
  145. package/dist/types/components/RadioButton/RadioButton.d.ts +8 -2
  146. package/dist/types/components/Structure/TitleSubsection.d.ts +1 -1
  147. package/dist/types/components/Tabs/Tab.d.ts +2 -2
  148. package/dist/types/components/TextReducer/TextReducer.d.ts +13 -1
  149. package/dist/types/components/Typography/InlineText.d.ts +13 -0
  150. package/dist/types/components/Typography/index.d.ts +1 -0
  151. package/dist/types/components/index.d.ts +2 -0
  152. package/dist/types/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.d.ts +1 -1
  153. package/dist/types/extensions/codemirror/tests/codemirrorTestHelper.d.ts +1 -1
  154. package/package.json +54 -53
  155. package/src/cmem/ActivityControl/ActivityControlWidget.tsx +68 -35
  156. package/src/cmem/ActivityControl/SilkActivityControl.tsx +1 -1
  157. package/src/cmem/ContentBlobToggler/ContentBlobToggler.tsx +1 -1
  158. package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +66 -18
  159. package/src/cmem/ContentBlobToggler/stories/StringPreviewContentBlobToggler.stories.tsx +27 -0
  160. package/src/cmem/ContentBlobToggler/tests/StringPreviewContentBlobToggler.test.tsx +98 -0
  161. package/src/cmem/react-flow/ReactFlow/ReactFlowV12.tsx +1 -0
  162. package/src/common/Intent/index.ts +2 -1
  163. package/src/common/index.ts +8 -3
  164. package/src/common/utils/colorHash.ts +36 -18
  165. package/src/common/utils/reduceToText.tsx +30 -2
  166. package/src/components/Application/ApplicationViewability.tsx +61 -0
  167. package/src/components/Application/_colors.scss +15 -0
  168. package/src/components/Application/_content.scss +7 -0
  169. package/src/components/Application/_header.scss +12 -3
  170. package/src/components/Application/_viewability.scss +13 -0
  171. package/src/components/Application/application.scss +1 -0
  172. package/src/components/Application/index.ts +1 -0
  173. package/src/components/Application/stories/ApplicationViewability.stories.tsx +37 -0
  174. package/src/components/Application/tests/ApplicationViewability.test.tsx +43 -0
  175. package/src/components/AutoSuggestion/tests/ExtendedCodeEditor.test.tsx +1 -1
  176. package/src/components/Card/card.scss +6 -0
  177. package/src/components/Checkbox/checkbox.scss +14 -2
  178. package/src/components/ColorField/ColorField.stories.tsx +69 -0
  179. package/src/components/ColorField/ColorField.test.tsx +125 -0
  180. package/src/components/ColorField/ColorField.tsx +200 -0
  181. package/src/components/ColorField/_colorfield.scss +56 -0
  182. package/src/components/ContentGroup/_contentgroup.scss +9 -0
  183. package/src/components/ContextOverlay/ContextMenu.tsx +4 -1
  184. package/src/components/ContextOverlay/ContextOverlay.tsx +94 -25
  185. package/src/components/ContextOverlay/tests/ContextMenu.test.tsx +43 -0
  186. package/src/components/ContextOverlay/tests/ContextOverlay.test.tsx +71 -0
  187. package/src/components/DecoupledOverlay/DecoupledOverlay.stories.tsx +30 -0
  188. package/src/components/DecoupledOverlay/DecoupledOverlay.tsx +97 -0
  189. package/src/components/DecoupledOverlay/_decoupledoverlay.scss +46 -0
  190. package/src/components/Depiction/depiction.scss +6 -0
  191. package/src/components/Dialog/stories/Modal.stories.tsx +12 -150
  192. package/src/components/Dialog/stories/ModalContext.stories.tsx +153 -0
  193. package/src/components/FlexibleLayout/flexiblelayout.scss +16 -0
  194. package/src/components/Grid/grid.scss +17 -0
  195. package/src/components/Grid/stories/Grid.stories.tsx +10 -7
  196. package/src/components/Grid/stories/GridRow.stories.tsx +13 -7
  197. package/src/components/Icon/IconButton.tsx +1 -1
  198. package/src/components/Icon/canonicalIconNames.tsx +3 -0
  199. package/src/components/Icon/transformIcon.tsx +17 -0
  200. package/src/components/Link/Link.stories.tsx +30 -0
  201. package/src/components/Link/link.scss +28 -2
  202. package/src/components/MultiSelect/MultiSelect.tsx +12 -3
  203. package/src/components/Notification/notification.scss +6 -0
  204. package/src/components/OverviewItem/overviewitem.scss +9 -0
  205. package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +28 -0
  206. package/src/components/OverviewItem/stories/OverviewItemActions.stories.tsx +2 -2
  207. package/src/components/OverviewItem/stories/OverviewItemDescription.stories.tsx +1 -1
  208. package/src/components/OverviewItem/stories/OverviewItemLine.stories.tsx +1 -1
  209. package/src/components/PropertyValuePair/propertyvalue.scss +23 -1
  210. package/src/components/RadioButton/RadioButton.tsx +15 -3
  211. package/src/components/RadioButton/radiobutton.scss +13 -0
  212. package/src/components/Separation/separation.scss +6 -0
  213. package/src/components/Table/table.scss +22 -0
  214. package/src/components/Tabs/stories/TabTitle.stories.tsx +7 -2
  215. package/src/components/Tag/stories/TagList.stories.tsx +2 -2
  216. package/src/components/Tag/tag.scss +19 -9
  217. package/src/components/TextReducer/TextReducer.stories.tsx +2 -1
  218. package/src/components/TextReducer/TextReducer.test.tsx +44 -0
  219. package/src/components/TextReducer/TextReducer.tsx +14 -4
  220. package/src/components/Typography/InlineText.tsx +24 -0
  221. package/src/components/Typography/_reset.scss +1 -0
  222. package/src/components/Typography/index.ts +1 -0
  223. package/src/components/Typography/stories/InlineText.stories.tsx +27 -0
  224. package/src/components/Typography/typography.scss +28 -2
  225. package/src/components/VisualTour/VisualTour.tsx +30 -50
  226. package/src/components/VisualTour/visualTour.scss +0 -34
  227. package/src/components/index.scss +2 -0
  228. package/src/components/index.ts +2 -0
  229. package/src/configuration/_customproperties.scss +32 -0
  230. package/src/configuration/stories/customproperties.stories.tsx +118 -0
  231. package/src/extensions/codemirror/CodeMirror.tsx +20 -9
  232. package/src/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.ts +1 -2
  233. package/src/extensions/codemirror/tests/codemirrorTestHelper.ts +3 -3
  234. package/src/extensions/react-flow/_config.scss +3 -3
  235. package/src/extensions/react-flow/edges/EdgeLabel.tsx +5 -3
  236. package/src/extensions/react-flow/edges/EdgeNew.tsx +2 -1
  237. package/src/extensions/react-flow/edges/_edges.scss +3 -2
  238. package/src/extensions/react-flow/handles/HandleDefault.tsx +2 -2
  239. package/src/extensions/react-flow/minimap/MiniMap.tsx +2 -1
  240. package/src/extensions/react-flow/minimap/MiniMapV12.tsx +1 -1
  241. package/src/extensions/react-flow/nodes/_nodes.scss +4 -3
  242. package/src/extensions/react-flow/nodes/nodeUtils.tsx +1 -0
  243. package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +2 -2
  244. package/src/index.scss +1 -0
@@ -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
+ }
@@ -1,13 +1,25 @@
1
1
  import React from "react";
2
2
  import { Radio as BlueprintRadioButton, RadioProps as BlueprintRadioProps } from "@blueprintjs/core";
3
+ import classNames from "classnames";
3
4
 
4
5
  import { CLASSPREFIX as eccgui } from "../../configuration/constants";
5
6
 
6
- export type RadioButtonProps = BlueprintRadioProps;
7
+ export interface RadioButtonProps extends BlueprintRadioProps {
8
+ /**
9
+ * Hide the indicator.
10
+ * The element cannot be identified as radio input then but a click on the children can be easily processed via `onChange` event.
11
+ */
12
+ hideIndicator?: boolean;
13
+ }
7
14
 
8
- export const RadioButton = ({ children, className = "", ...restProps }: RadioButtonProps) => {
15
+ export const RadioButton = ({ children, className = "", hideIndicator = false, ...restProps }: RadioButtonProps) => {
9
16
  return (
10
- <BlueprintRadioButton {...restProps} className={`${eccgui}-radiobutton ` + className}>
17
+ <BlueprintRadioButton
18
+ {...restProps}
19
+ className={classNames(`${eccgui}-radiobutton`, className, {
20
+ [`${eccgui}-radiobutton--hidden-indicator`]: hideIndicator,
21
+ })}
22
+ >
11
23
  {children}
12
24
  </BlueprintRadioButton>
13
25
  );
@@ -29,3 +29,16 @@
29
29
  }
30
30
  }
31
31
  }
32
+
33
+ .#{$eccgui}-radiobutton--hidden-indicator {
34
+ &:not(.#{$ns}-align-right) {
35
+ padding-inline-start: 0;
36
+ }
37
+ &:not(.#{$ns}-align-left) {
38
+ padding-inline-end: 0;
39
+ }
40
+
41
+ input ~ .#{$ns}-control-indicator {
42
+ visibility: hidden;
43
+ }
44
+ }
@@ -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
  };
@@ -30,12 +30,15 @@ $tag-round-adjustment: 0 !default;
30
30
  @import "~@blueprintjs/core/src/components/tag/tag";
31
31
 
32
32
  .#{$eccgui}-tag__item {
33
+ --eccgui-tag-border-width: 1px;
34
+
33
35
  flex-grow: 0;
34
36
  flex-shrink: 0;
35
37
  min-width: calc(#{$tag-height} - 2px);
36
38
  min-height: calc(#{$tag-height} - 2px);
37
39
  max-height: calc(#{$tag-height} - 2px);
38
40
  padding: 0 $tag-padding-top;
41
+ line-height: calc(#{$tag-height} - 2px);
39
42
 
40
43
  &.#{$ns}-round {
41
44
  border-radius: $tag-height * 0.5;
@@ -55,11 +58,12 @@ $tag-round-adjustment: 0 !default;
55
58
  }
56
59
 
57
60
  &.#{$eccgui}-tag--small {
58
- min-width: calc(#{$tag-height-small} + #{$tag-padding-small} - 2px);
59
- min-height: calc(#{$tag-height-small} + #{$tag-padding-small} - 2px);
60
- max-height: calc(#{$tag-height-small} + #{$tag-padding-small} - 2px);
61
+ min-width: calc(#{$tag-height-small} + #{$tag-padding-small});
62
+ min-height: calc(#{$tag-height-small} + #{$tag-padding-small});
63
+ max-height: calc(#{$tag-height-small} + #{$tag-padding-small});
61
64
  padding: 0 $tag-padding-small;
62
- line-height: calc(#{$tag-height-small} - 2px);
65
+ font-size: calc(#{$eccgui-size-typo-tag} - 1px);
66
+ line-height: calc(#{$tag-height-small} + #{$tag-padding-small});
63
67
 
64
68
  &.#{$ns}-round {
65
69
  border-radius: $tag-height-small * 0.5;
@@ -75,7 +79,7 @@ $tag-round-adjustment: 0 !default;
75
79
  min-height: calc(#{$tag-height-large} + #{$tag-padding-large} - 2px);
76
80
  max-height: calc(#{$tag-height-large} + #{$tag-padding-large} - 2px);
77
81
  font-size: $eccgui-size-typo-tag-large;
78
- line-height: calc(#{$tag-height-large} - 2px);
82
+ line-height: calc(#{$tag-height-large} + #{$tag-padding-large} - 2px);
79
83
 
80
84
  &.#{$ns}-round {
81
85
  border-radius: $tag-height-large * 0.5;
@@ -138,7 +142,7 @@ $tag-round-adjustment: 0 !default;
138
142
 
139
143
  .#{$ns}-tag {
140
144
  border-style: solid;
141
- border-width: 1px;
145
+ border-width: var(--eccgui-tag-border-width);
142
146
 
143
147
  &:not([class*="#{$ns}-intent-"]) {
144
148
  --eccgui-tag-bg: #{$tag-default-color};
@@ -151,7 +155,7 @@ $tag-round-adjustment: 0 !default;
151
155
  var(--eccgui-tag-bg) var(--eccgui-tag-emfactor),
152
156
  eccgui-color-var("identity", "background", "100")
153
157
  );
154
- border-color: var(--eccgui-tag-border);
158
+ border-color: eccgui-color-rgba(var(--eccgui-tag-border), calc(0.25 * var(--eccgui-tag-emfactor)));
155
159
 
156
160
  &.#{$eccgui}-tag--strongeremphasis {
157
161
  --eccgui-tag-emfactor: 95%;
@@ -211,7 +215,7 @@ $tag-round-adjustment: 0 !default;
211
215
  var(--eccgui-tag-bg) var(--eccgui-tag-emfactor),
212
216
  eccgui-color-var("identity", "background", "100")
213
217
  );
214
- border-color: var(--eccgui-tag-border);
218
+ border-color: eccgui-color-rgba(var(--eccgui-tag-border), calc(0.25 * var(--eccgui-tag-emfactor)));
215
219
 
216
220
  &.#{$eccgui}-tag--strongeremphasis {
217
221
  --eccgui-tag-emfactor: 100%;
@@ -231,7 +235,7 @@ $tag-round-adjustment: 0 !default;
231
235
 
232
236
  &[class*="#{$eccgui}-intent--"] {
233
237
  color: eccgui-color-rgba(var(--eccgui-tag-text), var(--eccgui-tag-emfactor));
234
- border-color: eccgui-color-rgba(var(--eccgui-tag-border), var(--eccgui-tag-emfactor));
238
+ border-color: eccgui-color-rgba(var(--eccgui-tag-border), calc(0.25 * var(--eccgui-tag-emfactor)));
235
239
  }
236
240
 
237
241
  &.#{$eccgui}-intent--primary {
@@ -267,3 +271,9 @@ $tag-round-adjustment: 0 !default;
267
271
  }
268
272
  }
269
273
  }
274
+
275
+ @media print {
276
+ .#{$eccgui}-tag__item {
277
+ print-color-adjust: exact;
278
+ }
279
+ }
@@ -18,8 +18,9 @@ Default.args = {
18
18
  <LoremIpsum p={1} avgSentencesPerParagraph={1} random={false} />,
19
19
  "Simple text with URL http://example.com/ that should not get parsed.",
20
20
  "a < b to test equations in text like b > a.",
21
+ `Something with a "quote" in it.`,
21
22
  <>
22
- <Markdown>{`* This\n* is\n* a\n* list\n\nwritten in Markdown.`}</Markdown>
23
+ <Markdown>{`* This\n* is\n* a\n* list\n\nwritten in Markdown\n* containing a few HTML 'entities' & "quotes".`}</Markdown>
23
24
  <HtmlContentBlock>
24
25
  <h1>Block with sub elements</h1>
25
26
  <LoremIpsum p={3} avgSentencesPerParagraph={3} random={false} />
@@ -0,0 +1,44 @@
1
+ import React from "react";
2
+ import { render, RenderResult } from "@testing-library/react";
3
+
4
+ import "@testing-library/jest-dom";
5
+
6
+ import { Markdown, TextReducer } from "./../../";
7
+ import { Default as TextReducerStory } from "./TextReducer.stories";
8
+
9
+ describe("TextReducer", () => {
10
+ const textMustExist = (queryByText: RenderResult["queryByText"], text: string) => {
11
+ expect(queryByText(text, { exact: false })).not.toBeNull();
12
+ };
13
+ const textMustNotExist = (queryByText: RenderResult["queryByText"], text: string) => {
14
+ expect(queryByText(text, { exact: false })).toBeNull();
15
+ };
16
+ it("should display encoded HTML entities by default if they are used in the transformed markup", () => {
17
+ const { queryByText } = render(<TextReducer {...TextReducerStory.args} />);
18
+ textMustExist(queryByText, "&#x27;entities&#x27; &amp; &quot;quotes&quot;");
19
+ textMustNotExist(queryByText, `'entities' & "quotes"`);
20
+ });
21
+ it("should not display encoded HTML entities if `decodeHtmlEntities` is enabled", () => {
22
+ const { queryByText } = render(<TextReducer {...TextReducerStory.args} decodeHtmlEntities />);
23
+ textMustNotExist(queryByText, "&#x27;entities&#x27; &amp; &quot;quotes&quot;");
24
+ textMustExist(queryByText, `'entities' & "quotes"`);
25
+ });
26
+ it("should only decode if correct encoded HTML entities are found (strict mode)", () => {
27
+ const { queryByText } = render(
28
+ <TextReducer decodeHtmlEntities>
29
+ <Markdown>&</Markdown>&amp foo&ampbar
30
+ </TextReducer>
31
+ );
32
+ textMustExist(queryByText, "& &amp foo&ampbar");
33
+ textMustNotExist(queryByText, "& & foo&ampbar");
34
+ });
35
+ it("should allow decoding non-strict encoded HTML entities", () => {
36
+ const { queryByText } = render(
37
+ <TextReducer decodeHtmlEntities decodeHtmlEntitiesOptions={{ strict: false }}>
38
+ <Markdown>&</Markdown>&amp foo&ampbar
39
+ </TextReducer>
40
+ );
41
+ textMustNotExist(queryByText, "& &amp foo&ampbar");
42
+ textMustExist(queryByText, "& & foo&ampbar");
43
+ });
44
+ });
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
 
3
- import { reduceToText } from "../../common/utils/reduceToText";
3
+ import { DecodeHtmlEntitiesOptions, utils } from "../../common";
4
4
  import { CLASSPREFIX as eccgui } from "../../configuration/constants";
5
5
 
6
6
  import { OverflowText, OverflowTextProps } from "./../Typography";
@@ -24,6 +24,17 @@ export interface TextReducerProps extends Pick<React.HTMLAttributes<HTMLElement>
24
24
  * Specify more `OverflowText` properties used when `useOverflowTextWrapper` is set to `true`.
25
25
  */
26
26
  overflowTextProps?: Omit<OverflowTextProps, "passDown">;
27
+ /**
28
+ * If you transform HTML markup to text then the result could contain HTML entity encoded strings.
29
+ * By enabling this option they are decoded back to it's original char.
30
+ */
31
+ decodeHtmlEntities?: boolean;
32
+ /**
33
+ * Set the options used to decode the HTML entities, if `decodeHtmlEntities` is enabled.
34
+ * Internally we use `he` library, see their [documentation on decode options](https://www.npmjs.com/package/he#hedecodehtml-options).
35
+ * If not set we use `{ isAttributeValue: true, strict: true }` as default value.
36
+ */
37
+ decodeHtmlEntitiesOptions?: DecodeHtmlEntitiesOptions;
27
38
  }
28
39
 
29
40
  /**
@@ -32,16 +43,15 @@ export interface TextReducerProps extends Pick<React.HTMLAttributes<HTMLElement>
32
43
  */
33
44
  export const TextReducer = ({
34
45
  children,
35
- maxNodes,
36
- maxLength,
37
46
  useOverflowTextWrapper,
38
47
  overflowTextProps,
48
+ ...reduceToTextOptions
39
49
  }: TextReducerProps) => {
40
50
  if (typeof children === "undefined") {
41
51
  return <></>;
42
52
  }
43
53
 
44
- const shrinkedContent = reduceToText(children, { maxLength, maxNodes });
54
+ const shrinkedContent = utils.reduceToText(children, reduceToTextOptions);
45
55
 
46
56
  return useOverflowTextWrapper ? (
47
57
  <OverflowText
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+
3
+ import { CLASSPREFIX as eccgui } from "../../configuration/constants";
4
+ import { TestableComponent } from "../interfaces";
5
+
6
+ export interface InlineTextProps extends React.HTMLAttributes<HTMLElement>, TestableComponent {
7
+ /**
8
+ * Additional CSS class name.
9
+ */
10
+ className?: string;
11
+ }
12
+
13
+ /**
14
+ * Forces all children to be displayed as inline content.
15
+ */
16
+ export const InlineText = ({ className = "", children, ...otherProps }: InlineTextProps) => {
17
+ return (
18
+ <div {...otherProps} className={`${eccgui}-typography__inlinetext` + (className ? " " + className : "")}>
19
+ {children}
20
+ </div>
21
+ );
22
+ };
23
+
24
+ export default InlineText;
@@ -7,6 +7,7 @@ select,
7
7
  input,
8
8
  textarea {
9
9
  font-family: inherit;
10
+ font-size-adjust: inherit;
10
11
  border-radius: 0;
11
12
  }
12
13
 
@@ -2,3 +2,4 @@ export * from "./Highlighter";
2
2
  export * from "./HtmlContentBlock";
3
3
  export * from "./OverflowText";
4
4
  export * from "./WhiteSpaceContainer";
5
+ export * from "./InlineText";
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import { Meta, StoryFn } from "@storybook/react";
3
+
4
+ import { InlineText } from "../InlineText";
5
+
6
+ import overflowTextConfig from "./OverflowText.stories";
7
+
8
+ const config = {
9
+ title: "Components/Typography/InlineText",
10
+ component: InlineText,
11
+ argTypes: {
12
+ children: overflowTextConfig.argTypes?.children,
13
+ },
14
+ } as Meta<typeof InlineText>;
15
+ export default config;
16
+
17
+ const Template: StoryFn<typeof InlineText> = (args) => <InlineText {...args} />;
18
+
19
+ export const Default = Template.bind({});
20
+ Default.args = {
21
+ children: (
22
+ <div>
23
+ <div>Block line 1.</div>
24
+ <div>Block line 2.</div>
25
+ </div>
26
+ ),
27
+ };