@hitachivantara/uikit-react-lab 6.1.8 → 6.1.10

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.
Files changed (68) hide show
  1. package/dist/Blade/Blade.js +134 -173
  2. package/dist/Blade/Blade.styles.js +54 -69
  3. package/dist/Blades/Blades.js +70 -101
  4. package/dist/Blades/Blades.styles.js +7 -10
  5. package/dist/Dashboard/Dashboard.js +57 -60
  6. package/dist/Dashboard/Dashboard.styles.js +6 -10
  7. package/dist/Flow/Background/Background.js +10 -16
  8. package/dist/Flow/Controls/Controls.js +77 -91
  9. package/dist/Flow/DroppableFlow.js +135 -200
  10. package/dist/Flow/Empty/Empty.js +12 -9
  11. package/dist/Flow/Empty/Empty.styles.js +12 -15
  12. package/dist/Flow/Flow.js +28 -30
  13. package/dist/Flow/Flow.styles.js +12 -18
  14. package/dist/Flow/FlowContext/FlowContext.js +22 -23
  15. package/dist/Flow/FlowContext/NodeMetaContext.js +36 -39
  16. package/dist/Flow/Minimap/Minimap.js +15 -28
  17. package/dist/Flow/Minimap/Minimap.styles.js +4 -9
  18. package/dist/Flow/Node/BaseNode.js +144 -190
  19. package/dist/Flow/Node/BaseNode.styles.js +122 -133
  20. package/dist/Flow/Node/Node.js +90 -108
  21. package/dist/Flow/Node/Node.styles.js +30 -40
  22. package/dist/Flow/Node/Parameters/ParamRenderer.js +17 -14
  23. package/dist/Flow/Node/Parameters/Select.js +33 -38
  24. package/dist/Flow/Node/Parameters/Slider.js +27 -29
  25. package/dist/Flow/Node/Parameters/Text.js +17 -17
  26. package/dist/Flow/Node/utils.js +44 -49
  27. package/dist/Flow/Sidebar/Sidebar.js +115 -137
  28. package/dist/Flow/Sidebar/Sidebar.styles.js +21 -22
  29. package/dist/Flow/Sidebar/SidebarGroup/SidebarGroup.js +57 -60
  30. package/dist/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.js +27 -33
  31. package/dist/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js +27 -47
  32. package/dist/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js +14 -32
  33. package/dist/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.js +17 -23
  34. package/dist/Flow/base.js +5 -5
  35. package/dist/Flow/hooks/useFlowContext.js +5 -5
  36. package/dist/Flow/hooks/useFlowInstance.js +5 -4
  37. package/dist/Flow/hooks/useFlowNode.js +92 -113
  38. package/dist/Flow/hooks/useFlowNodeMeta.js +7 -7
  39. package/dist/Flow/hooks/useNode.js +136 -154
  40. package/dist/Flow/hooks/useNodeId.js +8 -7
  41. package/dist/Flow/nodes/DashboardNode.js +64 -86
  42. package/dist/Flow/nodes/DashboardNode.styles.js +8 -14
  43. package/dist/Flow/nodes/StickyNode.js +370 -435
  44. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js +36 -52
  45. package/dist/StepNavigation/DefaultNavigation/Step/Step.js +40 -51
  46. package/dist/StepNavigation/DefaultNavigation/Step/Step.styles.js +22 -33
  47. package/dist/StepNavigation/DefaultNavigation/utils.js +38 -30
  48. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js +24 -41
  49. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.styles.js +13 -16
  50. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js +35 -47
  51. package/dist/StepNavigation/SimpleNavigation/utils.js +10 -11
  52. package/dist/StepNavigation/StepNavigation.js +136 -179
  53. package/dist/StepNavigation/StepNavigation.styles.js +29 -32
  54. package/dist/Wizard/Wizard.js +81 -104
  55. package/dist/Wizard/Wizard.styles.js +4 -7
  56. package/dist/Wizard/WizardActions/WizardActions.js +111 -131
  57. package/dist/Wizard/WizardActions/WizardActions.styles.js +19 -20
  58. package/dist/Wizard/WizardContainer/WizardContainer.js +19 -28
  59. package/dist/Wizard/WizardContainer/WizardContainer.styles.js +8 -14
  60. package/dist/Wizard/WizardContent/WizardContent.js +103 -120
  61. package/dist/Wizard/WizardContent/WizardContent.styles.js +33 -36
  62. package/dist/Wizard/WizardContext/WizardContext.js +10 -13
  63. package/dist/Wizard/WizardTitle/WizardTitle.js +74 -79
  64. package/dist/Wizard/WizardTitle/WizardTitle.styles.js +12 -15
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.js +30 -81
  67. package/package.json +6 -6
  68. package/dist/StepNavigation/utils.js +0 -8
