@uipath/apollo-wind 2.86.1 → 2.87.0

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.
@@ -39,24 +39,16 @@ const DEFAULT_MODES = [
39
39
  'literal',
40
40
  'expression'
41
41
  ];
42
- function ValueModeMenuItem({ icon: Icon, label, description, active, disabled, onClick }) {
43
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
44
- role: "menuitemradio",
45
- "aria-checked": active,
46
- className: "flex-col items-start gap-0.5 py-2",
47
- "data-active": active || void 0,
48
- disabled: disabled,
49
- onClick: onClick,
42
+ const DESCRIBED_ITEM_CLASS = 'flex-col items-start gap-0.5 py-2';
43
+ function DescribedItemContent({ icon, label, labelClassName, description }) {
44
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
50
45
  children: [
51
46
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
52
47
  className: "flex items-center gap-2",
53
48
  children: [
54
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
55
- size: 13,
56
- className: active ? 'text-brand' : 'text-foreground-muted'
57
- }),
49
+ icon,
58
50
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
59
- className: (0, index_cjs_namespaceObject.cn)('text-xs font-medium', active ? 'text-brand' : 'text-foreground'),
51
+ className: (0, index_cjs_namespaceObject.cn)('text-xs font-medium', labelClassName),
60
52
  children: label
61
53
  })
62
54
  ]
@@ -68,6 +60,25 @@ function ValueModeMenuItem({ icon: Icon, label, description, active, disabled, o
68
60
  ]
69
61
  });
70
62
  }
63
+ function ValueModeMenuItem({ icon: Icon, label, description, active, disabled, onClick }) {
64
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
65
+ role: "menuitemradio",
66
+ "aria-checked": active,
67
+ className: DESCRIBED_ITEM_CLASS,
68
+ "data-active": active || void 0,
69
+ disabled: disabled,
70
+ onClick: onClick,
71
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DescribedItemContent, {
72
+ icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
73
+ size: 13,
74
+ className: active ? 'text-brand' : 'text-foreground-muted'
75
+ }),
76
+ label: label,
77
+ labelClassName: active ? 'text-brand' : 'text-foreground',
78
+ description: description
79
+ })
80
+ });
81
+ }
71
82
  function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesDisabled, disabled, expectedType, literalDescription, triggerLabel: triggerLabelOverride, strings, onCloseAutoFocus }) {
72
83
  const text = {
73
84
  ...external_value_mode_strings_cjs_namespaceObject.DEFAULT_VALUE_MODE_STRINGS,
@@ -115,18 +126,25 @@ function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesD
115
126
  !modesDisabled && !!actions?.length && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuSeparator, {}),
116
127
  actions?.map((action)=>{
117
128
  const ActionIcon = action.icon;
118
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
129
+ const icon = ActionIcon ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ActionIcon, {}) : action.iconDataUri && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
130
+ src: action.iconDataUri,
131
+ alt: "",
132
+ className: "size-4 shrink-0"
133
+ });
134
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
119
135
  disabled: action.disabled,
120
136
  onClick: action.onSelect,
121
- className: (0, index_cjs_namespaceObject.cn)(action.destructive && 'text-error focus:text-error'),
122
- children: [
123
- ActionIcon ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ActionIcon, {}) : action.iconDataUri && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
124
- src: action.iconDataUri,
125
- alt: "",
126
- className: "size-4 shrink-0"
127
- }),
128
- action.label
129
- ]
137
+ className: (0, index_cjs_namespaceObject.cn)(action.description && DESCRIBED_ITEM_CLASS, action.destructive && 'text-error focus:text-error'),
138
+ children: action.description ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DescribedItemContent, {
139
+ icon: icon,
140
+ label: action.label,
141
+ description: action.description
142
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
143
+ children: [
144
+ icon,
145
+ action.label
146
+ ]
147
+ })
130
148
  }, action.id);
131
149
  })
132
150
  ]
