@raintonic/formaui 0.2.1 → 0.3.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 (171) hide show
  1. package/CHANGELOG.md +100 -3
  2. package/LICENSE +21 -0
  3. package/README.md +80 -26
  4. package/fesm2022/raintonic-formaui-components-accordion.mjs +2 -2
  5. package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -1
  6. package/fesm2022/raintonic-formaui-components-alert.mjs +24 -5
  7. package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -1
  8. package/fesm2022/raintonic-formaui-components-autocomplete.mjs +38 -9
  9. package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -1
  10. package/fesm2022/raintonic-formaui-components-badge.mjs +45 -31
  11. package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -1
  12. package/fesm2022/raintonic-formaui-components-big-menu.mjs +23 -5
  13. package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +1 -1
  14. package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +24 -7
  15. package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -1
  16. package/fesm2022/raintonic-formaui-components-button-group.mjs +6 -6
  17. package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -1
  18. package/fesm2022/raintonic-formaui-components-button.mjs +63 -17
  19. package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -1
  20. package/fesm2022/raintonic-formaui-components-card.mjs +8 -8
  21. package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -1
  22. package/fesm2022/raintonic-formaui-components-checkbox.mjs +2 -2
  23. package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -1
  24. package/fesm2022/raintonic-formaui-components-data-table.mjs +67 -9
  25. package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -1
  26. package/fesm2022/raintonic-formaui-components-date-picker.mjs +63 -16
  27. package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -1
  28. package/fesm2022/raintonic-formaui-components-drawer.mjs +19 -4
  29. package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -1
  30. package/fesm2022/raintonic-formaui-components-file-upload.mjs +25 -5
  31. package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -1
  32. package/fesm2022/raintonic-formaui-components-form-field.mjs +21 -6
  33. package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -1
  34. package/fesm2022/raintonic-formaui-components-icon.mjs +2 -2
  35. package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -1
  36. package/fesm2022/raintonic-formaui-components-input.mjs +1 -1
  37. package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -1
  38. package/fesm2022/raintonic-formaui-components-list.mjs +4 -4
  39. package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -1
  40. package/fesm2022/raintonic-formaui-components-menu.mjs +4 -4
  41. package/fesm2022/raintonic-formaui-components-menu.mjs.map +1 -1
  42. package/fesm2022/raintonic-formaui-components-number-input.mjs +20 -5
  43. package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -1
  44. package/fesm2022/raintonic-formaui-components-paginator.mjs +27 -7
  45. package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -1
  46. package/fesm2022/raintonic-formaui-components-password-input.mjs +23 -5
  47. package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -1
  48. package/fesm2022/raintonic-formaui-components-popover.mjs +2 -2
  49. package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -1
  50. package/fesm2022/raintonic-formaui-components-progressbar.mjs +32 -7
  51. package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -1
  52. package/fesm2022/raintonic-formaui-components-radio.mjs +6 -5
  53. package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -1
  54. package/fesm2022/raintonic-formaui-components-select.mjs +19 -4
  55. package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -1
  56. package/fesm2022/raintonic-formaui-components-side-panel.mjs +19 -4
  57. package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -1
  58. package/fesm2022/raintonic-formaui-components-sidebar.mjs +23 -5
  59. package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +1 -1
  60. package/fesm2022/raintonic-formaui-components-skeleton.mjs +2 -2
  61. package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -1
  62. package/fesm2022/raintonic-formaui-components-slider.mjs +23 -5
  63. package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -1
  64. package/fesm2022/raintonic-formaui-components-spinner.mjs +24 -7
  65. package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -1
  66. package/fesm2022/raintonic-formaui-components-stepper.mjs +2 -2
  67. package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -1
  68. package/fesm2022/raintonic-formaui-components-tab.mjs +2 -2
  69. package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -1
  70. package/fesm2022/raintonic-formaui-components-tag.mjs +21 -4
  71. package/fesm2022/raintonic-formaui-components-tag.mjs.map +1 -1
  72. package/fesm2022/raintonic-formaui-components-time-picker.mjs +26 -7
  73. package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -1
  74. package/fesm2022/raintonic-formaui-components-toggle.mjs +2 -2
  75. package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -1
  76. package/fesm2022/raintonic-formaui-components-toolbar.mjs +41 -7
  77. package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -1
  78. package/fesm2022/raintonic-formaui-components-tooltip.mjs +2 -2
  79. package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -1
  80. package/fesm2022/raintonic-formaui-components-tree-table.mjs +35 -6
  81. package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -1
  82. package/fesm2022/raintonic-formaui-components-tree.mjs +23 -5
  83. package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -1
  84. package/fesm2022/raintonic-formaui-core.mjs +25 -1
  85. package/fesm2022/raintonic-formaui-core.mjs.map +1 -1
  86. package/fesm2022/raintonic-formaui-services-dialog.mjs +3 -3
  87. package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -1
  88. package/fesm2022/raintonic-formaui-services-notification.mjs +2 -2
  89. package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -1
  90. package/fesm2022/raintonic-formaui-services-theme.mjs +3 -3
  91. package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -1
  92. package/fesm2022/raintonic-formaui-test-utils.mjs +21 -16
  93. package/fesm2022/raintonic-formaui-test-utils.mjs.map +1 -1
  94. package/fesm2022/raintonic-formaui.mjs +1 -1
  95. package/fesm2022/raintonic-formaui.mjs.map +1 -1
  96. package/llms-full.txt +34 -25
  97. package/llms.txt +1 -2
  98. package/package.json +1 -5
  99. package/styles/index.scss +2 -2
  100. package/styles/partials/_motion.scss +25 -0
  101. package/styles/partials/_theme.scss +6 -5
  102. package/styles/partials/components/_button.scss +361 -367
  103. package/styles/partials/themes/_dark.scss +14 -0
  104. package/styles/partials/themes/_light.scss +14 -0
  105. package/types/raintonic-formaui-components-alert.d.ts +11 -1
  106. package/types/raintonic-formaui-components-alert.d.ts.map +1 -1
  107. package/types/raintonic-formaui-components-autocomplete.d.ts +25 -7
  108. package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -1
  109. package/types/raintonic-formaui-components-badge.d.ts +20 -9
  110. package/types/raintonic-formaui-components-badge.d.ts.map +1 -1
  111. package/types/raintonic-formaui-components-big-menu.d.ts +12 -1
  112. package/types/raintonic-formaui-components-big-menu.d.ts.map +1 -1
  113. package/types/raintonic-formaui-components-breadcrumb.d.ts +11 -2
  114. package/types/raintonic-formaui-components-breadcrumb.d.ts.map +1 -1
  115. package/types/raintonic-formaui-components-button-group.d.ts +6 -6
  116. package/types/raintonic-formaui-components-button.d.ts +9 -7
  117. package/types/raintonic-formaui-components-button.d.ts.map +1 -1
  118. package/types/raintonic-formaui-components-card.d.ts +4 -4
  119. package/types/raintonic-formaui-components-checkbox.d.ts +1 -1
  120. package/types/raintonic-formaui-components-data-table.d.ts +56 -16
  121. package/types/raintonic-formaui-components-data-table.d.ts.map +1 -1
  122. package/types/raintonic-formaui-components-date-picker.d.ts +32 -4
  123. package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -1
  124. package/types/raintonic-formaui-components-drawer.d.ts +10 -1
  125. package/types/raintonic-formaui-components-drawer.d.ts.map +1 -1
  126. package/types/raintonic-formaui-components-file-upload.d.ts +12 -1
  127. package/types/raintonic-formaui-components-file-upload.d.ts.map +1 -1
  128. package/types/raintonic-formaui-components-form-field.d.ts +12 -2
  129. package/types/raintonic-formaui-components-form-field.d.ts.map +1 -1
  130. package/types/raintonic-formaui-components-input.d.ts +1 -1
  131. package/types/raintonic-formaui-components-number-input.d.ts +11 -2
  132. package/types/raintonic-formaui-components-number-input.d.ts.map +1 -1
  133. package/types/raintonic-formaui-components-paginator.d.ts +13 -1
  134. package/types/raintonic-formaui-components-paginator.d.ts.map +1 -1
  135. package/types/raintonic-formaui-components-password-input.d.ts +12 -2
  136. package/types/raintonic-formaui-components-password-input.d.ts.map +1 -1
  137. package/types/raintonic-formaui-components-progressbar.d.ts +14 -1
  138. package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -1
  139. package/types/raintonic-formaui-components-radio.d.ts +2 -1
  140. package/types/raintonic-formaui-components-radio.d.ts.map +1 -1
  141. package/types/raintonic-formaui-components-select.d.ts.map +1 -1
  142. package/types/raintonic-formaui-components-side-panel.d.ts +10 -1
  143. package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -1
  144. package/types/raintonic-formaui-components-sidebar.d.ts +12 -1
  145. package/types/raintonic-formaui-components-sidebar.d.ts.map +1 -1
  146. package/types/raintonic-formaui-components-slider.d.ts +12 -1
  147. package/types/raintonic-formaui-components-slider.d.ts.map +1 -1
  148. package/types/raintonic-formaui-components-spinner.d.ts +12 -2
  149. package/types/raintonic-formaui-components-spinner.d.ts.map +1 -1
  150. package/types/raintonic-formaui-components-tag.d.ts +10 -1
  151. package/types/raintonic-formaui-components-tag.d.ts.map +1 -1
  152. package/types/raintonic-formaui-components-time-picker.d.ts +14 -2
  153. package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -1
  154. package/types/raintonic-formaui-components-toggle.d.ts +1 -1
  155. package/types/raintonic-formaui-components-toolbar.d.ts +22 -4
  156. package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -1
  157. package/types/raintonic-formaui-components-tree-table.d.ts +29 -4
  158. package/types/raintonic-formaui-components-tree-table.d.ts.map +1 -1
  159. package/types/raintonic-formaui-components-tree.d.ts +12 -1
  160. package/types/raintonic-formaui-components-tree.d.ts.map +1 -1
  161. package/types/raintonic-formaui-core.d.ts +19 -2
  162. package/types/raintonic-formaui-core.d.ts.map +1 -1
  163. package/types/raintonic-formaui-services-dialog.d.ts +1 -1
  164. package/types/raintonic-formaui-services-theme.d.ts +3 -3
  165. package/types/raintonic-formaui-test-utils.d.ts +15 -2
  166. package/types/raintonic-formaui-test-utils.d.ts.map +1 -1
  167. package/types/raintonic-formaui.d.ts +1 -1
  168. package/fesm2022/raintonic-formaui-components-dynamic-form.mjs +0 -266
  169. package/fesm2022/raintonic-formaui-components-dynamic-form.mjs.map +0 -1
  170. package/types/raintonic-formaui-components-dynamic-form.d.ts +0 -412
  171. package/types/raintonic-formaui-components-dynamic-form.d.ts.map +0 -1
@@ -1,7 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, booleanAttribute, output, signal, viewChild, computed, effect, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { Injectable, inject, ChangeDetectorRef, input, booleanAttribute, output, signal, viewChild, computed, effect, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
3
4
  import { DOCUMENT } from '@angular/common';
4
5
  import { FuiIconComponent } from '@raintonic/formaui/components/icon';
6
+ import { FuiIntlBase } from '@raintonic/formaui/core';
5
7
 
6
8
  const DRAWER_SIZES = {
7
9
  sm: '320px',
@@ -10,8 +12,20 @@ const DRAWER_SIZES = {
10
12
  full: '100%',
11
13
  };
12
14
 
15
+ class FuiDrawerIntl extends FuiIntlBase {
16
+ closeAriaLabel = 'Close drawer';
17
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiDrawerIntl, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
18
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiDrawerIntl, providedIn: 'root' });
19
+ }
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiDrawerIntl, decorators: [{
21
+ type: Injectable,
22
+ args: [{ providedIn: 'root' }]
23
+ }] });
24
+
13
25
  class FuiDrawerComponent {
14
26
  _document = inject(DOCUMENT);
27
+ intl = inject(FuiDrawerIntl);
28
+ _cdr = inject(ChangeDetectorRef);
15
29
  // Inputs
16
30
  position = input('right', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
17
31
  mode = input('overlay', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
@@ -61,6 +75,7 @@ class FuiDrawerComponent {
61
75
  }
62
76
  }
63
77
  });
78
+ this.intl.changes.pipe(takeUntilDestroyed()).subscribe(() => { this._cdr.markForCheck(); });
64
79
  }
