@sdcorejs/angular 21.2.14 → 21.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/README.md +7 -5
  2. package/assets/STYLE-GUIDE.md +6 -3
  3. package/assets/THEME.md +166 -0
  4. package/assets/fonts/fonts.scss +1 -1
  5. package/assets/scss/ckeditor5.scss +2 -2
  6. package/assets/scss/core/_inline-edit.scss +3 -3
  7. package/assets/scss/core/_read-state-panel.scss +2 -2
  8. package/assets/scss/core/color.scss +4 -2
  9. package/assets/scss/core/form.scss +35 -12
  10. package/assets/scss/core/scrollbar.scss +3 -3
  11. package/assets/scss/core/utilities/_base.scss +5 -5
  12. package/assets/scss/core/utilities/_typography.scss +22 -22
  13. package/assets/scss/sd-core.scss +12 -0
  14. package/assets/scss/themes/_component-tokens.scss +261 -0
  15. package/assets/scss/themes/_presets.scss +3 -0
  16. package/assets/scss/themes/_ramps.scss +56 -0
  17. package/assets/scss/themes/_scales.scss +90 -0
  18. package/assets/scss/themes/_semantic.scss +22 -0
  19. package/assets/scss/themes/default.scss +113 -10
  20. package/assets/scss/themes/material-theme.scss +3 -0
  21. package/fesm2022/sdcorejs-angular-components-anchor.mjs +2 -2
  22. package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
  23. package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +6 -6
  24. package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
  25. package/fesm2022/sdcorejs-angular-components-audit-diff.mjs +2 -2
  26. package/fesm2022/sdcorejs-angular-components-audit-diff.mjs.map +1 -1
  27. package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +2 -2
  28. package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
  29. package/fesm2022/sdcorejs-angular-components-avatar.mjs +34 -27
  30. package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
  31. package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
  32. package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
  33. package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs +35 -5
  34. package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs.map +1 -1
  35. package/fesm2022/sdcorejs-angular-components-button.mjs +23 -11
  36. package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
  37. package/fesm2022/sdcorejs-angular-components-card.mjs +2 -2
  38. package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
  39. package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +2 -2
  40. package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
  41. package/fesm2022/sdcorejs-angular-components-code-editor.mjs +2 -2
  42. package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
  43. package/fesm2022/sdcorejs-angular-components-data-state.mjs +8 -4
  44. package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
  45. package/fesm2022/sdcorejs-angular-components-editor.mjs +12 -4
  46. package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
  47. package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +2637 -0
  48. package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -0
  49. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +5844 -6504
  50. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  51. package/fesm2022/sdcorejs-angular-components-highlight.mjs +63 -0
  52. package/fesm2022/sdcorejs-angular-components-highlight.mjs.map +1 -0
  53. package/fesm2022/sdcorejs-angular-components-history.mjs +2 -2
  54. package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
  55. package/fesm2022/sdcorejs-angular-components-image-editor.mjs +2088 -0
  56. package/fesm2022/sdcorejs-angular-components-image-editor.mjs.map +1 -0
  57. package/fesm2022/sdcorejs-angular-components-import-excel.mjs +2 -2
  58. package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
  59. package/fesm2022/sdcorejs-angular-components-inform.mjs +9 -5
  60. package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
  61. package/fesm2022/sdcorejs-angular-components-job-progress.mjs +2 -2
  62. package/fesm2022/sdcorejs-angular-components-job-progress.mjs.map +1 -1
  63. package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +40 -22
  64. package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
  65. package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +2 -2
  66. package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
  67. package/fesm2022/sdcorejs-angular-components-modal.mjs +2 -2
  68. package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
  69. package/fesm2022/sdcorejs-angular-components-operator.mjs +2 -2
  70. package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
  71. package/fesm2022/sdcorejs-angular-components-org-chart.mjs +2 -2
  72. package/fesm2022/sdcorejs-angular-components-org-chart.mjs.map +1 -1
  73. package/fesm2022/sdcorejs-angular-components-preview.mjs +129 -7
  74. package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
  75. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +33 -24
  76. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  77. package/fesm2022/sdcorejs-angular-components-query-builder.mjs +2 -2
  78. package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
  79. package/fesm2022/sdcorejs-angular-components-quick-action.mjs +2 -2
  80. package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
  81. package/fesm2022/sdcorejs-angular-components-section.mjs +11 -7
  82. package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
  83. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +118 -9
  84. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
  85. package/fesm2022/sdcorejs-angular-components-splitter.mjs +2 -2
  86. package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
  87. package/fesm2022/sdcorejs-angular-components-stepper.mjs +2 -2
  88. package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
  89. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +4 -4
  90. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  91. package/fesm2022/sdcorejs-angular-components-tab.mjs +2 -2
  92. package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
  93. package/fesm2022/sdcorejs-angular-components-table.mjs +308 -113
  94. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  95. package/fesm2022/sdcorejs-angular-components-tree.mjs +2 -2
  96. package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
  97. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +14 -5
  98. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  99. package/fesm2022/sdcorejs-angular-components.mjs +3 -0
  100. package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
  101. package/fesm2022/sdcorejs-angular-directives.mjs +99 -13
  102. package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
  103. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +149 -6
  104. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  105. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +19 -4
  106. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  107. package/fesm2022/sdcorejs-angular-forms-chip.mjs +19 -4
  108. package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
  109. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +2 -2
  110. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  111. package/fesm2022/sdcorejs-angular-forms-date.mjs +17 -7
  112. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  113. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +17 -7
  114. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  115. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +2 -2
  116. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
  117. package/fesm2022/sdcorejs-angular-forms-inline-text.mjs +3 -3
  118. package/fesm2022/sdcorejs-angular-forms-inline-text.mjs.map +1 -1
  119. package/fesm2022/sdcorejs-angular-forms-input-color.mjs +2 -2
  120. package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
  121. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +18 -4
  122. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  123. package/fesm2022/sdcorejs-angular-forms-input.mjs +29 -5
  124. package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
  125. package/fesm2022/sdcorejs-angular-forms-label.mjs +27 -2
  126. package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
  127. package/fesm2022/sdcorejs-angular-forms-radio.mjs +1 -1
  128. package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
  129. package/fesm2022/sdcorejs-angular-forms-select.mjs +498 -7
  130. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  131. package/fesm2022/sdcorejs-angular-forms-switch.mjs +1 -1
  132. package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
  133. package/fesm2022/sdcorejs-angular-forms-textarea.mjs +20 -4
  134. package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
  135. package/fesm2022/sdcorejs-angular-forms-time-range.mjs +2 -2
  136. package/fesm2022/sdcorejs-angular-forms-time-range.mjs.map +1 -1
  137. package/fesm2022/sdcorejs-angular-forms-time.mjs +2 -2
  138. package/fesm2022/sdcorejs-angular-forms-time.mjs.map +1 -1
  139. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
  140. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
  141. package/fesm2022/sdcorejs-angular-i18n.mjs +1859 -271
  142. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  143. package/fesm2022/sdcorejs-angular-modules-auth.mjs +35 -3
  144. package/fesm2022/sdcorejs-angular-modules-auth.mjs.map +1 -1
  145. package/fesm2022/sdcorejs-angular-modules-icon.mjs +25 -0
  146. package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
  147. package/fesm2022/sdcorejs-angular-modules-layout.mjs +39 -48
  148. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  149. package/fesm2022/sdcorejs-angular-modules-permission.mjs.map +1 -1
  150. package/fesm2022/sdcorejs-angular-services-api.mjs +196 -8
  151. package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
  152. package/fesm2022/sdcorejs-angular-services-confirm.mjs +10 -3
  153. package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
  154. package/fesm2022/sdcorejs-angular-services-excel.mjs +5 -0
  155. package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
  156. package/fesm2022/sdcorejs-angular-services-loading.mjs +1 -1
  157. package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
  158. package/fesm2022/sdcorejs-angular-services-notify.mjs +107 -7
  159. package/fesm2022/sdcorejs-angular-services-notify.mjs.map +1 -1
  160. package/fesm2022/sdcorejs-angular-utilities-extensions.mjs +458 -1
  161. package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
  162. package/fesm2022/sdcorejs-angular-utilities-theme.mjs +169 -0
  163. package/fesm2022/sdcorejs-angular-utilities-theme.mjs.map +1 -0
  164. package/fesm2022/sdcorejs-angular-utilities.mjs +1 -0
  165. package/fesm2022/sdcorejs-angular-utilities.mjs.map +1 -1
  166. package/package.json +18 -2
  167. package/types/sdcorejs-angular-components-breadcrumb.d.ts +2 -1
  168. package/types/sdcorejs-angular-components-button.d.ts +5 -0
  169. package/types/sdcorejs-angular-components-data-state.d.ts +6 -2
  170. package/types/sdcorejs-angular-components-file-explorer.d.ts +503 -0
  171. package/types/sdcorejs-angular-components-form-generic.d.ts +897 -835
  172. package/types/sdcorejs-angular-components-highlight.d.ts +27 -0
  173. package/types/sdcorejs-angular-components-image-editor.d.ts +478 -0
  174. package/types/sdcorejs-angular-components-inform.d.ts +5 -2
  175. package/types/sdcorejs-angular-components-mini-editor.d.ts +1 -1
  176. package/types/sdcorejs-angular-components-preview.d.ts +51 -2
  177. package/types/sdcorejs-angular-components-query-builder.d.ts +1 -1
  178. package/types/sdcorejs-angular-components-section.d.ts +5 -1
  179. package/types/sdcorejs-angular-components-side-drawer.d.ts +13 -2
  180. package/types/sdcorejs-angular-components-table.d.ts +6 -0
  181. package/types/sdcorejs-angular-components.d.ts +3 -0
  182. package/types/sdcorejs-angular-directives.d.ts +8 -0
  183. package/types/sdcorejs-angular-forms-autocomplete.d.ts +19 -1
  184. package/types/sdcorejs-angular-forms-chip-calendar.d.ts +13 -2
  185. package/types/sdcorejs-angular-forms-chip.d.ts +13 -2
  186. package/types/sdcorejs-angular-forms-date.d.ts +7 -2
  187. package/types/sdcorejs-angular-forms-datetime.d.ts +7 -2
  188. package/types/sdcorejs-angular-forms-inline-text.d.ts +1 -1
  189. package/types/sdcorejs-angular-forms-input-number.d.ts +12 -2
  190. package/types/sdcorejs-angular-forms-input.d.ts +21 -5
  191. package/types/sdcorejs-angular-forms-label.d.ts +16 -1
  192. package/types/sdcorejs-angular-forms-models.d.ts +16 -1
  193. package/types/sdcorejs-angular-forms-select.d.ts +66 -4
  194. package/types/sdcorejs-angular-forms-textarea.d.ts +9 -2
  195. package/types/sdcorejs-angular-i18n.d.ts +370 -54
  196. package/types/sdcorejs-angular-modules-auth.d.ts +3 -3
  197. package/types/sdcorejs-angular-modules-icon.d.ts +11 -1
  198. package/types/sdcorejs-angular-modules-layout.d.ts +2 -2
  199. package/types/sdcorejs-angular-modules-permission.d.ts +3 -2
  200. package/types/sdcorejs-angular-services-api.d.ts +49 -2
  201. package/types/sdcorejs-angular-services-confirm.d.ts +15 -0
  202. package/types/sdcorejs-angular-services-notify.d.ts +8 -0
  203. package/types/sdcorejs-angular-utilities-extensions.d.ts +68 -1
  204. package/types/sdcorejs-angular-utilities-theme.d.ts +25 -0
  205. package/types/sdcorejs-angular-utilities.d.ts +1 -0
