@eccenca/gui-elements 23.0.0-rc.1 → 23.0.0-rc.3
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 +41 -0
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +4 -10
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/index.js +3 -1
- package/dist/cjs/cmem/index.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js +2 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +64 -0
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/graph.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/linking.js +2 -0
- package/dist/cjs/cmem/react-flow/configuration/linking.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/typing.js +35 -0
- package/dist/cjs/cmem/react-flow/configuration/typing.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/workflow.js +2 -0
- package/dist/cjs/cmem/react-flow/configuration/workflow.js.map +1 -1
- package/dist/cjs/cmem/react-flow/nodes/StickyNoteNode.js +42 -0
- package/dist/cjs/cmem/react-flow/nodes/StickyNoteNode.js.map +1 -0
- package/dist/cjs/common/utils/CssCustomProperties.js +114 -0
- package/dist/cjs/common/utils/CssCustomProperties.js.map +1 -0
- package/dist/cjs/common/utils/getColorConfiguration.js +21 -0
- package/dist/cjs/common/utils/getColorConfiguration.js.map +1 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +19 -19
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js +4 -12
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +15 -6
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/Breadcrumb/BreadcrumbItem.js +13 -4
- package/dist/cjs/components/Breadcrumb/BreadcrumbItem.js.map +1 -1
- package/dist/cjs/components/Breadcrumb/BreadcrumbList.js +11 -4
- package/dist/cjs/components/Breadcrumb/BreadcrumbList.js.map +1 -1
- package/dist/cjs/components/Button/Button.js +2 -2
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/ContextOverlay/ContextMenu.js +6 -5
- package/dist/cjs/components/ContextOverlay/ContextMenu.js.map +1 -1
- package/dist/cjs/components/ContextOverlay/ContextOverlay.js +6 -8
- package/dist/cjs/components/ContextOverlay/ContextOverlay.js.map +1 -1
- package/dist/cjs/components/Form/FieldItem.js +2 -2
- package/dist/cjs/components/Form/FieldItem.js.map +1 -1
- package/dist/cjs/components/Icon/Icon.js +2 -2
- package/dist/cjs/components/Icon/Icon.js.map +1 -1
- 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 +124 -114
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Label/Label.js +6 -6
- package/dist/cjs/components/Label/Label.js.map +1 -1
- package/dist/cjs/components/Menu/MenuItem.js +2 -5
- package/dist/cjs/components/Menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +8 -10
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/Select/Select.js +29 -0
- package/dist/cjs/components/Select/Select.js.map +1 -0
- package/dist/cjs/components/Tabs/TabTitle.js +2 -4
- package/dist/cjs/components/Tabs/TabTitle.js.map +1 -1
- package/dist/cjs/components/Tag/Tag.js +2 -1
- package/dist/cjs/components/Tag/Tag.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.js +7 -4
- package/dist/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +3 -3
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeTools.js +2 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeTools.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleContent.js +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/index.js +6 -1
- package/dist/cjs/extensions/react-flow/index.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +3 -2
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/utils.js +12 -6
- package/dist/cjs/extensions/react-flow/minimap/utils.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +74 -25
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js +10 -6
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeTools.js +1 -3
- package/dist/cjs/extensions/react-flow/nodes/NodeTools.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js +49 -0
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js.map +1 -0
- package/dist/cjs/index.js +3 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js +1 -1
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/legacy-replacements/TextField/TextField.js +5 -8
- package/dist/cjs/legacy-replacements/TextField/TextField.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js +4 -10
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/esm/cmem/index.js +1 -0
- package/dist/esm/cmem/index.js.map +1 -1
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js +2 -1
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +89 -0
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -0
- package/dist/esm/cmem/react-flow/configuration/graph.js +1 -1
- package/dist/esm/cmem/react-flow/configuration/graph.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/linking.js +3 -1
- package/dist/esm/cmem/react-flow/configuration/linking.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/typing.js +32 -0
- package/dist/esm/cmem/react-flow/configuration/typing.js.map +1 -0
- package/dist/esm/cmem/react-flow/configuration/workflow.js +3 -1
- package/dist/esm/cmem/react-flow/configuration/workflow.js.map +1 -1
- package/dist/esm/cmem/react-flow/nodes/StickyNoteNode.js +31 -0
- package/dist/esm/cmem/react-flow/nodes/StickyNoteNode.js.map +1 -0
- package/dist/esm/common/utils/CssCustomProperties.js +154 -0
- package/dist/esm/common/utils/CssCustomProperties.js.map +1 -0
- package/dist/esm/common/utils/getColorConfiguration.js +16 -0
- package/dist/esm/common/utils/getColorConfiguration.js.map +1 -0
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js +23 -21
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js +4 -12
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js +32 -23
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/esm/components/Breadcrumb/BreadcrumbItem.js +13 -4
- package/dist/esm/components/Breadcrumb/BreadcrumbItem.js.map +1 -1
- package/dist/esm/components/Breadcrumb/BreadcrumbList.js +11 -4
- package/dist/esm/components/Breadcrumb/BreadcrumbList.js.map +1 -1
- package/dist/esm/components/Button/Button.js +2 -2
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/ContextOverlay/ContextMenu.js +6 -5
- package/dist/esm/components/ContextOverlay/ContextMenu.js.map +1 -1
- package/dist/esm/components/ContextOverlay/ContextOverlay.js +6 -8
- package/dist/esm/components/ContextOverlay/ContextOverlay.js.map +1 -1
- package/dist/esm/components/Form/FieldItem.js +2 -2
- package/dist/esm/components/Form/FieldItem.js.map +1 -1
- package/dist/esm/components/Icon/Icon.js +2 -2
- package/dist/esm/components/Icon/Icon.js.map +1 -1
- 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 +124 -114
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Label/Label.js +6 -6
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js +2 -5
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/MultiSelect/MultiSelect.js +5 -7
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/Select/Select.js +35 -0
- package/dist/esm/components/Select/Select.js.map +1 -0
- package/dist/esm/components/Tabs/TabTitle.js +2 -4
- package/dist/esm/components/Tabs/TabTitle.js.map +1 -1
- package/dist/esm/components/Tag/Tag.js +2 -1
- package/dist/esm/components/Tag/Tag.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.js +7 -4
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +3 -3
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeTools.js +2 -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/index.js +1 -0
- package/dist/esm/extensions/react-flow/index.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js +3 -2
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/utils.js +10 -5
- package/dist/esm/extensions/react-flow/minimap/utils.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +76 -27
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContentExtension.js +26 -6
- package/dist/esm/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeTools.js +1 -3
- package/dist/esm/extensions/react-flow/nodes/NodeTools.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js +44 -0
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js.map +1 -0
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/legacy-replacements/Tabs/Tabs.js +1 -1
- package/dist/esm/legacy-replacements/Tabs/Tabs.js.map +1 -1
- package/dist/esm/legacy-replacements/TextField/TextField.js +2 -5
- package/dist/esm/legacy-replacements/TextField/TextField.js.map +1 -1
- package/dist/types/cmem/index.d.ts +1 -0
- package/dist/types/cmem/react-flow/StickyNoteModal/StickyNoteModal.d.ts +26 -0
- package/dist/types/cmem/react-flow/configuration/graph.d.ts +3 -8
- package/dist/types/cmem/react-flow/configuration/linking.d.ts +3 -9
- package/dist/types/cmem/react-flow/configuration/typing.d.ts +28 -0
- package/dist/types/cmem/react-flow/configuration/workflow.d.ts +3 -9
- package/dist/types/cmem/react-flow/nodes/StickyNoteNode.d.ts +3 -0
- package/dist/types/common/utils/CssCustomProperties.d.ts +28 -0
- package/dist/types/common/utils/getColorConfiguration.d.ts +8 -0
- package/dist/types/components/AutocompleteField/AutoCompleteField.d.ts +7 -4
- package/dist/types/components/Breadcrumb/BreadcrumbItem.d.ts +7 -3
- package/dist/types/components/Breadcrumb/BreadcrumbList.d.ts +20 -8
- package/dist/types/components/Button/Button.d.ts +2 -2
- package/dist/types/components/ContextOverlay/ContextMenu.d.ts +37 -3
- package/dist/types/components/ContextOverlay/ContextOverlay.d.ts +12 -1
- package/dist/types/components/Form/FieldItem.d.ts +3 -2
- package/dist/types/components/Icon/Icon.d.ts +32 -7
- package/dist/types/components/Icon/IconButton.d.ts +21 -7
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/Label/Label.d.ts +30 -2
- package/dist/types/components/Menu/MenuItem.d.ts +3 -7
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +13 -9
- package/dist/types/components/Select/Select.d.ts +22 -0
- package/dist/types/components/Tag/Tag.d.ts +5 -1
- package/dist/types/components/Tooltip/Tooltip.d.ts +13 -11
- package/dist/types/components/interfaces.d.ts +1 -0
- package/dist/types/extensions/codemirror/CodeMirror.d.ts +5 -1
- package/dist/types/extensions/react-flow/edges/EdgeTools.d.ts +2 -2
- package/dist/types/extensions/react-flow/index.d.ts +1 -0
- package/dist/types/extensions/react-flow/minimap/MiniMap.d.ts +1 -1
- package/dist/types/extensions/react-flow/minimap/utils.d.ts +1 -0
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +17 -1
- package/dist/types/extensions/react-flow/nodes/NodeContentExtension.d.ts +2 -2
- package/dist/types/extensions/react-flow/nodes/NodeTools.d.ts +2 -2
- package/dist/types/extensions/react-flow/nodes/nodeUtils.d.ts +14 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/legacy-replacements/Tabs/Tabs.d.ts +1 -1
- package/package.json +19 -15
- package/scripts/compile-sass.ts +9 -0
- package/scripts/fix-cjs-dist +5 -0
- package/scripts/fix-esm-dist +6 -0
- package/scripts/sassConfig.js +13 -0
- package/src/_shame.scss +17 -0
- package/src/cmem/ActivityControl/ActivityControlWidget.stories.tsx +2 -2
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +5 -10
- package/src/cmem/index.ts +1 -0
- package/src/cmem/markdown/markdown.scss +1 -1
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +48 -15
- package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +2 -0
- package/src/cmem/react-flow/StickyNoteModal/StickyNoteModal.tsx +134 -0
- package/src/cmem/react-flow/_index.scss +1 -1
- package/src/cmem/react-flow/_minimap.scss +6 -2
- package/src/cmem/react-flow/configuration/graph.ts +3 -5
- package/src/cmem/react-flow/configuration/linking.ts +5 -6
- package/src/cmem/react-flow/configuration/typing.ts +30 -0
- package/src/cmem/react-flow/configuration/workflow.ts +5 -5
- package/src/cmem/react-flow/nodes/StickyNoteNode.tsx +13 -0
- package/src/cmem/react-flow/{_nodes.scss → nodes/_colors.scss} +0 -0
- package/src/cmem/react-flow/nodes/_index.scss +2 -0
- package/src/cmem/react-flow/nodes/_stickynote.scss +72 -0
- package/src/common/utils/CssCustomProperties.ts +14 -12
- package/src/common/utils/getColorConfiguration.ts +1 -2
- package/src/components/Accordion/accordion.scss +11 -11
- package/src/components/Application/_header.scss +4 -3
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +23 -23
- package/src/components/AutoSuggestion/AutoSuggestionList.tsx +15 -17
- package/src/components/AutoSuggestion/tests/AutoSuggestionList.test.tsx +1 -1
- package/src/components/AutocompleteField/AutoCompleteField.tsx +44 -19
- package/src/components/AutocompleteField/autocompletefield.scss +5 -3
- package/src/components/AutocompleteField/stories/AutoCompleteField.stories.tsx +75 -0
- package/src/components/Breadcrumb/BreadcrumbItem.tsx +15 -6
- package/src/components/Breadcrumb/BreadcrumbList.tsx +36 -14
- package/src/components/Breadcrumb/breadcrumb.scss +24 -1
- package/src/components/Breadcrumb/stories/BreadcrumbItem.stories.tsx +19 -0
- package/src/components/Breadcrumb/stories/BreadcrumbList.stories.tsx +26 -0
- package/src/components/Button/Button.tsx +3 -3
- package/src/components/Button/button.scss +43 -6
- package/src/components/Card/card.scss +5 -5
- package/src/components/ContextOverlay/ContextMenu.stories.tsx +33 -0
- package/src/components/ContextOverlay/ContextMenu.tsx +46 -8
- package/src/components/ContextOverlay/ContextOverlay.stories.tsx +148 -0
- package/src/components/ContextOverlay/ContextOverlay.tsx +16 -9
- package/src/components/ContextOverlay/contextoverlay.scss +17 -5
- package/src/components/Dialog/dialog.scss +10 -8
- package/src/components/Form/FieldItem.tsx +4 -4
- package/src/components/Form/form.scss +6 -6
- package/src/components/Icon/Icon.tsx +33 -18
- package/src/components/Icon/IconButton.tsx +24 -19
- package/src/components/Icon/canonicalIconNames.tsx +134 -121
- package/src/components/Icon/icon.scss +1 -1
- package/src/components/Icon/stories/Icon.stories.tsx +52 -0
- package/src/components/Icon/stories/IconButton.stories.tsx +27 -0
- package/src/components/Label/Label.stories.tsx +27 -0
- package/src/components/Label/Label.tsx +47 -15
- package/src/components/Label/label.scss +2 -2
- package/src/components/Menu/MenuItem.tsx +9 -16
- package/src/components/Menu/menu.scss +10 -9
- package/src/components/MultiSelect/MultiSelect.tsx +30 -18
- package/src/components/Notification/notification.scss +3 -1
- package/src/components/OverviewItem/overviewitem.scss +8 -8
- package/src/components/PropertyValuePair/propertyvalue.scss +9 -7
- package/src/components/Select/Select.stories.tsx +35 -0
- package/src/components/Select/Select.tsx +38 -0
- package/src/components/Select/_select.scss +8 -0
- package/src/components/Separation/separation.scss +6 -6
- package/src/components/SimpleTable/simpletable.scss +5 -5
- package/src/components/Tabs/TabTitle.tsx +2 -4
- package/src/components/Tabs/tabs.scss +3 -3
- package/src/components/Tag/Tag.tsx +6 -0
- package/src/components/Tag/tag.scss +62 -33
- package/src/components/TextField/textfield.scss +6 -4
- package/src/components/Tooltip/Tooltip.stories.tsx +36 -0
- package/src/components/Tooltip/Tooltip.tsx +23 -18
- package/src/components/Tooltip/tooltip.scss +7 -7
- package/src/components/Typography/typography.scss +5 -4
- package/src/components/interfaces.ts +3 -1
- package/src/configuration/_variables.scss +11 -9
- package/src/extensions/codemirror/CodeMirror.tsx +9 -4
- package/src/extensions/react-flow/edges/EdgeTools.tsx +6 -4
- package/src/extensions/react-flow/edges/_edges.scss +3 -3
- package/src/extensions/react-flow/handles/HandleContent.tsx +0 -1
- package/src/extensions/react-flow/handles/_handles.scss +13 -13
- package/src/extensions/react-flow/index.ts +1 -0
- package/src/extensions/react-flow/minimap/MiniMap.tsx +16 -1
- package/src/extensions/react-flow/minimap/_minimap.scss +6 -6
- package/src/extensions/react-flow/minimap/utils.ts +8 -3
- package/src/extensions/react-flow/nodes/NodeContent.tsx +253 -166
- package/src/extensions/react-flow/nodes/NodeContentExtension.tsx +17 -11
- package/src/extensions/react-flow/nodes/NodeTools.tsx +10 -7
- package/src/extensions/react-flow/nodes/_nodes.scss +44 -12
- package/src/extensions/react-flow/nodes/nodeUtils.tsx +53 -0
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +41 -12
- package/src/extensions/react-flow/nodes/stories/NodeContentExtension.stories.tsx +39 -47
- package/src/includes/blueprintjs/_variables.scss +4 -2
- package/src/includes/carbon-components/_variables.scss +7 -5
- package/src/index.scss +9 -5
- package/src/index.ts +4 -2
- package/src/legacy-replacements/Tabs/Tabs.tsx +3 -1
- package/src/legacy-replacements/TextField/TextField.tsx +7 -5
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
import { LoremIpsum } from 'react-lorem-ipsum';
|
|
4
|
+
import {
|
|
5
|
+
PopoverPosition,
|
|
6
|
+
PopoverInteractionKind,
|
|
7
|
+
PopperModifiers,
|
|
8
|
+
} from "@blueprintjs/core";
|
|
9
|
+
import {
|
|
10
|
+
PlacementOptions
|
|
11
|
+
} from "@blueprintjs/popover2";
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
ContextOverlay,
|
|
15
|
+
HtmlContentBlock,
|
|
16
|
+
Button
|
|
17
|
+
} from "../../index";
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
title: "Components/ContextOverlay",
|
|
21
|
+
component: ContextOverlay,
|
|
22
|
+
argTypes: {
|
|
23
|
+
className: {
|
|
24
|
+
control: "string",
|
|
25
|
+
description: "A space-delimited list of class names to pass along to a child element."
|
|
26
|
+
},
|
|
27
|
+
defaultIsOpen: {
|
|
28
|
+
control: "boolean",
|
|
29
|
+
description: "Initial opened state when uncontrolled."
|
|
30
|
+
},
|
|
31
|
+
isOpen: {
|
|
32
|
+
control: "boolean",
|
|
33
|
+
description: "Whether the popover is visible. Passing this prop puts the popover in controlled mode, where the only way to change visibility is by updating this property."
|
|
34
|
+
},
|
|
35
|
+
interactionKind: {
|
|
36
|
+
control: "select",
|
|
37
|
+
options: {UNDEFINED: undefined, ...PopoverInteractionKind},
|
|
38
|
+
description: "The kind of interaction that triggers the display of the popover."
|
|
39
|
+
},
|
|
40
|
+
canEscapeKeyClose: {
|
|
41
|
+
control: "boolean",
|
|
42
|
+
description: "Whether pressing the esc key should invoke `onClose`."
|
|
43
|
+
},
|
|
44
|
+
onClose: {
|
|
45
|
+
control: "none",
|
|
46
|
+
description: "A callback that is invoked when user interaction causes the overlay to close, such as clicking on the overlay or pressing the esc key (if enabled).",
|
|
47
|
+
table: {
|
|
48
|
+
defaultValue: { summary: undefined },
|
|
49
|
+
type: { summary: "(event: SyntheticEvent<HTMLElement>) => void" },
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
onInteraction: {
|
|
53
|
+
control: "none",
|
|
54
|
+
description: "Callback invoked in controlled mode when the popover open state would change due to user interaction.",
|
|
55
|
+
table: {
|
|
56
|
+
defaultValue: { summary: undefined },
|
|
57
|
+
type: { summary: "(nextOpenState: boolean, e?: React.SyntheticEvent<HTMLElement>) => void" },
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
children: {
|
|
61
|
+
control: "none",
|
|
62
|
+
},
|
|
63
|
+
content: {
|
|
64
|
+
control: "none",
|
|
65
|
+
description: "Elements for overlay content."
|
|
66
|
+
},
|
|
67
|
+
minimal: {
|
|
68
|
+
control: "boolean",
|
|
69
|
+
description: "Whether to apply minimal styling to this popover or tooltip. Minimal popovers do not have an arrow pointing to their target and use a subtler animation."
|
|
70
|
+
},
|
|
71
|
+
placement: {
|
|
72
|
+
control: "select",
|
|
73
|
+
options: PlacementOptions,
|
|
74
|
+
description: "The placement (relative to the target) at which the popover should appear. Mutually exclusive with `position` prop."
|
|
75
|
+
},
|
|
76
|
+
/*
|
|
77
|
+
position: {
|
|
78
|
+
control: "select",
|
|
79
|
+
options: {UNDEFINED: undefined, ...PopoverPosition},
|
|
80
|
+
description: "The position (relative to the target) at which the popover should appear. Mutually exclusive with `placement` prop."
|
|
81
|
+
},
|
|
82
|
+
*/
|
|
83
|
+
usePortal: {
|
|
84
|
+
control: "boolean",
|
|
85
|
+
description: "Whether the popover should be rendered inside a Portal attached to `portalContainer` prop."
|
|
86
|
+
},
|
|
87
|
+
modifiers: {
|
|
88
|
+
control: "object",
|
|
89
|
+
description: "Popper modifier options, passed directly to internal Popper instance. See https://popper.js.org/docs/v2/modifiers/ for complete details.",
|
|
90
|
+
table: {
|
|
91
|
+
defaultValue: { summary: undefined },
|
|
92
|
+
type: { summary: "PopperModifiers" },
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
hasBackdrop: {
|
|
96
|
+
control: "boolean",
|
|
97
|
+
description: "Enables an invisible overlay beneath the popover that captures clicks and prevents interaction with the rest of the document until the popover is closed, only available with `PopoverInteractionKind.CLICK`."
|
|
98
|
+
},
|
|
99
|
+
rootBoundary: {
|
|
100
|
+
control: "select",
|
|
101
|
+
options: {UNDEFINED: undefined, VIEWPORT: "viewport", DOCUMENT: "document"},
|
|
102
|
+
description: "A root boundary element supplied to the `flip` and `preventOverflow` modifiers, shorthand for overriding Popper.js modifier options. See: https://popper.js.org/docs/v2/utils/detect-overflow/#rootboundary",
|
|
103
|
+
table: {
|
|
104
|
+
defaultValue: { summary: "viewport" },
|
|
105
|
+
type: { summary: "RootBoundary" },
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
positioningStrategy: {
|
|
109
|
+
control: "select",
|
|
110
|
+
options: {UNDEFINED: undefined, ABSOLUTE: "absolute", FIXED: "fixed"},
|
|
111
|
+
description: "Popper.js positioning strategy. See: https://popper.js.org/docs/v2/constructors/#strategy",
|
|
112
|
+
table: {
|
|
113
|
+
defaultValue: { summary: "absolute" },
|
|
114
|
+
type: { summary: "PositioningStrategy" },
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
} as ComponentMeta<typeof ContextOverlay>;
|
|
119
|
+
|
|
120
|
+
const Template: ComponentStory<typeof ContextOverlay> = (args) => (
|
|
121
|
+
<ContextOverlay {...args} />
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
export const Default = Template.bind({});
|
|
125
|
+
Default.args = {
|
|
126
|
+
children: <Button>Target</Button>,
|
|
127
|
+
content: (
|
|
128
|
+
<HtmlContentBlock style={{maxWidth: "40em", padding: "0.5rem"}}>
|
|
129
|
+
Overlay:
|
|
130
|
+
<LoremIpsum p={2} avgSentencesPerParagraph={4} random={false} />
|
|
131
|
+
</HtmlContentBlock>
|
|
132
|
+
),
|
|
133
|
+
//position: PopoverPosition.RIGHT,
|
|
134
|
+
placement: "auto-start",
|
|
135
|
+
usePortal: true,
|
|
136
|
+
minimal: false,
|
|
137
|
+
defaultIsOpen: false,
|
|
138
|
+
modifiers: {
|
|
139
|
+
flip: {
|
|
140
|
+
enabled: true
|
|
141
|
+
},
|
|
142
|
+
preventOverflow: {
|
|
143
|
+
enabled: true,
|
|
144
|
+
}
|
|
145
|
+
} as PopperModifiers,
|
|
146
|
+
rootBoundary: "viewport",
|
|
147
|
+
hasBackdrop: false,
|
|
148
|
+
}
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Popover2 as BlueprintPropover,
|
|
4
|
+
Popover2Props as BlueprintPopoverProps,
|
|
5
|
+
} from "@blueprintjs/popover2";
|
|
3
6
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export interface ContextOverlayProps extends Omit<BlueprintPopoverProps, "position"> {
|
|
9
|
+
/**
|
|
10
|
+
* `target` element to use as toggler for the overlay display.
|
|
11
|
+
*/
|
|
12
|
+
children?: JSX.Element;
|
|
13
|
+
}
|
|
11
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Element displays connected content by interacting with a target element.
|
|
17
|
+
* Full list of available option can be seen at https://blueprintjs.com/docs/#popover2-package/popover2
|
|
18
|
+
*/
|
|
12
19
|
function ContextOverlay({
|
|
13
20
|
children,
|
|
14
21
|
className='',
|
|
15
22
|
...restProps
|
|
16
|
-
}:
|
|
23
|
+
}: ContextOverlayProps) {
|
|
17
24
|
|
|
18
25
|
return (
|
|
19
26
|
<BlueprintPropover
|
|
20
|
-
|
|
27
|
+
placement="bottom"
|
|
21
28
|
{...restProps}
|
|
22
29
|
className={`${eccgui}-contextoverlay ` + className}
|
|
23
30
|
>
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
/*
|
|
2
|
-
$
|
|
3
|
-
$dark-
|
|
2
|
+
$pt-popover2-background-color: $white !default;
|
|
3
|
+
$pt-dark-popover2-background-color: $dark-gray4 !default;
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
@import "~@blueprintjs/
|
|
6
|
+
@import "~@blueprintjs/popover2/src/popover2";
|
|
7
7
|
|
|
8
|
-
.#{$ns}-
|
|
8
|
+
.#{$ns}-popover2-content {
|
|
9
9
|
max-width: 100%;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.#{$ns}-
|
|
12
|
+
.#{$ns}-popover2-target {
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
max-width: 100%;
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
.#{$ns}-submenu.#{$ns}-popover > .#{$ns}-popover-content {
|
|
18
|
+
// fix for submenu items in overlays/popovers
|
|
19
|
+
background-color: $pt-popover2-background-color;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.#{$ns}-overlay-start-focus-trap,
|
|
23
|
+
.#{$ns}-overlay-end-focus-trap {
|
|
24
|
+
&:focus-visible {
|
|
25
|
+
outline: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
|
|
1
3
|
// our vars
|
|
2
|
-
$eccgui-size-modal-tiny-width: 4
|
|
3
|
-
$eccgui-size-modal-tiny-height:
|
|
4
|
-
$eccgui-size-modal-small-width:
|
|
5
|
-
$eccgui-size-modal-small-height:
|
|
6
|
-
$eccgui-size-modal-regular-width:
|
|
7
|
-
$eccgui-size-modal-regular-height:
|
|
8
|
-
$eccgui-size-modal-large-width:
|
|
9
|
-
$eccgui-size-modal-large-height:
|
|
4
|
+
$eccgui-size-modal-tiny-width: math.div(4, 16) * 100vw !default;
|
|
5
|
+
$eccgui-size-modal-tiny-height: math.div(1, 9) * 100vh !default;
|
|
6
|
+
$eccgui-size-modal-small-width: math.div(6, 16) * 100vw !default;
|
|
7
|
+
$eccgui-size-modal-small-height: math.div(2, 9) * 100vh !default;
|
|
8
|
+
$eccgui-size-modal-regular-width: math.div(6, 16) * 100vw !default;
|
|
9
|
+
$eccgui-size-modal-regular-height: math.div(3, 9) * 100vh !default;
|
|
10
|
+
$eccgui-size-modal-large-width: math.div(8, 16) * 100vw !default;
|
|
11
|
+
$eccgui-size-modal-large-height: math.div(6, 9) * 100vh !default;
|
|
10
12
|
$eccgui-color-modal-backdrop: rgba(invert($eccgui-color-workspace-background), 0.69) !default;
|
|
11
13
|
|
|
12
14
|
@import "~@blueprintjs/core/src/components/dialog/dialog";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Label from "../Label/Label";
|
|
2
|
+
import Label, { LabelProps } from "../Label/Label";
|
|
3
3
|
import {ClassNames as IntentClassNames} from "../../common/Intent";
|
|
4
4
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
5
5
|
import {TestableComponent} from "../interfaces";
|
|
@@ -21,7 +21,7 @@ interface IProps extends TestableComponent {
|
|
|
21
21
|
children: JSX.Element | JSX.Element[] | null
|
|
22
22
|
className?: string
|
|
23
23
|
disabled?: boolean
|
|
24
|
-
|
|
24
|
+
labelProps?: LabelProps
|
|
25
25
|
helperText?: string | JSX.Element
|
|
26
26
|
messageText?: string
|
|
27
27
|
}
|
|
@@ -34,7 +34,7 @@ function FieldItem({
|
|
|
34
34
|
children,
|
|
35
35
|
className,
|
|
36
36
|
disabled,
|
|
37
|
-
|
|
37
|
+
labelProps,
|
|
38
38
|
helperText,
|
|
39
39
|
messageText,
|
|
40
40
|
...otherProps
|
|
@@ -57,7 +57,7 @@ function FieldItem({
|
|
|
57
57
|
break;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const label = <Label {...
|
|
60
|
+
const label = <Label {...labelProps} disabled={disabled} />;
|
|
61
61
|
|
|
62
62
|
const userhelp =
|
|
63
63
|
helperText &&
|
|
@@ -45,10 +45,10 @@ form {
|
|
|
45
45
|
|
|
46
46
|
.#{$eccgui}-fielditem__inputfields {
|
|
47
47
|
&:not(:first-child) {
|
|
48
|
-
margin-top: $eccgui-size-block-whitespace
|
|
48
|
+
margin-top: $eccgui-size-block-whitespace * 0.25;
|
|
49
49
|
}
|
|
50
50
|
&:not(:last-child) {
|
|
51
|
-
margin-bottom: $eccgui-size-block-whitespace
|
|
51
|
+
margin-bottom: $eccgui-size-block-whitespace * 0.25;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -76,7 +76,7 @@ form {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
&.#{$eccgui}-fieldset--boxed {
|
|
79
|
-
padding: $eccgui-size-block-whitespace
|
|
79
|
+
padding: $eccgui-size-block-whitespace * 0.5 $eccgui-size-block-whitespace $eccgui-size-block-whitespace
|
|
80
80
|
$eccgui-size-block-whitespace;
|
|
81
81
|
background-color: $data-table-zebra-color;
|
|
82
82
|
|
|
@@ -125,7 +125,7 @@ form {
|
|
|
125
125
|
|
|
126
126
|
.#{$eccgui}-fieldset__helpertext,
|
|
127
127
|
.#{$eccgui}-fieldset__message {
|
|
128
|
-
margin-top: $eccgui-size-block-whitespace
|
|
128
|
+
margin-top: $eccgui-size-block-whitespace * 0.25;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.#{$eccgui}-fieldset__fielditems {
|
|
@@ -145,12 +145,12 @@ form {
|
|
|
145
145
|
flex-wrap: nowrap;
|
|
146
146
|
justify-content: flex-start;
|
|
147
147
|
align-items: flex-end;
|
|
148
|
-
margin: 0 -1 * $eccgui-size-block-whitespace
|
|
148
|
+
margin: 0 -1 * $eccgui-size-block-whitespace * 0.5;
|
|
149
149
|
|
|
150
150
|
& > .#{$eccgui}-fielditem {
|
|
151
151
|
flex-shrink: 1;
|
|
152
152
|
flex-grow: 1;
|
|
153
|
-
margin: 0 $eccgui-size-block-whitespace
|
|
153
|
+
margin: 0 $eccgui-size-block-whitespace * 0.5;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
&:not(:last-child) {
|
|
@@ -6,24 +6,40 @@ import Tooltip, { TooltipProps } from "./../Tooltip/Tooltip";
|
|
|
6
6
|
import canonicalIcons, {IconSized, ValidIconName} from "./canonicalIconNames"
|
|
7
7
|
|
|
8
8
|
export interface IconProps extends Omit<CarbonIconProps, "icon" | "description" | "name"> {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Canonical icon name, or an array of strings.
|
|
11
|
+
* In case of the array the first valid icon name is used.
|
|
12
|
+
*/
|
|
12
13
|
name: ValidIconName | string[],
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
large?: boolean,
|
|
17
|
-
// Display small icon version
|
|
18
|
-
small?: boolean,
|
|
19
|
-
// Add tooltip text to icon
|
|
14
|
+
/**
|
|
15
|
+
* Add tooltip text to icon
|
|
16
|
+
*/
|
|
20
17
|
tooltipText?: string,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// Intent state of icon (currently only success, info, warning and danger are implemented in style rules)
|
|
18
|
+
/**
|
|
19
|
+
* Intent state of icon.
|
|
20
|
+
* Currently only `success`, `info`, `warning` and `danger` are implemented for icons, even there are more states available.
|
|
21
|
+
*/
|
|
26
22
|
intent?: IntentTypes
|
|
23
|
+
/**
|
|
24
|
+
* Display large icon version.
|
|
25
|
+
*/
|
|
26
|
+
large?: boolean,
|
|
27
|
+
/**
|
|
28
|
+
* Display small icon version.
|
|
29
|
+
*/
|
|
30
|
+
small?: boolean,
|
|
31
|
+
/**
|
|
32
|
+
* Additional CSS classes.
|
|
33
|
+
*/
|
|
34
|
+
className?: string,
|
|
35
|
+
/**
|
|
36
|
+
* Description for icon as accessibility fallback.
|
|
37
|
+
*/
|
|
38
|
+
description?: string,
|
|
39
|
+
/**
|
|
40
|
+
* Additonal tooltip properties, e.g. `hoverOpenDelay`.
|
|
41
|
+
*/
|
|
42
|
+
tooltipProps?: Partial<Omit<TooltipProps, "content" | "children">>,
|
|
27
43
|
}
|
|
28
44
|
|
|
29
45
|
/** Returns the first icon that exists or the fallback icon. */
|
|
@@ -56,8 +72,7 @@ function Icon({
|
|
|
56
72
|
large = false,
|
|
57
73
|
small = false,
|
|
58
74
|
tooltipText,
|
|
59
|
-
|
|
60
|
-
tooltipProperties,
|
|
75
|
+
tooltipProps,
|
|
61
76
|
intent,
|
|
62
77
|
...restProps
|
|
63
78
|
}: IconProps) {
|
|
@@ -85,7 +100,7 @@ function Icon({
|
|
|
85
100
|
/>
|
|
86
101
|
);
|
|
87
102
|
return tooltipText ? (
|
|
88
|
-
<Tooltip content={tooltipText}
|
|
103
|
+
<Tooltip content={tooltipText} {...tooltipProps}>
|
|
89
104
|
<span>{icon}</span>
|
|
90
105
|
</Tooltip>
|
|
91
106
|
) : (
|
|
@@ -4,24 +4,30 @@ import {CLASSPREFIX as eccgui} from "../../configuration/constants";
|
|
|
4
4
|
import Icon from "./Icon";
|
|
5
5
|
import {ValidIconName} from "./canonicalIconNames";
|
|
6
6
|
|
|
7
|
-
interface IconButtonProps extends ButtonProps {
|
|
8
|
-
|
|
7
|
+
interface IconButtonProps extends Omit<ButtonProps, "icon" | "rightIcon" | "text" | "minimal" | "tooltip"> {
|
|
8
|
+
/**
|
|
9
|
+
* Canonical icon name, or an array of strings.
|
|
10
|
+
* In case of the array the first valid icon name is used.
|
|
11
|
+
*/
|
|
9
12
|
name: ValidIconName | string[]
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Button text, will be displayed as tooltip.
|
|
15
|
+
*/
|
|
12
16
|
text?: string,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// Display small icon version
|
|
18
|
-
small?: boolean
|
|
19
|
-
// If the tooltip should be set as title attribute instead of the Tooltip component. If true, all other tooltip parameters are ignored.
|
|
17
|
+
/**
|
|
18
|
+
* If `text` should be set as HTML `title` attribute instead of attaching it as tooltip.
|
|
19
|
+
* If true then `tooltipProps` is ignored.
|
|
20
|
+
*/
|
|
20
21
|
tooltipAsTitle?: boolean
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Description for icon as accessibility fallback.
|
|
24
|
+
* If not set then `text` is used.
|
|
25
|
+
*/
|
|
24
26
|
description?: string
|
|
27
|
+
/**
|
|
28
|
+
* Button is displayed with minimal styles (no borders, no background color).
|
|
29
|
+
*/
|
|
30
|
+
minimal?: boolean;
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
/** A button with an icon instead of text. */
|
|
@@ -29,10 +35,10 @@ function IconButton({
|
|
|
29
35
|
className = "",
|
|
30
36
|
name = "undefined",
|
|
31
37
|
text,
|
|
32
|
-
|
|
38
|
+
tooltipProps,
|
|
33
39
|
description,
|
|
34
|
-
tooltipOpenDelay = 1000,
|
|
35
40
|
tooltipAsTitle = false,
|
|
41
|
+
minimal=true,
|
|
36
42
|
...restProps
|
|
37
43
|
}: IconButtonProps & AnchorOrButtonProps) {
|
|
38
44
|
return (
|
|
@@ -45,13 +51,12 @@ function IconButton({
|
|
|
45
51
|
small={restProps.small}
|
|
46
52
|
large={restProps.large}
|
|
47
53
|
tooltipText={tooltipAsTitle ? undefined : text}
|
|
48
|
-
|
|
49
|
-
tooltipProperties={!!tooltipProperties ? tooltipProperties : {}}
|
|
54
|
+
tooltipProps={!!tooltipProps ? {hoverOpenDelay: 1000, ...tooltipProps} : {hoverOpenDelay: 1000}}
|
|
50
55
|
description={description ? description : text}
|
|
51
56
|
/>
|
|
52
57
|
}
|
|
53
58
|
className={`${eccgui}-button--icon ` + className}
|
|
54
|
-
minimal
|
|
59
|
+
minimal={minimal}
|
|
55
60
|
/>
|
|
56
61
|
);
|
|
57
62
|
}
|