digisystem-ui 0.1.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 +99 -0
- package/fesm2022/digisystem-ui.mjs +494 -0
- package/fesm2022/digisystem-ui.mjs.map +1 -0
- package/package.json +26 -0
- package/types/digisystem-ui.d.ts +147 -0
package/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# fgd-design-system
|
|
2
|
+
|
|
3
|
+
Design System de componentes UI para o projeto FGD (Angular). Este repositório é uma **biblioteca** (não um app) e será publicada no npm para consumo pelo projeto principal.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Angular (library) + Angular CLI
|
|
8
|
+
- Storybook (documentação e playground)
|
|
9
|
+
- SCSS com convenção BEM por componente
|
|
10
|
+
|
|
11
|
+
## Requisitos
|
|
12
|
+
|
|
13
|
+
- Node.js + npm
|
|
14
|
+
- Angular peer dependencies (no projeto consumidor):
|
|
15
|
+
- `@angular/core` / `@angular/common` `^21.2.0`
|
|
16
|
+
- `rxjs` `~7.8.0`
|
|
17
|
+
|
|
18
|
+
## Instalação
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Windows / PowerShell (erro de Execution Policy)
|
|
25
|
+
|
|
26
|
+
Se aparecer erro do tipo “a execução de scripts foi desabilitada”, use:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm.cmd install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
ou ajuste a policy no escopo do usuário:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Comandos
|
|
39
|
+
|
|
40
|
+
Scripts disponíveis em [package.json](./package.json):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm run build
|
|
44
|
+
npm run watch
|
|
45
|
+
npm run test
|
|
46
|
+
npm run storybook
|
|
47
|
+
npm run build-storybook
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Estrutura do projeto
|
|
51
|
+
|
|
52
|
+
- Código da biblioteca: [`src/`](./src)
|
|
53
|
+
- Componentes: [`src/components/`](./src/components)
|
|
54
|
+
- API pública (exports): [`src/public-api.ts`](./src/public-api.ts)
|
|
55
|
+
|
|
56
|
+
## Convenções de componentes
|
|
57
|
+
|
|
58
|
+
- Componentes **genéricos** e orientados a API (inputs/outputs), sem lógica de negócio do consumidor.
|
|
59
|
+
- Estilos encapsulados por componente (`*.component.scss`) seguindo BEM:
|
|
60
|
+
- Block: `ds-<componente>` (ex.: `ds-button`)
|
|
61
|
+
- Element: `__` (ex.: `ds-button__icon`)
|
|
62
|
+
- Modifier: `--` (ex.: `ds-button--primary`)
|
|
63
|
+
- Acessibilidade: preferir elementos HTML nativos e manter estados/teclado/ARIA quando aplicável.
|
|
64
|
+
|
|
65
|
+
## Exemplo de uso
|
|
66
|
+
|
|
67
|
+
Importe o componente (standalone) no seu módulo/componente consumidor:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import { DsButtonComponent } from 'fgd-design-system';
|
|
71
|
+
|
|
72
|
+
@Component({
|
|
73
|
+
imports: [DsButtonComponent],
|
|
74
|
+
// ...
|
|
75
|
+
})
|
|
76
|
+
export class ExampleComponent {}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Template:
|
|
80
|
+
|
|
81
|
+
```html
|
|
82
|
+
<ds-button variant="primary">Acessar</ds-button>
|
|
83
|
+
|
|
84
|
+
<ds-button
|
|
85
|
+
variant="outline"
|
|
86
|
+
[iconSrc]="'/assets/microsoft.svg'"
|
|
87
|
+
iconAlt=""
|
|
88
|
+
>
|
|
89
|
+
Entrar com Microsoft
|
|
90
|
+
</ds-button>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Documentação (Storybook)
|
|
94
|
+
|
|
95
|
+
O Storybook é a fonte de verdade de variações/estados dos componentes:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npm run storybook
|
|
99
|
+
```
|
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { EventEmitter, Output, Input, Component, forwardRef, HostListener, ViewChild, Inject, ContentChildren } from '@angular/core';
|
|
5
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
|
+
|
|
7
|
+
class DsButtonComponent {
|
|
8
|
+
variant = 'primary';
|
|
9
|
+
size = 'md';
|
|
10
|
+
disabled = false;
|
|
11
|
+
type = 'button';
|
|
12
|
+
iconSrc;
|
|
13
|
+
iconAlt = '';
|
|
14
|
+
dsClick = new EventEmitter();
|
|
15
|
+
get classes() {
|
|
16
|
+
const classes = ['ds-button', `ds-button--${this.variant}`, `ds-button--${this.size}`];
|
|
17
|
+
if (this.disabled)
|
|
18
|
+
classes.push('ds-button--disabled');
|
|
19
|
+
return classes;
|
|
20
|
+
}
|
|
21
|
+
onClick(event) {
|
|
22
|
+
if (this.disabled) {
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
event.stopPropagation();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.dsClick.emit(event);
|
|
28
|
+
}
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: DsButtonComponent, isStandalone: true, selector: "ds-button", inputs: { variant: "variant", size: "size", disabled: "disabled", type: "type", iconSrc: "iconSrc", iconAlt: "iconAlt" }, outputs: { dsClick: "dsClick" }, ngImport: i0, template: "<button\r\n [attr.type]=\"type\"\r\n [disabled]=\"disabled\"\r\n [class]=\"classes.join(' ')\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <span class=\"ds-button__inner\">\n <img\n *ngIf=\"iconSrc\"\n class=\"ds-button__icon\"\n [src]=\"iconSrc\"\n [attr.alt]=\"iconAlt\"\n width=\"20\"\n height=\"20\"\n />\n <span class=\"ds-button__label\">\n <ng-content />\n </span>\n </span>\n</button>\r\n", styles: [".ds-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:8px;cursor:pointer;font-weight:600;line-height:1;padding:10px 16px;-webkit-user-select:none;user-select:none}.ds-button__inner{display:inline-flex;align-items:center;gap:10px}.ds-button__icon{display:block}.ds-button--primary{background:#00295c;color:#fff}.ds-button--secondary{background:transparent;border-color:#cbd5e1;color:#0f172a}.ds-button--outline{background:#fff;border-color:#00295c;color:#00295c}.ds-button--sm{padding:8px 12px;font-size:12px}.ds-button--md{padding:10px 16px;font-size:14px}.ds-button--lg{padding:12px 20px;font-size:16px}.ds-button--disabled{cursor:not-allowed;opacity:.6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsButtonComponent, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{ selector: 'ds-button', standalone: true, imports: [CommonModule], template: "<button\r\n [attr.type]=\"type\"\r\n [disabled]=\"disabled\"\r\n [class]=\"classes.join(' ')\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <span class=\"ds-button__inner\">\n <img\n *ngIf=\"iconSrc\"\n class=\"ds-button__icon\"\n [src]=\"iconSrc\"\n [attr.alt]=\"iconAlt\"\n width=\"20\"\n height=\"20\"\n />\n <span class=\"ds-button__label\">\n <ng-content />\n </span>\n </span>\n</button>\r\n", styles: [".ds-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:8px;cursor:pointer;font-weight:600;line-height:1;padding:10px 16px;-webkit-user-select:none;user-select:none}.ds-button__inner{display:inline-flex;align-items:center;gap:10px}.ds-button__icon{display:block}.ds-button--primary{background:#00295c;color:#fff}.ds-button--secondary{background:transparent;border-color:#cbd5e1;color:#0f172a}.ds-button--outline{background:#fff;border-color:#00295c;color:#00295c}.ds-button--sm{padding:8px 12px;font-size:12px}.ds-button--md{padding:10px 16px;font-size:14px}.ds-button--lg{padding:12px 20px;font-size:16px}.ds-button--disabled{cursor:not-allowed;opacity:.6}\n"] }]
|
|
35
|
+
}], propDecorators: { variant: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], size: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], disabled: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], type: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], iconSrc: [{
|
|
44
|
+
type: Input
|
|
45
|
+
}], iconAlt: [{
|
|
46
|
+
type: Input
|
|
47
|
+
}], dsClick: [{
|
|
48
|
+
type: Output
|
|
49
|
+
}] } });
|
|
50
|
+
|
|
51
|
+
class DsButtonLinkComponent {
|
|
52
|
+
href;
|
|
53
|
+
target;
|
|
54
|
+
rel;
|
|
55
|
+
disabled = false;
|
|
56
|
+
size = 'md';
|
|
57
|
+
iconSrc;
|
|
58
|
+
iconAlt = '';
|
|
59
|
+
dsClick = new EventEmitter();
|
|
60
|
+
get computedRel() {
|
|
61
|
+
if (!this.target || this.target !== '_blank')
|
|
62
|
+
return this.rel;
|
|
63
|
+
if (!this.rel)
|
|
64
|
+
return 'noopener noreferrer';
|
|
65
|
+
return this.rel;
|
|
66
|
+
}
|
|
67
|
+
get classes() {
|
|
68
|
+
const classes = ['ds-button-link', `ds-button-link--${this.size}`];
|
|
69
|
+
if (this.disabled)
|
|
70
|
+
classes.push('ds-button-link--disabled');
|
|
71
|
+
return classes;
|
|
72
|
+
}
|
|
73
|
+
onClick(event) {
|
|
74
|
+
if (this.disabled) {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
event.stopPropagation();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (!this.href) {
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
}
|
|
82
|
+
this.dsClick.emit(event);
|
|
83
|
+
}
|
|
84
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsButtonLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
85
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: DsButtonLinkComponent, isStandalone: true, selector: "ds-button-link", inputs: { href: "href", target: "target", rel: "rel", disabled: "disabled", size: "size", iconSrc: "iconSrc", iconAlt: "iconAlt" }, outputs: { dsClick: "dsClick" }, ngImport: i0, template: "<a\n [class]=\"classes.join(' ')\"\n [attr.href]=\"disabled ? null : href ?? null\"\n [attr.target]=\"target ?? null\"\n [attr.rel]=\"computedRel ?? null\"\n [attr.aria-disabled]=\"disabled\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n (click)=\"onClick($event)\"\n>\n <span class=\"ds-button-link__inner\">\n <img\n *ngIf=\"iconSrc\"\n class=\"ds-button-link__icon\"\n [src]=\"iconSrc\"\n [attr.alt]=\"iconAlt\"\n width=\"16\"\n height=\"16\"\n />\n <span class=\"ds-button-link__label\">\n <ng-content />\n </span>\n </span>\n</a>\n", styles: [".ds-button-link{display:inline-flex;align-items:center;background:transparent;border:0;padding:0;font:inherit;color:#00295c;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;cursor:pointer}.ds-button-link__inner{display:inline-flex;align-items:center;gap:8px}.ds-button-link__icon{display:block}.ds-button-link:hover{color:#001f45;text-decoration-thickness:3px}.ds-button-link:focus-visible{outline:none;border-radius:6px;box-shadow:0 0 0 3px #00295c40}.ds-button-link--sm{font-size:12px}.ds-button-link--md{font-size:14px}.ds-button-link--lg{font-size:16px}.ds-button-link--disabled{cursor:not-allowed;opacity:.55;text-decoration:none;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
86
|
+
}
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsButtonLinkComponent, decorators: [{
|
|
88
|
+
type: Component,
|
|
89
|
+
args: [{ selector: 'ds-button-link', standalone: true, imports: [CommonModule], template: "<a\n [class]=\"classes.join(' ')\"\n [attr.href]=\"disabled ? null : href ?? null\"\n [attr.target]=\"target ?? null\"\n [attr.rel]=\"computedRel ?? null\"\n [attr.aria-disabled]=\"disabled\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n (click)=\"onClick($event)\"\n>\n <span class=\"ds-button-link__inner\">\n <img\n *ngIf=\"iconSrc\"\n class=\"ds-button-link__icon\"\n [src]=\"iconSrc\"\n [attr.alt]=\"iconAlt\"\n width=\"16\"\n height=\"16\"\n />\n <span class=\"ds-button-link__label\">\n <ng-content />\n </span>\n </span>\n</a>\n", styles: [".ds-button-link{display:inline-flex;align-items:center;background:transparent;border:0;padding:0;font:inherit;color:#00295c;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;cursor:pointer}.ds-button-link__inner{display:inline-flex;align-items:center;gap:8px}.ds-button-link__icon{display:block}.ds-button-link:hover{color:#001f45;text-decoration-thickness:3px}.ds-button-link:focus-visible{outline:none;border-radius:6px;box-shadow:0 0 0 3px #00295c40}.ds-button-link--sm{font-size:12px}.ds-button-link--md{font-size:14px}.ds-button-link--lg{font-size:16px}.ds-button-link--disabled{cursor:not-allowed;opacity:.55;text-decoration:none;pointer-events:none}\n"] }]
|
|
90
|
+
}], propDecorators: { href: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], target: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], rel: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}], disabled: [{
|
|
97
|
+
type: Input
|
|
98
|
+
}], size: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], iconSrc: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], iconAlt: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], dsClick: [{
|
|
105
|
+
type: Output
|
|
106
|
+
}] } });
|
|
107
|
+
|
|
108
|
+
class DsCheckboxComponent {
|
|
109
|
+
id = `ds-checkbox-${typeof crypto !== 'undefined' && 'randomUUID' in crypto ? crypto.randomUUID() : Math.random().toString(16).slice(2)}`;
|
|
110
|
+
name;
|
|
111
|
+
value;
|
|
112
|
+
disabled = false;
|
|
113
|
+
checked = false;
|
|
114
|
+
variant = 'primary';
|
|
115
|
+
checkedChange = new EventEmitter();
|
|
116
|
+
dsChange = new EventEmitter();
|
|
117
|
+
onTouched = () => { };
|
|
118
|
+
onChange = () => { };
|
|
119
|
+
get classes() {
|
|
120
|
+
const classes = ['ds-checkbox', `ds-checkbox--${this.variant}`];
|
|
121
|
+
if (this.disabled)
|
|
122
|
+
classes.push('ds-checkbox--disabled');
|
|
123
|
+
if (this.checked)
|
|
124
|
+
classes.push('ds-checkbox--checked');
|
|
125
|
+
return classes;
|
|
126
|
+
}
|
|
127
|
+
writeValue(value) {
|
|
128
|
+
this.checked = !!value;
|
|
129
|
+
}
|
|
130
|
+
registerOnChange(fn) {
|
|
131
|
+
this.onChange = fn;
|
|
132
|
+
}
|
|
133
|
+
registerOnTouched(fn) {
|
|
134
|
+
this.onTouched = fn;
|
|
135
|
+
}
|
|
136
|
+
setDisabledState(isDisabled) {
|
|
137
|
+
this.disabled = isDisabled;
|
|
138
|
+
}
|
|
139
|
+
onNativeChange(event) {
|
|
140
|
+
const input = event.target;
|
|
141
|
+
const next = input.checked;
|
|
142
|
+
this.checked = next;
|
|
143
|
+
this.onChange(next);
|
|
144
|
+
this.checkedChange.emit(next);
|
|
145
|
+
this.dsChange.emit(next);
|
|
146
|
+
}
|
|
147
|
+
onNativeBlur() {
|
|
148
|
+
this.onTouched();
|
|
149
|
+
}
|
|
150
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
151
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: DsCheckboxComponent, isStandalone: true, selector: "ds-checkbox", inputs: { id: "id", name: "name", value: "value", disabled: "disabled", checked: "checked", variant: "variant" }, outputs: { checkedChange: "checkedChange", dsChange: "dsChange" }, providers: [
|
|
152
|
+
{
|
|
153
|
+
provide: NG_VALUE_ACCESSOR,
|
|
154
|
+
useExisting: forwardRef(() => DsCheckboxComponent),
|
|
155
|
+
multi: true,
|
|
156
|
+
},
|
|
157
|
+
], ngImport: i0, template: "<label [class]=\"classes.join(' ')\" [attr.for]=\"id\">\n <input\n class=\"ds-checkbox__native\"\n type=\"checkbox\"\n [id]=\"id\"\n [name]=\"name ?? null\"\n [value]=\"value ?? null\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onNativeChange($event)\"\n (blur)=\"onNativeBlur()\"\n />\n <span class=\"ds-checkbox__box\" aria-hidden=\"true\">\n <svg class=\"ds-checkbox__check\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M5.4 10.2 2.6 7.4l-1 1 3.8 3.8L12.4 5.2l-1-1z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n <span class=\"ds-checkbox__label\">\n <ng-content />\n </span>\n</label>\n", styles: [".ds-checkbox{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#0f172a}.ds-checkbox__native{position:absolute;opacity:0;width:1px;height:1px;margin:0;padding:0;overflow:hidden}.ds-checkbox__box{width:20px;height:20px;border-radius:4px;border:2px solid #cbd5e1;background:#e5e7eb;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease}.ds-checkbox__check{opacity:0;color:#fff}.ds-checkbox__native:checked+.ds-checkbox__box .ds-checkbox__check{opacity:1}.ds-checkbox--primary .ds-checkbox__native:checked+.ds-checkbox__box{background:#00295c;border-color:#00295c}.ds-checkbox--secondary .ds-checkbox__native:checked+.ds-checkbox__box{background:#9ca3af;border-color:#9ca3af}.ds-checkbox--primary .ds-checkbox__native:focus-visible+.ds-checkbox__box{box-shadow:0 0 0 3px #00295c40}.ds-checkbox--secondary .ds-checkbox__native:focus-visible+.ds-checkbox__box{box-shadow:0 0 0 3px #9ca3af59}.ds-checkbox__label{font-size:14px;line-height:1.2}.ds-checkbox--disabled{cursor:not-allowed;opacity:.6}.ds-checkbox--disabled .ds-checkbox__box{background:#f3f4f6;border-color:#d1d5db}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
158
|
+
}
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsCheckboxComponent, decorators: [{
|
|
160
|
+
type: Component,
|
|
161
|
+
args: [{ selector: 'ds-checkbox', standalone: true, imports: [CommonModule], providers: [
|
|
162
|
+
{
|
|
163
|
+
provide: NG_VALUE_ACCESSOR,
|
|
164
|
+
useExisting: forwardRef(() => DsCheckboxComponent),
|
|
165
|
+
multi: true,
|
|
166
|
+
},
|
|
167
|
+
], template: "<label [class]=\"classes.join(' ')\" [attr.for]=\"id\">\n <input\n class=\"ds-checkbox__native\"\n type=\"checkbox\"\n [id]=\"id\"\n [name]=\"name ?? null\"\n [value]=\"value ?? null\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onNativeChange($event)\"\n (blur)=\"onNativeBlur()\"\n />\n <span class=\"ds-checkbox__box\" aria-hidden=\"true\">\n <svg class=\"ds-checkbox__check\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M5.4 10.2 2.6 7.4l-1 1 3.8 3.8L12.4 5.2l-1-1z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n <span class=\"ds-checkbox__label\">\n <ng-content />\n </span>\n</label>\n", styles: [".ds-checkbox{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#0f172a}.ds-checkbox__native{position:absolute;opacity:0;width:1px;height:1px;margin:0;padding:0;overflow:hidden}.ds-checkbox__box{width:20px;height:20px;border-radius:4px;border:2px solid #cbd5e1;background:#e5e7eb;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease}.ds-checkbox__check{opacity:0;color:#fff}.ds-checkbox__native:checked+.ds-checkbox__box .ds-checkbox__check{opacity:1}.ds-checkbox--primary .ds-checkbox__native:checked+.ds-checkbox__box{background:#00295c;border-color:#00295c}.ds-checkbox--secondary .ds-checkbox__native:checked+.ds-checkbox__box{background:#9ca3af;border-color:#9ca3af}.ds-checkbox--primary .ds-checkbox__native:focus-visible+.ds-checkbox__box{box-shadow:0 0 0 3px #00295c40}.ds-checkbox--secondary .ds-checkbox__native:focus-visible+.ds-checkbox__box{box-shadow:0 0 0 3px #9ca3af59}.ds-checkbox__label{font-size:14px;line-height:1.2}.ds-checkbox--disabled{cursor:not-allowed;opacity:.6}.ds-checkbox--disabled .ds-checkbox__box{background:#f3f4f6;border-color:#d1d5db}\n"] }]
|
|
168
|
+
}], propDecorators: { id: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], name: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], value: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}], disabled: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}], checked: [{
|
|
177
|
+
type: Input
|
|
178
|
+
}], variant: [{
|
|
179
|
+
type: Input
|
|
180
|
+
}], checkedChange: [{
|
|
181
|
+
type: Output
|
|
182
|
+
}], dsChange: [{
|
|
183
|
+
type: Output
|
|
184
|
+
}] } });
|
|
185
|
+
|
|
186
|
+
class DsModalComponent {
|
|
187
|
+
showModal = false;
|
|
188
|
+
showModalChange = new EventEmitter();
|
|
189
|
+
variant = 'primary';
|
|
190
|
+
backdrop = true;
|
|
191
|
+
keyboard = true;
|
|
192
|
+
size = 'md';
|
|
193
|
+
centered = false;
|
|
194
|
+
scrollable = false;
|
|
195
|
+
closeOnBackdrop = true;
|
|
196
|
+
showCloseButton = true;
|
|
197
|
+
ariaLabel;
|
|
198
|
+
ariaLabelledby;
|
|
199
|
+
ariaDescribedby;
|
|
200
|
+
onHide = new EventEmitter();
|
|
201
|
+
onClose = new EventEmitter();
|
|
202
|
+
onShow = new EventEmitter();
|
|
203
|
+
dialogRef;
|
|
204
|
+
previouslyFocused;
|
|
205
|
+
bodyOverflowBefore;
|
|
206
|
+
get classes() {
|
|
207
|
+
const classes = ['ds-modal', `ds-modal--${this.variant}`, `ds-modal--${this.size}`];
|
|
208
|
+
if (this.centered)
|
|
209
|
+
classes.push('ds-modal--centered');
|
|
210
|
+
if (this.scrollable)
|
|
211
|
+
classes.push('ds-modal--scrollable');
|
|
212
|
+
return classes;
|
|
213
|
+
}
|
|
214
|
+
get computedAriaLabelledby() {
|
|
215
|
+
return this.ariaLabelledby;
|
|
216
|
+
}
|
|
217
|
+
ngOnChanges(changes) {
|
|
218
|
+
if (!changes['showModal'])
|
|
219
|
+
return;
|
|
220
|
+
if (this.showModal) {
|
|
221
|
+
this.onShow.emit();
|
|
222
|
+
this.lockBodyScroll();
|
|
223
|
+
this.previouslyFocused = document.activeElement;
|
|
224
|
+
queueMicrotask(() => this.focusInitial());
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
this.unlockBodyScroll();
|
|
228
|
+
this.restoreFocus();
|
|
229
|
+
}
|
|
230
|
+
ngOnDestroy() {
|
|
231
|
+
this.unlockBodyScroll();
|
|
232
|
+
}
|
|
233
|
+
onDocumentKeydown(event) {
|
|
234
|
+
if (!this.showModal)
|
|
235
|
+
return;
|
|
236
|
+
if (event.key === 'Escape' && this.keyboard) {
|
|
237
|
+
event.preventDefault();
|
|
238
|
+
this.requestClose('escape');
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
onBackdropClick() {
|
|
242
|
+
if (!this.showModal)
|
|
243
|
+
return;
|
|
244
|
+
if (this.backdrop === 'static')
|
|
245
|
+
return;
|
|
246
|
+
if (!this.backdrop)
|
|
247
|
+
return;
|
|
248
|
+
if (!this.closeOnBackdrop)
|
|
249
|
+
return;
|
|
250
|
+
this.requestClose('backdrop');
|
|
251
|
+
}
|
|
252
|
+
onCloseClick() {
|
|
253
|
+
this.requestClose('close-button');
|
|
254
|
+
}
|
|
255
|
+
requestClose(reason) {
|
|
256
|
+
if (!this.showModal)
|
|
257
|
+
return;
|
|
258
|
+
this.onClose.emit(reason);
|
|
259
|
+
this.hide(reason);
|
|
260
|
+
}
|
|
261
|
+
hide(reason = 'api') {
|
|
262
|
+
if (!this.showModal)
|
|
263
|
+
return;
|
|
264
|
+
this.onHide.emit();
|
|
265
|
+
this.showModal = false;
|
|
266
|
+
this.showModalChange.emit(false);
|
|
267
|
+
this.unlockBodyScroll();
|
|
268
|
+
this.restoreFocus();
|
|
269
|
+
}
|
|
270
|
+
focusInitial() {
|
|
271
|
+
const dialog = this.dialogRef?.nativeElement;
|
|
272
|
+
if (!dialog)
|
|
273
|
+
return;
|
|
274
|
+
const focusable = dialog.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
275
|
+
(focusable ?? dialog).focus({ preventScroll: true });
|
|
276
|
+
}
|
|
277
|
+
restoreFocus() {
|
|
278
|
+
const el = this.previouslyFocused;
|
|
279
|
+
this.previouslyFocused = undefined;
|
|
280
|
+
if (!el)
|
|
281
|
+
return;
|
|
282
|
+
if (typeof el.focus !== 'function')
|
|
283
|
+
return;
|
|
284
|
+
el.focus({ preventScroll: true });
|
|
285
|
+
}
|
|
286
|
+
lockBodyScroll() {
|
|
287
|
+
if (this.bodyOverflowBefore === undefined) {
|
|
288
|
+
this.bodyOverflowBefore = document.body.style.overflow;
|
|
289
|
+
}
|
|
290
|
+
document.body.style.overflow = 'hidden';
|
|
291
|
+
}
|
|
292
|
+
unlockBodyScroll() {
|
|
293
|
+
if (this.bodyOverflowBefore === undefined)
|
|
294
|
+
return;
|
|
295
|
+
document.body.style.overflow = this.bodyOverflowBefore ?? '';
|
|
296
|
+
this.bodyOverflowBefore = undefined;
|
|
297
|
+
}
|
|
298
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
299
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: DsModalComponent, isStandalone: true, selector: "ds-modal", inputs: { showModal: "showModal", variant: "variant", backdrop: "backdrop", keyboard: "keyboard", size: "size", centered: "centered", scrollable: "scrollable", closeOnBackdrop: "closeOnBackdrop", showCloseButton: "showCloseButton", ariaLabel: "ariaLabel", ariaLabelledby: "ariaLabelledby", ariaDescribedby: "ariaDescribedby" }, outputs: { showModalChange: "showModalChange", onHide: "onHide", onClose: "onClose", onShow: "onShow" }, host: { listeners: { "document:keydown": "onDocumentKeydown($event)" } }, viewQueries: [{ propertyName: "dialogRef", first: true, predicate: ["dialog"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"showModal\" class=\"ds-modal__overlay\">\n <div\n class=\"ds-modal__backdrop\"\n [class.ds-modal__backdrop--visible]=\"!!backdrop\"\n (click)=\"onBackdropClick()\"\n ></div>\n\n <div\n class=\"ds-modal__container\"\n [class.ds-modal__container--centered]=\"centered\"\n role=\"presentation\"\n >\n <div\n #dialog\n [class]=\"'ds-modal__dialog ' + classes.join(' ')\"\n role=\"dialog\"\n [attr.aria-modal]=\"true\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n [attr.aria-labelledby]=\"computedAriaLabelledby ?? null\"\n [attr.aria-describedby]=\"ariaDescribedby ?? null\"\n tabindex=\"-1\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"ds-modal__content\">\n <div class=\"ds-modal__header\">\n <div class=\"ds-modal__title\">\n <ng-content select=\"[dsModalTitle]\" />\n </div>\n\n <button\n *ngIf=\"showCloseButton\"\n type=\"button\"\n class=\"ds-modal__close\"\n aria-label=\"Fechar\"\n (click)=\"onCloseClick()\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n </div>\n\n <div class=\"ds-modal__body\">\n <ng-content select=\"[dsModalBody]\" />\n <ng-content />\n </div>\n\n <div class=\"ds-modal__footer\">\n <ng-content select=\"[dsModalFooter]\" />\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".ds-modal__overlay{position:fixed;inset:0;z-index:1050}.ds-modal__backdrop{position:absolute;inset:0;background:#00000080;opacity:0;transition:opacity .16s ease}.ds-modal__backdrop--visible{opacity:1}.ds-modal__container{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:24px}.ds-modal__container--centered{align-items:center}.ds-modal{outline:none}.ds-modal__dialog{width:100%;max-width:520px}.ds-modal__dialog.ds-modal--sm{max-width:340px}.ds-modal__dialog.ds-modal--md{max-width:520px}.ds-modal__dialog.ds-modal--lg{max-width:800px}.ds-modal__dialog.ds-modal--xl{max-width:1140px}.ds-modal__content{background:#fff;border-radius:10px;box-shadow:0 10px 30px #0003;border:1px solid rgba(15,23,42,.12);overflow:hidden}.ds-modal__header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid rgba(15,23,42,.12)}.ds-modal__title{font-size:18px;font-weight:700;color:#0f172a;line-height:1.2}.ds-modal__close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:#475569;cursor:pointer;font-size:24px;line-height:1}.ds-modal__close:hover{background:#0f172a0f;color:#0f172a}.ds-modal__close:focus-visible{outline:none;box-shadow:0 0 0 3px #00295c40}.ds-modal__dialog.ds-modal--primary .ds-modal__header{background:#00295c;border-bottom-color:#ffffff2e}.ds-modal__dialog.ds-modal--primary .ds-modal__title{color:#fff}.ds-modal__dialog.ds-modal--primary .ds-modal__close{color:#ffffffeb}.ds-modal__dialog.ds-modal--primary .ds-modal__close:hover{background:#ffffff1f;color:#fff}.ds-modal__dialog.ds-modal--primary .ds-modal__close:focus-visible{box-shadow:0 0 0 3px #ffffff59}.ds-modal__body{padding:16px 18px;color:#0f172a;font-size:14px}.ds-modal__footer{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid rgba(15,23,42,.12)}.ds-modal__dialog.ds-modal--scrollable .ds-modal__body{max-height:calc(100vh - 220px);overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
300
|
+
}
|
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsModalComponent, decorators: [{
|
|
302
|
+
type: Component,
|
|
303
|
+
args: [{ selector: 'ds-modal', standalone: true, imports: [CommonModule], template: "<div *ngIf=\"showModal\" class=\"ds-modal__overlay\">\n <div\n class=\"ds-modal__backdrop\"\n [class.ds-modal__backdrop--visible]=\"!!backdrop\"\n (click)=\"onBackdropClick()\"\n ></div>\n\n <div\n class=\"ds-modal__container\"\n [class.ds-modal__container--centered]=\"centered\"\n role=\"presentation\"\n >\n <div\n #dialog\n [class]=\"'ds-modal__dialog ' + classes.join(' ')\"\n role=\"dialog\"\n [attr.aria-modal]=\"true\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n [attr.aria-labelledby]=\"computedAriaLabelledby ?? null\"\n [attr.aria-describedby]=\"ariaDescribedby ?? null\"\n tabindex=\"-1\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"ds-modal__content\">\n <div class=\"ds-modal__header\">\n <div class=\"ds-modal__title\">\n <ng-content select=\"[dsModalTitle]\" />\n </div>\n\n <button\n *ngIf=\"showCloseButton\"\n type=\"button\"\n class=\"ds-modal__close\"\n aria-label=\"Fechar\"\n (click)=\"onCloseClick()\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n </div>\n\n <div class=\"ds-modal__body\">\n <ng-content select=\"[dsModalBody]\" />\n <ng-content />\n </div>\n\n <div class=\"ds-modal__footer\">\n <ng-content select=\"[dsModalFooter]\" />\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".ds-modal__overlay{position:fixed;inset:0;z-index:1050}.ds-modal__backdrop{position:absolute;inset:0;background:#00000080;opacity:0;transition:opacity .16s ease}.ds-modal__backdrop--visible{opacity:1}.ds-modal__container{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:24px}.ds-modal__container--centered{align-items:center}.ds-modal{outline:none}.ds-modal__dialog{width:100%;max-width:520px}.ds-modal__dialog.ds-modal--sm{max-width:340px}.ds-modal__dialog.ds-modal--md{max-width:520px}.ds-modal__dialog.ds-modal--lg{max-width:800px}.ds-modal__dialog.ds-modal--xl{max-width:1140px}.ds-modal__content{background:#fff;border-radius:10px;box-shadow:0 10px 30px #0003;border:1px solid rgba(15,23,42,.12);overflow:hidden}.ds-modal__header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid rgba(15,23,42,.12)}.ds-modal__title{font-size:18px;font-weight:700;color:#0f172a;line-height:1.2}.ds-modal__close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:#475569;cursor:pointer;font-size:24px;line-height:1}.ds-modal__close:hover{background:#0f172a0f;color:#0f172a}.ds-modal__close:focus-visible{outline:none;box-shadow:0 0 0 3px #00295c40}.ds-modal__dialog.ds-modal--primary .ds-modal__header{background:#00295c;border-bottom-color:#ffffff2e}.ds-modal__dialog.ds-modal--primary .ds-modal__title{color:#fff}.ds-modal__dialog.ds-modal--primary .ds-modal__close{color:#ffffffeb}.ds-modal__dialog.ds-modal--primary .ds-modal__close:hover{background:#ffffff1f;color:#fff}.ds-modal__dialog.ds-modal--primary .ds-modal__close:focus-visible{box-shadow:0 0 0 3px #ffffff59}.ds-modal__body{padding:16px 18px;color:#0f172a;font-size:14px}.ds-modal__footer{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid rgba(15,23,42,.12)}.ds-modal__dialog.ds-modal--scrollable .ds-modal__body{max-height:calc(100vh - 220px);overflow:auto}\n"] }]
|
|
304
|
+
}], propDecorators: { showModal: [{
|
|
305
|
+
type: Input
|
|
306
|
+
}], showModalChange: [{
|
|
307
|
+
type: Output
|
|
308
|
+
}], variant: [{
|
|
309
|
+
type: Input
|
|
310
|
+
}], backdrop: [{
|
|
311
|
+
type: Input
|
|
312
|
+
}], keyboard: [{
|
|
313
|
+
type: Input
|
|
314
|
+
}], size: [{
|
|
315
|
+
type: Input
|
|
316
|
+
}], centered: [{
|
|
317
|
+
type: Input
|
|
318
|
+
}], scrollable: [{
|
|
319
|
+
type: Input
|
|
320
|
+
}], closeOnBackdrop: [{
|
|
321
|
+
type: Input
|
|
322
|
+
}], showCloseButton: [{
|
|
323
|
+
type: Input
|
|
324
|
+
}], ariaLabel: [{
|
|
325
|
+
type: Input
|
|
326
|
+
}], ariaLabelledby: [{
|
|
327
|
+
type: Input
|
|
328
|
+
}], ariaDescribedby: [{
|
|
329
|
+
type: Input
|
|
330
|
+
}], onHide: [{
|
|
331
|
+
type: Output
|
|
332
|
+
}], onClose: [{
|
|
333
|
+
type: Output
|
|
334
|
+
}], onShow: [{
|
|
335
|
+
type: Output
|
|
336
|
+
}], dialogRef: [{
|
|
337
|
+
type: ViewChild,
|
|
338
|
+
args: ['dialog', { static: false }]
|
|
339
|
+
}], onDocumentKeydown: [{
|
|
340
|
+
type: HostListener,
|
|
341
|
+
args: ['document:keydown', ['$event']]
|
|
342
|
+
}] } });
|
|
343
|
+
|
|
344
|
+
class DsSwitchComponent {
|
|
345
|
+
id = `ds-switch-${typeof crypto !== 'undefined' && 'randomUUID' in crypto ? crypto.randomUUID() : Math.random().toString(16).slice(2)}`;
|
|
346
|
+
name;
|
|
347
|
+
disabled = false;
|
|
348
|
+
checked = false;
|
|
349
|
+
checkedChange = new EventEmitter();
|
|
350
|
+
dsChange = new EventEmitter();
|
|
351
|
+
onTouched = () => { };
|
|
352
|
+
onChange = () => { };
|
|
353
|
+
get classes() {
|
|
354
|
+
const classes = ['ds-switch'];
|
|
355
|
+
if (this.disabled)
|
|
356
|
+
classes.push('ds-switch--disabled');
|
|
357
|
+
if (this.checked)
|
|
358
|
+
classes.push('ds-switch--checked');
|
|
359
|
+
return classes;
|
|
360
|
+
}
|
|
361
|
+
writeValue(value) {
|
|
362
|
+
this.checked = !!value;
|
|
363
|
+
}
|
|
364
|
+
registerOnChange(fn) {
|
|
365
|
+
this.onChange = fn;
|
|
366
|
+
}
|
|
367
|
+
registerOnTouched(fn) {
|
|
368
|
+
this.onTouched = fn;
|
|
369
|
+
}
|
|
370
|
+
setDisabledState(isDisabled) {
|
|
371
|
+
this.disabled = isDisabled;
|
|
372
|
+
}
|
|
373
|
+
onNativeChange(event) {
|
|
374
|
+
const input = event.target;
|
|
375
|
+
const next = input.checked;
|
|
376
|
+
this.checked = next;
|
|
377
|
+
this.onChange(next);
|
|
378
|
+
this.checkedChange.emit(next);
|
|
379
|
+
this.dsChange.emit(next);
|
|
380
|
+
}
|
|
381
|
+
onNativeBlur() {
|
|
382
|
+
this.onTouched();
|
|
383
|
+
}
|
|
384
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
385
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: DsSwitchComponent, isStandalone: true, selector: "ds-switch", inputs: { id: "id", name: "name", disabled: "disabled", checked: "checked" }, outputs: { checkedChange: "checkedChange", dsChange: "dsChange" }, providers: [
|
|
386
|
+
{
|
|
387
|
+
provide: NG_VALUE_ACCESSOR,
|
|
388
|
+
useExisting: forwardRef(() => DsSwitchComponent),
|
|
389
|
+
multi: true,
|
|
390
|
+
},
|
|
391
|
+
], ngImport: i0, template: "<label [class]=\"classes.join(' ')\" [attr.for]=\"id\">\n <span class=\"ds-switch__label\">\n <ng-content />\n </span>\n\n <input\n class=\"ds-switch__native\"\n type=\"checkbox\"\n [id]=\"id\"\n [name]=\"name ?? null\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onNativeChange($event)\"\n (blur)=\"onNativeBlur()\"\n />\n <span class=\"ds-switch__track\" aria-hidden=\"true\">\n <span class=\"ds-switch__thumb\"></span>\n </span>\n</label>\n", styles: [".ds-switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#0f172a}.ds-switch__label{font-size:12px;line-height:1.2}.ds-switch__native{position:absolute;opacity:0;width:1px;height:1px;margin:0;padding:0;overflow:hidden}.ds-switch__track{width:36px;height:18px;border-radius:999px;background:#cbd5e1;border:1px solid rgba(15,23,42,.12);position:relative;display:inline-flex;align-items:center;transition:background-color .12s ease,box-shadow .12s ease}.ds-switch__thumb{width:14px;height:14px;border-radius:999px;background:#fff;position:absolute;left:2px;transition:transform .12s ease;box-shadow:0 1px 2px #00000038}.ds-switch__native:checked+.ds-switch__track{background:#22c55e}.ds-switch__native:checked+.ds-switch__track .ds-switch__thumb{transform:translate(18px)}.ds-switch__native:focus-visible+.ds-switch__track{box-shadow:0 0 0 3px #00295c40}.ds-switch--disabled{cursor:not-allowed;opacity:.6}.ds-switch--disabled .ds-switch__track{background:#e5e7eb}.ds-switch--disabled .ds-switch__native:checked+.ds-switch__track{background:#86efac}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
392
|
+
}
|
|
393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsSwitchComponent, decorators: [{
|
|
394
|
+
type: Component,
|
|
395
|
+
args: [{ selector: 'ds-switch', standalone: true, imports: [CommonModule], providers: [
|
|
396
|
+
{
|
|
397
|
+
provide: NG_VALUE_ACCESSOR,
|
|
398
|
+
useExisting: forwardRef(() => DsSwitchComponent),
|
|
399
|
+
multi: true,
|
|
400
|
+
},
|
|
401
|
+
], template: "<label [class]=\"classes.join(' ')\" [attr.for]=\"id\">\n <span class=\"ds-switch__label\">\n <ng-content />\n </span>\n\n <input\n class=\"ds-switch__native\"\n type=\"checkbox\"\n [id]=\"id\"\n [name]=\"name ?? null\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onNativeChange($event)\"\n (blur)=\"onNativeBlur()\"\n />\n <span class=\"ds-switch__track\" aria-hidden=\"true\">\n <span class=\"ds-switch__thumb\"></span>\n </span>\n</label>\n", styles: [".ds-switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#0f172a}.ds-switch__label{font-size:12px;line-height:1.2}.ds-switch__native{position:absolute;opacity:0;width:1px;height:1px;margin:0;padding:0;overflow:hidden}.ds-switch__track{width:36px;height:18px;border-radius:999px;background:#cbd5e1;border:1px solid rgba(15,23,42,.12);position:relative;display:inline-flex;align-items:center;transition:background-color .12s ease,box-shadow .12s ease}.ds-switch__thumb{width:14px;height:14px;border-radius:999px;background:#fff;position:absolute;left:2px;transition:transform .12s ease;box-shadow:0 1px 2px #00000038}.ds-switch__native:checked+.ds-switch__track{background:#22c55e}.ds-switch__native:checked+.ds-switch__track .ds-switch__thumb{transform:translate(18px)}.ds-switch__native:focus-visible+.ds-switch__track{box-shadow:0 0 0 3px #00295c40}.ds-switch--disabled{cursor:not-allowed;opacity:.6}.ds-switch--disabled .ds-switch__track{background:#e5e7eb}.ds-switch--disabled .ds-switch__native:checked+.ds-switch__track{background:#86efac}\n"] }]
|
|
402
|
+
}], propDecorators: { id: [{
|
|
403
|
+
type: Input
|
|
404
|
+
}], name: [{
|
|
405
|
+
type: Input
|
|
406
|
+
}], disabled: [{
|
|
407
|
+
type: Input
|
|
408
|
+
}], checked: [{
|
|
409
|
+
type: Input
|
|
410
|
+
}], checkedChange: [{
|
|
411
|
+
type: Output
|
|
412
|
+
}], dsChange: [{
|
|
413
|
+
type: Output
|
|
414
|
+
}] } });
|
|
415
|
+
|
|
416
|
+
class DsAccordionItemComponent {
|
|
417
|
+
accordion;
|
|
418
|
+
title = '';
|
|
419
|
+
isOpen = false;
|
|
420
|
+
disabled = false;
|
|
421
|
+
isOpenChange = new EventEmitter();
|
|
422
|
+
dsToggle = new EventEmitter();
|
|
423
|
+
id = `ds-accordion-${typeof crypto !== 'undefined' && 'randomUUID' in crypto ? crypto.randomUUID() : Math.random().toString(16).slice(2)}`;
|
|
424
|
+
constructor(accordion) {
|
|
425
|
+
this.accordion = accordion;
|
|
426
|
+
}
|
|
427
|
+
ngOnInit() {
|
|
428
|
+
this.accordion.registerItem(this);
|
|
429
|
+
}
|
|
430
|
+
toggle() {
|
|
431
|
+
if (this.disabled)
|
|
432
|
+
return;
|
|
433
|
+
this.isOpen = !this.isOpen;
|
|
434
|
+
this.isOpenChange.emit(this.isOpen);
|
|
435
|
+
this.dsToggle.emit(this.isOpen);
|
|
436
|
+
}
|
|
437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsAccordionItemComponent, deps: [{ token: forwardRef(() => DsAccordionComponent) }], target: i0.ɵɵFactoryTarget.Component });
|
|
438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: DsAccordionItemComponent, isStandalone: true, selector: "ds-accordion-item", inputs: { title: "title", isOpen: "isOpen", disabled: "disabled" }, outputs: { isOpenChange: "isOpenChange", dsToggle: "dsToggle" }, ngImport: i0, template: "<div class=\"ds-accordion-item\" [class.ds-accordion-item--open]=\"isOpen\" [class.ds-accordion-item--disabled]=\"disabled\">\n <button\n type=\"button\"\n class=\"ds-accordion-item__header\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-controls]=\"id + '-content'\"\n [attr.id]=\"id + '-header'\"\n [disabled]=\"disabled\"\n (click)=\"toggle()\"\n >\n <span class=\"ds-accordion-item__title\">\n <ng-content select=\"[dsAccordionTitle]\"></ng-content>\n {{ title }}\n </span>\n\n <svg\n class=\"ds-accordion-item__icon\"\n xmlns=\"http://www.w3.org/0000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\"/>\n </svg>\n </button>\n\n <div\n class=\"ds-accordion-item__body\"\n [attr.id]=\"id + '-content'\"\n [attr.aria-labelledby]=\"id + '-header'\"\n role=\"region\"\n >\n <div class=\"ds-accordion-item__content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.ds-accordion-item{background:#f8fafc;border-radius:4px;overflow:hidden}.ds-accordion-item__header{display:flex;align-items:center;justify-content:space-between;width:100%;padding:16px;background:transparent;border:0;cursor:pointer;text-align:left;transition:background-color .16s ease;-webkit-user-select:none;user-select:none}.ds-accordion-item__header:hover{background:#0f172a0a}.ds-accordion-item__header:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #00295c4d}.ds-accordion-item__title{font-size:16px;font-weight:500;color:#00295c;line-height:1.2}.ds-accordion-item__icon{color:#00295c;transition:transform .3s cubic-bezier(.4,0,.2,1)}.ds-accordion-item--open .ds-accordion-item__icon{transform:rotate(180deg)}.ds-accordion-item__body{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s cubic-bezier(.4,0,.2,1)}.ds-accordion-item--open .ds-accordion-item__body{grid-template-rows:1fr}.ds-accordion-item__content{overflow:hidden;padding:0 16px}.ds-accordion-item--open .ds-accordion-item__content{padding:0 16px 16px}.ds-accordion-item--disabled{opacity:.6}.ds-accordion-item--disabled .ds-accordion-item__header{cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
439
|
+
}
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsAccordionItemComponent, decorators: [{
|
|
441
|
+
type: Component,
|
|
442
|
+
args: [{ selector: 'ds-accordion-item', standalone: true, imports: [CommonModule], template: "<div class=\"ds-accordion-item\" [class.ds-accordion-item--open]=\"isOpen\" [class.ds-accordion-item--disabled]=\"disabled\">\n <button\n type=\"button\"\n class=\"ds-accordion-item__header\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-controls]=\"id + '-content'\"\n [attr.id]=\"id + '-header'\"\n [disabled]=\"disabled\"\n (click)=\"toggle()\"\n >\n <span class=\"ds-accordion-item__title\">\n <ng-content select=\"[dsAccordionTitle]\"></ng-content>\n {{ title }}\n </span>\n\n <svg\n class=\"ds-accordion-item__icon\"\n xmlns=\"http://www.w3.org/0000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\"/>\n </svg>\n </button>\n\n <div\n class=\"ds-accordion-item__body\"\n [attr.id]=\"id + '-content'\"\n [attr.aria-labelledby]=\"id + '-header'\"\n role=\"region\"\n >\n <div class=\"ds-accordion-item__content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.ds-accordion-item{background:#f8fafc;border-radius:4px;overflow:hidden}.ds-accordion-item__header{display:flex;align-items:center;justify-content:space-between;width:100%;padding:16px;background:transparent;border:0;cursor:pointer;text-align:left;transition:background-color .16s ease;-webkit-user-select:none;user-select:none}.ds-accordion-item__header:hover{background:#0f172a0a}.ds-accordion-item__header:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #00295c4d}.ds-accordion-item__title{font-size:16px;font-weight:500;color:#00295c;line-height:1.2}.ds-accordion-item__icon{color:#00295c;transition:transform .3s cubic-bezier(.4,0,.2,1)}.ds-accordion-item--open .ds-accordion-item__icon{transform:rotate(180deg)}.ds-accordion-item__body{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s cubic-bezier(.4,0,.2,1)}.ds-accordion-item--open .ds-accordion-item__body{grid-template-rows:1fr}.ds-accordion-item__content{overflow:hidden;padding:0 16px}.ds-accordion-item--open .ds-accordion-item__content{padding:0 16px 16px}.ds-accordion-item--disabled{opacity:.6}.ds-accordion-item--disabled .ds-accordion-item__header{cursor:not-allowed}\n"] }]
|
|
443
|
+
}], ctorParameters: () => [{ type: DsAccordionComponent, decorators: [{
|
|
444
|
+
type: Inject,
|
|
445
|
+
args: [forwardRef(() => DsAccordionComponent)]
|
|
446
|
+
}] }], propDecorators: { title: [{
|
|
447
|
+
type: Input
|
|
448
|
+
}], isOpen: [{
|
|
449
|
+
type: Input
|
|
450
|
+
}], disabled: [{
|
|
451
|
+
type: Input
|
|
452
|
+
}], isOpenChange: [{
|
|
453
|
+
type: Output
|
|
454
|
+
}], dsToggle: [{
|
|
455
|
+
type: Output
|
|
456
|
+
}] } });
|
|
457
|
+
|
|
458
|
+
class DsAccordionComponent {
|
|
459
|
+
multiple = false;
|
|
460
|
+
items;
|
|
461
|
+
registerItem(item) {
|
|
462
|
+
item.dsToggle.subscribe((isOpen) => {
|
|
463
|
+
if (!this.multiple && isOpen) {
|
|
464
|
+
this.closeOthers(item);
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
closeOthers(openedItem) {
|
|
469
|
+
this.items.forEach((item) => {
|
|
470
|
+
if (item !== openedItem && item.isOpen) {
|
|
471
|
+
item.isOpen = false;
|
|
472
|
+
item.isOpenChange.emit(false);
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
477
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: DsAccordionComponent, isStandalone: true, selector: "ds-accordion", inputs: { multiple: "multiple" }, queries: [{ propertyName: "items", predicate: DsAccordionItemComponent }], ngImport: i0, template: "<div class=\"ds-accordion\">\n <ng-content></ng-content>\n</div>\n", styles: ["@charset \"UTF-8\";.ds-accordion{display:flex;flex-direction:column;gap:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
478
|
+
}
|
|
479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DsAccordionComponent, decorators: [{
|
|
480
|
+
type: Component,
|
|
481
|
+
args: [{ selector: 'ds-accordion', standalone: true, imports: [CommonModule], template: "<div class=\"ds-accordion\">\n <ng-content></ng-content>\n</div>\n", styles: ["@charset \"UTF-8\";.ds-accordion{display:flex;flex-direction:column;gap:8px}\n"] }]
|
|
482
|
+
}], propDecorators: { multiple: [{
|
|
483
|
+
type: Input
|
|
484
|
+
}], items: [{
|
|
485
|
+
type: ContentChildren,
|
|
486
|
+
args: [DsAccordionItemComponent]
|
|
487
|
+
}] } });
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Generated bundle index. Do not edit.
|
|
491
|
+
*/
|
|
492
|
+
|
|
493
|
+
export { DsAccordionComponent, DsAccordionItemComponent, DsButtonComponent, DsButtonLinkComponent, DsCheckboxComponent, DsModalComponent, DsSwitchComponent };
|
|
494
|
+
//# sourceMappingURL=digisystem-ui.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digisystem-ui.mjs","sources":["../../../src/components/button/button.component.ts","../../../src/components/button/button.component.html","../../../src/components/button-link/button-link.component.ts","../../../src/components/button-link/button-link.component.html","../../../src/components/checkbox/checkbox.component.ts","../../../src/components/checkbox/checkbox.component.html","../../../src/components/modal/modal.component.ts","../../../src/components/modal/modal.component.html","../../../src/components/switch/switch.component.ts","../../../src/components/switch/switch.component.html","../../../src/components/accordion/accordion-item.component.ts","../../../src/components/accordion/accordion-item.component.html","../../../src/components/accordion/accordion.component.ts","../../../src/components/accordion/accordion.component.html","../../../src/digisystem-ui.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\n\nexport type DsButtonVariant = 'primary' | 'secondary' | 'outline';\nexport type DsButtonSize = 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'ds-button',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n})\nexport class DsButtonComponent {\n @Input() variant: DsButtonVariant = 'primary';\n @Input() size: DsButtonSize = 'md';\n @Input() disabled = false;\n @Input() type: 'button' | 'submit' | 'reset' = 'button';\n @Input() iconSrc?: string;\n @Input() iconAlt = '';\n\n @Output() dsClick = new EventEmitter<MouseEvent>();\n\n get classes(): string[] {\n const classes = ['ds-button', `ds-button--${this.variant}`, `ds-button--${this.size}`];\n if (this.disabled) classes.push('ds-button--disabled');\n return classes;\n }\n\n onClick(event: MouseEvent): void {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.dsClick.emit(event);\n }\n}\n","<button\r\n [attr.type]=\"type\"\r\n [disabled]=\"disabled\"\r\n [class]=\"classes.join(' ')\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <span class=\"ds-button__inner\">\n <img\n *ngIf=\"iconSrc\"\n class=\"ds-button__icon\"\n [src]=\"iconSrc\"\n [attr.alt]=\"iconAlt\"\n width=\"20\"\n height=\"20\"\n />\n <span class=\"ds-button__label\">\n <ng-content />\n </span>\n </span>\n</button>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\n\r\nexport type DsButtonLinkSize = 'sm' | 'md' | 'lg';\r\n\r\n@Component({\r\n selector: 'ds-button-link',\r\n standalone: true,\r\n imports: [CommonModule],\r\n templateUrl: './button-link.component.html',\r\n styleUrl: './button-link.component.scss',\r\n})\r\nexport class DsButtonLinkComponent {\r\n @Input() href?: string;\r\n @Input() target?: '_self' | '_blank' | '_parent' | '_top' | (string & {});\r\n @Input() rel?: string;\r\n @Input() disabled = false;\r\n @Input() size: DsButtonLinkSize = 'md';\r\n @Input() iconSrc?: string;\r\n @Input() iconAlt = '';\r\n\r\n @Output() dsClick = new EventEmitter<MouseEvent>();\r\n\r\n get computedRel(): string | undefined {\r\n if (!this.target || this.target !== '_blank') return this.rel;\r\n if (!this.rel) return 'noopener noreferrer';\r\n return this.rel;\r\n }\r\n\r\n get classes(): string[] {\r\n const classes = ['ds-button-link', `ds-button-link--${this.size}`];\r\n if (this.disabled) classes.push('ds-button-link--disabled');\r\n return classes;\r\n }\r\n\r\n onClick(event: MouseEvent): void {\r\n if (this.disabled) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n return;\r\n }\r\n\r\n if (!this.href) {\r\n event.preventDefault();\r\n }\r\n\r\n this.dsClick.emit(event);\r\n }\r\n}\r\n","<a\n [class]=\"classes.join(' ')\"\n [attr.href]=\"disabled ? null : href ?? null\"\n [attr.target]=\"target ?? null\"\n [attr.rel]=\"computedRel ?? null\"\n [attr.aria-disabled]=\"disabled\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n (click)=\"onClick($event)\"\n>\n <span class=\"ds-button-link__inner\">\n <img\n *ngIf=\"iconSrc\"\n class=\"ds-button-link__icon\"\n [src]=\"iconSrc\"\n [attr.alt]=\"iconAlt\"\n width=\"16\"\n height=\"16\"\n />\n <span class=\"ds-button-link__label\">\n <ng-content />\n </span>\n </span>\n</a>\n","import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, forwardRef, Input, Output } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type DsCheckboxVariant = 'primary' | 'secondary';\n\n@Component({\n selector: 'ds-checkbox',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './checkbox.component.html',\n styleUrl: './checkbox.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DsCheckboxComponent),\n multi: true,\n },\n ],\n})\nexport class DsCheckboxComponent implements ControlValueAccessor {\n @Input() id = `ds-checkbox-${typeof crypto !== 'undefined' && 'randomUUID' in crypto ? crypto.randomUUID() : Math.random().toString(16).slice(2)}`;\n @Input() name?: string;\n @Input() value?: string;\n @Input() disabled = false;\n @Input() checked = false;\n @Input() variant: DsCheckboxVariant = 'primary';\n\n @Output() checkedChange = new EventEmitter<boolean>();\n @Output() dsChange = new EventEmitter<boolean>();\n\n private onTouched: () => void = () => {};\n private onChange: (value: boolean) => void = () => {};\n\n get classes(): string[] {\n const classes = ['ds-checkbox', `ds-checkbox--${this.variant}`];\n if (this.disabled) classes.push('ds-checkbox--disabled');\n if (this.checked) classes.push('ds-checkbox--checked');\n return classes;\n }\n\n writeValue(value: boolean): void {\n this.checked = !!value;\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onNativeChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n const next = input.checked;\n this.checked = next;\n this.onChange(next);\n this.checkedChange.emit(next);\n this.dsChange.emit(next);\n }\n\n onNativeBlur(): void {\n this.onTouched();\n }\n}\n","<label [class]=\"classes.join(' ')\" [attr.for]=\"id\">\n <input\n class=\"ds-checkbox__native\"\n type=\"checkbox\"\n [id]=\"id\"\n [name]=\"name ?? null\"\n [value]=\"value ?? null\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onNativeChange($event)\"\n (blur)=\"onNativeBlur()\"\n />\n <span class=\"ds-checkbox__box\" aria-hidden=\"true\">\n <svg class=\"ds-checkbox__check\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M5.4 10.2 2.6 7.4l-1 1 3.8 3.8L12.4 5.2l-1-1z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n <span class=\"ds-checkbox__label\">\n <ng-content />\n </span>\n</label>\n","import { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\n\nexport type DsModalSize = 'sm' | 'md' | 'lg' | 'xl';\nexport type DsModalCloseReason = 'close-button' | 'backdrop' | 'escape' | 'api';\nexport type DsModalBackdrop = boolean | 'static';\nexport type DsModalVariant = 'primary' | 'default';\n\n@Component({\n selector: 'ds-modal',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './modal.component.html',\n styleUrl: './modal.component.scss',\n})\nexport class DsModalComponent implements OnChanges, OnDestroy {\n @Input() showModal = false;\n @Output() showModalChange = new EventEmitter<boolean>();\n\n @Input() variant: DsModalVariant = 'primary';\n @Input() backdrop: DsModalBackdrop = true;\n @Input() keyboard = true;\n @Input() size: DsModalSize = 'md';\n @Input() centered = false;\n @Input() scrollable = false;\n @Input() closeOnBackdrop = true;\n @Input() showCloseButton = true;\n\n @Input() ariaLabel?: string;\n @Input() ariaLabelledby?: string;\n @Input() ariaDescribedby?: string;\n\n @Output() onHide = new EventEmitter<void>();\n @Output() onClose = new EventEmitter<DsModalCloseReason>();\n @Output() onShow = new EventEmitter<void>();\n\n @ViewChild('dialog', { static: false }) dialogRef?: ElementRef<HTMLElement>;\n\n private previouslyFocused?: HTMLElement | null;\n private bodyOverflowBefore?: string;\n\n get classes(): string[] {\n const classes = ['ds-modal', `ds-modal--${this.variant}`, `ds-modal--${this.size}`];\n if (this.centered) classes.push('ds-modal--centered');\n if (this.scrollable) classes.push('ds-modal--scrollable');\n return classes;\n }\n\n get computedAriaLabelledby(): string | undefined {\n return this.ariaLabelledby;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!changes['showModal']) return;\n if (this.showModal) {\n this.onShow.emit();\n this.lockBodyScroll();\n this.previouslyFocused = document.activeElement as HTMLElement | null;\n queueMicrotask(() => this.focusInitial());\n return;\n }\n\n this.unlockBodyScroll();\n this.restoreFocus();\n }\n\n ngOnDestroy(): void {\n this.unlockBodyScroll();\n }\n\n @HostListener('document:keydown', ['$event'])\n onDocumentKeydown(event: KeyboardEvent): void {\n if (!this.showModal) return;\n if (event.key === 'Escape' && this.keyboard) {\n event.preventDefault();\n this.requestClose('escape');\n }\n }\n\n onBackdropClick(): void {\n if (!this.showModal) return;\n if (this.backdrop === 'static') return;\n if (!this.backdrop) return;\n if (!this.closeOnBackdrop) return;\n this.requestClose('backdrop');\n }\n\n onCloseClick(): void {\n this.requestClose('close-button');\n }\n\n requestClose(reason: DsModalCloseReason): void {\n if (!this.showModal) return;\n this.onClose.emit(reason);\n this.hide(reason);\n }\n\n hide(reason: DsModalCloseReason = 'api'): void {\n if (!this.showModal) return;\n this.onHide.emit();\n this.showModal = false;\n this.showModalChange.emit(false);\n this.unlockBodyScroll();\n this.restoreFocus();\n }\n\n private focusInitial(): void {\n const dialog = this.dialogRef?.nativeElement;\n if (!dialog) return;\n\n const focusable = dialog.querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n (focusable ?? dialog).focus({ preventScroll: true });\n }\n\n private restoreFocus(): void {\n const el = this.previouslyFocused;\n this.previouslyFocused = undefined;\n if (!el) return;\n if (typeof el.focus !== 'function') return;\n el.focus({ preventScroll: true });\n }\n\n private lockBodyScroll(): void {\n if (this.bodyOverflowBefore === undefined) {\n this.bodyOverflowBefore = document.body.style.overflow;\n }\n document.body.style.overflow = 'hidden';\n }\n\n private unlockBodyScroll(): void {\n if (this.bodyOverflowBefore === undefined) return;\n document.body.style.overflow = this.bodyOverflowBefore ?? '';\n this.bodyOverflowBefore = undefined;\n }\n}\n","<div *ngIf=\"showModal\" class=\"ds-modal__overlay\">\n <div\n class=\"ds-modal__backdrop\"\n [class.ds-modal__backdrop--visible]=\"!!backdrop\"\n (click)=\"onBackdropClick()\"\n ></div>\n\n <div\n class=\"ds-modal__container\"\n [class.ds-modal__container--centered]=\"centered\"\n role=\"presentation\"\n >\n <div\n #dialog\n [class]=\"'ds-modal__dialog ' + classes.join(' ')\"\n role=\"dialog\"\n [attr.aria-modal]=\"true\"\n [attr.aria-label]=\"ariaLabel ?? null\"\n [attr.aria-labelledby]=\"computedAriaLabelledby ?? null\"\n [attr.aria-describedby]=\"ariaDescribedby ?? null\"\n tabindex=\"-1\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"ds-modal__content\">\n <div class=\"ds-modal__header\">\n <div class=\"ds-modal__title\">\n <ng-content select=\"[dsModalTitle]\" />\n </div>\n\n <button\n *ngIf=\"showCloseButton\"\n type=\"button\"\n class=\"ds-modal__close\"\n aria-label=\"Fechar\"\n (click)=\"onCloseClick()\"\n >\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n\n <div class=\"ds-modal__body\">\n <ng-content select=\"[dsModalBody]\" />\n <ng-content />\n </div>\n\n <div class=\"ds-modal__footer\">\n <ng-content select=\"[dsModalFooter]\" />\n </div>\n </div>\n </div>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, forwardRef, Input, Output } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'ds-switch',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './switch.component.html',\n styleUrl: './switch.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DsSwitchComponent),\n multi: true,\n },\n ],\n})\nexport class DsSwitchComponent implements ControlValueAccessor {\n @Input() id = `ds-switch-${typeof crypto !== 'undefined' && 'randomUUID' in crypto ? crypto.randomUUID() : Math.random().toString(16).slice(2)}`;\n @Input() name?: string;\n @Input() disabled = false;\n @Input() checked = false;\n\n @Output() checkedChange = new EventEmitter<boolean>();\n @Output() dsChange = new EventEmitter<boolean>();\n\n private onTouched: () => void = () => {};\n private onChange: (value: boolean) => void = () => {};\n\n get classes(): string[] {\n const classes = ['ds-switch'];\n if (this.disabled) classes.push('ds-switch--disabled');\n if (this.checked) classes.push('ds-switch--checked');\n return classes;\n }\n\n writeValue(value: boolean): void {\n this.checked = !!value;\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onNativeChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n const next = input.checked;\n this.checked = next;\n this.onChange(next);\n this.checkedChange.emit(next);\n this.dsChange.emit(next);\n }\n\n onNativeBlur(): void {\n this.onTouched();\n }\n}\n","<label [class]=\"classes.join(' ')\" [attr.for]=\"id\">\n <span class=\"ds-switch__label\">\n <ng-content />\n </span>\n\n <input\n class=\"ds-switch__native\"\n type=\"checkbox\"\n [id]=\"id\"\n [name]=\"name ?? null\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onNativeChange($event)\"\n (blur)=\"onNativeBlur()\"\n />\n <span class=\"ds-switch__track\" aria-hidden=\"true\">\n <span class=\"ds-switch__thumb\"></span>\n </span>\n</label>\n","import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, forwardRef, Inject, Input, OnInit, Output } from '@angular/core';\n\nimport { DsAccordionComponent } from './accordion.component';\n\n@Component({\n selector: 'ds-accordion-item',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './accordion-item.component.html',\n styleUrl: './accordion-item.component.scss',\n})\nexport class DsAccordionItemComponent implements OnInit {\n @Input() title = '';\n @Input() isOpen = false;\n @Input() disabled = false;\n \n @Output() isOpenChange = new EventEmitter<boolean>();\n @Output() dsToggle = new EventEmitter<boolean>();\n\n id = `ds-accordion-${typeof crypto !== 'undefined' && 'randomUUID' in crypto ? crypto.randomUUID() : Math.random().toString(16).slice(2)}`;\n\n constructor(\n @Inject(forwardRef(() => DsAccordionComponent))\n private accordion: DsAccordionComponent,\n ) {}\n\n ngOnInit(): void {\n this.accordion.registerItem(this);\n }\n\n toggle(): void {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n this.isOpenChange.emit(this.isOpen);\n this.dsToggle.emit(this.isOpen);\n }\n}\n","<div class=\"ds-accordion-item\" [class.ds-accordion-item--open]=\"isOpen\" [class.ds-accordion-item--disabled]=\"disabled\">\n <button\n type=\"button\"\n class=\"ds-accordion-item__header\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-controls]=\"id + '-content'\"\n [attr.id]=\"id + '-header'\"\n [disabled]=\"disabled\"\n (click)=\"toggle()\"\n >\n <span class=\"ds-accordion-item__title\">\n <ng-content select=\"[dsAccordionTitle]\"></ng-content>\n {{ title }}\n </span>\n\n <svg\n class=\"ds-accordion-item__icon\"\n xmlns=\"http://www.w3.org/0000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\"/>\n </svg>\n </button>\n\n <div\n class=\"ds-accordion-item__body\"\n [attr.id]=\"id + '-content'\"\n [attr.aria-labelledby]=\"id + '-header'\"\n role=\"region\"\n >\n <div class=\"ds-accordion-item__content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, ContentChildren, Input, QueryList } from '@angular/core';\n\nimport { DsAccordionItemComponent } from './accordion-item.component';\n\n@Component({\n selector: 'ds-accordion',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './accordion.component.html',\n styleUrl: './accordion.component.scss',\n})\nexport class DsAccordionComponent {\n @Input() multiple = false;\n @ContentChildren(DsAccordionItemComponent) items!: QueryList<DsAccordionItemComponent>;\n\n registerItem(item: DsAccordionItemComponent): void {\n item.dsToggle.subscribe((isOpen: boolean) => {\n if (!this.multiple && isOpen) {\n this.closeOthers(item);\n }\n });\n }\n\n private closeOthers(openedItem: DsAccordionItemComponent): void {\n this.items.forEach((item) => {\n if (item !== openedItem && item.isOpen) {\n item.isOpen = false;\n item.isOpenChange.emit(false);\n }\n });\n }\n}\n","<div class=\"ds-accordion\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAaa,iBAAiB,CAAA;IACnB,OAAO,GAAoB,SAAS;IACpC,IAAI,GAAiB,IAAI;IACzB,QAAQ,GAAG,KAAK;IAChB,IAAI,GAAkC,QAAQ;AAC9C,IAAA,OAAO;IACP,OAAO,GAAG,EAAE;AAEX,IAAA,OAAO,GAAG,IAAI,YAAY,EAAc;AAElD,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,MAAM,OAAO,GAAG,CAAC,WAAW,EAAE,cAAc,IAAI,CAAC,OAAO,CAAA,CAAE,EAAE,CAAA,WAAA,EAAc,IAAI,CAAC,IAAI,CAAA,CAAE,CAAC;QACtF,IAAI,IAAI,CAAC,QAAQ;AAAE,YAAA,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC;AACtD,QAAA,OAAO,OAAO;IAChB;AAEA,IAAA,OAAO,CAAC,KAAiB,EAAA;AACvB,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,KAAK,CAAC,cAAc,EAAE;YACtB,KAAK,CAAC,eAAe,EAAE;YACvB;QACF;AAEA,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IAC1B;wGAxBW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAjB,iBAAi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ular/common": "^21.2.0",
|
|
10
|
+
"@angular/core": "^21.2.0",
|
|
11
|
+
"rxjs": "~7.8.0"
|
|
12
|
+
},
|
|
13
|
+
"module": "fesm2022/digisystem-ui.mjs",
|
|
14
|
+
"typings": "types/digisystem-ui.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./types/digisystem-ui.d.ts",
|
|
21
|
+
"default": "./fesm2022/digisystem-ui.mjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"type": "module"
|
|
26
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, OnChanges, OnDestroy, ElementRef, SimpleChanges, OnInit, QueryList } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
type DsButtonVariant = 'primary' | 'secondary' | 'outline';
|
|
6
|
+
type DsButtonSize = 'sm' | 'md' | 'lg';
|
|
7
|
+
declare class DsButtonComponent {
|
|
8
|
+
variant: DsButtonVariant;
|
|
9
|
+
size: DsButtonSize;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
type: 'button' | 'submit' | 'reset';
|
|
12
|
+
iconSrc?: string;
|
|
13
|
+
iconAlt: string;
|
|
14
|
+
dsClick: EventEmitter<MouseEvent>;
|
|
15
|
+
get classes(): string[];
|
|
16
|
+
onClick(event: MouseEvent): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsButtonComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsButtonComponent, "ds-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "type": { "alias": "type"; "required": false; }; "iconSrc": { "alias": "iconSrc"; "required": false; }; "iconAlt": { "alias": "iconAlt"; "required": false; }; }, { "dsClick": "dsClick"; }, never, ["*"], true, never>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type DsButtonLinkSize = 'sm' | 'md' | 'lg';
|
|
22
|
+
declare class DsButtonLinkComponent {
|
|
23
|
+
href?: string;
|
|
24
|
+
target?: '_self' | '_blank' | '_parent' | '_top' | (string & {});
|
|
25
|
+
rel?: string;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
size: DsButtonLinkSize;
|
|
28
|
+
iconSrc?: string;
|
|
29
|
+
iconAlt: string;
|
|
30
|
+
dsClick: EventEmitter<MouseEvent>;
|
|
31
|
+
get computedRel(): string | undefined;
|
|
32
|
+
get classes(): string[];
|
|
33
|
+
onClick(event: MouseEvent): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsButtonLinkComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsButtonLinkComponent, "ds-button-link", never, { "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "rel": { "alias": "rel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "size": { "alias": "size"; "required": false; }; "iconSrc": { "alias": "iconSrc"; "required": false; }; "iconAlt": { "alias": "iconAlt"; "required": false; }; }, { "dsClick": "dsClick"; }, never, ["*"], true, never>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type DsCheckboxVariant = 'primary' | 'secondary';
|
|
39
|
+
declare class DsCheckboxComponent implements ControlValueAccessor {
|
|
40
|
+
id: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
value?: string;
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
checked: boolean;
|
|
45
|
+
variant: DsCheckboxVariant;
|
|
46
|
+
checkedChange: EventEmitter<boolean>;
|
|
47
|
+
dsChange: EventEmitter<boolean>;
|
|
48
|
+
private onTouched;
|
|
49
|
+
private onChange;
|
|
50
|
+
get classes(): string[];
|
|
51
|
+
writeValue(value: boolean): void;
|
|
52
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
53
|
+
registerOnTouched(fn: () => void): void;
|
|
54
|
+
setDisabledState(isDisabled: boolean): void;
|
|
55
|
+
onNativeChange(event: Event): void;
|
|
56
|
+
onNativeBlur(): void;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsCheckboxComponent, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsCheckboxComponent, "ds-checkbox", never, { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, { "checkedChange": "checkedChange"; "dsChange": "dsChange"; }, never, ["*"], true, never>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
type DsModalSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
62
|
+
type DsModalCloseReason = 'close-button' | 'backdrop' | 'escape' | 'api';
|
|
63
|
+
type DsModalBackdrop = boolean | 'static';
|
|
64
|
+
type DsModalVariant = 'primary' | 'default';
|
|
65
|
+
declare class DsModalComponent implements OnChanges, OnDestroy {
|
|
66
|
+
showModal: boolean;
|
|
67
|
+
showModalChange: EventEmitter<boolean>;
|
|
68
|
+
variant: DsModalVariant;
|
|
69
|
+
backdrop: DsModalBackdrop;
|
|
70
|
+
keyboard: boolean;
|
|
71
|
+
size: DsModalSize;
|
|
72
|
+
centered: boolean;
|
|
73
|
+
scrollable: boolean;
|
|
74
|
+
closeOnBackdrop: boolean;
|
|
75
|
+
showCloseButton: boolean;
|
|
76
|
+
ariaLabel?: string;
|
|
77
|
+
ariaLabelledby?: string;
|
|
78
|
+
ariaDescribedby?: string;
|
|
79
|
+
onHide: EventEmitter<void>;
|
|
80
|
+
onClose: EventEmitter<DsModalCloseReason>;
|
|
81
|
+
onShow: EventEmitter<void>;
|
|
82
|
+
dialogRef?: ElementRef<HTMLElement>;
|
|
83
|
+
private previouslyFocused?;
|
|
84
|
+
private bodyOverflowBefore?;
|
|
85
|
+
get classes(): string[];
|
|
86
|
+
get computedAriaLabelledby(): string | undefined;
|
|
87
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
88
|
+
ngOnDestroy(): void;
|
|
89
|
+
onDocumentKeydown(event: KeyboardEvent): void;
|
|
90
|
+
onBackdropClick(): void;
|
|
91
|
+
onCloseClick(): void;
|
|
92
|
+
requestClose(reason: DsModalCloseReason): void;
|
|
93
|
+
hide(reason?: DsModalCloseReason): void;
|
|
94
|
+
private focusInitial;
|
|
95
|
+
private restoreFocus;
|
|
96
|
+
private lockBodyScroll;
|
|
97
|
+
private unlockBodyScroll;
|
|
98
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsModalComponent, never>;
|
|
99
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsModalComponent, "ds-modal", never, { "showModal": { "alias": "showModal"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "backdrop": { "alias": "backdrop"; "required": false; }; "keyboard": { "alias": "keyboard"; "required": false; }; "size": { "alias": "size"; "required": false; }; "centered": { "alias": "centered"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "closeOnBackdrop": { "alias": "closeOnBackdrop"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; }, { "showModalChange": "showModalChange"; "onHide": "onHide"; "onClose": "onClose"; "onShow": "onShow"; }, never, ["[dsModalTitle]", "[dsModalBody]", "*", "[dsModalFooter]"], true, never>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
declare class DsSwitchComponent implements ControlValueAccessor {
|
|
103
|
+
id: string;
|
|
104
|
+
name?: string;
|
|
105
|
+
disabled: boolean;
|
|
106
|
+
checked: boolean;
|
|
107
|
+
checkedChange: EventEmitter<boolean>;
|
|
108
|
+
dsChange: EventEmitter<boolean>;
|
|
109
|
+
private onTouched;
|
|
110
|
+
private onChange;
|
|
111
|
+
get classes(): string[];
|
|
112
|
+
writeValue(value: boolean): void;
|
|
113
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
114
|
+
registerOnTouched(fn: () => void): void;
|
|
115
|
+
setDisabledState(isDisabled: boolean): void;
|
|
116
|
+
onNativeChange(event: Event): void;
|
|
117
|
+
onNativeBlur(): void;
|
|
118
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsSwitchComponent, never>;
|
|
119
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsSwitchComponent, "ds-switch", never, { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; }, { "checkedChange": "checkedChange"; "dsChange": "dsChange"; }, never, ["*"], true, never>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare class DsAccordionItemComponent implements OnInit {
|
|
123
|
+
private accordion;
|
|
124
|
+
title: string;
|
|
125
|
+
isOpen: boolean;
|
|
126
|
+
disabled: boolean;
|
|
127
|
+
isOpenChange: EventEmitter<boolean>;
|
|
128
|
+
dsToggle: EventEmitter<boolean>;
|
|
129
|
+
id: string;
|
|
130
|
+
constructor(accordion: DsAccordionComponent);
|
|
131
|
+
ngOnInit(): void;
|
|
132
|
+
toggle(): void;
|
|
133
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsAccordionItemComponent, never>;
|
|
134
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsAccordionItemComponent, "ds-accordion-item", never, { "title": { "alias": "title"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "isOpenChange": "isOpenChange"; "dsToggle": "dsToggle"; }, never, ["[dsAccordionTitle]", "*"], true, never>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare class DsAccordionComponent {
|
|
138
|
+
multiple: boolean;
|
|
139
|
+
items: QueryList<DsAccordionItemComponent>;
|
|
140
|
+
registerItem(item: DsAccordionItemComponent): void;
|
|
141
|
+
private closeOthers;
|
|
142
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DsAccordionComponent, never>;
|
|
143
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsAccordionComponent, "ds-accordion", never, { "multiple": { "alias": "multiple"; "required": false; }; }, {}, ["items"], ["*"], true, never>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export { DsAccordionComponent, DsAccordionItemComponent, DsButtonComponent, DsButtonLinkComponent, DsCheckboxComponent, DsModalComponent, DsSwitchComponent };
|
|
147
|
+
export type { DsButtonLinkSize, DsButtonSize, DsButtonVariant, DsCheckboxVariant, DsModalBackdrop, DsModalCloseReason, DsModalSize, DsModalVariant };
|