@uipath/apollo-wind 2.36.1 → 2.37.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 (172) hide show
  1. package/dist/components/custom/flow-properties-simple.cjs +1 -0
  2. package/dist/components/custom/flow-properties-simple.js +1 -0
  3. package/dist/components/custom/panel-delegate.cjs +1 -1
  4. package/dist/components/custom/panel-delegate.js +1 -1
  5. package/dist/components/custom/panel-flow.cjs +2 -1
  6. package/dist/components/custom/panel-flow.js +2 -1
  7. package/dist/components/forms/field-renderer.cjs +1 -0
  8. package/dist/components/forms/field-renderer.js +1 -0
  9. package/dist/components/forms/form-designer.cjs +25 -9
  10. package/dist/components/forms/form-designer.js +25 -9
  11. package/dist/components/forms/form-examples.cjs +1 -1
  12. package/dist/components/forms/form-examples.js +1 -1
  13. package/dist/components/forms/form-state-viewer.cjs +4 -7
  14. package/dist/components/forms/form-state-viewer.js +4 -7
  15. package/dist/components/ui/accordion.cjs +9 -1
  16. package/dist/components/ui/accordion.d.ts +1 -1
  17. package/dist/components/ui/accordion.js +9 -1
  18. package/dist/components/ui/alert-dialog.cjs +25 -4
  19. package/dist/components/ui/alert-dialog.d.ts +9 -3
  20. package/dist/components/ui/alert-dialog.js +25 -4
  21. package/dist/components/ui/alert.cjs +3 -0
  22. package/dist/components/ui/alert.js +3 -0
  23. package/dist/components/ui/aspect-ratio.cjs +8 -1
  24. package/dist/components/ui/aspect-ratio.d.ts +2 -1
  25. package/dist/components/ui/aspect-ratio.js +8 -1
  26. package/dist/components/ui/avatar.cjs +25 -4
  27. package/dist/components/ui/avatar.d.ts +8 -2
  28. package/dist/components/ui/avatar.js +21 -3
  29. package/dist/components/ui/badge.cjs +1 -0
  30. package/dist/components/ui/badge.js +1 -0
  31. package/dist/components/ui/breadcrumb.cjs +7 -0
  32. package/dist/components/ui/breadcrumb.js +7 -0
  33. package/dist/components/ui/button-group.cjs +3 -0
  34. package/dist/components/ui/button-group.js +3 -0
  35. package/dist/components/ui/button.cjs +1 -0
  36. package/dist/components/ui/button.js +1 -0
  37. package/dist/components/ui/card.cjs +6 -0
  38. package/dist/components/ui/card.js +6 -0
  39. package/dist/components/ui/checkbox.cjs +1 -0
  40. package/dist/components/ui/checkbox.js +1 -0
  41. package/dist/components/ui/collapsible.cjs +20 -3
  42. package/dist/components/ui/collapsible.d.ts +4 -3
  43. package/dist/components/ui/collapsible.js +20 -3
  44. package/dist/components/ui/combobox.cjs +5 -3
  45. package/dist/components/ui/combobox.d.ts +2 -1
  46. package/dist/components/ui/combobox.js +6 -4
  47. package/dist/components/ui/command.cjs +9 -0
  48. package/dist/components/ui/command.js +9 -0
  49. package/dist/components/ui/context-menu.cjs +42 -6
  50. package/dist/components/ui/context-menu.d.ts +15 -6
  51. package/dist/components/ui/context-menu.js +42 -6
  52. package/dist/components/ui/data-table.cjs +2 -0
  53. package/dist/components/ui/data-table.js +2 -0
  54. package/dist/components/ui/date-picker.cjs +11 -6
  55. package/dist/components/ui/date-picker.d.ts +3 -3
  56. package/dist/components/ui/date-picker.js +10 -5
  57. package/dist/components/ui/datetime-picker.cjs +5 -3
  58. package/dist/components/ui/datetime-picker.d.ts +2 -1
  59. package/dist/components/ui/datetime-picker.js +6 -4
  60. package/dist/components/ui/dialog.cjs +1 -1
  61. package/dist/components/ui/dialog.js +1 -1
  62. package/dist/components/ui/drawer.cjs +29 -5
  63. package/dist/components/ui/drawer.d.ts +11 -4
  64. package/dist/components/ui/drawer.js +29 -5
  65. package/dist/components/ui/dropdown-menu.cjs +42 -6
  66. package/dist/components/ui/dropdown-menu.d.ts +15 -6
  67. package/dist/components/ui/dropdown-menu.js +42 -6
  68. package/dist/components/ui/editable-cell.cjs +2 -0
  69. package/dist/components/ui/editable-cell.js +2 -0
  70. package/dist/components/ui/empty-state.cjs +1 -0
  71. package/dist/components/ui/empty-state.js +1 -0
  72. package/dist/components/ui/file-upload.cjs +12 -4
  73. package/dist/components/ui/file-upload.d.ts +4 -1
  74. package/dist/components/ui/file-upload.js +13 -5
  75. package/dist/components/ui/hover-card.cjs +12 -2
  76. package/dist/components/ui/hover-card.d.ts +5 -2
  77. package/dist/components/ui/hover-card.js +12 -2
  78. package/dist/components/ui/index.cjs +193 -143
  79. package/dist/components/ui/index.d.ts +5 -0
  80. package/dist/components/ui/index.js +5 -0
  81. package/dist/components/ui/input-group.cjs +59 -15
  82. package/dist/components/ui/input-group.d.ts +5 -1
  83. package/dist/components/ui/input-group.js +61 -17
  84. package/dist/components/ui/input.cjs +31 -6
  85. package/dist/components/ui/input.d.ts +7 -0
  86. package/dist/components/ui/input.js +33 -8
  87. package/dist/components/ui/label.cjs +1 -0
  88. package/dist/components/ui/label.js +1 -0
  89. package/dist/components/ui/layout/column.cjs +1 -0
  90. package/dist/components/ui/layout/column.js +1 -0
  91. package/dist/components/ui/layout/grid.cjs +1 -0
  92. package/dist/components/ui/layout/grid.js +1 -0
  93. package/dist/components/ui/layout/row.cjs +1 -0
  94. package/dist/components/ui/layout/row.js +1 -0
  95. package/dist/components/ui/lockable-value-field/lockable-value-field.cjs +38 -5
  96. package/dist/components/ui/lockable-value-field/lockable-value-field.d.ts +1 -1
  97. package/dist/components/ui/lockable-value-field/lockable-value-field.js +38 -5
  98. package/dist/components/ui/lockable-value-field/types.d.ts +9 -1
  99. package/dist/components/ui/multi-select.cjs +5 -1
  100. package/dist/components/ui/multi-select.d.ts +3 -0
  101. package/dist/components/ui/multi-select.js +5 -1
  102. package/dist/components/ui/pagination.cjs +7 -0
  103. package/dist/components/ui/pagination.js +7 -0
  104. package/dist/components/ui/popover.cjs +18 -3
  105. package/dist/components/ui/popover.d.ts +6 -3
  106. package/dist/components/ui/popover.js +18 -3
  107. package/dist/components/ui/progress.cjs +1 -0
  108. package/dist/components/ui/progress.js +1 -0
  109. package/dist/components/ui/prompt-editor/components/EditorToolbar.cjs +5 -2
  110. package/dist/components/ui/prompt-editor/components/EditorToolbar.js +5 -2
  111. package/dist/components/ui/radio-group.cjs +2 -0
  112. package/dist/components/ui/radio-group.js +2 -0
  113. package/dist/components/ui/resizable.cjs +2 -0
  114. package/dist/components/ui/resizable.js +2 -0
  115. package/dist/components/ui/scroll-area.cjs +2 -0
  116. package/dist/components/ui/scroll-area.js +2 -0
  117. package/dist/components/ui/search.cjs +2 -0
  118. package/dist/components/ui/search.js +2 -0
  119. package/dist/components/ui/select.cjs +24 -3
  120. package/dist/components/ui/select.d.ts +6 -3
  121. package/dist/components/ui/select.js +24 -3
  122. package/dist/components/ui/separator.cjs +1 -0
  123. package/dist/components/ui/separator.js +1 -0
  124. package/dist/components/ui/sheet.cjs +29 -5
  125. package/dist/components/ui/sheet.d.ts +10 -4
  126. package/dist/components/ui/sheet.js +29 -5
  127. package/dist/components/ui/skeleton.cjs +1 -0
  128. package/dist/components/ui/skeleton.js +1 -0
  129. package/dist/components/ui/slider.cjs +1 -0
  130. package/dist/components/ui/slider.js +1 -0
  131. package/dist/components/ui/sonner.cjs +1 -0
  132. package/dist/components/ui/sonner.js +1 -0
  133. package/dist/components/ui/spinner.cjs +1 -0
  134. package/dist/components/ui/spinner.js +1 -0
  135. package/dist/components/ui/stats-card.cjs +26 -12
  136. package/dist/components/ui/stats-card.d.ts +6 -3
  137. package/dist/components/ui/stats-card.js +22 -11
  138. package/dist/components/ui/stepper.cjs +1 -0
  139. package/dist/components/ui/stepper.js +1 -0
  140. package/dist/components/ui/switch.cjs +1 -0
  141. package/dist/components/ui/switch.js +1 -0
  142. package/dist/components/ui/table.cjs +9 -0
  143. package/dist/components/ui/table.js +9 -0
  144. package/dist/components/ui/tabs.cjs +10 -1
  145. package/dist/components/ui/tabs.d.ts +1 -1
  146. package/dist/components/ui/tabs.js +10 -1
  147. package/dist/components/ui/textarea.cjs +1 -0
  148. package/dist/components/ui/textarea.js +1 -0
  149. package/dist/components/ui/toggle-group.cjs +2 -0
  150. package/dist/components/ui/toggle-group.js +2 -0
  151. package/dist/components/ui/toggle.cjs +1 -0
  152. package/dist/components/ui/toggle.js +1 -0
  153. package/dist/components/ui/tooltip.cjs +22 -4
  154. package/dist/components/ui/tooltip.d.ts +13 -4
  155. package/dist/components/ui/tooltip.js +22 -4
  156. package/dist/components/ui/tree-view.cjs +17 -9
  157. package/dist/components/ui/tree-view.d.ts +2 -1
  158. package/dist/components/ui/tree-view.js +18 -10
  159. package/dist/foundation/Future/index.cjs +107 -0
  160. package/dist/foundation/Future/index.d.ts +8 -0
  161. package/dist/foundation/Future/index.js +8 -0
  162. package/dist/foundation/index.cjs +58 -0
  163. package/dist/foundation/index.d.ts +1 -0
  164. package/dist/foundation/index.js +1 -0
  165. package/dist/index.cjs +52 -2
  166. package/dist/index.d.ts +3 -0
  167. package/dist/index.js +3 -1
  168. package/dist/styles.css +208 -128
  169. package/package.json +2 -5
  170. package/dist/components/UiPath/index.cjs +0 -5
  171. package/dist/components/UiPath/index.d.ts +0 -1
  172. package/dist/components/UiPath/index.js +0 -0