@@ -1,10 +1,5 @@
1
1
  import { createClasses, theme } from "@hitachivantara/uikit-react-core";
2
- const { staticClasses, useClasses } = createClasses("HvFlowMinimap", {
3
- root: {
4
- "&.react-flow__minimap": { backgroundColor: theme.colors.bgPage }
5
- }
6
- });
7
- export {
8
- staticClasses,
9
- useClasses
10
- };
2
+ //#region src/Flow/Minimap/Minimap.styles.tsx
3
+ var { staticClasses, useClasses } = createClasses("HvFlowMinimap", { root: { "&.react-flow__minimap": { backgroundColor: theme.colors.bgPage } } });
4
+ //#endregion
5
+ export { staticClasses, useClasses };
@@ -1,193 +1,147 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { NodeToolbar, Handle, Position } from "reactflow";
3
- import { useLabels, HvIconButton, HvTypography } from "@hitachivantara/uikit-react-core";
4
- import { mergeStyles } from "@hitachivantara/uikit-react-utils";
5
- import { useClasses } from "./BaseNode.styles.js";
6
- import { staticClasses } from "./BaseNode.styles.js";
7
- import { renderedIcon, isInputGroup, isOutputGroup, isConnected } from "./utils.js";
1
+ import { isConnected, isInputGroup, isOutputGroup, renderedIcon } from "./utils.js";
8
2
  import { useHvNode } from "../hooks/useNode.js";
