@uipath/apollo-wind 2.55.0 → 2.57.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.
Files changed (111) hide show
  1. package/dist/components/ui/combobox.cjs +33 -15
  2. package/dist/components/ui/combobox.js +33 -15
  3. package/dist/components/ui/date-picker.cjs +62 -26
  4. package/dist/components/ui/date-picker.js +62 -26
  5. package/dist/components/ui/datetime-picker.cjs +29 -12
  6. package/dist/components/ui/datetime-picker.js +29 -12
  7. package/dist/components/ui/dropdown-menu.cjs +12 -8
  8. package/dist/components/ui/dropdown-menu.js +12 -8
  9. package/dist/components/ui/field-actions/ai-assist-action.cjs +121 -0
  10. package/dist/components/ui/field-actions/ai-assist-action.d.ts +21 -0
  11. package/dist/components/ui/field-actions/ai-assist-action.js +84 -0
  12. package/dist/components/ui/field-actions/collapse.cjs +44 -0
  13. package/dist/components/ui/field-actions/collapse.d.ts +6 -0
  14. package/dist/components/ui/field-actions/collapse.js +4 -0
  15. package/dist/components/ui/field-actions/index.cjs +46 -0
  16. package/dist/components/ui/field-actions/index.d.ts +2 -0
  17. package/dist/components/ui/field-actions/index.js +3 -0
  18. package/dist/components/ui/field-actions/insert-variable-action.cjs +94 -0
  19. package/dist/components/ui/field-actions/insert-variable-action.d.ts +22 -0
  20. package/dist/components/ui/field-actions/insert-variable-action.js +57 -0
  21. package/dist/components/ui/field-addons/index.cjs +50 -0
  22. package/dist/components/ui/field-addons/index.d.ts +3 -0
  23. package/dist/components/ui/field-addons/index.js +4 -0
  24. package/dist/components/ui/field-addons/value-mode-indicator.cjs +57 -0
  25. package/dist/components/ui/field-addons/value-mode-indicator.d.ts +13 -0
  26. package/dist/components/ui/field-addons/value-mode-indicator.js +23 -0
  27. package/dist/components/ui/field-addons/value-mode-menu.cjs +149 -0
  28. package/dist/components/ui/field-addons/value-mode-menu.d.ts +69 -0
  29. package/dist/components/ui/field-addons/value-mode-menu.js +112 -0
  30. package/dist/components/ui/field-addons/value-mode-strings.cjs +69 -0
  31. package/dist/components/ui/field-addons/value-mode-strings.d.ts +32 -0
  32. package/dist/components/ui/field-addons/value-mode-strings.js +29 -0
  33. package/dist/components/ui/form-field.cjs +42 -5
  34. package/dist/components/ui/form-field.d.ts +21 -1
  35. package/dist/components/ui/form-field.js +36 -2
  36. package/dist/components/ui/index.cjs +156 -126
  37. package/dist/components/ui/index.d.ts +3 -0
  38. package/dist/components/ui/index.js +3 -0
  39. package/dist/components/ui/input-group-context.cjs +91 -0
  40. package/dist/components/ui/input-group-context.d.ts +69 -0
  41. package/dist/components/ui/input-group-context.js +42 -0
  42. package/dist/components/ui/input-group.cjs +303 -56
  43. package/dist/components/ui/input-group.d.ts +70 -3
  44. package/dist/components/ui/input-group.js +285 -56
  45. package/dist/components/ui/input.cjs +28 -17
  46. package/dist/components/ui/input.js +28 -17
  47. package/dist/components/ui/lockable-value-field/components/field-header.cjs +16 -114
  48. package/dist/components/ui/lockable-value-field/components/field-header.js +14 -112
  49. package/dist/components/ui/lockable-value-field/lockable-value-field.cjs +4 -12
  50. package/dist/components/ui/lockable-value-field/lockable-value-field.js +4 -12
  51. package/dist/components/ui/model-picker/ModelPicker.cjs +495 -0
  52. package/dist/components/ui/model-picker/ModelPicker.d.ts +304 -0
  53. package/dist/components/ui/model-picker/ModelPicker.js +451 -0
  54. package/dist/components/ui/model-picker/ModelTagChip.cjs +101 -0
  55. package/dist/components/ui/model-picker/ModelTagChip.d.ts +29 -0
  56. package/dist/components/ui/model-picker/ModelTagChip.js +67 -0
  57. package/dist/components/ui/model-picker/badges.cjs +52 -0
  58. package/dist/components/ui/model-picker/badges.d.ts +41 -0
  59. package/dist/components/ui/model-picker/badges.js +18 -0
  60. package/dist/components/ui/model-picker/index.cjs +117 -0
  61. package/dist/components/ui/model-picker/index.d.ts +27 -0
  62. package/dist/components/ui/model-picker/index.js +14 -0
  63. package/dist/components/ui/model-picker/labels.cjs +107 -0
  64. package/dist/components/ui/model-picker/labels.d.ts +81 -0
  65. package/dist/components/ui/model-picker/labels.js +67 -0
  66. package/dist/components/ui/model-picker/primitives/FolderSwitcher.cjs +108 -0
  67. package/dist/components/ui/model-picker/primitives/FolderSwitcher.d.ts +38 -0
  68. package/dist/components/ui/model-picker/primitives/FolderSwitcher.js +74 -0
  69. package/dist/components/ui/model-picker/primitives/GroupHeader.cjs +84 -0
  70. package/dist/components/ui/model-picker/primitives/GroupHeader.d.ts +64 -0
  71. package/dist/components/ui/model-picker/primitives/GroupHeader.js +50 -0
  72. package/dist/components/ui/model-picker/primitives/ModelOptionRow.cjs +178 -0
  73. package/dist/components/ui/model-picker/primitives/ModelOptionRow.d.ts +95 -0
  74. package/dist/components/ui/model-picker/primitives/ModelOptionRow.js +135 -0
  75. package/dist/components/ui/model-picker/primitives/OptionList.cjs +295 -0
  76. package/dist/components/ui/model-picker/primitives/OptionList.d.ts +87 -0
  77. package/dist/components/ui/model-picker/primitives/OptionList.js +242 -0
  78. package/dist/components/ui/{lockable-value-field/components/mode-menu-item.cjs → model-picker/primitives/PickerPopup.cjs} +25 -24
  79. package/dist/components/ui/model-picker/primitives/PickerPopup.d.ts +39 -0
  80. package/dist/components/ui/model-picker/primitives/PickerPopup.js +30 -0
  81. package/dist/components/ui/model-picker/primitives/PickerSearchInput.cjs +77 -0
  82. package/dist/components/ui/model-picker/primitives/PickerSearchInput.d.ts +43 -0
  83. package/dist/components/ui/model-picker/primitives/PickerSearchInput.js +43 -0
  84. package/dist/components/ui/model-picker/primitives/PickerTrigger.cjs +112 -0
  85. package/dist/components/ui/model-picker/primitives/PickerTrigger.d.ts +73 -0
  86. package/dist/components/ui/model-picker/primitives/PickerTrigger.js +78 -0
  87. package/dist/components/ui/model-picker/types.cjs +18 -0
  88. package/dist/components/ui/model-picker/types.d.ts +154 -0
  89. package/dist/components/ui/model-picker/types.js +0 -0
  90. package/dist/components/ui/model-picker/useModelPickerState.cjs +250 -0
  91. package/dist/components/ui/model-picker/useModelPickerState.d.ts +135 -0
  92. package/dist/components/ui/model-picker/useModelPickerState.js +216 -0
  93. package/dist/components/ui/model-picker/utils.cjs +327 -0
  94. package/dist/components/ui/model-picker/utils.d.ts +121 -0
  95. package/dist/components/ui/model-picker/utils.js +272 -0
  96. package/dist/components/ui/multi-select.cjs +82 -58
  97. package/dist/components/ui/multi-select.js +84 -60
  98. package/dist/components/ui/popover.cjs +13 -9
  99. package/dist/components/ui/popover.js +13 -9
  100. package/dist/components/ui/select.cjs +89 -27
  101. package/dist/components/ui/select.d.ts +4 -0
  102. package/dist/components/ui/select.js +90 -28
  103. package/dist/components/ui/textarea.cjs +16 -11
  104. package/dist/components/ui/textarea.js +16 -11
  105. package/dist/index.cjs +144 -21
  106. package/dist/index.d.ts +10 -4
  107. package/dist/index.js +6 -3
  108. package/dist/styles.css +350 -5
  109. package/package.json +2 -1
  110. package/dist/components/ui/lockable-value-field/components/mode-menu-item.d.ts +0 -9
  111. package/dist/components/ui/lockable-value-field/components/mode-menu-item.js +0 -29