@@ -9,6 +9,7 @@ export * from './button';
9
9
  export * from './button-group';
10
10
  export * from './calendar';
11
11
  export * from './card';
12
+ export * from './chart';
12
13
  export * from './checkbox';
13
14
  export * from './collapsible';
14
15
  export * from './combobox';
@@ -18,6 +19,7 @@ export * from './data-table';
18
19
  export * from './date-picker';
19
20
  export * from './datetime-picker';
20
21
  export * from './dialog';
22
+ export * from './drawer';
21
23
  export * from './dropdown-menu';
22
24
  export * from './editable-cell';
23
25
  export * from './empty-state';
@@ -27,9 +29,11 @@ export * from './input';
27
29
  export * from './input-group';
28
30
  export * from './label';
29
31
  export * from './layout';
32
+ export * from './lockable-value-field';
30
33
  export * from './multi-select';
31
34
  export * from './pagination';
32
35
  export * from './popover';
36
+ export * from './portal-container';
33
37
  export * from './progress';
34
38
  export * from './prompt-editor';
35
39
  export * from './radio-group';
@@ -52,5 +56,6 @@ export * from './textarea';
52
56
  export * from './toggle';
53
57
  export * from './toggle-group';
54
58
  export * from './tooltip';
59
+ export * from './variable-picker';
55
60
  export type { TreeViewIconMap, TreeViewItem, TreeViewItemAction, TreeViewMenuItem, TreeViewProps, TreeViewSelectionMode, } from './tree-view';
