@uipath/apollo-wind 2.52.3 → 2.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/components/forms/field-renderer.cjs +42 -3
  2. package/dist/components/forms/field-renderer.js +42 -3
  3. package/dist/components/forms/string-list-field.cjs +3 -0
  4. package/dist/components/forms/string-list-field.js +3 -0
  5. package/dist/components/ui/button.cjs +1 -1
  6. package/dist/components/ui/button.js +1 -1
  7. package/dist/components/ui/checkbox.cjs +1 -1
  8. package/dist/components/ui/checkbox.js +1 -1
  9. package/dist/components/ui/combobox.cjs +70 -51
  10. package/dist/components/ui/combobox.d.ts +12 -0
  11. package/dist/components/ui/combobox.js +72 -53
  12. package/dist/components/ui/date-picker.cjs +102 -62
  13. package/dist/components/ui/date-picker.d.ts +28 -0
  14. package/dist/components/ui/date-picker.js +103 -63
  15. package/dist/components/ui/datetime-picker.cjs +90 -72
  16. package/dist/components/ui/datetime-picker.d.ts +12 -2
  17. package/dist/components/ui/datetime-picker.js +92 -74
  18. package/dist/components/ui/file-upload.cjs +21 -8
  19. package/dist/components/ui/file-upload.d.ts +7 -0
  20. package/dist/components/ui/file-upload.js +22 -9
  21. package/dist/components/ui/form-field.cjs +3 -3
  22. package/dist/components/ui/form-field.d.ts +11 -0
  23. package/dist/components/ui/form-field.js +3 -3
  24. package/dist/components/ui/index.cjs +16 -16
  25. package/dist/components/ui/input-group.cjs +0 -2
  26. package/dist/components/ui/input-group.d.ts +1 -1
  27. package/dist/components/ui/input-group.js +0 -2
  28. package/dist/components/ui/input.cjs +0 -2
  29. package/dist/components/ui/input.js +0 -2
  30. package/dist/components/ui/lockable-value-field/lockable-value-field.cjs +1 -1
  31. package/dist/components/ui/lockable-value-field/lockable-value-field.js +1 -1
  32. package/dist/components/ui/multi-select.cjs +125 -112
  33. package/dist/components/ui/multi-select.d.ts +7 -0
  34. package/dist/components/ui/multi-select.js +126 -113
  35. package/dist/components/ui/prompt-editor/prompt-editor.cjs +0 -2
  36. package/dist/components/ui/prompt-editor/prompt-editor.js +0 -2
  37. package/dist/components/ui/radio-group.cjs +2 -2
  38. package/dist/components/ui/radio-group.js +2 -2
  39. package/dist/components/ui/search.cjs +3 -1
  40. package/dist/components/ui/search.d.ts +4 -0
  41. package/dist/components/ui/search.js +3 -1
  42. package/dist/components/ui/select.cjs +33 -12
  43. package/dist/components/ui/select.d.ts +10 -1
  44. package/dist/components/ui/select.js +35 -14
  45. package/dist/components/ui/slider.cjs +7 -2
  46. package/dist/components/ui/slider.js +7 -2
  47. package/dist/components/ui/switch.cjs +1 -1
  48. package/dist/components/ui/switch.js +1 -1
  49. package/dist/components/ui/textarea.cjs +30 -11
  50. package/dist/components/ui/textarea.d.ts +7 -0
  51. package/dist/components/ui/textarea.js +32 -13
  52. package/dist/components/ui/tooltip.cjs +1 -1
  53. package/dist/components/ui/tooltip.js +1 -1
  54. package/dist/index.cjs +4 -1
  55. package/dist/index.d.ts +5 -1
  56. package/dist/index.js +2 -2
  57. package/dist/styles.css +112 -24
  58. package/package.json +1 -1
@@ -240,12 +240,15 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
240
240
  placeholder: field.placeholder,
241
241
  disabled: disabled,
242
242
  "aria-invalid": error ? true : void 0,
243
+ "aria-describedby": error ? `${field.name}-error` : void 0,
244
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
243
245
  "aria-label": field.ariaLabel
244
246
  }),
245
247
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldDescription, {
246
248
  children: field.description
247
249
  }),