@@ -9,11 +9,11 @@ class SdQuickAction {
9
9
  /** Keep the toolbar in its owner's layout (for a sticky table footer or a drawer). */
10
10
  contained = input(false, { ...(ngDevMode ? { debugName: "contained" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
11
11
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdQuickAction, deps: [], target: i0.ɵɵFactoryTarget.Component });
12
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: SdQuickAction, isStandalone: true, selector: "sd-quick-action", inputs: { opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, contained: { classPropertyName: "contained", publicName: "contained", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"c-quick-action d-flex align-items-center\" [class.active]=\"opened()\" [class.contained]=\"contained()\">\n <div class=\"c-quick-action-message T14R\">\n <ng-content select=\"[sdMessage]\"></ng-content>\n </div>\n <div class=\"c-quick-action-action\">\n <ng-content select=\"[sdAction]\"></ng-content>\n </div>\n</div>\n", styles: [".c-quick-action{box-shadow:0 .4px .8px #0000001a,0 3px 6px #0003;border-radius:8px;position:fixed;width:max-content;max-width:min(90vw,720px);background-color:#fff;bottom:90px;left:0;right:0;margin:auto;visibility:hidden;opacity:0;pointer-events:none;transition:transform .2s ease-in-out,opacity .2s ease-in-out,visibility .2s ease-in-out;transform:translate3d(0,100%,0);z-index:99;gap:16px}.c-quick-action.active{transform:translateZ(0);opacity:1;visibility:visible;pointer-events:all}.c-quick-action.contained{position:relative;inset:auto;width:100%;max-width:100%;flex-wrap:wrap;box-sizing:border-box;background:var(--sd-surface, #fff);color:var(--sd-text);transform:none;gap:8px;padding:8px}.c-quick-action.contained .c-quick-action-action{flex:1 1 100%;min-width:0}.c-quick-action-message{flex:1 1 auto;min-width:0}.c-quick-action-action{flex:0 0 auto;display:flex;align-items:center}.c-quick-action:has(.c-quick-action-action:empty){gap:0;padding-right:16px}.c-quick-action-action:empty{display:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: SdQuickAction, isStandalone: true, selector: "sd-quick-action", inputs: { opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, contained: { classPropertyName: "contained", publicName: "contained", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"c-quick-action d-flex align-items-center\" [class.active]=\"opened()\" [class.contained]=\"contained()\">\n <div class=\"c-quick-action-message T14R\">\n <ng-content select=\"[sdMessage]\"></ng-content>\n </div>\n <div class=\"c-quick-action-action\">\n <ng-content select=\"[sdAction]\"></ng-content>\n </div>\n</div>\n", styles: [".c-quick-action{box-shadow:0 .4px .8px #0000001a,0 3px 6px #0003;border-radius:var(--sd-radius-8, 8px);position:fixed;width:max-content;max-width:min(90vw,720px);background-color:var(--sd-quick-action-bg, #ffffff);bottom:90px;left:0;right:0;margin:auto;visibility:hidden;opacity:0;pointer-events:none;transition:transform var(--sd-duration-base, .2s) ease-in-out,opacity var(--sd-duration-base, .2s) ease-in-out,visibility var(--sd-duration-base, .2s) ease-in-out;transform:translate3d(0,100%,0);z-index:var(--sd-z-floating, 99);gap:16px}.c-quick-action.active{transform:translateZ(0);opacity:1;visibility:visible;pointer-events:all}.c-quick-action.contained{position:relative;inset:auto;width:100%;max-width:100%;flex-wrap:wrap;box-sizing:border-box;background:var(--sd-surface, #fff);color:var(--sd-text);transform:none;gap:8px;padding:8px}.c-quick-action.contained .c-quick-action-action{flex:1 1 100%;min-width:0}.c-quick-action-message{flex:1 1 auto;min-width:0}.c-quick-action-action{flex:0 0 auto;display:flex;align-items:center}.c-quick-action:has(.c-quick-action-action:empty){gap:0;padding-right:16px}.c-quick-action-action:empty{display:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
13
13
  }
14
14
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdQuickAction, decorators: [{
15
15
  type: Component,
16
- args: [{ selector: 'sd-quick-action', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"c-quick-action d-flex align-items-center\" [class.active]=\"opened()\" [class.contained]=\"contained()\">\n <div class=\"c-quick-action-message T14R\">\n <ng-content select=\"[sdMessage]\"></ng-content>\n </div>\n <div class=\"c-quick-action-action\">\n <ng-content select=\"[sdAction]\"></ng-content>\n </div>\n</div>\n", styles: [".c-quick-action{box-shadow:0 .4px .8px #0000001a,0 3px 6px #0003;border-radius:8px;position:fixed;width:max-content;max-width:min(90vw,720px);background-color:#fff;bottom:90px;left:0;right:0;margin:auto;visibility:hidden;opacity:0;pointer-events:none;transition:transform .2s ease-in-out,opacity .2s ease-in-out,visibility .2s ease-in-out;transform:translate3d(0,100%,0);z-index:99;gap:16px}.c-quick-action.active{transform:translateZ(0);opacity:1;visibility:visible;pointer-events:all}.c-quick-action.contained{position:relative;inset:auto;width:100%;max-width:100%;flex-wrap:wrap;box-sizing:border-box;background:var(--sd-surface, #fff);color:var(--sd-text);transform:none;gap:8px;padding:8px}.c-quick-action.contained .c-quick-action-action{flex:1 1 100%;min-width:0}.c-quick-action-message{flex:1 1 auto;min-width:0}.c-quick-action-action{flex:0 0 auto;display:flex;align-items:center}.c-quick-action:has(.c-quick-action-action:empty){gap:0;padding-right:16px}.c-quick-action-action:empty{display:none}\n"] }]
16
+ args: [{ selector: 'sd-quick-action', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"c-quick-action d-flex align-items-center\" [class.active]=\"opened()\" [class.contained]=\"contained()\">\n <div class=\"c-quick-action-message T14R\">\n <ng-content select=\"[sdMessage]\"></ng-content>\n </div>\n <div class=\"c-quick-action-action\">\n <ng-content select=\"[sdAction]\"></ng-content>\n </div>\n</div>\n", styles: [".c-quick-action{box-shadow:0 .4px .8px #0000001a,0 3px 6px #0003;border-radius:var(--sd-radius-8, 8px);position:fixed;width:max-content;max-width:min(90vw,720px);background-color:var(--sd-quick-action-bg, #ffffff);bottom:90px;left:0;right:0;margin:auto;visibility:hidden;opacity:0;pointer-events:none;transition:transform var(--sd-duration-base, .2s) ease-in-out,opacity var(--sd-duration-base, .2s) ease-in-out,visibility var(--sd-duration-base, .2s) ease-in-out;transform:translate3d(0,100%,0);z-index:var(--sd-z-floating, 99);gap:16px}.c-quick-action.active{transform:translateZ(0);opacity:1;visibility:visible;pointer-events:all}.c-quick-action.contained{position:relative;inset:auto;width:100%;max-width:100%;flex-wrap:wrap;box-sizing:border-box;background:var(--sd-surface, #fff);color:var(--sd-text);transform:none;gap:8px;padding:8px}.c-quick-action.contained .c-quick-action-action{flex:1 1 100%;min-width:0}.c-quick-action-message{flex:1 1 auto;min-width:0}.c-quick-action-action{flex:0 0 auto;display:flex;align-items:center}.c-quick-action:has(.c-quick-action-action:empty){gap:0;padding-right:16px}.c-quick-action-action:empty{display:none}\n"] }]
17
17
  }], propDecorators: { opened: [{ type: i0.Input, args: [{ isSignal: true, alias: "opened", required: false }] }], contained: [{ type: i0.Input, args: [{ isSignal: true, alias: "contained", required: false }] }] } });
18
18
 
19
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-components-quick-action.mjs","sources":["../../../projects/sdcorejs-angular/components/quick-action/src/quick-action.component.ts","../../../projects/sdcorejs-angular/components/quick-action/src/quick-action.component.html","../../../projects/sdcorejs-angular/components/quick-action/sdcorejs-angular-components-quick-action.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'sd-quick-action',\n templateUrl: './quick-action.component.html',\n styleUrl: './quick-action.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdQuickAction {\n /**\n * Toggle visibility of the floating toolbar. Bare attribute = true.\n */\n readonly opened = input(false, { transform: booleanAttribute });\n /** Keep the toolbar in its owner's layout (for a sticky table footer or a drawer). */\n readonly contained = input(false, { transform: booleanAttribute });\n}\n","<div class=\"c-quick-action d-flex align-items-center\" [class.active]=\"opened()\" [class.contained]=\"contained()\">\n <div class=\"c-quick-action-message T14R\">\n <ng-content select=\"[sdMessage]\"></ng-content>\n </div>\n <div class=\"c-quick-action-action\">\n <ng-content select=\"[sdAction]\"></ng-content>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MASa,aAAa,CAAA;AACxB;;AAEG;IACM,MAAM,GAAG,KAAK,CAAC,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAEtD,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;wGANvD,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,sVCT1B,yVAQA,EAAA,MAAA,EAAA,CAAA,k/BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDCa,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EAGf,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,yVAAA,EAAA,MAAA,EAAA,CAAA,k/BAAA,CAAA,EAAA;;;AEPjD;;AAEG;;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-components-quick-action.mjs","sources":["../../../projects/sdcorejs-angular/components/quick-action/src/quick-action.component.ts","../../../projects/sdcorejs-angular/components/quick-action/src/quick-action.component.html","../../../projects/sdcorejs-angular/components/quick-action/sdcorejs-angular-components-quick-action.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'sd-quick-action',\n templateUrl: './quick-action.component.html',\n styleUrl: './quick-action.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdQuickAction {\n /**\n * Toggle visibility of the floating toolbar. Bare attribute = true.\n */\n readonly opened = input(false, { transform: booleanAttribute });\n /** Keep the toolbar in its owner's layout (for a sticky table footer or a drawer). */\n readonly contained = input(false, { transform: booleanAttribute });\n}\n","<div class=\"c-quick-action d-flex align-items-center\" [class.active]=\"opened()\" [class.contained]=\"contained()\">\n <div class=\"c-quick-action-message T14R\">\n <ng-content select=\"[sdMessage]\"></ng-content>\n </div>\n <div class=\"c-quick-action-action\">\n <ng-content select=\"[sdAction]\"></ng-content>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MASa,aAAa,CAAA;AACxB;;AAEG;IACM,MAAM,GAAG,KAAK,CAAC,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAEtD,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;wGANvD,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,sVCT1B,yVAQA,EAAA,MAAA,EAAA,CAAA,qoCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDCa,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EAGf,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,yVAAA,EAAA,MAAA,EAAA,CAAA,qoCAAA,CAAA,EAAA;;;AEPjD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, model, booleanAttribute, effect, Component } from '@angular/core';
3
- import { SdIcon } from '@sdcorejs/angular/modules/icon';
2
+ import { inject, ElementRef, input, model, booleanAttribute, computed, effect, Component } from '@angular/core';
3
+ import { SD_ICON_CONFIGURATION, SdIcon } from '@sdcorejs/angular/modules/icon';
4
4
  import { SdTranslatePipe } from '@sdcorejs/angular/i18n';
5
5
 
6
6
  const SECTION_INTERACTIVE_SELECTOR = 'a[href], button, input, select, textarea, [role="button"], [role="link"], [contenteditable="true"], [tabindex]';
@@ -12,9 +12,13 @@ class SdSection {
12
12
  subTitle = input(undefined, ...(ngDevMode ? [{ debugName: "subTitle" }] : /* istanbul ignore next */ []));
13
13
  icon = input(undefined, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
14
14
  iconColor = input('primary', { ...(ngDevMode ? { debugName: "iconColor" } : /* istanbul ignore next */ {}), alias: 'iconColor' });
15
+ /** Hình nền ô icon header; bỏ trống thì dùng `defaultShape` của `provideSdIcon` (mặc định `square`). */
16
+ iconShape = input(undefined, ...(ngDevMode ? [{ debugName: "iconShape" }] : /* istanbul ignore next */ []));
15
17
  collapsed = model(false, { ...(ngDevMode ? { debugName: "collapsed" } : /* istanbul ignore next */ {}), alias: 'collapsed' });
16
18
  collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
17
19
  hideHeader = input(false, { ...(ngDevMode ? { debugName: "hideHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
20
+ #iconConfig = inject(SD_ICON_CONFIGURATION);
21
+ resolvedIconShape = computed(() => this.iconShape() ?? this.#iconConfig.defaultShape, ...(ngDevMode ? [{ debugName: "resolvedIconShape" }] : /* istanbul ignore next */ []));
18
22
  /** Id của vùng body, để header `aria-controls` trỏ tới khi section collapsible. */
19
23
  bodyId = `sd-section-body-${++sectionBodyIdSeq}`;
20
24
  constructor() {
@@ -58,14 +62,14 @@ class SdSection {
58
62
  this.toggleCollapse();
59
63
  };
60
64
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
61
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SdSection, isStandalone: true, selector: "sd-section", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { listeners: { "click": "onHeaderClick($event)" } }, ngImport: i0, template: "@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"sd-section-header-icon mr-8 material-icons-outlined\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-info]=\"_iconColor === 'info'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n", styles: [":host{width:100%;display:block}.sd-section{border-radius:8px;background-color:#fff}.sd-section-header,.sd-section-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:8px 16px}.sd-section-header-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;font-size:20px;line-height:1;background:var(--sd-primary-light)}.sd-section-header-icon.text-primary{background:var(--sd-primary-light)}.sd-section-header-icon.text-secondary{background:var(--sd-secondary-light)}.sd-section-header-icon.text-info{background:var(--sd-info-light)}.sd-section-header-icon.text-success{background:var(--sd-success-light)}.sd-section-header-icon.text-warning{background:var(--sd-warning-light)}.sd-section-header-icon.text-error{background:var(--sd-error-light)}.sd-section-collapse-toggle{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:8px}.sd-section-collapse-toggle:focus-visible{outline:2px solid var(--sd-primary, #005cbb);outline-offset:-2px}.sd-section-header-left,.sd-section-header-right,.sd-section-footer-left,.sd-section-footer-right{display:flex;align-items:center;min-width:0}.sd-section-header-left,.sd-section-footer-left{flex:1 1 auto}.sd-section-header-right,.sd-section-footer-right{flex:0 0 auto;justify-content:flex-end;gap:8px}.sd-section-footer-right{margin-left:auto}.sd-section-title-block,.sd-section-title,.sd-section-subtitle{min-width:0}.sd-section-body{padding:0}.sd-section-body--with-header,.sd-section-footer{border-top:1px solid #e6e6e6}.sd-section-footer-left:empty,.sd-section-footer-right:empty{display:none}.sd-section-footer:has(.sd-section-footer-left:empty):has(.sd-section-footer-right:empty){display:none}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
65
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SdSection, isStandalone: true, selector: "sd-section", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, iconShape: { classPropertyName: "iconShape", publicName: "iconShape", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { listeners: { "click": "onHeaderClick($event)" } }, ngImport: i0, template: "@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"sd-section-header-icon mr-8 material-icons-outlined\"\n [attr.data-icon-shape]=\"resolvedIconShape()\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-info]=\"_iconColor === 'info'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n", styles: [":host{width:100%;display:block}.sd-section{border-radius:var(--sd-radius-8, 8px);background-color:var(--sd-section-bg, #ffffff)}.sd-section-header,.sd-section-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:8px 16px}.sd-section-header-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:var(--sd-icon-shape-radius, var(--sd-radius-8, 8px));font-size:var(--sd-font-size-20, 20px);line-height:1;background:var(--sd-primary-light)}.sd-section-header-icon.text-primary{background:var(--sd-primary-light)}.sd-section-header-icon.text-secondary{background:var(--sd-secondary-light)}.sd-section-header-icon.text-info{background:var(--sd-info-light)}.sd-section-header-icon.text-success{background:var(--sd-success-light)}.sd-section-header-icon.text-warning{background:var(--sd-warning-light)}.sd-section-header-icon.text-error{background:var(--sd-error-light)}.sd-section-header-icon[data-icon-shape=circle]{border-radius:50%}.sd-section-header-icon[data-icon-shape=none]{background:transparent}.sd-section-collapse-toggle{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:var(--sd-radius-8, 8px)}.sd-section-collapse-toggle:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}.sd-section-header-left,.sd-section-header-right,.sd-section-footer-left,.sd-section-footer-right{display:flex;align-items:center;min-width:0}.sd-section-header-left,.sd-section-footer-left{flex:1 1 auto}.sd-section-header-right,.sd-section-footer-right{flex:0 0 auto;justify-content:flex-end;gap:8px}.sd-section-footer-right{margin-left:auto}.sd-section-title-block,.sd-section-title,.sd-section-subtitle{min-width:0}.sd-section-body{padding:0}.sd-section-body--with-header,.sd-section-footer{border-top:1px solid var(--sd-section-divider, #e6e6e6)}.sd-section-footer-left:empty,.sd-section-footer-right:empty{display:none}.sd-section-footer:has(.sd-section-footer-left:empty):has(.sd-section-footer-right:empty){display:none}.c-shadow-section{box-shadow:-1px 0 0 0 var(--sd-section-outline, #f2f2f2) inset,1px 0 0 0 var(--sd-section-outline, #f2f2f2) inset,0 1px 0 0 var(--sd-section-outline, #f2f2f2) inset,0 -1px 0 0 var(--sd-section-outline, #f2f2f2) inset,0 1px 2px 0 var(--sd-section-shadow, rgba(47, 49, 54, .1019607843))}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
62
66
  }
63
67
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdSection, decorators: [{
64
68
  type: Component,
65
69
  args: [{ selector: 'sd-section', imports: [SdIcon, SdTranslatePipe], host: {
66
70
  '(click)': 'onHeaderClick($event)',
67
- }, template: "@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"sd-section-header-icon mr-8 material-icons-outlined\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-info]=\"_iconColor === 'info'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n", styles: [":host{width:100%;display:block}.sd-section{border-radius:8px;background-color:#fff}.sd-section-header,.sd-section-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:8px 16px}.sd-section-header-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;font-size:20px;line-height:1;background:var(--sd-primary-light)}.sd-section-header-icon.text-primary{background:var(--sd-primary-light)}.sd-section-header-icon.text-secondary{background:var(--sd-secondary-light)}.sd-section-header-icon.text-info{background:var(--sd-info-light)}.sd-section-header-icon.text-success{background:var(--sd-success-light)}.sd-section-header-icon.text-warning{background:var(--sd-warning-light)}.sd-section-header-icon.text-error{background:var(--sd-error-light)}.sd-section-collapse-toggle{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:8px}.sd-section-collapse-toggle:focus-visible{outline:2px solid var(--sd-primary, #005cbb);outline-offset:-2px}.sd-section-header-left,.sd-section-header-right,.sd-section-footer-left,.sd-section-footer-right{display:flex;align-items:center;min-width:0}.sd-section-header-left,.sd-section-footer-left{flex:1 1 auto}.sd-section-header-right,.sd-section-footer-right{flex:0 0 auto;justify-content:flex-end;gap:8px}.sd-section-footer-right{margin-left:auto}.sd-section-title-block,.sd-section-title,.sd-section-subtitle{min-width:0}.sd-section-body{padding:0}.sd-section-body--with-header,.sd-section-footer{border-top:1px solid #e6e6e6}.sd-section-footer-left:empty,.sd-section-footer-right:empty{display:none}.sd-section-footer:has(.sd-section-footer-left:empty):has(.sd-section-footer-right:empty){display:none}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"] }]
68
- }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subTitle", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }] } });
71
+ }, template: "@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"sd-section-header-icon mr-8 material-icons-outlined\"\n [attr.data-icon-shape]=\"resolvedIconShape()\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-info]=\"_iconColor === 'info'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n", styles: [":host{width:100%;display:block}.sd-section{border-radius:var(--sd-radius-8, 8px);background-color:var(--sd-section-bg, #ffffff)}.sd-section-header,.sd-section-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:8px 16px}.sd-section-header-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:var(--sd-icon-shape-radius, var(--sd-radius-8, 8px));font-size:var(--sd-font-size-20, 20px);line-height:1;background:var(--sd-primary-light)}.sd-section-header-icon.text-primary{background:var(--sd-primary-light)}.sd-section-header-icon.text-secondary{background:var(--sd-secondary-light)}.sd-section-header-icon.text-info{background:var(--sd-info-light)}.sd-section-header-icon.text-success{background:var(--sd-success-light)}.sd-section-header-icon.text-warning{background:var(--sd-warning-light)}.sd-section-header-icon.text-error{background:var(--sd-error-light)}.sd-section-header-icon[data-icon-shape=circle]{border-radius:50%}.sd-section-header-icon[data-icon-shape=none]{background:transparent}.sd-section-collapse-toggle{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:var(--sd-radius-8, 8px)}.sd-section-collapse-toggle:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}.sd-section-header-left,.sd-section-header-right,.sd-section-footer-left,.sd-section-footer-right{display:flex;align-items:center;min-width:0}.sd-section-header-left,.sd-section-footer-left{flex:1 1 auto}.sd-section-header-right,.sd-section-footer-right{flex:0 0 auto;justify-content:flex-end;gap:8px}.sd-section-footer-right{margin-left:auto}.sd-section-title-block,.sd-section-title,.sd-section-subtitle{min-width:0}.sd-section-body{padding:0}.sd-section-body--with-header,.sd-section-footer{border-top:1px solid var(--sd-section-divider, #e6e6e6)}.sd-section-footer-left:empty,.sd-section-footer-right:empty{display:none}.sd-section-footer:has(.sd-section-footer-left:empty):has(.sd-section-footer-right:empty){display:none}.c-shadow-section{box-shadow:-1px 0 0 0 var(--sd-section-outline, #f2f2f2) inset,1px 0 0 0 var(--sd-section-outline, #f2f2f2) inset,0 1px 0 0 var(--sd-section-outline, #f2f2f2) inset,0 -1px 0 0 var(--sd-section-outline, #f2f2f2) inset,0 1px 2px 0 var(--sd-section-shadow, rgba(47, 49, 54, .1019607843))}.cursor-pointer{cursor:pointer}\n"] }]
72
+ }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subTitle", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], iconShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconShape", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }] } });
69
73
 
70
74
  class SdSectionItem {
71
75
  label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
@@ -73,11 +77,11 @@ class SdSectionItem {
73
77
  return val || '150px';
74
78
  } });
75
79
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdSectionItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
76
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: SdSectionItem, isStandalone: true, selector: "sd-section-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"c-item\">\n <div class=\"c-item-label T14R text-secondary\" [style.width]=\"labelWidth()\">{{ label() }}</div>\n <div class=\"c-item-content\"><ng-content></ng-content></div>\n</div>\n", styles: [":host{width:100%;display:block}.c-item{display:flex;flex-direction:row;align-items:center;column-gap:8px;padding:8px 16px;border-bottom:1px solid #f2f2f2}.c-item-content{flex:1;min-width:0}\n"] });
80
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: SdSectionItem, isStandalone: true, selector: "sd-section-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"c-item\">\n <div class=\"c-item-label T14R text-secondary\" [style.width]=\"labelWidth()\">{{ label() }}</div>\n <div class=\"c-item-content\"><ng-content></ng-content></div>\n</div>\n", styles: [":host{width:100%;display:block}.c-item{display:flex;flex-direction:row;align-items:center;column-gap:8px;padding:8px 16px;border-bottom:1px solid var(--sd-section-outline, #f2f2f2)}.c-item-content{flex:1;min-width:0}\n"] });
77
81
  }
