@sdcorejs/angular 22.2.14 → 22.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 +24 -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 +10 -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 +2735 -0
  48. package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -0
  49. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +6191 -6611
  50. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  51. package/fesm2022/sdcorejs-angular-components-highlight.mjs +66 -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 +2158 -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 +11 -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 +144 -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 +13 -7
  82. package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
  83. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +121 -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 +100 -13
  102. package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
  103. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +154 -6
  104. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  105. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +20 -4
  106. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  107. package/fesm2022/sdcorejs-angular-forms-chip.mjs +20 -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 +18 -7
  112. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  113. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +18 -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 +20 -4
  122. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  123. package/fesm2022/sdcorejs-angular-forms-input.mjs +31 -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 +509 -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 +21 -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 +1860 -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 +198 -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 +109 -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: "22.1.5", ngImport: i0, type: SdQuickAction, deps: [], target: i0.ɵɵFactoryTarget.Component });
12
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", 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: "22.1.5", 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: "22.1.5", 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;uGANvD,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,QAAA,EAAA,IAAA,EAAA,aAAa,sVCT1B,yVAQA,EAAA,MAAA,EAAA,CAAA,k/BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDCa,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;uGANvD,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,QAAA,EAAA,IAAA,EAAA,aAAa,sVCT1B,yVAQA,EAAA,MAAA,EAAA,CAAA,qoCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDCa,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, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { SdIcon } from '@sdcorejs/angular/modules/icon';
2
+ import { inject, ElementRef, input, model, booleanAttribute, computed, effect, ChangeDetectionStrategy, 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]';
@@ -15,9 +15,15 @@ class SdSection {
15
15
  icon = input(undefined, /* @ts-ignore */
16
16
  ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
17
17
  iconColor = input('primary', { ...(ngDevMode ? { debugName: "iconColor" } : /* istanbul ignore next */ {}), alias: 'iconColor' });
18
+ /** Hình nền ô icon header; bỏ trống thì dùng `defaultShape` của `provideSdIcon` (mặc định `square`). */
19
+ iconShape = input(undefined, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "iconShape" }] : /* istanbul ignore next */ []));
18
21
  collapsed = model(false, { ...(ngDevMode ? { debugName: "collapsed" } : /* istanbul ignore next */ {}), alias: 'collapsed' });
19
22
  collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
20
23
  hideHeader = input(false, { ...(ngDevMode ? { debugName: "hideHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
24
+ #iconConfig = inject(SD_ICON_CONFIGURATION);
25
+ resolvedIconShape = computed(() => this.iconShape() ?? this.#iconConfig.defaultShape, /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "resolvedIconShape" }] : /* istanbul ignore next */ []));
21
27
  /** Id của vùng body, để header `aria-controls` trỏ tới khi section collapsible. */
22
28
  bodyId = `sd-section-body-${++sectionBodyIdSeq}`;
23
29
  constructor() {
@@ -61,14 +67,14 @@ class SdSection {
61
67
  this.toggleCollapse();
62
68
  };
63
69
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
64
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
70
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
65
71
  }
66
72
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSection, decorators: [{
67
73
  type: Component,
68
74
  args: [{ changeDetection: ChangeDetectionStrategy.Eager, selector: 'sd-section', imports: [SdIcon, SdTranslatePipe], host: {
69
75
  '(click)': 'onHeaderClick($event)',
70
- }, 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"] }]
71
- }], 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 }] }] } });
76
+ }, 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"] }]
77
+ }], 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 }] }] } });
72
78
 
73
79
  class SdSectionItem {
74
80
  label = input.required(/* @ts-ignore */
@@ -77,11 +83,11 @@ class SdSectionItem {
77
83
  return val || '150px';
78
84
  } });
79
85
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSectionItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
80
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", 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"], changeDetection: i0.ChangeDetectionStrategy.Eager });
86
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", 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"], changeDetection: i0.ChangeDetectionStrategy.Eager });
81
87
  }
82
88
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSectionItem, decorators: [{
83
89
  type: Component,
84
- args: [{ changeDetection: ChangeDetectionStrategy.Eager, 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"] }]
90
+ args: [{ changeDetection: ChangeDetectionStrategy.Eager, 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"] }]
85
91
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }] } });
86
92
 
87
93
  /**
@@ -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 { ChangeDetectionStrategy as SdAngular22ChangeDetectionStrategy } from '@angular/core';\nimport { 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 changeDetection: SdAngular22ChangeDetectionStrategy.Eager,\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 { ChangeDetectionStrategy as SdAngular22ChangeDetectionStrategy } from '@angular/core';\nimport { Component, input } from '@angular/core';\n\n@Component({\n changeDetection: SdAngular22ChangeDetectionStrategy.Eager,\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":["SdAngular22ChangeDetectionStrategy"],"mappings":"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"}
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 { ChangeDetectionStrategy as SdAngular22ChangeDetectionStrategy } from '@angular/core';\nimport { 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 changeDetection: SdAngular22ChangeDetectionStrategy.Eager,\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 { ChangeDetectionStrategy as SdAngular22ChangeDetectionStrategy } from '@angular/core';\nimport { Component, input } from '@angular/core';\n\n@Component({\n changeDetection: SdAngular22ChangeDetectionStrategy.Eager,\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":["SdAngular22ChangeDetectionStrategy"],"mappings":"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"}
@@ -4,7 +4,7 @@ import { CdkPortal, DomPortalOutlet, PortalModule } from '@angular/cdk/portal';
4
4
  import * as i1 from '@angular/common';
5
5
  import { 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: "22.1.5", ngImport: i0, type: SdBodyScrollLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
64
88
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdBodyScrollLockService, providedIn: 'root' });
@@ -80,6 +104,14 @@ class SdSideDrawer {
80
104
  disableBackdropClose = input(false, { ...(ngDevMode ? { debugName: "disableBackdropClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
81
105
  beforeClose = input(undefined, /* @ts-ignore */
82
106
  ...(ngDevMode ? [{ debugName: "beforeClose" }] : /* istanbul ignore next */ []));