65
80
  onKeydown(event) {
66
81
  if (!this._opened())
@@ -159,7 +174,7 @@ class FuiDrawerComponent {
159
174
  return Array.from(panel.querySelectorAll(selectors)).filter((el) => el.offsetParent !== null);
160
175
  }
161
176
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
162
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiDrawerComponent, isStandalone: true, selector: "fui-drawer", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, closeOnEsc: { classPropertyName: "closeOnEsc", publicName: "closeOnEsc", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange", closed: "closed" }, host: { listeners: { "document:keydown": "onKeydown($event)" }, properties: { "class.fui-drawer--open": "_opened()", "class.fui-drawer--left": "position() === \"left\"", "class.fui-drawer--right": "position() === \"right\"", "class.fui-drawer--top": "position() === \"top\"", "class.fui-drawer--bottom": "position() === \"bottom\"", "class.fui-drawer--overlay": "mode() === \"overlay\"", "class.fui-drawer--push": "mode() === \"push\"", "attr.role": "\"dialog\"", "attr.aria-modal": "_opened() ? \"true\" : null", "attr.aria-label": "ariaLabel() || (!ariaLabelledBy() ? title() : null)", "attr.aria-labelledby": "ariaLabelledBy()" }, classAttribute: "fui-drawer" }, viewQueries: [{ propertyName: "drawerPanel", first: true, predicate: ["drawerPanel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (_opened() && hasBackdrop()) {\r\n <div class=\"fui-drawer__backdrop\" (click)=\"closeOnBackdropClick() ? close() : null\" aria-hidden=\"true\"></div>\r\n}\r\n\r\n<div class=\"fui-drawer__panel\" [style.--_drawer-size]=\"_sizeValue()\" #drawerPanel tabindex=\"-1\">\r\n @if (title() || showCloseButton()) {\r\n <div class=\"fui-drawer__header\">\r\n @if (title()) {\r\n <h2 class=\"fui-drawer__title\">{{ title() }}</h2>\r\n }\r\n @if (showCloseButton()) {\r\n <button type=\"button\" class=\"fui-drawer__close\" (click)=\"close()\" aria-label=\"Close drawer\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"fui-drawer__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div class=\"fui-drawer__footer\">\r\n <ng-content select=\"[drawerFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-drawer{--fui-drawer-z-index: var(--fui-z-index-modal, 1050);--fui-drawer-bg: var(--fui-surface-00);--fui-drawer-border-color: var(--fui-border-color);--fui-drawer-shadow: -4px 0 24px var(--fui-black-10);--fui-drawer-backdrop-color: var(--fui-black-30);--fui-drawer-header-padding: var(--fui-spacing-04) var(--fui-spacing-05);--fui-drawer-content-padding: var(--fui-spacing-05);--fui-drawer-footer-padding: var(--fui-spacing-04) var(--fui-spacing-05);position:fixed;inset:0;pointer-events:none;z-index:var(--fui-drawer-z-index);overflow:hidden;visibility:hidden;transition:visibility 0s linear var(--fui-duration-moderate-01)}.fui-drawer--open{pointer-events:auto;visibility:visible;transition-delay:0s}.fui-drawer__backdrop{position:fixed;inset:0;background-color:var(--fui-drawer-backdrop-color);z-index:1;opacity:0;transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-drawer--open .fui-drawer__backdrop{opacity:1}.fui-drawer__panel{position:fixed;display:flex;flex-direction:column;background-color:var(--fui-drawer-bg);z-index:2;pointer-events:auto;transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms}.fui-drawer--right .fui-drawer__panel{top:0;right:0;bottom:0;width:var(--_drawer-size, 480px);max-width:100%;border-left:1px solid var(--fui-drawer-border-color);box-shadow:var(--fui-drawer-shadow);transform:translate(100%)}.fui-drawer--right.fui-drawer--open .fui-drawer__panel{transform:translate(0)}.fui-drawer--left .fui-drawer__panel{top:0;left:0;bottom:0;width:var(--_drawer-size, 480px);max-width:100%;border-right:1px solid var(--fui-drawer-border-color);box-shadow:4px 0 24px var(--fui-black-10);transform:translate(-100%)}.fui-drawer--left.fui-drawer--open .fui-drawer__panel{transform:translate(0)}.fui-drawer--top .fui-drawer__panel{top:0;left:0;right:0;height:var(--_drawer-size, 480px);max-height:100%;border-bottom:1px solid var(--fui-drawer-border-color);box-shadow:0 4px 24px var(--fui-black-10);transform:translateY(-100%)}.fui-drawer--top.fui-drawer--open .fui-drawer__panel{transform:translateY(0)}.fui-drawer--bottom .fui-drawer__panel{bottom:0;left:0;right:0;height:var(--_drawer-size, 480px);max-height:100%;border-top:1px solid var(--fui-drawer-border-color);box-shadow:0 -4px 24px var(--fui-black-10);transform:translateY(100%)}.fui-drawer--bottom.fui-drawer--open .fui-drawer__panel{transform:translateY(0)}.fui-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:var(--fui-drawer-header-padding);border-bottom:1px solid var(--fui-drawer-border-color);flex-shrink:0}.fui-drawer__title{font-size:var(--fui-font-size-03);font-weight:var(--fui-font-weight-semibold);color:var(--fui-text-primary);margin:0}.fui-drawer__close{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;background:transparent;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);cursor:pointer;transition:background-color var(--fui-duration-moderate-01) var(--fui-ease-standard),color var(--fui-duration-moderate-01) var(--fui-ease-standard)}.fui-drawer__close:hover{background-color:var(--fui-surface-02);color:var(--fui-text-primary)}.fui-drawer__close:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-drawer__content{flex:1;overflow-y:auto;padding:var(--fui-drawer-content-padding)}.fui-drawer__footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--fui-spacing-03);padding:var(--fui-drawer-footer-padding);border-top:1px solid var(--fui-drawer-border-color);flex-shrink:0}.fui-drawer__footer:empty{display:none}@media(prefers-reduced-motion:reduce){.fui-drawer__backdrop,.fui-drawer__panel,.fui-drawer__close{transition:none}}\n"], dependencies: [{ kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
177
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiDrawerComponent, isStandalone: true, selector: "fui-drawer", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, closeOnEsc: { classPropertyName: "closeOnEsc", publicName: "closeOnEsc", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange", closed: "closed" }, host: { listeners: { "document:keydown": "onKeydown($event)" }, properties: { "class.fui-drawer--open": "_opened()", "class.fui-drawer--left": "position() === \"left\"", "class.fui-drawer--right": "position() === \"right\"", "class.fui-drawer--top": "position() === \"top\"", "class.fui-drawer--bottom": "position() === \"bottom\"", "class.fui-drawer--overlay": "mode() === \"overlay\"", "class.fui-drawer--push": "mode() === \"push\"", "attr.role": "\"dialog\"", "attr.aria-modal": "_opened() ? \"true\" : null", "attr.aria-label": "ariaLabel() || (!ariaLabelledBy() ? title() : null)", "attr.aria-labelledby": "ariaLabelledBy()" }, classAttribute: "fui-drawer" }, viewQueries: [{ propertyName: "drawerPanel", first: true, predicate: ["drawerPanel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (_opened() && hasBackdrop()) {\r\n <div class=\"fui-drawer__backdrop\" (click)=\"closeOnBackdropClick() ? close() : null\" aria-hidden=\"true\"></div>\r\n}\r\n\r\n<div class=\"fui-drawer__panel\" [style.--_drawer-size]=\"_sizeValue()\" #drawerPanel tabindex=\"-1\">\r\n @if (title() || showCloseButton()) {\r\n <div class=\"fui-drawer__header\">\r\n @if (title()) {\r\n <h2 class=\"fui-drawer__title\">{{ title() }}</h2>\r\n }\r\n @if (showCloseButton()) {\r\n <button type=\"button\" class=\"fui-drawer__close\" (click)=\"close()\" [attr.aria-label]=\"intl.closeAriaLabel\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"fui-drawer__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div class=\"fui-drawer__footer\">\r\n <ng-content select=\"[drawerFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-drawer{--fui-drawer-z-index: var(--fui-z-index-modal, 1050);--fui-drawer-bg: var(--fui-surface-00);--fui-drawer-border-color: var(--fui-border-color);--fui-drawer-shadow: -4px 0 24px var(--fui-black-10);--fui-drawer-backdrop-color: var(--fui-black-30);--fui-drawer-header-padding: var(--fui-spacing-04) var(--fui-spacing-05);--fui-drawer-content-padding: var(--fui-spacing-05);--fui-drawer-footer-padding: var(--fui-spacing-04) var(--fui-spacing-05);position:fixed;inset:0;pointer-events:none;z-index:var(--fui-drawer-z-index);overflow:hidden;visibility:hidden;transition:visibility 0s linear var(--fui-duration-moderate-01)}.fui-drawer--open{pointer-events:auto;visibility:visible;transition-delay:0s}.fui-drawer__backdrop{position:fixed;inset:0;background-color:var(--fui-drawer-backdrop-color);z-index:1;opacity:0;transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-drawer--open .fui-drawer__backdrop{opacity:1}.fui-drawer__panel{position:fixed;display:flex;flex-direction:column;background-color:var(--fui-drawer-bg);z-index:2;pointer-events:auto;transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms}.fui-drawer--right .fui-drawer__panel{top:0;right:0;bottom:0;width:var(--_drawer-size, 480px);max-width:100%;border-left:1px solid var(--fui-drawer-border-color);box-shadow:var(--fui-drawer-shadow);transform:translate(100%)}.fui-drawer--right.fui-drawer--open .fui-drawer__panel{transform:translate(0)}.fui-drawer--left .fui-drawer__panel{top:0;left:0;bottom:0;width:var(--_drawer-size, 480px);max-width:100%;border-right:1px solid var(--fui-drawer-border-color);box-shadow:4px 0 24px var(--fui-black-10);transform:translate(-100%)}.fui-drawer--left.fui-drawer--open .fui-drawer__panel{transform:translate(0)}.fui-drawer--top .fui-drawer__panel{top:0;left:0;right:0;height:var(--_drawer-size, 480px);max-height:100%;border-bottom:1px solid var(--fui-drawer-border-color);box-shadow:0 4px 24px var(--fui-black-10);transform:translateY(-100%)}.fui-drawer--top.fui-drawer--open .fui-drawer__panel{transform:translateY(0)}.fui-drawer--bottom .fui-drawer__panel{bottom:0;left:0;right:0;height:var(--_drawer-size, 480px);max-height:100%;border-top:1px solid var(--fui-drawer-border-color);box-shadow:0 -4px 24px var(--fui-black-10);transform:translateY(100%)}.fui-drawer--bottom.fui-drawer--open .fui-drawer__panel{transform:translateY(0)}.fui-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:var(--fui-drawer-header-padding);border-bottom:1px solid var(--fui-drawer-border-color);flex-shrink:0}.fui-drawer__title{font-size:var(--fui-font-size-03);font-weight:var(--fui-font-weight-semibold);color:var(--fui-text-primary);margin:0}.fui-drawer__close{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;background:transparent;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);cursor:pointer;transition:background-color var(--fui-duration-moderate-01) var(--fui-ease-standard),color var(--fui-duration-moderate-01) var(--fui-ease-standard)}.fui-drawer__close:hover{background-color:var(--fui-surface-02);color:var(--fui-text-primary)}.fui-drawer__close:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-drawer__content{flex:1;overflow-y:auto;padding:var(--fui-drawer-content-padding)}.fui-drawer__footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--fui-spacing-03);padding:var(--fui-drawer-footer-padding);border-top:1px solid var(--fui-drawer-border-color);flex-shrink:0}.fui-drawer__footer:empty{display:none}@media(prefers-reduced-motion:reduce){.fui-drawer__backdrop,.fui-drawer__panel,.fui-drawer__close{transition:none}}\n"], dependencies: [{ kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
163
178
  }
164
179
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiDrawerComponent, decorators: [{
165
180
  type: Component,
@@ -176,7 +191,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
176
191
  '[attr.aria-modal]': '_opened() ? "true" : null',
177
192
  '[attr.aria-label]': 'ariaLabel() || (!ariaLabelledBy() ? title() : null)',
178
193
  '[attr.aria-labelledby]': 'ariaLabelledBy()',
179
- }, template: "@if (_opened() && hasBackdrop()) {\r\n <div class=\"fui-drawer__backdrop\" (click)=\"closeOnBackdropClick() ? close() : null\" aria-hidden=\"true\"></div>\r\n}\r\n\r\n<div class=\"fui-drawer__panel\" [style.--_drawer-size]=\"_sizeValue()\" #drawerPanel tabindex=\"-1\">\r\n @if (title() || showCloseButton()) {\r\n <div class=\"fui-drawer__header\">\r\n @if (title()) {\r\n <h2 class=\"fui-drawer__title\">{{ title() }}</h2>\r\n }\r\n @if (showCloseButton()) {\r\n <button type=\"button\" class=\"fui-drawer__close\" (click)=\"close()\" aria-label=\"Close drawer\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"fui-drawer__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div class=\"fui-drawer__footer\">\r\n <ng-content select=\"[drawerFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-drawer{--fui-drawer-z-index: var(--fui-z-index-modal, 1050);--fui-drawer-bg: var(--fui-surface-00);--fui-drawer-border-color: var(--fui-border-color);--fui-drawer-shadow: -4px 0 24px var(--fui-black-10);--fui-drawer-backdrop-color: var(--fui-black-30);--fui-drawer-header-padding: var(--fui-spacing-04) var(--fui-spacing-05);--fui-drawer-content-padding: var(--fui-spacing-05);--fui-drawer-footer-padding: var(--fui-spacing-04) var(--fui-spacing-05);position:fixed;inset:0;pointer-events:none;z-index:var(--fui-drawer-z-index);overflow:hidden;visibility:hidden;transition:visibility 0s linear var(--fui-duration-moderate-01)}.fui-drawer--open{pointer-events:auto;visibility:visible;transition-delay:0s}.fui-drawer__backdrop{position:fixed;inset:0;background-color:var(--fui-drawer-backdrop-color);z-index:1;opacity:0;transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-drawer--open .fui-drawer__backdrop{opacity:1}.fui-drawer__panel{position:fixed;display:flex;flex-direction:column;background-color:var(--fui-drawer-bg);z-index:2;pointer-events:auto;transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms}.fui-drawer--right .fui-drawer__panel{top:0;right:0;bottom:0;width:var(--_drawer-size, 480px);max-width:100%;border-left:1px solid var(--fui-drawer-border-color);box-shadow:var(--fui-drawer-shadow);transform:translate(100%)}.fui-drawer--right.fui-drawer--open .fui-drawer__panel{transform:translate(0)}.fui-drawer--left .fui-drawer__panel{top:0;left:0;bottom:0;width:var(--_drawer-size, 480px);max-width:100%;border-right:1px solid var(--fui-drawer-border-color);box-shadow:4px 0 24px var(--fui-black-10);transform:translate(-100%)}.fui-drawer--left.fui-drawer--open .fui-drawer__panel{transform:translate(0)}.fui-drawer--top .fui-drawer__panel{top:0;left:0;right:0;height:var(--_drawer-size, 480px);max-height:100%;border-bottom:1px solid var(--fui-drawer-border-color);box-shadow:0 4px 24px var(--fui-black-10);transform:translateY(-100%)}.fui-drawer--top.fui-drawer--open .fui-drawer__panel{transform:translateY(0)}.fui-drawer--bottom .fui-drawer__panel{bottom:0;left:0;right:0;height:var(--_drawer-size, 480px);max-height:100%;border-top:1px solid var(--fui-drawer-border-color);box-shadow:0 -4px 24px var(--fui-black-10);transform:translateY(100%)}.fui-drawer--bottom.fui-drawer--open .fui-drawer__panel{transform:translateY(0)}.fui-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:var(--fui-drawer-header-padding);border-bottom:1px solid var(--fui-drawer-border-color);flex-shrink:0}.fui-drawer__title{font-size:var(--fui-font-size-03);font-weight:var(--fui-font-weight-semibold);color:var(--fui-text-primary);margin:0}.fui-drawer__close{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;background:transparent;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);cursor:pointer;transition:background-color var(--fui-duration-moderate-01) var(--fui-ease-standard),color var(--fui-duration-moderate-01) var(--fui-ease-standard)}.fui-drawer__close:hover{background-color:var(--fui-surface-02);color:var(--fui-text-primary)}.fui-drawer__close:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-drawer__content{flex:1;overflow-y:auto;padding:var(--fui-drawer-content-padding)}.fui-drawer__footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--fui-spacing-03);padding:var(--fui-drawer-footer-padding);border-top:1px solid var(--fui-drawer-border-color);flex-shrink:0}.fui-drawer__footer:empty{display:none}@media(prefers-reduced-motion:reduce){.fui-drawer__backdrop,.fui-drawer__panel,.fui-drawer__close{transition:none}}\n"] }]
194
+ }, template: "@if (_opened() && hasBackdrop()) {\r\n <div class=\"fui-drawer__backdrop\" (click)=\"closeOnBackdropClick() ? close() : null\" aria-hidden=\"true\"></div>\r\n}\r\n\r\n<div class=\"fui-drawer__panel\" [style.--_drawer-size]=\"_sizeValue()\" #drawerPanel tabindex=\"-1\">\r\n @if (title() || showCloseButton()) {\r\n <div class=\"fui-drawer__header\">\r\n @if (title()) {\r\n <h2 class=\"fui-drawer__title\">{{ title() }}</h2>\r\n }\r\n @if (showCloseButton()) {\r\n <button type=\"button\" class=\"fui-drawer__close\" (click)=\"close()\" [attr.aria-label]=\"intl.closeAriaLabel\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"fui-drawer__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div class=\"fui-drawer__footer\">\r\n <ng-content select=\"[drawerFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-drawer{--fui-drawer-z-index: var(--fui-z-index-modal, 1050);--fui-drawer-bg: var(--fui-surface-00);--fui-drawer-border-color: var(--fui-border-color);--fui-drawer-shadow: -4px 0 24px var(--fui-black-10);--fui-drawer-backdrop-color: var(--fui-black-30);--fui-drawer-header-padding: var(--fui-spacing-04) var(--fui-spacing-05);--fui-drawer-content-padding: var(--fui-spacing-05);--fui-drawer-footer-padding: var(--fui-spacing-04) var(--fui-spacing-05);position:fixed;inset:0;pointer-events:none;z-index:var(--fui-drawer-z-index);overflow:hidden;visibility:hidden;transition:visibility 0s linear var(--fui-duration-moderate-01)}.fui-drawer--open{pointer-events:auto;visibility:visible;transition-delay:0s}.fui-drawer__backdrop{position:fixed;inset:0;background-color:var(--fui-drawer-backdrop-color);z-index:1;opacity:0;transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-drawer--open .fui-drawer__backdrop{opacity:1}.fui-drawer__panel{position:fixed;display:flex;flex-direction:column;background-color:var(--fui-drawer-bg);z-index:2;pointer-events:auto;transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms}.fui-drawer--right .fui-drawer__panel{top:0;right:0;bottom:0;width:var(--_drawer-size, 480px);max-width:100%;border-left:1px solid var(--fui-drawer-border-color);box-shadow:var(--fui-drawer-shadow);transform:translate(100%)}.fui-drawer--right.fui-drawer--open .fui-drawer__panel{transform:translate(0)}.fui-drawer--left .fui-drawer__panel{top:0;left:0;bottom:0;width:var(--_drawer-size, 480px);max-width:100%;border-right:1px solid var(--fui-drawer-border-color);box-shadow:4px 0 24px var(--fui-black-10);transform:translate(-100%)}.fui-drawer--left.fui-drawer--open .fui-drawer__panel{transform:translate(0)}.fui-drawer--top .fui-drawer__panel{top:0;left:0;right:0;height:var(--_drawer-size, 480px);max-height:100%;border-bottom:1px solid var(--fui-drawer-border-color);box-shadow:0 4px 24px var(--fui-black-10);transform:translateY(-100%)}.fui-drawer--top.fui-drawer--open .fui-drawer__panel{transform:translateY(0)}.fui-drawer--bottom .fui-drawer__panel{bottom:0;left:0;right:0;height:var(--_drawer-size, 480px);max-height:100%;border-top:1px solid var(--fui-drawer-border-color);box-shadow:0 -4px 24px var(--fui-black-10);transform:translateY(100%)}.fui-drawer--bottom.fui-drawer--open .fui-drawer__panel{transform:translateY(0)}.fui-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:var(--fui-drawer-header-padding);border-bottom:1px solid var(--fui-drawer-border-color);flex-shrink:0}.fui-drawer__title{font-size:var(--fui-font-size-03);font-weight:var(--fui-font-weight-semibold);color:var(--fui-text-primary);margin:0}.fui-drawer__close{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;background:transparent;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);cursor:pointer;transition:background-color var(--fui-duration-moderate-01) var(--fui-ease-standard),color var(--fui-duration-moderate-01) var(--fui-ease-standard)}.fui-drawer__close:hover{background-color:var(--fui-surface-02);color:var(--fui-text-primary)}.fui-drawer__close:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-drawer__content{flex:1;overflow-y:auto;padding:var(--fui-drawer-content-padding)}.fui-drawer__footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--fui-spacing-03);padding:var(--fui-drawer-footer-padding);border-top:1px solid var(--fui-drawer-border-color);flex-shrink:0}.fui-drawer__footer:empty{display:none}@media(prefers-reduced-motion:reduce){.fui-drawer__backdrop,.fui-drawer__panel,.fui-drawer__close{transition:none}}\n"] }]
180
195
  }], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], opened: [{ type: i0.Input, args: [{ isSignal: true, alias: "opened", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], closeOnEsc: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEsc", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], closed: [{ type: i0.Output, args: ["closed"] }], drawerPanel: [{ type: i0.ViewChild, args: ['drawerPanel', { isSignal: true }] }], onKeydown: [{
181
196
  type: HostListener,
182
197
  args: ['document:keydown', ['$event']]
@@ -186,5 +201,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
186
201
  * Generated bundle index. Do not edit.
187
202
  */
188
203
 
189
- export { DRAWER_SIZES, FuiDrawerComponent };
204
+ export { DRAWER_SIZES, FuiDrawerComponent, FuiDrawerIntl };
190
205
  //# sourceMappingURL=raintonic-formaui-components-drawer.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"raintonic-formaui-components-drawer.mjs","sources":["../../../lib/components/drawer/drawer.types.ts","../../../lib/components/drawer/drawer.component.ts","../../../lib/components/drawer/drawer.component.html","../../../lib/components/drawer/raintonic-formaui-components-drawer.ts"],"sourcesContent":["export type DrawerPosition = 'left' | 'right' | 'top' | 'bottom';\r\nexport type DrawerMode = 'overlay' | 'push';\r\nexport type DrawerSize = 'sm' | 'md' | 'lg' | 'full';\r\n\r\nexport const DRAWER_SIZES: Record<DrawerSize, string> = {\r\n sm: '320px',\r\n md: '480px',\r\n lg: '640px',\r\n full: '100%',\r\n};\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n input,\r\n output,\r\n signal,\r\n computed,\r\n effect,\r\n booleanAttribute,\r\n HostListener,\r\n ElementRef,\r\n inject,\r\n viewChild,\r\n Signal,\r\n WritableSignal,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { FuiIconComponent } from '@raintonic/formaui/components/icon';\r\nimport { DrawerPosition, DrawerMode, DrawerSize, DRAWER_SIZES } from './drawer.types';\r\n\r\n@Component({\r\n selector: 'fui-drawer',\r\n standalone: true,\r\n imports: [FuiIconComponent],\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'fui-drawer',\r\n '[class.fui-drawer--open]': '_opened()',\r\n '[class.fui-drawer--left]': 'position() === \"left\"',\r\n '[class.fui-drawer--right]': 'position() === \"right\"',\r\n '[class.fui-drawer--top]': 'position() === \"top\"',\r\n '[class.fui-drawer--bottom]': 'position() === \"bottom\"',\r\n '[class.fui-drawer--overlay]': 'mode() === \"overlay\"',\r\n '[class.fui-drawer--push]': 'mode() === \"push\"',\r\n '[attr.role]': '\"dialog\"',\r\n '[attr.aria-modal]': '_opened() ? \"true\" : null',\r\n '[attr.aria-label]': 'ariaLabel() || (!ariaLabelledBy() ? title() : null)',\r\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\r\n },\r\n})\r\nexport class FuiDrawerComponent {\r\n private readonly _document = inject(DOCUMENT);\r\n\r\n // Inputs\r\n readonly position = input<DrawerPosition>('right');\r\n readonly mode = input<DrawerMode>('overlay');\r\n readonly size = input('md');\r\n readonly opened = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n readonly hasBackdrop = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n readonly closeOnBackdropClick = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n readonly closeOnEsc = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n readonly title = input('');\r\n readonly showCloseButton = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n\r\n /** ARIA label for the drawer, used when no visible title is present */\r\n readonly ariaLabel = input<string | null>(null);\r\n\r\n /** ID of an element that labels the drawer */\r\n readonly ariaLabelledBy = input<string | null>(null);\r\n\r\n // Outputs\r\n readonly openedChange = output<boolean>();\r\n readonly closed = output();\r\n\r\n // Internal state\r\n readonly _opened: WritableSignal<boolean> = signal(false);\r\n readonly _animating: WritableSignal<boolean> = signal(false);\r\n\r\n // Track the last input value to avoid effect re-triggering on programmatic changes\r\n private _lastInputValue = false;\r\n\r\n // Focus management\r\n private _previouslyFocusedElement: HTMLElement | null = null;\r\n\r\n // ViewChild\r\n readonly drawerPanel: Signal<ElementRef<HTMLElement> | undefined> = viewChild<ElementRef<HTMLElement>>('drawerPanel');\r\n\r\n // Computed\r\n readonly _sizeValue: Signal<string> = computed(() => {\r\n const size = this.size();\r\n return DRAWER_SIZES[size as DrawerSize] ?? size;\r\n });\r\n\r\n readonly _isHorizontal: Signal<boolean> = computed(() => {\r\n const pos = this.position();\r\n return pos === 'left' || pos === 'right';\r\n });\r\n\r\n constructor() {\r\n // Sync opened input with internal state — only react when the input actually changes\r\n effect(() => {\r\n const inputValue = this.opened();\r\n if (inputValue !== this._lastInputValue) {\r\n this._lastInputValue = inputValue;\r\n if (inputValue) {\r\n this._openInternal();\r\n } else {\r\n this._closeInternal();\r\n }\r\n }\r\n });\r\n }\r\n\r\n @HostListener('document:keydown', ['$event'])\r\n onKeydown(event: KeyboardEvent): void {\r\n if (!this._opened()) return;\r\n\r\n if (event.key === 'Escape' && this.closeOnEsc()) {\r\n this.close();\r\n return;\r\n }\r\n\r\n // Focus trap cycling\r\n if (event.key === 'Tab') {\r\n const focusableElements = this._getAllFocusableElements();\r\n if (focusableElements.length === 0) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n const firstFocusable = focusableElements[0];\r\n const lastFocusable = focusableElements[focusableElements.length - 1];\r\n const activeElement = this._document.activeElement;\r\n\r\n if (event.shiftKey) {\r\n if (activeElement === firstFocusable) {\r\n event.preventDefault();\r\n lastFocusable.focus();\r\n }\r\n } else {\r\n if (activeElement === lastFocusable) {\r\n event.preventDefault();\r\n firstFocusable.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n open(): void {\r\n if (!this._opened()) {\r\n this._openInternal();\r\n this.openedChange.emit(true);\r\n }\r\n }\r\n\r\n close(): void {\r\n if (this._opened()) {\r\n this._closeInternal();\r\n this.openedChange.emit(false);\r\n this.closed.emit();\r\n }\r\n }\r\n\r\n toggle(): void {\r\n if (this._opened()) {\r\n this.close();\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n private _openInternal(): void {\r\n this._previouslyFocusedElement = document.activeElement as HTMLElement;\r\n this._opened.set(true);\r\n\r\n // Focus the panel after it renders\r\n setTimeout(() => {\r\n this._focusFirstTabbable();\r\n });\r\n }\r\n\r\n private _closeInternal(): void {\r\n this._opened.set(false);\r\n\r\n // Restore focus\r\n if (this._previouslyFocusedElement) {\r\n this._previouslyFocusedElement.focus();\r\n this._previouslyFocusedElement = null;\r\n }\r\n }\r\n\r\n private _focusFirstTabbable(): void {\r\n const panel = this.drawerPanel()?.nativeElement;\r\n if (!panel) return;\r\n\r\n const focusable = this._getAllFocusableElements();\r\n\r\n if (focusable.length > 0) {\r\n focusable[0].focus();\r\n } else {\r\n panel.setAttribute('tabindex', '-1');\r\n panel.focus();\r\n }\r\n }\r\n\r\n private _getAllFocusableElements(): HTMLElement[] {\r\n const panel = this.drawerPanel()?.nativeElement;\r\n if (!panel) return [];\r\n\r\n const selectors = [\r\n 'a[href]',\r\n 'button:not([disabled])',\r\n 'textarea:not([disabled])',\r\n 'input:not([disabled])',\r\n 'select:not([disabled])',\r\n '[tabindex]:not([tabindex=\"-1\"])',\r\n '[contenteditable=\"true\"]',\r\n ].join(',');\r\n\r\n return Array.from(panel.querySelectorAll<HTMLElement>(selectors)).filter((el) => el.offsetParent !== null);\r\n }\r\n}\r\n","@if (_opened() && hasBackdrop()) {\r\n <div class=\"fui-drawer__backdrop\" (click)=\"closeOnBackdropClick() ? close() : null\" aria-hidden=\"true\"></div>\r\n}\r\n\r\n<div class=\"fui-drawer__panel\" [style.--_drawer-size]=\"_sizeValue()\" #drawerPanel tabindex=\"-1\">\r\n @if (title() || showCloseButton()) {\r\n <div class=\"fui-drawer__header\">\r\n @if (title()) {\r\n <h2 class=\"fui-drawer__title\">{{ title() }}</h2>\r\n }\r\n @if (showCloseButton()) {\r\n <button type=\"button\" class=\"fui-drawer__close\" (click)=\"close()\" aria-label=\"Close drawer\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"fui-drawer__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div class=\"fui-drawer__footer\">\r\n <ng-content select=\"[drawerFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIO,MAAM,YAAY,GAA+B;AACtD,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,IAAI,EAAE,MAAM;;;MCoCD,kBAAkB,CAAA;AACZ,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;;AAGpC,IAAA,QAAQ,GAAG,KAAK,CAAiB,OAAO,+EAAC;AACzC,IAAA,IAAI,GAAG,KAAK,CAAa,SAAS,2EAAC;AACnC,IAAA,IAAI,GAAG,KAAK,CAAC,IAAI,2EAAC;IAClB,MAAM,GAAG,KAAK,CAAmB,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxE,WAAW,GAAG,KAAK,CAAmB,IAAI,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAC5E,oBAAoB,GAAG,KAAK,CAAmB,IAAI,4FAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACrF,UAAU,GAAG,KAAK,CAAmB,IAAI,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC3E,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,4EAAC;IACjB,eAAe,GAA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E,UAAU;AACzB,wBAAA,mBAAmB,EAAE,2BAA2B;AAChD,wBAAA,mBAAmB,EAAE,qDAAqD;AAC1E,wBAAA,wBAAwB,EAAE,kBAAkB;AAC7C,qBAAA,EAAA,QAAA,EAAA,m6BAAA,EAAA,MAAA,EAAA,CAAA,8sKAAA,CAAA,EAAA;qxCAqCsG,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA;sBA4BnH,YAAY;uBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;;AE3G9C;;AAEG;;;;"}
1
+ {"version":3,"file":"raintonic-formaui-components-drawer.mjs","sources":["../../../lib/components/drawer/drawer.types.ts","../../../lib/components/drawer/drawer.intl.ts","../../../lib/components/drawer/drawer.component.ts","../../../lib/components/drawer/drawer.component.html","../../../lib/components/drawer/raintonic-formaui-components-drawer.ts"],"sourcesContent":["export type DrawerPosition = 'left' | 'right' | 'top' | 'bottom';\r\nexport type DrawerMode = 'overlay' | 'push';\r\nexport type DrawerSize = 'sm' | 'md' | 'lg' | 'full';\r\n\r\nexport const DRAWER_SIZES: Record<DrawerSize, string> = {\r\n sm: '320px',\r\n md: '480px',\r\n lg: '640px',\r\n full: '100%',\r\n};\r\n","import { Injectable } from '@angular/core';\r\nimport { FuiIntlBase } from '@raintonic/formaui/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class FuiDrawerIntl extends FuiIntlBase {\r\n closeAriaLabel = 'Close drawer';\r\n}\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n ViewEncapsulation,\r\n input,\r\n output,\r\n signal,\r\n computed,\r\n effect,\r\n booleanAttribute,\r\n HostListener,\r\n ElementRef,\r\n inject,\r\n viewChild,\r\n Signal,\r\n WritableSignal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { FuiIconComponent } from '@raintonic/formaui/components/icon';\r\nimport { DrawerPosition, DrawerMode, DrawerSize, DRAWER_SIZES } from './drawer.types';\r\nimport { FuiDrawerIntl } from './drawer.intl';\r\n\r\n@Component({\r\n selector: 'fui-drawer',\r\n standalone: true,\r\n imports: [FuiIconComponent],\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'fui-drawer',\r\n '[class.fui-drawer--open]': '_opened()',\r\n '[class.fui-drawer--left]': 'position() === \"left\"',\r\n '[class.fui-drawer--right]': 'position() === \"right\"',\r\n '[class.fui-drawer--top]': 'position() === \"top\"',\r\n '[class.fui-drawer--bottom]': 'position() === \"bottom\"',\r\n '[class.fui-drawer--overlay]': 'mode() === \"overlay\"',\r\n '[class.fui-drawer--push]': 'mode() === \"push\"',\r\n '[attr.role]': '\"dialog\"',\r\n '[attr.aria-modal]': '_opened() ? \"true\" : null',\r\n '[attr.aria-label]': 'ariaLabel() || (!ariaLabelledBy() ? title() : null)',\r\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\r\n },\r\n})\r\nexport class FuiDrawerComponent {\r\n private readonly _document = inject(DOCUMENT);\r\n readonly intl = inject(FuiDrawerIntl);\r\n private readonly _cdr = inject(ChangeDetectorRef);\r\n\r\n // Inputs\r\n readonly position = input<DrawerPosition>('right');\r\n readonly mode = input<DrawerMode>('overlay');\r\n readonly size = input('md');\r\n readonly opened = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n readonly hasBackdrop = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n readonly closeOnBackdropClick = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n readonly closeOnEsc = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n readonly title = input('');\r\n readonly showCloseButton = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n\r\n /** ARIA label for the drawer, used when no visible title is present */\r\n readonly ariaLabel = input<string | null>(null);\r\n\r\n /** ID of an element that labels the drawer */\r\n readonly ariaLabelledBy = input<string | null>(null);\r\n\r\n // Outputs\r\n readonly openedChange = output<boolean>();\r\n readonly closed = output();\r\n\r\n // Internal state\r\n readonly _opened: WritableSignal<boolean> = signal(false);\r\n readonly _animating: WritableSignal<boolean> = signal(false);\r\n\r\n // Track the last input value to avoid effect re-triggering on programmatic changes\r\n private _lastInputValue = false;\r\n\r\n // Focus management\r\n private _previouslyFocusedElement: HTMLElement | null = null;\r\n\r\n // ViewChild\r\n readonly drawerPanel: Signal<ElementRef<HTMLElement> | undefined> = viewChild<ElementRef<HTMLElement>>('drawerPanel');\r\n\r\n // Computed\r\n readonly _sizeValue: Signal<string> = computed(() => {\r\n const size = this.size();\r\n return DRAWER_SIZES[size as DrawerSize] ?? size;\r\n });\r\n\r\n readonly _isHorizontal: Signal<boolean> = computed(() => {\r\n const pos = this.position();\r\n return pos === 'left' || pos === 'right';\r\n });\r\n\r\n constructor() {\r\n // Sync opened input with internal state — only react when the input actually changes\r\n effect(() => {\r\n const inputValue = this.opened();\r\n if (inputValue !== this._lastInputValue) {\r\n this._lastInputValue = inputValue;\r\n if (inputValue) {\r\n this._openInternal();\r\n } else {\r\n this._closeInternal();\r\n }\r\n }\r\n });\r\n\r\n this.intl.changes.pipe(takeUntilDestroyed()).subscribe(() => { this._cdr.markForCheck(); });\r\n }\r\n\r\n @HostListener('document:keydown', ['$event'])\r\n onKeydown(event: KeyboardEvent): void {\r\n if (!this._opened()) return;\r\n\r\n if (event.key === 'Escape' && this.closeOnEsc()) {\r\n this.close();\r\n return;\r\n }\r\n\r\n // Focus trap cycling\r\n if (event.key === 'Tab') {\r\n const focusableElements = this._getAllFocusableElements();\r\n if (focusableElements.length === 0) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n const firstFocusable = focusableElements[0];\r\n const lastFocusable = focusableElements[focusableElements.length - 1];\r\n const activeElement = this._document.activeElement;\r\n\r\n if (event.shiftKey) {\r\n if (activeElement === firstFocusable) {\r\n event.preventDefault();\r\n lastFocusable.focus();\r\n }\r\n } else {\r\n if (activeElement === lastFocusable) {\r\n event.preventDefault();\r\n firstFocusable.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n open(): void {\r\n if (!this._opened()) {\r\n this._openInternal();\r\n this.openedChange.emit(true);\r\n }\r\n }\r\n\r\n close(): void {\r\n if (this._opened()) {\r\n this._closeInternal();\r\n this.openedChange.emit(false);\r\n this.closed.emit();\r\n }\r\n }\r\n\r\n toggle(): void {\r\n if (this._opened()) {\r\n this.close();\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n private _openInternal(): void {\r\n this._previouslyFocusedElement = document.activeElement as HTMLElement;\r\n this._opened.set(true);\r\n\r\n // Focus the panel after it renders\r\n setTimeout(() => {\r\n this._focusFirstTabbable();\r\n });\r\n }\r\n\r\n private _closeInternal(): void {\r\n this._opened.set(false);\r\n\r\n // Restore focus\r\n if (this._previouslyFocusedElement) {\r\n this._previouslyFocusedElement.focus();\r\n this._previouslyFocusedElement = null;\r\n }\r\n }\r\n\r\n private _focusFirstTabbable(): void {\r\n const panel = this.drawerPanel()?.nativeElement;\r\n if (!panel) return;\r\n\r\n const focusable = this._getAllFocusableElements();\r\n\r\n if (focusable.length > 0) {\r\n focusable[0].focus();\r\n } else {\r\n panel.setAttribute('tabindex', '-1');\r\n panel.focus();\r\n }\r\n }\r\n\r\n private _getAllFocusableElements(): HTMLElement[] {\r\n const panel = this.drawerPanel()?.nativeElement;\r\n if (!panel) return [];\r\n\r\n const selectors = [\r\n 'a[href]',\r\n 'button:not([disabled])',\r\n 'textarea:not([disabled])',\r\n 'input:not([disabled])',\r\n 'select:not([disabled])',\r\n '[tabindex]:not([tabindex=\"-1\"])',\r\n '[contenteditable=\"true\"]',\r\n ].join(',');\r\n\r\n return Array.from(panel.querySelectorAll<HTMLElement>(selectors)).filter((el) => el.offsetParent !== null);\r\n }\r\n}\r\n","@if (_opened() && hasBackdrop()) {\r\n <div class=\"fui-drawer__backdrop\" (click)=\"closeOnBackdropClick() ? close() : null\" aria-hidden=\"true\"></div>\r\n}\r\n\r\n<div class=\"fui-drawer__panel\" [style.--_drawer-size]=\"_sizeValue()\" #drawerPanel tabindex=\"-1\">\r\n @if (title() || showCloseButton()) {\r\n <div class=\"fui-drawer__header\">\r\n @if (title()) {\r\n <h2 class=\"fui-drawer__title\">{{ title() }}</h2>\r\n }\r\n @if (showCloseButton()) {\r\n <button type=\"button\" class=\"fui-drawer__close\" (click)=\"close()\" [attr.aria-label]=\"intl.closeAriaLabel\">\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"fui-drawer__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div class=\"fui-drawer__footer\">\r\n <ng-content select=\"[drawerFooter]\"></ng-content>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAIO,MAAM,YAAY,GAA+B;AACtD,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,IAAI,EAAE,MAAM;;;ACJR,MAAO,aAAc,SAAQ,WAAW,CAAA;IAC5C,cAAc,GAAG,cAAc;uGADpB,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAb,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cADA,MAAM,EAAA,CAAA;;2FACnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;MC4CrB,kBAAkB,CAAA;AACZ,IAA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
1
1
  import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, output, signal, viewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { Injectable, inject, ChangeDetectorRef, input, booleanAttribute, output, signal, viewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
3
4
  import { FuiIconComponent } from '@raintonic/formaui/components/icon';
5
+ import { FuiIntlBase } from '@raintonic/formaui/core';
6
+
7
+ class FuiFileUploadIntl extends FuiIntlBase {
8
+ dropzoneAriaLabel = 'Drop files here or click to browse';
9
+ removeFileAriaLabel(name) {
10
+ return `Remove ${name}`;
11
+ }
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiFileUploadIntl, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
13
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiFileUploadIntl, providedIn: 'root' });
14
+ }
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiFileUploadIntl, decorators: [{
16
+ type: Injectable,
17
+ args: [{ providedIn: 'root' }]
18
+ }] });
4
19
 
5
20
  /**
6
21
  * # FuiFileUploadComponent
@@ -27,6 +42,11 @@ import { FuiIconComponent } from '@raintonic/formaui/components/icon';
27
42
  * ```
28
43
  */
29
44
  class FuiFileUploadComponent {
45
+ intl = inject(FuiFileUploadIntl);
46
+ _cdr = inject(ChangeDetectorRef);
47
+ constructor() {
48
+ this.intl.changes.pipe(takeUntilDestroyed()).subscribe(() => { this._cdr.markForCheck(); });
49
+ }
30
50
  // Inputs
31
51
  accept = input('', ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
32
52
  multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
@@ -226,7 +246,7 @@ class FuiFileUploadComponent {
226
246
  return URL.createObjectURL(file);
227
247
  }
228
248
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
229
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiFileUploadComponent, isStandalone: true, selector: "fui-file-upload", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesSelected: "filesSelected", fileRemoved: "fileRemoved", filesDropped: "filesDropped", validationErrors: "validationErrors" }, host: { properties: { "class.fui-file-upload--disabled": "disabled()", "class.fui-file-upload--drag-over": "_isDragOver()", "class.fui-file-upload--has-files": "_files().length > 0" }, classAttribute: "fui-file-upload" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<input\r\n #fileInput\r\n type=\"file\"\r\n class=\"fui-file-upload__native-input\"\r\n [attr.accept]=\"accept()\"\r\n [attr.multiple]=\"multiple() ? '' : null\"\r\n [attr.disabled]=\"disabled() ? '' : null\"\r\n (change)=\"_onFileInputChange($event)\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n/>\r\n\r\n<div\r\n class=\"fui-file-upload__dropzone\"\r\n (click)=\"browse()\"\r\n (dragenter)=\"_onDragEnter($event)\"\r\n (dragover)=\"_onDragOver($event)\"\r\n (dragleave)=\"_onDragLeave($event)\"\r\n (drop)=\"_onDrop($event)\"\r\n (keydown.enter)=\"browse()\"\r\n (keydown.space)=\"browse(); $event.preventDefault()\"\r\n [attr.tabindex]=\"disabled() ? -1 : 0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Drop files here or click to browse'\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n>\r\n <fui-icon name=\"upload-simple\" size=\"lg\" class=\"fui-file-upload__icon\"></fui-icon>\r\n <span class=\"fui-file-upload__text\"> Drag &amp; drop files here or <strong>browse</strong> </span>\r\n @if (accept()) {\r\n <span class=\"fui-file-upload__hint\">Accepted: {{ accept() }}</span>\r\n }\r\n @if (maxFileSize() > 0) {\r\n <span class=\"fui-file-upload__hint\">Max size: {{ _formatFileSize(maxFileSize()) }}</span>\r\n }\r\n</div>\r\n\r\n@if (_files().length > 0) {\r\n <ul class=\"fui-file-upload__file-list\" role=\"list\">\r\n @for (fileItem of _files(); track fileItem.name; let i = $index) {\r\n <li class=\"fui-file-upload__file-item\" [class.fui-file-upload__file-item--error]=\"fileItem.error\">\r\n @if (showPreview() && fileItem.previewUrl) {\r\n <img [src]=\"fileItem.previewUrl\" class=\"fui-file-upload__preview\" [alt]=\"fileItem.name\" />\r\n } @else {\r\n <fui-icon name=\"file\" size=\"sm\" class=\"fui-file-upload__file-icon\"></fui-icon>\r\n }\r\n <div class=\"fui-file-upload__file-info\">\r\n <span class=\"fui-file-upload__file-name\">{{ fileItem.name }}</span>\r\n <span class=\"fui-file-upload__file-size\">{{ _formatFileSize(fileItem.size) }}</span>\r\n @if (fileItem.error) {\r\n <span class=\"fui-file-upload__file-error\">{{ fileItem.error }}</span>\r\n }\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"fui-file-upload__remove-btn\"\r\n (click)=\"removeFile(i); $event.stopPropagation()\"\r\n [attr.aria-label]=\"'Remove ' + fileItem.name\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n}\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-file-upload{display:block;width:100%}.fui-file-upload__native-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.fui-file-upload__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--fui-gap-8);padding:var(--fui-padding-32, 2rem);border:2px dashed var(--fui-border-color);border-radius:var(--fui-border-radius-md);background-color:var(--fui-surface-bg);cursor:pointer;text-align:center;transition:border-color,background-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__dropzone:hover{border-color:var(--fui-primary-60, var(--fui-primary));background-color:var(--fui-primary-10, rgba(124, 58, 237, .04))}.fui-file-upload__dropzone:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-file-upload__icon{color:var(--fui-text-secondary)}.fui-file-upload__text{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);color:var(--fui-text-secondary)}.fui-file-upload__text strong{color:var(--fui-primary);font-weight:var(--fui-font-weight-semibold, 600)}.fui-file-upload__hint{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-text-disabled)}.fui-file-upload__file-list{list-style:none;margin:var(--fui-gap-12, .75rem) 0 0;padding:0;display:flex;flex-direction:column;gap:var(--fui-gap-4)}.fui-file-upload__file-item{display:flex;align-items:center;gap:var(--fui-gap-12, .75rem);padding:var(--fui-padding-8, .5rem) var(--fui-padding-12, .75rem);border:1px solid var(--fui-border-color);border-radius:var(--fui-border-radius-sm);background-color:var(--fui-surface-card, var(--fui-surface-01));transition:border-color,background-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__file-item--error{border-color:var(--fui-state-error);background-color:var(--fui-danger-10, rgba(239, 68, 68, .04))}.fui-file-upload__preview{width:48px;height:48px;object-fit:cover;border-radius:var(--fui-border-radius-sm);flex-shrink:0}.fui-file-upload__file-icon{flex-shrink:0;color:var(--fui-text-secondary)}.fui-file-upload__file-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.fui-file-upload__file-name{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);font-weight:var(--fui-font-weight-medium, 500);color:var(--fui-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fui-file-upload__file-size{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-text-secondary)}.fui-file-upload__file-error{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-state-error)}.fui-file-upload__remove-btn{background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;outline:none}.fui-file-upload__remove-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);opacity:.7;transition:opacity,color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__remove-btn:hover:not(:disabled){opacity:1;color:var(--fui-state-error)}.fui-file-upload__remove-btn:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-file-upload__remove-btn:disabled{opacity:.4;cursor:not-allowed}.fui-file-upload--drag-over .fui-file-upload__dropzone{border-color:var(--fui-primary);border-style:solid;background-color:var(--fui-primary-10, rgba(124, 58, 237, .08))}.fui-file-upload--disabled{opacity:var(--fui-opacity-disabled, .5)}.fui-file-upload--disabled .fui-file-upload__dropzone{cursor:not-allowed;pointer-events:none}.fui-file-upload--disabled .fui-file-upload__remove-btn{cursor:not-allowed}@media(prefers-reduced-motion:reduce){.fui-file-upload__dropzone,.fui-file-upload__file-item,.fui-file-upload__remove-btn{transition:none}}\n"], dependencies: [{ kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
249
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiFileUploadComponent, isStandalone: true, selector: "fui-file-upload", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesSelected: "filesSelected", fileRemoved: "fileRemoved", filesDropped: "filesDropped", validationErrors: "validationErrors" }, host: { properties: { "class.fui-file-upload--disabled": "disabled()", "class.fui-file-upload--drag-over": "_isDragOver()", "class.fui-file-upload--has-files": "_files().length > 0" }, classAttribute: "fui-file-upload" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<input\r\n #fileInput\r\n type=\"file\"\r\n class=\"fui-file-upload__native-input\"\r\n [attr.accept]=\"accept()\"\r\n [attr.multiple]=\"multiple() ? '' : null\"\r\n [attr.disabled]=\"disabled() ? '' : null\"\r\n (change)=\"_onFileInputChange($event)\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n/>\r\n\r\n<div\r\n class=\"fui-file-upload__dropzone\"\r\n (click)=\"browse()\"\r\n (dragenter)=\"_onDragEnter($event)\"\r\n (dragover)=\"_onDragOver($event)\"\r\n (dragleave)=\"_onDragLeave($event)\"\r\n (drop)=\"_onDrop($event)\"\r\n (keydown.enter)=\"browse()\"\r\n (keydown.space)=\"browse(); $event.preventDefault()\"\r\n [attr.tabindex]=\"disabled() ? -1 : 0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"intl.dropzoneAriaLabel\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n>\r\n <fui-icon name=\"upload-simple\" size=\"lg\" class=\"fui-file-upload__icon\"></fui-icon>\r\n <span class=\"fui-file-upload__text\"> Drag &amp; drop files here or <strong>browse</strong> </span>\r\n @if (accept()) {\r\n <span class=\"fui-file-upload__hint\">Accepted: {{ accept() }}</span>\r\n }\r\n @if (maxFileSize() > 0) {\r\n <span class=\"fui-file-upload__hint\">Max size: {{ _formatFileSize(maxFileSize()) }}</span>\r\n }\r\n</div>\r\n\r\n@if (_files().length > 0) {\r\n <ul class=\"fui-file-upload__file-list\" role=\"list\">\r\n @for (fileItem of _files(); track fileItem.name; let i = $index) {\r\n <li class=\"fui-file-upload__file-item\" [class.fui-file-upload__file-item--error]=\"fileItem.error\">\r\n @if (showPreview() && fileItem.previewUrl) {\r\n <img [src]=\"fileItem.previewUrl\" class=\"fui-file-upload__preview\" [alt]=\"fileItem.name\" />\r\n } @else {\r\n <fui-icon name=\"file\" size=\"sm\" class=\"fui-file-upload__file-icon\"></fui-icon>\r\n }\r\n <div class=\"fui-file-upload__file-info\">\r\n <span class=\"fui-file-upload__file-name\">{{ fileItem.name }}</span>\r\n <span class=\"fui-file-upload__file-size\">{{ _formatFileSize(fileItem.size) }}</span>\r\n @if (fileItem.error) {\r\n <span class=\"fui-file-upload__file-error\">{{ fileItem.error }}</span>\r\n }\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"fui-file-upload__remove-btn\"\r\n (click)=\"removeFile(i); $event.stopPropagation()\"\r\n [attr.aria-label]=\"intl.removeFileAriaLabel(fileItem.name)\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n}\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-file-upload{display:block;width:100%}.fui-file-upload__native-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.fui-file-upload__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--fui-gap-8);padding:var(--fui-padding-32, 2rem);border:2px dashed var(--fui-border-color);border-radius:var(--fui-border-radius-md);background-color:var(--fui-surface-bg);cursor:pointer;text-align:center;transition:border-color,background-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__dropzone:hover{border-color:var(--fui-primary-60, var(--fui-primary));background-color:var(--fui-primary-10, rgba(124, 58, 237, .04))}.fui-file-upload__dropzone:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-file-upload__icon{color:var(--fui-text-secondary)}.fui-file-upload__text{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);color:var(--fui-text-secondary)}.fui-file-upload__text strong{color:var(--fui-primary);font-weight:var(--fui-font-weight-semibold, 600)}.fui-file-upload__hint{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-text-disabled)}.fui-file-upload__file-list{list-style:none;margin:var(--fui-gap-12, .75rem) 0 0;padding:0;display:flex;flex-direction:column;gap:var(--fui-gap-4)}.fui-file-upload__file-item{display:flex;align-items:center;gap:var(--fui-gap-12, .75rem);padding:var(--fui-padding-8, .5rem) var(--fui-padding-12, .75rem);border:1px solid var(--fui-border-color);border-radius:var(--fui-border-radius-sm);background-color:var(--fui-surface-card, var(--fui-surface-01));transition:border-color,background-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__file-item--error{border-color:var(--fui-state-error);background-color:var(--fui-danger-10, rgba(239, 68, 68, .04))}.fui-file-upload__preview{width:48px;height:48px;object-fit:cover;border-radius:var(--fui-border-radius-sm);flex-shrink:0}.fui-file-upload__file-icon{flex-shrink:0;color:var(--fui-text-secondary)}.fui-file-upload__file-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.fui-file-upload__file-name{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);font-weight:var(--fui-font-weight-medium, 500);color:var(--fui-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fui-file-upload__file-size{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-text-secondary)}.fui-file-upload__file-error{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-state-error)}.fui-file-upload__remove-btn{background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;outline:none}.fui-file-upload__remove-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);opacity:.7;transition:opacity,color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__remove-btn:hover:not(:disabled){opacity:1;color:var(--fui-state-error)}.fui-file-upload__remove-btn:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-file-upload__remove-btn:disabled{opacity:.4;cursor:not-allowed}.fui-file-upload--drag-over .fui-file-upload__dropzone{border-color:var(--fui-primary);border-style:solid;background-color:var(--fui-primary-10, rgba(124, 58, 237, .08))}.fui-file-upload--disabled{opacity:var(--fui-opacity-disabled, .5)}.fui-file-upload--disabled .fui-file-upload__dropzone{cursor:not-allowed;pointer-events:none}.fui-file-upload--disabled .fui-file-upload__remove-btn{cursor:not-allowed}@media(prefers-reduced-motion:reduce){.fui-file-upload__dropzone,.fui-file-upload__file-item,.fui-file-upload__remove-btn{transition:none}}\n"], dependencies: [{ kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
230
250
  }
231
251
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiFileUploadComponent, decorators: [{
232
252
  type: Component,
@@ -235,12 +255,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
235
255
  '[class.fui-file-upload--disabled]': 'disabled()',
236
256
  '[class.fui-file-upload--drag-over]': '_isDragOver()',
237
257
  '[class.fui-file-upload--has-files]': '_files().length > 0',
238
- }, template: "<input\r\n #fileInput\r\n type=\"file\"\r\n class=\"fui-file-upload__native-input\"\r\n [attr.accept]=\"accept()\"\r\n [attr.multiple]=\"multiple() ? '' : null\"\r\n [attr.disabled]=\"disabled() ? '' : null\"\r\n (change)=\"_onFileInputChange($event)\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n/>\r\n\r\n<div\r\n class=\"fui-file-upload__dropzone\"\r\n (click)=\"browse()\"\r\n (dragenter)=\"_onDragEnter($event)\"\r\n (dragover)=\"_onDragOver($event)\"\r\n (dragleave)=\"_onDragLeave($event)\"\r\n (drop)=\"_onDrop($event)\"\r\n (keydown.enter)=\"browse()\"\r\n (keydown.space)=\"browse(); $event.preventDefault()\"\r\n [attr.tabindex]=\"disabled() ? -1 : 0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Drop files here or click to browse'\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n>\r\n <fui-icon name=\"upload-simple\" size=\"lg\" class=\"fui-file-upload__icon\"></fui-icon>\r\n <span class=\"fui-file-upload__text\"> Drag &amp; drop files here or <strong>browse</strong> </span>\r\n @if (accept()) {\r\n <span class=\"fui-file-upload__hint\">Accepted: {{ accept() }}</span>\r\n }\r\n @if (maxFileSize() > 0) {\r\n <span class=\"fui-file-upload__hint\">Max size: {{ _formatFileSize(maxFileSize()) }}</span>\r\n }\r\n</div>\r\n\r\n@if (_files().length > 0) {\r\n <ul class=\"fui-file-upload__file-list\" role=\"list\">\r\n @for (fileItem of _files(); track fileItem.name; let i = $index) {\r\n <li class=\"fui-file-upload__file-item\" [class.fui-file-upload__file-item--error]=\"fileItem.error\">\r\n @if (showPreview() && fileItem.previewUrl) {\r\n <img [src]=\"fileItem.previewUrl\" class=\"fui-file-upload__preview\" [alt]=\"fileItem.name\" />\r\n } @else {\r\n <fui-icon name=\"file\" size=\"sm\" class=\"fui-file-upload__file-icon\"></fui-icon>\r\n }\r\n <div class=\"fui-file-upload__file-info\">\r\n <span class=\"fui-file-upload__file-name\">{{ fileItem.name }}</span>\r\n <span class=\"fui-file-upload__file-size\">{{ _formatFileSize(fileItem.size) }}</span>\r\n @if (fileItem.error) {\r\n <span class=\"fui-file-upload__file-error\">{{ fileItem.error }}</span>\r\n }\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"fui-file-upload__remove-btn\"\r\n (click)=\"removeFile(i); $event.stopPropagation()\"\r\n [attr.aria-label]=\"'Remove ' + fileItem.name\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n}\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-file-upload{display:block;width:100%}.fui-file-upload__native-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.fui-file-upload__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--fui-gap-8);padding:var(--fui-padding-32, 2rem);border:2px dashed var(--fui-border-color);border-radius:var(--fui-border-radius-md);background-color:var(--fui-surface-bg);cursor:pointer;text-align:center;transition:border-color,background-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__dropzone:hover{border-color:var(--fui-primary-60, var(--fui-primary));background-color:var(--fui-primary-10, rgba(124, 58, 237, .04))}.fui-file-upload__dropzone:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-file-upload__icon{color:var(--fui-text-secondary)}.fui-file-upload__text{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);color:var(--fui-text-secondary)}.fui-file-upload__text strong{color:var(--fui-primary);font-weight:var(--fui-font-weight-semibold, 600)}.fui-file-upload__hint{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-text-disabled)}.fui-file-upload__file-list{list-style:none;margin:var(--fui-gap-12, .75rem) 0 0;padding:0;display:flex;flex-direction:column;gap:var(--fui-gap-4)}.fui-file-upload__file-item{display:flex;align-items:center;gap:var(--fui-gap-12, .75rem);padding:var(--fui-padding-8, .5rem) var(--fui-padding-12, .75rem);border:1px solid var(--fui-border-color);border-radius:var(--fui-border-radius-sm);background-color:var(--fui-surface-card, var(--fui-surface-01));transition:border-color,background-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__file-item--error{border-color:var(--fui-state-error);background-color:var(--fui-danger-10, rgba(239, 68, 68, .04))}.fui-file-upload__preview{width:48px;height:48px;object-fit:cover;border-radius:var(--fui-border-radius-sm);flex-shrink:0}.fui-file-upload__file-icon{flex-shrink:0;color:var(--fui-text-secondary)}.fui-file-upload__file-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.fui-file-upload__file-name{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);font-weight:var(--fui-font-weight-medium, 500);color:var(--fui-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fui-file-upload__file-size{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-text-secondary)}.fui-file-upload__file-error{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-state-error)}.fui-file-upload__remove-btn{background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;outline:none}.fui-file-upload__remove-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);opacity:.7;transition:opacity,color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__remove-btn:hover:not(:disabled){opacity:1;color:var(--fui-state-error)}.fui-file-upload__remove-btn:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-file-upload__remove-btn:disabled{opacity:.4;cursor:not-allowed}.fui-file-upload--drag-over .fui-file-upload__dropzone{border-color:var(--fui-primary);border-style:solid;background-color:var(--fui-primary-10, rgba(124, 58, 237, .08))}.fui-file-upload--disabled{opacity:var(--fui-opacity-disabled, .5)}.fui-file-upload--disabled .fui-file-upload__dropzone{cursor:not-allowed;pointer-events:none}.fui-file-upload--disabled .fui-file-upload__remove-btn{cursor:not-allowed}@media(prefers-reduced-motion:reduce){.fui-file-upload__dropzone,.fui-file-upload__file-item,.fui-file-upload__remove-btn{transition:none}}\n"] }]
239
- }], propDecorators: { accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], maxFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFiles", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], showPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreview", required: false }] }], filesSelected: [{ type: i0.Output, args: ["filesSelected"] }], fileRemoved: [{ type: i0.Output, args: ["fileRemoved"] }], filesDropped: [{ type: i0.Output, args: ["filesDropped"] }], validationErrors: [{ type: i0.Output, args: ["validationErrors"] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }] } });
258
+ }, template: "<input\r\n #fileInput\r\n type=\"file\"\r\n class=\"fui-file-upload__native-input\"\r\n [attr.accept]=\"accept()\"\r\n [attr.multiple]=\"multiple() ? '' : null\"\r\n [attr.disabled]=\"disabled() ? '' : null\"\r\n (change)=\"_onFileInputChange($event)\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n/>\r\n\r\n<div\r\n class=\"fui-file-upload__dropzone\"\r\n (click)=\"browse()\"\r\n (dragenter)=\"_onDragEnter($event)\"\r\n (dragover)=\"_onDragOver($event)\"\r\n (dragleave)=\"_onDragLeave($event)\"\r\n (drop)=\"_onDrop($event)\"\r\n (keydown.enter)=\"browse()\"\r\n (keydown.space)=\"browse(); $event.preventDefault()\"\r\n [attr.tabindex]=\"disabled() ? -1 : 0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"intl.dropzoneAriaLabel\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n>\r\n <fui-icon name=\"upload-simple\" size=\"lg\" class=\"fui-file-upload__icon\"></fui-icon>\r\n <span class=\"fui-file-upload__text\"> Drag &amp; drop files here or <strong>browse</strong> </span>\r\n @if (accept()) {\r\n <span class=\"fui-file-upload__hint\">Accepted: {{ accept() }}</span>\r\n }\r\n @if (maxFileSize() > 0) {\r\n <span class=\"fui-file-upload__hint\">Max size: {{ _formatFileSize(maxFileSize()) }}</span>\r\n }\r\n</div>\r\n\r\n@if (_files().length > 0) {\r\n <ul class=\"fui-file-upload__file-list\" role=\"list\">\r\n @for (fileItem of _files(); track fileItem.name; let i = $index) {\r\n <li class=\"fui-file-upload__file-item\" [class.fui-file-upload__file-item--error]=\"fileItem.error\">\r\n @if (showPreview() && fileItem.previewUrl) {\r\n <img [src]=\"fileItem.previewUrl\" class=\"fui-file-upload__preview\" [alt]=\"fileItem.name\" />\r\n } @else {\r\n <fui-icon name=\"file\" size=\"sm\" class=\"fui-file-upload__file-icon\"></fui-icon>\r\n }\r\n <div class=\"fui-file-upload__file-info\">\r\n <span class=\"fui-file-upload__file-name\">{{ fileItem.name }}</span>\r\n <span class=\"fui-file-upload__file-size\">{{ _formatFileSize(fileItem.size) }}</span>\r\n @if (fileItem.error) {\r\n <span class=\"fui-file-upload__file-error\">{{ fileItem.error }}</span>\r\n }\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"fui-file-upload__remove-btn\"\r\n (click)=\"removeFile(i); $event.stopPropagation()\"\r\n [attr.aria-label]=\"intl.removeFileAriaLabel(fileItem.name)\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n}\r\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}@keyframes fui-popover-enter{0%{opacity:0;transform:translateY(-14px)}60%{opacity:1}to{opacity:1;transform:translateY(0)}}.fui-file-upload{display:block;width:100%}.fui-file-upload__native-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.fui-file-upload__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--fui-gap-8);padding:var(--fui-padding-32, 2rem);border:2px dashed var(--fui-border-color);border-radius:var(--fui-border-radius-md);background-color:var(--fui-surface-bg);cursor:pointer;text-align:center;transition:border-color,background-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__dropzone:hover{border-color:var(--fui-primary-60, var(--fui-primary));background-color:var(--fui-primary-10, rgba(124, 58, 237, .04))}.fui-file-upload__dropzone:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-file-upload__icon{color:var(--fui-text-secondary)}.fui-file-upload__text{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);color:var(--fui-text-secondary)}.fui-file-upload__text strong{color:var(--fui-primary);font-weight:var(--fui-font-weight-semibold, 600)}.fui-file-upload__hint{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-text-disabled)}.fui-file-upload__file-list{list-style:none;margin:var(--fui-gap-12, .75rem) 0 0;padding:0;display:flex;flex-direction:column;gap:var(--fui-gap-4)}.fui-file-upload__file-item{display:flex;align-items:center;gap:var(--fui-gap-12, .75rem);padding:var(--fui-padding-8, .5rem) var(--fui-padding-12, .75rem);border:1px solid var(--fui-border-color);border-radius:var(--fui-border-radius-sm);background-color:var(--fui-surface-card, var(--fui-surface-01));transition:border-color,background-color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__file-item--error{border-color:var(--fui-state-error);background-color:var(--fui-danger-10, rgba(239, 68, 68, .04))}.fui-file-upload__preview{width:48px;height:48px;object-fit:cover;border-radius:var(--fui-border-radius-sm);flex-shrink:0}.fui-file-upload__file-icon{flex-shrink:0;color:var(--fui-text-secondary)}.fui-file-upload__file-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.fui-file-upload__file-name{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);font-weight:var(--fui-font-weight-medium, 500);color:var(--fui-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fui-file-upload__file-size{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-text-secondary)}.fui-file-upload__file-error{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);color:var(--fui-state-error)}.fui-file-upload__remove-btn{background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;outline:none}.fui-file-upload__remove-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);opacity:.7;transition:opacity,color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-file-upload__remove-btn:hover:not(:disabled){opacity:1;color:var(--fui-state-error)}.fui-file-upload__remove-btn:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-file-upload__remove-btn:disabled{opacity:.4;cursor:not-allowed}.fui-file-upload--drag-over .fui-file-upload__dropzone{border-color:var(--fui-primary);border-style:solid;background-color:var(--fui-primary-10, rgba(124, 58, 237, .08))}.fui-file-upload--disabled{opacity:var(--fui-opacity-disabled, .5)}.fui-file-upload--disabled .fui-file-upload__dropzone{cursor:not-allowed;pointer-events:none}.fui-file-upload--disabled .fui-file-upload__remove-btn{cursor:not-allowed}@media(prefers-reduced-motion:reduce){.fui-file-upload__dropzone,.fui-file-upload__file-item,.fui-file-upload__remove-btn{transition:none}}\n"] }]
259
+ }], ctorParameters: () => [], propDecorators: { accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], maxFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFiles", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], showPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreview", required: false }] }], filesSelected: [{ type: i0.Output, args: ["filesSelected"] }], fileRemoved: [{ type: i0.Output, args: ["fileRemoved"] }], filesDropped: [{ type: i0.Output, args: ["filesDropped"] }], validationErrors: [{ type: i0.Output, args: ["validationErrors"] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }] } });
240
260
 