9
- const DEFAULT_LABELS = {
10
- outputsTitle: "Outputs",
11
- inputsTitle: "Inputs",
12
- deleteActionLabel: "Delete",
13
- duplicateActionLabel: "Duplicate"
14
- };
15
- const HvFlowBaseNode = ({
16
- id,
17
- title: titleProp,
18
- headerItems,
19
- icon: iconProp,
20
- color: colorProp,
21
- inputs: inputsProp,
22
- outputs: outputsProp,
23
- nodeActions: nodeActionsProp,
24
- footer,
25
- classes: classesProp,
26
- labels: labelsProp,
27
- className,
28
- children
29
- }) => {
30
- const {
31
- toggleShowActions,
32
- getNodeToolbarProps,
33
- handleDefaultAction,
34
- nodeActions,
35
- title,
36
- icon,
37
- color,
38
- iconColor,
39
- inputEdges,
40
- inputs,
41
- outputEdges,
42
- outputs,
43
- node
44
- } = useHvNode({
45
- id,
46
- title: titleProp,
47
- inputs: inputsProp,
48
- outputs: outputsProp,
49
- icon: iconProp,
50
- color: colorProp,
51
- labels: labelsProp,
52
- nodeActions: nodeActionsProp
53
- });
54
- const labels = useLabels(DEFAULT_LABELS, labelsProp);
55
- const { classes, cx } = useClasses(classesProp);
56
- const renderOutput = (output) => {
57
- const edgeConnected = isConnected(id, "source", output.id, outputEdges);
58
- return /* @__PURE__ */ jsxs("div", { className: classes.outputContainer, children: [
59
- /* @__PURE__ */ jsx(
60
- Handle,
61
- {
62
- type: "source",
63
- isConnectableEnd: false,
64
- id: output.id,
65
- position: Position.Right,
66
- className: cx(classes.handle, {
67
- [classes.handleConnected]: edgeConnected
68
- })
69
- }
70
- ),
71
- output.isMandatory && !edgeConnected && /* @__PURE__ */ jsx("div", { className: classes.mandatory }),
72
- /* @__PURE__ */ jsx(HvTypography, { component: "div", children: output.label })
73
- ] }, output.id);
74
- };
75
- const renderInput = (input) => {
76
- const edgeConnected = isConnected(id, "target", input.id, inputEdges);
77
- return /* @__PURE__ */ jsxs("div", { className: classes.inputContainer, children: [
78
- /* @__PURE__ */ jsx(
79
- Handle,
80
- {
81
- type: "target",
82
- isConnectableStart: false,
83
- id: input.id,
84
- position: Position.Left,
85
- className: cx(classes.handle, {
86
- [classes.handleConnected]: edgeConnected
87
- })
88
- }
89
- ),
90
- /* @__PURE__ */ jsx(HvTypography, { component: "div", children: input.label }),
91
- input.isMandatory && !edgeConnected && /* @__PURE__ */ jsx("div", { className: classes.mandatory })
92
- ] }, input.id);
93
- };
94
- if (!node) return null;
95
- return /* @__PURE__ */ jsxs(
96
- "div",
97
- {
98
- style: mergeStyles(void 0, {
99
- "--node-color": color
100
- }),
101
- className: cx(
102
- "nowheel",
103
- // Disables the default canvas pan behaviour when scrolling inside the node
104
- classes.root,
105
- className
106
- ),
107
- onMouseEnter: toggleShowActions,
108
- onMouseLeave: toggleShowActions,
109
- children: [
110
- /* @__PURE__ */ jsx(NodeToolbar, { ...getNodeToolbarProps(), children: nodeActions?.map((action) => /* @__PURE__ */ jsx(
111
- HvIconButton,
112
- {
113
- title: action.label,
114
- onClick: () => handleDefaultAction(action),
115
- children: renderedIcon(action.icon)
116
- },
117
- action.id
118
- )) }),
119
- /* @__PURE__ */ jsxs("div", { className: classes.headerContainer, children: [
120
- /* @__PURE__ */ jsxs(
121
- "div",
122
- {
123
- style: mergeStyles(void 0, {
124
- "--icon-color": iconColor
125
- }),
126
- className: classes.titleContainer,
127
- children: [
128
- icon,
129
- /* @__PURE__ */ jsx(
130
- HvTypography,
131
- {
132
- component: "p",
133
- variant: "title4",
134
- className: classes.title,
135
- children: title
136
- }
137
- )
138
- ]
139
- }
140
- ),
141
- headerItems && /* @__PURE__ */ jsx("div", { style: { display: "flex" }, children: headerItems })
142
- ] }),
143
- children && /* @__PURE__ */ jsx("div", { className: classes.contentContainer, children }),
144
- inputs && inputs.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
145
- /* @__PURE__ */ jsx("div", { className: classes.inputsTitleContainer, children: /* @__PURE__ */ jsx(HvTypography, { children: labels?.inputsTitle }) }),
146
- /* @__PURE__ */ jsx("div", { className: classes.inputsContainer, children: inputs?.map((input, idx) => {
147
- if (!isInputGroup(input)) return renderInput(input);
148
- return /* @__PURE__ */ jsxs(
149
- "div",
150
- {
151
- className: classes.inputGroupContainer,
152
- children: [
153
- /* @__PURE__ */ jsx(HvTypography, { component: "div", variant: "label", children: input.label }),
154
- input.inputs.map(
155
- (inp) => renderInput(inp)
156
- )
157
- ]
158
- },
159
- `group${idx}`
160
- );
161
- }) })
162
- ] }),
163
- outputs && outputs.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
164
- /* @__PURE__ */ jsx("div", { className: classes.outputsTitleContainer, children: /* @__PURE__ */ jsx(HvTypography, { children: labels?.outputsTitle }) }),
165
- /* @__PURE__ */ jsx("div", { className: classes.outputsContainer, children: outputs?.map((output, idx) => {
166
- if (!isOutputGroup(output)) {
167
- return renderOutput(output);
168
- }
169
- return /* @__PURE__ */ jsxs(
170
- "div",
171
- {
172
- className: classes.outputGroupContainer,
173
- children: [
174
- /* @__PURE__ */ jsx(HvTypography, { component: "div", variant: "label", children: output.label }),
175
- output.outputs.map((out) => {
176
- return renderOutput(out);
177
- })
178
- ]
179
- },
180
- `group${idx}`
181
- );
182
- }) })
183
- ] }),
184
- footer && /* @__PURE__ */ jsx("div", { className: classes.footerContainer, children: footer })
185
- ]
186
- }
187
- );
3
+ import { useClasses } from "./BaseNode.styles.js";
4
+ import { HvIconButton, HvTypography, useLabels } from "@hitachivantara/uikit-react-core";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { Handle, NodeToolbar, Position } from "reactflow";
7
+ import { mergeStyles } from "@hitachivantara/uikit-react-utils";
8
+ //#region src/Flow/Node/BaseNode.tsx
9
+ var DEFAULT_LABELS = {
10
+ outputsTitle: "Outputs",
11
+ inputsTitle: "Inputs",
12
+ deleteActionLabel: "Delete",
13
+ duplicateActionLabel: "Duplicate"
188
14
  };
