@uipath/apollo-react 6.30.1 → 6.30.3

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.
@@ -128,21 +128,6 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
128
128
  }), [
129
129
  style
130
130
  ]);
131
- const nameRef = (0, external_react_namespaceObject.useRef)(null);
132
- const descriptionRef = (0, external_react_namespaceObject.useRef)(null);
133
- const [truncated, setTruncated] = (0, external_react_namespaceObject.useState)({
134
- name: false,
135
- description: false
136
- });
137
- const measureTruncation = (0, external_react_namespaceObject.useCallback)(()=>{
138
- const n = nameRef.current;
139
- const d = descriptionRef.current;
140
- const next = {
141
- name: !!n && n.scrollWidth > n.clientWidth,
142
- description: !!d && d.scrollWidth > d.clientWidth
143
- };
144
- setTruncated((prev)=>prev.name === next.name && prev.description === next.description ? prev : next);
145
- }, []);
146
131
  const handleButtonClick = (0, external_react_namespaceObject.useCallback)(()=>{
147
132
  const clickTarget = renderedItems[index];
148
133
  if (clickTarget?.type === 'item') onItemClick(clickTarget.item, index);
@@ -152,11 +137,9 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
152
137
  index
153
138
  ]);
154
139
  const handleButtonHover = (0, external_react_namespaceObject.useCallback)(()=>{
155
- measureTruncation();
156
140
  const hoverTarget = renderedItems[index];
157
141
  if (hoverTarget?.type === 'item') onItemHover?.(hoverTarget.item);
158
142
  }, [
159
- measureTruncation,
160
143
  onItemHover,
161
144
  renderedItems,
162
145
  index
@@ -230,7 +213,6 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
230
213
  overflow: "hidden",
231
214
  children: [
232
215
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
233
- ref: nameRef,
234
216
  className: "text-sm list-view-item-name",
235
217
  style: item.contentColor ? {
236
218
  color: item.contentColor
@@ -238,7 +220,6 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
238
220
  children: item.name
239
221
  }),
240
222
  item.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
241
- ref: descriptionRef,
242
223
  className: "text-xs list-view-item-name text-foreground-muted",
243
224
  children: item.description
244
225
  })
@@ -265,32 +246,27 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
265
246
  })
266
247
  ]
267
248
  });
268
- const showName = truncated.name;
269
- const showDescription = !!item.description && truncated.description;
270
- const showPopover = truncated.name || truncated.description || !!item.detail;
271
- const popover = showPopover ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
272
- className: "flex flex-col gap-0.5",
273
- children: [
274
- showName && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
275
- className: "text-sm",
276
- children: item.name
277
- }),
278
- showDescription && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
279
- className: "text-xs text-foreground-inv-de-emp",
280
- children: item.description
281
- }),
282
- item.detail && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
283
- className: "text-xs",
284
- children: item.detail
285
- })
286
- ]
287
- }) : null;
288
249
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
289
- content: popover,
250
+ content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
251
+ className: "flex flex-col gap-0.5",
252
+ children: [
253
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
254
+ className: "text-sm",
255
+ children: item.name
256
+ }),
257
+ !!item.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
258
+ className: "text-xs text-foreground-inv-de-emp",
259
+ children: item.description
260
+ }),
261
+ !!item.detail && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
262
+ className: "text-xs",
263
+ children: item.detail
264
+ })
265
+ ]
266
+ }),
290
267
  placement: "right",
291
268
  delay: true,
292
269
  contentClassName: "max-w-64",
293
- hide: !showPopover,
294
270
  disableSkipDelay: true,
295
271
  children: button
296
272
  }, item.id);
@@ -1 +1 @@
1
- {"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/ListView.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,cAAc,CAAC;AAMzE,MAAM,WAAW,YAAY;IAI3B,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACjC;AAUD,MAAM,MAAM,mBAAmB,GAAG;IAKhC,KAAK,CAAC,EAAE,MAAM,CAAC;IAOf,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,QAAQ,CAAC,CAAC,GAAG,GAAG,IAAI;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,WAAW,CAAC,EAAE,MAAM,CAAC;IAMrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,aAAa,CAAC,EAAE,OAAO,CAAC;IAMxB,YAAY,CAAC,EAAE,MAAM,CAAC;IAMtB,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,QAA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AAC,KAAK,IAAI,CAAC;CACjC;AAsKD,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IAC3D,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAChC;AAED,UAAU,aAAa,CAAC,CAAC,SAAS,QAAQ;IACxC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACpD,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IAQxB,gBAAgB,CAAC,EAAE,MAAM,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IAOzB,eAAe,CAAC,EAAE,OAAO,GAAG,mBAAmB,CAAC;CACjD;AA4FD,eAAO,MAAM,QAAQ,EAA0B,CAAC,CAAC,SAAS,QAAQ,EAChE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,KAC7D,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC"}
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Column } from "../../layouts/index.js";
3
3
  import { CanvasIcon, partition } from "../../utils/index.js";
