@uipath/apollo-wind 2.75.1 → 2.76.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 (37) hide show
  1. package/dist/components/forms/field-actions.cjs +53 -12
  2. package/dist/components/forms/field-actions.d.ts +47 -10
  3. package/dist/components/forms/field-actions.js +50 -12
  4. package/dist/components/forms/index.cjs +4 -0
  5. package/dist/components/forms/index.d.ts +2 -1
  6. package/dist/components/forms/index.js +2 -1
  7. package/dist/components/forms/variable-mode-control.cjs +65 -0
  8. package/dist/components/forms/variable-mode-control.d.ts +20 -0
  9. package/dist/components/forms/variable-mode-control.js +31 -0
  10. package/dist/components/ui/field-actions/ai-assist-action.cjs +57 -47
  11. package/dist/components/ui/field-actions/ai-assist-action.d.ts +14 -2
  12. package/dist/components/ui/field-actions/ai-assist-action.js +59 -49
  13. package/dist/components/ui/field-actions/index.d.ts +1 -1
  14. package/dist/components/ui/field-actions/insert-variable-action.cjs +5 -3
  15. package/dist/components/ui/field-actions/insert-variable-action.d.ts +20 -10
  16. package/dist/components/ui/field-actions/insert-variable-action.js +5 -3
  17. package/dist/components/ui/file-upload.cjs +2 -2
  18. package/dist/components/ui/file-upload.js +2 -2
  19. package/dist/components/ui/form-field.cjs +3 -2
  20. package/dist/components/ui/form-field.d.ts +11 -3
  21. package/dist/components/ui/form-field.js +3 -2
  22. package/dist/components/ui/index.cjs +20 -20
  23. package/dist/components/ui/reference-chip.cjs +1 -1
  24. package/dist/components/ui/reference-chip.d.ts +1 -1
  25. package/dist/components/ui/reference-chip.js +1 -1
  26. package/dist/components/ui/variable-picker/index.d.ts +1 -1
  27. package/dist/components/ui/variable-picker/variable-picker.cjs +17 -3
  28. package/dist/components/ui/variable-picker/variable-picker.d.ts +24 -1
  29. package/dist/components/ui/variable-picker/variable-picker.js +14 -3
  30. package/dist/components/ui/variable-value-control.cjs +23 -7
  31. package/dist/components/ui/variable-value-control.d.ts +27 -5
  32. package/dist/components/ui/variable-value-control.js +23 -7
  33. package/dist/index.cjs +4 -0
  34. package/dist/index.d.ts +6 -4
  35. package/dist/index.js +2 -1
  36. package/dist/styles.css +9 -0
  37. package/package.json +1 -1
@@ -11,9 +11,16 @@ export interface AiAssistActionStrings {
11
11
  error: string;
12
12
  }
13
13
  export declare const DEFAULT_AI_ASSIST_ACTION_STRINGS: AiAssistActionStrings;
14
+ /** What a host-rendered AI-assist panel gets in place of the built-in prompt form. */
15
+ export interface AiAssistContentProps {
16
+ /** Closes the popover, returning focus to the trigger. */
17
+ close(): void;
18
+ disabled: boolean;
19
+ }
14
20
  export interface AiAssistActionProps {
15
21
  /**
16
- * Called with the entered prompt. Omitted, Generate is disabled. A returned promise keeps the
22
+ * Called with the entered prompt. Omitted, Generate is disabled; not called while
23
+ * `renderContent` is set. A returned promise keeps the
17
24
  * prompt open and busy until it settles: it closes once the promise resolves and stays open,
18
25
  * prompt intact and the error shown, if it rejects.
19
26
  */
@@ -21,10 +28,15 @@ export interface AiAssistActionProps {
21
28
  disabled?: boolean;
22
29
  /** A line under the prompt describing what will be generated, such as the value's type. */
23
30
  hint?: ReactNode;
31
+ /**
32
+ * The host's own panel, rendered in the popover in place of the built-in prompt form, whose
33
+ * `hint` and prompt strings it then does not use. Called only while the popover is open.
34
+ */
35
+ renderContent?: (props: AiAssistContentProps) => ReactNode;
24
36
  /** Overrides for any subset of the English strings. */
25
37
  strings?: Partial<AiAssistActionStrings>;
26
38
  }
27
39
  /**
28
40
  * The AI-assist header action: a prompt in a popover. Requires an ancestor `TooltipProvider`.
29
41
  */
30
- export declare function AiAssistAction({ onGenerate, hint, disabled, strings }: AiAssistActionProps): import("react/jsx-runtime").JSX.Element;
42
+ export declare function AiAssistAction({ onGenerate, hint, renderContent, disabled, strings, }: AiAssistActionProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Loader2, Sparkles } from "lucide-react";
3
- import { useId, useState } from "react";
3
+ import { useCallback, useId, useState } from "react";
4
4
  import { Button } from "../button.js";
5
5
  import { Label } from "../label.js";
6
6
  import { Popover, PopoverContent, PopoverTrigger } from "../popover.js";
@@ -15,7 +15,7 @@ const DEFAULT_AI_ASSIST_ACTION_STRINGS = {
15
15
  generating: 'Generating',
16
16
  error: 'Could not generate a value. Try again.'
17
17
  };
18
- function AiAssistAction({ onGenerate, hint, disabled, strings }) {
18
+ function AiAssistAction({ onGenerate, hint, renderContent, disabled, strings }) {
19
19
  const promptId = useId();
20
20
  const errorId = useId();
21
21
  const [prompt, setPrompt] = useState('');
@@ -30,6 +30,7 @@ function AiAssistAction({ onGenerate, hint, disabled, strings }) {
30
30
  setFailed(false);
31
31
  setOpen(next);
32
32
  };
33
+ const close = useCallback(()=>setOpen(false), []);
33
34
  const generate = async ()=>{
34
35
  setFailed(false);
35
36
  const result = onGenerate?.(prompt);
@@ -70,58 +71,67 @@ function AiAssistAction({ onGenerate, hint, disabled, strings }) {
70
71
  })
71
72
  ]
72
73
  }),
