@uipath/apollo-wind 2.60.1 → 2.62.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 (154) hide show
  1. package/dist/components/forms/field-actions.cjs +181 -0
  2. package/dist/components/forms/field-actions.d.ts +131 -0
  3. package/dist/components/forms/field-actions.js +129 -0
  4. package/dist/components/forms/field-control.cjs +415 -0
  5. package/dist/components/forms/field-control.d.ts +52 -0
  6. package/dist/components/forms/field-control.js +372 -0
  7. package/dist/components/forms/field-renderer.cjs +77 -420
  8. package/dist/components/forms/field-renderer.d.ts +2 -3
  9. package/dist/components/forms/field-renderer.js +78 -421
  10. package/dist/components/forms/form-designer.cjs +7 -1
  11. package/dist/components/forms/form-designer.js +7 -1
  12. package/dist/components/forms/form-schema.d.ts +121 -2
  13. package/dist/components/forms/form-strings.cjs +67 -0
  14. package/dist/components/forms/form-strings.d.ts +30 -0
  15. package/dist/components/forms/form-strings.js +30 -0
  16. package/dist/components/forms/index.cjs +53 -9
  17. package/dist/components/forms/index.d.ts +6 -1
  18. package/dist/components/forms/index.js +6 -1
  19. package/dist/components/forms/literal-value-context.cjs +37 -0
  20. package/dist/components/forms/literal-value-context.d.ts +5 -0
  21. package/dist/components/forms/literal-value-context.js +3 -0
  22. package/dist/components/forms/metadata-form.cjs +100 -21
  23. package/dist/components/forms/metadata-form.d.ts +5 -0
  24. package/dist/components/forms/metadata-form.js +101 -22
  25. package/dist/components/forms/mode-aware-field.cjs +589 -0
  26. package/dist/components/forms/mode-aware-field.d.ts +15 -0
  27. package/dist/components/forms/mode-aware-field.js +555 -0
  28. package/dist/components/forms/opaque-value.cjs +44 -0
  29. package/dist/components/forms/opaque-value.d.ts +7 -0
  30. package/dist/components/forms/opaque-value.js +7 -0
  31. package/dist/components/forms/rules-engine.cjs +13 -0
  32. package/dist/components/forms/rules-engine.js +13 -0
  33. package/dist/components/forms/schema-serializer.cjs +8 -0
  34. package/dist/components/forms/schema-serializer.js +8 -0
  35. package/dist/components/forms/string-list-field.cjs +36 -18
  36. package/dist/components/forms/string-list-field.d.ts +6 -0
  37. package/dist/components/forms/string-list-field.js +35 -20
  38. package/dist/components/forms/validation-converter.cjs +32 -2
  39. package/dist/components/forms/validation-converter.d.ts +17 -1
  40. package/dist/components/forms/validation-converter.js +30 -3
  41. package/dist/components/forms/value-modes.cjs +253 -0
  42. package/dist/components/forms/value-modes.d.ts +236 -0
  43. package/dist/components/forms/value-modes.js +180 -0
  44. package/dist/components/ui/avatar.d.ts +1 -1
  45. package/dist/components/ui/badge.d.ts +1 -1
  46. package/dist/components/ui/boolean-radio-group.cjs +114 -0
  47. package/dist/components/ui/boolean-radio-group.d.ts +24 -0
  48. package/dist/components/ui/boolean-radio-group.js +77 -0
  49. package/dist/components/ui/button.d.ts +2 -2
  50. package/dist/components/ui/checkbox.cjs +10 -5
  51. package/dist/components/ui/checkbox.js +12 -7
  52. package/dist/components/ui/command.d.ts +7 -7
  53. package/dist/components/ui/field-addons/field-menu.cjs +1 -0
  54. package/dist/components/ui/field-addons/field-menu.d.ts +2 -0
  55. package/dist/components/ui/field-addons/field-menu.js +1 -0
  56. package/dist/components/ui/field-addons/index.cjs +4 -0
  57. package/dist/components/ui/field-addons/index.d.ts +1 -0
  58. package/dist/components/ui/field-addons/index.js +2 -1
  59. package/dist/components/ui/field-addons/value-mode-strings.cjs +7 -1
  60. package/dist/components/ui/field-addons/value-mode-strings.d.ts +9 -0
  61. package/dist/components/ui/field-addons/value-mode-strings.js +7 -1
  62. package/dist/components/ui/field-addons/value-mode-switch-dialog.cjs +73 -0
  63. package/dist/components/ui/field-addons/value-mode-switch-dialog.d.ts +16 -0
  64. package/dist/components/ui/field-addons/value-mode-switch-dialog.js +39 -0
  65. package/dist/components/ui/form-field.cjs +2 -1
  66. package/dist/components/ui/form-field.d.ts +2 -0
  67. package/dist/components/ui/form-field.js +2 -1
  68. package/dist/components/ui/index.cjs +237 -193
  69. package/dist/components/ui/index.d.ts +4 -0
  70. package/dist/components/ui/index.js +4 -0
  71. package/dist/components/ui/input-group.cjs +6 -3
  72. package/dist/components/ui/input-group.d.ts +6 -5
  73. package/dist/components/ui/input-group.js +6 -3
  74. package/dist/components/ui/json-tree-view/DecorationChip.cjs +81 -0
  75. package/dist/components/ui/json-tree-view/DecorationChip.d.ts +4 -0
  76. package/dist/components/ui/json-tree-view/DecorationChip.js +47 -0
  77. package/dist/components/ui/json-tree-view/EditorChrome.cjs +88 -0
  78. package/dist/components/ui/json-tree-view/EditorChrome.d.ts +21 -0
  79. package/dist/components/ui/json-tree-view/EditorChrome.js +51 -0
  80. package/dist/components/ui/json-tree-view/JsonContainerEditor.cjs +95 -0
  81. package/dist/components/ui/json-tree-view/JsonContainerEditor.d.ts +18 -0
  82. package/dist/components/ui/json-tree-view/JsonContainerEditor.js +61 -0
  83. package/dist/components/ui/json-tree-view/JsonLeafValueEditor.cjs +86 -0
  84. package/dist/components/ui/json-tree-view/JsonLeafValueEditor.d.ts +12 -0
  85. package/dist/components/ui/json-tree-view/JsonLeafValueEditor.js +52 -0
  86. package/dist/components/ui/json-tree-view/JsonMultilineLeafEditor.cjs +74 -0
  87. package/dist/components/ui/json-tree-view/JsonMultilineLeafEditor.d.ts +13 -0
  88. package/dist/components/ui/json-tree-view/JsonMultilineLeafEditor.js +40 -0
  89. package/dist/components/ui/json-tree-view/JsonTree.cjs +253 -0
  90. package/dist/components/ui/json-tree-view/JsonTree.d.ts +81 -0
  91. package/dist/components/ui/json-tree-view/JsonTree.js +219 -0
  92. package/dist/components/ui/json-tree-view/JsonTree.types.cjs +18 -0
  93. package/dist/components/ui/json-tree-view/JsonTree.types.d.ts +253 -0
  94. package/dist/components/ui/json-tree-view/JsonTree.types.js +0 -0
  95. package/dist/components/ui/json-tree-view/JsonTreeRow.cjs +284 -0
  96. package/dist/components/ui/json-tree-view/JsonTreeRow.d.ts +50 -0
  97. package/dist/components/ui/json-tree-view/JsonTreeRow.js +244 -0
  98. package/dist/components/ui/json-tree-view/JsonTreeToolbar.cjs +209 -0
  99. package/dist/components/ui/json-tree-view/JsonTreeToolbar.d.ts +35 -0
  100. package/dist/components/ui/json-tree-view/JsonTreeToolbar.js +175 -0
  101. package/dist/components/ui/json-tree-view/JsonTreeTooltip.cjs +84 -0
  102. package/dist/components/ui/json-tree-view/JsonTreeTooltip.d.ts +21 -0
  103. package/dist/components/ui/json-tree-view/JsonTreeTooltip.js +47 -0
  104. package/dist/components/ui/json-tree-view/JsonTypeBadge.cjs +70 -0
  105. package/dist/components/ui/json-tree-view/JsonTypeBadge.d.ts +17 -0
  106. package/dist/components/ui/json-tree-view/JsonTypeBadge.js +36 -0
  107. package/dist/components/ui/json-tree-view/NodeKey.cjs +77 -0
  108. package/dist/components/ui/json-tree-view/NodeKey.d.ts +16 -0
  109. package/dist/components/ui/json-tree-view/NodeKey.js +43 -0
  110. package/dist/components/ui/json-tree-view/RowActions.cjs +120 -0
  111. package/dist/components/ui/json-tree-view/RowActions.d.ts +15 -0
  112. package/dist/components/ui/json-tree-view/RowActions.js +86 -0
  113. package/dist/components/ui/json-tree-view/ScalarValueCell.cjs +112 -0
  114. package/dist/components/ui/json-tree-view/ScalarValueCell.d.ts +18 -0
  115. package/dist/components/ui/json-tree-view/ScalarValueCell.js +75 -0
  116. package/dist/components/ui/json-tree-view/buildJsonTree.cjs +324 -0
  117. package/dist/components/ui/json-tree-view/buildJsonTree.d.ts +75 -0
  118. package/dist/components/ui/json-tree-view/buildJsonTree.js +257 -0
  119. package/dist/components/ui/json-tree-view/clipboard.cjs +63 -0
  120. package/dist/components/ui/json-tree-view/clipboard.d.ts +6 -0
  121. package/dist/components/ui/json-tree-view/clipboard.js +29 -0
  122. package/dist/components/ui/json-tree-view/index.cjs +175 -0
  123. package/dist/components/ui/json-tree-view/index.d.ts +10 -0
  124. package/dist/components/ui/json-tree-view/index.js +11 -0
  125. package/dist/components/ui/json-tree-view/leafEditTypes.cjs +74 -0
  126. package/dist/components/ui/json-tree-view/leafEditTypes.d.ts +12 -0
  127. package/dist/components/ui/json-tree-view/leafEditTypes.js +34 -0
  128. package/dist/components/ui/json-tree-view/strings.cjs +122 -0
  129. package/dist/components/ui/json-tree-view/strings.d.ts +65 -0
  130. package/dist/components/ui/json-tree-view/strings.js +79 -0
  131. package/dist/components/ui/prompt-value-control.cjs +70 -0
  132. package/dist/components/ui/prompt-value-control.d.ts +28 -0
  133. package/dist/components/ui/prompt-value-control.js +36 -0
  134. package/dist/components/ui/sheet.d.ts +1 -1
  135. package/dist/components/ui/spinner.d.ts +1 -1
  136. package/dist/components/ui/switch.d.ts +2 -2
  137. package/dist/components/ui/textarea.cjs +1 -1
  138. package/dist/components/ui/textarea.js +1 -1
  139. package/dist/components/ui/toggle-group.d.ts +2 -2
  140. package/dist/components/ui/toggle.d.ts +2 -2
  141. package/dist/components/ui/variable-value-control.cjs +98 -0
  142. package/dist/components/ui/variable-value-control.d.ts +35 -0
  143. package/dist/components/ui/variable-value-control.js +64 -0
  144. package/dist/index.cjs +145 -16
  145. package/dist/index.d.ts +21 -3
  146. package/dist/index.js +11 -2
  147. package/dist/lib/index.cjs +4 -1
  148. package/dist/lib/index.d.ts +1 -1
  149. package/dist/lib/index.js +2 -2
  150. package/dist/lib/utils.cjs +21 -1
  151. package/dist/lib/utils.d.ts +8 -0
  152. package/dist/lib/utils.js +18 -1
  153. package/dist/styles.css +279 -0
  154. package/package.json +1 -1