241
261
  /**
242
262
  * Generated bundle index. Do not edit.
243
263
  */
244
264
 
245
- export { FuiFileUploadComponent };
265
+ export { FuiFileUploadComponent, FuiFileUploadIntl };
246
266
  //# sourceMappingURL=raintonic-formaui-components-file-upload.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"raintonic-formaui-components-file-upload.mjs","sources":["../../../lib/components/file-upload/file-upload.component.ts","../../../lib/components/file-upload/file-upload.component.html","../../../lib/components/file-upload/raintonic-formaui-components-file-upload.ts"],"sourcesContent":["import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n input,\r\n output,\r\n signal,\r\n viewChild,\r\n ElementRef,\r\n WritableSignal,\r\n booleanAttribute,\r\n} from '@angular/core';\r\n\r\nimport { FuiIconComponent } from '@raintonic/formaui/components/icon';\r\nimport { FileUploadFile, FileUploadValidationError } from './file-upload.types';\r\n\r\n/**\r\n * # FuiFileUploadComponent\r\n *\r\n * A file upload component with drag-and-drop support, file previews, and validation.\r\n *\r\n * ## Features\r\n * - Drag & drop file upload\r\n * - Click to browse\r\n * - File type, size, and count validation\r\n * - Image preview thumbnails\r\n * - Accessible (keyboard, ARIA)\r\n *\r\n * ## Usage\r\n *\r\n * ### Basic\r\n * ```html\r\n * <fui-file-upload\r\n * accept=\"image/*,.pdf\"\r\n * [multiple]=\"true\"\r\n * [maxFileSize]=\"5242880\"\r\n * (filesSelected)=\"onFiles($event)\"\r\n * ></fui-file-upload>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'fui-file-upload',\r\n standalone: true,\r\n imports: [FuiIconComponent],\r\n templateUrl: './file-upload.component.html',\r\n styleUrls: ['./file-upload.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'fui-file-upload',\r\n '[class.fui-file-upload--disabled]': 'disabled()',\r\n '[class.fui-file-upload--drag-over]': '_isDragOver()',\r\n '[class.fui-file-upload--has-files]': '_files().length > 0',\r\n },\r\n})\r\nexport class FuiFileUploadComponent {\r\n // Inputs\r\n readonly accept = input('');\r\n readonly multiple = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n readonly maxFileSize = input(0);\r\n readonly maxFiles = input(0);\r\n readonly disabled = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n readonly showPreview = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n\r\n // Outputs\r\n readonly filesSelected = output<FileUploadFile[]>();\r\n readonly fileRemoved = output<FileUploadFile>();\r\n readonly filesDropped = output<FileUploadFile[]>();\r\n readonly validationErrors = output<FileUploadValidationError[]>();\r\n\r\n // Internal state\r\n readonly _files: WritableSignal<FileUploadFile[]> = signal([]);\r\n readonly _isDragOver: WritableSignal<boolean> = signal(false);\r\n\r\n // ViewChild\r\n readonly fileInput = viewChild<ElementRef<HTMLInputElement>>('fileInput');\r\n\r\n // Public methods\r\n browse(): void {\r\n if (this.disabled()) return;\r\n this.fileInput()?.nativeElement.click();\r\n }\r\n\r\n removeFile(index: number): void {\r\n if (this.disabled()) return;\r\n const files = [...this._files()];\r\n const removed = files.splice(index, 1)[0];\r\n if (removed) {\r\n if (removed.previewUrl) {\r\n URL.revokeObjectURL(removed.previewUrl);\r\n }\r\n this._files.set(files);\r\n this.fileRemoved.emit(removed);\r\n }\r\n }\r\n\r\n clearAll(): void {\r\n const files = this._files();\r\n for (const f of files) {\r\n if (f.previewUrl) {\r\n URL.revokeObjectURL(f.previewUrl);\r\n }\r\n }\r\n this._files.set([]);\r\n }\r\n\r\n getFiles(): FileUploadFile[] {\r\n return this._files();\r\n }\r\n\r\n // Template event handlers\r\n _onFileInputChange(event: Event): void {\r\n const input = event.target as HTMLInputElement;\r\n if (input.files && input.files.length > 0) {\r\n this._processFiles(input.files);\r\n }\r\n // Reset input so the same file can be selected again\r\n input.value = '';\r\n }\r\n\r\n _onDragEnter(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (!this.disabled()) {\r\n this._isDragOver.set(true);\r\n }\r\n }\r\n\r\n _onDragOver(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (!this.disabled()) {\r\n this._isDragOver.set(true);\r\n }\r\n }\r\n\r\n _onDragLeave(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this._isDragOver.set(false);\r\n }\r\n\r\n _onDrop(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this._isDragOver.set(false);\r\n\r\n if (this.disabled()) return;\r\n\r\n const files = event.dataTransfer?.files;\r\n if (files && files.length > 0) {\r\n this._processFiles(files);\r\n this.filesDropped.emit(this._files());\r\n }\r\n }\r\n\r\n _formatFileSize(bytes: number): string {\r\n if (bytes === 0) return '0 B';\r\n const units = ['B', 'KB', 'MB', 'GB'];\r\n const k = 1024;\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n const size = parseFloat((bytes / Math.pow(k, i)).toFixed(1));\r\n return `${size} ${units[i]}`;\r\n }\r\n\r\n // Private methods\r\n private _processFiles(fileList: FileList): void {\r\n const newFiles: FileUploadFile[] = [];\r\n const errors: FileUploadValidationError[] = [];\r\n const currentFiles = this._files();\r\n\r\n const filesToProcess = Array.from(fileList);\r\n\r\n for (const file of filesToProcess) {\r\n // Max files check\r\n const maxFiles = this.maxFiles();\r\n if (maxFiles > 0 && currentFiles.length + newFiles.length >= maxFiles) {\r\n errors.push({\r\n file,\r\n error: 'maxFiles',\r\n message: `Maximum ${maxFiles} file(s) allowed`,\r\n });\r\n continue;\r\n }\r\n\r\n const validationError = this._validateFile(file);\r\n if (validationError) {\r\n errors.push(validationError);\r\n continue;\r\n }\r\n\r\n const uploadFile: FileUploadFile = {\r\n file,\r\n name: file.name,\r\n size: file.size,\r\n type: file.type,\r\n };\r\n\r\n if (this.showPreview() && this._isImage(file)) {\r\n uploadFile.previewUrl = this._generatePreview(file);\r\n }\r\n\r\n newFiles.push(uploadFile);\r\n }\r\n\r\n if (errors.length > 0) {\r\n this.validationErrors.emit(errors);\r\n }\r\n\r\n if (newFiles.length > 0) {\r\n if (this.multiple()) {\r\n this._files.set([...currentFiles, ...newFiles]);\r\n } else {\r\n // Single mode: replace existing\r\n for (const f of currentFiles) {\r\n if (f.previewUrl) URL.revokeObjectURL(f.previewUrl);\r\n }\r\n this._files.set([newFiles[0]]);\r\n }\r\n this.filesSelected.emit(this._files());\r\n }\r\n }\r\n\r\n private _validateFile(file: File): FileUploadValidationError | null {\r\n // Type check\r\n const accept = this.accept();\r\n if (accept && !this._matchesAccept(file, accept)) {\r\n return {\r\n file,\r\n error: 'type',\r\n message: `File type \"${file.type || file.name.split('.').pop()}\" is not allowed`,\r\n };\r\n }\r\n\r\n // Size check\r\n const maxSize = this.maxFileSize();\r\n if (maxSize > 0 && file.size > maxSize) {\r\n return {\r\n file,\r\n error: 'size',\r\n message: `File size ${this._formatFileSize(file.size)} exceeds maximum ${this._formatFileSize(maxSize)}`,\r\n };\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _matchesAccept(file: File, accept: string): boolean {\r\n const acceptTypes = accept.split(',').map((t) => t.trim().toLowerCase());\r\n\r\n for (const acceptType of acceptTypes) {\r\n // Wildcard MIME type (e.g. \"image/*\")\r\n if (acceptType.endsWith('/*')) {\r\n const category = acceptType.slice(0, acceptType.indexOf('/'));\r\n if (file.type.toLowerCase().startsWith(category + '/')) {\r\n return true;\r\n }\r\n }\r\n // Extension match (e.g. \".pdf\")\r\n else if (acceptType.startsWith('.')) {\r\n if (file.name.toLowerCase().endsWith(acceptType)) {\r\n return true;\r\n }\r\n }\r\n // Exact MIME match\r\n else if (file.type.toLowerCase() === acceptType) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private _isImage(file: File): boolean {\r\n return file.type.startsWith('image/');\r\n }\r\n\r\n private _generatePreview(file: File): string {\r\n return URL.createObjectURL(file);\r\n }\r\n}\r\n","<input\r\n #fileInput\r\n type=\"file\"\r\n class=\"fui-file-upload__native-input\"\r\n [attr.accept]=\"accept()\"\r\n [attr.multiple]=\"multiple() ? '' : null\"\r\n [attr.disabled]=\"disabled() ? '' : null\"\r\n (change)=\"_onFileInputChange($event)\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n/>\r\n\r\n<div\r\n class=\"fui-file-upload__dropzone\"\r\n (click)=\"browse()\"\r\n (dragenter)=\"_onDragEnter($event)\"\r\n (dragover)=\"_onDragOver($event)\"\r\n (dragleave)=\"_onDragLeave($event)\"\r\n (drop)=\"_onDrop($event)\"\r\n (keydown.enter)=\"browse()\"\r\n (keydown.space)=\"browse(); $event.preventDefault()\"\r\n [attr.tabindex]=\"disabled() ? -1 : 0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Drop files here or click to browse'\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n>\r\n <fui-icon name=\"upload-simple\" size=\"lg\" class=\"fui-file-upload__icon\"></fui-icon>\r\n <span class=\"fui-file-upload__text\"> Drag &amp; drop files here or <strong>browse</strong> </span>\r\n @if (accept()) {\r\n <span class=\"fui-file-upload__hint\">Accepted: {{ accept() }}</span>\r\n }\r\n @if (maxFileSize() > 0) {\r\n <span class=\"fui-file-upload__hint\">Max size: {{ _formatFileSize(maxFileSize()) }}</span>\r\n }\r\n</div>\r\n\r\n@if (_files().length > 0) {\r\n <ul class=\"fui-file-upload__file-list\" role=\"list\">\r\n @for (fileItem of _files(); track fileItem.name; let i = $index) {\r\n <li class=\"fui-file-upload__file-item\" [class.fui-file-upload__file-item--error]=\"fileItem.error\">\r\n @if (showPreview() && fileItem.previewUrl) {\r\n <img [src]=\"fileItem.previewUrl\" class=\"fui-file-upload__preview\" [alt]=\"fileItem.name\" />\r\n } @else {\r\n <fui-icon name=\"file\" size=\"sm\" class=\"fui-file-upload__file-icon\"></fui-icon>\r\n }\r\n <div class=\"fui-file-upload__file-info\">\r\n <span class=\"fui-file-upload__file-name\">{{ fileItem.name }}</span>\r\n <span class=\"fui-file-upload__file-size\">{{ _formatFileSize(fileItem.size) }}</span>\r\n @if (fileItem.error) {\r\n <span class=\"fui-file-upload__file-error\">{{ fileItem.error }}</span>\r\n }\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"fui-file-upload__remove-btn\"\r\n (click)=\"removeFile(i); $event.stopPropagation()\"\r\n [attr.aria-label]=\"'Remove ' + fileItem.name\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;MAgBU,sBAAsB,CAAA;;AAExB,IAAA,MAAM,GAAG,KAAK,CAAC,EAAE,6EAAC;IAClB,QAAQ,GAAG,KAAK,CAAmB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC1E,IAAA,WAAW,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A,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECvDnC,olFAiEA,EAAA,MAAA,EAAA,CAAA,+hLAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDtBY,gBAAgB,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAYf,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAflC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,CAAC,EAAA,eAAA,EAGV,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,mCAAmC,EAAE,YAAY;AACjD,wBAAA,oCAAoC,EAAE,eAAe;AACrD,wBAAA,oCAAoC,EAAE,qBAAqB;AAC5D,qBAAA,EAAA,QAAA,EAAA,olFAAA,EAAA,MAAA,EAAA,CAAA,+hLAAA,CAAA,EAAA;24BAsB4D,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3E1E;;AAEG;;;;"}