107
+ /**
108
+ * Element the drawer opens inside, for example a template reference: `[container]="area"`.
109
+ * Panel and backdrop then cover only that element and page scroll stays unlocked; a statically
110
+ * positioned container becomes `position: relative` while the drawer lives in it.
111
+ * `null` (default): the drawer covers the viewport.
112
+ */
113
+ container = input(null, /* @ts-ignore */
114
+ ...(ngDevMode ? [{ debugName: "container" }] : /* istanbul ignore next */ []));
83
115
  // Custom CSS class added to the root side-drawer container
84
116
  drawerClass = input('', /* @ts-ignore */
85
117
  ...(ngDevMode ? [{ debugName: "drawerClass" }] : /* istanbul ignore next */ []));
@@ -99,12 +131,23 @@ class SdSideDrawer {
99
131
  ...(ngDevMode ? [{ debugName: "dataOpened" }] : /* istanbul ignore next */ []));
100
132
  dataLoading = computed(() => (this.#isLoadingSignal() ? 'true' : 'false'), /* @ts-ignore */
101
133
  ...(ngDevMode ? [{ debugName: "dataLoading" }] : /* istanbul ignore next */ []));
134
+ #containerElement = computed(() => {
135
+ const container = this.container();
136
+ return container instanceof ElementRef ? container.nativeElement : (container ?? null);
137
+ }, /* @ts-ignore */
138
+ ...(ngDevMode ? [{ debugName: "#containerElement" }] : /* istanbul ignore next */ []));
139
+ contained = computed(() => this.#containerElement() !== null, /* @ts-ignore */
140
+ ...(ngDevMode ? [{ debugName: "contained" }] : /* istanbul ignore next */ []));
102
141
  isHovered$;
103
142
  #destroy$ = new Subject();
104
143
  // Instance này có đang giữ 1 khoá scroll hay không — giữ cho lock/release luôn cân bằng
105
144
  // dù open()/close() bị gọi lặp.
106
145
  #holdsScrollLock = false;
107
146
  #closeRequest;
147
+ // Lớp bọc do drawer tự tạo trong [container]; null khi drawer nằm ở body.
148
+ #layer = null;
149
+ #placedIn = null;
150
+ #restoreContainerPosition = null;
108
151
  #viewContainerRef = inject(ViewContainerRef);
109
152
  #ar = inject(ApplicationRef);
110
153
  #injector = inject(Injector);