@@ -34,13 +34,18 @@ const utils_cjs_namespaceObject = require("../../lib/utils.cjs");
34
34
  const Checkbox = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Root, {
35
35
  ref: ref,
36
36
  "data-slot": "checkbox",
37
- className: (0, utils_cjs_namespaceObject.cn)('peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground aria-invalid:border-error aria-invalid:focus-visible:ring-error', 'future:hover:border-border-hover future:data-[state=checked]:border-foreground-accent future:data-[state=checked]:bg-foreground-accent future:data-[state=checked]:text-current', 'future:aria-invalid:border-error future:aria-invalid:hover:border-error future:aria-invalid:data-[state=checked]:border-error', className),
37
+ className: (0, utils_cjs_namespaceObject.cn)('group/checkbox peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground aria-invalid:border-error aria-invalid:focus-visible:ring-error', 'future:hover:border-border-hover future:data-[state=checked]:border-foreground-accent future:data-[state=checked]:bg-foreground-accent future:data-[state=checked]:text-current future:data-[state=indeterminate]:border-foreground-accent future:data-[state=indeterminate]:bg-foreground-accent future:data-[state=indeterminate]:text-current', 'future:aria-invalid:border-error future:aria-invalid:hover:border-error future:aria-invalid:data-[state=checked]:border-error future:aria-invalid:data-[state=indeterminate]:border-error', className),
38
38
  ...props,
39
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Indicator, {
39
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_checkbox_namespaceObject.Indicator, {
40
40
  className: (0, utils_cjs_namespaceObject.cn)('flex items-center justify-center text-current future:text-foreground-inverse'),
41
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
42
- className: "h-4 w-4 future:h-3.5 future:w-3.5"
43
- })
41
+ children: [
42
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
43
+ className: "h-4 w-4 group-data-[state=indeterminate]/checkbox:hidden future:h-3.5 future:w-3.5"
44
+ }),
45
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Minus, {
46
+ className: "hidden h-4 w-4 group-data-[state=indeterminate]/checkbox:block future:h-3.5 future:w-3.5"
47
+ })
48
+ ]
44
49
  })