78
82
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdSectionItem, decorators: [{
79
83
  type: Component,
80
- args: [{ selector: 'sd-section-item', standalone: true, template: "<div class=\"c-item\">\n <div class=\"c-item-label T14R text-secondary\" [style.width]=\"labelWidth()\">{{ label() }}</div>\n <div class=\"c-item-content\"><ng-content></ng-content></div>\n</div>\n", styles: [":host{width:100%;display:block}.c-item{display:flex;flex-direction:row;align-items:center;column-gap:8px;padding:8px 16px;border-bottom:1px solid #f2f2f2}.c-item-content{flex:1;min-width:0}\n"] }]
84
+ args: [{ selector: 'sd-section-item', standalone: true, template: "<div class=\"c-item\">\n <div class=\"c-item-label T14R text-secondary\" [style.width]=\"labelWidth()\">{{ label() }}</div>\n <div class=\"c-item-content\"><ng-content></ng-content></div>\n</div>\n", styles: [":host{width:100%;display:block}.c-item{display:flex;flex-direction:row;align-items:center;column-gap:8px;padding:8px 16px;border-bottom:1px solid var(--sd-section-outline, #f2f2f2)}.c-item-content{flex:1;min-width:0}\n"] }]
81
85
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }] } });
82
86
 
83
87
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-components-section.mjs","sources":["../../../projects/sdcorejs-angular/components/section/src/section.component.ts","../../../projects/sdcorejs-angular/components/section/src/section.component.html","../../../projects/sdcorejs-angular/components/section/src/section-item/section-item.component.ts","../../../projects/sdcorejs-angular/components/section/src/section-item/section-item.component.html","../../../projects/sdcorejs-angular/components/section/sdcorejs-angular-components-section.ts"],"sourcesContent":["import { booleanAttribute, Component, effect, ElementRef, inject, input, model } from '@angular/core';\nimport { Color } from '@sdcorejs/utils/models';\nimport { SdIcon } from '@sdcorejs/angular/modules/icon';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\n\nconst SECTION_INTERACTIVE_SELECTOR =\n 'a[href], button, input, select, textarea, [role=\"button\"], [role=\"link\"], [contenteditable=\"true\"], [tabindex]';\n\n// why: id tăng dần để nối aria-controls từ header sang body — mỗi instance cần một id duy nhất.\nlet sectionBodyIdSeq = 0;\n\n@Component({\n selector: 'sd-section',\n templateUrl: './section.component.html',\n styleUrl: './section.component.scss',\n imports: [SdIcon, SdTranslatePipe],\n host: {\n '(click)': 'onHeaderClick($event)',\n },\n})\nexport class SdSection {\n #el = inject(ElementRef);\n\n title = input<string | undefined | null>(undefined);\n subTitle = input<string | undefined | null>(undefined);\n icon = input<string | undefined | null>(undefined);\n iconColor = input<Color>('primary', { alias: 'iconColor' });\n\n collapsed = model<boolean>(false, { alias: 'collapsed' });\n collapsible = input(false, { transform: booleanAttribute });\n\n hideHeader = input(false, { transform: booleanAttribute });\n\n /** Id của vùng body, để header `aria-controls` trỏ tới khi section collapsible. */\n readonly bodyId = `sd-section-body-${++sectionBodyIdSeq}`;\n\n constructor() {\n effect(() => {\n if (this.title()) {\n this.#el.nativeElement.removeAttribute('title');\n }\n });\n }\n\n toggleCollapse = () => {\n if (this.collapsible()) {\n this.collapsed.set(!this.collapsed());\n } else {\n if (this.collapsed()) {\n this.collapsed.set(false);\n }\n }\n };\n\n protected onHeaderClick = (event: MouseEvent): void => {\n const target = event.target;\n if (!(target instanceof Element)) return;\n\n const header = target.closest('.sd-section-header');\n if (!header || header.closest('sd-section') !== this.#el.nativeElement) return;\n if (target.closest(SECTION_INTERACTIVE_SELECTOR)) return;\n\n this.toggleCollapse();\n };\n\n protected onCollapseButtonClick = (event: MouseEvent): void => {\n event.stopPropagation();\n this.toggleCollapse();\n };\n\n // why: giữ public handler cũ để không làm thay đổi declaration API của component.\n onHeaderKeydown = (event: KeyboardEvent) => {\n if (event.target !== event.currentTarget) return;\n // why: chặn Space cuộn trang trước khi toggle.\n event.preventDefault();\n this.toggleCollapse();\n };\n}\n","@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"sd-section-header-icon mr-8 material-icons-outlined\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-info]=\"_iconColor === 'info'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n","import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'sd-section-item',\n templateUrl: './section-item.component.html',\n styleUrl: 'section-item.component.scss',\n standalone: true,\n})\nexport class SdSectionItem {\n label = input.required<string>();\n labelWidth = input<string, string | null | undefined>('150px', {\n transform: (val: any): string => {\n return val || '150px';\n },\n });\n}\n","<div class=\"c-item\">\n <div class=\"c-item-label T14R text-secondary\" [style.width]=\"labelWidth()\">{{ label() }}</div>\n <div class=\"c-item-content\"><ng-content></ng-content></div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA,MAAM,4BAA4B,GAChC,gHAAgH;AAElH;AACA,IAAI,gBAAgB,GAAG,CAAC;MAWX,SAAS,CAAA;AACpB,IAAA,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;AAExB,IAAA,KAAK,GAAG,KAAK,CAA4B,SAAS,4EAAC;AACnD,IAAA,QAAQ,GAAG,KAAK,CAA4B,SAAS,+EAAC;AACtD,IAAA,IAAI,GAAG,KAAK,CAA4B,SAAS,2EAAC;IAClD,SAAS,GAAG,KAAK,CAAQ,SAAS,iFAAI,KAAK,EAAE,WAAW,EAAA,CAAG;IAE3D,SAAS,GAAG,KAAK,CAAU,KAAK,iFAAI,KAAK,EAAE,WAAW,EAAA,CAAG;IACzD,WAAW,GAAG,KAAK,CAAC,KAAK,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAE3D,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAGjD,IAAA,MAAM,GAAG,CAAA,gBAAA,EAAmB,EAAE,gBAAgB,EAAE;AAEzD,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE;gBAChB,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC;YACjD;AACF,QAAA,CAAC,CAAC;IACJ;IAEA,cAAc,GAAG,MAAK;AACpB,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;YACtB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,C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":["../../../projects/sdcorejs-angular/components/section/src/section.component.ts","../../../projects/sdcorejs-angular/components/section/src/section.component.html","../../../projects/sdcorejs-angular/components/section/src/section-item/section-item.component.ts","../../../projects/sdcorejs-angular/components/section/src/section-item/section-item.component.html","../../../projects/sdcorejs-angular/components/section/sdcorejs-angular-components-section.ts"],"sourcesContent":["import { booleanAttribute, Component, computed, effect, ElementRef, inject, input, model } from '@angular/core';\nimport { Color } from '@sdcorejs/utils/models';\nimport { SD_ICON_CONFIGURATION, SdIcon, type SdIconShape } from '@sdcorejs/angular/modules/icon';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\n\nconst SECTION_INTERACTIVE_SELECTOR =\n 'a[href], button, input, select, textarea, [role=\"button\"], [role=\"link\"], [contenteditable=\"true\"], [tabindex]';\n\n// why: id tăng dần để nối aria-controls từ header sang body — mỗi instance cần một id duy nhất.\nlet sectionBodyIdSeq = 0;\n\n@Component({\n selector: 'sd-section',\n templateUrl: './section.component.html',\n styleUrl: './section.component.scss',\n imports: [SdIcon, SdTranslatePipe],\n host: {\n '(click)': 'onHeaderClick($event)',\n },\n})\nexport class SdSection {\n #el = inject(ElementRef);\n\n title = input<string | undefined | null>(undefined);\n subTitle = input<string | undefined | null>(undefined);\n icon = input<string | undefined | null>(undefined);\n iconColor = input<Color>('primary', { alias: 'iconColor' });\n /** Hình nền ô icon header; bỏ trống thì dùng `defaultShape` của `provideSdIcon` (mặc định `square`). */\n iconShape = input<SdIconShape | null | undefined>(undefined);\n\n collapsed = model<boolean>(false, { alias: 'collapsed' });\n collapsible = input(false, { transform: booleanAttribute });\n\n hideHeader = input(false, { transform: booleanAttribute });\n\n readonly #iconConfig = inject(SD_ICON_CONFIGURATION);\n protected readonly resolvedIconShape = computed<SdIconShape>(() => this.iconShape() ?? this.#iconConfig.defaultShape);\n\n /** Id của vùng body, để header `aria-controls` trỏ tới khi section collapsible. */\n readonly bodyId = `sd-section-body-${++sectionBodyIdSeq}`;\n\n constructor() {\n effect(() => {\n if (this.title()) {\n this.#el.nativeElement.removeAttribute('title');\n }\n });\n }\n\n toggleCollapse = () => {\n if (this.collapsible()) {\n this.collapsed.set(!this.collapsed());\n } else {\n if (this.collapsed()) {\n this.collapsed.set(false);\n }\n }\n };\n\n protected onHeaderClick = (event: MouseEvent): void => {\n const target = event.target;\n if (!(target instanceof Element)) return;\n\n const header = target.closest('.sd-section-header');\n if (!header || header.closest('sd-section') !== this.#el.nativeElement) return;\n if (target.closest(SECTION_INTERACTIVE_SELECTOR)) return;\n\n this.toggleCollapse();\n };\n\n protected onCollapseButtonClick = (event: MouseEvent): void => {\n event.stopPropagation();\n this.toggleCollapse();\n };\n\n // why: giữ public handler cũ để không làm thay đổi declaration API của component.\n onHeaderKeydown = (event: KeyboardEvent) => {\n if (event.target !== event.currentTarget) return;\n // why: chặn Space cuộn trang trước khi toggle.\n event.preventDefault();\n this.toggleCollapse();\n };\n}\n","@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"sd-section-header-icon mr-8 material-icons-outlined\"\n [attr.data-icon-shape]=\"resolvedIconShape()\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-info]=\"_iconColor === 'info'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n","import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'sd-section-item',\n templateUrl: './section-item.component.html',\n styleUrl: 'section-item.component.scss',\n standalone: true,\n})\nexport class SdSectionItem {\n label = input.required<string>();\n labelWidth = input<string, string | null | undefined>('150px', {\n transform: (val: any): string => {\n return val || '150px';\n },\n });\n}\n","<div class=\"c-item\">\n <div class=\"c-item-label T14R text-secondary\" [style.width]=\"labelWidth()\">{{ label() }}</div>\n <div class=\"c-item-content\"><ng-content></ng-content></div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA,MAAM,4BAA4B,GAChC,gHAAgH;AAElH;AACA,IAAI,gBAAgB,GAAG,CAAC;MAWX,SAAS,CAAA;AACpB,IAAA,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;AAExB,IAAA,KAAK,GAAG,KAAK,CAA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{ DOCUMENT, CommonModule } from '@angular/common';
6
6
  import * as i0 from '@angular/core';