@@ -112,15 +155,27 @@ class SdSideDrawer {
112
155
  #loadingService = inject(SdLoadingService);
113
156
  #destroyRef = inject(DestroyRef);
114
157
  #scrollLock = inject(SdBodyScrollLockService);
158
+ #document = inject(DOCUMENT);
115
159
  constructor() {
116
160
  // Thay thế ngAfterViewInit, tự động chạy nội dung này khi DOM sẵn sàng để render
117
161
  afterNextRender(() => {
118
162
  // 1. Gắn portal vào body và lưu lại EmbeddedViewRef
119
163
  const outlet = new DomPortalOutlet(document.body, this.#ar, this.#injector);
120
164
  this.#embeddedViewRef = outlet.attachTemplatePortal(this.portal());
121
- // 2. Setup sự kiện hover ngay sau khi DOM thật đã được in ra
165
+ // 2. Có [container] thì chuyển DOM của drawer vào vùng chứa đó
166
+ this.#place(this.#containerElement());
167
+ // 3. Setup sự kiện hover ngay sau khi DOM thật đã được in ra
122
168
  this.#setupHoverSubscription();
123
169
  });
170
+ // [container] đổi sau khi portal đã gắn: chuyển DOM sang vùng mới và cân lại khoá scroll body.
171
+ effect(() => {
172
+ const container = this.#containerElement();
173
+ untracked(() => {
174
+ if (this.#embeddedViewRef)
175
+ this.#place(container);
176
+ this.#syncScrollLock();
177
+ });
178
+ });
124
179
  // Thay thế ngOnDestroy bằng logic destroy trực tiếp
125
180
  this.#destroyRef.onDestroy(() => {
126
181
  this.#destroy$.next();
@@ -128,6 +183,9 @@ class SdSideDrawer {
128
183
  if (this.#embeddedViewRef) {
129
184
  this.#embeddedViewRef.destroy();
130
185
  }
186
+ // Drawer trong [container]: gỡ lớp bọc và trả lại position ban đầu của vùng chứa.
187
+ this.#layer?.remove();
188
+ this.#restoreContainerPosition?.();
131
189
  // 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.
132
190
  this.#releaseScrollLock();
133
191
  });
@@ -135,8 +193,9 @@ class SdSideDrawer {
135
193
  open = () => {
136
194
  this.#ref.markForCheck();
137
195
  this.#isOpenedSignal.set(true);
138
- // Chặn scroll ở document body qua khoá ref-count dùng chung (stack-safe với drawer lồng nhau)
139
- this.#acquireScrollLock();
196
+ // Chặn scroll ở document body qua khoá ref-count dùng chung (stack-safe với drawer lồng nhau).
197
+ // Drawer mở trong [container] không khoá: phần còn lại của trang vẫn dùng được.
198
+ this.#syncScrollLock();
140
199
  };
141
200
  close = () => {
142
201
  if (this.beforeClose()) {
@@ -180,6 +239,12 @@ class SdSideDrawer {
180
239
  // 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á)
181
240
  this.#releaseScrollLock();
182
241
  };
242
+ #syncScrollLock() {
243
+ if (this.#isOpenedSignal() && !this.contained())
244
+ this.#acquireScrollLock();
245
+ else
246
+ this.#releaseScrollLock();
247
+ }
183
248
  #acquireScrollLock() {
184
249
  if (this.#holdsScrollLock)
185
250
  return;
@@ -192,6 +257,53 @@ class SdSideDrawer {
192
257
  this.#holdsScrollLock = false;
193
258
  this.#scrollLock.release();
194
259
  }
260
+ /** Chuyển DOM của drawer vào `container`, hoặc về lại `<body>` khi `null`. */
261
+ #place(container) {
262
+ if (container === this.#placedIn)
263
+ return;
264
+ const nodes = this.#embeddedViewRef.rootNodes;
265
+ this.#restoreContainerPosition?.();
266
+ this.#restoreContainerPosition = null;
267
+ this.#placedIn = container;
268
+ if (!container) {
269
+ for (const node of nodes)
270
+ this.#document.body.appendChild(node);
271
+ this.#layer?.remove();
272
+ this.#layer = null;
273
+ return;
274
+ }
275
+ this.#layer ??= this.#createLayer();
276
+ container.appendChild(this.#layer);
277
+ for (const node of nodes)
278
+ this.#layer.appendChild(node);
279
+ this.#restoreContainerPosition = this.#ensurePositioned(container);
280
+ }
281
+ #createLayer() {
282
+ const layer = this.#document.createElement('div');
283
+ layer.className = 'sd-side-drawer-layer';
284
+ // 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.
285
+ // Phủ đúng vùng chứa và cắt phần panel đang trượt (không đẩy thanh cuộn ngang ra trang).
286
+ // `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
287
+ // 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
288
+ // từ trái sang và panel giật thay vì trượt vào từ phải. `hidden` đứng trước chỉ là fallback.
289
+ // pointer-events: none để khi drawer đóng, nội dung bên dưới vẫn bấm được. `container` cho phép
290
+ // SCSS co giãn theo bề rộng vùng chứa (@container sd-side-drawer) thay vì theo viewport.
291
+ layer.style.cssText =
292
+ 'position: absolute; inset: 0; overflow: hidden; overflow: clip; pointer-events: none;' +
293
+ ' z-index: var(--sd-side-drawer-contained-z-index, 100); container: sd-side-drawer / inline-size;';
294
+ return layer;
295
+ }
296
+ /** 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. */
297
+ #ensurePositioned(container) {
298
+ const view = this.#document.defaultView;
299
+ if (!view || view.getComputedStyle(container).position !== 'static')
300
+ return null;
301
+ const previous = container.style.position;
302
+ container.style.position = 'relative';
303
+ return () => {
304
+ container.style.position = previous;
305
+ };
306
+ }
195
307
  startLoading = () => {
196
308
  this.#isLoadingSignal.set(true);
197
309
  this.#loadingService.stop(`#${this.id}`);
@@ -220,12 +332,12 @@ class SdSideDrawer {
220
332
  this.isHovered$ = merge(mouseEnter$, mouseLeave$).pipe(startWith(false), distinctUntilChanged(), takeUntil(this.#destroy$));
221
333
  }
222
334
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSideDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
223
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
335
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
224
336
  }
225
337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSideDrawer, decorators: [{
226
338
  type: Component,
227
- 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"] }]
228
- }], 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"] }] } });
339
+ 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"] }]
340
+ }], 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"] }] } });
229
341
 
230
342
  /**
231
343
  * Generated bundle index. Do not edit.