@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
|
@@ -27,7 +27,7 @@ svg.#{$eccgui}-icon {
|
|
|
27
27
|
|
|
28
28
|
.#{$ns}-button .#{$eccgui}-icon:first-child:last-child,
|
|
29
29
|
.#{$ns}-button .#{$ns}-spinner + .#{$eccgui}-icon:last-child {
|
|
30
|
-
margin: 0 (-($pt-button-height - $pt-icon-size-standard)
|
|
30
|
+
margin: 0 (-($pt-button-height - $pt-icon-size-standard) * 0.5);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.#{$eccgui}-menu__item {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Icon,
|
|
6
|
+
Button,
|
|
7
|
+
} from "../../../index";
|
|
8
|
+
import canonicalIcons, { ValidIconName } from "./../canonicalIconNames";
|
|
9
|
+
import { Definitions } from "../../../common/Intent";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: "Components/Icon",
|
|
13
|
+
component: Icon,
|
|
14
|
+
argTypes: {
|
|
15
|
+
name: {
|
|
16
|
+
control: "select",
|
|
17
|
+
options: [...(Object.keys(canonicalIcons))],
|
|
18
|
+
},
|
|
19
|
+
intent: {
|
|
20
|
+
control: "select",
|
|
21
|
+
options: {...Definitions},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
} as ComponentMeta<typeof Icon>;
|
|
25
|
+
|
|
26
|
+
const Template: ComponentStory<typeof Icon> = (args) => (
|
|
27
|
+
<Icon {...args} tooltipText={args.name?.toString()}/>
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export const Default = Template.bind({});
|
|
31
|
+
Default.args = {
|
|
32
|
+
name: "undefined"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const IconsOverview = () => {
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
{
|
|
39
|
+
Object.keys(canonicalIcons).map((iconName) => {
|
|
40
|
+
return (
|
|
41
|
+
<Button
|
|
42
|
+
icon={iconName as ValidIconName}
|
|
43
|
+
outlined
|
|
44
|
+
large
|
|
45
|
+
tooltip={iconName}
|
|
46
|
+
/>
|
|
47
|
+
)
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
</>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
IconButton,
|
|
6
|
+
} from "../../../index";
|
|
7
|
+
import canonicalIcons from "./../canonicalIconNames";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: "Components/IconButton",
|
|
11
|
+
component: IconButton,
|
|
12
|
+
argTypes: {
|
|
13
|
+
name: {
|
|
14
|
+
control: "select",
|
|
15
|
+
options: [...(Object.keys(canonicalIcons))],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
} as ComponentMeta<typeof IconButton>;
|
|
19
|
+
|
|
20
|
+
const Template: ComponentStory<typeof IconButton> = (args) => (
|
|
21
|
+
<IconButton {...args} text={args.name?.toString()}/>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
name: "item-moremenu"
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
import { loremIpsum } from "react-lorem-ipsum";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Label
|
|
7
|
+
} from "../../index";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: "Components/Label",
|
|
11
|
+
component: Label,
|
|
12
|
+
argTypes: {
|
|
13
|
+
},
|
|
14
|
+
} as ComponentMeta<typeof Label>;
|
|
15
|
+
|
|
16
|
+
const Template: ComponentStory<typeof Label> = (args) => (
|
|
17
|
+
<Label {...args} />
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const Default = Template.bind({});
|
|
21
|
+
Default.args = {
|
|
22
|
+
text: "Label text",
|
|
23
|
+
info: loremIpsum({ p: 1, avgSentencesPerParagraph: 1, avgWordsPerSentence: 4, random: false }).toString(),
|
|
24
|
+
tooltip: loremIpsum({ p: 1, avgSentencesPerParagraph: 2, startWithLoremIpsum: false, random: false }).toString(),
|
|
25
|
+
disabled: false,
|
|
26
|
+
htmlFor: "inputid",
|
|
27
|
+
}
|
|
@@ -1,8 +1,36 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
3
|
-
import Tooltip from "../Tooltip/Tooltip";
|
|
3
|
+
import Tooltip, { TooltipProps } from "../Tooltip/Tooltip";
|
|
4
4
|
import Icon from "../Icon/Icon";
|
|
5
5
|
|
|
6
|
+
export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
7
|
+
/**
|
|
8
|
+
* Label text.
|
|
9
|
+
*/
|
|
10
|
+
text?: string | JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* Short info about label semantic, it is displayed in parentesis after the label text.
|
|
13
|
+
*/
|
|
14
|
+
info?: string | JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Additional tooltip, attached to an info icon that is displayed after the info.
|
|
17
|
+
*/
|
|
18
|
+
tooltip?: string | JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Additonal tooltip properties, e.g. `hoverOpenDelay`.
|
|
21
|
+
*/
|
|
22
|
+
tooltipProps?: Partial<Omit<TooltipProps, "content" | "children" | "disabled">>;
|
|
23
|
+
/**
|
|
24
|
+
* Set the name of an HTML element if the display should be used for something else that a `label` element.
|
|
25
|
+
*/
|
|
26
|
+
isLayoutForElement?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Label is displayed inactive.
|
|
29
|
+
* If there is no `isLayoutForElement` set then a `span` is used.
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
6
34
|
function Label({
|
|
7
35
|
children,
|
|
8
36
|
className = "",
|
|
@@ -10,34 +38,38 @@ function Label({
|
|
|
10
38
|
text,
|
|
11
39
|
info,
|
|
12
40
|
tooltip,
|
|
13
|
-
|
|
41
|
+
tooltipProps,
|
|
14
42
|
isLayoutForElement = "label",
|
|
15
|
-
...
|
|
16
|
-
}:
|
|
43
|
+
...otherLabelProps
|
|
44
|
+
}: LabelProps) {
|
|
17
45
|
let htmlElementstring = isLayoutForElement;
|
|
18
46
|
htmlElementstring = disabled && htmlElementstring === "label" ? "span" : htmlElementstring;
|
|
19
|
-
const labelElement = React.createElement(htmlElementstring);
|
|
20
47
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
className={`${eccgui}-
|
|
24
|
-
{...otherProps}
|
|
25
|
-
htmlFor={disabled ? "" : otherProps.htmlFor}
|
|
26
|
-
>
|
|
27
|
-
<span className={`${eccgui}-label__text`}>{text}</span>
|
|
48
|
+
const labelContent = (
|
|
49
|
+
<>
|
|
50
|
+
{text && <span className={`${eccgui}-label__text`}>{text}</span>}
|
|
28
51
|
{info && <span className={`${eccgui}-label__info`}>{info}</span>}
|
|
29
52
|
{tooltip && (
|
|
30
53
|
<span className={`${eccgui}-label__tooltip`}>
|
|
31
|
-
<Tooltip content={tooltip} disabled={disabled} {...
|
|
54
|
+
<Tooltip content={tooltip} disabled={disabled} {...tooltipProps}>
|
|
32
55
|
<Icon name="item-info" small />
|
|
33
56
|
</Tooltip>
|
|
34
57
|
</span>
|
|
35
58
|
)}
|
|
36
59
|
{children && <span className={`${eccgui}-label__other`}>{children}</span>}
|
|
37
|
-
|
|
60
|
+
</>
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
return (!!text || !!info || !!tooltip || !!children) ? React.createElement(
|
|
64
|
+
htmlElementstring,
|
|
65
|
+
{
|
|
66
|
+
className: `${eccgui}-label` + (className ? " " + className : "") + (disabled ? ` ${eccgui}-label--disabled` : ""),
|
|
67
|
+
...otherLabelProps,
|
|
68
|
+
},
|
|
69
|
+
labelContent
|
|
38
70
|
) : (
|
|
39
71
|
<></>
|
|
40
|
-
)
|
|
72
|
+
)
|
|
41
73
|
}
|
|
42
74
|
|
|
43
75
|
export default Label;
|
|
@@ -41,7 +41,7 @@ $eccgui-color-label-info: rgba($eccgui-color-workspace-text, $eccgui-opacity-mut
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.#{$eccgui}-label__text + & {
|
|
44
|
-
margin-left: $eccgui-size-inline-whitespace
|
|
44
|
+
margin-left: $eccgui-size-inline-whitespace * 0.5;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.#{$eccgui}-typography__overflowtext--passdown > .#{$eccgui}-label > & {
|
|
@@ -58,7 +58,7 @@ $eccgui-color-label-info: rgba($eccgui-color-workspace-text, $eccgui-opacity-mut
|
|
|
58
58
|
|
|
59
59
|
.#{$eccgui}-label__text + &,
|
|
60
60
|
.#{$eccgui}-label__info + & {
|
|
61
|
-
margin-left: $eccgui-size-inline-whitespace
|
|
61
|
+
margin-left: $eccgui-size-inline-whitespace * 0.5;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
.#{$eccgui}-typography__overflowtext--passdown > .#{$eccgui}-label > & {
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {MenuItem as BlueprintMenuItem, MenuItemProps} from "@blueprintjs/core";
|
|
2
|
+
import {MenuItem as BlueprintMenuItem, MenuItemProps as BlueprintMenuItemProps} from "@blueprintjs/core";
|
|
3
3
|
import {CLASSPREFIX as eccgui} from "../../configuration/constants";
|
|
4
4
|
import Icon from '../Icon/Icon';
|
|
5
5
|
import { openInNewTab } from '../../common/utils/openInNewTab';
|
|
6
6
|
import {ValidIconName} from "../Icon/canonicalIconNames";
|
|
7
7
|
|
|
8
|
-
interface
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
internalProps?: Partial<MenuItemProps> & React.AnchorHTMLAttributes<HTMLAnchorElement>
|
|
14
|
-
// FIXME: CMEM-3742: For backward compatibility, should be avoided in all code bases
|
|
15
|
-
[key: string]: any
|
|
8
|
+
export interface MenuItemProps extends Omit<BlueprintMenuItemProps, "icon">, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target"> {
|
|
9
|
+
/*
|
|
10
|
+
* If set the icon is diplayed on the left side of the menu item.
|
|
11
|
+
*/
|
|
12
|
+
icon?: ValidIconName | string[];
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
/** A single item in a Menu. */
|
|
@@ -20,19 +17,15 @@ function MenuItem({
|
|
|
20
17
|
children,
|
|
21
18
|
className = '',
|
|
22
19
|
icon,
|
|
23
|
-
internalProps,
|
|
24
20
|
onClick,
|
|
25
21
|
href,
|
|
26
22
|
...restProps
|
|
27
|
-
}:
|
|
28
|
-
const actualHref = internalProps?.href ?? href;
|
|
29
|
-
const onClickHandler = internalProps?.onClick ?? onClick;
|
|
23
|
+
}: MenuItemProps) {
|
|
30
24
|
return (
|
|
31
25
|
<BlueprintMenuItem
|
|
32
|
-
{...internalProps}
|
|
33
26
|
{...restProps}
|
|
34
|
-
href={
|
|
35
|
-
onClick={(e) => openInNewTab(e,
|
|
27
|
+
href={href}
|
|
28
|
+
onClick={(e) => openInNewTab(e, onClick, href)}
|
|
36
29
|
className={`${eccgui}-menu__item ` + className}
|
|
37
30
|
icon={
|
|
38
31
|
icon ? <Icon name={icon} /> : false
|
|
@@ -26,16 +26,16 @@ $minimal-button-background-color-active: rgba($gray2, 0.3) !default;
|
|
|
26
26
|
$dark-minimal-button-background-color-hover: rgba($gray3, 0.15) !default;
|
|
27
27
|
$dark-minimal-button-background-color-active: rgba($gray3, 0.3) !default;
|
|
28
28
|
|
|
29
|
-
// $half-grid-size: $pt-grid-size
|
|
29
|
+
// $half-grid-size: $pt-grid-size * 0.5 !default;
|
|
30
30
|
// $menu-item-border-radius: $pt-border-radius - 1 !default;
|
|
31
31
|
// $menu-item-line-height-factor: 1.4;
|
|
32
32
|
// $menu-item-line-height: round($pt-font-size * $menu-item-line-height-factor);
|
|
33
33
|
// $menu-item-line-height-large: round($pt-font-size-large * $menu-item-line-height-factor);
|
|
34
34
|
$menu-min-width: 0 !default;
|
|
35
|
-
// $menu-item-padding: ($pt-button-height - $pt-icon-size-standard)
|
|
36
|
-
// $menu-item-padding-large: ($pt-button-height-large - $pt-icon-size-large)
|
|
37
|
-
// $menu-item-padding-vertical: ($pt-button-height - $menu-item-line-height)
|
|
38
|
-
// $menu-item-padding-vertical-large: ($pt-button-height-large - $menu-item-line-height-large)
|
|
35
|
+
// $menu-item-padding: ($pt-button-height - $pt-icon-size-standard) * 0.5 !default;
|
|
36
|
+
// $menu-item-padding-large: ($pt-button-height-large - $pt-icon-size-large) * 0.5 !default;
|
|
37
|
+
// $menu-item-padding-vertical: ($pt-button-height - $menu-item-line-height) * 0.5 !default;
|
|
38
|
+
// $menu-item-padding-vertical-large: ($pt-button-height-large - $menu-item-line-height-large) * 0.5 !default;
|
|
39
39
|
$menu-background-color: transparent !default;
|
|
40
40
|
// $dark-menu-background-color: $dark-gray4 !default;
|
|
41
41
|
// $menu-item-color-hover: $minimal-button-background-color-hover !default;
|
|
@@ -48,8 +48,8 @@ $menu-background-color: transparent !default;
|
|
|
48
48
|
.#{$ns}-menu {
|
|
49
49
|
padding: 0;
|
|
50
50
|
|
|
51
|
-
.#{$ns}-
|
|
52
|
-
padding: $eccgui-size-inline-whitespace
|
|
51
|
+
.#{$ns}-popover2-content > & {
|
|
52
|
+
padding: $eccgui-size-inline-whitespace * 0.5;
|
|
53
53
|
min-width: 10em;
|
|
54
54
|
max-width: 20em;
|
|
55
55
|
}
|
|
@@ -69,11 +69,12 @@ $menu-background-color: transparent !default;
|
|
|
69
69
|
|
|
70
70
|
&:hover {
|
|
71
71
|
.#{$ns}-menu-item {
|
|
72
|
-
max-width: none
|
|
72
|
+
max-width: 100vw; // something similar like `none` in this situation
|
|
73
|
+
transition: max-width $pt-transition-duration ease-in 0.75s;
|
|
73
74
|
}
|
|
74
75
|
.#{$ns}-text-overflow-ellipsis {
|
|
75
76
|
opacity: $eccgui-opacity-regular;
|
|
76
|
-
transition: opacity 0.
|
|
77
|
+
transition: opacity $pt-transition-duration ease-in 0.75s;
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import {
|
|
3
|
+
Intent as BlueprintIntent,
|
|
4
|
+
HTMLInputProps as BlueprintHTMLInputProps
|
|
5
|
+
} from "@blueprintjs/core";
|
|
6
|
+
import {
|
|
7
|
+
IItemRendererProps as BlueprintItemRendererProps,
|
|
8
|
+
MultiSelect2 as BlueprintMultiSelect,
|
|
9
|
+
MultiSelect2Props as BlueprintMultiSelectProps
|
|
10
|
+
} from "@blueprintjs/select";
|
|
11
|
+
import {
|
|
12
|
+
MenuItem,
|
|
13
|
+
Highlighter,
|
|
14
|
+
Button,
|
|
15
|
+
OverflowText,
|
|
16
|
+
ContextOverlayProps,
|
|
17
|
+
} from "./../../index";
|
|
18
|
+
|
|
9
19
|
import {removeExtraSpaces} from "../../common/utils/stringUtils";
|
|
10
20
|
|
|
11
21
|
export interface SelectedParamsType<T> {
|
|
@@ -14,7 +24,7 @@ export interface SelectedParamsType<T> {
|
|
|
14
24
|
createdItems: Partial<T>[];
|
|
15
25
|
}
|
|
16
26
|
|
|
17
|
-
interface IProps<T> extends Pick<
|
|
27
|
+
interface IProps<T> extends Pick<BlueprintMultiSelectProps<T>, "items" | "placeholder" | "openOnKeyDown"> {
|
|
18
28
|
/**
|
|
19
29
|
* Returns the unique ID of an item. This will be used for equality of items.
|
|
20
30
|
*/
|
|
@@ -33,16 +43,16 @@ interface IProps<T> extends Pick<MultiSelectProps<T>, "items" | "placeholder" |
|
|
|
33
43
|
*/
|
|
34
44
|
onSelection?: (params: SelectedParamsType<T>) => void;
|
|
35
45
|
/**
|
|
36
|
-
* Props to spread to `
|
|
46
|
+
* Props to spread to `ContextOverlay`. Note that `content` cannot be changed.
|
|
37
47
|
*/
|
|
38
|
-
|
|
48
|
+
contextOverlayProps?: Partial<Omit<ContextOverlayProps, "content" | "children">>;
|
|
39
49
|
/**
|
|
40
50
|
* Props to spread to `TagInput`. Use `query` and `onQueryChange` to control the input.
|
|
41
51
|
*/
|
|
42
|
-
tagInputProps?:
|
|
52
|
+
tagInputProps?: BlueprintMultiSelectProps<T>["tagInputProps"];
|
|
43
53
|
|
|
44
54
|
/** Additional properties for the (query) input field of the multi-selection. */
|
|
45
|
-
inputProps?:
|
|
55
|
+
inputProps?: BlueprintHTMLInputProps;
|
|
46
56
|
|
|
47
57
|
/**
|
|
48
58
|
* prop to listen for query changes, when text is entered in the multi-select input
|
|
@@ -50,7 +60,7 @@ interface IProps<T> extends Pick<MultiSelectProps<T>, "items" | "placeholder" |
|
|
|
50
60
|
runOnQueryChange?: (query: string) => Promise<T[] | undefined>;
|
|
51
61
|
/**
|
|
52
62
|
* Whether the component should take up the full width of its container.
|
|
53
|
-
* This overrides `
|
|
63
|
+
* This overrides `tagInputProps.fill`.
|
|
54
64
|
*/
|
|
55
65
|
fullWidth?: boolean;
|
|
56
66
|
/**
|
|
@@ -99,7 +109,7 @@ function MultiSelect<T>({
|
|
|
99
109
|
itemId,
|
|
100
110
|
itemLabel,
|
|
101
111
|
onSelection,
|
|
102
|
-
|
|
112
|
+
contextOverlayProps,
|
|
103
113
|
tagInputProps,
|
|
104
114
|
inputProps,
|
|
105
115
|
runOnQueryChange,
|
|
@@ -221,7 +231,7 @@ function MultiSelect<T>({
|
|
|
221
231
|
/**
|
|
222
232
|
* defines how an item in the item list is displayed
|
|
223
233
|
*/
|
|
224
|
-
const onItemRenderer = (item: T, { handleClick, modifiers }:
|
|
234
|
+
const onItemRenderer = (item: T, { handleClick, modifiers }: BlueprintItemRendererProps) => {
|
|
225
235
|
if (!modifiers.matchesPredicate) {
|
|
226
236
|
return null;
|
|
227
237
|
}
|
|
@@ -361,13 +371,15 @@ function MultiSelect<T>({
|
|
|
361
371
|
}}
|
|
362
372
|
popoverProps={{
|
|
363
373
|
minimal: true,
|
|
364
|
-
|
|
374
|
+
placement: "bottom-start",
|
|
365
375
|
hasBackdrop: true,
|
|
366
|
-
|
|
367
|
-
|
|
376
|
+
fill: true,
|
|
377
|
+
...contextOverlayProps,
|
|
368
378
|
}}
|
|
369
379
|
/>
|
|
370
380
|
);
|
|
371
381
|
}
|
|
372
382
|
|
|
383
|
+
MultiSelect.ofType = BlueprintMultiSelect.ofType;
|
|
384
|
+
|
|
373
385
|
export default MultiSelect;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// TODO: add vars and process them
|
|
2
2
|
|
|
3
|
+
@use "sass:math";
|
|
4
|
+
|
|
3
5
|
@import "~@blueprintjs/core/src/components/toast/toast";
|
|
4
6
|
|
|
5
7
|
.#{$eccgui}-notification {
|
|
@@ -10,7 +12,7 @@
|
|
|
10
12
|
background-color: $eccgui-color-application-background;
|
|
11
13
|
font-size: 1rem;
|
|
12
14
|
line-height: $eccgui-size-typo-base-lineheight;
|
|
13
|
-
min-width: 4
|
|
15
|
+
min-width: math.div(4, 16) * 100vw;
|
|
14
16
|
width: 100%;
|
|
15
17
|
max-width: 40rem;
|
|
16
18
|
margin-top: $eccgui-size-block-whitespace;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$eccgui-color-overviewitem-divider: $ui-03 !default;
|
|
2
|
-
$eccgui-size-overviewitem-spacing: $eccgui-size-typo-base
|
|
2
|
+
$eccgui-size-overviewitem-spacing: $eccgui-size-typo-base * 0.5 !default;
|
|
3
3
|
|
|
4
4
|
$eccgui-color-overviewitem-depiction-background: $eccgui-color-workspace-text !default;
|
|
5
5
|
$eccgui-color-overviewitem-depiction-text: $eccgui-color-workspace-background !default;
|
|
@@ -17,7 +17,7 @@ $eccgui-size-overviewitem-line-typo-large-lineheight: $eccgui-size-typo-subtitle
|
|
|
17
17
|
align-items: stretch;
|
|
18
18
|
|
|
19
19
|
& > li {
|
|
20
|
-
width: calc(
|
|
20
|
+
width: calc(50% - #{$eccgui-size-overviewitem-spacing});
|
|
21
21
|
|
|
22
22
|
&:nth-child(odd) {
|
|
23
23
|
margin-right: $eccgui-size-overviewitem-spacing;
|
|
@@ -25,12 +25,12 @@ $eccgui-size-overviewitem-line-typo-large-lineheight: $eccgui-size-typo-subtitle
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&.#{$eccgui}-overviewitem__list--hasspacing {
|
|
28
|
-
margin-left: -1 * $eccgui-size-overviewitem-spacing
|
|
29
|
-
margin-right: -1 * $eccgui-size-overviewitem-spacing
|
|
28
|
+
margin-left: -1 * $eccgui-size-overviewitem-spacing * 0.5;
|
|
29
|
+
margin-right: -1 * $eccgui-size-overviewitem-spacing * 0.5;
|
|
30
30
|
|
|
31
31
|
& > li {
|
|
32
32
|
box-sizing: border-box;
|
|
33
|
-
padding: $eccgui-size-overviewitem-spacing
|
|
33
|
+
padding: $eccgui-size-overviewitem-spacing * 0.5;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -40,10 +40,10 @@ $eccgui-size-overviewitem-line-typo-large-lineheight: $eccgui-size-typo-subtitle
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.#{$eccgui}-overviewitem__list--hasspacing:not(.#{$eccgui}-overviewitem__list--hascolumns) > li:not(:first-child) {
|
|
43
|
-
padding-top: $eccgui-size-overviewitem-spacing
|
|
43
|
+
padding-top: $eccgui-size-overviewitem-spacing * 0.5;
|
|
44
44
|
}
|
|
45
45
|
.#{$eccgui}-overviewitem__list--hasspacing:not(.#{$eccgui}-overviewitem__list--hascolumns) > li:not(:last-child) {
|
|
46
|
-
padding-bottom: $eccgui-size-overviewitem-spacing
|
|
46
|
+
padding-bottom: $eccgui-size-overviewitem-spacing * 0.5;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.#{$eccgui}-overviewitem__item {
|
|
@@ -83,7 +83,7 @@ $eccgui-size-overviewitem-line-typo-large-lineheight: $eccgui-size-typo-subtitle
|
|
|
83
83
|
|
|
84
84
|
.#{$eccgui}-overviewitem__item--hasspacing {
|
|
85
85
|
box-sizing: content-box;
|
|
86
|
-
padding: $eccgui-size-overviewitem-spacing
|
|
86
|
+
padding: $eccgui-size-overviewitem-spacing * 0.5;
|
|
87
87
|
|
|
88
88
|
&.#{$eccgui}-overviewitem__item--highdensity,
|
|
89
89
|
.#{$eccgui}-overviewitem__list--highdensity > li > & {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
|
|
1
3
|
.#{$eccgui}-propertyvalue__list {
|
|
2
4
|
display: block;
|
|
3
5
|
}
|
|
@@ -13,11 +15,11 @@
|
|
|
13
15
|
}
|
|
14
16
|
&.#{$eccgui}-propertyvalue__pair--hasspacing {
|
|
15
17
|
&:not(:last-child) {
|
|
16
|
-
padding-bottom: $eccgui-size-block-whitespace
|
|
17
|
-
margin-bottom: $eccgui-size-block-whitespace
|
|
18
|
+
padding-bottom: $eccgui-size-block-whitespace * 0.5;
|
|
19
|
+
margin-bottom: $eccgui-size-block-whitespace * 0.5;
|
|
18
20
|
}
|
|
19
21
|
.#{$eccgui}-propertyvalue__pair + & {
|
|
20
|
-
margin-top: $eccgui-size-block-whitespace
|
|
22
|
+
margin-top: $eccgui-size-block-whitespace * 0.5;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
|
|
33
35
|
.#{$eccgui}-propertyvalue__property {
|
|
34
36
|
float: left;
|
|
35
|
-
width: 3
|
|
37
|
+
width: math.div(3, 16) * 100%;
|
|
36
38
|
overflow: hidden;
|
|
37
39
|
|
|
38
40
|
& > div {
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
.#{$eccgui}-propertyvalue__value {
|
|
44
|
-
margin-left: 3
|
|
46
|
+
margin-left: math.div(3, 16) * 100%;
|
|
45
47
|
box-sizing: content-box;
|
|
46
48
|
|
|
47
49
|
&:not(:last-child) {
|
|
@@ -49,8 +51,8 @@
|
|
|
49
51
|
border-bottom: solid 1px $pt-divider-black;
|
|
50
52
|
}
|
|
51
53
|
.#{$eccgui}-propertyvalue__pair--hasspacing > & {
|
|
52
|
-
padding-bottom: $eccgui-size-block-whitespace
|
|
53
|
-
margin-bottom: $eccgui-size-block-whitespace
|
|
54
|
+
padding-bottom: $eccgui-size-block-whitespace * 0.5;
|
|
55
|
+
margin-bottom: $eccgui-size-block-whitespace * 0.5;
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
import { loremIpsum } from "react-lorem-ipsum";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Select,
|
|
7
|
+
Button,
|
|
8
|
+
MenuItem,
|
|
9
|
+
} from "../../index";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: "Components/Select",
|
|
13
|
+
component: Select,
|
|
14
|
+
argTypes: {
|
|
15
|
+
},
|
|
16
|
+
} as ComponentMeta<typeof Select>;
|
|
17
|
+
|
|
18
|
+
const Template: ComponentStory<typeof Select> = (args) => (
|
|
19
|
+
<Select {...args}>
|
|
20
|
+
<Button alignText="left" text="Select an element" fill outlined rightIcon="toggler-showmore"/>
|
|
21
|
+
</Select>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
items: loremIpsum({ p: 1, avgSentencesPerParagraph: 5, random: false })
|
|
27
|
+
.toString()
|
|
28
|
+
.split(".")
|
|
29
|
+
.map((item) => { return { label: item }}),
|
|
30
|
+
itemRenderer: (item, props) => {
|
|
31
|
+
return <MenuItem text={item.label} />
|
|
32
|
+
},
|
|
33
|
+
fill: true,
|
|
34
|
+
filterable: false,
|
|
35
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Select2 as BlueprintSelect,
|
|
4
|
+
Select2Props as BlueprintSelectProps,
|
|
5
|
+
} from "@blueprintjs/select";
|
|
6
|
+
import { ContextOverlayProps } from "./../../index";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* FIXME: Currently we only route the original element through.
|
|
10
|
+
* We should add here basic elemeents and processes for target and selections, etc.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export interface SelectProps<T> extends Omit<
|
|
14
|
+
BlueprintSelectProps<T>,
|
|
15
|
+
"popoverTargetProps" | "popoverContentProps" | "popoverProps" | "popoverRef"
|
|
16
|
+
> {
|
|
17
|
+
/**
|
|
18
|
+
* Props to spread to `ContextOverlay` that is used to display the dropdown.
|
|
19
|
+
*/
|
|
20
|
+
contextOverlayProps?: Partial<Omit<ContextOverlayProps, "content" | "defaultIsOpen" | "disabled" | "fill" | "renderTarget" | "targetTagName">>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Create a Select box without the HTML select element.
|
|
25
|
+
* It is possible to filter options, as well as to add new options if necessary.
|
|
26
|
+
*/
|
|
27
|
+
function Select<T>({contextOverlayProps, ...otherSelectProps}: SelectProps<T>) {
|
|
28
|
+
return (
|
|
29
|
+
<BlueprintSelect<T>
|
|
30
|
+
popoverProps={{ minimal: true, ...contextOverlayProps}}
|
|
31
|
+
{...otherSelectProps}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Select.ofType = BlueprintSelect.ofType;
|
|
37
|
+
|
|
38
|
+
export default Select;
|
|
@@ -25,15 +25,15 @@ $eccgui-color-separation-divider: $pt-divider-black !default;
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&.#{$eccgui}-separation__spacing--tiny {
|
|
28
|
-
margin: $eccgui-size-separation-spacing-medium
|
|
28
|
+
margin: $eccgui-size-separation-spacing-medium * 0.125 0;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&.#{$eccgui}-separation__spacing--small {
|
|
32
|
-
margin: $eccgui-size-separation-spacing-medium
|
|
32
|
+
margin: $eccgui-size-separation-spacing-medium * 0.25 0;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&.#{$eccgui}-separation__spacing--medium {
|
|
36
|
-
margin: $eccgui-size-separation-spacing-medium
|
|
36
|
+
margin: $eccgui-size-separation-spacing-medium * 0.5 0;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&.#{$eccgui}-separation__spacing--large {
|
|
@@ -56,15 +56,15 @@ $eccgui-color-separation-divider: $pt-divider-black !default;
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&.#{$eccgui}-separation__spacing--tiny {
|
|
59
|
-
margin: 0 $eccgui-size-separation-spacing-medium
|
|
59
|
+
margin: 0 $eccgui-size-separation-spacing-medium * 0.125;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
&.#{$eccgui}-separation__spacing--small {
|
|
63
|
-
margin: 0 $eccgui-size-separation-spacing-medium
|
|
63
|
+
margin: 0 $eccgui-size-separation-spacing-medium * 0.25;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&.#{$eccgui}-separation__spacing--medium {
|
|
67
|
-
margin: 0 $eccgui-size-separation-spacing-medium
|
|
67
|
+
margin: 0 $eccgui-size-separation-spacing-medium * 0.5;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
&.#{$eccgui}-separation__spacing--large {
|