@@ -28,24 +28,21 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
30
  const external_lucide_react_namespaceObject = require("lucide-react");
31
- const external_react_namespaceObject = require("react");
32
- const external_button_cjs_namespaceObject = require("../../button.cjs");
33
31
  const external_dropdown_menu_cjs_namespaceObject = require("../../dropdown-menu.cjs");
34
32
  const external_label_cjs_namespaceObject = require("../../label.cjs");
35
33
  const external_popover_cjs_namespaceObject = require("../../popover.cjs");
36
34
  const external_switch_cjs_namespaceObject = require("../../switch.cjs");
37
- const external_textarea_cjs_namespaceObject = require("../../textarea.cjs");
38
35
  const external_tooltip_cjs_namespaceObject = require("../../tooltip.cjs");
39
- const index_cjs_namespaceObject = require("../../variable-picker/index.cjs");
40
- const external_lib_index_cjs_namespaceObject = require("../../../../lib/index.cjs");
36
+ const index_cjs_namespaceObject = require("../../../../lib/index.cjs");
37
+ const ai_assist_action_cjs_namespaceObject = require("../../field-actions/ai-assist-action.cjs");
38
+ const collapse_cjs_namespaceObject = require("../../field-actions/collapse.cjs");
39
+ const insert_variable_action_cjs_namespaceObject = require("../../field-actions/insert-variable-action.cjs");
41
40
  const external_types_cjs_namespaceObject = require("../types.cjs");
