@hitachivantara/uikit-react-lab 5.46.19 → 6.0.0-next.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.
- package/dist/{esm/Flow → Flow}/Empty/Empty.styles.js +1 -1
- package/dist/{esm/Flow → Flow}/Node/Node.js +0 -3
- package/dist/{esm/Flow → Flow}/Sidebar/Sidebar.js +1 -1
- package/dist/{esm/StepNavigation → StepNavigation}/DefaultNavigation/DefaultNavigation.js +1 -3
- package/dist/{esm/StepNavigation → StepNavigation}/SimpleNavigation/SimpleNavigation.js +1 -3
- package/dist/{esm/StepNavigation → StepNavigation}/StepNavigation.js +2 -7
- package/dist/{esm/Wizard → Wizard}/WizardTitle/WizardTitle.js +31 -47
- package/dist/{esm/Wizard → Wizard}/WizardTitle/WizardTitle.styles.js +0 -10
- package/dist/{types/index.d.ts → index.d.ts} +11 -27
- package/package.json +14 -14
- package/dist/cjs/Blade/Blade.cjs +0 -174
- package/dist/cjs/Blade/Blade.styles.cjs +0 -71
- package/dist/cjs/Blades/Blades.cjs +0 -104
- package/dist/cjs/Blades/Blades.styles.cjs +0 -11
- package/dist/cjs/Dashboard/Dashboard.cjs +0 -63
- package/dist/cjs/Dashboard/Dashboard.styles.cjs +0 -196
- package/dist/cjs/Flow/Background/Background.cjs +0 -19
- package/dist/cjs/Flow/Controls/Controls.cjs +0 -96
- package/dist/cjs/Flow/DroppableFlow.cjs +0 -204
- package/dist/cjs/Flow/Empty/Empty.cjs +0 -12
- package/dist/cjs/Flow/Empty/Empty.styles.cjs +0 -16
- package/dist/cjs/Flow/Flow.cjs +0 -33
- package/dist/cjs/Flow/Flow.styles.cjs +0 -19
- package/dist/cjs/Flow/FlowContext/FlowContext.cjs +0 -25
- package/dist/cjs/Flow/FlowContext/NodeMetaContext.cjs +0 -43
- package/dist/cjs/Flow/Minimap/Minimap.cjs +0 -30
- package/dist/cjs/Flow/Minimap/Minimap.styles.cjs +0 -10
- package/dist/cjs/Flow/Node/BaseNode.cjs +0 -192
- package/dist/cjs/Flow/Node/BaseNode.styles.cjs +0 -135
- package/dist/cjs/Flow/Node/Node.cjs +0 -115
- package/dist/cjs/Flow/Node/Node.styles.cjs +0 -42
- package/dist/cjs/Flow/Node/Parameters/ParamRenderer.cjs +0 -19
- package/dist/cjs/Flow/Node/Parameters/Select.cjs +0 -41
- package/dist/cjs/Flow/Node/Parameters/Slider.cjs +0 -33
- package/dist/cjs/Flow/Node/Parameters/Text.cjs +0 -19
- package/dist/cjs/Flow/Node/utils.cjs +0 -54
- package/dist/cjs/Flow/Sidebar/Sidebar.cjs +0 -141
- package/dist/cjs/Flow/Sidebar/Sidebar.styles.cjs +0 -24
- package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs +0 -62
- package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.cjs +0 -34
- package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs +0 -51
- package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.cjs +0 -35
- package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.cjs +0 -23
- package/dist/cjs/Flow/base.cjs +0 -411
- package/dist/cjs/Flow/hooks/useFlowContext.cjs +0 -6
- package/dist/cjs/Flow/hooks/useFlowInstance.cjs +0 -7
- package/dist/cjs/Flow/hooks/useFlowNode.cjs +0 -134
- package/dist/cjs/Flow/hooks/useFlowNodeMeta.cjs +0 -10
- package/dist/cjs/Flow/hooks/useNode.cjs +0 -159
- package/dist/cjs/Flow/hooks/useNodeId.cjs +0 -8
- package/dist/cjs/Flow/nodes/DashboardNode.cjs +0 -88
- package/dist/cjs/Flow/nodes/DashboardNode.styles.cjs +0 -16
- package/dist/cjs/Flow/nodes/StickyNode.cjs +0 -441
- package/dist/cjs/StepNavigation/DefaultNavigation/DefaultNavigation.cjs +0 -56
- package/dist/cjs/StepNavigation/DefaultNavigation/Step/Step.cjs +0 -78
- package/dist/cjs/StepNavigation/DefaultNavigation/Step/Step.styles.cjs +0 -35
- package/dist/cjs/StepNavigation/DefaultNavigation/utils.cjs +0 -34
- package/dist/cjs/StepNavigation/SimpleNavigation/Dot/Dot.cjs +0 -43
- package/dist/cjs/StepNavigation/SimpleNavigation/Dot/Dot.styles.cjs +0 -18
- package/dist/cjs/StepNavigation/SimpleNavigation/SimpleNavigation.cjs +0 -52
- package/dist/cjs/StepNavigation/SimpleNavigation/utils.cjs +0 -13
- package/dist/cjs/StepNavigation/StepNavigation.cjs +0 -188
- package/dist/cjs/StepNavigation/StepNavigation.styles.cjs +0 -34
- package/dist/cjs/StepNavigation/utils.cjs +0 -8
- package/dist/cjs/Wizard/Wizard.cjs +0 -108
- package/dist/cjs/Wizard/Wizard.styles.cjs +0 -8
- package/dist/cjs/Wizard/WizardActions/WizardActions.cjs +0 -132
- package/dist/cjs/Wizard/WizardActions/WizardActions.styles.cjs +0 -22
- package/dist/cjs/Wizard/WizardContainer/WizardContainer.cjs +0 -31
- package/dist/cjs/Wizard/WizardContainer/WizardContainer.styles.cjs +0 -15
- package/dist/cjs/Wizard/WizardContent/WizardContent.cjs +0 -121
- package/dist/cjs/Wizard/WizardContent/WizardContent.styles.cjs +0 -38
- package/dist/cjs/Wizard/WizardContext/WizardContext.cjs +0 -15
- package/dist/cjs/Wizard/WizardTitle/WizardTitle.cjs +0 -97
- package/dist/cjs/Wizard/WizardTitle/WizardTitle.styles.cjs +0 -27
- package/dist/cjs/index.cjs +0 -93
- /package/dist/{esm/Blade → Blade}/Blade.js +0 -0
- /package/dist/{esm/Blade → Blade}/Blade.styles.js +0 -0
- /package/dist/{esm/Blades → Blades}/Blades.js +0 -0
- /package/dist/{esm/Blades → Blades}/Blades.styles.js +0 -0
- /package/dist/{esm/Dashboard → Dashboard}/Dashboard.js +0 -0
- /package/dist/{esm/Dashboard → Dashboard}/Dashboard.styles.js +0 -0
- /package/dist/{esm/Flow → Flow}/Background/Background.js +0 -0
- /package/dist/{esm/Flow → Flow}/Controls/Controls.js +0 -0
- /package/dist/{esm/Flow → Flow}/DroppableFlow.js +0 -0
- /package/dist/{esm/Flow → Flow}/Empty/Empty.js +0 -0
- /package/dist/{esm/Flow → Flow}/Flow.js +0 -0
- /package/dist/{esm/Flow → Flow}/Flow.styles.js +0 -0
- /package/dist/{esm/Flow → Flow}/FlowContext/FlowContext.js +0 -0
- /package/dist/{esm/Flow → Flow}/FlowContext/NodeMetaContext.js +0 -0
- /package/dist/{esm/Flow → Flow}/Minimap/Minimap.js +0 -0
- /package/dist/{esm/Flow → Flow}/Minimap/Minimap.styles.js +0 -0
- /package/dist/{esm/Flow → Flow}/Node/BaseNode.js +0 -0
- /package/dist/{esm/Flow → Flow}/Node/BaseNode.styles.js +0 -0
- /package/dist/{esm/Flow → Flow}/Node/Node.styles.js +0 -0
- /package/dist/{esm/Flow → Flow}/Node/Parameters/ParamRenderer.js +0 -0
- /package/dist/{esm/Flow → Flow}/Node/Parameters/Select.js +0 -0
- /package/dist/{esm/Flow → Flow}/Node/Parameters/Slider.js +0 -0
- /package/dist/{esm/Flow → Flow}/Node/Parameters/Text.js +0 -0
- /package/dist/{esm/Flow → Flow}/Node/utils.js +0 -0
- /package/dist/{esm/Flow → Flow}/Sidebar/Sidebar.styles.js +0 -0
- /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroup.js +0 -0
- /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroup.styles.js +0 -0
- /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js +0 -0
- /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js +0 -0
- /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.js +0 -0
- /package/dist/{esm/Flow → Flow}/base.js +0 -0
- /package/dist/{esm/Flow → Flow}/hooks/useFlowContext.js +0 -0
- /package/dist/{esm/Flow → Flow}/hooks/useFlowInstance.js +0 -0
- /package/dist/{esm/Flow → Flow}/hooks/useFlowNode.js +0 -0
- /package/dist/{esm/Flow → Flow}/hooks/useFlowNodeMeta.js +0 -0
- /package/dist/{esm/Flow → Flow}/hooks/useNode.js +0 -0
- /package/dist/{esm/Flow → Flow}/hooks/useNodeId.js +0 -0
- /package/dist/{esm/Flow → Flow}/nodes/DashboardNode.js +0 -0
- /package/dist/{esm/Flow → Flow}/nodes/DashboardNode.styles.js +0 -0
- /package/dist/{esm/Flow → Flow}/nodes/StickyNode.js +0 -0
- /package/dist/{esm/StepNavigation → StepNavigation}/DefaultNavigation/Step/Step.js +0 -0
- /package/dist/{esm/StepNavigation → StepNavigation}/DefaultNavigation/Step/Step.styles.js +0 -0
- /package/dist/{esm/StepNavigation → StepNavigation}/DefaultNavigation/utils.js +0 -0
- /package/dist/{esm/StepNavigation → StepNavigation}/SimpleNavigation/Dot/Dot.js +0 -0
- /package/dist/{esm/StepNavigation → StepNavigation}/SimpleNavigation/Dot/Dot.styles.js +0 -0
- /package/dist/{esm/StepNavigation → StepNavigation}/SimpleNavigation/utils.js +0 -0
- /package/dist/{esm/StepNavigation → StepNavigation}/StepNavigation.styles.js +0 -0
- /package/dist/{esm/StepNavigation → StepNavigation}/utils.js +0 -0
- /package/dist/{esm/Wizard → Wizard}/Wizard.js +0 -0
- /package/dist/{esm/Wizard → Wizard}/Wizard.styles.js +0 -0
- /package/dist/{esm/Wizard → Wizard}/WizardActions/WizardActions.js +0 -0
- /package/dist/{esm/Wizard → Wizard}/WizardActions/WizardActions.styles.js +0 -0
- /package/dist/{esm/Wizard → Wizard}/WizardContainer/WizardContainer.js +0 -0
- /package/dist/{esm/Wizard → Wizard}/WizardContainer/WizardContainer.styles.js +0 -0
- /package/dist/{esm/Wizard → Wizard}/WizardContent/WizardContent.js +0 -0
- /package/dist/{esm/Wizard → Wizard}/WizardContent/WizardContent.styles.js +0 -0
- /package/dist/{esm/Wizard → Wizard}/WizardContext/WizardContext.js +0 -0
- /package/dist/{esm/index.js → index.js} +0 -0
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const css = require("@emotion/css");
|
|
6
|
-
const Popover = require("@mui/material/Popover");
|
|
7
|
-
const reactflow = require("reactflow");
|
|
8
|
-
const uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
9
|
-
const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
|
|
10
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
11
|
-
const Popover__default = /* @__PURE__ */ _interopDefault(Popover);
|
|
12
|
-
const defaultData = {
|
|
13
|
-
title: "Sticky Note",
|
|
14
|
-
backgroundColor: uikitReactCore.theme.colors.warningSubtle,
|
|
15
|
-
borderColor: uikitReactCore.theme.colors.warningSubtle,
|
|
16
|
-
textColor: uikitReactCore.theme.colors.text,
|
|
17
|
-
hasShadow: true,
|
|
18
|
-
bold: false,
|
|
19
|
-
italic: false,
|
|
20
|
-
fontSize: 14,
|
|
21
|
-
expanded: true,
|
|
22
|
-
visible: true
|
|
23
|
-
};
|
|
24
|
-
const classes = {
|
|
25
|
-
root: css.css({
|
|
26
|
-
width: "100%",
|
|
27
|
-
height: "100%",
|
|
28
|
-
position: "relative",
|
|
29
|
-
display: "flex",
|
|
30
|
-
outline: "none"
|
|
31
|
-
}),
|
|
32
|
-
nodeToolbar: css.css({
|
|
33
|
-
backgroundColor: "transparent",
|
|
34
|
-
borderRadius: uikitReactCore.theme.radii.full,
|
|
35
|
-
top: 10
|
|
36
|
-
}),
|
|
37
|
-
buttonsContainer: css.css({
|
|
38
|
-
padding: uikitReactCore.theme.space.xs
|
|
39
|
-
}),
|
|
40
|
-
textAreaRoot: css.css({
|
|
41
|
-
flex: 1,
|
|
42
|
-
width: "100%",
|
|
43
|
-
border: "none",
|
|
44
|
-
background: "transparent",
|
|
45
|
-
outline: "none"
|
|
46
|
-
}),
|
|
47
|
-
textAreaInput: css.css({
|
|
48
|
-
resize: "none",
|
|
49
|
-
height: "100%",
|
|
50
|
-
width: "100%",
|
|
51
|
-
padding: uikitReactCore.theme.space.xs,
|
|
52
|
-
"&:focus-visible": {
|
|
53
|
-
outline: "none"
|
|
54
|
-
},
|
|
55
|
-
paddingRight: 32
|
|
56
|
-
}),
|
|
57
|
-
textAreaInputFolded: css.css({
|
|
58
|
-
resize: "none",
|
|
59
|
-
width: "100%",
|
|
60
|
-
padding: 0,
|
|
61
|
-
border: "none",
|
|
62
|
-
overflow: "hidden",
|
|
63
|
-
minHeight: "1.5rem",
|
|
64
|
-
height: "auto"
|
|
65
|
-
}),
|
|
66
|
-
colorConfig: css.css({
|
|
67
|
-
display: "flex",
|
|
68
|
-
flexDirection: "column",
|
|
69
|
-
gap: uikitReactCore.theme.space.sm
|
|
70
|
-
}),
|
|
71
|
-
folded: css.css({
|
|
72
|
-
width: 34,
|
|
73
|
-
height: 34
|
|
74
|
-
}),
|
|
75
|
-
expandButton: css.css({
|
|
76
|
-
position: "absolute",
|
|
77
|
-
top: uikitReactCore.theme.space.xxs,
|
|
78
|
-
right: uikitReactCore.theme.space.xxs
|
|
79
|
-
}),
|
|
80
|
-
fontSizes: css.css({
|
|
81
|
-
maxHeight: 160,
|
|
82
|
-
overflowY: "auto",
|
|
83
|
-
padding: uikitReactCore.theme.space.xs
|
|
84
|
-
})
|
|
85
|
-
};
|
|
86
|
-
const colorsToConfig = ["textColor", "backgroundColor", "borderColor"];
|
|
87
|
-
const fontSizes = [10, 11, 12, 14, 16, 20, 24, 32, 36, 40, 48, 64, 96, 128];
|
|
88
|
-
const StickyNode = ({
|
|
89
|
-
id,
|
|
90
|
-
selected,
|
|
91
|
-
data = {}
|
|
92
|
-
}) => {
|
|
93
|
-
const mergedData = react.useMemo(() => ({ ...defaultData, ...data }), [data]);
|
|
94
|
-
const [text, setText] = react.useState("");
|
|
95
|
-
const { setNodes } = reactflow.useReactFlow();
|
|
96
|
-
const [editing, setEditing] = react.useState(false);
|
|
97
|
-
const [toolbarVisible, setToolbarVisible] = react.useState(false);
|
|
98
|
-
const [colorsConfigOpen, setColorsConfigOpen] = react.useState(false);
|
|
99
|
-
const [fontSizeConfigOpen, setFontSizeConfigOpen] = react.useState(false);
|
|
100
|
-
const [fontSize, setFontSize] = react.useState(mergedData.fontSize ?? 14);
|
|
101
|
-
const colorConfigBtnRef = react.useRef(null);
|
|
102
|
-
const fontSizeConfigBtnRef = react.useRef(null);
|
|
103
|
-
const handleToggleBold = react.useCallback(() => {
|
|
104
|
-
setNodes(
|
|
105
|
-
(nds) => nds.map((node) => {
|
|
106
|
-
if (node.id === id) {
|
|
107
|
-
node.data = {
|
|
108
|
-
...node.data,
|
|
109
|
-
bold: !node.data?.bold
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
return node;
|
|
113
|
-
})
|
|
114
|
-
);
|
|
115
|
-
}, [setNodes, id]);
|
|
116
|
-
const handleToggleItalic = react.useCallback(() => {
|
|
117
|
-
setNodes(
|
|
118
|
-
(nds) => nds.map((node) => {
|
|
119
|
-
if (node.id === id) {
|
|
120
|
-
node.data = {
|
|
121
|
-
...node.data,
|
|
122
|
-
italic: !node.data?.italic
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
return node;
|
|
126
|
-
})
|
|
127
|
-
);
|
|
128
|
-
}, [setNodes, id]);
|
|
129
|
-
const handleChangeFontSize = react.useCallback(
|
|
130
|
-
(size) => {
|
|
131
|
-
setFontSize(size);
|
|
132
|
-
setNodes(
|
|
133
|
-
(nds) => nds.map((node) => {
|
|
134
|
-
if (node.id === id) {
|
|
135
|
-
node.data = {
|
|
136
|
-
...node.data,
|
|
137
|
-
fontSize: size
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
return node;
|
|
141
|
-
})
|
|
142
|
-
);
|
|
143
|
-
setFontSizeConfigOpen(false);
|
|
144
|
-
},
|
|
145
|
-
[setNodes, id]
|
|
146
|
-
);
|
|
147
|
-
const handleToggleExpand = react.useCallback(() => {
|
|
148
|
-
setNodes(
|
|
149
|
-
(nds) => nds.map((node) => {
|
|
150
|
-
if (node.id === id) {
|
|
151
|
-
node.data = {
|
|
152
|
-
...node.data,
|
|
153
|
-
expanded: !node.data?.expanded
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
return node;
|
|
157
|
-
})
|
|
158
|
-
);
|
|
159
|
-
}, [setNodes, id]);
|
|
160
|
-
const handleResetColors = react.useCallback(() => {
|
|
161
|
-
setNodes(
|
|
162
|
-
(nds) => nds.map((node) => {
|
|
163
|
-
if (node.id === id) {
|
|
164
|
-
node.data = {
|
|
165
|
-
...node.data,
|
|
166
|
-
backgroundColor: defaultData.backgroundColor,
|
|
167
|
-
borderColor: defaultData.borderColor,
|
|
168
|
-
textColor: defaultData.textColor,
|
|
169
|
-
hasShadow: defaultData.hasShadow
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
return node;
|
|
173
|
-
})
|
|
174
|
-
);
|
|
175
|
-
}, [setNodes, id]);
|
|
176
|
-
const handleDeleteSticky = react.useCallback(() => {
|
|
177
|
-
setNodes((nds) => nds.filter((node) => node.id !== id));
|
|
178
|
-
mergedData.onDelete?.();
|
|
179
|
-
}, [mergedData, setNodes, id]);
|
|
180
|
-
if (!mergedData.visible) return null;
|
|
181
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
182
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
183
|
-
Popover__default.default,
|
|
184
|
-
{
|
|
185
|
-
open: colorsConfigOpen,
|
|
186
|
-
anchorEl: colorConfigBtnRef.current,
|
|
187
|
-
onClose: () => {
|
|
188
|
-
setColorsConfigOpen(false);
|
|
189
|
-
setEditing(false);
|
|
190
|
-
},
|
|
191
|
-
anchorOrigin: {
|
|
192
|
-
vertical: "bottom",
|
|
193
|
-
horizontal: "left"
|
|
194
|
-
},
|
|
195
|
-
transformOrigin: {
|
|
196
|
-
vertical: "top",
|
|
197
|
-
horizontal: "left"
|
|
198
|
-
},
|
|
199
|
-
children: [
|
|
200
|
-
/* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvDialogTitle, { children: "Customize Colors" }),
|
|
201
|
-
/* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvDialogContent, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes.colorConfig, children: [
|
|
202
|
-
colorsToConfig.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
203
|
-
uikitReactCore.HvColorPicker,
|
|
204
|
-
{
|
|
205
|
-
label: `${c.charAt(0).toUpperCase() + c.slice(1).replace("Color", " Color")}`,
|
|
206
|
-
value: mergedData[c] ?? "",
|
|
207
|
-
onChange: (color) => {
|
|
208
|
-
setNodes(
|
|
209
|
-
(nds) => nds.map((node) => {
|
|
210
|
-
if (node.id === id) {
|
|
211
|
-
node.data = {
|
|
212
|
-
...node.data,
|
|
213
|
-
[c]: color
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
return node;
|
|
217
|
-
})
|
|
218
|
-
);
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
c
|
|
222
|
-
)),
|
|
223
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
224
|
-
uikitReactCore.HvCheckBox,
|
|
225
|
-
{
|
|
226
|
-
label: "Drop Shadow",
|
|
227
|
-
defaultChecked: mergedData.hasShadow,
|
|
228
|
-
onChange: (_, checked) => {
|
|
229
|
-
setNodes(
|
|
230
|
-
(nds) => nds.map((node) => {
|
|
231
|
-
if (node.id === id) {
|
|
232
|
-
node.data = {
|
|
233
|
-
...node.data,
|
|
234
|
-
hasShadow: checked
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
return node;
|
|
238
|
-
})
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
),
|
|
243
|
-
/* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvButton, { variant: "secondarySubtle", onClick: handleResetColors, children: "Reset to defaults" })
|
|
244
|
-
] }) })
|
|
245
|
-
]
|
|
246
|
-
}
|
|
247
|
-
),
|
|
248
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
249
|
-
Popover__default.default,
|
|
250
|
-
{
|
|
251
|
-
open: fontSizeConfigOpen,
|
|
252
|
-
anchorEl: fontSizeConfigBtnRef.current,
|
|
253
|
-
onClose: () => {
|
|
254
|
-
setFontSizeConfigOpen(false);
|
|
255
|
-
setEditing(false);
|
|
256
|
-
},
|
|
257
|
-
anchorOrigin: {
|
|
258
|
-
vertical: "bottom",
|
|
259
|
-
horizontal: "right"
|
|
260
|
-
},
|
|
261
|
-
transformOrigin: {
|
|
262
|
-
vertical: "top",
|
|
263
|
-
horizontal: "right"
|
|
264
|
-
},
|
|
265
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
266
|
-
uikitReactCore.HvSelectionList,
|
|
267
|
-
{
|
|
268
|
-
className: classes.fontSizes,
|
|
269
|
-
value: fontSize,
|
|
270
|
-
onChange: (evt, newValue) => {
|
|
271
|
-
handleChangeFontSize(newValue);
|
|
272
|
-
},
|
|
273
|
-
children: fontSizes.map((size) => /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvListItem, { value: size, children: size }, size))
|
|
274
|
-
}
|
|
275
|
-
)
|
|
276
|
-
}
|
|
277
|
-
),
|
|
278
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
279
|
-
"div",
|
|
280
|
-
{
|
|
281
|
-
className: css.cx(
|
|
282
|
-
classes.root,
|
|
283
|
-
"nowheel",
|
|
284
|
-
!mergedData.expanded && classes.folded
|
|
285
|
-
),
|
|
286
|
-
style: {
|
|
287
|
-
backgroundColor: mergedData.backgroundColor ?? uikitReactCore.theme.colors.bgContainer,
|
|
288
|
-
boxShadow: mergedData.hasShadow ? "0 8px 12px rgba(65,65,65,0.25)" : "none",
|
|
289
|
-
border: mergedData.borderColor ? `1px solid ${mergedData.borderColor}` : "none",
|
|
290
|
-
fontSize: `${mergedData.fontSize ?? 14}px`,
|
|
291
|
-
lineHeight: `${mergedData.fontSize ?? 14}px`
|
|
292
|
-
},
|
|
293
|
-
children: [
|
|
294
|
-
mergedData.expanded && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
295
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
296
|
-
reactflow.NodeResizer,
|
|
297
|
-
{
|
|
298
|
-
isVisible: selected,
|
|
299
|
-
minWidth: 100,
|
|
300
|
-
minHeight: 75,
|
|
301
|
-
lineStyle: {
|
|
302
|
-
color: uikitReactCore.theme.colors.primary,
|
|
303
|
-
borderStyle: "solid"
|
|
304
|
-
},
|
|
305
|
-
handleStyle: {
|
|
306
|
-
width: 6,
|
|
307
|
-
height: 6,
|
|
308
|
-
border: `1px solid ${uikitReactCore.theme.colors.primary}`,
|
|
309
|
-
backgroundColor: mergedData.backgroundColor ?? "transparent",
|
|
310
|
-
borderRadius: uikitReactCore.theme.radii.full
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
),
|
|
314
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
315
|
-
reactflow.NodeToolbar,
|
|
316
|
-
{
|
|
317
|
-
isVisible: editing || toolbarVisible || selected,
|
|
318
|
-
position: reactflow.Position.Top,
|
|
319
|
-
className: classes.nodeToolbar,
|
|
320
|
-
onMouseEnter: () => setToolbarVisible(true),
|
|
321
|
-
onMouseLeave: () => setToolbarVisible(false),
|
|
322
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.buttonsContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(uikitReactCore.HvMultiButton, { children: [
|
|
323
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
324
|
-
uikitReactCore.HvIconButton,
|
|
325
|
-
{
|
|
326
|
-
"aria-label": "Font Size",
|
|
327
|
-
title: "Font Size",
|
|
328
|
-
ref: fontSizeConfigBtnRef,
|
|
329
|
-
onClick: () => {
|
|
330
|
-
setEditing(true);
|
|
331
|
-
setFontSizeConfigOpen(true);
|
|
332
|
-
},
|
|
333
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.FontSize, {})
|
|
334
|
-
}
|
|
335
|
-
),
|
|
336
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
337
|
-
uikitReactCore.HvIconButton,
|
|
338
|
-
{
|
|
339
|
-
"aria-label": "Bold",
|
|
340
|
-
title: "Bold",
|
|
341
|
-
selected: mergedData.bold,
|
|
342
|
-
onClick: handleToggleBold,
|
|
343
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Bold, {})
|
|
344
|
-
}
|
|
345
|
-
),
|
|
346
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
347
|
-
uikitReactCore.HvIconButton,
|
|
348
|
-
{
|
|
349
|
-
"aria-label": "Italic",
|
|
350
|
-
title: "Italic",
|
|
351
|
-
selected: mergedData.italic,
|
|
352
|
-
onClick: handleToggleItalic,
|
|
353
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Italic, {})
|
|
354
|
-
}
|
|
355
|
-
),
|
|
356
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
357
|
-
uikitReactCore.HvIconButton,
|
|
358
|
-
{
|
|
359
|
-
"aria-label": "Customize Colors",
|
|
360
|
-
title: "Customize Colors",
|
|
361
|
-
ref: colorConfigBtnRef,
|
|
362
|
-
onClick: () => {
|
|
363
|
-
setEditing(true);
|
|
364
|
-
setColorsConfigOpen(true);
|
|
365
|
-
},
|
|
366
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Palette, {})
|
|
367
|
-
}
|
|
368
|
-
),
|
|
369
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
370
|
-
uikitReactCore.HvIconButton,
|
|
371
|
-
{
|
|
372
|
-
"aria-label": "Delete",
|
|
373
|
-
title: "Delete",
|
|
374
|
-
onClick: handleDeleteSticky,
|
|
375
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Delete, {})
|
|
376
|
-
}
|
|
377
|
-
)
|
|
378
|
-
] }) })
|
|
379
|
-
}
|
|
380
|
-
),
|
|
381
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
382
|
-
"div",
|
|
383
|
-
{
|
|
384
|
-
onMouseEnter: () => setToolbarVisible(true),
|
|
385
|
-
onMouseLeave: () => setToolbarVisible(false),
|
|
386
|
-
className: classes.textAreaRoot,
|
|
387
|
-
children: [
|
|
388
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
389
|
-
uikitReactCore.HvIconButton,
|
|
390
|
-
{
|
|
391
|
-
className: classes.expandButton,
|
|
392
|
-
title: "Fold",
|
|
393
|
-
onClick: handleToggleExpand,
|
|
394
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.ActualSize, {})
|
|
395
|
-
}
|
|
396
|
-
),
|
|
397
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
398
|
-
"textarea",
|
|
399
|
-
{
|
|
400
|
-
id: `sticky-textarea-${id}`,
|
|
401
|
-
value: text || "",
|
|
402
|
-
onChange: (e) => setText(e.target.value),
|
|
403
|
-
className: classes.textAreaInput,
|
|
404
|
-
placeholder: "Type here...",
|
|
405
|
-
style: {
|
|
406
|
-
color: mergedData.textColor ?? uikitReactCore.theme.colors.text,
|
|
407
|
-
fontWeight: mergedData.bold ? "bold" : "normal",
|
|
408
|
-
fontStyle: mergedData.italic ? "italic" : "normal",
|
|
409
|
-
fontSize: mergedData.fontSize ?? "14px"
|
|
410
|
-
},
|
|
411
|
-
onFocus: () => setEditing(true),
|
|
412
|
-
onBlur: () => {
|
|
413
|
-
setEditing(false);
|
|
414
|
-
setColorsConfigOpen(false);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
)
|
|
418
|
-
]
|
|
419
|
-
}
|
|
420
|
-
)
|
|
421
|
-
] }),
|
|
422
|
-
!mergedData.expanded && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
423
|
-
uikitReactCore.HvIconButton,
|
|
424
|
-
{
|
|
425
|
-
title: /* @__PURE__ */ jsxRuntime.jsx(
|
|
426
|
-
"span",
|
|
427
|
-
{
|
|
428
|
-
style: { whiteSpace: "pre-wrap", wordBreak: "break-word" },
|
|
429
|
-
children: text
|
|
430
|
-
}
|
|
431
|
-
),
|
|
432
|
-
onClick: handleToggleExpand,
|
|
433
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Fullscreen, {})
|
|
434
|
-
}
|
|
435
|
-
) })
|
|
436
|
-
]
|
|
437
|
-
}
|
|
438
|
-
)
|
|
439
|
-
] });
|
|
440
|
-
};
|
|
441
|
-
exports.StickyNode = StickyNode;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
5
|
-
const utils = require("./utils.cjs");
|
|
6
|
-
const Step = require("./Step/Step.cjs");
|
|
7
|
-
const HvDefaultNavigation = ({
|
|
8
|
-
numSteps,
|
|
9
|
-
stepSize,
|
|
10
|
-
getTitles,
|
|
11
|
-
getDynamicValues,
|
|
12
|
-
className,
|
|
13
|
-
children,
|
|
14
|
-
...other
|
|
15
|
-
}) => {
|
|
16
|
-
const { activeTheme } = uikitReactCore.useTheme();
|
|
17
|
-
const { container: maxSize, avatar: minSize } = utils.stepSizes[stepSize];
|
|
18
|
-
const StepComponent = Step.HvStep;
|
|
19
|
-
const stepsWidth = maxSize + minSize * (numSteps - 1);
|
|
20
|
-
const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);
|
|
21
|
-
const maxWidth = Math.max(titleWidth - minSize, separatorWidth);
|
|
22
|
-
const minWidth = Math.max(
|
|
23
|
-
titleWidth - (maxSize + minSize) * 0.5,
|
|
24
|
-
separatorWidth
|
|
25
|
-
);
|
|
26
|
-
const Steps = children;
|
|
27
|
-
const titles = getTitles(({ state }) => ({
|
|
28
|
-
variant: "label",
|
|
29
|
-
titleWidth,
|
|
30
|
-
titleDisabled: state === "Disabled"
|
|
31
|
-
}));
|
|
32
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...other, children: [
|
|
33
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34
|
-
Steps,
|
|
35
|
-
{
|
|
36
|
-
...{
|
|
37
|
-
stepsWidth,
|
|
38
|
-
navWidth: width,
|
|
39
|
-
separatorValues: {
|
|
40
|
-
minWidth,
|
|
41
|
-
maxWidth,
|
|
42
|
-
getColor: utils.getColor,
|
|
43
|
-
height: activeTheme?.stepNavigation.defaultSeparatorHeight || 0
|
|
44
|
-
},
|
|
45
|
-
stepValues: {
|
|
46
|
-
minSize,
|
|
47
|
-
maxSize,
|
|
48
|
-
StepComponent
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
titles
|
|
54
|
-
] });
|
|
55
|
-
};
|
|
56
|
-
exports.HvDefaultNavigation = HvDefaultNavigation;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
5
|
-
const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
|
|
6
|
-
const utils = require("../utils.cjs");
|
|
7
|
-
const Step_styles = require("./Step.styles.cjs");
|
|
8
|
-
const iconSizeObject = {
|
|
9
|
-
xs: "XS",
|
|
10
|
-
sm: "XS",
|
|
11
|
-
md: "S",
|
|
12
|
-
lg: "M",
|
|
13
|
-
xl: "M"
|
|
14
|
-
};
|
|
15
|
-
const stateObject = {
|
|
16
|
-
Pending: 16,
|
|
17
|
-
Failed: 24,
|
|
18
|
-
Completed: 24
|
|
19
|
-
};
|
|
20
|
-
const iconStateObject = {
|
|
21
|
-
Pending: uikitReactIcons.HourGlass,
|
|
22
|
-
Failed: uikitReactIcons.Level3Bad,
|
|
23
|
-
Completed: uikitReactIcons.Level0Good
|
|
24
|
-
};
|
|
25
|
-
const HvStep = ({
|
|
26
|
-
className,
|
|
27
|
-
classes: classesProp,
|
|
28
|
-
state,
|
|
29
|
-
title,
|
|
30
|
-
onClick,
|
|
31
|
-
disabled,
|
|
32
|
-
size = "md",
|
|
33
|
-
number = 1
|
|
34
|
-
}) => {
|
|
35
|
-
const { classes, cx } = Step_styles.useClasses(classesProp);
|
|
36
|
-
const iconSize = iconSizeObject[size];
|
|
37
|
-
const squareL = stateObject[state];
|
|
38
|
-
const svgSize = {
|
|
39
|
-
xs: squareL - 8,
|
|
40
|
-
sm: squareL,
|
|
41
|
-
md: squareL + 8,
|
|
42
|
-
lg: squareL + 16,
|
|
43
|
-
xl: squareL + 24
|
|
44
|
-
}[size];
|
|
45
|
-
const backgroundColor = utils.getColor(state);
|
|
46
|
-
const color = state === "Pending" ? "bgPage" : utils.getSemantic(state);
|
|
47
|
-
const status = state === "Current" ? "textDisabled" : void 0;
|
|
48
|
-
const IconComponent = iconStateObject[state];
|
|
49
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
50
|
-
uikitReactCore.HvButtonBase,
|
|
51
|
-
{
|
|
52
|
-
className: cx(classes.root, className, {
|
|
53
|
-
[classes.notCurrent]: state !== "Current"
|
|
54
|
-
}),
|
|
55
|
-
"aria-label": title,
|
|
56
|
-
disabled: disabled ?? ["Current", "Disabled"].includes(state),
|
|
57
|
-
onClick,
|
|
58
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
59
|
-
uikitReactCore.HvAvatar,
|
|
60
|
-
{
|
|
61
|
-
className: cx(classes.avatar, classes[size]),
|
|
62
|
-
backgroundColor,
|
|
63
|
-
status,
|
|
64
|
-
size,
|
|
65
|
-
children: IconComponent ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
66
|
-
IconComponent,
|
|
67
|
-
{
|
|
68
|
-
color,
|
|
69
|
-
style: { fontSize: svgSize },
|
|
70
|
-
size: iconSize
|
|
71
|
-
}
|
|
72
|
-
) : number
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
};
|
|
78
|
-
exports.HvStep = HvStep;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
4
|
-
const { staticClasses, useClasses } = uikitReactCore.createClasses("HvStep", {
|
|
5
|
-
root: {
|
|
6
|
-
width: "fit-content",
|
|
7
|
-
height: "fit-content",
|
|
8
|
-
fontWeight: uikitReactCore.theme.fontWeights.semibold
|
|
9
|
-
},
|
|
10
|
-
notCurrent: { margin: "-8px" },
|
|
11
|
-
xs: {},
|
|
12
|
-
sm: {},
|
|
13
|
-
md: {},
|
|
14
|
-
lg: {},
|
|
15
|
-
xl: {},
|
|
16
|
-
avatar: {
|
|
17
|
-
"&$xs": {
|
|
18
|
-
fontSize: "0.625rem"
|
|
19
|
-
},
|
|
20
|
-
"&$sm": {
|
|
21
|
-
fontSize: "1rem"
|
|
22
|
-
},
|
|
23
|
-
"&$md": {
|
|
24
|
-
fontSize: "1.5rem"
|
|
25
|
-
},
|
|
26
|
-
"&$lg": {
|
|
27
|
-
fontSize: "2rem"
|
|
28
|
-
},
|
|
29
|
-
"&$xl": {
|
|
30
|
-
fontSize: "2.5rem"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
exports.staticClasses = staticClasses;
|
|
35
|
-
exports.useClasses = useClasses;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
4
|
-
const getColor = (state) => ({
|
|
5
|
-
Pending: uikitStyles.theme.colors.warning ?? "warning",
|
|
6
|
-
Failed: uikitStyles.theme.colors.negative ?? "negative",
|
|
7
|
-
Completed: uikitStyles.theme.colors.positive ?? "positive",
|
|
8
|
-
Current: uikitStyles.theme.colors.text ?? "text",
|
|
9
|
-
Disabled: uikitStyles.theme.colors.textDisabled ?? "textDisabled",
|
|
10
|
-
Enabled: uikitStyles.theme.colors.text ?? "text"
|
|
11
|
-
})[state];
|
|
12
|
-
const getSemantic = (state) => ({
|
|
13
|
-
Pending: "warning",
|
|
14
|
-
Failed: "negative",
|
|
15
|
-
Completed: "positive",
|
|
16
|
-
Current: "text",
|
|
17
|
-
Disabled: "textDisabled",
|
|
18
|
-
Enabled: "text"
|
|
19
|
-
})[state];
|
|
20
|
-
const EXTRA_SMALL = { container: 32, avatar: 24 };
|
|
21
|
-
const SMALL = { container: 40, avatar: 32 };
|
|
22
|
-
const MEDIUM = { container: 48, avatar: 40 };
|
|
23
|
-
const LARGE = { container: 60, avatar: 52 };
|
|
24
|
-
const EXTRA_LARGE = { container: 96, avatar: 88 };
|
|
25
|
-
const stepSizes = {
|
|
26
|
-
xs: EXTRA_SMALL,
|
|
27
|
-
sm: SMALL,
|
|
28
|
-
md: MEDIUM,
|
|
29
|
-
lg: LARGE,
|
|
30
|
-
xl: EXTRA_LARGE
|
|
31
|
-
};
|
|
32
|
-
exports.getColor = getColor;
|
|
33
|
-
exports.getSemantic = getSemantic;
|
|
34
|
-
exports.stepSizes = stepSizes;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
5
|
-
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
6
|
-
const utils = require("../utils.cjs");
|
|
7
|
-
const Dot_styles = require("./Dot.styles.cjs");
|
|
8
|
-
const HvDot = ({
|
|
9
|
-
classes: classesProp,
|
|
10
|
-
className,
|
|
11
|
-
state,
|
|
12
|
-
title,
|
|
13
|
-
size = "sm",
|
|
14
|
-
onClick,
|
|
15
|
-
disabled: disabledProp
|
|
16
|
-
}) => {
|
|
17
|
-
const { classes, cx } = Dot_styles.useClasses(classesProp);
|
|
18
|
-
const dotSize = utils.dotSizes[size] * (state === "Current" ? 1.5 : 1);
|
|
19
|
-
const disabled = disabledProp ?? ["Current", "Disabled"].includes(state);
|
|
20
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
-
uikitReactCore.HvButton,
|
|
22
|
-
{
|
|
23
|
-
style: uikitReactUtils.mergeStyles(void 0, {
|
|
24
|
-
"--dotColor": utils.getColor(state),
|
|
25
|
-
"--dotSize": `${dotSize}px`
|
|
26
|
-
}),
|
|
27
|
-
className: cx(
|
|
28
|
-
classes.root,
|
|
29
|
-
{
|
|
30
|
-
[classes.active]: state === "Current",
|
|
31
|
-
[classes.ghostDisabled]: disabled
|
|
32
|
-
},
|
|
33
|
-
className
|
|
34
|
-
),
|
|
35
|
-
"aria-label": title,
|
|
36
|
-
icon: true,
|
|
37
|
-
disabled,
|
|
38
|
-
onClick
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
exports.dotClasses = Dot_styles.staticClasses;
|
|
43
|
-
exports.HvDot = HvDot;
|