56
61
  export { default as TreeView } from './tree-view';
@@ -10,6 +10,7 @@ export * from "./button.js";
10
10
  export * from "./button-group.js";
11
11
  export * from "./calendar.js";
12
12
  export * from "./card.js";
13
+ export * from "./chart.js";
13
14
  export * from "./checkbox.js";
14
15
  export * from "./collapsible.js";
15
16
  export * from "./combobox.js";
@@ -19,6 +20,7 @@ export * from "./data-table.js";
19
20
  export * from "./date-picker.js";
20
21
  export * from "./datetime-picker.js";
21
22
  export * from "./dialog.js";
23
+ export * from "./drawer.js";
22
24
  export * from "./dropdown-menu.js";
23
25
  export * from "./editable-cell.js";
24
26
  export * from "./empty-state.js";
@@ -28,9 +30,11 @@ export * from "./input.js";
28
30
  export * from "./input-group.js";
29
31
  export * from "./label.js";
30
32
  export * from "./layout/index.js";
33
+ export * from "./lockable-value-field/index.js";
31
34
  export * from "./multi-select.js";
32
35
  export * from "./pagination.js";
33
36
  export * from "./popover.js";
37
+ export * from "./portal-container.js";
34
38
  export * from "./progress.js";
35
39
  export * from "./prompt-editor/index.js";
36
40
  export * from "./radio-group.js";
@@ -53,4 +57,5 @@ export * from "./textarea.js";
53
57
  export * from "./toggle.js";
54
58
  export * from "./toggle-group.js";
55
59
  export * from "./tooltip.js";
60
+ export * from "./variable-picker/index.js";
56
61
  export { tree_view as TreeView };
@@ -38,12 +38,33 @@ const external_button_cjs_namespaceObject = require("./button.cjs");
38
38
  const external_input_cjs_namespaceObject = require("./input.cjs");
39
39
  const external_textarea_cjs_namespaceObject = require("./textarea.cjs");
40
40
  const index_cjs_namespaceObject = require("../../lib/index.cjs");
41
- const InputGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, variant = 'default', size = 'default', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
42
- ref: ref,
43
- role: "group",
44
- className: (0, index_cjs_namespaceObject.cn)('group/input-group relative flex w-full items-center gap-2 transition-colors has-[>textarea]:h-auto has-[>textarea]:items-start', 'default' === size && 'h-9 rounded-md px-3 py-1 future:h-10 future:rounded-xl future:py-2', 'xs' === size && 'h-6 gap-1 rounded px-2', 'default' === variant && 'border border-input bg-transparent future:border-0 future:bg-surface-overlay', 'ghost' === variant && 'border-0 bg-surface-overlay', 'has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring future:has-[[data-slot=input-group-control]:focus-visible]:ring-offset-2 future:has-[[data-slot=input-group-control]:focus-visible]:ring-offset-background', 'has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20', 'has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed has-[[data-slot=input-group-control]:disabled]:opacity-50', className),
45
- ...props
46
- }));
41
+ const InputGroupValidationContext = /*#__PURE__*/ external_react_namespaceObject.createContext({});
42
+ const InputGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, error, errorId, variant = 'default', size = 'default', ...props }, ref)=>{
43
+ const generatedId = external_react_namespaceObject.useId();
44
+ const validationId = errorId ?? `input-group-${generatedId.replace(/:/g, '')}-error`;
45
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(InputGroupValidationContext.Provider, {
46
+ value: {
47
+ error,
48
+ errorId: validationId
49
+ },
50
+ children: [
51
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
52
+ ref: ref,
53
+ role: "group",
54
+ className: (0, index_cjs_namespaceObject.cn)('group/input-group relative flex w-full items-center gap-2 transition-colors has-[>textarea]:h-auto has-[>textarea]:items-start', 'default' === size && 'h-9 rounded-md px-3 py-1 future:h-10 future:rounded-xl future:py-2', 'xs' === size && 'h-6 gap-1 rounded px-2', 'default' === variant && 'border border-input bg-transparent future:border-0 future:bg-surface-overlay', 'ghost' === variant && 'border-0 bg-surface-overlay', 'has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring future:has-[[data-slot=input-group-control]:focus-visible]:ring-offset-2 future:has-[[data-slot=input-group-control]:focus-visible]:ring-offset-background', 'has-[[data-slot][aria-invalid=true]]:border-error has-[[data-slot][aria-invalid=true]]:ring-error/20 future:has-[[data-slot][aria-invalid=true]]:ring-1 future:has-[[data-slot][aria-invalid=true]]:ring-error/40', error && 'border-error ring-error/20 future:ring-1 future:ring-error/40', 'has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed has-[[data-slot=input-group-control]:disabled]:opacity-50', className),
55
+ ...props
56
+ }),
57
+ error && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
58
+ id: validationId,
59
+ "data-slot": "input-group-error",
60
+ "aria-live": "polite",
61
+ "aria-atomic": "true",
62
+ className: "mt-1 text-xs leading-4 text-error",
63
+ children: error
64
+ })
65
+ ]
66
+ });
67
+ });
47
68
  InputGroup.displayName = 'InputGroup';
