@ids-group-ltd/ids-design-system 0.14.6-beta.0 → 0.14.7

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 (187) hide show
  1. package/CHANGELOG.md +236 -4
  2. package/components.md +25 -22
  3. package/design-system.md +1 -1
  4. package/docs/agent/charts/ds-bar-chart.md +1 -0
  5. package/docs/agent/charts/ds-column-chart.md +1 -0
  6. package/docs/agent/charts/ds-line-chart.md +1 -1
  7. package/docs/agent/forms/ds-autocomplete.md +1 -1
  8. package/docs/agent/forms/ds-button.md +2 -2
  9. package/docs/agent/forms/ds-input.md +1 -1
  10. package/docs/agent/forms/ds-multi-select.md +1 -1
  11. package/docs/agent/forms/ds-select.md +1 -1
  12. package/docs/agent/forms/ds-textarea.md +1 -1
  13. package/docs/agent/forms/filter-item-directive.md +1 -1
  14. package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
  15. package/docs/agent/foundations/global-helper-classes.md +2 -2
  16. package/docs/agent/foundations/grid.md +8 -8
  17. package/docs/agent/overlays/ds-drawer.md +1 -1
  18. package/docs/agent/overlays/ds-modal-card.md +1 -1
  19. package/docs/agent/overlays/ds-modal.md +1 -1
  20. package/docs/agent/platform/toast-service.md +1 -0
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +10 -8
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +16 -9
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +18 -9
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +2 -2
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +4 -3
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +2 -2
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -1
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +2 -2
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +170 -4
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +327 -24
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +3 -3
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +16 -13
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +2 -2
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +15 -5
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +5 -3
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +4 -3
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +4 -3
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +2 -2
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +2 -2
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -1
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +22 -19
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +2 -2
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +65 -13
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -3
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +9 -11
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +3 -3
  90. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  91. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +2 -2
  92. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  93. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +98 -6
  94. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  95. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
  96. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
  97. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +4 -3
  98. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
  99. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
  100. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
  101. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -2
  102. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
  103. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
  104. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  105. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +2 -2
  106. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
  107. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +7 -7
  108. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  109. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -2
  110. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
  111. package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +2 -2
  112. package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs.map +1 -1
  113. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +2 -2
  114. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
  115. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
  116. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
  117. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
  118. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  119. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +4 -4
  120. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
  121. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +4 -4
  122. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  123. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +7 -7
  124. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  125. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +16 -3
  126. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
  127. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +2 -2
  128. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  129. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +4 -4
  130. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  131. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +16 -3
  132. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  133. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
  134. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
  135. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +2 -2
  136. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -1
  137. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +2 -2
  138. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  139. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +4 -4
  140. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
  141. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +4 -2
  142. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
  143. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +31 -9
  144. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  145. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +128 -9
  146. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  147. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +17 -6
  148. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
  149. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +5 -2
  150. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -1
  151. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
  152. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  153. package/migrations/0.14.6.json +176 -0
  154. package/migrations/0.14.7.json +140 -0
  155. package/migrations/0.4.0.json +3 -1
  156. package/package.json +1 -1
  157. package/schematics/check-overrides/surface.json +34 -25
  158. package/styles/_chart-frame.scss +1 -50
  159. package/styles/_field-state.scss +13 -1
  160. package/styles/_focus.scss +45 -33
  161. package/styles/_link.scss +12 -0
  162. package/styles/_press.scss +1 -1
  163. package/styles/_tokens-charts.scss +1 -1
  164. package/styles/_tokens.scss +2 -0
  165. package/styles/ds.scss +2 -0
  166. package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +4 -2
  167. package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +4 -2
  168. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -1
  169. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +65 -4
  170. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +54 -6
  171. package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +1 -1
  172. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +2 -3
  173. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +2 -1
  174. package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +1 -1
  175. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +4 -4
  176. package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +21 -4
  177. package/types/ids-group-ltd-ids-design-system-components-page-header.d.ts +1 -1
  178. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +21 -2
  179. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +1 -1
  180. package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +1 -1
  181. package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +2 -1
  182. package/types/ids-group-ltd-ids-design-system-components.d.ts +12 -2
  183. package/types/ids-group-ltd-ids-design-system-core.d.ts +35 -3
  184. package/types/ids-group-ltd-ids-design-system-icons.d.ts +3 -1
  185. package/types/ids-group-ltd-ids-design-system-theme.d.ts +4 -2
  186. package/types/ids-group-ltd-ids-design-system.d.ts +2 -2
  187. package/migrations/0.14.6-beta.0.json +0 -9
@@ -35,14 +35,14 @@ class DescriptionItemComponent {
35
35
  setTimeout(() => this.copied.set(false), 1200);
36
36
  }