73
- /*#__PURE__*/ jsxs(PopoverContent, {
74
+ /*#__PURE__*/ jsx(PopoverContent, {
74
75
  align: "end",
75
76
  className: "space-y-3",
76
- children: [
77
- /*#__PURE__*/ jsxs("div", {
78
- className: "space-y-1.5",
79
- children: [
80
- /*#__PURE__*/ jsx(Label, {
81
- htmlFor: promptId,
82
- className: "text-xs font-medium text-foreground-muted",
83
- children: text.prompt
84
- }),
85
- /*#__PURE__*/ jsx(Textarea, {
86
- id: promptId,
87
- rows: 3,
88
- value: prompt,
89
- onChange: (e)=>setPrompt(e.target.value),
90
- placeholder: text.promptPlaceholder,
91
- "aria-describedby": failed ? errorId : void 0,
92
- className: "resize-none text-sm"
93
- })
94
- ]
95
- }),
96
- hint && /*#__PURE__*/ jsx("span", {
97
- className: "block text-[11px] text-foreground-subtle",
98
- children: hint
99
- }),
100
- failed && /*#__PURE__*/ jsx("p", {
101
- id: errorId,
102
- role: "alert",
103
- className: "text-xs text-error",
104
- children: text.error
105
- }),
106
- /*#__PURE__*/ jsxs(Button, {
107
- size: "sm",
108
- className: "w-full",
109
- disabled: !onGenerate || pending,
110
- "aria-busy": pending || void 0,
111
- onClick: ()=>generate(),
112
- children: [
113
- pending && /*#__PURE__*/ jsx(Loader2, {
114
- className: "animate-spin",
115
- "aria-hidden": "true"
116
- }),
117
- pending ? text.generating : text.generate
118
- ]
119
- })
120
- ]
77
+ children: renderContent ? /*#__PURE__*/ jsx(AiAssistSlot, {
78
+ render: renderContent,
79
+ close: close,
80
+ disabled: !!disabled
81
+ }) : /*#__PURE__*/ jsxs(Fragment, {
82
+ children: [
83
+ /*#__PURE__*/ jsxs("div", {
84
+ className: "space-y-1.5",
85
+ children: [
86
+ /*#__PURE__*/ jsx(Label, {
87
+ htmlFor: promptId,
88
+ className: "text-xs font-medium text-foreground-muted",
89
+ children: text.prompt
90
+ }),
91
+ /*#__PURE__*/ jsx(Textarea, {
92
+ id: promptId,
93
+ rows: 3,
94
+ value: prompt,
95
+ onChange: (e)=>setPrompt(e.target.value),
96
+ placeholder: text.promptPlaceholder,
97
+ "aria-describedby": failed ? errorId : void 0,
98
+ className: "resize-none text-sm"
99
+ })
100
+ ]
101
+ }),
102
+ hint && /*#__PURE__*/ jsx("span", {
103
+ className: "block text-[11px] text-foreground-subtle",
104
+ children: hint
105
+ }),
106
+ failed && /*#__PURE__*/ jsx("p", {
107
+ id: errorId,
108
+ role: "alert",
109
+ className: "text-xs text-error",
110
+ children: text.error
111
+ }),
112
+ /*#__PURE__*/ jsxs(Button, {
113
+ size: "sm",
114
+ className: "w-full",
115
+ disabled: !onGenerate || pending,
116
+ "aria-busy": pending || void 0,
117
+ onClick: ()=>generate(),
118
+ children: [
119
+ pending && /*#__PURE__*/ jsx(Loader2, {
120
+ className: "animate-spin",
121
+ "aria-hidden": "true"
122
+ }),
123
+ pending ? text.generating : text.generate
124
+ ]
125
+ })
126
+ ]
127
+ })
121
128
  })
122
129
  ]
123
130
  });