4
4
  import { Skeleton } from "@uipath/apollo-wind";
5
- import { forwardRef, memo, useCallback, useImperativeHandle, useMemo, useRef, useState } from "react";
5
+ import { forwardRef, memo, useCallback, useImperativeHandle, useMemo } from "react";
6
6
  import { useCanvasTheme } from "../BaseCanvas/CanvasThemeContext.js";
7
7
  import { CanvasTooltip } from "../CanvasTooltip.js";
8
8
  import { InitialsBadge } from "../shared/InitialsBadge.js";
@@ -93,21 +93,6 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
93
93
  }), [
94
94
  style
95
95
  ]);
96
- const nameRef = useRef(null);
97
- const descriptionRef = useRef(null);
98
- const [truncated, setTruncated] = useState({
99
- name: false,
100
- description: false
101
- });
102
- const measureTruncation = useCallback(()=>{
103
- const n = nameRef.current;
104
- const d = descriptionRef.current;
105
- const next = {
106
- name: !!n && n.scrollWidth > n.clientWidth,
107
- description: !!d && d.scrollWidth > d.clientWidth
108
- };
109
- setTruncated((prev)=>prev.name === next.name && prev.description === next.description ? prev : next);
110
- }, []);
111
96
  const handleButtonClick = useCallback(()=>{
112
97
  const clickTarget = renderedItems[index];
113
98
  if (clickTarget?.type === 'item') onItemClick(clickTarget.item, index);
@@ -117,11 +102,9 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
117
102
  index
118
103
  ]);
119
104
  const handleButtonHover = useCallback(()=>{
120
- measureTruncation();
121
105
  const hoverTarget = renderedItems[index];
122
106
  if (hoverTarget?.type === 'item') onItemHover?.(hoverTarget.item);
123
107
  }, [
124
- measureTruncation,
125
108
  onItemHover,
126
109
  renderedItems,
127
110
  index
@@ -195,7 +178,6 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
195
178
  overflow: "hidden",
196
179
  children: [
197
180
  /*#__PURE__*/ jsx("span", {
198
- ref: nameRef,
199
181
  className: "text-sm list-view-item-name",
200
182
  style: item.contentColor ? {
201
183
  color: item.contentColor
@@ -203,7 +185,6 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
203
185
  children: item.name
204
186
  }),
205
187
  item.description && /*#__PURE__*/ jsx("span", {
206
- ref: descriptionRef,
207
188
  className: "text-xs list-view-item-name text-foreground-muted",
208
189
  children: item.description
209
190
  })
@@ -230,32 +211,27 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
230
211
  })
231
212
  ]
232
213
  });
233
- const showName = truncated.name;
234
- const showDescription = !!item.description && truncated.description;
235
- const showPopover = truncated.name || truncated.description || !!item.detail;
236
- const popover = showPopover ? /*#__PURE__*/ jsxs("div", {
237
- className: "flex flex-col gap-0.5",
238
- children: [
239
- showName && /*#__PURE__*/ jsx("span", {
240
- className: "text-sm",
241
- children: item.name
242
- }),
243
- showDescription && /*#__PURE__*/ jsx("span", {
244
- className: "text-xs text-foreground-inv-de-emp",
245
- children: item.description
246
- }),
247
- item.detail && /*#__PURE__*/ jsx("span", {
248
- className: "text-xs",
249
- children: item.detail
250
- })
251
- ]
252
- }) : null;
253
214
  return /*#__PURE__*/ jsx(CanvasTooltip, {
254
- content: popover,
215
+ content: /*#__PURE__*/ jsxs("div", {
216
+ className: "flex flex-col gap-0.5",
217
+ children: [
218
+ /*#__PURE__*/ jsx("span", {
219
+ className: "text-sm",
220
+ children: item.name
221
+ }),
222
+ !!item.description && /*#__PURE__*/ jsx("span", {
223
+ className: "text-xs text-foreground-inv-de-emp",
224
+ children: item.description
225
+ }),
226
+ !!item.detail && /*#__PURE__*/ jsx("span", {
227
+ className: "text-xs",
228
+ children: item.detail
229
+ })
230
+ ]
231
+ }),
255
232
  placement: "right",
256
233
  delay: true,
257
234
  contentClassName: "max-w-64",
258
- hide: !showPopover,
259
235
  disableSkipDelay: true,
260
236
  children: button
261
237
  }, item.id);
@@ -33,6 +33,21 @@ const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
33
33
  const external_lucide_react_namespaceObject = require("lucide-react");
34
34
  const external_react_namespaceObject = require("react");
35
35
  const index_cjs_namespaceObject = require("../../../i18n/index.cjs");