37
37
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DescriptionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
38
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DescriptionItemComponent, isStandalone: true, selector: "ds-description-item", inputs: { term: { classPropertyName: "term", publicName: "term", isSignal: true, isRequired: false, transformFunction: null }, copyValue: { classPropertyName: "copyValue", publicName: "copyValue", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class.stacked": "stacked()" } }, ngImport: i0, template: "<span\n class=\"term\"\n role=\"term\">\n {{ term() }}\n</span>\n\n<div\n class=\"details\"\n role=\"definition\">\n <span class=\"value\">\n <ng-content></ng-content>\n </span>\n\n @if (copyValue()) {\n <button\n type=\"button\"\n class=\"copy\"\n [attr.aria-label]=\"\n copied() ? intl().descriptionList.copied : intl().descriptionList.copy\n \"\n (click)=\"copy()\">\n <ds-icon\n [name]=\"copied() ? 'check' : 'copy'\"\n [size]=\"14\" />\n </button>\n }\n</div>\n", styles: [":where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_description-item-term-color: var(--ds-description-item-term-color, var(--text-tertiary));--_description-item-term-font-size: var(--ds-description-item-term-font-size, var(--font-size-s));--_description-item-term-font-weight: var(--ds-description-item-term-font-weight, var(--font-weight-regular));--_description-item-term-letter-spacing: var(--ds-description-item-term-letter-spacing, normal);--_description-item-term-text-transform: var(--ds-description-item-term-text-transform, none);--_description-item-details-color: var(--ds-description-item-details-color, var(--text-primary));--_description-item-details-font-size: var(--ds-description-item-details-font-size, var(--font-size-s));--_description-item-details-font-weight: var(--ds-description-item-details-font-weight, var(--font-weight-regular));--_description-list-value-min-width: var(--ds-description-list-value-min-width, var(--dl-spec-value-min-w));display:flex;flex-wrap:wrap;gap:var(--space-0-5) var(--_description-list-column-gap, var(--space-5));align-items:baseline}.term{flex:0 0 var(--_description-list-label-width, var(--dl-spec-label-w));min-width:0;color:var(--_description-item-term-color);font:var(--_description-item-term-font-weight) var(--_description-item-term-font-size)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_description-item-term-letter-spacing);text-transform:var(--_description-item-term-text-transform)}.details{flex:1 1 var(--_description-list-value-min-width);display:flex;align-items:center;gap:var(--space-2);min-width:0;color:var(--_description-item-details-color);font:var(--_description-item-details-font-weight) var(--_description-item-details-font-size)/var(--line-height-base) var(--font-sans)}.value{min-width:0;overflow-wrap:anywhere}.copy{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--space-0-5);border:0;border-radius:var(--ds-radius-inner);background:transparent;color:var(--text-tertiary);cursor:pointer;opacity:0;transition:opacity var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.copy:hover{background:var(--surface-secondary);color:var(--text-primary)}.copy:active{background:var(--surface-muted)}.copy:focus-visible{opacity:1;outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:1px;animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}:host(.stacked) :is(.term,.details){flex-basis:100%}:host(:hover) .copy{opacity:1}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
38
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DescriptionItemComponent, isStandalone: true, selector: "ds-description-item", inputs: { term: { classPropertyName: "term", publicName: "term", isSignal: true, isRequired: false, transformFunction: null }, copyValue: { classPropertyName: "copyValue", publicName: "copyValue", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class.stacked": "stacked()" } }, ngImport: i0, template: "<span\n class=\"term\"\n role=\"term\">\n {{ term() }}\n</span>\n\n<div\n class=\"details\"\n role=\"definition\">\n <span class=\"value\">\n <ng-content></ng-content>\n </span>\n\n @if (copyValue()) {\n <button\n type=\"button\"\n class=\"copy\"\n [attr.aria-label]=\"\n copied() ? intl().descriptionList.copied : intl().descriptionList.copy\n \"\n (click)=\"copy()\">\n <ds-icon\n [name]=\"copied() ? 'check' : 'copy'\"\n [size]=\"14\" />\n </button>\n }\n</div>\n", styles: [":host{--_description-item-term-color: var(--ds-description-item-term-color, var(--text-tertiary));--_description-item-term-font-size: var(--ds-description-item-term-font-size, var(--font-size-s));--_description-item-term-font-weight: var(--ds-description-item-term-font-weight, var(--font-weight-regular));--_description-item-term-letter-spacing: var(--ds-description-item-term-letter-spacing, normal);--_description-item-term-text-transform: var(--ds-description-item-term-text-transform, none);--_description-item-details-color: var(--ds-description-item-details-color, var(--text-primary));--_description-item-details-font-size: var(--ds-description-item-details-font-size, var(--font-size-s));--_description-item-details-font-weight: var(--ds-description-item-details-font-weight, var(--font-weight-regular));--_description-list-value-min-width: var(--ds-description-list-value-min-width, var(--dl-spec-value-min-w));display:flex;flex-wrap:wrap;gap:var(--space-0-5) var(--_description-list-column-gap, var(--space-5));align-items:baseline}.term{flex:0 0 var(--_description-list-label-width, var(--dl-spec-label-w));min-width:0;color:var(--_description-item-term-color);font:var(--_description-item-term-font-weight) var(--_description-item-term-font-size)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_description-item-term-letter-spacing);text-transform:var(--_description-item-term-text-transform)}.details{flex:1 1 var(--_description-list-value-min-width);display:flex;align-items:center;gap:var(--space-2);min-width:0;color:var(--_description-item-details-color);font:var(--_description-item-details-font-weight) var(--_description-item-details-font-size)/var(--line-height-base) var(--font-sans)}.value{min-width:0;overflow-wrap:anywhere}.copy{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--space-0-5);border:0;border-radius:var(--ds-radius-inner);background:transparent;color:var(--text-tertiary);cursor:pointer;opacity:0;transition:opacity var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.copy:hover{background:var(--surface-secondary);color:var(--text-primary)}.copy:active{background:var(--surface-muted)}.copy:focus-visible{opacity:1;outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:1px;animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}:host(.stacked) :is(.term,.details){flex-basis:100%}:host(:hover) .copy{opacity:1}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
39
39
  }
40
40
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DescriptionItemComponent, decorators: [{
41
41
  type: Component,
42
42
  args: [{ selector: 'ds-description-item', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, host: {
43
43
  role: 'group',
44
44
  '[class.stacked]': 'stacked()',
45
- }, template: "<span\n class=\"term\"\n role=\"term\">\n {{ term() }}\n</span>\n\n<div\n class=\"details\"\n role=\"definition\">\n <span class=\"value\">\n <ng-content></ng-content>\n </span>\n\n @if (copyValue()) {\n <button\n type=\"button\"\n class=\"copy\"\n [attr.aria-label]=\"\n copied() ? intl().descriptionList.copied : intl().descriptionList.copy\n \"\n (click)=\"copy()\">\n <ds-icon\n [name]=\"copied() ? 'check' : 'copy'\"\n [size]=\"14\" />\n </button>\n }\n</div>\n", styles: [":where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_description-item-term-color: var(--ds-description-item-term-color, var(--text-tertiary));--_description-item-term-font-size: var(--ds-description-item-term-font-size, var(--font-size-s));--_description-item-term-font-weight: var(--ds-description-item-term-font-weight, var(--font-weight-regular));--_description-item-term-letter-spacing: var(--ds-description-item-term-letter-spacing, normal);--_description-item-term-text-transform: var(--ds-description-item-term-text-transform, none);--_description-item-details-color: var(--ds-description-item-details-color, var(--text-primary));--_description-item-details-font-size: var(--ds-description-item-details-font-size, var(--font-size-s));--_description-item-details-font-weight: var(--ds-description-item-details-font-weight, var(--font-weight-regular));--_description-list-value-min-width: var(--ds-description-list-value-min-width, var(--dl-spec-value-min-w));display:flex;flex-wrap:wrap;gap:var(--space-0-5) var(--_description-list-column-gap, var(--space-5));align-items:baseline}.term{flex:0 0 var(--_description-list-label-width, var(--dl-spec-label-w));min-width:0;color:var(--_description-item-term-color);font:var(--_description-item-term-font-weight) var(--_description-item-term-font-size)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_description-item-term-letter-spacing);text-transform:var(--_description-item-term-text-transform)}.details{flex:1 1 var(--_description-list-value-min-width);display:flex;align-items:center;gap:var(--space-2);min-width:0;color:var(--_description-item-details-color);font:var(--_description-item-details-font-weight) var(--_description-item-details-font-size)/var(--line-height-base) var(--font-sans)}.value{min-width:0;overflow-wrap:anywhere}.copy{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--space-0-5);border:0;border-radius:var(--ds-radius-inner);background:transparent;color:var(--text-tertiary);cursor:pointer;opacity:0;transition:opacity var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.copy:hover{background:var(--surface-secondary);color:var(--text-primary)}.copy:active{background:var(--surface-muted)}.copy:focus-visible{opacity:1;outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:1px;animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}:host(.stacked) :is(.term,.details){flex-basis:100%}:host(:hover) .copy{opacity:1}\n"] }]
45
+ }, template: "<span\n class=\"term\"\n role=\"term\">\n {{ term() }}\n</span>\n\n<div\n class=\"details\"\n role=\"definition\">\n <span class=\"value\">\n <ng-content></ng-content>\n </span>\n\n @if (copyValue()) {\n <button\n type=\"button\"\n class=\"copy\"\n [attr.aria-label]=\"\n copied() ? intl().descriptionList.copied : intl().descriptionList.copy\n \"\n (click)=\"copy()\">\n <ds-icon\n [name]=\"copied() ? 'check' : 'copy'\"\n [size]=\"14\" />\n </button>\n }\n</div>\n", styles: [":host{--_description-item-term-color: var(--ds-description-item-term-color, var(--text-tertiary));--_description-item-term-font-size: var(--ds-description-item-term-font-size, var(--font-size-s));--_description-item-term-font-weight: var(--ds-description-item-term-font-weight, var(--font-weight-regular));--_description-item-term-letter-spacing: var(--ds-description-item-term-letter-spacing, normal);--_description-item-term-text-transform: var(--ds-description-item-term-text-transform, none);--_description-item-details-color: var(--ds-description-item-details-color, var(--text-primary));--_description-item-details-font-size: var(--ds-description-item-details-font-size, var(--font-size-s));--_description-item-details-font-weight: var(--ds-description-item-details-font-weight, var(--font-weight-regular));--_description-list-value-min-width: var(--ds-description-list-value-min-width, var(--dl-spec-value-min-w));display:flex;flex-wrap:wrap;gap:var(--space-0-5) var(--_description-list-column-gap, var(--space-5));align-items:baseline}.term{flex:0 0 var(--_description-list-label-width, var(--dl-spec-label-w));min-width:0;color:var(--_description-item-term-color);font:var(--_description-item-term-font-weight) var(--_description-item-term-font-size)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_description-item-term-letter-spacing);text-transform:var(--_description-item-term-text-transform)}.details{flex:1 1 var(--_description-list-value-min-width);display:flex;align-items:center;gap:var(--space-2);min-width:0;color:var(--_description-item-details-color);font:var(--_description-item-details-font-weight) var(--_description-item-details-font-size)/var(--line-height-base) var(--font-sans)}.value{min-width:0;overflow-wrap:anywhere}.copy{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--space-0-5);border:0;border-radius:var(--ds-radius-inner);background:transparent;color:var(--text-tertiary);cursor:pointer;opacity:0;transition:opacity var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.copy:hover{background:var(--surface-secondary);color:var(--text-primary)}.copy:active{background:var(--surface-muted)}.copy:focus-visible{opacity:1;outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:1px;animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}:host(.stacked) :is(.term,.details){flex-basis:100%}:host(:hover) .copy{opacity:1}\n"] }]
46
46
  }], propDecorators: { term: [{ type: i0.Input, args: [{ isSignal: true, alias: "term", required: false }] }], copyValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyValue", required: false }] }] } });
47
47
 
48
48
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-description-list.mjs","sources":["../../../src/lib/components/description-list/description-list.component.ts","../../../src/lib/components/description-list/description-list.component.html","../../../src/lib/components/description-list/description-item.component.ts","../../../src/lib/components/description-list/description-item.component.html","../../../src/lib/components/description-list/ids-group-ltd-ids-design-system-components-description-list.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input } from '@angular/core';\n\nexport type DescriptionListOrientation = 'horizontal' | 'stacked';\n\n@Component({\n selector: 'ds-description-list',\n standalone: true,\n templateUrl: './description-list.component.html',\n styleUrl: './description-list.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.stacked]': \"orientation() === 'stacked'\",\n },\n})\nexport class DescriptionListComponent {\n /** `horizontal`: label column + value, each item stacking once its value would get less than --ds-description-list-value-min-width. `stacked`: label above value at every width. */\n readonly orientation = input<DescriptionListOrientation>('horizontal');\n}\n","<ng-content></ng-content>\n","import {\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { DescriptionListComponent } from './description-list.component';\n\n@Component({\n selector: 'ds-description-item',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './description-item.component.html',\n styleUrl: './description-item.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'group',\n '[class.stacked]': 'stacked()',\n },\n})\nexport class DescriptionItemComponent {\n private readonly list = inject(DescriptionListComponent, { optional: true });\n protected readonly intl = inject(DS_INTL);\n\n /** The label, plain text. Rich values go in the projected content. */\n readonly term = input<string>('');\n /** When set, a copy button copies this string to the clipboard. */\n readonly copyValue = input<string | null>(null);\n\n protected readonly stacked = computed(\n () => this.list?.orientation() === 'stacked',\n );\n protected readonly copied = signal(false);\n\n protected async copy(): Promise<void> {\n const value = this.copyValue();\n if (!value) {\n return;\n }\n await navigator.clipboard?.writeText(value);\n this.copied.set(true);\n setTimeout(() => this.copied.set(false), 1200);\n }\n}\n","<span\n class=\"term\"\n role=\"term\">\n {{ term() }}\n</span>\n\n<div\n class=\"details\"\n role=\"definition\">\n <span class=\"value\">\n <ng-content></ng-content>\n </span>\n\n @if (copyValue()) {\n <button\n type=\"button\"\n class=\"copy\"\n [attr.aria-label]=\"\n copied() ? intl().descriptionList.copied : intl().descriptionList.copy\n \"\n (click)=\"copy()\">\n <ds-icon\n [name]=\"copied() ? 'check' : 'copy'\"\n [size]=\"14\" />\n </button>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAca,wBAAwB,CAAA;;AAE1B,IAAA,WAAW,GAAG,KAAK,CAA6B,YAAY,kFAAC;wGAF3D,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,+SCdrC,6BACA,EAAA,MAAA,EAAA,CAAA,4VAAA,CAAA,EAAA,CAAA;;4FDaa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAVpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,cACnB,IAAI,EAAA,aAAA,EAGD,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,iBAAiB,EAAE,6BAA6B;AACjD,qBAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,MA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KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECxBrC,yhBA2BA,EAAA,MAAA,EAAA,CAAA,i3GAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDZY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FASZ,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAZpC,SAAS;+BACE,qBAAqB,EAAA,UAAA,EACnB,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,iBAAiB,EAAE,WAAW;AAC/B,qBAAA,EAAA,QAAA,EAAA,yhBAAA,EAAA,MAAA,EAAA,CAAA,i3GAAA,CAAA,EAAA;;;AEtBH;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-description-list.mjs","sources":["../../../src/lib/components/description-list/description-list.component.ts","../../../src/lib/components/description-list/description-list.component.html","../../../src/lib/components/description-list/description-item.component.ts","../../../src/lib/components/description-list/description-item.component.html","../../../src/lib/components/description-list/ids-group-ltd-ids-design-system-components-description-list.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input } from '@angular/core';\n\nexport type DescriptionListOrientation = 'horizontal' | 'stacked';\n\n@Component({\n selector: 'ds-description-list',\n standalone: true,\n templateUrl: './description-list.component.html',\n styleUrl: './description-list.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.stacked]': \"orientation() === 'stacked'\",\n },\n})\nexport class DescriptionListComponent {\n /** `horizontal`: label column + value, each item stacking once its value would get less than --ds-description-list-value-min-width. `stacked`: label above value at every width. */\n readonly orientation = input<DescriptionListOrientation>('horizontal');\n}\n","<ng-content></ng-content>\n","import {\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { DescriptionListComponent } from './description-list.component';\n\n@Component({\n selector: 'ds-description-item',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './description-item.component.html',\n styleUrl: './description-item.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'group',\n '[class.stacked]': 'stacked()',\n },\n})\nexport class DescriptionItemComponent {\n private readonly list = inject(DescriptionListComponent, { optional: true });\n protected readonly intl = inject(DS_INTL);\n\n /** The label, plain text. Rich values go in the projected content. */\n readonly term = input<string>('');\n /** When set, a copy button copies this string to the clipboard. */\n readonly copyValue = input<string | null>(null);\n\n protected readonly stacked = computed(\n () => this.list?.orientation() === 'stacked',\n );\n protected readonly copied = signal(false);\n\n protected async copy(): Promise<void> {\n const value = this.copyValue();\n if (!value) {\n return;\n }\n await navigator.clipboard?.writeText(value);\n this.copied.set(true);\n setTimeout(() => this.copied.set(false), 1200);\n }\n}\n","<span\n class=\"term\"\n role=\"term\">\n {{ term() }}\n</span>\n\n<div\n class=\"details\"\n role=\"definition\">\n <span class=\"value\">\n <ng-content></ng-content>\n </span>\n\n @if (copyValue()) {\n <button\n type=\"button\"\n class=\"copy\"\n [attr.aria-label]=\"\n copied() ? intl().descriptionList.copied : intl().descriptionList.copy\n \"\n (click)=\"copy()\">\n <ds-icon\n [name]=\"copied() ? 'check' : 'copy'\"\n [size]=\"14\" />\n </button>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAca,wBAAwB,CAA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EAAA,IAAA,EACnC;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,iBAAiB,EAAE,WAAW;AAC/B,qBAAA,EAAA,QAAA,EAAA,yhBAAA,EAAA,MAAA,EAAA,CAAA,6+EAAA,CAAA,EAAA;;;AEtBH;;AAEG;;;;"}
@@ -1,14 +1,20 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, model, input, output, signal, computed, effect, ViewEncapsulation, Component } from '@angular/core';
2
+ import { inject, model, input, output, signal, computed, viewChild, effect, ViewEncapsulation, Component } from '@angular/core';
3
3
  import * as i2 from '@angular/cdk/a11y';
4
4
  import { A11yModule } from '@angular/cdk/a11y';
5
5
  import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
6
6
  import { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';
7
- import { DS_INTL } from '@ids-group-ltd/ids-design-system/core';
7
+ import { DS_INTL, warnUnslottedContent } from '@ids-group-ltd/ids-design-system/core';
8
8
  import * as i1 from '@ids-group-ltd/ids-design-system/components';
9
9
  import { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';
10
10
 
11
11
  let nextId = 0;
12
+ const DRAWER_SLOTS = [
13
+ 'drawer-body',
14
+ 'body',
15
+ 'drawer-footer',
16
+ 'actions',
17
+ ];
12
18
  class DrawerComponent {
13
19
  scrollLock = inject(BodyScrollLockService);
14
20
  intl = inject(DS_INTL);
@@ -32,7 +38,11 @@ class DrawerComponent {
32
38
  const parts = ['drawer', this.placement(), this.size()];
33
39
  return parts.join(' ');
34
40
  }, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
41
+ unslotted = viewChild('unslotted', ...(ngDevMode ? [{ debugName: "unslotted" }] : /* istanbul ignore next */ []));
35
42
  constructor() {
43
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
44
+ warnUnslottedContent('ds-drawer', 'drawer-body', DRAWER_SLOTS, () => this.unslotted()?.nativeElement);
45
+ }
36
46
  effect(() => {
37
47
  if (this.preview.staticPreview()) {
38
48
  return;
@@ -95,15 +105,15 @@ class DrawerComponent {
95
105
  }
96
106
  }
97
107
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DrawerComponent, isStandalone: true, selector: "ds-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscape()" }, properties: { "attr.title": "null" } }, hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "@if (rendered() || preview.staticPreview()) {\n <div\n [class]=\"preview.staticPreview() ? 'drawer-static' : 'drawer-root'\"\n [class.closing]=\"closing()\">\n @if (!preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\">\n </div>\n }\n\n <div\n role=\"dialog\"\n [attr.aria-modal]=\"preview.staticPreview() ? null : 'true'\"\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\">\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\">\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"intl().dialog.close\"\n (click)=\"onClose()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\" />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body]\"></ng-content>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer]\"></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_drawer-bg-color: var(--ds-drawer-bg-color, var(--surface-overlay));--_drawer-scrim-color: var(--ds-drawer-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));--_drawer-shadow: var(--ds-drawer-shadow, var(--ds-elevation-modal));--_drawer-divider: var(--ds-drawer-divider, var(--border-divider));--_drawer-close-icon-color: var(--ds-drawer-close-icon-color, var(--icon-default));--_drawer-close-icon-color-hover: var(--ds-drawer-close-icon-color-hover, var(--icon-strong));--_drawer-radius: var(--ds-drawer-radius, 0);--_drawer-title-color: var(--ds-drawer-title-color, inherit);--_drawer-width-sm: var(--ds-drawer-width, var(--drawer-w-sm));--_drawer-width-md: var(--ds-drawer-width, var(--drawer-w-md));--_drawer-width-lg: var(--ds-drawer-width, var(--drawer-w-lg));--_drawer-enter-keyframes: var(--ds-drawer-enter-keyframes, ds-slide-edge-in);--_drawer-leave-keyframes: var(--ds-drawer-leave-keyframes, ds-slide-edge-out);--_drawer-enter-duration: var(--ds-drawer-enter-duration, var(--ds-motion-enter-large-duration));--_drawer-enter-easing: var(--ds-drawer-enter-easing, var(--ds-motion-enter-large-easing));--_drawer-leave-duration: var(--ds-drawer-leave-duration, var(--ds-motion-exit-large-duration));--_drawer-leave-easing: var(--ds-drawer-leave-easing, var(--ds-motion-exit-large-easing));--_drawer-scrim-enter-duration: var(--ds-drawer-enter-duration, var(--ds-motion-enter-panel-duration));--_drawer-scrim-leave-duration: var(--ds-drawer-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-drawer-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_drawer-enter-duration: 0ms;--_drawer-leave-duration: 0ms;--_drawer-scrim-enter-duration: 0ms;--_drawer-scrim-leave-duration: 0ms}}.drawer-root{position:fixed;inset:0;z-index:var(--layer-modal);overflow:clip}.drawer-root.closing{pointer-events:none}.drawer-static{display:contents}.drawer-static .drawer{position:relative;max-width:100%;animation:none}.drawer-scrim{position:absolute;inset:0;background:var(--_drawer-scrim-color);animation-name:ds-fade-in;animation-duration:var(--_drawer-scrim-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer-scrim.closing{animation-name:ds-fade-out;animation-duration:var(--_drawer-scrim-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer{position:absolute;background:var(--_drawer-bg-color);box-shadow:var(--_drawer-shadow);border-radius:var(--_drawer-radius);display:flex;flex-direction:column;isolation:isolate;animation-name:var(--_drawer-enter-keyframes);animation-duration:var(--_drawer-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer.closing{animation-duration:var(--_drawer-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer.sm{width:var(--_drawer-width-sm)}.drawer.md{width:var(--_drawer-width-md)}.drawer.lg{width:var(--_drawer-width-lg)}.drawer.right{--_ds-enter-x: 100%;top:0;right:0;bottom:0;max-width:100vw}.drawer.right.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.left{--_ds-enter-x: -100%;top:0;left:0;bottom:0;max-width:100vw}.drawer.left.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.top{--_ds-enter-y: -100%;top:0;left:0;right:0;width:auto;max-height:80vh}.drawer.top.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.bottom{--_ds-enter-y: 100%;bottom:0;left:0;right:0;width:auto;max-height:80vh}.drawer.bottom.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer .header{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-5) var(--space-6);border-bottom:var(--border-width-default) solid var(--_drawer-divider)}.drawer .title{font:var(--font-weight-bold) var(--font-size-h5)/var(--line-height-snug) var(--font-sans);color:var(--_drawer-title-color);margin:0;flex:1}.drawer .close{background:transparent;border:0;width:var(--modal-close-size);height:var(--modal-close-size);color:var(--_drawer-close-icon-color);cursor:pointer;padding:0}.drawer .close:hover{color:var(--_drawer-close-icon-color-hover)}.drawer .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.drawer .body{flex:1;padding:var(--space-6);overflow-y:auto}.drawer .footer{padding:var(--space-4) var(--space-6);border-top:var(--border-width-default) solid var(--_drawer-divider);display:flex;gap:var(--space-2);justify-content:flex-end}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
108
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DrawerComponent, isStandalone: true, selector: "ds-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscape()" }, properties: { "attr.title": "null" } }, viewQueries: [{ propertyName: "unslotted", first: true, predicate: ["unslotted"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "@if (rendered() || preview.staticPreview()) {\n <div\n [class]=\"preview.staticPreview() ? 'drawer-static' : 'drawer-root'\"\n [class.closing]=\"closing()\">\n @if (!preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\">\n </div>\n }\n\n <div\n role=\"dialog\"\n [attr.aria-modal]=\"preview.staticPreview() ? null : 'true'\"\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\">\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\">\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"intl().dialog.close\"\n (click)=\"onClose()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\" />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body], [body]\"></ng-content>\n\n <div\n #unslotted\n class=\"unslotted\">\n <ng-content></ng-content>\n </div>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer], [actions]\"></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_drawer-bg-color: var(--ds-drawer-bg-color, var(--surface-overlay));--_drawer-scrim-color: var(--ds-drawer-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));--_drawer-shadow: var(--ds-drawer-shadow, var(--ds-elevation-modal));--_drawer-divider: var(--ds-drawer-divider, var(--border-divider));--_drawer-close-icon-color: var(--ds-drawer-close-icon-color, var(--icon-default));--_drawer-close-icon-color-hover: var(--ds-drawer-close-icon-color-hover, var(--icon-strong));--_drawer-radius: var(--ds-drawer-radius, 0);--_drawer-title-color: var(--ds-drawer-title-color, inherit);--_drawer-width-sm: var(--ds-drawer-width, var(--drawer-w-sm));--_drawer-width-md: var(--ds-drawer-width, var(--drawer-w-md));--_drawer-width-lg: var(--ds-drawer-width, var(--drawer-w-lg));--_drawer-enter-keyframes: var(--ds-drawer-enter-keyframes, ds-slide-edge-in);--_drawer-leave-keyframes: var(--ds-drawer-leave-keyframes, ds-slide-edge-out);--_drawer-enter-duration: var(--ds-drawer-enter-duration, var(--ds-motion-enter-large-duration));--_drawer-enter-easing: var(--ds-drawer-enter-easing, var(--ds-motion-enter-large-easing));--_drawer-leave-duration: var(--ds-drawer-leave-duration, var(--ds-motion-exit-large-duration));--_drawer-leave-easing: var(--ds-drawer-leave-easing, var(--ds-motion-exit-large-easing));--_drawer-scrim-enter-duration: var(--ds-drawer-enter-duration, var(--ds-motion-enter-panel-duration));--_drawer-scrim-leave-duration: var(--ds-drawer-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-drawer-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_drawer-enter-duration: 0ms;--_drawer-leave-duration: 0ms;--_drawer-scrim-enter-duration: 0ms;--_drawer-scrim-leave-duration: 0ms}}.drawer-root{position:fixed;inset:0;z-index:var(--layer-modal);overflow:clip}.drawer-root.closing{pointer-events:none}.unslotted,.drawer-static{display:contents}.drawer-static .drawer{position:relative;max-width:100%;animation:none}.drawer-scrim{position:absolute;inset:0;background:var(--_drawer-scrim-color);animation-name:ds-fade-in;animation-duration:var(--_drawer-scrim-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer-scrim.closing{animation-name:ds-fade-out;animation-duration:var(--_drawer-scrim-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer{position:absolute;background:var(--_drawer-bg-color);box-shadow:var(--_drawer-shadow);border-radius:var(--_drawer-radius);display:flex;flex-direction:column;isolation:isolate;animation-name:var(--_drawer-enter-keyframes);animation-duration:var(--_drawer-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer.closing{animation-duration:var(--_drawer-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer.sm{width:var(--_drawer-width-sm)}.drawer.md{width:var(--_drawer-width-md)}.drawer.lg{width:var(--_drawer-width-lg)}.drawer.right{--_ds-enter-x: 100%;top:0;right:0;bottom:0;max-width:100vw}.drawer.right.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.left{--_ds-enter-x: -100%;top:0;left:0;bottom:0;max-width:100vw}.drawer.left.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.top{--_ds-enter-y: -100%;top:0;left:0;right:0;width:auto;max-height:80vh}.drawer.top.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.bottom{--_ds-enter-y: 100%;bottom:0;left:0;right:0;width:auto;max-height:80vh}.drawer.bottom.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer .header{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-5) var(--space-6);border-bottom:var(--border-width-default) solid var(--_drawer-divider)}.drawer .title{font:var(--font-weight-bold) var(--font-size-h5)/var(--line-height-snug) var(--font-sans);color:var(--_drawer-title-color);margin:0;flex:1}.drawer .close{background:transparent;border:0;width:var(--modal-close-size);height:var(--modal-close-size);color:var(--_drawer-close-icon-color);cursor:pointer;padding:0}.drawer .close:hover{color:var(--_drawer-close-icon-color-hover)}.drawer .close:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.drawer .body{flex:1;padding:var(--space-6);overflow-y:auto}.drawer .footer{padding:var(--space-4) var(--space-6);border-top:var(--border-width-default) solid var(--_drawer-divider);display:flex;gap:var(--space-2);justify-content:flex-end}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
99
109
  }
100
110
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DrawerComponent, decorators: [{
101
111
  type: Component,
102
112
  args: [{ selector: 'ds-drawer', standalone: true, imports: [IconComponent, A11yModule], encapsulation: ViewEncapsulation.Emulated, host: {
103
113
  '[attr.title]': 'null',
104
114
  '(document:keydown.escape)': 'onEscape()',
105
- }, hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }], template: "@if (rendered() || preview.staticPreview()) {\n <div\n [class]=\"preview.staticPreview() ? 'drawer-static' : 'drawer-root'\"\n [class.closing]=\"closing()\">\n @if (!preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\">\n </div>\n }\n\n <div\n role=\"dialog\"\n [attr.aria-modal]=\"preview.staticPreview() ? null : 'true'\"\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\">\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\">\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"intl().dialog.close\"\n (click)=\"onClose()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\" />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body]\"></ng-content>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer]\"></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_drawer-bg-color: var(--ds-drawer-bg-color, var(--surface-overlay));--_drawer-scrim-color: var(--ds-drawer-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));--_drawer-shadow: var(--ds-drawer-shadow, var(--ds-elevation-modal));--_drawer-divider: var(--ds-drawer-divider, var(--border-divider));--_drawer-close-icon-color: var(--ds-drawer-close-icon-color, var(--icon-default));--_drawer-close-icon-color-hover: var(--ds-drawer-close-icon-color-hover, var(--icon-strong));--_drawer-radius: var(--ds-drawer-radius, 0);--_drawer-title-color: var(--ds-drawer-title-color, inherit);--_drawer-width-sm: var(--ds-drawer-width, var(--drawer-w-sm));--_drawer-width-md: var(--ds-drawer-width, var(--drawer-w-md));--_drawer-width-lg: var(--ds-drawer-width, var(--drawer-w-lg));--_drawer-enter-keyframes: var(--ds-drawer-enter-keyframes, ds-slide-edge-in);--_drawer-leave-keyframes: var(--ds-drawer-leave-keyframes, ds-slide-edge-out);--_drawer-enter-duration: var(--ds-drawer-enter-duration, var(--ds-motion-enter-large-duration));--_drawer-enter-easing: var(--ds-drawer-enter-easing, var(--ds-motion-enter-large-easing));--_drawer-leave-duration: var(--ds-drawer-leave-duration, var(--ds-motion-exit-large-duration));--_drawer-leave-easing: var(--ds-drawer-leave-easing, var(--ds-motion-exit-large-easing));--_drawer-scrim-enter-duration: var(--ds-drawer-enter-duration, var(--ds-motion-enter-panel-duration));--_drawer-scrim-leave-duration: var(--ds-drawer-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-drawer-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_drawer-enter-duration: 0ms;--_drawer-leave-duration: 0ms;--_drawer-scrim-enter-duration: 0ms;--_drawer-scrim-leave-duration: 0ms}}.drawer-root{position:fixed;inset:0;z-index:var(--layer-modal);overflow:clip}.drawer-root.closing{pointer-events:none}.drawer-static{display:contents}.drawer-static .drawer{position:relative;max-width:100%;animation:none}.drawer-scrim{position:absolute;inset:0;background:var(--_drawer-scrim-color);animation-name:ds-fade-in;animation-duration:var(--_drawer-scrim-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer-scrim.closing{animation-name:ds-fade-out;animation-duration:var(--_drawer-scrim-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer{position:absolute;background:var(--_drawer-bg-color);box-shadow:var(--_drawer-shadow);border-radius:var(--_drawer-radius);display:flex;flex-direction:column;isolation:isolate;animation-name:var(--_drawer-enter-keyframes);animation-duration:var(--_drawer-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer.closing{animation-duration:var(--_drawer-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer.sm{width:var(--_drawer-width-sm)}.drawer.md{width:var(--_drawer-width-md)}.drawer.lg{width:var(--_drawer-width-lg)}.drawer.right{--_ds-enter-x: 100%;top:0;right:0;bottom:0;max-width:100vw}.drawer.right.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.left{--_ds-enter-x: -100%;top:0;left:0;bottom:0;max-width:100vw}.drawer.left.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.top{--_ds-enter-y: -100%;top:0;left:0;right:0;width:auto;max-height:80vh}.drawer.top.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.bottom{--_ds-enter-y: 100%;bottom:0;left:0;right:0;width:auto;max-height:80vh}.drawer.bottom.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer .header{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-5) var(--space-6);border-bottom:var(--border-width-default) solid var(--_drawer-divider)}.drawer .title{font:var(--font-weight-bold) var(--font-size-h5)/var(--line-height-snug) var(--font-sans);color:var(--_drawer-title-color);margin:0;flex:1}.drawer .close{background:transparent;border:0;width:var(--modal-close-size);height:var(--modal-close-size);color:var(--_drawer-close-icon-color);cursor:pointer;padding:0}.drawer .close:hover{color:var(--_drawer-close-icon-color-hover)}.drawer .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.drawer .body{flex:1;padding:var(--space-6);overflow-y:auto}.drawer .footer{padding:var(--space-4) var(--space-6);border-top:var(--border-width-default) solid var(--_drawer-divider);display:flex;gap:var(--space-2);justify-content:flex-end}\n"] }]
106
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
115
+ }, hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }], template: "@if (rendered() || preview.staticPreview()) {\n <div\n [class]=\"preview.staticPreview() ? 'drawer-static' : 'drawer-root'\"\n [class.closing]=\"closing()\">\n @if (!preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\">\n </div>\n }\n\n <div\n role=\"dialog\"\n [attr.aria-modal]=\"preview.staticPreview() ? null : 'true'\"\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\">\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\">\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"intl().dialog.close\"\n (click)=\"onClose()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\" />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body], [body]\"></ng-content>\n\n <div\n #unslotted\n class=\"unslotted\">\n <ng-content></ng-content>\n </div>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer], [actions]\"></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_drawer-bg-color: var(--ds-drawer-bg-color, var(--surface-overlay));--_drawer-scrim-color: var(--ds-drawer-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));--_drawer-shadow: var(--ds-drawer-shadow, var(--ds-elevation-modal));--_drawer-divider: var(--ds-drawer-divider, var(--border-divider));--_drawer-close-icon-color: var(--ds-drawer-close-icon-color, var(--icon-default));--_drawer-close-icon-color-hover: var(--ds-drawer-close-icon-color-hover, var(--icon-strong));--_drawer-radius: var(--ds-drawer-radius, 0);--_drawer-title-color: var(--ds-drawer-title-color, inherit);--_drawer-width-sm: var(--ds-drawer-width, var(--drawer-w-sm));--_drawer-width-md: var(--ds-drawer-width, var(--drawer-w-md));--_drawer-width-lg: var(--ds-drawer-width, var(--drawer-w-lg));--_drawer-enter-keyframes: var(--ds-drawer-enter-keyframes, ds-slide-edge-in);--_drawer-leave-keyframes: var(--ds-drawer-leave-keyframes, ds-slide-edge-out);--_drawer-enter-duration: var(--ds-drawer-enter-duration, var(--ds-motion-enter-large-duration));--_drawer-enter-easing: var(--ds-drawer-enter-easing, var(--ds-motion-enter-large-easing));--_drawer-leave-duration: var(--ds-drawer-leave-duration, var(--ds-motion-exit-large-duration));--_drawer-leave-easing: var(--ds-drawer-leave-easing, var(--ds-motion-exit-large-easing));--_drawer-scrim-enter-duration: var(--ds-drawer-enter-duration, var(--ds-motion-enter-panel-duration));--_drawer-scrim-leave-duration: var(--ds-drawer-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-drawer-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_drawer-enter-duration: 0ms;--_drawer-leave-duration: 0ms;--_drawer-scrim-enter-duration: 0ms;--_drawer-scrim-leave-duration: 0ms}}.drawer-root{position:fixed;inset:0;z-index:var(--layer-modal);overflow:clip}.drawer-root.closing{pointer-events:none}.unslotted,.drawer-static{display:contents}.drawer-static .drawer{position:relative;max-width:100%;animation:none}.drawer-scrim{position:absolute;inset:0;background:var(--_drawer-scrim-color);animation-name:ds-fade-in;animation-duration:var(--_drawer-scrim-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer-scrim.closing{animation-name:ds-fade-out;animation-duration:var(--_drawer-scrim-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer{position:absolute;background:var(--_drawer-bg-color);box-shadow:var(--_drawer-shadow);border-radius:var(--_drawer-radius);display:flex;flex-direction:column;isolation:isolate;animation-name:var(--_drawer-enter-keyframes);animation-duration:var(--_drawer-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer.closing{animation-duration:var(--_drawer-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer.sm{width:var(--_drawer-width-sm)}.drawer.md{width:var(--_drawer-width-md)}.drawer.lg{width:var(--_drawer-width-lg)}.drawer.right{--_ds-enter-x: 100%;top:0;right:0;bottom:0;max-width:100vw}.drawer.right.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.left{--_ds-enter-x: -100%;top:0;left:0;bottom:0;max-width:100vw}.drawer.left.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.top{--_ds-enter-y: -100%;top:0;left:0;right:0;width:auto;max-height:80vh}.drawer.top.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer.bottom{--_ds-enter-y: 100%;bottom:0;left:0;right:0;width:auto;max-height:80vh}.drawer.bottom.closing{animation-name:var(--_drawer-leave-keyframes)}.drawer .header{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-5) var(--space-6);border-bottom:var(--border-width-default) solid var(--_drawer-divider)}.drawer .title{font:var(--font-weight-bold) var(--font-size-h5)/var(--line-height-snug) var(--font-sans);color:var(--_drawer-title-color);margin:0;flex:1}.drawer .close{background:transparent;border:0;width:var(--modal-close-size);height:var(--modal-close-size);color:var(--_drawer-close-icon-color);cursor:pointer;padding:0}.drawer .close:hover{color:var(--_drawer-close-icon-color-hover)}.drawer .close:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.drawer .body{flex:1;padding:var(--space-6);overflow-y:auto}.drawer .footer{padding:var(--space-4) var(--space-6);border-top:var(--border-width-default) solid var(--_drawer-divider);display:flex;gap:var(--space-2);justify-content:flex-end}\n"] }]
116
+ }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }], unslotted: [{ type: i0.ViewChild, args: ['unslotted', { isSignal: true }] }] } });
107
117
 
