@eccenca/gui-elements 23.0.0 → 23.1.0-easynav.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -1
- package/README.md +7 -0
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js +7 -2
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +3 -7
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/cjs/cmem/react-flow/extensions/scrollOnDragHook.js +200 -0
- package/dist/cjs/cmem/react-flow/extensions/scrollOnDragHook.js.map +1 -0
- package/dist/cjs/common/Intent/index.js +7 -3
- package/dist/cjs/common/Intent/index.js.map +1 -1
- package/dist/cjs/common/utils/characters.js +82 -0
- package/dist/cjs/common/utils/characters.js.map +1 -0
- package/dist/cjs/components/Application/ApplicationTitle.js +2 -2
- package/dist/cjs/components/Application/ApplicationTitle.js.map +1 -1
- package/dist/cjs/components/Badge/Badge.js +44 -0
- package/dist/cjs/components/Badge/Badge.js.map +1 -0
- package/dist/cjs/components/Depiction/Depiction.js +111 -0
- package/dist/cjs/components/Depiction/Depiction.js.map +1 -0
- package/dist/cjs/components/Grid/Grid.js +7 -2
- package/dist/cjs/components/Grid/Grid.js.map +1 -1
- package/dist/cjs/components/Grid/GridColumn.js +6 -2
- package/dist/cjs/components/Grid/GridColumn.js.map +1 -1
- package/dist/cjs/components/Grid/GridRow.js +3 -0
- package/dist/cjs/components/Grid/GridRow.js.map +1 -1
- package/dist/cjs/components/Icon/BaseIcon.js +38 -0
- package/dist/cjs/components/Icon/BaseIcon.js.map +1 -0
- package/dist/cjs/components/Icon/Icon.js +9 -24
- package/dist/cjs/components/Icon/Icon.js.map +1 -1
- package/dist/cjs/components/Icon/IconButton.js +8 -1
- package/dist/cjs/components/Icon/IconButton.js.map +1 -1
- package/dist/cjs/components/Icon/TestIcon.js +35 -0
- package/dist/cjs/components/Icon/TestIcon.js.map +1 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js +123 -621
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Icon/index.js +11 -0
- package/dist/cjs/components/Icon/index.js.map +1 -0
- package/dist/cjs/components/Menu/MenuItem.js +1 -1
- package/dist/cjs/components/Menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +56 -23
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/Notification/Notification.js +10 -2
- package/dist/cjs/components/Notification/Notification.js.map +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItemDepiction.js +24 -0
- package/dist/cjs/components/OverviewItem/OverviewItemDepiction.js.map +1 -1
- package/dist/cjs/components/Tag/Tag.js +6 -2
- package/dist/cjs/components/Tag/Tag.js.map +1 -1
- package/dist/cjs/components/TextField/TextArea.js +4 -2
- package/dist/cjs/components/TextField/TextArea.js.map +1 -1
- package/dist/cjs/components/TextField/TextField.js +4 -2
- package/dist/cjs/components/TextField/TextField.js.map +1 -1
- package/dist/cjs/components/TextField/useTextValidation.js +84 -0
- package/dist/cjs/components/TextField/useTextValidation.js.map +1 -0
- package/dist/cjs/components/Tree/Tree.js.map +1 -1
- package/dist/cjs/components/Typography/Highlighter.js.map +1 -1
- package/dist/cjs/components/Typography/OverflowText.js.map +1 -1
- package/dist/cjs/components/Typography/WhiteSpaceContainer.js +35 -12
- package/dist/cjs/components/Typography/WhiteSpaceContainer.js.map +1 -1
- package/dist/cjs/components/Typography/index.js +21 -0
- package/dist/cjs/components/Typography/index.js.map +1 -0
- package/dist/cjs/components/Workspace/WorkspaceContent.js +1 -1
- package/dist/cjs/components/Workspace/WorkspaceContent.js.map +1 -1
- package/dist/cjs/components/index.js +18 -0
- package/dist/cjs/components/index.js.map +1 -0
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +4 -3
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +29 -25
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js +2 -2
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/versionsupport.js +3 -0
- package/dist/cjs/extensions/react-flow/versionsupport.js.map +1 -0
- package/dist/cjs/index.js +7 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js +7 -2
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +3 -6
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/esm/cmem/react-flow/extensions/scrollOnDragHook.js +194 -0
- package/dist/esm/cmem/react-flow/extensions/scrollOnDragHook.js.map +1 -0
- package/dist/esm/common/Intent/index.js +5 -13
- package/dist/esm/common/Intent/index.js.map +1 -1
- package/dist/esm/common/utils/characters.js +96 -0
- package/dist/esm/common/utils/characters.js.map +1 -0
- package/dist/esm/components/Application/ApplicationTitle.js +2 -2
- package/dist/esm/components/Application/ApplicationTitle.js.map +1 -1
- package/dist/esm/components/Badge/Badge.js +48 -0
- package/dist/esm/components/Badge/Badge.js.map +1 -0
- package/dist/esm/components/Depiction/Depiction.js +96 -0
- package/dist/esm/components/Depiction/Depiction.js.map +1 -0
- package/dist/esm/components/Grid/Grid.js +7 -2
- package/dist/esm/components/Grid/Grid.js.map +1 -1
- package/dist/esm/components/Grid/GridColumn.js +6 -2
- package/dist/esm/components/Grid/GridColumn.js.map +1 -1
- package/dist/esm/components/Grid/GridRow.js +3 -0
- package/dist/esm/components/Grid/GridRow.js.map +1 -1
- package/dist/esm/components/Icon/BaseIcon.js +44 -0
- package/dist/esm/components/Icon/BaseIcon.js.map +1 -0
- package/dist/esm/components/Icon/Icon.js +9 -24
- package/dist/esm/components/Icon/Icon.js.map +1 -1
- package/dist/esm/components/Icon/IconButton.js +8 -1
- package/dist/esm/components/Icon/IconButton.js.map +1 -1
- package/dist/esm/components/Icon/TestIcon.js +41 -0
- package/dist/esm/components/Icon/TestIcon.js.map +1 -0
- package/dist/esm/components/Icon/canonicalIconNames.js +123 -621
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Icon/index.js +4 -0
- package/dist/esm/components/Icon/index.js.map +1 -0
- package/dist/esm/components/Menu/MenuItem.js +1 -1
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/MultiSelect/MultiSelect.js +61 -44
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/Notification/Notification.js +12 -4
- package/dist/esm/components/Notification/Notification.js.map +1 -1
- package/dist/esm/components/OverviewItem/OverviewItemDepiction.js +24 -0
- package/dist/esm/components/OverviewItem/OverviewItemDepiction.js.map +1 -1
- package/dist/esm/components/Tag/Tag.js +6 -2
- package/dist/esm/components/Tag/Tag.js.map +1 -1
- package/dist/esm/components/TextField/TextArea.js +4 -2
- package/dist/esm/components/TextField/TextArea.js.map +1 -1
- package/dist/esm/components/TextField/TextField.js +4 -2
- package/dist/esm/components/TextField/TextField.js.map +1 -1
- package/dist/esm/components/TextField/useTextValidation.js +78 -0
- package/dist/esm/components/TextField/useTextValidation.js.map +1 -0
- package/dist/esm/components/Tree/Tree.js.map +1 -1
- package/dist/esm/components/Typography/Highlighter.js.map +1 -1
- package/dist/esm/components/Typography/OverflowText.js.map +1 -1
- package/dist/esm/components/Typography/WhiteSpaceContainer.js +16 -14
- package/dist/esm/components/Typography/WhiteSpaceContainer.js.map +1 -1
- package/dist/esm/components/Typography/index.js +12 -0
- package/dist/esm/components/Typography/index.js.map +1 -0
- package/dist/esm/components/Workspace/WorkspaceContent.js +1 -1
- package/dist/esm/components/Workspace/WorkspaceContent.js.map +1 -1
- package/dist/esm/components/index.js +6 -0
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js +5 -4
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +37 -32
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js +2 -2
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/versionsupport.js +2 -0
- package/dist/esm/extensions/react-flow/versionsupport.js.map +1 -0
- package/dist/esm/index.js +5 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +2 -1
- package/dist/types/cmem/react-flow/ReactFlow/ReactFlow.d.ts +14 -0
- package/dist/types/cmem/react-flow/extensions/scrollOnDragHook.d.ts +22 -0
- package/dist/types/common/Intent/index.d.ts +4 -3
- package/dist/types/common/utils/characters.d.ts +19 -0
- package/dist/types/components/Badge/Badge.d.ts +42 -0
- package/dist/types/components/Depiction/Depiction.d.ts +71 -0
- package/dist/types/components/Grid/Grid.d.ts +21 -2
- package/dist/types/components/Grid/GridColumn.d.ts +21 -3
- package/dist/types/components/Grid/GridRow.d.ts +18 -2
- package/dist/types/components/Icon/BaseIcon.d.ts +45 -0
- package/dist/types/components/Icon/Icon.d.ts +7 -34
- package/dist/types/components/Icon/IconButton.d.ts +3 -2
- package/dist/types/components/Icon/TestIcon.d.ts +20 -0
- package/dist/types/components/Icon/canonicalIconNames.d.ts +9 -7
- package/dist/types/components/Icon/index.d.ts +4 -0
- package/dist/types/components/Menu/MenuItem.d.ts +2 -1
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +3 -1
- package/dist/types/components/Notification/Notification.d.ts +13 -4
- package/dist/types/components/Tabs/Tab.d.ts +2 -0
- package/dist/types/components/Tag/Tag.d.ts +16 -3
- package/dist/types/components/TextField/TextArea.d.ts +7 -2
- package/dist/types/components/TextField/TextField.d.ts +6 -1
- package/dist/types/components/TextField/useTextValidation.d.ts +28 -0
- package/dist/types/components/Tree/Tree.d.ts +2 -1
- package/dist/types/components/Typography/Highlighter.d.ts +2 -2
- package/dist/types/components/Typography/OverflowText.d.ts +2 -2
- package/dist/types/components/Typography/WhiteSpaceContainer.d.ts +45 -4
- package/dist/types/components/Typography/index.d.ts +12 -0
- package/dist/types/components/index.d.ts +5 -0
- package/dist/types/extensions/react-flow/handles/HandleDefault.d.ts +11 -3
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +16 -6
- package/dist/types/extensions/react-flow/nodes/NodeDefault.d.ts +2 -1
- package/dist/types/extensions/react-flow/versionsupport.d.ts +6 -0
- package/dist/types/index.d.ts +6 -11
- package/package.json +14 -16
- package/scripts/compile-sass.ts +9 -1
- package/src/_shame.scss +1 -1
- package/src/cmem/ActivityControl/ActivityControlWidget.stories.tsx +6 -4
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +3 -2
- package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +26 -1
- package/src/cmem/react-flow/StickyNoteModal/StickyNoteModal.tsx +10 -6
- package/src/cmem/react-flow/extensions/scrollOnDragHook.ts +247 -0
- package/src/common/Intent/index.ts +16 -12
- package/src/common/utils/characters.ts +111 -0
- package/src/components/Accordion/accordion.scss +4 -3
- package/src/components/Application/ApplicationTitle.tsx +2 -2
- package/src/components/Application/_config.scss +1 -1
- package/src/components/Application/_content.scss +1 -1
- package/src/components/Application/_header.scss +2 -2
- package/src/components/Application/_sidebar.scss +2 -9
- package/src/components/Application/_toolbar.scss +1 -1
- package/src/components/Application/application.scss +4 -4
- package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +13 -8
- package/src/components/Badge/Badge.stories.tsx +47 -0
- package/src/components/Badge/Badge.tsx +93 -0
- package/src/components/Badge/badge.scss +44 -0
- package/src/components/Depiction/Depiction.tsx +198 -0
- package/src/components/Depiction/depiction.scss +176 -0
- package/src/components/Depiction/stories/Depiction.stories.tsx +69 -0
- package/src/components/Depiction/stories/test-16to9.png +0 -0
- package/src/components/Depiction/stories/test-16to9.svg +41 -0
- package/src/components/Depiction/stories/test-16to9.tobase64.svg +41 -0
- package/src/components/Depiction/stories/test-16to9.tsx +44 -0
- package/src/components/Depiction/stories/test-9to16.png +0 -0
- package/src/components/Depiction/stories/test-9to16.svg +44 -0
- package/src/components/Depiction/stories/test-9to16.tobase64.svg +44 -0
- package/src/components/Depiction/stories/test-9to16.tsx +48 -0
- package/src/components/Grid/Grid.tsx +22 -4
- package/src/components/Grid/GridColumn.tsx +24 -7
- package/src/components/Grid/GridRow.tsx +18 -3
- package/src/components/Grid/grid.scss +14 -13
- package/src/components/Grid/stories/Grid.stories.tsx +27 -0
- package/src/components/Grid/stories/GridColumn.stories.tsx +66 -0
- package/src/components/Grid/stories/GridRow.stories.tsx +47 -0
- package/src/components/Icon/BaseIcon.tsx +84 -0
- package/src/components/Icon/Icon.tsx +23 -82
- package/src/components/Icon/IconButton.tsx +18 -14
- package/src/components/Icon/TestIcon.tsx +39 -0
- package/src/components/Icon/canonicalIconNames.tsx +132 -633
- package/src/components/Icon/index.ts +5 -0
- package/src/components/Icon/stories/Icon.stories.tsx +13 -0
- package/src/components/Icon/stories/IconButton.stories.tsx +14 -7
- package/src/components/Icon/stories/TestIcon.stories.tsx +28 -0
- package/src/components/Link/link.scss +2 -1
- package/src/components/Menu/MenuItem.tsx +14 -4
- package/src/components/Menu/Stories/MenuItem.stories.tsx +16 -2
- package/src/components/MultiSelect/MultiSelect.tsx +58 -27
- package/src/components/Notification/Notification.stories.tsx +4 -0
- package/src/components/Notification/Notification.tsx +26 -6
- package/src/components/OverviewItem/OverviewItemDepiction.tsx +31 -0
- package/src/components/OverviewItem/overviewitem.scss +2 -1
- package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +22 -1
- package/src/components/OverviewItem/stories/OverviewItemDepiction.stories.tsx +8 -3
- package/src/components/Pagination/pagination.scss +3 -2
- package/src/components/SimpleTable/simpletable.scss +11 -12
- package/src/components/Tag/Tag.stories.tsx +7 -2
- package/src/components/Tag/Tag.tsx +24 -4
- package/src/components/Tag/tag.scss +84 -3
- package/src/components/TagInput/taginput.scss +6 -0
- package/src/components/TextField/TextArea.tsx +10 -1
- package/src/components/TextField/TextField.tsx +9 -0
- package/src/components/TextField/stories/SearchField.stories.tsx +1 -1
- package/src/components/TextField/textfield.scss +12 -0
- package/src/components/TextField/useTextValidation.ts +103 -0
- package/src/components/Tooltip/tooltip.scss +1 -1
- package/src/components/Tree/Tree.stories.tsx +7 -1
- package/src/components/Tree/Tree.tsx +2 -1
- package/src/components/Typography/Highlighter.tsx +2 -2
- package/src/components/Typography/OverflowText.tsx +2 -2
- package/src/components/Typography/WhiteSpaceContainer.tsx +69 -21
- package/src/components/Typography/index.ts +25 -0
- package/src/components/Typography/stories/WhiteSpaceContainer.stories.tsx +55 -0
- package/src/components/Typography/typography.scss +3 -2
- package/src/components/Workspace/WorkspaceContent.tsx +1 -1
- package/src/components/index.scss +5 -0
- package/src/components/index.ts +5 -0
- package/src/extensions/react-flow/handles/HandleDefault.tsx +31 -10
- package/src/extensions/react-flow/nodes/NodeContent.tsx +69 -39
- package/src/extensions/react-flow/nodes/NodeDefault.tsx +4 -2
- package/src/extensions/react-flow/nodes/_nodes.scss +13 -7
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +5 -0
- package/src/extensions/react-flow/versionsupport.ts +6 -0
- package/src/includes/carbon-components/_components.scss +11 -0
- package/src/includes/carbon-components/_requisits.scss +18 -0
- package/src/includes/carbon-components/_variables.scss +50 -53
- package/src/index.scss +4 -105
- package/src/index.ts +6 -16
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Color from "color";
|
|
3
|
+
import { BadgeProps } from "../Badge/Badge";
|
|
4
|
+
import { IconProps } from "../Icon/Icon";
|
|
5
|
+
import { TestIconProps } from "../Icon/TestIcon";
|
|
6
|
+
import { TooltipProps } from "../Tooltip/Tooltip";
|
|
7
|
+
export interface DepictionProps extends React.HTMLAttributes<HTMLElement> {
|
|
8
|
+
/**
|
|
9
|
+
* Image that should be used as depiction.
|
|
10
|
+
*/
|
|
11
|
+
image: React.ReactElement<IconProps | TestIconProps | React.ImgHTMLAttributes<HTMLImageElement> | React.SVGProps<SVGSVGElement>>;
|
|
12
|
+
/**
|
|
13
|
+
* In case you use an SVG encoded as a data URL in the `<img />` element, then it is transformed to a inline SVG inside the DOM tree.
|
|
14
|
+
* Should be work with Base64 and URL encoded data URIs.
|
|
15
|
+
*/
|
|
16
|
+
forceInlineSvg?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Sets the height of the depiction, not the dimension (width x height).
|
|
19
|
+
*/
|
|
20
|
+
size?: "tiny" | "small" | "medium" | "large" | "xlarge" | "source";
|
|
21
|
+
/**
|
|
22
|
+
* Resizing strategy for image to match the given ratio.
|
|
23
|
+
* * contain: image is fully visible in the depiction
|
|
24
|
+
* * cover: the image fully covers the depition area but it may displayed only partially
|
|
25
|
+
* * stretch: image is streched to fill the depiction area
|
|
26
|
+
*/
|
|
27
|
+
resizing?: "contain" | "cover" | "stretch";
|
|
28
|
+
/**
|
|
29
|
+
* Aspect ration of the depiction.
|
|
30
|
+
*/
|
|
31
|
+
ratio?: "1:1" | "source";
|
|
32
|
+
/**
|
|
33
|
+
* Use a fully rounded shape on the depiction edges.
|
|
34
|
+
* Combined with `ratio="1:1"` its displayed within a circular shape.
|
|
35
|
+
*/
|
|
36
|
+
rounded?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Color that is used for the depiction background.
|
|
39
|
+
* This may be important if you use PNG, SVG or other image types that can have transparent background areas.
|
|
40
|
+
*/
|
|
41
|
+
backgroundColor?: Color | string | "light" | "dark";
|
|
42
|
+
/**
|
|
43
|
+
* The depiction is displayed with a border around it.
|
|
44
|
+
*/
|
|
45
|
+
border?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Add padding around the image inside the depiction.
|
|
48
|
+
* The amount of padding is defined relative to the depiction size, so a small padding on a small depiction is displayed smaller than a small padding on a large depiction.
|
|
49
|
+
*/
|
|
50
|
+
padding?: "none" | "tiny" | "small" | "medium" | "large";
|
|
51
|
+
/**
|
|
52
|
+
* Description of the depiction.
|
|
53
|
+
*/
|
|
54
|
+
caption?: string | JSX.Element;
|
|
55
|
+
/**
|
|
56
|
+
* How is the caption displayed.
|
|
57
|
+
*/
|
|
58
|
+
captionPosition?: "none" | "tooltip";
|
|
59
|
+
/**
|
|
60
|
+
* In case of `captionPosition="tooltip"` this can be used to set the properties of the Tooltip element.
|
|
61
|
+
*/
|
|
62
|
+
tooltipProps?: TooltipProps;
|
|
63
|
+
/**
|
|
64
|
+
* Attach a `<Badge />` element to the depiction.
|
|
65
|
+
*/
|
|
66
|
+
badge?: React.ReactElement<BadgeProps>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Display a graphical representation and attache a caption or a badge to it.
|
|
70
|
+
*/
|
|
71
|
+
export declare function Depiction({ className, image, forceInlineSvg, size, resizing, ratio, caption, captionPosition, backgroundColor, border, rounded, padding, badge, tooltipProps, ...otherFigureProps }: DepictionProps): JSX.Element;
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { GridDefaultProps } from "carbon-components-react
|
|
3
|
-
interface GridProps extends GridDefaultProps {
|
|
2
|
+
import { GridDefaultProps } from "carbon-components-react";
|
|
3
|
+
interface GridProps extends Omit<GridDefaultProps, "fullWidth" | "columns" | "narrow"> {
|
|
4
|
+
/**
|
|
5
|
+
* The available grid height can be distributed between multiple rows.
|
|
6
|
+
* To do so the `verticalStretched` property must be set for the `<GridRow />` element that need to be stretched.
|
|
7
|
+
* This property can be set for multiple rows, then they share the available vertical space regarding their content.
|
|
8
|
+
*/
|
|
4
9
|
verticalStretchable?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Use the exact space defined by the parent element.
|
|
12
|
+
* This parent element must be displayed using a fixed, relative or absolute position.
|
|
13
|
+
*/
|
|
5
14
|
useAbsoluteSpace?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated
|
|
17
|
+
* This is set always by default.
|
|
18
|
+
*/
|
|
19
|
+
fullWidth?: boolean;
|
|
6
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Layouts a grid that can contain rows and columns.
|
|
23
|
+
* Grids can also be stacked into other grids for more complex layouts.
|
|
24
|
+
* A very complex level of stacked grids is a sign that something should be designed differently.
|
|
25
|
+
*/
|
|
7
26
|
declare function Grid({ children, verticalStretchable, useAbsoluteSpace, className, ...restProps }: GridProps): JSX.Element;
|
|
8
27
|
export default Grid;
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ColumnDefaultProps } from "carbon-components-react
|
|
3
|
-
interface GridColumnProps extends ColumnDefaultProps {
|
|
2
|
+
import { ColumnDefaultProps } from "carbon-components-react";
|
|
3
|
+
interface GridColumnProps extends Omit<ColumnDefaultProps, "max" | "xlg" | "lg" | "md" | "sm"> {
|
|
4
|
+
/**
|
|
5
|
+
* Column width is small, using 3 (or 2, on medium viewports) parts out of 16.
|
|
6
|
+
* This boolean property is basically a quick switch for setting `{ md:2, lg:3 }`.
|
|
7
|
+
*/
|
|
4
8
|
small?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Column width is medium, using 5 (or 3, on medium viewports) parts out of 16.
|
|
11
|
+
* This boolean property is basically a quick switch for setting `{ md:3, lg:5 }`.
|
|
12
|
+
*/
|
|
5
13
|
medium?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Alignment of column content.
|
|
16
|
+
*/
|
|
17
|
+
verticalAlign?: "top" | "center";
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated
|
|
20
|
+
*/
|
|
6
21
|
full?: boolean;
|
|
7
|
-
verticalAlign?: "center";
|
|
8
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Grid columns can be used in grid rows.
|
|
25
|
+
* They can contain other grids if this is necessary for more complex layouts.
|
|
26
|
+
*/
|
|
9
27
|
declare function GridColumn({ children, className, small, medium, full, verticalAlign, ...otherProps }: GridColumnProps): JSX.Element;
|
|
10
28
|
export default GridColumn;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { RowDefaultProps } from "carbon-components-react
|
|
3
|
-
interface GridRowProps extends RowDefaultProps {
|
|
2
|
+
import { RowDefaultProps } from "carbon-components-react";
|
|
3
|
+
interface GridRowProps extends Omit<RowDefaultProps, "narrow"> {
|
|
4
|
+
/**
|
|
5
|
+
* Do not wrap column children when there is not enough space available.
|
|
6
|
+
* This only works for grids on medium sized and larger viewports.
|
|
7
|
+
*/
|
|
4
8
|
dontWrapColumns?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Row uses maximum height of the workview.
|
|
11
|
+
*/
|
|
5
12
|
fullHeight?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* When a row is vertically stretched then it uses the remaining spcae on the y-axis.
|
|
15
|
+
* Option can be used on multiple rows, then they share the available space.
|
|
16
|
+
* This makes only sense if the grid height is set by additional styles or properties.
|
|
17
|
+
* The grid must be set to `verticalStretchable=true`.
|
|
18
|
+
*/
|
|
6
19
|
verticalStretched?: boolean;
|
|
7
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Grid rows exists as children in a grid and can contain columns.
|
|
23
|
+
*/
|
|
8
24
|
declare function GridRow({ children, className, dontWrapColumns, fullHeight, verticalStretched, ...otherProps }: GridRowProps): JSX.Element;
|
|
9
25
|
export default GridRow;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconProps as CarbonIconProps } from "carbon-components-react";
|
|
3
|
+
import { IntentTypes } from "../../common/Intent";
|
|
4
|
+
import { TooltipProps } from "./../Tooltip/Tooltip";
|
|
5
|
+
import { CarbonIconType } from "./canonicalIconNames";
|
|
6
|
+
export interface BaseIconProps extends Omit<CarbonIconProps, "icon" | "description" | "name"> {
|
|
7
|
+
/**
|
|
8
|
+
* Carbon icon component that is used.
|
|
9
|
+
*/
|
|
10
|
+
iconComponent: CarbonIconType;
|
|
11
|
+
/**
|
|
12
|
+
* Add tooltip text to icon
|
|
13
|
+
*/
|
|
14
|
+
tooltipText?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Intent state of icon.
|
|
17
|
+
* Currently only `success`, `info`, `warning` and `danger` are implemented for icons, even there are more states available.
|
|
18
|
+
*/
|
|
19
|
+
intent?: IntentTypes;
|
|
20
|
+
/**
|
|
21
|
+
* Display large icon version.
|
|
22
|
+
*/
|
|
23
|
+
large?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Display small icon version.
|
|
26
|
+
*/
|
|
27
|
+
small?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Additional CSS classes.
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Description for icon as accessibility fallback.
|
|
34
|
+
*/
|
|
35
|
+
description?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Additonal tooltip properties, e.g. `hoverOpenDelay`.
|
|
38
|
+
*/
|
|
39
|
+
tooltipProps?: Partial<Omit<TooltipProps, "content" | "children">>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The base icon provides the basic functionality that is necessary to wrap the Carbon icon component.
|
|
43
|
+
*/
|
|
44
|
+
declare function BaseIcon({ iconComponent, className, large, small, tooltipText, tooltipProps, intent, description, ...restProps }: BaseIconProps): JSX.Element;
|
|
45
|
+
export default BaseIcon;
|
|
@@ -1,45 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import { IntentTypes } from "../../common/Intent";
|
|
4
|
-
import { TooltipProps } from "./../Tooltip/Tooltip";
|
|
2
|
+
import { BaseIconProps } from "./BaseIcon";
|
|
5
3
|
import { ValidIconName } from "./canonicalIconNames";
|
|
6
|
-
export interface IconProps extends Omit<
|
|
4
|
+
export interface IconProps extends Omit<BaseIconProps, "iconComponent"> {
|
|
7
5
|
/**
|
|
8
6
|
* Canonical icon name, or an array of strings.
|
|
9
7
|
* In case of the array the first valid icon name is used.
|
|
10
8
|
*/
|
|
11
9
|
name: ValidIconName | string[];
|
|
12
|
-
/**
|
|
13
|
-
* Add tooltip text to icon
|
|
14
|
-
*/
|
|
15
|
-
tooltipText?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Intent state of icon.
|
|
18
|
-
* Currently only `success`, `info`, `warning` and `danger` are implemented for icons, even there are more states available.
|
|
19
|
-
*/
|
|
20
|
-
intent?: IntentTypes;
|
|
21
|
-
/**
|
|
22
|
-
* Display large icon version.
|
|
23
|
-
*/
|
|
24
|
-
large?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Display small icon version.
|
|
27
|
-
*/
|
|
28
|
-
small?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Additional CSS classes.
|
|
31
|
-
*/
|
|
32
|
-
className?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Description for icon as accessibility fallback.
|
|
35
|
-
*/
|
|
36
|
-
description?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Additonal tooltip properties, e.g. `hoverOpenDelay`.
|
|
39
|
-
*/
|
|
40
|
-
tooltipProps?: Partial<Omit<TooltipProps, "content" | "children">>;
|
|
41
10
|
}
|
|
42
11
|
/** Returns the first icon name that exists or the fallback icon name. */
|
|
43
12
|
export declare const findExistingIconName: (iconNames: string[], fallbackIconName?: ValidIconName) => ValidIconName;
|
|
44
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The icon provides a graphical symbol that is specified by a canonical name.
|
|
15
|
+
* This name is hard-coded to force a homegenous usage of the [Carbon icon library](https://carbondesignsystem.com/guidelines/icons/library).
|
|
16
|
+
*/
|
|
17
|
+
declare function Icon({ name, ...otherBaseIconProps }: IconProps): JSX.Element;
|
|
45
18
|
export default Icon;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ButtonProps, AnchorOrButtonProps } from "../Button/Button";
|
|
3
|
+
import { TestIconProps } from "./TestIcon";
|
|
3
4
|
import { ValidIconName } from "./canonicalIconNames";
|
|
4
5
|
interface IconButtonProps extends Omit<ButtonProps, "icon" | "rightIcon" | "text" | "minimal" | "tooltip"> {
|
|
5
6
|
/**
|
|
6
7
|
* Canonical icon name, or an array of strings.
|
|
7
8
|
* In case of the array the first valid icon name is used.
|
|
8
9
|
*/
|
|
9
|
-
name: ValidIconName | string[]
|
|
10
|
+
name: ValidIconName | string[] | React.ReactElement<TestIconProps>;
|
|
10
11
|
/**
|
|
11
12
|
* Button text, will be displayed as tooltip.
|
|
12
13
|
*/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseIconProps } from "./BaseIcon";
|
|
3
|
+
import { CarbonIconType } from "./canonicalIconNames";
|
|
4
|
+
export interface TestIconProps extends Omit<BaseIconProps, "iconComponent"> {
|
|
5
|
+
/**
|
|
6
|
+
* Carbon icon that is used instead of the via `name` defined canonical named icon.
|
|
7
|
+
*/
|
|
8
|
+
tryout: CarbonIconType;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This component is primarily provided to test icons in a third application without defining them via a canonical name before.
|
|
12
|
+
*
|
|
13
|
+
* Example usage:
|
|
14
|
+
* ```
|
|
15
|
+
* import { LogoReact } from "@carbon/icons-react";
|
|
16
|
+
* const testIcon = <TestIcon tryout={LogoReact} />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare function TestIcon({ className, tryout, ...otherBaseIconProps }: TestIconProps): JSX.Element;
|
|
20
|
+
export default TestIcon;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { IconProps as CarbonIconProps } from "carbon-components-react";
|
|
2
3
|
/** Valid icon names. */
|
|
3
|
-
export declare type ValidIconName = "application-activities" | "application-dataintegration" | "application-explore" | "application-homepage" | "application-legacygui" | "application-mapping" | "application-queries" | "application-useraccount" | "application-vocabularies" | "application-warning" | "artefact-commit" | "artefact-customtask" | "artefact-dataset" | "artefact-dataset-csv" | "artefact-dataset-eccencadataplatform" | "artefact-dataset-excel" | "artefact-dataset-file" | "artefact-dataset-jdbc" | "artefact-dataset-json" | "artefact-dataset-multicsv" | "artefact-dataset-neo4j" | "artefact-dataset-sparkview" | "artefact-dataset-sparqlendpoint" | "artefact-dataset-sqlendpoint" | "artefact-dataset-xml" | "artefact-deprecated" | "artefact-embedded" | "artefact-errorlog" | "artefact-file" | "artefact-linking" | "artefact-project" | "artefact-rawdata" | "artefact-remote" | "artefact-report" | "artefact-task" | "artefact-transform" | "artefact-uncategorized" | "artefact-workflow" | "data-sourcepath" | "data-targetpath" | "item-add-artefact" | "item-clone" | "item-comment" | "item-copy" | "item-download" | "item-draggable" | "item-edit" | "item-evaluation" | "item-execution" | "item-info" | "item-launch" | "item-moremenu" | "item-question" | "item-reload" | "item-remove" | "item-reset" | "item-save" | "item-settings" | "item-shuffle" | "item-start" | "item-stop" | "item-upload" | "item-vertmenu" | "item-viewdetails" | "list-sort" | "list-sortasc" | "list-sortdesc" | "module-accesscontrol" | "module-annotation" | "module-dashboard" | "module-gdprsearch" | "module-integrations" | "module-linkedrules" | "module-reports" | "module-search" | "module-thesauri" | "module-timetracker" | "module-visualization" | "navigation-back" | "navigation-close" | "navigation-first" | "navigation-forth" | "navigation-jump" | "navigation-last" | "navigation-next" | "navigation-previous" | "operation-aggregation" | "operation-autolayout" | "operation-clear" | "operation-commit" | "operation-comparison" | "operation-filter" | "operation-filteredit" | "operation-link" | "operation-logout" | "operation-redo" | "operation-search" | "operation-sharelink" | "operation-transform" | "operation-undo" | "operation-unlink" | "state-checked" | "state-checkedsimple" | "state-confirmed" | "state-danger" | "state-declined" | "state-info" | "state-partlychecked" | "state-protected" | "state-success" | "state-unchecked" | "state-warning" | "toggler-caret" | "toggler-maximize" | "toggler-minimize" | "toggler-moveleft" | "toggler-moveright" | "toggler-showless" | "toggler-showmore" | "toggler-star-empty" | "toggler-star-filled" | "toggler-tree" | "undefined"
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
declare
|
|
4
|
+
export declare type ValidIconName = "application-activities" | "application-dataintegration" | "application-explore" | "application-homepage" | "application-legacygui" | "application-mapping" | "application-queries" | "application-useraccount" | "application-vocabularies" | "application-warning" | "artefact-commit" | "artefact-customtask" | "artefact-dataset" | "artefact-dataset-csv" | "artefact-dataset-eccencadataplatform" | "artefact-dataset-excel" | "artefact-dataset-file" | "artefact-dataset-jdbc" | "artefact-dataset-json" | "artefact-dataset-multicsv" | "artefact-dataset-neo4j" | "artefact-dataset-sparkview" | "artefact-dataset-sparqlendpoint" | "artefact-dataset-sqlendpoint" | "artefact-dataset-xml" | "artefact-deprecated" | "artefact-embedded" | "artefact-errorlog" | "artefact-file" | "artefact-linking" | "artefact-project" | "artefact-rawdata" | "artefact-remote" | "artefact-report" | "artefact-task" | "artefact-transform" | "artefact-uncategorized" | "artefact-workflow" | "data-sourcepath" | "data-targetpath" | "item-add-artefact" | "item-clone" | "item-comment" | "item-copy" | "item-download" | "item-draggable" | "item-edit" | "item-evaluation" | "item-execution" | "item-info" | "item-launch" | "item-moremenu" | "item-question" | "item-reload" | "item-remove" | "item-reset" | "item-save" | "item-settings" | "item-shuffle" | "item-start" | "item-stop" | "item-upload" | "item-vertmenu" | "item-viewdetails" | "list-sort" | "list-sortasc" | "list-sortdesc" | "module-accesscontrol" | "module-annotation" | "module-dashboard" | "module-gdprsearch" | "module-integrations" | "module-linkedrules" | "module-reports" | "module-search" | "module-thesauri" | "module-timetracker" | "module-visualization" | "navigation-back" | "navigation-close" | "navigation-first" | "navigation-forth" | "navigation-jump" | "navigation-last" | "navigation-next" | "navigation-previous" | "operation-aggregation" | "operation-autolayout" | "operation-clear" | "operation-commit" | "operation-comparison" | "operation-filter" | "operation-filteredit" | "operation-link" | "operation-logout" | "operation-redo" | "operation-search" | "operation-sharelink" | "operation-transform" | "operation-undo" | "operation-unlink" | "state-checked" | "state-checkedsimple" | "state-confirmed" | "state-danger" | "state-declined" | "state-info" | "state-partlychecked" | "state-protected" | "state-success" | "state-unchecked" | "state-warning" | "toggler-caret" | "toggler-maximize" | "toggler-minimize" | "toggler-moveleft" | "toggler-moveright" | "toggler-showless" | "toggler-showmore" | "toggler-star-empty" | "toggler-star-filled" | "toggler-tree" | "undefined";
|
|
5
|
+
export declare type CarbonIconType = React.ComponentType<CarbonIconProps>;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated
|
|
8
|
+
* use CarbonIconType instead
|
|
9
|
+
*/
|
|
10
|
+
export declare type IconSized = CarbonIconType;
|
|
11
|
+
declare const canonicalIconNames: Record<ValidIconName, CarbonIconType>;
|
|
10
12
|
export default canonicalIconNames;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuItemProps as BlueprintMenuItemProps } from "@blueprintjs/core";
|
|
3
|
+
import { TestIconProps } from "./../Icon/TestIcon";
|
|
3
4
|
import { ValidIconName } from "../Icon/canonicalIconNames";
|
|
4
5
|
export interface MenuItemProps extends Omit<BlueprintMenuItemProps, "icon" | "children">, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "children"> {
|
|
5
|
-
icon?: ValidIconName | string[]
|
|
6
|
+
icon?: ValidIconName | string[] | React.ReactElement<TestIconProps>;
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
@@ -82,8 +82,10 @@ interface IProps<T> extends Pick<BlueprintMultiSelectProps<T>, "items" | "placeh
|
|
|
82
82
|
* Disables the input element
|
|
83
83
|
*/
|
|
84
84
|
disabled?: boolean;
|
|
85
|
+
/** Delay in ms how long the request for the given query should be delayed. */
|
|
86
|
+
requestDelay?: number;
|
|
85
87
|
}
|
|
86
|
-
declare function MultiSelect<T>({ items, prePopulateWithItems, itemId, itemLabel, onSelection, contextOverlayProps, tagInputProps, inputProps, runOnQueryChange, fullWidth, noResultText, newItemCreationText, newItemPostfix, hasStatePrimary, hasStateDanger, hasStateSuccess, hasStateWarning, disabled, createNewItemFromQuery, ...otherProps }: IProps<T>): JSX.Element;
|
|
88
|
+
declare function MultiSelect<T>({ items, prePopulateWithItems, itemId, itemLabel, onSelection, contextOverlayProps, tagInputProps, inputProps, runOnQueryChange, fullWidth, noResultText, newItemCreationText, newItemPostfix, hasStatePrimary, hasStateDanger, hasStateSuccess, hasStateWarning, disabled, createNewItemFromQuery, requestDelay, ...otherProps }: IProps<T>): JSX.Element;
|
|
87
89
|
declare namespace MultiSelect {
|
|
88
90
|
var ofType: typeof BlueprintMultiSelect.ofType;
|
|
89
91
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ToastProps as BlueprintToastProps } from "@blueprintjs/core";
|
|
3
|
+
import { IconProps } from "./../Icon/Icon";
|
|
4
|
+
import { TestIconProps } from "./../Icon/TestIcon";
|
|
3
5
|
import { ValidIconName } from "./../Icon/canonicalIconNames";
|
|
4
6
|
export interface NotificationProps extends Omit<BlueprintToastProps, "message" | "action" | "icon" | "intent">, React.HTMLAttributes<HTMLDivElement> {
|
|
5
7
|
/**
|
|
@@ -30,19 +32,25 @@ export interface NotificationProps extends Omit<BlueprintToastProps, "message" |
|
|
|
30
32
|
*/
|
|
31
33
|
danger?: boolean;
|
|
32
34
|
/**
|
|
35
|
+
* @deprecated
|
|
33
36
|
* Notification uses the the given space more flexible.
|
|
34
|
-
*
|
|
37
|
+
* Deprecation notice: Property name will removed in future versions.
|
|
35
38
|
* Please use `flexWidth`.
|
|
36
|
-
* @depracted
|
|
37
39
|
*/
|
|
38
40
|
fullWidth?: boolean;
|
|
39
41
|
/**
|
|
40
42
|
* Notification uses the the given space more flexible.
|
|
41
|
-
* Default
|
|
43
|
+
* Default notification is displayed in min and max limits.
|
|
42
44
|
* Those limits are removed by setting this property to `true`.
|
|
43
45
|
*/
|
|
44
46
|
flexWidth?: boolean;
|
|
45
47
|
/**
|
|
48
|
+
* Icon displayed with the notification.
|
|
49
|
+
* Set it to false if you need to prevent automatically set icon regarding the notification type.
|
|
50
|
+
*/
|
|
51
|
+
icon?: false | React.ReactElement<IconProps> | React.ReactElement<TestIconProps>;
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated
|
|
46
54
|
* Icon used as depiction that is displayed with the notification.
|
|
47
55
|
*/
|
|
48
56
|
iconName?: ValidIconName | null;
|
|
@@ -52,5 +60,6 @@ export interface NotificationProps extends Omit<BlueprintToastProps, "message" |
|
|
|
52
60
|
* By default it uses colorization of an blueish info alert.
|
|
53
61
|
*/
|
|
54
62
|
declare function Notification({ actions, children, className, message, success, warning, danger, neutral, fullWidth, // deprecated
|
|
55
|
-
flexWidth, iconName,
|
|
63
|
+
flexWidth, iconName, // deprecated
|
|
64
|
+
icon, timeout, ...otherProps }: NotificationProps): JSX.Element;
|
|
56
65
|
export default Notification;
|
|
@@ -40,6 +40,7 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
40
40
|
hidden?: boolean | undefined;
|
|
41
41
|
id: import("@blueprintjs/core").TabId;
|
|
42
42
|
lang?: string | undefined;
|
|
43
|
+
nonce?: string | undefined;
|
|
43
44
|
placeholder?: string | undefined;
|
|
44
45
|
slot?: string | undefined;
|
|
45
46
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
@@ -300,6 +301,7 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
300
301
|
hidden?: boolean | undefined;
|
|
301
302
|
id: import("@blueprintjs/core").TabId;
|
|
302
303
|
lang?: string | undefined;
|
|
304
|
+
nonce?: string | undefined;
|
|
303
305
|
placeholder?: string | undefined;
|
|
304
306
|
slot?: string | undefined;
|
|
305
307
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TagProps as BlueprintTagProps } from "@blueprintjs/core";
|
|
3
3
|
import Color from "color";
|
|
4
|
-
|
|
4
|
+
import { IconProps } from "../Icon/Icon";
|
|
5
|
+
import { TestIconProps } from "../Icon/TestIcon";
|
|
6
|
+
import { ValidIconName } from "../Icon/canonicalIconNames";
|
|
7
|
+
import { IntentTypes } from "../../common/Intent";
|
|
8
|
+
export interface TagProps extends Omit<BlueprintTagProps, "active" | "fill" | "icon" | "intent" | "large" | "multiline" | "rightIcon"> {
|
|
5
9
|
/**
|
|
6
10
|
* Sets the background color of a tag, depends on the `Color` object provided by the
|
|
7
11
|
* [npm color module](https://www.npmjs.com/package/color) v3. You can use it with
|
|
@@ -23,9 +27,18 @@ interface TagProps extends Omit<BlueprintTagProps, "active" | "fill" | "large" |
|
|
|
23
27
|
*/
|
|
24
28
|
large?: boolean;
|
|
25
29
|
/**
|
|
30
|
+
* Meaning of the tag.
|
|
31
|
+
*/
|
|
32
|
+
intent?: IntentTypes;
|
|
33
|
+
/**
|
|
34
|
+
* Icon displayed left from the tag label.
|
|
35
|
+
*/
|
|
36
|
+
icon?: ValidIconName | React.ReactElement<IconProps> | React.ReactElement<TestIconProps>;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated
|
|
26
39
|
* **deprecated**, use `minimal=false` plus `emphasis="stronger"`
|
|
27
40
|
*/
|
|
28
41
|
emphasized?: never;
|
|
29
42
|
}
|
|
30
|
-
declare function Tag({ children, className, emphasis, minimal, small, large, backgroundColor, ...otherProps }: TagProps): JSX.Element;
|
|
43
|
+
declare function Tag({ children, className, intent, icon, emphasis, minimal, small, large, backgroundColor, ...otherProps }: TagProps): JSX.Element;
|
|
31
44
|
export default Tag;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TextAreaProps as BlueprintTextAreaProps } from "@blueprintjs/core";
|
|
3
|
-
|
|
3
|
+
import { InvisibleCharacterWarningProps } from "./useTextValidation";
|
|
4
|
+
export interface TextAreaProps extends Partial<BlueprintTextAreaProps> {
|
|
4
5
|
/**
|
|
5
6
|
* when set to true the input takes a blue border color
|
|
6
7
|
*/
|
|
@@ -17,6 +18,10 @@ interface TextAreaProps extends Partial<BlueprintTextAreaProps> {
|
|
|
17
18
|
* when set to true the input takes a red border color
|
|
18
19
|
*/
|
|
19
20
|
hasStateDanger?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* If set, allows to be informed of invisible, hard to spot characters in the string value.
|
|
23
|
+
*/
|
|
24
|
+
invisibleCharacterWarning?: InvisibleCharacterWarningProps;
|
|
20
25
|
}
|
|
21
|
-
declare function TextArea({ className, hasStatePrimary, hasStateSuccess, hasStateWarning, hasStateDanger, rows, ...otherProps }: TextAreaProps): JSX.Element;
|
|
26
|
+
declare function TextArea({ className, hasStatePrimary, hasStateSuccess, hasStateWarning, hasStateDanger, rows, invisibleCharacterWarning, ...otherProps }: TextAreaProps): JSX.Element;
|
|
22
27
|
export default TextArea;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MaybeElement, HTMLInputProps, InputGroupProps } from "@blueprintjs/core";
|
|
3
3
|
import { ValidIconName } from "../Icon/canonicalIconNames";
|
|
4
|
+
import { InvisibleCharacterWarningProps } from "./useTextValidation";
|
|
4
5
|
export interface TextFieldProps extends Partial<Omit<InputGroupProps, "intent" | "leftIcon"> & HTMLInputProps> {
|
|
5
6
|
/**
|
|
6
7
|
* The input element is displayed with primary color scheme.
|
|
@@ -26,9 +27,13 @@ export interface TextFieldProps extends Partial<Omit<InputGroupProps, "intent" |
|
|
|
26
27
|
* Left aligned icon, can be a canonical icon name or an `Icon` element.
|
|
27
28
|
*/
|
|
28
29
|
leftIcon?: ValidIconName | MaybeElement;
|
|
30
|
+
/**
|
|
31
|
+
* If set, allows to be informed of invisible, hard to spot characters in the string value.
|
|
32
|
+
*/
|
|
33
|
+
invisibleCharacterWarning?: InvisibleCharacterWarningProps;
|
|
29
34
|
}
|
|
30
35
|
/**
|
|
31
36
|
* Text input field.
|
|
32
37
|
*/
|
|
33
|
-
declare function TextField({ className, hasStatePrimary, hasStateSuccess, hasStateWarning, hasStateDanger, fullWidth, leftIcon, ...otherProps }: TextFieldProps): JSX.Element;
|
|
38
|
+
declare function TextField({ className, hasStatePrimary, hasStateSuccess, hasStateWarning, hasStateDanger, fullWidth, leftIcon, invisibleCharacterWarning, ...otherProps }: TextFieldProps): JSX.Element;
|
|
34
39
|
export default TextField;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ChangeEventHandler } from "react";
|
|
2
|
+
export interface InvisibleCharacterWarningProps {
|
|
3
|
+
/**
|
|
4
|
+
* If set, the function is called after every value change what invisible characters have been detected.
|
|
5
|
+
*/
|
|
6
|
+
callback: (detectedCodePoints: Set<number>) => any;
|
|
7
|
+
/**
|
|
8
|
+
* The delay in milliseconds after which an input string should be checked. Only the most recent value will be checked.
|
|
9
|
+
* A higher value will reduce the probability that the typing stalls.
|
|
10
|
+
*
|
|
11
|
+
* Default: 500
|
|
12
|
+
*/
|
|
13
|
+
callbackDelay?: number;
|
|
14
|
+
}
|
|
15
|
+
interface Props<T = Element> {
|
|
16
|
+
/** Forwarded TextField props */
|
|
17
|
+
value?: string | ReadonlyArray<string> | number | undefined;
|
|
18
|
+
readOnly?: boolean | undefined;
|
|
19
|
+
disabled?: boolean | undefined;
|
|
20
|
+
onChange?: ChangeEventHandler<T>;
|
|
21
|
+
/**
|
|
22
|
+
* If set, allows to be informed of invisible, hard to spot characters in the string value.
|
|
23
|
+
*/
|
|
24
|
+
invisibleCharacterWarning?: InvisibleCharacterWarningProps;
|
|
25
|
+
}
|
|
26
|
+
/** Validates the string value for invisible characters. */
|
|
27
|
+
export declare const useTextValidation: <T>({ value, onChange, invisibleCharacterWarning }: Props<T>) => React.ChangeEventHandler<T> | undefined;
|
|
28
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Tree as BlueprintTree, TreeProps as BlueprintTreeProps, TreeNode as BlueprintTreeNode, TreeNodeInfo as BlueprintTreeNodeInfo } from "@blueprintjs/core";
|
|
3
3
|
import { IconProps } from "./../Icon/Icon";
|
|
4
|
+
import { TestIconProps } from "./../Icon/TestIcon";
|
|
4
5
|
export interface TreeNodeInfo<T = {}> extends Omit<BlueprintTreeNodeInfo<T>, "childNodes" | "icon"> {
|
|
5
6
|
/**
|
|
6
7
|
* Child tree nodes of this node.
|
|
@@ -9,7 +10,7 @@ export interface TreeNodeInfo<T = {}> extends Omit<BlueprintTreeNodeInfo<T>, "ch
|
|
|
9
10
|
/**
|
|
10
11
|
* `<Icon />` element to render next to the node's label.
|
|
11
12
|
*/
|
|
12
|
-
icon?: React.ReactElement<IconProps>;
|
|
13
|
+
icon?: React.ReactElement<IconProps> | React.ReactElement<TestIconProps>;
|
|
13
14
|
}
|
|
14
15
|
export interface TreeNodeProps<T = {}> extends TreeNodeInfo<T> {
|
|
15
16
|
children?: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface
|
|
2
|
+
export interface HighlighterProps {
|
|
3
3
|
label?: string;
|
|
4
4
|
searchValue?: string;
|
|
5
5
|
}
|
|
@@ -8,7 +8,7 @@ interface IHighlighterProps {
|
|
|
8
8
|
* @param label The string to highlight.
|
|
9
9
|
* @param searchValue The mutli-word search query from which single words should be highlighted in the label.
|
|
10
10
|
*/
|
|
11
|
-
declare function Highlighter({ label, searchValue }:
|
|
11
|
+
declare function Highlighter({ label, searchValue }: HighlighterProps): JSX.Element;
|
|
12
12
|
/** Extracts search words separated by white space. */
|
|
13
13
|
export declare function extractSearchWords(textQuery: string, toLowerCase?: boolean): string[];
|
|
14
14
|
/** Returns true if all search words are included in the given text */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface
|
|
2
|
+
export interface OverflowTextProps {
|
|
3
3
|
ellipsis?: "reverse" | "none";
|
|
4
4
|
inline?: boolean;
|
|
5
5
|
passDown?: boolean;
|
|
@@ -8,5 +8,5 @@ interface IProps {
|
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
}
|
|
10
10
|
/** Prevents text from overflowing. */
|
|
11
|
-
declare function OverflowText({ className, children, ellipsis, inline, passDown, useHtmlElement, ...otherProps }:
|
|
11
|
+
declare function OverflowText({ className, children, ellipsis, inline, passDown, useHtmlElement, ...otherProps }: OverflowTextProps): JSX.Element;
|
|
12
12
|
export default OverflowText;
|
|
@@ -1,5 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type WhiteSpaceSizes = "tiny" | "small" | "regular" | "large" | "xlarge";
|
|
3
|
+
export interface WhiteSpaceContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Insert line breaks within an otherwise unbreakable string to prevent text from overflowing the container.
|
|
6
|
+
*/
|
|
7
|
+
linebreakForced?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Size of top margin around the container.
|
|
10
|
+
*/
|
|
11
|
+
marginTop?: WhiteSpaceSizes;
|
|
12
|
+
/**
|
|
13
|
+
* Size of right margin around the container.
|
|
14
|
+
*/
|
|
15
|
+
marginRight?: WhiteSpaceSizes;
|
|
16
|
+
/**
|
|
17
|
+
* Size of bottom margin around the container.
|
|
18
|
+
*/
|
|
19
|
+
marginBottom?: WhiteSpaceSizes;
|
|
20
|
+
/**
|
|
21
|
+
* Size of left margin around the container.
|
|
22
|
+
*/
|
|
23
|
+
marginLeft?: WhiteSpaceSizes;
|
|
24
|
+
/**
|
|
25
|
+
* Size of top padding inside the container.
|
|
26
|
+
*/
|
|
27
|
+
paddingTop?: WhiteSpaceSizes;
|
|
28
|
+
/**
|
|
29
|
+
* Size of right padding inside the container.
|
|
30
|
+
*/
|
|
31
|
+
paddingRight?: WhiteSpaceSizes;
|
|
32
|
+
/**
|
|
33
|
+
* Size of bottom padding inside the container.
|
|
34
|
+
*/
|
|
35
|
+
paddingBottom?: WhiteSpaceSizes;
|
|
36
|
+
/**
|
|
37
|
+
* Size of left padding inside the container.
|
|
38
|
+
*/
|
|
39
|
+
paddingLeft?: WhiteSpaceSizes;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Simple container to add whitespace inside and around of it without adding style attributes directly.
|
|
43
|
+
* This way the added whitespace keeps visually connected to the other whitespaces used in the application.
|
|
44
|
+
*/
|
|
45
|
+
declare function WhiteSpaceContainer({ className, children, marginTop, marginRight, marginBottom, marginLeft, paddingTop, paddingRight, paddingBottom, paddingLeft, linebreakForced, ...otherDivProps }: WhiteSpaceContainerProps): JSX.Element;
|
|
5
46
|
export default WhiteSpaceContainer;
|