248
250
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
251
+ id: `${field.name}-error`,
249
252
  children: error
250
253
  })
251
254
  ]
@@ -273,12 +276,15 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
273
276
  placeholder: field.placeholder,
274
277
  disabled: disabled,
275
278
  "aria-invalid": error ? true : void 0,
279
+ "aria-describedby": error ? `${field.name}-error` : void 0,
280
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
276
281
  onChange: (e)=>formField.onChange(parseFloat(e.target.value))
277
282
  }),
278
283
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldDescription, {
279
284
  children: field.description
280
285
  }),
281
286
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
287
+ id: `${field.name}-error`,
282
288
  children: error
283
289
  })
284
290
  ]
@@ -304,6 +310,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
304
310
  disabled: disabled,
305
311
  maxLength: field.maxLength,
306
312
  "aria-invalid": error ? true : void 0,
313
+ "aria-describedby": error ? `${field.name}-error` : void 0,
314
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
307
315
  ...null != field.minRows ? {
308
316
  minRows: field.minRows
309
317
  } : {
@@ -314,6 +322,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
314
322
  children: field.description
315
323
  }),
316
324
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
325
+ id: `${field.name}-error`,
317
326
  children: error
318
327
  })
319
328
  ]
@@ -337,6 +346,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
337
346
  id: field.name,
338
347
  "aria-label": field.label,
339
348
  "aria-invalid": error ? true : void 0,
349
+ "aria-describedby": error ? `${field.name}-error` : void 0,
350
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
340
351
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(select_cjs_namespaceObject.SelectValue, {
341
352
  placeholder: field.placeholder || 'Select...'
342
353
  })
@@ -354,6 +365,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
354
365
  children: field.description
355
366
  }),
356
367
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
368
+ id: `${field.name}-error`,
357
369
  children: error
358
370
  })
359
371
  ]
@@ -381,12 +393,15 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
381
393
  emptyMessage: field.emptyMessage ?? 'No items found.',
382
394
  searchPlaceholder: field.searchPlaceholder ?? 'Search...',
383
395
  maxSelected: field.maxSelected,
384
- "aria-invalid": error ? true : void 0
396
+ "aria-invalid": error ? true : void 0,
397
+ "aria-describedby": error ? `${field.name}-error` : void 0,
398
+ "aria-errormessage": error ? `${field.name}-error` : void 0
385
399
  }),
386
400
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldDescription, {
387
401
  children: field.description
388
402
  }),
389
403
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
404
+ id: `${field.name}-error`,
390
405
  children: error
391
406
  })
392
407
  ]
@@ -402,6 +417,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
402
417
  onCheckedChange: (checked)=>formField.onChange(true === checked),
403
418
  disabled: disabled,
404
419
  "aria-invalid": error ? true : void 0,
420
+ "aria-describedby": error ? `${field.name}-error` : void 0,
421
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
405
422
  id: field.name
406
423
  }),
407
424
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
@@ -422,6 +439,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
422
439
  ]
423
440
  }),
424
441
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
442
+ id: `${field.name}-error`,
425
443
  children: error
426
444
  })
427
445
  ]
@@ -452,11 +470,14 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
452
470
  checked: true === formField.value,
453
471
  onCheckedChange: (checked)=>formField.onChange(true === checked),
454
472
  disabled: disabled,
455
- "aria-invalid": error ? true : void 0
473
+ "aria-invalid": error ? true : void 0,
474
+ "aria-describedby": error ? `${field.name}-error` : void 0,
475
+ "aria-errormessage": error ? `${field.name}-error` : void 0
456
476
  })
457
477
  ]
458
478
  }),
459
479
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
480
+ id: `${field.name}-error`,
460
481
  children: error
461
482
  })
462
483
  ]
@@ -477,6 +498,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
477
498
  onValueChange: formField.onChange,
478
499
  disabled: disabled,
479
500
  "aria-invalid": error ? true : void 0,
501
+ "aria-describedby": error ? `${field.name}-error` : void 0,
502
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
480
503
  children: options.map((option)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
481
504
  className: "flex items-center space-x-2",
482
505
  children: [
@@ -497,6 +520,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
497
520
  children: field.description
498
521
  }),
