@eccenca/gui-elements 23.0.0 → 23.1.0-easynav.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 (289) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/README.md +7 -0
  3. package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
  4. package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js +7 -2
  5. package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
  6. package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +3 -7
  7. package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
  8. package/dist/cjs/cmem/react-flow/extensions/scrollOnDragHook.js +200 -0
  9. package/dist/cjs/cmem/react-flow/extensions/scrollOnDragHook.js.map +1 -0
  10. package/dist/cjs/common/Intent/index.js +7 -3
  11. package/dist/cjs/common/Intent/index.js.map +1 -1
  12. package/dist/cjs/common/utils/characters.js +82 -0
  13. package/dist/cjs/common/utils/characters.js.map +1 -0
  14. package/dist/cjs/components/Application/ApplicationTitle.js +2 -2
  15. package/dist/cjs/components/Application/ApplicationTitle.js.map +1 -1
  16. package/dist/cjs/components/Badge/Badge.js +44 -0
  17. package/dist/cjs/components/Badge/Badge.js.map +1 -0
  18. package/dist/cjs/components/Depiction/Depiction.js +111 -0
  19. package/dist/cjs/components/Depiction/Depiction.js.map +1 -0
  20. package/dist/cjs/components/Grid/Grid.js +7 -2
  21. package/dist/cjs/components/Grid/Grid.js.map +1 -1
  22. package/dist/cjs/components/Grid/GridColumn.js +6 -2
  23. package/dist/cjs/components/Grid/GridColumn.js.map +1 -1
  24. package/dist/cjs/components/Grid/GridRow.js +3 -0
  25. package/dist/cjs/components/Grid/GridRow.js.map +1 -1
  26. package/dist/cjs/components/Icon/BaseIcon.js +38 -0
  27. package/dist/cjs/components/Icon/BaseIcon.js.map +1 -0
  28. package/dist/cjs/components/Icon/Icon.js +9 -24
  29. package/dist/cjs/components/Icon/Icon.js.map +1 -1
  30. package/dist/cjs/components/Icon/IconButton.js +8 -1
  31. package/dist/cjs/components/Icon/IconButton.js.map +1 -1
  32. package/dist/cjs/components/Icon/TestIcon.js +35 -0
  33. package/dist/cjs/components/Icon/TestIcon.js.map +1 -0
  34. package/dist/cjs/components/Icon/canonicalIconNames.js +123 -621
  35. package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
  36. package/dist/cjs/components/Icon/index.js +11 -0
  37. package/dist/cjs/components/Icon/index.js.map +1 -0
  38. package/dist/cjs/components/Menu/MenuItem.js +1 -1
  39. package/dist/cjs/components/Menu/MenuItem.js.map +1 -1
  40. package/dist/cjs/components/MultiSelect/MultiSelect.js +56 -23
  41. package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
  42. package/dist/cjs/components/Notification/Notification.js +10 -2
  43. package/dist/cjs/components/Notification/Notification.js.map +1 -1
  44. package/dist/cjs/components/OverviewItem/OverviewItemDepiction.js +24 -0
  45. package/dist/cjs/components/OverviewItem/OverviewItemDepiction.js.map +1 -1
  46. package/dist/cjs/components/Tag/Tag.js +6 -2
  47. package/dist/cjs/components/Tag/Tag.js.map +1 -1
  48. package/dist/cjs/components/TextField/TextArea.js +4 -2
  49. package/dist/cjs/components/TextField/TextArea.js.map +1 -1
  50. package/dist/cjs/components/TextField/TextField.js +4 -2
  51. package/dist/cjs/components/TextField/TextField.js.map +1 -1
  52. package/dist/cjs/components/TextField/useTextValidation.js +84 -0
  53. package/dist/cjs/components/TextField/useTextValidation.js.map +1 -0
  54. package/dist/cjs/components/Tree/Tree.js.map +1 -1
  55. package/dist/cjs/components/Typography/Highlighter.js.map +1 -1
  56. package/dist/cjs/components/Typography/OverflowText.js.map +1 -1
  57. package/dist/cjs/components/Typography/WhiteSpaceContainer.js +35 -12
  58. package/dist/cjs/components/Typography/WhiteSpaceContainer.js.map +1 -1
  59. package/dist/cjs/components/Typography/index.js +21 -0
  60. package/dist/cjs/components/Typography/index.js.map +1 -0
  61. package/dist/cjs/components/Workspace/WorkspaceContent.js +1 -1
  62. package/dist/cjs/components/Workspace/WorkspaceContent.js.map +1 -1
  63. package/dist/cjs/components/index.js +18 -0
  64. package/dist/cjs/components/index.js.map +1 -0
  65. package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +58 -0
  66. package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -0
  67. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +12 -3
  68. package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  69. package/dist/cjs/extensions/react-flow/index.js +11 -0
  70. package/dist/cjs/extensions/react-flow/index.js.map +1 -1
  71. package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +57 -30
  72. package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
  73. package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js +3 -2
  74. package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
  75. package/dist/cjs/extensions/react-flow/versionsupport.js +20 -0
  76. package/dist/cjs/extensions/react-flow/versionsupport.js.map +1 -0
  77. package/dist/cjs/index.js +7 -17
  78. package/dist/cjs/index.js.map +1 -1
  79. package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
  80. package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js +7 -2
  81. package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
  82. package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +3 -6
  83. package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
  84. package/dist/esm/cmem/react-flow/extensions/scrollOnDragHook.js +194 -0
  85. package/dist/esm/cmem/react-flow/extensions/scrollOnDragHook.js.map +1 -0
  86. package/dist/esm/common/Intent/index.js +5 -13
  87. package/dist/esm/common/Intent/index.js.map +1 -1
  88. package/dist/esm/common/utils/characters.js +96 -0
  89. package/dist/esm/common/utils/characters.js.map +1 -0
  90. package/dist/esm/components/Application/ApplicationTitle.js +2 -2
  91. package/dist/esm/components/Application/ApplicationTitle.js.map +1 -1
  92. package/dist/esm/components/Badge/Badge.js +48 -0
  93. package/dist/esm/components/Badge/Badge.js.map +1 -0
  94. package/dist/esm/components/Depiction/Depiction.js +96 -0
  95. package/dist/esm/components/Depiction/Depiction.js.map +1 -0
  96. package/dist/esm/components/Grid/Grid.js +7 -2
  97. package/dist/esm/components/Grid/Grid.js.map +1 -1
  98. package/dist/esm/components/Grid/GridColumn.js +6 -2
  99. package/dist/esm/components/Grid/GridColumn.js.map +1 -1
  100. package/dist/esm/components/Grid/GridRow.js +3 -0
  101. package/dist/esm/components/Grid/GridRow.js.map +1 -1
  102. package/dist/esm/components/Icon/BaseIcon.js +44 -0
  103. package/dist/esm/components/Icon/BaseIcon.js.map +1 -0
  104. package/dist/esm/components/Icon/Icon.js +9 -24
  105. package/dist/esm/components/Icon/Icon.js.map +1 -1
  106. package/dist/esm/components/Icon/IconButton.js +8 -1
  107. package/dist/esm/components/Icon/IconButton.js.map +1 -1
  108. package/dist/esm/components/Icon/TestIcon.js +41 -0
  109. package/dist/esm/components/Icon/TestIcon.js.map +1 -0
  110. package/dist/esm/components/Icon/canonicalIconNames.js +123 -621
  111. package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
  112. package/dist/esm/components/Icon/index.js +4 -0
  113. package/dist/esm/components/Icon/index.js.map +1 -0
  114. package/dist/esm/components/Menu/MenuItem.js +1 -1
  115. package/dist/esm/components/Menu/MenuItem.js.map +1 -1
  116. package/dist/esm/components/MultiSelect/MultiSelect.js +61 -44
  117. package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
  118. package/dist/esm/components/Notification/Notification.js +12 -4
  119. package/dist/esm/components/Notification/Notification.js.map +1 -1
  120. package/dist/esm/components/OverviewItem/OverviewItemDepiction.js +24 -0
  121. package/dist/esm/components/OverviewItem/OverviewItemDepiction.js.map +1 -1
  122. package/dist/esm/components/Tag/Tag.js +6 -2
  123. package/dist/esm/components/Tag/Tag.js.map +1 -1
  124. package/dist/esm/components/TextField/TextArea.js +4 -2
  125. package/dist/esm/components/TextField/TextArea.js.map +1 -1
  126. package/dist/esm/components/TextField/TextField.js +4 -2
  127. package/dist/esm/components/TextField/TextField.js.map +1 -1
  128. package/dist/esm/components/TextField/useTextValidation.js +78 -0
  129. package/dist/esm/components/TextField/useTextValidation.js.map +1 -0
  130. package/dist/esm/components/Tree/Tree.js.map +1 -1
  131. package/dist/esm/components/Typography/Highlighter.js.map +1 -1
  132. package/dist/esm/components/Typography/OverflowText.js.map +1 -1
  133. package/dist/esm/components/Typography/WhiteSpaceContainer.js +16 -14
  134. package/dist/esm/components/Typography/WhiteSpaceContainer.js.map +1 -1
  135. package/dist/esm/components/Typography/index.js +12 -0
  136. package/dist/esm/components/Typography/index.js.map +1 -0
  137. package/dist/esm/components/Workspace/WorkspaceContent.js +1 -1
  138. package/dist/esm/components/Workspace/WorkspaceContent.js.map +1 -1
  139. package/dist/esm/components/index.js +6 -0
  140. package/dist/esm/components/index.js.map +1 -0
  141. package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +47 -0
  142. package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -0
  143. package/dist/esm/extensions/react-flow/handles/HandleDefault.js +13 -4
  144. package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
  145. package/dist/esm/extensions/react-flow/index.js +1 -0
  146. package/dist/esm/extensions/react-flow/index.js.map +1 -1
  147. package/dist/esm/extensions/react-flow/nodes/NodeContent.js +67 -38
  148. package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
  149. package/dist/esm/extensions/react-flow/nodes/NodeDefault.js +3 -2
  150. package/dist/esm/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
  151. package/dist/esm/extensions/react-flow/versionsupport.js +32 -0
  152. package/dist/esm/extensions/react-flow/versionsupport.js.map +1 -0
  153. package/dist/esm/index.js +5 -10
  154. package/dist/esm/index.js.map +1 -1
  155. package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +2 -1
  156. package/dist/types/cmem/react-flow/ReactFlow/ReactFlow.d.ts +14 -0
  157. package/dist/types/cmem/react-flow/extensions/scrollOnDragHook.d.ts +22 -0
  158. package/dist/types/common/Intent/index.d.ts +4 -3
  159. package/dist/types/common/utils/characters.d.ts +19 -0
  160. package/dist/types/components/Badge/Badge.d.ts +42 -0
  161. package/dist/types/components/Depiction/Depiction.d.ts +71 -0
  162. package/dist/types/components/Grid/Grid.d.ts +21 -2
  163. package/dist/types/components/Grid/GridColumn.d.ts +21 -3
  164. package/dist/types/components/Grid/GridRow.d.ts +18 -2
  165. package/dist/types/components/Icon/BaseIcon.d.ts +45 -0
  166. package/dist/types/components/Icon/Icon.d.ts +7 -34
  167. package/dist/types/components/Icon/IconButton.d.ts +3 -2
  168. package/dist/types/components/Icon/TestIcon.d.ts +20 -0
  169. package/dist/types/components/Icon/canonicalIconNames.d.ts +9 -7
  170. package/dist/types/components/Icon/index.d.ts +4 -0
  171. package/dist/types/components/Menu/MenuItem.d.ts +2 -1
  172. package/dist/types/components/MultiSelect/MultiSelect.d.ts +3 -1
  173. package/dist/types/components/Notification/Notification.d.ts +13 -4
  174. package/dist/types/components/Tabs/Tab.d.ts +2 -0
  175. package/dist/types/components/Tag/Tag.d.ts +16 -3
  176. package/dist/types/components/TextField/TextArea.d.ts +7 -2
  177. package/dist/types/components/TextField/TextField.d.ts +6 -1
  178. package/dist/types/components/TextField/useTextValidation.d.ts +28 -0
  179. package/dist/types/components/Tree/Tree.d.ts +2 -1
  180. package/dist/types/components/Typography/Highlighter.d.ts +2 -2
  181. package/dist/types/components/Typography/OverflowText.d.ts +2 -2
  182. package/dist/types/components/Typography/WhiteSpaceContainer.d.ts +45 -4
  183. package/dist/types/components/Typography/index.d.ts +12 -0
  184. package/dist/types/components/index.d.ts +5 -0
  185. package/dist/types/extensions/react-flow/edges/EdgeLabel.d.ts +32 -0
  186. package/dist/types/extensions/react-flow/handles/HandleDefault.d.ts +11 -3
  187. package/dist/types/extensions/react-flow/index.d.ts +1 -0
  188. package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +31 -7
  189. package/dist/types/extensions/react-flow/nodes/NodeDefault.d.ts +2 -1
  190. package/dist/types/extensions/react-flow/versionsupport.d.ts +7 -0
  191. package/dist/types/index.d.ts +6 -11
  192. package/package.json +14 -16
  193. package/scripts/compile-sass.ts +9 -1
  194. package/src/_shame.scss +1 -1
  195. package/src/cmem/ActivityControl/ActivityControlWidget.stories.tsx +6 -4
  196. package/src/cmem/ActivityControl/ActivityControlWidget.tsx +3 -2
  197. package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +26 -1
  198. package/src/cmem/react-flow/StickyNoteModal/StickyNoteModal.tsx +10 -6
  199. package/src/cmem/react-flow/extensions/scrollOnDragHook.ts +247 -0
  200. package/src/common/Intent/index.ts +16 -12
  201. package/src/common/utils/characters.ts +111 -0
  202. package/src/components/Accordion/accordion.scss +4 -3
  203. package/src/components/Application/ApplicationTitle.tsx +2 -2
  204. package/src/components/Application/_config.scss +1 -1
  205. package/src/components/Application/_content.scss +1 -1
  206. package/src/components/Application/_header.scss +2 -2
  207. package/src/components/Application/_sidebar.scss +2 -9
  208. package/src/components/Application/_toolbar.scss +1 -1
  209. package/src/components/Application/application.scss +4 -4
  210. package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +13 -8
  211. package/src/components/Badge/Badge.stories.tsx +47 -0
  212. package/src/components/Badge/Badge.tsx +93 -0
  213. package/src/components/Badge/badge.scss +44 -0
  214. package/src/components/Depiction/Depiction.tsx +198 -0
  215. package/src/components/Depiction/depiction.scss +176 -0
  216. package/src/components/Depiction/stories/Depiction.stories.tsx +69 -0
  217. package/src/components/Depiction/stories/test-16to9.png +0 -0
  218. package/src/components/Depiction/stories/test-16to9.svg +41 -0
  219. package/src/components/Depiction/stories/test-16to9.tobase64.svg +41 -0
  220. package/src/components/Depiction/stories/test-16to9.tsx +44 -0
  221. package/src/components/Depiction/stories/test-9to16.png +0 -0
  222. package/src/components/Depiction/stories/test-9to16.svg +44 -0
  223. package/src/components/Depiction/stories/test-9to16.tobase64.svg +44 -0
  224. package/src/components/Depiction/stories/test-9to16.tsx +48 -0
  225. package/src/components/Grid/Grid.tsx +22 -4
  226. package/src/components/Grid/GridColumn.tsx +24 -7
  227. package/src/components/Grid/GridRow.tsx +18 -3
  228. package/src/components/Grid/grid.scss +14 -13
  229. package/src/components/Grid/stories/Grid.stories.tsx +27 -0
  230. package/src/components/Grid/stories/GridColumn.stories.tsx +66 -0
  231. package/src/components/Grid/stories/GridRow.stories.tsx +47 -0
  232. package/src/components/Icon/BaseIcon.tsx +84 -0
  233. package/src/components/Icon/Icon.tsx +23 -82
  234. package/src/components/Icon/IconButton.tsx +18 -14
  235. package/src/components/Icon/TestIcon.tsx +39 -0
  236. package/src/components/Icon/canonicalIconNames.tsx +132 -633
  237. package/src/components/Icon/index.ts +5 -0
  238. package/src/components/Icon/stories/Icon.stories.tsx +13 -0
  239. package/src/components/Icon/stories/IconButton.stories.tsx +14 -7
  240. package/src/components/Icon/stories/TestIcon.stories.tsx +28 -0
  241. package/src/components/Link/link.scss +2 -1
  242. package/src/components/Menu/MenuItem.tsx +14 -4
  243. package/src/components/Menu/Stories/MenuItem.stories.tsx +16 -2
  244. package/src/components/MultiSelect/MultiSelect.tsx +58 -27
  245. package/src/components/Notification/Notification.stories.tsx +4 -0
  246. package/src/components/Notification/Notification.tsx +26 -6
  247. package/src/components/OverviewItem/OverviewItemDepiction.tsx +31 -0
  248. package/src/components/OverviewItem/overviewitem.scss +2 -1
  249. package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +22 -1
  250. package/src/components/OverviewItem/stories/OverviewItemDepiction.stories.tsx +8 -3
  251. package/src/components/Pagination/pagination.scss +3 -2
  252. package/src/components/SimpleTable/simpletable.scss +11 -12
  253. package/src/components/Tag/Tag.stories.tsx +7 -2
  254. package/src/components/Tag/Tag.tsx +24 -4
  255. package/src/components/Tag/tag.scss +84 -3
  256. package/src/components/TagInput/taginput.scss +6 -0
  257. package/src/components/TextField/TextArea.tsx +10 -1
  258. package/src/components/TextField/TextField.tsx +9 -0
  259. package/src/components/TextField/stories/SearchField.stories.tsx +1 -1
  260. package/src/components/TextField/textfield.scss +12 -0
  261. package/src/components/TextField/useTextValidation.ts +103 -0
  262. package/src/components/Tooltip/tooltip.scss +1 -1
  263. package/src/components/Tree/Tree.stories.tsx +7 -1
  264. package/src/components/Tree/Tree.tsx +2 -1
  265. package/src/components/Typography/Highlighter.tsx +2 -2
  266. package/src/components/Typography/OverflowText.tsx +2 -2
  267. package/src/components/Typography/WhiteSpaceContainer.tsx +69 -21
  268. package/src/components/Typography/index.ts +25 -0
  269. package/src/components/Typography/stories/WhiteSpaceContainer.stories.tsx +55 -0
  270. package/src/components/Typography/typography.scss +3 -2
  271. package/src/components/Workspace/WorkspaceContent.tsx +1 -1
  272. package/src/components/index.scss +5 -0
  273. package/src/components/index.ts +5 -0
  274. package/src/extensions/react-flow/_config.scss +1 -0
  275. package/src/extensions/react-flow/edges/EdgeLabel.tsx +83 -0
  276. package/src/extensions/react-flow/edges/_edges.scss +77 -0
  277. package/src/extensions/react-flow/edges/stories/EdgeLabel.stories.tsx +39 -0
  278. package/src/extensions/react-flow/handles/HandleDefault.tsx +38 -10
  279. package/src/extensions/react-flow/index.ts +1 -0
  280. package/src/extensions/react-flow/nodes/NodeContent.tsx +134 -55
  281. package/src/extensions/react-flow/nodes/NodeDefault.tsx +4 -2
  282. package/src/extensions/react-flow/nodes/_nodes.scss +56 -17
  283. package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +37 -1
  284. package/src/extensions/react-flow/versionsupport.ts +22 -0
  285. package/src/includes/carbon-components/_components.scss +11 -0
  286. package/src/includes/carbon-components/_requisits.scss +18 -0
  287. package/src/includes/carbon-components/_variables.scss +50 -53
  288. package/src/index.scss +4 -105
  289. package/src/index.ts +6 -16
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { TextAreaProps as BlueprintTextAreaProps } from "@blueprintjs/core";
3
- interface TextAreaProps extends Partial<BlueprintTextAreaProps> {
3
+ import { InvisibleCharacterWarningProps } from "./useTextValidation";
4
+ export interface TextAreaProps extends Partial<BlueprintTextAreaProps> {
4
5
  /**
5
6
  * when set to true the input takes a blue border color
6
7
  */
@@ -17,6 +18,10 @@ interface TextAreaProps extends Partial<BlueprintTextAreaProps> {
17
18
  * when set to true the input takes a red border color
18
19
  */
19
20
  hasStateDanger?: boolean;
21
+ /**
22
+ * If set, allows to be informed of invisible, hard to spot characters in the string value.
23
+ */
24
+ invisibleCharacterWarning?: InvisibleCharacterWarningProps;
20
25
  }
21
- declare function TextArea({ className, hasStatePrimary, hasStateSuccess, hasStateWarning, hasStateDanger, rows, ...otherProps }: TextAreaProps): JSX.Element;
26
+ declare function TextArea({ className, hasStatePrimary, hasStateSuccess, hasStateWarning, hasStateDanger, rows, invisibleCharacterWarning, ...otherProps }: TextAreaProps): JSX.Element;
22
27
  export default TextArea;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { MaybeElement, HTMLInputProps, InputGroupProps } from "@blueprintjs/core";
3
3
  import { ValidIconName } from "../Icon/canonicalIconNames";
4
+ import { InvisibleCharacterWarningProps } from "./useTextValidation";
4
5
  export interface TextFieldProps extends Partial<Omit<InputGroupProps, "intent" | "leftIcon"> & HTMLInputProps> {
5
6
  /**
6
7
  * The input element is displayed with primary color scheme.
@@ -26,9 +27,13 @@ export interface TextFieldProps extends Partial<Omit<InputGroupProps, "intent" |
26
27
  * Left aligned icon, can be a canonical icon name or an `Icon` element.
27
28
  */
28
29
  leftIcon?: ValidIconName | MaybeElement;
30
+ /**
31
+ * If set, allows to be informed of invisible, hard to spot characters in the string value.
32
+ */
33
+ invisibleCharacterWarning?: InvisibleCharacterWarningProps;
29
34
  }
30
35
  /**
31
36
  * Text input field.
32
37
  */
33
- declare function TextField({ className, hasStatePrimary, hasStateSuccess, hasStateWarning, hasStateDanger, fullWidth, leftIcon, ...otherProps }: TextFieldProps): JSX.Element;
38
+ declare function TextField({ className, hasStatePrimary, hasStateSuccess, hasStateWarning, hasStateDanger, fullWidth, leftIcon, invisibleCharacterWarning, ...otherProps }: TextFieldProps): JSX.Element;
34
39
  export default TextField;
@@ -0,0 +1,28 @@
1
+ import React, { ChangeEventHandler } from "react";
2
+ export interface InvisibleCharacterWarningProps {
3
+ /**
4
+ * If set, the function is called after every value change what invisible characters have been detected.
5
+ */
6
+ callback: (detectedCodePoints: Set<number>) => any;
7
+ /**
8
+ * The delay in milliseconds after which an input string should be checked. Only the most recent value will be checked.
9
+ * A higher value will reduce the probability that the typing stalls.
10
+ *
11
+ * Default: 500
12
+ */
13
+ callbackDelay?: number;
14
+ }
15
+ interface Props<T = Element> {
16
+ /** Forwarded TextField props */
17
+ value?: string | ReadonlyArray<string> | number | undefined;
18
+ readOnly?: boolean | undefined;
19
+ disabled?: boolean | undefined;
20
+ onChange?: ChangeEventHandler<T>;
21
+ /**
22
+ * If set, allows to be informed of invisible, hard to spot characters in the string value.
23
+ */
24
+ invisibleCharacterWarning?: InvisibleCharacterWarningProps;
25
+ }
26
+ /** Validates the string value for invisible characters. */
27
+ export declare const useTextValidation: <T>({ value, onChange, invisibleCharacterWarning }: Props<T>) => React.ChangeEventHandler<T> | undefined;
28
+ export {};
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { Tree as BlueprintTree, TreeProps as BlueprintTreeProps, TreeNode as BlueprintTreeNode, TreeNodeInfo as BlueprintTreeNodeInfo } from "@blueprintjs/core";
3
3
  import { IconProps } from "./../Icon/Icon";
4
+ import { TestIconProps } from "./../Icon/TestIcon";
4
5
  export interface TreeNodeInfo<T = {}> extends Omit<BlueprintTreeNodeInfo<T>, "childNodes" | "icon"> {
5
6
  /**
6
7
  * Child tree nodes of this node.
@@ -9,7 +10,7 @@ export interface TreeNodeInfo<T = {}> extends Omit<BlueprintTreeNodeInfo<T>, "ch
9
10
  /**
10
11
  * `<Icon />` element to render next to the node's label.
11
12
  */
12
- icon?: React.ReactElement<IconProps>;
13
+ icon?: React.ReactElement<IconProps> | React.ReactElement<TestIconProps>;
13
14
  }
14
15
  export interface TreeNodeProps<T = {}> extends TreeNodeInfo<T> {
15
16
  children?: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- interface IHighlighterProps {
2
+ export interface HighlighterProps {
3
3
  label?: string;
4
4
  searchValue?: string;
5
5
  }
@@ -8,7 +8,7 @@ interface IHighlighterProps {
8
8
  * @param label The string to highlight.
9
9
  * @param searchValue The mutli-word search query from which single words should be highlighted in the label.
10
10
  */
11
- declare function Highlighter({ label, searchValue }: IHighlighterProps): JSX.Element;
11
+ declare function Highlighter({ label, searchValue }: HighlighterProps): JSX.Element;
12
12
  /** Extracts search words separated by white space. */
13
13
  export declare function extractSearchWords(textQuery: string, toLowerCase?: boolean): string[];
14
14
  /** Returns true if all search words are included in the given text */
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- interface IProps {
2
+ export interface OverflowTextProps {
3
3
  ellipsis?: "reverse" | "none";
4
4
  inline?: boolean;
5
5
  passDown?: boolean;
@@ -8,5 +8,5 @@ interface IProps {
8
8
  [key: string]: any;
9
9
  }
10
10
  /** Prevents text from overflowing. */
11
- declare function OverflowText({ className, children, ellipsis, inline, passDown, useHtmlElement, ...otherProps }: IProps): JSX.Element;
11
+ declare function OverflowText({ className, children, ellipsis, inline, passDown, useHtmlElement, ...otherProps }: OverflowTextProps): JSX.Element;
12
12
  export default OverflowText;
@@ -1,5 +1,46 @@
1
- /// <reference types="react" />
2
- declare function WhiteSpaceContainer({ className, children, marginTop, // tiny, small, regular, large, xlarge
3
- marginRight, marginBottom, marginLeft, paddingTop, // tiny, small, regular, large, xlarge
4
- paddingRight, paddingBottom, paddingLeft, ...otherProps }: any): JSX.Element;
1
+ import React from "react";
2
+ declare type WhiteSpaceSizes = "tiny" | "small" | "regular" | "large" | "xlarge";
3
+ export interface WhiteSpaceContainerProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ /**
5
+ * Insert line breaks within an otherwise unbreakable string to prevent text from overflowing the container.
6
+ */
7
+ linebreakForced?: boolean;
8
+ /**
9
+ * Size of top margin around the container.
10
+ */
11
+ marginTop?: WhiteSpaceSizes;
12
+ /**
13
+ * Size of right margin around the container.
14
+ */
15
+ marginRight?: WhiteSpaceSizes;
16
+ /**
17
+ * Size of bottom margin around the container.
18
+ */
19
+ marginBottom?: WhiteSpaceSizes;
20
+ /**
21
+ * Size of left margin around the container.
22
+ */
23
+ marginLeft?: WhiteSpaceSizes;
24
+ /**
25
+ * Size of top padding inside the container.
26
+ */
27
+ paddingTop?: WhiteSpaceSizes;
28
+ /**
29
+ * Size of right padding inside the container.
30
+ */
31
+ paddingRight?: WhiteSpaceSizes;
32
+ /**
33
+ * Size of bottom padding inside the container.
34
+ */
35
+ paddingBottom?: WhiteSpaceSizes;
36
+ /**
37
+ * Size of left padding inside the container.
38
+ */
39
+ paddingLeft?: WhiteSpaceSizes;
40
+ }
41
+ /**
42
+ * Simple container to add whitespace inside and around of it without adding style attributes directly.
43
+ * This way the added whitespace keeps visually connected to the other whitespaces used in the application.
44
+ */
45
+ declare function WhiteSpaceContainer({ className, children, marginTop, marginRight, marginBottom, marginLeft, paddingTop, paddingRight, paddingBottom, paddingLeft, linebreakForced, ...otherDivProps }: WhiteSpaceContainerProps): JSX.Element;
5
46
  export default WhiteSpaceContainer;
@@ -0,0 +1,12 @@
1
+ import Highlighter, { HighlighterProps } from "./Highlighter";
2
+ import { extractSearchWords, matchesAllWords, createMultiWordRegex } from "./Highlighter";
3
+ import HtmlContentBlock, { HtmlContentBlockProps } from "./HtmlContentBlock";
4
+ import OverflowText, { OverflowTextProps } from "./OverflowText";
5
+ import WhiteSpaceContainer, { WhiteSpaceContainerProps } from "./WhiteSpaceContainer";
6
+ export type { HighlighterProps, HtmlContentBlockProps, OverflowTextProps, WhiteSpaceContainerProps };
7
+ export { Highlighter, HtmlContentBlock, OverflowText, WhiteSpaceContainer, };
8
+ export declare const HighlighterFunctions: {
9
+ extractSearchWords: typeof extractSearchWords;
10
+ matchesAllWords: typeof matchesAllWords;
11
+ createMultiWordRegex: typeof createMultiWordRegex;
12
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./Badge/Badge";
2
+ export * from "./Depiction/Depiction";
3
+ export * from "./Icon";
4
+ export * from "./Tree/Tree";
5
+ export * from "./Typography";
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import { DepictionProps } from "../../../index";
3
+ import { ValidIconName } from "../../../components/Icon/canonicalIconNames";
4
+ import { IntentTypes } from "../../../common/Intent";
5
+ export interface EdgeLabelProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ /**
7
+ * Depiction element displayed left from the label.
8
+ */
9
+ depiction?: ValidIconName | React.ReactElement<DepictionProps>;
10
+ /**
11
+ * Label of the edge.
12
+ * Cannot overflow the parent container.
13
+ */
14
+ text: string | JSX.Element;
15
+ /**
16
+ * One or multiple other elements displayed right from label.
17
+ */
18
+ actions?: JSX.Element | JSX.Element[];
19
+ /**
20
+ * The element is increased in its size.
21
+ */
22
+ large?: boolean;
23
+ /**
24
+ * Stretches the label component to the full available width.
25
+ */
26
+ fullWidth?: boolean;
27
+ /**
28
+ * Add a info state to the label, visualized by color.
29
+ */
30
+ intent?: IntentTypes;
31
+ }
32
+ export declare const EdgeLabel: React.MemoExoticComponent<({ depiction, text, actions, large, fullWidth, intent, ...otherDivProps }: EdgeLabelProps) => JSX.Element>;
@@ -1,9 +1,17 @@
1
1
  import React from 'react';
2
- import { HandleProps as ReactFlowHandleProps } from "react-flow-renderer";
2
+ import { HandleProps as ReactFlowHandleLegacyProps } from "react-flow-renderer";
3
+ import { HandleProps as ReactFlowHandleNextProps } from "react-flow-renderer-lts";
3
4
  import { HandleContentProps } from "./HandleContent";
4
- export interface HandleProps extends ReactFlowHandleProps {
5
+ import { ReacFlowVersionSupportProps } from "../versionsupport";
6
+ interface HandleExtensionProps extends ReacFlowVersionSupportProps {
5
7
  data?: HandleContentProps;
6
8
  tooltip?: string;
7
9
  children?: JSX.Element | string;
10
+ onClick?: () => void;
8
11
  }
9
- export declare const HandleDefault: React.MemoExoticComponent<({ data, tooltip, children, ...handleProps }: HandleProps) => JSX.Element>;
12
+ export interface HandleProps extends HandleExtensionProps, ReactFlowHandleLegacyProps {
13
+ }
14
+ export interface HandleNextProps extends HandleExtensionProps, ReactFlowHandleNextProps {
15
+ }
16
+ export declare const HandleDefault: React.MemoExoticComponent<({ flowVersion, data, tooltip, children, ...handleProps }: HandleProps | HandleNextProps) => JSX.Element>;
17
+ export {};
@@ -7,6 +7,7 @@ export { EdgeDefault } from "./edges/EdgeDefault";
7
7
  export { EdgeStep } from "./edges/EdgeStep";
8
8
  export { EdgeTools } from "./edges/EdgeTools";
9
9
  export { edgeTypes } from "./edges/edgeTypes";
10
+ export * from "./edges/EdgeLabel";
10
11
  export { MarkerArrowClosedInverse } from "./markers/MarkerArrowClosedInverse";
11
12
  export { ReactFlowMarkers } from "./markers/ReactFlowMarkers";
12
13
  export { MiniMap } from "./minimap/MiniMap";
@@ -1,13 +1,18 @@
1
1
  import React from "react";
2
2
  import { Position } from "react-flow-renderer";
3
3
  import { ValidIconName } from "../../../components/Icon/canonicalIconNames";
4
- import { HandleProps } from "./../handles/HandleDefault";
4
+ import { DepictionProps } from "../../../components/Depiction/Depiction";
5
+ import { ReacFlowVersionSupportProps } from "../versionsupport";
6
+ import { HandleProps, HandleNextProps } from "./../handles/HandleDefault";
5
7
  import { NodeProps } from "./NodeDefault";
6
8
  import { NodeContentExtensionProps } from "./NodeContentExtension";
7
9
  export declare type HighlightingState = "success" | "warning" | "danger" | "match" | "altmatch";
8
10
  export interface IHandleProps extends HandleProps {
9
11
  category?: "configuration";
10
12
  }
13
+ interface NodeContentHandleNextProps extends HandleNextProps {
14
+ category?: "configuration";
15
+ }
11
16
  export declare type NodeDimensions = {
12
17
  width: number;
13
18
  height: number;
@@ -19,13 +24,22 @@ interface NodeContentData<CONTENT_PROPS = any> {
19
24
  */
20
25
  iconName?: ValidIconName;
21
26
  /**
22
- * Valid and accessible URL or `data-uri` for an image that should be displayed before the node label.
27
+ * Depiction element that should be displayed before the node label.
28
+ * As alternative a valid and accessible URL or `data-uri` for an image can be set, then the Depiction element is created automatically.
23
29
  */
24
- depiction?: string;
30
+ depiction?: string | React.ReactElement<DepictionProps>;
31
+ /**
32
+ * Any element that should be displayed as depiction before the node label.
33
+ */
34
+ leftElement?: JSX.Element;
25
35
  /**
26
36
  * Label that is displayed in the node header.
27
37
  */
28
- label: string;
38
+ label: string | JSX.Element;
39
+ /**
40
+ * Element that is displayed as subline under the label in the header.
41
+ */
42
+ labelSubline?: JSX.Element;
29
43
  /**
30
44
  * Content element, displayed in the node body.
31
45
  */
@@ -39,7 +53,7 @@ interface NodeContentData<CONTENT_PROPS = any> {
39
53
  */
40
54
  footerContent?: React.ReactNode;
41
55
  }
42
- export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends NodeContentData, React.HTMLAttributes<HTMLDivElement> {
56
+ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends NodeContentData, ReacFlowVersionSupportProps, React.HTMLAttributes<HTMLDivElement> {
43
57
  /**
44
58
  * Size of the node.
45
59
  * If `minimalShape` is not set to `none`then the configured size definition is only used for the selected node state.
@@ -50,6 +64,16 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends N
50
64
  * If not set to `none` then the node is only displayed in normal size when it is selected.
51
65
  */
52
66
  minimalShape?: "none" | "circular" | "rectangular";
67
+ /**
68
+ * Stretches the node to the full available width.
69
+ */
70
+ fullWidth?: boolean;
71
+ /**
72
+ * Increase the hight of the node header.
73
+ * Use this for example if you need more space for a label subline.
74
+ * Also the depiction is displayed larger.
75
+ */
76
+ increadeHeader?: boolean;
53
77
  /**
54
78
  * Set the type of used highlights to mark the node.
55
79
  */
@@ -76,7 +100,7 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends N
76
100
  * Array of property definition objects for `Handle` components that need to be created for the node.
77
101
  * @see https://reactflow.dev/docs/api/handle/
78
102
  */
79
- handles?: IHandleProps[];
103
+ handles?: IHandleProps[] | NodeContentHandleNextProps[];
80
104
  /**
81
105
  * Set the minimal number of handles on left or right side of the node to activate the recalculation of the minimal height of the node.
82
106
  */
@@ -139,5 +163,5 @@ export declare const gethighlightedStateClasses: (state: any, baseClassName: any
139
163
  * The `NodeContent` element manages the main view of how a node is displaying which content.
140
164
  * This element cannot be used directly, all properties must be routed through the `data` property of an `elements` property item inside the `ReactFlow` container.
141
165
  */
142
- export declare function NodeContent<CONTENT_PROPS = any>({ iconName, depiction, typeLabel, label, showExecutionButtons, executionButtons, menuButtons, content, contentExtension, footerContent, size, minimalShape, highlightedState, handles, adaptHeightForHandleMinCount, adaptSizeIncrement, getMinimalTooltipData, style, showUnconnectableHandles, animated, onNodeResize, nodeDimensions, targetPosition, sourcePosition, isConnectable, selected, letPassWheelEvents, businessData, ...otherProps }: NodeContentProps<any>): JSX.Element;
166
+ export declare function NodeContent<CONTENT_PROPS = any>({ flowVersion, iconName, depiction, leftElement, typeLabel, label, labelSubline, increadeHeader, fullWidth, showExecutionButtons, executionButtons, menuButtons, content, contentExtension, footerContent, size, minimalShape, highlightedState, handles, adaptHeightForHandleMinCount, adaptSizeIncrement, getMinimalTooltipData, style, showUnconnectableHandles, animated, onNodeResize, nodeDimensions, targetPosition, sourcePosition, isConnectable, selected, letPassWheelEvents, businessData, ...otherProps }: NodeContentProps<any>): JSX.Element;
143
167
  export {};
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  import { NodeProps as ReactFlowNodeProps } from "react-flow-renderer";
3
3
  import { NodeContentProps } from "./NodeContent";
4
- export interface NodeProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends ReactFlowNodeProps {
4
+ import { ReacFlowVersionSupportProps } from "../versionsupport";
5
+ export interface NodeProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends ReacFlowVersionSupportProps, ReactFlowNodeProps {
5
6
  /**
6
7
  * Contains all properties for our implementation of the React-Flow node.
7
8
  * For details pls see the `NodeContent` element documentation.
@@ -0,0 +1,7 @@
1
+ export interface ReacFlowVersionSupportProps {
2
+ /**
3
+ * Spevifies the context of the react flow renderer version that is used for the component.
4
+ */
5
+ flowVersion?: "legacy" | "next" | "none";
6
+ }
7
+ export declare const useReactFlowVersion: () => "none" | "legacy" | "next";
@@ -12,10 +12,6 @@ import ApplicationToolbarPanel from "./components/Application/ApplicationToolbar
12
12
  import AutoSuggestion from "./components/AutoSuggestion/AutoSuggestion";
13
13
  import { AutoSuggestionList } from "./components/AutoSuggestion/AutoSuggestionList";
14
14
  import SingleLineCodeEditor from "./components/AutoSuggestion/SingleLineCodeEditor";
15
- import HtmlContentBlock from "./components/Typography/HtmlContentBlock";
16
- import OverflowText from "./components/Typography/OverflowText";
17
- import WhiteSpaceContainer from "./components/Typography/WhiteSpaceContainer";
18
- import Highlighter from "./components/Typography/Highlighter";
19
15
  import Grid from "./components/Grid/Grid";
20
16
  import GridRow from "./components/Grid/GridRow";
21
17
  import GridColumn from "./components/Grid/GridColumn";
@@ -24,7 +20,6 @@ import WorkspaceContent from "./components/Workspace/WorkspaceContent";
24
20
  import WorkspaceMain from "./components/Workspace/WorkspaceMain";
25
21
  import WorkspaceSide from "./components/Workspace/WorkspaceSide";
26
22
  import WorkspaceHeader from "./components/Workspace/WorkspaceHeader";
27
- import Icon from "./components/Icon/Icon";
28
23
  import IconButton from "./components/Icon/IconButton";
29
24
  import Label from "./components/Label/Label";
30
25
  import Button from "./components/Button/Button";
@@ -81,22 +76,22 @@ import Link from "./components/Link/Link";
81
76
  import Spinner from "./components/Spinner/Spinner";
82
77
  import InteractionGate from "./components/InteractionGate/InteractionGate";
83
78
  import { PropertyName, PropertyValue, PropertyValuePair, PropertyValueList } from "./components/PropertyValuePair";
84
- import * as TypographyClassNames from "./components/Typography/classnames";
85
79
  import { ProgressBar } from "./components/ProgressBar/ProgressBar";
86
80
  import List from "./components/List/List";
87
81
  import * as LegacyReplacements from "./legacy-replacements";
82
+ import * as TypographyClassNames from "./components/Typography/classnames";
88
83
  declare const HelperClasses: {
89
84
  Typography: typeof TypographyClassNames;
90
85
  Intent: {
91
- [x: string]: string;
86
+ [key: string]: string;
92
87
  };
93
88
  };
94
89
  declare const Utilities: {
95
90
  openInNewTab: (event: import("react").MouseEvent<HTMLElement, MouseEvent>, handler?: ((e: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined, url?: string | undefined) => void;
96
91
  decideContrastColorValue: ({ testColor, lightColor, darkColor }: import("./common/utils/colorDecideContrastvalue").decideContrastColorValueProps) => string;
97
92
  };
98
- export { ApplicationContainer, ApplicationHeader, ApplicationContent, ApplicationSidebarNavigation, ApplicationSidebarToggler, ApplicationTitle, ApplicationToolbar, ApplicationToolbarSection, ApplicationToolbarAction, ApplicationToolbarPanel, AutoSuggestion, AutoSuggestionList, SingleLineCodeEditor, HtmlContentBlock, OverflowText, WhiteSpaceContainer, Highlighter, Grid, GridRow, GridColumn, List, WorkspaceContent, WorkspaceMain, WorkspaceSide, WorkspaceHeader, Menu, MenuItem, MenuDivider, ContextOverlay, ContextMenu, OverviewItem, OverviewItemDepiction, OverviewItemDescription, OverviewItemLine, OverviewItemActions, OverviewItemList, TableContainer, Table, TableHead, TableRow, TableBody, TableCell, TableHeader, Icon, IconButton, Label, Button, Checkbox, RadioButton, Tabs, Tab, TabTitle, TabPanel, TextField, TextArea, SearchField, Switch, NumericInput, FieldItem, FieldItemRow, FieldSet, BreadcrumbList, BreadcrumbItem, Modal, SimpleDialog, AlertDialog, Card, CardHeader, CardTitle, CardOptions, CardContent, CardActions, CardActionsAux, HoverToggler, Spacing, Divider, Tooltip, Section, SectionHeader, TitlePage, TitleMainsection, TitleSubsection, Accordion, AccordionItem, Toolbar, ToolbarSection, Tag, TagList, Pagination, Notification, Link, Spinner, InteractionGate, PropertyName, PropertyValue, PropertyValuePair, PropertyValueList, Toast, HelperClasses, Select, MultiSelect, AutoCompleteField, ProgressBar, Iframe, IframeModal, Utilities, LegacyReplacements, };
99
- export * from "./components/Tree/Tree";
100
- export * from "./cmem";
101
- export * from "./extensions";
93
+ export { ApplicationContainer, ApplicationHeader, ApplicationContent, ApplicationSidebarNavigation, ApplicationSidebarToggler, ApplicationTitle, ApplicationToolbar, ApplicationToolbarSection, ApplicationToolbarAction, ApplicationToolbarPanel, AutoSuggestion, AutoSuggestionList, SingleLineCodeEditor, Grid, GridRow, GridColumn, List, WorkspaceContent, WorkspaceMain, WorkspaceSide, WorkspaceHeader, Menu, MenuItem, MenuDivider, ContextOverlay, ContextMenu, OverviewItem, OverviewItemDepiction, OverviewItemDescription, OverviewItemLine, OverviewItemActions, OverviewItemList, TableContainer, Table, TableHead, TableRow, TableBody, TableCell, TableHeader, IconButton, Label, Button, Checkbox, RadioButton, Tabs, Tab, TabTitle, TabPanel, TextField, TextArea, SearchField, Switch, NumericInput, FieldItem, FieldItemRow, FieldSet, BreadcrumbList, BreadcrumbItem, Modal, SimpleDialog, AlertDialog, Card, CardHeader, CardTitle, CardOptions, CardContent, CardActions, CardActionsAux, HoverToggler, Spacing, Divider, Tooltip, Section, SectionHeader, TitlePage, TitleMainsection, TitleSubsection, Accordion, AccordionItem, Toolbar, ToolbarSection, Tag, TagList, Pagination, Notification, Link, Spinner, InteractionGate, PropertyName, PropertyValue, PropertyValuePair, PropertyValueList, Toast, HelperClasses, Select, MultiSelect, AutoCompleteField, ProgressBar, Iframe, IframeModal, Utilities, LegacyReplacements, };
94
+ export * from "./components";
102
95
  export * from "./components/interfaces";
96
+ export * from "./extensions";
97
+ export * from "./cmem";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eccenca/gui-elements",
3
3
  "description": "GUI elements based on other libraries, usable in React application, written in Typescript.",
4
- "version": "23.0.0",
4
+ "version": "23.1.0-easynav.1",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/eccenca/gui-elements",
7
7
  "bugs": "https://github.com/eccenca/gui-elements/issues",
@@ -53,7 +53,7 @@
53
53
  "build:all": "yarn build:clean && yarn build:esm && yarn build:cjs",
54
54
  "compile": "tsc --build tsconfig.json",
55
55
  "compile-scss": "ts-node -O \"{ \\\"esModuleInterop\\\": true, \\\"module\\\": \\\"commonjs\\\"}\" ./scripts/compile-sass.ts",
56
- "storybook": "start-storybook -p 6006",
56
+ "storybook": "start-storybook -p 6006 --no-open",
57
57
  "build-storybook": "build-storybook",
58
58
  "test": "jest",
59
59
  "test:ci": "jest --ci --reporters='default'",
@@ -66,12 +66,11 @@
66
66
  "@blueprintjs/core": "^4.9.0",
67
67
  "@blueprintjs/popover2": "^1.6.0",
68
68
  "@blueprintjs/select": "^4.6.0",
69
- "@carbon/icons": "10.44.0",
70
- "@carbon/icons-react": "10.44.0",
69
+ "@carbon/icons": "^11.11.0",
70
+ "@carbon/icons-react": "^11.11.0",
71
+ "@carbon/styles": "^1.17.0",
71
72
  "@mavrin/remark-typograf": "^2.2.0",
72
- "carbon-components": "10.44.0",
73
- "carbon-components-react": "7.44.1",
74
- "carbon-icons": "7.0.7",
73
+ "carbon-components-react": "^8.17.0",
75
74
  "codemirror": "^5.61.0",
76
75
  "color": "3.2.1",
77
76
  "lodash": "^4.17.21",
@@ -81,6 +80,8 @@
81
80
  "react-codemirror2": "^7.2.1",
82
81
  "react-dom": "^16.13.1",
83
82
  "react-flow-renderer": "9.7.4",
83
+ "react-flow-renderer-lts": "npm:react-flow-renderer@^10.3.17",
84
+ "react-inlinesvg": "^3.0.1",
84
85
  "react-markdown": "^7.0.1",
85
86
  "rehype-raw": "^6.1.0",
86
87
  "remark-definition-list": "^1.1.0",
@@ -107,7 +108,7 @@
107
108
  "@storybook/react": "^6.5.10",
108
109
  "@testing-library/jest-dom": "^5.16.1",
109
110
  "@testing-library/react": "^12.1.2",
110
- "@types/carbon-components-react": "7.49.0",
111
+ "@types/carbon-components-react": "^7.55.2",
111
112
  "@types/codemirror": "^5.60.5",
112
113
  "@types/color": "^3.0.2",
113
114
  "@types/jest": "^24.9.1",
@@ -132,24 +133,21 @@
132
133
  "sass-loader": "^10.3.1",
133
134
  "ts-node": "^10.9.1",
134
135
  "tsc-esm-fix": "^2.13.0",
135
- "typescript": "4.4.4"
136
+ "typescript": "4.4.4",
137
+ "yargs": "^17.6.2"
136
138
  },
137
139
  "peerDependencies": {
140
+ "@types/carbon-components-react": ">=7",
138
141
  "react": ">=16",
139
142
  "react-dom": ">=16"
140
143
  },
141
144
  "resolutions": {
142
- "**/@carbon/icons": "10.44.0",
143
- "**/@carbon/icons-react": "10.44.0",
144
- "**/carbon-components": "10.44.0",
145
- "**/carbon-components-react": "7.44.1",
146
- "**/carbon-icons": "7.0.7",
147
- "**/@types/react": "^17.0.0",
145
+ "**/@types/react": "^17.0.52",
148
146
  "**/node-gyp": "^7.0.0",
149
147
  "**/glob-parent": "^5.1.2",
150
148
  "**/trim": "^0.0.3",
151
149
  "**/trim-newlines": "^3.0.1",
152
- "**/minimist": "^1.2.6",
150
+ "**/minimist": "^1.2.7",
153
151
  "**/postcss": "^7.0.36"
154
152
  },
155
153
  "eslintConfig": {
@@ -1,9 +1,17 @@
1
1
  import * as sass from "sass";
2
2
  import tildeImporter from "node-sass-package-importer";
3
+ import yargs from "yargs";
3
4
  import sassRenderSyncConfig from "./sassConfig";
4
5
 
5
- sass.renderSync({
6
+ const args = yargs(process.argv.slice(2)).argv;
7
+
8
+ const styles = sass.renderSync({
6
9
  importer: tildeImporter(),
7
10
  ...sassRenderSyncConfig,
8
11
  file: "src/index.scss",
12
+ includePaths: ["node_modules"], // Carbon does not use tilde import syntax
9
13
  });
14
+
15
+ if (args.outputCss) {
16
+ console.log(styles.css.toString());
17
+ }
package/src/_shame.scss CHANGED
@@ -14,7 +14,7 @@ html {
14
14
  .#{$prefix}--assistive-text,
15
15
  .#{$prefix}--visually-hidden {
16
16
  /*
17
- TODO: move to better place, originally from ~carbon-components/scss/globals/scss/css--helpers
17
+ TODO: move to better place, originally from ~@carbon/styles/scss/css--helpers
18
18
  but we cannot use it directly because of other included rules there.
19
19
  */
20
20
  position: absolute;
@@ -1,10 +1,9 @@
1
1
  import React from "react";
2
2
  import { ComponentStory, ComponentMeta } from "@storybook/react";
3
-
4
- import { ActivityControlWidget } from "./ActivityControlWidget";
5
3
  import { loremIpsum } from "react-lorem-ipsum";
6
- import Tag from "../../components/Tag/Tag";
7
- import TagList from "../../components/Tag/TagList";
4
+
5
+ import { Tag, TagList, ActivityControlWidget } from "../../../index";
6
+ import { helpersArgTypes } from "../../../.storybook/helpers";
8
7
 
9
8
  export default {
10
9
  title: "Cmem/ActivityControlWidget",
@@ -28,6 +27,9 @@ export default {
28
27
  type: { summary: "boolean" },
29
28
  },
30
29
  },
30
+ progressSpinnerFinishedIcon: {
31
+ ...helpersArgTypes.exampleIcon,
32
+ },
31
33
  },
32
34
  } as ComponentMeta<typeof ActivityControlWidget>;
33
35
 
@@ -20,6 +20,7 @@ import { ProgressBarProps } from "../../components/ProgressBar/ProgressBar";
20
20
  import { SpinnerProps } from "../../components/Spinner/Spinner";
21
21
  import { ValidIconName } from "../../components/Icon/canonicalIconNames";
22
22
  import { IconProps } from "../../components/Icon/Icon";
23
+ import { TestIconProps } from "../../components/Icon/TestIcon";
23
24
 
24
25
  export interface IActivityControlProps extends TestableComponent {
25
26
  /**
@@ -74,7 +75,7 @@ export interface IActivityControlProps extends TestableComponent {
74
75
  /**
75
76
  * if this is set the spinner is replaced when the progress has finished from 0 - 1
76
77
  */
77
- progressSpinnerFinishedIcon?: React.ReactElement<IconProps>;
78
+ progressSpinnerFinishedIcon?: React.ReactElement<IconProps> | React.ReactElement<TestIconProps>;
78
79
  }
79
80
 
80
81
  interface IActivityContextMenu extends TestableComponent {
@@ -124,7 +125,7 @@ export function ActivityControlWidget(props: IActivityControlProps) {
124
125
  {(progressSpinner || progressSpinnerFinishedIcon) && (
125
126
  <OverviewItemDepiction keepColors>
126
127
  {progressSpinnerFinishedIcon ? (
127
- React.cloneElement(progressSpinnerFinishedIcon, { small, large: !small })
128
+ React.cloneElement(progressSpinnerFinishedIcon as JSX.Element, { small, large: !small })
128
129
  ) : (
129
130
  <Spinner
130
131
  position="inline"