48
69
  const inputGroupAddonVariants = (0, external_class_variance_authority_namespaceObject.cva)('flex h-auto cursor-text items-center justify-center gap-1 text-sm text-muted-foreground select-none group-has-[[data-slot=input-group-control]:disabled]/input-group:opacity-50 [&>svg:not([class*="size-"])]:size-4', {
49
70
  variants: {
@@ -86,19 +107,42 @@ const InputGroupText = /*#__PURE__*/ external_react_namespaceObject.forwardRef((
86
107
  ...props
87
108
  }));
88
109
  InputGroupText.displayName = 'InputGroupText';
89
- const InputGroupInput = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
90
- ref: ref,
91
- "data-slot": "input-group-control",
92
- className: (0, index_cjs_namespaceObject.cn)('h-full flex-1 rounded-none border-0 bg-transparent p-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 future:h-full future:rounded-none future:border-0 future:bg-transparent future:p-0 future:focus-visible:ring-offset-0', className),
93
- ...props
94
- }));
110
+ const InputGroupInput = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, className, ...props }, ref)=>{
111
+ const validation = external_react_namespaceObject.useContext(InputGroupValidationContext);
112
+ const describedBy = [
113
+ ariaDescribedBy,
114
+ validation.error ? validation.errorId : void 0
115
+ ].filter(Boolean).join(' ');
116
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
117
+ className: "min-w-0 flex-1",
118
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
119
+ ref: ref,
120
+ "data-slot": "input-group-control",
121
+ "aria-describedby": describedBy || void 0,
122
+ "aria-errormessage": validation.error ? validation.errorId : ariaErrorMessage,
123
+ "aria-invalid": validation.error ? true : ariaInvalid,
124
+ className: (0, index_cjs_namespaceObject.cn)('h-full w-full rounded-none !border-0 !ring-0 bg-transparent p-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 future:h-full future:rounded-none future:border-0 future:bg-transparent future:p-0 future:focus-visible:ring-offset-0', className),
125
+ ...props
126
+ })
127
+ });
128
+ });
95
129
  InputGroupInput.displayName = 'InputGroupInput';
96
- const InputGroupTextarea = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_textarea_cjs_namespaceObject.Textarea, {
130
+ const InputGroupTextarea = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, className, ...props }, ref)=>{
131
+ const validation = external_react_namespaceObject.useContext(InputGroupValidationContext);
132
+ const describedBy = [
133
+ ariaDescribedBy,
134
+ validation.error ? validation.errorId : void 0
135
+ ].filter(Boolean).join(' ');
136
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_textarea_cjs_namespaceObject.Textarea, {
97
137
  ref: ref,
98
138
  "data-slot": "input-group-control",
99
- className: (0, index_cjs_namespaceObject.cn)('min-h-0 flex-1 resize-none rounded-none border-0 bg-transparent p-0 py-2 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 future:rounded-none future:border-0 future:bg-transparent future:focus-visible:ring-offset-0', className),
139
+ "aria-describedby": describedBy || void 0,
140
+ "aria-errormessage": validation.error ? validation.errorId : ariaErrorMessage,
141
+ "aria-invalid": validation.error ? true : ariaInvalid,
142
+ className: (0, index_cjs_namespaceObject.cn)('min-h-0 flex-1 resize-none rounded-none !border-0 !ring-0 bg-transparent p-0 py-2 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 future:rounded-none future:border-0 future:bg-transparent future:focus-visible:ring-offset-0', className),
100
143
  ...props
101
- }));
144
+ });
145
+ });
102
146
  InputGroupTextarea.displayName = 'InputGroupTextarea';
103
147
  exports.InputGroup = __webpack_exports__.InputGroup;
104
148
  exports.InputGroupAddon = __webpack_exports__.InputGroupAddon;
@@ -6,6 +6,10 @@ import { type TextareaProps } from './textarea';
6
6
  export interface InputGroupProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  variant?: 'default' | 'ghost';
8
8
  size?: 'default' | 'xs';
9
+ /** Field-specific validation feedback rendered below the grouped control. */
10
+ error?: React.ReactNode;
11
+ /** Optional id for the inline validation message. */
12
+ errorId?: string;
9
13
  }
10
14
  declare const InputGroup: React.ForwardRefExoticComponent<InputGroupProps & React.RefAttributes<HTMLDivElement>>;
