@ngx-smz/core 21.10.0-next.22 → 21.10.0-next.26
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/ngx-smz-core-accordion.entry-eJx4b8sc.mjs +207 -0
- package/fesm2022/ngx-smz-core-accordion.entry-eJx4b8sc.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-auto-complete.entry-Dae5b9RV.mjs +177 -0
- package/fesm2022/ngx-smz-core-auto-complete.entry-Dae5b9RV.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-badge.entry-B41_dpHY.mjs +161 -0
- package/fesm2022/ngx-smz-core-badge.entry-B41_dpHY.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-block-ui.entry-CIHcYs_K.mjs +216 -0
- package/fesm2022/ngx-smz-core-block-ui.entry-CIHcYs_K.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-button.entry-BnuvjYDb.mjs +115 -0
- package/fesm2022/ngx-smz-core-button.entry-BnuvjYDb.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-card.entry-y1HBCXvH.mjs +246 -0
- package/fesm2022/ngx-smz-core-card.entry-y1HBCXvH.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-checkbox.entry-BXep3014.mjs +150 -0
- package/fesm2022/ngx-smz-core-checkbox.entry-BXep3014.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-color-picker.entry-DFoq8VVR.mjs +104 -0
- package/fesm2022/ngx-smz-core-color-picker.entry-DFoq8VVR.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-data-view.entry-7a8EK3iw.mjs +269 -0
- package/fesm2022/ngx-smz-core-data-view.entry-7a8EK3iw.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-date-picker.entry-BkHkYYlp.mjs +283 -0
- package/fesm2022/ngx-smz-core-date-picker.entry-BkHkYYlp.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-dialog.entry-DTXyU2ec.mjs +160 -0
- package/fesm2022/ngx-smz-core-dialog.entry-DTXyU2ec.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-divider.entry-BA72_mSC.mjs +154 -0
- package/fesm2022/ngx-smz-core-divider.entry-BA72_mSC.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-drawer.entry-D-hukt8J.mjs +97 -0
- package/fesm2022/ngx-smz-core-drawer.entry-D-hukt8J.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-file-upload.entry-C0GT7-RQ.mjs +87 -0
- package/fesm2022/ngx-smz-core-file-upload.entry-C0GT7-RQ.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-float-label.entry-BVY4Wc8t.mjs +300 -0
- package/fesm2022/ngx-smz-core-float-label.entry-BVY4Wc8t.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-gallery-entry-host.component-BEFQ6Bo3.mjs +90 -0
- package/fesm2022/ngx-smz-core-gallery-entry-host.component-BEFQ6Bo3.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-gallery-index.component-DhvAR0zL.mjs +56 -0
- package/fesm2022/ngx-smz-core-gallery-index.component-DhvAR0zL.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-icon-field.entry-Da7XWGW4.mjs +180 -0
- package/fesm2022/ngx-smz-core-icon-field.entry-Da7XWGW4.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-icon.entry-C5ZyOSTK.mjs +162 -0
- package/fesm2022/ngx-smz-core-icon.entry-C5ZyOSTK.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-input-mask.entry-Dgebm0ZX.mjs +98 -0
- package/fesm2022/ngx-smz-core-input-mask.entry-Dgebm0ZX.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-input-number.entry-BklaVzvh.mjs +120 -0
- package/fesm2022/ngx-smz-core-input-number.entry-BklaVzvh.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-input.entry-CqTD4MoY.mjs +161 -0
- package/fesm2022/ngx-smz-core-input.entry-CqTD4MoY.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-listbox.entry-fDAZ9xHZ.mjs +189 -0
- package/fesm2022/ngx-smz-core-listbox.entry-fDAZ9xHZ.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-menu.entry-DpETH4gH.mjs +169 -0
- package/fesm2022/ngx-smz-core-menu.entry-DpETH4gH.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-message.entry-C0n3DQoP.mjs +117 -0
- package/fesm2022/ngx-smz-core-message.entry-C0n3DQoP.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-multi-select.entry-C-v_7eTj.mjs +185 -0
- package/fesm2022/ngx-smz-core-multi-select.entry-C-v_7eTj.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-paginator.entry-y8FSSbG1.mjs +294 -0
- package/fesm2022/ngx-smz-core-paginator.entry-y8FSSbG1.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-panel.entry-DNtKjOf3.mjs +264 -0
- package/fesm2022/ngx-smz-core-panel.entry-DNtKjOf3.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-password.entry-tqK4d6HI.mjs +111 -0
- package/fesm2022/ngx-smz-core-password.entry-tqK4d6HI.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-pick-list.entry-BTqJ2p0_.mjs +135 -0
- package/fesm2022/ngx-smz-core-pick-list.entry-BTqJ2p0_.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-popover.entry-P5gJ7hgR.mjs +102 -0
- package/fesm2022/ngx-smz-core-popover.entry-P5gJ7hgR.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-progress-bar.entry-BtYVsSBc.mjs +136 -0
- package/fesm2022/ngx-smz-core-progress-bar.entry-BtYVsSBc.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-progress-spinner.entry-Be-nry65.mjs +133 -0
- package/fesm2022/ngx-smz-core-progress-spinner.entry-Be-nry65.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-radio-button.entry-kq6y5-7C.mjs +157 -0
- package/fesm2022/ngx-smz-core-radio-button.entry-kq6y5-7C.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-select-button.entry-qL4LqSJy.mjs +137 -0
- package/fesm2022/ngx-smz-core-select-button.entry-qL4LqSJy.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-select.entry-B2EwkXCm.mjs +182 -0
- package/fesm2022/ngx-smz-core-select.entry-B2EwkXCm.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-skeleton.entry-DskIePCj.mjs +170 -0
- package/fesm2022/ngx-smz-core-skeleton.entry-DskIePCj.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-splitter.entry-DBpMsMiA.mjs +315 -0
- package/fesm2022/ngx-smz-core-splitter.entry-DBpMsMiA.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-tabs.entry-CDVgGwpr.mjs +320 -0
- package/fesm2022/ngx-smz-core-tabs.entry-CDVgGwpr.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-tag.entry-BILUwPN4.mjs +107 -0
- package/fesm2022/ngx-smz-core-tag.entry-BILUwPN4.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-timeline.entry-zGNVU6MT.mjs +281 -0
- package/fesm2022/ngx-smz-core-timeline.entry-zGNVU6MT.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-toast.entry-Bg84Dusm.mjs +173 -0
- package/fesm2022/ngx-smz-core-toast.entry-Bg84Dusm.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-toggle-switch.entry-BL6WW8tz.mjs +83 -0
- package/fesm2022/ngx-smz-core-toggle-switch.entry-BL6WW8tz.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-toolbar.entry-DapJhW_n.mjs +263 -0
- package/fesm2022/ngx-smz-core-toolbar.entry-DapJhW_n.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-tooltip.entry-7Fi6DNQW.mjs +186 -0
- package/fesm2022/ngx-smz-core-tooltip.entry-7Fi6DNQW.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-tree-select.entry-DNaXIQi9.mjs +176 -0
- package/fesm2022/ngx-smz-core-tree-select.entry-DNaXIQi9.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-tree-table.entry-B-0f2_5K.mjs +585 -0
- package/fesm2022/ngx-smz-core-tree-table.entry-B-0f2_5K.mjs.map +1 -0
- package/fesm2022/ngx-smz-core-tree.entry-DPnWM-HQ.mjs +380 -0
- package/fesm2022/ngx-smz-core-tree.entry-DPnWM-HQ.mjs.map +1 -0
- package/fesm2022/ngx-smz-core.mjs +342 -94
- package/fesm2022/ngx-smz-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngx-smz-core.d.ts +120 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-smz-core-card.entry-y1HBCXvH.mjs","sources":["../../../projects/ngx-smz-ui/src/lib/modules/smz-design-system/gallery/entries/kit/card.entry.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { SmzButtonComponent, SmzCardComponent, SmzTemplateDirective } from '@ngx-smz/ui-kit';\nimport { SmzGalleryCaseComponent } from '../../gallery-case.component';\nimport { SmzGallerySectionComponent } from '../../gallery-section.component';\n\n/** Galeria: card com título e subtítulo em texto ou template, área de cabeçalho, rodapé e conteúdos extremos. */\n@Component({\n selector: 'smz-gallery-card-entry',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SmzButtonComponent, SmzCardComponent, SmzTemplateDirective, SmzGalleryCaseComponent, SmzGallerySectionComponent],\n host: { class: 'flex flex-col gap-8' },\n template: `\n <smz-gallery-section label=\"Título e subtítulo\" [columns]=\"4\">\n <smz-gallery-case label=\"só conteúdo\">\n <ui-card class=\"w-full\">{{ resumo }}</ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"título\">\n <ui-card class=\"w-full\" header=\"Contrato 2024/018\">{{ resumo }}</ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"título e subtítulo\">\n <ui-card class=\"w-full\" header=\"Contrato 2024/018\" subheader=\"Vigente até 31/12/2025\">{{ resumo }}</ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"só subtítulo\">\n <ui-card class=\"w-full\" subheader=\"Vigente até 31/12/2025\">{{ resumo }}</ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"título e subtítulo sem conteúdo\">\n <ui-card class=\"w-full\" header=\"Contrato 2024/018\" subheader=\"Vigente até 31/12/2025\" />\n </smz-gallery-case>\n <smz-gallery-case label=\"vazio\">\n <ui-card class=\"w-full\" />\n </smz-gallery-case>\n </smz-gallery-section>\n\n <smz-gallery-section label=\"Templates\" [columns]=\"4\">\n <smz-gallery-case label=\"template de título e subtítulo\">\n <ui-card class=\"w-full\">\n <ng-template smzTemplate=\"title\">\n <span class=\"flex items-center gap-2\"><i class=\"fa-solid fa-file-contract\" aria-hidden=\"true\"></i><span>Contrato 2024/018</span></span>\n </ng-template>\n <ng-template smzTemplate=\"subtitle\">\n <span class=\"flex items-center justify-between gap-2\"><span>Fornecedor: Metalúrgica Aurora</span><span>Ativo</span></span>\n </ng-template>\n {{ resumo }}\n </ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"área de cabeçalho\">\n <ui-card class=\"w-full\" header=\"Contrato 2024/018\" subheader=\"Vigente até 31/12/2025\">\n <ng-template smzTemplate=\"header\">\n <div class=\"flex h-24 w-full items-center justify-center bg-ui-surface-3 text-ui-fg-muted\">\n <i class=\"fa-solid fa-image\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n {{ resumo }}\n </ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"rodapé com ações\">\n <ui-card class=\"w-full\" header=\"Contrato 2024/018\" subheader=\"Vigente até 31/12/2025\">\n {{ resumo }}\n <ng-template smzTemplate=\"footer\">\n <div class=\"flex justify-end gap-2\">\n <button smzButton type=\"button\" label=\"Cancelar\" variant=\"text\" severity=\"secondary\"></button>\n <button smzButton type=\"button\" label=\"Renovar\"></button>\n </div>\n </ng-template>\n </ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"cabeçalho, título, subtítulo e rodapé\">\n <ui-card class=\"w-full\">\n <ng-template smzTemplate=\"header\">\n <div class=\"flex h-24 w-full items-center justify-center bg-ui-surface-3 text-ui-fg-muted\">\n <i class=\"fa-solid fa-image\" aria-hidden=\"true\"></i>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"title\">Contrato 2024/018</ng-template>\n <ng-template smzTemplate=\"subtitle\">Vigente até 31/12/2025</ng-template>\n {{ resumo }}\n <ng-template smzTemplate=\"footer\">\n <div class=\"flex justify-end gap-2\">\n <button smzButton type=\"button\" label=\"Detalhes\" variant=\"outlined\"></button>\n </div>\n </ng-template>\n </ui-card>\n </smz-gallery-case>\n </smz-gallery-section>\n\n <smz-gallery-section label=\"Conteúdo e altura\" [columns]=\"4\">\n <smz-gallery-case label=\"título longo (quebra)\">\n <ui-card class=\"w-full\" header=\"Contrato de prestação de serviços de manutenção preventiva e corretiva\" subheader=\"Vigente até 31/12/2025, renovável por períodos iguais e sucessivos\">\n {{ resumo }}\n </ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"conteúdo longo\">\n <ui-card class=\"w-full\" header=\"Observações\">\n <div class=\"flex flex-col gap-2\">\n <p>{{ resumo }}</p>\n <p>O reajuste anual segue o índice definido na cláusula sétima, aplicado sobre o valor mensal vigente.</p>\n <p>A rescisão antecipada exige aviso prévio de sessenta dias.</p>\n </div>\n </ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"altura fixa · rodapé no fim\">\n <ui-card class=\"h-64 w-full\" header=\"Indicador\" subheader=\"Mês atual\">\n 128 chamados\n <ng-template smzTemplate=\"footer\"><span class=\"text-ui-fg-muted\">Atualizado às 08h00</span></ng-template>\n </ui-card>\n </smz-gallery-case>\n <smz-gallery-case label=\"lista de campos\">\n <ui-card class=\"w-full\" header=\"Resumo\">\n <div class=\"flex flex-col gap-2\">\n @for (campo of campos; track campo.rotulo) {\n <div class=\"flex items-center justify-between gap-2\">\n <span class=\"text-ui-fg-muted\">{{ campo.rotulo }}</span>\n <span>{{ campo.valor }}</span>\n </div>\n }\n </div>\n </ui-card>\n </smz-gallery-case>\n </smz-gallery-section>\n `,\n})\nexport class CardGalleryEntryComponent {\n protected readonly resumo = 'Manutenção preventiva dos equipamentos da linha 2, com visitas mensais.';\n\n protected readonly campos: { rotulo: string; valor: string }[] = [\n { rotulo: 'Fornecedor', valor: 'Metalúrgica Aurora' },\n { rotulo: 'Valor mensal', valor: 'R$ 12.400,00' },\n { rotulo: 'Início', valor: '01/01/2024' },\n { rotulo: 'Término', valor: '31/12/2025' },\n ];\n}\n"],"names":[],"mappings":";;;;;AAKA;MAoHa,yBAAyB,CAAA;IACjB,MAAM,GAAG,yEAAyE;AAElF,IAAA,MAAM,GAAwC;AAC/D,QAAA,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,oBAAoB,EAAE;AACrD,QAAA,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;AACjD,QAAA,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE;AACzC,QAAA,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE;KAC3C;uGARU,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,qBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA9G1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GT,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EA9GS,kBAAkB,8MAAE,gBAAgB,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,oBAAoB,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,uBAAuB,mGAAE,0BAA0B,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAgH9G,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAnHrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;oBAClC,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,0BAA0B,CAAC;AAC1H,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE;AACtC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4GT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { SmzCheckboxComponent } from '@ngx-smz/ui-kit';
|
|
6
|
+
import { SmzGalleryCaseComponent, SmzGallerySectionComponent } from './ngx-smz-core.mjs';
|
|
7
|
+
|
|
8
|
+
/** Galeria: checkbox desmarcado e marcado em todos os estados, no modo booleano e no modo grupo. */
|
|
9
|
+
class CheckboxGalleryEntryComponent {
|
|
10
|
+
options = [
|
|
11
|
+
{ value: 'email', label: 'E-mail' },
|
|
12
|
+
{ value: 'sms', label: 'SMS' },
|
|
13
|
+
{ value: 'push', label: 'Notificação no aplicativo' },
|
|
14
|
+
];
|
|
15
|
+
off = new FormControl(false);
|
|
16
|
+
on = new FormControl(true);
|
|
17
|
+
disabledOff = new FormControl({ value: false, disabled: true });
|
|
18
|
+
disabledOn = new FormControl({ value: true, disabled: true });
|
|
19
|
+
none = new FormControl([]);
|
|
20
|
+
some = new FormControl(['email', 'push']);
|
|
21
|
+
all = new FormControl(['email', 'sms', 'push']);
|
|
22
|
+
disabledSome = new FormControl({ value: ['email', 'push'], disabled: true });
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CheckboxGalleryEntryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: CheckboxGalleryEntryComponent, isStandalone: true, selector: "smz-gallery-checkbox-entry", host: { classAttribute: "flex flex-col gap-8" }, ngImport: i0, template: `
|
|
25
|
+
<smz-gallery-section label="Desmarcado" [columns]="4">
|
|
26
|
+
<smz-gallery-case label="padrão"><ui-checkbox label="Aceito os termos" [formControl]="off" /></smz-gallery-case>
|
|
27
|
+
<smz-gallery-case label="hover" force="hover"><ui-checkbox label="Aceito os termos" [formControl]="off" /></smz-gallery-case>
|
|
28
|
+
<smz-gallery-case label="foco" force="focus-visible"><ui-checkbox label="Aceito os termos" [formControl]="off" /></smz-gallery-case>
|
|
29
|
+
<smz-gallery-case label="desabilitado"><ui-checkbox label="Aceito os termos" [formControl]="disabledOff" /></smz-gallery-case>
|
|
30
|
+
</smz-gallery-section>
|
|
31
|
+
|
|
32
|
+
<smz-gallery-section label="Marcado" [columns]="4">
|
|
33
|
+
<smz-gallery-case label="padrão"><ui-checkbox label="Aceito os termos" [formControl]="on" /></smz-gallery-case>
|
|
34
|
+
<smz-gallery-case label="hover" force="hover"><ui-checkbox label="Aceito os termos" [formControl]="on" /></smz-gallery-case>
|
|
35
|
+
<smz-gallery-case label="foco" force="focus-visible"><ui-checkbox label="Aceito os termos" [formControl]="on" /></smz-gallery-case>
|
|
36
|
+
<smz-gallery-case label="desabilitado"><ui-checkbox label="Aceito os termos" [formControl]="disabledOn" /></smz-gallery-case>
|
|
37
|
+
</smz-gallery-section>
|
|
38
|
+
|
|
39
|
+
<smz-gallery-section label="Rótulo" [columns]="4">
|
|
40
|
+
<smz-gallery-case label="sem rótulo · desmarcado"><ui-checkbox [formControl]="off" /></smz-gallery-case>
|
|
41
|
+
<smz-gallery-case label="sem rótulo · marcado"><ui-checkbox [formControl]="on" /></smz-gallery-case>
|
|
42
|
+
<smz-gallery-case label="sem rótulo · foco" force="focus-visible"><ui-checkbox [formControl]="on" /></smz-gallery-case>
|
|
43
|
+
<smz-gallery-case label="sem rótulo · desabilitado"><ui-checkbox disabled /></smz-gallery-case>
|
|
44
|
+
<smz-gallery-case label="conteúdo projetado"><ui-checkbox [formControl]="on"><span>Receber <strong>novidades</strong> por e-mail</span></ui-checkbox></smz-gallery-case>
|
|
45
|
+
<smz-gallery-case label="rótulo + conteúdo projetado"><ui-checkbox label="Notificações" [formControl]="on"><span>(opcional)</span></ui-checkbox></smz-gallery-case>
|
|
46
|
+
<smz-gallery-case label="entrada disabled (sem formulário)"><ui-checkbox label="Aceito os termos" disabled /></smz-gallery-case>
|
|
47
|
+
</smz-gallery-section>
|
|
48
|
+
|
|
49
|
+
<smz-gallery-section label="Modo grupo (modelo é um array)" [columns]="3">
|
|
50
|
+
<smz-gallery-case label="alguns marcados">
|
|
51
|
+
<div class="flex flex-col gap-2">
|
|
52
|
+
@for (option of options; track option.value) {
|
|
53
|
+
<ui-checkbox name="gallery-checkbox-some" [value]="option.value" [label]="option.label" [formControl]="some" />
|
|
54
|
+
}
|
|
55
|
+
</div>
|
|
56
|
+
</smz-gallery-case>
|
|
57
|
+
<smz-gallery-case label="nenhum marcado">
|
|
58
|
+
<div class="flex flex-col gap-2">
|
|
59
|
+
@for (option of options; track option.value) {
|
|
60
|
+
<ui-checkbox name="gallery-checkbox-none" [value]="option.value" [label]="option.label" [formControl]="none" />
|
|
61
|
+
}
|
|
62
|
+
</div>
|
|
63
|
+
</smz-gallery-case>
|
|
64
|
+
<smz-gallery-case label="grupo desabilitado">
|
|
65
|
+
<div class="flex flex-col gap-2">
|
|
66
|
+
@for (option of options; track option.value) {
|
|
67
|
+
<ui-checkbox name="gallery-checkbox-disabled" [value]="option.value" [label]="option.label" [formControl]="disabledSome" />
|
|
68
|
+
}
|
|
69
|
+
</div>
|
|
70
|
+
</smz-gallery-case>
|
|
71
|
+
<smz-gallery-case label="horizontal · todos marcados">
|
|
72
|
+
<div class="flex flex-wrap gap-4">
|
|
73
|
+
@for (option of options; track option.value) {
|
|
74
|
+
<ui-checkbox name="gallery-checkbox-all" [value]="option.value" [label]="option.label" [formControl]="all" />
|
|
75
|
+
}
|
|
76
|
+
</div>
|
|
77
|
+
</smz-gallery-case>
|
|
78
|
+
<smz-gallery-case label="binary com value · marcado"><ui-checkbox binary value="email" label="E-mail" [formControl]="on" /></smz-gallery-case>
|
|
79
|
+
</smz-gallery-section>
|
|
80
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SmzCheckboxComponent, selector: "ui-checkbox", inputs: ["label", "inputId", "value", "binary", "name"], outputs: ["changed"] }, { kind: "component", type: SmzGalleryCaseComponent, selector: "smz-gallery-case", inputs: ["label", "force", "target"] }, { kind: "component", type: SmzGallerySectionComponent, selector: "smz-gallery-section", inputs: ["label", "columns"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
81
|
+
}
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CheckboxGalleryEntryComponent, decorators: [{
|
|
83
|
+
type: Component,
|
|
84
|
+
args: [{
|
|
85
|
+
selector: 'smz-gallery-checkbox-entry',
|
|
86
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
87
|
+
imports: [ReactiveFormsModule, SmzCheckboxComponent, SmzGalleryCaseComponent, SmzGallerySectionComponent],
|
|
88
|
+
host: { class: 'flex flex-col gap-8' },
|
|
89
|
+
template: `
|
|
90
|
+
<smz-gallery-section label="Desmarcado" [columns]="4">
|
|
91
|
+
<smz-gallery-case label="padrão"><ui-checkbox label="Aceito os termos" [formControl]="off" /></smz-gallery-case>
|
|
92
|
+
<smz-gallery-case label="hover" force="hover"><ui-checkbox label="Aceito os termos" [formControl]="off" /></smz-gallery-case>
|
|
93
|
+
<smz-gallery-case label="foco" force="focus-visible"><ui-checkbox label="Aceito os termos" [formControl]="off" /></smz-gallery-case>
|
|
94
|
+
<smz-gallery-case label="desabilitado"><ui-checkbox label="Aceito os termos" [formControl]="disabledOff" /></smz-gallery-case>
|
|
95
|
+
</smz-gallery-section>
|
|
96
|
+
|
|
97
|
+
<smz-gallery-section label="Marcado" [columns]="4">
|
|
98
|
+
<smz-gallery-case label="padrão"><ui-checkbox label="Aceito os termos" [formControl]="on" /></smz-gallery-case>
|
|
99
|
+
<smz-gallery-case label="hover" force="hover"><ui-checkbox label="Aceito os termos" [formControl]="on" /></smz-gallery-case>
|
|
100
|
+
<smz-gallery-case label="foco" force="focus-visible"><ui-checkbox label="Aceito os termos" [formControl]="on" /></smz-gallery-case>
|
|
101
|
+
<smz-gallery-case label="desabilitado"><ui-checkbox label="Aceito os termos" [formControl]="disabledOn" /></smz-gallery-case>
|
|
102
|
+
</smz-gallery-section>
|
|
103
|
+
|
|
104
|
+
<smz-gallery-section label="Rótulo" [columns]="4">
|
|
105
|
+
<smz-gallery-case label="sem rótulo · desmarcado"><ui-checkbox [formControl]="off" /></smz-gallery-case>
|
|
106
|
+
<smz-gallery-case label="sem rótulo · marcado"><ui-checkbox [formControl]="on" /></smz-gallery-case>
|
|
107
|
+
<smz-gallery-case label="sem rótulo · foco" force="focus-visible"><ui-checkbox [formControl]="on" /></smz-gallery-case>
|
|
108
|
+
<smz-gallery-case label="sem rótulo · desabilitado"><ui-checkbox disabled /></smz-gallery-case>
|
|
109
|
+
<smz-gallery-case label="conteúdo projetado"><ui-checkbox [formControl]="on"><span>Receber <strong>novidades</strong> por e-mail</span></ui-checkbox></smz-gallery-case>
|
|
110
|
+
<smz-gallery-case label="rótulo + conteúdo projetado"><ui-checkbox label="Notificações" [formControl]="on"><span>(opcional)</span></ui-checkbox></smz-gallery-case>
|
|
111
|
+
<smz-gallery-case label="entrada disabled (sem formulário)"><ui-checkbox label="Aceito os termos" disabled /></smz-gallery-case>
|
|
112
|
+
</smz-gallery-section>
|
|
113
|
+
|
|
114
|
+
<smz-gallery-section label="Modo grupo (modelo é um array)" [columns]="3">
|
|
115
|
+
<smz-gallery-case label="alguns marcados">
|
|
116
|
+
<div class="flex flex-col gap-2">
|
|
117
|
+
@for (option of options; track option.value) {
|
|
118
|
+
<ui-checkbox name="gallery-checkbox-some" [value]="option.value" [label]="option.label" [formControl]="some" />
|
|
119
|
+
}
|
|
120
|
+
</div>
|
|
121
|
+
</smz-gallery-case>
|
|
122
|
+
<smz-gallery-case label="nenhum marcado">
|
|
123
|
+
<div class="flex flex-col gap-2">
|
|
124
|
+
@for (option of options; track option.value) {
|
|
125
|
+
<ui-checkbox name="gallery-checkbox-none" [value]="option.value" [label]="option.label" [formControl]="none" />
|
|
126
|
+
}
|
|
127
|
+
</div>
|
|
128
|
+
</smz-gallery-case>
|
|
129
|
+
<smz-gallery-case label="grupo desabilitado">
|
|
130
|
+
<div class="flex flex-col gap-2">
|
|
131
|
+
@for (option of options; track option.value) {
|
|
132
|
+
<ui-checkbox name="gallery-checkbox-disabled" [value]="option.value" [label]="option.label" [formControl]="disabledSome" />
|
|
133
|
+
}
|
|
134
|
+
</div>
|
|
135
|
+
</smz-gallery-case>
|
|
136
|
+
<smz-gallery-case label="horizontal · todos marcados">
|
|
137
|
+
<div class="flex flex-wrap gap-4">
|
|
138
|
+
@for (option of options; track option.value) {
|
|
139
|
+
<ui-checkbox name="gallery-checkbox-all" [value]="option.value" [label]="option.label" [formControl]="all" />
|
|
140
|
+
}
|
|
141
|
+
</div>
|
|
142
|
+
</smz-gallery-case>
|
|
143
|
+
<smz-gallery-case label="binary com value · marcado"><ui-checkbox binary value="email" label="E-mail" [formControl]="on" /></smz-gallery-case>
|
|
144
|
+
</smz-gallery-section>
|
|
145
|
+
`,
|
|
146
|
+
}]
|
|
147
|
+
}] });
|
|
148
|
+
|
|
149
|
+
export { CheckboxGalleryEntryComponent };
|
|
150
|
+
//# sourceMappingURL=ngx-smz-core-checkbox.entry-BXep3014.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-smz-core-checkbox.entry-BXep3014.mjs","sources":["../../../projects/ngx-smz-ui/src/lib/modules/smz-design-system/gallery/entries/kit/checkbox.entry.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { SmzCheckboxComponent } from '@ngx-smz/ui-kit';\nimport { SmzGalleryCaseComponent } from '../../gallery-case.component';\nimport { SmzGallerySectionComponent } from '../../gallery-section.component';\n\n/** Galeria: checkbox desmarcado e marcado em todos os estados, no modo booleano e no modo grupo. */\n@Component({\n selector: 'smz-gallery-checkbox-entry',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ReactiveFormsModule, SmzCheckboxComponent, SmzGalleryCaseComponent, SmzGallerySectionComponent],\n host: { class: 'flex flex-col gap-8' },\n template: `\n <smz-gallery-section label=\"Desmarcado\" [columns]=\"4\">\n <smz-gallery-case label=\"padrão\"><ui-checkbox label=\"Aceito os termos\" [formControl]=\"off\" /></smz-gallery-case>\n <smz-gallery-case label=\"hover\" force=\"hover\"><ui-checkbox label=\"Aceito os termos\" [formControl]=\"off\" /></smz-gallery-case>\n <smz-gallery-case label=\"foco\" force=\"focus-visible\"><ui-checkbox label=\"Aceito os termos\" [formControl]=\"off\" /></smz-gallery-case>\n <smz-gallery-case label=\"desabilitado\"><ui-checkbox label=\"Aceito os termos\" [formControl]=\"disabledOff\" /></smz-gallery-case>\n </smz-gallery-section>\n\n <smz-gallery-section label=\"Marcado\" [columns]=\"4\">\n <smz-gallery-case label=\"padrão\"><ui-checkbox label=\"Aceito os termos\" [formControl]=\"on\" /></smz-gallery-case>\n <smz-gallery-case label=\"hover\" force=\"hover\"><ui-checkbox label=\"Aceito os termos\" [formControl]=\"on\" /></smz-gallery-case>\n <smz-gallery-case label=\"foco\" force=\"focus-visible\"><ui-checkbox label=\"Aceito os termos\" [formControl]=\"on\" /></smz-gallery-case>\n <smz-gallery-case label=\"desabilitado\"><ui-checkbox label=\"Aceito os termos\" [formControl]=\"disabledOn\" /></smz-gallery-case>\n </smz-gallery-section>\n\n <smz-gallery-section label=\"Rótulo\" [columns]=\"4\">\n <smz-gallery-case label=\"sem rótulo · desmarcado\"><ui-checkbox [formControl]=\"off\" /></smz-gallery-case>\n <smz-gallery-case label=\"sem rótulo · marcado\"><ui-checkbox [formControl]=\"on\" /></smz-gallery-case>\n <smz-gallery-case label=\"sem rótulo · foco\" force=\"focus-visible\"><ui-checkbox [formControl]=\"on\" /></smz-gallery-case>\n <smz-gallery-case label=\"sem rótulo · desabilitado\"><ui-checkbox disabled /></smz-gallery-case>\n <smz-gallery-case label=\"conteúdo projetado\"><ui-checkbox [formControl]=\"on\"><span>Receber <strong>novidades</strong> por e-mail</span></ui-checkbox></smz-gallery-case>\n <smz-gallery-case label=\"rótulo + conteúdo projetado\"><ui-checkbox label=\"Notificações\" [formControl]=\"on\"><span>(opcional)</span></ui-checkbox></smz-gallery-case>\n <smz-gallery-case label=\"entrada disabled (sem formulário)\"><ui-checkbox label=\"Aceito os termos\" disabled /></smz-gallery-case>\n </smz-gallery-section>\n\n <smz-gallery-section label=\"Modo grupo (modelo é um array)\" [columns]=\"3\">\n <smz-gallery-case label=\"alguns marcados\">\n <div class=\"flex flex-col gap-2\">\n @for (option of options; track option.value) {\n <ui-checkbox name=\"gallery-checkbox-some\" [value]=\"option.value\" [label]=\"option.label\" [formControl]=\"some\" />\n }\n </div>\n </smz-gallery-case>\n <smz-gallery-case label=\"nenhum marcado\">\n <div class=\"flex flex-col gap-2\">\n @for (option of options; track option.value) {\n <ui-checkbox name=\"gallery-checkbox-none\" [value]=\"option.value\" [label]=\"option.label\" [formControl]=\"none\" />\n }\n </div>\n </smz-gallery-case>\n <smz-gallery-case label=\"grupo desabilitado\">\n <div class=\"flex flex-col gap-2\">\n @for (option of options; track option.value) {\n <ui-checkbox name=\"gallery-checkbox-disabled\" [value]=\"option.value\" [label]=\"option.label\" [formControl]=\"disabledSome\" />\n }\n </div>\n </smz-gallery-case>\n <smz-gallery-case label=\"horizontal · todos marcados\">\n <div class=\"flex flex-wrap gap-4\">\n @for (option of options; track option.value) {\n <ui-checkbox name=\"gallery-checkbox-all\" [value]=\"option.value\" [label]=\"option.label\" [formControl]=\"all\" />\n }\n </div>\n </smz-gallery-case>\n <smz-gallery-case label=\"binary com value · marcado\"><ui-checkbox binary value=\"email\" label=\"E-mail\" [formControl]=\"on\" /></smz-gallery-case>\n </smz-gallery-section>\n `,\n})\nexport class CheckboxGalleryEntryComponent {\n protected readonly options: Array<{ value: string; label: string }> = [\n { value: 'email', label: 'E-mail' },\n { value: 'sms', label: 'SMS' },\n { value: 'push', label: 'Notificação no aplicativo' },\n ];\n\n protected readonly off = new FormControl<boolean>(false);\n protected readonly on = new FormControl<boolean>(true);\n protected readonly disabledOff = new FormControl<boolean>({ value: false, disabled: true });\n protected readonly disabledOn = new FormControl<boolean>({ value: true, disabled: true });\n\n protected readonly none = new FormControl<string[]>([]);\n protected readonly some = new FormControl<string[]>(['email', 'push']);\n protected readonly all = new FormControl<string[]>(['email', 'sms', 'push']);\n protected readonly disabledSome = new FormControl<string[]>({ value: ['email', 'push'], disabled: true });\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { SmzColorPickerComponent } from '@ngx-smz/ui-kit';
|
|
6
|
+
import { SmzGalleryCaseComponent, SmzGallerySectionComponent } from './ngx-smz-core.mjs';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Galeria: seletor de cor (amostra) em todos os estados.
|
|
10
|
+
* O painel de escolha é o seletor nativo do navegador (fora do DOM da página), por isso não há cena `open`.
|
|
11
|
+
*/
|
|
12
|
+
class ColorPickerGalleryEntryComponent {
|
|
13
|
+
blue = new FormControl('1d4ed8');
|
|
14
|
+
disabledBlue = new FormControl({ value: '1d4ed8', disabled: true });
|
|
15
|
+
malformed = new FormControl('azul');
|
|
16
|
+
hashed = new FormControl('#1D4ED8');
|
|
17
|
+
samples = [
|
|
18
|
+
{ label: 'branco', control: new FormControl('ffffff') },
|
|
19
|
+
{ label: 'preto', control: new FormControl('000000') },
|
|
20
|
+
{ label: 'vermelho', control: new FormControl('dc2626') },
|
|
21
|
+
{ label: 'verde', control: new FormControl('16a34a') },
|
|
22
|
+
{ label: 'amarelo', control: new FormControl('facc15') },
|
|
23
|
+
{ label: 'roxo', control: new FormControl('7c3aed') },
|
|
24
|
+
];
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ColorPickerGalleryEntryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: ColorPickerGalleryEntryComponent, isStandalone: true, selector: "smz-gallery-color-picker-entry", host: { classAttribute: "flex flex-col gap-8" }, ngImport: i0, template: `
|
|
27
|
+
<smz-gallery-section label="Estados" [columns]="4">
|
|
28
|
+
<smz-gallery-case label="sem valor (preto)"><ui-color-picker /></smz-gallery-case>
|
|
29
|
+
<smz-gallery-case label="com valor"><ui-color-picker [formControl]="blue" /></smz-gallery-case>
|
|
30
|
+
<smz-gallery-case label="hover" force="hover"><ui-color-picker [formControl]="blue" /></smz-gallery-case>
|
|
31
|
+
<smz-gallery-case label="foco" force="focus"><ui-color-picker [formControl]="blue" /></smz-gallery-case>
|
|
32
|
+
<smz-gallery-case label="desabilitado · sem valor"><ui-color-picker disabled /></smz-gallery-case>
|
|
33
|
+
<smz-gallery-case label="desabilitado · com valor"><ui-color-picker [formControl]="disabledBlue" /></smz-gallery-case>
|
|
34
|
+
<smz-gallery-case label="valor inválido (cai em preto)"><ui-color-picker [formControl]="malformed" /></smz-gallery-case>
|
|
35
|
+
<smz-gallery-case label="valor com # e maiúsculas"><ui-color-picker [formControl]="hashed" /></smz-gallery-case>
|
|
36
|
+
</smz-gallery-section>
|
|
37
|
+
|
|
38
|
+
<smz-gallery-section label="Valores" [columns]="6">
|
|
39
|
+
@for (sample of samples; track sample.label) {
|
|
40
|
+
<smz-gallery-case [label]="sample.label"><ui-color-picker [formControl]="sample.control" /></smz-gallery-case>
|
|
41
|
+
}
|
|
42
|
+
</smz-gallery-section>
|
|
43
|
+
|
|
44
|
+
<smz-gallery-section label="Com rótulo" [columns]="2">
|
|
45
|
+
<smz-gallery-case label="rótulo associado por inputId">
|
|
46
|
+
<div class="flex items-center gap-2">
|
|
47
|
+
<ui-color-picker inputId="gallery-color-picker-brand" [formControl]="blue" />
|
|
48
|
+
<label for="gallery-color-picker-brand">Cor da marca</label>
|
|
49
|
+
</div>
|
|
50
|
+
</smz-gallery-case>
|
|
51
|
+
<smz-gallery-case label="rótulo · desabilitado">
|
|
52
|
+
<div class="flex items-center gap-2">
|
|
53
|
+
<ui-color-picker inputId="gallery-color-picker-brand-disabled" [formControl]="disabledBlue" />
|
|
54
|
+
<label for="gallery-color-picker-brand-disabled">Cor da marca</label>
|
|
55
|
+
</div>
|
|
56
|
+
</smz-gallery-case>
|
|
57
|
+
</smz-gallery-section>
|
|
58
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SmzColorPickerComponent, selector: "ui-color-picker", inputs: ["inputId", "appendTo"], outputs: ["changed"] }, { kind: "component", type: SmzGalleryCaseComponent, selector: "smz-gallery-case", inputs: ["label", "force", "target"] }, { kind: "component", type: SmzGallerySectionComponent, selector: "smz-gallery-section", inputs: ["label", "columns"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
59
|
+
}
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ColorPickerGalleryEntryComponent, decorators: [{
|
|
61
|
+
type: Component,
|
|
62
|
+
args: [{
|
|
63
|
+
selector: 'smz-gallery-color-picker-entry',
|
|
64
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
65
|
+
imports: [ReactiveFormsModule, SmzColorPickerComponent, SmzGalleryCaseComponent, SmzGallerySectionComponent],
|
|
66
|
+
host: { class: 'flex flex-col gap-8' },
|
|
67
|
+
template: `
|
|
68
|
+
<smz-gallery-section label="Estados" [columns]="4">
|
|
69
|
+
<smz-gallery-case label="sem valor (preto)"><ui-color-picker /></smz-gallery-case>
|
|
70
|
+
<smz-gallery-case label="com valor"><ui-color-picker [formControl]="blue" /></smz-gallery-case>
|
|
71
|
+
<smz-gallery-case label="hover" force="hover"><ui-color-picker [formControl]="blue" /></smz-gallery-case>
|
|
72
|
+
<smz-gallery-case label="foco" force="focus"><ui-color-picker [formControl]="blue" /></smz-gallery-case>
|
|
73
|
+
<smz-gallery-case label="desabilitado · sem valor"><ui-color-picker disabled /></smz-gallery-case>
|
|
74
|
+
<smz-gallery-case label="desabilitado · com valor"><ui-color-picker [formControl]="disabledBlue" /></smz-gallery-case>
|
|
75
|
+
<smz-gallery-case label="valor inválido (cai em preto)"><ui-color-picker [formControl]="malformed" /></smz-gallery-case>
|
|
76
|
+
<smz-gallery-case label="valor com # e maiúsculas"><ui-color-picker [formControl]="hashed" /></smz-gallery-case>
|
|
77
|
+
</smz-gallery-section>
|
|
78
|
+
|
|
79
|
+
<smz-gallery-section label="Valores" [columns]="6">
|
|
80
|
+
@for (sample of samples; track sample.label) {
|
|
81
|
+
<smz-gallery-case [label]="sample.label"><ui-color-picker [formControl]="sample.control" /></smz-gallery-case>
|
|
82
|
+
}
|
|
83
|
+
</smz-gallery-section>
|
|
84
|
+
|
|
85
|
+
<smz-gallery-section label="Com rótulo" [columns]="2">
|
|
86
|
+
<smz-gallery-case label="rótulo associado por inputId">
|
|
87
|
+
<div class="flex items-center gap-2">
|
|
88
|
+
<ui-color-picker inputId="gallery-color-picker-brand" [formControl]="blue" />
|
|
89
|
+
<label for="gallery-color-picker-brand">Cor da marca</label>
|
|
90
|
+
</div>
|
|
91
|
+
</smz-gallery-case>
|
|
92
|
+
<smz-gallery-case label="rótulo · desabilitado">
|
|
93
|
+
<div class="flex items-center gap-2">
|
|
94
|
+
<ui-color-picker inputId="gallery-color-picker-brand-disabled" [formControl]="disabledBlue" />
|
|
95
|
+
<label for="gallery-color-picker-brand-disabled">Cor da marca</label>
|
|
96
|
+
</div>
|
|
97
|
+
</smz-gallery-case>
|
|
98
|
+
</smz-gallery-section>
|
|
99
|
+
`,
|
|
100
|
+
}]
|
|
101
|
+
}] });
|
|
102
|
+
|
|
103
|
+
export { ColorPickerGalleryEntryComponent };
|
|
104
|
+
//# sourceMappingURL=ngx-smz-core-color-picker.entry-DFoq8VVR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-smz-core-color-picker.entry-DFoq8VVR.mjs","sources":["../../../projects/ngx-smz-ui/src/lib/modules/smz-design-system/gallery/entries/kit/color-picker.entry.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { SmzColorPickerComponent } from '@ngx-smz/ui-kit';\nimport { SmzGalleryCaseComponent } from '../../gallery-case.component';\nimport { SmzGallerySectionComponent } from '../../gallery-section.component';\n\n/**\n * Galeria: seletor de cor (amostra) em todos os estados.\n * O painel de escolha é o seletor nativo do navegador (fora do DOM da página), por isso não há cena `open`.\n */\n@Component({\n selector: 'smz-gallery-color-picker-entry',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ReactiveFormsModule, SmzColorPickerComponent, SmzGalleryCaseComponent, SmzGallerySectionComponent],\n host: { class: 'flex flex-col gap-8' },\n template: `\n <smz-gallery-section label=\"Estados\" [columns]=\"4\">\n <smz-gallery-case label=\"sem valor (preto)\"><ui-color-picker /></smz-gallery-case>\n <smz-gallery-case label=\"com valor\"><ui-color-picker [formControl]=\"blue\" /></smz-gallery-case>\n <smz-gallery-case label=\"hover\" force=\"hover\"><ui-color-picker [formControl]=\"blue\" /></smz-gallery-case>\n <smz-gallery-case label=\"foco\" force=\"focus\"><ui-color-picker [formControl]=\"blue\" /></smz-gallery-case>\n <smz-gallery-case label=\"desabilitado · sem valor\"><ui-color-picker disabled /></smz-gallery-case>\n <smz-gallery-case label=\"desabilitado · com valor\"><ui-color-picker [formControl]=\"disabledBlue\" /></smz-gallery-case>\n <smz-gallery-case label=\"valor inválido (cai em preto)\"><ui-color-picker [formControl]=\"malformed\" /></smz-gallery-case>\n <smz-gallery-case label=\"valor com # e maiúsculas\"><ui-color-picker [formControl]=\"hashed\" /></smz-gallery-case>\n </smz-gallery-section>\n\n <smz-gallery-section label=\"Valores\" [columns]=\"6\">\n @for (sample of samples; track sample.label) {\n <smz-gallery-case [label]=\"sample.label\"><ui-color-picker [formControl]=\"sample.control\" /></smz-gallery-case>\n }\n </smz-gallery-section>\n\n <smz-gallery-section label=\"Com rótulo\" [columns]=\"2\">\n <smz-gallery-case label=\"rótulo associado por inputId\">\n <div class=\"flex items-center gap-2\">\n <ui-color-picker inputId=\"gallery-color-picker-brand\" [formControl]=\"blue\" />\n <label for=\"gallery-color-picker-brand\">Cor da marca</label>\n </div>\n </smz-gallery-case>\n <smz-gallery-case label=\"rótulo · desabilitado\">\n <div class=\"flex items-center gap-2\">\n <ui-color-picker inputId=\"gallery-color-picker-brand-disabled\" [formControl]=\"disabledBlue\" />\n <label for=\"gallery-color-picker-brand-disabled\">Cor da marca</label>\n </div>\n </smz-gallery-case>\n </smz-gallery-section>\n `,\n})\nexport class ColorPickerGalleryEntryComponent {\n protected readonly blue = new FormControl<string | null>('1d4ed8');\n protected readonly disabledBlue = new FormControl<string | null>({ value: '1d4ed8', disabled: true });\n protected readonly malformed = new FormControl<string | null>('azul');\n protected readonly hashed = new FormControl<string | null>('#1D4ED8');\n\n protected readonly samples: Array<{ label: string; control: FormControl<string | null> }> = [\n { label: 'branco', control: new FormControl<string | null>('ffffff') },\n { label: 'preto', control: new FormControl<string | null>('000000') },\n { label: 'vermelho', control: new FormControl<string | null>('dc2626') },\n { label: 'verde', control: new FormControl<string | null>('16a34a') },\n { label: 'amarelo', control: new FormControl<string | null>('facc15') },\n { label: 'roxo', control: new FormControl<string | null>('7c3aed') },\n ];\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { viewChild, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { SmzDataViewComponent, SmzTemplateDirective } from '@ngx-smz/ui-kit';
|
|
5
|
+
import { SmzGalleryCaseComponent, SmzGallerySectionComponent } from './ngx-smz-core.mjs';
|
|
6
|
+
|
|
7
|
+
/** Galeria: data-view em lista e em grade, com paginação, filtro, cabeçalho, rodapé e estado vazio. */
|
|
8
|
+
class DataViewGalleryEntryComponent {
|
|
9
|
+
fornecedores = [
|
|
10
|
+
{ nome: 'Metalúrgica Aurora', cidade: 'Campinas, SP', situacao: 'Ativo' },
|
|
11
|
+
{ nome: 'Transportes Litoral', cidade: 'Santos, SP', situacao: 'Ativo' },
|
|
12
|
+
{ nome: 'Química Vale Verde', cidade: 'Betim, MG', situacao: 'Suspenso' },
|
|
13
|
+
{ nome: 'Embalagens Paraná', cidade: 'Curitiba, PR', situacao: 'Ativo' },
|
|
14
|
+
{ nome: 'Elétrica Horizonte', cidade: 'Campinas, SP', situacao: 'Em análise' },
|
|
15
|
+
{ nome: 'Usinagem Serra Azul', cidade: 'Caxias do Sul, RS', situacao: 'Ativo' },
|
|
16
|
+
{ nome: 'Logística Planalto', cidade: 'Goiânia, GO', situacao: 'Inativo' },
|
|
17
|
+
];
|
|
18
|
+
quatro = this.fornecedores.slice(0, 4);
|
|
19
|
+
filtrado = viewChild('filtrado', ...(ngDevMode ? [{ debugName: "filtrado" }] : /* istanbul ignore next */ []));
|
|
20
|
+
semResultado = viewChild('semResultado', ...(ngDevMode ? [{ debugName: "semResultado" }] : /* istanbul ignore next */ []));
|
|
21
|
+
constructor() {
|
|
22
|
+
// O filtro do data-view é aplicado por método (o consumidor liga o próprio campo de busca).
|
|
23
|
+
afterNextRender(() => {
|
|
24
|
+
this.filtrado()?.filter('campinas');
|
|
25
|
+
this.semResultado()?.filter('recife');
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DataViewGalleryEntryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: DataViewGalleryEntryComponent, isStandalone: true, selector: "smz-gallery-data-view-entry", host: { classAttribute: "flex flex-col gap-8" }, viewQueries: [{ propertyName: "filtrado", first: true, predicate: ["filtrado"], descendants: true, isSignal: true }, { propertyName: "semResultado", first: true, predicate: ["semResultado"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
30
|
+
<ng-template #linhas let-items>
|
|
31
|
+
<div class="flex flex-col">
|
|
32
|
+
@for (item of items; track item.nome) {
|
|
33
|
+
<div class="flex items-center justify-between gap-2 border-b border-ui-line px-2 py-2">
|
|
34
|
+
<span class="flex min-w-0 flex-col">
|
|
35
|
+
<span class="truncate">{{ item.nome }}</span>
|
|
36
|
+
<span class="truncate text-ui-fg-muted">{{ item.cidade }}</span>
|
|
37
|
+
</span>
|
|
38
|
+
<span class="text-ui-fg-muted">{{ item.situacao }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
}
|
|
41
|
+
</div>
|
|
42
|
+
</ng-template>
|
|
43
|
+
|
|
44
|
+
<ng-template #cartoes let-items>
|
|
45
|
+
<div class="flex flex-wrap">
|
|
46
|
+
@for (item of items; track item.nome) {
|
|
47
|
+
<div class="w-1/2 p-1">
|
|
48
|
+
<div class="flex flex-col gap-1 border border-ui-line bg-ui-surface-1 p-3">
|
|
49
|
+
<span class="truncate">{{ item.nome }}</span>
|
|
50
|
+
<span class="truncate text-ui-fg-muted">{{ item.cidade }}</span>
|
|
51
|
+
<span class="text-ui-fg-muted">{{ item.situacao }}</span>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
}
|
|
55
|
+
</div>
|
|
56
|
+
</ng-template>
|
|
57
|
+
|
|
58
|
+
<smz-gallery-section label="Layout" [columns]="2">
|
|
59
|
+
<smz-gallery-case label="lista (padrão)">
|
|
60
|
+
<ui-data-view class="w-full" [value]="quatro">
|
|
61
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
62
|
+
</ui-data-view>
|
|
63
|
+
</smz-gallery-case>
|
|
64
|
+
<smz-gallery-case label="grade">
|
|
65
|
+
<ui-data-view class="w-full" layout="grid" [value]="quatro">
|
|
66
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
67
|
+
<ng-template smzTemplate="grid" let-items><ng-container [ngTemplateOutlet]="cartoes" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
68
|
+
</ui-data-view>
|
|
69
|
+
</smz-gallery-case>
|
|
70
|
+
<smz-gallery-case label="grade sem template de grade (cai na lista)">
|
|
71
|
+
<ui-data-view class="w-full" layout="grid" [value]="quatro">
|
|
72
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
73
|
+
</ui-data-view>
|
|
74
|
+
</smz-gallery-case>
|
|
75
|
+
<smz-gallery-case label="cabeçalho e rodapé">
|
|
76
|
+
<ui-data-view class="w-full" [value]="quatro">
|
|
77
|
+
<ng-template smzTemplate="header"><span class="flex items-center justify-between gap-2"><span>Fornecedores</span><span class="text-ui-fg-muted">4 registros</span></span></ng-template>
|
|
78
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
79
|
+
<ng-template smzTemplate="footer"><span class="text-ui-fg-muted">Atualizado em 10/03/2025</span></ng-template>
|
|
80
|
+
</ui-data-view>
|
|
81
|
+
</smz-gallery-case>
|
|
82
|
+
</smz-gallery-section>
|
|
83
|
+
|
|
84
|
+
<smz-gallery-section label="Paginação" [columns]="2">
|
|
85
|
+
<smz-gallery-case label="lista · primeira página">
|
|
86
|
+
<ui-data-view class="w-full" paginator [rows]="3" [first]="0" [value]="fornecedores">
|
|
87
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
88
|
+
</ui-data-view>
|
|
89
|
+
</smz-gallery-case>
|
|
90
|
+
<smz-gallery-case label="lista · página do meio">
|
|
91
|
+
<ui-data-view class="w-full" paginator [rows]="3" [first]="3" [value]="fornecedores">
|
|
92
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
93
|
+
</ui-data-view>
|
|
94
|
+
</smz-gallery-case>
|
|
95
|
+
<smz-gallery-case label="lista · última página (incompleta)">
|
|
96
|
+
<ui-data-view class="w-full" paginator [rows]="3" [first]="6" [value]="fornecedores">
|
|
97
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
98
|
+
</ui-data-view>
|
|
99
|
+
</smz-gallery-case>
|
|
100
|
+
<smz-gallery-case label="grade · paginada">
|
|
101
|
+
<ui-data-view class="w-full" layout="grid" paginator [rows]="4" [first]="0" [value]="fornecedores">
|
|
102
|
+
<ng-template smzTemplate="grid" let-items><ng-container [ngTemplateOutlet]="cartoes" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
103
|
+
</ui-data-view>
|
|
104
|
+
</smz-gallery-case>
|
|
105
|
+
<smz-gallery-case label="paginador ligado, uma só página (paginador oculto)">
|
|
106
|
+
<ui-data-view class="w-full" paginator [rows]="10" [value]="quatro">
|
|
107
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
108
|
+
</ui-data-view>
|
|
109
|
+
</smz-gallery-case>
|
|
110
|
+
</smz-gallery-section>
|
|
111
|
+
|
|
112
|
+
<smz-gallery-section label="Filtro e vazio" [columns]="2">
|
|
113
|
+
<smz-gallery-case label="filtrado por texto (filterBy nome, cidade)">
|
|
114
|
+
<ui-data-view #filtrado class="w-full" filterBy="nome,cidade" [value]="fornecedores">
|
|
115
|
+
<ng-template smzTemplate="header"><span class="text-ui-fg-muted">Busca: "campinas"</span></ng-template>
|
|
116
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
117
|
+
<ng-template smzTemplate="empty"><span class="flex px-2 py-4 text-ui-fg-muted">Nenhum fornecedor encontrado</span></ng-template>
|
|
118
|
+
</ui-data-view>
|
|
119
|
+
</smz-gallery-case>
|
|
120
|
+
<smz-gallery-case label="filtro sem resultado (template de vazio)">
|
|
121
|
+
<ui-data-view #semResultado class="w-full" filterBy="nome,cidade" [value]="fornecedores">
|
|
122
|
+
<ng-template smzTemplate="header"><span class="text-ui-fg-muted">Busca: "recife"</span></ng-template>
|
|
123
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
124
|
+
<ng-template smzTemplate="empty"><span class="flex px-2 py-4 text-ui-fg-muted">Nenhum fornecedor encontrado</span></ng-template>
|
|
125
|
+
</ui-data-view>
|
|
126
|
+
</smz-gallery-case>
|
|
127
|
+
<smz-gallery-case label="sem dados (template de vazio)">
|
|
128
|
+
<ui-data-view class="w-full" [value]="[]">
|
|
129
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
130
|
+
<ng-template smzTemplate="empty"><span class="flex px-2 py-4 text-ui-fg-muted">Nenhum fornecedor cadastrado</span></ng-template>
|
|
131
|
+
</ui-data-view>
|
|
132
|
+
</smz-gallery-case>
|
|
133
|
+
<smz-gallery-case label="sem dados, com cabeçalho e rodapé">
|
|
134
|
+
<ui-data-view class="w-full" [value]="null">
|
|
135
|
+
<ng-template smzTemplate="header"><span>Fornecedores</span></ng-template>
|
|
136
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
137
|
+
<ng-template smzTemplate="empty"><span class="flex px-2 py-4 text-ui-fg-muted">Nenhum fornecedor cadastrado</span></ng-template>
|
|
138
|
+
<ng-template smzTemplate="footer"><span class="text-ui-fg-muted">0 registros</span></ng-template>
|
|
139
|
+
</ui-data-view>
|
|
140
|
+
</smz-gallery-case>
|
|
141
|
+
</smz-gallery-section>
|
|
142
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SmzDataViewComponent, selector: "ui-data-view", inputs: ["value", "layout", "paginator", "rows", "first", "filterBy", "styleClass", "gridStyleClass"], outputs: ["firstChange"] }, { kind: "directive", type: SmzTemplateDirective, selector: "ng-template[smzTemplate]", inputs: ["smzTemplate"] }, { kind: "component", type: SmzGalleryCaseComponent, selector: "smz-gallery-case", inputs: ["label", "force", "target"] }, { kind: "component", type: SmzGallerySectionComponent, selector: "smz-gallery-section", inputs: ["label", "columns"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
143
|
+
}
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DataViewGalleryEntryComponent, decorators: [{
|
|
145
|
+
type: Component,
|
|
146
|
+
args: [{
|
|
147
|
+
selector: 'smz-gallery-data-view-entry',
|
|
148
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
149
|
+
imports: [NgTemplateOutlet, SmzDataViewComponent, SmzTemplateDirective, SmzGalleryCaseComponent, SmzGallerySectionComponent],
|
|
150
|
+
host: { class: 'flex flex-col gap-8' },
|
|
151
|
+
template: `
|
|
152
|
+
<ng-template #linhas let-items>
|
|
153
|
+
<div class="flex flex-col">
|
|
154
|
+
@for (item of items; track item.nome) {
|
|
155
|
+
<div class="flex items-center justify-between gap-2 border-b border-ui-line px-2 py-2">
|
|
156
|
+
<span class="flex min-w-0 flex-col">
|
|
157
|
+
<span class="truncate">{{ item.nome }}</span>
|
|
158
|
+
<span class="truncate text-ui-fg-muted">{{ item.cidade }}</span>
|
|
159
|
+
</span>
|
|
160
|
+
<span class="text-ui-fg-muted">{{ item.situacao }}</span>
|
|
161
|
+
</div>
|
|
162
|
+
}
|
|
163
|
+
</div>
|
|
164
|
+
</ng-template>
|
|
165
|
+
|
|
166
|
+
<ng-template #cartoes let-items>
|
|
167
|
+
<div class="flex flex-wrap">
|
|
168
|
+
@for (item of items; track item.nome) {
|
|
169
|
+
<div class="w-1/2 p-1">
|
|
170
|
+
<div class="flex flex-col gap-1 border border-ui-line bg-ui-surface-1 p-3">
|
|
171
|
+
<span class="truncate">{{ item.nome }}</span>
|
|
172
|
+
<span class="truncate text-ui-fg-muted">{{ item.cidade }}</span>
|
|
173
|
+
<span class="text-ui-fg-muted">{{ item.situacao }}</span>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
}
|
|
177
|
+
</div>
|
|
178
|
+
</ng-template>
|
|
179
|
+
|
|
180
|
+
<smz-gallery-section label="Layout" [columns]="2">
|
|
181
|
+
<smz-gallery-case label="lista (padrão)">
|
|
182
|
+
<ui-data-view class="w-full" [value]="quatro">
|
|
183
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
184
|
+
</ui-data-view>
|
|
185
|
+
</smz-gallery-case>
|
|
186
|
+
<smz-gallery-case label="grade">
|
|
187
|
+
<ui-data-view class="w-full" layout="grid" [value]="quatro">
|
|
188
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
189
|
+
<ng-template smzTemplate="grid" let-items><ng-container [ngTemplateOutlet]="cartoes" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
190
|
+
</ui-data-view>
|
|
191
|
+
</smz-gallery-case>
|
|
192
|
+
<smz-gallery-case label="grade sem template de grade (cai na lista)">
|
|
193
|
+
<ui-data-view class="w-full" layout="grid" [value]="quatro">
|
|
194
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
195
|
+
</ui-data-view>
|
|
196
|
+
</smz-gallery-case>
|
|
197
|
+
<smz-gallery-case label="cabeçalho e rodapé">
|
|
198
|
+
<ui-data-view class="w-full" [value]="quatro">
|
|
199
|
+
<ng-template smzTemplate="header"><span class="flex items-center justify-between gap-2"><span>Fornecedores</span><span class="text-ui-fg-muted">4 registros</span></span></ng-template>
|
|
200
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
201
|
+
<ng-template smzTemplate="footer"><span class="text-ui-fg-muted">Atualizado em 10/03/2025</span></ng-template>
|
|
202
|
+
</ui-data-view>
|
|
203
|
+
</smz-gallery-case>
|
|
204
|
+
</smz-gallery-section>
|
|
205
|
+
|
|
206
|
+
<smz-gallery-section label="Paginação" [columns]="2">
|
|
207
|
+
<smz-gallery-case label="lista · primeira página">
|
|
208
|
+
<ui-data-view class="w-full" paginator [rows]="3" [first]="0" [value]="fornecedores">
|
|
209
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
210
|
+
</ui-data-view>
|
|
211
|
+
</smz-gallery-case>
|
|
212
|
+
<smz-gallery-case label="lista · página do meio">
|
|
213
|
+
<ui-data-view class="w-full" paginator [rows]="3" [first]="3" [value]="fornecedores">
|
|
214
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
215
|
+
</ui-data-view>
|
|
216
|
+
</smz-gallery-case>
|
|
217
|
+
<smz-gallery-case label="lista · última página (incompleta)">
|
|
218
|
+
<ui-data-view class="w-full" paginator [rows]="3" [first]="6" [value]="fornecedores">
|
|
219
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
220
|
+
</ui-data-view>
|
|
221
|
+
</smz-gallery-case>
|
|
222
|
+
<smz-gallery-case label="grade · paginada">
|
|
223
|
+
<ui-data-view class="w-full" layout="grid" paginator [rows]="4" [first]="0" [value]="fornecedores">
|
|
224
|
+
<ng-template smzTemplate="grid" let-items><ng-container [ngTemplateOutlet]="cartoes" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
225
|
+
</ui-data-view>
|
|
226
|
+
</smz-gallery-case>
|
|
227
|
+
<smz-gallery-case label="paginador ligado, uma só página (paginador oculto)">
|
|
228
|
+
<ui-data-view class="w-full" paginator [rows]="10" [value]="quatro">
|
|
229
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
230
|
+
</ui-data-view>
|
|
231
|
+
</smz-gallery-case>
|
|
232
|
+
</smz-gallery-section>
|
|
233
|
+
|
|
234
|
+
<smz-gallery-section label="Filtro e vazio" [columns]="2">
|
|
235
|
+
<smz-gallery-case label="filtrado por texto (filterBy nome, cidade)">
|
|
236
|
+
<ui-data-view #filtrado class="w-full" filterBy="nome,cidade" [value]="fornecedores">
|
|
237
|
+
<ng-template smzTemplate="header"><span class="text-ui-fg-muted">Busca: "campinas"</span></ng-template>
|
|
238
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
239
|
+
<ng-template smzTemplate="empty"><span class="flex px-2 py-4 text-ui-fg-muted">Nenhum fornecedor encontrado</span></ng-template>
|
|
240
|
+
</ui-data-view>
|
|
241
|
+
</smz-gallery-case>
|
|
242
|
+
<smz-gallery-case label="filtro sem resultado (template de vazio)">
|
|
243
|
+
<ui-data-view #semResultado class="w-full" filterBy="nome,cidade" [value]="fornecedores">
|
|
244
|
+
<ng-template smzTemplate="header"><span class="text-ui-fg-muted">Busca: "recife"</span></ng-template>
|
|
245
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
246
|
+
<ng-template smzTemplate="empty"><span class="flex px-2 py-4 text-ui-fg-muted">Nenhum fornecedor encontrado</span></ng-template>
|
|
247
|
+
</ui-data-view>
|
|
248
|
+
</smz-gallery-case>
|
|
249
|
+
<smz-gallery-case label="sem dados (template de vazio)">
|
|
250
|
+
<ui-data-view class="w-full" [value]="[]">
|
|
251
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
252
|
+
<ng-template smzTemplate="empty"><span class="flex px-2 py-4 text-ui-fg-muted">Nenhum fornecedor cadastrado</span></ng-template>
|
|
253
|
+
</ui-data-view>
|
|
254
|
+
</smz-gallery-case>
|
|
255
|
+
<smz-gallery-case label="sem dados, com cabeçalho e rodapé">
|
|
256
|
+
<ui-data-view class="w-full" [value]="null">
|
|
257
|
+
<ng-template smzTemplate="header"><span>Fornecedores</span></ng-template>
|
|
258
|
+
<ng-template smzTemplate="list" let-items><ng-container [ngTemplateOutlet]="linhas" [ngTemplateOutletContext]="{ $implicit: items }" /></ng-template>
|
|
259
|
+
<ng-template smzTemplate="empty"><span class="flex px-2 py-4 text-ui-fg-muted">Nenhum fornecedor cadastrado</span></ng-template>
|
|
260
|
+
<ng-template smzTemplate="footer"><span class="text-ui-fg-muted">0 registros</span></ng-template>
|
|
261
|
+
</ui-data-view>
|
|
262
|
+
</smz-gallery-case>
|
|
263
|
+
</smz-gallery-section>
|
|
264
|
+
`,
|
|
265
|
+
}]
|
|
266
|
+
}], ctorParameters: () => [], propDecorators: { filtrado: [{ type: i0.ViewChild, args: ['filtrado', { isSignal: true }] }], semResultado: [{ type: i0.ViewChild, args: ['semResultado', { isSignal: true }] }] } });
|
|
267
|
+
|
|
268
|
+
export { DataViewGalleryEntryComponent };
|
|
269
|
+
//# sourceMappingURL=ngx-smz-core-data-view.entry-7a8EK3iw.mjs.map
|