499
522
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
523
+ id: `${field.name}-error`,
500
524
  children: error
501
525
  })
502
526
  ]
@@ -513,21 +537,27 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
513
537
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(form_field_cjs_namespaceObject.FormField, {
514
538
  children: [
515
539
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldLabel, {
540
+ htmlFor: field.name,
516
541
  required: required,
517
542
  tooltip: field.tooltip,
518
543
  tooltipAriaLabel: field.tooltipAriaLabel,
519
544
  children: field.label
520
545
  }),
521
546
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(date_picker_cjs_namespaceObject.DatePicker, {
547
+ id: field.name,
522
548
  value: formField.value,
523
549
  onValueChange: formField.onChange,
524
550
  disabled: disabled,
525
- placeholder: field.placeholder
551
+ placeholder: field.placeholder,
552
+ "aria-invalid": error ? true : void 0,
553
+ "aria-describedby": error ? `${field.name}-error` : void 0,
554
+ "aria-errormessage": error ? `${field.name}-error` : void 0
526
555
  }),
527
556
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldDescription, {
528
557
  children: field.description
529
558
  }),
530
559
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
560
+ id: `${field.name}-error`,
531
561
  children: error
532
562
  })
533
563
  ]
@@ -545,6 +575,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
545
575
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(datetime_picker_cjs_namespaceObject.DateTimePicker, {
546
576
  "aria-labelledby": `${field.name}-label`,
547
577
  "aria-invalid": error ? true : void 0,
578
+ "aria-describedby": error ? `${field.name}-error` : void 0,
579
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
548
580
  value: formField.value,
549
581
  onValueChange: formField.onChange,
550
582
  disabled: disabled,
@@ -555,6 +587,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
555
587
  children: field.description
556
588
  }),
557
589
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
590
+ id: `${field.name}-error`,
558
591
  children: error
559
592
  })
560
593
  ]
@@ -573,6 +606,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
573
606
  id: field.name,
574
607
  ariaLabel: field.ariaLabel ?? field.label,
575
608
  "aria-invalid": error ? true : void 0,
609
+ "aria-describedby": error ? `${field.name}-error` : void 0,
610
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
576
611
  accept: field.accept,
577
612
  multiple: field.multiple,
578
613
  disabled: disabled,
@@ -586,6 +621,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
586
621
  children: field.description
587
622
  }),
588
623
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
624
+ id: `${field.name}-error`,
589
625
  children: error
590
626
  })
591
627
  ]
@@ -646,6 +682,8 @@ function SliderField({ field, formField, error, disabled, required }) {
646
682
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(slider_cjs_namespaceObject.Slider, {
647
683
  "aria-labelledby": `${field.name}-label`,
648
684
  "aria-invalid": error ? true : void 0,
685
+ "aria-describedby": error ? `${field.name}-error` : void 0,
686
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
649
687
  value: [
650
688
  displayValue ?? field.min ?? 0
651
689
  ],
@@ -659,6 +697,7 @@ function SliderField({ field, formField, error, disabled, required }) {
659
697
  children: field.description
660
698
  }),
661
699
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
700
+ id: `${field.name}-error`,
662
701
  children: error
663
702
  })
664
703
  ]
@@ -212,12 +212,15 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
212
212
  placeholder: field.placeholder,
213
213
  disabled: disabled,
214
214
  "aria-invalid": error ? true : void 0,
215
+ "aria-describedby": error ? `${field.name}-error` : void 0,
216
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
215
217
  "aria-label": field.ariaLabel
216
218
  }),
217
219
  /*#__PURE__*/ jsx(FormFieldDescription, {
218
220
  children: field.description
219
221
  }),
220
222
  /*#__PURE__*/ jsx(FormFieldError, {
223
+ id: `${field.name}-error`,
221
224
  children: error
222
225
  })
223
226
  ]
@@ -245,12 +248,15 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
245
248
  placeholder: field.placeholder,
246
249
  disabled: disabled,
247
250
  "aria-invalid": error ? true : void 0,
251
+ "aria-describedby": error ? `${field.name}-error` : void 0,
252
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
248
253
  onChange: (e)=>formField.onChange(parseFloat(e.target.value))
249
254
  }),