11
15
  declare const inputGroupAddonVariants: (props?: ({
@@ -20,7 +24,7 @@ declare const InputGroupButton: React.ForwardRefExoticComponent<InputGroupButton
20
24
  export interface InputGroupTextProps extends React.HTMLAttributes<HTMLSpanElement> {
21
25
  }
22
26
  declare const InputGroupText: React.ForwardRefExoticComponent<InputGroupTextProps & React.RefAttributes<HTMLSpanElement>>;
23
- export interface InputGroupInputProps extends Omit<InputProps, 'variant' | 'size'> {
27
+ export interface InputGroupInputProps extends Omit<InputProps, 'variant' | 'size' | 'error' | 'errorId'> {
24
28
  }
25
29
  declare const InputGroupInput: React.ForwardRefExoticComponent<InputGroupInputProps & React.RefAttributes<HTMLInputElement>>;
26
30
  export interface InputGroupTextareaProps extends Omit<TextareaProps, 'variant'> {
@@ -1,16 +1,37 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
- import { forwardRef } from "react";
3
+ import { createContext, forwardRef, useContext, useId } from "react";
4
4
  import { Button } from "./button.js";
5
5
  import { Input } from "./input.js";
6
6
  import { Textarea } from "./textarea.js";
7
7
  import { cn } from "../../lib/index.js";
8
- const InputGroup = /*#__PURE__*/ forwardRef(({ className, variant = 'default', size = 'default', ...props }, ref)=>/*#__PURE__*/ jsx("div", {
9
- ref: ref,
10
- role: "group",
11
- className: cn('group/input-group relative flex w-full items-center gap-2 transition-colors has-[>textarea]:h-auto has-[>textarea]:items-start', 'default' === size && 'h-9 rounded-md px-3 py-1 future:h-10 future:rounded-xl future:py-2', 'xs' === size && 'h-6 gap-1 rounded px-2', 'default' === variant && 'border border-input bg-transparent future:border-0 future:bg-surface-overlay', 'ghost' === variant && 'border-0 bg-surface-overlay', 'has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring future:has-[[data-slot=input-group-control]:focus-visible]:ring-offset-2 future:has-[[data-slot=input-group-control]:focus-visible]:ring-offset-background', 'has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20', 'has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed has-[[data-slot=input-group-control]:disabled]:opacity-50', className),
12
- ...props
13
- }));
8
+ const InputGroupValidationContext = /*#__PURE__*/ createContext({});
9
+ const InputGroup = /*#__PURE__*/ forwardRef(({ className, error, errorId, variant = 'default', size = 'default', ...props }, ref)=>{
10
+ const generatedId = useId();
11
+ const validationId = errorId ?? `input-group-${generatedId.replace(/:/g, '')}-error`;
12
+ return /*#__PURE__*/ jsxs(InputGroupValidationContext.Provider, {
13
+ value: {
14
+ error,
15
+ errorId: validationId
16
+ },
17
+ children: [
18
+ /*#__PURE__*/ jsx("div", {
19
+ ref: ref,
20
+ role: "group",
21
+ className: cn('group/input-group relative flex w-full items-center gap-2 transition-colors has-[>textarea]:h-auto has-[>textarea]:items-start', 'default' === size && 'h-9 rounded-md px-3 py-1 future:h-10 future:rounded-xl future:py-2', 'xs' === size && 'h-6 gap-1 rounded px-2', 'default' === variant && 'border border-input bg-transparent future:border-0 future:bg-surface-overlay', 'ghost' === variant && 'border-0 bg-surface-overlay', 'has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring future:has-[[data-slot=input-group-control]:focus-visible]:ring-offset-2 future:has-[[data-slot=input-group-control]:focus-visible]:ring-offset-background', 'has-[[data-slot][aria-invalid=true]]:border-error has-[[data-slot][aria-invalid=true]]:ring-error/20 future:has-[[data-slot][aria-invalid=true]]:ring-1 future:has-[[data-slot][aria-invalid=true]]:ring-error/40', error && 'border-error ring-error/20 future:ring-1 future:ring-error/40', 'has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed has-[[data-slot=input-group-control]:disabled]:opacity-50', className),
22
+ ...props
23
+ }),
24
+ error && /*#__PURE__*/ jsx("p", {
25
+ id: validationId,
26
+ "data-slot": "input-group-error",
27
+ "aria-live": "polite",
28
+ "aria-atomic": "true",
29
+ className: "mt-1 text-xs leading-4 text-error",
30
+ children: error
31
+ })
32
+ ]
33
+ });
34
+ });
14
35
  InputGroup.displayName = 'InputGroup';
15
36
  const inputGroupAddonVariants = cva('flex h-auto cursor-text items-center justify-center gap-1 text-sm text-muted-foreground select-none group-has-[[data-slot=input-group-control]:disabled]/input-group:opacity-50 [&>svg:not([class*="size-"])]:size-4', {
16
37
  variants: {
@@ -53,18 +74,41 @@ const InputGroupText = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>
53
74
  ...props
54
75
  }));
55
76
  InputGroupText.displayName = 'InputGroupText';
56
- const InputGroupInput = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Input, {
57
- ref: ref,
58
- "data-slot": "input-group-control",
59
- className: cn('h-full flex-1 rounded-none border-0 bg-transparent p-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 future:h-full future:rounded-none future:border-0 future:bg-transparent future:p-0 future:focus-visible:ring-offset-0', className),
60
- ...props
61
- }));
77
+ const InputGroupInput = /*#__PURE__*/ forwardRef(({ 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, className, ...props }, ref)=>{
78
+ const validation = useContext(InputGroupValidationContext);
79
+ const describedBy = [
80
+ ariaDescribedBy,
81
+ validation.error ? validation.errorId : void 0
82
+ ].filter(Boolean).join(' ');
83
+ return /*#__PURE__*/ jsx("div", {
84
+ className: "min-w-0 flex-1",
85
+ children: /*#__PURE__*/ jsx(Input, {
86
+ ref: ref,
87
+ "data-slot": "input-group-control",
88
+ "aria-describedby": describedBy || void 0,
89
+ "aria-errormessage": validation.error ? validation.errorId : ariaErrorMessage,
90
+ "aria-invalid": validation.error ? true : ariaInvalid,
91
+ className: cn('h-full w-full rounded-none !border-0 !ring-0 bg-transparent p-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 future:h-full future:rounded-none future:border-0 future:bg-transparent future:p-0 future:focus-visible:ring-offset-0', className),
92
+ ...props
93
+ })
94
+ });
95
+ });
62
96
  InputGroupInput.displayName = 'InputGroupInput';
63
- const InputGroupTextarea = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Textarea, {
97
+ const InputGroupTextarea = /*#__PURE__*/ forwardRef(({ 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, className, ...props }, ref)=>{
98
+ const validation = useContext(InputGroupValidationContext);
99
+ const describedBy = [
100
+ ariaDescribedBy,
101
+ validation.error ? validation.errorId : void 0
102
+ ].filter(Boolean).join(' ');
103
+ return /*#__PURE__*/ jsx(Textarea, {
64
104
  ref: ref,
65
105
  "data-slot": "input-group-control",
66
- className: cn('min-h-0 flex-1 resize-none rounded-none border-0 bg-transparent p-0 py-2 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 future:rounded-none future:border-0 future:bg-transparent future:focus-visible:ring-offset-0', className),
106
+ "aria-describedby": describedBy || void 0,
107
+ "aria-errormessage": validation.error ? validation.errorId : ariaErrorMessage,
108
+ "aria-invalid": validation.error ? true : ariaInvalid,
109
+ className: cn('min-h-0 flex-1 resize-none rounded-none !border-0 !ring-0 bg-transparent p-0 py-2 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 future:rounded-none future:border-0 future:bg-transparent future:focus-visible:ring-offset-0', className),
67
110
  ...props
68
- }));
111
+ });
112
+ });
69
113
  InputGroupTextarea.displayName = 'InputGroupTextarea';
70
114
  export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
@@ -29,12 +29,37 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
30
  const external_react_namespaceObject = require("react");
31
31
  const utils_cjs_namespaceObject = require("../../lib/utils.cjs");
32
- const Input = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, type, variant = 'default', size = 'default', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("input", {
33
- type: type,
34
- className: (0, utils_cjs_namespaceObject.cn)('flex w-full transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', 'default' === size && 'h-9 rounded-md px-3 py-1 text-base placeholder:text-muted-foreground md:text-sm', 'xs' === size && 'h-6 rounded px-2 text-xs placeholder:text-muted-foreground', 'default' === variant && 'border border-input bg-transparent', 'ghost' === variant && 'border-0 bg-surface-overlay', 'default' === variant && 'default' === size && 'future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:py-2 future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', className),
35
- ref: ref,
36
- ...props
37
- }));
32
+ const Input = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, className, error, errorId, id, type, variant = 'default', size = 'default', ...props }, ref)=>{
33
+ const generatedId = external_react_namespaceObject.useId();
34
+ const validationId = errorId ?? `${id ?? `input-${generatedId.replace(/:/g, '')}`}-error`;
35
+ const describedBy = [
36
+ ariaDescribedBy,
37
+ error ? validationId : void 0
38
+ ].filter(Boolean).join(' ');
39
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
40
+ children: [
41
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("input", {
42
+ type: type,
43
+ "data-slot": "input",
44
+ id: id,
45
+ ...props,
46
+ "aria-describedby": describedBy || void 0,
47
+ "aria-errormessage": error ? validationId : ariaErrorMessage,
48
+ "aria-invalid": error ? true : ariaInvalid,
49
+ className: (0, utils_cjs_namespaceObject.cn)('flex w-full transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-error aria-invalid:focus-visible:ring-error', 'default' === size && 'h-9 rounded-md px-3 py-1 text-base placeholder:text-muted-foreground md:text-sm', 'xs' === size && 'h-6 rounded px-2 text-xs placeholder:text-muted-foreground', 'default' === variant && 'border border-input bg-transparent', 'ghost' === variant && 'border-0 bg-surface-overlay', 'default' === variant && 'default' === size && 'future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:py-2 future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background future:aria-invalid:ring-1 future:aria-invalid:ring-error/40', className),
50
+ ref: ref
51
+ }),
52
+ error && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
53
+ id: validationId,
54
+ "data-slot": "input-error",
55
+ "aria-live": "polite",
56
+ "aria-atomic": "true",
57
+ className: "mt-1 text-xs leading-4 text-error",
58
+ children: error
59
+ })
60
+ ]
61
+ });
62
+ });
38
63
  Input.displayName = 'Input';