@@ -8,6 +8,8 @@ export interface FieldMenuItem {
8
8
  icon?: LucideIcon;
9
9
  /** Icon as a data URI, used when `icon` is absent. */
10
10
  iconDataUri?: string;
11
+ /** A line under the label. With it the row takes a mode row's two-line layout. */
12
+ description?: string;
11
13
  disabled?: boolean;
12
14
  /** Styles the row as one that removes or discards something. */
13
15
  destructive?: boolean;
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { MoreHorizontal, Type } from "lucide-react";
3
3
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../dropdown-menu.js";
4
4
  import { InputGroupButton } from "../input-group.js";
@@ -10,24 +10,16 @@ const DEFAULT_MODES = [
10
10
  'literal',
11
11
  'expression'
12
12
  ];
13
- function ValueModeMenuItem({ icon: Icon, label, description, active, disabled, onClick }) {
14
- return /*#__PURE__*/ jsxs(DropdownMenuItem, {
15
- role: "menuitemradio",
16
- "aria-checked": active,
17
- className: "flex-col items-start gap-0.5 py-2",
18
- "data-active": active || void 0,
19
- disabled: disabled,
20
- onClick: onClick,
13
+ const DESCRIBED_ITEM_CLASS = 'flex-col items-start gap-0.5 py-2';
14
+ function DescribedItemContent({ icon, label, labelClassName, description }) {
15
+ return /*#__PURE__*/ jsxs(Fragment, {
21
16
  children: [
22
17
  /*#__PURE__*/ jsxs("div", {
23
18
  className: "flex items-center gap-2",
24
19
  children: [
25
- /*#__PURE__*/ jsx(Icon, {
26
- size: 13,
27
- className: active ? 'text-brand' : 'text-foreground-muted'
28
- }),
20
+ icon,
29
21
  /*#__PURE__*/ jsx("span", {
30
- className: cn('text-xs font-medium', active ? 'text-brand' : 'text-foreground'),
22
+ className: cn('text-xs font-medium', labelClassName),
31
23
  children: label
32
24
  })
33
25
  ]
@@ -39,6 +31,25 @@ function ValueModeMenuItem({ icon: Icon, label, description, active, disabled, o
39
31
  ]
40
32
  });
41
33
  }
34
+ function ValueModeMenuItem({ icon: Icon, label, description, active, disabled, onClick }) {
35
+ return /*#__PURE__*/ jsx(DropdownMenuItem, {
36
+ role: "menuitemradio",
37
+ "aria-checked": active,
38
+ className: DESCRIBED_ITEM_CLASS,
39
+ "data-active": active || void 0,
40
+ disabled: disabled,
41
+ onClick: onClick,
42
+ children: /*#__PURE__*/ jsx(DescribedItemContent, {
43
+ icon: /*#__PURE__*/ jsx(Icon, {
44
+ size: 13,
45
+ className: active ? 'text-brand' : 'text-foreground-muted'
46
+ }),
47
+ label: label,
48
+ labelClassName: active ? 'text-brand' : 'text-foreground',
49
+ description: description
50
+ })
51
+ });
52
+ }
42
53
  function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesDisabled, disabled, expectedType, literalDescription, triggerLabel: triggerLabelOverride, strings, onCloseAutoFocus }) {
43
54
  const text = {
44
55
  ...DEFAULT_VALUE_MODE_STRINGS,
@@ -86,18 +97,25 @@ function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesD
86
97
  !modesDisabled && !!actions?.length && /*#__PURE__*/ jsx(DropdownMenuSeparator, {}),
87
98
  actions?.map((action)=>{
88
99
  const ActionIcon = action.icon;
89
- return /*#__PURE__*/ jsxs(DropdownMenuItem, {
100
+ const icon = ActionIcon ? /*#__PURE__*/ jsx(ActionIcon, {}) : action.iconDataUri && /*#__PURE__*/ jsx("img", {
101
+ src: action.iconDataUri,
102
+ alt: "",
103
+ className: "size-4 shrink-0"
104
+ });
105
+ return /*#__PURE__*/ jsx(DropdownMenuItem, {
90
106
  disabled: action.disabled,
91
107
  onClick: action.onSelect,
92
- className: cn(action.destructive && 'text-error focus:text-error'),
93
- children: [
94
- ActionIcon ? /*#__PURE__*/ jsx(ActionIcon, {}) : action.iconDataUri && /*#__PURE__*/ jsx("img", {
95
- src: action.iconDataUri,
96
- alt: "",
97
- className: "size-4 shrink-0"
98
- }),
99
- action.label
100
- ]
108
+ className: cn(action.description && DESCRIBED_ITEM_CLASS, action.destructive && 'text-error focus:text-error'),
109
+ children: action.description ? /*#__PURE__*/ jsx(DescribedItemContent, {
110
+ icon: icon,
111
+ label: action.label,
112
+ description: action.description
113
+ }) : /*#__PURE__*/ jsxs(Fragment, {
114
+ children: [
115
+ icon,
116
+ action.label
117
+ ]
118
+ })
101
119
  }, action.id);
102
120
  })
103
121
  ]
@@ -33,13 +33,13 @@ var __webpack_modules__ = {
33
33
  "./button-group" (module) {
34
34
  module.exports = require("./button-group.cjs");
35
35
  },
36
- "./button" (module) {
36
+ "@/components/ui/button" (module) {
37
37
  module.exports = require("./button.cjs");
38
38
  },
39
39
  "@/components/ui/calendar" (module) {
40
40
  module.exports = require("./calendar.cjs");
41
41
  },
42
- "./card" (module) {
42
+ "@/components/ui/card" (module) {
43
43
  module.exports = require("./card.cjs");
44
44
  },
45
45
  "./chart" (module) {
@@ -60,7 +60,7 @@ var __webpack_modules__ = {
60
60
  "@/components/ui/code-block" (module) {
61
61
  module.exports = require("./code-block.cjs");
62
62
  },
63
- "@/components/ui/collapsible" (module) {
63
+ "./collapsible" (module) {
64
64
  module.exports = require("./collapsible.cjs");
65
65
  },
66
66
  "./combobox" (module) {
@@ -90,13 +90,13 @@ var __webpack_modules__ = {
90
90
  "./drawer" (module) {
91
91
  module.exports = require("./drawer.cjs");
92
92
  },
93
- "./dropdown-menu" (module) {
93
+ "@/components/ui/dropdown-menu" (module) {
94
94
  module.exports = require("./dropdown-menu.cjs");
95
95
  },
96
96
  "./dropzone-overlay" (module) {
97
97
  module.exports = require("./dropzone-overlay.cjs");
98
98
  },
99
- "./editable-cell" (module) {
99
+ "@/components/ui/editable-cell" (module) {
100
100
  module.exports = require("./editable-cell.cjs");
101
101
  },
102
102
  "./editable-text" (module) {
@@ -255,7 +255,7 @@ var __webpack_modules__ = {
255
255
  "./switch" (module) {
256
256
  module.exports = require("./switch.cjs");
257
257
  },
258
- "./table" (module) {
258
+ "@/components/ui/table" (module) {
259
259
  module.exports = require("./table.cjs");
260
260
  },
261
261
  "./tabs" (module) {
@@ -270,13 +270,13 @@ var __webpack_modules__ = {
270
270
  "./toggle-group" (module) {
271
271
  module.exports = require("./toggle-group.cjs");
272
272
  },
273
- "./toggle" (module) {
273
+ "@/components/ui/toggle" (module) {
274
274
  module.exports = require("./toggle.cjs");
275
275
  },
276
276
  "./tool-call" (module) {
277
277
  module.exports = require("./tool-call.cjs");
278
278
  },
279
- "./tooltip" (module) {
279
+ "@/components/ui/tooltip" (module) {
280
280
  module.exports = require("./tooltip.cjs");
281
281
  },
282
282
  "./tree-view" (module) {
@@ -438,7 +438,7 @@ var __webpack_exports__ = {};
438
438
  "ReferenceChip"
439
439
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_bubble__rspack_import_9[__rspack_import_key];
440
440
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
441
- var _button__rspack_import_10 = __webpack_require__("./button");
441
+ var _button__rspack_import_10 = __webpack_require__("@/components/ui/button");
442
442
  var __rspack_reexport = {};
443
443
  for(const __rspack_import_key in _button__rspack_import_10)if ([
444
444
  "getReferenceChipColors",
@@ -468,7 +468,7 @@ var __webpack_exports__ = {};
468
468
  "ReferenceChip"
469
469
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_calendar__rspack_import_12[__rspack_import_key];
470
470
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
471
- var _card__rspack_import_13 = __webpack_require__("./card");
471
+ var _card__rspack_import_13 = __webpack_require__("@/components/ui/card");
472
472
  var __rspack_reexport = {};
473
473
  for(const __rspack_import_key in _card__rspack_import_13)if ([
474
474
  "getReferenceChipColors",
@@ -538,7 +538,7 @@ var __webpack_exports__ = {};
538
538
  "ReferenceChip"
539
539
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_code_block__rspack_import_19[__rspack_import_key];
540
540
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
541
- var _collapsible__rspack_import_20 = __webpack_require__("@/components/ui/collapsible");
541
+ var _collapsible__rspack_import_20 = __webpack_require__("./collapsible");
542
542
  var __rspack_reexport = {};
543
543
  for(const __rspack_import_key in _collapsible__rspack_import_20)if ([
544
544
  "getReferenceChipColors",
@@ -638,7 +638,7 @@ var __webpack_exports__ = {};
638
638
  "ReferenceChip"
639
639
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_drawer__rspack_import_29[__rspack_import_key];
640
640
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
641
- var _dropdown_menu__rspack_import_30 = __webpack_require__("./dropdown-menu");
641
+ var _dropdown_menu__rspack_import_30 = __webpack_require__("@/components/ui/dropdown-menu");
642
642
  var __rspack_reexport = {};
643
643
  for(const __rspack_import_key in _dropdown_menu__rspack_import_30)if ([
644
644
  "getReferenceChipColors",
@@ -658,7 +658,7 @@ var __webpack_exports__ = {};
658
658
  "ReferenceChip"
659
659
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_dropzone_overlay__rspack_import_31[__rspack_import_key];
660
660
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
661
- var _editable_cell__rspack_import_32 = __webpack_require__("./editable-cell");
661
+ var _editable_cell__rspack_import_32 = __webpack_require__("@/components/ui/editable-cell");
662
662
  var __rspack_reexport = {};
663
663
  for(const __rspack_import_key in _editable_cell__rspack_import_32)if ([
664
664
  "getReferenceChipColors",
@@ -1170,7 +1170,7 @@ var __webpack_exports__ = {};
1170
1170
  "ReferenceChip"
1171
1171
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_switch__rspack_import_84[__rspack_import_key];
1172
1172
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
1173
- var _table__rspack_import_85 = __webpack_require__("./table");
1173
+ var _table__rspack_import_85 = __webpack_require__("@/components/ui/table");
1174
1174
  var __rspack_reexport = {};
1175
1175
  for(const __rspack_import_key in _table__rspack_import_85)if ([
1176
1176
  "getReferenceChipColors",
@@ -1210,7 +1210,7 @@ var __webpack_exports__ = {};
1210
1210
  "ReferenceChip"
1211
1211
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_thinking_indicator__rspack_import_88[__rspack_import_key];
1212
1212
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
1213
- var _toggle__rspack_import_89 = __webpack_require__("./toggle");
1213
+ var _toggle__rspack_import_89 = __webpack_require__("@/components/ui/toggle");
1214
1214
  var __rspack_reexport = {};
1215
1215
  for(const __rspack_import_key in _toggle__rspack_import_89)if ([
1216
1216
  "getReferenceChipColors",
@@ -1240,7 +1240,7 @@ var __webpack_exports__ = {};
1240
1240
  "ReferenceChip"
1241
1241
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_tool_call__rspack_import_91[__rspack_import_key];
1242
1242
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
1243
- var _tooltip__rspack_import_92 = __webpack_require__("./tooltip");
1243
+ var _tooltip__rspack_import_92 = __webpack_require__("@/components/ui/tooltip");
1244
1244
  var __rspack_reexport = {};
1245
1245
  for(const __rspack_import_key in _tooltip__rspack_import_92)if ([
1246
1246
  "getReferenceChipColors",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-wind",
3
- "version": "2.86.1",
3
+ "version": "2.87.0",
4
4
  "description": "UiPath wind design system - A Tailwind CSS based React component library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",