bromcom-ui 3.0.0-alpha.3 → 3.0.0-alpha.5

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 (156) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/p-01eaca9a.entry.js +5 -0
  4. package/dist/bromcom-ui/{p-dc8b7bd5.entry.js → p-0b7de283.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-ff8adde6.entry.js → p-0e75f6ba.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-3a6e9576.entry.js → p-112b9a62.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-be96827e.js → p-1535f9b1.js} +1 -1
  8. package/dist/bromcom-ui/{p-ef839034.entry.js → p-32ce6cf6.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-33d97b3f.entry.js → p-33b2ed75.entry.js} +1 -1
  10. package/dist/bromcom-ui/p-3ddd3c83.entry.js +5 -0
  11. package/dist/bromcom-ui/{p-e115af8a.entry.js → p-4545a13d.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-f1de8ed5.entry.js → p-5532696c.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-f6e710ff.entry.js → p-69adb859.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-d0647951.js → p-6ce02d0a.js} +1 -1
  15. package/dist/bromcom-ui/p-7c08789d.entry.js +5 -0
  16. package/dist/bromcom-ui/{p-b7f449ff.entry.js → p-803739bc.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-3b988ad1.entry.js → p-8390dd02.entry.js} +1 -1
  18. package/dist/bromcom-ui/p-91197b04.js +5 -0
  19. package/dist/bromcom-ui/{p-b9b9d753.entry.js → p-a80e6310.entry.js} +1 -1
  20. package/dist/bromcom-ui/p-aa67918a.entry.js +5 -0
  21. package/dist/bromcom-ui/{p-91aa21af.entry.js → p-acab07ec.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-a53c3682.entry.js → p-b333a3d7.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-b386e9c9.entry.js → p-b7787c11.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-2e7ffc5a.entry.js → p-b7c56cbe.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-221095a9.entry.js → p-c36a7889.entry.js} +1 -1
  26. package/dist/bromcom-ui/p-ce0ab4e3.entry.js +5 -0
  27. package/dist/bromcom-ui/{p-ee75cd00.js → p-d3cf91a9.js} +1 -1
  28. package/dist/bromcom-ui/p-d5464577.entry.js +16 -0
  29. package/dist/bromcom-ui/{p-bd77f532.entry.js → p-d7a619c5.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-baa4193d.entry.js → p-e36b6b08.entry.js} +1 -1
  31. package/dist/bromcom-ui/{p-6c7fdf95.entry.js → p-f15c1d3d.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-8001040c.js → p-fc29c94d.js} +1 -1
  33. package/dist/cjs/bcm-accordion_69.cjs.entry.js +722 -66
  34. package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +4 -4
  35. package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +4 -4
  36. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  37. package/dist/cjs/bcm-caption.cjs.entry.js +4 -4
  38. package/dist/cjs/bcm-card.cjs.entry.js +2 -2
  39. package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -2
  40. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +2 -2
  41. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  42. package/dist/cjs/bcm-file-upload.cjs.entry.js +578 -0
  43. package/dist/cjs/bcm-form-2.cjs.entry.js +3 -2
  44. package/dist/cjs/bcm-input-2.cjs.entry.js +2 -2
  45. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
  46. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +4 -4
  47. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
  48. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
  49. package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
  50. package/dist/cjs/bcm-number-input.cjs.entry.js +12 -6
  51. package/dist/cjs/bcm-skeleton.cjs.entry.js +4 -4
  52. package/dist/cjs/bcm-table.cjs.entry.js +4 -4
  53. package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
  54. package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
  55. package/dist/cjs/bcm-toast.cjs.entry.js +17 -11
  56. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  57. package/dist/cjs/{generate-554f54dc.js → generate-9d1bf6b3.js} +1 -1
  58. package/dist/cjs/{global-90b5dbce.js → global-d69a64ec.js} +1 -1
  59. package/dist/cjs/loader.cjs.js +3 -3
  60. package/dist/cjs/{number-helper-677e9c02.js → number-helper-ae28b255.js} +1 -1
  61. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
  62. package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
  63. package/dist/cjs/{package-8445ccd4.js → package-6de220be.js} +1 -1
  64. package/dist/cjs/{validators-92f2f1ef.js → validators-3381bee2.js} +1 -1
  65. package/dist/collection/collection-manifest.json +1 -0
  66. package/dist/collection/components/atoms/button/button.js +1 -1
  67. package/dist/collection/components/atoms/button/types.js +7 -0
  68. package/dist/collection/components/molecules/color-input/color-input.js +5 -22
  69. package/dist/collection/components/molecules/color-palette/color-palette.js +4 -4
  70. package/dist/collection/components/molecules/dropdown/dropdown.js +36 -1
  71. package/dist/collection/components/molecules/linked/linked-focus-manager.js +86 -0
  72. package/dist/collection/components/molecules/linked/linked.js +43 -1
  73. package/dist/collection/components/molecules/number-input/number-input.js +8 -2
  74. package/dist/collection/components/molecules/number-input/react-input.js +1 -1
  75. package/dist/collection/components/molecules/upload/file-upload.component.js +1060 -0
  76. package/dist/collection/components/molecules/upload/file-upload.style.js +201 -0
  77. package/dist/collection/components/organism/form/form.js +1 -0
  78. package/dist/collection/components/organism/form-2/bcm-form-components.js +1 -0
  79. package/dist/collection/components/organism/list/list-focus-manager.js +344 -0
  80. package/dist/collection/components/organism/list/list-key-control.js +9 -4
  81. package/dist/collection/components/organism/list/list.css +8 -3
  82. package/dist/collection/components/organism/list/list.js +227 -27
  83. package/dist/collection/components/other/toast/toast.js +15 -9
  84. package/dist/collection/components/other_deprecated/old-tag/old-tag.js +1 -1
  85. package/dist/collection/components/other_deprecated/tag/tag.js +1 -1
  86. package/dist/collection/templates/list-item-template.js +6 -5
  87. package/dist/collection/templates/list-template.js +2 -2
  88. package/dist/components/bcm-color-input.js +5 -22
  89. package/dist/components/bcm-dropdown.js +35 -0
  90. package/dist/components/bcm-file-upload.d.ts +11 -0
  91. package/dist/components/bcm-file-upload.js +625 -0
  92. package/dist/components/bcm-form-2.js +1 -0
  93. package/dist/components/bcm-number-input.js +8 -2
  94. package/dist/components/bcm-toast.js +15 -9
  95. package/dist/components/button.js +7 -0
  96. package/dist/components/color-palette.js +2 -2
  97. package/dist/components/form.js +1 -0
  98. package/dist/components/generate.js +1 -1
  99. package/dist/components/index.d.ts +1 -0
  100. package/dist/components/index.js +1 -0
  101. package/dist/components/linked.js +105 -2
  102. package/dist/components/list.js +567 -39
  103. package/dist/esm/bcm-accordion_69.entry.js +722 -66
  104. package/dist/esm/bcm-attendance-actions-comment.entry.js +4 -4
  105. package/dist/esm/bcm-attendance-actions-dropdown.entry.js +4 -4
  106. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  107. package/dist/esm/bcm-caption.entry.js +4 -4
  108. package/dist/esm/bcm-card.entry.js +2 -2
  109. package/dist/esm/bcm-date-picker.entry.js +2 -2
  110. package/dist/esm/bcm-datetime-picker.entry.js +2 -2
  111. package/dist/esm/bcm-default.entry.js +2 -2
  112. package/dist/esm/bcm-file-upload.entry.js +574 -0
  113. package/dist/esm/bcm-form-2.entry.js +3 -2
  114. package/dist/esm/bcm-input-2.entry.js +2 -2
  115. package/dist/esm/bcm-input-custom.entry.js +2 -2
  116. package/dist/esm/bcm-input-dropdown.entry.js +4 -4
  117. package/dist/esm/bcm-modal-2-footer.entry.js +4 -4
  118. package/dist/esm/bcm-modal-2-header.entry.js +4 -4
  119. package/dist/esm/bcm-modal-2.entry.js +4 -4
  120. package/dist/esm/bcm-number-input.entry.js +12 -6
  121. package/dist/esm/bcm-skeleton.entry.js +4 -4
  122. package/dist/esm/bcm-table.entry.js +4 -4
  123. package/dist/esm/bcm-tag.entry.js +3 -3
  124. package/dist/esm/bcm-time-picker.entry.js +2 -2
  125. package/dist/esm/bcm-toast.entry.js +17 -11
  126. package/dist/esm/bromcom-ui.js +3 -3
  127. package/dist/esm/{generate-8a394b83.js → generate-56d49b70.js} +1 -1
  128. package/dist/esm/{global-7919f57f.js → global-97c42a5f.js} +1 -1
  129. package/dist/esm/loader.js +3 -3
  130. package/dist/esm/{number-helper-a86adc72.js → number-helper-455ab41e.js} +1 -1
  131. package/dist/esm/old-bcm-popover-box.entry.js +3 -3
  132. package/dist/esm/old-bcm-popover.entry.js +2 -2
  133. package/dist/esm/{package-278e08d9.js → package-edee14d5.js} +1 -1
  134. package/dist/esm/{validators-89e791a1.js → validators-cc882165.js} +1 -1
  135. package/dist/types/components/atoms/button/types.d.ts +8 -1
  136. package/dist/types/components/molecules/color-input/color-input.d.ts +1 -4
  137. package/dist/types/components/molecules/dropdown/dropdown.d.ts +7 -0
  138. package/dist/types/components/molecules/linked/linked-focus-manager.d.ts +13 -0
  139. package/dist/types/components/molecules/linked/linked.d.ts +3 -0
  140. package/dist/types/components/molecules/number-input/number-input.d.ts +1 -0
  141. package/dist/types/components/molecules/upload/file-upload.component.d.ts +233 -0
  142. package/dist/types/components/molecules/upload/file-upload.style.d.ts +548 -0
  143. package/dist/types/components/organism/list/list-focus-manager.d.ts +53 -0
  144. package/dist/types/components/organism/list/list-key-control.d.ts +1 -0
  145. package/dist/types/components/organism/list/list.d.ts +18 -1
  146. package/dist/types/components/other/toast/toast.d.ts +1 -0
  147. package/dist/types/components.d.ts +417 -1
  148. package/dist/types/templates/list-item-template.d.ts +2 -0
  149. package/dist/types/templates/list-template.d.ts +2 -0
  150. package/package.json +1 -1
  151. package/dist/bromcom-ui/p-16b8a312.entry.js +0 -16
  152. package/dist/bromcom-ui/p-839b6fd5.entry.js +0 -5
  153. package/dist/bromcom-ui/p-be8aa3b8.entry.js +0 -5
  154. package/dist/bromcom-ui/p-d0aa71e1.entry.js +0 -5
  155. package/dist/bromcom-ui/p-df92d838.js +0 -5
  156. package/dist/bromcom-ui/p-dfd73f7c.entry.js +0 -5