45
50
  }));
46
51
  Checkbox.displayName = react_checkbox_namespaceObject.Root.displayName;
@@ -1,18 +1,23 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Indicator, Root } from "@radix-ui/react-checkbox";
3
- import { Check } from "lucide-react";
3
+ import { Check, Minus } from "lucide-react";
4
4
  import { forwardRef } from "react";
5
5
  import { cn } from "../../lib/utils.js";
6
6
  const Checkbox = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
7
7
  ref: ref,
8
8
  "data-slot": "checkbox",
9
- className: cn('peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground aria-invalid:border-error aria-invalid:focus-visible:ring-error', 'future:hover:border-border-hover future:data-[state=checked]:border-foreground-accent future:data-[state=checked]:bg-foreground-accent future:data-[state=checked]:text-current', 'future:aria-invalid:border-error future:aria-invalid:hover:border-error future:aria-invalid:data-[state=checked]:border-error', className),
9
+ className: cn('group/checkbox peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground aria-invalid:border-error aria-invalid:focus-visible:ring-error', 'future:hover:border-border-hover future:data-[state=checked]:border-foreground-accent future:data-[state=checked]:bg-foreground-accent future:data-[state=checked]:text-current future:data-[state=indeterminate]:border-foreground-accent future:data-[state=indeterminate]:bg-foreground-accent future:data-[state=indeterminate]:text-current', 'future:aria-invalid:border-error future:aria-invalid:hover:border-error future:aria-invalid:data-[state=checked]:border-error future:aria-invalid:data-[state=indeterminate]:border-error', className),
10
10
  ...props,
