@hitachivantara/uikit-react-lab 5.22.1 → 5.23.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/dist/cjs/Blade/Blade.cjs +169 -0
- package/dist/cjs/Blade/Blade.cjs.map +1 -0
- package/dist/cjs/Blade/Blade.styles.cjs +72 -0
- package/dist/cjs/Blade/Blade.styles.cjs.map +1 -0
- package/dist/cjs/Blades/Blades.cjs +105 -0
- package/dist/cjs/Blades/Blades.cjs.map +1 -0
- package/dist/cjs/Blades/Blades.styles.cjs +12 -0
- package/dist/cjs/Blades/Blades.styles.cjs.map +1 -0
- package/dist/cjs/Flow/Node/Parameters/Select.cjs +11 -11
- package/dist/cjs/Flow/Node/Parameters/Select.cjs.map +1 -1
- package/dist/cjs/Flow/Node/Parameters/Slider.cjs +8 -8
- package/dist/cjs/Flow/Node/Parameters/Slider.cjs.map +1 -1
- package/dist/cjs/Flow/Node/Parameters/Text.cjs +8 -8
- package/dist/cjs/Flow/Node/Parameters/Text.cjs.map +1 -1
- package/dist/cjs/Flow/nodes/DashboardNode.cjs +1 -3
- package/dist/cjs/Flow/nodes/DashboardNode.cjs.map +1 -1
- package/dist/cjs/index.cjs +8 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/Blade/Blade.js +168 -0
- package/dist/esm/Blade/Blade.js.map +1 -0
- package/dist/esm/Blade/Blade.styles.js +72 -0
- package/dist/esm/Blade/Blade.styles.js.map +1 -0
- package/dist/esm/Blades/Blades.js +106 -0
- package/dist/esm/Blades/Blades.js.map +1 -0
- package/dist/esm/Blades/Blades.styles.js +12 -0
- package/dist/esm/Blades/Blades.styles.js.map +1 -0
- package/dist/esm/Dashboard/{Dashboard.mjs → Dashboard.js} +3 -3
- package/dist/esm/Dashboard/Dashboard.js.map +1 -0
- package/dist/esm/Dashboard/{Dashboard.styles.mjs → Dashboard.styles.js} +1 -1
- package/dist/esm/Dashboard/Dashboard.styles.js.map +1 -0
- package/dist/esm/Flow/Background/{Background.mjs → Background.js} +1 -1
- package/dist/esm/Flow/Background/Background.js.map +1 -0
- package/dist/esm/Flow/Controls/{Controls.mjs → Controls.js} +1 -1
- package/dist/esm/Flow/Controls/Controls.js.map +1 -0
- package/dist/esm/Flow/{DroppableFlow.mjs → DroppableFlow.js} +6 -6
- package/dist/esm/Flow/DroppableFlow.js.map +1 -0
- package/dist/esm/Flow/Empty/{Empty.mjs → Empty.js} +2 -2
- package/dist/esm/Flow/Empty/Empty.js.map +1 -0
- package/dist/esm/Flow/Empty/{Empty.styles.mjs → Empty.styles.js} +1 -1
- package/dist/esm/Flow/Empty/Empty.styles.js.map +1 -0
- package/dist/esm/Flow/{Flow.mjs → Flow.js} +3 -3
- package/dist/esm/Flow/Flow.js.map +1 -0
- package/dist/esm/Flow/{Flow.styles.mjs → Flow.styles.js} +2 -2
- package/dist/esm/Flow/Flow.styles.js.map +1 -0
- package/dist/esm/Flow/FlowContext/{FlowContext.mjs → FlowContext.js} +2 -2
- package/dist/esm/Flow/FlowContext/FlowContext.js.map +1 -0
- package/dist/esm/Flow/FlowContext/{NodeMetaContext.mjs → NodeMetaContext.js} +1 -1
- package/dist/esm/Flow/FlowContext/NodeMetaContext.js.map +1 -0
- package/dist/esm/Flow/Minimap/{Minimap.mjs → Minimap.js} +3 -3
- package/dist/esm/Flow/Minimap/Minimap.js.map +1 -0
- package/dist/esm/Flow/Minimap/{Minimap.styles.mjs → Minimap.styles.js} +1 -1
- package/dist/esm/Flow/Minimap/Minimap.styles.js.map +1 -0
- package/dist/esm/Flow/Node/{BaseNode.mjs → BaseNode.js} +5 -5
- package/dist/esm/Flow/Node/BaseNode.js.map +1 -0
- package/dist/esm/Flow/Node/{BaseNode.styles.mjs → BaseNode.styles.js} +1 -1
- package/dist/esm/Flow/Node/BaseNode.styles.js.map +1 -0
- package/dist/esm/Flow/Node/{Node.mjs → Node.js} +7 -7
- package/dist/esm/Flow/Node/Node.js.map +1 -0
- package/dist/esm/Flow/Node/{Node.styles.mjs → Node.styles.js} +1 -1
- package/dist/esm/Flow/Node/Node.styles.js.map +1 -0
- package/dist/esm/Flow/Node/Parameters/{ParamRenderer.mjs → ParamRenderer.js} +4 -4
- package/dist/esm/Flow/Node/Parameters/ParamRenderer.js.map +1 -0
- package/dist/esm/Flow/Node/Parameters/{Select.mjs → Select.js} +12 -12
- package/dist/esm/Flow/Node/Parameters/Select.js.map +1 -0
- package/dist/esm/Flow/Node/Parameters/{Slider.mjs → Slider.js} +9 -9
- package/dist/esm/Flow/Node/Parameters/Slider.js.map +1 -0
- package/dist/esm/Flow/Node/Parameters/{Text.mjs → Text.js} +9 -9
- package/dist/esm/Flow/Node/Parameters/Text.js.map +1 -0
- package/dist/esm/Flow/Sidebar/{Sidebar.mjs → Sidebar.js} +8 -8
- package/dist/esm/Flow/Sidebar/Sidebar.js.map +1 -0
- package/dist/esm/Flow/Sidebar/{Sidebar.styles.mjs → Sidebar.styles.js} +1 -1
- package/dist/esm/Flow/Sidebar/Sidebar.styles.js.map +1 -0
- package/dist/esm/Flow/Sidebar/SidebarGroup/{SidebarGroup.mjs → SidebarGroup.js} +5 -5
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroup.js.map +1 -0
- package/dist/esm/Flow/Sidebar/SidebarGroup/{SidebarGroup.styles.mjs → SidebarGroup.styles.js} +1 -1
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.js.map +1 -0
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/{DraggableSidebarGroupItem.mjs → DraggableSidebarGroupItem.js} +2 -2
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js.map +1 -0
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/{SidebarGroupItem.mjs → SidebarGroupItem.js} +3 -3
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js.map +1 -0
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/{SidebarGroupItem.styles.mjs → SidebarGroupItem.styles.js} +1 -1
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.js.map +1 -0
- package/dist/esm/Flow/Sidebar/{utils.mjs → utils.js} +1 -1
- package/dist/esm/Flow/Sidebar/utils.js.map +1 -0
- package/dist/esm/Flow/{base.mjs → base.js} +1 -1
- package/dist/esm/Flow/base.js.map +1 -0
- package/dist/esm/Flow/hooks/{useFlowContext.mjs → useFlowContext.js} +2 -2
- package/dist/esm/Flow/hooks/useFlowContext.js.map +1 -0
- package/dist/esm/Flow/hooks/{useFlowNode.mjs → useFlowNode.js} +1 -1
- package/dist/esm/Flow/hooks/useFlowNode.js.map +1 -0
- package/dist/esm/Flow/hooks/{useFlowNodeMeta.mjs → useFlowNodeMeta.js} +2 -2
- package/dist/esm/Flow/hooks/useFlowNodeMeta.js.map +1 -0
- package/dist/esm/Flow/nodes/{DashboardNode.mjs → DashboardNode.js} +4 -6
- package/dist/esm/Flow/nodes/DashboardNode.js.map +1 -0
- package/dist/esm/StepNavigation/DefaultNavigation/{DefaultNavigation.mjs → DefaultNavigation.js} +3 -3
- package/dist/esm/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
- package/dist/esm/StepNavigation/DefaultNavigation/Step/{Step.mjs → Step.js} +3 -3
- package/dist/esm/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
- package/dist/esm/StepNavigation/DefaultNavigation/Step/{Step.styles.mjs → Step.styles.js} +1 -1
- package/dist/esm/StepNavigation/DefaultNavigation/Step/Step.styles.js.map +1 -0
- package/dist/esm/StepNavigation/DefaultNavigation/{utils.mjs → utils.js} +1 -1
- package/dist/esm/StepNavigation/DefaultNavigation/utils.js.map +1 -0
- package/dist/esm/StepNavigation/SimpleNavigation/Dot/{Dot.mjs → Dot.js} +4 -4
- package/dist/esm/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
- package/dist/esm/StepNavigation/SimpleNavigation/Dot/{Dot.styles.mjs → Dot.styles.js} +1 -1
- package/dist/esm/StepNavigation/SimpleNavigation/Dot/Dot.styles.js.map +1 -0
- package/dist/esm/StepNavigation/SimpleNavigation/{SimpleNavigation.mjs → SimpleNavigation.js} +3 -3
- package/dist/esm/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
- package/dist/esm/StepNavigation/SimpleNavigation/{utils.mjs → utils.js} +1 -1
- package/dist/esm/StepNavigation/SimpleNavigation/utils.js.map +1 -0
- package/dist/esm/StepNavigation/{StepNavigation.mjs → StepNavigation.js} +6 -6
- package/dist/esm/StepNavigation/StepNavigation.js.map +1 -0
- package/dist/esm/StepNavigation/{StepNavigation.styles.mjs → StepNavigation.styles.js} +1 -1
- package/dist/esm/StepNavigation/StepNavigation.styles.js.map +1 -0
- package/dist/esm/StepNavigation/{utils.mjs → utils.js} +1 -1
- package/dist/esm/StepNavigation/utils.js.map +1 -0
- package/dist/esm/Wizard/{Wizard.mjs → Wizard.js} +8 -8
- package/dist/esm/Wizard/Wizard.js.map +1 -0
- package/dist/esm/Wizard/{Wizard.styles.mjs → Wizard.styles.js} +1 -1
- package/dist/esm/Wizard/Wizard.styles.js.map +1 -0
- package/dist/esm/Wizard/WizardActions/{WizardActions.mjs → WizardActions.js} +4 -4
- package/dist/esm/Wizard/WizardActions/WizardActions.js.map +1 -0
- package/dist/esm/Wizard/WizardActions/{WizardActions.styles.mjs → WizardActions.styles.js} +1 -1
- package/dist/esm/Wizard/WizardActions/WizardActions.styles.js.map +1 -0
- package/dist/esm/Wizard/WizardContainer/{WizardContainer.mjs → WizardContainer.js} +3 -3
- package/dist/esm/Wizard/WizardContainer/WizardContainer.js.map +1 -0
- package/dist/esm/Wizard/WizardContainer/{WizardContainer.styles.mjs → WizardContainer.styles.js} +1 -1
- package/dist/esm/Wizard/WizardContainer/WizardContainer.styles.js.map +1 -0
- package/dist/esm/Wizard/WizardContent/{LoadingContainer.mjs → LoadingContainer.js} +2 -2
- package/dist/esm/Wizard/WizardContent/LoadingContainer.js.map +1 -0
- package/dist/esm/Wizard/WizardContent/{LoadingContainer.styles.mjs → LoadingContainer.styles.js} +1 -1
- package/dist/esm/Wizard/WizardContent/LoadingContainer.styles.js.map +1 -0
- package/dist/esm/Wizard/WizardContent/{WizardContent.mjs → WizardContent.js} +5 -5
- package/dist/esm/Wizard/WizardContent/WizardContent.js.map +1 -0
- package/dist/esm/Wizard/WizardContent/{WizardContent.styles.mjs → WizardContent.styles.js} +1 -1
- package/dist/esm/Wizard/WizardContent/WizardContent.styles.js.map +1 -0
- package/dist/esm/Wizard/WizardContext/{WizardContext.mjs → WizardContext.js} +1 -1
- package/dist/esm/Wizard/WizardContext/WizardContext.js.map +1 -0
- package/dist/esm/Wizard/WizardTitle/{WizardTitle.mjs → WizardTitle.js} +5 -5
- package/dist/esm/Wizard/WizardTitle/WizardTitle.js.map +1 -0
- package/dist/esm/Wizard/WizardTitle/{WizardTitle.styles.mjs → WizardTitle.styles.js} +1 -1
- package/dist/esm/Wizard/WizardTitle/WizardTitle.styles.js.map +1 -0
- package/dist/esm/index.js +82 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/types/index.d.ts +244 -62
- package/package.json +6 -6
- package/dist/esm/Dashboard/Dashboard.mjs.map +0 -1
- package/dist/esm/Dashboard/Dashboard.styles.mjs.map +0 -1
- package/dist/esm/Flow/Background/Background.mjs.map +0 -1
- package/dist/esm/Flow/Controls/Controls.mjs.map +0 -1
- package/dist/esm/Flow/DroppableFlow.mjs.map +0 -1
- package/dist/esm/Flow/Empty/Empty.mjs.map +0 -1
- package/dist/esm/Flow/Empty/Empty.styles.mjs.map +0 -1
- package/dist/esm/Flow/Flow.mjs.map +0 -1
- package/dist/esm/Flow/Flow.styles.mjs.map +0 -1
- package/dist/esm/Flow/FlowContext/FlowContext.mjs.map +0 -1
- package/dist/esm/Flow/FlowContext/NodeMetaContext.mjs.map +0 -1
- package/dist/esm/Flow/Minimap/Minimap.mjs.map +0 -1
- package/dist/esm/Flow/Minimap/Minimap.styles.mjs.map +0 -1
- package/dist/esm/Flow/Node/BaseNode.mjs.map +0 -1
- package/dist/esm/Flow/Node/BaseNode.styles.mjs.map +0 -1
- package/dist/esm/Flow/Node/Node.mjs.map +0 -1
- package/dist/esm/Flow/Node/Node.styles.mjs.map +0 -1
- package/dist/esm/Flow/Node/Parameters/ParamRenderer.mjs.map +0 -1
- package/dist/esm/Flow/Node/Parameters/Select.mjs.map +0 -1
- package/dist/esm/Flow/Node/Parameters/Slider.mjs.map +0 -1
- package/dist/esm/Flow/Node/Parameters/Text.mjs.map +0 -1
- package/dist/esm/Flow/Sidebar/Sidebar.mjs.map +0 -1
- package/dist/esm/Flow/Sidebar/Sidebar.styles.mjs.map +0 -1
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroup.mjs.map +0 -1
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.mjs.map +0 -1
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.mjs.map +0 -1
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.mjs.map +0 -1
- package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.mjs.map +0 -1
- package/dist/esm/Flow/Sidebar/utils.mjs.map +0 -1
- package/dist/esm/Flow/base.mjs.map +0 -1
- package/dist/esm/Flow/hooks/useFlowContext.mjs.map +0 -1
- package/dist/esm/Flow/hooks/useFlowNode.mjs.map +0 -1
- package/dist/esm/Flow/hooks/useFlowNodeMeta.mjs.map +0 -1
- package/dist/esm/Flow/nodes/DashboardNode.mjs.map +0 -1
- package/dist/esm/StepNavigation/DefaultNavigation/DefaultNavigation.mjs.map +0 -1
- package/dist/esm/StepNavigation/DefaultNavigation/Step/Step.mjs.map +0 -1
- package/dist/esm/StepNavigation/DefaultNavigation/Step/Step.styles.mjs.map +0 -1
- package/dist/esm/StepNavigation/DefaultNavigation/utils.mjs.map +0 -1
- package/dist/esm/StepNavigation/SimpleNavigation/Dot/Dot.mjs.map +0 -1
- package/dist/esm/StepNavigation/SimpleNavigation/Dot/Dot.styles.mjs.map +0 -1
- package/dist/esm/StepNavigation/SimpleNavigation/SimpleNavigation.mjs.map +0 -1
- package/dist/esm/StepNavigation/SimpleNavigation/utils.mjs.map +0 -1
- package/dist/esm/StepNavigation/StepNavigation.mjs.map +0 -1
- package/dist/esm/StepNavigation/StepNavigation.styles.mjs.map +0 -1
- package/dist/esm/StepNavigation/utils.mjs.map +0 -1
- package/dist/esm/Wizard/Wizard.mjs.map +0 -1
- package/dist/esm/Wizard/Wizard.styles.mjs.map +0 -1
- package/dist/esm/Wizard/WizardActions/WizardActions.mjs.map +0 -1
- package/dist/esm/Wizard/WizardActions/WizardActions.styles.mjs.map +0 -1
- package/dist/esm/Wizard/WizardContainer/WizardContainer.mjs.map +0 -1
- package/dist/esm/Wizard/WizardContainer/WizardContainer.styles.mjs.map +0 -1
- package/dist/esm/Wizard/WizardContent/LoadingContainer.mjs.map +0 -1
- package/dist/esm/Wizard/WizardContent/LoadingContainer.styles.mjs.map +0 -1
- package/dist/esm/Wizard/WizardContent/WizardContent.mjs.map +0 -1
- package/dist/esm/Wizard/WizardContent/WizardContent.styles.mjs.map +0 -1
- package/dist/esm/Wizard/WizardContext/WizardContext.mjs.map +0 -1
- package/dist/esm/Wizard/WizardTitle/WizardTitle.mjs.map +0 -1
- package/dist/esm/Wizard/WizardTitle/WizardTitle.styles.mjs.map +0 -1
- package/dist/esm/index.mjs +0 -74
- package/dist/esm/index.mjs.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { Edge } from 'reactflow';
|
|
|
10
10
|
import { ExtractNames } from '@hitachivantara/uikit-react-core';
|
|
11
11
|
import { FC } from 'react';
|
|
12
12
|
import { GetMiniMapNodeAttribute } from 'reactflow';
|
|
13
|
+
import { HTMLAttributes } from 'react';
|
|
13
14
|
import { HvActionGeneric } from '@hitachivantara/uikit-react-core';
|
|
14
15
|
import { HvActionsGenericProps } from '@hitachivantara/uikit-react-core';
|
|
15
16
|
import { HvAvatarSize } from '@hitachivantara/uikit-react-core';
|
|
@@ -21,6 +22,7 @@ import { HvDialogProps } from '@hitachivantara/uikit-react-core';
|
|
|
21
22
|
import { HvDrawerProps } from '@hitachivantara/uikit-react-core';
|
|
22
23
|
import { HvEmptyStateProps } from '@hitachivantara/uikit-react-core';
|
|
23
24
|
import { HvSliderProps } from '@hitachivantara/uikit-react-core';
|
|
25
|
+
import { HvTypographyVariants } from '@hitachivantara/uikit-react-core';
|
|
24
26
|
import { JSX as JSX_2 } from '@emotion/react/jsx-runtime';
|
|
25
27
|
import { MiniMapProps } from 'reactflow';
|
|
26
28
|
import { ModalProps } from '@mui/material/Modal';
|
|
@@ -32,14 +34,28 @@ import { ReactFlowProps } from 'reactflow';
|
|
|
32
34
|
import { ReactGridLayoutProps } from 'react-grid-layout';
|
|
33
35
|
import { ResponsiveProps } from 'react-grid-layout';
|
|
34
36
|
import { SetStateAction } from 'react';
|
|
37
|
+
import { SyntheticEvent } from 'react';
|
|
38
|
+
|
|
39
|
+
export declare const bladeClasses: {
|
|
40
|
+
container: "HvBlade-container";
|
|
41
|
+
root: "HvBlade-root";
|
|
42
|
+
disabled: "HvBlade-disabled";
|
|
43
|
+
button: "HvBlade-button";
|
|
44
|
+
expanded: "HvBlade-expanded";
|
|
45
|
+
heading: "HvBlade-heading";
|
|
46
|
+
fullWidth: "HvBlade-fullWidth";
|
|
47
|
+
textOnlyLabel: "HvBlade-textOnlyLabel";
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export declare const bladesClasses: {
|
|
51
|
+
root: "HvBlades-root";
|
|
52
|
+
};
|
|
35
53
|
|
|
36
54
|
export declare const dashboardClasses: {
|
|
37
55
|
root: "HvDashboard-root";
|
|
38
56
|
};
|
|
39
57
|
|
|
40
58
|
declare const DEFAULT_LABELS: {
|
|
41
|
-
title: string;
|
|
42
|
-
description: string;
|
|
43
59
|
emptyMessage: string;
|
|
44
60
|
dialogTitle: string;
|
|
45
61
|
dialogSubtitle: string;
|
|
@@ -87,6 +103,143 @@ export declare const flowSidebarClasses: {
|
|
|
87
103
|
nodeType: "HvFlowSidebar-nodeType";
|
|
88
104
|
};
|
|
89
105
|
|
|
106
|
+
/**
|
|
107
|
+
* A blade is a design element that expands horizontally to reveal information, similar to an accordion.
|
|
108
|
+
*
|
|
109
|
+
* It is usually stacked horizontally with other blades and works best when used within a flex container.
|
|
110
|
+
* The `HvBlades` component is recommended for this purpose, as it also provides better management of the
|
|
111
|
+
* blades' expanded state.
|
|
112
|
+
*/
|
|
113
|
+
export declare const HvBlade: (props: HvBladeProps) => JSX_2.Element;
|
|
114
|
+
|
|
115
|
+
export declare type HvBladeClasses = ExtractNames<typeof useClasses>;
|
|
116
|
+
|
|
117
|
+
export declare interface HvBladeProps extends HvBaseProps<HTMLDivElement, "onChange" | "children"> {
|
|
118
|
+
/**
|
|
119
|
+
* The content that will be rendered within the blade.
|
|
120
|
+
*/
|
|
121
|
+
children: React_2.ReactNode;
|
|
122
|
+
/**
|
|
123
|
+
* The content of the blade's button.
|
|
124
|
+
*
|
|
125
|
+
* If a render function is provided, it will be called with the expanded state as an argument.
|
|
126
|
+
*/
|
|
127
|
+
label?: React_2.ReactNode | ((expanded: boolean) => React_2.ReactNode);
|
|
128
|
+
/**
|
|
129
|
+
* Typography variant for the blade's button label.
|
|
130
|
+
*/
|
|
131
|
+
labelVariant?: HvTypographyVariants;
|
|
132
|
+
/**
|
|
133
|
+
* Heading Level to apply to blade button.
|
|
134
|
+
*
|
|
135
|
+
* If 'undefined', the button will not have a header wrapper.
|
|
136
|
+
*/
|
|
137
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
138
|
+
/**
|
|
139
|
+
* Indicates whether the blade is expanded or not.
|
|
140
|
+
*
|
|
141
|
+
* When defined the expanded state becomes controlled.
|
|
142
|
+
*
|
|
143
|
+
* @default undefined
|
|
144
|
+
*/
|
|
145
|
+
expanded?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Specifies the initial expanded state of the blade when it is uncontrolled.
|
|
148
|
+
*/
|
|
149
|
+
defaultExpanded?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Callback function triggered when the blade's button is pressed.
|
|
152
|
+
* It receives the event and the new expanded state as arguments.
|
|
153
|
+
*
|
|
154
|
+
* If the blade is uncontrolled, this new state will be effective.
|
|
155
|
+
* If the blade is controlled, it is up to the parent component to manage this state.
|
|
156
|
+
*
|
|
157
|
+
* @param {SyntheticEvent} event The event source of the callback.
|
|
158
|
+
* @param {boolean} value The new value.
|
|
159
|
+
*/
|
|
160
|
+
onChange?: (event: React_2.SyntheticEvent, value: boolean) => void;
|
|
161
|
+
/**
|
|
162
|
+
* Specifies whether the blade is disabled. If true, the blade cannot be interacted with.
|
|
163
|
+
*/
|
|
164
|
+
disabled?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* If true, the blade will take up the maximum width of the container when expanded.
|
|
167
|
+
*/
|
|
168
|
+
fullWidth?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Props to be passed to the button that toggles the blade's expanded state.
|
|
171
|
+
* This can be used to further customize the appearance or behavior of the blade's button,
|
|
172
|
+
* e.g. to set the aria-label attribute.
|
|
173
|
+
*/
|
|
174
|
+
buttonProps?: HTMLAttributes<HTMLDivElement>;
|
|
175
|
+
/**
|
|
176
|
+
* Props to be passed to the container div that holds the blade's children.
|
|
177
|
+
* This can be used to further customize the appearance or behavior of the blade's content area.
|
|
178
|
+
*/
|
|
179
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
180
|
+
/**
|
|
181
|
+
* A Jss Object used to override or extend the styles applied.
|
|
182
|
+
*/
|
|
183
|
+
classes?: HvBladeClasses;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* `HvBlades` is a component that groups multiple `HvBlade` components.
|
|
188
|
+
*
|
|
189
|
+
* It allows for better control over the expanded state of blades, suitable for both
|
|
190
|
+
* controlled and uncontrolled scenarios.
|
|
191
|
+
*/
|
|
192
|
+
export declare const HvBlades: (props: HvBladesProps) => JSX_2.Element;
|
|
193
|
+
|
|
194
|
+
export declare type HvBladesClasses = ExtractNames<typeof useClasses_2>;
|
|
195
|
+
|
|
196
|
+
export declare interface HvBladesProps extends HvBaseProps<HTMLDivElement, "onChange" | "children"> {
|
|
197
|
+
/**
|
|
198
|
+
* Array of indices representing the expanded state of each blade.
|
|
199
|
+
*
|
|
200
|
+
* When defined, the expanded state of the blades becomes controlled.
|
|
201
|
+
*/
|
|
202
|
+
expanded?: number[];
|
|
203
|
+
/**
|
|
204
|
+
* Initial expanded state of the blades when in an uncontrolled state.
|
|
205
|
+
*
|
|
206
|
+
* It's an array of indices representing the blades that should be initially expanded.
|
|
207
|
+
*/
|
|
208
|
+
defaultExpanded?: number[];
|
|
209
|
+
/**
|
|
210
|
+
* If true, ensures that only one blade can be expanded at a time.
|
|
211
|
+
*/
|
|
212
|
+
atMostOneExpanded?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* If true, ensures that at least one blade is always expanded.
|
|
215
|
+
*/
|
|
216
|
+
atLeastOneExpanded?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* If true, the blades will take up the full width of the container by default.
|
|
219
|
+
*/
|
|
220
|
+
fullWidthBlades?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Callback function triggered when the expanded state of any blade changes.
|
|
223
|
+
* It receives the event and the new array of expanded indices as arguments.
|
|
224
|
+
*
|
|
225
|
+
* If uncontrolled, this new state will be effective.
|
|
226
|
+
* If controlled, it is up to the parent component to manage this state.
|
|
227
|
+
*
|
|
228
|
+
* @param {SyntheticEvent} event The event source of the callback.
|
|
229
|
+
* @param {number[]} value Array of indices of the blades that are expanded.
|
|
230
|
+
*/
|
|
231
|
+
onChange?: (event: SyntheticEvent, value: number[]) => void;
|
|
232
|
+
/**
|
|
233
|
+
* The blades to be rendered within the group.
|
|
234
|
+
* Must be instances of `HvBlade`, otherwise the behavior is undefined and will most likely break.
|
|
235
|
+
*/
|
|
236
|
+
children: React_2.ReactNode;
|
|
237
|
+
/**
|
|
238
|
+
* A Jss Object used to override or extend the styles applied.
|
|
239
|
+
*/
|
|
240
|
+
classes?: HvBladesClasses;
|
|
241
|
+
}
|
|
242
|
+
|
|
90
243
|
/**
|
|
91
244
|
* A Dashboard grid layout component, based on `react-grid-layout`.
|
|
92
245
|
* The children elements are grid items and must be `key`ed.
|
|
@@ -97,11 +250,11 @@ export declare const flowSidebarClasses: {
|
|
|
97
250
|
*/
|
|
98
251
|
export declare const HvDashboard: (props: HvDashboardProps) => JSX_2.Element;
|
|
99
252
|
|
|
100
|
-
export declare type HvDashboardClasses = ExtractNames<typeof
|
|
253
|
+
export declare type HvDashboardClasses = ExtractNames<typeof useClasses_3>;
|
|
101
254
|
|
|
102
255
|
export declare const HvDashboardNode: (props: HvDashboardNodeProps) => JSX_2.Element;
|
|
103
256
|
|
|
104
|
-
export declare interface HvDashboardNodeClasses extends ExtractNames<typeof
|
|
257
|
+
export declare interface HvDashboardNodeClasses extends ExtractNames<typeof useClasses_9>, HvFlowNodeClasses {
|
|
105
258
|
}
|
|
106
259
|
|
|
107
260
|
export declare const hvDashboardNodeClasses: {
|
|
@@ -111,7 +264,7 @@ export declare const hvDashboardNodeClasses: {
|
|
|
111
264
|
|
|
112
265
|
export declare interface HvDashboardNodeProps extends HvFlowNodeProps, Pick<HvDialogProps, "open" | "onClose">, Pick<HvDashboardProps, "layout"> {
|
|
113
266
|
classes?: HvDashboardNodeClasses;
|
|
114
|
-
labels?: typeof DEFAULT_LABELS
|
|
267
|
+
labels?: Partial<typeof DEFAULT_LABELS>;
|
|
115
268
|
previewItems?: React.ReactNode;
|
|
116
269
|
onApply?: () => void;
|
|
117
270
|
onCancel?: () => void;
|
|
@@ -182,7 +335,7 @@ export declare interface HvFlowBackgroundProps extends Omit<BackgroundProps, "co
|
|
|
182
335
|
|
|
183
336
|
export declare const HvFlowBaseNode: ({ id, title, headerItems, icon, color: colorProp, inputs, outputs, nodeActions, footer, classes: classesProp, className, children, }: HvFlowBaseNodeProps<unknown>) => JSX_2.Element | null;
|
|
184
337
|
|
|
185
|
-
export declare type HvFlowBaseNodeClasses = ExtractNames<typeof
|
|
338
|
+
export declare type HvFlowBaseNodeClasses = ExtractNames<typeof useClasses_7>;
|
|
186
339
|
|
|
187
340
|
export declare interface HvFlowBaseNodeProps<T = any> extends Omit<HvBaseProps, "id">, NodeProps<T> {
|
|
188
341
|
/** Header title */
|
|
@@ -211,7 +364,7 @@ export declare type HvFlowBuiltInActions = Omit<HvFlowNodeAction, "id" | "callba
|
|
|
211
364
|
id: HvFlowBuiltInAction;
|
|
212
365
|
};
|
|
213
366
|
|
|
214
|
-
export declare type HvFlowClasses = ExtractNames<typeof
|
|
367
|
+
export declare type HvFlowClasses = ExtractNames<typeof useClasses_4>;
|
|
215
368
|
|
|
216
369
|
declare interface HvFlowContextValue<NodeGroups extends keyof any = string> {
|
|
217
370
|
/** Flow nodes types. */
|
|
@@ -257,7 +410,7 @@ export declare interface HvFlowEmptyProps extends HvEmptyStateProps {
|
|
|
257
410
|
|
|
258
411
|
export declare const HvFlowMinimap: ({ nodeColor, maskColor, maskStrokeColor, nodeStrokeColor, classes: classesProp, className, ...others }: HvFlowMinimapProps) => JSX_2.Element;
|
|
259
412
|
|
|
260
|
-
export declare type HvFlowMinimapClasses = ExtractNames<typeof
|
|
413
|
+
export declare type HvFlowMinimapClasses = ExtractNames<typeof useClasses_5>;
|
|
261
414
|
|
|
262
415
|
export declare interface HvFlowMinimapProps<NodeData = any> extends Omit<MiniMapProps<NodeData>, "nodeColor" | "nodeStrokeColor" | "maskColor" | "maskStrokeColor"> {
|
|
263
416
|
/** Node color. Defaults to `atmo4`. */
|
|
@@ -278,7 +431,7 @@ export declare interface HvFlowNodeAction extends HvActionGeneric {
|
|
|
278
431
|
callback?: (node: Node_2) => void;
|
|
279
432
|
}
|
|
280
433
|
|
|
281
|
-
export declare interface HvFlowNodeClasses extends ExtractNames<typeof
|
|
434
|
+
export declare interface HvFlowNodeClasses extends ExtractNames<typeof useClasses_8>, HvFlowBaseNodeClasses {
|
|
282
435
|
}
|
|
283
436
|
|
|
284
437
|
export declare interface HvFlowNodeComponentClass<GroupId extends keyof any = string, NodeData = any> extends ComponentClass<NodeProps>, NodeExtras<GroupId, NodeData> {
|
|
@@ -405,7 +558,7 @@ export declare interface HvFlowProps<NodeGroups extends keyof any = string, Node
|
|
|
405
558
|
|
|
406
559
|
export declare const HvFlowSidebar: ({ id, title, description, anchor, buttonTitle, classes: classesProp, labels: labelsProps, dragOverlayProps, defaultGroupProps, ...others }: HvFlowSidebarProps) => JSX_2.Element;
|
|
407
560
|
|
|
408
|
-
export declare type HvFlowSidebarClasses = ExtractNames<typeof
|
|
561
|
+
export declare type HvFlowSidebarClasses = ExtractNames<typeof useClasses_6>;
|
|
409
562
|
|
|
410
563
|
export declare interface HvFlowSidebarProps extends Omit<HvDrawerProps, "classes" | "title"> {
|
|
411
564
|
/** Sidebar title. */
|
|
@@ -431,7 +584,7 @@ export declare interface HvFlowSidebarProps extends Omit<HvDrawerProps, "classes
|
|
|
431
584
|
defaultGroupProps?: HvFlowNodeGroup;
|
|
432
585
|
}
|
|
433
586
|
|
|
434
|
-
declare type HvStepClasses = ExtractNames<typeof
|
|
587
|
+
declare type HvStepClasses = ExtractNames<typeof useClasses_11>;
|
|
435
588
|
|
|
436
589
|
/**
|
|
437
590
|
* Navigation page with steps.
|
|
@@ -456,7 +609,7 @@ declare type HvStepClasses = ExtractNames<typeof useClasses_9>;
|
|
|
456
609
|
*/
|
|
457
610
|
export declare const HvStepNavigation: ({ className, classes: classesProp, width, steps, stepSize, showTitles, type, "aria-label": ariaLabel, ...others }: HvStepNavigationProps) => JSX_2.Element;
|
|
458
611
|
|
|
459
|
-
export declare type HvStepNavigationClasses = ExtractNames<typeof
|
|
612
|
+
export declare type HvStepNavigationClasses = ExtractNames<typeof useClasses_10>;
|
|
460
613
|
|
|
461
614
|
export declare interface HvStepNavigationProps extends HvBaseProps {
|
|
462
615
|
/** Type of step navigation. Values = {"Simple", "Default"} */
|
|
@@ -502,7 +655,7 @@ export declare const HvWizard: ({ className, children, onClose, handleSubmit, ti
|
|
|
502
655
|
|
|
503
656
|
export declare const HvWizardActions: ({ classes: classesProp, handleClose, handleSubmit, loading, skippable, labels, }: HvWizardActionsProps) => JSX_2.Element;
|
|
504
657
|
|
|
505
|
-
export declare type HvWizardActionsClasses = ExtractNames<typeof
|
|
658
|
+
export declare type HvWizardActionsClasses = ExtractNames<typeof useClasses_13>;
|
|
506
659
|
|
|
507
660
|
export declare interface HvWizardActionsProps extends HvBaseProps {
|
|
508
661
|
/** Function to handle the cancel button. */
|
|
@@ -530,11 +683,11 @@ export declare interface HvWizardActionsProps extends HvBaseProps {
|
|
|
530
683
|
classes?: HvWizardActionsClasses;
|
|
531
684
|
}
|
|
532
685
|
|
|
533
|
-
export declare type HvWizardClasses = ExtractNames<typeof
|
|
686
|
+
export declare type HvWizardClasses = ExtractNames<typeof useClasses_12>;
|
|
534
687
|
|
|
535
688
|
export declare const HvWizardContainer: (props: HvWizardContainerProps) => JSX_2.Element;
|
|
536
689
|
|
|
537
|
-
export declare type HvWizardContainerClasses = ExtractNames<typeof
|
|
690
|
+
export declare type HvWizardContainerClasses = ExtractNames<typeof useClasses_15>;
|
|
538
691
|
|
|
539
692
|
export declare interface HvWizardContainerProps extends Omit<HvBaseProps, "onClose">, Pick<HvDialogProps, "maxWidth" | "fullWidth"> {
|
|
540
693
|
/** Current state of the Wizard. */
|
|
@@ -547,7 +700,7 @@ export declare interface HvWizardContainerProps extends Omit<HvBaseProps, "onClo
|
|
|
547
700
|
|
|
548
701
|
export declare const HvWizardContent: ({ classes: classesProp, fixedHeight, loading, children, summaryContent, }: HvWizardContentProps) => JSX_2.Element;
|
|
549
702
|
|
|
550
|
-
export declare type HvWizardContentClasses = ExtractNames<typeof
|
|
703
|
+
export declare type HvWizardContentClasses = ExtractNames<typeof useClasses_16>;
|
|
551
704
|
|
|
552
705
|
export declare interface HvWizardContentProps extends HvBaseProps {
|
|
553
706
|
/** Forces minimum height to the component. */
|
|
@@ -614,7 +767,7 @@ export declare type HvWizardTabs = {
|
|
|
614
767
|
|
|
615
768
|
export declare const HvWizardTitle: ({ title, hasSummary, labels, classes: classesProp, customStep, }: HvWizardTitleProps) => JSX_2.Element;
|
|
616
769
|
|
|
617
|
-
export declare type HvWizardTitleClasses = ExtractNames<typeof
|
|
770
|
+
export declare type HvWizardTitleClasses = ExtractNames<typeof useClasses_14>;
|
|
618
771
|
|
|
619
772
|
export declare interface HvWizardTitleProps extends HvBaseProps {
|
|
620
773
|
/** Title for the wizard. */
|
|
@@ -644,9 +797,31 @@ export declare const stepNavigationClasses: {
|
|
|
644
797
|
titles: "HvStepNavigation-titles";
|
|
645
798
|
};
|
|
646
799
|
|
|
647
|
-
declare const useClasses: (classesProp?: Partial<Record<"root", string>>, addStatic?: boolean) => {
|
|
800
|
+
declare const useClasses: (classesProp?: Partial<Record<"container" | "root" | "disabled" | "button" | "expanded" | "heading" | "fullWidth" | "textOnlyLabel", string>>, addStatic?: boolean) => {
|
|
801
|
+
classes: {
|
|
802
|
+
container: string;
|
|
803
|
+
root: string;
|
|
804
|
+
disabled: string;
|
|
805
|
+
button: string;
|
|
806
|
+
expanded: string;
|
|
807
|
+
heading: string;
|
|
808
|
+
fullWidth: string;
|
|
809
|
+
textOnlyLabel: string;
|
|
810
|
+
};
|
|
811
|
+
css: {
|
|
812
|
+
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
813
|
+
(...args: CSSInterpolation[]): string;
|
|
814
|
+
};
|
|
815
|
+
cx: (...args: any) => string;
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
declare const useClasses_10: (classesProp?: Partial<Record<"root" | "separator" | "li" | "ol" | "titles", string>>, addStatic?: boolean) => {
|
|
648
819
|
classes: {
|
|
649
820
|
root: string;
|
|
821
|
+
separator: string;
|
|
822
|
+
li: string;
|
|
823
|
+
ol: string;
|
|
824
|
+
titles: string;
|
|
650
825
|
};
|
|
651
826
|
css: {
|
|
652
827
|
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
@@ -655,9 +830,18 @@ declare const useClasses: (classesProp?: Partial<Record<"root", string>>, addSta
|
|
|
655
830
|
cx: (...args: any) => string;
|
|
656
831
|
};
|
|
657
832
|
|
|
658
|
-
declare const
|
|
833
|
+
declare const useClasses_11: (classesProp?: Partial<Record<"xs" | "sm" | "md" | "lg" | "xl" | "root" | "ghost" | "avatar" | "ghostDisabled" | "notCurrent", string>>, addStatic?: boolean) => {
|
|
659
834
|
classes: {
|
|
835
|
+
xs: string;
|
|
836
|
+
sm: string;
|
|
837
|
+
md: string;
|
|
838
|
+
lg: string;
|
|
839
|
+
xl: string;
|
|
660
840
|
root: string;
|
|
841
|
+
ghost: string;
|
|
842
|
+
avatar: string;
|
|
843
|
+
ghostDisabled: string;
|
|
844
|
+
notCurrent: string;
|
|
661
845
|
};
|
|
662
846
|
css: {
|
|
663
847
|
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
@@ -666,7 +850,18 @@ declare const useClasses_10: (classesProp?: Partial<Record<"root", string>>, add
|
|
|
666
850
|
cx: (...args: any) => string;
|
|
667
851
|
};
|
|
668
852
|
|
|
669
|
-
declare const
|
|
853
|
+
declare const useClasses_12: (classesProp?: Partial<Record<"root", string>>, addStatic?: boolean) => {
|
|
854
|
+
classes: {
|
|
855
|
+
root: string;
|
|
856
|
+
};
|
|
857
|
+
css: {
|
|
858
|
+
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
859
|
+
(...args: CSSInterpolation[]): string;
|
|
860
|
+
};
|
|
861
|
+
cx: (...args: any) => string;
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
declare const useClasses_13: (classesProp?: Partial<Record<"actionsContainer" | "buttonWidth" | "buttonsContainer" | "buttonSpacing", string>>, addStatic?: boolean) => {
|
|
670
865
|
classes: {
|
|
671
866
|
actionsContainer: string;
|
|
672
867
|
buttonWidth: string;
|
|
@@ -680,7 +875,7 @@ declare const useClasses_11: (classesProp?: Partial<Record<"actionsContainer" |
|
|
|
680
875
|
cx: (...args: any) => string;
|
|
681
876
|
};
|
|
682
877
|
|
|
683
|
-
declare const
|
|
878
|
+
declare const useClasses_14: (classesProp?: Partial<Record<"titleContainer" | "messageContainer" | "headerContainer" | "buttonWidth" | "rootSummaryButton" | "stepContainer", string>>, addStatic?: boolean) => {
|
|
684
879
|
classes: {
|
|
685
880
|
titleContainer: string;
|
|
686
881
|
messageContainer: string;
|
|
@@ -696,7 +891,7 @@ declare const useClasses_12: (classesProp?: Partial<Record<"titleContainer" | "m
|
|
|
696
891
|
cx: (...args: any) => string;
|
|
697
892
|
};
|
|
698
893
|
|
|
699
|
-
declare const
|
|
894
|
+
declare const useClasses_15: (classesProp?: Partial<Record<"root" | "paper" | "closeButton", string>>, addStatic?: boolean) => {
|
|
700
895
|
classes: {
|
|
701
896
|
root: string;
|
|
702
897
|
paper: string;
|
|
@@ -709,7 +904,7 @@ declare const useClasses_13: (classesProp?: Partial<Record<"root" | "paper" | "c
|
|
|
709
904
|
cx: (...args: any) => string;
|
|
710
905
|
};
|
|
711
906
|
|
|
712
|
-
declare const
|
|
907
|
+
declare const useClasses_16: (classesProp?: Partial<Record<"contentContainer" | "fixedHeight" | "summaryRef" | "summarySticky" | "summaryContainer", string>>, addStatic?: boolean) => {
|
|
713
908
|
classes: {
|
|
714
909
|
contentContainer: string;
|
|
715
910
|
fixedHeight: string;
|
|
@@ -746,7 +941,29 @@ declare const useClasses_3: (classesProp?: Partial<Record<"root", string>>, addS
|
|
|
746
941
|
cx: (...args: any) => string;
|
|
747
942
|
};
|
|
748
943
|
|
|
749
|
-
declare const useClasses_4: (classesProp?: Partial<Record<"
|
|
944
|
+
declare const useClasses_4: (classesProp?: Partial<Record<"root", string>>, addStatic?: boolean) => {
|
|
945
|
+
classes: {
|
|
946
|
+
root: string;
|
|
947
|
+
};
|
|
948
|
+
css: {
|
|
949
|
+
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
950
|
+
(...args: CSSInterpolation[]): string;
|
|
951
|
+
};
|
|
952
|
+
cx: (...args: any) => string;
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
declare const useClasses_5: (classesProp?: Partial<Record<"root", string>>, addStatic?: boolean) => {
|
|
956
|
+
classes: {
|
|
957
|
+
root: string;
|
|
958
|
+
};
|
|
959
|
+
css: {
|
|
960
|
+
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
961
|
+
(...args: CSSInterpolation[]): string;
|
|
962
|
+
};
|
|
963
|
+
cx: (...args: any) => string;
|
|
964
|
+
};
|
|
965
|
+
|
|
966
|
+
declare const useClasses_6: (classesProp?: Partial<Record<"description" | "titleContainer" | "drawerPaper" | "contentContainer" | "searchRoot" | "groupsContainer" | "nodeType", string>>, addStatic?: boolean) => {
|
|
750
967
|
classes: {
|
|
751
968
|
description: string;
|
|
752
969
|
titleContainer: string;
|
|
@@ -763,7 +980,7 @@ declare const useClasses_4: (classesProp?: Partial<Record<"description" | "title
|
|
|
763
980
|
cx: (...args: any) => string;
|
|
764
981
|
};
|
|
765
982
|
|
|
766
|
-
declare const
|
|
983
|
+
declare const useClasses_7: (classesProp?: Partial<Record<"root" | "title" | "titleContainer" | "mandatory" | "footerContainer" | "inputContainer" | "contentContainer" | "headerContainer" | "inputsTitleContainer" | "outputsTitleContainer" | "inputsContainer" | "outputsContainer" | "outputContainer", string>>, addStatic?: boolean) => {
|
|
767
984
|
classes: {
|
|
768
985
|
root: string;
|
|
769
986
|
title: string;
|
|
@@ -786,7 +1003,7 @@ declare const useClasses_5: (classesProp?: Partial<Record<"root" | "title" | "ti
|
|
|
786
1003
|
cx: (...args: any) => string;
|
|
787
1004
|
};
|
|
788
1005
|
|
|
789
|
-
declare const
|
|
1006
|
+
declare const useClasses_8: (classesProp?: Partial<Record<"actions" | "subtitleContainer" | "paramsContainer", string>>, addStatic?: boolean) => {
|
|
790
1007
|
classes: {
|
|
791
1008
|
actions: string;
|
|
792
1009
|
subtitleContainer: string;
|
|
@@ -799,7 +1016,7 @@ declare const useClasses_6: (classesProp?: Partial<Record<"actions" | "subtitleC
|
|
|
799
1016
|
cx: (...args: any) => string;
|
|
800
1017
|
};
|
|
801
1018
|
|
|
802
|
-
declare const
|
|
1019
|
+
declare const useClasses_9: (classesProp?: Partial<Record<"empty" | "actions", string>>, addStatic?: boolean) => {
|
|
803
1020
|
classes: {
|
|
804
1021
|
empty: string;
|
|
805
1022
|
actions: string;
|
|
@@ -811,41 +1028,6 @@ declare const useClasses_7: (classesProp?: Partial<Record<"empty" | "actions", s
|
|
|
811
1028
|
cx: (...args: any) => string;
|
|
812
1029
|
};
|
|
813
1030
|
|
|
814
|
-
declare const useClasses_8: (classesProp?: Partial<Record<"root" | "separator" | "li" | "ol" | "titles", string>>, addStatic?: boolean) => {
|
|
815
|
-
classes: {
|
|
816
|
-
root: string;
|
|
817
|
-
separator: string;
|
|
818
|
-
li: string;
|
|
819
|
-
ol: string;
|
|
820
|
-
titles: string;
|
|
821
|
-
};
|
|
822
|
-
css: {
|
|
823
|
-
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
824
|
-
(...args: CSSInterpolation[]): string;
|
|
825
|
-
};
|
|
826
|
-
cx: (...args: any) => string;
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
declare const useClasses_9: (classesProp?: Partial<Record<"xs" | "sm" | "md" | "lg" | "xl" | "root" | "ghost" | "avatar" | "ghostDisabled" | "notCurrent", string>>, addStatic?: boolean) => {
|
|
830
|
-
classes: {
|
|
831
|
-
xs: string;
|
|
832
|
-
sm: string;
|
|
833
|
-
md: string;
|
|
834
|
-
lg: string;
|
|
835
|
-
xl: string;
|
|
836
|
-
root: string;
|
|
837
|
-
ghost: string;
|
|
838
|
-
avatar: string;
|
|
839
|
-
ghostDisabled: string;
|
|
840
|
-
notCurrent: string;
|
|
841
|
-
};
|
|
842
|
-
css: {
|
|
843
|
-
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
844
|
-
(...args: CSSInterpolation[]): string;
|
|
845
|
-
};
|
|
846
|
-
cx: (...args: any) => string;
|
|
847
|
-
};
|
|
848
|
-
|
|
849
1031
|
export declare const useFlowContext: () => HvFlowContextValue<string>;
|
|
850
1032
|
|
|
851
1033
|
export declare function useFlowInputNodes<T = any>(id: string): Node_2<T, string | undefined>[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-lab",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.23.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Contributed React components for the NEXT UI Kit.",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@dnd-kit/core": "^6.1.0",
|
|
33
33
|
"@dnd-kit/modifiers": "^6.0.1",
|
|
34
34
|
"@emotion/css": "^11.11.0",
|
|
35
|
-
"@hitachivantara/uikit-react-core": "^5.44.
|
|
36
|
-
"@hitachivantara/uikit-react-icons": "^5.
|
|
35
|
+
"@hitachivantara/uikit-react-core": "^5.44.3",
|
|
36
|
+
"@hitachivantara/uikit-react-icons": "^5.8.0",
|
|
37
37
|
"@hitachivantara/uikit-styles": "^5.17.2",
|
|
38
38
|
"@types/react-grid-layout": "^1.3.5",
|
|
39
39
|
"lodash": "^4.17.21",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"access": "public",
|
|
51
51
|
"directory": "package"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "5cf0119ea66c034bda2108043eb3c6b09ab4b7ff",
|
|
54
54
|
"main": "dist/cjs/index.cjs",
|
|
55
55
|
"exports": {
|
|
56
56
|
".": {
|
|
57
57
|
"require": "./dist/cjs/index.cjs",
|
|
58
|
-
"import": "./dist/esm/index.
|
|
58
|
+
"import": "./dist/esm/index.js"
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"types": "dist/types/index.d.ts",
|
|
62
|
-
"module": "dist/esm/index.
|
|
62
|
+
"module": "dist/esm/index.js"
|
|
63
63
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.mjs","sources":["../../../src/Dashboard/Dashboard.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { Global } from \"@emotion/react\";\nimport {\n Responsive as ResponsiveGrid,\n ResponsiveProps,\n ReactGridLayoutProps,\n Layouts,\n WidthProvider,\n} from \"react-grid-layout\";\nimport {\n ExtractNames,\n useDefaultProps,\n useTheme,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { gridStyles, staticClasses, useClasses } from \"./Dashboard.styles\";\n\nconst GridLayout = WidthProvider(ResponsiveGrid);\n\n/** Default column breakpoints. For now, use always 12-column */\nconst defaultCols: HvDashboardProps[\"cols\"] = {\n xs: 12,\n sm: 12,\n md: 12,\n lg: 12,\n xl: 12,\n};\n\nexport { staticClasses as dashboardClasses };\n\nexport type HvDashboardClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDashboardProps extends Omit<ResponsiveProps, \"cols\"> {\n /** Dashboard items. Each node must be `key`'ed */\n children: React.ReactNode;\n /** An object used to override or extend the styles applied. */\n classes?: HvDashboardClasses;\n /**\n * Layout is an array of object with the format:\n *\n * `{i: string, x: number, y: number, w: number, h: number}`\n *\n * The `i` must match the key used on each item component.\n */\n layout?: ReactGridLayoutProps[\"layout\"];\n /** Number of grid columns or an object of breakpoint -> #columns */\n cols?: number | ResponsiveProps[\"cols\"];\n}\n\n/**\n * A Dashboard grid layout component, based on `react-grid-layout`.\n * The children elements are grid items and must be `key`ed.\n *\n * @see https://github.com/react-grid-layout/react-grid-layout?tab=readme-ov-file#grid-layout-props\n *\n * DISCLAIMER: This component is a work in progress and there might be breaking changes.\n */\nexport const HvDashboard = (props: HvDashboardProps) => {\n const {\n children,\n className,\n layout,\n cols: colsProp,\n layouts: layoutsProp,\n classes: classesProp,\n ...others\n } = useDefaultProps(\"HvDashboard\", props);\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n\n const layouts = useMemo<Layouts>(() => {\n if (layoutsProp) return layoutsProp;\n if (!layout) return {};\n\n return { xs: layout, sm: layout, md: layout, lg: layout, xl: layout };\n }, [layoutsProp, layout]);\n\n const cols = useMemo<ResponsiveProps[\"cols\"]>(() => {\n if (!colsProp) return defaultCols;\n\n if (typeof colsProp === \"number\") {\n return {\n xs: colsProp,\n sm: colsProp,\n md: colsProp,\n lg: colsProp,\n xl: colsProp,\n };\n }\n\n return colsProp;\n }, [colsProp]);\n\n return (\n <>\n <Global styles={gridStyles} />\n <GridLayout\n className={cx(classes.root, className)}\n breakpoints={activeTheme?.breakpoints.values}\n cols={cols}\n layouts={layouts}\n {...others}\n >\n {children}\n </GridLayout>\n </>\n );\n};\n"],"names":["ResponsiveGrid"],"mappings":";;;;;;;AAiBA,MAAM,aAAa,cAAcA,UAAc;AAG/C,MAAM,cAAwC;AAAA,EAC5C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AA+Ba,MAAA,cAAc,CAAC,UAA4B;AAChD,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,GAAG;AAAA,EAAA,IACD,gBAAgB,eAAe,KAAK;AACxC,QAAM,EAAE,SAAS,GAAG,IAAI,WAAW,WAAW;AACxC,QAAA,EAAE,gBAAgB;AAElB,QAAA,UAAU,QAAiB,MAAM;AACjC,QAAA;AAAoB,aAAA;AACxB,QAAI,CAAC;AAAQ,aAAO;AAEb,WAAA,EAAE,IAAI,QAAQ,IAAI,QAAQ,IAAI,QAAQ,IAAI,QAAQ,IAAI,OAAO;AAAA,EAAA,GACnE,CAAC,aAAa,MAAM,CAAC;AAElB,QAAA,OAAO,QAAiC,MAAM;AAClD,QAAI,CAAC;AAAiB,aAAA;AAElB,QAAA,OAAO,aAAa,UAAU;AACzB,aAAA;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IAER;AAEO,WAAA;AAAA,EAAA,GACN,CAAC,QAAQ,CAAC;AAEb,SAEI,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAC,oBAAA,QAAA,EAAO,QAAQ,WAAY,CAAA;AAAA,IAC5B;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,GAAG,QAAQ,MAAM,SAAS;AAAA,QACrC,aAAa,aAAa,YAAY;AAAA,QACtC;AAAA,QACA;AAAA,QACC,GAAG;AAAA,QAEH;AAAA,MAAA;AAAA,IACH;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.styles.mjs","sources":["../../../src/Dashboard/Dashboard.styles.ts"],"sourcesContent":["import { css } from \"@emotion/react\";\nimport { createClasses, theme } from \"@hitachivantara/uikit-react-core\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvDashboard\", {\n root: {},\n});\n\nexport const gridStyles = css`\n .react-grid-layout {\n position: relative;\n transition: height 200ms ease;\n }\n .react-grid-item {\n transition: all 200ms ease;\n transition-property: left, top, width, height;\n }\n .react-grid-item img {\n pointer-events: none;\n user-select: none;\n }\n .react-grid-item.cssTransforms {\n transition-property: transform, width, height;\n }\n .react-grid-item.resizing {\n transition: none;\n z-index: 1;\n will-change: width, height;\n }\n\n .react-grid-item.react-draggable-dragging {\n transition: none;\n z-index: 3;\n will-change: transform;\n }\n\n .react-grid-item.dropping {\n visibility: hidden;\n }\n\n .react-grid-item.react-grid-placeholder {\n background: ${theme.colors.primary_20};\n transition-duration: 100ms;\n z-index: 2;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n }\n\n .react-grid-item.react-grid-placeholder.placeholder-resizing {\n transition: none;\n }\n\n .react-grid-item > .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n }\n\n .react-grid-item > .react-resizable-handle::after {\n content: \"\";\n position: absolute;\n right: 3px;\n bottom: 3px;\n width: 5px;\n height: 5px;\n border-right: 2px solid rgba(0, 0, 0, 0.4);\n border-bottom: 2px solid rgba(0, 0, 0, 0.4);\n }\n\n .react-resizable-hide > .react-resizable-handle {\n display: none;\n }\n\n .react-grid-item > .react-resizable-handle.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n }\n .react-grid-item > .react-resizable-handle.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n }\n .react-grid-item > .react-resizable-handle.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n }\n .react-grid-item > .react-resizable-handle.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n }\n .react-grid-item > .react-resizable-handle.react-resizable-handle-w,\n .react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n }\n .react-grid-item > .react-resizable-handle.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n }\n .react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n }\n .react-grid-item > .react-resizable-handle.react-resizable-handle-n,\n .react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n }\n .react-grid-item > .react-resizable-handle.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n }\n .react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n }\n\n .react-resizable {\n position: relative;\n }\n .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+\");\n background-position: bottom right;\n padding: 0 3px 3px 0;\n }\n .react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n }\n .react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n }\n .react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n }\n .react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n }\n .react-resizable-handle-w,\n .react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n }\n .react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n }\n .react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n }\n .react-resizable-handle-n,\n .react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n }\n .react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n }\n .react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n }\n`;\n"],"names":[],"mappings":";;AAGO,MAAM,EAAE,eAAe,eAAe,cAAc,eAAe;AAAA,EACxE,MAAM,CAAC;AACT,CAAC;AAEM,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAiCR,MAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Background.mjs","sources":["../../../../src/Flow/Background/Background.tsx"],"sourcesContent":["import { Background, BackgroundProps } from \"reactflow\";\n\nimport { HvColorAny, getColor, theme } from \"@hitachivantara/uikit-styles\";\n\nexport interface HvFlowBackgroundProps extends Omit<BackgroundProps, \"color\"> {\n /** Color for the background dots. Defaults to `secondary`. */\n color?: HvColorAny;\n}\n\nexport const HvFlowBackground = ({\n color = \"secondary\",\n ...others\n}: HvFlowBackgroundProps) => {\n return (\n <Background color={getColor(color, theme.colors.secondary)} {...others} />\n );\n};\n"],"names":[],"mappings":";;;AASO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,QAAQ;AAAA,EACR,GAAG;AACL,MAA6B;AAEzB,SAAA,oBAAC,YAAW,EAAA,OAAO,SAAS,OAAO,MAAM,OAAO,SAAS,GAAI,GAAG,OAAQ,CAAA;AAE5E;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Controls.mjs","sources":["../../../../src/Flow/Controls/Controls.tsx"],"sourcesContent":["import {\n ControlProps,\n Panel,\n PanelPosition,\n ReactFlowState,\n useReactFlow,\n useStore,\n useStoreApi,\n} from \"reactflow\";\n\nimport { shallow } from \"zustand/shallow\";\n\nimport {\n HvButton,\n HvMultiButton,\n useLabels,\n} from \"@hitachivantara/uikit-react-core\";\nimport {\n Focus,\n Lock,\n Unlock,\n ZoomIn,\n ZoomOut,\n} from \"@hitachivantara/uikit-react-icons\";\n\nexport type HvFlowControlsPosition = PanelPosition;\n\nexport interface HvFlowControlsProps\n extends Omit<\n ControlProps,\n \"position\" | \"showFitView\" | \"showInteractive\" | \"showZoom\"\n > {\n /** Controls position. Defaults to `bottom-center`. */\n position?: HvFlowControlsPosition;\n /** Controls orientation. Defaults to `horizontal`. */\n orientation?: \"vertical\" | \"horizontal\";\n /** Labels used on the controls buttons. */\n labels?: {\n zoomIn?: string;\n zoomOut?: string;\n fitView?: string;\n interactive?: string;\n };\n /** Whether to hide the zoom controls. */\n hideZoom?: boolean;\n /** Whether to hide the fit view controls. */\n hideFitView?: boolean;\n /** Whether to hide the interactive controls. */\n hideInteractive?: boolean;\n}\n\nconst DEFAULT_LABELS: HvFlowControlsProps[\"labels\"] = {\n fitView: \"Fit view\",\n zoomIn: \"Zoom in\",\n zoomOut: \"Zoom out\",\n interactive: \"Interactive\",\n};\n\nconst selector = (state: ReactFlowState) => ({\n isInteractive:\n state.nodesDraggable || state.nodesConnectable || state.elementsSelectable,\n minZoomReached: state.transform[2] <= state.minZoom,\n maxZoomReached: state.transform[2] >= state.maxZoom,\n});\n\nexport const HvFlowControls = ({\n onZoomIn: onZoomInProp,\n onZoomOut: onZoomOutProp,\n onFitView: onFitViewProp,\n labels: labelsProps,\n hideInteractive,\n hideFitView,\n hideZoom,\n position = \"bottom-center\",\n orientation = \"horizontal\",\n onInteractiveChange,\n fitViewOptions,\n children,\n ...others\n}: HvFlowControlsProps) => {\n const { isInteractive, minZoomReached, maxZoomReached } = useStore(\n selector,\n shallow\n );\n const store = useStoreApi();\n const { zoomIn, zoomOut, fitView } = useReactFlow();\n\n const labels = useLabels(DEFAULT_LABELS, labelsProps);\n\n const handleZoomIn = () => {\n zoomIn();\n onZoomInProp?.();\n };\n\n const handleZoomOut = () => {\n zoomOut();\n onZoomOutProp?.();\n };\n\n const handleFitView = () => {\n fitView(fitViewOptions);\n onFitViewProp?.();\n };\n\n const handleInteractive = () => {\n store.setState({\n nodesDraggable: !isInteractive,\n nodesConnectable: !isInteractive,\n elementsSelectable: !isInteractive,\n });\n\n onInteractiveChange?.(!isInteractive);\n };\n\n return (\n <Panel position={position} {...others}>\n <HvMultiButton vertical={orientation === \"vertical\"}>\n {!hideZoom && (\n <HvButton\n icon\n title={labels?.zoomIn}\n onClick={handleZoomIn}\n disabled={maxZoomReached}\n >\n <ZoomIn role=\"none\" />\n </HvButton>\n )}\n {!hideZoom && (\n <HvButton\n icon\n title={labels?.zoomOut}\n onClick={handleZoomOut}\n disabled={minZoomReached}\n >\n <ZoomOut role=\"none\" />\n </HvButton>\n )}\n {!hideFitView && (\n <HvButton icon title={labels?.fitView} onClick={handleFitView}>\n <Focus role=\"none\" />\n </HvButton>\n )}\n {!hideInteractive && (\n <HvButton\n icon\n title={labels?.interactive}\n onClick={handleInteractive}\n >\n {isInteractive ? <Unlock role=\"none\" /> : <Lock role=\"none\" />}\n </HvButton>\n )}\n {children}\n </HvMultiButton>\n </Panel>\n );\n};\n"],"names":[],"mappings":";;;;;AAmDA,MAAM,iBAAgD;AAAA,EACpD,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa;AACf;AAEA,MAAM,WAAW,CAAC,WAA2B;AAAA,EAC3C,eACE,MAAM,kBAAkB,MAAM,oBAAoB,MAAM;AAAA,EAC1D,gBAAgB,MAAM,UAAU,CAAC,KAAK,MAAM;AAAA,EAC5C,gBAAgB,MAAM,UAAU,CAAC,KAAK,MAAM;AAC9C;AAEO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA2B;AACzB,QAAM,EAAE,eAAe,gBAAgB,eAAmB,IAAA;AAAA,IACxD;AAAA,IACA;AAAA,EAAA;AAEF,QAAM,QAAQ;AACd,QAAM,EAAE,QAAQ,SAAS,YAAY,aAAa;AAE5C,QAAA,SAAS,UAAU,gBAAgB,WAAW;AAEpD,QAAM,eAAe,MAAM;AAClB;AACQ;EAAA;AAGjB,QAAM,gBAAgB,MAAM;AAClB;AACQ;EAAA;AAGlB,QAAM,gBAAgB,MAAM;AAC1B,YAAQ,cAAc;AACN;EAAA;AAGlB,QAAM,oBAAoB,MAAM;AAC9B,UAAM,SAAS;AAAA,MACb,gBAAgB,CAAC;AAAA,MACjB,kBAAkB,CAAC;AAAA,MACnB,oBAAoB,CAAC;AAAA,IAAA,CACtB;AAED,0BAAsB,CAAC,aAAa;AAAA,EAAA;AAIpC,SAAA,oBAAC,SAAM,UAAqB,GAAG,QAC7B,UAAC,qBAAA,eAAA,EAAc,UAAU,gBAAgB,YACtC,UAAA;AAAA,IAAA,CAAC,YACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAI;AAAA,QACJ,OAAO,QAAQ;AAAA,QACf,SAAS;AAAA,QACT,UAAU;AAAA,QAEV,UAAA,oBAAC,QAAO,EAAA,MAAK,OAAO,CAAA;AAAA,MAAA;AAAA,IACtB;AAAA,IAED,CAAC,YACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAI;AAAA,QACJ,OAAO,QAAQ;AAAA,QACf,SAAS;AAAA,QACT,UAAU;AAAA,QAEV,UAAA,oBAAC,SAAQ,EAAA,MAAK,OAAO,CAAA;AAAA,MAAA;AAAA,IACvB;AAAA,IAED,CAAC,eACC,oBAAA,UAAA,EAAS,MAAI,MAAC,OAAO,QAAQ,SAAS,SAAS,eAC9C,UAAA,oBAAC,OAAM,EAAA,MAAK,OAAO,CAAA,GACrB;AAAA,IAED,CAAC,mBACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAI;AAAA,QACJ,OAAO,QAAQ;AAAA,QACf,SAAS;AAAA,QAER,UAAA,oCAAiB,QAAO,EAAA,MAAK,QAAO,IAAK,oBAAC,MAAK,EAAA,MAAK,OAAO,CAAA;AAAA,MAAA;AAAA,IAC9D;AAAA,IAED;AAAA,EAAA,EACH,CAAA,EACF,CAAA;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DroppableFlow.mjs","sources":["../../../src/Flow/DroppableFlow.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\nimport ReactFlow, {\n Connection,\n EdgeChange,\n NodeChange,\n ReactFlowProps,\n addEdge,\n applyEdgeChanges,\n applyNodeChanges,\n useReactFlow,\n MarkerType,\n Edge,\n Node,\n} from \"reactflow\";\n\nimport { Global } from \"@emotion/react\";\n\nimport { DragEndEvent, useDndMonitor, useDroppable } from \"@dnd-kit/core\";\n\nimport { uid } from \"uid\";\n\nimport { ExtractNames, useUniqueId } from \"@hitachivantara/uikit-react-core\";\n\nimport { HvFlowNodeMetaRegistry } from \"./types\";\nimport { staticClasses, useClasses } from \"./Flow.styles\";\nimport { useFlowContext } from \"./hooks\";\nimport { flowStyles } from \"./base\";\nimport { useNodeMetaRegistry } from \"./FlowContext/NodeMetaContext\";\n\nexport { staticClasses as flowClasses };\n\nexport type HvFlowClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDroppableFlowProps<\n NodeType extends string | undefined = string | undefined,\n NodeData = any\n> extends Omit<ReactFlowProps, \"nodes\" | \"edges\" | \"nodeTypes\"> {\n /** Flow content: background, controls, and minimap. */\n children?: React.ReactNode;\n /** Flow nodes. */\n nodes?: Node<NodeData, NodeType>[];\n /** Flow edges. */\n edges?: Edge[];\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowClasses;\n /** Callback called when the flow changes. Returns the updated nodes and edges. */\n onFlowChange?: (nodes: Node<NodeData, NodeType>[], edges: Edge[]) => void;\n /**\n * Callback called when a node is dropped in the flow.\n *\n * This callback should be used to override the custom UI Kit drop event.\n * Thus, when defined, the user is responsible for adding nodes to the flow.\n *\n * This callback is called when `HvFlowSidebar` is used or a custom sidebar was created using Dnd Kit.\n * When a custom sidebar was created using the native HTML drag and drop API, refer to the `onDrop` callback.\n *\n * Returns the event and the node to be added to the flow.\n */\n onDndDrop?: (event: DragEndEvent, node: Node) => void;\n}\n\nexport const getNode = (nodes: Node[], nodeId: string) => {\n return nodes.find((n) => n.id === nodeId);\n};\n\nconst validateEdge = (\n nodes: Node[],\n edges: Edge[],\n edge: Edge,\n nodeMetaRegistry: HvFlowNodeMetaRegistry\n) => {\n if (!edge.sourceHandle || !edge.targetHandle) return false;\n\n const sourceNode = getNode(nodes, edge.source);\n const targetNode = getNode(nodes, edge.target);\n\n if (!sourceNode || !targetNode) return false;\n\n const sourceType = sourceNode.type;\n const targetType = targetNode.type;\n\n if (!sourceType || !targetType) return false;\n\n const inputs = nodeMetaRegistry[edge.target]?.inputs || [];\n const outputs = nodeMetaRegistry[edge.source]?.outputs || [];\n\n const sourceProvides = outputs[edge.sourceHandle]?.provides || \"\";\n const targetAccepts = inputs[edge.targetHandle]?.accepts || [];\n const sourceMaxConnections = outputs[edge.sourceHandle]?.maxConnections;\n const targetMaxConnections = inputs[edge.targetHandle]?.maxConnections;\n\n let isValid =\n targetAccepts.length === 0 || targetAccepts.includes(sourceProvides);\n\n if (isValid && targetMaxConnections != null) {\n const targetConnections = edges.filter(\n (edg) =>\n edg.target === edge.target && edg.targetHandle === edge.targetHandle\n ).length;\n\n isValid = targetConnections < targetMaxConnections;\n }\n\n if (isValid && sourceMaxConnections != null) {\n const sourceConnections = edges.filter(\n (edg) =>\n edg.source === edge.source && edg.sourceHandle === edge.sourceHandle\n ).length;\n\n isValid = sourceConnections < sourceMaxConnections;\n }\n\n return isValid;\n};\n\nexport const HvDroppableFlow = ({\n id,\n className,\n children,\n onFlowChange,\n onDndDrop,\n classes: classesProp,\n nodes: initialNodes = [],\n edges: initialEdges = [],\n onConnect: onConnectProp,\n onNodesChange: onNodesChangeProp,\n onEdgesChange: onEdgesChangeProp,\n defaultEdgeOptions: defaultEdgeOptionsProp,\n ...others\n}: HvDroppableFlowProps) => {\n const { classes, cx } = useClasses(classesProp);\n\n const elementId = useUniqueId(id, \"hvFlow\");\n\n const reactFlowInstance = useReactFlow();\n\n const { nodeTypes } = useFlowContext();\n\n const [nodes, setNodes] = useState(initialNodes);\n const [edges, setEdges] = useState(initialEdges);\n\n const { setNodeRef } = useDroppable({\n id: elementId,\n });\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n if (event.over?.id !== elementId) return;\n\n const hvFlow = event.active.data.current?.hvFlow;\n const type = hvFlow?.type;\n\n // Only known node types can be dropped in the canvas\n if (!type || !nodeTypes?.[type]) {\n if (import.meta.env.DEV) {\n // eslint-disable-next-line no-console\n console.error(\n `Could not add node to the flow because of unknown type ${type}. Use nodeTypes to define all the node types.`\n );\n }\n return;\n }\n\n // Position node in the flow\n const position = reactFlowInstance.screenToFlowPosition({\n x: hvFlow?.x || 0,\n y: hvFlow?.y || 0,\n });\n\n // Node data\n const data = hvFlow?.data || {};\n\n // Node to add\n const newNode: Node = {\n id: uid(),\n position,\n data,\n type,\n };\n\n // Drop override\n if (onDndDrop) {\n onDndDrop(event, newNode);\n return;\n }\n\n setNodes((nds) => nds.concat(newNode));\n },\n [elementId, nodeTypes, onDndDrop, reactFlowInstance]\n );\n\n useDndMonitor({\n onDragEnd: handleDragEnd,\n });\n\n const handleFlowChange = useCallback(\n (\n nds: NonNullable<HvDroppableFlowProps[\"nodes\"]>,\n eds: NonNullable<HvDroppableFlowProps[\"edges\"]>\n ) => {\n // The new flow is returned if the user is not dragging nodes\n // This avoids triggering this handler too many times\n const isDragging = nds.find((node) => node.dragging);\n if (!isDragging) {\n onFlowChange?.(nds, eds);\n }\n },\n [onFlowChange]\n );\n\n const handleConnect = useCallback(\n (connection: Connection) => {\n const eds = addEdge(connection, edges);\n setEdges(eds);\n\n handleFlowChange(nodes, eds);\n onConnectProp?.(connection);\n },\n [edges, handleFlowChange, nodes, onConnectProp]\n );\n\n const handleNodesChange = useCallback(\n (changes: NodeChange[]) => {\n const nds = applyNodeChanges(changes, nodes);\n setNodes(nds);\n\n handleFlowChange(nds, edges);\n onNodesChangeProp?.(changes);\n },\n [edges, handleFlowChange, nodes, onNodesChangeProp]\n );\n\n const handleEdgesChange = useCallback(\n (changes: EdgeChange[]) => {\n const eds = applyEdgeChanges(changes, edges);\n setEdges(eds);\n\n handleFlowChange(nodes, eds);\n onEdgesChangeProp?.(changes);\n },\n [edges, handleFlowChange, nodes, onEdgesChangeProp]\n );\n\n const { registry } = useNodeMetaRegistry();\n const isValidConnection = (connection) =>\n validateEdge(nodes, edges, connection, registry);\n\n const defaultEdgeOptions = {\n markerEnd: {\n type: MarkerType.ArrowClosed,\n height: 20,\n width: 20,\n },\n type: \"smoothstep\",\n pathOptions: {\n borderRadius: 40,\n },\n ...defaultEdgeOptionsProp,\n };\n\n return (\n <>\n <Global styles={flowStyles} />\n <div\n id={elementId}\n ref={setNodeRef}\n className={cx(classes.root, className)}\n >\n <ReactFlow\n nodes={nodes}\n edges={edges}\n nodeTypes={nodeTypes}\n onNodesChange={handleNodesChange}\n onEdgesChange={handleEdgesChange}\n onConnect={handleConnect}\n isValidConnection={isValidConnection}\n defaultEdgeOptions={defaultEdgeOptions}\n snapGrid={[1, 1]}\n snapToGrid\n onError={(code, message) => {\n if (import.meta.env.DEV) {\n // eslint-disable-next-line no-console\n console.error(message);\n }\n }}\n {...others}\n >\n {children}\n </ReactFlow>\n </div>\n </>\n );\n};\n"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Empty.mjs","sources":["../../../../src/Flow/Empty/Empty.tsx"],"sourcesContent":["import { useNodes } from \"reactflow\";\nimport {\n HvEmptyState,\n HvEmptyStateProps,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { useClasses } from \"./Empty.styles\";\n\nexport interface HvFlowEmptyProps extends HvEmptyStateProps {}\n\nexport const HvFlowEmpty = ({ className, ...others }: HvFlowEmptyProps) => {\n const { classes, cx } = useClasses();\n const nodes = useNodes();\n return (\n !nodes ||\n (nodes.length === 0 ? (\n <HvEmptyState className={cx(classes.root, className)} {...others} />\n ) : null)\n );\n};\n"],"names":[],"mappings":";;;;AAUO,MAAM,cAAc,CAAC,EAAE,WAAW,GAAG,aAA+B;AACzE,QAAM,EAAE,SAAS,GAAG,IAAI,WAAW;AACnC,QAAM,QAAQ;AACd,SACE,CAAC,UACA,MAAM,WAAW,IACf,oBAAA,cAAA,EAAa,WAAW,GAAG,QAAQ,MAAM,SAAS,GAAI,GAAG,OAAQ,CAAA,IAChE;AAER;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Empty.styles.mjs","sources":["../../../../src/Flow/Empty/Empty.styles.tsx"],"sourcesContent":["import { createClasses, theme } from \"@hitachivantara/uikit-react-core\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvFlowEmpty\", {\n root: {\n width: \"100%\",\n height: \"100%\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: theme.colors.backgroundColor,\n position: \"absolute\",\n zIndex: theme.zIndices.popover,\n },\n});\n"],"names":[],"mappings":";AAEO,MAAM,EAAE,eAAe,eAAe,cAAc,eAAe;AAAA,EACxE,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,iBAAiB,MAAM,OAAO;AAAA,IAC9B,UAAU;AAAA,IACV,QAAQ,MAAM,SAAS;AAAA,EACzB;AACF,CAAC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Flow.mjs","sources":["../../../src/Flow/Flow.tsx"],"sourcesContent":["import {\n DndContext,\n DndContextProps,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport { restrictToWindowEdges } from \"@dnd-kit/modifiers\";\n\nimport { ReactFlowProvider } from \"reactflow\";\n\nimport { HvFlowNodeAction, HvFlowNodeGroups, HvFlowNodeTypes } from \"./types\";\nimport { HvFlowProvider } from \"./FlowContext\";\nimport { HvDroppableFlow, HvDroppableFlowProps } from \"./DroppableFlow\";\n\nexport interface HvFlowProps<\n NodeGroups extends keyof any = string,\n NodeType extends string | undefined = string | undefined,\n NodeData = any\n> extends HvDroppableFlowProps<NodeType, NodeData> {\n /** Flow nodes groups. */\n nodeGroups?: HvFlowNodeGroups<NodeGroups>;\n /** Flow nodes types. */\n nodeTypes?: HvFlowNodeTypes<NodeGroups, NodeData>;\n /** Flow sidebar. */\n sidebar?: React.ReactNode;\n /** Flow default actions. */\n defaultActions?: HvFlowNodeAction[];\n /**\n * Dnd Kit context props. This should be used for accessibility purposes.\n *\n * More information can be found on the [Dnd Kit documentation](https://docs.dndkit.com/guides/accessibility)\n */\n dndContextProps?: Pick<DndContextProps, \"accessibility\">;\n}\n\n/**\n * Flow component to build interactive node-based UIs.\n *\n * This implementation leverages [React Flow](https://reactflow.dev).\n * The drag and drop functionality leverages [Dnd Kit](https://docs.dndkit.com)\n *\n * Take a look at the [usage page](https://lumada-design.github.io/uikit/master/?path=/docs/lab-flow-usage--docs) to learn more about this component.\n *\n * DISCLAIMER: This component is a work in progress and there might be breaking changes.\n */\nexport const HvFlow = ({\n nodeTypes,\n nodeGroups,\n sidebar,\n defaultActions,\n dndContextProps,\n ...others\n}: HvFlowProps) => {\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor)\n );\n\n // We're wrapping the main Flow component with the ReactFlowProvider to access the react flow instance.\n // HvFlowContext is our custom internal context.\n return (\n <ReactFlowProvider>\n <HvFlowProvider\n nodeGroups={nodeGroups}\n nodeTypes={nodeTypes}\n defaultActions={defaultActions}\n >\n <DndContext\n sensors={sensors}\n modifiers={[restrictToWindowEdges]}\n {...dndContextProps}\n >\n <HvDroppableFlow {...others} />\n {sidebar}\n </DndContext>\n </HvFlowProvider>\n </ReactFlowProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;AA+CO,MAAM,SAAS,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAmB;AACjB,QAAM,UAAU;AAAA,IACd,UAAU,aAAa;AAAA,IACvB,UAAU,cAAc;AAAA,EAAA;AAK1B,6BACG,mBACC,EAAA,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,WAAW,CAAC,qBAAqB;AAAA,UAChC,GAAG;AAAA,UAEJ,UAAA;AAAA,YAAC,oBAAA,iBAAA,EAAiB,GAAG,QAAQ;AAAA,YAC5B;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|