42
41
  function FieldHeader({ label, fieldId, fieldLabel, required, fieldType, onFieldTypeChange, onRequiredChange, compact, showFieldActions, showAiAssist, value, onValueChange, variables, onGenerateWithAi, headerActions }) {
43
- const promptId = (0, external_react_namespaceObject.useId)();
44
- const [aiPrompt, setAiPrompt] = (0, external_react_namespaceObject.useState)('');
45
42
  const typeMeta = external_types_cjs_namespaceObject.FIELD_TYPE_META[fieldType];
46
- const collapsedTextClass = (0, external_lib_index_cjs_namespaceObject.cn)('@max-[259px]:hidden', compact && '!hidden');
47
- const collapsedPaddingClass = (0, external_lib_index_cjs_namespaceObject.cn)('@max-[259px]:px-1.5', compact && '!px-1.5');
48
- const compactOnlyClass = (0, external_lib_index_cjs_namespaceObject.cn)('hidden @max-[259px]:block', compact && '!block');
43
+ const collapsedTextClass = (0, index_cjs_namespaceObject.cn)(collapse_cjs_namespaceObject.COLLAPSED_HIDDEN, compact && '!hidden');
44
+ const collapsedPaddingClass = (0, index_cjs_namespaceObject.cn)(collapse_cjs_namespaceObject.COLLAPSED_ICON_PADDING, compact && '!px-1.5');
45
+ const compactOnlyClass = (0, index_cjs_namespaceObject.cn)(collapse_cjs_namespaceObject.COLLAPSED_ONLY, compact && '!block');
49
46
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
50
47
  className: "flex items-center gap-1",
51
48
  children: [
@@ -76,7 +73,7 @@ function FieldHeader({ label, fieldId, fieldLabel, required, fieldType, onFieldT
76
73
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
77
74
  type: "button",
78
75
  "aria-label": "Field type",
79
- className: (0, external_lib_index_cjs_namespaceObject.cn)('flex h-7 items-center gap-1 rounded-lg px-2 text-[11px] text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground', collapsedPaddingClass),
76
+ className: (0, index_cjs_namespaceObject.cn)('flex h-7 items-center gap-1 rounded-lg px-2 text-[11px] text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground', collapsedPaddingClass),
80
77
  children: [
81
78
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(typeMeta.icon, {
82
79
  size: 12
@@ -111,7 +108,7 @@ function FieldHeader({ label, fieldId, fieldLabel, required, fieldType, onFieldT
111
108
  className: isActive ? 'text-brand' : 'text-foreground-muted'
112
109
  }),
113
110
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
114
- className: (0, external_lib_index_cjs_namespaceObject.cn)(isActive && 'font-medium text-brand'),
111
+ className: (0, index_cjs_namespaceObject.cn)(isActive && 'font-medium text-brand'),
115
112
  children: meta.label
116
113
  })
117
114
  ]
@@ -197,109 +194,14 @@ function FieldHeader({ label, fieldId, fieldLabel, required, fieldType, onFieldT
197
194
  }),
198
195
  showFieldActions && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
199
196
  children: [
200
- showAiAssist && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
201
- children: [
202
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip, {
203
- children: [
204
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger, {
205
- asChild: true,
206
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
207
- asChild: true,
208
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
209
- type: "button",
210
- "aria-label": "AI assist",
211
- className: "grid size-7 place-items-center rounded-lg text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground",
212
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Sparkles, {
213
- size: 12
214
- })
215
- })
216
- })
217
- }),
218
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent, {
219
- children: "Generate with AI"
220
- })
221
- ]
222
- }),
223
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.PopoverContent, {
224
- align: "end",
225
- className: "space-y-3",
226
- children: [
227
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
228
- className: "space-y-1.5",
229
- children: [
230
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_label_cjs_namespaceObject.Label, {
231
- htmlFor: promptId,
232
- className: "text-xs font-medium text-foreground-muted",
233
- children: "Describe what you want"
234
- }),
235
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_textarea_cjs_namespaceObject.Textarea, {
236
- id: promptId,
237
- rows: 3,
238
- value: aiPrompt,
239
- onChange: (e)=>setAiPrompt(e.target.value),
240
- placeholder: "Display a value from the previous step",
241
- className: "resize-none text-sm"
242
- })
243
- ]
244
- }),
245
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
246
- className: "block text-[11px] text-foreground-subtle",
247
- children: [
248
- "Output: ",
249
- typeMeta.label,
250
- typeMeta.supportsExpression ? ' expression' : ' value'
251
- ]
252
- }),
253
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
254
- size: "sm",
255
- className: "w-full",
256
- disabled: !onGenerateWithAi,
257
- onClick: ()=>onGenerateWithAi?.(aiPrompt),
258
- children: "Generate"
259
- })
260
- ]
261
- })
262
- ]
197
+ showAiAssist && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ai_assist_action_cjs_namespaceObject.AiAssistAction, {
198
+ onGenerate: onGenerateWithAi,
199
+ hint: `Output: ${typeMeta.label}${typeMeta.supportsExpression ? ' expression' : ' value'}`
263
200
  }),