189
- export {
190
- DEFAULT_LABELS,
191
- HvFlowBaseNode,
192
- staticClasses as flowBaseNodeClasses
15
+ var HvFlowBaseNode = ({ id, title: titleProp, headerItems, icon: iconProp, color: colorProp, inputs: inputsProp, outputs: outputsProp, nodeActions: nodeActionsProp, footer, classes: classesProp, labels: labelsProp, className, children }) => {
16
+ const { toggleShowActions, getNodeToolbarProps, handleDefaultAction, nodeActions, title, icon, color, iconColor, inputEdges, inputs, outputEdges, outputs, node } = useHvNode({
17
+ id,
18
+ title: titleProp,
19
+ inputs: inputsProp,
20
+ outputs: outputsProp,
21
+ icon: iconProp,
22
+ color: colorProp,
23
+ labels: labelsProp,
24
+ nodeActions: nodeActionsProp
25
+ });
26
+ const labels = useLabels(DEFAULT_LABELS, labelsProp);
27
+ const { classes, cx } = useClasses(classesProp);
28
+ const renderOutput = (output) => {
29
+ const edgeConnected = isConnected(id, "source", output.id, outputEdges);
30
+ return /* @__PURE__ */ jsxs("div", {
31
+ className: classes.outputContainer,
32
+ children: [
33
+ /* @__PURE__ */ jsx(Handle, {
34
+ type: "source",
35
+ isConnectableEnd: false,
36
+ id: output.id,
37
+ position: Position.Right,
38
+ className: cx(classes.handle, { [classes.handleConnected]: edgeConnected })
39
+ }),
40
+ output.isMandatory && !edgeConnected && /* @__PURE__ */ jsx("div", { className: classes.mandatory }),
41
+ /* @__PURE__ */ jsx(HvTypography, {
42
+ component: "div",
43
+ children: output.label
44
+ })
45
+ ]
46
+ }, output.id);
47
+ };
48
+ const renderInput = (input) => {
49
+ const edgeConnected = isConnected(id, "target", input.id, inputEdges);
50
+ return /* @__PURE__ */ jsxs("div", {
51
+ className: classes.inputContainer,
52
+ children: [
53
+ /* @__PURE__ */ jsx(Handle, {
54
+ type: "target",
55
+ isConnectableStart: false,
56
+ id: input.id,
57
+ position: Position.Left,
58
+ className: cx(classes.handle, { [classes.handleConnected]: edgeConnected })
59
+ }),
60
+ /* @__PURE__ */ jsx(HvTypography, {
61
+ component: "div",
62
+ children: input.label
63
+ }),
64
+ input.isMandatory && !edgeConnected && /* @__PURE__ */ jsx("div", { className: classes.mandatory })
65
+ ]
66
+ }, input.id);
67
+ };
68
+ if (!node) return null;
69
+ return /* @__PURE__ */ jsxs("div", {
70
+ style: mergeStyles(void 0, { "--node-color": color }),
71
+ className: cx("nowheel", classes.root, className),
72
+ onMouseEnter: toggleShowActions,
73
+ onMouseLeave: toggleShowActions,
74
+ children: [
75
+ /* @__PURE__ */ jsx(NodeToolbar, {
76
+ ...getNodeToolbarProps(),
77
+ children: nodeActions?.map((action) => /* @__PURE__ */ jsx(HvIconButton, {
78
+ title: action.label,
79
+ onClick: () => handleDefaultAction(action),
80
+ children: renderedIcon(action.icon)
81
+ }, action.id))
82
+ }),
83
+ /* @__PURE__ */ jsxs("div", {
84
+ className: classes.headerContainer,
85
+ children: [/* @__PURE__ */ jsxs("div", {
86
+ style: mergeStyles(void 0, { "--icon-color": iconColor }),
87
+ className: classes.titleContainer,
88
+ children: [icon, /* @__PURE__ */ jsx(HvTypography, {
89
+ component: "p",
90
+ variant: "title4",
91
+ className: classes.title,
92
+ children: title
93
+ })]
94
+ }), headerItems && /* @__PURE__ */ jsx("div", {
95
+ style: { display: "flex" },
96
+ children: headerItems
97
+ })]
98
+ }),
99
+ children && /* @__PURE__ */ jsx("div", {
100
+ className: classes.contentContainer,
101
+ children
102
+ }),
103
+ inputs && inputs.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
104
+ className: classes.inputsTitleContainer,
105
+ children: /* @__PURE__ */ jsx(HvTypography, { children: labels?.inputsTitle })
106
+ }), /* @__PURE__ */ jsx("div", {
107
+ className: classes.inputsContainer,
108
+ children: inputs?.map((input, idx) => {
109
+ if (!isInputGroup(input)) return renderInput(input);
110
+ return /* @__PURE__ */ jsxs("div", {
111
+ className: classes.inputGroupContainer,
112
+ children: [/* @__PURE__ */ jsx(HvTypography, {
113
+ component: "div",
114
+ variant: "label",
115
+ children: input.label
116
+ }), input.inputs.map((inp) => renderInput(inp))]
117
+ }, `group${idx}`);
118
+ })
119
+ })] }),
120
+ outputs && outputs.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
121
+ className: classes.outputsTitleContainer,
122
+ children: /* @__PURE__ */ jsx(HvTypography, { children: labels?.outputsTitle })
123
+ }), /* @__PURE__ */ jsx("div", {
124
+ className: classes.outputsContainer,
125
+ children: outputs?.map((output, idx) => {
126
+ if (!isOutputGroup(output)) return renderOutput(output);
127
+ return /* @__PURE__ */ jsxs("div", {
128
+ className: classes.outputGroupContainer,
129
+ children: [/* @__PURE__ */ jsx(HvTypography, {
130
+ component: "div",
131
+ variant: "label",
132
+ children: output.label
133
+ }), output.outputs.map((out) => {
134
+ return renderOutput(out);
135
+ })]
136
+ }, `group${idx}`);
137
+ })
138
+ })] }),
139
+ footer && /* @__PURE__ */ jsx("div", {
140
+ className: classes.footerContainer,
141
+ children: footer
142
+ })
143
+ ]
144
+ });
193
145
  };