250
255
  /*#__PURE__*/ jsx(FormFieldDescription, {
251
256
  children: field.description
252
257
  }),
253
258
  /*#__PURE__*/ jsx(FormFieldError, {
259
+ id: `${field.name}-error`,
254
260
  children: error
255
261
  })
256
262
  ]
@@ -276,6 +282,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
276
282
  disabled: disabled,
277
283
  maxLength: field.maxLength,
278
284
  "aria-invalid": error ? true : void 0,
285
+ "aria-describedby": error ? `${field.name}-error` : void 0,
286
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
279
287
  ...null != field.minRows ? {
280
288
  minRows: field.minRows
281
289
  } : {
@@ -286,6 +294,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
286
294
  children: field.description
287
295
  }),
288
296
  /*#__PURE__*/ jsx(FormFieldError, {
297
+ id: `${field.name}-error`,
289
298
  children: error
290
299
  })
291
300
  ]
@@ -309,6 +318,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
309
318
  id: field.name,
310
319
  "aria-label": field.label,
311
320
  "aria-invalid": error ? true : void 0,
321
+ "aria-describedby": error ? `${field.name}-error` : void 0,
322
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
312
323
  children: /*#__PURE__*/ jsx(SelectValue, {
313
324
  placeholder: field.placeholder || 'Select...'
314
325
  })
@@ -326,6 +337,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
326
337
  children: field.description
327
338
  }),
328
339
  /*#__PURE__*/ jsx(FormFieldError, {
340
+ id: `${field.name}-error`,
329
341
  children: error
330
342
  })
331
343
  ]
@@ -353,12 +365,15 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
353
365
  emptyMessage: field.emptyMessage ?? 'No items found.',
354
366
  searchPlaceholder: field.searchPlaceholder ?? 'Search...',
355
367
  maxSelected: field.maxSelected,
356
- "aria-invalid": error ? true : void 0
368
+ "aria-invalid": error ? true : void 0,
369
+ "aria-describedby": error ? `${field.name}-error` : void 0,
370
+ "aria-errormessage": error ? `${field.name}-error` : void 0
357
371
  }),
358
372
  /*#__PURE__*/ jsx(FormFieldDescription, {
359
373
  children: field.description
360
374
  }),
361
375
  /*#__PURE__*/ jsx(FormFieldError, {
376
+ id: `${field.name}-error`,
362
377
  children: error
363
378
  })
364
379
  ]
@@ -374,6 +389,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
374
389
  onCheckedChange: (checked)=>formField.onChange(true === checked),
375
390
  disabled: disabled,
376
391
  "aria-invalid": error ? true : void 0,
392
+ "aria-describedby": error ? `${field.name}-error` : void 0,
393
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
377
394
  id: field.name
378
395
  }),
379
396
  /*#__PURE__*/ jsxs("div", {
@@ -394,6 +411,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
394
411
  ]
395
412
  }),
396
413
  /*#__PURE__*/ jsx(FormFieldError, {
414
+ id: `${field.name}-error`,
397
415
  children: error
398
416
  })
399
417
  ]
@@ -424,11 +442,14 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
424
442
  checked: true === formField.value,
425
443
  onCheckedChange: (checked)=>formField.onChange(true === checked),
426
444
  disabled: disabled,
427
- "aria-invalid": error ? true : void 0
445
+ "aria-invalid": error ? true : void 0,
446
+ "aria-describedby": error ? `${field.name}-error` : void 0,
447
+ "aria-errormessage": error ? `${field.name}-error` : void 0
428
448
  })
429
449
  ]
430
450
  }),
431
451
  /*#__PURE__*/ jsx(FormFieldError, {
452
+ id: `${field.name}-error`,
432
453
  children: error
433
454
  })
434
455
  ]
@@ -449,6 +470,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
449
470
  onValueChange: formField.onChange,
450
471
  disabled: disabled,
451
472
  "aria-invalid": error ? true : void 0,