264
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.VariablePicker, {
265
- disabled: 0 === variables.length || !onValueChange,
266
- items: [
267
- {
268
- id: 'vars',
269
- label: '$vars',
270
- type: 'object',
271
- children: variables.map((variable)=>({
272
- id: variable.value,
273
- label: variable.label,
274
- value: variable.value,
275
- type: 'string'
276
- }))
277
- }
278
- ],
279
- onSelect: (variable)=>{
280
- if (!variable.value) return;
281
- onValueChange?.(value ? `${value} ${variable.value}` : variable.value);
282
- },
283
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
284
- type: "button",
285
- "aria-label": "Insert variable",
286
- title: "Insert variable",
287
- disabled: 0 === variables.length || !onValueChange,
288
- className: (0, external_lib_index_cjs_namespaceObject.cn)('flex h-7 items-center gap-1 rounded-lg px-2 text-[11px] text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground disabled:pointer-events-none disabled:opacity-50', collapsedPaddingClass),
289
- children: [
290
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Braces, {
291
- size: 12
292
- }),
293
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
294
- className: collapsedTextClass,
295
- children: "Insert"
296
- }),
297
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
298
- size: 9,
299
- className: collapsedTextClass
300
- })
301
- ]
302
- })
201
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(insert_variable_action_cjs_namespaceObject.InsertVariableAction, {
202
+ variables: variables,
203
+ compact: compact,
204
+ onInsert: onValueChange && ((variable)=>onValueChange(value ? `${value} ${variable}` : variable))
303
205
  })
304
206
  ]
305
207
  })
@@ -1,23 +1,20 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { Asterisk, Braces, ChevronDown, Sparkles } from "lucide-react";
3
- import { useId, useState } from "react";
4
- import { Button } from "../../button.js";
2
+ import { Asterisk, ChevronDown } from "lucide-react";
5
3
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../dropdown-menu.js";
6
4
  import { Label, RequiredIndicator } from "../../label.js";
7
5
  import { Popover, PopoverContent, PopoverTrigger } from "../../popover.js";
8
6
  import { Switch } from "../../switch.js";