@@ -12,6 +12,7 @@ import { ButtonTypes, ColorPaletteTypes as ColorPaletteTypes1, DirectionTypes, F
12
12
  import { VariantProp } from "./components/atoms/button/types";
13
13
  import { Type } from "./components/organism/datetime-picker/types";
14
14
  import { SizeProp } from "./components/molecules/error-layout/types";
15
+ import { BcmUploadErrorMessages, BcmUploadItem, BcmUploadPosition } from "./components/molecules/upload/file-upload.component";
15
16
  import { SizeProp as SizeProp1 } from "./components/other_deprecated/listbox/types";
16
17
  import { StatusProp as StatusProp1 } from "./components/molecules/message/types";
17
18
  import { TypeProp as TypeProp1 } from "./components/molecules/notification/types";
@@ -562,6 +563,124 @@ export namespace Components {
562
563
  "tooltip": any;
563
564
  "valid": boolean;
564
565
  }
566
+ /**
567
+ * @component BcmFileUpload
568
+ * @description A fully featured drag-and-drop file uploader component.
569
+ * Supports form-associated behavior, validation, custom size limits,
570
+ * accepted file type filtering, multiple file selection, progress tracking,
571
+ * upload canceling, file removal, and accessibility events (focus/blur).
572
+ * Upload progress is currently simulated locally. The `uploadUrl` prop
573
+ * is reserved for future real HTTP upload integration and has no effect yet.
574
+ * @example Basic usage
575
+ * <bcm-file-upload name="report" label="Upload Report"></bcm-file-upload>
576
+ * @example Multiple files
577
+ * <bcm-file-upload name="attachments" multiple></bcm-file-upload>
578
+ * @example Custom max size and accepted formats
579
+ * <bcm-file-upload
580
+ * name="medicalFiles"
581
+ * accept=".pdf,.jpg"
582
+ * maxSize={5}
583
+ * ></bcm-file-upload>
584
+ * @prop {string} name
585
+ * The name of the form field used when the component is inside a `<form>`.
586
+ * Supports automatic FormData generation including:
587
+ * - single upload: name="file"
588
+ * - multiple upload: name="file[0], file[1], ..."
589
+ * @prop {string} label
590
+ * Optional label shown above the upload zone.
591
+ * @prop {string} caption
592
+ * Optional helper text rendered below the file list. Example: “Max size 5MB”.
593
+ * @prop {boolean} multiple
594
+ * Allows selecting and uploading multiple files at once.
595
+ * @prop {string} accept
596
+ * Comma-separated list of allowed file extensions.
597
+ * Example: ".pdf,.xls,.png".
598
+ * @prop {number} maxSize
599
+ * Maximum allowed size per file (in MB). If exceeded, an error alert appears.
600
+ * @prop {boolean} required
601
+ * Enables form validation — at least one file must be uploaded.
602
+ * Validation is applied by the surrounding `bcm-form-2` / `bcm-form`
603
+ * component, which reads `required` and `value` and sets the caption error.
604
+ * @prop {boolean} disabled
605
+ * Makes the uploader non-interactive: no clicking, no drag-and-drop.
606
+ * @prop {"medium" | "small"} size
607
+ * Controls spacing, typography, and visual density of the upload zone.
608
+ * @prop {string} uploadUrl
609
+ * Reserved for future backend upload integration.
610
+ * Currently has no effect and does not trigger any HTTP requests.
611
+ * @prop {number} maxFileCount
612
+ * Optional limit for how many files can be selected in total.
613
+ * Only applied when `multiple` is true.
614
+ * If exceeded, new files are ignored and a max-file-count error is shown.
615
+ * @prop {BcmUploadErrorMessages} customErrorMessages
616
+ * Optional override for all error messages:
617
+ * - maxSize: file too large
618
+ * - type: unsupported file type
619
+ * - maxFileCount: too many files selected
620
+ * @event {EventEmitter<File[]>} bcm-file-change
621
+ * Fired whenever the component's internal file list changes.
622
+ * Emits an array of the current File objects.
623
+ * @event {EventEmitter<BcmUploadItem>} bcm-file-removed
624
+ * Fired when the user removes a file from the list.
625
+ * @event {EventEmitter<BcmUploadItem>} bcm-upload-canceled
626
+ * Fired when an upload is canceled before completion.
627
+ * @event {EventEmitter<FocusEvent>} bcm-focus
628
+ * Fired when upload zone receives keyboard or mouse focus.
629
+ * @event {EventEmitter<FocusEvent>} bcm-blur
630
+ * Fired when upload zone loses focus.
631
+ * @csspart upload-zone
632
+ * The root clickable drop area for file selection or drag-and-drop.
633
+ * @csspart file-list
634
+ * The container wrapping rendered file rows.
635
+ * @csspart file-row
636
+ * A single file entry including its name, actions, and progress bar.
637
+ * @csspart remove-btn
638
+ * The remove action button inside uploaded file rows.
639
+ * @csspart cancel-btn
640
+ * The cancel upload button during uploading progress.
641
+ * @csspart download-btn
642
+ * The download button for already uploaded files.
643
+ * @csspart label
644
+ * The external label text displayed above the component.
645
+ * @csspart caption
646
+ * Helper or informative caption displayed below the uploaded list.
647
+ */
648
+ interface BcmFileUpload {
649
+ "accept": string;
650
+ "buttonLabel"?: string;
651
+ "caption"?: string;
652
+ "captionError"?: string;
653
+ "captionType"?: string;
654
+ /**
655
+ * Allows consumers to override default error messages.
656
+ */
657
+ "customErrorMessages"?: BcmUploadErrorMessages;
658
+ "disabled": boolean;
659
+ "fullWidth": boolean;
660
+ "get": () => Promise<any>;
661
+ "label": string;
662
+ /**
663
+ * Maximum number of files allowed in total. Only applied when `multiple` is true.
664
+ */
665
+ "maxFileCount"?: number;
666
+ "maxSize": number;
667
+ "multiple": boolean;
668
+ "name": string;
669
+ "noCaption": boolean;
670
+ "position": BcmUploadPosition;
671
+ "required": boolean;
672
+ "resetCaption": () => Promise<unknown>;
673
+ "set": (data: any) => Promise<void>;
674
+ "setClear": () => Promise<unknown>;
675
+ "setFocus": (options?: FocusOptions) => Promise<void>;
676
+ "showFileList": boolean;
677
+ "size": 'medium' | 'small';
678
+ /**
679
+ * Reserved for future backend upload integration. Currently does not affect component behavior.
680
+ */
681
+ "uploadUrl"?: string;
682
+ "value": any;
683
+ }
565
684
  interface BcmForm {
566
685
  "_id": string;
567
686
  "autocomplete": boolean;
@@ -770,6 +889,7 @@ export namespace Components {
770
889
  "targetId": string;
771
890
  "toggle": (wait?: boolean) => Promise<boolean>;
772
891
  "trigger": TrigglerTypes;
892
+ "updateLayout": () => Promise<void>;
773
893
  }
774
894
  interface BcmList {
775
895
  "_id": string;
@@ -818,7 +938,7 @@ export namespace Components {
818
938
  "selected": (id: any) => Promise<any>;
819
939
  "set": (data: any, trigger?: boolean) => Promise<void>;
820
940
  "setClear": (e?: any) => Promise<void>;
821
- "show": () => Promise<void>;
941
+ "show": (openTriggerElement?: HTMLElement) => Promise<void>;
822
942
  "size": SizeTypes;
823
943
  "stopDeepClean": boolean;
824
944
  "tempId": string;
@@ -1935,6 +2055,10 @@ export interface BcmExpansionPanelCustomEvent<T> extends CustomEvent<T> {
1935
2055
  detail: T;
1936
2056
  target: HTMLBcmExpansionPanelElement;
1937
2057
  }
2058
+ export interface BcmFileUploadCustomEvent<T> extends CustomEvent<T> {
2059
+ detail: T;
2060
+ target: HTMLBcmFileUploadElement;
2061
+ }
1938
2062
  export interface BcmFormCustomEvent<T> extends CustomEvent<T> {
1939
2063
  detail: T;
1940
2064
  target: HTMLBcmFormElement;
@@ -2340,6 +2464,94 @@ declare global {
2340
2464
  prototype: HTMLBcmExpansionPanelElement;
2341
2465
  new (): HTMLBcmExpansionPanelElement;
2342
2466
  };
2467
+ /**
2468
+ * @component BcmFileUpload
2469
+ * @description A fully featured drag-and-drop file uploader component.
2470
+ * Supports form-associated behavior, validation, custom size limits,
2471
+ * accepted file type filtering, multiple file selection, progress tracking,
2472
+ * upload canceling, file removal, and accessibility events (focus/blur).
2473
+ * Upload progress is currently simulated locally. The `uploadUrl` prop
2474
+ * is reserved for future real HTTP upload integration and has no effect yet.
2475
+ * @example Basic usage
2476
+ * <bcm-file-upload name="report" label="Upload Report"></bcm-file-upload>
2477
+ * @example Multiple files
2478
+ * <bcm-file-upload name="attachments" multiple></bcm-file-upload>
2479
+ * @example Custom max size and accepted formats
2480
+ * <bcm-file-upload
2481
+ * name="medicalFiles"
2482
+ * accept=".pdf,.jpg"
2483
+ * maxSize={5}
2484
+ * ></bcm-file-upload>
2485
+ * @prop {string} name
2486
+ * The name of the form field used when the component is inside a `<form>`.
2487
+ * Supports automatic FormData generation including:
2488
+ * - single upload: name="file"
2489
+ * - multiple upload: name="file[0], file[1], ..."
2490
+ * @prop {string} label
2491
+ * Optional label shown above the upload zone.
2492
+ * @prop {string} caption
2493
+ * Optional helper text rendered below the file list. Example: “Max size 5MB”.
2494
+ * @prop {boolean} multiple
2495
+ * Allows selecting and uploading multiple files at once.
2496
+ * @prop {string} accept
2497
+ * Comma-separated list of allowed file extensions.
2498
+ * Example: ".pdf,.xls,.png".
2499
+ * @prop {number} maxSize
2500
+ * Maximum allowed size per file (in MB). If exceeded, an error alert appears.
2501
+ * @prop {boolean} required
2502
+ * Enables form validation — at least one file must be uploaded.
2503
+ * Validation is applied by the surrounding `bcm-form-2` / `bcm-form`
2504
+ * component, which reads `required` and `value` and sets the caption error.
2505
+ * @prop {boolean} disabled
2506
+ * Makes the uploader non-interactive: no clicking, no drag-and-drop.
2507
+ * @prop {"medium" | "small"} size
2508
+ * Controls spacing, typography, and visual density of the upload zone.
2509
+ * @prop {string} uploadUrl
2510
+ * Reserved for future backend upload integration.
2511
+ * Currently has no effect and does not trigger any HTTP requests.
2512
+ * @prop {number} maxFileCount
2513
+ * Optional limit for how many files can be selected in total.
2514
+ * Only applied when `multiple` is true.
2515
+ * If exceeded, new files are ignored and a max-file-count error is shown.
2516
+ * @prop {BcmUploadErrorMessages} customErrorMessages
2517
+ * Optional override for all error messages:
2518
+ * - maxSize: file too large
2519
+ * - type: unsupported file type
2520
+ * - maxFileCount: too many files selected
2521
+ * @event {EventEmitter<File[]>} bcm-file-change
2522
+ * Fired whenever the component's internal file list changes.
2523
+ * Emits an array of the current File objects.
2524
+ * @event {EventEmitter<BcmUploadItem>} bcm-file-removed
2525
+ * Fired when the user removes a file from the list.
2526
+ * @event {EventEmitter<BcmUploadItem>} bcm-upload-canceled
2527
+ * Fired when an upload is canceled before completion.
2528
+ * @event {EventEmitter<FocusEvent>} bcm-focus
2529
+ * Fired when upload zone receives keyboard or mouse focus.
2530
+ * @event {EventEmitter<FocusEvent>} bcm-blur
2531
+ * Fired when upload zone loses focus.
2532
+ * @csspart upload-zone
2533
+ * The root clickable drop area for file selection or drag-and-drop.
2534
+ * @csspart file-list
2535
+ * The container wrapping rendered file rows.
2536
+ * @csspart file-row
2537
+ * A single file entry including its name, actions, and progress bar.
2538
+ * @csspart remove-btn
2539
+ * The remove action button inside uploaded file rows.
2540
+ * @csspart cancel-btn
2541
+ * The cancel upload button during uploading progress.
2542
+ * @csspart download-btn
2543
+ * The download button for already uploaded files.
2544
+ * @csspart label
2545
+ * The external label text displayed above the component.
2546
+ * @csspart caption
2547
+ * Helper or informative caption displayed below the uploaded list.
2548
+ */
2549
+ interface HTMLBcmFileUploadElement extends Components.BcmFileUpload, HTMLStencilElement {
2550
+ }
2551
+ var HTMLBcmFileUploadElement: {
2552
+ prototype: HTMLBcmFileUploadElement;
2553
+ new (): HTMLBcmFileUploadElement;
2554
+ };
2343
2555
  interface HTMLBcmFormElement extends Components.BcmForm, HTMLStencilElement {
2344
2556
  }
2345
2557
  var HTMLBcmFormElement: {
@@ -2834,6 +3046,7 @@ declare global {
2834
3046
  "bcm-empty": HTMLBcmEmptyElement;
2835
3047
  "bcm-error-layout": HTMLBcmErrorLayoutElement;
2836
3048
  "bcm-expansion-panel": HTMLBcmExpansionPanelElement;
3049
+ "bcm-file-upload": HTMLBcmFileUploadElement;
2837
3050
  "bcm-form": HTMLBcmFormElement;
2838
3051
  "bcm-form-2": HTMLBcmForm2Element;
2839
3052
  "bcm-form-group": HTMLBcmFormGroupElement;
@@ -3389,6 +3602,125 @@ declare namespace LocalJSX {
3389
3602
  "tooltip"?: any;
3390
3603
  "valid"?: boolean;
3391
3604
  }
3605
+ /**
3606
+ * @component BcmFileUpload
3607
+ * @description A fully featured drag-and-drop file uploader component.
3608
+ * Supports form-associated behavior, validation, custom size limits,
3609
+ * accepted file type filtering, multiple file selection, progress tracking,
3610
+ * upload canceling, file removal, and accessibility events (focus/blur).
3611
+ * Upload progress is currently simulated locally. The `uploadUrl` prop
3612
+ * is reserved for future real HTTP upload integration and has no effect yet.
3613
+ * @example Basic usage
3614
+ * <bcm-file-upload name="report" label="Upload Report"></bcm-file-upload>
3615
+ * @example Multiple files
3616
+ * <bcm-file-upload name="attachments" multiple></bcm-file-upload>
3617
+ * @example Custom max size and accepted formats
3618
+ * <bcm-file-upload
3619
+ * name="medicalFiles"
3620
+ * accept=".pdf,.jpg"
3621
+ * maxSize={5}
3622
+ * ></bcm-file-upload>
3623
+ * @prop {string} name
3624
+ * The name of the form field used when the component is inside a `<form>`.
3625
+ * Supports automatic FormData generation including:
3626
+ * - single upload: name="file"
3627
+ * - multiple upload: name="file[0], file[1], ..."
3628
+ * @prop {string} label
3629
+ * Optional label shown above the upload zone.
3630
+ * @prop {string} caption
3631
+ * Optional helper text rendered below the file list. Example: “Max size 5MB”.
3632
+ * @prop {boolean} multiple
3633
+ * Allows selecting and uploading multiple files at once.
3634
+ * @prop {string} accept
3635
+ * Comma-separated list of allowed file extensions.
3636
+ * Example: ".pdf,.xls,.png".
3637
+ * @prop {number} maxSize
3638
+ * Maximum allowed size per file (in MB). If exceeded, an error alert appears.
3639
+ * @prop {boolean} required
3640
+ * Enables form validation — at least one file must be uploaded.
3641
+ * Validation is applied by the surrounding `bcm-form-2` / `bcm-form`
3642
+ * component, which reads `required` and `value` and sets the caption error.
3643
+ * @prop {boolean} disabled
3644
+ * Makes the uploader non-interactive: no clicking, no drag-and-drop.
3645
+ * @prop {"medium" | "small"} size
3646
+ * Controls spacing, typography, and visual density of the upload zone.
3647
+ * @prop {string} uploadUrl
3648
+ * Reserved for future backend upload integration.
3649
+ * Currently has no effect and does not trigger any HTTP requests.
3650
+ * @prop {number} maxFileCount
3651
+ * Optional limit for how many files can be selected in total.
3652
+ * Only applied when `multiple` is true.
3653
+ * If exceeded, new files are ignored and a max-file-count error is shown.
3654
+ * @prop {BcmUploadErrorMessages} customErrorMessages
3655
+ * Optional override for all error messages:
3656
+ * - maxSize: file too large
3657
+ * - type: unsupported file type
3658
+ * - maxFileCount: too many files selected
3659
+ * @event {EventEmitter<File[]>} bcm-file-change
3660
+ * Fired whenever the component's internal file list changes.
3661
+ * Emits an array of the current File objects.
3662
+ * @event {EventEmitter<BcmUploadItem>} bcm-file-removed
3663
+ * Fired when the user removes a file from the list.
3664
+ * @event {EventEmitter<BcmUploadItem>} bcm-upload-canceled
3665
+ * Fired when an upload is canceled before completion.
3666
+ * @event {EventEmitter<FocusEvent>} bcm-focus
3667
+ * Fired when upload zone receives keyboard or mouse focus.
3668
+ * @event {EventEmitter<FocusEvent>} bcm-blur
3669
+ * Fired when upload zone loses focus.
3670
+ * @csspart upload-zone
3671
+ * The root clickable drop area for file selection or drag-and-drop.
3672
+ * @csspart file-list
3673
+ * The container wrapping rendered file rows.
3674
+ * @csspart file-row
3675
+ * A single file entry including its name, actions, and progress bar.
3676
+ * @csspart remove-btn
3677
+ * The remove action button inside uploaded file rows.
3678
+ * @csspart cancel-btn
3679
+ * The cancel upload button during uploading progress.
3680
+ * @csspart download-btn
3681
+ * The download button for already uploaded files.
3682
+ * @csspart label
3683
+ * The external label text displayed above the component.
3684
+ * @csspart caption
3685
+ * Helper or informative caption displayed below the uploaded list.
3686
+ */
3687
+ interface BcmFileUpload {
3688
+ "accept"?: string;
3689
+ "buttonLabel"?: string;
3690
+ "caption"?: string;
3691
+ "captionError"?: string;
3692
+ "captionType"?: string;
3693
+ /**
3694
+ * Allows consumers to override default error messages.
3695
+ */
3696
+ "customErrorMessages"?: BcmUploadErrorMessages;
3697
+ "disabled"?: boolean;
3698
+ "fullWidth"?: boolean;
3699
+ "label"?: string;
3700
+ /**
3701
+ * Maximum number of files allowed in total. Only applied when `multiple` is true.
3702
+ */
3703
+ "maxFileCount"?: number;
3704
+ "maxSize"?: number;
3705
+ "multiple"?: boolean;
3706
+ "name"?: string;
3707
+ "noCaption"?: boolean;
3708
+ "onBcm-blur"?: (event: BcmFileUploadCustomEvent<FocusEvent>) => void;
3709
+ "onBcm-change"?: (event: BcmFileUploadCustomEvent<any>) => void;
3710
+ "onBcm-file-change"?: (event: BcmFileUploadCustomEvent<File[]>) => void;
3711
+ "onBcm-file-removed"?: (event: BcmFileUploadCustomEvent<BcmUploadItem>) => void;
3712
+ "onBcm-focus"?: (event: BcmFileUploadCustomEvent<FocusEvent>) => void;
3713
+ "onBcm-upload-canceled"?: (event: BcmFileUploadCustomEvent<BcmUploadItem>) => void;
3714
+ "position"?: BcmUploadPosition;
3715
+ "required"?: boolean;
3716
+ "showFileList"?: boolean;
3717
+ "size"?: 'medium' | 'small';
3718
+ /**
3719
+ * Reserved for future backend upload integration. Currently does not affect component behavior.
3720
+ */
3721
+ "uploadUrl"?: string;
3722
+ "value"?: any;
3723
+ }
3392
3724
  interface BcmForm {
3393
3725
  "_id"?: string;
3394
3726
  "autocomplete"?: boolean;
@@ -4658,6 +4990,7 @@ declare namespace LocalJSX {
4658
4990
  "bcm-empty": BcmEmpty;
4659
4991
  "bcm-error-layout": BcmErrorLayout;
4660
4992
  "bcm-expansion-panel": BcmExpansionPanel;
4993
+ "bcm-file-upload": BcmFileUpload;
4661
4994
  "bcm-form": BcmForm;
4662
4995
  "bcm-form-2": BcmForm2;
4663
4996
  "bcm-form-group": BcmFormGroup;
@@ -4786,6 +5119,89 @@ declare module "@stencil/core" {
4786
5119
  "bcm-empty": LocalJSX.BcmEmpty & JSXBase.HTMLAttributes<HTMLBcmEmptyElement>;
4787
5120
  "bcm-error-layout": LocalJSX.BcmErrorLayout & JSXBase.HTMLAttributes<HTMLBcmErrorLayoutElement>;
4788
5121
  "bcm-expansion-panel": LocalJSX.BcmExpansionPanel & JSXBase.HTMLAttributes<HTMLBcmExpansionPanelElement>;
5122
+ /**
5123
+ * @component BcmFileUpload
5124
+ * @description A fully featured drag-and-drop file uploader component.
5125
+ * Supports form-associated behavior, validation, custom size limits,
5126
+ * accepted file type filtering, multiple file selection, progress tracking,
5127
+ * upload canceling, file removal, and accessibility events (focus/blur).
5128
+ * Upload progress is currently simulated locally. The `uploadUrl` prop
5129
+ * is reserved for future real HTTP upload integration and has no effect yet.
5130
+ * @example Basic usage
5131
+ * <bcm-file-upload name="report" label="Upload Report"></bcm-file-upload>
5132
+ * @example Multiple files
5133
+ * <bcm-file-upload name="attachments" multiple></bcm-file-upload>
5134
+ * @example Custom max size and accepted formats
5135
+ * <bcm-file-upload
5136
+ * name="medicalFiles"
5137
+ * accept=".pdf,.jpg"
5138
+ * maxSize={5}
5139
+ * ></bcm-file-upload>
5140
+ * @prop {string} name
5141
+ * The name of the form field used when the component is inside a `<form>`.
5142
+ * Supports automatic FormData generation including:
5143
+ * - single upload: name="file"
5144
+ * - multiple upload: name="file[0], file[1], ..."
5145
+ * @prop {string} label
5146
+ * Optional label shown above the upload zone.
5147
+ * @prop {string} caption
5148
+ * Optional helper text rendered below the file list. Example: “Max size 5MB”.
5149
+ * @prop {boolean} multiple
5150
+ * Allows selecting and uploading multiple files at once.
5151
+ * @prop {string} accept
5152
+ * Comma-separated list of allowed file extensions.
5153
+ * Example: ".pdf,.xls,.png".
5154
+ * @prop {number} maxSize
5155
+ * Maximum allowed size per file (in MB). If exceeded, an error alert appears.
5156
+ * @prop {boolean} required
5157
+ * Enables form validation — at least one file must be uploaded.
5158
+ * Validation is applied by the surrounding `bcm-form-2` / `bcm-form`
5159
+ * component, which reads `required` and `value` and sets the caption error.
5160
+ * @prop {boolean} disabled
5161
+ * Makes the uploader non-interactive: no clicking, no drag-and-drop.
5162
+ * @prop {"medium" | "small"} size
5163
+ * Controls spacing, typography, and visual density of the upload zone.
5164
+ * @prop {string} uploadUrl
5165
+ * Reserved for future backend upload integration.
5166
+ * Currently has no effect and does not trigger any HTTP requests.
5167
+ * @prop {number} maxFileCount
5168
+ * Optional limit for how many files can be selected in total.
5169
+ * Only applied when `multiple` is true.
5170
+ * If exceeded, new files are ignored and a max-file-count error is shown.
5171
+ * @prop {BcmUploadErrorMessages} customErrorMessages
5172
+ * Optional override for all error messages:
5173
+ * - maxSize: file too large
5174
+ * - type: unsupported file type
5175
+ * - maxFileCount: too many files selected
5176
+ * @event {EventEmitter<File[]>} bcm-file-change
5177
+ * Fired whenever the component's internal file list changes.
5178
+ * Emits an array of the current File objects.
5179
+ * @event {EventEmitter<BcmUploadItem>} bcm-file-removed
5180
+ * Fired when the user removes a file from the list.
5181
+ * @event {EventEmitter<BcmUploadItem>} bcm-upload-canceled
5182
+ * Fired when an upload is canceled before completion.
5183
+ * @event {EventEmitter<FocusEvent>} bcm-focus
5184
+ * Fired when upload zone receives keyboard or mouse focus.
5185
+ * @event {EventEmitter<FocusEvent>} bcm-blur
5186
+ * Fired when upload zone loses focus.
5187
+ * @csspart upload-zone
5188
+ * The root clickable drop area for file selection or drag-and-drop.
5189
+ * @csspart file-list
5190
+ * The container wrapping rendered file rows.
5191
+ * @csspart file-row
5192
+ * A single file entry including its name, actions, and progress bar.
5193
+ * @csspart remove-btn
5194
+ * The remove action button inside uploaded file rows.
5195
+ * @csspart cancel-btn
5196
+ * The cancel upload button during uploading progress.
5197
+ * @csspart download-btn
5198
+ * The download button for already uploaded files.
5199
+ * @csspart label
5200
+ * The external label text displayed above the component.
5201
+ * @csspart caption
5202
+ * Helper or informative caption displayed below the uploaded list.
5203
+ */
5204
+ "bcm-file-upload": LocalJSX.BcmFileUpload & JSXBase.HTMLAttributes<HTMLBcmFileUploadElement>;
4789
5205
  "bcm-form": LocalJSX.BcmForm & JSXBase.HTMLAttributes<HTMLBcmFormElement>;
4790
5206
  "bcm-form-2": LocalJSX.BcmForm2 & JSXBase.HTMLAttributes<HTMLBcmForm2Element>;
4791
5207
  "bcm-form-group": LocalJSX.BcmFormGroup & JSXBase.HTMLAttributes<HTMLBcmFormGroupElement>;
@@ -8,6 +8,8 @@ interface ListItemTemplateProps extends Bcm.ListItemClickEvent {
8
8
  size?: any;
9
9
  highlight?: any;
10
10
  focusItem?: (event: any) => void;
11
+ disabled?: boolean;
12
+ readonly?: boolean;
11
13
  }
12
14
  export declare const ListItemTemplate: FunctionalComponent<ListItemTemplateProps>;
13
15
  export {};
@@ -28,6 +28,8 @@ interface ListTemplateProps extends Bcm.ListClickEvent {
28
28
  emptyIcon?: any;
29
29
  focusItem?: (event: any) => void;
30
30
  handleTransitionEnd?: (event: any) => void;
31
+ disabled?: boolean;
32
+ readonly?: boolean;
31
33
  }
32
34
  export declare const ListTemplate: FunctionalComponent<ListTemplateProps>;
33
35
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bromcom-ui",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.5",
4
4
  "description": "Bromcom UI is a collection of web components built with StencilJS",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",