@uipath/apollo-wind 2.79.1 → 2.80.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 (46) hide show
  1. package/dist/components/forms/metadata-form.cjs +3 -2
  2. package/dist/components/forms/metadata-form.js +3 -2
  3. package/dist/components/ui/editable-text.cjs +251 -0
  4. package/dist/components/ui/editable-text.d.ts +48 -0
  5. package/dist/components/ui/editable-text.js +217 -0
  6. package/dist/components/ui/field-actions/ai-assist-action.cjs +7 -5
  7. package/dist/components/ui/field-actions/ai-assist-action.js +7 -5
  8. package/dist/components/ui/field-actions/collapse.cjs +7 -7
  9. package/dist/components/ui/field-actions/collapse.d.ts +6 -3
  10. package/dist/components/ui/field-actions/collapse.js +3 -3
  11. package/dist/components/ui/field-actions/insert-variable-action.cjs +7 -7
  12. package/dist/components/ui/field-actions/insert-variable-action.js +8 -8
  13. package/dist/components/ui/field-addons/field-menu.cjs +2 -1
  14. package/dist/components/ui/field-addons/field-menu.d.ts +6 -1
  15. package/dist/components/ui/field-addons/field-menu.js +2 -1
  16. package/dist/components/ui/field-addons/value-mode-switch-dialog.cjs +2 -1
  17. package/dist/components/ui/field-addons/value-mode-switch-dialog.d.ts +6 -1
  18. package/dist/components/ui/field-addons/value-mode-switch-dialog.js +2 -1
  19. package/dist/components/ui/index.cjs +215 -202
  20. package/dist/components/ui/index.d.ts +1 -0
  21. package/dist/components/ui/index.js +1 -0
  22. package/dist/components/ui/input-group.cjs +7 -3
  23. package/dist/components/ui/input-group.d.ts +1 -1
  24. package/dist/components/ui/input-group.js +7 -3
  25. package/dist/components/ui/quick-form-field/components/field-header.cjs +55 -52
  26. package/dist/components/ui/quick-form-field/components/field-header.d.ts +13 -4
  27. package/dist/components/ui/quick-form-field/components/field-header.js +53 -53
  28. package/dist/components/ui/quick-form-field/index.d.ts +1 -1
  29. package/dist/components/ui/quick-form-field/quick-form-field.cjs +134 -17
  30. package/dist/components/ui/quick-form-field/quick-form-field.d.ts +6 -3
  31. package/dist/components/ui/quick-form-field/quick-form-field.js +136 -19
  32. package/dist/components/ui/quick-form-field/types.cjs +8 -0
  33. package/dist/components/ui/quick-form-field/types.d.ts +81 -14
  34. package/dist/components/ui/quick-form-field/types.js +8 -0
  35. package/dist/components/ui/quick-form-field/utils.cjs +30 -1
  36. package/dist/components/ui/quick-form-field/utils.d.ts +8 -0
  37. package/dist/components/ui/quick-form-field/utils.js +27 -1
  38. package/dist/components/ui/variable-value-control.cjs +7 -4
  39. package/dist/components/ui/variable-value-control.d.ts +5 -1
  40. package/dist/components/ui/variable-value-control.js +7 -4
  41. package/dist/index.cjs +4 -0
  42. package/dist/index.d.ts +3 -1
  43. package/dist/index.js +2 -1
  44. package/dist/styles.css +74 -22
  45. package/dist/tailwind.css +2 -1
  46. package/package.json +1 -1
@@ -30,6 +30,7 @@ __webpack_require__.d(__webpack_exports__, {
30
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
31
  const external_lucide_react_namespaceObject = require("lucide-react");
32
32
  const external_react_namespaceObject = require("react");
33
+ const external_button_cjs_namespaceObject = require("../button.cjs");
33
34
  const index_cjs_namespaceObject = require("../variable-picker/index.cjs");
34
35
  const external_lib_index_cjs_namespaceObject = require("../../../lib/index.cjs");
35
36
  const external_collapse_cjs_namespaceObject = require("./collapse.cjs");
@@ -64,23 +65,22 @@ function InsertVariableAction({ variables = NO_VARIABLES, renderPicker, onInsert
64
65
  onSelect: (variable)=>{
65
66
  if (variable.value) onInsert?.(variable.value, variable);
66
67
  },
67
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
68
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
68
69
  type: "button",
70
+ variant: "ghost",
71
+ size: "3xs",
69
72
  "aria-label": text.ariaLabel,
70
73
  title: text.ariaLabel,
71
74
  disabled: inert,
72
- 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', external_collapse_cjs_namespaceObject.COLLAPSED_ICON_PADDING, compact && '!px-1.5'),
75
+ className: (0, external_lib_index_cjs_namespaceObject.cn)('gap-1', external_collapse_cjs_namespaceObject.FIELD_ACTION_CLASS),
73
76
  children: [
74
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Braces, {
75
- size: 12
76
- }),
77
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Braces, {}),
77
78
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
78
79
  className: collapsedTextClass,
79
80
  children: text.label
80
81
  }),
81
82
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
82
- size: 9,
83
- className: collapsedTextClass
83
+ className: (0, external_lib_index_cjs_namespaceObject.cn)('!size-2.5', collapsedTextClass)
84
84
  })