146
+ //#endregion
147
+ export { DEFAULT_LABELS, HvFlowBaseNode };
@@ -1,135 +1,124 @@
1
1
  import { createClasses, theme } from "@hitachivantara/uikit-react-core";
2
- const { staticClasses, useClasses } = createClasses("HvFlowBaseNode", {
3
- root: {
4
- borderRadius: theme.radii.round,
5
- backgroundColor: theme.colors.bgContainer,
6
- boxShadow: theme.colors.shadow,
7
- minWidth: "250px",
8
- border: "1px solid var(--node-color)"
9
- },
10
- headerContainer: {
11
- padding: theme.spacing(0.5, 1),
12
- display: "flex",
13
- flexDirection: "row",
14
- justifyContent: "space-between",
15
- alignItems: "center",
16
- borderTopLeftRadius: "inherit",
17
- borderTopRightRadius: "inherit",
18
- backgroundColor: "var(--node-color)"
19
- },
20
- titleContainer: {
21
- display: "flex",
22
- flexDirection: "row",
23
- alignItems: "center",
24
- "& svg *.color0": { fill: "var(--icon-color)" }
25
- },
26
- title: {
27
- color: theme.colors.textDark
28
- },
29
- inputsTitleContainer: {
30
- display: "flex",
31
- justifyContent: "center",
32
- padding: theme.space.xs,
33
- backgroundColor: theme.colors.bgPage,
34
- borderTop: `1px solid ${theme.colors.borderSubtle}`,
35
- borderBottom: `1px solid ${theme.colors.borderSubtle}`
36
- },
37
- outputsTitleContainer: {
38
- display: "flex",
39
- justifyContent: "center",
40
- padding: theme.space.xs,
41
- backgroundColor: theme.colors.bgPage,
42
- borderTop: `1px solid ${theme.colors.borderSubtle}`,
43
- borderBottom: `1px solid ${theme.colors.borderSubtle}`
44
- },
45
- contentContainer: {},
46
- inputsContainer: {
47
- display: "flex",
48
- flexDirection: "column",
49
- padding: theme.space.sm,
50
- gap: theme.space.xs,
51
- alignItems: "flex-start"
52
- },
53
- outputsContainer: {
54
- display: "flex",
55
- flexDirection: "column",
56
- padding: theme.space.sm,
57
- gap: theme.space.xs,
58
- alignItems: "flex-end"
59
- },
60
- inputGroupContainer: {
61
- display: "flex",
62
- flexDirection: "column",
63
- gap: theme.space.xs,
64
- alignItems: "flex-start"
65
- },
66
- outputGroupContainer: {
67
- display: "flex",
68
- flexDirection: "column",
69
- gap: theme.space.xs,
70
- alignItems: "flex-end"
71
- },
72
- inputContainer: {
73
- display: "flex",
74
- flexDirection: "row",
75
- alignItems: "center",
76
- position: "relative"
77
- },
78
- outputContainer: {
79
- display: "flex",
80
- flexDirection: "row",
81
- alignItems: "center",
82
- position: "relative"
83
- },
84
- handle: {
85
- zIndex: theme.zIndices.overlay,
86
- marginLeft: 2,
87
- backgroundColor: theme.colors.bgContainer,
88
- height: 10,
89
- width: 10,
90
- border: `1px solid ${theme.colors.textDisabled}`,
91
- "&.react-flow__handle-left": {
92
- left: -23
93
- },
94
- "&.react-flow__handle-right": {
95
- right: -21
96
- },
97
- "&.react-flow__handle-connecting": {
98
- backgroundColor: theme.colors.negativeDimmed
99
- },
100
- "&.react-flow__handle-valid": {
101
- backgroundColor: theme.colors.positiveDimmed
102
- },
103
- "::before": {
104
- fontSize: 14,
105
- color: theme.colors.textDisabled,
106
- content: '"+"',
107
- marginTop: -7,
108
- position: "absolute"
109
- }
110
- },
111
- handleConnected: {
112
- backgroundColor: theme.colors.textDisabled,
113
- width: 8,
114
- height: 8,
115
- "::before": {
116
- fontSize: 11,
117
- marginTop: -8
118
- }
119
- },
120
- mandatory: {
121
- width: 10,
122
- height: 10,
123
- margin: theme.spacing(0, theme.space.xs),
124
- borderRadius: theme.radii.full,
125
- backgroundColor: theme.colors.negativeDimmed
126
- },
127
- footerContainer: {
128
- padding: theme.space.sm,
129
- borderTop: `1px solid ${theme.colors.borderSubtle}`
130
- }
2
+ //#region src/Flow/Node/BaseNode.styles.tsx
3
+ var { staticClasses, useClasses } = createClasses("HvFlowBaseNode", {
4
+ root: {
5
+ borderRadius: theme.radii.round,
6
+ backgroundColor: theme.colors.bgContainer,
7
+ boxShadow: theme.colors.shadow,
8
+ minWidth: "250px",
9
+ border: "1px solid var(--node-color)"
10
+ },
11
+ headerContainer: {
12
+ padding: theme.spacing(.5, 1),
13
+ display: "flex",
14
+ flexDirection: "row",
15
+ justifyContent: "space-between",
16
+ alignItems: "center",
17
+ borderTopLeftRadius: "inherit",
18
+ borderTopRightRadius: "inherit",
19
+ backgroundColor: "var(--node-color)"
20
+ },
21
+ titleContainer: {
22
+ display: "flex",
23
+ flexDirection: "row",
24
+ alignItems: "center",
25
+ "& svg *.color0": { fill: "var(--icon-color)" }
26
+ },
27
+ title: { color: theme.colors.textDark },
28
+ inputsTitleContainer: {
29
+ display: "flex",
30
+ justifyContent: "center",
31
+ padding: theme.space.xs,
32
+ backgroundColor: theme.colors.bgPage,
33
+ borderTop: `1px solid ${theme.colors.borderSubtle}`,
34
+ borderBottom: `1px solid ${theme.colors.borderSubtle}`
35
+ },
36
+ outputsTitleContainer: {
37
+ display: "flex",
38
+ justifyContent: "center",
39
+ padding: theme.space.xs,
40
+ backgroundColor: theme.colors.bgPage,
41
+ borderTop: `1px solid ${theme.colors.borderSubtle}`,
42
+ borderBottom: `1px solid ${theme.colors.borderSubtle}`
43
+ },
44
+ contentContainer: {},
45
+ inputsContainer: {
46
+ display: "flex",
47
+ flexDirection: "column",
48
+ padding: theme.space.sm,
49
+ gap: theme.space.xs,
50
+ alignItems: "flex-start"
51
+ },
52
+ outputsContainer: {
53
+ display: "flex",
54
+ flexDirection: "column",
55
+ padding: theme.space.sm,
56
+ gap: theme.space.xs,
57
+ alignItems: "flex-end"
58
+ },
59
+ inputGroupContainer: {
60
+ display: "flex",
61
+ flexDirection: "column",
62
+ gap: theme.space.xs,
63
+ alignItems: "flex-start"
64
+ },
65
+ outputGroupContainer: {
66
+ display: "flex",
67
+ flexDirection: "column",
68
+ gap: theme.space.xs,
69
+ alignItems: "flex-end"
70
+ },
71
+ inputContainer: {
72
+ display: "flex",
73
+ flexDirection: "row",
74
+ alignItems: "center",
75
+ position: "relative"
76
+ },
77
+ outputContainer: {
78
+ display: "flex",
79
+ flexDirection: "row",
80
+ alignItems: "center",
81
+ position: "relative"
82
+ },
83
+ handle: {
84
+ zIndex: theme.zIndices.overlay,
85
+ marginLeft: 2,
86
+ backgroundColor: theme.colors.bgContainer,
87
+ height: 10,
88
+ width: 10,
89
+ border: `1px solid ${theme.colors.textDisabled}`,
90
+ "&.react-flow__handle-left": { left: -23 },
91
+ "&.react-flow__handle-right": { right: -21 },
92
+ "&.react-flow__handle-connecting": { backgroundColor: theme.colors.negativeDimmed },
93
+ "&.react-flow__handle-valid": { backgroundColor: theme.colors.positiveDimmed },
94
+ "::before": {
95
+ fontSize: 14,
96
+ color: theme.colors.textDisabled,
97
+ content: "\"+\"",
98
+ marginTop: -7,
99
+ position: "absolute"
100
+ }
101
+ },
102
+ handleConnected: {
103
+ backgroundColor: theme.colors.textDisabled,
104
+ width: 8,
105
+ height: 8,
106
+ "::before": {
107
+ fontSize: 11,
108
+ marginTop: -8
109
+ }
110
+ },
111
+ mandatory: {
112
+ width: 10,
113
+ height: 10,
114
+ margin: theme.spacing(0, theme.space.xs),
115
+ borderRadius: theme.radii.full,
116
+ backgroundColor: theme.colors.negativeDimmed
117
+ },
118
+ footerContainer: {
119
+ padding: theme.space.sm,
120
+ borderTop: `1px solid ${theme.colors.borderSubtle}`
121
+ }
131
122
  });
132
- export {
133
- staticClasses,
134
- useClasses
135
- };
123
+ //#endregion
124
+ export { staticClasses, useClasses };