11
- children: /*#__PURE__*/ jsx(Indicator, {
11
+ children: /*#__PURE__*/ jsxs(Indicator, {
12
12
  className: cn('flex items-center justify-center text-current future:text-foreground-inverse'),
13
- children: /*#__PURE__*/ jsx(Check, {
14
- className: "h-4 w-4 future:h-3.5 future:w-3.5"
15
- })
13
+ children: [
14
+ /*#__PURE__*/ jsx(Check, {
15
+ className: "h-4 w-4 group-data-[state=indeterminate]/checkbox:hidden future:h-3.5 future:w-3.5"
16
+ }),
17
+ /*#__PURE__*/ jsx(Minus, {
18
+ className: "hidden h-4 w-4 group-data-[state=indeterminate]/checkbox:block future:h-3.5 future:w-3.5"
19
+ })
20
+ ]
16
21
  })
17
22
  }));
18
23
  Checkbox.displayName = Root.displayName;
@@ -6,7 +6,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
6
6
  ref?: React.Ref<HTMLDivElement>;
7
7
  } & {
8
8
  asChild?: boolean;
9
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
9
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
10
10
  label?: string;
11
11
  shouldFilter?: boolean;
12
12
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -22,7 +22,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
22
22
  ref?: React.Ref<HTMLInputElement>;
23
23
  } & {
24
24
  asChild?: boolean;
25
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "onChange" | "value"> & {
25
+ }, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
26
26
  value?: string;
27
27
  onValueChange?: (search: string) => void;
28
28
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -32,7 +32,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
32
32
  ref?: React.Ref<HTMLDivElement>;
33
33
  } & {
34
34
  asChild?: boolean;
35
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
35
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
36
36
  label?: string;
37
37
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
38
38
  declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
@@ -41,14 +41,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
41
41
  ref?: React.Ref<HTMLDivElement>;
42
42
  } & {
43
43
  asChild?: boolean;
44
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
44
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
45
45
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
46
46
  children?: React.ReactNode;
47
47
  } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