473
+ "aria-describedby": error ? `${field.name}-error` : void 0,
474
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
452
475
  children: options.map((option)=>/*#__PURE__*/ jsxs("div", {
453
476
  className: "flex items-center space-x-2",
454
477
  children: [
@@ -469,6 +492,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
469
492
  children: field.description
470
493
  }),
471
494
  /*#__PURE__*/ jsx(FormFieldError, {
495
+ id: `${field.name}-error`,
472
496
  children: error
473
497
  })
474
498
  ]
@@ -485,21 +509,27 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
485
509
  return /*#__PURE__*/ jsxs(FormField, {
486
510
  children: [
487
511
  /*#__PURE__*/ jsx(FormFieldLabel, {
512
+ htmlFor: field.name,
488
513
  required: required,
489
514
  tooltip: field.tooltip,
490
515
  tooltipAriaLabel: field.tooltipAriaLabel,
491
516
  children: field.label
492
517
  }),
493
518
  /*#__PURE__*/ jsx(DatePicker, {
519
+ id: field.name,
494
520
  value: formField.value,
495
521
  onValueChange: formField.onChange,
496
522
  disabled: disabled,
497
- placeholder: field.placeholder
523
+ placeholder: field.placeholder,
524
+ "aria-invalid": error ? true : void 0,
525
+ "aria-describedby": error ? `${field.name}-error` : void 0,
526
+ "aria-errormessage": error ? `${field.name}-error` : void 0
498
527
  }),
499
528
  /*#__PURE__*/ jsx(FormFieldDescription, {
500
529
  children: field.description
501
530
  }),
502
531
  /*#__PURE__*/ jsx(FormFieldError, {
532
+ id: `${field.name}-error`,
503
533
  children: error
504
534
  })
505
535
  ]
@@ -517,6 +547,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
517
547
  /*#__PURE__*/ jsx(DateTimePicker, {
518
548
  "aria-labelledby": `${field.name}-label`,
519
549
  "aria-invalid": error ? true : void 0,
550
+ "aria-describedby": error ? `${field.name}-error` : void 0,
551
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
520
552
  value: formField.value,
521
553
  onValueChange: formField.onChange,
522
554
  disabled: disabled,
@@ -527,6 +559,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
527
559
  children: field.description
528
560
  }),
529
561
  /*#__PURE__*/ jsx(FormFieldError, {
562
+ id: `${field.name}-error`,
530
563
  children: error
531
564
  })
532
565
  ]
@@ -545,6 +578,8 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
545
578
  id: field.name,
546
579
  ariaLabel: field.ariaLabel ?? field.label,
547
580
  "aria-invalid": error ? true : void 0,
581
+ "aria-describedby": error ? `${field.name}-error` : void 0,
582
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
548
583
  accept: field.accept,
549
584
  multiple: field.multiple,
550
585
  disabled: disabled,
@@ -558,6 +593,7 @@ function FieldByType({ field, formField, error, disabled, required, options }) {
558
593
  children: field.description
559
594
  }),
560
595
  /*#__PURE__*/ jsx(FormFieldError, {
596
+ id: `${field.name}-error`,
561
597
  children: error
562
598
  })
563
599
  ]
@@ -618,6 +654,8 @@ function SliderField({ field, formField, error, disabled, required }) {
618
654
  /*#__PURE__*/ jsx(Slider, {
619
655
  "aria-labelledby": `${field.name}-label`,
620
656
  "aria-invalid": error ? true : void 0,
657
+ "aria-describedby": error ? `${field.name}-error` : void 0,
658
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
621
659
  value: [
622
660
  displayValue ?? field.min ?? 0
623
661
  ],
@@ -631,6 +669,7 @@ function SliderField({ field, formField, error, disabled, required }) {
631
669
  children: field.description
632
670
  }),
633
671
  /*#__PURE__*/ jsx(FormFieldError, {
672
+ id: `${field.name}-error`,
634
673
  children: error
635
674
  })
636
675
  ]
@@ -103,6 +103,8 @@ function StringListField({ field, value, onChange, onBlur, error, disabled = fal
103
103
  disabled: disabled,
104
104
  "aria-label": `${field.label} ${index + 1}`,
105
105
  "aria-invalid": error ? true : void 0,
106
+ "aria-describedby": error ? `${field.name}-error` : void 0,
107
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
106
108
  className: "flex-1"
107
109
  }),
108
110
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
@@ -138,6 +140,7 @@ function StringListField({ field, value, onChange, onBlur, error, disabled = fal
138
140
  children: field.description
139
141
  }),
140
142
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(form_field_cjs_namespaceObject.FormFieldError, {
143
+ id: `${field.name}-error`,
141
144
  children: error
142
145
  })
143
146
  ]
