@ngx-smz/ui-kit 21.10.0-next.1 → 21.10.0-next.10

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.
@@ -1944,7 +1944,9 @@ class SmzDialogComponent {
1944
1944
  hidden = output();
1945
1945
  panel = viewChild.required('panel');
1946
1946
  templates = contentChildren(SmzTemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : []));
1947
+ /** `header`: acoes extras na barra padrao (titulo, maximizar e fechar permanecem). `headerFull`: substitui a barra inteira. */
1947
1948
  headerTemplate = computed(() => smzFindTemplate(this.templates(), 'header'), ...(ngDevMode ? [{ debugName: "headerTemplate" }] : []));
1949
+ headerFullTemplate = computed(() => smzFindTemplate(this.templates(), 'headerFull'), ...(ngDevMode ? [{ debugName: "headerFullTemplate" }] : []));
1948
1950
  footerTemplate = computed(() => smzFindTemplate(this.templates(), 'footer'), ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
1949
1951
  overlay = inject(Overlay);
1950
1952
  viewContainer = inject(ViewContainerRef);
@@ -2076,15 +2078,23 @@ class SmzDialogComponent {
2076
2078
  [style.height]="!maximized() && sizing().pane.height ? '100%' : null"
2077
2079
  [style.transform]="maximized() || (dx() === 0 && dy() === 0) ? null : 'translate(' + dx() + 'px, ' + dy() + 'px)'"
2078
2080
  >
2079
- @if (headerTemplate(); as headerTpl) {
2081
+ @if (headerFullTemplate(); as fullTpl) {
2080
2082
  <div class="border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
2081
- <ng-container [ngTemplateOutlet]="headerTpl" />
2083
+ <ng-container [ngTemplateOutlet]="fullTpl" />
2082
2084
  </div>
2083
2085
  }
2084
- @else if (header() || closable()) {
2086
+ @else if (header() || headerTemplate() || closable() || maximizable()) {
2085
2087
  <div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
2086
- <span class="text-ui-lg font-medium">{{ header() }}</span>
2087
- <div class="flex items-center gap-1">
2088
+ @if (header()) {
2089
+ <span class="shrink-0 text-ui-lg font-medium">{{ header() }}</span>
2090
+ }
2091
+ <!-- smzTemplate="header": acoes extras ao lado do titulo; maximizar/restaurar e fechar continuam na barra. -->
2092
+ <div class="flex min-w-0 flex-1 items-center gap-2">
2093
+ @if (headerTemplate(); as headerTpl) {
2094
+ <ng-container [ngTemplateOutlet]="headerTpl" />
2095
+ }
2096
+ </div>
2097
+ <div class="flex shrink-0 items-center gap-1">
2088
2098
  @if (maximizable()) {
2089
2099
  <button type="button" class="inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [attr.aria-label]="maximized() ? 'Restaurar' : 'Maximizar'" (click)="maximize()">
2090
2100
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">
@@ -2136,15 +2146,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
2136
2146
  [style.height]="!maximized() && sizing().pane.height ? '100%' : null"
2137
2147
  [style.transform]="maximized() || (dx() === 0 && dy() === 0) ? null : 'translate(' + dx() + 'px, ' + dy() + 'px)'"
2138
2148
  >
2139
- @if (headerTemplate(); as headerTpl) {
2149
+ @if (headerFullTemplate(); as fullTpl) {
2140
2150
  <div class="border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
2141
- <ng-container [ngTemplateOutlet]="headerTpl" />
2151
+ <ng-container [ngTemplateOutlet]="fullTpl" />
2142
2152
  </div>
2143
2153
  }
2144
- @else if (header() || closable()) {
2154
+ @else if (header() || headerTemplate() || closable() || maximizable()) {
2145
2155
  <div class="flex items-center justify-between gap-4 border-b border-ui-line px-4 py-3" [class.cursor-move]="draggable() && !maximized()" (pointerdown)="startDrag($event)">
2146
- <span class="text-ui-lg font-medium">{{ header() }}</span>
2147
- <div class="flex items-center gap-1">
2156
+ @if (header()) {
2157
+ <span class="shrink-0 text-ui-lg font-medium">{{ header() }}</span>
2158
+ }
2159
+ <!-- smzTemplate="header": acoes extras ao lado do titulo; maximizar/restaurar e fechar continuam na barra. -->
2160
+ <div class="flex min-w-0 flex-1 items-center gap-2">
2161
+ @if (headerTemplate(); as headerTpl) {
2162
+ <ng-container [ngTemplateOutlet]="headerTpl" />
2163
+ }
2164
+ </div>
2165
+ <div class="flex shrink-0 items-center gap-1">
2148
2166
  @if (maximizable()) {
2149
2167
  <button type="button" class="inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-ui-fg-muted transition-colors duration-ui hover:bg-ui-surface-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ui-focus" [attr.aria-label]="maximized() ? 'Restaurar' : 'Maximizar'" (click)="maximize()">
2150
2168
  <svg viewBox="0 0 16 16" class="h-4 w-4" fill="none" aria-hidden="true">