124
131
  }
132
+ function AiAssistSlot({ render, ...props }) {
133
+ return render(props);
134
+ }
125
135
  function isThenable(value) {
126
136
  return ('object' == typeof value || 'function' == typeof value) && null !== value && 'function' == typeof value.then;
127
137
  }
@@ -1,2 +1,2 @@
1
- export { AiAssistAction, type AiAssistActionProps, type AiAssistActionStrings, DEFAULT_AI_ASSIST_ACTION_STRINGS, } from './ai-assist-action';
1
+ export { AiAssistAction, type AiAssistActionProps, type AiAssistActionStrings, type AiAssistContentProps, DEFAULT_AI_ASSIST_ACTION_STRINGS, } from './ai-assist-action';
2
2
  export { DEFAULT_INSERT_VARIABLE_ACTION_STRINGS, InsertVariableAction, type InsertVariableActionProps, type InsertVariableActionStrings, } from './insert-variable-action';
@@ -33,6 +33,7 @@ const external_react_namespaceObject = require("react");
33
33
  const index_cjs_namespaceObject = require("../variable-picker/index.cjs");
34
34
  const external_lib_index_cjs_namespaceObject = require("../../../lib/index.cjs");
35
35
  const external_collapse_cjs_namespaceObject = require("./collapse.cjs");
