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