structra-ui 0.1.42 → 0.1.44
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 +115 -73
- package/fesm2022/structra-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/structra-ui.d.ts +38 -16
package/fesm2022/structra-ui.mjs
CHANGED
|
@@ -552,16 +552,28 @@ const APP_THEME_IDS = [
|
|
|
552
552
|
'black',
|
|
553
553
|
];
|
|
554
554
|
/**
|
|
555
|
-
* Estado global do tema da library:
|
|
556
|
-
* Os tokens
|
|
555
|
+
* Estado global do tema da library: **sempre** `.app-library-theme` + `theme-*` juntos.
|
|
556
|
+
* Os tokens de paleta em `_theme-palettes.scss` usam o selector `.app-library-theme.theme-*`.
|
|
557
557
|
*/
|
|
558
558
|
class AppThemeService {
|
|
559
559
|
constructor() {
|
|
560
560
|
this.activeId = signal('black', ...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
|
|
561
561
|
/** Identificador do tema activo (`blue`, `green`, …). */
|
|
562
562
|
this.activeThemeId = this.activeId.asReadonly();
|
|
563
|
-
/**
|
|
564
|
-
|
|
563
|
+
/**
|
|
564
|
+
* Classes separadas (ex.: CDK `panelClass` — uma string com espaço quebra `classList.add`).
|
|
565
|
+
*/
|
|
566
|
+
this.themeClassList = computed(() => ['app-library-theme', `theme-${this.activeId()}`], ...(ngDevMode ? [{ debugName: "themeClassList" }] : /* istanbul ignore next */ []));
|
|
567
|
+
/**
|
|
568
|
+
* As duas classes numa string — útil para `[class]`, `[ngClass]` com string, ou hosts HTML.
|
|
569
|
+
* Ex.: `<div [ngClass]="libTheme.themeClass()">` aplica paleta completa no consumidor.
|
|
570
|
+
*/
|
|
571
|
+
this.themeClass = computed(() => this.themeClassList().join(' '), ...(ngDevMode ? [{ debugName: "themeClass" }] : /* istanbul ignore next */ []));
|
|
572
|
+
/** Mapa para `[ngClass]` com chaves dinâmicas (painéis overlay). */
|
|
573
|
+
this.themeClassMap = computed(() => {
|
|
574
|
+
const [base, token] = this.themeClassList();
|
|
575
|
+
return { [base]: true, [token]: true };
|
|
576
|
+
}, ...(ngDevMode ? [{ debugName: "themeClassMap" }] : /* istanbul ignore next */ []));
|
|
565
577
|
/** Lista fixa de temas suportados pela library. */
|
|
566
578
|
this.themeOptions = [
|
|
567
579
|
{ id: 'blue', label: 'Azul' },
|
|
@@ -609,18 +621,14 @@ class DropdownBaseComponent {
|
|
|
609
621
|
* O overlay do CDK fica sob `body`; sem estas classes, `var(--app-color-*)` cai no `:root`.
|
|
610
622
|
* Tem de ser **array**: uma única string com espaço quebra `classList.add` e as classes não aplicam.
|
|
611
623
|
*/
|
|
612
|
-
this.overlayPanelClasses = computed(() => [
|
|
624
|
+
this.overlayPanelClasses = computed(() => [
|
|
625
|
+
...this.appTheme.themeClassList(),
|
|
626
|
+
], ...(ngDevMode ? [{ debugName: "overlayPanelClasses" }] : /* istanbul ignore next */ []));
|
|
613
627
|
/**
|
|
614
628
|
* O CDK não reaplica `cdkConnectedOverlayPanelClass` quando o overlay já existe.
|
|
615
629
|
* As classes de tema no painel interno seguem o tema activo sempre.
|
|
616
630
|
*/
|
|
617
|
-
this.panelThemeNgClass = computed(() => {
|
|
618
|
-
const themeClass = this.appTheme.themeClass();
|
|
619
|
-
return {
|
|
620
|
-
'app-library-theme': true,
|
|
621
|
-
[themeClass]: true,
|
|
622
|
-
};
|
|
623
|
-
}, ...(ngDevMode ? [{ debugName: "panelThemeNgClass" }] : /* istanbul ignore next */ []));
|
|
631
|
+
this.panelThemeNgClass = computed(() => this.appTheme.themeClassMap(), ...(ngDevMode ? [{ debugName: "panelThemeNgClass" }] : /* istanbul ignore next */ []));
|
|
624
632
|
this.open = false;
|
|
625
633
|
this.openChange = new EventEmitter();
|
|
626
634
|
/** Largura do painel em px (ex.: largura total do campo). */
|
|
@@ -850,16 +858,10 @@ class MenuListComponent {
|
|
|
850
858
|
this.submenuOpenTimer = null;
|
|
851
859
|
this.submenuCloseTimer = null;
|
|
852
860
|
this.submenuPositions = submenuConnectedPositions();
|
|
853
|
-
this.panelThemeNgClass = computed(() => {
|
|
854
|
-
const themeClass = this.appTheme.themeClass();
|
|
855
|
-
return {
|
|
856
|
-
'app-library-theme': true,
|
|
857
|
-
[themeClass]: true,
|
|
858
|
-
};
|
|
859
|
-
}, ...(ngDevMode ? [{ debugName: "panelThemeNgClass" }] : /* istanbul ignore next */ []));
|
|
861
|
+
this.panelThemeNgClass = computed(() => this.appTheme.themeClassMap(), ...(ngDevMode ? [{ debugName: "panelThemeNgClass" }] : /* istanbul ignore next */ []));
|
|
860
862
|
}
|
|
861
863
|
overlayPanelClasses() {
|
|
862
|
-
return [
|
|
864
|
+
return [...this.appTheme.themeClassList(), 'menu-submenu__cdk-panel'];
|
|
863
865
|
}
|
|
864
866
|
onNestedItemSelect(id) {
|
|
865
867
|
this.closeOpenSubmenu();
|
|
@@ -4917,14 +4919,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
4917
4919
|
args: ['keydown', ['$event']]
|
|
4918
4920
|
}] } });
|
|
4919
4921
|
|
|
4920
|
-
/** Espaçamento
|
|
4921
|
-
var
|
|
4922
|
-
(function (
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
})(
|
|
4922
|
+
/** Espaçamento entre itens da linha ou da pilha dentro de uma coluna. */
|
|
4923
|
+
var FormLayoutGap;
|
|
4924
|
+
(function (FormLayoutGap) {
|
|
4925
|
+
FormLayoutGap["Xs"] = "xs";
|
|
4926
|
+
FormLayoutGap["Sm"] = "sm";
|
|
4927
|
+
FormLayoutGap["Md"] = "md";
|
|
4928
|
+
FormLayoutGap["Lg"] = "lg";
|
|
4929
|
+
})(FormLayoutGap || (FormLayoutGap = {}));
|
|
4928
4930
|
/** Alinhamento no eixo cruzado (itens da linha). */
|
|
4929
4931
|
var FormRowAlign;
|
|
4930
4932
|
(function (FormRowAlign) {
|
|
@@ -5071,53 +5073,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
5071
5073
|
|
|
5072
5074
|
/**
|
|
5073
5075
|
* Coluna no sistema de 12 trilhos da {@link FormRowComponent}.
|
|
5074
|
-
*
|
|
5076
|
+
* Breakpoints (min-width): sm 40rem, md 48rem, lg 64rem, xl 80rem.
|
|
5077
|
+
* Valores omitidos (ex.: só `xs` e `md`) propagam-se a partir do maior definido — ex.: `md` preenche `sm` quando `sm` não está definido.
|
|
5075
5078
|
*/
|
|
5076
5079
|
class FormColComponent {
|
|
5077
5080
|
constructor() {
|
|
5078
5081
|
/** Colunas ocupadas em < `sm` (por defeito 12 = linha inteira). */
|
|
5079
5082
|
this.xs = 12;
|
|
5080
|
-
/** Quando `true`, a coluna
|
|
5083
|
+
/** Quando `true`, a coluna preenche o espaço horizontal restante na grelha (`auto / -1`). */
|
|
5081
5084
|
this.grow = false;
|
|
5085
|
+
/** Espaço entre elementos projectados na mesma coluna (pilha vertical). */
|
|
5086
|
+
this.gap = FormLayoutGap.Md;
|
|
5087
|
+
this.align = FormRowAlign.Stretch;
|
|
5088
|
+
/** No eixo vertical da pilha (`justify-content`). */
|
|
5089
|
+
this.justify = FormRowJustify.Start;
|
|
5082
5090
|
}
|
|
5083
5091
|
get hostClass() {
|
|
5084
|
-
|
|
5092
|
+
const parts = [
|
|
5093
|
+
'form-col',
|
|
5094
|
+
`form-col--gap-${this.gap}`,
|
|
5095
|
+
`form-col--align-${this.align}`,
|
|
5096
|
+
`form-col--justify-${this.justify}`,
|
|
5097
|
+
];
|
|
5098
|
+
if (this.grow) {
|
|
5099
|
+
parts.push('form-col--grow');
|
|
5100
|
+
}
|
|
5101
|
+
return parts.join(' ');
|
|
5085
5102
|
}
|
|
5086
5103
|
get hostVars() {
|
|
5087
|
-
const sm = this.
|
|
5088
|
-
const md = this.normalizeOptionalSpan(this.md, sm);
|
|
5089
|
-
const lg = this.normalizeOptionalSpan(this.lg, md);
|
|
5090
|
-
const xl = this.normalizeOptionalSpan(this.xl, lg);
|
|
5104
|
+
const { xs, sm, md, lg, xl } = this.resolvedSpans();
|
|
5091
5105
|
const parts = [
|
|
5092
|
-
`--form-col-xs:${
|
|
5093
|
-
`--form-col-sm:${
|
|
5094
|
-
`--form-col-md:${
|
|
5095
|
-
`--form-col-lg:${
|
|
5096
|
-
`--form-col-xl:${
|
|
5106
|
+
`--form-col-xs:${xs}`,
|
|
5107
|
+
`--form-col-sm:${sm}`,
|
|
5108
|
+
`--form-col-md:${md}`,
|
|
5109
|
+
`--form-col-lg:${lg}`,
|
|
5110
|
+
`--form-col-xl:${xl}`,
|
|
5097
5111
|
];
|
|
5098
5112
|
if (this.order != null && !Number.isNaN(this.order)) {
|
|
5099
5113
|
parts.push(`order:${this.order}`);
|
|
5100
5114
|
}
|
|
5101
5115
|
return parts.join(';');
|
|
5102
5116
|
}
|
|
5117
|
+
/**
|
|
5118
|
+
* Cada patamar herda do próximo **maior** explicitamente definido quando o intermédio falta
|
|
5119
|
+
* (ex.: só `xs` + `md` → `sm` usa `md`, evitando faixa 40–48rem presa em `xs`).
|
|
5120
|
+
*/
|
|
5121
|
+
resolvedSpans() {
|
|
5122
|
+
const xs = this.clampSpan(this.xs);
|
|
5123
|
+
const smIn = this.optionalSpan(this.sm);
|
|
5124
|
+
const mdIn = this.optionalSpan(this.md);
|
|
5125
|
+
const lgIn = this.optionalSpan(this.lg);
|
|
5126
|
+
const xlIn = this.optionalSpan(this.xl);
|
|
5127
|
+
const sm = this.clampSpan(this.firstDefined(smIn, mdIn, lgIn, xlIn, xs));
|
|
5128
|
+
const md = this.clampSpan(this.firstDefined(mdIn, lgIn, xlIn, sm, xs));
|
|
5129
|
+
const lg = this.clampSpan(this.firstDefined(lgIn, xlIn, md, sm, xs));
|
|
5130
|
+
const xl = this.clampSpan(this.firstDefined(xlIn, lg, md, sm, xs));
|
|
5131
|
+
return { xs, sm, md, lg, xl };
|
|
5132
|
+
}
|
|
5133
|
+
optionalSpan(v) {
|
|
5134
|
+
if (v == null || !Number.isFinite(v)) {
|
|
5135
|
+
return undefined;
|
|
5136
|
+
}
|
|
5137
|
+
return this.clampSpan(v);
|
|
5138
|
+
}
|
|
5139
|
+
firstDefined(...candidates) {
|
|
5140
|
+
for (const c of candidates) {
|
|
5141
|
+
if (c != null && Number.isFinite(c)) {
|
|
5142
|
+
return c;
|
|
5143
|
+
}
|
|
5144
|
+
}
|
|
5145
|
+
return 12;
|
|
5146
|
+
}
|
|
5103
5147
|
clampSpan(n) {
|
|
5104
5148
|
if (!Number.isFinite(n) || n < 1) {
|
|
5105
5149
|
return 12;
|
|
5106
5150
|
}
|
|
5107
5151
|
return Math.min(12, Math.max(1, Math.round(n)));
|
|
5108
5152
|
}
|
|
5109
|
-
normalizeOptionalSpan(value, fallback) {
|
|
5110
|
-
if (value == null || !Number.isFinite(value)) {
|
|
5111
|
-
return fallback;
|
|
5112
|
-
}
|
|
5113
|
-
return this.clampSpan(value);
|
|
5114
|
-
}
|
|
5115
5153
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormColComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5116
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.2.9", type: FormColComponent, isStandalone: true, selector: "app-form-col", inputs: { xs: ["xs", "xs", numberAttribute], sm: "sm", md: "md", lg: "lg", xl: "xl", order: ["order", "order", numberAttribute], grow: ["grow", "grow", booleanAttribute] }, host: { properties: { "class": "this.hostClass", "attr.style": "this.hostVars" } }, ngImport: i0, template:
|
|
5154
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.2.9", type: FormColComponent, isStandalone: true, selector: "app-form-col", inputs: { xs: ["xs", "xs", numberAttribute], sm: "sm", md: "md", lg: "lg", xl: "xl", order: ["order", "order", numberAttribute], grow: ["grow", "grow", booleanAttribute], gap: "gap", align: "align", justify: "justify" }, host: { properties: { "class": "this.hostClass", "attr.style": "this.hostVars" } }, ngImport: i0, template: "<div class=\"form-col__inner\">\r\n <ng-content />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;min-width:0;box-sizing:border-box;grid-column:span var(--form-col-xs, 12)}.form-col__inner{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;width:100%;min-width:0;min-height:0;box-sizing:border-box}:host(.form-col--gap-xs) .form-col__inner{gap:.35rem}:host(.form-col--gap-sm) .form-col__inner{gap:.5rem}:host(.form-col--gap-md) .form-col__inner{gap:.75rem}:host(.form-col--gap-lg) .form-col__inner{gap:1rem}:host(.form-col--align-start) .form-col__inner{align-items:flex-start}:host(.form-col--align-center) .form-col__inner{align-items:center}:host(.form-col--align-end) .form-col__inner{align-items:flex-end}:host(.form-col--align-stretch) .form-col__inner{align-items:stretch}:host(.form-col--justify-start) .form-col__inner{justify-content:flex-start}:host(.form-col--justify-center) .form-col__inner{justify-content:center}:host(.form-col--justify-end) .form-col__inner{justify-content:flex-end}:host(.form-col--justify-between) .form-col__inner{justify-content:space-between}@media(min-width:40rem){:host{grid-column:span var(--form-col-sm, var(--form-col-xs, 12))}}@media(min-width:48rem){:host{grid-column:span var(--form-col-md, var(--form-col-sm, var(--form-col-xs, 12)))}}@media(min-width:64rem){:host{grid-column:span var(--form-col-lg, var(--form-col-md, var(--form-col-sm, var(--form-col-xs, 12))))}}@media(min-width:80rem){:host{grid-column:span var(--form-col-xl, var(--form-col-lg, var(--form-col-md, var(--form-col-sm, var(--form-col-xs, 12)))))}}:host.form-col--grow{min-width:0;grid-column:auto/-1}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5117
5155
|
}
|
|
5118
5156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormColComponent, decorators: [{
|
|
5119
5157
|
type: Component,
|
|
5120
|
-
args: [{ selector: 'app-form-col', standalone: true, template:
|
|
5158
|
+
args: [{ selector: 'app-form-col', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-col__inner\">\r\n <ng-content />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;min-width:0;box-sizing:border-box;grid-column:span var(--form-col-xs, 12)}.form-col__inner{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;width:100%;min-width:0;min-height:0;box-sizing:border-box}:host(.form-col--gap-xs) .form-col__inner{gap:.35rem}:host(.form-col--gap-sm) .form-col__inner{gap:.5rem}:host(.form-col--gap-md) .form-col__inner{gap:.75rem}:host(.form-col--gap-lg) .form-col__inner{gap:1rem}:host(.form-col--align-start) .form-col__inner{align-items:flex-start}:host(.form-col--align-center) .form-col__inner{align-items:center}:host(.form-col--align-end) .form-col__inner{align-items:flex-end}:host(.form-col--align-stretch) .form-col__inner{align-items:stretch}:host(.form-col--justify-start) .form-col__inner{justify-content:flex-start}:host(.form-col--justify-center) .form-col__inner{justify-content:center}:host(.form-col--justify-end) .form-col__inner{justify-content:flex-end}:host(.form-col--justify-between) .form-col__inner{justify-content:space-between}@media(min-width:40rem){:host{grid-column:span var(--form-col-sm, var(--form-col-xs, 12))}}@media(min-width:48rem){:host{grid-column:span var(--form-col-md, var(--form-col-sm, var(--form-col-xs, 12)))}}@media(min-width:64rem){:host{grid-column:span var(--form-col-lg, var(--form-col-md, var(--form-col-sm, var(--form-col-xs, 12))))}}@media(min-width:80rem){:host{grid-column:span var(--form-col-xl, var(--form-col-lg, var(--form-col-md, var(--form-col-sm, var(--form-col-xs, 12)))))}}:host.form-col--grow{min-width:0;grid-column:auto/-1}\n"] }]
|
|
5121
5159
|
}], propDecorators: { xs: [{
|
|
5122
5160
|
type: Input,
|
|
5123
5161
|
args: [{ transform: numberAttribute }]
|
|
@@ -5135,6 +5173,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
5135
5173
|
}], grow: [{
|
|
5136
5174
|
type: Input,
|
|
5137
5175
|
args: [{ transform: booleanAttribute }]
|
|
5176
|
+
}], gap: [{
|
|
5177
|
+
type: Input
|
|
5178
|
+
}], align: [{
|
|
5179
|
+
type: Input
|
|
5180
|
+
}], justify: [{
|
|
5181
|
+
type: Input
|
|
5138
5182
|
}], hostClass: [{
|
|
5139
5183
|
type: HostBinding,
|
|
5140
5184
|
args: ['class']
|
|
@@ -5610,9 +5654,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
5610
5654
|
|
|
5611
5655
|
class FormRowComponent {
|
|
5612
5656
|
constructor() {
|
|
5613
|
-
this.gap =
|
|
5657
|
+
this.gap = FormLayoutGap.Md;
|
|
5614
5658
|
this.align = FormRowAlign.Stretch;
|
|
5615
5659
|
this.justify = FormRowJustify.Start;
|
|
5660
|
+
/** Filhos sem `app-form-col` ocupam a linha inteira; `app-form-col` com `[grow]` preenche o espaço restante na grelha. */
|
|
5661
|
+
this.grow = false;
|
|
5616
5662
|
this.wrap = true;
|
|
5617
5663
|
this.stackOnMobile = true;
|
|
5618
5664
|
}
|
|
@@ -5623,6 +5669,9 @@ class FormRowComponent {
|
|
|
5623
5669
|
`form-row--align-${this.align}`,
|
|
5624
5670
|
`form-row--justify-${this.justify}`,
|
|
5625
5671
|
];
|
|
5672
|
+
if (this.grow) {
|
|
5673
|
+
parts.push('form-row--grow');
|
|
5674
|
+
}
|
|
5626
5675
|
if (this.wrap) {
|
|
5627
5676
|
parts.push('form-row--wrap');
|
|
5628
5677
|
}
|
|
@@ -5632,17 +5681,20 @@ class FormRowComponent {
|
|
|
5632
5681
|
return parts.join(' ');
|
|
5633
5682
|
}
|
|
5634
5683
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5635
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.2.9", type: FormRowComponent, isStandalone: true, selector: "app-form-row", inputs: { gap: "gap", align: "align", justify: "justify", wrap: ["wrap", "wrap", booleanAttribute], stackOnMobile: ["stackOnMobile", "stackOnMobile", booleanAttribute] }, host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<div class=\"form-row__grid\">\r\n <ng-content />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%;min-width:0;box-sizing:border-box}.form-row__grid{display:grid;width:100%;min-width:0;box-sizing:border-box;grid-template-columns:repeat(12,minmax(0,1fr));align-items:stretch}:host(.form-row--gap-xs) .form-row__grid{gap:.35rem .5rem}:host(.form-row--gap-sm) .form-row__grid{gap:.5rem .75rem}:host(.form-row--gap-md) .form-row__grid{gap:.75rem 1.25rem}:host(.form-row--gap-lg) .form-row__grid{gap:1rem 1.5rem}:host(.form-row--align-start) .form-row__grid{align-items:start}:host(.form-row--align-center) .form-row__grid{align-items:center}:host(.form-row--align-end) .form-row__grid{align-items:end}:host(.form-row--align-stretch) .form-row__grid{align-items:stretch}:host(.form-row--justify-start) .form-row__grid{justify-items:stretch;justify-content:start}:host(.form-row--justify-center) .form-row__grid{justify-content:center}:host(.form-row--justify-end) .form-row__grid{justify-content:end}:host(.form-row--justify-between) .form-row__grid{justify-content:space-between}@media(max-width:39.98rem){:host(.form-row--stack-mobile) .form-row__grid{grid-template-columns:1fr}:host(.form-row--stack-mobile) .form-row__grid ::ng-deep>app-form-col{grid-column:1/-1!important}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5684
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.2.9", type: FormRowComponent, isStandalone: true, selector: "app-form-row", inputs: { gap: "gap", align: "align", justify: "justify", grow: ["grow", "grow", booleanAttribute], wrap: ["wrap", "wrap", booleanAttribute], stackOnMobile: ["stackOnMobile", "stackOnMobile", booleanAttribute] }, host: { properties: { "class": "this.hostClass" } }, ngImport: i0, template: "<div class=\"form-row__grid\">\r\n <ng-content />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%;min-width:0;box-sizing:border-box}.form-row__grid{display:grid;width:100%;min-width:0;box-sizing:border-box;grid-template-columns:repeat(12,minmax(0,1fr));align-items:stretch}:host(.form-row--gap-xs) .form-row__grid{gap:.35rem .5rem}:host(.form-row--gap-sm) .form-row__grid{gap:.5rem .75rem}:host(.form-row--gap-md) .form-row__grid{gap:.75rem 1.25rem}:host(.form-row--gap-lg) .form-row__grid{gap:1rem 1.5rem}:host(.form-row--grow) .form-row__grid>:not(app-form-col){min-width:0;grid-column:1/-1}:host(.form-row--align-start) .form-row__grid{align-items:start}:host(.form-row--align-center) .form-row__grid{align-items:center}:host(.form-row--align-end) .form-row__grid{align-items:end}:host(.form-row--align-stretch) .form-row__grid{align-items:stretch}:host(.form-row--justify-start) .form-row__grid{justify-items:stretch;justify-content:start}:host(.form-row--justify-center) .form-row__grid{justify-content:center}:host(.form-row--justify-end) .form-row__grid{justify-content:end}:host(.form-row--justify-between) .form-row__grid{justify-content:space-between}@media(max-width:39.98rem){:host(.form-row--stack-mobile) .form-row__grid{grid-template-columns:1fr}:host(.form-row--stack-mobile) .form-row__grid ::ng-deep>app-form-col{grid-column:1/-1!important}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5636
5685
|
}
|
|
5637
5686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormRowComponent, decorators: [{
|
|
5638
5687
|
type: Component,
|
|
5639
|
-
args: [{ selector: 'app-form-row', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row__grid\">\r\n <ng-content />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%;min-width:0;box-sizing:border-box}.form-row__grid{display:grid;width:100%;min-width:0;box-sizing:border-box;grid-template-columns:repeat(12,minmax(0,1fr));align-items:stretch}:host(.form-row--gap-xs) .form-row__grid{gap:.35rem .5rem}:host(.form-row--gap-sm) .form-row__grid{gap:.5rem .75rem}:host(.form-row--gap-md) .form-row__grid{gap:.75rem 1.25rem}:host(.form-row--gap-lg) .form-row__grid{gap:1rem 1.5rem}:host(.form-row--align-start) .form-row__grid{align-items:start}:host(.form-row--align-center) .form-row__grid{align-items:center}:host(.form-row--align-end) .form-row__grid{align-items:end}:host(.form-row--align-stretch) .form-row__grid{align-items:stretch}:host(.form-row--justify-start) .form-row__grid{justify-items:stretch;justify-content:start}:host(.form-row--justify-center) .form-row__grid{justify-content:center}:host(.form-row--justify-end) .form-row__grid{justify-content:end}:host(.form-row--justify-between) .form-row__grid{justify-content:space-between}@media(max-width:39.98rem){:host(.form-row--stack-mobile) .form-row__grid{grid-template-columns:1fr}:host(.form-row--stack-mobile) .form-row__grid ::ng-deep>app-form-col{grid-column:1/-1!important}}\n"] }]
|
|
5688
|
+
args: [{ selector: 'app-form-row', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-row__grid\">\r\n <ng-content />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%;min-width:0;box-sizing:border-box}.form-row__grid{display:grid;width:100%;min-width:0;box-sizing:border-box;grid-template-columns:repeat(12,minmax(0,1fr));align-items:stretch}:host(.form-row--gap-xs) .form-row__grid{gap:.35rem .5rem}:host(.form-row--gap-sm) .form-row__grid{gap:.5rem .75rem}:host(.form-row--gap-md) .form-row__grid{gap:.75rem 1.25rem}:host(.form-row--gap-lg) .form-row__grid{gap:1rem 1.5rem}:host(.form-row--grow) .form-row__grid>:not(app-form-col){min-width:0;grid-column:1/-1}:host(.form-row--align-start) .form-row__grid{align-items:start}:host(.form-row--align-center) .form-row__grid{align-items:center}:host(.form-row--align-end) .form-row__grid{align-items:end}:host(.form-row--align-stretch) .form-row__grid{align-items:stretch}:host(.form-row--justify-start) .form-row__grid{justify-items:stretch;justify-content:start}:host(.form-row--justify-center) .form-row__grid{justify-content:center}:host(.form-row--justify-end) .form-row__grid{justify-content:end}:host(.form-row--justify-between) .form-row__grid{justify-content:space-between}@media(max-width:39.98rem){:host(.form-row--stack-mobile) .form-row__grid{grid-template-columns:1fr}:host(.form-row--stack-mobile) .form-row__grid ::ng-deep>app-form-col{grid-column:1/-1!important}}\n"] }]
|
|
5640
5689
|
}], propDecorators: { gap: [{
|
|
5641
5690
|
type: Input
|
|
5642
5691
|
}], align: [{
|
|
5643
5692
|
type: Input
|
|
5644
5693
|
}], justify: [{
|
|
5645
5694
|
type: Input
|
|
5695
|
+
}], grow: [{
|
|
5696
|
+
type: Input,
|
|
5697
|
+
args: [{ transform: booleanAttribute }]
|
|
5646
5698
|
}], wrap: [{
|
|
5647
5699
|
type: Input,
|
|
5648
5700
|
args: [{ transform: booleanAttribute }]
|
|
@@ -7409,7 +7461,7 @@ class AppDialogComponent {
|
|
|
7409
7461
|
* valores de `:root` (azul); alinhamos ao CDK Dialog (`libDialogPanelClasses`).
|
|
7410
7462
|
*/
|
|
7411
7463
|
get hostThemeClasses() {
|
|
7412
|
-
return
|
|
7464
|
+
return this.appTheme.themeClass();
|
|
7413
7465
|
}
|
|
7414
7466
|
ngOnInit() {
|
|
7415
7467
|
this.stripHostNativeTitle();
|
|
@@ -7611,7 +7663,7 @@ class AppLibLightBlockScrollStrategy {
|
|
|
7611
7663
|
/** Classes aplicadas ao painel CDK Dialog + tema da app. */
|
|
7612
7664
|
function libDialogPanelClasses(theme, extra = []) {
|
|
7613
7665
|
const rest = Array.isArray(extra) ? extra : [extra];
|
|
7614
|
-
return ['app-lib-dialog-panel',
|
|
7666
|
+
return ['app-lib-dialog-panel', ...theme.themeClassList(), ...rest];
|
|
7615
7667
|
}
|
|
7616
7668
|
|
|
7617
7669
|
class ConfirmDialogService {
|
|
@@ -7847,13 +7899,7 @@ class ContextMenuComponent {
|
|
|
7847
7899
|
this.overlayRef = null;
|
|
7848
7900
|
this.escSub = null;
|
|
7849
7901
|
this.generatedId = `app-ctx-${Math.random().toString(36).slice(2, 9)}`;
|
|
7850
|
-
this.panelThemeNgClass = computed(() => {
|
|
7851
|
-
const themeClass = this.appTheme.themeClass();
|
|
7852
|
-
return {
|
|
7853
|
-
'app-library-theme': true,
|
|
7854
|
-
[themeClass]: true,
|
|
7855
|
-
};
|
|
7856
|
-
}, ...(ngDevMode ? [{ debugName: "panelThemeNgClass" }] : /* istanbul ignore next */ []));
|
|
7902
|
+
this.panelThemeNgClass = computed(() => this.appTheme.themeClassMap(), ...(ngDevMode ? [{ debugName: "panelThemeNgClass" }] : /* istanbul ignore next */ []));
|
|
7857
7903
|
}
|
|
7858
7904
|
get resolvedMenuId() {
|
|
7859
7905
|
return this.menuId.trim() || this.generatedId;
|
|
@@ -7873,11 +7919,10 @@ class ContextMenuComponent {
|
|
|
7873
7919
|
this.disposeOverlay();
|
|
7874
7920
|
const left = Math.min(clientX, window.innerWidth - PANEL_MIN_W - VIEWPORT_PAD);
|
|
7875
7921
|
const top = Math.min(clientY, window.innerHeight - VIEWPORT_PAD);
|
|
7876
|
-
const themeClass = this.appTheme.themeClass();
|
|
7877
7922
|
this.overlayRef = this.overlay.create({
|
|
7878
7923
|
hasBackdrop: true,
|
|
7879
7924
|
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
7880
|
-
panelClass: [
|
|
7925
|
+
panelClass: [...this.appTheme.themeClassList()],
|
|
7881
7926
|
scrollStrategy: this.overlay.scrollStrategies.close(),
|
|
7882
7927
|
positionStrategy: this.overlay
|
|
7883
7928
|
.position()
|
|
@@ -8158,14 +8203,11 @@ class AnchoredOverlayComponent {
|
|
|
8158
8203
|
* Estratégia de scroll (predefinição: reposicionar; `close` para fechar ao scroll em certos modais).
|
|
8159
8204
|
*/
|
|
8160
8205
|
this.scrollStrategy = null;
|
|
8161
|
-
this.overlayPanelClasses = computed(() => [
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
[themeClass]: true,
|
|
8167
|
-
};
|
|
8168
|
-
}, ...(ngDevMode ? [{ debugName: "panelThemeNgClass" }] : /* istanbul ignore next */ []));
|
|
8206
|
+
this.overlayPanelClasses = computed(() => [
|
|
8207
|
+
...this.appTheme.themeClassList(),
|
|
8208
|
+
'anchored-overlay__pane',
|
|
8209
|
+
], ...(ngDevMode ? [{ debugName: "overlayPanelClasses" }] : /* istanbul ignore next */ []));
|
|
8210
|
+
this.panelThemeNgClass = computed(() => this.appTheme.themeClassMap(), ...(ngDevMode ? [{ debugName: "panelThemeNgClass" }] : /* istanbul ignore next */ []));
|
|
8169
8211
|
this.defaultScrollStrategy = this.overlay.scrollStrategies.reposition();
|
|
8170
8212
|
}
|
|
8171
8213
|
get effectiveScrollStrategy() {
|
|
@@ -8671,7 +8713,7 @@ class AppShellComponent {
|
|
|
8671
8713
|
this.DrawerSize = DrawerSize;
|
|
8672
8714
|
}
|
|
8673
8715
|
get hostThemeClasses() {
|
|
8674
|
-
return
|
|
8716
|
+
return this.theme.themeClass();
|
|
8675
8717
|
}
|
|
8676
8718
|
/** Conteúdo lateral (obrigatório): `<ng-template appShellSidebar>...</ng-template>`. */
|
|
8677
8719
|
get sidebarTemplate() {
|
|
@@ -8752,7 +8794,7 @@ class AppSidebarComponent {
|
|
|
8752
8794
|
* herdarem a paleta activa (útil fora da demo ou sem antepassado tematizado).
|
|
8753
8795
|
*/
|
|
8754
8796
|
get hostThemeClasses() {
|
|
8755
|
-
return
|
|
8797
|
+
return this.theme.themeClass();
|
|
8756
8798
|
}
|
|
8757
8799
|
constructor() {
|
|
8758
8800
|
this.theme = inject(AppThemeService);
|
|
@@ -8969,5 +9011,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
8969
9011
|
* Generated bundle index. Do not edit.
|
|
8970
9012
|
*/
|
|
8971
9013
|
|
|
8972
|
-
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, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseButtonComponent, BaseButtonType, BaseButtonVariant, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, 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, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormRowAlign, FormRowComponent,
|
|
9014
|
+
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, AppThemeService, AppTopbarComponent, AppUserMenuComponent, BR_ESTADOS_NOME_SIGLA, BaseButtonComponent, BaseButtonType, BaseButtonVariant, BaseFieldComponent, BaseFieldDirective, BooleanFieldDirective, 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, FormActionsAlign, FormActionsComponent, FormColComponent, FormGroupComponent, FormGroupVariant, FormLayoutGap, FormRowAlign, FormRowComponent, FormRowJustify, FormSectionComponent, FormTabComponent, FormTabsComponent, InputMaskFieldComponent, IntegerFieldComponent, LayoutStackAlign, LayoutStackComponent, LibDialogSize, ListItemComponent, LoadingDialogComponent, LoadingDialogService, MaskedTextFieldBase, MenuDividerComponent, MenuDropdownPlacement, MenuGroupComponent, MenuListComponent, MultiselectFieldComponent, NgControlFieldDirective, OverlayPlacement, 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, applyPickedCalendarDate, buildDecimalBrDisplay, buildDecimalBrParseString, buildEmptyStateOverlayHtml, caretIndexFromIntegerDigitCount, caretIndexFromSemantic, cepMaskCompleteValidator, cpfCnpjMaskCompleteValidator, escapeHtml, extractDecimalBrParts, fixedDigitsMaskCompleteValidator, formatDateTimePtBr, formatDecimalBr, formatIntegerThousandsBr, formatMaskDigits, formatUiFieldDateValue, libDialogPanelClasses, mapEstadosToOptions, maskDigitCount, normalizeFormDateValue, parseDecimalBr, parseIntegerString, parseUiFieldDateValue, phoneBrMaskCompleteValidator, resolveControlAtPath, sanitizeDecimalBrInput, sanitizeIntegerDigits, sectionHasVisibleInvalid, semanticCaretAt, semanticIntegerDigitCountLeft, stripToDigits, subscribeMarkForCheckOnInvalidUiRefresh, subtreeHasVisibleInvalid };
|
|
8973
9015
|
//# sourceMappingURL=structra-ui.mjs.map
|