ngx-opalbytes-components 1.26.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +370 -1
- package/fesm2022/ngx-opalbytes-components.mjs +562 -3
- package/fesm2022/ngx-opalbytes-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/shared/components/accordion/accordion.component.css +30 -0
- package/src/lib/shared/components/accordion/accordion.component.html +1 -0
- package/src/lib/shared/components/accordion/accordion.component.spec.ts +117 -0
- package/src/lib/shared/components/accordion/accordion.component.ts +195 -0
- package/src/lib/shared/components/accordion/accordion.token.ts +40 -0
- package/src/lib/shared/components/accordion-item/accordion-item.component.css +137 -0
- package/src/lib/shared/components/accordion-item/accordion-item.component.html +52 -0
- package/src/lib/shared/components/accordion-item/accordion-item.component.ts +157 -0
- package/src/lib/shared/components/accordion-item/accordion-item.spec.ts +22 -0
- package/src/lib/shared/components/checkbox/checkbox.component.css +131 -0
- package/src/lib/shared/components/checkbox/checkbox.component.html +84 -0
- package/src/lib/shared/components/checkbox/checkbox.component.spec.ts +344 -0
- package/src/lib/shared/components/checkbox/checkbox.component.ts +258 -0
- package/src/lib/shared/components/checkbox/checkbox.stories.ts +240 -0
- package/src/lib/shared/components/index.ts +4 -0
- package/types/ngx-opalbytes-components.d.ts +341 -126
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ElementRef, input, computed, forwardRef, HostListener, HostBinding, ChangeDetectionStrategy, Component, DestroyRef, model, output, effect, untracked, EventEmitter, Input, Output, ViewChild, ChangeDetectorRef, Renderer2, ViewContainerRef, ViewEncapsulation, NgModule, ContentChildren, Directive, TemplateRef, ContentChild, signal, PLATFORM_ID, ViewChildren, Optional, Inject, Injectable } from '@angular/core';
|
|
1
3
|
import * as i1 from '@angular/common';
|
|
2
4
|
import { CommonModule, isPlatformBrowser, NgTemplateOutlet, NgOptimizedImage } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Input, Output, Component, ViewChild, inject, ElementRef, ChangeDetectorRef, Renderer2, ViewContainerRef, forwardRef, HostListener, ChangeDetectionStrategy, ViewEncapsulation, NgModule, ContentChildren, Directive, TemplateRef, ContentChild, signal, PLATFORM_ID, ViewChildren, HostBinding, input, computed, Optional, Inject, Injectable, output, DestroyRef } from '@angular/core';
|
|
5
5
|
import * as i3 from '@angular/material/tooltip';
|
|
6
6
|
import { MatTooltipModule, MatTooltip } from '@angular/material/tooltip';
|
|
7
7
|
import { LucideDynamicIcon } from '@lucide/angular';
|
|
@@ -60,6 +60,297 @@ import { MatTreeModule } from '@angular/material/tree';
|
|
|
60
60
|
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
61
61
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
62
62
|
|
|
63
|
+
const CAO_ACCORDION = new InjectionToken('CAO_ACCORDION');
|
|
64
|
+
|
|
65
|
+
const HEADER_SELECTOR = '.cao-accordion-item__header:not(:disabled)';
|
|
66
|
+
/**
|
|
67
|
+
* Container de `<cao-accordion-item>`. Controla o modo de expansão (único ou múltiplo),
|
|
68
|
+
* a navegação por teclado e o tema (cores, posições e visibilidade) herdado pelos itens.
|
|
69
|
+
*/
|
|
70
|
+
class CaoAccordionComponent {
|
|
71
|
+
host = inject(ElementRef);
|
|
72
|
+
items = new Set();
|
|
73
|
+
// ----- Comportamento -----
|
|
74
|
+
/** Permite vários itens expandidos ao mesmo tempo. */
|
|
75
|
+
multi = input(false, ...(ngDevMode ? [{ debugName: "multi" }] : []));
|
|
76
|
+
/** Oculta o ícone de expandir/recolher em todos os itens (cada item pode sobrescrever). */
|
|
77
|
+
hideToggle = input(false, ...(ngDevMode ? [{ debugName: "hideToggle" }] : []));
|
|
78
|
+
/** Exibe ou oculta o accordion inteiro. */
|
|
79
|
+
isVisible = input(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : []));
|
|
80
|
+
/** Atributo `data-cy` para testes E2E. */
|
|
81
|
+
dataCy = input('', ...(ngDevMode ? [{ debugName: "dataCy" }] : []));
|
|
82
|
+
// ----- Posição / layout -----
|
|
83
|
+
togglePosition = input('after', ...(ngDevMode ? [{ debugName: "togglePosition" }] : []));
|
|
84
|
+
headerAlign = input('start', ...(ngDevMode ? [{ debugName: "headerAlign" }] : []));
|
|
85
|
+
contentAlign = input('start', ...(ngDevMode ? [{ debugName: "contentAlign" }] : []));
|
|
86
|
+
displayMode = input('default', ...(ngDevMode ? [{ debugName: "displayMode" }] : []));
|
|
87
|
+
// ----- Cores -----
|
|
88
|
+
headerBgColor = input('', ...(ngDevMode ? [{ debugName: "headerBgColor" }] : []));
|
|
89
|
+
headerTextColor = input('', ...(ngDevMode ? [{ debugName: "headerTextColor" }] : []));
|
|
90
|
+
headerHoverBgColor = input('', ...(ngDevMode ? [{ debugName: "headerHoverBgColor" }] : []));
|
|
91
|
+
headerActiveBgColor = input('', ...(ngDevMode ? [{ debugName: "headerActiveBgColor" }] : []));
|
|
92
|
+
activeColor = input('', ...(ngDevMode ? [{ debugName: "activeColor" }] : []));
|
|
93
|
+
contentBgColor = input('', ...(ngDevMode ? [{ debugName: "contentBgColor" }] : []));
|
|
94
|
+
contentTextColor = input('', ...(ngDevMode ? [{ debugName: "contentTextColor" }] : []));
|
|
95
|
+
borderColor = input('', ...(ngDevMode ? [{ debugName: "borderColor" }] : []));
|
|
96
|
+
disabledColor = input('', ...(ngDevMode ? [{ debugName: "disabledColor" }] : []));
|
|
97
|
+
focusRingColor = input('', ...(ngDevMode ? [{ debugName: "focusRingColor" }] : []));
|
|
98
|
+
iconColor = input('', ...(ngDevMode ? [{ debugName: "iconColor" }] : []));
|
|
99
|
+
// ----- Dimensões / animação -----
|
|
100
|
+
borderRadius = input('', ...(ngDevMode ? [{ debugName: "borderRadius" }] : []));
|
|
101
|
+
gap = input('', ...(ngDevMode ? [{ debugName: "gap" }] : []));
|
|
102
|
+
headerPadding = input('', ...(ngDevMode ? [{ debugName: "headerPadding" }] : []));
|
|
103
|
+
contentPadding = input('', ...(ngDevMode ? [{ debugName: "contentPadding" }] : []));
|
|
104
|
+
animationDuration = input('', ...(ngDevMode ? [{ debugName: "animationDuration" }] : []));
|
|
105
|
+
hostStyle = computed(() => ({
|
|
106
|
+
'--cao-accordion-header-bg': this.headerBgColor() || null,
|
|
107
|
+
'--cao-accordion-header-text': this.headerTextColor() || null,
|
|
108
|
+
'--cao-accordion-header-hover-bg': this.headerHoverBgColor() || null,
|
|
109
|
+
'--cao-accordion-header-active-bg': this.headerActiveBgColor() || null,
|
|
110
|
+
'--cao-accordion-active-color': this.activeColor() || null,
|
|
111
|
+
'--cao-accordion-content-bg': this.contentBgColor() || null,
|
|
112
|
+
'--cao-accordion-content-text': this.contentTextColor() || null,
|
|
113
|
+
'--cao-accordion-border-color': this.borderColor() || null,
|
|
114
|
+
'--cao-accordion-disabled-color': this.disabledColor() || null,
|
|
115
|
+
'--cao-accordion-focus-ring': this.focusRingColor() || null,
|
|
116
|
+
'--cao-accordion-icon-color': this.iconColor() || null,
|
|
117
|
+
'--cao-accordion-radius': this.borderRadius() || null,
|
|
118
|
+
'--cao-accordion-gap': this.gap() || null,
|
|
119
|
+
'--cao-accordion-header-padding': this.headerPadding() || null,
|
|
120
|
+
'--cao-accordion-content-padding': this.contentPadding() || null,
|
|
121
|
+
'--cao-accordion-duration': this.animationDuration() || null,
|
|
122
|
+
'--cao-accordion-content-align': this.contentAlign(),
|
|
123
|
+
}), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
124
|
+
get styleBinding() {
|
|
125
|
+
return this.hostStyle();
|
|
126
|
+
}
|
|
127
|
+
get dataCyAttr() {
|
|
128
|
+
return this.dataCy() || null;
|
|
129
|
+
}
|
|
130
|
+
get hiddenClass() {
|
|
131
|
+
return !this.isVisible();
|
|
132
|
+
}
|
|
133
|
+
get defaultModeClass() {
|
|
134
|
+
return this.displayMode() === 'default';
|
|
135
|
+
}
|
|
136
|
+
get flatModeClass() {
|
|
137
|
+
return this.displayMode() === 'flat';
|
|
138
|
+
}
|
|
139
|
+
get separatedModeClass() {
|
|
140
|
+
return this.displayMode() === 'separated';
|
|
141
|
+
}
|
|
142
|
+
/** Expande todos os itens. Só tem efeito quando `multi` está ativo. */
|
|
143
|
+
openAll() {
|
|
144
|
+
if (!this.multi()) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
this.items.forEach((item) => item.open());
|
|
148
|
+
}
|
|
149
|
+
/** Recolhe todos os itens. */
|
|
150
|
+
closeAll() {
|
|
151
|
+
this.items.forEach((item) => item.close());
|
|
152
|
+
}
|
|
153
|
+
register(item) {
|
|
154
|
+
this.items.add(item);
|
|
155
|
+
}
|
|
156
|
+
unregister(item) {
|
|
157
|
+
this.items.delete(item);
|
|
158
|
+
}
|
|
159
|
+
/** Chamado pelos itens ao expandir: no modo único, recolhe os demais. */
|
|
160
|
+
notifyOpened(item) {
|
|
161
|
+
if (this.multi()) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
this.items.forEach((other) => {
|
|
165
|
+
if (other !== item && other.expanded()) {
|
|
166
|
+
other.close();
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/** Navegação por teclado entre cabeçalhos: ↑ ↓ Home End. */
|
|
171
|
+
onKeydown(event) {
|
|
172
|
+
const root = this.host.nativeElement;
|
|
173
|
+
const target = event.target;
|
|
174
|
+
if (!target?.classList.contains('cao-accordion-item__header') || target.closest('cao-accordion') !== root) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const headers = Array.from(root.querySelectorAll(HEADER_SELECTOR)).filter((header) => header.closest('cao-accordion') === root && !header.closest('.cao-accordion-item--hidden'));
|
|
178
|
+
const current = headers.indexOf(target);
|
|
179
|
+
const last = headers.length - 1;
|
|
180
|
+
let next;
|
|
181
|
+
switch (event.key) {
|
|
182
|
+
case 'ArrowDown':
|
|
183
|
+
next = current >= last ? 0 : current + 1;
|
|
184
|
+
break;
|
|
185
|
+
case 'ArrowUp':
|
|
186
|
+
next = current <= 0 ? last : current - 1;
|
|
187
|
+
break;
|
|
188
|
+
case 'Home':
|
|
189
|
+
next = 0;
|
|
190
|
+
break;
|
|
191
|
+
case 'End':
|
|
192
|
+
next = last;
|
|
193
|
+
break;
|
|
194
|
+
default:
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
event.preventDefault();
|
|
198
|
+
headers[next]?.focus();
|
|
199
|
+
}
|
|
200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CaoAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
201
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: CaoAccordionComponent, isStandalone: true, selector: "cao-accordion", inputs: { multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, hideToggle: { classPropertyName: "hideToggle", publicName: "hideToggle", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null }, dataCy: { classPropertyName: "dataCy", publicName: "dataCy", isSignal: true, isRequired: false, transformFunction: null }, togglePosition: { classPropertyName: "togglePosition", publicName: "togglePosition", isSignal: true, isRequired: false, transformFunction: null }, headerAlign: { classPropertyName: "headerAlign", publicName: "headerAlign", isSignal: true, isRequired: false, transformFunction: null }, contentAlign: { classPropertyName: "contentAlign", publicName: "contentAlign", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, headerBgColor: { classPropertyName: "headerBgColor", publicName: "headerBgColor", isSignal: true, isRequired: false, transformFunction: null }, headerTextColor: { classPropertyName: "headerTextColor", publicName: "headerTextColor", isSignal: true, isRequired: false, transformFunction: null }, headerHoverBgColor: { classPropertyName: "headerHoverBgColor", publicName: "headerHoverBgColor", isSignal: true, isRequired: false, transformFunction: null }, headerActiveBgColor: { classPropertyName: "headerActiveBgColor", publicName: "headerActiveBgColor", isSignal: true, isRequired: false, transformFunction: null }, activeColor: { classPropertyName: "activeColor", publicName: "activeColor", isSignal: true, isRequired: false, transformFunction: null }, contentBgColor: { classPropertyName: "contentBgColor", publicName: "contentBgColor", isSignal: true, isRequired: false, transformFunction: null }, contentTextColor: { classPropertyName: "contentTextColor", publicName: "contentTextColor", isSignal: true, isRequired: false, transformFunction: null }, borderColor: { classPropertyName: "borderColor", publicName: "borderColor", isSignal: true, isRequired: false, transformFunction: null }, disabledColor: { classPropertyName: "disabledColor", publicName: "disabledColor", isSignal: true, isRequired: false, transformFunction: null }, focusRingColor: { classPropertyName: "focusRingColor", publicName: "focusRingColor", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, headerPadding: { classPropertyName: "headerPadding", publicName: "headerPadding", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "contentPadding", isSignal: true, isRequired: false, transformFunction: null }, animationDuration: { classPropertyName: "animationDuration", publicName: "animationDuration", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "style": "this.styleBinding", "attr.data-cy": "this.dataCyAttr", "class.cao-accordion--hidden": "this.hiddenClass", "class.cao-accordion--default": "this.defaultModeClass", "class.cao-accordion--flat": "this.flatModeClass", "class.cao-accordion--separated": "this.separatedModeClass" } }, providers: [{ provide: CAO_ACCORDION, useExisting: forwardRef(() => CaoAccordionComponent) }], ngImport: i0, template: "<ng-content />", styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;width:100%}:host(.cao-accordion--hidden){display:none}:host(.cao-accordion--default){gap:1px;background:var(--cao-accordion-border-color, #e5e7eb);border:1px solid var(--cao-accordion-border-color, #e5e7eb);border-radius:var(--cao-accordion-radius, 8px);overflow:hidden}:host(.cao-accordion--flat){gap:1px;background:var(--cao-accordion-border-color, #e5e7eb);border-top:1px solid var(--cao-accordion-border-color, #e5e7eb);border-bottom:1px solid var(--cao-accordion-border-color, #e5e7eb)}:host(.cao-accordion--separated){gap:var(--cao-accordion-gap, 8px)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
202
|
+
}
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CaoAccordionComponent, decorators: [{
|
|
204
|
+
type: Component,
|
|
205
|
+
args: [{ selector: 'cao-accordion', changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: CAO_ACCORDION, useExisting: forwardRef(() => CaoAccordionComponent) }], template: "<ng-content />", styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;width:100%}:host(.cao-accordion--hidden){display:none}:host(.cao-accordion--default){gap:1px;background:var(--cao-accordion-border-color, #e5e7eb);border:1px solid var(--cao-accordion-border-color, #e5e7eb);border-radius:var(--cao-accordion-radius, 8px);overflow:hidden}:host(.cao-accordion--flat){gap:1px;background:var(--cao-accordion-border-color, #e5e7eb);border-top:1px solid var(--cao-accordion-border-color, #e5e7eb);border-bottom:1px solid var(--cao-accordion-border-color, #e5e7eb)}:host(.cao-accordion--separated){gap:var(--cao-accordion-gap, 8px)}\n"] }]
|
|
206
|
+
}], propDecorators: { multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], hideToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideToggle", required: false }] }], isVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isVisible", required: false }] }], dataCy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataCy", required: false }] }], togglePosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "togglePosition", required: false }] }], headerAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerAlign", required: false }] }], contentAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentAlign", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], headerBgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerBgColor", required: false }] }], headerTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTextColor", required: false }] }], headerHoverBgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerHoverBgColor", required: false }] }], headerActiveBgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerActiveBgColor", required: false }] }], activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }], contentBgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentBgColor", required: false }] }], contentTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentTextColor", required: false }] }], borderColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderColor", required: false }] }], disabledColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledColor", required: false }] }], focusRingColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusRingColor", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], borderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadius", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], headerPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerPadding", required: false }] }], contentPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentPadding", required: false }] }], animationDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }], styleBinding: [{
|
|
207
|
+
type: HostBinding,
|
|
208
|
+
args: ['style']
|
|
209
|
+
}], dataCyAttr: [{
|
|
210
|
+
type: HostBinding,
|
|
211
|
+
args: ['attr.data-cy']
|
|
212
|
+
}], hiddenClass: [{
|
|
213
|
+
type: HostBinding,
|
|
214
|
+
args: ['class.cao-accordion--hidden']
|
|
215
|
+
}], defaultModeClass: [{
|
|
216
|
+
type: HostBinding,
|
|
217
|
+
args: ['class.cao-accordion--default']
|
|
218
|
+
}], flatModeClass: [{
|
|
219
|
+
type: HostBinding,
|
|
220
|
+
args: ['class.cao-accordion--flat']
|
|
221
|
+
}], separatedModeClass: [{
|
|
222
|
+
type: HostBinding,
|
|
223
|
+
args: ['class.cao-accordion--separated']
|
|
224
|
+
}], onKeydown: [{
|
|
225
|
+
type: HostListener,
|
|
226
|
+
args: ['keydown', ['$event']]
|
|
227
|
+
}] } });
|
|
228
|
+
|
|
229
|
+
let nextId = 0;
|
|
230
|
+
/**
|
|
231
|
+
* Item do accordion. Pode ser usado dentro de `<cao-accordion>` ou isolado (como um cartão expansível).
|
|
232
|
+
* Os inputs de cor/posição, quando informados, sobrescrevem os valores definidos no accordion.
|
|
233
|
+
*/
|
|
234
|
+
class CaoAccordionItemComponent {
|
|
235
|
+
accordion = inject(CAO_ACCORDION, { optional: true });
|
|
236
|
+
destroyRef = inject(DestroyRef);
|
|
237
|
+
previousExpanded = null;
|
|
238
|
+
headerId = `cao-accordion-header-${nextId}`;
|
|
239
|
+
panelId = `cao-accordion-panel-${nextId++}`;
|
|
240
|
+
// ----- Conteúdo -----
|
|
241
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
242
|
+
description = input('', ...(ngDevMode ? [{ debugName: "description" }] : []));
|
|
243
|
+
/** Nível do heading (aria-level) do cabeçalho. */
|
|
244
|
+
headingLevel = input(3, ...(ngDevMode ? [{ debugName: "headingLevel" }] : []));
|
|
245
|
+
// ----- Estado -----
|
|
246
|
+
/** Estado de expansão. Suporta two-way binding: `[(expanded)]`. */
|
|
247
|
+
expanded = model(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
|
|
248
|
+
isDisabled = input(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
249
|
+
/** Exibe ou oculta o item. */
|
|
250
|
+
isVisible = input(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : []));
|
|
251
|
+
dataCy = input('', ...(ngDevMode ? [{ debugName: "dataCy" }] : []));
|
|
252
|
+
// ----- Posição (sobrescreve o accordion quando informado) -----
|
|
253
|
+
hideToggle = input(undefined, ...(ngDevMode ? [{ debugName: "hideToggle" }] : []));
|
|
254
|
+
togglePosition = input(undefined, ...(ngDevMode ? [{ debugName: "togglePosition" }] : []));
|
|
255
|
+
headerAlign = input(undefined, ...(ngDevMode ? [{ debugName: "headerAlign" }] : []));
|
|
256
|
+
// ----- Cores (sobrescrevem o accordion quando informadas) -----
|
|
257
|
+
headerBgColor = input('', ...(ngDevMode ? [{ debugName: "headerBgColor" }] : []));
|
|
258
|
+
headerTextColor = input('', ...(ngDevMode ? [{ debugName: "headerTextColor" }] : []));
|
|
259
|
+
headerActiveBgColor = input('', ...(ngDevMode ? [{ debugName: "headerActiveBgColor" }] : []));
|
|
260
|
+
activeColor = input('', ...(ngDevMode ? [{ debugName: "activeColor" }] : []));
|
|
261
|
+
contentBgColor = input('', ...(ngDevMode ? [{ debugName: "contentBgColor" }] : []));
|
|
262
|
+
contentTextColor = input('', ...(ngDevMode ? [{ debugName: "contentTextColor" }] : []));
|
|
263
|
+
borderColor = input('', ...(ngDevMode ? [{ debugName: "borderColor" }] : []));
|
|
264
|
+
iconColor = input('', ...(ngDevMode ? [{ debugName: "iconColor" }] : []));
|
|
265
|
+
// ----- Eventos -----
|
|
266
|
+
opened = output();
|
|
267
|
+
closed = output();
|
|
268
|
+
toggleHidden = computed(() => this.hideToggle() ?? this.accordion?.hideToggle() ?? false, ...(ngDevMode ? [{ debugName: "toggleHidden" }] : []));
|
|
269
|
+
togglePos = computed(() => this.togglePosition() ?? this.accordion?.togglePosition() ?? 'after', ...(ngDevMode ? [{ debugName: "togglePos" }] : []));
|
|
270
|
+
align = computed(() => this.headerAlign() ?? this.accordion?.headerAlign() ?? 'start', ...(ngDevMode ? [{ debugName: "align" }] : []));
|
|
271
|
+
isCard = computed(() => (this.accordion?.displayMode() ?? 'separated') === 'separated', ...(ngDevMode ? [{ debugName: "isCard" }] : []));
|
|
272
|
+
headerDataCy = computed(() => (this.dataCy() ? `${this.dataCy()}-header` : null), ...(ngDevMode ? [{ debugName: "headerDataCy" }] : []));
|
|
273
|
+
panelDataCy = computed(() => (this.dataCy() ? `${this.dataCy()}-content` : null), ...(ngDevMode ? [{ debugName: "panelDataCy" }] : []));
|
|
274
|
+
hostStyle = computed(() => ({
|
|
275
|
+
'--cao-accordion-header-bg': this.headerBgColor() || null,
|
|
276
|
+
'--cao-accordion-header-text': this.headerTextColor() || null,
|
|
277
|
+
'--cao-accordion-header-active-bg': this.headerActiveBgColor() || null,
|
|
278
|
+
'--cao-accordion-active-color': this.activeColor() || null,
|
|
279
|
+
'--cao-accordion-content-bg': this.contentBgColor() || null,
|
|
280
|
+
'--cao-accordion-content-text': this.contentTextColor() || null,
|
|
281
|
+
'--cao-accordion-border-color': this.borderColor() || null,
|
|
282
|
+
'--cao-accordion-icon-color': this.iconColor() || null,
|
|
283
|
+
'--cao-accordion-header-align': this.align(),
|
|
284
|
+
}), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
285
|
+
get styleBinding() {
|
|
286
|
+
return this.hostStyle();
|
|
287
|
+
}
|
|
288
|
+
get dataCyAttr() {
|
|
289
|
+
return this.dataCy() || null;
|
|
290
|
+
}
|
|
291
|
+
get hiddenClass() {
|
|
292
|
+
return !this.isVisible();
|
|
293
|
+
}
|
|
294
|
+
get expandedClass() {
|
|
295
|
+
return this.expanded();
|
|
296
|
+
}
|
|
297
|
+
get cardClass() {
|
|
298
|
+
return this.isCard();
|
|
299
|
+
}
|
|
300
|
+
constructor() {
|
|
301
|
+
this.accordion?.register(this);
|
|
302
|
+
this.destroyRef.onDestroy(() => this.accordion?.unregister(this));
|
|
303
|
+
effect(() => {
|
|
304
|
+
const isExpanded = this.expanded();
|
|
305
|
+
untracked(() => this.handleExpandedChange(isExpanded));
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
/** Alterna o estado (ignorado quando o item está desabilitado). */
|
|
309
|
+
toggle() {
|
|
310
|
+
if (this.isDisabled()) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
this.expanded.update((value) => !value);
|
|
314
|
+
}
|
|
315
|
+
open() {
|
|
316
|
+
this.expanded.set(true);
|
|
317
|
+
}
|
|
318
|
+
close() {
|
|
319
|
+
this.expanded.set(false);
|
|
320
|
+
}
|
|
321
|
+
handleExpandedChange(isExpanded) {
|
|
322
|
+
if (isExpanded) {
|
|
323
|
+
this.accordion?.notifyOpened(this);
|
|
324
|
+
}
|
|
325
|
+
if (this.previousExpanded !== null && this.previousExpanded !== isExpanded) {
|
|
326
|
+
const event = isExpanded ? this.opened : this.closed;
|
|
327
|
+
event.emit();
|
|
328
|
+
}
|
|
329
|
+
this.previousExpanded = isExpanded;
|
|
330
|
+
}
|
|
331
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CaoAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
332
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: CaoAccordionItemComponent, isStandalone: true, selector: "cao-accordion-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null }, dataCy: { classPropertyName: "dataCy", publicName: "dataCy", isSignal: true, isRequired: false, transformFunction: null }, hideToggle: { classPropertyName: "hideToggle", publicName: "hideToggle", isSignal: true, isRequired: false, transformFunction: null }, togglePosition: { classPropertyName: "togglePosition", publicName: "togglePosition", isSignal: true, isRequired: false, transformFunction: null }, headerAlign: { classPropertyName: "headerAlign", publicName: "headerAlign", isSignal: true, isRequired: false, transformFunction: null }, headerBgColor: { classPropertyName: "headerBgColor", publicName: "headerBgColor", isSignal: true, isRequired: false, transformFunction: null }, headerTextColor: { classPropertyName: "headerTextColor", publicName: "headerTextColor", isSignal: true, isRequired: false, transformFunction: null }, headerActiveBgColor: { classPropertyName: "headerActiveBgColor", publicName: "headerActiveBgColor", isSignal: true, isRequired: false, transformFunction: null }, activeColor: { classPropertyName: "activeColor", publicName: "activeColor", isSignal: true, isRequired: false, transformFunction: null }, contentBgColor: { classPropertyName: "contentBgColor", publicName: "contentBgColor", isSignal: true, isRequired: false, transformFunction: null }, contentTextColor: { classPropertyName: "contentTextColor", publicName: "contentTextColor", isSignal: true, isRequired: false, transformFunction: null }, borderColor: { classPropertyName: "borderColor", publicName: "borderColor", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange", opened: "opened", closed: "closed" }, host: { properties: { "style": "this.styleBinding", "attr.data-cy": "this.dataCyAttr", "class.cao-accordion-item--hidden": "this.hiddenClass", "class.cao-accordion-item--expanded": "this.expandedClass", "class.cao-accordion-item--card": "this.cardClass" } }, ngImport: i0, template: "<div class=\"cao-accordion-item\">\n <div class=\"cao-accordion-item__heading\" role=\"heading\" [attr.aria-level]=\"headingLevel()\">\n <button\n type=\"button\"\n class=\"cao-accordion-item__header\"\n [class.cao-accordion-item__header--toggle-before]=\"togglePos() === 'before'\"\n [id]=\"headerId\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"panelId\"\n [attr.data-cy]=\"headerDataCy()\"\n (click)=\"toggle()\">\n <span class=\"cao-accordion-item__text\">\n <span class=\"cao-accordion-item__label\">{{ label() }}</span>\n @if (description()) {\n <span class=\"cao-accordion-item__description\">{{ description() }}</span>\n }\n <ng-content select=\"[caoAccordionHeader]\" />\n </span>\n\n @if (!toggleHidden()) {\n <svg\n class=\"cao-accordion-item__icon\"\n viewBox=\"0 0 24 24\"\n width=\"20\"\n height=\"20\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\">\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n }\n </button>\n </div>\n\n <div\n class=\"cao-accordion-item__panel\"\n role=\"region\"\n [id]=\"panelId\"\n [attr.aria-labelledby]=\"headerId\"\n [attr.data-cy]=\"panelDataCy()\">\n <div class=\"cao-accordion-item__panel-inner\">\n <div class=\"cao-accordion-item__content\">\n <ng-content />\n </div>\n </div>\n </div>\n</div>", styles: [":host{display:block;box-sizing:border-box;min-width:0}:host(.cao-accordion-item--hidden){display:none}.cao-accordion-item{background:var(--cao-accordion-content-bg, #ffffff);color:var(--cao-accordion-content-text, #374151);overflow:hidden}:host(.cao-accordion-item--card) .cao-accordion-item{border:1px solid var(--cao-accordion-border-color, #e5e7eb);border-radius:var(--cao-accordion-radius, 8px)}.cao-accordion-item__heading{margin:0}.cao-accordion-item__header{display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;min-height:48px;margin:0;padding:var(--cao-accordion-header-padding, 12px 16px);border:0;border-radius:0;background:var(--cao-accordion-header-bg, #ffffff);color:var(--cao-accordion-header-text, #111827);font:inherit;text-align:start;cursor:pointer;transition:background-color var(--cao-accordion-duration, .25s) ease,color var(--cao-accordion-duration, .25s) ease}.cao-accordion-item__header:hover:not(:disabled){background:var(--cao-accordion-header-hover-bg, #f3f4f6)}.cao-accordion-item__header:focus-visible{outline:2px solid var(--cao-accordion-focus-ring, rgba(79, 70, 229, .35));outline-offset:-2px}.cao-accordion-item__header:disabled{color:var(--cao-accordion-disabled-color, #9ca3af);cursor:not-allowed}:host(.cao-accordion-item--expanded) .cao-accordion-item__header{background:var(--cao-accordion-header-active-bg, var(--cao-accordion-header-bg, #ffffff));color:var(--cao-accordion-active-color, #4f46e5)}:host(.cao-accordion-item--expanded) .cao-accordion-item__header:disabled{color:var(--cao-accordion-disabled-color, #9ca3af)}.cao-accordion-item__text{display:flex;flex:1 1 auto;flex-direction:column;gap:2px;min-width:0;text-align:var(--cao-accordion-header-align, start)}.cao-accordion-item__label{font-weight:600;overflow-wrap:anywhere}.cao-accordion-item__description{font-size:.8125rem;font-weight:400;opacity:.75}.cao-accordion-item__icon{flex:0 0 auto;color:var(--cao-accordion-icon-color, currentColor);transition:transform var(--cao-accordion-duration, .25s) ease}.cao-accordion-item__header--toggle-before .cao-accordion-item__icon{order:-1}:host(.cao-accordion-item--expanded) .cao-accordion-item__icon{transform:rotate(180deg)}.cao-accordion-item__panel{display:grid;grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows var(--cao-accordion-duration, .25s) ease,visibility var(--cao-accordion-duration, .25s)}:host(.cao-accordion-item--expanded) .cao-accordion-item__panel{grid-template-rows:1fr;visibility:visible}.cao-accordion-item__panel-inner{min-height:0;overflow:hidden}.cao-accordion-item__content{padding:var(--cao-accordion-content-padding, 16px);border-top:1px solid var(--cao-accordion-border-color, #e5e7eb);text-align:var(--cao-accordion-content-align, start)}@media(prefers-reduced-motion:reduce){.cao-accordion-item__header,.cao-accordion-item__icon,.cao-accordion-item__panel{transition:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
333
|
+
}
|
|
334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CaoAccordionItemComponent, decorators: [{
|
|
335
|
+
type: Component,
|
|
336
|
+
args: [{ selector: 'cao-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"cao-accordion-item\">\n <div class=\"cao-accordion-item__heading\" role=\"heading\" [attr.aria-level]=\"headingLevel()\">\n <button\n type=\"button\"\n class=\"cao-accordion-item__header\"\n [class.cao-accordion-item__header--toggle-before]=\"togglePos() === 'before'\"\n [id]=\"headerId\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"panelId\"\n [attr.data-cy]=\"headerDataCy()\"\n (click)=\"toggle()\">\n <span class=\"cao-accordion-item__text\">\n <span class=\"cao-accordion-item__label\">{{ label() }}</span>\n @if (description()) {\n <span class=\"cao-accordion-item__description\">{{ description() }}</span>\n }\n <ng-content select=\"[caoAccordionHeader]\" />\n </span>\n\n @if (!toggleHidden()) {\n <svg\n class=\"cao-accordion-item__icon\"\n viewBox=\"0 0 24 24\"\n width=\"20\"\n height=\"20\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\">\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n }\n </button>\n </div>\n\n <div\n class=\"cao-accordion-item__panel\"\n role=\"region\"\n [id]=\"panelId\"\n [attr.aria-labelledby]=\"headerId\"\n [attr.data-cy]=\"panelDataCy()\">\n <div class=\"cao-accordion-item__panel-inner\">\n <div class=\"cao-accordion-item__content\">\n <ng-content />\n </div>\n </div>\n </div>\n</div>", styles: [":host{display:block;box-sizing:border-box;min-width:0}:host(.cao-accordion-item--hidden){display:none}.cao-accordion-item{background:var(--cao-accordion-content-bg, #ffffff);color:var(--cao-accordion-content-text, #374151);overflow:hidden}:host(.cao-accordion-item--card) .cao-accordion-item{border:1px solid var(--cao-accordion-border-color, #e5e7eb);border-radius:var(--cao-accordion-radius, 8px)}.cao-accordion-item__heading{margin:0}.cao-accordion-item__header{display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;min-height:48px;margin:0;padding:var(--cao-accordion-header-padding, 12px 16px);border:0;border-radius:0;background:var(--cao-accordion-header-bg, #ffffff);color:var(--cao-accordion-header-text, #111827);font:inherit;text-align:start;cursor:pointer;transition:background-color var(--cao-accordion-duration, .25s) ease,color var(--cao-accordion-duration, .25s) ease}.cao-accordion-item__header:hover:not(:disabled){background:var(--cao-accordion-header-hover-bg, #f3f4f6)}.cao-accordion-item__header:focus-visible{outline:2px solid var(--cao-accordion-focus-ring, rgba(79, 70, 229, .35));outline-offset:-2px}.cao-accordion-item__header:disabled{color:var(--cao-accordion-disabled-color, #9ca3af);cursor:not-allowed}:host(.cao-accordion-item--expanded) .cao-accordion-item__header{background:var(--cao-accordion-header-active-bg, var(--cao-accordion-header-bg, #ffffff));color:var(--cao-accordion-active-color, #4f46e5)}:host(.cao-accordion-item--expanded) .cao-accordion-item__header:disabled{color:var(--cao-accordion-disabled-color, #9ca3af)}.cao-accordion-item__text{display:flex;flex:1 1 auto;flex-direction:column;gap:2px;min-width:0;text-align:var(--cao-accordion-header-align, start)}.cao-accordion-item__label{font-weight:600;overflow-wrap:anywhere}.cao-accordion-item__description{font-size:.8125rem;font-weight:400;opacity:.75}.cao-accordion-item__icon{flex:0 0 auto;color:var(--cao-accordion-icon-color, currentColor);transition:transform var(--cao-accordion-duration, .25s) ease}.cao-accordion-item__header--toggle-before .cao-accordion-item__icon{order:-1}:host(.cao-accordion-item--expanded) .cao-accordion-item__icon{transform:rotate(180deg)}.cao-accordion-item__panel{display:grid;grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows var(--cao-accordion-duration, .25s) ease,visibility var(--cao-accordion-duration, .25s)}:host(.cao-accordion-item--expanded) .cao-accordion-item__panel{grid-template-rows:1fr;visibility:visible}.cao-accordion-item__panel-inner{min-height:0;overflow:hidden}.cao-accordion-item__content{padding:var(--cao-accordion-content-padding, 16px);border-top:1px solid var(--cao-accordion-border-color, #e5e7eb);text-align:var(--cao-accordion-content-align, start)}@media(prefers-reduced-motion:reduce){.cao-accordion-item__header,.cao-accordion-item__icon,.cao-accordion-item__panel{transition:none}}\n"] }]
|
|
337
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], headingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingLevel", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], isVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isVisible", required: false }] }], dataCy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataCy", required: false }] }], hideToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideToggle", required: false }] }], togglePosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "togglePosition", required: false }] }], headerAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerAlign", required: false }] }], headerBgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerBgColor", required: false }] }], headerTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTextColor", required: false }] }], headerActiveBgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerActiveBgColor", required: false }] }], activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }], contentBgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentBgColor", required: false }] }], contentTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentTextColor", required: false }] }], borderColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderColor", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], styleBinding: [{
|
|
338
|
+
type: HostBinding,
|
|
339
|
+
args: ['style']
|
|
340
|
+
}], dataCyAttr: [{
|
|
341
|
+
type: HostBinding,
|
|
342
|
+
args: ['attr.data-cy']
|
|
343
|
+
}], hiddenClass: [{
|
|
344
|
+
type: HostBinding,
|
|
345
|
+
args: ['class.cao-accordion-item--hidden']
|
|
346
|
+
}], expandedClass: [{
|
|
347
|
+
type: HostBinding,
|
|
348
|
+
args: ['class.cao-accordion-item--expanded']
|
|
349
|
+
}], cardClass: [{
|
|
350
|
+
type: HostBinding,
|
|
351
|
+
args: ['class.cao-accordion-item--card']
|
|
352
|
+
}] } });
|
|
353
|
+
|
|
63
354
|
class CaoBaseButtonComponent {
|
|
64
355
|
buttonClick = new EventEmitter();
|
|
65
356
|
buttonText = "Clique!";
|
|
@@ -2942,6 +3233,274 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
2942
3233
|
args: ["style"]
|
|
2943
3234
|
}] } });
|
|
2944
3235
|
|
|
3236
|
+
let nextCheckboxId = 0;
|
|
3237
|
+
class CaoCheckboxComponent {
|
|
3238
|
+
checked = false;
|
|
3239
|
+
indeterminate = false;
|
|
3240
|
+
isDisabled = false;
|
|
3241
|
+
required = false;
|
|
3242
|
+
label = "";
|
|
3243
|
+
labelPosition = "after";
|
|
3244
|
+
name = "";
|
|
3245
|
+
id = "";
|
|
3246
|
+
ariaLabel = "";
|
|
3247
|
+
ariaLabelledBy = "";
|
|
3248
|
+
dataCy = "";
|
|
3249
|
+
control;
|
|
3250
|
+
errorMessage = "";
|
|
3251
|
+
color;
|
|
3252
|
+
uncheckedColor;
|
|
3253
|
+
disabledColor;
|
|
3254
|
+
labelColor;
|
|
3255
|
+
disabledLabelColor;
|
|
3256
|
+
focusRingColor;
|
|
3257
|
+
size;
|
|
3258
|
+
borderRadius;
|
|
3259
|
+
animationDuration;
|
|
3260
|
+
checkedIcon = "";
|
|
3261
|
+
uncheckedIcon = "";
|
|
3262
|
+
indeterminateIcon = "";
|
|
3263
|
+
isLucideIcon = false;
|
|
3264
|
+
iconColor = "";
|
|
3265
|
+
checkedIconColor = "";
|
|
3266
|
+
uncheckedIconColor = "";
|
|
3267
|
+
iconSize = 14;
|
|
3268
|
+
iconStrokeWidth = 2.5;
|
|
3269
|
+
set disabled(value) {
|
|
3270
|
+
this.isDisabled = value;
|
|
3271
|
+
this.cdr.markForCheck();
|
|
3272
|
+
}
|
|
3273
|
+
get disabled() {
|
|
3274
|
+
return this.isDisabled;
|
|
3275
|
+
}
|
|
3276
|
+
checkedChange = new EventEmitter();
|
|
3277
|
+
indeterminateChange = new EventEmitter();
|
|
3278
|
+
checkboxChange = new EventEmitter();
|
|
3279
|
+
cdr = inject(ChangeDetectorRef);
|
|
3280
|
+
uid = `cao-checkbox-${nextCheckboxId++}`;
|
|
3281
|
+
controlSub;
|
|
3282
|
+
onChange = () => { };
|
|
3283
|
+
onTouched = () => { };
|
|
3284
|
+
ngOnChanges(changes) {
|
|
3285
|
+
if (changes["control"]) {
|
|
3286
|
+
this.controlSub?.unsubscribe();
|
|
3287
|
+
this.controlSub = this.control?.statusChanges.subscribe(() => this.cdr.markForCheck());
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3290
|
+
ngOnDestroy() {
|
|
3291
|
+
this.controlSub?.unsubscribe();
|
|
3292
|
+
}
|
|
3293
|
+
get inputId() {
|
|
3294
|
+
return this.id || this.uid;
|
|
3295
|
+
}
|
|
3296
|
+
get hasError() {
|
|
3297
|
+
return !!this.errorMessage;
|
|
3298
|
+
}
|
|
3299
|
+
get hasInvalidState() {
|
|
3300
|
+
return !!(this.control?.touched && this.control?.invalid);
|
|
3301
|
+
}
|
|
3302
|
+
get hasValidState() {
|
|
3303
|
+
return !!(this.control?.touched && this.control?.valid);
|
|
3304
|
+
}
|
|
3305
|
+
get resolvedIconColor() {
|
|
3306
|
+
if (this.indeterminate) {
|
|
3307
|
+
return this.iconColor || this.checkedIconColor;
|
|
3308
|
+
}
|
|
3309
|
+
return this.checked
|
|
3310
|
+
? this.checkedIconColor || this.iconColor
|
|
3311
|
+
: this.uncheckedIconColor || this.iconColor;
|
|
3312
|
+
}
|
|
3313
|
+
get hostStyles() {
|
|
3314
|
+
const styles = {};
|
|
3315
|
+
if (this.color) {
|
|
3316
|
+
styles["--cao-checkbox-color"] = this.color;
|
|
3317
|
+
}
|
|
3318
|
+
if (this.uncheckedColor) {
|
|
3319
|
+
styles["--cao-checkbox-unselected"] = this.uncheckedColor;
|
|
3320
|
+
}
|
|
3321
|
+
if (this.disabledColor) {
|
|
3322
|
+
styles["--cao-checkbox-disabled"] = this.disabledColor;
|
|
3323
|
+
}
|
|
3324
|
+
if (this.labelColor) {
|
|
3325
|
+
styles["--cao-checkbox-label"] = this.labelColor;
|
|
3326
|
+
}
|
|
3327
|
+
if (this.disabledLabelColor) {
|
|
3328
|
+
styles["--cao-checkbox-label-disabled"] = this.disabledLabelColor;
|
|
3329
|
+
}
|
|
3330
|
+
if (this.focusRingColor) {
|
|
3331
|
+
styles["--cao-checkbox-focus-ring"] = this.focusRingColor;
|
|
3332
|
+
}
|
|
3333
|
+
if (this.size) {
|
|
3334
|
+
styles["--cao-checkbox-size"] = this.size;
|
|
3335
|
+
}
|
|
3336
|
+
if (this.borderRadius) {
|
|
3337
|
+
styles["--cao-checkbox-radius"] = this.borderRadius;
|
|
3338
|
+
}
|
|
3339
|
+
if (this.animationDuration) {
|
|
3340
|
+
styles["--cao-checkbox-duration"] = this.animationDuration;
|
|
3341
|
+
}
|
|
3342
|
+
if (this.resolvedIconColor) {
|
|
3343
|
+
styles["--cao-checkbox-icon-color"] = this.resolvedIconColor;
|
|
3344
|
+
}
|
|
3345
|
+
styles["--cao-checkbox-icon-size"] = this.toCssLength(this.iconSize);
|
|
3346
|
+
return styles;
|
|
3347
|
+
}
|
|
3348
|
+
toggle() {
|
|
3349
|
+
if (this.isDisabled) {
|
|
3350
|
+
return;
|
|
3351
|
+
}
|
|
3352
|
+
this.setChecked(!this.checked, true);
|
|
3353
|
+
}
|
|
3354
|
+
setChecked(value, emit = true) {
|
|
3355
|
+
if (this.isDisabled) {
|
|
3356
|
+
return;
|
|
3357
|
+
}
|
|
3358
|
+
const wasIndeterminate = this.indeterminate;
|
|
3359
|
+
this.checked = value;
|
|
3360
|
+
this.indeterminate = false;
|
|
3361
|
+
this.onChange(value);
|
|
3362
|
+
if (emit) {
|
|
3363
|
+
this.checkedChange.emit(value);
|
|
3364
|
+
this.checkboxChange.emit({ checked: value, source: this });
|
|
3365
|
+
}
|
|
3366
|
+
if (wasIndeterminate) {
|
|
3367
|
+
this.indeterminateChange.emit(false);
|
|
3368
|
+
}
|
|
3369
|
+
this.cdr.markForCheck();
|
|
3370
|
+
}
|
|
3371
|
+
setIndeterminate(value) {
|
|
3372
|
+
if (this.isDisabled || this.indeterminate === value) {
|
|
3373
|
+
return;
|
|
3374
|
+
}
|
|
3375
|
+
this.indeterminate = value;
|
|
3376
|
+
this.indeterminateChange.emit(value);
|
|
3377
|
+
this.cdr.markForCheck();
|
|
3378
|
+
}
|
|
3379
|
+
enable() {
|
|
3380
|
+
this.isDisabled = false;
|
|
3381
|
+
this.cdr.markForCheck();
|
|
3382
|
+
}
|
|
3383
|
+
disable() {
|
|
3384
|
+
this.isDisabled = true;
|
|
3385
|
+
this.cdr.markForCheck();
|
|
3386
|
+
}
|
|
3387
|
+
onInputChange(event) {
|
|
3388
|
+
const target = event.target;
|
|
3389
|
+
this.setChecked(target.checked, true);
|
|
3390
|
+
}
|
|
3391
|
+
onBlur() {
|
|
3392
|
+
this.onTouched();
|
|
3393
|
+
}
|
|
3394
|
+
writeValue(value) {
|
|
3395
|
+
this.checked = !!value;
|
|
3396
|
+
this.cdr.markForCheck();
|
|
3397
|
+
}
|
|
3398
|
+
registerOnChange(fn) {
|
|
3399
|
+
this.onChange = fn;
|
|
3400
|
+
}
|
|
3401
|
+
registerOnTouched(fn) {
|
|
3402
|
+
this.onTouched = fn;
|
|
3403
|
+
}
|
|
3404
|
+
setDisabledState(isDisabled) {
|
|
3405
|
+
this.isDisabled = isDisabled;
|
|
3406
|
+
this.cdr.markForCheck();
|
|
3407
|
+
}
|
|
3408
|
+
toCssLength(value) {
|
|
3409
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
3410
|
+
}
|
|
3411
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CaoCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3412
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: CaoCheckboxComponent, isStandalone: true, selector: "cao-checkbox", inputs: { checked: "checked", indeterminate: "indeterminate", isDisabled: "isDisabled", required: "required", label: "label", labelPosition: "labelPosition", name: "name", id: "id", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", dataCy: "dataCy", control: "control", errorMessage: "errorMessage", color: "color", uncheckedColor: "uncheckedColor", disabledColor: "disabledColor", labelColor: "labelColor", disabledLabelColor: "disabledLabelColor", focusRingColor: "focusRingColor", size: "size", borderRadius: "borderRadius", animationDuration: "animationDuration", checkedIcon: "checkedIcon", uncheckedIcon: "uncheckedIcon", indeterminateIcon: "indeterminateIcon", isLucideIcon: "isLucideIcon", iconColor: "iconColor", checkedIconColor: "checkedIconColor", uncheckedIconColor: "uncheckedIconColor", iconSize: "iconSize", iconStrokeWidth: "iconStrokeWidth", disabled: "disabled" }, outputs: { checkedChange: "checkedChange", indeterminateChange: "indeterminateChange", checkboxChange: "checkboxChange" }, host: { properties: { "style": "this.hostStyles" } }, providers: [
|
|
3413
|
+
{
|
|
3414
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3415
|
+
useExisting: forwardRef(() => CaoCheckboxComponent),
|
|
3416
|
+
multi: true,
|
|
3417
|
+
},
|
|
3418
|
+
], usesOnChanges: true, ngImport: i0, template: "<label\n class=\"cao-checkbox\"\n [class.cao-checkbox--checked]=\"checked && !indeterminate\"\n [class.cao-checkbox--indeterminate]=\"indeterminate\"\n [class.cao-checkbox--disabled]=\"isDisabled\"\n [class.cao-checkbox--label-before]=\"labelPosition === 'before'\"\n [class.cao-checkbox--invalid]=\"hasInvalidState\"\n [class.cao-checkbox--valid]=\"hasValidState\">\n <input\n #input\n class=\"cao-checkbox__input\"\n type=\"checkbox\"\n [checked]=\"checked\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n [attr.name]=\"name || null\"\n [attr.id]=\"inputId\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.data-cy]=\"dataCy || null\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\" />\n\n <span class=\"cao-checkbox__control\" aria-hidden=\"true\">\n @if (indeterminate) {\n @if (indeterminateIcon) {\n @if (isLucideIcon) {\n <svg\n class=\"cao-checkbox__icon\"\n [lucideIcon]=\"indeterminateIcon\"\n [size]=\"iconSize\"\n [strokeWidth]=\"iconStrokeWidth\"></svg>\n } @else {\n <img class=\"cao-checkbox__icon\" alt=\"\" [src]=\"indeterminateIcon\" />\n }\n } @else {\n <svg\n class=\"cao-checkbox__icon cao-checkbox__icon--default\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" />\n </svg>\n }\n } @else if (checked) {\n @if (checkedIcon) {\n @if (isLucideIcon) {\n <svg\n class=\"cao-checkbox__icon\"\n [lucideIcon]=\"checkedIcon\"\n [size]=\"iconSize\"\n [strokeWidth]=\"iconStrokeWidth\"></svg>\n } @else {\n <img class=\"cao-checkbox__icon\" alt=\"\" [src]=\"checkedIcon\" />\n }\n } @else {\n <svg\n class=\"cao-checkbox__icon cao-checkbox__icon--default\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n }\n } @else if (uncheckedIcon) {\n @if (isLucideIcon) {\n <svg\n class=\"cao-checkbox__icon\"\n [lucideIcon]=\"uncheckedIcon\"\n [size]=\"iconSize\"\n [strokeWidth]=\"iconStrokeWidth\"></svg>\n } @else {\n <img class=\"cao-checkbox__icon\" alt=\"\" [src]=\"uncheckedIcon\" />\n }\n }\n </span>\n\n <span class=\"cao-checkbox__label\">\n @if (label) {\n {{ label }}\n } @else {\n <ng-content />\n }\n </span>\n</label>\n", styles: [":host{--cao-checkbox-color: #4f46e5;--cao-checkbox-unselected: #6b7280;--cao-checkbox-disabled: #d1d5db;--cao-checkbox-label: #111827;--cao-checkbox-label-disabled: #9ca3af;--cao-checkbox-focus-ring: rgba(79, 70, 229, .35);--cao-checkbox-size: 20px;--cao-checkbox-radius: 4px;--cao-checkbox-duration: .2s;--cao-checkbox-icon-size: 14px;--cao-checkbox-icon-color: #ffffff;display:inline-flex}.cao-checkbox{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.cao-checkbox--disabled{cursor:not-allowed}.cao-checkbox__input{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.cao-checkbox__control{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:var(--cao-checkbox-size);height:var(--cao-checkbox-size);border:2px solid var(--cao-checkbox-unselected);border-radius:var(--cao-checkbox-radius);background-color:transparent;transition:background-color var(--cao-checkbox-duration) ease,border-color var(--cao-checkbox-duration) ease}.cao-checkbox__icon{flex:none;width:var(--cao-checkbox-icon-size);height:var(--cao-checkbox-icon-size);color:var(--cao-checkbox-icon-color);pointer-events:none;object-fit:contain}.cao-checkbox__icon--default{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.cao-checkbox__label{color:var(--cao-checkbox-label);font-size:.875rem;line-height:1.25rem}.cao-checkbox__label:empty{display:none}.cao-checkbox:not(.cao-checkbox--disabled):hover .cao-checkbox__control{border-color:var(--cao-checkbox-color)}.cao-checkbox--checked .cao-checkbox__control,.cao-checkbox--indeterminate .cao-checkbox__control{border-color:var(--cao-checkbox-color);background-color:var(--cao-checkbox-color)}.cao-checkbox--invalid .cao-checkbox__control{border-color:var(--error, #dc2626)}.cao-checkbox--valid .cao-checkbox__control{border-color:var(--success, #16a34a)}.cao-checkbox--disabled .cao-checkbox__control{border-color:var(--cao-checkbox-disabled);background-color:transparent}.cao-checkbox--disabled.cao-checkbox--checked .cao-checkbox__control,.cao-checkbox--disabled.cao-checkbox--indeterminate .cao-checkbox__control{background-color:var(--cao-checkbox-disabled)}.cao-checkbox--disabled .cao-checkbox__icon{opacity:.65}.cao-checkbox--disabled .cao-checkbox__label{color:var(--cao-checkbox-label-disabled)}.cao-checkbox__input:focus-visible+.cao-checkbox__control{box-shadow:0 0 0 3px var(--cao-checkbox-focus-ring)}.cao-checkbox--label-before .cao-checkbox__control{order:2}.cao-checkbox--label-before .cao-checkbox__label{order:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3419
|
+
}
|
|
3420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CaoCheckboxComponent, decorators: [{
|
|
3421
|
+
type: Component,
|
|
3422
|
+
args: [{ selector: "cao-checkbox", standalone: true, imports: [CommonModule, LucideDynamicIcon], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
3423
|
+
{
|
|
3424
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3425
|
+
useExisting: forwardRef(() => CaoCheckboxComponent),
|
|
3426
|
+
multi: true,
|
|
3427
|
+
},
|
|
3428
|
+
], template: "<label\n class=\"cao-checkbox\"\n [class.cao-checkbox--checked]=\"checked && !indeterminate\"\n [class.cao-checkbox--indeterminate]=\"indeterminate\"\n [class.cao-checkbox--disabled]=\"isDisabled\"\n [class.cao-checkbox--label-before]=\"labelPosition === 'before'\"\n [class.cao-checkbox--invalid]=\"hasInvalidState\"\n [class.cao-checkbox--valid]=\"hasValidState\">\n <input\n #input\n class=\"cao-checkbox__input\"\n type=\"checkbox\"\n [checked]=\"checked\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n [attr.name]=\"name || null\"\n [attr.id]=\"inputId\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.data-cy]=\"dataCy || null\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\" />\n\n <span class=\"cao-checkbox__control\" aria-hidden=\"true\">\n @if (indeterminate) {\n @if (indeterminateIcon) {\n @if (isLucideIcon) {\n <svg\n class=\"cao-checkbox__icon\"\n [lucideIcon]=\"indeterminateIcon\"\n [size]=\"iconSize\"\n [strokeWidth]=\"iconStrokeWidth\"></svg>\n } @else {\n <img class=\"cao-checkbox__icon\" alt=\"\" [src]=\"indeterminateIcon\" />\n }\n } @else {\n <svg\n class=\"cao-checkbox__icon cao-checkbox__icon--default\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" />\n </svg>\n }\n } @else if (checked) {\n @if (checkedIcon) {\n @if (isLucideIcon) {\n <svg\n class=\"cao-checkbox__icon\"\n [lucideIcon]=\"checkedIcon\"\n [size]=\"iconSize\"\n [strokeWidth]=\"iconStrokeWidth\"></svg>\n } @else {\n <img class=\"cao-checkbox__icon\" alt=\"\" [src]=\"checkedIcon\" />\n }\n } @else {\n <svg\n class=\"cao-checkbox__icon cao-checkbox__icon--default\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n }\n } @else if (uncheckedIcon) {\n @if (isLucideIcon) {\n <svg\n class=\"cao-checkbox__icon\"\n [lucideIcon]=\"uncheckedIcon\"\n [size]=\"iconSize\"\n [strokeWidth]=\"iconStrokeWidth\"></svg>\n } @else {\n <img class=\"cao-checkbox__icon\" alt=\"\" [src]=\"uncheckedIcon\" />\n }\n }\n </span>\n\n <span class=\"cao-checkbox__label\">\n @if (label) {\n {{ label }}\n } @else {\n <ng-content />\n }\n </span>\n</label>\n", styles: [":host{--cao-checkbox-color: #4f46e5;--cao-checkbox-unselected: #6b7280;--cao-checkbox-disabled: #d1d5db;--cao-checkbox-label: #111827;--cao-checkbox-label-disabled: #9ca3af;--cao-checkbox-focus-ring: rgba(79, 70, 229, .35);--cao-checkbox-size: 20px;--cao-checkbox-radius: 4px;--cao-checkbox-duration: .2s;--cao-checkbox-icon-size: 14px;--cao-checkbox-icon-color: #ffffff;display:inline-flex}.cao-checkbox{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.cao-checkbox--disabled{cursor:not-allowed}.cao-checkbox__input{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.cao-checkbox__control{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:var(--cao-checkbox-size);height:var(--cao-checkbox-size);border:2px solid var(--cao-checkbox-unselected);border-radius:var(--cao-checkbox-radius);background-color:transparent;transition:background-color var(--cao-checkbox-duration) ease,border-color var(--cao-checkbox-duration) ease}.cao-checkbox__icon{flex:none;width:var(--cao-checkbox-icon-size);height:var(--cao-checkbox-icon-size);color:var(--cao-checkbox-icon-color);pointer-events:none;object-fit:contain}.cao-checkbox__icon--default{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.cao-checkbox__label{color:var(--cao-checkbox-label);font-size:.875rem;line-height:1.25rem}.cao-checkbox__label:empty{display:none}.cao-checkbox:not(.cao-checkbox--disabled):hover .cao-checkbox__control{border-color:var(--cao-checkbox-color)}.cao-checkbox--checked .cao-checkbox__control,.cao-checkbox--indeterminate .cao-checkbox__control{border-color:var(--cao-checkbox-color);background-color:var(--cao-checkbox-color)}.cao-checkbox--invalid .cao-checkbox__control{border-color:var(--error, #dc2626)}.cao-checkbox--valid .cao-checkbox__control{border-color:var(--success, #16a34a)}.cao-checkbox--disabled .cao-checkbox__control{border-color:var(--cao-checkbox-disabled);background-color:transparent}.cao-checkbox--disabled.cao-checkbox--checked .cao-checkbox__control,.cao-checkbox--disabled.cao-checkbox--indeterminate .cao-checkbox__control{background-color:var(--cao-checkbox-disabled)}.cao-checkbox--disabled .cao-checkbox__icon{opacity:.65}.cao-checkbox--disabled .cao-checkbox__label{color:var(--cao-checkbox-label-disabled)}.cao-checkbox__input:focus-visible+.cao-checkbox__control{box-shadow:0 0 0 3px var(--cao-checkbox-focus-ring)}.cao-checkbox--label-before .cao-checkbox__control{order:2}.cao-checkbox--label-before .cao-checkbox__label{order:1}\n"] }]
|
|
3429
|
+
}], propDecorators: { checked: [{
|
|
3430
|
+
type: Input
|
|
3431
|
+
}], indeterminate: [{
|
|
3432
|
+
type: Input
|
|
3433
|
+
}], isDisabled: [{
|
|
3434
|
+
type: Input
|
|
3435
|
+
}], required: [{
|
|
3436
|
+
type: Input
|
|
3437
|
+
}], label: [{
|
|
3438
|
+
type: Input
|
|
3439
|
+
}], labelPosition: [{
|
|
3440
|
+
type: Input
|
|
3441
|
+
}], name: [{
|
|
3442
|
+
type: Input
|
|
3443
|
+
}], id: [{
|
|
3444
|
+
type: Input
|
|
3445
|
+
}], ariaLabel: [{
|
|
3446
|
+
type: Input
|
|
3447
|
+
}], ariaLabelledBy: [{
|
|
3448
|
+
type: Input
|
|
3449
|
+
}], dataCy: [{
|
|
3450
|
+
type: Input
|
|
3451
|
+
}], control: [{
|
|
3452
|
+
type: Input
|
|
3453
|
+
}], errorMessage: [{
|
|
3454
|
+
type: Input
|
|
3455
|
+
}], color: [{
|
|
3456
|
+
type: Input
|
|
3457
|
+
}], uncheckedColor: [{
|
|
3458
|
+
type: Input
|
|
3459
|
+
}], disabledColor: [{
|
|
3460
|
+
type: Input
|
|
3461
|
+
}], labelColor: [{
|
|
3462
|
+
type: Input
|
|
3463
|
+
}], disabledLabelColor: [{
|
|
3464
|
+
type: Input
|
|
3465
|
+
}], focusRingColor: [{
|
|
3466
|
+
type: Input
|
|
3467
|
+
}], size: [{
|
|
3468
|
+
type: Input
|
|
3469
|
+
}], borderRadius: [{
|
|
3470
|
+
type: Input
|
|
3471
|
+
}], animationDuration: [{
|
|
3472
|
+
type: Input
|
|
3473
|
+
}], checkedIcon: [{
|
|
3474
|
+
type: Input
|
|
3475
|
+
}], uncheckedIcon: [{
|
|
3476
|
+
type: Input
|
|
3477
|
+
}], indeterminateIcon: [{
|
|
3478
|
+
type: Input
|
|
3479
|
+
}], isLucideIcon: [{
|
|
3480
|
+
type: Input
|
|
3481
|
+
}], iconColor: [{
|
|
3482
|
+
type: Input
|
|
3483
|
+
}], checkedIconColor: [{
|
|
3484
|
+
type: Input
|
|
3485
|
+
}], uncheckedIconColor: [{
|
|
3486
|
+
type: Input
|
|
3487
|
+
}], iconSize: [{
|
|
3488
|
+
type: Input
|
|
3489
|
+
}], iconStrokeWidth: [{
|
|
3490
|
+
type: Input
|
|
3491
|
+
}], disabled: [{
|
|
3492
|
+
type: Input
|
|
3493
|
+
}], checkedChange: [{
|
|
3494
|
+
type: Output
|
|
3495
|
+
}], indeterminateChange: [{
|
|
3496
|
+
type: Output
|
|
3497
|
+
}], checkboxChange: [{
|
|
3498
|
+
type: Output
|
|
3499
|
+
}], hostStyles: [{
|
|
3500
|
+
type: HostBinding,
|
|
3501
|
+
args: ["style"]
|
|
3502
|
+
}] } });
|
|
3503
|
+
|
|
2945
3504
|
class BaseModalService {
|
|
2946
3505
|
constructor() { }
|
|
2947
3506
|
toggleModalEvent = new EventEmitter();
|
|
@@ -4243,5 +4802,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
4243
4802
|
* Generated bundle index. Do not edit.
|
|
4244
4803
|
*/
|
|
4245
4804
|
|
|
4246
|
-
export { BaseAlert, BaseAlertService, BaseDialog, BaseDialogService, BaseFilterTablePaginatedService, BaseFilterTableService, BaseModal, BaseModalService, BasePaginationService, BaseTable, BaseTablePaginated, BaseTableService, BaseTimeRange, CaoAutocompleteComponent, CaoBaseButtonComponent, CaoBaseIcon, CaoBaseInput, CaoBaseToggleComponent, CaoBaseWidgetComponent, CaoCardComponent, CaoDropDownComponent, CaoError, CaoFormField, CaoHint, CaoKpi, CaoRadioButtonComponent, CaoRadioGroupComponent, CaoSkeletonComponent, CaoSlideToggleComponent, CaoTabGroup, CaoTabPanel, CaoWidgetService, DEFAULT_ERROR_STATE_MATCHER, ErrorStateMatcher, Footer, LinksButton, Paginator, ShowOnDirtyErrorStateMatcher, StepComponent, StepperComponent, TablePaginatedService, TimePicker, getPtBrPaginatorIntlBasePaginated, getPtBrPaginatorIntlBaseTable };
|
|
4805
|
+
export { BaseAlert, BaseAlertService, BaseDialog, BaseDialogService, BaseFilterTablePaginatedService, BaseFilterTableService, BaseModal, BaseModalService, BasePaginationService, BaseTable, BaseTablePaginated, BaseTableService, BaseTimeRange, CAO_ACCORDION, CaoAccordionComponent, CaoAccordionItemComponent, CaoAutocompleteComponent, CaoBaseButtonComponent, CaoBaseIcon, CaoBaseInput, CaoBaseToggleComponent, CaoBaseWidgetComponent, CaoCardComponent, CaoCheckboxComponent, CaoDropDownComponent, CaoError, CaoFormField, CaoHint, CaoKpi, CaoRadioButtonComponent, CaoRadioGroupComponent, CaoSkeletonComponent, CaoSlideToggleComponent, CaoTabGroup, CaoTabPanel, CaoWidgetService, DEFAULT_ERROR_STATE_MATCHER, ErrorStateMatcher, Footer, LinksButton, Paginator, ShowOnDirtyErrorStateMatcher, StepComponent, StepperComponent, TablePaginatedService, TimePicker, getPtBrPaginatorIntlBasePaginated, getPtBrPaginatorIntlBaseTable };
|
|
4247
4806
|
//# sourceMappingURL=ngx-opalbytes-components.mjs.map
|