structra-ui 0.1.79 → 0.1.80
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.
- package/fesm2022/structra-ui.mjs +28 -28
- package/fesm2022/structra-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/structra-ui.d.ts +10 -10
package/fesm2022/structra-ui.mjs
CHANGED
|
@@ -228,31 +228,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
228
228
|
args: [{ transform: booleanAttribute }]
|
|
229
229
|
}] } });
|
|
230
230
|
|
|
231
|
-
var
|
|
232
|
-
(function (
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
var ButtonVariant;
|
|
232
|
+
(function (ButtonVariant) {
|
|
233
|
+
ButtonVariant["Primary"] = "primary";
|
|
234
|
+
ButtonVariant["Secondary"] = "secondary";
|
|
235
235
|
/** Texto/ícone sem caixa — navegação secundária, “link” com aparência de botão acessível. */
|
|
236
|
-
|
|
236
|
+
ButtonVariant["Ghost"] = "ghost";
|
|
237
237
|
/**
|
|
238
238
|
* Ação destrutiva / apagar: tokens de erro do tema
|
|
239
239
|
* (`--app-color-error*`), mesmo padrão em toda a lib.
|
|
240
240
|
*/
|
|
241
|
-
|
|
242
|
-
})(
|
|
243
|
-
var
|
|
244
|
-
(function (
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
})(
|
|
241
|
+
ButtonVariant["Danger"] = "danger";
|
|
242
|
+
})(ButtonVariant || (ButtonVariant = {}));
|
|
243
|
+
var ButtonType;
|
|
244
|
+
(function (ButtonType) {
|
|
245
|
+
ButtonType["Button"] = "button";
|
|
246
|
+
ButtonType["Submit"] = "submit";
|
|
247
|
+
ButtonType["Reset"] = "reset";
|
|
248
|
+
})(ButtonType || (ButtonType = {}));
|
|
249
249
|
/**
|
|
250
250
|
* Base do botão; **não** exposta no barrel público `buttons`. Use `ButtonComponent` (`app-button`).
|
|
251
251
|
*/
|
|
252
252
|
class BaseButtonComponent {
|
|
253
253
|
constructor() {
|
|
254
254
|
/** `submit` envia o `<form>` ancestral; use `button` para ações sem submit. */
|
|
255
|
-
this.type =
|
|
255
|
+
this.type = ButtonType.Button;
|
|
256
256
|
this.disabled = false;
|
|
257
257
|
/**
|
|
258
258
|
* Não interage (como `disabled`), mas com aparência em cinza (tema somente leitura),
|
|
@@ -267,14 +267,14 @@ class BaseButtonComponent {
|
|
|
267
267
|
/** Placeholder de carregamento (skeleton no lugar do rótulo). */
|
|
268
268
|
this.loading = false;
|
|
269
269
|
/** Estilo visual base; pode ser estendido no SCSS do projeto. */
|
|
270
|
-
this.variant =
|
|
270
|
+
this.variant = ButtonVariant.Primary;
|
|
271
271
|
}
|
|
272
272
|
/** Alias de {@link variant} (nome comum em design systems). */
|
|
273
273
|
set appearance(value) {
|
|
274
|
-
if (value ===
|
|
275
|
-
value ===
|
|
276
|
-
value ===
|
|
277
|
-
value ===
|
|
274
|
+
if (value === ButtonVariant.Primary ||
|
|
275
|
+
value === ButtonVariant.Secondary ||
|
|
276
|
+
value === ButtonVariant.Ghost ||
|
|
277
|
+
value === ButtonVariant.Danger) {
|
|
278
278
|
this.variant = value;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
@@ -5314,8 +5314,8 @@ class ConfirmDialogComponent {
|
|
|
5314
5314
|
constructor() {
|
|
5315
5315
|
this.ref = inject((DialogRef));
|
|
5316
5316
|
this.data = inject(DIALOG_DATA);
|
|
5317
|
-
this.
|
|
5318
|
-
this.
|
|
5317
|
+
this.ButtonType = ButtonType;
|
|
5318
|
+
this.ButtonVariant = ButtonVariant;
|
|
5319
5319
|
this.titleId = `app-confirm-dlg-title-${++ConfirmDialogComponent.seq}`;
|
|
5320
5320
|
this.descId = `app-confirm-dlg-desc-${ConfirmDialogComponent.seq}`;
|
|
5321
5321
|
}
|
|
@@ -5332,11 +5332,11 @@ class ConfirmDialogComponent {
|
|
|
5332
5332
|
this.ref.close(false);
|
|
5333
5333
|
}
|
|
5334
5334
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5335
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: ConfirmDialogComponent, isStandalone: true, selector: "app-confirm-dialog", viewQueries: [{ propertyName: "cancelBtn", first: true, predicate: ["cancelBtn"], descendants: true }], ngImport: i0, template: "<div\r\n class=\"confirm-dialog\"\r\n role=\"alertdialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-labelledby]=\"titleId\"\r\n [attr.aria-describedby]=\"descId\"\r\n>\r\n <header class=\"confirm-dialog__header\">\r\n <h2 class=\"confirm-dialog__title\" [id]=\"titleId\">{{ data.title }}</h2>\r\n </header>\r\n\r\n <div class=\"confirm-dialog__body\">\r\n <p class=\"confirm-dialog__message\" [id]=\"descId\">{{ data.message }}</p>\r\n </div>\r\n\r\n <footer class=\"confirm-dialog__footer\">\r\n <app-button\r\n #cancelBtn\r\n [type]=\"
|
|
5335
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: ConfirmDialogComponent, isStandalone: true, selector: "app-confirm-dialog", viewQueries: [{ propertyName: "cancelBtn", first: true, predicate: ["cancelBtn"], descendants: true }], ngImport: i0, template: "<div\r\n class=\"confirm-dialog\"\r\n role=\"alertdialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-labelledby]=\"titleId\"\r\n [attr.aria-describedby]=\"descId\"\r\n>\r\n <header class=\"confirm-dialog__header\">\r\n <h2 class=\"confirm-dialog__title\" [id]=\"titleId\">{{ data.title }}</h2>\r\n </header>\r\n\r\n <div class=\"confirm-dialog__body\">\r\n <p class=\"confirm-dialog__message\" [id]=\"descId\">{{ data.message }}</p>\r\n </div>\r\n\r\n <footer class=\"confirm-dialog__footer\">\r\n <app-button\r\n #cancelBtn\r\n [type]=\"ButtonType.Button\"\r\n [variant]=\"ButtonVariant.Secondary\"\r\n [fullWidth]=\"false\"\r\n (click)=\"onCancel()\"\r\n >\r\n {{ data.cancelLabel ?? 'Cancelar' }}\r\n </app-button>\r\n <app-button\r\n [type]=\"ButtonType.Button\"\r\n [variant]=\"\r\n data.variant === 'danger'\r\n ? ButtonVariant.Danger\r\n : ButtonVariant.Primary\r\n \"\r\n [fullWidth]=\"false\"\r\n (click)=\"onConfirm()\"\r\n >\r\n {{ data.confirmLabel ?? 'Confirmar' }}\r\n </app-button>\r\n </footer>\r\n</div>\r\n", styles: [".confirm-dialog{box-sizing:border-box;display:flex;flex-direction:column;min-width:0;max-width:100%;min-height:0;overflow:hidden}.confirm-dialog__header{flex:0 0 auto;padding:1rem 1rem .65rem;border-bottom:1px solid var(--app-color-border-subtle, rgba(26, 47, 69, .09))}.confirm-dialog__title{margin:0;font-size:1.05rem;font-weight:600;line-height:1.3;color:var(--app-color-text-primary, #1a2f45)}.confirm-dialog__body{flex:1 1 auto;min-height:0;padding:1rem;overflow:auto}.confirm-dialog__message{margin:0;font-size:.9rem;line-height:1.5;color:var(--app-color-text-secondary, #5a7fa3)}.confirm-dialog__footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.5rem;padding:.65rem 1rem 1rem;border-top:1px solid var(--app-color-border-subtle, rgba(26, 47, 69, .09))}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "app-button" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5336
5336
|
}
|
|
5337
5337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
|
|
5338
5338
|
type: Component,
|
|
5339
|
-
args: [{ selector: 'app-confirm-dialog', imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"confirm-dialog\"\r\n role=\"alertdialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-labelledby]=\"titleId\"\r\n [attr.aria-describedby]=\"descId\"\r\n>\r\n <header class=\"confirm-dialog__header\">\r\n <h2 class=\"confirm-dialog__title\" [id]=\"titleId\">{{ data.title }}</h2>\r\n </header>\r\n\r\n <div class=\"confirm-dialog__body\">\r\n <p class=\"confirm-dialog__message\" [id]=\"descId\">{{ data.message }}</p>\r\n </div>\r\n\r\n <footer class=\"confirm-dialog__footer\">\r\n <app-button\r\n #cancelBtn\r\n [type]=\"
|
|
5339
|
+
args: [{ selector: 'app-confirm-dialog', imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"confirm-dialog\"\r\n role=\"alertdialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-labelledby]=\"titleId\"\r\n [attr.aria-describedby]=\"descId\"\r\n>\r\n <header class=\"confirm-dialog__header\">\r\n <h2 class=\"confirm-dialog__title\" [id]=\"titleId\">{{ data.title }}</h2>\r\n </header>\r\n\r\n <div class=\"confirm-dialog__body\">\r\n <p class=\"confirm-dialog__message\" [id]=\"descId\">{{ data.message }}</p>\r\n </div>\r\n\r\n <footer class=\"confirm-dialog__footer\">\r\n <app-button\r\n #cancelBtn\r\n [type]=\"ButtonType.Button\"\r\n [variant]=\"ButtonVariant.Secondary\"\r\n [fullWidth]=\"false\"\r\n (click)=\"onCancel()\"\r\n >\r\n {{ data.cancelLabel ?? 'Cancelar' }}\r\n </app-button>\r\n <app-button\r\n [type]=\"ButtonType.Button\"\r\n [variant]=\"\r\n data.variant === 'danger'\r\n ? ButtonVariant.Danger\r\n : ButtonVariant.Primary\r\n \"\r\n [fullWidth]=\"false\"\r\n (click)=\"onConfirm()\"\r\n >\r\n {{ data.confirmLabel ?? 'Confirmar' }}\r\n </app-button>\r\n </footer>\r\n</div>\r\n", styles: [".confirm-dialog{box-sizing:border-box;display:flex;flex-direction:column;min-width:0;max-width:100%;min-height:0;overflow:hidden}.confirm-dialog__header{flex:0 0 auto;padding:1rem 1rem .65rem;border-bottom:1px solid var(--app-color-border-subtle, rgba(26, 47, 69, .09))}.confirm-dialog__title{margin:0;font-size:1.05rem;font-weight:600;line-height:1.3;color:var(--app-color-text-primary, #1a2f45)}.confirm-dialog__body{flex:1 1 auto;min-height:0;padding:1rem;overflow:auto}.confirm-dialog__message{margin:0;font-size:.9rem;line-height:1.5;color:var(--app-color-text-secondary, #5a7fa3)}.confirm-dialog__footer{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.5rem;padding:.65rem 1rem 1rem;border-top:1px solid var(--app-color-border-subtle, rgba(26, 47, 69, .09))}\n"] }]
|
|
5340
5340
|
}], propDecorators: { cancelBtn: [{
|
|
5341
5341
|
type: ViewChild,
|
|
5342
5342
|
args: ['cancelBtn']
|
|
@@ -6238,8 +6238,8 @@ class ImagePreviewPanelComponent {
|
|
|
6238
6238
|
this.objectFit = 'cover';
|
|
6239
6239
|
this.remove = new EventEmitter();
|
|
6240
6240
|
this.change = new EventEmitter();
|
|
6241
|
-
this.
|
|
6242
|
-
this.
|
|
6241
|
+
this.ButtonType = ButtonType;
|
|
6242
|
+
this.ButtonVariant = ButtonVariant;
|
|
6243
6243
|
/** Mensagem reutilizada: falha de carga, tipo não suportado, etc. */
|
|
6244
6244
|
this.previewUnavailableMessage = FILE_PREVIEW_UNAVAILABLE_MESSAGE;
|
|
6245
6245
|
/** `blob:` a revogar ao trocar ou destruir. */
|
|
@@ -6359,11 +6359,11 @@ class ImagePreviewPanelComponent {
|
|
|
6359
6359
|
}
|
|
6360
6360
|
}
|
|
6361
6361
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ImagePreviewPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6362
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ImagePreviewPanelComponent, isStandalone: true, selector: "app-image-preview-panel", inputs: { title: "title", subtitle: "subtitle", imageUrl: "imageUrl", file: "file", emptyText: "emptyText", loading: ["loading", "loading", booleanAttribute], rounded: ["rounded", "rounded", booleanAttribute], showImageActions: ["showImageActions", "showImageActions", booleanAttribute], objectFit: "objectFit" }, outputs: { remove: "remove", change: "change" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n class=\"image-preview-panel\"\r\n [class.image-preview-panel--rounded]=\"rounded\"\r\n [class.image-preview-panel--loading]=\"loading\"\r\n>\r\n @if (title && title.length > 0) {\r\n <h3 class=\"image-preview-panel__title\">{{ title }}</h3>\r\n }\r\n @if (subtitle && subtitle.length > 0) {\r\n <p class=\"image-preview-panel__subtitle\">{{ subtitle }}</p>\r\n }\r\n\r\n <div\r\n class=\"image-preview-panel__frame\"\r\n [class.image-preview-panel__frame--rounded]=\"rounded\"\r\n >\r\n @if (loading) {\r\n <div\r\n class=\"image-preview-panel__skeleton\"\r\n role=\"status\"\r\n aria-label=\"Carregando pr\u00E9-visualiza\u00E7\u00E3o\"\r\n >\r\n <app-skeleton-block\r\n class=\"image-preview-panel__skeleton-poster\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n radius=\"0\"\r\n />\r\n <div class=\"image-preview-panel__skeleton-lines\">\r\n <app-skeleton-block width=\"72%\" height=\"0.6rem\" radius=\"6px\" />\r\n <app-skeleton-block width=\"48%\" height=\"0.55rem\" radius=\"6px\" />\r\n </div>\r\n </div>\r\n } @else if (showEmpty) {\r\n <div class=\"image-preview-panel__empty\" role=\"img\" [attr.aria-label]=\"emptyText\">\r\n <i class=\"fa-regular fa-image image-preview-panel__empty-icon\" aria-hidden=\"true\"></i>\r\n <span class=\"image-preview-panel__empty-text\">{{ emptyText }}</span>\r\n </div>\r\n } @else {\r\n @if (showPreviewFallback) {\r\n <div\r\n class=\"image-preview-panel__preview-fallback\"\r\n role=\"status\"\r\n [attr.aria-label]=\"previewUnavailableMessage\"\r\n >\r\n <i\r\n class=\"fa-solid fa-triangle-exclamation image-preview-panel__preview-fallback-icon\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n <span class=\"image-preview-panel__preview-fallback-text\">{{ previewUnavailableMessage }}</span>\r\n </div>\r\n } @else if (showPdf) {\r\n <iframe\r\n class=\"image-preview-panel__pdf\"\r\n [src]=\"safePdfUrl\"\r\n title=\"Pr\u00E9-visualiza\u00E7\u00E3o do PDF\"\r\n (error)=\"onPdfFrameError()\"\r\n ></iframe>\r\n } @else if (showImage) {\r\n <img\r\n class=\"image-preview-panel__img\"\r\n [src]=\"displaySrc!\"\r\n [alt]=\"title || 'Pr\u00E9-visualiza\u00E7\u00E3o'\"\r\n [style.object-fit]=\"objectFit\"\r\n (load)=\"onImgLoad()\"\r\n (error)=\"onImgError()\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n @if (showActions) {\r\n <div class=\"image-preview-panel__actions\" role=\"group\" [attr.aria-label]=\"'A\u00E7\u00F5es da imagem'\">\r\n <app-button\r\n [type]=\"
|
|
6362
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ImagePreviewPanelComponent, isStandalone: true, selector: "app-image-preview-panel", inputs: { title: "title", subtitle: "subtitle", imageUrl: "imageUrl", file: "file", emptyText: "emptyText", loading: ["loading", "loading", booleanAttribute], rounded: ["rounded", "rounded", booleanAttribute], showImageActions: ["showImageActions", "showImageActions", booleanAttribute], objectFit: "objectFit" }, outputs: { remove: "remove", change: "change" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n class=\"image-preview-panel\"\r\n [class.image-preview-panel--rounded]=\"rounded\"\r\n [class.image-preview-panel--loading]=\"loading\"\r\n>\r\n @if (title && title.length > 0) {\r\n <h3 class=\"image-preview-panel__title\">{{ title }}</h3>\r\n }\r\n @if (subtitle && subtitle.length > 0) {\r\n <p class=\"image-preview-panel__subtitle\">{{ subtitle }}</p>\r\n }\r\n\r\n <div\r\n class=\"image-preview-panel__frame\"\r\n [class.image-preview-panel__frame--rounded]=\"rounded\"\r\n >\r\n @if (loading) {\r\n <div\r\n class=\"image-preview-panel__skeleton\"\r\n role=\"status\"\r\n aria-label=\"Carregando pr\u00E9-visualiza\u00E7\u00E3o\"\r\n >\r\n <app-skeleton-block\r\n class=\"image-preview-panel__skeleton-poster\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n radius=\"0\"\r\n />\r\n <div class=\"image-preview-panel__skeleton-lines\">\r\n <app-skeleton-block width=\"72%\" height=\"0.6rem\" radius=\"6px\" />\r\n <app-skeleton-block width=\"48%\" height=\"0.55rem\" radius=\"6px\" />\r\n </div>\r\n </div>\r\n } @else if (showEmpty) {\r\n <div class=\"image-preview-panel__empty\" role=\"img\" [attr.aria-label]=\"emptyText\">\r\n <i class=\"fa-regular fa-image image-preview-panel__empty-icon\" aria-hidden=\"true\"></i>\r\n <span class=\"image-preview-panel__empty-text\">{{ emptyText }}</span>\r\n </div>\r\n } @else {\r\n @if (showPreviewFallback) {\r\n <div\r\n class=\"image-preview-panel__preview-fallback\"\r\n role=\"status\"\r\n [attr.aria-label]=\"previewUnavailableMessage\"\r\n >\r\n <i\r\n class=\"fa-solid fa-triangle-exclamation image-preview-panel__preview-fallback-icon\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n <span class=\"image-preview-panel__preview-fallback-text\">{{ previewUnavailableMessage }}</span>\r\n </div>\r\n } @else if (showPdf) {\r\n <iframe\r\n class=\"image-preview-panel__pdf\"\r\n [src]=\"safePdfUrl\"\r\n title=\"Pr\u00E9-visualiza\u00E7\u00E3o do PDF\"\r\n (error)=\"onPdfFrameError()\"\r\n ></iframe>\r\n } @else if (showImage) {\r\n <img\r\n class=\"image-preview-panel__img\"\r\n [src]=\"displaySrc!\"\r\n [alt]=\"title || 'Pr\u00E9-visualiza\u00E7\u00E3o'\"\r\n [style.object-fit]=\"objectFit\"\r\n (load)=\"onImgLoad()\"\r\n (error)=\"onImgError()\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n @if (showActions) {\r\n <div class=\"image-preview-panel__actions\" role=\"group\" [attr.aria-label]=\"'A\u00E7\u00F5es da imagem'\">\r\n <app-button\r\n [type]=\"ButtonType.Button\"\r\n [variant]=\"ButtonVariant.Secondary\"\r\n [fullWidth]=\"false\"\r\n (click)=\"onTrocar()\"\r\n >\r\n Trocar\r\n </app-button>\r\n <app-button\r\n [type]=\"ButtonType.Button\"\r\n [variant]=\"ButtonVariant.Danger\"\r\n [fullWidth]=\"false\"\r\n (click)=\"onRemover()\"\r\n >\r\n Remover\r\n </app-button>\r\n </div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%;max-width:100%;box-sizing:border-box;user-select:none;-webkit-user-select:none}.image-preview-panel{display:flex;flex-direction:column;gap:.75rem;min-width:0}.image-preview-panel--rounded .image-preview-panel__title,.image-preview-panel--rounded .image-preview-panel__subtitle{padding-left:.05rem}.image-preview-panel__title{font-size:.95rem;font-weight:600;margin:0;color:#171717;line-height:1.3}.image-preview-panel__subtitle{font-size:.8rem;line-height:1.4;margin:-.2rem 0 0;color:#525252}.image-preview-panel__frame{position:relative;width:100%;min-height:12rem;aspect-ratio:4/3;max-height:min(50vh,24rem);border:1px solid var(--ui-field-float-border, #e5e5e5);border-radius:8px;background:var(--ui-page-bg, #f4f4f5);overflow:hidden;isolation:isolate;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.image-preview-panel__frame--rounded{border-radius:12px}.image-preview-panel__img{display:block;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 auto;align-self:stretch;object-position:center;border-radius:0}.image-preview-panel__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;text-align:center;color:#737373;width:100%;height:100%;min-height:0;box-sizing:border-box}.image-preview-panel__empty-icon{font-size:1.75rem;opacity:.55}.image-preview-panel__empty-text{font-size:.82rem;line-height:1.4;max-width:16rem}.image-preview-panel__preview-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.45rem;padding:1.5rem 1rem;text-align:center;color:#a16207;background:#fffbeb;width:100%;height:100%;min-height:0;box-sizing:border-box}.image-preview-panel__preview-fallback-icon{font-size:1.25rem;opacity:.9}.image-preview-panel__preview-fallback-text{font-size:.8rem;line-height:1.4;max-width:16rem}.image-preview-panel__pdf{display:block;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 auto;border:0;background:#fff}.image-preview-panel__skeleton{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;background:#f4f4f5}.image-preview-panel__skeleton-poster{display:block;flex:1 1 auto;min-height:0;width:100%!important;height:auto!important}.image-preview-panel__skeleton-lines{display:flex;flex-direction:column;gap:.5rem;padding:.75rem .9rem .85rem;flex:0 0 auto}.image-preview-panel__actions{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem}.image-preview-panel--loading .image-preview-panel__actions{display:none}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "app-button" }, { kind: "component", type: SkeletonBlockComponent, selector: "app-skeleton-block", inputs: ["width", "height", "radius", "animate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6363
6363
|
}
|
|
6364
6364
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ImagePreviewPanelComponent, decorators: [{
|
|
6365
6365
|
type: Component,
|
|
6366
|
-
args: [{ selector: 'app-image-preview-panel', standalone: true, imports: [ButtonComponent, SkeletonBlockComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"image-preview-panel\"\r\n [class.image-preview-panel--rounded]=\"rounded\"\r\n [class.image-preview-panel--loading]=\"loading\"\r\n>\r\n @if (title && title.length > 0) {\r\n <h3 class=\"image-preview-panel__title\">{{ title }}</h3>\r\n }\r\n @if (subtitle && subtitle.length > 0) {\r\n <p class=\"image-preview-panel__subtitle\">{{ subtitle }}</p>\r\n }\r\n\r\n <div\r\n class=\"image-preview-panel__frame\"\r\n [class.image-preview-panel__frame--rounded]=\"rounded\"\r\n >\r\n @if (loading) {\r\n <div\r\n class=\"image-preview-panel__skeleton\"\r\n role=\"status\"\r\n aria-label=\"Carregando pr\u00E9-visualiza\u00E7\u00E3o\"\r\n >\r\n <app-skeleton-block\r\n class=\"image-preview-panel__skeleton-poster\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n radius=\"0\"\r\n />\r\n <div class=\"image-preview-panel__skeleton-lines\">\r\n <app-skeleton-block width=\"72%\" height=\"0.6rem\" radius=\"6px\" />\r\n <app-skeleton-block width=\"48%\" height=\"0.55rem\" radius=\"6px\" />\r\n </div>\r\n </div>\r\n } @else if (showEmpty) {\r\n <div class=\"image-preview-panel__empty\" role=\"img\" [attr.aria-label]=\"emptyText\">\r\n <i class=\"fa-regular fa-image image-preview-panel__empty-icon\" aria-hidden=\"true\"></i>\r\n <span class=\"image-preview-panel__empty-text\">{{ emptyText }}</span>\r\n </div>\r\n } @else {\r\n @if (showPreviewFallback) {\r\n <div\r\n class=\"image-preview-panel__preview-fallback\"\r\n role=\"status\"\r\n [attr.aria-label]=\"previewUnavailableMessage\"\r\n >\r\n <i\r\n class=\"fa-solid fa-triangle-exclamation image-preview-panel__preview-fallback-icon\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n <span class=\"image-preview-panel__preview-fallback-text\">{{ previewUnavailableMessage }}</span>\r\n </div>\r\n } @else if (showPdf) {\r\n <iframe\r\n class=\"image-preview-panel__pdf\"\r\n [src]=\"safePdfUrl\"\r\n title=\"Pr\u00E9-visualiza\u00E7\u00E3o do PDF\"\r\n (error)=\"onPdfFrameError()\"\r\n ></iframe>\r\n } @else if (showImage) {\r\n <img\r\n class=\"image-preview-panel__img\"\r\n [src]=\"displaySrc!\"\r\n [alt]=\"title || 'Pr\u00E9-visualiza\u00E7\u00E3o'\"\r\n [style.object-fit]=\"objectFit\"\r\n (load)=\"onImgLoad()\"\r\n (error)=\"onImgError()\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n @if (showActions) {\r\n <div class=\"image-preview-panel__actions\" role=\"group\" [attr.aria-label]=\"'A\u00E7\u00F5es da imagem'\">\r\n <app-button\r\n [type]=\"
|
|
6366
|
+
args: [{ selector: 'app-image-preview-panel', standalone: true, imports: [ButtonComponent, SkeletonBlockComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"image-preview-panel\"\r\n [class.image-preview-panel--rounded]=\"rounded\"\r\n [class.image-preview-panel--loading]=\"loading\"\r\n>\r\n @if (title && title.length > 0) {\r\n <h3 class=\"image-preview-panel__title\">{{ title }}</h3>\r\n }\r\n @if (subtitle && subtitle.length > 0) {\r\n <p class=\"image-preview-panel__subtitle\">{{ subtitle }}</p>\r\n }\r\n\r\n <div\r\n class=\"image-preview-panel__frame\"\r\n [class.image-preview-panel__frame--rounded]=\"rounded\"\r\n >\r\n @if (loading) {\r\n <div\r\n class=\"image-preview-panel__skeleton\"\r\n role=\"status\"\r\n aria-label=\"Carregando pr\u00E9-visualiza\u00E7\u00E3o\"\r\n >\r\n <app-skeleton-block\r\n class=\"image-preview-panel__skeleton-poster\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n radius=\"0\"\r\n />\r\n <div class=\"image-preview-panel__skeleton-lines\">\r\n <app-skeleton-block width=\"72%\" height=\"0.6rem\" radius=\"6px\" />\r\n <app-skeleton-block width=\"48%\" height=\"0.55rem\" radius=\"6px\" />\r\n </div>\r\n </div>\r\n } @else if (showEmpty) {\r\n <div class=\"image-preview-panel__empty\" role=\"img\" [attr.aria-label]=\"emptyText\">\r\n <i class=\"fa-regular fa-image image-preview-panel__empty-icon\" aria-hidden=\"true\"></i>\r\n <span class=\"image-preview-panel__empty-text\">{{ emptyText }}</span>\r\n </div>\r\n } @else {\r\n @if (showPreviewFallback) {\r\n <div\r\n class=\"image-preview-panel__preview-fallback\"\r\n role=\"status\"\r\n [attr.aria-label]=\"previewUnavailableMessage\"\r\n >\r\n <i\r\n class=\"fa-solid fa-triangle-exclamation image-preview-panel__preview-fallback-icon\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n <span class=\"image-preview-panel__preview-fallback-text\">{{ previewUnavailableMessage }}</span>\r\n </div>\r\n } @else if (showPdf) {\r\n <iframe\r\n class=\"image-preview-panel__pdf\"\r\n [src]=\"safePdfUrl\"\r\n title=\"Pr\u00E9-visualiza\u00E7\u00E3o do PDF\"\r\n (error)=\"onPdfFrameError()\"\r\n ></iframe>\r\n } @else if (showImage) {\r\n <img\r\n class=\"image-preview-panel__img\"\r\n [src]=\"displaySrc!\"\r\n [alt]=\"title || 'Pr\u00E9-visualiza\u00E7\u00E3o'\"\r\n [style.object-fit]=\"objectFit\"\r\n (load)=\"onImgLoad()\"\r\n (error)=\"onImgError()\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n @if (showActions) {\r\n <div class=\"image-preview-panel__actions\" role=\"group\" [attr.aria-label]=\"'A\u00E7\u00F5es da imagem'\">\r\n <app-button\r\n [type]=\"ButtonType.Button\"\r\n [variant]=\"ButtonVariant.Secondary\"\r\n [fullWidth]=\"false\"\r\n (click)=\"onTrocar()\"\r\n >\r\n Trocar\r\n </app-button>\r\n <app-button\r\n [type]=\"ButtonType.Button\"\r\n [variant]=\"ButtonVariant.Danger\"\r\n [fullWidth]=\"false\"\r\n (click)=\"onRemover()\"\r\n >\r\n Remover\r\n </app-button>\r\n </div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%;max-width:100%;box-sizing:border-box;user-select:none;-webkit-user-select:none}.image-preview-panel{display:flex;flex-direction:column;gap:.75rem;min-width:0}.image-preview-panel--rounded .image-preview-panel__title,.image-preview-panel--rounded .image-preview-panel__subtitle{padding-left:.05rem}.image-preview-panel__title{font-size:.95rem;font-weight:600;margin:0;color:#171717;line-height:1.3}.image-preview-panel__subtitle{font-size:.8rem;line-height:1.4;margin:-.2rem 0 0;color:#525252}.image-preview-panel__frame{position:relative;width:100%;min-height:12rem;aspect-ratio:4/3;max-height:min(50vh,24rem);border:1px solid var(--ui-field-float-border, #e5e5e5);border-radius:8px;background:var(--ui-page-bg, #f4f4f5);overflow:hidden;isolation:isolate;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.image-preview-panel__frame--rounded{border-radius:12px}.image-preview-panel__img{display:block;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 auto;align-self:stretch;object-position:center;border-radius:0}.image-preview-panel__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;text-align:center;color:#737373;width:100%;height:100%;min-height:0;box-sizing:border-box}.image-preview-panel__empty-icon{font-size:1.75rem;opacity:.55}.image-preview-panel__empty-text{font-size:.82rem;line-height:1.4;max-width:16rem}.image-preview-panel__preview-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.45rem;padding:1.5rem 1rem;text-align:center;color:#a16207;background:#fffbeb;width:100%;height:100%;min-height:0;box-sizing:border-box}.image-preview-panel__preview-fallback-icon{font-size:1.25rem;opacity:.9}.image-preview-panel__preview-fallback-text{font-size:.8rem;line-height:1.4;max-width:16rem}.image-preview-panel__pdf{display:block;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 auto;border:0;background:#fff}.image-preview-panel__skeleton{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;background:#f4f4f5}.image-preview-panel__skeleton-poster{display:block;flex:1 1 auto;min-height:0;width:100%!important;height:auto!important}.image-preview-panel__skeleton-lines{display:flex;flex-direction:column;gap:.5rem;padding:.75rem .9rem .85rem;flex:0 0 auto}.image-preview-panel__actions{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem}.image-preview-panel--loading .image-preview-panel__actions{display:none}\n"] }]
|
|
6367
6367
|
}], propDecorators: { title: [{
|
|
6368
6368
|
type: Input
|
|
6369
6369
|
}], subtitle: [{
|
|
@@ -10153,5 +10153,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
10153
10153
|
* Generated bundle index. Do not edit.
|
|
10154
10154
|
*/
|
|
10155
10155
|
|
|
10156
|
-
export { ADAPTIVE_DATA_VIEW_MOBILE_QUERY, APP_SIDEBAR_LABEL_REVEAL_LAG_MS, APP_SIDEBAR_LAYOUT_DURATION_MS, APP_SIDEBAR_NAV_REVEAL_TOTAL_MS, APP_THEME_IDS, ActionMenuComponent, AdaptiveDataViewComponent, AnchoredOverlayComponent, AppBreadcrumbComponent, AppDialogComponent, AppLibLightBlockScrollStrategy, AppShellComponent, AppShellSidebarTemplateDirective, AppShellSidebarToggleComponent, AppSidebarComponent, AppSidebarToolbarDirective, AppTheme, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA,
|
|
10156
|
+
export { ADAPTIVE_DATA_VIEW_MOBILE_QUERY, APP_SIDEBAR_LABEL_REVEAL_LAG_MS, APP_SIDEBAR_LAYOUT_DURATION_MS, APP_SIDEBAR_NAV_REVEAL_TOTAL_MS, APP_THEME_IDS, ActionMenuComponent, AdaptiveDataViewComponent, AnchoredOverlayComponent, AppBreadcrumbComponent, AppDialogComponent, AppLibLightBlockScrollStrategy, AppShellComponent, AppShellSidebarTemplateDirective, AppShellSidebarToggleComponent, AppSidebarComponent, AppSidebarToolbarDirective, AppTheme, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, ButtonComponent, ButtonType, ButtonVariant, CardListComponent, CepFieldComponent, CheckboxFieldComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuComponent, CpfCnpjFieldComponent, DashboardSectionComponent, DataCardComponent, DataGridComponent, DataListComponent, DataToolbarComponent, DateFieldComponent, DecimalFieldComponent, DetailsFieldComponent, DetailsViewComponent, DialogFooterDirective, DrawerComponent, DrawerSide, DrawerSize, DropdownBaseComponent, DropdownMenuComponent, DropdownMultiOptionFieldBase, DropdownOptionFieldBase, DropdownSearchFieldComponent, EmptyStateComponent, FILE_PREVIEW_UNAVAILABLE_MESSAGE, FileUploadFieldComponent, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormLayoutGap, FormRowAlign, FormRowComponent, FormRowJustify, FormSectionComponent, FormTabComponent, FormTabsComponent, ImagePreviewPanelComponent, InputMaskFieldComponent, IntegerFieldComponent, LAYOUT_STACK_SIDE_BY_SIDE, LAYOUT_STACK_STACKED, LayoutStackAlign, LayoutStackComponent, LayoutStackDirection, LayoutStackItemAlign, LibDialogSize, ListItemComponent, LoadingDialogComponent, LoadingDialogService, MaskedTextFieldBase, MenuDividerComponent, MenuDropdownPlacement, MenuGroupComponent, MenuListComponent, MultiselectFieldComponent, NgControlFieldDirective, OverlayPlacement, PDF_IFRAME_VIEWER_HASH, PasswordFieldComponent, PhoneFieldComponent, PopoverBodyTemplateDirective, PopoverComponent, PopoverFooterTemplateDirective, PopoverTriggerDirective, STRUCTRA_UI, SelectFieldComponent, SkeletonBlockComponent, SkeletonCardComponent, SkeletonFieldShellComponent, SkeletonListComponent, SkeletonTableComponent, SkeletonTextComponent, StatCardComponent, StatusBadgeComponent, SwitchFieldComponent, TableEmptyStateComponent, TableToolbarComponent, TextFieldComponent, TextareaFieldComponent, ToastHostComponent, ToastService, TooltipComponent, TooltipPanelTemplateDirective, ValidationSummaryComponent, anchoredOverlayPositions, appendPdfIframeViewerParams, applyPickedCalendarDate, buildDecimalBrDisplay, buildDecimalBrParseString, buildEmptyStateOverlayHtml, caretIndexFromIntegerDigitCount, caretIndexFromSemantic, cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, escapeHtml, extractDecimalBrParts, fileIsLikelyImage, fileMatchesAccept, fixedDigitsMaskCompleteValidator, formatAcceptForDisplay, formatDateTimePtBr, formatDecimalBr, formatFileSizeBytes, formatIntegerThousandsBr, formatMaskDigits, formatUiFieldDateValue, getFilePreviewKind, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
|
|
10157
10157
|
//# sourceMappingURL=structra-ui.mjs.map
|