9
- import { Textarea } from "../../textarea.js";
10
7
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../tooltip.js";
11
- import { VariablePicker } from "../../variable-picker/index.js";
12
8
  import { cn } from "../../../../lib/index.js";
9
+ import { AiAssistAction } from "../../field-actions/ai-assist-action.js";
10
+ import { COLLAPSED_HIDDEN, COLLAPSED_ICON_PADDING, COLLAPSED_ONLY } from "../../field-actions/collapse.js";
11
+ import { InsertVariableAction } from "../../field-actions/insert-variable-action.js";
13
12
  import { FIELD_TYPE_META, FIELD_TYPE_ORDER } from "../types.js";
14
13
  function FieldHeader({ label, fieldId, fieldLabel, required, fieldType, onFieldTypeChange, onRequiredChange, compact, showFieldActions, showAiAssist, value, onValueChange, variables, onGenerateWithAi, headerActions }) {
15
- const promptId = useId();
16
- const [aiPrompt, setAiPrompt] = useState('');
17
14
  const typeMeta = FIELD_TYPE_META[fieldType];
18
- const collapsedTextClass = cn('@max-[259px]:hidden', compact && '!hidden');
19
- const collapsedPaddingClass = cn('@max-[259px]:px-1.5', compact && '!px-1.5');
20
- const compactOnlyClass = cn('hidden @max-[259px]:block', compact && '!block');
15
+ const collapsedTextClass = cn(COLLAPSED_HIDDEN, compact && '!hidden');
16
+ const collapsedPaddingClass = cn(COLLAPSED_ICON_PADDING, compact && '!px-1.5');
17
+ const compactOnlyClass = cn(COLLAPSED_ONLY, compact && '!block');
21
18
  return /*#__PURE__*/ jsxs("div", {
22
19
  className: "flex items-center gap-1",
23
20
  children: [
@@ -169,109 +166,14 @@ function FieldHeader({ label, fieldId, fieldLabel, required, fieldType, onFieldT
169
166
  }),
170
167
  showFieldActions && /*#__PURE__*/ jsxs(Fragment, {
171
168
  children: [
172
- showAiAssist && /*#__PURE__*/ jsxs(Popover, {
173
- children: [
174
- /*#__PURE__*/ jsxs(Tooltip, {
175
- children: [
176
- /*#__PURE__*/ jsx(TooltipTrigger, {
177
- asChild: true,
178
- children: /*#__PURE__*/ jsx(PopoverTrigger, {
179
- asChild: true,
180
- children: /*#__PURE__*/ jsx("button", {
181
- type: "button",
182
- "aria-label": "AI assist",
183
- className: "grid size-7 place-items-center rounded-lg text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground",
184
- children: /*#__PURE__*/ jsx(Sparkles, {
185
- size: 12
186
- })
187
- })
188
- })
189
- }),
190
- /*#__PURE__*/ jsx(TooltipContent, {
191
- children: "Generate with AI"
192
- })
193
- ]
194
- }),
195
- /*#__PURE__*/ jsxs(PopoverContent, {
196
- align: "end",
197
- className: "space-y-3",
198
- children: [
199
- /*#__PURE__*/ jsxs("div", {
200
- className: "space-y-1.5",
201
- children: [
202
- /*#__PURE__*/ jsx(Label, {
203
- htmlFor: promptId,
204
- className: "text-xs font-medium text-foreground-muted",
205
- children: "Describe what you want"
206
- }),
207
- /*#__PURE__*/ jsx(Textarea, {
208
- id: promptId,
209
- rows: 3,
210
- value: aiPrompt,
211
- onChange: (e)=>setAiPrompt(e.target.value),
212
- placeholder: "Display a value from the previous step",
213
- className: "resize-none text-sm"
214
- })
215
- ]
216
- }),
217
- /*#__PURE__*/ jsxs("span", {
218
- className: "block text-[11px] text-foreground-subtle",
219
- children: [
220
- "Output: ",
221
- typeMeta.label,
222
- typeMeta.supportsExpression ? ' expression' : ' value'
223
- ]
224
- }),
225
- /*#__PURE__*/ jsx(Button, {
226
- size: "sm",
227
- className: "w-full",
228
- disabled: !onGenerateWithAi,
229
- onClick: ()=>onGenerateWithAi?.(aiPrompt),
230
- children: "Generate"
231
- })
232
- ]
233
- })
234
- ]
169
+ showAiAssist && /*#__PURE__*/ jsx(AiAssistAction, {
170
+ onGenerate: onGenerateWithAi,
171
+ hint: `Output: ${typeMeta.label}${typeMeta.supportsExpression ? ' expression' : ' value'}`
235
172
  }),
236
- /*#__PURE__*/ jsx(VariablePicker, {
237
- disabled: 0 === variables.length || !onValueChange,
238
- items: [
239
- {
240
- id: 'vars',
241
- label: '$vars',
242
- type: 'object',
243
- children: variables.map((variable)=>({
244
- id: variable.value,
245
- label: variable.label,
246
- value: variable.value,
247
- type: 'string'
248
- }))
249
- }
250
- ],
251
- onSelect: (variable)=>{
252
- if (!variable.value) return;
253
- onValueChange?.(value ? `${value} ${variable.value}` : variable.value);
254
- },
255
- children: /*#__PURE__*/ jsxs("button", {
256
- type: "button",
257
- "aria-label": "Insert variable",
258
- title: "Insert variable",
259
- disabled: 0 === variables.length || !onValueChange,
260
- className: cn('flex h-7 items-center gap-1 rounded-lg px-2 text-[11px] text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground disabled:pointer-events-none disabled:opacity-50', collapsedPaddingClass),
261
- children: [
262
- /*#__PURE__*/ jsx(Braces, {
263
- size: 12
264
- }),
265
- /*#__PURE__*/ jsx("span", {
266
- className: collapsedTextClass,
267
- children: "Insert"
268
- }),
269
- /*#__PURE__*/ jsx(ChevronDown, {
270
- size: 9,
271
- className: collapsedTextClass
272
- })
273
- ]
274
- })
173
+ /*#__PURE__*/ jsx(InsertVariableAction, {
174
+ variables: variables,
175
+ compact: compact,
176
+ onInsert: onValueChange && ((variable)=>onValueChange(value ? `${value} ${variable}` : variable))
275
177
  })
276
178
  ]
277
179
  })
@@ -38,9 +38,9 @@ const external_popover_cjs_namespaceObject = require("../popover.cjs");
38
38
  const external_select_cjs_namespaceObject = require("../select.cjs");
39
39
  const external_switch_cjs_namespaceObject = require("../switch.cjs");
40
40
  const index_cjs_namespaceObject = require("../../../lib/index.cjs");
41
+ const value_mode_menu_cjs_namespaceObject = require("../field-addons/value-mode-menu.cjs");
41
42
  const field_header_cjs_namespaceObject = require("./components/field-header.cjs");
42
43
  const lock_toggle_button_cjs_namespaceObject = require("./components/lock-toggle-button.cjs");
43
- const mode_menu_item_cjs_namespaceObject = require("./components/mode-menu-item.cjs");
44
44
  const external_types_cjs_namespaceObject = require("./types.cjs");
45
45
  const external_utils_cjs_namespaceObject = require("./utils.cjs");
46
46
  function MoreActionsMenu({ more, locked }) {
@@ -241,14 +241,14 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
241
241
  align: "end",
242
242
  className: "w-56",
243
243
  children: [
244
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(mode_menu_item_cjs_namespaceObject.ModeMenuItem, {
244
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(value_mode_menu_cjs_namespaceObject.ValueModeMenuItem, {
245
245
  icon: external_lucide_react_namespaceObject.Type,
246
246
  label: typeMeta.fixedLabel,
247
247
  description: typeMeta.fixedDescription,
248
248
  active: 'fixed' === effectiveMode,
249
249
  onClick: ()=>onModeChange?.('fixed')
250
250
  }),
251
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(mode_menu_item_cjs_namespaceObject.ModeMenuItem, {
251
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(value_mode_menu_cjs_namespaceObject.ValueModeMenuItem, {
252
252
  icon: external_lucide_react_namespaceObject.Code2,
253
253
  label: "Expression",
254
254
  description: "Use a JS expression",
@@ -297,10 +297,6 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
297
297
  children: [
298
298
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_select_cjs_namespaceObject.SelectTrigger, {
299
299
  id: fieldId,
300
- className: "min-w-0 flex-1 rounded-none border-0 bg-transparent px-0 shadow-none future:rounded-none future:border-0 future:bg-transparent future:px-0",
301
- "aria-invalid": error ? true : void 0,
302
- "aria-describedby": error ? validationId : void 0,
303
- "aria-errormessage": error ? validationId : void 0,
304
300
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_select_cjs_namespaceObject.SelectValue, {
305
301
  placeholder: "Select an option"
306
302
  })
@@ -314,16 +310,12 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
314
310
  ]
315
311
  }) : 'multi-select' === fieldType ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_multi_select_cjs_namespaceObject.MultiSelect, {
316
312
  id: fieldId,
317
- className: "min-w-0 flex-1",
318
313
  options: options,
319
314
  selected: (0, external_utils_cjs_namespaceObject.parseListValue)(value),
320
315
  onChange: (selected)=>onValueChange?.(JSON.stringify(selected)),
321
316
  placeholder: "Select options...",
322
317
  disabled: !onValueChange,
323
- onBlur: onValueBlur,
324
- "aria-invalid": error ? true : void 0,
325
- "aria-describedby": error ? validationId : void 0,
326
- "aria-errormessage": error ? validationId : void 0
318
+ onBlur: onValueBlur
327
319
  }) : null,
328
320
  hasMoreActions && more && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupAddon, {
329
321
  align: "inline-end",
@@ -10,9 +10,9 @@ import { Popover, PopoverContent, PopoverTrigger } from "../popover.js";
10
10
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../select.js";
11
11
  import { Switch } from "../switch.js";
12
12
  import { cn } from "../../../lib/index.js";
13
+ import { ValueModeMenuItem } from "../field-addons/value-mode-menu.js";
13
14
  import { FieldHeader } from "./components/field-header.js";
14
15
  import { LockToggleButton } from "./components/lock-toggle-button.js";
15
- import { ModeMenuItem } from "./components/mode-menu-item.js";
16
16
  import { FIELD_TYPE_META } from "./types.js";
17
17
  import { DEFAULT_SELECT_OPTIONS, formatDateValue, getLockedDisplayValue, parseDateValue, parseListValue, toDateOnlyString } from "./utils.js";
18
18
  function MoreActionsMenu({ more, locked }) {
@@ -213,14 +213,14 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
213
213
  align: "end",
214
214
  className: "w-56",
215
215
  children: [
216
- /*#__PURE__*/ jsx(ModeMenuItem, {
216
+ /*#__PURE__*/ jsx(ValueModeMenuItem, {
217
217
  icon: Type,
218
218
  label: typeMeta.fixedLabel,
219
219
  description: typeMeta.fixedDescription,
220
220
  active: 'fixed' === effectiveMode,
221
221
  onClick: ()=>onModeChange?.('fixed')
222
222
  }),
223
- /*#__PURE__*/ jsx(ModeMenuItem, {
223
+ /*#__PURE__*/ jsx(ValueModeMenuItem, {
224
224
  icon: Code2,
225
225
  label: "Expression",
226
226
  description: "Use a JS expression",
@@ -269,10 +269,6 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
269
269
  children: [
270
270
  /*#__PURE__*/ jsx(SelectTrigger, {
271
271
  id: fieldId,
272
- className: "min-w-0 flex-1 rounded-none border-0 bg-transparent px-0 shadow-none future:rounded-none future:border-0 future:bg-transparent future:px-0",
273
- "aria-invalid": error ? true : void 0,
274
- "aria-describedby": error ? validationId : void 0,
275
- "aria-errormessage": error ? validationId : void 0,
276
272
  children: /*#__PURE__*/ jsx(SelectValue, {
277
273
  placeholder: "Select an option"
278
274
  })
@@ -286,16 +282,12 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
286
282
  ]
287
283
  }) : 'multi-select' === fieldType ? /*#__PURE__*/ jsx(MultiSelect, {
288
284
  id: fieldId,
289
- className: "min-w-0 flex-1",
290
285
  options: options,
291
286
  selected: parseListValue(value),
292
287
  onChange: (selected)=>onValueChange?.(JSON.stringify(selected)),
293
288
  placeholder: "Select options...",
294
289
  disabled: !onValueChange,
295
- onBlur: onValueBlur,
296
- "aria-invalid": error ? true : void 0,
297
- "aria-describedby": error ? validationId : void 0,
298
- "aria-errormessage": error ? validationId : void 0
290
+ onBlur: onValueBlur
299
291
  }) : null,
300
292
  hasMoreActions && more && /*#__PURE__*/ jsx(InputGroupAddon, {
301
293
  align: "inline-end",