7
- import { inject, Injectable, viewChild, input, booleanAttribute, computed, output, signal, ViewContainerRef, ApplicationRef, Injector, ChangeDetectorRef, DestroyRef, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
7
+ import { inject, Injectable, viewChild, input, booleanAttribute, computed, output, signal, ElementRef, ViewContainerRef, ApplicationRef, Injector, ChangeDetectorRef, DestroyRef, afterNextRender, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
8
8
  import { SdLoadingService } from '@sdcorejs/angular/services';
9
9
  import { Utilities } from '@sdcorejs/utils/fns';
10
10
  import { Subject, fromEvent, merge } from 'rxjs';
@@ -24,7 +24,7 @@ const scrollLockStates = new WeakMap();
24
24
  const stateFor = (doc) => {
25
25
  let state = scrollLockStates.get(doc);
26
26
  if (!state) {
27
- state = { count: 0, previousOverflow: null };
27
+ state = { count: 0, previousOverflow: null, previousPaddingRight: null };
28
28
  scrollLockStates.set(doc, state);
29
29
  }
30
30
  return state;
@@ -42,7 +42,15 @@ class SdBodyScrollLockService {
42
42
  return;
43
43
  if (state.count === 0) {
44
44
  state.previousOverflow = body.style.overflow;
45
+ // why: đo TRƯỚC khi ẩn overflow — sau đó scrollbar đã biến mất và độ rộng đo được luôn là 0.
46
+ const scrollbarWidth = this.#scrollbarWidth();
45
47
  body.style.overflow = 'hidden';
48
+ // why: ẩn scrollbar làm vùng nội dung rộng thêm đúng bằng độ rộng của nó, khiến cả trang giật sang
49
+ // phải khi drawer mở/đóng. Bù lại bằng `padding-right`; overlay scrollbar (rộng 0) thì bỏ qua.
50
+ if (scrollbarWidth > 0) {
51
+ state.previousPaddingRight = body.style.paddingRight;
52
+ body.style.paddingRight = `${this.#computedPaddingRight(body) + scrollbarWidth}px`;
53
+ }
46
54
  }
47
55
  state.count++;
48
56
  }
@@ -56,9 +64,25 @@ class SdBodyScrollLockService {
56
64
  if (state.count > 0)
57
65
  return;
58
66
  const body = this.#document.body;
59
- if (body)
67
+ if (body) {
60
68
  body.style.overflow = state.previousOverflow ?? '';
69
+ if (state.previousPaddingRight !== null)
70
+ body.style.paddingRight = state.previousPaddingRight;
71
+ }
61
72
  state.previousOverflow = null;
73
+ state.previousPaddingRight = null;
74
+ }
75
+ /** Độ rộng scrollbar dọc của viewport; 0 khi không đo được (SSR) hoặc dùng overlay scrollbar. */
76
+ #scrollbarWidth() {
77
+ const view = this.#document.defaultView;
78
+ const root = this.#document.documentElement;
79
+ if (!view || !root)
80
+ return 0;
81
+ return Math.max(0, view.innerWidth - root.clientWidth);
82
+ }
83
+ #computedPaddingRight(body) {
84
+ const value = this.#document.defaultView?.getComputedStyle(body).paddingRight;
85
+ return value ? parseFloat(value) || 0 : 0;
62
86
  }
63
87
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdBodyScrollLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
64
88
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdBodyScrollLockService, providedIn: 'root' });
@@ -76,6 +100,13 @@ class SdSideDrawer {
76
100
  hideClose = input(false, { ...(ngDevMode ? { debugName: "hideClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
77
101
  disableBackdropClose = input(false, { ...(ngDevMode ? { debugName: "disableBackdropClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
78
102
  beforeClose = input(undefined, ...(ngDevMode ? [{ debugName: "beforeClose" }] : /* istanbul ignore next */ []));
103
+ /**
104
+ * Element the drawer opens inside, for example a template reference: `[container]="area"`.
105
+ * Panel and backdrop then cover only that element and page scroll stays unlocked; a statically
106
+ * positioned container becomes `position: relative` while the drawer lives in it.
107
+ * `null` (default): the drawer covers the viewport.
108
+ */
109
+ container = input(null, ...(ngDevMode ? [{ debugName: "container" }] : /* istanbul ignore next */ []));
79
110
  // Custom CSS class added to the root side-drawer container
80
111
  drawerClass = input('', ...(ngDevMode ? [{ debugName: "drawerClass" }] : /* istanbul ignore next */ []));
81
112
  autoIdInput = input(undefined, { ...(ngDevMode ? { debugName: "autoIdInput" } : /* istanbul ignore next */ {}), alias: 'autoId' });
@@ -89,12 +120,21 @@ class SdSideDrawer {
89
120
  isLoading = this.#isLoadingSignal.asReadonly();
90
121
  dataOpened = computed(() => (this.#isOpenedSignal() ? 'true' : 'false'), ...(ngDevMode ? [{ debugName: "dataOpened" }] : /* istanbul ignore next */ []));
91
122
  dataLoading = computed(() => (this.#isLoadingSignal() ? 'true' : 'false'), ...(ngDevMode ? [{ debugName: "dataLoading" }] : /* istanbul ignore next */ []));
123
+ #containerElement = computed(() => {
124
+ const container = this.container();
125
+ return container instanceof ElementRef ? container.nativeElement : (container ?? null);
126
+ }, ...(ngDevMode ? [{ debugName: "#containerElement" }] : /* istanbul ignore next */ []));
127
+ contained = computed(() => this.#containerElement() !== null, ...(ngDevMode ? [{ debugName: "contained" }] : /* istanbul ignore next */ []));
92
128
  isHovered$;
93
129
  #destroy$ = new Subject();
94
130
  // Instance này có đang giữ 1 khoá scroll hay không — giữ cho lock/release luôn cân bằng
95
131
  // dù open()/close() bị gọi lặp.
96
132
  #holdsScrollLock = false;
97
133
  #closeRequest;
134
+ // Lớp bọc do drawer tự tạo trong [container]; null khi drawer nằm ở body.
135
+ #layer = null;
136
+ #placedIn = null;
137
+ #restoreContainerPosition = null;
98
138
  #viewContainerRef = inject(ViewContainerRef);
99
139
  #ar = inject(ApplicationRef);
100
140
  #injector = inject(Injector);
@@ -102,15 +142,27 @@ class SdSideDrawer {
102
142
  #loadingService = inject(SdLoadingService);
103
143
  #destroyRef = inject(DestroyRef);
104
144
  #scrollLock = inject(SdBodyScrollLockService);
145
+ #document = inject(DOCUMENT);
105
146
  constructor() {
106
147
  // Thay thế ngAfterViewInit, tự động chạy nội dung này khi DOM sẵn sàng để render
107
148
  afterNextRender(() => {
108
149
  // 1. Gắn portal vào body và lưu lại EmbeddedViewRef
109
150
  const outlet = new DomPortalOutlet(document.body, this.#ar, this.#injector);
110
151
  this.#embeddedViewRef = outlet.attachTemplatePortal(this.portal());
111
- // 2. Setup sự kiện hover ngay sau khi DOM thật đã được in ra
152
+ // 2. Có [container] thì chuyển DOM của drawer vào vùng chứa đó
153
+ this.#place(this.#containerElement());
154
+ // 3. Setup sự kiện hover ngay sau khi DOM thật đã được in ra
112
155
  this.#setupHoverSubscription();
113
156
  });
157
+ // [container] đổi sau khi portal đã gắn: chuyển DOM sang vùng mới và cân lại khoá scroll body.
158
+ effect(() => {
159
+ const container = this.#containerElement();
160
+ untracked(() => {
161
+ if (this.#embeddedViewRef)
162
+ this.#place(container);
163
+ this.#syncScrollLock();
164
+ });
165
+ });
114
166
  // Thay thế ngOnDestroy bằng logic destroy trực tiếp
115
167
  this.#destroyRef.onDestroy(() => {
116
168
  this.#destroy$.next();
@@ -118,6 +170,9 @@ class SdSideDrawer {
118
170
  if (this.#embeddedViewRef) {
119
171
  this.#embeddedViewRef.destroy();
120
172
  }
173
+ // Drawer trong [container]: gỡ lớp bọc và trả lại position ban đầu của vùng chứa.
174
+ this.#layer?.remove();
175
+ this.#restoreContainerPosition?.();
121
176
  // Destroy khi đang mở cũng phải nhả khoá, nếu không ref-count kẹt > 0 và trang khoá scroll mãi.
122
177
  this.#releaseScrollLock();
123
178
  });
@@ -125,8 +180,9 @@ class SdSideDrawer {
125
180
  open = () => {
126
181
  this.#ref.markForCheck();
127
182
  this.#isOpenedSignal.set(true);
128
- // Chặn scroll ở document body qua khoá ref-count dùng chung (stack-safe với drawer lồng nhau)
129
- this.#acquireScrollLock();
183
+ // Chặn scroll ở document body qua khoá ref-count dùng chung (stack-safe với drawer lồng nhau).
184
+ // Drawer mở trong [container] không khoá: phần còn lại của trang vẫn dùng được.
185
+ this.#syncScrollLock();
130
186
  };
131
187
  close = () => {
132
188
  if (this.beforeClose()) {
@@ -170,6 +226,12 @@ class SdSideDrawer {
170
226
  // Khôi phục lại scroll ở document body (chỉ thật sự khôi phục khi drawer cuối cùng nhả khoá)
171
227
  this.#releaseScrollLock();
172
228
  };
229
+ #syncScrollLock() {
230
+ if (this.#isOpenedSignal() && !this.contained())
231
+ this.#acquireScrollLock();
232
+ else
233
+ this.#releaseScrollLock();
234
+ }
173
235
  #acquireScrollLock() {
174
236
  if (this.#holdsScrollLock)
175
237
  return;
@@ -182,6 +244,53 @@ class SdSideDrawer {
182
244
  this.#holdsScrollLock = false;
183
245
  this.#scrollLock.release();
184
246
  }
247
+ /** Chuyển DOM của drawer vào `container`, hoặc về lại `<body>` khi `null`. */
248
+ #place(container) {
249
+ if (container === this.#placedIn)
250
+ return;
251
+ const nodes = this.#embeddedViewRef.rootNodes;
252
+ this.#restoreContainerPosition?.();
253
+ this.#restoreContainerPosition = null;
254
+ this.#placedIn = container;
255
+ if (!container) {
256
+ for (const node of nodes)
257
+ this.#document.body.appendChild(node);
258
+ this.#layer?.remove();
259
+ this.#layer = null;
260
+ return;
261
+ }
262
+ this.#layer ??= this.#createLayer();
263
+ container.appendChild(this.#layer);
264
+ for (const node of nodes)
265
+ this.#layer.appendChild(node);
266
+ this.#restoreContainerPosition = this.#ensurePositioned(container);
267
+ }
268
+ #createLayer() {
269
+ const layer = this.#document.createElement('div');
270
+ layer.className = 'sd-side-drawer-layer';
271
+ // why: lớp bọc do code tạo, nằm ngoài view nên SCSS encapsulated không áp vào được — style inline.
272
+ // Phủ đúng vùng chứa và cắt phần panel đang trượt (không đẩy thanh cuộn ngang ra trang).
273
+ // `overflow: clip` chứ không phải `hidden`: CDK focus nút đóng ngay khi mở, lúc panel còn nằm ngoài
274
+ // lớp bọc; `hidden` vẫn cho cuộn bằng code nên trình duyệt cuộn lớp bọc để lộ nút — backdrop trượt
275
+ // từ trái sang và panel giật thay vì trượt vào từ phải. `hidden` đứng trước chỉ là fallback.
276
+ // pointer-events: none để khi drawer đóng, nội dung bên dưới vẫn bấm được. `container` cho phép
277
+ // SCSS co giãn theo bề rộng vùng chứa (@container sd-side-drawer) thay vì theo viewport.
278
+ layer.style.cssText =
279
+ 'position: absolute; inset: 0; overflow: hidden; overflow: clip; pointer-events: none;' +
280
+ ' z-index: var(--sd-side-drawer-contained-z-index, 100); container: sd-side-drawer / inline-size;';
281
+ return layer;
282
+ }
283
+ /** Vùng chứa `static` được đặt `relative` để làm khung định vị cho lớp bọc; trả về hàm hoàn tác. */
284
+ #ensurePositioned(container) {
285
+ const view = this.#document.defaultView;
286
+ if (!view || view.getComputedStyle(container).position !== 'static')
287
+ return null;
288
+ const previous = container.style.position;
289
+ container.style.position = 'relative';
290
+ return () => {
291
+ container.style.position = previous;
292
+ };
293
+ }
185
294
  startLoading = () => {
186
295
  this.#isLoadingSignal.set(true);
187
296
  this.#loadingService.stop(`#${this.id}`);
@@ -210,12 +319,12 @@ class SdSideDrawer {
210
319
  this.isHovered$ = merge(mouseEnter$, mouseLeave$).pipe(startWith(false), distinctUntilChanged(), takeUntil(this.#destroy$));
211
320
  }
212
321
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdSideDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
213
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SdSideDrawer, isStandalone: true, selector: "sd-side-drawer", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, hideClose: { classPropertyName: "hideClose", publicName: "hideClose", isSignal: true, isRequired: false, transformFunction: null }, disableBackdropClose: { classPropertyName: "disableBackdropClose", publicName: "disableBackdropClose", isSignal: true, isRequired: false, transformFunction: null }, beforeClose: { classPropertyName: "beforeClose", publicName: "beforeClose", isSignal: true, isRequired: false, transformFunction: null }, drawerClass: { classPropertyName: "drawerClass", publicName: "drawerClass", isSignal: true, isRequired: false, transformFunction: null }, autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdCloseError: "sdCloseError" }, viewQueries: [{ propertyName: "portal", first: true, predicate: CdkPortal, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template cdkPortal>\n @let _isOpened = isOpened();\n <div\n [id]=\"id\"\n class=\"sd-side-drawer\"\n [ngStyle]=\"{ width: width() }\"\n [ngClass]=\"drawerClass()\"\n [class.sd-side-drawer-active]=\"_isOpened\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-opened]=\"dataOpened()\"\n [attr.data-loading]=\"dataLoading()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || null\"\n (keydown.escape)=\"$event.stopPropagation(); disableBackdropClose() ? null : close()\"\n #drawerContainer>\n @if (_isOpened) {\n <div class=\"sd-side-drawer-focus\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"true\">\n <div class=\"sd-side-drawer-header\">\n <div class=\"sd-side-drawer-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n <div class=\"sd-side-drawer-title\">{{ title() }}</div>\n </ng-content>\n </div>\n <div class=\"sd-side-drawer-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (!hideClose()) {\n <!-- why: aria-label=\"Close\" l\u00E0 chu\u1ED7i ti\u1EBFng Anh c\u1EE9ng trong m\u1ED9t th\u01B0 vi\u1EC7n \u0111\u00E3 c\u00F3 i18n. -->\n <button\n type=\"button\"\n class=\"sd-side-drawer-close-btn\"\n (click)=\"close()\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </div>\n </div>\n @if (_isOpened) {\n <div class=\"sd-side-drawer-body\">\n <div class=\"sd-side-drawer-content\">\n <ng-content></ng-content>\n </div>\n </div>\n }\n <div class=\"sd-side-drawer-footer\">\n <div class=\"sd-side-drawer-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-side-drawer-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n </div>\n }\n </div>\n <!-- why: backdrop l\u00E0 l\u1EDBp ph\u1EE7 b\u1EAFt click thu\u1EA7n trang tr\u00ED, kh\u00F4ng c\u00F3 n\u1ED9i dung \u2014 nh\u01B0ng aria-hidden\n kh\u00F4ng ph\u1EA3i l\u00E0 c\u00E1ch khai b\u00E1o \u0111\u00FAng cho n\u00F3. `role=\"presentation\"` m\u1EDBi l\u00E0 t\u00EDn hi\u1EC7u ch\u00EDnh x\u00E1c\n (ph\u1EA7n t\u1EED n\u00E0y kh\u00F4ng mang ng\u1EEF ngh\u0129a), v\u00E0 quan tr\u1ECDng h\u01A1n: tr\u01B0\u1EDBc \u0111\u00E2y \"\u0111\u00F3ng b\u1EB1ng c\u00E1ch click ra\n ngo\u00E0i\" KH\u00D4NG c\u00F3 t\u01B0\u01A1ng \u0111\u01B0\u01A1ng b\u00E0n ph\u00EDm n\u00E0o c\u1EA3. Escape \u0111\u01B0\u1EE3c th\u00EAm \u1EDF drawer container. -->\n @if (_isOpened) {\n <div\n role=\"presentation\"\n class=\"sd-side-drawer-backdrop\"\n (click)=\"disableBackdropClose() ? null : close()\"\n (wheel)=\"preventScroll($event)\"\n (touchmove)=\"preventScroll($event)\"></div>\n }\n</ng-template>\n", styles: [".sd-side-drawer{--sd-side-drawer-inset: 10px;--sd-side-drawer-radius: var(--sd-overlay-radius, 8px);--sd-side-drawer-surface: var(--sd-surface, #fff);--sd-side-drawer-border: var(--sd-border, #dde0e5);--sd-side-drawer-shadow: 0 6px 18px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .12);position:fixed;right:var(--sd-side-drawer-inset);top:var(--sd-side-drawer-inset);bottom:var(--sd-side-drawer-inset);max-width:calc(100vw - var(--sd-side-drawer-inset) - var(--sd-side-drawer-inset));background-color:var(--sd-side-drawer-surface);color:var(--sd-text);z-index:999;display:flex;flex-direction:column;opacity:0;visibility:hidden;transform:translate3d(calc(100% + var(--sd-side-drawer-inset)),0,0);transition:transform .18s ease,opacity .18s ease,visibility 0s linear .18s;pointer-events:none;overflow:hidden;border-radius:var(--sd-side-drawer-radius);box-shadow:var(--sd-side-drawer-shadow)}.sd-side-drawer-active{transition-delay:0s;opacity:1;visibility:visible;pointer-events:all;transform:translateZ(0)}.sd-side-drawer-header{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-side-drawer-header-left{display:flex;align-items:center;flex:1 1 auto;min-width:0}.sd-side-drawer-header-right{display:flex;align-items:center;gap:8px;flex:0 0 auto}.sd-side-drawer-title{font-size:20px;line-height:28px;font-weight:500;min-width:0}.sd-side-drawer-close-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--sd-text-secondary);line-height:0;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color 80ms ease,color 80ms ease}.sd-side-drawer-close-btn:hover{background:var(--sd-surface-muted);color:var(--sd-text)}.sd-side-drawer-close-btn:active{background:var(--sd-border)}.sd-side-drawer-close-btn:focus{outline:none}.sd-side-drawer-close-btn:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-side-drawer-close-btn sd-icon{display:block;width:20px;height:20px;font-size:20px;line-height:20px}.sd-side-drawer-body{flex:1;position:relative}.sd-side-drawer-content{position:absolute;padding:0;inset:0;overflow:auto}.sd-side-drawer-footer{border-top:1px solid var(--sd-side-drawer-border);display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{display:flex;align-items:center;gap:8px;min-width:0}.sd-side-drawer-footer-left{flex:1 1 auto}.sd-side-drawer-footer-right{flex:0 0 auto;margin-left:auto;justify-content:flex-end}.sd-side-drawer-footer-left:empty,.sd-side-drawer-footer-right:empty{display:none}.sd-side-drawer-footer:has(.sd-side-drawer-footer-left:empty):has(.sd-side-drawer-footer-right:empty){display:none}.sd-side-drawer-backdrop{background-color:#0006;border:0;outline:none!important;position:fixed;inset:0;z-index:99;width:100%;height:100%;transition:all .3s ease-in-out}.sd-side-drawer-focus{display:flex;flex-direction:column;flex:1;min-height:0}.sd-side-drawer-title{font-size:18px;line-height:25px;font-weight:600;overflow-wrap:anywhere}.sd-side-drawer-header,.sd-side-drawer-footer{flex-shrink:0;padding:12px 16px;background-color:var(--sd-white, #fff)}.sd-side-drawer-content{padding:12px 16px}@media(max-width:600px){.sd-side-drawer{--sd-side-drawer-inset: 8px}.sd-side-drawer-header{gap:8px}.sd-side-drawer-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));flex-wrap:wrap;gap:8px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{flex-wrap:wrap}.sd-side-drawer-close-btn{width:44px;height:44px}::ng-deep .sd-side-drawer-footer button{min-height:44px}}@media(prefers-reduced-motion:reduce){.sd-side-drawer,.sd-side-drawer-backdrop,.sd-side-drawer-close-btn{transition:none}}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2.CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
322
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SdSideDrawer, isStandalone: true, selector: "sd-side-drawer", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, hideClose: { classPropertyName: "hideClose", publicName: "hideClose", isSignal: true, isRequired: false, transformFunction: null }, disableBackdropClose: { classPropertyName: "disableBackdropClose", publicName: "disableBackdropClose", isSignal: true, isRequired: false, transformFunction: null }, beforeClose: { classPropertyName: "beforeClose", publicName: "beforeClose", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, drawerClass: { classPropertyName: "drawerClass", publicName: "drawerClass", isSignal: true, isRequired: false, transformFunction: null }, autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdCloseError: "sdCloseError" }, viewQueries: [{ propertyName: "portal", first: true, predicate: CdkPortal, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template cdkPortal>\n @let _isOpened = isOpened();\n @let _contained = contained();\n <div\n [id]=\"id\"\n class=\"sd-side-drawer\"\n [ngStyle]=\"{ width: width() }\"\n [ngClass]=\"drawerClass()\"\n [class.sd-side-drawer-active]=\"_isOpened\"\n [class.sd-side-drawer-contained]=\"_contained\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-opened]=\"dataOpened()\"\n [attr.data-loading]=\"dataLoading()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || null\"\n (keydown.escape)=\"$event.stopPropagation(); disableBackdropClose() ? null : close()\"\n #drawerContainer>\n @if (_isOpened) {\n <div class=\"sd-side-drawer-focus\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"true\">\n <div class=\"sd-side-drawer-header\">\n <div class=\"sd-side-drawer-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n <div class=\"sd-side-drawer-title\">{{ title() }}</div>\n </ng-content>\n </div>\n <div class=\"sd-side-drawer-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (!hideClose()) {\n <!-- why: aria-label=\"Close\" l\u00E0 chu\u1ED7i ti\u1EBFng Anh c\u1EE9ng trong m\u1ED9t th\u01B0 vi\u1EC7n \u0111\u00E3 c\u00F3 i18n. -->\n <button\n type=\"button\"\n class=\"sd-side-drawer-close-btn\"\n (click)=\"close()\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </div>\n </div>\n @if (_isOpened) {\n <div class=\"sd-side-drawer-body\">\n <div class=\"sd-side-drawer-content\">\n <ng-content></ng-content>\n </div>\n </div>\n }\n <div class=\"sd-side-drawer-footer\">\n <div class=\"sd-side-drawer-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-side-drawer-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n </div>\n }\n </div>\n <!-- why: backdrop l\u00E0 l\u1EDBp ph\u1EE7 b\u1EAFt click thu\u1EA7n trang tr\u00ED, kh\u00F4ng c\u00F3 n\u1ED9i dung \u2014 nh\u01B0ng aria-hidden\n kh\u00F4ng ph\u1EA3i l\u00E0 c\u00E1ch khai b\u00E1o \u0111\u00FAng cho n\u00F3. `role=\"presentation\"` m\u1EDBi l\u00E0 t\u00EDn hi\u1EC7u ch\u00EDnh x\u00E1c\n (ph\u1EA7n t\u1EED n\u00E0y kh\u00F4ng mang ng\u1EEF ngh\u0129a), v\u00E0 quan tr\u1ECDng h\u01A1n: tr\u01B0\u1EDBc \u0111\u00E2y \"\u0111\u00F3ng b\u1EB1ng c\u00E1ch click ra\n ngo\u00E0i\" KH\u00D4NG c\u00F3 t\u01B0\u01A1ng \u0111\u01B0\u01A1ng b\u00E0n ph\u00EDm n\u00E0o c\u1EA3. Escape \u0111\u01B0\u1EE3c th\u00EAm \u1EDF drawer container. -->\n @if (_isOpened) {\n <div\n role=\"presentation\"\n class=\"sd-side-drawer-backdrop\"\n [class.sd-side-drawer-backdrop-contained]=\"_contained\"\n (click)=\"disableBackdropClose() ? null : close()\"\n (wheel)=\"preventScroll($event)\"\n (touchmove)=\"preventScroll($event)\"></div>\n }\n</ng-template>\n", styles: [".sd-side-drawer{--sd-side-drawer-inset: 10px;--sd-side-drawer-radius: var(--sd-overlay-radius, 8px);--sd-side-drawer-surface: var(--sd-surface, #fff);--sd-side-drawer-border: var(--sd-border, #dde0e5);--sd-side-drawer-shadow: 0 6px 18px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .12);position:fixed;right:var(--sd-side-drawer-inset);top:var(--sd-side-drawer-inset);bottom:var(--sd-side-drawer-inset);max-width:calc(100vw - var(--sd-side-drawer-inset) - var(--sd-side-drawer-inset));background-color:var(--sd-side-drawer-surface);color:var(--sd-text);z-index:var(--sd-z-drawer, 999);display:flex;flex-direction:column;opacity:0;visibility:hidden;transform:translate3d(calc(100% + var(--sd-side-drawer-inset)),0,0);transition:transform .18s ease,opacity .18s ease,visibility 0s linear .18s;pointer-events:none;overflow:hidden;border-radius:var(--sd-side-drawer-radius);box-shadow:var(--sd-side-drawer-shadow)}.sd-side-drawer-active{transition-delay:0s;opacity:1;visibility:visible;pointer-events:all;transform:translateZ(0)}.sd-side-drawer-contained{position:absolute;max-width:calc(100% - var(--sd-side-drawer-inset) - var(--sd-side-drawer-inset))}.sd-side-drawer-header{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-side-drawer-header-left{display:flex;align-items:center;flex:1 1 auto;min-width:0}.sd-side-drawer-header-right{display:flex;align-items:center;gap:8px;flex:0 0 auto}.sd-side-drawer-title{font-size:var(--sd-font-size-20, 20px);line-height:var(--sd-line-height-28, 28px);font-weight:var(--sd-font-weight-medium, 500);min-width:0}.sd-side-drawer-close-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--sd-text-secondary);line-height:0;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color 80ms ease,color 80ms ease}.sd-side-drawer-close-btn:hover{background:var(--sd-surface-muted);color:var(--sd-text)}.sd-side-drawer-close-btn:active{background:var(--sd-border)}.sd-side-drawer-close-btn:focus{outline:none}.sd-side-drawer-close-btn:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-side-drawer-close-btn sd-icon{display:block;width:20px;height:20px;font-size:var(--sd-font-size-20, 20px);line-height:var(--sd-line-height-20, 20px)}.sd-side-drawer-body{flex:1;position:relative}.sd-side-drawer-content{position:absolute;padding:0;inset:0;overflow:auto}.sd-side-drawer-footer{border-top:1px solid var(--sd-side-drawer-border);display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{display:flex;align-items:center;gap:8px;min-width:0}.sd-side-drawer-footer-left{flex:1 1 auto}.sd-side-drawer-footer-right{flex:0 0 auto;margin-left:auto;justify-content:flex-end}.sd-side-drawer-footer-left:empty,.sd-side-drawer-footer-right:empty{display:none}.sd-side-drawer-footer:has(.sd-side-drawer-footer-left:empty):has(.sd-side-drawer-footer-right:empty){display:none}.sd-side-drawer-backdrop{background-color:#0006;border:0;outline:none!important;position:fixed;inset:0;z-index:var(--sd-z-floating, 99);width:100%;height:100%;transition:all var(--sd-duration-slow, .3s) ease-in-out}.sd-side-drawer-backdrop-contained{position:absolute;pointer-events:auto}.sd-side-drawer-focus{display:flex;flex-direction:column;flex:1;min-height:0}.sd-side-drawer-title{font-size:var(--sd-font-size-18, 18px);line-height:25px;font-weight:var(--sd-font-weight-semibold, 600);overflow-wrap:anywhere}.sd-side-drawer-header,.sd-side-drawer-footer{flex-shrink:0;padding:12px 16px;background-color:var(--sd-white, #fff)}.sd-side-drawer-content{padding:12px 16px}@media(max-width:600px){.sd-side-drawer{--sd-side-drawer-inset: 8px}.sd-side-drawer-header{gap:8px}.sd-side-drawer-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));flex-wrap:wrap;gap:8px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{flex-wrap:wrap}.sd-side-drawer-close-btn{width:44px;height:44px}::ng-deep .sd-side-drawer-footer button{min-height:44px}}@container sd-side-drawer (max-width: 600px){.sd-side-drawer{--sd-side-drawer-inset: 8px}.sd-side-drawer-header{gap:8px}.sd-side-drawer-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));flex-wrap:wrap;gap:8px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{flex-wrap:wrap}.sd-side-drawer-close-btn{width:44px;height:44px}::ng-deep .sd-side-drawer-footer button{min-height:44px}}@media(prefers-reduced-motion:reduce){.sd-side-drawer,.sd-side-drawer-backdrop,.sd-side-drawer-close-btn{transition:none}}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2.CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
214
323
  }
215
324
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdSideDrawer, decorators: [{
216
325
  type: Component,
217
- args: [{ selector: 'sd-side-drawer', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CdkTrapFocus, SdIcon, CommonModule, PortalModule, SdTranslatePipe], template: "<ng-template cdkPortal>\n @let _isOpened = isOpened();\n <div\n [id]=\"id\"\n class=\"sd-side-drawer\"\n [ngStyle]=\"{ width: width() }\"\n [ngClass]=\"drawerClass()\"\n [class.sd-side-drawer-active]=\"_isOpened\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-opened]=\"dataOpened()\"\n [attr.data-loading]=\"dataLoading()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || null\"\n (keydown.escape)=\"$event.stopPropagation(); disableBackdropClose() ? null : close()\"\n #drawerContainer>\n @if (_isOpened) {\n <div class=\"sd-side-drawer-focus\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"true\">\n <div class=\"sd-side-drawer-header\">\n <div class=\"sd-side-drawer-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n <div class=\"sd-side-drawer-title\">{{ title() }}</div>\n </ng-content>\n </div>\n <div class=\"sd-side-drawer-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (!hideClose()) {\n <!-- why: aria-label=\"Close\" l\u00E0 chu\u1ED7i ti\u1EBFng Anh c\u1EE9ng trong m\u1ED9t th\u01B0 vi\u1EC7n \u0111\u00E3 c\u00F3 i18n. -->\n <button\n type=\"button\"\n class=\"sd-side-drawer-close-btn\"\n (click)=\"close()\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </div>\n </div>\n @if (_isOpened) {\n <div class=\"sd-side-drawer-body\">\n <div class=\"sd-side-drawer-content\">\n <ng-content></ng-content>\n </div>\n </div>\n }\n <div class=\"sd-side-drawer-footer\">\n <div class=\"sd-side-drawer-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-side-drawer-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n </div>\n }\n </div>\n <!-- why: backdrop l\u00E0 l\u1EDBp ph\u1EE7 b\u1EAFt click thu\u1EA7n trang tr\u00ED, kh\u00F4ng c\u00F3 n\u1ED9i dung \u2014 nh\u01B0ng aria-hidden\n kh\u00F4ng ph\u1EA3i l\u00E0 c\u00E1ch khai b\u00E1o \u0111\u00FAng cho n\u00F3. `role=\"presentation\"` m\u1EDBi l\u00E0 t\u00EDn hi\u1EC7u ch\u00EDnh x\u00E1c\n (ph\u1EA7n t\u1EED n\u00E0y kh\u00F4ng mang ng\u1EEF ngh\u0129a), v\u00E0 quan tr\u1ECDng h\u01A1n: tr\u01B0\u1EDBc \u0111\u00E2y \"\u0111\u00F3ng b\u1EB1ng c\u00E1ch click ra\n ngo\u00E0i\" KH\u00D4NG c\u00F3 t\u01B0\u01A1ng \u0111\u01B0\u01A1ng b\u00E0n ph\u00EDm n\u00E0o c\u1EA3. Escape \u0111\u01B0\u1EE3c th\u00EAm \u1EDF drawer container. -->\n @if (_isOpened) {\n <div\n role=\"presentation\"\n class=\"sd-side-drawer-backdrop\"\n (click)=\"disableBackdropClose() ? null : close()\"\n (wheel)=\"preventScroll($event)\"\n (touchmove)=\"preventScroll($event)\"></div>\n }\n</ng-template>\n", styles: [".sd-side-drawer{--sd-side-drawer-inset: 10px;--sd-side-drawer-radius: var(--sd-overlay-radius, 8px);--sd-side-drawer-surface: var(--sd-surface, #fff);--sd-side-drawer-border: var(--sd-border, #dde0e5);--sd-side-drawer-shadow: 0 6px 18px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .12);position:fixed;right:var(--sd-side-drawer-inset);top:var(--sd-side-drawer-inset);bottom:var(--sd-side-drawer-inset);max-width:calc(100vw - var(--sd-side-drawer-inset) - var(--sd-side-drawer-inset));background-color:var(--sd-side-drawer-surface);color:var(--sd-text);z-index:999;display:flex;flex-direction:column;opacity:0;visibility:hidden;transform:translate3d(calc(100% + var(--sd-side-drawer-inset)),0,0);transition:transform .18s ease,opacity .18s ease,visibility 0s linear .18s;pointer-events:none;overflow:hidden;border-radius:var(--sd-side-drawer-radius);box-shadow:var(--sd-side-drawer-shadow)}.sd-side-drawer-active{transition-delay:0s;opacity:1;visibility:visible;pointer-events:all;transform:translateZ(0)}.sd-side-drawer-header{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-side-drawer-header-left{display:flex;align-items:center;flex:1 1 auto;min-width:0}.sd-side-drawer-header-right{display:flex;align-items:center;gap:8px;flex:0 0 auto}.sd-side-drawer-title{font-size:20px;line-height:28px;font-weight:500;min-width:0}.sd-side-drawer-close-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--sd-text-secondary);line-height:0;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color 80ms ease,color 80ms ease}.sd-side-drawer-close-btn:hover{background:var(--sd-surface-muted);color:var(--sd-text)}.sd-side-drawer-close-btn:active{background:var(--sd-border)}.sd-side-drawer-close-btn:focus{outline:none}.sd-side-drawer-close-btn:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-side-drawer-close-btn sd-icon{display:block;width:20px;height:20px;font-size:20px;line-height:20px}.sd-side-drawer-body{flex:1;position:relative}.sd-side-drawer-content{position:absolute;padding:0;inset:0;overflow:auto}.sd-side-drawer-footer{border-top:1px solid var(--sd-side-drawer-border);display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{display:flex;align-items:center;gap:8px;min-width:0}.sd-side-drawer-footer-left{flex:1 1 auto}.sd-side-drawer-footer-right{flex:0 0 auto;margin-left:auto;justify-content:flex-end}.sd-side-drawer-footer-left:empty,.sd-side-drawer-footer-right:empty{display:none}.sd-side-drawer-footer:has(.sd-side-drawer-footer-left:empty):has(.sd-side-drawer-footer-right:empty){display:none}.sd-side-drawer-backdrop{background-color:#0006;border:0;outline:none!important;position:fixed;inset:0;z-index:99;width:100%;height:100%;transition:all .3s ease-in-out}.sd-side-drawer-focus{display:flex;flex-direction:column;flex:1;min-height:0}.sd-side-drawer-title{font-size:18px;line-height:25px;font-weight:600;overflow-wrap:anywhere}.sd-side-drawer-header,.sd-side-drawer-footer{flex-shrink:0;padding:12px 16px;background-color:var(--sd-white, #fff)}.sd-side-drawer-content{padding:12px 16px}@media(max-width:600px){.sd-side-drawer{--sd-side-drawer-inset: 8px}.sd-side-drawer-header{gap:8px}.sd-side-drawer-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));flex-wrap:wrap;gap:8px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{flex-wrap:wrap}.sd-side-drawer-close-btn{width:44px;height:44px}::ng-deep .sd-side-drawer-footer button{min-height:44px}}@media(prefers-reduced-motion:reduce){.sd-side-drawer,.sd-side-drawer-backdrop,.sd-side-drawer-close-btn{transition:none}}\n"] }]
218
- }], ctorParameters: () => [], propDecorators: { portal: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortal), { isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], hideClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideClose", required: false }] }], disableBackdropClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBackdropClose", required: false }] }], beforeClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "beforeClose", required: false }] }], drawerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerClass", required: false }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], sdClosed: [{ type: i0.Output, args: ["sdClosed"] }], sdCloseError: [{ type: i0.Output, args: ["sdCloseError"] }] } });
326
+ args: [{ selector: 'sd-side-drawer', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CdkTrapFocus, SdIcon, CommonModule, PortalModule, SdTranslatePipe], template: "<ng-template cdkPortal>\n @let _isOpened = isOpened();\n @let _contained = contained();\n <div\n [id]=\"id\"\n class=\"sd-side-drawer\"\n [ngStyle]=\"{ width: width() }\"\n [ngClass]=\"drawerClass()\"\n [class.sd-side-drawer-active]=\"_isOpened\"\n [class.sd-side-drawer-contained]=\"_contained\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-opened]=\"dataOpened()\"\n [attr.data-loading]=\"dataLoading()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || null\"\n (keydown.escape)=\"$event.stopPropagation(); disableBackdropClose() ? null : close()\"\n #drawerContainer>\n @if (_isOpened) {\n <div class=\"sd-side-drawer-focus\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"true\">\n <div class=\"sd-side-drawer-header\">\n <div class=\"sd-side-drawer-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n <div class=\"sd-side-drawer-title\">{{ title() }}</div>\n </ng-content>\n </div>\n <div class=\"sd-side-drawer-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (!hideClose()) {\n <!-- why: aria-label=\"Close\" l\u00E0 chu\u1ED7i ti\u1EBFng Anh c\u1EE9ng trong m\u1ED9t th\u01B0 vi\u1EC7n \u0111\u00E3 c\u00F3 i18n. -->\n <button\n type=\"button\"\n class=\"sd-side-drawer-close-btn\"\n (click)=\"close()\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </div>\n </div>\n @if (_isOpened) {\n <div class=\"sd-side-drawer-body\">\n <div class=\"sd-side-drawer-content\">\n <ng-content></ng-content>\n </div>\n </div>\n }\n <div class=\"sd-side-drawer-footer\">\n <div class=\"sd-side-drawer-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-side-drawer-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n </div>\n }\n </div>\n <!-- why: backdrop l\u00E0 l\u1EDBp ph\u1EE7 b\u1EAFt click thu\u1EA7n trang tr\u00ED, kh\u00F4ng c\u00F3 n\u1ED9i dung \u2014 nh\u01B0ng aria-hidden\n kh\u00F4ng ph\u1EA3i l\u00E0 c\u00E1ch khai b\u00E1o \u0111\u00FAng cho n\u00F3. `role=\"presentation\"` m\u1EDBi l\u00E0 t\u00EDn hi\u1EC7u ch\u00EDnh x\u00E1c\n (ph\u1EA7n t\u1EED n\u00E0y kh\u00F4ng mang ng\u1EEF ngh\u0129a), v\u00E0 quan tr\u1ECDng h\u01A1n: tr\u01B0\u1EDBc \u0111\u00E2y \"\u0111\u00F3ng b\u1EB1ng c\u00E1ch click ra\n ngo\u00E0i\" KH\u00D4NG c\u00F3 t\u01B0\u01A1ng \u0111\u01B0\u01A1ng b\u00E0n ph\u00EDm n\u00E0o c\u1EA3. Escape \u0111\u01B0\u1EE3c th\u00EAm \u1EDF drawer container. -->\n @if (_isOpened) {\n <div\n role=\"presentation\"\n class=\"sd-side-drawer-backdrop\"\n [class.sd-side-drawer-backdrop-contained]=\"_contained\"\n (click)=\"disableBackdropClose() ? null : close()\"\n (wheel)=\"preventScroll($event)\"\n (touchmove)=\"preventScroll($event)\"></div>\n }\n</ng-template>\n", styles: [".sd-side-drawer{--sd-side-drawer-inset: 10px;--sd-side-drawer-radius: var(--sd-overlay-radius, 8px);--sd-side-drawer-surface: var(--sd-surface, #fff);--sd-side-drawer-border: var(--sd-border, #dde0e5);--sd-side-drawer-shadow: 0 6px 18px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .12);position:fixed;right:var(--sd-side-drawer-inset);top:var(--sd-side-drawer-inset);bottom:var(--sd-side-drawer-inset);max-width:calc(100vw - var(--sd-side-drawer-inset) - var(--sd-side-drawer-inset));background-color:var(--sd-side-drawer-surface);color:var(--sd-text);z-index:var(--sd-z-drawer, 999);display:flex;flex-direction:column;opacity:0;visibility:hidden;transform:translate3d(calc(100% + var(--sd-side-drawer-inset)),0,0);transition:transform .18s ease,opacity .18s ease,visibility 0s linear .18s;pointer-events:none;overflow:hidden;border-radius:var(--sd-side-drawer-radius);box-shadow:var(--sd-side-drawer-shadow)}.sd-side-drawer-active{transition-delay:0s;opacity:1;visibility:visible;pointer-events:all;transform:translateZ(0)}.sd-side-drawer-contained{position:absolute;max-width:calc(100% - var(--sd-side-drawer-inset) - var(--sd-side-drawer-inset))}.sd-side-drawer-header{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-side-drawer-header-left{display:flex;align-items:center;flex:1 1 auto;min-width:0}.sd-side-drawer-header-right{display:flex;align-items:center;gap:8px;flex:0 0 auto}.sd-side-drawer-title{font-size:var(--sd-font-size-20, 20px);line-height:var(--sd-line-height-28, 28px);font-weight:var(--sd-font-weight-medium, 500);min-width:0}.sd-side-drawer-close-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--sd-text-secondary);line-height:0;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color 80ms ease,color 80ms ease}.sd-side-drawer-close-btn:hover{background:var(--sd-surface-muted);color:var(--sd-text)}.sd-side-drawer-close-btn:active{background:var(--sd-border)}.sd-side-drawer-close-btn:focus{outline:none}.sd-side-drawer-close-btn:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-side-drawer-close-btn sd-icon{display:block;width:20px;height:20px;font-size:var(--sd-font-size-20, 20px);line-height:var(--sd-line-height-20, 20px)}.sd-side-drawer-body{flex:1;position:relative}.sd-side-drawer-content{position:absolute;padding:0;inset:0;overflow:auto}.sd-side-drawer-footer{border-top:1px solid var(--sd-side-drawer-border);display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{display:flex;align-items:center;gap:8px;min-width:0}.sd-side-drawer-footer-left{flex:1 1 auto}.sd-side-drawer-footer-right{flex:0 0 auto;margin-left:auto;justify-content:flex-end}.sd-side-drawer-footer-left:empty,.sd-side-drawer-footer-right:empty{display:none}.sd-side-drawer-footer:has(.sd-side-drawer-footer-left:empty):has(.sd-side-drawer-footer-right:empty){display:none}.sd-side-drawer-backdrop{background-color:#0006;border:0;outline:none!important;position:fixed;inset:0;z-index:var(--sd-z-floating, 99);width:100%;height:100%;transition:all var(--sd-duration-slow, .3s) ease-in-out}.sd-side-drawer-backdrop-contained{position:absolute;pointer-events:auto}.sd-side-drawer-focus{display:flex;flex-direction:column;flex:1;min-height:0}.sd-side-drawer-title{font-size:var(--sd-font-size-18, 18px);line-height:25px;font-weight:var(--sd-font-weight-semibold, 600);overflow-wrap:anywhere}.sd-side-drawer-header,.sd-side-drawer-footer{flex-shrink:0;padding:12px 16px;background-color:var(--sd-white, #fff)}.sd-side-drawer-content{padding:12px 16px}@media(max-width:600px){.sd-side-drawer{--sd-side-drawer-inset: 8px}.sd-side-drawer-header{gap:8px}.sd-side-drawer-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));flex-wrap:wrap;gap:8px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{flex-wrap:wrap}.sd-side-drawer-close-btn{width:44px;height:44px}::ng-deep .sd-side-drawer-footer button{min-height:44px}}@container sd-side-drawer (max-width: 600px){.sd-side-drawer{--sd-side-drawer-inset: 8px}.sd-side-drawer-header{gap:8px}.sd-side-drawer-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));flex-wrap:wrap;gap:8px}.sd-side-drawer-footer-left,.sd-side-drawer-footer-right{flex-wrap:wrap}.sd-side-drawer-close-btn{width:44px;height:44px}::ng-deep .sd-side-drawer-footer button{min-height:44px}}@media(prefers-reduced-motion:reduce){.sd-side-drawer,.sd-side-drawer-backdrop,.sd-side-drawer-close-btn{transition:none}}\n"] }]
327
+ }], ctorParameters: () => [], propDecorators: { portal: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortal), { isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], hideClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideClose", required: false }] }], disableBackdropClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBackdropClose", required: false }] }], beforeClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "beforeClose", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }], drawerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerClass", required: false }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], sdClosed: [{ type: i0.Output, args: ["sdClosed"] }], sdCloseError: [{ type: i0.Output, args: ["sdCloseError"] }] } });
219
328
 
220
329
  /**
221
330
  * Generated bundle index. Do not edit.