39
64
  exports.Input = __webpack_exports__.Input;
40
65
  for(var __rspack_i in __webpack_exports__)if (-1 === [
@@ -2,6 +2,13 @@ import * as React from 'react';
2
2
  export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
3
  variant?: 'default' | 'ghost';
4
4
  size?: 'default' | 'xs';
5
+ /**
6
+ * Field-specific feedback rendered immediately below the input.
7
+ * Keep the message focused on what went wrong and how to resolve it.
8
+ */
9
+ error?: React.ReactNode;
10
+ /** Optional id for the inline validation message. */
11
+ errorId?: string;
5
12
  }
6
13
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
7
14
  export { Input };
@@ -1,11 +1,36 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useId } from "react";
3
3
  import { cn } from "../../lib/utils.js";
4
- const Input = /*#__PURE__*/ forwardRef(({ className, type, variant = 'default', size = 'default', ...props }, ref)=>/*#__PURE__*/ jsx("input", {
5
- type: type,
6
- className: cn('flex w-full transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', 'default' === size && 'h-9 rounded-md px-3 py-1 text-base placeholder:text-muted-foreground md:text-sm', 'xs' === size && 'h-6 rounded px-2 text-xs placeholder:text-muted-foreground', 'default' === variant && 'border border-input bg-transparent', 'ghost' === variant && 'border-0 bg-surface-overlay', 'default' === variant && 'default' === size && 'future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:py-2 future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', className),
7
- ref: ref,
8
- ...props
9
- }));
4
+ const Input = /*#__PURE__*/ forwardRef(({ 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, className, error, errorId, id, type, variant = 'default', size = 'default', ...props }, ref)=>{
5
+ const generatedId = useId();
6
+ const validationId = errorId ?? `${id ?? `input-${generatedId.replace(/:/g, '')}`}-error`;
7
+ const describedBy = [
8
+ ariaDescribedBy,
9
+ error ? validationId : void 0
10
+ ].filter(Boolean).join(' ');
11
+ return /*#__PURE__*/ jsxs(Fragment, {
12
+ children: [
13
+ /*#__PURE__*/ jsx("input", {
14
+ type: type,
15
+ "data-slot": "input",
16
+ id: id,
17
+ ...props,
18
+ "aria-describedby": describedBy || void 0,
19
+ "aria-errormessage": error ? validationId : ariaErrorMessage,
20
+ "aria-invalid": error ? true : ariaInvalid,
21
+ className: cn('flex w-full transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-error aria-invalid:focus-visible:ring-error', 'default' === size && 'h-9 rounded-md px-3 py-1 text-base placeholder:text-muted-foreground md:text-sm', 'xs' === size && 'h-6 rounded px-2 text-xs placeholder:text-muted-foreground', 'default' === variant && 'border border-input bg-transparent', 'ghost' === variant && 'border-0 bg-surface-overlay', 'default' === variant && 'default' === size && 'future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:py-2 future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background future:aria-invalid:ring-1 future:aria-invalid:ring-error/40', className),
22
+ ref: ref
23
+ }),
24
+ error && /*#__PURE__*/ jsx("p", {
25
+ id: validationId,
26
+ "data-slot": "input-error",
27
+ "aria-live": "polite",
28
+ "aria-atomic": "true",
29
+ className: "mt-1 text-xs leading-4 text-error",
30
+ children: error
31
+ })
32
+ ]
33
+ });
34
+ });
10
35
  Input.displayName = 'Input';