85
85
  ]
86
86
  })
@@ -1,9 +1,10 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Braces, ChevronDown } from "lucide-react";
3
3
  import { useState } from "react";
4
+ import { Button } from "../button.js";
4
5
  import { VariablePicker } from "../variable-picker/index.js";
5
6
  import { cn } from "../../../lib/index.js";
6
- import { COLLAPSED_HIDDEN, COLLAPSED_ICON_PADDING } from "./collapse.js";
7
+ import { COLLAPSED_HIDDEN, FIELD_ACTION_CLASS } from "./collapse.js";
7
8
  const NO_VARIABLES = [];
8
9
  const DEFAULT_INSERT_VARIABLE_ACTION_STRINGS = {
9
10
  label: 'Insert',
@@ -35,23 +36,22 @@ function InsertVariableAction({ variables = NO_VARIABLES, renderPicker, onInsert
35
36
  onSelect: (variable)=>{
36
37
  if (variable.value) onInsert?.(variable.value, variable);
37
38
  },
38
- children: /*#__PURE__*/ jsxs("button", {
39
+ children: /*#__PURE__*/ jsxs(Button, {
39
40
  type: "button",
41
+ variant: "ghost",
42
+ size: "3xs",
40
43
  "aria-label": text.ariaLabel,
41
44
  title: text.ariaLabel,
42
45
  disabled: inert,
43
- 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', COLLAPSED_ICON_PADDING, compact && '!px-1.5'),
46
+ className: cn('gap-1', FIELD_ACTION_CLASS),
44
47
  children: [
45
- /*#__PURE__*/ jsx(Braces, {
46
- size: 12
47
- }),
48
+ /*#__PURE__*/ jsx(Braces, {}),
48
49
  /*#__PURE__*/ jsx("span", {
49
50
  className: collapsedTextClass,
50
51
  children: text.label
51
52
  }),
52
53
  /*#__PURE__*/ jsx(ChevronDown, {
53
- size: 9,
54
- className: collapsedTextClass
54
+ className: cn('!size-2.5', collapsedTextClass)
55
55
  })
56
56
  ]
57
57
  })
@@ -67,7 +67,7 @@ function ValueModeMenuItem({ icon: Icon, label, description, active, disabled, o
67
67
  ]
68
68
  });
69
69
  }
70
- function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesDisabled, disabled, expectedType, literalDescription, triggerLabel: triggerLabelOverride, strings }) {
70
+ function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesDisabled, disabled, expectedType, literalDescription, triggerLabel: triggerLabelOverride, strings, onCloseAutoFocus }) {
71
71
  const text = {
72
72
  ...external_value_mode_strings_cjs_namespaceObject.DEFAULT_VALUE_MODE_STRINGS,
73
73
  ...strings
@@ -103,6 +103,7 @@ function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesD
103
103
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuContent, {
104
104
  align: "end",
105
105
  className: "w-56",
106
+ onCloseAutoFocus: onCloseAutoFocus,
106
107
  children: [
107
108
  !modesDisabled && resolvedModes.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ValueModeMenuItem, {
108
109
  icon: item.icon,
@@ -35,6 +35,11 @@ interface FieldMenuBaseProps<Id extends string> {
35
35
  triggerLabel?: string;
36
36
  /** Overrides for any subset of the English strings. */
37
37
  strings?: Partial<ValueModeStrings>;
38
+ /**
39
+ * Called as the menu closes, before it returns focus to its trigger. Call `preventDefault` to keep
40
+ * focus elsewhere, such as on the field's control after a mode is chosen.
41
+ */
42
+ onCloseAutoFocus?: (event: Event) => void;
38
43
  }
39
44
  /**
40
45
  * `modes` may be omitted when `Id` is the built-in modes, or one of them as `mode="literal"` infers,
@@ -68,5 +73,5 @@ export declare function ValueModeMenuItem({ icon: Icon, label, description, acti
68
73
  * shows the current mode's icon and is named by its title; with the modes hidden it is the field's
69
74
  * overflow menu.
70
75
  */
71
- export declare function FieldMenu<Id extends string = ValueMode>({ mode, onSelect, modes, extraModes, actions, checked, modesDisabled, disabled, expectedType, literalDescription, triggerLabel: triggerLabelOverride, strings, }: FieldMenuProps<Id>): import("react/jsx-runtime").JSX.Element;
76
+ export declare function FieldMenu<Id extends string = ValueMode>({ mode, onSelect, modes, extraModes, actions, checked, modesDisabled, disabled, expectedType, literalDescription, triggerLabel: triggerLabelOverride, strings, onCloseAutoFocus, }: FieldMenuProps<Id>): import("react/jsx-runtime").JSX.Element;
72
77
  export {};
@@ -38,7 +38,7 @@ function ValueModeMenuItem({ icon: Icon, label, description, active, disabled, o
38
38
  ]
39
39
  });
40
40
  }
41
- function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesDisabled, disabled, expectedType, literalDescription, triggerLabel: triggerLabelOverride, strings }) {
41
+ function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesDisabled, disabled, expectedType, literalDescription, triggerLabel: triggerLabelOverride, strings, onCloseAutoFocus }) {
42
42
  const text = {
43
43
  ...DEFAULT_VALUE_MODE_STRINGS,
44
44
  ...strings
@@ -74,6 +74,7 @@ function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesD
74
74
  /*#__PURE__*/ jsxs(DropdownMenuContent, {
75
75
  align: "end",
76
76
  className: "w-56",
77
+ onCloseAutoFocus: onCloseAutoFocus,
77
78
  children: [
78
79
  !modesDisabled && resolvedModes.map((item)=>/*#__PURE__*/ jsx(ValueModeMenuItem, {
79
80
  icon: item.icon,
@@ -29,7 +29,7 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
30
  const external_alert_dialog_cjs_namespaceObject = require("../alert-dialog.cjs");
31
31
  const external_value_mode_strings_cjs_namespaceObject = require("./value-mode-strings.cjs");
32
- function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description, confirmLabel, strings }) {
32
+ function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description, confirmLabel, strings, onCloseAutoFocus }) {
33
33
  const text = {
34
34
  ...external_value_mode_strings_cjs_namespaceObject.DEFAULT_VALUE_MODE_STRINGS,
35
35
  ...strings
@@ -38,6 +38,7 @@ function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description,
38
38
  open: open,
39
39
  onOpenChange: (next)=>!next && onCancel(),
40
40
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_alert_dialog_cjs_namespaceObject.AlertDialogContent, {
41
+ onCloseAutoFocus: onCloseAutoFocus,
41
42
  children: [
42
43
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_alert_dialog_cjs_namespaceObject.AlertDialogHeader, {
43
44
  children: [
@@ -11,6 +11,11 @@ export interface ValueModeSwitchDialogProps {
11
11
  confirmLabel?: string;
12
12
  /** Overrides for any subset of the English strings. */
13
13
  strings?: Partial<ValueModeStrings>;
14
+ /**
15
+ * Called as the dialog closes, before it returns focus to where it opened from. Call
16
+ * `preventDefault` to keep focus elsewhere, such as on the control of the mode just switched to.
17
+ */
18
+ onCloseAutoFocus?: (event: Event) => void;
14
19
  }
15
20
  /** Confirms a mode switch that would lose the field's current value. */
16
- export declare function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description, confirmLabel, strings, }: ValueModeSwitchDialogProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description, confirmLabel, strings, onCloseAutoFocus, }: ValueModeSwitchDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "../alert-dialog.js";
3
3
  import { DEFAULT_VALUE_MODE_STRINGS } from "./value-mode-strings.js";
4
- function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description, confirmLabel, strings }) {
4
+ function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description, confirmLabel, strings, onCloseAutoFocus }) {
5
5
  const text = {
6
6
  ...DEFAULT_VALUE_MODE_STRINGS,
7
7
  ...strings
@@ -10,6 +10,7 @@ function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description,
10
10
  open: open,
11
11
  onOpenChange: (next)=>!next && onCancel(),
12
12
  children: /*#__PURE__*/ jsxs(AlertDialogContent, {
13
+ onCloseAutoFocus: onCloseAutoFocus,
13
14
  children: [
14
15
  /*#__PURE__*/ jsxs(AlertDialogHeader, {
15
16
  children: [