@eccenca/gui-elements 6.3.0 → 22.0.0-rc.6
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 +98 -880
- package/LICENSE +202 -0
- package/README.md +56 -1240
- package/blueprint/constants.ts +7 -0
- package/blueprint/toaster/index.tsx +1 -0
- package/dist/cmem/ActivityControl/ActivityControlTypes.d.ts +15 -0
- package/dist/cmem/ActivityControl/ActivityControlTypes.js +1 -0
- package/dist/cmem/ActivityControl/ActivityControlWidget.d.ts +32 -0
- package/dist/cmem/ActivityControl/ActivityControlWidget.js +92 -0
- package/dist/cmem/ActivityControl/ActivityControlWidget.jsx +45 -0
- package/dist/cmem/ActivityControl/ActivityExecutionErrorReportModal.d.ts +12 -0
- package/dist/cmem/ActivityControl/ActivityExecutionErrorReportModal.js +59 -0
- package/dist/cmem/ActivityControl/ActivityExecutionErrorReportModal.jsx +76 -0
- package/dist/cmem/ActivityControl/SilkActivityControl.d.ts +62 -0
- package/dist/cmem/ActivityControl/SilkActivityControl.js +219 -0
- package/dist/cmem/ActivityControl/SilkActivityControl.jsx +217 -0
- package/dist/cmem/ContentBlobToggler/ContentBlobToggler.d.ts +34 -0
- package/dist/cmem/ContentBlobToggler/ContentBlobToggler.js +56 -0
- package/dist/cmem/ContentBlobToggler/ContentBlobToggler.jsx +62 -0
- package/dist/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.d.ts +42 -0
- package/dist/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +52 -0
- package/dist/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.jsx +17 -0
- package/dist/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.d.ts +15 -0
- package/dist/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.js +80 -0
- package/dist/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.jsx +77 -0
- package/dist/cmem/index.d.ts +10 -0
- package/dist/cmem/index.js +67 -0
- package/dist/cmem/markdown/Markdown.d.ts +16 -0
- package/dist/cmem/markdown/Markdown.js +75 -0
- package/dist/cmem/markdown/Markdown.jsx +87 -0
- package/dist/cmem/markdown/highlightSearchWords.js +84 -0
- package/dist/common/Intent/index.d.ts +7 -0
- package/dist/common/Intent/index.js +33 -0
- package/dist/common/utils/openInNewTab.d.ts +3 -0
- package/dist/common/utils/openInNewTab.js +22 -0
- package/dist/components/Accordion/Accordion.d.ts +3 -0
- package/dist/components/Accordion/Accordion.js +31 -0
- package/dist/components/Accordion/Accordion.jsx +21 -0
- package/dist/components/Accordion/AccordionItem.d.ts +15 -0
- package/dist/components/Accordion/AccordionItem.js +37 -0
- package/dist/components/Accordion/AccordionItem.jsx +27 -0
- package/dist/components/Application/ApplicationContainer.d.ts +6 -0
- package/dist/components/Application/ApplicationContainer.js +27 -0
- package/dist/components/Application/ApplicationContainer.jsx +20 -0
- package/dist/components/Application/ApplicationContent.d.ts +22 -0
- package/dist/components/Application/ApplicationContent.js +48 -0
- package/dist/components/Application/ApplicationContent.jsx +34 -0
- package/dist/components/Application/ApplicationHeader.d.ts +3 -0
- package/dist/components/Application/ApplicationHeader.js +29 -0
- package/dist/components/Application/ApplicationHeader.jsx +22 -0
- package/dist/components/Application/ApplicationSidebarNavigation.d.ts +12 -0
- package/dist/components/Application/ApplicationSidebarNavigation.js +36 -0
- package/dist/components/Application/ApplicationSidebarNavigation.jsx +22 -0
- package/dist/components/Application/ApplicationSidebarToggler.d.ts +3 -0
- package/dist/components/Application/ApplicationSidebarToggler.js +28 -0
- package/dist/components/Application/ApplicationSidebarToggler.jsx +19 -0
- package/dist/components/Application/ApplicationTitle.d.ts +40 -0
- package/dist/components/Application/ApplicationTitle.js +53 -0
- package/dist/components/Application/ApplicationTitle.jsx +39 -0
- package/dist/components/Application/ApplicationToolbar.d.ts +3 -0
- package/dist/components/Application/ApplicationToolbar.js +30 -0
- package/dist/components/Application/ApplicationToolbar.jsx +22 -0
- package/dist/components/Application/ApplicationToolbarAction.d.ts +3 -0
- package/dist/components/Application/ApplicationToolbarAction.js +30 -0
- package/dist/components/Application/ApplicationToolbarAction.jsx +22 -0
- package/dist/components/Application/ApplicationToolbarPanel.d.ts +3 -0
- package/dist/components/Application/ApplicationToolbarPanel.js +30 -0
- package/dist/components/Application/ApplicationToolbarPanel.jsx +22 -0
- package/dist/components/Application/ApplicationToolbarSection.d.ts +3 -0
- package/dist/components/Application/ApplicationToolbarSection.js +27 -0
- package/dist/components/Application/ApplicationToolbarSection.jsx +20 -0
- package/dist/components/AutocompleteField/AutoCompleteField.d.ts +110 -0
- package/dist/components/AutocompleteField/AutoCompleteField.js +309 -0
- package/dist/components/AutocompleteField/AutoCompleteField.jsx +295 -0
- package/dist/components/AutocompleteField/autoCompleteFieldUtils.js +42 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +5 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +45 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.jsx +30 -0
- package/dist/components/Breadcrumb/BreadcrumbList.d.ts +24 -0
- package/dist/components/Breadcrumb/BreadcrumbList.js +60 -0
- package/dist/components/Breadcrumb/BreadcrumbList.jsx +35 -0
- package/dist/components/Button/Button.d.ts +58 -0
- package/dist/components/Button/Button.js +84 -0
- package/dist/components/Button/Button.jsx +48 -0
- package/dist/components/Card/Card.d.ts +23 -0
- package/dist/components/Card/Card.js +44 -0
- package/dist/components/Card/Card.jsx +31 -0
- package/dist/components/Card/CardActions.d.ts +14 -0
- package/dist/components/Card/CardActions.js +33 -0
- package/dist/components/Card/CardActions.jsx +27 -0
- package/dist/components/Card/CardActionsAux.d.ts +9 -0
- package/dist/components/Card/CardActionsAux.js +32 -0
- package/dist/components/Card/CardActionsAux.jsx +26 -0
- package/dist/components/Card/CardContent.d.ts +9 -0
- package/dist/components/Card/CardContent.js +32 -0
- package/dist/components/Card/CardContent.jsx +25 -0
- package/dist/components/Card/CardHeader.d.ts +7 -0
- package/dist/components/Card/CardHeader.js +52 -0
- package/dist/components/Card/CardHeader.jsx +41 -0
- package/dist/components/Card/CardOptions.d.ts +11 -0
- package/dist/components/Card/CardOptions.js +35 -0
- package/dist/components/Card/CardOptions.jsx +28 -0
- package/dist/components/Card/CardTitle.d.ts +13 -0
- package/dist/components/Card/CardTitle.js +37 -0
- package/dist/components/Card/CardTitle.jsx +26 -0
- package/dist/components/Card/index.d.ts +8 -0
- package/dist/components/Card/index.js +63 -0
- package/dist/components/Card/index.jsx +8 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +30 -0
- package/dist/components/Checkbox/Checkbox.jsx +22 -0
- package/dist/components/ContextOverlay/ContextMenu.d.ts +3 -0
- package/dist/components/ContextOverlay/ContextMenu.js +48 -0
- package/dist/components/ContextOverlay/ContextMenu.jsx +30 -0
- package/dist/components/ContextOverlay/ContextOverlay.d.ts +3 -0
- package/dist/components/ContextOverlay/ContextOverlay.js +37 -0
- package/dist/components/ContextOverlay/ContextOverlay.jsx +27 -0
- package/dist/components/Dialog/AlertDialog.d.ts +22 -0
- package/dist/components/Dialog/AlertDialog.js +56 -0
- package/dist/components/Dialog/AlertDialog.jsx +39 -0
- package/dist/components/Dialog/Modal.d.ts +25 -0
- package/dist/components/Dialog/Modal.js +67 -0
- package/dist/components/Dialog/Modal.jsx +49 -0
- package/dist/components/Dialog/SimpleDialog.d.ts +41 -0
- package/dist/components/Dialog/SimpleDialog.js +62 -0
- package/dist/components/Dialog/SimpleDialog.jsx +50 -0
- package/dist/components/Form/FieldItem.d.ts +16 -0
- package/dist/components/Form/FieldItem.js +82 -0
- package/dist/components/Form/FieldItem.jsx +48 -0
- package/dist/components/Form/FieldItemRow.d.ts +3 -0
- package/dist/components/Form/FieldItemRow.js +30 -0
- package/dist/components/Form/FieldItemRow.jsx +23 -0
- package/dist/components/Form/FieldSet.d.ts +3 -0
- package/dist/components/Form/FieldSet.js +73 -0
- package/dist/components/Form/FieldSet.jsx +49 -0
- package/dist/components/Grid/Grid.d.ts +3 -0
- package/dist/components/Grid/Grid.js +33 -0
- package/dist/components/Grid/Grid.jsx +25 -0
- package/dist/components/Grid/GridColumn.d.ts +3 -0
- package/dist/components/Grid/GridColumn.js +43 -0
- package/dist/components/Grid/GridColumn.jsx +29 -0
- package/dist/components/Grid/GridRow.d.ts +3 -0
- package/dist/components/Grid/GridRow.js +33 -0
- package/dist/components/Grid/GridRow.jsx +26 -0
- package/dist/components/Icon/Icon.d.ts +20 -0
- package/dist/components/Icon/Icon.js +91 -0
- package/dist/components/Icon/Icon.jsx +88 -0
- package/dist/components/Icon/IconButton.d.ts +17 -0
- package/dist/components/Icon/IconButton.js +49 -0
- package/dist/components/Icon/IconButton.jsx +21 -0
- package/dist/components/Icon/canonicalIconNames.d.ts +10 -0
- package/dist/components/Icon/canonicalIconNames.js +547 -0
- package/dist/components/Icon/canonicalIconNames.jsx +534 -0
- package/dist/components/Iframe/Iframe.d.ts +18 -0
- package/dist/components/Iframe/Iframe.js +92 -0
- package/dist/components/Iframe/Iframe.jsx +79 -0
- package/dist/components/Iframe/IframeModal.d.ts +12 -0
- package/dist/components/Iframe/IframeModal.js +66 -0
- package/dist/components/Iframe/IframeModal.jsx +49 -0
- package/dist/components/Label/Label.d.ts +3 -0
- package/dist/components/Label/Label.js +58 -0
- package/dist/components/Label/Label.jsx +32 -0
- package/dist/components/Link/Link.d.ts +3 -0
- package/dist/components/Link/Link.js +36 -0
- package/dist/components/Link/Link.jsx +22 -0
- package/dist/components/List/List.d.ts +17 -0
- package/dist/components/List/List.js +50 -0
- package/dist/components/List/List.jsx +44 -0
- package/dist/components/Menu/Menu.d.ts +3 -0
- package/dist/components/Menu/Menu.js +29 -0
- package/dist/components/Menu/Menu.jsx +19 -0
- package/dist/components/Menu/MenuDivider.d.ts +3 -0
- package/dist/components/Menu/MenuDivider.js +29 -0
- package/dist/components/Menu/MenuDivider.jsx +19 -0
- package/dist/components/Menu/MenuItem.d.ts +13 -0
- package/dist/components/Menu/MenuItem.js +45 -0
- package/dist/components/Menu/MenuItem.jsx +27 -0
- package/dist/components/Notification/Notification.d.ts +3 -0
- package/dist/components/Notification/Notification.js +79 -0
- package/dist/components/Notification/Notification.jsx +48 -0
- package/dist/components/Notification/Toast.d.ts +3 -0
- package/dist/components/Notification/Toast.js +31 -0
- package/dist/components/Notification/Toast.jsx +21 -0
- package/dist/components/NumericInput/NumericInput.d.ts +4 -0
- package/dist/components/NumericInput/NumericInput.js +14 -0
- package/dist/components/NumericInput/NumericInput.jsx +3 -0
- package/dist/components/OverviewItem/OverviewItem.d.ts +17 -0
- package/dist/components/OverviewItem/OverviewItem.js +45 -0
- package/dist/components/OverviewItem/OverviewItem.jsx +37 -0
- package/dist/components/OverviewItem/OverviewItemActions.d.ts +13 -0
- package/dist/components/OverviewItem/OverviewItemActions.js +32 -0
- package/dist/components/OverviewItem/OverviewItemActions.jsx +26 -0
- package/dist/components/OverviewItem/OverviewItemDepiction.d.ts +6 -0
- package/dist/components/OverviewItem/OverviewItemDepiction.js +28 -0
- package/dist/components/OverviewItem/OverviewItemDepiction.jsx +22 -0
- package/dist/components/OverviewItem/OverviewItemDescription.d.ts +3 -0
- package/dist/components/OverviewItem/OverviewItemDescription.js +27 -0
- package/dist/components/OverviewItem/OverviewItemDescription.jsx +20 -0
- package/dist/components/OverviewItem/OverviewItemLine.d.ts +19 -0
- package/dist/components/OverviewItem/OverviewItemLine.js +35 -0
- package/dist/components/OverviewItem/OverviewItemLine.jsx +29 -0
- package/dist/components/OverviewItem/OverviewItemList.d.ts +26 -0
- package/dist/components/OverviewItem/OverviewItemList.js +38 -0
- package/dist/components/OverviewItem/OverviewItemList.jsx +31 -0
- package/dist/components/OverviewItem/index.d.ts +7 -0
- package/dist/components/OverviewItem/index.js +55 -0
- package/dist/components/OverviewItem/index.jsx +7 -0
- package/dist/components/Pagination/Pagination.d.ts +17 -0
- package/dist/components/Pagination/Pagination.js +80 -0
- package/dist/components/Pagination/Pagination.jsx +81 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.js +12 -0
- package/dist/components/ProgressBar/ProgressBar.jsx +3 -0
- package/dist/components/PropertyValuePair/PropertyName.d.ts +3 -0
- package/dist/components/PropertyValuePair/PropertyName.js +32 -0
- package/dist/components/PropertyValuePair/PropertyName.jsx +21 -0
- package/dist/components/PropertyValuePair/PropertyValue.d.ts +3 -0
- package/dist/components/PropertyValuePair/PropertyValue.js +27 -0
- package/dist/components/PropertyValuePair/PropertyValue.jsx +20 -0
- package/dist/components/PropertyValuePair/PropertyValueList.d.ts +3 -0
- package/dist/components/PropertyValuePair/PropertyValueList.js +27 -0
- package/dist/components/PropertyValuePair/PropertyValueList.jsx +20 -0
- package/dist/components/PropertyValuePair/PropertyValuePair.d.ts +3 -0
- package/dist/components/PropertyValuePair/PropertyValuePair.js +29 -0
- package/dist/components/PropertyValuePair/PropertyValuePair.jsx +23 -0
- package/dist/components/PropertyValuePair/index.d.ts +5 -0
- package/dist/components/PropertyValuePair/index.js +39 -0
- package/dist/components/PropertyValuePair/index.jsx +5 -0
- package/dist/components/RadioButton/RadioButton.d.ts +3 -0
- package/dist/components/RadioButton/RadioButton.js +30 -0
- package/dist/components/RadioButton/RadioButton.jsx +22 -0
- package/dist/components/Separation/Divider.d.ts +3 -0
- package/dist/components/Separation/Divider.js +23 -0
- package/dist/components/Separation/Divider.jsx +7 -0
- package/dist/components/Separation/Spacing.d.ts +9 -0
- package/dist/components/Separation/Spacing.js +27 -0
- package/dist/components/Separation/Spacing.jsx +11 -0
- package/dist/components/SimpleTable/TableContainer.d.ts +3 -0
- package/dist/components/SimpleTable/TableContainer.js +37 -0
- package/dist/components/SimpleTable/TableContainer.jsx +27 -0
- package/dist/components/SimpleTable/index.d.ts +3 -0
- package/dist/components/SimpleTable/index.js +53 -0
- package/dist/components/SimpleTable/index.jsx +3 -0
- package/dist/components/Spinner/Spinner.d.ts +19 -0
- package/dist/components/Spinner/Spinner.js +98 -0
- package/dist/components/Spinner/Spinner.jsx +83 -0
- package/dist/components/Structure/Section.d.ts +3 -0
- package/dist/components/Structure/Section.js +27 -0
- package/dist/components/Structure/Section.jsx +20 -0
- package/dist/components/Structure/SectionHeader.d.ts +3 -0
- package/dist/components/Structure/SectionHeader.js +27 -0
- package/dist/components/Structure/SectionHeader.jsx +20 -0
- package/dist/components/Structure/TitleMainsection.d.ts +3 -0
- package/dist/components/Structure/TitleMainsection.js +35 -0
- package/dist/components/Structure/TitleMainsection.jsx +26 -0
- package/dist/components/Structure/TitlePage.d.ts +3 -0
- package/dist/components/Structure/TitlePage.js +35 -0
- package/dist/components/Structure/TitlePage.jsx +26 -0
- package/dist/components/Structure/TitleSubsection.d.ts +3 -0
- package/dist/components/Structure/TitleSubsection.js +32 -0
- package/dist/components/Structure/TitleSubsection.jsx +23 -0
- package/dist/components/Switch/Switch.d.ts +4 -0
- package/dist/components/Switch/Switch.js +39 -0
- package/dist/components/Switch/Switch.jsx +22 -0
- package/dist/components/Tabs/Tabs.d.ts +24 -0
- package/dist/components/Tabs/Tabs.js +95 -0
- package/dist/components/Tabs/Tabs.jsx +49 -0
- package/dist/components/Tag/Tag.d.ts +27 -0
- package/dist/components/Tag/Tag.js +50 -0
- package/dist/components/Tag/Tag.jsx +46 -0
- package/dist/components/Tag/TagList.d.ts +3 -0
- package/dist/components/Tag/TagList.js +44 -0
- package/dist/components/Tag/TagList.jsx +38 -0
- package/dist/components/TextField/SearchField.d.ts +23 -0
- package/dist/components/TextField/SearchField.js +54 -0
- package/dist/components/TextField/SearchField.jsx +27 -0
- package/dist/components/TextField/TextArea.d.ts +22 -0
- package/dist/components/TextField/TextArea.js +60 -0
- package/dist/components/TextField/TextArea.jsx +36 -0
- package/dist/components/TextField/TextField.d.ts +34 -0
- package/dist/components/TextField/TextField.js +73 -0
- package/dist/components/TextField/TextField.jsx +40 -0
- package/dist/components/Toolbar/Toolbar.d.ts +18 -0
- package/dist/components/Toolbar/Toolbar.js +32 -0
- package/dist/components/Toolbar/Toolbar.jsx +26 -0
- package/dist/components/Toolbar/ToolbarSection.d.ts +22 -0
- package/dist/components/Toolbar/ToolbarSection.js +34 -0
- package/dist/components/Toolbar/ToolbarSection.jsx +28 -0
- package/dist/components/Tooltip/Tooltip.d.ts +17 -0
- package/dist/components/Tooltip/Tooltip.js +40 -0
- package/dist/components/Tooltip/Tooltip.jsx +25 -0
- package/dist/components/Typography/Highlighter.d.ts +18 -0
- package/dist/components/Typography/Highlighter.js +89 -0
- package/dist/components/Typography/Highlighter.jsx +58 -0
- package/dist/components/Typography/HtmlContentBlock.d.ts +6 -0
- package/dist/components/Typography/HtmlContentBlock.js +38 -0
- package/dist/components/Typography/HtmlContentBlock.jsx +31 -0
- package/dist/components/Typography/OverflowText.d.ts +12 -0
- package/dist/components/Typography/OverflowText.js +34 -0
- package/dist/components/Typography/OverflowText.jsx +31 -0
- package/dist/components/Typography/WhiteSpaceContainer.d.ts +5 -0
- package/dist/components/Typography/WhiteSpaceContainer.js +38 -0
- package/dist/components/Typography/WhiteSpaceContainer.jsx +34 -0
- package/dist/components/Typography/classnames.d.ts +7 -0
- package/dist/components/Typography/classnames.js +24 -0
- package/dist/components/Workspace/WorkspaceContent.d.ts +3 -0
- package/dist/components/Workspace/WorkspaceContent.js +34 -0
- package/dist/components/Workspace/WorkspaceContent.jsx +25 -0
- package/dist/components/Workspace/WorkspaceHeader.d.ts +10 -0
- package/dist/components/Workspace/WorkspaceHeader.js +27 -0
- package/dist/components/Workspace/WorkspaceHeader.jsx +20 -0
- package/dist/components/Workspace/WorkspaceMain.d.ts +3 -0
- package/dist/components/Workspace/WorkspaceMain.js +30 -0
- package/dist/components/Workspace/WorkspaceMain.jsx +22 -0
- package/dist/components/Workspace/WorkspaceSide.d.ts +3 -0
- package/dist/components/Workspace/WorkspaceSide.js +34 -0
- package/dist/components/Workspace/WorkspaceSide.jsx +22 -0
- package/dist/components/interfaces.d.ts +3 -0
- package/dist/components/interfaces.js +1 -0
- package/dist/configuration/constants.d.ts +1 -0
- package/dist/configuration/constants.js +9 -0
- package/dist/extensions/react-flow/edges/EdgeDefault.d.ts +10 -0
- package/dist/extensions/react-flow/edges/EdgeDefault.js +62 -0
- package/dist/extensions/react-flow/edges/EdgeDefault.jsx +45 -0
- package/dist/extensions/react-flow/edges/EdgeStep.d.ts +9 -0
- package/dist/extensions/react-flow/edges/EdgeStep.js +27 -0
- package/dist/extensions/react-flow/edges/EdgeStep.jsx +6 -0
- package/dist/extensions/react-flow/edges/EdgeTools.d.ts +12 -0
- package/dist/extensions/react-flow/edges/EdgeTools.js +48 -0
- package/dist/extensions/react-flow/edges/EdgeTools.jsx +32 -0
- package/dist/extensions/react-flow/edges/edgeTypes.d.ts +15 -0
- package/dist/extensions/react-flow/edges/edgeTypes.js +32 -0
- package/dist/extensions/react-flow/edges/utils.d.ts +4 -0
- package/dist/extensions/react-flow/edges/utils.js +41 -0
- package/dist/extensions/react-flow/handles/HandleContent.d.ts +6 -0
- package/dist/extensions/react-flow/handles/HandleContent.js +40 -0
- package/dist/extensions/react-flow/handles/HandleContent.jsx +15 -0
- package/dist/extensions/react-flow/handles/HandleDefault.d.ts +9 -0
- package/dist/extensions/react-flow/handles/HandleDefault.js +33 -0
- package/dist/extensions/react-flow/handles/HandleDefault.jsx +23 -0
- package/dist/extensions/react-flow/index.d.ts +14 -0
- package/dist/extensions/react-flow/index.js +83 -0
- package/dist/extensions/react-flow/minimap/MiniMap.d.ts +8 -0
- package/dist/extensions/react-flow/minimap/MiniMap.js +111 -0
- package/dist/extensions/react-flow/minimap/MiniMap.jsx +83 -0
- package/dist/extensions/react-flow/minimap/utils.d.ts +2 -0
- package/dist/extensions/react-flow/minimap/utils.js +29 -0
- package/dist/extensions/react-flow/nodes/NodeContentExtension.js +56 -0
- package/dist/extensions/react-flow/nodes/NodeDefault.d.ts +133 -0
- package/dist/extensions/react-flow/nodes/NodeDefault.js +223 -0
- package/dist/extensions/react-flow/nodes/NodeDefault.jsx +175 -0
- package/dist/extensions/react-flow/nodes/NodeTools.d.ts +9 -0
- package/dist/extensions/react-flow/nodes/NodeTools.js +58 -0
- package/dist/extensions/react-flow/nodes/NodeTools.jsx +46 -0
- package/dist/extensions/react-flow/nodes/nodeTypes.d.ts +13 -0
- package/dist/extensions/react-flow/nodes/nodeTypes.js +22 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.js +876 -0
- package/dist/legacy-replacements/Button/AffirmativeButton.js +23 -0
- package/dist/legacy-replacements/Button/Button.js +91 -0
- package/dist/legacy-replacements/Button/DismissiveButton.js +23 -0
- package/dist/legacy-replacements/Button/DisruptiveButton.js +23 -0
- package/dist/legacy-replacements/Checkbox/Checkbox.js +66 -0
- package/dist/legacy-replacements/Radio/RadioButton.js +48 -0
- package/dist/legacy-replacements/TextField/TextField.js +96 -0
- package/package.json +151 -70
- package/src/_shame.scss +111 -0
- package/src/cmem/ActivityControl/ActivityControlTypes.ts +28 -0
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +165 -0
- package/src/cmem/ActivityControl/ActivityExecutionErrorReportModal.tsx +55 -0
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +303 -0
- package/src/cmem/ActivityControl/activitycontrol.scss +27 -0
- package/src/cmem/ContentBlobToggler/ContentBlobToggler.tsx +95 -0
- package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +76 -0
- package/src/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.tsx +69 -0
- package/src/cmem/DateTimeDisplay/tests/ElapsedDateTimeDisplay.test.tsx +29 -0
- package/src/cmem/_index.scss +2 -0
- package/src/cmem/index.ts +35 -0
- package/src/cmem/markdown/Markdown.tsx +89 -0
- package/src/cmem/markdown/highlightSearchWords.test.ts +36 -0
- package/src/cmem/markdown/highlightSearchWords.ts +67 -0
- package/src/cmem/markdown/markdown.scss +32 -0
- package/src/common/Intent/index.ts +23 -0
- package/src/common/utils/openInNewTab.ts +17 -0
- package/src/components/Accordion/Accordion.tsx +13 -0
- package/src/components/Accordion/AccordionItem.tsx +73 -0
- package/src/components/Accordion/accordion.scss +96 -0
- package/src/components/Application/ApplicationContainer.tsx +21 -0
- package/src/components/Application/ApplicationContent.tsx +57 -0
- package/src/components/Application/ApplicationHeader.tsx +14 -0
- package/src/components/Application/ApplicationSidebarNavigation.tsx +39 -0
- package/src/components/Application/ApplicationSidebarToggler.tsx +15 -0
- package/src/components/Application/ApplicationTitle.tsx +95 -0
- package/src/components/Application/ApplicationToolbar.tsx +17 -0
- package/src/components/Application/ApplicationToolbarAction.tsx +17 -0
- package/src/components/Application/ApplicationToolbarPanel.tsx +17 -0
- package/src/components/Application/ApplicationToolbarSection.tsx +15 -0
- package/src/components/Application/_config.scss +40 -0
- package/src/components/Application/_content.scss +27 -0
- package/src/components/Application/_header.scss +237 -0
- package/src/components/Application/_sidebar.scss +37 -0
- package/src/components/Application/_toolbar.scss +75 -0
- package/src/components/Application/application.scss +9 -0
- package/src/components/AutocompleteField/AutoCompleteField.tsx +399 -0
- package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +32 -0
- package/src/components/AutocompleteField/autocompletefield.scss +6 -0
- package/src/components/Breadcrumb/BreadcrumbItem.tsx +46 -0
- package/src/components/Breadcrumb/BreadcrumbList.tsx +81 -0
- package/src/components/Breadcrumb/breadcrumb.scss +47 -0
- package/src/components/Button/Button.stories.tsx +199 -0
- package/src/components/Button/Button.test.tsx +37 -0
- package/src/components/Button/Button.tsx +127 -0
- package/src/components/Button/button.scss +55 -0
- package/src/components/Card/Card.tsx +58 -0
- package/src/components/Card/CardActions.tsx +36 -0
- package/src/components/Card/CardActionsAux.tsx +29 -0
- package/src/components/Card/CardContent.tsx +26 -0
- package/src/components/Card/CardHeader.tsx +44 -0
- package/src/components/Card/CardOptions.tsx +32 -0
- package/src/components/Card/CardTitle.tsx +32 -0
- package/src/components/Card/card.scss +138 -0
- package/src/components/Card/index.tsx +17 -0
- package/src/components/Card/stories/Card.stories.tsx +82 -0
- package/src/components/Card/stories/CardActions.stories.tsx +41 -0
- package/src/components/Card/stories/CardContent.stories.tsx +28 -0
- package/src/components/Card/stories/CardHeader.stories.tsx +38 -0
- package/src/components/Card/stories/CardOptions.stories.tsx +27 -0
- package/src/components/Card/stories/CardTitle.stories.tsx +27 -0
- package/src/components/Checkbox/Checkbox.tsx +20 -0
- package/src/components/Checkbox/checkbox.scss +61 -0
- package/src/components/ContextOverlay/ContextMenu.tsx +36 -0
- package/src/components/ContextOverlay/ContextOverlay.tsx +29 -0
- package/src/components/ContextOverlay/contextoverlay.scss +15 -0
- package/src/components/Dialog/AlertDialog.tsx +52 -0
- package/src/components/Dialog/Modal.tsx +86 -0
- package/src/components/Dialog/SimpleDialog.tsx +113 -0
- package/src/components/Dialog/dialog.scss +75 -0
- package/src/components/Dialog/stories/AlertDialog.stories.tsx +42 -0
- package/src/components/Dialog/stories/Modal.stories.tsx +88 -0
- package/src/components/Dialog/stories/SimpleDialog.stories.tsx +39 -0
- package/src/components/Form/FieldItem.tsx +95 -0
- package/src/components/Form/FieldItemRow.tsx +14 -0
- package/src/components/Form/FieldSet.tsx +71 -0
- package/src/components/Form/form.scss +159 -0
- package/src/components/Grid/Grid.tsx +29 -0
- package/src/components/Grid/GridColumn.tsx +33 -0
- package/src/components/Grid/GridRow.tsx +30 -0
- package/src/components/Grid/grid.scss +89 -0
- package/src/components/Icon/Icon.tsx +96 -0
- package/src/components/Icon/IconButton.tsx +59 -0
- package/src/components/Icon/canonicalIconNames.json +120 -0
- package/src/components/Icon/canonicalIconNames.tsx +661 -0
- package/src/components/Icon/icon.scss +40 -0
- package/src/components/Iframe/Iframe.tsx +89 -0
- package/src/components/Iframe/IframeModal.tsx +77 -0
- package/src/components/Iframe/iframe.scss +49 -0
- package/src/components/Label/Label.tsx +43 -0
- package/src/components/Label/label.scss +75 -0
- package/src/components/Link/Link.tsx +19 -0
- package/src/components/Link/link.scss +6 -0
- package/src/components/List/List.tsx +46 -0
- package/src/components/Menu/Menu.tsx +9 -0
- package/src/components/Menu/MenuDivider.tsx +9 -0
- package/src/components/Menu/MenuItem.tsx +46 -0
- package/src/components/Menu/menu.scss +79 -0
- package/src/components/Notification/Notification.tsx +69 -0
- package/src/components/Notification/Toast.tsx +17 -0
- package/src/components/Notification/notification.scss +83 -0
- package/src/components/NumericInput/NumericInput.tsx +4 -0
- package/src/components/OverviewItem/OverviewItem.tsx +61 -0
- package/src/components/OverviewItem/OverviewItemActions.tsx +35 -0
- package/src/components/OverviewItem/OverviewItemDepiction.tsx +29 -0
- package/src/components/OverviewItem/OverviewItemDescription.tsx +16 -0
- package/src/components/OverviewItem/OverviewItemLine.tsx +43 -0
- package/src/components/OverviewItem/OverviewItemList.tsx +58 -0
- package/src/components/OverviewItem/index.tsx +15 -0
- package/src/components/OverviewItem/overviewitem.scss +193 -0
- package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +56 -0
- package/src/components/OverviewItem/stories/OverviewItemActions.stories.tsx +31 -0
- package/src/components/OverviewItem/stories/OverviewItemDepiction.stories.tsx +26 -0
- package/src/components/OverviewItem/stories/OverviewItemDescription.stories.tsx +32 -0
- package/src/components/OverviewItem/stories/OverviewItemLine.stories.tsx +25 -0
- package/src/components/OverviewItem/stories/OverviewItemList.stories.tsx +41 -0
- package/src/components/Pagination/Pagination.tsx +80 -0
- package/src/components/Pagination/pagination.scss +47 -0
- package/src/components/ProgressBar/ProgressBar.tsx +8 -0
- package/src/components/PropertyValuePair/PropertyName.tsx +13 -0
- package/src/components/PropertyValuePair/PropertyValue.tsx +12 -0
- package/src/components/PropertyValuePair/PropertyValueList.tsx +12 -0
- package/src/components/PropertyValuePair/PropertyValuePair.tsx +20 -0
- package/src/components/PropertyValuePair/index.tsx +6 -0
- package/src/components/PropertyValuePair/propertyvalue.scss +56 -0
- package/src/components/RadioButton/RadioButton.tsx +20 -0
- package/src/components/RadioButton/radiobutton.scss +29 -0
- package/src/components/Separation/Divider.tsx +8 -0
- package/src/components/Separation/Spacing.tsx +25 -0
- package/src/components/Separation/separation.scss +77 -0
- package/src/components/SimpleTable/TableContainer.tsx +20 -0
- package/src/components/SimpleTable/index.tsx +4 -0
- package/src/components/SimpleTable/simpletable.scss +121 -0
- package/src/components/Spinner/Spinner.tsx +113 -0
- package/src/components/Spinner/spinner.scss +85 -0
- package/src/components/Structure/Section.tsx +15 -0
- package/src/components/Structure/SectionHeader.tsx +15 -0
- package/src/components/Structure/TitleMainsection.tsx +29 -0
- package/src/components/Structure/TitlePage.tsx +29 -0
- package/src/components/Structure/TitleSubsection.tsx +16 -0
- package/src/components/Structure/_titles.scss +56 -0
- package/src/components/Switch/Switch.tsx +17 -0
- package/src/components/Switch/switch.scss +4 -0
- package/src/components/Tabs/Tabs.tsx +121 -0
- package/src/components/Tabs/tabs.scss +65 -0
- package/src/components/Tag/Tag.stories.tsx +41 -0
- package/src/components/Tag/Tag.tsx +84 -0
- package/src/components/Tag/TagList.tsx +51 -0
- package/src/components/Tag/tag.scss +132 -0
- package/src/components/TagInput/taginput.scss +1 -0
- package/src/components/TextField/SearchField.tsx +71 -0
- package/src/components/TextField/TextArea.tsx +66 -0
- package/src/components/TextField/TextField.tsx +96 -0
- package/src/components/TextField/stories/SearchField.stories.tsx +40 -0
- package/src/components/TextField/stories/TextArea.stories.tsx +39 -0
- package/src/components/TextField/stories/TextField.stories.tsx +99 -0
- package/src/components/TextField/textfield.scss +63 -0
- package/src/components/Toolbar/Toolbar.stories.tsx +41 -0
- package/src/components/Toolbar/Toolbar.tsx +42 -0
- package/src/components/Toolbar/ToolbarSection.tsx +48 -0
- package/src/components/Toolbar/toolbar.scss +52 -0
- package/src/components/Tooltip/Tooltip.tsx +53 -0
- package/src/components/Tooltip/tooltip.scss +37 -0
- package/src/components/Typography/Highlighter.tsx +70 -0
- package/src/components/Typography/HtmlContentBlock.tsx +30 -0
- package/src/components/Typography/OverflowText.tsx +46 -0
- package/src/components/Typography/WhiteSpaceContainer.tsx +41 -0
- package/src/components/Typography/_reset.scss +36 -0
- package/src/components/Typography/classnames.ts +10 -0
- package/src/components/Typography/typography.scss +282 -0
- package/src/components/Workspace/WorkspaceContent.tsx +22 -0
- package/src/components/Workspace/WorkspaceHeader.tsx +20 -0
- package/src/components/Workspace/WorkspaceMain.tsx +14 -0
- package/src/components/Workspace/WorkspaceSide.tsx +18 -0
- package/src/components/Workspace/_header.scss +9 -0
- package/src/components/Workspace/workspace.scss +1 -0
- package/src/components/interfaces.ts +3 -0
- package/src/configuration/_variables.scss +130 -0
- package/src/configuration/constants.ts +2 -0
- package/src/extensions/_index.scss +1 -0
- package/src/extensions/react-flow/_config.scss +16 -0
- package/src/extensions/react-flow/_react-flow.scss +5 -0
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +77 -0
- package/src/extensions/react-flow/edges/EdgeStep.tsx +19 -0
- package/src/extensions/react-flow/edges/EdgeTools.tsx +39 -0
- package/src/extensions/react-flow/edges/_edges.scss +181 -0
- package/src/extensions/react-flow/edges/edgeTypes.ts +24 -0
- package/src/extensions/react-flow/edges/utils.ts +32 -0
- package/src/extensions/react-flow/handles/HandleContent.tsx +39 -0
- package/src/extensions/react-flow/handles/HandleDefault.tsx +29 -0
- package/src/extensions/react-flow/handles/_handles.scss +208 -0
- package/src/extensions/react-flow/index.ts +15 -0
- package/src/extensions/react-flow/minimap/MiniMap.tsx +110 -0
- package/src/extensions/react-flow/minimap/_minimap.scss +79 -0
- package/src/extensions/react-flow/minimap/utils.ts +13 -0
- package/src/extensions/react-flow/nodes/NodeContent.stories.tsx +83 -0
- package/src/extensions/react-flow/nodes/NodeContentExtension.stories.tsx +36 -0
- package/src/extensions/react-flow/nodes/NodeContentExtension.tsx +87 -0
- package/src/extensions/react-flow/nodes/NodeDefault.stories.tsx +138 -0
- package/src/extensions/react-flow/nodes/NodeDefault.tsx +376 -0
- package/src/extensions/react-flow/nodes/NodeTools.tsx +48 -0
- package/src/extensions/react-flow/nodes/_nodes.scss +490 -0
- package/src/extensions/react-flow/nodes/nodeTypes.ts +14 -0
- package/src/includes/blueprintjs/_variables.scss +195 -0
- package/src/includes/carbon-components/_variables.scss +107 -0
- package/src/index.scss +190 -0
- package/src/index.ts +238 -0
- package/src/legacy-replacements/Button/AffirmativeButton.tsx +16 -0
- package/src/legacy-replacements/Button/Button.tsx +73 -0
- package/src/legacy-replacements/Button/DismissiveButton.tsx +16 -0
- package/src/legacy-replacements/Button/DisruptiveButton.tsx +16 -0
- package/src/legacy-replacements/Checkbox/Checkbox.tsx +54 -0
- package/src/legacy-replacements/Radio/RadioButton.tsx +38 -0
- package/src/legacy-replacements/TextField/TextField.tsx +90 -0
- package/src/test/setupTests.js +2 -0
- package/.cached-fonts +0 -1
- package/Ruleset.md +0 -93
- package/additionalLicenses.yml +0 -21
- package/buildConfig.js +0 -25
- package/dist/fonts/iconfont/MaterialIcons-Regular.woff +0 -0
- package/dist/fonts/iconfont/MaterialIcons-Regular.woff2 +0 -0
- package/dist/fonts/iconfont/codepoints +0 -932
- package/dist/fonts/roboto/Black/Roboto-Black.woff +0 -0
- package/dist/fonts/roboto/Black/Roboto-Black.woff2 +0 -0
- package/dist/fonts/roboto/BlackItalic/Roboto-BlackItalic.woff +0 -0
- package/dist/fonts/roboto/BlackItalic/Roboto-BlackItalic.woff2 +0 -0
- package/dist/fonts/roboto/Bold/Roboto-Bold.woff +0 -0
- package/dist/fonts/roboto/Bold/Roboto-Bold.woff2 +0 -0
- package/dist/fonts/roboto/BoldItalic/Roboto-BoldItalic.woff +0 -0
- package/dist/fonts/roboto/BoldItalic/Roboto-BoldItalic.woff2 +0 -0
- package/dist/fonts/roboto/Italic/Roboto-Italic.woff +0 -0
- package/dist/fonts/roboto/Italic/Roboto-Italic.woff2 +0 -0
- package/dist/fonts/roboto/Light/Roboto-Light.woff +0 -0
- package/dist/fonts/roboto/Light/Roboto-Light.woff2 +0 -0
- package/dist/fonts/roboto/LightItalic/Roboto-LightItalic.woff +0 -0
- package/dist/fonts/roboto/LightItalic/Roboto-LightItalic.woff2 +0 -0
- package/dist/fonts/roboto/Medium/Roboto-Medium.woff +0 -0
- package/dist/fonts/roboto/Medium/Roboto-Medium.woff2 +0 -0
- package/dist/fonts/roboto/MediumItalic/Roboto-MediumItalic.woff +0 -0
- package/dist/fonts/roboto/MediumItalic/Roboto-MediumItalic.woff2 +0 -0
- package/dist/fonts/roboto/Regular/Roboto-Regular.woff +0 -0
- package/dist/fonts/roboto/Regular/Roboto-Regular.woff2 +0 -0
- package/dist/fonts/roboto/Thin/Roboto-Thin.woff +0 -0
- package/dist/fonts/roboto/Thin/Roboto-Thin.woff2 +0 -0
- package/dist/fonts/roboto/ThinItalic/Roboto-ThinItalic.woff +0 -0
- package/dist/fonts/roboto/ThinItalic/Roboto-ThinItalic.woff2 +0 -0
- package/docs/README.md +0 -953
- package/docs/docTemplate.md +0 -140
- package/es5/component.js +0 -6686
- package/index.js +0 -136
- package/jest.config.js +0 -42
- package/src/_configuration.default.scss +0 -97
- package/src/_configuration.mdl.scss +0 -518
- package/src/elements/Alert/Alert.jsx +0 -141
- package/src/elements/Alert/Error.jsx +0 -22
- package/src/elements/Alert/Info.jsx +0 -21
- package/src/elements/Alert/Success.jsx +0 -20
- package/src/elements/Alert/Warning.jsx +0 -19
- package/src/elements/Alert/_alert.scss +0 -93
- package/src/elements/Alert/index.js +0 -13
- package/src/elements/AutoCompleteBox/AutoCompleteBox.jsx +0 -149
- package/src/elements/AutoCompleteBox/_autocomplete.scss +0 -33
- package/src/elements/Breadcrumbs/BreadcrumbItem.jsx +0 -34
- package/src/elements/Breadcrumbs/BreadcrumbList.jsx +0 -56
- package/src/elements/Breadcrumbs/_breadcrumbs.scss +0 -47
- package/src/elements/Breadcrumbs/index.js +0 -7
- package/src/elements/Button/AffirmativeButton.jsx +0 -73
- package/src/elements/Button/Button.jsx +0 -216
- package/src/elements/Button/DismissiveButton.jsx +0 -77
- package/src/elements/Button/DisruptiveButton.jsx +0 -74
- package/src/elements/Button/ProgressButton.jsx +0 -95
- package/src/elements/Button/_button.scss +0 -61
- package/src/elements/Button/index.js +0 -13
- package/src/elements/Card/Card.jsx +0 -61
- package/src/elements/Card/CardActions.jsx +0 -37
- package/src/elements/Card/CardTitle.jsx +0 -78
- package/src/elements/Card/FloatingActionList.jsx +0 -260
- package/src/elements/Card/_card.scss +0 -179
- package/src/elements/Card/index.js +0 -18
- package/src/elements/Checkbox/Checkbox.jsx +0 -113
- package/src/elements/Checkbox/_checkbox.scss +0 -14
- package/src/elements/Chip/Chip.jsx +0 -141
- package/src/elements/Chip/ChipVisual.jsx +0 -88
- package/src/elements/Chip/_chip.scss +0 -82
- package/src/elements/Chip/index.js +0 -7
- package/src/elements/ContextMenu/ContextMenu.jsx +0 -101
- package/src/elements/ContextMenu/_contextmenu.scss +0 -23
- package/src/elements/DateField/DateField.jsx +0 -178
- package/src/elements/DateField/DateTimefield.jsx +0 -20
- package/src/elements/DateField/_datefield.scss +0 -116
- package/src/elements/DateField/index.js +0 -7
- package/src/elements/Dialog/BaseDialog.jsx +0 -161
- package/src/elements/Dialog/ConfirmationDialog.jsx +0 -48
- package/src/elements/Dialog/_dialog.scss +0 -58
- package/src/elements/Dialog/index.js +0 -7
- package/src/elements/Footer/Footer.jsx +0 -171
- package/src/elements/Footer/_footer.scss +0 -17
- package/src/elements/Grid/_grid.scss +0 -18
- package/src/elements/Icon/Icon.jsx +0 -97
- package/src/elements/Icon/canonicalicons.json +0 -32
- package/src/elements/Icon/canonicaltooltips.json +0 -32
- package/src/elements/Icon/icontable.json +0 -934
- package/src/elements/Layout/_layout.scss +0 -82
- package/src/elements/NotAvailable/NotAvailable.jsx +0 -87
- package/src/elements/NotAvailable/_notavailable.scss +0 -18
- package/src/elements/Pagination/Pagination.jsx +0 -431
- package/src/elements/Pagination/_pagination.scss +0 -98
- package/src/elements/Progressbar/Progressbar.jsx +0 -34
- package/src/elements/Progressbar/_progressbar.scss +0 -22
- package/src/elements/Radio/RadioButton.jsx +0 -129
- package/src/elements/Radio/RadioGroup.jsx +0 -35
- package/src/elements/Radio/_radio.scss +0 -46
- package/src/elements/Radio/index.js +0 -7
- package/src/elements/SelectBox/SelectBox.jsx +0 -321
- package/src/elements/SelectBox/_selectbox.scss +0 -144
- package/src/elements/Spinner/Spinner.jsx +0 -44
- package/src/elements/Spinner/_spinner.scss +0 -20
- package/src/elements/Switch/Switch.jsx +0 -38
- package/src/elements/Table/Table.jsx +0 -100
- package/src/elements/Table/TableBody.jsx +0 -66
- package/src/elements/Table/TableCell.jsx +0 -94
- package/src/elements/Table/TableHead.jsx +0 -66
- package/src/elements/Table/TableRow.jsx +0 -78
- package/src/elements/Table/_datatable.scss +0 -78
- package/src/elements/Table/_table.scss +0 -143
- package/src/elements/Tabs/Tabs.jsx +0 -116
- package/src/elements/TextField/TextField.jsx +0 -172
- package/src/elements/TextField/_textfield.scss +0 -80
- package/src/elements/Tooltip/Tooltip.jsx +0 -3
- package/src/elements/Tooltip/_tooltip.scss +0 -21
- package/src/elements/Version/Version.jsx +0 -19
- package/src/hocs/ScrollingHOC.js +0 -122
- package/src/main.scss +0 -83
- package/src/scss/_adjustments.scss +0 -16
- package/src/scss/_helpers.scss +0 -29
- package/src/scss/_iconfont.scss +0 -35
- package/src/scss/_patches.scss +0 -19
- package/src/scss/_roboto.scss +0 -30
- package/src/scss/main.build-css.scss +0 -4
- package/src/utils/classnameSeperator.js +0 -10
- package/src/utils/extendedOnChangeBoolean.jsx +0 -14
- package/src/utils/uniqueId.jsx +0 -36
- package/style/test.scss +0 -30
package/README.md
CHANGED
|
@@ -1,1271 +1,87 @@
|
|
|
1
|
-
#
|
|
1
|
+
# eccenca GUI elements
|
|
2
2
|
|
|
3
|
-
Collection of
|
|
3
|
+
Collection of React elements based on [Palantir BlueprintJS](https://blueprintjs.com/) and [IBM Carbon](https://www.carbondesignsystem.com/), used for [eccenca Corporate Memory](https://eccenca.com/products/enterprise-knowledge-graph-platform-corporate-memory) applications.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
- `ScrollingHOC`: It provides methods to scroll mounted React components into the viewport.
|
|
5
|
+
## How to install
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
We provide packages via [npm registry of GitHub Packages](https://npm.pkg.github.com), you need to enhance your project `.npmrc` file by:
|
|
9
8
|
|
|
10
|
-
The scrolling mixin provides methods to scroll a mounted React element or component into the visible viewport of a scrollable area:
|
|
11
|
-
|
|
12
|
-
* `scrollIntoView()`: use this method within a component to scroll it into the visible viewport
|
|
13
|
-
* `ScrollingMixin.scrollElementIntoView(ReactOrDomElement)`: use this method from outside an element to scroll it into the visible viewport
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
import { ScrollingHOC } from '@eccenca/gui-elements';
|
|
17
|
-
const Widget = React.createClass({
|
|
18
|
-
|
|
19
|
-
componentDidMount() {
|
|
20
|
-
const options = {
|
|
21
|
-
animationTime: 500, // (optional) integer, time in milliseconds
|
|
22
|
-
topOffset: 0, // (optional) integer, pixels to offset top alignment
|
|
23
|
-
callbackFinished: function(result) {}, // (optional) function, result parameter is currently 'cancelled' or 'completed',
|
|
24
|
-
scrollX: true // (optional) boolean, whether overflowX should be checked to decide whether an element is scrollable,
|
|
25
|
-
scrollY: true // (optional) boolean, whether overflowY should be checked to decide whether an element is scrollable,
|
|
26
|
-
}
|
|
27
|
-
this.scrollIntoView(
|
|
28
|
-
options // optional
|
|
29
|
-
);
|
|
30
|
-
},
|
|
31
|
-
// ...
|
|
32
|
-
});
|
|
33
|
-
export default ScrollingHOC(Widget)
|
|
34
9
|
```
|
|
35
|
-
|
|
36
|
-
It is important that the component height can be calculated correctly, `scrollIntoView()` should be used after all contents are loaded.
|
|
37
|
-
|
|
38
|
-
Use another method from the mixin to scroll other elements into the viewport.
|
|
39
|
-
It's important to use references to active DOM elements or mounted React components, e.g. by using the React ref pattern.
|
|
40
|
-
|
|
41
|
-
```js
|
|
42
|
-
// use it from outside of the component that needs to be scrolled into the visible viewport
|
|
43
|
-
import {Card, Button, ScrollingHOC} from '@eccenca/gui-elements';
|
|
44
|
-
const Widget = React.createClass({
|
|
45
|
-
handleScroll() {
|
|
46
|
-
const options = {
|
|
47
|
-
// animationTime: 500, // (optional) integer, time in milliseconds
|
|
48
|
-
// topOffset: 0, // (optional) integer, pixels to offset top alignment
|
|
49
|
-
// callbackFinished: function(result) {}, // (optional) function, result parameter is currently 'cancelled' or 'completed'
|
|
50
|
-
}
|
|
51
|
-
this.props.scrollElementIntoView(
|
|
52
|
-
this.myCard,
|
|
53
|
-
options, // optional parameter
|
|
54
|
-
);
|
|
55
|
-
},
|
|
56
|
-
// ...
|
|
57
|
-
render() {
|
|
58
|
-
return <div>
|
|
59
|
-
<Card ref={card => this.myCard = card}>
|
|
60
|
-
<!-- ... -->
|
|
61
|
-
</Card>
|
|
62
|
-
<Button
|
|
63
|
-
onClick
|
|
64
|
-
>
|
|
65
|
-
Scroll card into viewport
|
|
66
|
-
</Button>
|
|
67
|
-
</div>
|
|
68
|
-
},
|
|
69
|
-
});
|
|
10
|
+
@eccenca:registry=https://npm.pkg.github.com
|
|
70
11
|
```
|
|
71
12
|
|
|
72
|
-
|
|
13
|
+
It could be also included as Git submodule to your projects and used via yarn link or yarn workspaces.
|
|
73
14
|
|
|
74
|
-
|
|
75
|
-
Includes libraries from:
|
|
15
|
+
## How to use
|
|
76
16
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
-
|
|
17
|
+
* To include SCSS styles for all basic components add `@import "~@eccenca/gui-elements/index";` into your main SCSS file.
|
|
18
|
+
* To use extensions and special Corporate Memory components the include of `@eccenca/gui-elements/extensions` and `@eccenca/gui-elements/cmem` is necessary
|
|
19
|
+
* To include only the default configuration add `@import "~@eccenca/gui-elements/src/configuration/variables;` into your SCSS file.
|
|
80
20
|
|
|
81
|
-
###
|
|
21
|
+
### Justify default configuration
|
|
82
22
|
|
|
83
|
-
|
|
23
|
+
All [configuration variables](https://github.com/eccenca/gui-elements/blob/develop/src/configuration/_variables.scss) can be set before importing the full library or the default configuration but for the main changes you should need to change only a few parameters:
|
|
84
24
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
25
|
+
* Basic colors
|
|
26
|
+
* `$eccgui-color-primary`: color for very important buttons and switches
|
|
27
|
+
* `$eccgui-color-primary-contrast`: readable text color used on primary color areas
|
|
28
|
+
* `$eccgui-color-accent`: color for most conformation buttons, links, etc
|
|
29
|
+
* `$eccgui-color-accent-contrast`: readable text color used on accent color areas
|
|
30
|
+
* `$eccgui-color-applicationheader-text`
|
|
31
|
+
* `$eccgui-color-applicationheader-background`
|
|
32
|
+
* `$eccgui-color-workspace-text`
|
|
33
|
+
* `$eccgui-color-workspace-background`
|
|
34
|
+
* Basic sizes
|
|
35
|
+
* `$eccgui-size-typo-base`: size including absolute unit, currently only `px` is supported
|
|
36
|
+
* `$eccgui-size-typo-base-lineheight`: only ratio to font size, no unit!
|
|
37
|
+
* `$eccgui-size-type-levelratio`: ratio without unit! used to calculate different text sizes based on `$eccgui-size-typo-base`
|
|
38
|
+
* `$eccgui-size-block-whitespace`: white space between block level elements, currently only `px` is supported
|
|
88
39
|
|
|
89
|
-
|
|
40
|
+
## How to develop
|
|
90
41
|
|
|
91
|
-
|
|
42
|
+
### Allowed branch names
|
|
92
43
|
|
|
93
|
-
|
|
94
|
-
@import '~@eccenca/gui-elements/src/configuration.default';
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
#### Justify default configuration
|
|
98
|
-
|
|
99
|
-
Base configuration can be defined by only 7 variables, they need to be set before importing `~@eccenca/gui-elements/src/configuration.default`.
|
|
44
|
+
Aside from the `main` and `develop` branches we have some rules for branch names and they must be prefixed:
|
|
100
45
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
- Sizes:
|
|
107
|
-
- `$ecc-size-typo-base`:
|
|
108
|
-
- `$ecc-size-typo-base-lineheight`:
|
|
109
|
-
- `$ecc-size-type-levelratio`:
|
|
46
|
+
* `feature/*`: feature branches introducing new elements and functionality
|
|
47
|
+
* `bugfix/*`: used to fix bugs without extending functionality, leading to patch release of the most recent version
|
|
48
|
+
* `hotfix/*`: used to fix bugs of past versions, they can tagged directly by the developer to publish packages (not implemented yet!)
|
|
49
|
+
* `temp/*`: branches for testing purposes, they wont get merged, only deleted from time to time
|
|
50
|
+
* `release/*`: release branches, they must be created from latest `develop` via the GitHub interface
|
|
110
51
|
|
|
111
|
-
|
|
52
|
+
### Running tests
|
|
112
53
|
|
|
113
|
-
|
|
54
|
+
Run the Jest tests with `yarn test`, for test coverage information run `yarn test:coverage`.
|
|
55
|
+
You can check easily code for code errors by `yarn compile` (JS/Typescript) and `yarn compile-scss` (SASS).
|
|
114
56
|
|
|
115
|
-
|
|
57
|
+
### Running Storybook
|
|
116
58
|
|
|
59
|
+
All storiy source files are kept in the respective components, extensions and cmem folders, using `*.stories.tsx` file name pattern.
|
|
60
|
+
Run the storybook by
|
|
117
61
|
|
|
118
|
-
## Helpers
|
|
119
|
-
|
|
120
|
-
Include helper function in your Sass files:
|
|
121
|
-
|
|
122
|
-
```scss
|
|
123
|
-
@import "~@eccenca/gui-elements/src/scss/helpers";
|
|
124
62
|
```
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
- `to_color()`: function to transform string into color value type
|
|
129
|
-
|
|
130
|
-
### to_color($color_value)
|
|
131
|
-
|
|
132
|
-
Returns correct Sass color value, even if `$color_value` parameter is a string value.
|
|
133
|
-
|
|
134
|
-
Examples:
|
|
135
|
-
|
|
136
|
-
```
|
|
137
|
-
to_color("#fff") => white
|
|
138
|
-
to_color("rgb(255, 255, 255)") => white
|
|
139
|
-
to_color("255, 255, 255") => white
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Parameters:
|
|
143
|
-
|
|
144
|
-
* `$color_value` (Sass::Script::Value::String) or (Sass::Script::Value::Color)
|
|
145
|
-
|
|
146
|
-
Returns:
|
|
147
|
-
|
|
148
|
-
* (Sass::Script::Value::Color)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
## GUI elements
|
|
152
|
-
|
|
153
|
-
- `Alert`: A message box which is optionally dismissable, includes `Error`, `Info`, `Success` and `Warning`.
|
|
154
|
-
- `AutoCompleteBox`: A auto-completion box (wrapper around `SelectBox`) which renders label, value and an optional description.
|
|
155
|
-
- `BaseDialog`: A custom message box with optional Buttons
|
|
156
|
-
- `Button`: A simple Button which also may contain icons
|
|
157
|
-
- `BreadcrumbList`: A simple element to create breadcrumb navigation
|
|
158
|
-
- `Card`: An application card section including title, menu, content section and button row
|
|
159
|
-
- `Content`: container for all page content elements beside header, drawer and footer
|
|
160
|
-
- `Checkbox`: A checkbox with optional description
|
|
161
|
-
- `Chip`: A chip element for visualized status
|
|
162
|
-
- `ConfirmationDialog`: A message box with Buttons for confirmation and cancellation
|
|
163
|
-
- `ContextMenu`: A context menu with menu items
|
|
164
|
-
- `DateField`: A date field input with calendar picker
|
|
165
|
-
- `DateTimeField`: A date and time field input with calendar picker
|
|
166
|
-
- `FloatingActionList`: provides FAB functionality for one and more actions, mainly for usage within cards
|
|
167
|
-
- `Icon`: Icons with optional tooltips. Uses [mdl icons](https://design.google.com/icons/) which can be used with their ligature names.
|
|
168
|
-
- `Layout`: container of the MDL application
|
|
169
|
-
- `NotAvailable`: very simple element to use as "not available" placeholder information
|
|
170
|
-
- `Nothing`: Literally Nothing
|
|
171
|
-
- `Pagination`: A page control element
|
|
172
|
-
- `Progressbar`: Progressbar which may be placed globally or locally in a component
|
|
173
|
-
- `RadioGroup` and `Radio`: A radio button with optional label and grouping
|
|
174
|
-
- `SelectBox`: A selection box for choosing predefined values
|
|
175
|
-
- `Spinner`: Progressbar which may be placed globally or locally in a component
|
|
176
|
-
- `Switch`: A simple binary switch (a nicer checkbox)
|
|
177
|
-
- `Table`: A simple table which can be enriched with react elements as content.
|
|
178
|
-
- `Tabs`: A tabs container which manages tabbing behaviour
|
|
179
|
-
- `TextField`: A text field with floating label. Wrapper around [React-MDL Textfield]()
|
|
180
|
-
- `Version`: A normalised string output of product version
|
|
181
|
-
|
|
182
|
-
Usage is as simple as importing and rendering the components.
|
|
183
|
-
|
|
184
|
-
### Alert (Error, Info, Success and Warning)
|
|
185
|
-
|
|
186
|
-
```js
|
|
187
|
-
import { Alert, Error, Info, Success, Warning } from '@eccenca/gui-elements';
|
|
188
|
-
|
|
189
|
-
const Page = React.createClass({
|
|
190
|
-
// template rendering
|
|
191
|
-
onDismiss(){ },
|
|
192
|
-
render() {
|
|
193
|
-
return (
|
|
194
|
-
<Alert
|
|
195
|
-
border={true} // true|false, default is false
|
|
196
|
-
vertSpacing={true} // true|false, default is false
|
|
197
|
-
handlerDismiss={this.onDismiss} // function, onClick handler, necessary if icon button should be rendered
|
|
198
|
-
labelDismiss="label for handler" // string, default: "Hide"
|
|
199
|
-
iconDismiss="expand_less" // string, default: "close"
|
|
200
|
-
>
|
|
201
|
-
<p>This is a</p>
|
|
202
|
-
<p>untyped message.</p>
|
|
203
|
-
</Alert>
|
|
204
|
-
<Info border={true} vertSpacing={true} >
|
|
205
|
-
info
|
|
206
|
-
</Info>
|
|
207
|
-
<Success border={true} vertSpacing={true} >
|
|
208
|
-
success
|
|
209
|
-
</Success>
|
|
210
|
-
<Warning border={true} vertSpacing={true} >
|
|
211
|
-
warning
|
|
212
|
-
</Warning>
|
|
213
|
-
<Error handlerDismiss={this.onDismiss} labelDismiss="remove error" vertSpacing={true} >
|
|
214
|
-
error with tooltip
|
|
215
|
-
</Error>
|
|
216
|
-
)
|
|
217
|
-
},
|
|
218
|
-
// ....
|
|
219
|
-
});
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### AutoCompleteBox
|
|
223
|
-
|
|
224
|
-
The AutoCompleteBox wraps `SelectBox`, it takes the same properties. The key differences are:
|
|
225
|
-
|
|
226
|
-
- rendering of multi-line options with label, value and description.
|
|
227
|
-
- If value and label are the same, only one is rendered
|
|
228
|
-
- descriptions are optional
|
|
229
|
-
- the options have to be an array of objects
|
|
230
|
-
- it is always searchable, while a SelectBox can be de-activated
|
|
231
|
-
|
|
232
|
-
```js
|
|
233
|
-
import { AutoCompleteBox } from '@eccenca/gui-elements';
|
|
234
|
-
|
|
235
|
-
const Page = React.createClass({
|
|
236
|
-
getInitialState(){
|
|
237
|
-
return {
|
|
238
|
-
value: null,
|
|
239
|
-
};
|
|
240
|
-
},
|
|
241
|
-
selectBoxOnChange(value){
|
|
242
|
-
this.setState({
|
|
243
|
-
value
|
|
244
|
-
});
|
|
245
|
-
},
|
|
246
|
-
// template rendering
|
|
247
|
-
render() {
|
|
248
|
-
return (
|
|
249
|
-
<AutoCompleteBox
|
|
250
|
-
placeholder="Label for AutoCompleteBox"
|
|
251
|
-
options={[{label: 'Label', description: 'This is a description', value: '5000 Examples'}]}
|
|
252
|
-
optionsOnTop={true} // option list opens up on top of select input (default: false)
|
|
253
|
-
value={this.state.value}
|
|
254
|
-
onChange={this.selectBoxOnChange}
|
|
255
|
-
creatable={true} // allow creation of new values
|
|
256
|
-
multi={true} // allow multi selection
|
|
257
|
-
clearable={false} // hide 'remove all selected values' button
|
|
258
|
-
handleValueChange={(value) => console.log(value)} // pass user input directly to parrent
|
|
259
|
-
showLabel={true} // define if label in options should be shown (default: true)
|
|
260
|
-
showValue={true} // define if value in options should be shown (default: true)
|
|
261
|
-
showDescription={true} // define if description in options should be shown (default: true)
|
|
262
|
-
/>
|
|
263
|
-
)
|
|
264
|
-
},
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
### Button
|
|
270
|
-
|
|
271
|
-
Read the [GUI spec about button usage](https://confluence.brox.de/display/ECCGMBH/GUI+Specifications#GUISpecifications-Buttons).
|
|
272
|
-
|
|
273
|
-
```js
|
|
274
|
-
import {Button, AffirmativeButton, DismissiveButton, DisruptiveButton} from '@eccenca/gui-elements';
|
|
275
|
-
|
|
276
|
-
const Page = React.createClass({
|
|
277
|
-
// template rendering
|
|
278
|
-
render() {
|
|
279
|
-
return (
|
|
280
|
-
<Button>
|
|
281
|
-
Simple flat button
|
|
282
|
-
</Button>
|
|
283
|
-
|
|
284
|
-
// according MDL-API, @see https://getmdl.io/components/index.html#buttons-section
|
|
285
|
-
<Button
|
|
286
|
-
raised={true} // true | false (default), use it in cases when flat buttons not exposed enough
|
|
287
|
-
accent={true} // true | false (default), use configured accent color
|
|
288
|
-
colored={true} // true | false (default), use configured primary color
|
|
289
|
-
ripple={false} // true | false (default), activate ripple effect on button
|
|
290
|
-
>
|
|
291
|
-
A Button
|
|
292
|
-
</Button>
|
|
293
|
-
|
|
294
|
-
// Icon button and Floating action button (FAB)
|
|
295
|
-
<Button
|
|
296
|
-
iconName="more_vert" // icon name, @see https://material.io/icons/
|
|
297
|
-
tooltip="This is a Test!" // tooltip, some icons have fallback tooltips, set it to false if you need to prevent them
|
|
298
|
-
fabSize="mini" // use fabSize only if it is a FAB. "mini" | "large" (default)
|
|
299
|
-
// you can apply all other button properties on icon buttons, too (e.g. affirmative, accent, ripple, ...)
|
|
300
|
-
/>
|
|
301
|
-
|
|
302
|
-
// use button elements to specify meaning of triggered action
|
|
303
|
-
// you can combine it with button properties like raised, iconName and ripple
|
|
304
|
-
<AffirmativeButton>
|
|
305
|
-
Affirmative action
|
|
306
|
-
</AffirmativeButton>
|
|
307
|
-
<DismissiveButton
|
|
308
|
-
raised={true}
|
|
309
|
-
>
|
|
310
|
-
Dismissive action
|
|
311
|
-
</DismissiveButton>
|
|
312
|
-
<DisruptiveButton
|
|
313
|
-
iconName="delete"
|
|
314
|
-
tooltip="Remove data"
|
|
315
|
-
/>
|
|
316
|
-
)
|
|
317
|
-
},
|
|
318
|
-
// ....
|
|
319
|
-
});
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
Some special class names provide extra functionality:
|
|
323
|
-
|
|
324
|
-
* `mdl-button--clearance`: add it to buttons that clear input fields or whole input blocks, works with all button types.
|
|
325
|
-
|
|
326
|
-
#### ProgressButton
|
|
327
|
-
|
|
328
|
-
There is a special version of the Button element that can be used to visualize a running process. `<ProgressButton/>` elements are shown as raised disabled buttons but this behaviour can be overwritten.
|
|
329
|
-
|
|
330
|
-
```js
|
|
331
|
-
import {ProgressButton} from '@eccenca/gui-elements';
|
|
332
|
-
import rxmq from 'ecc-messagebus';
|
|
333
|
-
|
|
334
|
-
// channel event which updates progressTopic
|
|
335
|
-
rxmq.channel('yourchannel').subject('progressNumber').onNext({
|
|
336
|
-
progress: 30, // integer, progress in percentage
|
|
337
|
-
lastUpdate: 'August 31st 2017, 9:48:24 am.', // string which should be a date, require tooltip to be set
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
const Page = React.createClass({
|
|
341
|
-
// template rendering
|
|
342
|
-
render() {
|
|
343
|
-
return (
|
|
344
|
-
<ProgressButton
|
|
345
|
-
progress={0..100} // integer, if not set or 0 then an infinite progress bar is used, default: 0
|
|
346
|
-
progressTopic={rxmq.channel('yourchannel').subject('progressNumber')} // message queue subject, if given that the button element listens to it for update objects that include `progressNumber` property with a value between 0 and 100
|
|
347
|
-
tooltip={'running'} // string, tooltip for progress bar, if a progress number is known (via option or message queue) then the tooltip is extenden by a colon, the value and a percent char
|
|
348
|
-
raised={true|false} // boolean, default: true
|
|
349
|
-
disabled={true|false} // boolean, default: true
|
|
350
|
-
>
|
|
351
|
-
Working!
|
|
352
|
-
</ProgressButton>
|
|
353
|
-
)
|
|
354
|
-
},
|
|
355
|
-
// ....
|
|
356
|
-
});
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
You can use `progress` and `progressTopic` options directly on `<AffirmativeButton/>`, `<DismissiveButton/>` and `<DisruptiveButton/>` elements.
|
|
360
|
-
|
|
361
|
-
### Breadcrumb
|
|
362
|
-
|
|
363
|
-
The are two simple React elements to create breadcrumb navigation.
|
|
364
|
-
|
|
365
|
-
```js
|
|
366
|
-
import {
|
|
367
|
-
BreadcrumbList,
|
|
368
|
-
BreadcrumbItem,
|
|
369
|
-
} from '@eccenca/gui-elements';
|
|
370
|
-
|
|
371
|
-
const Page = React.createClass({
|
|
372
|
-
// template rendering
|
|
373
|
-
render() {
|
|
374
|
-
return (
|
|
375
|
-
<BreadcrumbList
|
|
376
|
-
className={'my-own-class'} // (optional) string, element can be enhanced with additional CSS classes
|
|
377
|
-
>
|
|
378
|
-
<BreadcrumbItem
|
|
379
|
-
onClick={function(){}} // (optional) function, breadcrumb is rendered as HTML button element
|
|
380
|
-
>
|
|
381
|
-
Button
|
|
382
|
-
</BreadcrumbItem>
|
|
383
|
-
<BreadcrumbItem
|
|
384
|
-
href="#" // (optional) string, breadcrumb is rendered as HTML link anchor
|
|
385
|
-
>
|
|
386
|
-
Link
|
|
387
|
-
</BreadcrumbItem>
|
|
388
|
-
<BreadcrumbItem>
|
|
389
|
-
Span
|
|
390
|
-
</BreadcrumbItem>
|
|
391
|
-
</BreadcrumbList>
|
|
392
|
-
)
|
|
393
|
-
},
|
|
394
|
-
// ....
|
|
395
|
-
});
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
### Card
|
|
399
|
-
|
|
400
|
-
```js
|
|
401
|
-
import {
|
|
402
|
-
Card,
|
|
403
|
-
CardTitle,
|
|
404
|
-
CardMenu,
|
|
405
|
-
CardContent,
|
|
406
|
-
CardActions
|
|
407
|
-
} from '@eccenca/gui-elements';
|
|
408
|
-
|
|
409
|
-
const Page = React.createClass({
|
|
410
|
-
// template rendering
|
|
411
|
-
render() {
|
|
412
|
-
return (
|
|
413
|
-
<Card
|
|
414
|
-
className={'my-own-class'} // string, element can be enhanced with additional CSS classes
|
|
415
|
-
stretch={false|true} // boolean, should the card element use full width of available space, default: true
|
|
416
|
-
shadow={0..8} // integer, z-coordinate of card, amount of shadow applied to the card, 0 (off), 1 (2dp) to 8 {24dp}, default: 1
|
|
417
|
-
fixedActions={false|true} // boolean, if the card contains a fixed CardActions button row, default: false
|
|
418
|
-
reducedSize={false|true} // boolean, renders the card with reduced paddings and marging, default: false
|
|
419
|
-
>
|
|
420
|
-
<CardTitle
|
|
421
|
-
className="my-own-class"
|
|
422
|
-
border={false|true} // boolean, horizontal border under title, default: true
|
|
423
|
-
documentLevel={'h1'..'h6'} // string, headline level of title, parameter only used if title content is a string (not a react/dom element), default: 'h2'
|
|
424
|
-
>
|
|
425
|
-
Card title
|
|
426
|
-
</CardTitle>
|
|
427
|
-
<CardMenu
|
|
428
|
-
className="my-own-class"
|
|
429
|
-
>
|
|
430
|
-
<!-- use the ContextMenu element here, or simple one or more icon buttons, no restrictions here -->
|
|
431
|
-
<ContextMenu>
|
|
432
|
-
<MenuItem>Menu item 1</MenuItem>
|
|
433
|
-
<MenuItem>Menu item 2</MenuItem>
|
|
434
|
-
</ContextMenu>
|
|
435
|
-
</CardMenu>
|
|
436
|
-
<CardContent
|
|
437
|
-
className="my-own-class"
|
|
438
|
-
>
|
|
439
|
-
<!-- the content of the application card, no restriction here -->
|
|
440
|
-
</CardContent>
|
|
441
|
-
<CardActions
|
|
442
|
-
className="my-own-class"
|
|
443
|
-
border={false|true} // boolean, horizontal border top of button row, default: true
|
|
444
|
-
fixed={false|true} // boolean, if button row should be always visible sticky on botton when card is partly shown, default: false
|
|
445
|
-
>
|
|
446
|
-
<!-- no restrictions on action buttons here -->
|
|
447
|
-
</CardActions>
|
|
448
|
-
</Card>
|
|
449
|
-
)
|
|
450
|
-
},
|
|
451
|
-
// ....
|
|
452
|
-
});
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
### Content
|
|
456
|
-
|
|
457
|
-
```js
|
|
458
|
-
import {Content} from '@eccenca/gui-elements';
|
|
459
|
-
|
|
460
|
-
const Page = React.createClass({
|
|
461
|
-
// template rendering
|
|
462
|
-
render() {
|
|
463
|
-
return (
|
|
464
|
-
<Content
|
|
465
|
-
component={'main'} // string, element or function that defines the (HTML) element used for the content, default: 'div'
|
|
466
|
-
>
|
|
467
|
-
<p>Your content is here.</p>
|
|
468
|
-
</Content>
|
|
469
|
-
)
|
|
470
|
-
},
|
|
471
|
-
// ....
|
|
472
|
-
});
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
### FloatingActionList
|
|
476
|
-
|
|
477
|
-
The `<FloatingActionList />` element provides functionality for a quick adaption of the floating action button (FAB) pattern from Material Design.
|
|
478
|
-
It can be configured with a single action handler or a list of them. Then it opens a list of provided actions when activated, with a single action it will trigger the configured event handler immediately.
|
|
479
|
-
The position of the FAB is always the right bottom corner within the card but there is an `fixed` option to made it always visible in case the card is not fully shown in the viewport.
|
|
480
|
-
When there is already a fixed `<CardActions />` element in use put the `<FloatingActionList />` in it to use it fixed.
|
|
481
|
-
|
|
482
|
-
```js
|
|
483
|
-
import {
|
|
484
|
-
Card,
|
|
485
|
-
CardTitle,
|
|
486
|
-
CardContent,
|
|
487
|
-
CardActions,
|
|
488
|
-
FloatingActionList
|
|
489
|
-
} from '@eccenca/gui-elements';
|
|
490
|
-
|
|
491
|
-
const Page = React.createClass({
|
|
492
|
-
// template rendering
|
|
493
|
-
render() {
|
|
494
|
-
return (
|
|
495
|
-
<div>
|
|
496
|
-
<Card>
|
|
497
|
-
<CardTitle>
|
|
498
|
-
Card title
|
|
499
|
-
</CardTitle>
|
|
500
|
-
<CardContent>
|
|
501
|
-
<!-- ... -->
|
|
502
|
-
</CardContent>
|
|
503
|
-
<FloatingActionList
|
|
504
|
-
className={'my-own-class'} // string, element can be enhanced with additional CSS classes
|
|
505
|
-
openToBottom={boolReturningFunction} // Function returning a bool value, action menu list is shown at the bottom of the FAB for boolean true, default: function that always returns false
|
|
506
|
-
allowSingleItemList={false|true} // boolean, opens a menu after click on FAB even if there is onle one action in the list, otherwise the FAB directly triggers that action, default: false
|
|
507
|
-
fabSize={'mini|large'} // string, what FAB size should be used, default: 'large'
|
|
508
|
-
fixed={false|true} // boolean, if FAB should be always visible sticky on botton when card is only partly shown, default: false
|
|
509
|
-
iconName={'add'} // string, name of icon what is used for the FAB before the list of actions is used, default: 'add', or if only one action is given and `allowSingleItemList` is false then the action icon is used.
|
|
510
|
-
actions={
|
|
511
|
-
[
|
|
512
|
-
// array of objects that define icon, label and handler method of each action
|
|
513
|
-
{
|
|
514
|
-
icon: 'info',
|
|
515
|
-
label: 'Open ConfirmationDialog',
|
|
516
|
-
handler: this.openConfirmationDialog
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
icon: 'info',
|
|
520
|
-
label: 'Open BaseDialog',
|
|
521
|
-
handler: this.openBaseDialog,
|
|
522
|
-
disabled: true
|
|
523
|
-
},
|
|
524
|
-
]
|
|
525
|
-
}
|
|
526
|
-
/>
|
|
527
|
-
</Card>
|
|
528
|
-
<Card fixedActions={true}>
|
|
529
|
-
<CardTitle>
|
|
530
|
-
Card title
|
|
531
|
-
</CardTitle>
|
|
532
|
-
<CardContent>
|
|
533
|
-
<!-- ... -->
|
|
534
|
-
</CardContent>
|
|
535
|
-
<CardActions fixed={true}>
|
|
536
|
-
<!-- if a fixed button row is used then include the action list there if it need to be fixed, too. -->
|
|
537
|
-
<FloatingActionList
|
|
538
|
-
actions={
|
|
539
|
-
[
|
|
540
|
-
{
|
|
541
|
-
icon: 'info',
|
|
542
|
-
label: 'Open ConfirmationDialog',
|
|
543
|
-
handler: this.openConfirmationDialog
|
|
544
|
-
},
|
|
545
|
-
]
|
|
546
|
-
}
|
|
547
|
-
/>
|
|
548
|
-
</CardActions>
|
|
549
|
-
</Card>
|
|
550
|
-
</div>
|
|
551
|
-
)
|
|
552
|
-
},
|
|
553
|
-
// ....
|
|
554
|
-
});
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
### Icon
|
|
558
|
-
|
|
559
|
-
```js
|
|
560
|
-
import {Icon} from '@eccenca/gui-elements';
|
|
561
|
-
|
|
562
|
-
const Page = React.createClass({
|
|
563
|
-
// template rendering
|
|
564
|
-
render() {
|
|
565
|
-
return (
|
|
566
|
-
<Icon
|
|
567
|
-
name="cloud_download" // icon name, @see https://material.io/icons/
|
|
568
|
-
tooltip="cloudy clouds" // tooltip, some icons have fallback tooltips, set it to false if you need to prevent them
|
|
569
|
-
badge="5" // Badge, as shown in https://getmdl.io/components/index.html#badges-section
|
|
570
|
-
/>
|
|
571
|
-
)
|
|
572
|
-
},
|
|
573
|
-
// ....
|
|
574
|
-
});
|
|
575
|
-
```
|
|
576
|
-
|
|
577
|
-
### Checkbox and Switch
|
|
578
|
-
|
|
579
|
-
```js
|
|
580
|
-
import { Checkbox, Switch} from '@eccenca/gui-elements';
|
|
581
|
-
const Page = React.createClass({
|
|
582
|
-
// template rendering
|
|
583
|
-
render() {
|
|
584
|
-
return (
|
|
585
|
-
<Switch id="5" ripple={true} />
|
|
586
|
-
<Switch checked>
|
|
587
|
-
This is checked by default
|
|
588
|
-
</Switch>
|
|
589
|
-
<Checkbox id="6" ripple={true} />
|
|
590
|
-
<Checkbox label="Checkbox with label" />
|
|
591
|
-
<Checkbox disabled>
|
|
592
|
-
Disabled Checkbox with label
|
|
593
|
-
</Checkbox>
|
|
594
|
-
<Checkbox checked>
|
|
595
|
-
<div className="test">Checkbox 3 Text</div>
|
|
596
|
-
</Checkbox>
|
|
597
|
-
)
|
|
598
|
-
},
|
|
599
|
-
// ....
|
|
600
|
-
});
|
|
601
|
-
```
|
|
602
|
-
|
|
603
|
-
### Chip and ChipVisual
|
|
604
|
-
|
|
605
|
-
`<Chip/>` and `<ChipVisual/>` are a wrapper around react-mdl's `<Chip/>` and `<ChipContact/>`.
|
|
606
|
-
|
|
607
|
-
`<Chip/>` is essentially the same as in react-mdl, but does not allow of `onClose`.
|
|
608
|
-
|
|
609
|
-
`<ChipVisual/>` supports images, icons and text labels.
|
|
610
|
-
|
|
611
|
-
```js
|
|
612
|
-
import { ChipVisual, Chip } from '@eccenca/gui-elements';
|
|
613
|
-
const Page = React.createClass({
|
|
614
|
-
// template rendering
|
|
615
|
-
render() {
|
|
616
|
-
return (
|
|
617
|
-
<div>
|
|
618
|
-
<Chip>plain chip</Chip>
|
|
619
|
-
<Chip
|
|
620
|
-
href={'http://example.com/'} // string, Chip is now rendered as HTML link anchor, can be combined with onClick
|
|
621
|
-
>
|
|
622
|
-
Chip with URI
|
|
623
|
-
</Chip>
|
|
624
|
-
<Chip
|
|
625
|
-
onClick={() => console.log('#1 chip clicked')} // click handler, default: false
|
|
626
|
-
>
|
|
627
|
-
<ChipVisual
|
|
628
|
-
image="https://placekitten.com/500/500" // image URL, default false
|
|
629
|
-
/>
|
|
630
|
-
clickable with image visual
|
|
631
|
-
</Chip>
|
|
632
|
-
<Chip
|
|
633
|
-
onClick={() => console.log('#2 chip clicked')}
|
|
634
|
-
>
|
|
635
|
-
<ChipVisual
|
|
636
|
-
label="AB" // string with max. 2 chars, default: false
|
|
637
|
-
bgColor="teal" // MD color names, e.g. red, red-50, ... @see https://material.io/guidelines/style/color.html
|
|
638
|
-
textColor="white" // MD color names, e.g. red, red-50, ... @see https://material.io/guidelines/style/color.html
|
|
639
|
-
/>
|
|
640
|
-
clickable with text visual
|
|
641
|
-
</Chip>
|
|
642
|
-
<Chip>
|
|
643
|
-
<ChipVisual>
|
|
644
|
-
<Icon name="done" tooltip="test" />
|
|
645
|
-
</ChipVisual>
|
|
646
|
-
plain chip with icon
|
|
647
|
-
</Chip>
|
|
648
|
-
</div>
|
|
649
|
-
)
|
|
650
|
-
},
|
|
651
|
-
// ....
|
|
652
|
-
});
|
|
653
|
-
```
|
|
654
|
-
|
|
655
|
-
### RadioGroup and Radio
|
|
656
|
-
|
|
657
|
-
```js
|
|
658
|
-
import { Radio, RadioGroup} from '@eccenca/gui-elements';
|
|
659
|
-
const Page = React.createClass({
|
|
660
|
-
// template rendering
|
|
661
|
-
render() {
|
|
662
|
-
return (
|
|
663
|
-
<RadioGroup
|
|
664
|
-
onChange={this.updateRadio}
|
|
665
|
-
value={this.state.selectedRadio}
|
|
666
|
-
container="div" // default: "ul"
|
|
667
|
-
childContainer="div" // default "li"
|
|
668
|
-
ripple={true|false(default)}
|
|
669
|
-
>
|
|
670
|
-
<Radio
|
|
671
|
-
value={1}
|
|
672
|
-
label="Radio 1 Text"
|
|
673
|
-
/>
|
|
674
|
-
<Radio
|
|
675
|
-
disabled
|
|
676
|
-
value={2}
|
|
677
|
-
>
|
|
678
|
-
Radio 2 Text
|
|
679
|
-
</Radio>
|
|
680
|
-
<Radio
|
|
681
|
-
value={3}
|
|
682
|
-
>
|
|
683
|
-
<div className="test">Radio 3 Text <br/>Line 2</div>
|
|
684
|
-
</Radio>
|
|
685
|
-
</RadioGroup>
|
|
686
|
-
)
|
|
687
|
-
},
|
|
688
|
-
// ....
|
|
689
|
-
});
|
|
690
|
-
```
|
|
691
|
-
|
|
692
|
-
### ConfirmationDialog
|
|
693
|
-
|
|
694
|
-
```js
|
|
695
|
-
import { Button, ConfirmationDialog } from '@eccenca/gui-elements';
|
|
696
|
-
const Page = React.createClass({
|
|
697
|
-
// template rendering
|
|
698
|
-
render() {
|
|
699
|
-
return (
|
|
700
|
-
<ConfirmationDialog title="Dialog Title"
|
|
701
|
-
active={true}
|
|
702
|
-
modal={true}
|
|
703
|
-
size="mini"
|
|
704
|
-
cancelButton={<Button>Cancel</Button>}
|
|
705
|
-
confirmButton={<Button>Yes</Button>}
|
|
706
|
-
>
|
|
707
|
-
<p>Dialog Content</p>
|
|
708
|
-
</ConfirmationDialog>
|
|
709
|
-
)
|
|
710
|
-
},
|
|
711
|
-
// ....
|
|
712
|
-
});
|
|
713
|
-
|
|
714
|
-
```
|
|
715
|
-
|
|
716
|
-
### BaseDialog
|
|
717
|
-
|
|
718
|
-
```js
|
|
719
|
-
import { Button, BaseDialog } from '@eccenca/gui-elements';
|
|
720
|
-
const Page = React.createClass({
|
|
721
|
-
// template rendering
|
|
722
|
-
render() {
|
|
723
|
-
return (
|
|
724
|
-
<BaseDialog title="Dialog Title"
|
|
725
|
-
active={true}
|
|
726
|
-
modal={true}
|
|
727
|
-
titleCancelButton={this.close}
|
|
728
|
-
size="mini"
|
|
729
|
-
buttonRow={[
|
|
730
|
-
<Button>Cancel</Button>,
|
|
731
|
-
<Button>Yes</Button>,
|
|
732
|
-
<Button>More</Button>
|
|
733
|
-
]}
|
|
734
|
-
>
|
|
735
|
-
<p>Dialog Content</p>
|
|
736
|
-
</BaseDialog>
|
|
737
|
-
)
|
|
738
|
-
},
|
|
739
|
-
// ....
|
|
740
|
-
});
|
|
741
|
-
|
|
63
|
+
yarn install
|
|
64
|
+
yarn storybook
|
|
742
65
|
```
|
|
743
66
|
|
|
744
|
-
|
|
67
|
+
If you want to include Jest test results into the Storybook, run `yarn test:generate-output` before `yarn storybook`.
|
|
68
|
+
If the stories and the tests share exactly the compononent name in the file names, e.g. `Button.stories.tsx` and `Button.`, then tests are included automazically when the test output is available.
|
|
69
|
+
In case the file names cannot match by pattern then test file names need to be configured in the stories:
|
|
745
70
|
|
|
746
|
-
```
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
// template rendering
|
|
750
|
-
render() {
|
|
751
|
-
return (
|
|
752
|
-
<ContextMenu
|
|
753
|
-
align="left|right(default)"
|
|
754
|
-
valign="top|bottom(default)"
|
|
755
|
-
iconName="menu_more(default)"
|
|
756
|
-
tooltip="for menu button(currently not supported)"
|
|
757
|
-
target="idformymenu(auto generated if it is not given)"
|
|
758
|
-
>
|
|
759
|
-
<MenuItem>First Item</MenuItem>
|
|
760
|
-
<MenuItem>Second Item</MenuItem>
|
|
761
|
-
<MenuItem>Menu Item 3</MenuItem>
|
|
762
|
-
<MenuItem>Another Menu Item</MenuItem>
|
|
763
|
-
<MenuItem>Alright</MenuItem>
|
|
764
|
-
</ContextMenu>
|
|
765
|
-
)
|
|
766
|
-
},
|
|
767
|
-
// ....
|
|
768
|
-
});
|
|
769
|
-
|
|
770
|
-
```
|
|
771
|
-
|
|
772
|
-
### DateField
|
|
773
|
-
|
|
774
|
-
```js
|
|
775
|
-
import { DateField } from '@eccenca/gui-elements';
|
|
776
|
-
|
|
777
|
-
const Page = React.createClass({
|
|
778
|
-
// value is the date shown to the user
|
|
779
|
-
// rawValue is the ISO 8601 representation if value is valid
|
|
780
|
-
// isValid indicates if given value matches the defined representation
|
|
781
|
-
onChange({value, rawValue, isValid, name}) {
|
|
782
|
-
this.setState({
|
|
783
|
-
[name]: value,
|
|
784
|
-
})
|
|
785
|
-
},
|
|
786
|
-
// template rendering
|
|
787
|
-
render() {
|
|
788
|
-
return (
|
|
789
|
-
<DateField
|
|
790
|
-
onChange={this.onChange}
|
|
791
|
-
name="dateValue"
|
|
792
|
-
value={this.state.dateValue} // Should be a moment.js value for consistent handling
|
|
793
|
-
placeholder="Please set a date" // optional (default: '')
|
|
794
|
-
dateFormat="DD-MM-YYYY" // validate date format, optional (default 'DD-MM-YYYY')
|
|
795
|
-
closeOnSelect={true} // auto close picker when a date is selected, optional (default: false)
|
|
796
|
-
input={false} // hide the input element (picker will be always displayed), optional (default: true)
|
|
797
|
-
disabled={true} // prevent selecting a date, optional (default: false)
|
|
798
|
-
inputClassName="customDateName"// extra class name on input element, optional (default: '')
|
|
799
|
-
/>
|
|
800
|
-
)
|
|
801
|
-
},
|
|
802
|
-
// ....
|
|
803
|
-
});
|
|
804
|
-
|
|
805
|
-
```
|
|
806
|
-
|
|
807
|
-
### DateTimeField
|
|
808
|
-
|
|
809
|
-
```js
|
|
810
|
-
import { DateTimeField } from '@eccenca/gui-elements';
|
|
811
|
-
|
|
812
|
-
const Page = React.createClass({
|
|
813
|
-
// value is the date shown to the user
|
|
814
|
-
// rawValue is the ISO 8601 representation if value is valid
|
|
815
|
-
// isValid indicates if given value matches the defined representation
|
|
816
|
-
onChange({value, rawValue, isValid, name}) {
|
|
817
|
-
this.setState({
|
|
818
|
-
[name]: value,
|
|
819
|
-
})
|
|
820
|
-
},
|
|
821
|
-
// template rendering
|
|
822
|
-
render() {
|
|
823
|
-
return (
|
|
824
|
-
<DateTimeField
|
|
825
|
-
onChange={this.onChange}
|
|
826
|
-
name="dateTimeValue"
|
|
827
|
-
value={this.state.dateTimeValue} // Should be a moment.js value for consistent handling
|
|
828
|
-
label="Label for DateTime input" // optional
|
|
829
|
-
placeholder="Pls set a date" // optional (default: '') and only used if there is no label
|
|
830
|
-
dateFormat="DD-MM-YYYY" // validate date format, optional (default 'DD-MM-YYYY')
|
|
831
|
-
timeFormat="hh:mm a Z", // validate time format, optional (default 'hh:mm a')
|
|
832
|
-
closeOnSelect={true} // auto close picker when a date is selected, optional (default: false)
|
|
833
|
-
input={false} // hide the input element (picker will be always displayed), optional (default: true)
|
|
834
|
-
disabled={true} // prevent selecting a date, optional (default: false)
|
|
835
|
-
stretch={false} // use full width for input field (default: true)
|
|
836
|
-
error="This is a error message" // optional string
|
|
837
|
-
inputClassName="customDateName"// extra class name on input element, optional (default: '')
|
|
838
|
-
/>
|
|
839
|
-
)
|
|
840
|
-
},
|
|
841
|
-
// ....
|
|
842
|
-
});
|
|
843
|
-
|
|
844
|
-
```
|
|
845
|
-
|
|
846
|
-
### Layout
|
|
847
|
-
|
|
848
|
-
```js
|
|
849
|
-
import { Layout } from '@eccenca/gui-elements';
|
|
850
|
-
|
|
851
|
-
const Page = React.createClass({
|
|
852
|
-
// template rendering
|
|
853
|
-
render() {
|
|
854
|
-
return (
|
|
855
|
-
<Layout
|
|
856
|
-
fixedDrawer={false|true} // drawer always visible and open in larger screensdrawer always visible and open in larger screens, default: false
|
|
857
|
-
fixedHeader={false|true} // header always visible, even in small screens, default: false
|
|
858
|
-
fixedTabs={false|true} // fixed tabs instead of the default scrollable tabs, default: false
|
|
859
|
-
>
|
|
860
|
-
...
|
|
861
|
-
</Layout>
|
|
862
|
-
)
|
|
863
|
-
},
|
|
864
|
-
// ....
|
|
865
|
-
});
|
|
866
|
-
|
|
867
|
-
```
|
|
868
|
-
|
|
869
|
-
### NotAvailable
|
|
870
|
-
|
|
871
|
-
Use that element as very simple "not available" placeholder information, e.g. in empty table cells or statistic overviews.
|
|
872
|
-
It currently only supports short label strings and long descriptions used as tooltip addition.
|
|
873
|
-
|
|
874
|
-
```js
|
|
875
|
-
import { NotAvailable } from '@eccenca/gui-elements';
|
|
876
|
-
|
|
877
|
-
const Page = React.createClass({
|
|
878
|
-
// template rendering
|
|
879
|
-
render() {
|
|
880
|
-
return (
|
|
881
|
-
<NotAvailable
|
|
882
|
-
label="N/A" // short label that is shown, default: 'n/a'
|
|
883
|
-
description="Not available element" // long description that is only shown on hover
|
|
884
|
-
inline={false|true} // show it as inline text element, default: false
|
|
885
|
-
/>
|
|
886
|
-
)
|
|
887
|
-
},
|
|
888
|
-
// ....
|
|
889
|
-
});
|
|
890
|
-
|
|
891
|
-
```
|
|
892
|
-
|
|
893
|
-
### Nothing
|
|
894
|
-
|
|
895
|
-
```js
|
|
896
|
-
import { Nothing } from '@eccenca/gui-elements';
|
|
897
|
-
|
|
898
|
-
const Page = React.createClass({
|
|
899
|
-
// template rendering
|
|
900
|
-
render() {
|
|
901
|
-
return (
|
|
902
|
-
<Nothing />
|
|
903
|
-
)
|
|
904
|
-
},
|
|
905
|
-
// ....
|
|
906
|
-
});
|
|
907
|
-
|
|
908
|
-
```
|
|
909
|
-
|
|
910
|
-
### Pagination
|
|
911
|
-
|
|
912
|
-
```js
|
|
913
|
-
import { Pagination } from '@eccenca/gui-elements';
|
|
914
|
-
|
|
915
|
-
const Page = React.createClass({
|
|
916
|
-
// template rendering
|
|
917
|
-
render() {
|
|
918
|
-
return (
|
|
919
|
-
<Pagination
|
|
920
|
-
offset={0} // initial first shown element
|
|
921
|
-
limit={10} // initial number of shown elements per page
|
|
922
|
-
totalResults={31} // max elements
|
|
923
|
-
showElementOffsetPagination={true} // show element offset numbers as pagination information, default: false (show page offsets)
|
|
924
|
-
newLimitText={'Elements per page'} // if not set number of elements selection is hidden
|
|
925
|
-
limitRange={[10, 25, 50, 100]} // possible number of elements selections, default: [5, 10, 25, 50, 100, 200]
|
|
926
|
-
isTopPagination={true} // is pagination on top of the site (pages selection opens to bottom), default is false
|
|
927
|
-
showPageInput={true} // the current page number can be edited to jump directly there, default: false
|
|
928
|
-
/>
|
|
929
|
-
)
|
|
930
|
-
},
|
|
931
|
-
// ....
|
|
932
|
-
});
|
|
933
|
-
|
|
934
|
-
```
|
|
935
|
-
|
|
936
|
-
### Progressbar
|
|
937
|
-
|
|
938
|
-
```js
|
|
939
|
-
import { Progressbar } from '@eccenca/gui-elements';
|
|
940
|
-
|
|
941
|
-
const Page = React.createClass({
|
|
942
|
-
// template rendering
|
|
943
|
-
render() {
|
|
944
|
-
return (
|
|
945
|
-
<Progressbar progress={85} />
|
|
946
|
-
<Progressbar appearGlobal={true} indeterminate={true} progress={95} />
|
|
947
|
-
<Progressbar appearLocal={true} progress={15} />
|
|
948
|
-
)
|
|
949
|
-
},
|
|
950
|
-
// ....
|
|
951
|
-
});
|
|
952
|
-
```
|
|
953
|
-
|
|
954
|
-
### Spinner
|
|
955
|
-
|
|
956
|
-
The Spinner is global by default.
|
|
957
|
-
|
|
958
|
-
```js
|
|
959
|
-
import { Spinner } from '@eccenca/gui-elements';
|
|
960
|
-
|
|
961
|
-
const Page = React.createClass({
|
|
962
|
-
// template rendering
|
|
963
|
-
render() {
|
|
964
|
-
return (
|
|
965
|
-
<Spinner appearInline={true} />
|
|
966
|
-
<Spinner appearLocal={true} />
|
|
967
|
-
<Spinner />
|
|
968
|
-
)
|
|
969
|
-
},
|
|
970
|
-
// ....
|
|
971
|
-
});
|
|
972
|
-
|
|
973
|
-
```
|
|
974
|
-
|
|
975
|
-
### SelectBox
|
|
976
|
-
|
|
977
|
-
The SelectBox wraps [react-select](https://github.com/JedWatson/react-select) to use mixed content of strings and numbers as well as the default object type.
|
|
978
|
-
Please refer to all available properties in the linked documentation.
|
|
979
|
-
|
|
980
|
-
The SelectBox behaves like a [controlled input](https://facebook.github.io/react/docs/forms.html#controlled-components)
|
|
981
|
-
|
|
982
|
-
```js
|
|
983
|
-
import { SelectBox } from '@eccenca/gui-elements';
|
|
984
|
-
|
|
985
|
-
const Page = React.createClass({
|
|
986
|
-
getInitialState(){
|
|
987
|
-
return {
|
|
988
|
-
value: 8,
|
|
989
|
-
};
|
|
990
|
-
},
|
|
991
|
-
selectBoxOnChange(value){
|
|
992
|
-
this.setState({
|
|
993
|
-
value
|
|
994
|
-
});
|
|
995
|
-
},
|
|
996
|
-
// template rendering
|
|
997
|
-
render() {
|
|
998
|
-
return (
|
|
999
|
-
<SelectBox
|
|
1000
|
-
placeholder="Label for SelectBox"
|
|
1001
|
-
options={['label1', 3]}
|
|
1002
|
-
optionsOnTop={true} // option list opens up on top of select input (default: false)
|
|
1003
|
-
value={this.state.value}
|
|
1004
|
-
onChange={this.selectBoxOnChange}
|
|
1005
|
-
creatable={true} // allow creation of new values
|
|
1006
|
-
promptTextCreator={(newLabel) => ('New stuff: ' + newLabel)} // change default "Create option 'newLabel'" to "New stuff: 'newLabel'"
|
|
1007
|
-
multi={true} // allow multi selection
|
|
1008
|
-
clearable={false} // hide 'remove all selected values' button
|
|
1009
|
-
searchable={true} // whether to behave like a type-ahead or not
|
|
1010
|
-
/>
|
|
1011
|
-
)
|
|
1012
|
-
},
|
|
1013
|
-
});
|
|
1014
|
-
|
|
1015
|
-
```
|
|
1016
|
-
Note:
|
|
1017
|
-
|
|
1018
|
-
- if objects are used in multi selectable options you can add {"clearableValue": false} to it to hide delete button for this specifc object
|
|
1019
|
-
|
|
1020
|
-
- if "creatable" is set new values will be applied on Enter, Tab and Comma (",")
|
|
1021
|
-
|
|
1022
|
-
- ``placeholder`` label is used within MDL floating label layout
|
|
1023
|
-
|
|
1024
|
-
### Table
|
|
1025
|
-
|
|
1026
|
-
Provides a simple table which can be enriched with react elements as content.
|
|
1027
|
-
|
|
1028
|
-
```js
|
|
1029
|
-
import {Table} from '@eccenca/gui-elements';
|
|
1030
|
-
|
|
1031
|
-
class Page extends React.Component {
|
|
1032
|
-
// ....
|
|
1033
|
-
// template rendering
|
|
1034
|
-
render() {
|
|
1035
|
-
return (
|
|
1036
|
-
<Table
|
|
1037
|
-
multiline={true} // boolean true or false, allow linebreaks and multilined content in table cells (optional, default: false)
|
|
1038
|
-
fullWidth={true} // boolean true or false, table uses full width even if it could be smaller (optional, default: false)
|
|
1039
|
-
className="my-table-class" // string, additional CSS classes (optional, default: "")
|
|
1040
|
-
>
|
|
1041
|
-
<!-- your table content (optional) -->
|
|
1042
|
-
</table>
|
|
1043
|
-
)
|
|
1044
|
-
},
|
|
1045
|
-
// ....
|
|
1046
|
-
};
|
|
1047
|
-
```
|
|
1048
|
-
|
|
1049
|
-
#### Properties
|
|
1050
|
-
- **children** (node) -
|
|
1051
|
-
- **className** (string) - string (optional): additional CSS class name
|
|
1052
|
-
- **fullWidth** (bool, default: false) - use full width even for smaller tables
|
|
1053
|
-
- **multiline** (bool, default: false) - allow linebreaks and multilined content in table cells
|
|
1054
|
-
|
|
1055
|
-
### Table body
|
|
1056
|
-
|
|
1057
|
-
Provides table body element that can be enriched by sub elements.
|
|
1058
|
-
|
|
1059
|
-
```js
|
|
1060
|
-
import {TableBody} from '@eccenca/gui-elements';
|
|
1061
|
-
|
|
1062
|
-
class Page extends React.Component {
|
|
1063
|
-
// ....
|
|
1064
|
-
// template rendering
|
|
1065
|
-
render() {
|
|
1066
|
-
return (
|
|
1067
|
-
<TableBody
|
|
1068
|
-
multiline={false} // boolean true or false, allow linebreaks and multilined content in table cells (optional, default: false)
|
|
1069
|
-
className="my-own-class" // string, used for CSS class descriptions
|
|
1070
|
-
>
|
|
1071
|
-
<!-- table rows -->
|
|
1072
|
-
</TableBody>
|
|
1073
|
-
)
|
|
1074
|
-
},
|
|
1075
|
-
// ....
|
|
1076
|
-
};
|
|
1077
|
-
```
|
|
1078
|
-
|
|
1079
|
-
#### Properties
|
|
1080
|
-
- **children** (node) -
|
|
1081
|
-
- **className** (string) - string (optional): additional CSS class name
|
|
1082
|
-
- **multiline** (bool, default: false) - allow linebreaks and multilined content in table cells
|
|
1083
|
-
|
|
1084
|
-
### Table cell
|
|
1085
|
-
|
|
1086
|
-
Provides table cell element that can be enriched by sub elements.
|
|
1087
|
-
|
|
1088
|
-
```js
|
|
1089
|
-
import {TableCell} from '@eccenca/gui-elements';
|
|
1090
|
-
|
|
1091
|
-
class Page extends React.Component {
|
|
1092
|
-
// ...
|
|
1093
|
-
// template rendering
|
|
1094
|
-
// use it inside the correct Table elements
|
|
1095
|
-
render() {
|
|
1096
|
-
return (
|
|
1097
|
-
<TableCell
|
|
1098
|
-
isHead={true} // boolean, if the table cell contains a table head for the column or row (optional, default: false)
|
|
1099
|
-
likeHead={true} // boolean, if a normal table cell should be look like a head element (optional, default: false)
|
|
1100
|
-
multiline={false} // boolean true or false, allow linebreaks and multilined content in table cells (optional, default: false)
|
|
1101
|
-
className="my-own-class" // string, used for additional CSS class descriptions
|
|
1102
|
-
>
|
|
1103
|
-
<!-- content -->
|
|
1104
|
-
</TableCell>
|
|
1105
|
-
)
|
|
1106
|
-
},
|
|
1107
|
-
// ...
|
|
1108
|
-
};
|
|
1109
|
-
```
|
|
1110
|
-
|
|
1111
|
-
#### Properties
|
|
1112
|
-
- **children** (node) -
|
|
1113
|
-
- **className** (string, default: '') - optional CSS class
|
|
1114
|
-
- **isHead** (bool, default: false) - table cell is head for column or row
|
|
1115
|
-
- **likeHead** (bool, default: false) - table cell looks like header cell
|
|
1116
|
-
- **multiline** (bool, default: false) - allow linebreaks and multilined content in table cells
|
|
1117
|
-
|
|
1118
|
-
### Table head
|
|
1119
|
-
|
|
1120
|
-
Provides table head element that can be enriched sub elements.
|
|
1121
|
-
|
|
1122
|
-
```js
|
|
1123
|
-
import {TableHead} from '@eccenca/gui-elements';
|
|
1124
|
-
|
|
1125
|
-
class Page extends React.Component {
|
|
1126
|
-
// ....
|
|
1127
|
-
// template rendering
|
|
1128
|
-
render() {
|
|
1129
|
-
return (
|
|
1130
|
-
<TableHead
|
|
1131
|
-
multiline={false} // boolean true or false, allow linebreaks and multilined content in table cells (optional, default: false)
|
|
1132
|
-
className="my-own-class" // string, used for CSS class descriptions
|
|
1133
|
-
>
|
|
1134
|
-
<!-- head row -->
|
|
1135
|
-
</TableHead>
|
|
1136
|
-
)
|
|
1137
|
-
},
|
|
1138
|
-
// ....
|
|
1139
|
-
};
|
|
1140
|
-
```
|
|
1141
|
-
|
|
1142
|
-
#### Properties
|
|
1143
|
-
- **children** (node) -
|
|
1144
|
-
- **className** (string) - string (optional): additional CSS class name
|
|
1145
|
-
- **multiline** (bool, default: false) - allow linebreaks and multilined content in table cells
|
|
1146
|
-
|
|
1147
|
-
### Table row
|
|
1148
|
-
|
|
1149
|
-
Provides table row element that can be enriched by sub elements.
|
|
1150
|
-
|
|
1151
|
-
```js
|
|
1152
|
-
import {TableRow} from '@eccenca/gui-elements';
|
|
1153
|
-
|
|
1154
|
-
class Page extends React.Component {
|
|
1155
|
-
// ...
|
|
1156
|
-
// template rendering
|
|
1157
|
-
// use it inside the correct Table elements
|
|
1158
|
-
render() {
|
|
1159
|
-
return (
|
|
1160
|
-
<TableRow
|
|
1161
|
-
multiline={false} // boolean true or false, allow linebreaks and multilined content in table cells (optional, default: false)
|
|
1162
|
-
className="my-own-class" // string, used for additional CSS class descriptions
|
|
1163
|
-
>
|
|
1164
|
-
<!-- content -->
|
|
1165
|
-
</TableRow>
|
|
1166
|
-
)
|
|
1167
|
-
},
|
|
1168
|
-
// ...
|
|
71
|
+
```javascript
|
|
72
|
+
Default.parameters = {
|
|
73
|
+
jest: "MyTestFile.test.tsx",
|
|
1169
74
|
};
|
|
1170
|
-
```
|
|
1171
|
-
|
|
1172
|
-
#### Properties
|
|
1173
|
-
- **children** (node) -
|
|
1174
|
-
- **className** (string, default: '') - optional CSS class
|
|
1175
|
-
- **multiline** (bool, default: false) - allow linebreaks and multilined content in table cells
|
|
1176
|
-
|
|
1177
|
-
### Tabs
|
|
1178
|
-
|
|
1179
|
-
```js
|
|
1180
|
-
import { Tabs } from '@eccenca/gui-elements';
|
|
1181
|
-
|
|
1182
|
-
const Page = React.createClass({
|
|
1183
|
-
// template rendering
|
|
1184
|
-
render() {
|
|
1185
|
-
return (
|
|
1186
|
-
<Tabs
|
|
1187
|
-
prefixTabNames={'ecc-view-resource-panel-tab'}
|
|
1188
|
-
activeTab={'historyview'}
|
|
1189
|
-
tabs={[{tabId: 'name', tabTitle: 'Name', tabContent: value}]}
|
|
1190
|
-
onTabClick={this.TabClick}
|
|
1191
|
-
/>
|
|
1192
|
-
)
|
|
1193
|
-
},
|
|
1194
|
-
// ....
|
|
1195
|
-
});
|
|
1196
|
-
|
|
1197
|
-
```
|
|
1198
|
-
|
|
1199
|
-
### TextField
|
|
1200
|
-
|
|
1201
|
-
```js
|
|
1202
|
-
import { TextField } from '@eccenca/gui-elements';
|
|
1203
|
-
|
|
1204
|
-
const Page = React.createClass({
|
|
1205
|
-
// event is the original react onChange event
|
|
1206
|
-
// value is event.target.value (a shortcut for convienience)
|
|
1207
|
-
onChange({value, event, value}) {
|
|
1208
|
-
this.setState({
|
|
1209
|
-
[name]: value,
|
|
1210
|
-
})
|
|
1211
|
-
},
|
|
1212
|
-
// template rendering
|
|
1213
|
-
render() {
|
|
1214
|
-
return (
|
|
1215
|
-
<TextField
|
|
1216
|
-
onChange={this.onChange}
|
|
1217
|
-
name="textfield"
|
|
1218
|
-
value={this.state.textfield} // Should be a moment.js value for consistent handling
|
|
1219
|
-
label="Textfield"
|
|
1220
|
-
error="Please correct your input" // optional, error message
|
|
1221
|
-
stretch={false} // do not use full width (default: true)
|
|
1222
|
-
multiline={true} // use a text area (default: false)
|
|
1223
|
-
/>
|
|
1224
|
-
)
|
|
1225
|
-
},
|
|
1226
|
-
// ....
|
|
1227
|
-
});
|
|
1228
|
-
|
|
1229
75
|
```
|
|
1230
76
|
|
|
1231
|
-
###
|
|
1232
|
-
|
|
1233
|
-
You need to add wrapper to some elements, e.g. icons or checkboxes, to prevent unexepected behaviour. Use `<span>` for inline elements and `<div>` for block elments. If you have `tooltip` options, e.g. on icons, then use that parameter instead of the `<Tooltip/>` element.
|
|
1234
|
-
|
|
1235
|
-
```js
|
|
1236
|
-
import {Tooltip} from '@eccenca/gui-elements';
|
|
77
|
+
### Process for pull requests and publishing releases
|
|
1237
78
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
label="This is the tooltip text." // content used for tooltip, string or dom/react element
|
|
1244
|
-
position="bottom" // string: top|left|bottom|right, default: bottom
|
|
1245
|
-
large={false} // true or false, default: false
|
|
1246
|
-
>
|
|
1247
|
-
<p>I have a tooltip.</p>
|
|
1248
|
-
</Tooltip>
|
|
1249
|
-
)
|
|
1250
|
-
},
|
|
1251
|
-
// ....
|
|
1252
|
-
});
|
|
1253
|
-
```
|
|
1254
|
-
|
|
1255
|
-
### Version
|
|
79
|
+
1. `feature/*` and `bugfix/*` branches are merged into `develop` via pull request
|
|
80
|
+
2. `release/*`branch is created from `develop` [via GitHub interface](https://github.com/eccenca/gui-elements/actions/workflows/release-branch.yml), there will be created a pull request automatically
|
|
81
|
+
* publish release candidates from this release branch by [manual usage of a GitHub workflow](https://github.com/eccenca/gui-elements/actions/workflows/release-candidate.yml)
|
|
82
|
+
3. PR from release branch into `main` need to be approved
|
|
83
|
+
* this will lead to a published package of the release
|
|
1256
84
|
|
|
1257
|
-
|
|
1258
|
-
import { Version } from '@eccenca/gui-elements';
|
|
85
|
+
## License
|
|
1259
86
|
|
|
1260
|
-
|
|
1261
|
-
// template rendering
|
|
1262
|
-
render() {
|
|
1263
|
-
return (
|
|
1264
|
-
<Version
|
|
1265
|
-
version={'v1.1.0'}
|
|
1266
|
-
/>
|
|
1267
|
-
)
|
|
1268
|
-
},
|
|
1269
|
-
// ....
|
|
1270
|
-
});
|
|
1271
|
-
```
|
|
87
|
+
Apache License, Version 2.0, January 2004
|