11
36
  export { Input };
@@ -34,6 +34,7 @@ const index_cjs_namespaceObject = require("../../lib/index.cjs");
34
34
  const labelVariants = (0, external_class_variance_authority_namespaceObject.cva)('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
35
35
  const Label = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_label_namespaceObject.Root, {
36
36
  ref: ref,
37
+ "data-slot": "label",
37
38
  className: (0, index_cjs_namespaceObject.cn)(labelVariants(), className),
38
39
  ...props
39
40
  }));
@@ -6,6 +6,7 @@ import { cn } from "../../lib/index.js";
6
6
  const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
7
7
  const Label = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
8
8
  ref: ref,
9
+ "data-slot": "label",
9
10
  className: cn(labelVariants(), className),
10
11
  ...props
11
12
  }));
@@ -65,6 +65,7 @@ const Column = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ childr
65
65
  });
66
66
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
67
67
  ref: ref,
68
+ "data-slot": "column",
68
69
  className: (0, index_cjs_namespaceObject.cn)(className),
69
70
  style: {
70
71
  ...layoutStyles,
@@ -37,6 +37,7 @@ const Column = /*#__PURE__*/ forwardRef(({ children, className, style, direction
37
37
  });
38
38
  return /*#__PURE__*/ jsx("div", {
39
39
  ref: ref,
40
+ "data-slot": "column",
40
41
  className: cn(className),
41
42
  style: {
42
43
  ...layoutStyles,
@@ -85,6 +85,7 @@ const Grid = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ children
85
85
  };
86
86
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
87
87
  ref: ref,
88
+ "data-slot": "grid",
88
89
  className: (0, index_cjs_namespaceObject.cn)(...gridClasses, className),
89
90
  style: inlineStyles,
90
91
  ...htmlProps,
@@ -57,6 +57,7 @@ const Grid = /*#__PURE__*/ forwardRef(({ children, className, style, cols, rows,
57
57
  };
58
58
  return /*#__PURE__*/ jsx("div", {
59
59
  ref: ref,
60
+ "data-slot": "grid",
60
61
  className: cn(...gridClasses, className),
61
62
  style: inlineStyles,
62
63
  ...htmlProps,
@@ -65,6 +65,7 @@ const Row = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ children,
65
65
  });
66
66
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
67
67
  ref: ref,
68
+ "data-slot": "row",
68
69
  className: (0, index_cjs_namespaceObject.cn)(className),
69
70
  style: {
70
71
  ...layoutStyles,
@@ -37,6 +37,7 @@ const Row = /*#__PURE__*/ forwardRef(({ children, className, style, direction =
37
37
  });
38
38
  return /*#__PURE__*/ jsx("div", {
39
39
  ref: ref,
40
+ "data-slot": "row",
40
41
  className: cn(className),
41
42
  style: {
42
43
  ...layoutStyles,
@@ -44,11 +44,12 @@ const lock_toggle_button_cjs_namespaceObject = require("./components/lock-toggle
44
44
  const mode_menu_item_cjs_namespaceObject = require("./components/mode-menu-item.cjs");
45
45
  const external_types_cjs_namespaceObject = require("./types.cjs");
46
46
  const external_utils_cjs_namespaceObject = require("./utils.cjs");
47
- function LockableValueField({ value = '', onValueChange, onValueBlur, locked = true, onLockedChange, mode = 'fixed', onModeChange, renderExpressionEditor, fieldType = 'string', onFieldTypeChange, required, onRequiredChange, label, fileUploadAriaLabel, headerActions, compact, controlsVisibility = 'visible', showFieldActions = true, options = external_utils_cjs_namespaceObject.DEFAULT_SELECT_OPTIONS, onGenerateWithAi, variables = [], id, className }) {
48
- const generatedId = (0, external_react_namespaceObject.useId)();
47
+ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = true, onLockedChange, mode = 'fixed', onModeChange, renderExpressionEditor, fieldType = 'string', onFieldTypeChange, required, onRequiredChange, label, error, errorId, fileUploadAriaLabel, headerActions, compact, controlsVisibility = 'visible', showFieldActions = true, options = external_utils_cjs_namespaceObject.DEFAULT_SELECT_OPTIONS, onGenerateWithAi, variables = [], id, className }) {
48
+ const generatedId = (0, external_react_namespaceObject.useId)().replace(/:/g, '');
49
49
  const [datePopoverOpen, setDatePopoverOpen] = (0, external_react_namespaceObject.useState)(false);
50
50
  const [selectOpen, setSelectOpen] = (0, external_react_namespaceObject.useState)(false);
51
51
  const fieldId = id ?? generatedId;
52
+ const validationId = errorId ?? `${fieldId}-error`;
52
53
  const typeMeta = external_types_cjs_namespaceObject.FIELD_TYPE_META[fieldType];
53
54
  const effectiveMode = typeMeta.supportsExpression ? mode : 'fixed';
54
55
  const editableOnValueChange = locked ? void 0 : onValueChange;
@@ -77,6 +78,8 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
77
78
  headerActions: headerActions
78
79
  }),
79
80
  typeMeta.supportsExpression ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_input_group_cjs_namespaceObject.InputGroup, {
81
+ error: error,
82
+ errorId: validationId,
80
83
  children: [
81
84
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupAddon, {
82
85
  align: "inline-start",
@@ -92,7 +95,11 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
92
95
  onBlur: onValueBlur,
93
96
  readOnly: !editableOnValueChange,
94
97
  placeholder: fieldLabel,
95
- fieldType
98
+ fieldType,
99
+ 'aria-invalid': error ? true : void 0,
100
+ 'aria-describedby': error ? validationId : void 0,
101
+ 'aria-errormessage': error ? validationId : void 0,
102
+ 'data-slot': 'input-group-control'
96
103
  }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupInput, {
97
104
  id: fieldId,
98
105
  readOnly: !editableOnValueChange,
@@ -111,6 +118,9 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
111
118
  className: "flex h-full flex-1 items-center px-3",
112
119
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_switch_cjs_namespaceObject.Switch, {
113
120
  id: fieldId,
121
+ "aria-invalid": error ? true : void 0,
122
+ "aria-describedby": error ? validationId : void 0,
123
+ "aria-errormessage": error ? validationId : void 0,
114
124
  checked: 'true' === value,
115
125
  onCheckedChange: (checked)=>onValueChange?.(String(checked)),
116
126
  onBlur: onValueBlur,
@@ -129,6 +139,9 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
129
139
  type: "button",
130
140
  id: fieldId,
131
141
  "data-slot": "input-group-control",
142
+ "aria-invalid": error ? true : void 0,
143
+ "aria-describedby": error ? validationId : void 0,
144
+ "aria-errormessage": error ? validationId : void 0,
132
145
  disabled: !onValueChange,
133
146
  className: "flex h-full flex-1 items-center text-left text-sm text-foreground outline-none disabled:cursor-not-allowed disabled:opacity-50",
134
147
  children: value ? (0, external_utils_cjs_namespaceObject.formatDateValue)(value) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
@@ -204,6 +217,9 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
204
217
  }),
205
218
  locked ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
206
219
  id: fieldId,
220
+ "aria-invalid": error ? true : void 0,
221
+ "aria-describedby": error ? validationId : void 0,
222
+ "aria-errormessage": error ? validationId : void 0,
207
223
  readOnly: true,
208
224
  value: lockedDisplayValue,
209
225
  placeholder: fieldLabel,
@@ -222,6 +238,9 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
222
238
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_select_cjs_namespaceObject.SelectTrigger, {
223
239
  id: fieldId,
224
240
  className: "flex-1",
241
+ "aria-invalid": error ? true : void 0,
242
+ "aria-describedby": error ? validationId : void 0,
243
+ "aria-errormessage": error ? validationId : void 0,
225
244
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_select_cjs_namespaceObject.SelectValue, {
226
245
  placeholder: "Select an option"
227
246
  })
@@ -241,16 +260,30 @@ function LockableValueField({ value = '', onValueChange, onValueBlur, locked = t
241
260
  onChange: (selected)=>onValueChange?.(JSON.stringify(selected)),
242
261
  placeholder: "Select options...",
243
262
  disabled: !onValueChange,
244
- onBlur: onValueBlur
263
+ onBlur: onValueBlur,
264
+ "aria-invalid": error ? true : void 0,
265
+ "aria-describedby": error ? validationId : void 0,
266
+ "aria-errormessage": error ? validationId : void 0
245
267
  }) : 'file' === fieldType && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_file_upload_cjs_namespaceObject.FileUpload, {
246
268
  id: fieldId,
247
269
  ariaLabel: fileUploadAriaLabel ?? ('string' == typeof label ? label : fieldLabel),
248
270
  className: "flex-1",
249
271
  onFilesChange: (files)=>onValueChange?.(files.map((f)=>f.name).join(', ')),
250
272
  disabled: !onValueChange,
251
- onBlur: onValueBlur
273
+ onBlur: onValueBlur,
274
+ "aria-invalid": error ? true : void 0,
275
+ "aria-describedby": error ? validationId : void 0,
276
+ "aria-errormessage": error ? validationId : void 0
252
277
  })
253
278
  ]
279
+ }),
280
+ error && !typeMeta.supportsExpression && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
281
+ id: validationId,
282
+ "data-slot": "lockable-value-field-error",
283
+ "aria-live": "polite",
284
+ "aria-atomic": "true",
285
+ className: "mt-1 text-xs leading-4 text-error",
286
+ children: error
254
287
  })
255
288
  ]
256
289
  });
@@ -11,4 +11,4 @@ import type { LockableValueFieldProps } from './types';
11
11
  * Insert-variable menu is empty (and disabled) unless `variables` is
12
12
  * provided; file uploads aren't persisted anywhere.
13
13
  */
14
- export declare function LockableValueField({ value, onValueChange, onValueBlur, locked, onLockedChange, mode, onModeChange, renderExpressionEditor, fieldType, onFieldTypeChange, required, onRequiredChange, label, fileUploadAriaLabel, headerActions, compact, controlsVisibility, showFieldActions, options, onGenerateWithAi, variables, id, className, }: LockableValueFieldProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function LockableValueField({ value, onValueChange, onValueBlur, locked, onLockedChange, mode, onModeChange, renderExpressionEditor, fieldType, onFieldTypeChange, required, onRequiredChange, label, error, errorId, fileUploadAriaLabel, headerActions, compact, controlsVisibility, showFieldActions, options, onGenerateWithAi, variables, id, className, }: LockableValueFieldProps): import("react/jsx-runtime").JSX.Element;