1
+ {"version":3,"file":"raintonic-formaui-components-file-upload.mjs","sources":["../../../lib/components/file-upload/file-upload.intl.ts","../../../lib/components/file-upload/file-upload.component.ts","../../../lib/components/file-upload/file-upload.component.html","../../../lib/components/file-upload/raintonic-formaui-components-file-upload.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { FuiIntlBase } from '@raintonic/formaui/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class FuiFileUploadIntl extends FuiIntlBase {\r\n dropzoneAriaLabel = 'Drop files here or click to browse';\r\n removeFileAriaLabel(name: string): string {\r\n return `Remove ${name}`;\r\n }\r\n}\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n ViewEncapsulation,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n viewChild,\r\n ElementRef,\r\n WritableSignal,\r\n booleanAttribute,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\nimport { FuiIconComponent } from '@raintonic/formaui/components/icon';\r\nimport { FileUploadFile, FileUploadValidationError } from './file-upload.types';\r\nimport { FuiFileUploadIntl } from './file-upload.intl';\r\n\r\n/**\r\n * # FuiFileUploadComponent\r\n *\r\n * A file upload component with drag-and-drop support, file previews, and validation.\r\n *\r\n * ## Features\r\n * - Drag & drop file upload\r\n * - Click to browse\r\n * - File type, size, and count validation\r\n * - Image preview thumbnails\r\n * - Accessible (keyboard, ARIA)\r\n *\r\n * ## Usage\r\n *\r\n * ### Basic\r\n * ```html\r\n * <fui-file-upload\r\n * accept=\"image/*,.pdf\"\r\n * [multiple]=\"true\"\r\n * [maxFileSize]=\"5242880\"\r\n * (filesSelected)=\"onFiles($event)\"\r\n * ></fui-file-upload>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'fui-file-upload',\r\n standalone: true,\r\n imports: [FuiIconComponent],\r\n templateUrl: './file-upload.component.html',\r\n styleUrls: ['./file-upload.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: {\r\n class: 'fui-file-upload',\r\n '[class.fui-file-upload--disabled]': 'disabled()',\r\n '[class.fui-file-upload--drag-over]': '_isDragOver()',\r\n '[class.fui-file-upload--has-files]': '_files().length > 0',\r\n },\r\n})\r\nexport class FuiFileUploadComponent {\r\n readonly intl = inject(FuiFileUploadIntl);\r\n private readonly _cdr = inject(ChangeDetectorRef);\r\n\r\n constructor() {\r\n this.intl.changes.pipe(takeUntilDestroyed()).subscribe(() => { this._cdr.markForCheck(); });\r\n }\r\n\r\n // Inputs\r\n readonly accept = input('');\r\n readonly multiple = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n readonly maxFileSize = input(0);\r\n readonly maxFiles = input(0);\r\n readonly disabled = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n readonly showPreview = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n\r\n // Outputs\r\n readonly filesSelected = output<FileUploadFile[]>();\r\n readonly fileRemoved = output<FileUploadFile>();\r\n readonly filesDropped = output<FileUploadFile[]>();\r\n readonly validationErrors = output<FileUploadValidationError[]>();\r\n\r\n // Internal state\r\n readonly _files: WritableSignal<FileUploadFile[]> = signal([]);\r\n readonly _isDragOver: WritableSignal<boolean> = signal(false);\r\n\r\n // ViewChild\r\n readonly fileInput = viewChild<ElementRef<HTMLInputElement>>('fileInput');\r\n\r\n // Public methods\r\n browse(): void {\r\n if (this.disabled()) return;\r\n this.fileInput()?.nativeElement.click();\r\n }\r\n\r\n removeFile(index: number): void {\r\n if (this.disabled()) return;\r\n const files = [...this._files()];\r\n const removed = files.splice(index, 1)[0];\r\n if (removed) {\r\n if (removed.previewUrl) {\r\n URL.revokeObjectURL(removed.previewUrl);\r\n }\r\n this._files.set(files);\r\n this.fileRemoved.emit(removed);\r\n }\r\n }\r\n\r\n clearAll(): void {\r\n const files = this._files();\r\n for (const f of files) {\r\n if (f.previewUrl) {\r\n URL.revokeObjectURL(f.previewUrl);\r\n }\r\n }\r\n this._files.set([]);\r\n }\r\n\r\n getFiles(): FileUploadFile[] {\r\n return this._files();\r\n }\r\n\r\n // Template event handlers\r\n _onFileInputChange(event: Event): void {\r\n const input = event.target as HTMLInputElement;\r\n if (input.files && input.files.length > 0) {\r\n this._processFiles(input.files);\r\n }\r\n // Reset input so the same file can be selected again\r\n input.value = '';\r\n }\r\n\r\n _onDragEnter(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (!this.disabled()) {\r\n this._isDragOver.set(true);\r\n }\r\n }\r\n\r\n _onDragOver(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (!this.disabled()) {\r\n this._isDragOver.set(true);\r\n }\r\n }\r\n\r\n _onDragLeave(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this._isDragOver.set(false);\r\n }\r\n\r\n _onDrop(event: DragEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this._isDragOver.set(false);\r\n\r\n if (this.disabled()) return;\r\n\r\n const files = event.dataTransfer?.files;\r\n if (files && files.length > 0) {\r\n this._processFiles(files);\r\n this.filesDropped.emit(this._files());\r\n }\r\n }\r\n\r\n _formatFileSize(bytes: number): string {\r\n if (bytes === 0) return '0 B';\r\n const units = ['B', 'KB', 'MB', 'GB'];\r\n const k = 1024;\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n const size = parseFloat((bytes / Math.pow(k, i)).toFixed(1));\r\n return `${size} ${units[i]}`;\r\n }\r\n\r\n // Private methods\r\n private _processFiles(fileList: FileList): void {\r\n const newFiles: FileUploadFile[] = [];\r\n const errors: FileUploadValidationError[] = [];\r\n const currentFiles = this._files();\r\n\r\n const filesToProcess = Array.from(fileList);\r\n\r\n for (const file of filesToProcess) {\r\n // Max files check\r\n const maxFiles = this.maxFiles();\r\n if (maxFiles > 0 && currentFiles.length + newFiles.length >= maxFiles) {\r\n errors.push({\r\n file,\r\n error: 'maxFiles',\r\n message: `Maximum ${maxFiles} file(s) allowed`,\r\n });\r\n continue;\r\n }\r\n\r\n const validationError = this._validateFile(file);\r\n if (validationError) {\r\n errors.push(validationError);\r\n continue;\r\n }\r\n\r\n const uploadFile: FileUploadFile = {\r\n file,\r\n name: file.name,\r\n size: file.size,\r\n type: file.type,\r\n };\r\n\r\n if (this.showPreview() && this._isImage(file)) {\r\n uploadFile.previewUrl = this._generatePreview(file);\r\n }\r\n\r\n newFiles.push(uploadFile);\r\n }\r\n\r\n if (errors.length > 0) {\r\n this.validationErrors.emit(errors);\r\n }\r\n\r\n if (newFiles.length > 0) {\r\n if (this.multiple()) {\r\n this._files.set([...currentFiles, ...newFiles]);\r\n } else {\r\n // Single mode: replace existing\r\n for (const f of currentFiles) {\r\n if (f.previewUrl) URL.revokeObjectURL(f.previewUrl);\r\n }\r\n this._files.set([newFiles[0]]);\r\n }\r\n this.filesSelected.emit(this._files());\r\n }\r\n }\r\n\r\n private _validateFile(file: File): FileUploadValidationError | null {\r\n // Type check\r\n const accept = this.accept();\r\n if (accept && !this._matchesAccept(file, accept)) {\r\n return {\r\n file,\r\n error: 'type',\r\n message: `File type \"${file.type || file.name.split('.').pop()}\" is not allowed`,\r\n };\r\n }\r\n\r\n // Size check\r\n const maxSize = this.maxFileSize();\r\n if (maxSize > 0 && file.size > maxSize) {\r\n return {\r\n file,\r\n error: 'size',\r\n message: `File size ${this._formatFileSize(file.size)} exceeds maximum ${this._formatFileSize(maxSize)}`,\r\n };\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _matchesAccept(file: File, accept: string): boolean {\r\n const acceptTypes = accept.split(',').map((t) => t.trim().toLowerCase());\r\n\r\n for (const acceptType of acceptTypes) {\r\n // Wildcard MIME type (e.g. \"image/*\")\r\n if (acceptType.endsWith('/*')) {\r\n const category = acceptType.slice(0, acceptType.indexOf('/'));\r\n if (file.type.toLowerCase().startsWith(category + '/')) {\r\n return true;\r\n }\r\n }\r\n // Extension match (e.g. \".pdf\")\r\n else if (acceptType.startsWith('.')) {\r\n if (file.name.toLowerCase().endsWith(acceptType)) {\r\n return true;\r\n }\r\n }\r\n // Exact MIME match\r\n else if (file.type.toLowerCase() === acceptType) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private _isImage(file: File): boolean {\r\n return file.type.startsWith('image/');\r\n }\r\n\r\n private _generatePreview(file: File): string {\r\n return URL.createObjectURL(file);\r\n }\r\n}\r\n","<input\r\n #fileInput\r\n type=\"file\"\r\n class=\"fui-file-upload__native-input\"\r\n [attr.accept]=\"accept()\"\r\n [attr.multiple]=\"multiple() ? '' : null\"\r\n [attr.disabled]=\"disabled() ? '' : null\"\r\n (change)=\"_onFileInputChange($event)\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n/>\r\n\r\n<div\r\n class=\"fui-file-upload__dropzone\"\r\n (click)=\"browse()\"\r\n (dragenter)=\"_onDragEnter($event)\"\r\n (dragover)=\"_onDragOver($event)\"\r\n (dragleave)=\"_onDragLeave($event)\"\r\n (drop)=\"_onDrop($event)\"\r\n (keydown.enter)=\"browse()\"\r\n (keydown.space)=\"browse(); $event.preventDefault()\"\r\n [attr.tabindex]=\"disabled() ? -1 : 0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"intl.dropzoneAriaLabel\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n>\r\n <fui-icon name=\"upload-simple\" size=\"lg\" class=\"fui-file-upload__icon\"></fui-icon>\r\n <span class=\"fui-file-upload__text\"> Drag &amp; drop files here or <strong>browse</strong> </span>\r\n @if (accept()) {\r\n <span class=\"fui-file-upload__hint\">Accepted: {{ accept() }}</span>\r\n }\r\n @if (maxFileSize() > 0) {\r\n <span class=\"fui-file-upload__hint\">Max size: {{ _formatFileSize(maxFileSize()) }}</span>\r\n }\r\n</div>\r\n\r\n@if (_files().length > 0) {\r\n <ul class=\"fui-file-upload__file-list\" role=\"list\">\r\n @for (fileItem of _files(); track fileItem.name; let i = $index) {\r\n <li class=\"fui-file-upload__file-item\" [class.fui-file-upload__file-item--error]=\"fileItem.error\">\r\n @if (showPreview() && fileItem.previewUrl) {\r\n <img [src]=\"fileItem.previewUrl\" class=\"fui-file-upload__preview\" [alt]=\"fileItem.name\" />\r\n } @else {\r\n <fui-icon name=\"file\" size=\"sm\" class=\"fui-file-upload__file-icon\"></fui-icon>\r\n }\r\n <div class=\"fui-file-upload__file-info\">\r\n <span class=\"fui-file-upload__file-name\">{{ fileItem.name }}</span>\r\n <span class=\"fui-file-upload__file-size\">{{ _formatFileSize(fileItem.size) }}</span>\r\n @if (fileItem.error) {\r\n <span class=\"fui-file-upload__file-error\">{{ fileItem.error }}</span>\r\n }\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"fui-file-upload__remove-btn\"\r\n (click)=\"removeFile(i); $event.stopPropagation()\"\r\n [attr.aria-label]=\"intl.removeFileAriaLabel(fileItem.name)\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <fui-icon name=\"x\" size=\"sm\"></fui-icon>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIM,MAAO,iBAAkB,SAAQ,WAAW,CAAA;IAChD,iBAAiB,GAAG,oCAAoC;AACxD,IAAA,mBAAmB,CAAC,IAAY,EAAA;QAC9B,OAAO,CAAA,OAAA,EAAU,IAAI,CAAA,CAAE;IACzB;uGAJW,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cADJ,MAAM,EAAA,CAAA;;2FACnB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACiBlC;;;;;;;;;;;;;;;;;;;;;;;AAuBG;MAgBU,sBAAsB,CAAA;AACxB,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACxB,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAEjD,IAAA,WA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