36
+ const icon_registry_cjs_namespaceObject = require("../../utils/icon-registry.cjs");
37
+ function ModeIcon({ icon, size, className }) {
38
+ if ('string' == typeof icon) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
39
+ className: (0, apollo_wind_namespaceObject.cn)('inline-flex', className),
40
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icon_registry_cjs_namespaceObject.CanvasIcon, {
41
+ icon: icon,
42
+ size: size
43
+ })
44
+ });
45
+ const Icon = icon;
46
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
47
+ size: size,
48
+ className: className
49
+ });
50
+ }
36
51
  const MODE_DEFS = [
37
52
  {
38
53
  value: 'live',
@@ -60,7 +75,7 @@ const MODE_DEFS = [
60
75
  },
61
76
  {
62
77
  value: 'simulated',
63
- icon: external_lucide_react_namespaceObject.Sparkles,
78
+ icon: 'file-sparkles-corner',
64
79
  label: {
65
80
  id: 'canvas.node_mode_select.simulated_label',
66
81
  message: 'Simulated'
@@ -110,8 +125,10 @@ function NodeOutputModeSelect({ value, onChange, options, disabled = false, clas
110
125
  }),
111
126
  className: (0, apollo_wind_namespaceObject.cn)('min-w-12 gap-1.5 rounded-full border border-border px-2 text-[11px] font-medium text-foreground-muted hover:bg-surface-overlay hover:text-foreground [&_svg]:size-2.5', className),
112
127
  children: [
113
- CurrentIcon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CurrentIcon, {
114
- className: "text-foreground-subtle"
128
+ CurrentIcon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ModeIcon, {
129
+ icon: CurrentIcon,
130
+ className: "text-foreground-subtle",
131
+ size: 10
115
132
  }),
116
133
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
117
134
  className: "min-w-0 flex-1 truncate shrink-0",
@@ -134,7 +151,8 @@ function NodeOutputModeSelect({ value, onChange, options, disabled = false, clas
134
151
  value: option.value,
135
152
  className: (0, apollo_wind_namespaceObject.cn)('group flex items-center gap-2 [&>span:first-child]:text-foreground-accent', selectedValue === option.value && 'text-foreground'),
136
153
  children: [
137
- Icon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
154
+ Icon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ModeIcon, {
155
+ icon: Icon,
138
156
  size: 13,
139
157
  className: "shrink-0 text-foreground-subtle"
140
158
  }),
@@ -1,9 +1,10 @@
1
1
  import type { LucideIcon } from 'lucide-react';
2
+ export type NodeOutputModeIcon = LucideIcon | string;
2
3
  export interface NodeOutputModeOption {
3
4
  value: string;
4
5
  label: string;
5
6
  description?: string;
6
- icon?: LucideIcon;
7
+ icon?: NodeOutputModeIcon;
7
8
  }
8
9
  export declare const DEFAULT_NODE_OUTPUT_MODES: NodeOutputModeOption[];
9
10
  export declare function useDefaultNodeOutputModes(): NodeOutputModeOption[];
@@ -1 +1 @@
1
- {"version":3,"file":"NodeOutputModeSelect.d.ts","sourceRoot":"","sources":["../../../../src/canvas/controls/NodeOutputModeSelect/NodeOutputModeSelect.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK/C,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAwCD,eAAO,MAAM,yBAAyB,EAAE,oBAAoB,EAKzD,CAAC;AAGJ,wBAAgB,yBAAyB,IAAI,oBAAoB,EAAE,CAYlE;AAED,MAAM,WAAW,yBAAyB;IAExC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAgB,EAChB,SAAS,GACV,EAAE,yBAAyB,2CAgE3B"}
1
+ {"version":3,"file":"NodeOutputModeSelect.d.ts","sourceRoot":"","sources":["../../../../src/canvas/controls/NodeOutputModeSelect/NodeOutputModeSelect.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAgB/C,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,MAAM,CAAC;AAErD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAqED,eAAO,MAAM,yBAAyB,EAAE,oBAAoB,EAKzD,CAAC;AAGJ,wBAAgB,yBAAyB,IAAI,oBAAoB,EAAE,CAYlE;AAED,MAAM,WAAW,yBAAyB;IAExC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAgB,EAChB,SAAS,GACV,EAAE,yBAAyB,2CAoE3B"}
@@ -1,8 +1,23 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger, cn } from "@uipath/apollo-wind";
3
- import { ChevronDown, CircleDot, FileBracesCorner, Sparkles } from "lucide-react";
3
+ import { ChevronDown, CircleDot, FileBracesCorner } from "lucide-react";
4
4
  import { useMemo } from "react";
5
5
  import { useSafeLingui } from "../../../i18n/index.js";
6
+ import { CanvasIcon } from "../../utils/icon-registry.js";
7
+ function ModeIcon({ icon, size, className }) {
8
+ if ('string' == typeof icon) return /*#__PURE__*/ jsx("span", {
9
+ className: cn('inline-flex', className),
10
+ children: /*#__PURE__*/ jsx(CanvasIcon, {
11
+ icon: icon,
12
+ size: size
13
+ })
14
+ });
15
+ const Icon = icon;
16
+ return /*#__PURE__*/ jsx(Icon, {
17
+ size: size,
18
+ className: className
19
+ });
20
+ }
6
21
  const MODE_DEFS = [
7
22
  {
8
23
  value: 'live',
@@ -30,7 +45,7 @@ const MODE_DEFS = [
30
45
  },
31
46
  {
32
47
  value: 'simulated',
33
- icon: Sparkles,
48
+ icon: 'file-sparkles-corner',
34
49
  label: {
35
50
  id: 'canvas.node_mode_select.simulated_label',
36
51
  message: 'Simulated'
@@ -80,8 +95,10 @@ function NodeOutputModeSelect({ value, onChange, options, disabled = false, clas
80
95
  }),
81
96
  className: cn('min-w-12 gap-1.5 rounded-full border border-border px-2 text-[11px] font-medium text-foreground-muted hover:bg-surface-overlay hover:text-foreground [&_svg]:size-2.5', className),
82
97
  children: [
83
- CurrentIcon && /*#__PURE__*/ jsx(CurrentIcon, {
84
- className: "text-foreground-subtle"
98
+ CurrentIcon && /*#__PURE__*/ jsx(ModeIcon, {
99
+ icon: CurrentIcon,
100
+ className: "text-foreground-subtle",
101
+ size: 10
85
102
  }),
86
103
  /*#__PURE__*/ jsx("span", {
87
104
  className: "min-w-0 flex-1 truncate shrink-0",
@@ -104,7 +121,8 @@ function NodeOutputModeSelect({ value, onChange, options, disabled = false, clas
104
121
  value: option.value,
105
122
  className: cn('group flex items-center gap-2 [&>span:first-child]:text-foreground-accent', selectedValue === option.value && 'text-foreground'),
106
123
  children: [
107
- Icon && /*#__PURE__*/ jsx(Icon, {
124
+ Icon && /*#__PURE__*/ jsx(ModeIcon, {
125
+ icon: Icon,
108
126
  size: 13,
109
127
  className: "shrink-0 text-foreground-subtle"
110
128
  }),
@@ -1,2 +1,2 @@
1
- export { DEFAULT_NODE_OUTPUT_MODES, type NodeOutputModeOption, NodeOutputModeSelect, type NodeOutputModeSelectProps, useDefaultNodeOutputModes, } from './NodeOutputModeSelect';
1
+ export { DEFAULT_NODE_OUTPUT_MODES, type NodeOutputModeIcon, type NodeOutputModeOption, NodeOutputModeSelect, type NodeOutputModeSelectProps, useDefaultNodeOutputModes, } from './NodeOutputModeSelect';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/controls/NodeOutputModeSelect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,KAAK,oBAAoB,EACzB,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/controls/NodeOutputModeSelect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { Breadcrumb } from './Breadcrumb';
2
- export { DEFAULT_NODE_OUTPUT_MODES, type NodeOutputModeOption, NodeOutputModeSelect, type NodeOutputModeSelectProps, useDefaultNodeOutputModes, } from './NodeOutputModeSelect';
2
+ export { DEFAULT_NODE_OUTPUT_MODES, type NodeOutputModeIcon, type NodeOutputModeOption, NodeOutputModeSelect, type NodeOutputModeSelectProps, useDefaultNodeOutputModes, } from './NodeOutputModeSelect';
3
3
  export { NodePropertyTrigger, NodePropertyTriggerCheckboxItem, NodePropertyTriggerRadioItem, NodePropertyTriggerSectionLabel, NodePropertyTriggerSeparator, } from './NodePropertyTrigger';
4
4
  export type { NodePropertyTriggerProps, NodePropertyTriggerItem, NodePropertyTriggerBehavior, NodePropertyTriggerBehaviorOption, NodePropertyTriggerCheckboxItemProps, NodePropertyTriggerLayout, NodePropertyTriggerLayoutOption, NodePropertyTriggerPreset, } from './NodePropertyTrigger';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/canvas/controls/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,yBAAyB,EACzB,KAAK,oBAAoB,EACzB,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,4BAA4B,EAC5B,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACvB,2BAA2B,EAC3B,iCAAiC,EACjC,oCAAoC,EACpC,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/canvas/controls/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,yBAAyB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,4BAA4B,EAC5B,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACvB,2BAA2B,EAC3B,iCAAiC,EACjC,oCAAoC,EACpC,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "6.30.1",
3
+ "version": "6.30.3",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",