@@ -74,6 +74,8 @@ function StringListField({ field, value, onChange, onBlur, error, disabled = fal
74
74
  disabled: disabled,
75
75
  "aria-label": `${field.label} ${index + 1}`,
76
76
  "aria-invalid": error ? true : void 0,
77
+ "aria-describedby": error ? `${field.name}-error` : void 0,
78
+ "aria-errormessage": error ? `${field.name}-error` : void 0,
77
79
  className: "flex-1"
78
80
  }),
79
81
  /*#__PURE__*/ jsx(Button, {
@@ -109,6 +111,7 @@ function StringListField({ field, value, onChange, onBlur, error, disabled = fal
109
111
  children: field.description
110
112
  }),
111
113
  /*#__PURE__*/ jsx(FormFieldError, {
114
+ id: `${field.name}-error`,
112
115
  children: error
113
116
  })
114
117
  ]
@@ -37,7 +37,7 @@ const buttonVariants = (0, external_class_variance_authority_namespaceObject.cva
37
37
  variant: {
38
38
  default: 'bg-primary text-primary-foreground hover:bg-primary/90',
39
39
  destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
40
- outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground future:border-border-subtle future:text-muted-foreground future:hover:text-foreground',
40
+ outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground future:border-border-subtle future:text-muted-foreground future:hover:text-foreground aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40',
41
41
  secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 future:text-muted-foreground future:hover:text-foreground',
42
42
  ghost: 'hover:bg-accent hover:text-accent-foreground future:text-muted-foreground future:hover:text-foreground',
43
43
  link: 'text-primary underline-offset-4 hover:underline future:text-muted-foreground future:hover:text-foreground',
@@ -8,7 +8,7 @@ const buttonVariants = cva('inline-flex items-center justify-center gap-2 whites
8
8
  variant: {
9
9
  default: 'bg-primary text-primary-foreground hover:bg-primary/90',
10
10
  destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
11
- outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground future:border-border-subtle future:text-muted-foreground future:hover:text-foreground',
11
+ outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground future:border-border-subtle future:text-muted-foreground future:hover:text-foreground aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40',
12
12
  secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 future:text-muted-foreground future:hover:text-foreground',
13
13
  ghost: 'hover:bg-accent hover:text-accent-foreground future:text-muted-foreground future:hover:text-foreground',
14
14
  link: 'text-primary underline-offset-4 hover:underline future:text-muted-foreground future:hover:text-foreground',
@@ -34,7 +34,7 @@ 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', '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', className),
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),
38
38
  ...props,
39
39
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Indicator, {
40
40
  className: (0, utils_cjs_namespaceObject.cn)('flex items-center justify-center text-current future:text-foreground-inverse'),
@@ -6,7 +6,7 @@ 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', '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', className),
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),
10
10
  ...props,
11
11
  children: /*#__PURE__*/ jsx(Indicator, {
12
12
  className: cn('flex items-center justify-center text-current future:text-foreground-inverse'),
@@ -34,66 +34,85 @@ const external_button_cjs_namespaceObject = require("./button.cjs");
34
34
  const external_command_cjs_namespaceObject = require("./command.cjs");
35
35
  const external_popover_cjs_namespaceObject = require("./popover.cjs");
36
36
  const index_cjs_namespaceObject = require("../../lib/index.cjs");
37
- const combobox_Combobox = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function({ items, value, onValueChange, placeholder = 'Select an option...', searchPlaceholder = 'Search...', emptyText = 'No results found.', disabled, className }, ref) {
37
+ const external_form_field_cjs_namespaceObject = require("./form-field.cjs");
38
+ const combobox_Combobox = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function({ id, items, value, onValueChange, placeholder = 'Select an option...', searchPlaceholder = 'Search...', emptyText = 'No results found.', disabled, className, error, errorId, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage }, ref) {
38
39
  const [open, setOpen] = external_react_namespaceObject.useState(false);
40
+ const generatedId = external_react_namespaceObject.useId();
41
+ const validationId = errorId ?? `${id ?? `combobox-${generatedId.replace(/:/g, '')}`}-error`;
42
+ const describedBy = [
43
+ ariaDescribedBy,
44
+ error ? validationId : void 0
45
+ ].filter(Boolean).join(' ');
39
46
  const selectedItem = items.find((item)=>item.value === value);
40
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
41
- "data-slot": "combobox",
42
- open: open,
43
- onOpenChange: setOpen,
47
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
44
48
  children: [
45
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
46
- asChild: true,
47
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
48
- ref: ref,
49
- variant: "outline",
50
- role: "combobox",
51
- "aria-expanded": open,
52
- "aria-label": selectedItem ? selectedItem.label : placeholder,
53
- className: (0, index_cjs_namespaceObject.cn)('w-[280px] justify-between future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:px-4 future:gap-4 future:hover:bg-surface-hover future:font-normal future:text-foreground future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', className),
54
- disabled: disabled,
55
- children: [
56
- selectedItem ? selectedItem.label : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
57
- className: "text-foreground-muted",
58
- children: placeholder
59
- }),
60
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
61
- className: "opacity-50"
49
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
50
+ "data-slot": "combobox",
51
+ open: open,
52
+ onOpenChange: setOpen,
53
+ children: [
54
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
55
+ asChild: true,
56
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
57
+ ref: ref,
58
+ id: id,
59
+ variant: "outline",
60
+ role: "combobox",
61
+ "aria-expanded": open,
62
+ "aria-label": id ? void 0 : selectedItem ? selectedItem.label : placeholder,
63
+ "aria-describedby": describedBy || void 0,
64
+ "aria-errormessage": error ? validationId : ariaErrorMessage,
65
+ "aria-invalid": error ? true : ariaInvalid,
66
+ className: (0, index_cjs_namespaceObject.cn)('w-[280px] justify-between future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:px-4 future:gap-4 future:hover:bg-surface-hover future:font-normal future:text-foreground future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', className),
67
+ disabled: disabled,
68
+ children: [
69
+ selectedItem ? selectedItem.label : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
70
+ className: "text-foreground-muted",
71
+ children: placeholder
72
+ }),
73
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
74
+ className: "opacity-50"
75
+ })
76
+ ]
62
77
  })
63
- ]
64
- })
65
- }),
66
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
67
- className: "w-[280px] p-0",
68
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.Command, {
69
- children: [
70
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandInput, {
71
- placeholder: searchPlaceholder
72
- }),
73
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandList, {
78
+ }),
79
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
80
+ className: "w-[280px] p-0",
81
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.Command, {
74
82
  children: [
75
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandEmpty, {
76
- children: emptyText
83
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandInput, {
84
+ placeholder: searchPlaceholder
77
85
  }),
78
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandGroup, {
79
- children: items.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
80
- value: item.value,
81
- onSelect: (currentValue)=>{
82
- onValueChange?.(currentValue === value ? '' : currentValue);
83
- setOpen(false);
84
- },
85
- children: [
86
- item.label,
87
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
88
- className: (0, index_cjs_namespaceObject.cn)('ml-auto', value === item.value ? 'opacity-100' : 'opacity-0')
89
- })
90
- ]
91
- }, item.value))
86
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandList, {
87
+ children: [
88
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandEmpty, {
89
+ children: emptyText
90
+ }),
91
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandGroup, {
92
+ children: items.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
93
+ value: item.value,
94
+ onSelect: (currentValue)=>{
95
+ onValueChange?.(currentValue === value ? '' : currentValue);
96
+ setOpen(false);
97
+ },
98
+ children: [
99
+ item.label,
100
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
101
+ className: (0, index_cjs_namespaceObject.cn)('ml-auto', value === item.value ? 'opacity-100' : 'opacity-0')
102
+ })
103
+ ]
104
+ }, item.value))
105
+ })
106
+ ]
92
107
  })
93
108
  ]
94
109
  })
95
- ]
96
- })
110
+ })
111
+ ]
112
+ }),
113
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_form_field_cjs_namespaceObject.FormFieldError, {
114
+ id: validationId,
115
+ children: error
97
116
  })
98
117
  ]
99
118
  });