@hitachivantara/uikit-react-lab 5.46.12 → 6.0.0-next.1

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