108
118
  /**
109
119
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-drawer.mjs","sources":["../../../src/lib/components/drawer/drawer.component.ts","../../../src/lib/components/drawer/drawer.component.html","../../../src/lib/components/drawer/ids-group-ltd-ids-design-system-components-drawer.ts"],"sourcesContent":["import {\n Component,\n type OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\nimport type { DrawerPlacement } from './drawer.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ds-drawer',\n standalone: true,\n imports: [IconComponent, A11yModule],\n templateUrl: './drawer.component.html',\n styleUrl: './drawer.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n // Keeps a static `title` attribute from becoming a native tooltip on the host.\n host: {\n '[attr.title]': 'null',\n '(document:keydown.escape)': 'onEscape()',\n },\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n})\nexport class DrawerComponent implements OnDestroy {\n private readonly scrollLock = inject(BodyScrollLockService);\n protected readonly intl = inject(DS_INTL);\n protected readonly preview = inject(DsStaticPreview);\n\n /** Open state, two-way bound. */\n readonly open = model<boolean>(false);\n /** Panel size. */\n readonly size = input<DsSize>('md');\n /** Edge the panel slides in from. */\n readonly placement = input<DrawerPlacement>('right');\n /** Drawer title, shown in the header and used for `aria-labelledby`. */\n readonly title = input.required<string>();\n /** Fires once the close (slide-out) animation finishes. */\n readonly closed = output<void>();\n\n protected readonly titleId = `ds-drawer-title-${++nextId}`;\n protected readonly rendered = signal(false);\n protected readonly closing = signal(false);\n private wasOpen = false;\n private closeFallbackTimer: ReturnType<typeof setTimeout> | null = null;\n\n protected readonly classes = computed(() => {\n const parts = ['drawer', this.placement(), this.size()];\n\n return parts.join(' ');\n });\n\n constructor() {\n effect(() => {\n if (this.preview.staticPreview()) {\n return;\n }\n const isOpen = this.open();\n if (isOpen) {\n this.closing.set(false);\n this.rendered.set(true);\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n } else if (this.wasOpen) {\n this.closing.set(true);\n // animationend is never delivered on a backgrounded tab (Chrome freezes CSS\n // animations) or for a 0s reduced-motion leave; this timer is the teardown.\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = setTimeout(() => this.finishClose(), 300);\n }\n this.wasOpen = isOpen;\n });\n\n // Ref-counted, so stacked overlays don't unlock each other.\n effect((onCleanup) => {\n if (this.preview.staticPreview() || !this.rendered()) {\n return;\n }\n this.scrollLock.lock();\n onCleanup(() => this.scrollLock.unlock());\n });\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n }\n\n protected onClose(): void {\n if (this.preview.staticPreview()) {\n return;\n }\n this.open.set(false);\n }\n\n protected onLeaveEnd(event: AnimationEvent): void {\n // Panel's OWN animationend only; matching the keyframes name would make the exit un-overridable.\n if (event.target !== event.currentTarget) {\n return;\n }\n this.finishClose();\n }\n\n private finishClose(): void {\n if (!this.closing()) {\n return;\n }\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n this.closing.set(false);\n this.rendered.set(false);\n this.closed.emit();\n }\n\n protected onEscape(): void {\n if (this.open()) {\n this.onClose();\n }\n }\n}\n","@if (rendered() || preview.staticPreview()) {\n <div\n [class]=\"preview.staticPreview() ? 'drawer-static' : 'drawer-root'\"\n [class.closing]=\"closing()\">\n @if (!preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\">\n </div>\n }\n\n <div\n role=\"dialog\"\n [attr.aria-modal]=\"preview.staticPreview() ? null : 'true'\"\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\">\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\">\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"intl().dialog.close\"\n (click)=\"onClose()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\" />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body]\"></ng-content>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer]\"></ng-content>\n </div>\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAoBA,IAAI,MAAM,GAAG,CAAC;MAgBD,eAAe,CAAA;AACT,IAAA,UAAU,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACxC,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;AACtB,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;;AAG3C,IAAA,IAAI,GAAG,KAAK,CAAU,KAAK,2EAAC;;AAE5B,IAAA,IAAI,GAAG,KAAK,CAAS,IAAI,2EAAC;;AAE1B,IAAA,SAAS,GAAG,KAAK,CAAkB,OAAO,gFAAC;;AAE3C,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;IAEhC,MAAM,GAAG,MAAM,EAAQ;AAEb,IAAA,OAAO,GAAG,CAAA,gBAAA,EAAmB,EAAE,MAAM,EAAE;AACvC,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;AACxB,IAAA,OAAO,GAAG,MAAM,CAAC,KAAK,8EAAC;IAClC,OAAO,GAAG,KAAK;IACf,kBAAkB,GAAyC,IAAI;AAEpD,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACzC,QAAA,MAAM,KAAK,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;AAEvD,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;AACxB,IAAA,CAAC,8EAAC;AAEF,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE;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,wBAAA,cAAc,EAAE,MAAM;AACtB,wBAAA,2BAA2B,EAAE,YAAY;AAC1C,qBAAA,EAAA,cAAA,EACe,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC,EAAA,QAAA,EAAA,qnDAAA,EAAA,MAAA,EAAA,CAAA,46IAAA,CAAA,EAAA;;;AElC7E;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-drawer.mjs","sources":["../../../src/lib/components/drawer/drawer.component.ts","../../../src/lib/components/drawer/drawer.component.html","../../../src/lib/components/drawer/ids-group-ltd-ids-design-system-components-drawer.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n type OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';\nimport {\n DS_INTL,\n warnUnslottedContent,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\nimport type { DrawerPlacement } from './drawer.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\n\nlet nextId = 0;\n\nconst DRAWER_SLOTS = [\n 'drawer-body',\n 'body',\n 'drawer-footer',\n 'actions',\n] as const;\n\n@Component({\n selector: 'ds-drawer',\n standalone: true,\n imports: [IconComponent, A11yModule],\n templateUrl: './drawer.component.html',\n styleUrl: './drawer.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n // Keeps a static `title` attribute from becoming a native tooltip on the host.\n host: {\n '[attr.title]': 'null',\n '(document:keydown.escape)': 'onEscape()',\n },\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n})\nexport class DrawerComponent implements OnDestroy {\n private readonly scrollLock = inject(BodyScrollLockService);\n protected readonly intl = inject(DS_INTL);\n protected readonly preview = inject(DsStaticPreview);\n\n /** Open state, two-way bound. */\n readonly open = model<boolean>(false);\n /** Panel size. */\n readonly size = input<DsSize>('md');\n /** Edge the panel slides in from. */\n readonly placement = input<DrawerPlacement>('right');\n /** Drawer title, shown in the header and used for `aria-labelledby`. */\n readonly title = input.required<string>();\n /** Fires once the close (slide-out) animation finishes. */\n readonly closed = output<void>();\n\n protected readonly titleId = `ds-drawer-title-${++nextId}`;\n protected readonly rendered = signal(false);\n protected readonly closing = signal(false);\n private wasOpen = false;\n private closeFallbackTimer: ReturnType<typeof setTimeout> | null = null;\n\n protected readonly classes = computed(() => {\n const parts = ['drawer', this.placement(), this.size()];\n\n return parts.join(' ');\n });\n\n private readonly unslotted = viewChild<ElementRef<HTMLElement>>('unslotted');\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n warnUnslottedContent(\n 'ds-drawer',\n 'drawer-body',\n DRAWER_SLOTS,\n () => this.unslotted()?.nativeElement,\n );\n }\n effect(() => {\n if (this.preview.staticPreview()) {\n return;\n }\n const isOpen = this.open();\n if (isOpen) {\n this.closing.set(false);\n this.rendered.set(true);\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n } else if (this.wasOpen) {\n this.closing.set(true);\n // animationend is never delivered on a backgrounded tab (Chrome freezes CSS\n // animations) or for a 0s reduced-motion leave; this timer is the teardown.\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = setTimeout(() => this.finishClose(), 300);\n }\n this.wasOpen = isOpen;\n });\n\n // Ref-counted, so stacked overlays don't unlock each other.\n effect((onCleanup) => {\n if (this.preview.staticPreview() || !this.rendered()) {\n return;\n }\n this.scrollLock.lock();\n onCleanup(() => this.scrollLock.unlock());\n });\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n }\n\n protected onClose(): void {\n if (this.preview.staticPreview()) {\n return;\n }\n this.open.set(false);\n }\n\n protected onLeaveEnd(event: AnimationEvent): void {\n // Panel's OWN animationend only; matching the keyframes name would make the exit un-overridable.\n if (event.target !== event.currentTarget) {\n return;\n }\n this.finishClose();\n }\n\n private finishClose(): void {\n if (!this.closing()) {\n return;\n }\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n this.closing.set(false);\n this.rendered.set(false);\n this.closed.emit();\n }\n\n protected onEscape(): void {\n if (this.open()) {\n this.onClose();\n }\n }\n}\n","@if (rendered() || preview.staticPreview()) {\n <div\n [class]=\"preview.staticPreview() ? 'drawer-static' : 'drawer-root'\"\n [class.closing]=\"closing()\">\n @if (!preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\">\n </div>\n }\n\n <div\n role=\"dialog\"\n [attr.aria-modal]=\"preview.staticPreview() ? null : 'true'\"\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\">\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\">\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"intl().dialog.close\"\n (click)=\"onClose()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\" />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body], [body]\"></ng-content>\n\n <div\n #unslotted\n class=\"unslotted\">\n <ng-content></ng-content>\n </div>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer], [actions]\"></ng-content>\n </div>\n </div>\n </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A,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAWxB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,EAAE,UAAU,CAAC,EAAA,aAAA,EAGrB,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EAEnC;AACJ,wBAAA,cAAc,EAAE,MAAM;AACtB,wBAAA,2BAA2B,EAAE,YAAY;AAC1C,qBAAA,EAAA,cAAA,EACe,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC,EAAA,QAAA,EAAA,mwDAAA,EAAA,MAAA,EAAA,CAAA,s9IAAA,CAAA,EAAA;wiBA8BX,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5E7E;;AAEG;;;;"}
@@ -68,7 +68,9 @@ class DropzoneComponent {
68
68
  if (this.disabled()) {
69
69
  return;
70
70
  }
71
- this.emitPicked(event.target.files);
71
+ const picker = event.target;
72
+ this.emitPicked(picker.files);
73
+ picker.value = '';
72
74
  }
73
75
  emitPicked(list) {
74
76
  const picked = filesToAdd(list ? Array.from(list) : [], this.multiple());
@@ -108,11 +110,11 @@ class DropzoneComponent {
108
110
  return 'file';
109
111
  }
110
112
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DropzoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DropzoneComponent, isStandalone: true, selector: "ds-dropzone", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "filesChange", filesAdded: "filesAdded", fileRemoved: "fileRemoved" }, ngImport: i0, template: "<label\n [class]=\"classes()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\">\n <input\n type=\"file\"\n class=\"dz-input\"\n [attr.aria-label]=\"intl().dropzone.label\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onPickerChange($event)\" />\n\n @if (files().length === 0) {\n <ds-icon\n name=\"upload\"\n [size]=\"24\">\n </ds-icon>\n\n <div class=\"title\">\n {{ intl().dropzone.title }}\n </div>\n\n <div class=\"hint\">\n {{ intl().dropzone.hint }}\n </div>\n\n <ng-content select=\"[hint]\"></ng-content>\n } @else {\n <div class=\"file-list\">\n @for (file of files(); track file.id) {\n <div [class]=\"'file ' + file.state\">\n <ds-icon\n class=\"icon\"\n [name]=\"fileIcon(file.state)\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"main\">\n <div class=\"name\">\n {{ file.name }}\n </div>\n\n <div class=\"meta\">\n {{ fileMeta(file) }}\n </div>\n\n @if (file.state === 'uploading') {\n <div class=\"progress\">\n <div\n class=\"progress-fill\"\n [style.width.%]=\"file.progress\">\n </div>\n </div>\n }\n </div>\n\n <button\n class=\"remove\"\n type=\"button\"\n [attr.aria-label]=\"intl().dropzone.remove(file.name)\"\n (click)=\"\n onRemove(file); $event.preventDefault(); $event.stopPropagation()\n \">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n }\n </div>\n }\n</label>\n", styles: [":where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_dropzone-bg-color: var(--ds-dropzone-bg-color, var(--surface-default));--_dropzone-bg-color-hover: var(--ds-dropzone-bg-color-hover, var(--accent-subtitle));--_dropzone-bg-color-active: var(--ds-dropzone-bg-color-active, var(--accent-subtitle));--_dropzone-border: var(--ds-dropzone-border, var(--border-default));--_dropzone-border-hover: var(--ds-dropzone-border-hover, var(--accent));--_dropzone-border-active: var(--ds-dropzone-border-active, var(--accent));--_dropzone-text-color: var(--ds-dropzone-text-color, var(--text-secondary));--_dropzone-text-color-active: var(--ds-dropzone-text-color-active, var(--accent-strong));--_dropzone-radius: var(--ds-dropzone-radius, var(--ds-radius-panel));--_dropzone-max-width: var(--ds-dropzone-max-width, none);--_dropzone-file-progress: var(--ds-dropzone-file-progress, var(--accent));--_dropzone-file-success: var(--ds-dropzone-file-success, var(--success));--_dropzone-file-error: var(--ds-dropzone-file-error, var(--error));--_dropzone-file-border: var(--ds-dropzone-file-border, var(--border-default));--_dropzone-file-name-color: var(--ds-dropzone-file-name-color, var(--text-primary));--_dropzone-icon-color: var(--ds-dropzone-icon-color, var(--icon-default));display:flex;flex-direction:column;min-width:0}.dz-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.dropzone:has(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@media not (forced-colors:active){.dropzone .dz-input:where(:focus-visible){outline:none}}.dropzone{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);border:var(--border-width-strong) dashed var(--_dropzone-border);border-radius:var(--_dropzone-radius);padding:var(--space-6);text-align:center;background-color:var(--_dropzone-bg-color);cursor:pointer;min-height:160px;transition:border-color var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard)}.dropzone:hover{border-color:var(--_dropzone-border-hover);background-color:var(--_dropzone-bg-color-hover)}.dropzone.active{border-color:var(--_dropzone-border-active);background-color:var(--_dropzone-bg-color-active)}.dropzone.has-files{align-items:stretch;text-align:left;min-height:0}.dropzone.disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;pointer-events:none}.dropzone{max-width:var(--_dropzone-max-width)}.dropzone .title{font:var(--font-weight-bold) var(--font-size-m)/var(--line-height-snug) var(--font-heading);margin:0 0 var(--space-1)}.dropzone .hint{font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_dropzone-text-color)}.dropzone [hint]{margin:var(--space-3) calc(var(--space-6) * -1) 0;padding:var(--space-3) var(--space-6) 0;border-top:var(--border-width-default) solid var(--border-subtitle);align-self:stretch;text-align:center;font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);letter-spacing:var(--letter-spacing-wide)}.dropzone .file-list{width:100%;margin-top:var(--space-4);display:grid;gap:var(--space-2)}.dropzone .file{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3);border:var(--border-width-default) solid var(--_dropzone-file-border);border-radius:var(--radius-md);background:var(--surface-default)}.dropzone .file .icon{flex-shrink:0;color:var(--_dropzone-icon-color)}.dropzone .file .main{flex:1;min-width:0}.dropzone .file .name{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_dropzone-file-name-color)}.dropzone .file .meta{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary)}.dropzone .file .progress{height:var(--border-width-strong);background:var(--surface-secondary);border-radius:var(--radius-pill);margin-top:var(--space-1)}.dropzone .file .progress-fill{height:100%;background:var(--_dropzone-file-progress);border-radius:var(--radius-pill);transition:width var(--duration-base) var(--ease-standard)}.dropzone .file .remove{background:none;border:0;cursor:pointer;color:var(--icon-default);transition:color var(--duration-fast) var(--ease-standard)}.dropzone .file .remove:hover{color:var(--icon-strong)}.dropzone .file .remove:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.dropzone .file.uploading .icon{color:var(--_dropzone-file-progress)}.dropzone .file.success{border-color:var(--_dropzone-file-success)}.dropzone .file.success .icon{color:var(--_dropzone-file-success)}.dropzone .file.error{border-color:var(--_dropzone-file-error)}.dropzone .file.error .icon{color:var(--_dropzone-file-error)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
113
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DropzoneComponent, isStandalone: true, selector: "ds-dropzone", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "filesChange", filesAdded: "filesAdded", fileRemoved: "fileRemoved" }, ngImport: i0, template: "<label\n [class]=\"classes()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\">\n <input\n type=\"file\"\n class=\"dz-input\"\n [attr.aria-label]=\"intl().dropzone.label\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onPickerChange($event)\" />\n\n @if (files().length === 0) {\n <ds-icon\n name=\"upload\"\n [size]=\"24\">\n </ds-icon>\n\n <div class=\"title\">\n {{ intl().dropzone.title }}\n </div>\n\n <div class=\"hint\">\n {{ intl().dropzone.hint }}\n </div>\n\n <ng-content select=\"[hint]\"></ng-content>\n } @else {\n <div class=\"file-list\">\n @for (file of files(); track file.id) {\n <div [class]=\"'file ' + file.state\">\n <ds-icon\n class=\"icon\"\n [name]=\"fileIcon(file.state)\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"main\">\n <div class=\"name\">\n {{ file.name }}\n </div>\n\n <div class=\"meta\">\n {{ fileMeta(file) }}\n </div>\n\n @if (file.state === 'uploading') {\n <div class=\"progress\">\n <div\n class=\"progress-fill\"\n [style.width.%]=\"file.progress\">\n </div>\n </div>\n }\n </div>\n\n <button\n class=\"remove\"\n type=\"button\"\n [attr.aria-label]=\"intl().dropzone.remove(file.name)\"\n (click)=\"\n onRemove(file); $event.preventDefault(); $event.stopPropagation()\n \">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n }\n </div>\n }\n</label>\n", styles: [":host{--_dropzone-bg-color: var(--ds-dropzone-bg-color, var(--surface-default));--_dropzone-bg-color-hover: var(--ds-dropzone-bg-color-hover, var(--accent-subtitle));--_dropzone-bg-color-active: var(--ds-dropzone-bg-color-active, var(--accent-subtitle));--_dropzone-border: var(--ds-dropzone-border, var(--border-default));--_dropzone-border-hover: var(--ds-dropzone-border-hover, var(--accent));--_dropzone-border-active: var(--ds-dropzone-border-active, var(--accent));--_dropzone-text-color: var(--ds-dropzone-text-color, var(--text-secondary));--_dropzone-text-color-active: var(--ds-dropzone-text-color-active, var(--accent-strong));--_dropzone-radius: var(--ds-dropzone-radius, var(--ds-radius-panel));--_dropzone-max-width: var(--ds-dropzone-max-width, none);--_dropzone-file-progress: var(--ds-dropzone-file-progress, var(--accent));--_dropzone-file-success: var(--ds-dropzone-file-success, var(--success));--_dropzone-file-error: var(--ds-dropzone-file-error, var(--error));--_dropzone-file-border: var(--ds-dropzone-file-border, var(--border-default));--_dropzone-file-name-color: var(--ds-dropzone-file-name-color, var(--text-primary));--_dropzone-icon-color: var(--ds-dropzone-icon-color, var(--icon-default));display:flex;flex-direction:column;min-width:0}.dz-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.dropzone:has(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@media not (forced-colors:active){.dropzone .dz-input:where(:focus-visible){outline:none}}.dropzone{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);border:var(--border-width-strong) dashed var(--_dropzone-border);border-radius:var(--_dropzone-radius);padding:var(--space-6);text-align:center;background-color:var(--_dropzone-bg-color);cursor:pointer;min-height:160px;transition:border-color var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard)}.dropzone:hover{border-color:var(--_dropzone-border-hover);background-color:var(--_dropzone-bg-color-hover)}.dropzone.active{border-color:var(--_dropzone-border-active);background-color:var(--_dropzone-bg-color-active)}.dropzone.has-files{align-items:stretch;text-align:left;min-height:0}.dropzone.disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;pointer-events:none}.dropzone{max-width:var(--_dropzone-max-width)}.dropzone .title{font:var(--font-weight-bold) var(--font-size-m)/var(--line-height-snug) var(--font-heading);margin:0 0 var(--space-1)}.dropzone .hint{font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_dropzone-text-color)}.dropzone [hint]{margin:var(--space-3) calc(var(--space-6) * -1) 0;padding:var(--space-3) var(--space-6) 0;border-top:var(--border-width-default) solid var(--border-subtitle);align-self:stretch;text-align:center;font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);letter-spacing:var(--letter-spacing-wide)}.dropzone .file-list{width:100%;margin-top:var(--space-4);display:grid;gap:var(--space-2)}.dropzone .file{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3);border:var(--border-width-default) solid var(--_dropzone-file-border);border-radius:var(--radius-md);background:var(--surface-default)}.dropzone .file .icon{flex-shrink:0;color:var(--_dropzone-icon-color)}.dropzone .file .main{flex:1;min-width:0}.dropzone .file .name{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_dropzone-file-name-color)}.dropzone .file .meta{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary)}.dropzone .file .progress{height:var(--border-width-strong);background:var(--surface-secondary);border-radius:var(--radius-pill);margin-top:var(--space-1)}.dropzone .file .progress-fill{height:100%;background:var(--_dropzone-file-progress);border-radius:var(--radius-pill);transition:width var(--duration-base) var(--ease-standard)}.dropzone .file .remove{background:none;border:0;cursor:pointer;color:var(--icon-default);transition:color var(--duration-fast) var(--ease-standard)}.dropzone .file .remove:hover{color:var(--icon-strong)}.dropzone .file .remove:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.dropzone .file.uploading .icon{color:var(--_dropzone-file-progress)}.dropzone .file.success{border-color:var(--_dropzone-file-success)}.dropzone .file.success .icon{color:var(--_dropzone-file-success)}.dropzone .file.error{border-color:var(--_dropzone-file-error)}.dropzone .file.error .icon{color:var(--_dropzone-file-error)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
112
114
  }
113
115
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DropzoneComponent, decorators: [{
114
116
  type: Component,
115
- args: [{ selector: 'ds-dropzone', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<label\n [class]=\"classes()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\">\n <input\n type=\"file\"\n class=\"dz-input\"\n [attr.aria-label]=\"intl().dropzone.label\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onPickerChange($event)\" />\n\n @if (files().length === 0) {\n <ds-icon\n name=\"upload\"\n [size]=\"24\">\n </ds-icon>\n\n <div class=\"title\">\n {{ intl().dropzone.title }}\n </div>\n\n <div class=\"hint\">\n {{ intl().dropzone.hint }}\n </div>\n\n <ng-content select=\"[hint]\"></ng-content>\n } @else {\n <div class=\"file-list\">\n @for (file of files(); track file.id) {\n <div [class]=\"'file ' + file.state\">\n <ds-icon\n class=\"icon\"\n [name]=\"fileIcon(file.state)\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"main\">\n <div class=\"name\">\n {{ file.name }}\n </div>\n\n <div class=\"meta\">\n {{ fileMeta(file) }}\n </div>\n\n @if (file.state === 'uploading') {\n <div class=\"progress\">\n <div\n class=\"progress-fill\"\n [style.width.%]=\"file.progress\">\n </div>\n </div>\n }\n </div>\n\n <button\n class=\"remove\"\n type=\"button\"\n [attr.aria-label]=\"intl().dropzone.remove(file.name)\"\n (click)=\"\n onRemove(file); $event.preventDefault(); $event.stopPropagation()\n \">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n }\n </div>\n }\n</label>\n", styles: [":where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_dropzone-bg-color: var(--ds-dropzone-bg-color, var(--surface-default));--_dropzone-bg-color-hover: var(--ds-dropzone-bg-color-hover, var(--accent-subtitle));--_dropzone-bg-color-active: var(--ds-dropzone-bg-color-active, var(--accent-subtitle));--_dropzone-border: var(--ds-dropzone-border, var(--border-default));--_dropzone-border-hover: var(--ds-dropzone-border-hover, var(--accent));--_dropzone-border-active: var(--ds-dropzone-border-active, var(--accent));--_dropzone-text-color: var(--ds-dropzone-text-color, var(--text-secondary));--_dropzone-text-color-active: var(--ds-dropzone-text-color-active, var(--accent-strong));--_dropzone-radius: var(--ds-dropzone-radius, var(--ds-radius-panel));--_dropzone-max-width: var(--ds-dropzone-max-width, none);--_dropzone-file-progress: var(--ds-dropzone-file-progress, var(--accent));--_dropzone-file-success: var(--ds-dropzone-file-success, var(--success));--_dropzone-file-error: var(--ds-dropzone-file-error, var(--error));--_dropzone-file-border: var(--ds-dropzone-file-border, var(--border-default));--_dropzone-file-name-color: var(--ds-dropzone-file-name-color, var(--text-primary));--_dropzone-icon-color: var(--ds-dropzone-icon-color, var(--icon-default));display:flex;flex-direction:column;min-width:0}.dz-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.dropzone:has(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@media not (forced-colors:active){.dropzone .dz-input:where(:focus-visible){outline:none}}.dropzone{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);border:var(--border-width-strong) dashed var(--_dropzone-border);border-radius:var(--_dropzone-radius);padding:var(--space-6);text-align:center;background-color:var(--_dropzone-bg-color);cursor:pointer;min-height:160px;transition:border-color var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard)}.dropzone:hover{border-color:var(--_dropzone-border-hover);background-color:var(--_dropzone-bg-color-hover)}.dropzone.active{border-color:var(--_dropzone-border-active);background-color:var(--_dropzone-bg-color-active)}.dropzone.has-files{align-items:stretch;text-align:left;min-height:0}.dropzone.disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;pointer-events:none}.dropzone{max-width:var(--_dropzone-max-width)}.dropzone .title{font:var(--font-weight-bold) var(--font-size-m)/var(--line-height-snug) var(--font-heading);margin:0 0 var(--space-1)}.dropzone .hint{font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_dropzone-text-color)}.dropzone [hint]{margin:var(--space-3) calc(var(--space-6) * -1) 0;padding:var(--space-3) var(--space-6) 0;border-top:var(--border-width-default) solid var(--border-subtitle);align-self:stretch;text-align:center;font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);letter-spacing:var(--letter-spacing-wide)}.dropzone .file-list{width:100%;margin-top:var(--space-4);display:grid;gap:var(--space-2)}.dropzone .file{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3);border:var(--border-width-default) solid var(--_dropzone-file-border);border-radius:var(--radius-md);background:var(--surface-default)}.dropzone .file .icon{flex-shrink:0;color:var(--_dropzone-icon-color)}.dropzone .file .main{flex:1;min-width:0}.dropzone .file .name{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_dropzone-file-name-color)}.dropzone .file .meta{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary)}.dropzone .file .progress{height:var(--border-width-strong);background:var(--surface-secondary);border-radius:var(--radius-pill);margin-top:var(--space-1)}.dropzone .file .progress-fill{height:100%;background:var(--_dropzone-file-progress);border-radius:var(--radius-pill);transition:width var(--duration-base) var(--ease-standard)}.dropzone .file .remove{background:none;border:0;cursor:pointer;color:var(--icon-default);transition:color var(--duration-fast) var(--ease-standard)}.dropzone .file .remove:hover{color:var(--icon-strong)}.dropzone .file .remove:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.dropzone .file.uploading .icon{color:var(--_dropzone-file-progress)}.dropzone .file.success{border-color:var(--_dropzone-file-success)}.dropzone .file.success .icon{color:var(--_dropzone-file-success)}.dropzone .file.error{border-color:var(--_dropzone-file-error)}.dropzone .file.error .icon{color:var(--_dropzone-file-error)}\n"] }]
117
+ args: [{ selector: 'ds-dropzone', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<label\n [class]=\"classes()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\">\n <input\n type=\"file\"\n class=\"dz-input\"\n [attr.aria-label]=\"intl().dropzone.label\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onPickerChange($event)\" />\n\n @if (files().length === 0) {\n <ds-icon\n name=\"upload\"\n [size]=\"24\">\n </ds-icon>\n\n <div class=\"title\">\n {{ intl().dropzone.title }}\n </div>\n\n <div class=\"hint\">\n {{ intl().dropzone.hint }}\n </div>\n\n <ng-content select=\"[hint]\"></ng-content>\n } @else {\n <div class=\"file-list\">\n @for (file of files(); track file.id) {\n <div [class]=\"'file ' + file.state\">\n <ds-icon\n class=\"icon\"\n [name]=\"fileIcon(file.state)\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"main\">\n <div class=\"name\">\n {{ file.name }}\n </div>\n\n <div class=\"meta\">\n {{ fileMeta(file) }}\n </div>\n\n @if (file.state === 'uploading') {\n <div class=\"progress\">\n <div\n class=\"progress-fill\"\n [style.width.%]=\"file.progress\">\n </div>\n </div>\n }\n </div>\n\n <button\n class=\"remove\"\n type=\"button\"\n [attr.aria-label]=\"intl().dropzone.remove(file.name)\"\n (click)=\"\n onRemove(file); $event.preventDefault(); $event.stopPropagation()\n \">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n }\n </div>\n }\n</label>\n", styles: [":host{--_dropzone-bg-color: var(--ds-dropzone-bg-color, var(--surface-default));--_dropzone-bg-color-hover: var(--ds-dropzone-bg-color-hover, var(--accent-subtitle));--_dropzone-bg-color-active: var(--ds-dropzone-bg-color-active, var(--accent-subtitle));--_dropzone-border: var(--ds-dropzone-border, var(--border-default));--_dropzone-border-hover: var(--ds-dropzone-border-hover, var(--accent));--_dropzone-border-active: var(--ds-dropzone-border-active, var(--accent));--_dropzone-text-color: var(--ds-dropzone-text-color, var(--text-secondary));--_dropzone-text-color-active: var(--ds-dropzone-text-color-active, var(--accent-strong));--_dropzone-radius: var(--ds-dropzone-radius, var(--ds-radius-panel));--_dropzone-max-width: var(--ds-dropzone-max-width, none);--_dropzone-file-progress: var(--ds-dropzone-file-progress, var(--accent));--_dropzone-file-success: var(--ds-dropzone-file-success, var(--success));--_dropzone-file-error: var(--ds-dropzone-file-error, var(--error));--_dropzone-file-border: var(--ds-dropzone-file-border, var(--border-default));--_dropzone-file-name-color: var(--ds-dropzone-file-name-color, var(--text-primary));--_dropzone-icon-color: var(--ds-dropzone-icon-color, var(--icon-default));display:flex;flex-direction:column;min-width:0}.dz-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.dropzone:has(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@media not (forced-colors:active){.dropzone .dz-input:where(:focus-visible){outline:none}}.dropzone{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);border:var(--border-width-strong) dashed var(--_dropzone-border);border-radius:var(--_dropzone-radius);padding:var(--space-6);text-align:center;background-color:var(--_dropzone-bg-color);cursor:pointer;min-height:160px;transition:border-color var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard)}.dropzone:hover{border-color:var(--_dropzone-border-hover);background-color:var(--_dropzone-bg-color-hover)}.dropzone.active{border-color:var(--_dropzone-border-active);background-color:var(--_dropzone-bg-color-active)}.dropzone.has-files{align-items:stretch;text-align:left;min-height:0}.dropzone.disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;pointer-events:none}.dropzone{max-width:var(--_dropzone-max-width)}.dropzone .title{font:var(--font-weight-bold) var(--font-size-m)/var(--line-height-snug) var(--font-heading);margin:0 0 var(--space-1)}.dropzone .hint{font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_dropzone-text-color)}.dropzone [hint]{margin:var(--space-3) calc(var(--space-6) * -1) 0;padding:var(--space-3) var(--space-6) 0;border-top:var(--border-width-default) solid var(--border-subtitle);align-self:stretch;text-align:center;font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);letter-spacing:var(--letter-spacing-wide)}.dropzone .file-list{width:100%;margin-top:var(--space-4);display:grid;gap:var(--space-2)}.dropzone .file{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3);border:var(--border-width-default) solid var(--_dropzone-file-border);border-radius:var(--radius-md);background:var(--surface-default)}.dropzone .file .icon{flex-shrink:0;color:var(--_dropzone-icon-color)}.dropzone .file .main{flex:1;min-width:0}.dropzone .file .name{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_dropzone-file-name-color)}.dropzone .file .meta{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary)}.dropzone .file .progress{height:var(--border-width-strong);background:var(--surface-secondary);border-radius:var(--radius-pill);margin-top:var(--space-1)}.dropzone .file .progress-fill{height:100%;background:var(--_dropzone-file-progress);border-radius:var(--radius-pill);transition:width var(--duration-base) var(--ease-standard)}.dropzone .file .remove{background:none;border:0;cursor:pointer;color:var(--icon-default);transition:color var(--duration-fast) var(--ease-standard)}.dropzone .file .remove:hover{color:var(--icon-strong)}.dropzone .file .remove:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.dropzone .file.uploading .icon{color:var(--_dropzone-file-progress)}.dropzone .file.success{border-color:var(--_dropzone-file-success)}.dropzone .file.success .icon{color:var(--_dropzone-file-success)}.dropzone .file.error{border-color:var(--_dropzone-file-error)}.dropzone .file.error .icon{color:var(--_dropzone-file-error)}\n"] }]
116
118
  }], propDecorators: { accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filesAdded: [{ type: i0.Output, args: ["filesAdded"] }], fileRemoved: [{ type: i0.Output, args: ["fileRemoved"] }] } });
117
119
 
118
120
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-dropzone.mjs","sources":["../../../src/lib/components/dropzone/dropzone.files.ts","../../../src/lib/components/dropzone/dropzone.component.ts","../../../src/lib/components/dropzone/dropzone.component.html","../../../src/lib/components/dropzone/ids-group-ltd-ids-design-system-components-dropzone.ts"],"sourcesContent":["/** The native `multiple` attribute constrains the PICKER and nothing else: a drag of several\n * files reaches the element whatever it is set to, so the count is enforced here instead.\n *\n * @internal */\nexport function filesToAdd(\n list: readonly File[],\n multiple: boolean,\n): readonly File[] {\n if (!list.length) {\n return [];\n }\n\n return multiple ? [...list] : list.slice(0, 1);\n}\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL, injectDsLocale } from '@ids-group-ltd/ids-design-system/core';\nimport type { DropzoneFile } from './dropzone.types';\nimport { filesToAdd } from './dropzone.files';\n\n@Component({\n selector: 'ds-dropzone',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './dropzone.component.html',\n styleUrl: './dropzone.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class DropzoneComponent {\n protected readonly intl = inject(DS_INTL);\n private readonly sizeFormat = new Intl.NumberFormat(injectDsLocale(), {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n });\n /** Native `accept`: comma-separated MIME types or extensions. */\n readonly accept = input<string>('');\n /** Allows picking more than one file at once. */\n readonly multiple = input(false, { transform: booleanAttribute });\n /** Files shown in the list; the consumer owns upload state and progress. */\n readonly files = model<DropzoneFile[]>([]);\n /** Blocks all file picking. */\n readonly disabled = input(false, { transform: booleanAttribute });\n protected readonly dragOver = signal<boolean>(false);\n\n /** Fires with the raw files picked or dropped; the consumer adds them to `files`. */\n readonly filesAdded = output<File[]>();\n /** Fires when the user removes a file; the consumer removes the matching entry from `files`. */\n readonly fileRemoved = output<DropzoneFile>();\n\n protected readonly classes = computed(() => {\n const parts = ['dropzone'];\n if (this.dragOver()) {\n parts.push('active');\n }\n if (this.files().length > 0) {\n parts.push('has-files');\n }\n if (this.disabled()) {\n parts.push('disabled');\n }\n\n return parts.join(' ');\n });\n\n protected onDragOver(event: DragEvent): void {\n if (this.disabled()) {\n return;\n }\n event.preventDefault();\n this.dragOver.set(true);\n }\n\n protected onDragLeave(): void {\n this.dragOver.set(false);\n }\n\n protected onDrop(event: DragEvent): void {\n event.preventDefault();\n this.dragOver.set(false);\n if (this.disabled()) {\n return;\n }\n this.emitPicked(event.dataTransfer?.files);\n }\n\n protected onPickerChange(event: Event): void {\n if (this.disabled()) {\n return;\n }\n this.emitPicked((event.target as HTMLInputElement).files);\n }\n\n private emitPicked(list: FileList | null | undefined): void {\n const picked = filesToAdd(list ? Array.from(list) : [], this.multiple());\n if (picked.length) {\n this.filesAdded.emit([...picked]);\n }\n }\n\n protected onRemove(file: DropzoneFile): void {\n this.fileRemoved.emit(file);\n }\n\n protected fileMeta(file: DropzoneFile): string {\n const size = this.formatSize(file.size);\n if (file.message) {\n return `${size} · ${file.message}`;\n }\n if (file.state === 'queued') {\n return size;\n }\n\n return `${size} · ${this.intl().dropzone[file.state]}`;\n }\n\n protected formatSize(bytes: number): string {\n if (bytes < 1024) {\n return `${bytes} B`;\n }\n if (bytes < 1024 * 1024) {\n return `${this.sizeFormat.format(bytes / 1024)} KB`;\n }\n\n return `${this.sizeFormat.format(bytes / 1024 / 1024)} MB`;\n }\n\n protected fileIcon(state: DropzoneFile['state']): 'file' | 'check' | 'error' {\n if (state === 'success') {\n return 'check';\n }\n if (state === 'error') {\n return 'error';\n }\n\n return 'file';\n }\n}\n","<label\n [class]=\"classes()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\">\n <input\n type=\"file\"\n class=\"dz-input\"\n [attr.aria-label]=\"intl().dropzone.label\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onPickerChange($event)\" />\n\n @if (files().length === 0) {\n <ds-icon\n name=\"upload\"\n [size]=\"24\">\n </ds-icon>\n\n <div class=\"title\">\n {{ intl().dropzone.title }}\n </div>\n\n <div class=\"hint\">\n {{ intl().dropzone.hint }}\n </div>\n\n <ng-content select=\"[hint]\"></ng-content>\n } @else {\n <div class=\"file-list\">\n @for (file of files(); track file.id) {\n <div [class]=\"'file ' + file.state\">\n <ds-icon\n class=\"icon\"\n [name]=\"fileIcon(file.state)\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"main\">\n <div class=\"name\">\n {{ file.name }}\n </div>\n\n <div class=\"meta\">\n {{ fileMeta(file) }}\n </div>\n\n @if (file.state === 'uploading') {\n <div class=\"progress\">\n <div\n class=\"progress-fill\"\n [style.width.%]=\"file.progress\">\n </div>\n </div>\n }\n </div>\n\n <button\n class=\"remove\"\n type=\"button\"\n [attr.aria-label]=\"intl().dropzone.remove(file.name)\"\n (click)=\"\n onRemove(file); $event.preventDefault(); $event.stopPropagation()\n \">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n }\n </div>\n }\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGgB;AACV,SAAU,UAAU,CACxB,IAAqB,EACrB,QAAiB,EAAA;AAEjB,IAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AAChB,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,OAAO,QAAQ,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AAChD;;MCWa,iBAAiB,CAAA;AACT,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;IACxB,UAAU,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE;AACpE,QAAA,qBAAqB,EAAE,CAAC;AACxB,QAAA,qBAAqB,EAAE,CAAC;AACzB,KAAA,CAAC;;AAEO,IAAA,MAAM,GAAG,KAAK,CAAS,EAAE,6EAAC;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AAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,UAAA,EAAA,YAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECxB9B,u7DA4EA,EAAA,MAAA,EAAA,CAAA,0zLAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDzDY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKZ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAR7B,SAAS;+BACE,aAAa,EAAA,UAAA,EACX,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,u7DAAA,EAAA,MAAA,EAAA,CAAA,0zLAAA,CAAA,EAAA;;;AEtB3C;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-dropzone.mjs","sources":["../../../src/lib/components/dropzone/dropzone.files.ts","../../../src/lib/components/dropzone/dropzone.component.ts","../../../src/lib/components/dropzone/dropzone.component.html","../../../src/lib/components/dropzone/ids-group-ltd-ids-design-system-components-dropzone.ts"],"sourcesContent":["/** The native `multiple` attribute constrains the PICKER and nothing else: a drag of several\n * files reaches the element whatever it is set to, so the count is enforced here instead.\n *\n * @internal */\nexport function filesToAdd(\n list: readonly File[],\n multiple: boolean,\n): readonly File[] {\n if (!list.length) {\n return [];\n }\n\n return multiple ? [...list] : list.slice(0, 1);\n}\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL, injectDsLocale } from '@ids-group-ltd/ids-design-system/core';\nimport type { DropzoneFile } from './dropzone.types';\nimport { filesToAdd } from './dropzone.files';\n\n@Component({\n selector: 'ds-dropzone',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './dropzone.component.html',\n styleUrl: './dropzone.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class DropzoneComponent {\n protected readonly intl = inject(DS_INTL);\n private readonly sizeFormat = new Intl.NumberFormat(injectDsLocale(), {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n });\n /** Native `accept`: comma-separated MIME types or extensions. */\n readonly accept = input<string>('');\n /** Allows picking more than one file at once. */\n readonly multiple = input(false, { transform: booleanAttribute });\n /** Files shown in the list; the consumer owns upload state and progress. */\n readonly files = model<DropzoneFile[]>([]);\n /** Blocks all file picking. */\n readonly disabled = input(false, { transform: booleanAttribute });\n protected readonly dragOver = signal<boolean>(false);\n\n /** Fires with the raw files picked or dropped; the consumer adds them to `files`. */\n readonly filesAdded = output<File[]>();\n /** Fires when the user removes a file; the consumer removes the matching entry from `files`. */\n readonly fileRemoved = output<DropzoneFile>();\n\n protected readonly classes = computed(() => {\n const parts = ['dropzone'];\n if (this.dragOver()) {\n parts.push('active');\n }\n if (this.files().length > 0) {\n parts.push('has-files');\n }\n if (this.disabled()) {\n parts.push('disabled');\n }\n\n return parts.join(' ');\n });\n\n protected onDragOver(event: DragEvent): void {\n if (this.disabled()) {\n return;\n }\n event.preventDefault();\n this.dragOver.set(true);\n }\n\n protected onDragLeave(): void {\n this.dragOver.set(false);\n }\n\n protected onDrop(event: DragEvent): void {\n event.preventDefault();\n this.dragOver.set(false);\n if (this.disabled()) {\n return;\n }\n this.emitPicked(event.dataTransfer?.files);\n }\n\n protected onPickerChange(event: Event): void {\n if (this.disabled()) {\n return;\n }\n const picker = event.target as HTMLInputElement;\n this.emitPicked(picker.files);\n picker.value = '';\n }\n\n private emitPicked(list: FileList | null | undefined): void {\n const picked = filesToAdd(list ? Array.from(list) : [], this.multiple());\n if (picked.length) {\n this.filesAdded.emit([...picked]);\n }\n }\n\n protected onRemove(file: DropzoneFile): void {\n this.fileRemoved.emit(file);\n }\n\n protected fileMeta(file: DropzoneFile): string {\n const size = this.formatSize(file.size);\n if (file.message) {\n return `${size} · ${file.message}`;\n }\n if (file.state === 'queued') {\n return size;\n }\n\n return `${size} · ${this.intl().dropzone[file.state]}`;\n }\n\n protected formatSize(bytes: number): string {\n if (bytes < 1024) {\n return `${bytes} B`;\n }\n if (bytes < 1024 * 1024) {\n return `${this.sizeFormat.format(bytes / 1024)} KB`;\n }\n\n return `${this.sizeFormat.format(bytes / 1024 / 1024)} MB`;\n }\n\n protected fileIcon(state: DropzoneFile['state']): 'file' | 'check' | 'error' {\n if (state === 'success') {\n return 'check';\n }\n if (state === 'error') {\n return 'error';\n }\n\n return 'file';\n }\n}\n","<label\n [class]=\"classes()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\">\n <input\n type=\"file\"\n class=\"dz-input\"\n [attr.aria-label]=\"intl().dropzone.label\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onPickerChange($event)\" />\n\n @if (files().length === 0) {\n <ds-icon\n name=\"upload\"\n [size]=\"24\">\n </ds-icon>\n\n <div class=\"title\">\n {{ intl().dropzone.title }}\n </div>\n\n <div class=\"hint\">\n {{ intl().dropzone.hint }}\n </div>\n\n <ng-content select=\"[hint]\"></ng-content>\n } @else {\n <div class=\"file-list\">\n @for (file of files(); track file.id) {\n <div [class]=\"'file ' + file.state\">\n <ds-icon\n class=\"icon\"\n [name]=\"fileIcon(file.state)\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"main\">\n <div class=\"name\">\n {{ file.name }}\n </div>\n\n <div class=\"meta\">\n {{ fileMeta(file) }}\n </div>\n\n @if (file.state === 'uploading') {\n <div class=\"progress\">\n <div\n class=\"progress-fill\"\n [style.width.%]=\"file.progress\">\n </div>\n </div>\n }\n </div>\n\n <button\n class=\"remove\"\n type=\"button\"\n [attr.aria-label]=\"intl().dropzone.remove(file.name)\"\n (click)=\"\n onRemove(file); $event.preventDefault(); $event.stopPropagation()\n \">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n }\n </div>\n }\n</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGgB;AACV,SAAU,UAAU,CACxB,IAAqB,EACrB,QAAiB,EAAA;AAEjB,IAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AAChB,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,OAAO,QAAQ,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AAChD;;MCWa,iBAAiB,CAAA;AACT,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;IACxB,UAAU,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE;AACpE,QAAA,qBAAqB,EAAE,CAAC;AACxB,QAAA,qBAAqB,EAAE,CAAC;AACzB,KAAA,CAAC;;AAEO,IAAA,MAAM,GAAG,KAAK,CAAS,EAAE,6EAAC;;IAE1B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,KAAK,GAAG,KAAK,CAAiB,EAAE,4EAAC;;IAEjC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC9C,IAAA,QAAQ,GAAG,MAAM,CAAU,KAAK,+EAAC;;IAG3C,UAAU,GAAG,MAAM,EAAU;;IAE7B,WAAW,GAAG,MAAM,EAA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9B,u7DA4EA,EAAA,MAAA,EAAA,CAAA,q9JAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDzDY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKZ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAR7B,SAAS;+BACE,aAAa,EAAA,UAAA,EACX,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,u7DAAA,EAAA,MAAA,EAAA,CAAA,q9JAAA,CAAA,EAAA;;;AEtB3C;;AAEG;;;;"}
@@ -61,7 +61,7 @@ const MORE_TRIGGER_WIDTH = 132;
61
61
  * </ng-template>
62
62
  *
63
63
  * <ds-search dsFilterBarTrailing … />
64
- * <ds-button dsFilterBarTrailing variant="text">Clear</ds-button>
64
+ * <button dsFilterBarTrailing type="button" class="link">Clear</button>
65
65
  * </ds-filter-bar>
66
66
  * ```
67
67
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-filter-bar.mjs","sources":["../../../src/lib/components/filter-bar/filter-item.directive.ts","../../../src/lib/components/filter-bar/filter-bar.component.ts","../../../src/lib/components/filter-bar/filter-bar.component.html","../../../src/lib/components/filter-bar/ids-group-ltd-ids-design-system-components-filter-bar.ts"],"sourcesContent":["import { Directive, TemplateRef, inject, input } from '@angular/core';\n\nconst DEFAULT_ITEM_WIDTH = 180;\n\nfunction toWidth(value: unknown): number {\n const width = Number(value);\n\n return Number.isFinite(width) && width > 0 ? width : DEFAULT_ITEM_WIDTH;\n}\n\n/**\n * One filter inside `ds-filter-bar`, with the width it should occupy:\n * `<ng-template [dsFilterItem]=\"220\"> <ds-date-picker … /> </ng-template>`.\n *\n * A template, because projected DOM cannot be relocated into the overflow panel. Crossing the\n * boundary destroys and re-creates the view, so a control's internal state (open panel, focus)\n * is lost on collapse; its value survives in the consumer's own signal or form control.\n *\n * The width is a contract, not a hint: a wider control is narrowed to fit the slot.\n */\n@Directive({\n selector: 'ng-template[dsFilterItem]',\n standalone: true,\n})\nexport class FilterItemDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n\n /** Slot width in px. Bare `dsFilterItem` (or a non-positive value) means 180. */\n readonly width = input(DEFAULT_ITEM_WIDTH, {\n alias: 'dsFilterItem',\n transform: toWidth,\n });\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n isDevMode,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ButtonComponent } from '@ids-group-ltd/ids-design-system/components/button';\nimport { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';\nimport { ProjectionDroppedDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { FilterItemDirective } from './filter-item.directive';\n\n// Room for the \"+N more\" trigger. Measuring it would loop (its width feeds the count that decides\n// whether it renders); inline slots may shrink, so a longer translation takes space from them.\nconst MORE_TRIGGER_WIDTH = 132;\n\n/**\n * Priority+ filter row: renders as many filters as fit and collapses the rest into a \"+N more\"\n * panel.\n *\n * The split comes from each item's declared width (`[dsFilterItem]`) plus one `ResizeObserver`\n * on the row, never from measuring the filters (they would flash before being removed).\n *\n * Anything marked `dsFilterBarTrailing` (search, a Clear button) sits at the trailing edge and\n * never collapses. Mark each control rather than wrapping them: a projected wrapper is a plain\n * block whose children stack.\n *\n * ```html\n * <ds-filter-bar>\n * <ng-template [dsFilterItem]=\"180\">\n * <ds-select label=\"Status\" … />\n * </ng-template>\n * <ng-template [dsFilterItem]=\"220\">\n * <ds-date-picker label=\"Opened\" … />\n * </ng-template>\n *\n * <ds-search dsFilterBarTrailing … />\n * <ds-button dsFilterBarTrailing variant=\"text\">Clear</ds-button>\n * </ds-filter-bar>\n * ```\n */\n@Component({\n selector: 'ds-filter-bar',\n standalone: true,\n imports: [\n NgTemplateOutlet,\n ButtonComponent,\n PopoverComponent,\n ProjectionDroppedDirective,\n ],\n templateUrl: './filter-bar.component.html',\n styleUrl: './filter-bar.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FilterBarComponent {\n private readonly intl = inject(DS_INTL);\n\n /** Trailing word of the trigger, after the count (\"+2 filters\"). Unset falls back to\n * `DS_INTL.filterBar.more`. */\n readonly moreLabel = input<string | null>(null);\n protected readonly moreLabelResolved = computed(\n () => this.moreLabel() ?? this.intl().filterBar.more,\n );\n /** Accessible name of the overflow panel. Unset falls back to\n * `DS_INTL.filterBar.panelLabel`. */\n readonly panelLabel = input<string | null>(null);\n protected readonly panelLabelResolved = computed(\n () => this.panelLabel() ?? this.intl().filterBar.panelLabel,\n );\n /** Height of the \"+N\" trigger; set it to match the filters beside it. */\n readonly triggerSize = input<DsSize>('md');\n\n protected readonly devMode = isDevMode();\n\n // descendants: a filter inside @if or @for lives in an embedded view that a direct-children query misses.\n protected readonly items = contentChildren(FilterItemDirective, {\n descendants: true,\n });\n\n private readonly row = viewChild<ElementRef<HTMLElement>>('row');\n private readonly rowWidth = signal(0);\n // Read off the row so retuning --ds-filter-bar-gap cannot desynchronise the arithmetic.\n private readonly gap = signal(0);\n\n protected readonly inlineCount = computed<number>(() => {\n const items = this.items();\n const available = this.rowWidth();\n if (!available) {\n return items.length;\n }\n\n const gap = this.gap();\n const total = items.reduce(\n (sum, item, index) => sum + (index > 0 ? gap : 0) + item.width(),\n 0,\n );\n if (total <= available) {\n return items.length;\n }\n\n const budget = available - MORE_TRIGGER_WIDTH - gap;\n let used = 0;\n let count = 0;\n for (const item of items) {\n used += (count > 0 ? gap : 0) + item.width();\n if (used > budget) {\n break;\n }\n count++;\n }\n\n return count;\n });\n\n protected readonly inline = computed(() =>\n this.items().slice(0, this.inlineCount()),\n );\n\n readonly collapsed = computed(() => this.items().slice(this.inlineCount()));\n\n constructor() {\n effect((onCleanup) => {\n const row = this.row()?.nativeElement;\n if (!row) {\n return;\n }\n\n const measure = (): void => {\n this.rowWidth.set(row.clientWidth);\n this.gap.set(parseFloat(getComputedStyle(row).columnGap) || 0);\n };\n\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(row);\n onCleanup(() => observer.disconnect());\n });\n }\n}\n","<div\n #row\n class=\"row\">\n @for (item of inline(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n\n @if (collapsed().length) {\n <ds-button\n #moreTrigger\n class=\"more\"\n color=\"neutral\"\n variant=\"outline\"\n icon=\"filter\"\n [size]=\"triggerSize()\"\n [ariaExpanded]=\"more.opened()\"\n (pressed)=\"more.toggle(moreTrigger.controlRef().nativeElement)\">\n +{{ collapsed().length }} {{ moreLabelResolved() }}\n </ds-button>\n\n <ds-popover\n #more\n align=\"end\"\n panelRole=\"dialog\"\n [panelLabel]=\"panelLabelResolved()\">\n <div class=\"panel\">\n @for (item of collapsed(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n </div>\n </ds-popover>\n }\n</div>\n\n<div class=\"trailing\">\n <ng-content select=\"[dsFilterBarTrailing]\"></ng-content>\n</div>\n\n@if (devMode) {\n <span\n dsProjectionDropped=\"ds-filter-bar\"\n reason='a filter belongs in an <ng-template [dsFilterItem]=\"width\">, and anything else needs the dsFilterBarTrailing attribute to reach the trailing edge. Content carrying neither is not rendered.'>\n <ng-content></ng-content>\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA,MAAM,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A,EAAA;AAuBJ,SAAA,CAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,mBAAmB,CAAA,EAAA,EAAA,GAAE;AAC9D,4BAAA,WAAW,EAAE,IAAI;AAClB,yBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEyD,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1FjE;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-filter-bar.mjs","sources":["../../../src/lib/components/filter-bar/filter-item.directive.ts","../../../src/lib/components/filter-bar/filter-bar.component.ts","../../../src/lib/components/filter-bar/filter-bar.component.html","../../../src/lib/components/filter-bar/ids-group-ltd-ids-design-system-components-filter-bar.ts"],"sourcesContent":["import { Directive, TemplateRef, inject, input } from '@angular/core';\n\nconst DEFAULT_ITEM_WIDTH = 180;\n\nfunction toWidth(value: unknown): number {\n const width = Number(value);\n\n return Number.isFinite(width) && width > 0 ? width : DEFAULT_ITEM_WIDTH;\n}\n\n/**\n * One filter inside `ds-filter-bar`, with the width it should occupy:\n * `<ng-template [dsFilterItem]=\"220\"> <ds-date-picker … /> </ng-template>`.\n *\n * A template, because projected DOM cannot be relocated into the overflow panel. Crossing the\n * boundary destroys and re-creates the view, so a control's internal state (open panel, focus)\n * is lost on collapse; its value survives in the consumer's own signal or form control.\n *\n * The width is a contract, not a hint: a wider control is narrowed to fit the slot.\n */\n@Directive({\n selector: 'ng-template[dsFilterItem]',\n standalone: true,\n})\nexport class FilterItemDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n\n /** Slot width in px. Bare `dsFilterItem` (or a non-positive value) means 180. */\n readonly width = input(DEFAULT_ITEM_WIDTH, {\n alias: 'dsFilterItem',\n transform: toWidth,\n });\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n isDevMode,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ButtonComponent } from '@ids-group-ltd/ids-design-system/components/button';\nimport { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';\nimport { ProjectionDroppedDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { FilterItemDirective } from './filter-item.directive';\n\n// Room for the \"+N more\" trigger. Measuring it would loop (its width feeds the count that decides\n// whether it renders); inline slots may shrink, so a longer translation takes space from them.\nconst MORE_TRIGGER_WIDTH = 132;\n\n/**\n * Priority+ filter row: renders as many filters as fit and collapses the rest into a \"+N more\"\n * panel.\n *\n * The split comes from each item's declared width (`[dsFilterItem]`) plus one `ResizeObserver`\n * on the row, never from measuring the filters (they would flash before being removed).\n *\n * Anything marked `dsFilterBarTrailing` (search, a Clear button) sits at the trailing edge and\n * never collapses. Mark each control rather than wrapping them: a projected wrapper is a plain\n * block whose children stack.\n *\n * ```html\n * <ds-filter-bar>\n * <ng-template [dsFilterItem]=\"180\">\n * <ds-select label=\"Status\" … />\n * </ng-template>\n * <ng-template [dsFilterItem]=\"220\">\n * <ds-date-picker label=\"Opened\" … />\n * </ng-template>\n *\n * <ds-search dsFilterBarTrailing … />\n * <button dsFilterBarTrailing type=\"button\" class=\"link\">Clear</button>\n * </ds-filter-bar>\n * ```\n */\n@Component({\n selector: 'ds-filter-bar',\n standalone: true,\n imports: [\n NgTemplateOutlet,\n ButtonComponent,\n PopoverComponent,\n ProjectionDroppedDirective,\n ],\n templateUrl: './filter-bar.component.html',\n styleUrl: './filter-bar.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FilterBarComponent {\n private readonly intl = inject(DS_INTL);\n\n /** Trailing word of the trigger, after the count (\"+2 filters\"). Unset falls back to\n * `DS_INTL.filterBar.more`. */\n readonly moreLabel = input<string | null>(null);\n protected readonly moreLabelResolved = computed(\n () => this.moreLabel() ?? this.intl().filterBar.more,\n );\n /** Accessible name of the overflow panel. Unset falls back to\n * `DS_INTL.filterBar.panelLabel`. */\n readonly panelLabel = input<string | null>(null);\n protected readonly panelLabelResolved = computed(\n () => this.panelLabel() ?? this.intl().filterBar.panelLabel,\n );\n /** Height of the \"+N\" trigger; set it to match the filters beside it. */\n readonly triggerSize = input<DsSize>('md');\n\n protected readonly devMode = isDevMode();\n\n // descendants: a filter inside @if or @for lives in an embedded view that a direct-children query misses.\n protected readonly items = contentChildren(FilterItemDirective, {\n descendants: true,\n });\n\n private readonly row = viewChild<ElementRef<HTMLElement>>('row');\n private readonly rowWidth = signal(0);\n // Read off the row so retuning --ds-filter-bar-gap cannot desynchronise the arithmetic.\n private readonly gap = signal(0);\n\n protected readonly inlineCount = computed<number>(() => {\n const items = this.items();\n const available = this.rowWidth();\n if (!available) {\n return items.length;\n }\n\n const gap = this.gap();\n const total = items.reduce(\n (sum, item, index) => sum + (index > 0 ? gap : 0) + item.width(),\n 0,\n );\n if (total <= available) {\n return items.length;\n }\n\n const budget = available - MORE_TRIGGER_WIDTH - gap;\n let used = 0;\n let count = 0;\n for (const item of items) {\n used += (count > 0 ? gap : 0) + item.width();\n if (used > budget) {\n break;\n }\n count++;\n }\n\n return count;\n });\n\n protected readonly inline = computed(() =>\n this.items().slice(0, this.inlineCount()),\n );\n\n readonly collapsed = computed(() => this.items().slice(this.inlineCount()));\n\n constructor() {\n effect((onCleanup) => {\n const row = this.row()?.nativeElement;\n if (!row) {\n return;\n }\n\n const measure = (): void => {\n this.rowWidth.set(row.clientWidth);\n this.gap.set(parseFloat(getComputedStyle(row).columnGap) || 0);\n };\n\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(row);\n onCleanup(() => observer.disconnect());\n });\n }\n}\n","<div\n #row\n class=\"row\">\n @for (item of inline(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n\n @if (collapsed().length) {\n <ds-button\n #moreTrigger\n class=\"more\"\n color=\"neutral\"\n variant=\"outline\"\n icon=\"filter\"\n [size]=\"triggerSize()\"\n [ariaExpanded]=\"more.opened()\"\n (pressed)=\"more.toggle(moreTrigger.controlRef().nativeElement)\">\n +{{ collapsed().length }} {{ moreLabelResolved() }}\n </ds-button>\n\n <ds-popover\n #more\n align=\"end\"\n panelRole=\"dialog\"\n [panelLabel]=\"panelLabelResolved()\">\n <div class=\"panel\">\n @for (item of collapsed(); track item) {\n <div\n class=\"item\"\n [style.width.px]=\"item.width()\">\n <ng-container [ngTemplateOutlet]=\"item.template\" />\n </div>\n }\n </div>\n </ds-popover>\n }\n</div>\n\n<div class=\"trailing\">\n <ng-content select=\"[dsFilterBarTrailing]\"></ng-content>\n</div>\n\n@if (devMode) {\n <span\n dsProjectionDropped=\"ds-filter-bar\"\n reason='a filter belongs in an <ng-template [dsFilterItem]=\"width\">, and anything else needs the dsFilterBarTrailing attribute to reach the trailing edge. Content carrying neither is not rendered.'>\n <ng-content></ng-content>\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA,MAAM,kBAAkB,GAAG,GAAG;AAE9B,SAAS,OAAO,CAAC,KAAc,EAAA;AAC7B,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAE3B,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,kBAAkB;AACzE;AAEA;;;;;;;;;AASG;MAKU,mBAAmB,CAAA;AACrB,IAAA,QAAQ,GAAG,MAAM,CAAuB,WAAW,CAAC;;AAGpD,IAAA,KAAK,GAAG,KAAK,CAAC,kBAAkB,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,EAAA,8BAAA,EAAA,CAAA,EACvC,KAAK,EAAE,cAAc;QACrB,SAAS,EAAE,OAAO,EAAA,CAClB;wGAPS,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B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