36
+ const NO_VARIABLES = [];
36
37
  const DEFAULT_INSERT_VARIABLE_ACTION_STRINGS = {
37
38
  label: 'Insert',
38
39
  ariaLabel: 'Insert variable',
@@ -42,13 +43,13 @@ const DEFAULT_INSERT_VARIABLE_ACTION_STRINGS = {
42
43
  replaceDescription: 'The variable will replace the current value. This cannot be undone.',
43
44
  replaceConfirm: 'Replace'
44
45
  };
45
- function InsertVariableAction({ variables, onInsert, disabled, compact, strings }) {
46
+ function InsertVariableAction({ variables = NO_VARIABLES, renderPicker, onInsert, disabled, compact, strings }) {
46
47
  const text = {
47
48
  ...DEFAULT_INSERT_VARIABLE_ACTION_STRINGS,
48
49
  ...strings
49
50
  };
50
51
  const lazy = 'function' == typeof variables;
51
- const inert = disabled || !onInsert || !lazy && 0 === variables.length;
52
+ const inert = disabled || !onInsert || !renderPicker && !lazy && 0 === variables.length;
52
53
  const [openedItems, setOpenedItems] = (0, external_react_namespaceObject.useState)([]);
53
54
  const collapsedTextClass = (0, external_lib_index_cjs_namespaceObject.cn)(external_collapse_cjs_namespaceObject.COLLAPSED_HIDDEN, compact && '!hidden');
54
55
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.VariablePicker, {
@@ -56,8 +57,9 @@ function InsertVariableAction({ variables, onInsert, disabled, compact, strings
56
57
  items: lazy ? openedItems : variables,
57
58
  placeholder: text.searchPlaceholder,
58
59
  emptyText: text.empty,
60
+ renderPicker: renderPicker,
59
61
  onOpenChange: (open)=>{
60
- if (open && lazy) setOpenedItems(variables());
62
+ if (open && lazy && !renderPicker) setOpenedItems(variables());
61
63
  },
62
64
  onSelect: (variable)=>{
63
65
  if (variable.value) onInsert?.(variable.value, variable);
@@ -1,4 +1,4 @@
1
- import { type VariablePickerItem } from '../variable-picker';
1
+ import { type RenderVariablePicker, type VariablePickerItem } from '../variable-picker';
2
2
  export interface InsertVariableActionStrings {
3
3
  /** Visible text, hidden when the action collapses to its icon. */
4
4
  label: string;
@@ -14,16 +14,11 @@ export interface InsertVariableActionStrings {
14
14
  replaceConfirm: string;
15
15
  }
16
16
  export declare const DEFAULT_INSERT_VARIABLE_ACTION_STRINGS: InsertVariableActionStrings;
17
- export interface InsertVariableActionProps {
18
- /**
19
- * The variables to offer, rendered as supplied: the picker adds no root and no types. A function
20
- * is called each time the picker opens, never during render, so a host can hand over a live
21
- * source without re-rendering the field whenever it changes.
22
- */
23
- variables: VariablePickerItem[] | (() => VariablePickerItem[]);
17
+ interface InsertVariableActionBaseProps {
24
18
  /**
25
19
  * Called with the picked variable's value, and the picked entry itself so a host can recover
26
- * whatever it attached to it. Omitted, the action is disabled.
20
+ * whatever it attached to it. A host picker's pick gets an entry made from the value. Omitted,
21
+ * the action is disabled.
27
22
  */
28
23
  onInsert?: (value: string, item: VariablePickerItem) => void;
29
24
  disabled?: boolean;
@@ -32,5 +27,20 @@ export interface InsertVariableActionProps {
32
27
  /** Overrides for any subset of the English strings. */
33
28
  strings?: Partial<InsertVariableActionStrings>;
34
29
  }
30
+ export type InsertVariableActionProps = InsertVariableActionBaseProps & ({
31
+ /**
32
+ * The variables to offer, rendered as supplied: the picker adds no root and no types. A
33
+ * function is called each time the picker opens, never during render, so a host can hand
34
+ * over a live source without re-rendering the field whenever it changes.
35
+ */
36
+ variables: VariablePickerItem[] | (() => VariablePickerItem[]);
37
+ renderPicker?: undefined;
38
+ } | {
39
+ /** Ignored while `renderPicker` is set. */
40
+ variables?: VariablePickerItem[] | (() => VariablePickerItem[]);
41
+ /** The host's own picker, rendered in the popover in place of the built-in one. */
42
+ renderPicker: RenderVariablePicker;
43
+ });
35
44
  /** The Insert-variable header action: opens a variable picker and reports the pick. */
36
- export declare function InsertVariableAction({ variables, onInsert, disabled, compact, strings, }: InsertVariableActionProps): import("react/jsx-runtime").JSX.Element;
45
+ export declare function InsertVariableAction({ variables, renderPicker, onInsert, disabled, compact, strings, }: InsertVariableActionProps): import("react/jsx-runtime").JSX.Element;
46
+ export {};
@@ -4,6 +4,7 @@ import { useState } from "react";
4
4
  import { VariablePicker } from "../variable-picker/index.js";
5
5
  import { cn } from "../../../lib/index.js";
6
6
  import { COLLAPSED_HIDDEN, COLLAPSED_ICON_PADDING } from "./collapse.js";
7
+ const NO_VARIABLES = [];
7
8
  const DEFAULT_INSERT_VARIABLE_ACTION_STRINGS = {
8
9
  label: 'Insert',
9
10
  ariaLabel: 'Insert variable',
@@ -13,13 +14,13 @@ const DEFAULT_INSERT_VARIABLE_ACTION_STRINGS = {
13
14
  replaceDescription: 'The variable will replace the current value. This cannot be undone.',
14
15
  replaceConfirm: 'Replace'
15
16
  };
16
- function InsertVariableAction({ variables, onInsert, disabled, compact, strings }) {
17
+ function InsertVariableAction({ variables = NO_VARIABLES, renderPicker, onInsert, disabled, compact, strings }) {
17
18
  const text = {
18
19
  ...DEFAULT_INSERT_VARIABLE_ACTION_STRINGS,
19
20
  ...strings
20
21
  };
21
22
  const lazy = 'function' == typeof variables;
22
- const inert = disabled || !onInsert || !lazy && 0 === variables.length;
23
+ const inert = disabled || !onInsert || !renderPicker && !lazy && 0 === variables.length;
23
24
  const [openedItems, setOpenedItems] = useState([]);
24
25
  const collapsedTextClass = cn(COLLAPSED_HIDDEN, compact && '!hidden');
25
26
  return /*#__PURE__*/ jsx(VariablePicker, {
@@ -27,8 +28,9 @@ function InsertVariableAction({ variables, onInsert, disabled, compact, strings
27
28
  items: lazy ? openedItems : variables,
28
29
  placeholder: text.searchPlaceholder,
29
30
  emptyText: text.empty,
31
+ renderPicker: renderPicker,
30
32
  onOpenChange: (open)=>{
31
- if (open && lazy) setOpenedItems(variables());
33
+ if (open && lazy && !renderPicker) setOpenedItems(variables());
32
34
  },
33
35
  onSelect: (variable)=>{
34
36
  if (variable.value) onInsert?.(variable.value, variable);
@@ -175,7 +175,7 @@ const file_upload_FileUpload = /*#__PURE__*/ external_react_namespaceObject.forw
175
175
  "aria-describedby": describedBy || void 0,
176
176
  "aria-errormessage": resolvedAriaErrorMessage,
177
177
  tabIndex: disabled ? -1 : 0,
178
- className: (0, index_cjs_namespaceObject.cn)('relative flex w-full flex-col items-center justify-center h-32 border-2 border-dashed rounded-lg px-4 py-6 cursor-pointer transition-colors', 'text-foreground-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background', 'aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40', 'future:rounded-xl future:border-border-subtle future:bg-surface-overlay future:hover:bg-surface-hover future:focus-visible:ring-offset-background', isDragging ? 'border-primary bg-primary/5' : 'border-input bg-background hover:bg-accent/50', disabled && 'opacity-50 cursor-not-allowed hover:bg-background future:hover:bg-surface-overlay'),
178
+ className: (0, index_cjs_namespaceObject.cn)('relative flex w-full flex-col items-center justify-center min-h-32 border-2 border-dashed rounded-lg px-4 py-6 cursor-pointer transition-colors', 'text-foreground-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background', 'aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40', 'future:rounded-xl future:border-border-subtle future:bg-surface-overlay future:hover:bg-surface-hover future:focus-visible:ring-offset-background', isDragging ? 'border-primary bg-primary/5' : 'border-input bg-background hover:bg-accent/50', disabled && 'opacity-50 cursor-not-allowed hover:bg-background future:hover:bg-surface-overlay'),
179
179
  onDragEnter: handleDragEnter,
180
180
  onDragOver: handleDragOver,
181
181
  onDragLeave: handleDragLeave,
@@ -189,7 +189,7 @@ const file_upload_FileUpload = /*#__PURE__*/ external_react_namespaceObject.forw
189
189
  },
190
190
  children: [
191
191
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Upload, {
192
- className: "mb-2 h-8 w-8 text-muted-foreground future:text-foreground-muted"
192
+ className: "mb-2 h-8 w-8 shrink-0 text-muted-foreground future:text-foreground-muted"
193
193
  }),
194
194
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("p", {
195
195
  className: "text-center text-sm text-muted-foreground future:text-foreground-muted",
@@ -147,7 +147,7 @@ const file_upload_FileUpload = /*#__PURE__*/ forwardRef(function({ id, ariaLabel
147
147
  "aria-describedby": describedBy || void 0,
148
148
  "aria-errormessage": resolvedAriaErrorMessage,
149
149
  tabIndex: disabled ? -1 : 0,
150
- className: cn('relative flex w-full flex-col items-center justify-center h-32 border-2 border-dashed rounded-lg px-4 py-6 cursor-pointer transition-colors', 'text-foreground-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background', 'aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40', 'future:rounded-xl future:border-border-subtle future:bg-surface-overlay future:hover:bg-surface-hover future:focus-visible:ring-offset-background', isDragging ? 'border-primary bg-primary/5' : 'border-input bg-background hover:bg-accent/50', disabled && 'opacity-50 cursor-not-allowed hover:bg-background future:hover:bg-surface-overlay'),
150
+ className: cn('relative flex w-full flex-col items-center justify-center min-h-32 border-2 border-dashed rounded-lg px-4 py-6 cursor-pointer transition-colors', 'text-foreground-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background', 'aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40', 'future:rounded-xl future:border-border-subtle future:bg-surface-overlay future:hover:bg-surface-hover future:focus-visible:ring-offset-background', isDragging ? 'border-primary bg-primary/5' : 'border-input bg-background hover:bg-accent/50', disabled && 'opacity-50 cursor-not-allowed hover:bg-background future:hover:bg-surface-overlay'),
151
151
  onDragEnter: handleDragEnter,
152
152
  onDragOver: handleDragOver,
153
153
  onDragLeave: handleDragLeave,
@@ -161,7 +161,7 @@ const file_upload_FileUpload = /*#__PURE__*/ forwardRef(function({ id, ariaLabel
161
161
  },
162
162
  children: [
163
163
  /*#__PURE__*/ jsx(Upload, {
164
- className: "mb-2 h-8 w-8 text-muted-foreground future:text-foreground-muted"
164
+ className: "mb-2 h-8 w-8 shrink-0 text-muted-foreground future:text-foreground-muted"
165
165
  }),
166
166
  /*#__PURE__*/ jsxs("p", {
167
167
  className: "text-center text-sm text-muted-foreground future:text-foreground-muted",
@@ -80,13 +80,14 @@ const FormFieldDescription = /*#__PURE__*/ external_react_namespaceObject.forwar
80
80
  });
81
81
  });
82
82
  FormFieldDescription.displayName = "FormFieldDescription";
83
- const FormFieldError = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ children, className, ...props }, ref)=>{
83
+ const FormFieldError = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ children, className, severity = 'error', ...props }, ref)=>{
84
84
  if (!children) return null;
85
85
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
86
86
  ref: ref,
87
87
  "aria-live": "polite",
88
88
  "aria-atomic": "true",
89
- className: (0, external_lib_index_cjs_namespaceObject.cn)('text-xs leading-4 text-error mt-1.5', className),
89
+ "data-severity": 'warning' === severity ? severity : void 0,
90
+ className: (0, external_lib_index_cjs_namespaceObject.cn)('text-xs leading-4', 'warning' === severity ? 'text-warning' : 'text-error', 'mt-1.5', className),
90
91
  ...props,
91
92
  "data-slot": "form-field-error",
92
93
  children: children
@@ -43,12 +43,20 @@ declare const FormFieldLabel: React.ForwardRefExoticComponent<FormFieldLabelProp
43
43
  export type FormFieldDescriptionProps = React.ComponentPropsWithoutRef<'p'>;
44
44
  /** Supporting guidance rendered below a field control. */
45
45
  declare const FormFieldDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
46
- export type FormFieldErrorProps = React.ComponentPropsWithoutRef<'p'>;
46
+ export interface FormFieldErrorProps extends React.ComponentPropsWithoutRef<'p'> {
47
+ /**
48
+ * `warning` is for a value that is accepted but likely wrong, such as a reference that no longer
49
+ * resolves. Point the control's `aria-describedby` at a warning, not `aria-errormessage`, and
50
+ * leave it valid. Defaults to `error`.
51
+ */
52
+ severity?: 'error' | 'warning';
53
+ }
47
54
  /**
48
55
  * Validation message rendered below a field control. Uses the `error` token
49
- * rather than `destructive`, which some themes resolve to a different color.
56
+ * rather than `destructive`, which some themes resolve to a different color,
57
+ * and the `warning` token for a warning.
50
58
  */
51
- declare const FormFieldError: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
59
+ declare const FormFieldError: React.ForwardRefExoticComponent<FormFieldErrorProps & React.RefAttributes<HTMLParagraphElement>>;
52
60
  export interface FormFieldHeaderProps extends Pick<FormFieldLabelProps, 'htmlFor' | 'required' | 'tooltip' | 'tooltipAriaLabel'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
53
61
  label?: React.ReactNode;
54
62
  /** The label element's id, for a control that names itself with `aria-labelledby`. */
@@ -48,13 +48,14 @@ const FormFieldDescription = /*#__PURE__*/ forwardRef(({ children, className, ..
48
48
  });
49
49
  });
50
50
  FormFieldDescription.displayName = "FormFieldDescription";
51
- const FormFieldError = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>{
51
+ const FormFieldError = /*#__PURE__*/ forwardRef(({ children, className, severity = 'error', ...props }, ref)=>{
52
52
  if (!children) return null;
53
53
  return /*#__PURE__*/ jsx("p", {
54
54
  ref: ref,
55
55
  "aria-live": "polite",
56
56
  "aria-atomic": "true",
57
- className: cn('text-xs leading-4 text-error mt-1.5', className),
57
+ "data-severity": 'warning' === severity ? severity : void 0,
58
+ className: cn('text-xs leading-4', 'warning' === severity ? 'text-warning' : 'text-error', 'mt-1.5', className),
58
59
  ...props,
59
60
  "data-slot": "form-field-error",
60
61
  children: children
@@ -36,7 +36,7 @@ var __webpack_modules__ = {
36
36
  "@/components/ui/button" (module) {
37
37
  module.exports = require("./button.cjs");
38
38
  },
39
- "@/components/ui/calendar" (module) {
39
+ "./calendar" (module) {
40
40
  module.exports = require("./calendar.cjs");
41
41
  },
42
42
  "@/components/ui/card" (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
  "./empty-state" (module) {
@@ -120,7 +120,7 @@ var __webpack_modules__ = {
120
120
  "@/components/ui/hover-card" (module) {
121
121
  module.exports = require("./hover-card.cjs");
122
122
  },
123
- "./info-tooltip" (module) {
123
+ "@/components/ui/info-tooltip" (module) {
124
124
  module.exports = require("./info-tooltip.cjs");
125
125
  },
126
126
  "@/components/ui/input-group" (module) {
@@ -132,10 +132,10 @@ var __webpack_modules__ = {
132
132
  "./json-tree-view" (module) {
133
133
  module.exports = require("./json-tree-view/index.cjs");
134
134
  },
135
- "./label" (module) {
135
+ "@/components/ui/label" (module) {
136
136
  module.exports = require("./label.cjs");
137
137
  },
138
- "./layout" (module) {
138
+ "@/components/ui/layout" (module) {
139
139
  module.exports = require("./layout/index.cjs");
140
140
  },
141
141
  "./live-region" (module) {
@@ -201,7 +201,7 @@ var __webpack_modules__ = {
201
201
  "./reference-chip-colors" (module) {
202
202
  module.exports = require("./reference-chip-colors.cjs");
203
203
  },
204
- "./reference-chip" (module) {
204
+ "@/components/ui/reference-chip" (module) {
205
205
  module.exports = require("./reference-chip.cjs");
206
206
  },
207
207
  "./resizable" (module) {
@@ -249,13 +249,13 @@ var __webpack_modules__ = {
249
249
  "./switch" (module) {
250
250
  module.exports = require("./switch.cjs");
251
251
  },
252
- "./table" (module) {
252
+ "@/components/ui/table" (module) {
253
253
  module.exports = require("./table.cjs");
254
254
  },
255
255
  "./tabs" (module) {
256
256
  module.exports = require("./tabs.cjs");
257
257
  },
258
- "./textarea" (module) {
258
+ "@/components/ui/textarea" (module) {
259
259
  module.exports = require("./textarea.cjs");
260
260
  },
261
261
  "./thinking-indicator" (module) {
@@ -276,7 +276,7 @@ var __webpack_modules__ = {
276
276
  "./tree-view" (module) {
277
277
  module.exports = require("./tree-view.cjs");
278
278
  },
279
- "./variable-picker" (module) {
279
+ "@/components/ui/variable-picker" (module) {
280
280
  module.exports = require("./variable-picker/index.cjs");
281
281
  },
282
282
  "./variable-value-control" (module) {
@@ -452,7 +452,7 @@ var __webpack_exports__ = {};
452
452
  "ReferenceChip"
453
453
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_button_group__rspack_import_11[__rspack_import_key];
454
454
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
455
- var _calendar__rspack_import_12 = __webpack_require__("@/components/ui/calendar");
455
+ var _calendar__rspack_import_12 = __webpack_require__("./calendar");
456
456
  var __rspack_reexport = {};
457
457
  for(const __rspack_import_key in _calendar__rspack_import_12)if ([
458
458
  "getReferenceChipColors",
@@ -632,7 +632,7 @@ var __webpack_exports__ = {};
632
632
  "ReferenceChip"
633
633
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_drawer__rspack_import_29[__rspack_import_key];
634
634
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
635
- var _dropdown_menu__rspack_import_30 = __webpack_require__("./dropdown-menu");
635
+ var _dropdown_menu__rspack_import_30 = __webpack_require__("@/components/ui/dropdown-menu");
636
636
  var __rspack_reexport = {};
637
637
  for(const __rspack_import_key in _dropdown_menu__rspack_import_30)if ([
638
638
  "getReferenceChipColors",
@@ -652,7 +652,7 @@ var __webpack_exports__ = {};
652
652
  "ReferenceChip"
653
653
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_dropzone_overlay__rspack_import_31[__rspack_import_key];
654
654
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
655
- var _editable_cell__rspack_import_32 = __webpack_require__("./editable-cell");
655
+ var _editable_cell__rspack_import_32 = __webpack_require__("@/components/ui/editable-cell");
656
656
  var __rspack_reexport = {};
657
657
  for(const __rspack_import_key in _editable_cell__rspack_import_32)if ([
658
658
  "getReferenceChipColors",
@@ -732,7 +732,7 @@ var __webpack_exports__ = {};
732
732
  "ReferenceChip"
733
733
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_hover_card__rspack_import_39[__rspack_import_key];
734
734
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
735
- var _info_tooltip__rspack_import_40 = __webpack_require__("./info-tooltip");
735
+ var _info_tooltip__rspack_import_40 = __webpack_require__("@/components/ui/info-tooltip");
736
736
  var __rspack_reexport = {};
737
737
  for(const __rspack_import_key in _info_tooltip__rspack_import_40)if ([
738
738
  "getReferenceChipColors",
@@ -772,7 +772,7 @@ var __webpack_exports__ = {};
772
772
  "ReferenceChip"
773
773
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_json_tree_view__rspack_import_43[__rspack_import_key];
774
774
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
775
- var _label__rspack_import_44 = __webpack_require__("./label");
775
+ var _label__rspack_import_44 = __webpack_require__("@/components/ui/label");
776
776
  var __rspack_reexport = {};
777
777
  for(const __rspack_import_key in _label__rspack_import_44)if ([
778
778
  "getReferenceChipColors",
@@ -782,7 +782,7 @@ var __webpack_exports__ = {};
782
782
  "ReferenceChip"
783
783
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_label__rspack_import_44[__rspack_import_key];
784
784
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
785
- var _layout__rspack_import_45 = __webpack_require__("./layout");
785
+ var _layout__rspack_import_45 = __webpack_require__("@/components/ui/layout");
786
786
  var __rspack_reexport = {};
787
787
  for(const __rspack_import_key in _layout__rspack_import_45)if ([
788
788
  "getReferenceChipColors",
@@ -992,7 +992,7 @@ var __webpack_exports__ = {};
992
992
  "ReferenceChip"
993
993
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_radio_group__rspack_import_65[__rspack_import_key];
994
994
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
995
- var _reference_chip__rspack_import_66 = __webpack_require__("./reference-chip");
995
+ var _reference_chip__rspack_import_66 = __webpack_require__("@/components/ui/reference-chip");
996
996
  var _reference_chip_colors__rspack_import_67 = __webpack_require__("./reference-chip-colors");
997
997
  var _resizable__rspack_import_68 = __webpack_require__("./resizable");
998
998
  var __rspack_reexport = {};
@@ -1144,7 +1144,7 @@ var __webpack_exports__ = {};
1144
1144
  "ReferenceChip"
1145
1145
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_switch__rspack_import_82[__rspack_import_key];
1146
1146
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
1147
- var _table__rspack_import_83 = __webpack_require__("./table");
1147
+ var _table__rspack_import_83 = __webpack_require__("@/components/ui/table");
1148
1148
  var __rspack_reexport = {};
1149
1149
  for(const __rspack_import_key in _table__rspack_import_83)if ([
1150
1150
  "getReferenceChipColors",
@@ -1164,7 +1164,7 @@ var __webpack_exports__ = {};
1164
1164
  "ReferenceChip"
1165
1165
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_tabs__rspack_import_84[__rspack_import_key];
1166
1166
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
1167
- var _textarea__rspack_import_85 = __webpack_require__("./textarea");
1167
+ var _textarea__rspack_import_85 = __webpack_require__("@/components/ui/textarea");
1168
1168
  var __rspack_reexport = {};
1169
1169
  for(const __rspack_import_key in _textarea__rspack_import_85)if ([
1170
1170
  "getReferenceChipColors",
@@ -1226,7 +1226,7 @@ var __webpack_exports__ = {};
1226
1226
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
1227
1227
  var _tree_view__rspack_import_91 = __webpack_require__("./tree-view");
1228
1228
  var _tree_view__rspack_import_91_default = /*#__PURE__*/ __webpack_require__.n(_tree_view__rspack_import_91);
1229
- var _variable_picker__rspack_import_92 = __webpack_require__("./variable-picker");
1229
+ var _variable_picker__rspack_import_92 = __webpack_require__("@/components/ui/variable-picker");
1230
1230
  var __rspack_reexport = {};
1231
1231
  for(const __rspack_import_key in _variable_picker__rspack_import_92)if ([
1232
1232
  "getReferenceChipColors",
@@ -65,7 +65,7 @@ const ReferenceChip = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRe
65
65
  onRemove && !readOnly && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
66
66
  type: "button",
67
67
  disabled: disabled,
68
- "aria-label": removeLabel ?? `Remove ${label}`,
68
+ "aria-label": removeLabel ?? ('string' == typeof label ? `Remove ${label}` : 'Remove'),
69
69
  className: "inline-flex shrink-0 items-center justify-center p-px border-0 bg-transparent cursor-pointer rounded-[2px] w-4 h-4 text-inherit focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-current disabled:cursor-default",
70
70
  onMouseDown: (event)=>{
71
71
  event.preventDefault();
@@ -1,7 +1,7 @@
1
1
  import { type HTMLAttributes, type ReactNode } from 'react';
2
2
  export interface ReferenceChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
3
3
  /** Display name of the referenced variable, resource or connection. */
4
- label: string;
4
+ label: ReactNode;
5
5
  /** Decorative icon. Branded icons may preserve their original colors. */
6
6
  icon?: ReactNode;
7
7
  onRemove?: () => void;
@@ -37,7 +37,7 @@ const ReferenceChip = /*#__PURE__*/ forwardRef(({ label, icon, onRemove, removeL
37
37
  onRemove && !readOnly && /*#__PURE__*/ jsx("button", {
38
38
  type: "button",
39
39
  disabled: disabled,
40
- "aria-label": removeLabel ?? `Remove ${label}`,
40
+ "aria-label": removeLabel ?? ('string' == typeof label ? `Remove ${label}` : 'Remove'),
41
41
  className: "inline-flex shrink-0 items-center justify-center p-px border-0 bg-transparent cursor-pointer rounded-[2px] w-4 h-4 text-inherit focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-current disabled:cursor-default",
42
42
  onMouseDown: (event)=>{
43
43
  event.preventDefault();
@@ -1,2 +1,2 @@
1
- export type { VariablePickerContentProps, VariablePickerItem, VariablePickerProps, } from './variable-picker';
1
+ export type { RenderVariablePicker, VariablePickerContentProps, VariablePickerItem, VariablePickerProps, VariablePickerSlotProps, } from './variable-picker';
2
2
  export { VariablePicker, VariablePickerContent } from './variable-picker';