48
48
  ref?: React.Ref<HTMLDivElement>;
49
49
  } & {
50
50
  asChild?: boolean;
51
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
51
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
52
52
  heading?: React.ReactNode;
53
53
  value?: string;
54
54
  forceMount?: boolean;
@@ -57,7 +57,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
57
57
  ref?: React.Ref<HTMLDivElement>;
58
58
  } & {
59
59
  asChild?: boolean;
60
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
60
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
61
61
  alwaysRender?: boolean;
62
62
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
63
63
  declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
@@ -66,7 +66,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
66
66
  ref?: React.Ref<HTMLDivElement>;
67
67
  } & {
68
68
  asChild?: boolean;
69
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "disabled" | "onSelect"> & {
69
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
70
70
  disabled?: boolean;
71
71
  onSelect?: (value: string) => void;
72
72
  value?: string;
@@ -118,6 +118,7 @@ function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesD
118
118
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
119
119
  disabled: action.disabled,
120
120
  onClick: action.onSelect,
121
+ className: (0, index_cjs_namespaceObject.cn)(action.destructive && 'text-error focus:text-error'),
121
122
  children: [
122
123
  ActionIcon ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ActionIcon, {}) : action.iconDataUri && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
123
124
  src: action.iconDataUri,
@@ -9,6 +9,8 @@ export interface FieldMenuItem {
9
9
  /** Icon as a data URI, used when `icon` is absent. */
10
10
  iconDataUri?: string;
11
11
  disabled?: boolean;
12
+ /** Styles the row as one that removes or discards something. */
13
+ destructive?: boolean;
12
14
  onSelect: () => void;
13
15
  }
14
16
  /** A mode to list: a full option, or the id of a built-in mode that `Id` shares. */
@@ -89,6 +89,7 @@ function FieldMenu({ mode, onSelect, modes, extraModes, actions, checked, modesD
89
89
  return /*#__PURE__*/ jsxs(DropdownMenuItem, {
90
90
  disabled: action.disabled,
91
91
  onClick: action.onSelect,
92
+ className: cn(action.destructive && 'text-error focus:text-error'),
92
93
  children: [
93
94
  ActionIcon ? /*#__PURE__*/ jsx(ActionIcon, {}) : action.iconDataUri && /*#__PURE__*/ jsx("img", {
94
95
  src: action.iconDataUri,
@@ -25,6 +25,7 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  BUILTIN_VALUE_MODES: ()=>external_built_in_value_modes_cjs_namespaceObject.BUILTIN_VALUE_MODES,
28
+ ValueModeSwitchDialog: ()=>external_value_mode_switch_dialog_cjs_namespaceObject.ValueModeSwitchDialog,
28
29
  builtInValueModes: ()=>external_built_in_value_modes_cjs_namespaceObject.builtInValueModes,
29
30
  DEFAULT_VALUE_MODE_STRINGS: ()=>external_value_mode_strings_cjs_namespaceObject.DEFAULT_VALUE_MODE_STRINGS,
30
31
  FieldMenu: ()=>external_field_menu_cjs_namespaceObject.FieldMenu,
@@ -34,16 +35,19 @@ const external_built_in_value_modes_cjs_namespaceObject = require("./built-in-va
34
35
  const external_field_menu_cjs_namespaceObject = require("./field-menu.cjs");
35
36
  const external_value_mode_indicator_cjs_namespaceObject = require("./value-mode-indicator.cjs");
36
37
  const external_value_mode_strings_cjs_namespaceObject = require("./value-mode-strings.cjs");
38
+ const external_value_mode_switch_dialog_cjs_namespaceObject = require("./value-mode-switch-dialog.cjs");
37
39
  exports.BUILTIN_VALUE_MODES = __webpack_exports__.BUILTIN_VALUE_MODES;
38
40
  exports.DEFAULT_VALUE_MODE_STRINGS = __webpack_exports__.DEFAULT_VALUE_MODE_STRINGS;
39
41
  exports.FieldMenu = __webpack_exports__.FieldMenu;
40
42
  exports.ValueModeIndicator = __webpack_exports__.ValueModeIndicator;
43
+ exports.ValueModeSwitchDialog = __webpack_exports__.ValueModeSwitchDialog;
41
44
  exports.builtInValueModes = __webpack_exports__.builtInValueModes;
42
45
  for(var __rspack_i in __webpack_exports__)if (-1 === [
43
46
  "BUILTIN_VALUE_MODES",
44
47
  "DEFAULT_VALUE_MODE_STRINGS",
45
48
  "FieldMenu",
46
49
  "ValueModeIndicator",
50
+ "ValueModeSwitchDialog",
47
51
  "builtInValueModes"
48
52
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
49
53
  Object.defineProperty(exports, '__esModule', {
@@ -2,3 +2,4 @@ export { BUILTIN_VALUE_MODES, type BuiltInValueModesOptions, builtInValueModes,
2
2
  export { FieldMenu, type FieldMenuItem, type FieldMenuMode, type FieldMenuProps, } from './field-menu';
3
3
  export { ValueModeIndicator, type ValueModeIndicatorProps } from './value-mode-indicator';
4
4
  export { DEFAULT_VALUE_MODE_STRINGS, type ValueMode, type ValueModeStrings, } from './value-mode-strings';
5
+ export { ValueModeSwitchDialog, type ValueModeSwitchDialogProps } from './value-mode-switch-dialog';
@@ -2,4 +2,5 @@ import { BUILTIN_VALUE_MODES, builtInValueModes } from "./built-in-value-modes.j
2
2
  import { FieldMenu } from "./field-menu.js";
3
3
  import { ValueModeIndicator } from "./value-mode-indicator.js";
4
4
  import { DEFAULT_VALUE_MODE_STRINGS } from "./value-mode-strings.js";
5
- export { BUILTIN_VALUE_MODES, DEFAULT_VALUE_MODE_STRINGS, FieldMenu, ValueModeIndicator, builtInValueModes };
5
+ import { ValueModeSwitchDialog } from "./value-mode-switch-dialog.js";
6
+ export { BUILTIN_VALUE_MODES, DEFAULT_VALUE_MODE_STRINGS, FieldMenu, ValueModeIndicator, ValueModeSwitchDialog, builtInValueModes };
@@ -38,9 +38,15 @@ const DEFAULT_VALUE_MODE_STRINGS = {
38
38
  promptTitle: 'Prompt',
39
39
  promptDescription: 'Describe the value for the agent to fill in',
40
40
  variablePlaceholder: 'Select a variable',
41
+ variableSearchPlaceholder: 'Search variables...',
42
+ variableEmpty: 'No variables found.',
41
43
  promptPlaceholder: 'Describe the value',
42
44
  fieldActions: 'Field actions',
43
- expressionIndicator: 'JavaScript expression'
45
+ expressionIndicator: 'JavaScript expression',
46
+ lossyTitle: 'Switch value mode?',
47
+ lossyDescription: 'The current value will be cleared. This cannot be undone.',
48
+ confirm: 'Switch',
49
+ cancel: 'Cancel'
44
50
  };
45
51
  exports.DEFAULT_VALUE_MODE_STRINGS = __webpack_exports__.DEFAULT_VALUE_MODE_STRINGS;
46
52
  for(var __rspack_i in __webpack_exports__)if (-1 === [
@@ -20,11 +20,20 @@ export interface ValueModeStrings {
20
20
  promptDescription: string;
21
21
  /** Shown in the variable control while no variable is bound. */
22
22
  variablePlaceholder: string;
23
+ /** The variable picker's search box and its empty state. */
24
+ variableSearchPlaceholder: string;
25
+ variableEmpty: string;
23
26
  /** Shown in the prompt control while the prompt is empty. */
24
27
  promptPlaceholder: string;
25
28
  /** Names the menu trigger when it offers only actions and no modes. */
26
29
  fieldActions: string;
27
30
  /** Hover text on the `=` indicator. */
28
31
  expressionIndicator: string;
32
+ /** Title of the dialog confirming a switch that loses the current value. */
33
+ lossyTitle: string;
34
+ lossyDescription: string;
35
+ /** The dialog's confirm and cancel buttons. */
36
+ confirm: string;
37
+ cancel: string;
29
38
  }
30
39
  export declare const DEFAULT_VALUE_MODE_STRINGS: ValueModeStrings;
@@ -10,8 +10,14 @@ const DEFAULT_VALUE_MODE_STRINGS = {
10
10
  promptTitle: 'Prompt',
11
11
  promptDescription: 'Describe the value for the agent to fill in',
12
12
  variablePlaceholder: 'Select a variable',
13
+ variableSearchPlaceholder: 'Search variables...',
14
+ variableEmpty: 'No variables found.',
13
15
  promptPlaceholder: 'Describe the value',
14
16
  fieldActions: 'Field actions',
15
- expressionIndicator: 'JavaScript expression'
17
+ expressionIndicator: 'JavaScript expression',
18
+ lossyTitle: 'Switch value mode?',
19
+ lossyDescription: 'The current value will be cleared. This cannot be undone.',
20
+ confirm: 'Switch',
21
+ cancel: 'Cancel'
16
22
  };
17
23
  export { DEFAULT_VALUE_MODE_STRINGS };
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ ValueModeSwitchDialog: ()=>ValueModeSwitchDialog
28
+ });
29
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const external_alert_dialog_cjs_namespaceObject = require("../alert-dialog.cjs");
31
+ const external_value_mode_strings_cjs_namespaceObject = require("./value-mode-strings.cjs");
32
+ function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description, confirmLabel, strings }) {
33
+ const text = {
34
+ ...external_value_mode_strings_cjs_namespaceObject.DEFAULT_VALUE_MODE_STRINGS,
35
+ ...strings
36
+ };
37
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_alert_dialog_cjs_namespaceObject.AlertDialog, {
38
+ open: open,
39
+ onOpenChange: (next)=>!next && onCancel(),
40
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_alert_dialog_cjs_namespaceObject.AlertDialogContent, {
41
+ children: [
42
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_alert_dialog_cjs_namespaceObject.AlertDialogHeader, {
43
+ children: [
44
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_alert_dialog_cjs_namespaceObject.AlertDialogTitle, {
45
+ children: title ?? text.lossyTitle
46
+ }),
47
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_alert_dialog_cjs_namespaceObject.AlertDialogDescription, {
48
+ children: description ?? text.lossyDescription
49
+ })
50
+ ]
51
+ }),
52
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_alert_dialog_cjs_namespaceObject.AlertDialogFooter, {
53
+ children: [
54
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_alert_dialog_cjs_namespaceObject.AlertDialogCancel, {
55
+ children: text.cancel
56
+ }),
57
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_alert_dialog_cjs_namespaceObject.AlertDialogAction, {
58
+ onClick: onConfirm,
59
+ children: confirmLabel ?? text.confirm
60
+ })
61
+ ]
62
+ })
63
+ ]
64
+ })
65
+ });
66
+ }
67
+ exports.ValueModeSwitchDialog = __webpack_exports__.ValueModeSwitchDialog;
68
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
69
+ "ValueModeSwitchDialog"
70
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
71
+ Object.defineProperty(exports, '__esModule', {
72
+ value: true
73
+ });
@@ -0,0 +1,16 @@
1
+ import { type ValueModeStrings } from './value-mode-strings';
2
+ export interface ValueModeSwitchDialogProps {
3
+ open: boolean;
4
+ onConfirm: () => void;
5
+ onCancel: () => void;
6
+ /** Replaces `strings.lossyTitle`, for a switch whose loss the codec describes itself. */
7
+ title?: string;
8
+ /** Replaces `strings.lossyDescription`. */
9
+ description?: string;
10
+ /** Replaces `strings.confirm`, such as Replace for a value about to be overwritten. */
11
+ confirmLabel?: string;
12
+ /** Overrides for any subset of the English strings. */
13
+ strings?: Partial<ValueModeStrings>;
14
+ }
15
+ /** 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;
@@ -0,0 +1,39 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "../alert-dialog.js";
3
+ import { DEFAULT_VALUE_MODE_STRINGS } from "./value-mode-strings.js";
4
+ function ValueModeSwitchDialog({ open, onConfirm, onCancel, title, description, confirmLabel, strings }) {
5
+ const text = {
6
+ ...DEFAULT_VALUE_MODE_STRINGS,
7
+ ...strings
8
+ };
9
+ return /*#__PURE__*/ jsx(AlertDialog, {
10
+ open: open,
11
+ onOpenChange: (next)=>!next && onCancel(),
12
+ children: /*#__PURE__*/ jsxs(AlertDialogContent, {
13
+ children: [
14
+ /*#__PURE__*/ jsxs(AlertDialogHeader, {
15
+ children: [
16
+ /*#__PURE__*/ jsx(AlertDialogTitle, {
17
+ children: title ?? text.lossyTitle
18
+ }),
19
+ /*#__PURE__*/ jsx(AlertDialogDescription, {
20
+ children: description ?? text.lossyDescription
21
+ })
22
+ ]
23
+ }),
24
+ /*#__PURE__*/ jsxs(AlertDialogFooter, {
25
+ children: [
26
+ /*#__PURE__*/ jsx(AlertDialogCancel, {
27
+ children: text.cancel
28
+ }),
29
+ /*#__PURE__*/ jsx(AlertDialogAction, {
30
+ onClick: onConfirm,
31
+ children: confirmLabel ?? text.confirm
32
+ })
33
+ ]
34
+ })
35
+ ]
36
+ })
37
+ });
38
+ }
39
+ export { ValueModeSwitchDialog };
@@ -93,7 +93,7 @@ const FormFieldError = /*#__PURE__*/ external_react_namespaceObject.forwardRef((
93
93
  });
94
94
  });
95
95
  FormFieldError.displayName = 'FormFieldError';
96
- const FormFieldHeader = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ label, htmlFor, required, tooltip, tooltipAriaLabel, leading, badge, actions, variant = 'default', className, ...props }, ref)=>{
96
+ const FormFieldHeader = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ label, labelId, htmlFor, required, tooltip, tooltipAriaLabel, leading, badge, actions, variant = 'default', className, ...props }, ref)=>{
97
97
  if (!label && !actions) return null;
98
98
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
99
99
  ref: ref,
@@ -106,6 +106,7 @@ const FormFieldHeader = /*#__PURE__*/ external_react_namespaceObject.forwardRef(
106
106
  children: [
107
107
  leading,
108
108
  label && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormFieldLabel, {
109
+ id: labelId,
109
110
  htmlFor: htmlFor,
110
111
  required: required,
111
112
  tooltip: tooltip,
@@ -51,6 +51,8 @@ export type FormFieldErrorProps = React.ComponentPropsWithoutRef<'p'>;
51
51
  declare const FormFieldError: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
52
52
  export interface FormFieldHeaderProps extends Pick<FormFieldLabelProps, 'htmlFor' | 'required' | 'tooltip' | 'tooltipAriaLabel'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
53
53
  label?: React.ReactNode;
54
+ /** The label element's id, for a control that names itself with `aria-labelledby`. */
55
+ labelId?: string;
54
56
  /** Ahead of the label, such as a type glyph. Never opens the row on its own. */
55
57
  leading?: React.ReactNode;
56
58
  /** After the label, such as a spelled-out type chip. Never opens the row on its own. */
@@ -61,7 +61,7 @@ const FormFieldError = /*#__PURE__*/ forwardRef(({ children, className, ...props
61
61
  });
62
62
  });
63
63
  FormFieldError.displayName = 'FormFieldError';
64
- const FormFieldHeader = /*#__PURE__*/ forwardRef(({ label, htmlFor, required, tooltip, tooltipAriaLabel, leading, badge, actions, variant = 'default', className, ...props }, ref)=>{
64
+ const FormFieldHeader = /*#__PURE__*/ forwardRef(({ label, labelId, htmlFor, required, tooltip, tooltipAriaLabel, leading, badge, actions, variant = 'default', className, ...props }, ref)=>{
65
65
  if (!label && !actions) return null;
66
66
  return /*#__PURE__*/ jsxs("div", {
67
67
  ref: ref,
@@ -74,6 +74,7 @@ const FormFieldHeader = /*#__PURE__*/ forwardRef(({ label, htmlFor, required, to
74
74
  children: [
75
75
  leading,
76
76
  label && /*#__PURE__*/ jsx(FormFieldLabel, {
77
+ id: labelId,
77
78
  htmlFor: htmlFor,
78
79
  required: required,
79
80
  tooltip: tooltip,