@eccenca/gui-elements 25.0.0 → 25.1.0-changeupgradedtoreact18cmem6639.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.
- package/CHANGELOG.md +124 -0
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +30 -26
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/ActivityExecutionErrorReportModal.js +11 -5
- package/dist/cjs/cmem/ActivityControl/ActivityExecutionErrorReportModal.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js +1 -3
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/cjs/cmem/ContentBlobToggler/ContentBlobToggler.js +13 -6
- package/dist/cjs/cmem/ContentBlobToggler/ContentBlobToggler.js.map +1 -1
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +49 -11
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
- package/dist/cjs/cmem/markdown/Markdown.js +2 -2
- package/dist/cjs/cmem/markdown/Markdown.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -1
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +1 -1
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/graph.js +0 -2
- package/dist/cjs/cmem/react-flow/configuration/graph.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/linking.js +0 -2
- package/dist/cjs/cmem/react-flow/configuration/linking.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/workflow.js +0 -2
- package/dist/cjs/cmem/react-flow/configuration/workflow.js.map +1 -1
- package/dist/cjs/common/Intent/index.js +1 -1
- package/dist/cjs/common/Intent/index.js.map +1 -1
- package/dist/cjs/common/index.js +1 -0
- package/dist/cjs/common/index.js.map +1 -1
- package/dist/cjs/common/utils/CssCustomProperties.js.map +1 -1
- package/dist/cjs/common/utils/colorHash.js +26 -12
- package/dist/cjs/common/utils/colorHash.js.map +1 -1
- package/dist/cjs/components/Application/ApplicationSidebarNavigation.js.map +1 -1
- package/dist/cjs/components/Application/ApplicationTitle.js +5 -1
- package/dist/cjs/components/Application/ApplicationTitle.js.map +1 -1
- package/dist/cjs/components/Application/ApplicationViewability.js +33 -0
- package/dist/cjs/components/Application/ApplicationViewability.js.map +1 -0
- package/dist/cjs/components/Application/index.js +1 -0
- package/dist/cjs/components/Application/index.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +2 -9
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/autoCompleteFieldUtils.js.map +1 -1
- package/dist/cjs/components/Button/Button.js +6 -2
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/ColorField/ColorField.js +114 -0
- package/dist/cjs/components/ColorField/ColorField.js.map +1 -0
- package/dist/cjs/components/ContentGroup/ContentGroup.js +19 -19
- package/dist/cjs/components/ContentGroup/ContentGroup.js.map +1 -1
- package/dist/cjs/components/ContextOverlay/ContextMenu.js +4 -4
- package/dist/cjs/components/ContextOverlay/ContextMenu.js.map +1 -1
- package/dist/cjs/components/ContextOverlay/ContextOverlay.js +3 -2
- package/dist/cjs/components/ContextOverlay/ContextOverlay.js.map +1 -1
- package/dist/cjs/components/DecoupledOverlay/DecoupledOverlay.js +48 -0
- package/dist/cjs/components/DecoupledOverlay/DecoupledOverlay.js.map +1 -0
- package/dist/cjs/components/Icon/IconButton.js +2 -2
- package/dist/cjs/components/Icon/IconButton.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +10 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Icon/transformIcon.js +14 -0
- package/dist/cjs/components/Icon/transformIcon.js.map +1 -0
- package/dist/cjs/components/MultiSelect/MultiSelect.js +63 -24
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/NotAvailable/NotAvailable.js +42 -0
- package/dist/cjs/components/NotAvailable/NotAvailable.js.map +1 -0
- package/dist/cjs/components/Notification/Notification.js.map +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItemDepiction.js.map +1 -1
- package/dist/cjs/components/RadioButton/RadioButton.js +5 -2
- package/dist/cjs/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/cjs/components/Select/Select.js +6 -4
- package/dist/cjs/components/Select/Select.js.map +1 -1
- package/dist/cjs/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/cjs/components/Table/Table.js.map +1 -1
- package/dist/cjs/components/Table/TableContainer.js +1 -1
- package/dist/cjs/components/Table/TableContainer.js.map +1 -1
- package/dist/cjs/components/Table/TableExpandRow.js +2 -2
- package/dist/cjs/components/Table/TableExpandRow.js.map +1 -1
- package/dist/cjs/components/TextField/useTextValidation.js +17 -8
- package/dist/cjs/components/TextField/useTextValidation.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.js +11 -7
- package/dist/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/Typography/InlineText.js +29 -0
- package/dist/cjs/components/Typography/InlineText.js.map +1 -0
- package/dist/cjs/components/Typography/index.js +1 -0
- package/dist/cjs/components/Typography/index.js.map +1 -1
- package/dist/cjs/components/VisualTour/VisualTour.js +30 -36
- package/dist/cjs/components/VisualTour/VisualTour.js.map +1 -1
- package/dist/cjs/components/index.js +3 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +59 -21
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
- package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
- package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js +2 -2
- package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
- package/dist/cjs/extensions/codemirror/toolbars/EditorAppearanceConfigMenu.js +23 -0
- package/dist/cjs/extensions/codemirror/toolbars/EditorAppearanceConfigMenu.js.map +1 -0
- package/dist/cjs/extensions/codemirror/toolbars/markdown.toolbar.js +5 -2
- package/dist/cjs/extensions/codemirror/toolbars/markdown.toolbar.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +8 -3
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeNew.js +6 -4
- package/dist/cjs/extensions/react-flow/edges/EdgeNew.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeTools.js +2 -2
- package/dist/cjs/extensions/react-flow/edges/EdgeTools.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleContent.js +5 -2
- package/dist/cjs/extensions/react-flow/handles/HandleContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleTools.js +2 -2
- package/dist/cjs/extensions/react-flow/handles/HandleTools.js.map +1 -1
- package/dist/cjs/extensions/react-flow/markers/ReactFlowMarkers.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +7 -5
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js +5 -2
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeTools.js +6 -2
- package/dist/cjs/extensions/react-flow/nodes/NodeTools.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js +19 -14
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/ActivityExecutionErrorReportModal.js +4 -1
- package/dist/esm/cmem/ActivityControl/ActivityExecutionErrorReportModal.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/SilkActivityControl.js +1 -3
- package/dist/esm/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js +9 -5
- package/dist/esm/cmem/ContentBlobToggler/ContentBlobToggler.js.map +1 -1
- package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +57 -9
- package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
- package/dist/esm/cmem/markdown/Markdown.js +1 -1
- package/dist/esm/cmem/markdown/Markdown.js.map +1 -1
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -1
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +1 -1
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/graph.js +0 -2
- package/dist/esm/cmem/react-flow/configuration/graph.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/linking.js +0 -2
- package/dist/esm/cmem/react-flow/configuration/linking.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/workflow.js +0 -2
- package/dist/esm/cmem/react-flow/configuration/workflow.js.map +1 -1
- package/dist/esm/common/Intent/index.js +1 -1
- package/dist/esm/common/Intent/index.js.map +1 -1
- package/dist/esm/common/index.js +2 -1
- package/dist/esm/common/index.js.map +1 -1
- package/dist/esm/common/utils/CssCustomProperties.js.map +1 -1
- package/dist/esm/common/utils/colorHash.js +26 -13
- package/dist/esm/common/utils/colorHash.js.map +1 -1
- package/dist/esm/common/utils/reduceToText.js +1 -1
- package/dist/esm/components/Application/ApplicationSidebarNavigation.js.map +1 -1
- package/dist/esm/components/Application/ApplicationTitle.js +5 -1
- package/dist/esm/components/Application/ApplicationTitle.js.map +1 -1
- package/dist/esm/components/Application/ApplicationViewability.js +28 -0
- package/dist/esm/components/Application/ApplicationViewability.js.map +1 -0
- package/dist/esm/components/Application/index.js +1 -0
- package/dist/esm/components/Application/index.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js +9 -16
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/esm/components/AutocompleteField/autoCompleteFieldUtils.js.map +1 -1
- package/dist/esm/components/Button/Button.js +6 -2
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/ColorField/ColorField.js +140 -0
- package/dist/esm/components/ColorField/ColorField.js.map +1 -0
- package/dist/esm/components/ContentGroup/ContentGroup.js +1 -1
- package/dist/esm/components/ContentGroup/ContentGroup.js.map +1 -1
- package/dist/esm/components/ContextOverlay/ContextMenu.js +4 -4
- package/dist/esm/components/ContextOverlay/ContextMenu.js.map +1 -1
- package/dist/esm/components/ContextOverlay/ContextOverlay.js +3 -2
- package/dist/esm/components/ContextOverlay/ContextOverlay.js.map +1 -1
- package/dist/esm/components/DecoupledOverlay/DecoupledOverlay.js +42 -0
- package/dist/esm/components/DecoupledOverlay/DecoupledOverlay.js.map +1 -0
- package/dist/esm/components/Icon/IconButton.js +2 -2
- package/dist/esm/components/Icon/IconButton.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +10 -1
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Icon/transformIcon.js +21 -0
- package/dist/esm/components/Icon/transformIcon.js.map +1 -0
- package/dist/esm/components/MultiSelect/MultiSelect.js +66 -27
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/NotAvailable/NotAvailable.js +46 -0
- package/dist/esm/components/NotAvailable/NotAvailable.js.map +1 -0
- package/dist/esm/components/Notification/Notification.js.map +1 -1
- package/dist/esm/components/OverviewItem/OverviewItemDepiction.js.map +1 -1
- package/dist/esm/components/RadioButton/RadioButton.js +6 -2
- package/dist/esm/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/esm/components/Select/Select.js +3 -1
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/esm/components/Table/Table.js.map +1 -1
- package/dist/esm/components/Table/TableContainer.js +1 -1
- package/dist/esm/components/Table/TableContainer.js.map +1 -1
- package/dist/esm/components/Table/TableExpandRow.js +1 -1
- package/dist/esm/components/Table/TableExpandRow.js.map +1 -1
- package/dist/esm/components/TextField/useTextValidation.js +39 -8
- package/dist/esm/components/TextField/useTextValidation.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.js +11 -7
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/Typography/InlineText.js +33 -0
- package/dist/esm/components/Typography/InlineText.js.map +1 -0
- package/dist/esm/components/Typography/index.js +1 -0
- package/dist/esm/components/Typography/index.js.map +1 -1
- package/dist/esm/components/VisualTour/VisualTour.js +31 -37
- package/dist/esm/components/VisualTour/VisualTour.js.map +1 -1
- package/dist/esm/components/index.js +3 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +62 -24
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +1 -1
- package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
- package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js +3 -3
- package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
- package/dist/esm/extensions/codemirror/toolbars/EditorAppearanceConfigMenu.js +47 -0
- package/dist/esm/extensions/codemirror/toolbars/EditorAppearanceConfigMenu.js.map +1 -0
- package/dist/esm/extensions/codemirror/toolbars/markdown.toolbar.js +16 -2
- package/dist/esm/extensions/codemirror/toolbars/markdown.toolbar.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +4 -2
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeNew.js +3 -1
- package/dist/esm/extensions/react-flow/edges/EdgeNew.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeTools.js +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeTools.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleContent.js +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleTools.js +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleTools.js.map +1 -1
- package/dist/esm/extensions/react-flow/markers/ReactFlowMarkers.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMapV12.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +4 -2
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeTools.js +2 -1
- package/dist/esm/extensions/react-flow/nodes/NodeTools.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +13 -4
- package/dist/types/cmem/ActivityControl/ActivityExecutionErrorReportModal.d.ts +1 -1
- package/dist/types/cmem/ActivityControl/SilkActivityControl.d.ts +4 -4
- package/dist/types/cmem/ContentBlobToggler/ContentBlobToggler.d.ts +5 -1
- package/dist/types/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.d.ts +27 -11
- package/dist/types/cmem/markdown/Markdown.d.ts +2 -1
- package/dist/types/cmem/react-flow/configuration/graph.d.ts +2 -1
- package/dist/types/cmem/react-flow/configuration/linking.d.ts +2 -1
- package/dist/types/cmem/react-flow/configuration/workflow.d.ts +2 -1
- package/dist/types/common/index.d.ts +2 -1
- package/dist/types/common/utils/CssCustomProperties.d.ts +2 -2
- package/dist/types/common/utils/colorHash.d.ts +5 -4
- package/dist/types/components/Accordion/AccordionItem.d.ts +1 -1
- package/dist/types/components/Application/ApplicationSidebarNavigation.d.ts +2 -0
- package/dist/types/components/Application/ApplicationViewability.d.ts +36 -0
- package/dist/types/components/Application/index.d.ts +1 -0
- package/dist/types/components/AutoSuggestion/AutoSuggestion.d.ts +2 -2
- package/dist/types/components/AutocompleteField/AutoCompleteField.d.ts +2 -12
- package/dist/types/components/AutocompleteField/autoCompleteFieldUtils.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +3 -3
- package/dist/types/components/Card/CardHeader.d.ts +1 -1
- package/dist/types/components/ColorField/ColorField.d.ts +30 -0
- package/dist/types/components/ContentGroup/ContentGroup.d.ts +1 -1
- package/dist/types/components/ContextOverlay/ContextMenu.d.ts +9 -3
- package/dist/types/components/ContextOverlay/ContextOverlay.d.ts +8 -2
- package/dist/types/components/DecoupledOverlay/DecoupledOverlay.d.ts +22 -0
- package/dist/types/components/Depiction/Depiction.d.ts +1 -1
- package/dist/types/components/Dialog/SimpleDialog.d.ts +1 -1
- package/dist/types/components/Form/FieldItem.d.ts +1 -1
- package/dist/types/components/Form/FieldSet.d.ts +3 -3
- package/dist/types/components/HoverToggler/HoverToggler.d.ts +2 -2
- package/dist/types/components/Icon/IconButton.d.ts +1 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +9 -1
- package/dist/types/components/Icon/transformIcon.d.ts +2 -0
- package/dist/types/components/Label/Label.d.ts +3 -3
- package/dist/types/components/Menu/MenuItem.d.ts +1 -1
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +17 -5
- package/dist/types/components/NotAvailable/NotAvailable.d.ts +32 -0
- package/dist/types/components/Notification/Notification.d.ts +2 -2
- package/dist/types/components/OverviewItem/OverviewItemActions.d.ts +1 -1
- package/dist/types/components/PropertyValuePair/PropertyValueList.d.ts +1 -1
- package/dist/types/components/RadioButton/RadioButton.d.ts +8 -2
- package/dist/types/components/Select/Select.d.ts +2 -1
- package/dist/types/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/components/Structure/TitleSubsection.d.ts +3 -6
- package/dist/types/components/SuggestField/index.d.ts +2 -2
- package/dist/types/components/Table/TableContainer.d.ts +3 -3
- package/dist/types/components/Tabs/Tab.d.ts +4 -10
- package/dist/types/components/Tabs/TabTitle.d.ts +1 -1
- package/dist/types/components/TextField/TextArea.d.ts +1 -1
- package/dist/types/components/Typography/InlineText.d.ts +13 -0
- package/dist/types/components/Typography/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/extensions/codemirror/CodeMirror.d.ts +12 -9
- package/dist/types/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.d.ts +1 -1
- package/dist/types/extensions/codemirror/tests/codemirrorTestHelper.d.ts +1 -1
- package/dist/types/extensions/codemirror/toolbars/EditorAppearanceConfigMenu.d.ts +24 -0
- package/dist/types/extensions/codemirror/toolbars/markdown.toolbar.d.ts +2 -0
- package/dist/types/extensions/react-flow/edges/EdgeLabel.d.ts +3 -3
- package/dist/types/extensions/react-flow/edges/EdgeTools.d.ts +1 -1
- package/dist/types/extensions/react-flow/handles/HandleContent.d.ts +2 -2
- package/dist/types/extensions/react-flow/handles/HandleTools.d.ts +2 -2
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +3 -3
- package/dist/types/extensions/react-flow/nodes/NodeTools.d.ts +2 -2
- package/package.json +65 -61
- package/src/_shame.scss +1 -35
- package/src/cmem/ActivityControl/ActivityControlWidget.stories.tsx +3 -8
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +74 -41
- package/src/cmem/ActivityControl/ActivityExecutionErrorReportModal.tsx +6 -4
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +5 -5
- package/src/cmem/ContentBlobToggler/ContentBlobToggler.tsx +16 -6
- package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +72 -19
- package/src/cmem/ContentBlobToggler/stories/StringPreviewContentBlobToggler.stories.tsx +27 -0
- package/src/cmem/ContentBlobToggler/tests/StringPreviewContentBlobToggler.test.tsx +98 -0
- package/src/cmem/markdown/Markdown.stories.tsx +2 -2
- package/src/cmem/markdown/Markdown.tsx +2 -1
- package/src/cmem/markdown/markdown.scss +1 -1
- package/src/cmem/react-flow/ReactFlow/ReactFlowV12.tsx +1 -0
- package/src/cmem/react-flow/StickyNoteModal/StickyNoteModal.tsx +1 -1
- package/src/cmem/react-flow/configuration/graph.ts +2 -3
- package/src/cmem/react-flow/configuration/linking.ts +2 -3
- package/src/cmem/react-flow/configuration/workflow.ts +2 -3
- package/src/common/Intent/index.ts +2 -1
- package/src/common/index.ts +2 -1
- package/src/common/scss/_accessibility-defaults.scss +101 -0
- package/src/common/utils/CssCustomProperties.ts +5 -3
- package/src/common/utils/colorHash.ts +38 -20
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/Accordion/Stories/AccordionItem.stories.tsx +1 -1
- package/src/components/Application/ApplicationSidebarNavigation.tsx +5 -2
- package/src/components/Application/ApplicationTitle.tsx +7 -1
- package/src/components/Application/ApplicationViewability.tsx +61 -0
- package/src/components/Application/_colors.scss +15 -0
- package/src/components/Application/_content.scss +7 -0
- package/src/components/Application/_header.scss +45 -21
- package/src/components/Application/_sidebar.scss +6 -0
- package/src/components/Application/_toolbar.scss +3 -3
- package/src/components/Application/_viewability.scss +13 -0
- package/src/components/Application/application.scss +1 -0
- package/src/components/Application/index.ts +1 -0
- package/src/components/Application/stories/ApplicationViewability.stories.tsx +37 -0
- package/src/components/Application/stories/ColorPalettes.stories.tsx +4 -3
- package/src/components/Application/tests/ApplicationViewability.test.tsx +43 -0
- package/src/components/AutoSuggestion/AutoSuggestion.scss +3 -1
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +4 -4
- package/src/components/AutoSuggestion/AutoSuggestionList.tsx +1 -1
- package/src/components/AutoSuggestion/tests/ExtendedCodeEditor.test.tsx +1 -1
- package/src/components/AutocompleteField/AutoCompleteField.tsx +9 -18
- package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +1 -1
- package/src/components/Badge/Badge.stories.tsx +1 -1
- package/src/components/Badge/Badge.test.tsx +22 -0
- package/src/components/Breadcrumb/breadcrumb.scss +2 -2
- package/src/components/Button/Button.test.tsx +16 -2
- package/src/components/Button/Button.tsx +11 -6
- package/src/components/Button/button.scss +2 -0
- package/src/components/Card/CardHeader.tsx +1 -1
- package/src/components/Card/card.scss +6 -0
- package/src/components/Card/stories/Card.stories.tsx +1 -1
- package/src/components/Checkbox/Stories/Checkbox.stories.tsx +1 -1
- package/src/components/Checkbox/checkbox.scss +23 -3
- package/src/components/ColorField/ColorField.stories.tsx +72 -0
- package/src/components/ColorField/ColorField.test.tsx +101 -0
- package/src/components/ColorField/ColorField.tsx +200 -0
- package/src/components/ColorField/_colorfield.scss +67 -0
- package/src/components/ContentGroup/ContentGroup.stories.tsx +1 -1
- package/src/components/ContentGroup/ContentGroup.tsx +3 -3
- package/src/components/ContentGroup/_contentgroup.scss +9 -0
- package/src/components/ContextOverlay/ContextMenu.tsx +10 -4
- package/src/components/ContextOverlay/ContextOverlay.tsx +23 -4
- package/src/components/DecoupledOverlay/DecoupledOverlay.stories.tsx +30 -0
- package/src/components/DecoupledOverlay/DecoupledOverlay.tsx +100 -0
- package/src/components/DecoupledOverlay/_decoupledoverlay.scss +46 -0
- package/src/components/Depiction/Depiction.tsx +1 -1
- package/src/components/Depiction/depiction.scss +6 -0
- package/src/components/Dialog/SimpleDialog.tsx +1 -1
- package/src/components/Dialog/dialog.scss +10 -2
- package/src/components/Dialog/stories/Modal.stories.tsx +1 -1
- package/src/components/FlexibleLayout/flexiblelayout.scss +16 -0
- package/src/components/Form/FieldItem.tsx +1 -1
- package/src/components/Form/FieldSet.tsx +3 -3
- package/src/components/Form/Stories/FieldItem.stories.tsx +1 -1
- package/src/components/Form/Stories/FieldSet.stories.tsx +1 -1
- package/src/components/Form/form.scss +2 -2
- package/src/components/Grid/grid.scss +17 -0
- package/src/components/Grid/stories/Grid.stories.tsx +10 -7
- package/src/components/Grid/stories/GridColumn.stories.tsx +1 -1
- package/src/components/Grid/stories/GridRow.stories.tsx +14 -8
- package/src/components/HoverToggler/HoverToggler.tsx +2 -2
- package/src/components/Icon/IconButton.tsx +3 -3
- package/src/components/Icon/canonicalIconNames.tsx +11 -1
- package/src/components/Icon/stories/IconButton.stories.tsx +1 -1
- package/src/components/Icon/stories/TestIcon.stories.tsx +1 -1
- package/src/components/Icon/transformIcon.tsx +17 -0
- package/src/components/Label/Label.tsx +3 -3
- package/src/components/Link/Link.stories.tsx +30 -0
- package/src/components/Link/link.scss +33 -8
- package/src/components/Menu/MenuItem.tsx +1 -1
- package/src/components/Menu/Stories/MenuItem.stories.tsx +1 -1
- package/src/components/MultiSelect/MultiSelect.tsx +104 -32
- package/src/components/MultiSuggestField/MultiSuggestField.stories.tsx +40 -1
- package/src/components/MultiSuggestField/_multisuggestfield.scss +18 -0
- package/src/components/MultiSuggestField/tests/MultiSuggestField.test.tsx +89 -37
- package/src/components/NotAvailable/NotAvailable.stories.tsx +15 -0
- package/src/components/NotAvailable/NotAvailable.tsx +71 -0
- package/src/components/Notification/Notification.stories.tsx +2 -1
- package/src/components/Notification/Notification.tsx +3 -3
- package/src/components/Notification/notification.scss +6 -0
- package/src/components/OverviewItem/OverviewItemActions.tsx +1 -1
- package/src/components/OverviewItem/OverviewItemDepiction.tsx +1 -1
- package/src/components/OverviewItem/overviewitem.scss +9 -0
- package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +29 -1
- package/src/components/OverviewItem/stories/OverviewItemActions.stories.tsx +3 -3
- package/src/components/OverviewItem/stories/OverviewItemDepiction.stories.tsx +1 -1
- package/src/components/OverviewItem/stories/OverviewItemDescription.stories.tsx +2 -2
- package/src/components/OverviewItem/stories/OverviewItemLine.stories.tsx +1 -1
- package/src/components/Pagination/Stories/Pagination.stories.tsx +32 -0
- package/src/components/Pagination/pagination.scss +55 -5
- package/src/components/PropertyValuePair/PropertyValueList.tsx +1 -1
- package/src/components/PropertyValuePair/propertyvalue.scss +23 -1
- package/src/components/RadioButton/RadioButton.tsx +15 -3
- package/src/components/RadioButton/Stories/RadioButton.stories.tsx +1 -1
- package/src/components/RadioButton/radiobutton.scss +18 -1
- package/src/components/Select/Select.tsx +8 -6
- package/src/components/Separation/separation.scss +6 -0
- package/src/components/Skeleton/Skeleton.tsx +2 -2
- package/src/components/Structure/TitleSubsection.tsx +1 -1
- package/src/components/Table/Table.tsx +1 -1
- package/src/components/Table/TableContainer.tsx +4 -4
- package/src/components/Table/TableExpandRow.tsx +1 -1
- package/src/components/Table/table.scss +22 -0
- package/src/components/Tabs/TabTitle.tsx +1 -1
- package/src/components/Tabs/stories/TabTitle.stories.tsx +7 -2
- package/src/components/Tabs/tabs.scss +2 -2
- package/src/components/Tag/stories/Tag.stories.tsx +1 -1
- package/src/components/Tag/stories/TagList.stories.tsx +3 -3
- package/src/components/Tag/tag.scss +19 -9
- package/src/components/TextField/TextArea.tsx +1 -1
- package/src/components/TextField/stories/TextArea.stories.tsx +1 -1
- package/src/components/TextField/stories/TextField.stories.tsx +24 -3
- package/src/components/TextField/tests/useTextValidation.test.tsx +83 -0
- package/src/components/TextField/textfield.scss +20 -0
- package/src/components/TextField/useTextValidation.ts +17 -8
- package/src/components/TextReducer/TextReducer.stories.tsx +4 -1
- package/src/components/TextReducer/TextReducer.test.tsx +3 -3
- package/src/components/Toolbar/toolbar.scss +1 -2
- package/src/components/Tooltip/Tooltip.test.tsx +40 -5
- package/src/components/Tooltip/Tooltip.tsx +15 -11
- package/src/components/Typography/InlineText.tsx +24 -0
- package/src/components/Typography/_reset.scss +2 -0
- package/src/components/Typography/index.ts +1 -0
- package/src/components/Typography/stories/InlineText.stories.tsx +27 -0
- package/src/components/Typography/typography.scss +37 -3
- package/src/components/VisualTour/VisualTour.tsx +35 -55
- package/src/components/VisualTour/visualTour.scss +0 -34
- package/src/components/index.scss +2 -0
- package/src/components/index.ts +3 -0
- package/src/configuration/_customproperties.scss +32 -0
- package/src/configuration/stories/customproperties.stories.tsx +122 -0
- package/src/extensions/codemirror/CodeMirror.stories.tsx +9 -4
- package/src/extensions/codemirror/CodeMirror.tsx +93 -37
- package/src/extensions/codemirror/_codemirror.scss +18 -28
- package/src/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.ts +1 -2
- package/src/extensions/codemirror/tests/CodeEditor.test.tsx +138 -0
- package/src/extensions/codemirror/tests/EditorAppearanceConfigMenu.test.tsx +131 -0
- package/src/extensions/codemirror/tests/codemirrorTestHelper.ts +3 -3
- package/src/extensions/codemirror/toolbars/EditorAppearanceConfigMenu.tsx +59 -0
- package/src/extensions/codemirror/toolbars/markdown.toolbar.tsx +17 -3
- package/src/extensions/react-flow/_config.scss +3 -3
- package/src/extensions/react-flow/_react-flow_v12.scss +1 -1
- package/src/extensions/react-flow/edges/EdgeLabel.tsx +15 -11
- package/src/extensions/react-flow/edges/EdgeNew.tsx +6 -6
- package/src/extensions/react-flow/edges/EdgeTools.tsx +5 -6
- package/src/extensions/react-flow/edges/_edges.scss +3 -2
- package/src/extensions/react-flow/edges/stories/EdgeLabel.stories.tsx +2 -1
- package/src/extensions/react-flow/handles/HandleContent.tsx +4 -4
- package/src/extensions/react-flow/handles/HandleDefault.tsx +3 -3
- package/src/extensions/react-flow/handles/HandleTools.tsx +3 -3
- package/src/extensions/react-flow/handles/_handles.scss +3 -3
- package/src/extensions/react-flow/markers/ReactFlowMarkers.tsx +1 -1
- package/src/extensions/react-flow/minimap/MiniMap.tsx +2 -1
- package/src/extensions/react-flow/minimap/MiniMapV12.tsx +1 -1
- package/src/extensions/react-flow/nodes/NodeContent.tsx +20 -19
- package/src/extensions/react-flow/nodes/NodeDefault.tsx +1 -1
- package/src/extensions/react-flow/nodes/NodeDefaultV12.tsx +1 -2
- package/src/extensions/react-flow/nodes/NodeTools.tsx +8 -8
- package/src/extensions/react-flow/nodes/_nodes.scss +4 -3
- package/src/extensions/react-flow/nodes/nodeUtils.tsx +1 -0
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +3 -1
- package/src/includes/carbon-components/_requisits.scss +3 -1
- package/src/index.scss +2 -0
- package/src/test/setupTests.js +1 -1
|
@@ -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
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { render } from "react-dom";
|
|
3
2
|
import { loremIpsum } from "react-lorem-ipsum";
|
|
4
3
|
import { Meta, StoryFn } from "@storybook/react";
|
|
5
4
|
import Color from "color";
|
|
5
|
+
import { createRoot } from 'react-dom/client';
|
|
6
6
|
|
|
7
7
|
import CssCustomProperties from "./../../../common/utils/CssCustomProperties";
|
|
8
8
|
import {
|
|
@@ -194,10 +194,11 @@ const ColorPaletteConfigurator = ({
|
|
|
194
194
|
}, 0 as number);
|
|
195
195
|
const warningsTarget = document.getElementById("sumWarnings");
|
|
196
196
|
if (warningsTarget) {
|
|
197
|
+
const warningsRoot = createRoot(warningsTarget)
|
|
197
198
|
if (warnings > 0) {
|
|
198
|
-
render(<Badge intent={"warning"}>{warnings}</Badge
|
|
199
|
+
warningsRoot.render(<Badge intent={"warning"}>{warnings}</Badge>);
|
|
199
200
|
} else {
|
|
200
|
-
render(
|
|
201
|
+
warningsRoot.render(<></>);
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
204
|
}
|
|
@@ -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
|
+
});
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
&:has(.cm-editor.cm-focused) {
|
|
42
|
-
|
|
42
|
+
--#{$eccgui}-a11y-outline-color: #{$eccgui-color-accent};
|
|
43
|
+
|
|
44
|
+
@extend .#{$eccgui}-a11y-focus-by-keyboard-static;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
.cm-editor {
|
|
@@ -124,10 +124,10 @@ export interface CodeAutocompleteFieldProps {
|
|
|
124
124
|
*/
|
|
125
125
|
useTabForCompletions?: boolean;
|
|
126
126
|
/** An additional element that is put to the left side of the input field */
|
|
127
|
-
leftElement?: JSX.Element | null;
|
|
127
|
+
leftElement?: React.JSX.Element | null;
|
|
128
128
|
/** An additional element that is put to the right side of the input field
|
|
129
129
|
*/
|
|
130
|
-
rightElement?: JSX.Element | null;
|
|
130
|
+
rightElement?: React.JSX.Element | null;
|
|
131
131
|
/** Placeholder tobe shown when no text has been entered, yet. */
|
|
132
132
|
placeholder?: string;
|
|
133
133
|
/** If the horizontal scrollbars should be shown. */
|
|
@@ -214,7 +214,7 @@ export const CodeAutocompleteField = ({
|
|
|
214
214
|
CodeAutocompleteFieldSuggestionWithReplacementInfo | undefined
|
|
215
215
|
>(undefined);
|
|
216
216
|
const [cm, setCM] = React.useState<EditorView>();
|
|
217
|
-
const currentCm = React.useRef<EditorView>();
|
|
217
|
+
const currentCm = React.useRef<EditorView>(undefined);
|
|
218
218
|
currentCm.current = cm;
|
|
219
219
|
const isFocused = React.useRef(false);
|
|
220
220
|
const autoSuggestionDivRef = React.useRef<HTMLDivElement>(null);
|
|
@@ -361,7 +361,7 @@ export const CodeAutocompleteField = ({
|
|
|
361
361
|
return { fromOffset, toOffset };
|
|
362
362
|
};
|
|
363
363
|
|
|
364
|
-
const inputActionsDisplayed = React.useCallback((node) => {
|
|
364
|
+
const inputActionsDisplayed = React.useCallback((node:any) => {
|
|
365
365
|
if (!node) return;
|
|
366
366
|
const width = node.offsetWidth;
|
|
367
367
|
const slCodeEditor = node.parentElement.getElementsByClassName(`${eccgui}-singlelinecodeeditor`);
|
|
@@ -88,7 +88,7 @@ export const AutoSuggestionList = ({
|
|
|
88
88
|
}: AutoSuggestionListProps) => {
|
|
89
89
|
const [hoveredItem, setHoveredItem] = React.useState<CodeAutocompleteFieldSuggestionWithReplacementInfo | undefined>(undefined);
|
|
90
90
|
// Refs of list items
|
|
91
|
-
const [refs] = React.useState<React.RefObject<Element>[]>([]);
|
|
91
|
+
const [refs] = React.useState<React.RefObject<Element | null>[]>([]);
|
|
92
92
|
const dropdownRef = React.useRef<HTMLDivElement>(null);
|
|
93
93
|
const generateRef = (index: number) => {
|
|
94
94
|
if (!refs[index]) {
|
|
@@ -64,7 +64,7 @@ export interface SuggestFieldProps<T, UPDATE_VALUE> {
|
|
|
64
64
|
query: string,
|
|
65
65
|
modifiers: SuggestFieldItemRendererModifierProps,
|
|
66
66
|
handleClick: () => any
|
|
67
|
-
): string | JSX.Element;
|
|
67
|
+
): string | React.JSX.Element;
|
|
68
68
|
|
|
69
69
|
/** Renders the string that should be displayed in the input field after the item has been selected.
|
|
70
70
|
*/
|
|
@@ -122,7 +122,7 @@ export interface SuggestFieldProps<T, UPDATE_VALUE> {
|
|
|
122
122
|
query: string,
|
|
123
123
|
modifiers: SuggestFieldItemRendererModifierProps,
|
|
124
124
|
handleClick: React.MouseEventHandler<HTMLElement>
|
|
125
|
-
) => JSX.Element | undefined;
|
|
125
|
+
) => React.JSX.Element | undefined;
|
|
126
126
|
|
|
127
127
|
/** If the new item option will always be shown as the first entry in the suggestion list, else it will be the last entry.
|
|
128
128
|
* @default false
|
|
@@ -160,19 +160,10 @@ export interface SuggestFieldProps<T, UPDATE_VALUE> {
|
|
|
160
160
|
loadMoreResults?: () => Promise<T[] | undefined>;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
SuggestField.defaultProps = {
|
|
164
|
-
autoFocus: false,
|
|
165
|
-
disabled: false,
|
|
166
|
-
onlyDropdownWithQuery: false, // FIXME: this should be `true` by default, otherwise similarity to `<Select />` is very close
|
|
167
|
-
fill: true,
|
|
168
|
-
requestErrorPrefix: "",
|
|
169
|
-
hasBackDrop: false,
|
|
170
|
-
};
|
|
171
|
-
|
|
172
163
|
/**
|
|
173
164
|
* A component with the appearance of an input field that allows to select and optionally create new items.
|
|
174
165
|
* It shows suggestions for the entered text from which the user can select any option.
|
|
175
|
-
*
|
|
166
|
+
*
|
|
176
167
|
* It has the following fixed behavior:
|
|
177
168
|
*
|
|
178
169
|
* - When not focused, a different representation of the item value can be shown, e.g. the label of the value.
|
|
@@ -187,21 +178,21 @@ export function SuggestField<T, UPDATE_VALUE>(props: SuggestFieldProps<T, UPDATE
|
|
|
187
178
|
className,
|
|
188
179
|
reset,
|
|
189
180
|
noResultText,
|
|
190
|
-
disabled,
|
|
191
|
-
onlyDropdownWithQuery,
|
|
181
|
+
disabled = false,
|
|
182
|
+
onlyDropdownWithQuery = false, // FIXME: this should be `true` by default, otherwise similarity to `<Select />` is very close
|
|
192
183
|
itemValueSelector,
|
|
193
184
|
itemRenderer,
|
|
194
185
|
onSearch,
|
|
195
186
|
onChange,
|
|
196
187
|
initialValue,
|
|
197
|
-
autoFocus,
|
|
188
|
+
autoFocus = false,
|
|
198
189
|
createNewItem,
|
|
199
190
|
itemValueRenderer,
|
|
200
191
|
resetQueryToValue,
|
|
201
192
|
itemValueString,
|
|
202
|
-
requestErrorPrefix,
|
|
203
|
-
hasBackDrop,
|
|
204
|
-
fill,
|
|
193
|
+
requestErrorPrefix = "",
|
|
194
|
+
hasBackDrop = false,
|
|
195
|
+
fill = true,
|
|
205
196
|
loadMoreResults,
|
|
206
197
|
...otherProps
|
|
207
198
|
} = props;
|
|
@@ -14,7 +14,7 @@ import { SuggestFieldItemRendererModifierProps } from "./interfaces";
|
|
|
14
14
|
* @param iconName Optional icon to show left to the text.
|
|
15
15
|
*/
|
|
16
16
|
export const createNewItemRendererFactory = (
|
|
17
|
-
itemTextRenderer: (query: string) => string | JSX.Element,
|
|
17
|
+
itemTextRenderer: (query: string) => string | React.JSX.Element,
|
|
18
18
|
iconName?: ValidIconName | React.ReactElement<TestIconProps>
|
|
19
19
|
) => {
|
|
20
20
|
// Return custom render function
|
|
@@ -3,7 +3,7 @@ import { LogoReact } from "@carbon/icons-react";
|
|
|
3
3
|
import { Meta, StoryFn } from "@storybook/react";
|
|
4
4
|
|
|
5
5
|
import { helpersArgTypes } from "../../../.storybook/helpers";
|
|
6
|
-
import { Badge, Icon, TestIcon } from "
|
|
6
|
+
import { Badge, Icon, TestIcon } from "../../components";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
title: "Components/Badge",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@testing-library/react";
|
|
3
|
+
|
|
4
|
+
import "@testing-library/jest-dom";
|
|
5
|
+
|
|
6
|
+
import { Badge } from "../../../index";
|
|
7
|
+
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
8
|
+
|
|
9
|
+
describe("Badge", () => {
|
|
10
|
+
it("should shorten a number badge exceeding maxLength to a 9+ notation", () => {
|
|
11
|
+
const { container } = render(<Badge maxLength={2}>{42}</Badge>);
|
|
12
|
+
const badge = container.querySelector(`.${eccgui}-badge__tag`);
|
|
13
|
+
expect(badge).not.toBeNull();
|
|
14
|
+
expect(badge).toHaveTextContent("9+");
|
|
15
|
+
});
|
|
16
|
+
it("should apply maxWidth style to a string badge when maxLength is set", () => {
|
|
17
|
+
const { container } = render(<Badge maxLength={4}>forty two</Badge>);
|
|
18
|
+
const tag = container.querySelector(`.${eccgui}-badge__tag`);
|
|
19
|
+
expect(tag).not.toBeNull();
|
|
20
|
+
expect((tag as HTMLElement).style.maxWidth).toBe("calc((3em + 3ch)/2)");
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -19,8 +19,8 @@ $eccgui-color-breadcrumb-link: $eccgui-color-accent !default;
|
|
|
19
19
|
width: $eccgui-size-block-whitespace;
|
|
20
20
|
height: auto;
|
|
21
21
|
margin: 0;
|
|
22
|
-
text-align: center;
|
|
23
22
|
vertical-align: middle;
|
|
23
|
+
text-align: center;
|
|
24
24
|
content: ">";
|
|
25
25
|
background: none;
|
|
26
26
|
}
|
|
@@ -61,8 +61,8 @@ $eccgui-color-breadcrumb-link: $eccgui-color-accent !default;
|
|
|
61
61
|
.#{$eccgui}-breadcrumb__item {
|
|
62
62
|
display: inline-block;
|
|
63
63
|
overflow: hidden;
|
|
64
|
-
font-size: inherit;
|
|
65
64
|
text-overflow: ellipsis;
|
|
65
|
+
font-size: inherit;
|
|
66
66
|
|
|
67
67
|
a {
|
|
68
68
|
@extend .#{$eccgui}-breadcrumb__item;
|
|
@@ -3,6 +3,7 @@ import { render, screen } from "@testing-library/react";
|
|
|
3
3
|
|
|
4
4
|
import "@testing-library/jest-dom";
|
|
5
5
|
|
|
6
|
+
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
6
7
|
import Icon from "../Icon/Icon";
|
|
7
8
|
|
|
8
9
|
import Button from "./Button";
|
|
@@ -21,7 +22,7 @@ describe("Button", () => {
|
|
|
21
22
|
</Button>
|
|
22
23
|
);
|
|
23
24
|
expect(screen.getByRole("button").lastChild).toEqual(screen.getByText(/left icon/i));
|
|
24
|
-
expect(container.getElementsByClassName(
|
|
25
|
+
expect(container.getElementsByClassName(`${eccgui}-icon`).length).toBe(1);
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
it("should have icon at the right after the text", () => {
|
|
@@ -31,6 +32,19 @@ describe("Button", () => {
|
|
|
31
32
|
</Button>
|
|
32
33
|
);
|
|
33
34
|
expect(screen.getByRole("button").firstChild).toEqual(screen.getByText(/right icon/i));
|
|
34
|
-
expect(container.getElementsByClassName(
|
|
35
|
+
expect(container.getElementsByClassName(`${eccgui}-icon`).length).toBe(1);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("should render badge markup with correct content when used on an icon button", () => {
|
|
39
|
+
const { container } = render(<Button name="item-info" badge={"badge content"} text={"Cation label"} />);
|
|
40
|
+
const badge = container.querySelector(`.${eccgui}-badge`);
|
|
41
|
+
expect(badge).not.toBeNull();
|
|
42
|
+
expect(badge).toHaveTextContent("badge content");
|
|
43
|
+
});
|
|
44
|
+
it("should render badge markup with correct content when batch displays a 0 (zero) number on an icon button", () => {
|
|
45
|
+
const { container } = render(<Button name="item-info" badge={0} text={"Cation label"} />);
|
|
46
|
+
const badge = container.querySelector(`.${eccgui}-badge`);
|
|
47
|
+
expect(badge).not.toBeNull();
|
|
48
|
+
expect(badge).toHaveTextContent("0");
|
|
35
49
|
});
|
|
36
50
|
});
|
|
@@ -47,7 +47,7 @@ interface AdditionalButtonProps {
|
|
|
47
47
|
/**
|
|
48
48
|
* takes in either a string of text or a react element to display as a tooltip when the button is hovered.
|
|
49
49
|
*/
|
|
50
|
-
tooltip?: string | JSX.Element | null;
|
|
50
|
+
tooltip?: string | React.JSX.Element | null;
|
|
51
51
|
/**
|
|
52
52
|
* Object with additional properties for the tooltip.
|
|
53
53
|
*/
|
|
@@ -55,11 +55,11 @@ interface AdditionalButtonProps {
|
|
|
55
55
|
/**
|
|
56
56
|
* Icon displayed on button start.
|
|
57
57
|
*/
|
|
58
|
-
icon?: ValidIconName | JSX.Element;
|
|
58
|
+
icon?: ValidIconName | React.JSX.Element;
|
|
59
59
|
/**
|
|
60
60
|
* Icon displayed on button end.
|
|
61
61
|
*/
|
|
62
|
-
rightIcon?: ValidIconName | JSX.Element;
|
|
62
|
+
rightIcon?: ValidIconName | React.JSX.Element;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
interface ExtendedButtonProps
|
|
@@ -104,16 +104,21 @@ export const Button = ({
|
|
|
104
104
|
|
|
105
105
|
const ButtonType = restProps.href ? BlueprintAnchorButton : BlueprintButton;
|
|
106
106
|
|
|
107
|
+
const iconSize = {
|
|
108
|
+
small: restProps["size"] === "small",
|
|
109
|
+
large: restProps["size"] === "large",
|
|
110
|
+
};
|
|
111
|
+
|
|
107
112
|
const button = (
|
|
108
113
|
<ButtonType
|
|
109
114
|
{...restProps}
|
|
110
115
|
className={`${eccgui}-button ` + className}
|
|
111
116
|
intent={(intent || intentByFunction) as BlueprintIntent}
|
|
112
|
-
icon={typeof icon === "string" ? <Icon name={icon} /> : icon}
|
|
113
|
-
rightIcon={typeof rightIcon === "string" ? <Icon name={rightIcon} /> : rightIcon}
|
|
117
|
+
icon={typeof icon === "string" ? <Icon name={icon} {...iconSize} /> : icon}
|
|
118
|
+
rightIcon={typeof rightIcon === "string" ? <Icon name={rightIcon} {...iconSize} /> : rightIcon}
|
|
114
119
|
>
|
|
115
120
|
{children}
|
|
116
|
-
{badge && (
|
|
121
|
+
{typeof badge !== "undefined" && (
|
|
117
122
|
<Badge
|
|
118
123
|
children={badge}
|
|
119
124
|
{...constructBadgeProperties({
|
|
@@ -166,7 +166,9 @@ $button-intents: (
|
|
|
166
166
|
// special case override: blueprint do not use configured colors here
|
|
167
167
|
@include eccgui-enhance-blueprint-button-intent("primary");
|
|
168
168
|
@include eccgui-enhance-blueprint-button-intent("accent");
|
|
169
|
+
@include eccgui-enhance-blueprint-button-intent("success");
|
|
169
170
|
@include eccgui-enhance-blueprint-button-intent("warning");
|
|
171
|
+
@include eccgui-enhance-blueprint-button-intent("danger");
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
.#{$ns}-button-text {
|
|
@@ -8,7 +8,7 @@ import CardOptions from "./CardOptions";
|
|
|
8
8
|
import CardTitle from "./CardTitle";
|
|
9
9
|
|
|
10
10
|
export interface CardHeaderProps extends Omit<OverviewItemProps, "densityHigh" | "hasSpacing"> {
|
|
11
|
-
children: JSX.Element | (JSX.Element | undefined | null)[] | null | undefined;
|
|
11
|
+
children: React.JSX.Element | (React.JSX.Element | undefined | null)[] | null | undefined;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export const CardHeader = ({ children, className = "", ...otherProps }: CardHeaderProps) => {
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { Meta, StoryFn } from "@storybook/react";
|
|
3
3
|
|
|
4
4
|
import { helpersArgTypes } from "../../../../.storybook/helpers";
|
|
5
|
-
import { Card, CardActions, CardContent, CardHeader, CardOptions, CardTitle, Divider } from "
|
|
5
|
+
import { Card, CardActions, CardContent, CardHeader, CardOptions, CardTitle, Divider } from "../../../components";
|
|
6
6
|
|
|
7
7
|
import { Default as CardActionsExample } from "./CardActions.stories";
|
|
8
8
|
import { Default as CardContentExample } from "./CardContent.stories";
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { LoremIpsum } from "react-lorem-ipsum";
|
|
3
3
|
import { Meta, StoryFn } from "@storybook/react";
|
|
4
4
|
|
|
5
|
-
import { Checkbox, HtmlContentBlock } from "
|
|
5
|
+
import { Checkbox, HtmlContentBlock } from "../../../components";
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
title: "Forms/Checkbox",
|
|
@@ -24,9 +24,15 @@ $control-indicator-spacing: $eccgui-size-inline-whitespace !default;
|
|
|
24
24
|
// $switch-background-color-active: rgba($gray1, 0.5) !default;
|
|
25
25
|
// $switch-background-color-disabled: $button-background-color-disabled !default;
|
|
26
26
|
$switch-checked-background-color: $eccgui-color-accent !default;
|
|
27
|
-
$switch-checked-background-color-hover: eccgui-color-rgba(
|
|
27
|
+
$switch-checked-background-color-hover: eccgui-color-rgba(
|
|
28
|
+
$switch-checked-background-color,
|
|
29
|
+
$eccgui-opacity-narrow
|
|
30
|
+
) !default;
|
|
28
31
|
$switch-checked-background-color-active: $switch-checked-background-color-hover !default;
|
|
29
|
-
$switch-checked-background-color-disabled: eccgui-color-rgba(
|
|
32
|
+
$switch-checked-background-color-disabled: eccgui-color-rgba(
|
|
33
|
+
$switch-checked-background-color,
|
|
34
|
+
$eccgui-opacity-disabled
|
|
35
|
+
) !default;
|
|
30
36
|
|
|
31
37
|
@import "~@blueprintjs/core/src/components/forms/controls"; // Checkbox, Radio, Switch
|
|
32
38
|
|
|
@@ -41,7 +47,7 @@ $switch-checked-background-color-disabled: eccgui-color-rgba($switch-checked-bac
|
|
|
41
47
|
}
|
|
42
48
|
|
|
43
49
|
input:focus ~ .#{$ns}-control-indicator {
|
|
44
|
-
|
|
50
|
+
@extend .#{$eccgui}-a11y-focus-by-keyboard-static;
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
input:disabled ~ .#{$ns}-control-indicator,
|
|
@@ -66,6 +72,14 @@ $switch-checked-background-color-disabled: eccgui-color-rgba($switch-checked-bac
|
|
|
66
72
|
background-image: url("~@carbon/icons/svg/32/checkbox--indeterminate.svg");
|
|
67
73
|
}
|
|
68
74
|
}
|
|
75
|
+
|
|
76
|
+
&.#{$ns}-switch {
|
|
77
|
+
--#{$eccgui}-a11y-outline-offset: 1px;
|
|
78
|
+
|
|
79
|
+
input:focus ~ .#{$ns}-control-indicator {
|
|
80
|
+
@extend .#{$eccgui}-a11y-focus-by-keyboard-static;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
.#{$ns}-control-indicator + *,
|
|
@@ -73,3 +87,9 @@ $switch-checked-background-color-disabled: eccgui-color-rgba($switch-checked-bac
|
|
|
73
87
|
display: inline-block;
|
|
74
88
|
vertical-align: text-top;
|
|
75
89
|
}
|
|
90
|
+
|
|
91
|
+
@media print {
|
|
92
|
+
.#{$ns}-control {
|
|
93
|
+
print-color-adjust: exact;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import { getEnabledColorsProps } from "../../common/utils/colorHash";
|
|
5
|
+
import textFieldTest from "../TextField/stories/TextField.stories";
|
|
6
|
+
|
|
7
|
+
import { ColorField, ColorFieldProps } from "./ColorField";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: "Forms/ColorField",
|
|
11
|
+
component: ColorField,
|
|
12
|
+
argTypes: {
|
|
13
|
+
...textFieldTest.argTypes,
|
|
14
|
+
},
|
|
15
|
+
} as Meta<typeof ColorField>;
|
|
16
|
+
|
|
17
|
+
const Template: StoryFn<typeof ColorField> = (args) => <ColorField {...args}></ColorField>;
|
|
18
|
+
|
|
19
|
+
export const Default = Template.bind({});
|
|
20
|
+
Default.args = {
|
|
21
|
+
onChange: (e) => {
|
|
22
|
+
alert(e.target.value);
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const NoPalettePresets = Template.bind({});
|
|
27
|
+
NoPalettePresets.args = {
|
|
28
|
+
...Default.args,
|
|
29
|
+
allowCustomColor: true,
|
|
30
|
+
colorPresets: [],
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type TemplateColorHashProps = { stringForColorHashValue: string } & Pick<
|
|
34
|
+
ColorFieldProps,
|
|
35
|
+
"onChange" | "allowCustomColor"
|
|
36
|
+
> &
|
|
37
|
+
Pick<getEnabledColorsProps, "includeColorWeight" | "includePaletteGroup">;
|
|
38
|
+
|
|
39
|
+
const TemplateColorHash: StoryFn<TemplateColorHashProps> = (args: TemplateColorHashProps) => (
|
|
40
|
+
<ColorField
|
|
41
|
+
allowCustomColor={args.allowCustomColor}
|
|
42
|
+
colorPresets={ColorField.listColorPalettePresets({
|
|
43
|
+
includeColorWeight: args.includeColorWeight,
|
|
44
|
+
includePaletteGroup: args.includePaletteGroup,
|
|
45
|
+
})}
|
|
46
|
+
value={ColorField.calculateColorHashValue(args.stringForColorHashValue, {
|
|
47
|
+
allowCustomColor: args.allowCustomColor,
|
|
48
|
+
includeColorWeight: args.includeColorWeight,
|
|
49
|
+
includePaletteGroup: args.includePaletteGroup,
|
|
50
|
+
})}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Component provides a helper function to calculate a color hash from a text,
|
|
56
|
+
* that can be used as `value` or `defaultValue`.
|
|
57
|
+
*
|
|
58
|
+
* ```
|
|
59
|
+
* <ColorField value={ColorField.calculateColorHashValue("MyText")} />
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* You can add `options` to set the config for the color palette filters.
|
|
63
|
+
* The same default values like on `ColorField` are used for them.
|
|
64
|
+
*/
|
|
65
|
+
export const ColorHashValue = TemplateColorHash.bind({});
|
|
66
|
+
ColorHashValue.args = {
|
|
67
|
+
...Default.args,
|
|
68
|
+
allowCustomColor: true,
|
|
69
|
+
includeColorWeight: [300, 500, 700],
|
|
70
|
+
includePaletteGroup: ["layout", "extra"],
|
|
71
|
+
stringForColorHashValue: "My text that will used to create a color hash as initial value.",
|
|
72
|
+
};
|