@tooark/web-components 1.0.0 → 1.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 +14 -8
- package/README.pt-BR.md +16 -10
- package/dist/index.cjs +460 -184
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +927 -39
- package/dist/index.d.ts +927 -39
- package/dist/index.js +439 -185
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,87 @@
|
|
|
1
|
-
import { ArkButtonStatus, ArkButtonType, ArkCalendarEvent, ArkDialogCloseReason, ArkSchedulerEvent, ArkSchedulerView, ArkSelectOption, ArkToastOptions } from '@tooark/core';
|
|
1
|
+
import { ArkButtonStatus, ArkButtonType, ArkCalendarEvent, ArkColorSwatch, ArkDialogCloseReason, ArkDrawerSide, ArkDrawerMode, ArkDrawerCloseReason, ArkKvRow, ArkKvBulkFormat, ArkMarkShape, ArkSchedulerEvent, ArkSchedulerView, ArkSelectOption, ArkSplitPaneDirection, ArkToastOptions } from '@tooark/core';
|
|
2
|
+
|
|
3
|
+
/** `HTMLElement` no navegador; fora dele, uma classe vazia para o módulo poder ser importado no servidor. */
|
|
4
|
+
declare const HTMLElementBase: typeof HTMLElement;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Alerta ou banner: o PRÓPRIO host é a caixa (cor suave do intent) e os
|
|
8
|
+
* filhos do usuário são a mensagem, texto solto ou elementos, que fluem
|
|
9
|
+
* normalmente. `slot="icon"` fica à esquerda e `slot="action"` à direita,
|
|
10
|
+
* posicionados por components.css sem sair do lugar (o ícone e o botão de
|
|
11
|
+
* dispensar por posição absoluta na área reservada pelo padding; a ação por
|
|
12
|
+
* float, então o texto contorna). `heading` cria um título próprio no início
|
|
13
|
+
* do host; `dismissible` põe o botão de dispensar no fim (chrome). `variant`
|
|
14
|
+
* box (caixa arredondada) ou banner (largura toda, só borda inferior). `live`
|
|
15
|
+
* define a live region: polite (role="status") ou assertive (role="alert"),
|
|
16
|
+
* por padrão pelo intent (warning e danger são assertive), ou off. Dispensar
|
|
17
|
+
* anima a saída (slide-down, quick), emite `ark-dismiss` e esconde o host com
|
|
18
|
+
* `hidden`; remover é do app, que também pode tirar o `hidden` para reexibir.
|
|
19
|
+
*/
|
|
20
|
+
declare class ArkAlert extends HTMLElementBase {
|
|
21
|
+
static readonly tagName = "ark-alert";
|
|
22
|
+
private ownClasses;
|
|
23
|
+
private syncingClass;
|
|
24
|
+
private headingEl;
|
|
25
|
+
private dismissEl;
|
|
26
|
+
private observer;
|
|
27
|
+
private dismissing;
|
|
28
|
+
static get observedAttributes(): string[];
|
|
29
|
+
connectedCallback(): void;
|
|
30
|
+
disconnectedCallback(): void;
|
|
31
|
+
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
32
|
+
get dismissible(): boolean;
|
|
33
|
+
set dismissible(value: boolean | string | null | undefined);
|
|
34
|
+
/** Dispensa o alerta: anima a saída, emite `ark-dismiss` e esconde o host (`hidden`); remover é do app. */
|
|
35
|
+
dismiss(): void;
|
|
36
|
+
private getVariant;
|
|
37
|
+
private getLive;
|
|
38
|
+
private getLocale;
|
|
39
|
+
private getPalette;
|
|
40
|
+
private syncHeading;
|
|
41
|
+
private syncDismiss;
|
|
42
|
+
private syncSlots;
|
|
43
|
+
private applyOwnClasses;
|
|
44
|
+
private updateAppearance;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Avatar: o PRÓPRIO host é o círculo ou quadrado (`role="img"` nomeado por
|
|
49
|
+
* `name`). Mostra a imagem de `src` e, sem ela ou quando ela falha ao
|
|
50
|
+
* carregar, as iniciais de `name` (primeira letra, ou primeira mais última
|
|
51
|
+
* quando há sobrenome); sem nome e sem imagem, um glifo de pessoa decorativo
|
|
52
|
+
* (`aria-hidden`, a menos que o host tenha aria-label próprio). `color` troca
|
|
53
|
+
* o tint primary por uma cor própria (texto na cor, fundo suave).
|
|
54
|
+
*/
|
|
55
|
+
declare class ArkAvatar extends HTMLElementBase {
|
|
56
|
+
static readonly tagName = "ark-avatar";
|
|
57
|
+
private ownClasses;
|
|
58
|
+
private syncingClass;
|
|
59
|
+
private imageEl;
|
|
60
|
+
private initialsEl;
|
|
61
|
+
/** `src` que falhou ao carregar; volta a tentar quando o atributo muda. */
|
|
62
|
+
private failedSrc;
|
|
63
|
+
/** aria-label escrito pelo componente a partir de `name`, para o tirar quando o nome sai. */
|
|
64
|
+
private ownLabel;
|
|
65
|
+
static get observedAttributes(): string[];
|
|
66
|
+
connectedCallback(): void;
|
|
67
|
+
attributeChangedCallback(name: string): void;
|
|
68
|
+
/** Iniciais derivadas de `name`: primeira letra, ou primeira mais última quando há sobrenome. */
|
|
69
|
+
get initials(): string;
|
|
70
|
+
private getSizing;
|
|
71
|
+
private getShape;
|
|
72
|
+
private render;
|
|
73
|
+
private syncImage;
|
|
74
|
+
private applyCustomColor;
|
|
75
|
+
private applyOwnClasses;
|
|
76
|
+
private updateAppearance;
|
|
77
|
+
}
|
|
2
78
|
|
|
3
79
|
/**
|
|
4
80
|
* Rótulo curto de status ou categoria. O PRÓPRIO host é o badge (classes e
|
|
5
81
|
* hooks): os filhos do usuário, ícone e texto, ficam onde estão. Não é
|
|
6
82
|
* interativo; um badge clicável é um ark-button pequeno.
|
|
7
83
|
*/
|
|
8
|
-
declare class ArkBadge extends
|
|
84
|
+
declare class ArkBadge extends HTMLElementBase {
|
|
9
85
|
static readonly tagName = "ark-badge";
|
|
10
86
|
private ownClasses;
|
|
11
87
|
private syncingClass;
|
|
@@ -31,7 +107,7 @@ declare class ArkBadge extends HTMLElement {
|
|
|
31
107
|
* donos deles. Com `href`, um `<a>` "esticado" cobre o host, recebe o foco e
|
|
32
108
|
* é nomeado pelo conteúdo do host (`aria-labelledby`).
|
|
33
109
|
*/
|
|
34
|
-
declare class ArkButton extends
|
|
110
|
+
declare class ArkButton extends HTMLElementBase {
|
|
35
111
|
static readonly tagName: string;
|
|
36
112
|
static readonly formAssociated = true;
|
|
37
113
|
private readonly internals;
|
|
@@ -43,8 +119,8 @@ declare class ArkButton extends HTMLElement {
|
|
|
43
119
|
private syncingClass;
|
|
44
120
|
private formDisabled;
|
|
45
121
|
/**
|
|
46
|
-
*
|
|
47
|
-
* @returns
|
|
122
|
+
* Atributos observados pelo componente, a que ele reage em attributeChangedCallback.
|
|
123
|
+
* @returns Array de nomes de atributos observados.
|
|
48
124
|
*/
|
|
49
125
|
static get observedAttributes(): string[];
|
|
50
126
|
/**
|
|
@@ -57,7 +133,9 @@ declare class ArkButton extends HTMLElement {
|
|
|
57
133
|
connectedCallback(): void;
|
|
58
134
|
/**
|
|
59
135
|
* Chamado pelo navegador quando um atributo observado do elemento é alterado.
|
|
60
|
-
* @param name
|
|
136
|
+
* @param name Nome do atributo alterado.
|
|
137
|
+
* @param oldValue Valor antigo do atributo.
|
|
138
|
+
* @param newValue Novo valor do atributo.
|
|
61
139
|
*/
|
|
62
140
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
63
141
|
/** Feedback do resultado: "success" ou "error" trocam o glifo; "idle" (ou ausente) não mostra nada. */
|
|
@@ -92,35 +170,35 @@ declare class ArkButton extends HTMLElement {
|
|
|
92
170
|
* Indica o tipo do botão.
|
|
93
171
|
*/
|
|
94
172
|
get type(): ArkButtonType;
|
|
173
|
+
set type(value: ArkButtonType | null | undefined);
|
|
95
174
|
/**
|
|
96
175
|
* Formulário ao qual o botão pertence (via ElementInternals).
|
|
97
176
|
*/
|
|
98
177
|
get form(): HTMLFormElement | null;
|
|
99
178
|
/**
|
|
100
179
|
* Manipula o clique no botão, tratando submissão e reset de formulários.
|
|
101
|
-
* @param event Evento de clique
|
|
180
|
+
* @param event Evento de clique.
|
|
102
181
|
*/
|
|
103
182
|
private readonly handleClick;
|
|
104
183
|
/**
|
|
105
184
|
* Manipula o pressionamento de tecla no botão, tratando Enter e Espaço.
|
|
106
|
-
* @param event Evento de teclado
|
|
185
|
+
* @param event Evento de teclado.
|
|
107
186
|
*/
|
|
108
187
|
private readonly handleKeydown;
|
|
109
188
|
/**
|
|
110
189
|
* Manipula o keyup no botão, tratando a tecla Espaço.
|
|
111
|
-
* @param event Evento de teclado
|
|
112
|
-
* @returns void
|
|
190
|
+
* @param event Evento de teclado.
|
|
113
191
|
*/
|
|
114
192
|
private readonly handleKeyup;
|
|
115
193
|
/**
|
|
116
|
-
* Normaliza o valor do intent,
|
|
117
|
-
* @param value Valor do intent.
|
|
194
|
+
* Normaliza o valor do intent, caindo em "primary" quando não é um dos valores válidos.
|
|
195
|
+
* @param value Valor do intent a ser normalizado.
|
|
118
196
|
* @returns Intent normalizado.
|
|
119
197
|
*/
|
|
120
198
|
private normalizeIntent;
|
|
121
199
|
/**
|
|
122
|
-
* Resolve a variante e o intent do botão com base nos atributos.
|
|
123
|
-
* @returns Objeto contendo a variante de estilo e o intent.
|
|
200
|
+
* Resolve a variante de estilo e o intent do botão com base nos atributos.
|
|
201
|
+
* @returns Objeto contendo a variante de estilo (`styleVariant`) e o intent (`intent`) do botão.
|
|
124
202
|
*/
|
|
125
203
|
private resolveVariantAndIntent;
|
|
126
204
|
/**
|
|
@@ -151,7 +229,7 @@ declare class ArkButton extends HTMLElement {
|
|
|
151
229
|
* eventos por dia (`events` + `event-display`). O ark-datepicker embute este
|
|
152
230
|
* componente (modo inline e no popup do modo input).
|
|
153
231
|
*/
|
|
154
|
-
declare class ArkCalendar extends
|
|
232
|
+
declare class ArkCalendar extends HTMLElementBase {
|
|
155
233
|
static readonly tagName = "ark-calendar";
|
|
156
234
|
private root;
|
|
157
235
|
private viewDate;
|
|
@@ -163,6 +241,8 @@ declare class ArkCalendar extends HTMLElement {
|
|
|
163
241
|
private eventsProp;
|
|
164
242
|
/** Direção da navegação de mês por clique nas setas: dirige o slide do grid. */
|
|
165
243
|
private navDirection;
|
|
244
|
+
/** Último período anunciado (título do cabeçalho); o primeiro build só registra, sem anunciar. */
|
|
245
|
+
private announcedPeriod;
|
|
166
246
|
/** Última seleção feita pelo usuário: recebe um "pop" de entrada. */
|
|
167
247
|
private justSelectedISO;
|
|
168
248
|
static get observedAttributes(): string[];
|
|
@@ -170,7 +250,7 @@ declare class ArkCalendar extends HTMLElement {
|
|
|
170
250
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
171
251
|
/** Lista de eventos (propriedade JS; tem precedência sobre o atributo `events`). */
|
|
172
252
|
get events(): ArkCalendarEvent[];
|
|
173
|
-
set events(list: ArkCalendarEvent[]);
|
|
253
|
+
set events(list: ArkCalendarEvent[] | string | null);
|
|
174
254
|
private parseEventsAttr;
|
|
175
255
|
private getEventDisplay;
|
|
176
256
|
private eventsByDay;
|
|
@@ -201,9 +281,38 @@ declare class ArkCalendar extends HTMLElement {
|
|
|
201
281
|
private yearsBlockStart;
|
|
202
282
|
private buildMonthsGrid;
|
|
203
283
|
private buildYearsGrid;
|
|
284
|
+
private announcePeriod;
|
|
204
285
|
private build;
|
|
205
286
|
}
|
|
206
287
|
|
|
288
|
+
/**
|
|
289
|
+
* Cartão: o PRÓPRIO host é o container (fundo surface, borda, cantos), uma
|
|
290
|
+
* grid de components.css com a linha de cabeçalho, o corpo e o rodapé. Os
|
|
291
|
+
* filhos do usuário ficam onde estão: `slot="header"` e `slot="actions"` na
|
|
292
|
+
* linha de cima (título à esquerda, ações à direita), `slot="footer"` na
|
|
293
|
+
* última linha, com divisor, e os demais são o corpo, na largura toda e na
|
|
294
|
+
* ordem do DOM. `heading` cria um h2 próprio no início do host; com ele, o
|
|
295
|
+
* `slot="header"` do usuário vira a linha seguinte do cabeçalho. `padding`
|
|
296
|
+
* escala o espaçamento interno (padding do host e gap entre as linhas) e
|
|
297
|
+
* `rounded` os cantos. Não é interativo e não tem role próprio.
|
|
298
|
+
*/
|
|
299
|
+
declare class ArkCard extends HTMLElementBase {
|
|
300
|
+
static readonly tagName = "ark-card";
|
|
301
|
+
private ownClasses;
|
|
302
|
+
private syncingClass;
|
|
303
|
+
private observer;
|
|
304
|
+
private headingEl;
|
|
305
|
+
static get observedAttributes(): string[];
|
|
306
|
+
connectedCallback(): void;
|
|
307
|
+
disconnectedCallback(): void;
|
|
308
|
+
attributeChangedCallback(name: string): void;
|
|
309
|
+
private getPadding;
|
|
310
|
+
private syncHeading;
|
|
311
|
+
private syncSlots;
|
|
312
|
+
private applyOwnClasses;
|
|
313
|
+
private updateAppearance;
|
|
314
|
+
}
|
|
315
|
+
|
|
207
316
|
/**
|
|
208
317
|
* Carousel com CSS scroll snap: o PRÓPRIO host é o container rolável e os
|
|
209
318
|
* slides são os filhos diretos, exatamente onde o usuário os declarou — nada
|
|
@@ -211,7 +320,7 @@ declare class ArkCalendar extends HTMLElement {
|
|
|
211
320
|
* Setas e dots vivem num overlay `position: sticky` (ver components.css).
|
|
212
321
|
* Arrasto com mouse é emulado; touch/trackpad usam a rolagem nativa.
|
|
213
322
|
*/
|
|
214
|
-
declare class ArkCarousel extends
|
|
323
|
+
declare class ArkCarousel extends HTMLElementBase {
|
|
215
324
|
static readonly tagName = "ark-carousel";
|
|
216
325
|
private overlayEl;
|
|
217
326
|
private dotsEl;
|
|
@@ -220,6 +329,7 @@ declare class ArkCarousel extends HTMLElement {
|
|
|
220
329
|
private currentIndex;
|
|
221
330
|
private autoplayId;
|
|
222
331
|
private scrollTimer;
|
|
332
|
+
private mountFrame;
|
|
223
333
|
private observer;
|
|
224
334
|
private resizeObserver;
|
|
225
335
|
private ownClasses;
|
|
@@ -273,12 +383,66 @@ declare class ArkCarousel extends HTMLElement {
|
|
|
273
383
|
private build;
|
|
274
384
|
}
|
|
275
385
|
|
|
386
|
+
/**
|
|
387
|
+
* Caixa de seleção: o desenho é do componente (um <button role="checkbox">
|
|
388
|
+
* com o glifo) e um <input type="checkbox"> oculto carrega name/value para o
|
|
389
|
+
* formulário; os dois são controles nativos, então <fieldset disabled> os
|
|
390
|
+
* desabilita sem JS. `label` vira um <label for> próprio; sem ele o host
|
|
391
|
+
* precisa de aria-label, ou de filhos (texto livre, links), que dão nome à
|
|
392
|
+
* caixa por aria-labelledby e a alternam ao clique. Os nós próprios ficam no
|
|
393
|
+
* início do host, marcados data-ark-chrome, antes dos filhos do usuário.
|
|
394
|
+
*/
|
|
395
|
+
declare class ArkCheckbox extends HTMLElementBase {
|
|
396
|
+
static readonly tagName = "ark-checkbox";
|
|
397
|
+
private ownClasses;
|
|
398
|
+
private syncingClass;
|
|
399
|
+
private boxEl;
|
|
400
|
+
private iconEl;
|
|
401
|
+
private labelEl;
|
|
402
|
+
private inputEl;
|
|
403
|
+
private observer;
|
|
404
|
+
/** Glifo em exibição; a troca depois do primeiro render entra com scale-in. */
|
|
405
|
+
private iconKind;
|
|
406
|
+
static get observedAttributes(): string[];
|
|
407
|
+
constructor();
|
|
408
|
+
connectedCallback(): void;
|
|
409
|
+
disconnectedCallback(): void;
|
|
410
|
+
attributeChangedCallback(name: string): void;
|
|
411
|
+
get checked(): boolean;
|
|
412
|
+
set checked(value: boolean | string | null | undefined);
|
|
413
|
+
/** Estado misto (parte de um grupo marcada): aria-checked="mixed" e o traço; o próximo clique limpa. */
|
|
414
|
+
get indeterminate(): boolean;
|
|
415
|
+
set indeterminate(value: boolean | string | null | undefined);
|
|
416
|
+
get disabled(): boolean;
|
|
417
|
+
set disabled(value: boolean | string | null | undefined);
|
|
418
|
+
get name(): string;
|
|
419
|
+
set name(value: string);
|
|
420
|
+
/** Valor submetido quando marcado. Padrão: "on", como o input nativo. */
|
|
421
|
+
get value(): string;
|
|
422
|
+
set value(value: string);
|
|
423
|
+
/** Alterna o estado como um clique: limpa `indeterminate`, inverte `checked` e emite `change`. */
|
|
424
|
+
toggle(): void;
|
|
425
|
+
focus(options?: FocusOptions): void;
|
|
426
|
+
private isDisabled;
|
|
427
|
+
private readonly handleHostClick;
|
|
428
|
+
private readonly handleKeydown;
|
|
429
|
+
private getIntent;
|
|
430
|
+
private getPalette;
|
|
431
|
+
private getSizing;
|
|
432
|
+
private render;
|
|
433
|
+
private syncLabel;
|
|
434
|
+
private syncName;
|
|
435
|
+
private syncIcon;
|
|
436
|
+
private applyOwnClasses;
|
|
437
|
+
private updateAppearance;
|
|
438
|
+
}
|
|
439
|
+
|
|
276
440
|
/**
|
|
277
441
|
* Superfície de seleção de hora — colunas digitais roláveis de hora/minuto
|
|
278
442
|
* (/segundo), no estilo DigitalClock do MUI. Valor sempre em 24h "HH:mm:ss";
|
|
279
443
|
* `hours-format="12"` só muda a exibição (coluna AM/PM).
|
|
280
444
|
*/
|
|
281
|
-
declare class ArkClock extends
|
|
445
|
+
declare class ArkClock extends HTMLElementBase {
|
|
282
446
|
static readonly tagName = "ark-clock";
|
|
283
447
|
private root;
|
|
284
448
|
private columnEls;
|
|
@@ -287,6 +451,7 @@ declare class ArkClock extends HTMLElement {
|
|
|
287
451
|
connectedCallback(): void;
|
|
288
452
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
289
453
|
get value(): string;
|
|
454
|
+
set value(value: string | null | undefined);
|
|
290
455
|
private getIntent;
|
|
291
456
|
private showSeconds;
|
|
292
457
|
private is12h;
|
|
@@ -302,6 +467,190 @@ declare class ArkClock extends HTMLElement {
|
|
|
302
467
|
private build;
|
|
303
468
|
}
|
|
304
469
|
|
|
470
|
+
/**
|
|
471
|
+
* Paleta de cores: o PRÓPRIO host é o `role="radiogroup"` e cada amostra é
|
|
472
|
+
* um botão `role="radio"` do componente, renderizado a partir de `colors`
|
|
473
|
+
* (`{ name, value }[]`, atributo JSON ou propriedade JS), preenchido com a
|
|
474
|
+
* cor e nomeado pelo `name`. Teclado do radio nativo: um tab stop, setas
|
|
475
|
+
* movem e selecionam dando a volta, Home/End, Espaço seleciona. `change` só
|
|
476
|
+
* quando a seleção muda pelo usuário.
|
|
477
|
+
*/
|
|
478
|
+
declare class ArkColorSwatches extends HTMLElementBase {
|
|
479
|
+
static readonly tagName = "ark-color-swatches";
|
|
480
|
+
private ownClasses;
|
|
481
|
+
private syncingClass;
|
|
482
|
+
private colorsProperty;
|
|
483
|
+
private swatches;
|
|
484
|
+
/** Assinatura das cores renderizadas, para reconstruir só quando a lista muda. */
|
|
485
|
+
private renderedKey;
|
|
486
|
+
static get observedAttributes(): string[];
|
|
487
|
+
constructor();
|
|
488
|
+
connectedCallback(): void;
|
|
489
|
+
attributeChangedCallback(name: string): void;
|
|
490
|
+
/** Amostras: a propriedade, ou o JSON do atributo `colors` (entradas sem name ou value são ignoradas). */
|
|
491
|
+
get colors(): ArkColorSwatch[];
|
|
492
|
+
set colors(list: ArkColorSwatch[] | string | null | undefined);
|
|
493
|
+
/** Cor selecionada (o `value` da amostra). */
|
|
494
|
+
get value(): string;
|
|
495
|
+
set value(value: string);
|
|
496
|
+
get disabled(): boolean;
|
|
497
|
+
set disabled(value: boolean | string | null | undefined);
|
|
498
|
+
/** Seleciona uma cor como o usuário faria: muda `value`, foca a amostra e emite `change`. */
|
|
499
|
+
select(value: string): void;
|
|
500
|
+
private readonly handleKeydown;
|
|
501
|
+
private getSizeClass;
|
|
502
|
+
private syncSwatches;
|
|
503
|
+
private applyOwnClasses;
|
|
504
|
+
private updateAppearance;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Item de um ark-command-palette. O PRÓPRIO host é a opção (`role="option"`):
|
|
509
|
+
* ícone e texto são filhos livres e um filho `slot="trailing"` (atalho,
|
|
510
|
+
* badge) vai para a direita por CSS. Nunca recebe foco: o campo de busca da
|
|
511
|
+
* paleta aponta para ele por `aria-activedescendant`. `value` é o que
|
|
512
|
+
* `ark-select` carrega, `group` a seção em que é listado, `label` o texto do
|
|
513
|
+
* filtro e do nome (padrão: o texto dos filhos sem slot). A paleta escreve
|
|
514
|
+
* `id`, `hidden`, `aria-selected` e a ordem visual.
|
|
515
|
+
*/
|
|
516
|
+
declare class ArkCommandItem extends HTMLElementBase {
|
|
517
|
+
static readonly tagName = "ark-command-item";
|
|
518
|
+
private ownClasses;
|
|
519
|
+
private syncingClass;
|
|
520
|
+
static get observedAttributes(): string[];
|
|
521
|
+
constructor();
|
|
522
|
+
connectedCallback(): void;
|
|
523
|
+
attributeChangedCallback(name: string): void;
|
|
524
|
+
get value(): string;
|
|
525
|
+
set value(value: string | null | undefined);
|
|
526
|
+
/** Seção em que a paleta lista o item; vazio é sem grupo. */
|
|
527
|
+
get group(): string;
|
|
528
|
+
set group(value: string | null | undefined);
|
|
529
|
+
/** Texto usado no filtro e no nome da opção: `label`, senão o texto dos filhos sem slot. */
|
|
530
|
+
get label(): string;
|
|
531
|
+
set label(value: string | null | undefined);
|
|
532
|
+
get disabled(): boolean;
|
|
533
|
+
set disabled(value: boolean | string | null | undefined);
|
|
534
|
+
/** Seleciona o item: emite `ark-select` com o value, que a paleta consolida e fecha em seguida. */
|
|
535
|
+
select(): void;
|
|
536
|
+
private readonly handleClick;
|
|
537
|
+
private applyOwnClasses;
|
|
538
|
+
private updateAppearance;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Paleta de comandos. O PRÓPRIO host é o painel (`popover="manual"`,
|
|
543
|
+
* `role="dialog"`, scrim, trap de foco, Esc), centrado no topo. Os filhos
|
|
544
|
+
* `ark-command-item` do usuário ficam onde estão; o componente põe o próprio
|
|
545
|
+
* chrome nas pontas: o campo de busca (um ark-input, `role="combobox"`,
|
|
546
|
+
* sticky) no início e, ao fim, um cabeçalho por `group`, a mensagem de vazio
|
|
547
|
+
* e um listbox oculto que é dono das opções visíveis por `aria-owns`. Itens
|
|
548
|
+
* e cabeçalhos se ordenam por `order` no CSS, então nada é inserido entre os
|
|
549
|
+
* filhos. Com `filter` o texto filtra localmente pelo `label` dos itens; em
|
|
550
|
+
* qualquer caso `ark-query` sai com debounce para busca assíncrona. O foco
|
|
551
|
+
* fica sempre no campo; setas movem a opção ativa (`aria-activedescendant`),
|
|
552
|
+
* Enter seleciona, Esc fecha; `hotkey` abre de qualquer lugar da página. A
|
|
553
|
+
* página para de rolar enquanto aberta, salvo com `no-scroll-lock`.
|
|
554
|
+
*/
|
|
555
|
+
declare class ArkCommandPalette extends HTMLElementBase {
|
|
556
|
+
static readonly tagName = "ark-command-palette";
|
|
557
|
+
private inputEl;
|
|
558
|
+
private listEl;
|
|
559
|
+
private emptyEl;
|
|
560
|
+
private groupEls;
|
|
561
|
+
private observer;
|
|
562
|
+
private ownClasses;
|
|
563
|
+
private syncingClass;
|
|
564
|
+
private state;
|
|
565
|
+
/** A abertura em curso veio do connectedCallback: o ark-open espera um microtask. */
|
|
566
|
+
private openingOnConnect;
|
|
567
|
+
private releaseTrap;
|
|
568
|
+
private queryTimer;
|
|
569
|
+
private activeId;
|
|
570
|
+
private warned;
|
|
571
|
+
private readonly seq;
|
|
572
|
+
static get observedAttributes(): string[];
|
|
573
|
+
constructor();
|
|
574
|
+
connectedCallback(): void;
|
|
575
|
+
disconnectedCallback(): void;
|
|
576
|
+
attributeChangedCallback(name: string): void;
|
|
577
|
+
/** Aberta (atributo `open`). */
|
|
578
|
+
get open(): boolean;
|
|
579
|
+
set open(value: boolean | string | null | undefined);
|
|
580
|
+
/** A página continua rolando com a paleta aberta (atributo `no-scroll-lock`). */
|
|
581
|
+
get noScrollLock(): boolean;
|
|
582
|
+
set noScrollLock(value: boolean | string | null | undefined);
|
|
583
|
+
/** Texto atual do campo de busca. */
|
|
584
|
+
get query(): string;
|
|
585
|
+
set query(value: string);
|
|
586
|
+
/** Debounce de `ark-query` em ms. Padrão: 150. */
|
|
587
|
+
get queryDelay(): number;
|
|
588
|
+
show(): void;
|
|
589
|
+
close(): void;
|
|
590
|
+
/**
|
|
591
|
+
* Os ark-command-item desta paleta, na ordem do DOM. Descendentes, não só filhos: um wrapper de framework (o
|
|
592
|
+
* `<ark-command-item-wrapper>` do Angular) fica entre a paleta e o item. Itens de uma paleta aninhada são dela.
|
|
593
|
+
*/
|
|
594
|
+
private items;
|
|
595
|
+
private visibleItems;
|
|
596
|
+
private getLocale;
|
|
597
|
+
private syncItems;
|
|
598
|
+
private applyActive;
|
|
599
|
+
private setActive;
|
|
600
|
+
private moveActive;
|
|
601
|
+
private readonly handleInput;
|
|
602
|
+
private readonly handleKeydown;
|
|
603
|
+
private readonly handlePointerOver;
|
|
604
|
+
private readonly handleItemSelect;
|
|
605
|
+
private readonly handleHotkey;
|
|
606
|
+
private openNow;
|
|
607
|
+
private closeNow;
|
|
608
|
+
private warnWithoutName;
|
|
609
|
+
private render;
|
|
610
|
+
private applyOwnClasses;
|
|
611
|
+
private updateAppearance;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Botão de copiar: herda do ark-button (o host é o próprio botão, com
|
|
616
|
+
* variantes, tamanhos, `icon-only`, formulário e teclado) e acrescenta o
|
|
617
|
+
* chrome de copiar: um ícone no início do host e, quando o usuário não dá
|
|
618
|
+
* filhos, um rótulo próprio com a string `copy`. Copia `value` ou o texto do
|
|
619
|
+
* elemento de `for`; durante `feedback-ms` o ícone vira check, rótulo,
|
|
620
|
+
* `title` e (com icon-only) `aria-label` viram `copied`, que também é
|
|
621
|
+
* anunciado ao leitor de tela. Os filhos do usuário ficam onde estão e nada
|
|
622
|
+
* é aninhado.
|
|
623
|
+
*/
|
|
624
|
+
declare class ArkCopyButton extends ArkButton {
|
|
625
|
+
static readonly tagName: string;
|
|
626
|
+
private iconEl;
|
|
627
|
+
private textEl;
|
|
628
|
+
private iconState;
|
|
629
|
+
private copied;
|
|
630
|
+
private feedbackTimer;
|
|
631
|
+
private childObserver;
|
|
632
|
+
/** aria-label escrito pelo componente (icon-only), para não apagar um do usuário. */
|
|
633
|
+
private ownAriaLabel;
|
|
634
|
+
static get observedAttributes(): string[];
|
|
635
|
+
constructor();
|
|
636
|
+
connectedCallback(): void;
|
|
637
|
+
disconnectedCallback(): void;
|
|
638
|
+
/** Texto a copiar: `value`, ou o `value`/`textContent` do elemento apontado por `for`. */
|
|
639
|
+
get value(): string;
|
|
640
|
+
set value(value: string);
|
|
641
|
+
/** Duração do feedback "copiado" em ms. Padrão: 1500. */
|
|
642
|
+
get feedbackMs(): number;
|
|
643
|
+
set feedbackMs(value: number);
|
|
644
|
+
/** Copia o texto para a área de transferência; resolve com o sucesso. Emite `ark-copy` e anuncia `copied`. */
|
|
645
|
+
copy(): Promise<boolean>;
|
|
646
|
+
private static writeClipboard;
|
|
647
|
+
private readonly handleCopyClick;
|
|
648
|
+
private getLocale;
|
|
649
|
+
private hasUserContent;
|
|
650
|
+
private syncCopyChrome;
|
|
651
|
+
protected updateAppearance(): void;
|
|
652
|
+
}
|
|
653
|
+
|
|
305
654
|
/**
|
|
306
655
|
* Seletor de data/hora que compõe ark-input + ark-calendar + ark-clock.
|
|
307
656
|
*
|
|
@@ -317,13 +666,15 @@ declare class ArkClock extends HTMLElement {
|
|
|
317
666
|
* core (abre abaixo, vira para cima sem espaço) e animado com `scale` a
|
|
318
667
|
* partir da origem.
|
|
319
668
|
*/
|
|
320
|
-
declare class ArkDatepicker extends
|
|
669
|
+
declare class ArkDatepicker extends HTMLElementBase {
|
|
321
670
|
static readonly tagName = "ark-datepicker";
|
|
322
671
|
private calendarEl;
|
|
323
672
|
private clockEl;
|
|
324
673
|
private inputComp;
|
|
325
674
|
private toggleEl;
|
|
326
675
|
private popupEl;
|
|
676
|
+
/** Calendário e/ou relógio: inline no host ou dentro do popup. */
|
|
677
|
+
private panelEl;
|
|
327
678
|
/** Para de reposicionar o popup em scroll/resize; só existe enquanto aberto. */
|
|
328
679
|
private disposePosition;
|
|
329
680
|
private hiddenInputEl;
|
|
@@ -337,6 +688,7 @@ declare class ArkDatepicker extends HTMLElement {
|
|
|
337
688
|
disconnectedCallback(): void;
|
|
338
689
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
339
690
|
get value(): string;
|
|
691
|
+
set value(value: string | null | undefined);
|
|
340
692
|
private hasRendered;
|
|
341
693
|
private getMode;
|
|
342
694
|
private isInputMode;
|
|
@@ -385,7 +737,7 @@ declare class ArkDatepicker extends HTMLElement {
|
|
|
385
737
|
* navegando por cursor virtual ainda alcança o conteúdo atrás. A página para
|
|
386
738
|
* de rolar enquanto aberto (`lockScroll` de core), salvo com `no-scroll-lock`.
|
|
387
739
|
*/
|
|
388
|
-
declare class ArkDialog extends
|
|
740
|
+
declare class ArkDialog extends HTMLElementBase {
|
|
389
741
|
static readonly tagName = "ark-dialog";
|
|
390
742
|
private headerEl;
|
|
391
743
|
private titleEl;
|
|
@@ -395,6 +747,8 @@ declare class ArkDialog extends HTMLElement {
|
|
|
395
747
|
private syncingClass;
|
|
396
748
|
/** Visibilidade real: `open` também cobre a animação de entrada; `closing` é a saída ainda visível. */
|
|
397
749
|
private state;
|
|
750
|
+
/** A abertura em curso veio do connectedCallback: o ark-open espera um microtask. */
|
|
751
|
+
private openingOnConnect;
|
|
398
752
|
private releaseTrap;
|
|
399
753
|
/** Motivo pedido por `close(reason)`, lido quando o atributo `open` some. */
|
|
400
754
|
private pendingReason;
|
|
@@ -439,6 +793,75 @@ declare class ArkDialog extends HTMLElement {
|
|
|
439
793
|
private updateAppearance;
|
|
440
794
|
}
|
|
441
795
|
|
|
796
|
+
/**
|
|
797
|
+
* Gaveta ancorada numa borda. O PRÓPRIO host é o painel: em `mode="overlay"`
|
|
798
|
+
* abre como `popover="manual"` (top layer, `::backdrop` como scrim, trap de
|
|
799
|
+
* foco, Esc e clique no scrim fecham), em `mode="inline"` fica no fluxo da
|
|
800
|
+
* página e só anima (o console inferior, um painel lateral fixo). Os filhos
|
|
801
|
+
* do usuário são o corpo e ficam onde estão; um filho `slot="footer"` vai ao
|
|
802
|
+
* fim por CSS. O cabeçalho (título `h2` de `label` e botão de fechar) é o
|
|
803
|
+
* primeiro filho, marcado `data-ark-chrome`. `side` escolhe a borda, a
|
|
804
|
+
* direção do slide (com o easing `sheet`) e a borda desenhada; `size` é um
|
|
805
|
+
* preset ou um comprimento CSS no eixo da gaveta. `open` é a fonte da
|
|
806
|
+
* verdade, como no ark-dialog, e em overlay a página para de rolar enquanto
|
|
807
|
+
* aberta, salvo com `no-scroll-lock`.
|
|
808
|
+
*/
|
|
809
|
+
declare class ArkDrawer extends HTMLElementBase {
|
|
810
|
+
static readonly tagName = "ark-drawer";
|
|
811
|
+
private headerEl;
|
|
812
|
+
private titleEl;
|
|
813
|
+
private closeEl;
|
|
814
|
+
private observer;
|
|
815
|
+
private ownClasses;
|
|
816
|
+
private syncingClass;
|
|
817
|
+
private state;
|
|
818
|
+
/** A abertura em curso veio do connectedCallback: o ark-open espera um microtask. */
|
|
819
|
+
private openingOnConnect;
|
|
820
|
+
private releaseTrap;
|
|
821
|
+
private pendingReason;
|
|
822
|
+
private warned;
|
|
823
|
+
private readonly titleId;
|
|
824
|
+
/** `aria-labelledby` que o próprio componente escreveu, para não apagar um do usuário. */
|
|
825
|
+
private appliedLabelledBy;
|
|
826
|
+
static get observedAttributes(): string[];
|
|
827
|
+
constructor();
|
|
828
|
+
connectedCallback(): void;
|
|
829
|
+
disconnectedCallback(): void;
|
|
830
|
+
attributeChangedCallback(name: string): void;
|
|
831
|
+
/** Aberto (atributo `open`). */
|
|
832
|
+
get open(): boolean;
|
|
833
|
+
set open(value: boolean | string | null | undefined);
|
|
834
|
+
/** Esc e clique no scrim não fecham (só no overlay). */
|
|
835
|
+
get persistent(): boolean;
|
|
836
|
+
set persistent(value: boolean | string | null | undefined);
|
|
837
|
+
/** A página continua rolando com a gaveta aberta em overlay (atributo `no-scroll-lock`). */
|
|
838
|
+
get noScrollLock(): boolean;
|
|
839
|
+
set noScrollLock(value: boolean | string | null | undefined);
|
|
840
|
+
/** Borda onde a gaveta encosta. Padrão: "right". */
|
|
841
|
+
get side(): ArkDrawerSide;
|
|
842
|
+
set side(value: ArkDrawerSide | null | undefined);
|
|
843
|
+
/** `overlay` (popover modal com scrim) ou `inline` (no fluxo, só anima). Padrão: "overlay". */
|
|
844
|
+
get mode(): ArkDrawerMode;
|
|
845
|
+
set mode(value: ArkDrawerMode | null | undefined);
|
|
846
|
+
/** Abre a gaveta: adiciona `open`, que faz o resto. */
|
|
847
|
+
show(): void;
|
|
848
|
+
/** Fecha publicando `ark-close` com o motivo (padrão "api"); a saída anima antes de esconder. */
|
|
849
|
+
close(reason?: ArkDrawerCloseReason): void;
|
|
850
|
+
private preset;
|
|
851
|
+
private openNow;
|
|
852
|
+
private closeNow;
|
|
853
|
+
private initialFocus;
|
|
854
|
+
private warnWithoutName;
|
|
855
|
+
private readonly handleKeydown;
|
|
856
|
+
private getLocale;
|
|
857
|
+
private sizeClass;
|
|
858
|
+
private computeClasses;
|
|
859
|
+
private syncHeader;
|
|
860
|
+
private syncFooter;
|
|
861
|
+
private applyOwnClasses;
|
|
862
|
+
private updateAppearance;
|
|
863
|
+
}
|
|
864
|
+
|
|
442
865
|
/**
|
|
443
866
|
* Estado vazio: caixa de borda tracejada com ícone apagado, título, descrição
|
|
444
867
|
* e ação opcional. O PRÓPRIO host é a caixa: os filhos do usuário
|
|
@@ -447,7 +870,7 @@ declare class ArkDialog extends HTMLElement {
|
|
|
447
870
|
* `description`, em nós do componente ao fim do host. Filhos sem slot entram
|
|
448
871
|
* entre a descrição e a ação. Não é interativo e não tem role próprio.
|
|
449
872
|
*/
|
|
450
|
-
declare class ArkEmpty extends
|
|
873
|
+
declare class ArkEmpty extends HTMLElementBase {
|
|
451
874
|
static readonly tagName = "ark-empty";
|
|
452
875
|
private ownClasses;
|
|
453
876
|
private syncingClass;
|
|
@@ -464,6 +887,57 @@ declare class ArkEmpty extends HTMLElement {
|
|
|
464
887
|
private updateAppearance;
|
|
465
888
|
}
|
|
466
889
|
|
|
890
|
+
/**
|
|
891
|
+
* Campo de arquivo: a grid do ark-input (label, campo, mensagem) em volta de
|
|
892
|
+
* uma zona de soltar com o botão de escolher, a dica de arrastar e a lista
|
|
893
|
+
* dos nomes escolhidos. Um <input type="file"> nativo oculto leva name,
|
|
894
|
+
* accept, multiple, required e disabled ao formulário; o botão abre o
|
|
895
|
+
* seletor nativo e soltar arquivos na zona alimenta o mesmo input. Toda
|
|
896
|
+
* mudança emite `change` com os arquivos e anuncia os nomes ao leitor de
|
|
897
|
+
* tela. O rótulo aponta para o input (associação nativa) e nomeia o botão
|
|
898
|
+
* junto do próprio texto dele.
|
|
899
|
+
*/
|
|
900
|
+
declare class ArkFileInput extends HTMLElementBase {
|
|
901
|
+
static readonly tagName = "ark-file-input";
|
|
902
|
+
private inputEl;
|
|
903
|
+
private labelEl;
|
|
904
|
+
private zoneEl;
|
|
905
|
+
private buttonEl;
|
|
906
|
+
private hintEl;
|
|
907
|
+
private listEl;
|
|
908
|
+
private messageEl;
|
|
909
|
+
/** Profundidade de dragenter/dragleave, porque eles disparam também nos filhos da zona. */
|
|
910
|
+
private dragDepth;
|
|
911
|
+
static get observedAttributes(): string[];
|
|
912
|
+
connectedCallback(): void;
|
|
913
|
+
attributeChangedCallback(): void;
|
|
914
|
+
/** O <input type="file"> nativo oculto, para composição e para `setInputFiles` em testes. */
|
|
915
|
+
get inputElement(): HTMLInputElement | null;
|
|
916
|
+
/** Arquivos escolhidos. */
|
|
917
|
+
get files(): File[];
|
|
918
|
+
get multiple(): boolean;
|
|
919
|
+
set multiple(value: boolean | string | null | undefined);
|
|
920
|
+
get disabled(): boolean;
|
|
921
|
+
set disabled(value: boolean | string | null | undefined);
|
|
922
|
+
/** Limpa a seleção sem emitir `change`. */
|
|
923
|
+
clear(): void;
|
|
924
|
+
focus(options?: FocusOptions): void;
|
|
925
|
+
private getLocale;
|
|
926
|
+
private isDisabled;
|
|
927
|
+
private readonly handleChange;
|
|
928
|
+
private readonly handleDragEnter;
|
|
929
|
+
private readonly handleDragOver;
|
|
930
|
+
private readonly handleDragLeave;
|
|
931
|
+
private readonly handleDrop;
|
|
932
|
+
private setDragover;
|
|
933
|
+
private getSizing;
|
|
934
|
+
private getPalette;
|
|
935
|
+
private render;
|
|
936
|
+
private static formatSize;
|
|
937
|
+
private syncList;
|
|
938
|
+
private updateAppearance;
|
|
939
|
+
}
|
|
940
|
+
|
|
467
941
|
/**
|
|
468
942
|
* Campo de texto padronizado da família Ark. Serve tanto de componente público
|
|
469
943
|
* quanto de base visual para orquestradores (ark-datepicker etc.), que colocam
|
|
@@ -477,7 +951,7 @@ declare class ArkEmpty extends HTMLElement {
|
|
|
477
951
|
* um botão de mostrar/ocultar na ponta direita. Atributos nativos como
|
|
478
952
|
* `maxlength` ou `inputmode` são espelhados no <input> sem interpretação.
|
|
479
953
|
*/
|
|
480
|
-
declare class ArkInput extends
|
|
954
|
+
declare class ArkInput extends HTMLElementBase {
|
|
481
955
|
static readonly tagName = "ark-input";
|
|
482
956
|
private inputEl;
|
|
483
957
|
private labelEl;
|
|
@@ -503,6 +977,138 @@ declare class ArkInput extends HTMLElement {
|
|
|
503
977
|
private updateAppearance;
|
|
504
978
|
}
|
|
505
979
|
|
|
980
|
+
/**
|
|
981
|
+
* Tecla de atalho: o PRÓPRIO host é a tecla (mono, borda, fundo
|
|
982
|
+
* surface-muted, aresta inferior), com o texto da tecla como filho do
|
|
983
|
+
* usuário. Não é interativo e não tem role próprio; para leitores de tela é
|
|
984
|
+
* texto comum, como um <kbd>.
|
|
985
|
+
*/
|
|
986
|
+
declare class ArkKbd extends HTMLElementBase {
|
|
987
|
+
static readonly tagName = "ark-kbd";
|
|
988
|
+
private ownClasses;
|
|
989
|
+
private syncingClass;
|
|
990
|
+
static get observedAttributes(): string[];
|
|
991
|
+
connectedCallback(): void;
|
|
992
|
+
attributeChangedCallback(name: string): void;
|
|
993
|
+
private getSizeClass;
|
|
994
|
+
private applyOwnClasses;
|
|
995
|
+
private updateAppearance;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Editor de pares chave/valor: linhas `{ id, key, value, enabled }` com
|
|
1000
|
+
* ativar, editar, remover e adicionar, e um modo de edição em massa. Colunas
|
|
1001
|
+
* opcionais: `types` acrescenta um seletor do tipo do valor por linha (que
|
|
1002
|
+
* define o `type` do campo de valor: number, date, time...), `secret` um
|
|
1003
|
+
* cadeado por linha (fechado, o valor vira campo de senha com o olho para
|
|
1004
|
+
* revelar) e `description` um campo de descrição. Compõe ark-checkbox, ark-input, ark-select,
|
|
1005
|
+
* ark-textarea e ark-button, porque renderiza tudo a partir de `rows` (não há
|
|
1006
|
+
* filhos do usuário). O modo em massa é uma textarea em `bulk-format`
|
|
1007
|
+
* "lines" (`chave:valor` por linha, `#` desativa; tipo e descrição
|
|
1008
|
+
* preservados por posição) ou "json" (array com todos os campos). `change`
|
|
1009
|
+
* publica as linhas a cada edição, inclusive ao sair do modo em massa;
|
|
1010
|
+
* adicionar e remover anunciam a contagem ao leitor de tela. A célula de
|
|
1011
|
+
* valor é um ark-input comum: autocomplete de variáveis fica no app.
|
|
1012
|
+
*/
|
|
1013
|
+
declare class ArkKvEditor extends HTMLElementBase {
|
|
1014
|
+
static readonly tagName = "ark-kv-editor";
|
|
1015
|
+
private model;
|
|
1016
|
+
private toolbarEl;
|
|
1017
|
+
private countEl;
|
|
1018
|
+
private bulkToggleEl;
|
|
1019
|
+
private listEl;
|
|
1020
|
+
private emptyEl;
|
|
1021
|
+
private bulkEl;
|
|
1022
|
+
private footerEl;
|
|
1023
|
+
private addEl;
|
|
1024
|
+
private rowEls;
|
|
1025
|
+
private ownClasses;
|
|
1026
|
+
private syncingClass;
|
|
1027
|
+
/** Foco pedido para a próxima renderização (chave da linha nova, ou a linha vizinha após remover). */
|
|
1028
|
+
private focusRowId;
|
|
1029
|
+
/** Linhas de quando o modo em massa abriu: ids (e tipo/descrição no formato lines) reaproveitados por posição. */
|
|
1030
|
+
private bulkBase;
|
|
1031
|
+
/** Último texto em massa que o próprio componente escreveu, para não sobrescrever o que o usuário digita. */
|
|
1032
|
+
private bulkWritten;
|
|
1033
|
+
static get observedAttributes(): string[];
|
|
1034
|
+
constructor();
|
|
1035
|
+
connectedCallback(): void;
|
|
1036
|
+
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
1037
|
+
/** As linhas atuais (cópia); atribuir substitui tudo e renderiza de novo. */
|
|
1038
|
+
get rows(): ArkKvRow[];
|
|
1039
|
+
set rows(value: ArkKvRow[] | string | null | undefined);
|
|
1040
|
+
/** Modo de edição em massa (textarea). */
|
|
1041
|
+
get bulk(): boolean;
|
|
1042
|
+
set bulk(value: boolean | string | null | undefined);
|
|
1043
|
+
/** Formato do modo em massa. Padrão: "lines". */
|
|
1044
|
+
get bulkFormat(): ArkKvBulkFormat;
|
|
1045
|
+
set bulkFormat(value: ArkKvBulkFormat);
|
|
1046
|
+
/** Tipos oferecidos na coluna de tipo (atributo `types`, separado por vírgula); vazio esconde a coluna. */
|
|
1047
|
+
get types(): string[];
|
|
1048
|
+
set types(value: string[] | string | null | undefined);
|
|
1049
|
+
/** Coluna de descrição visível (atributo `description`). */
|
|
1050
|
+
get description(): boolean;
|
|
1051
|
+
set description(value: boolean | string | null | undefined);
|
|
1052
|
+
/** Cadeado de segredo por linha visível (atributo `secret`). */
|
|
1053
|
+
get secret(): boolean;
|
|
1054
|
+
set secret(value: boolean | string | null | undefined);
|
|
1055
|
+
get readonly(): boolean;
|
|
1056
|
+
set readonly(value: boolean | string | null | undefined);
|
|
1057
|
+
/** Acrescenta uma linha vazia (ou com os campos dados), foca a chave, emite `ark-add` e `change`, anuncia. */
|
|
1058
|
+
add(row?: Partial<ArkKvRow>): ArkKvRow;
|
|
1059
|
+
/** Remove a linha pelo id, emite `ark-delete` e `change`, anuncia; o foco vai para a linha seguinte. */
|
|
1060
|
+
delete(id: string): void;
|
|
1061
|
+
/** Texto do modo em massa no formato atual: `chave:valor` por linha (`#` nas desativadas) ou JSON. */
|
|
1062
|
+
get bulkText(): string;
|
|
1063
|
+
private getLocale;
|
|
1064
|
+
private getSize;
|
|
1065
|
+
private resetRows;
|
|
1066
|
+
private emitChange;
|
|
1067
|
+
private announceCount;
|
|
1068
|
+
private parseBulk;
|
|
1069
|
+
private readonly handleBulkInput;
|
|
1070
|
+
private toggleBulk;
|
|
1071
|
+
private render;
|
|
1072
|
+
private createField;
|
|
1073
|
+
private createRowEl;
|
|
1074
|
+
private rowParts;
|
|
1075
|
+
private gridClass;
|
|
1076
|
+
private syncRows;
|
|
1077
|
+
private updateCount;
|
|
1078
|
+
private applyOwnClasses;
|
|
1079
|
+
private updateAppearance;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/** Um path por forma, no viewBox 0 0 24 24; o ark-shape-picker desenha as mesmas. */
|
|
1083
|
+
declare const ARK_MARK_PATHS: Record<ArkMarkShape, string>;
|
|
1084
|
+
/** As seis formas, na ordem em que o ark-shape-picker as oferece. */
|
|
1085
|
+
declare const ARK_MARK_SHAPES: ArkMarkShape[];
|
|
1086
|
+
/** Normaliza o valor de `shape`; inválido cai em "circle". */
|
|
1087
|
+
declare function normalizeMarkShape(value: string | null | undefined): ArkMarkShape;
|
|
1088
|
+
/**
|
|
1089
|
+
* Marca de escopo: cor E forma, porque cor sozinha não distingue. O PRÓPRIO
|
|
1090
|
+
* host é a marca, com um SVG próprio (um path por forma) desenhado em `color`
|
|
1091
|
+
* (padrão currentColor) no lado `size`. Com `label` vira `role="img"`
|
|
1092
|
+
* nomeado; sem ele é decorativo (`aria-hidden`): o texto ao lado é o que
|
|
1093
|
+
* conta.
|
|
1094
|
+
*/
|
|
1095
|
+
declare class ArkMark extends HTMLElementBase {
|
|
1096
|
+
static readonly tagName = "ark-mark";
|
|
1097
|
+
private ownClasses;
|
|
1098
|
+
private syncingClass;
|
|
1099
|
+
private svgEl;
|
|
1100
|
+
private pathEl;
|
|
1101
|
+
static get observedAttributes(): string[];
|
|
1102
|
+
connectedCallback(): void;
|
|
1103
|
+
attributeChangedCallback(name: string): void;
|
|
1104
|
+
/** Forma desenhada. Padrão: "circle". */
|
|
1105
|
+
get shape(): ArkMarkShape;
|
|
1106
|
+
set shape(value: ArkMarkShape);
|
|
1107
|
+
private render;
|
|
1108
|
+
private applyOwnClasses;
|
|
1109
|
+
private updateAppearance;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
506
1112
|
/**
|
|
507
1113
|
* Menu suspenso ou de contexto. O PRÓPRIO host é o painel (`role="menu"`),
|
|
508
1114
|
* aberto como `popover="auto"` (top layer, light dismiss e Esc nativos, sem
|
|
@@ -516,7 +1122,7 @@ declare class ArkInput extends HTMLElement {
|
|
|
516
1122
|
* a saída são transições CSS em components.css, porque o light dismiss de um
|
|
517
1123
|
* popover auto não pode ser interceptado por JS para animar antes de esconder.
|
|
518
1124
|
*/
|
|
519
|
-
declare class ArkMenu extends
|
|
1125
|
+
declare class ArkMenu extends HTMLElementBase {
|
|
520
1126
|
static readonly tagName = "ark-menu";
|
|
521
1127
|
private ownClasses;
|
|
522
1128
|
private syncingClass;
|
|
@@ -584,7 +1190,7 @@ declare class ArkMenu extends HTMLElement {
|
|
|
584
1190
|
* item. Seleção, foco e teclado são coordenados pelo ark-menu; `size` e
|
|
585
1191
|
* `theme` chegam propagados dele.
|
|
586
1192
|
*/
|
|
587
|
-
declare class ArkMenuItem extends
|
|
1193
|
+
declare class ArkMenuItem extends HTMLElementBase {
|
|
588
1194
|
static readonly tagName = "ark-menu-item";
|
|
589
1195
|
private ownClasses;
|
|
590
1196
|
private syncingClass;
|
|
@@ -594,6 +1200,7 @@ declare class ArkMenuItem extends HTMLElement {
|
|
|
594
1200
|
connectedCallback(): void;
|
|
595
1201
|
attributeChangedCallback(name: string): void;
|
|
596
1202
|
get value(): string;
|
|
1203
|
+
set value(value: string | null | undefined);
|
|
597
1204
|
get disabled(): boolean;
|
|
598
1205
|
set disabled(value: boolean | string | null | undefined);
|
|
599
1206
|
/** Marcado; só faz sentido num item checkbox (atributo `checked` presente, `"false"` é desmarcado). */
|
|
@@ -613,6 +1220,106 @@ declare class ArkMenuItem extends HTMLElement {
|
|
|
613
1220
|
private updateAppearance;
|
|
614
1221
|
}
|
|
615
1222
|
|
|
1223
|
+
/**
|
|
1224
|
+
* Barra de progresso: o PRÓPRIO host é o `role="progressbar"` (aria-valuenow,
|
|
1225
|
+
* min e max, nome por `label`), uma linha com o trilho, que cresce, e o
|
|
1226
|
+
* texto do valor (`show-value`). `value` de 0 a `max` (padrão 100) move a
|
|
1227
|
+
* largura da barra com os tokens default/out; `indeterminate` tira o
|
|
1228
|
+
* aria-valuenow e troca a barra por um segmento que percorre o trilho em
|
|
1229
|
+
* loop, com duração fixa e isento de movimento reduzido, como o spinner: é o
|
|
1230
|
+
* único sinal de progresso.
|
|
1231
|
+
*/
|
|
1232
|
+
declare class ArkProgress extends HTMLElementBase {
|
|
1233
|
+
static readonly tagName = "ark-progress";
|
|
1234
|
+
private ownClasses;
|
|
1235
|
+
private syncingClass;
|
|
1236
|
+
private trackEl;
|
|
1237
|
+
private barEl;
|
|
1238
|
+
private valueEl;
|
|
1239
|
+
static get observedAttributes(): string[];
|
|
1240
|
+
connectedCallback(): void;
|
|
1241
|
+
attributeChangedCallback(name: string): void;
|
|
1242
|
+
/** Valor atual, limitado a 0..max. Padrão: 0. */
|
|
1243
|
+
get value(): number;
|
|
1244
|
+
set value(value: number);
|
|
1245
|
+
/** Valor máximo. Padrão: 100. */
|
|
1246
|
+
get max(): number;
|
|
1247
|
+
set max(value: number);
|
|
1248
|
+
get indeterminate(): boolean;
|
|
1249
|
+
set indeterminate(value: boolean | string | null | undefined);
|
|
1250
|
+
get showValue(): boolean;
|
|
1251
|
+
set showValue(value: boolean | string | null | undefined);
|
|
1252
|
+
private getSizing;
|
|
1253
|
+
private getBarColor;
|
|
1254
|
+
private render;
|
|
1255
|
+
private applyOwnClasses;
|
|
1256
|
+
private updateAppearance;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* Botão de opção: o desenho é do componente (um <button role="radio"> com o
|
|
1261
|
+
* ponto) e um <input type="radio"> oculto carrega name/value para o
|
|
1262
|
+
* formulário, que agrupa nativamente por `name`; os dois são controles
|
|
1263
|
+
* nativos, então <fieldset disabled> os desabilita sem JS. O grupo, para
|
|
1264
|
+
* exclusividade, setas e roving tabindex, são os ark-radio de mesmo `name` no
|
|
1265
|
+
* mesmo <form> (ou na mesma raiz, sem form): marcar um desmarca os outros em
|
|
1266
|
+
* silêncio e `change` dispara só no que ganhou a marca; as setas movem o foco
|
|
1267
|
+
* e marcam, Espaço marca o focado, e um único deles fica na ordem de Tab (o
|
|
1268
|
+
* marcado, ou o primeiro habilitado). `label`, aria-label e filhos nomeiam a
|
|
1269
|
+
* opção como no ark-checkbox.
|
|
1270
|
+
*/
|
|
1271
|
+
declare class ArkRadio extends HTMLElementBase {
|
|
1272
|
+
static readonly tagName = "ark-radio";
|
|
1273
|
+
private ownClasses;
|
|
1274
|
+
private syncingClass;
|
|
1275
|
+
private boxEl;
|
|
1276
|
+
private dotEl;
|
|
1277
|
+
private labelEl;
|
|
1278
|
+
private inputEl;
|
|
1279
|
+
private observer;
|
|
1280
|
+
/** Raiz do grupo no último connect, para ressincronizar os que ficam quando este sai. */
|
|
1281
|
+
private groupRoot;
|
|
1282
|
+
/** Se o ponto já apareceu; a marcação depois do primeiro render entra com scale-in. */
|
|
1283
|
+
private dotShown;
|
|
1284
|
+
static get observedAttributes(): string[];
|
|
1285
|
+
constructor();
|
|
1286
|
+
connectedCallback(): void;
|
|
1287
|
+
disconnectedCallback(): void;
|
|
1288
|
+
attributeChangedCallback(name: string): void;
|
|
1289
|
+
get checked(): boolean;
|
|
1290
|
+
set checked(value: boolean | string | null | undefined);
|
|
1291
|
+
get disabled(): boolean;
|
|
1292
|
+
set disabled(value: boolean | string | null | undefined);
|
|
1293
|
+
get name(): string;
|
|
1294
|
+
set name(value: string);
|
|
1295
|
+
/** Valor submetido e publicado em `change` quando esta opção está marcada. Padrão: "on". */
|
|
1296
|
+
get value(): string;
|
|
1297
|
+
set value(value: string);
|
|
1298
|
+
/** Marca esta opção como um clique: desmarca as outras do grupo e emite `change` com o value. */
|
|
1299
|
+
select(): void;
|
|
1300
|
+
focus(options?: FocusOptions): void;
|
|
1301
|
+
private isDisabled;
|
|
1302
|
+
private resolveGroupRoot;
|
|
1303
|
+
private static membersIn;
|
|
1304
|
+
/** Os ark-radio do mesmo grupo (mesmo `name` no mesmo form, ou na mesma raiz sem form), este incluído. */
|
|
1305
|
+
private members;
|
|
1306
|
+
private uncheckSiblings;
|
|
1307
|
+
private static syncGroup;
|
|
1308
|
+
private syncTabStops;
|
|
1309
|
+
private move;
|
|
1310
|
+
private readonly handleHostClick;
|
|
1311
|
+
private readonly handleKeydown;
|
|
1312
|
+
private getIntent;
|
|
1313
|
+
private getPalette;
|
|
1314
|
+
private getSizing;
|
|
1315
|
+
private render;
|
|
1316
|
+
private syncLabel;
|
|
1317
|
+
private syncName;
|
|
1318
|
+
private syncDot;
|
|
1319
|
+
private applyOwnClasses;
|
|
1320
|
+
private updateAppearance;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
616
1323
|
/**
|
|
617
1324
|
* Agenda/scheduler: exibe eventos em quatro views — `week` e `day` com timeline
|
|
618
1325
|
* por horário (eventos posicionados e sobreposições resolvidas em colunas),
|
|
@@ -622,7 +1329,7 @@ declare class ArkMenuItem extends HTMLElement {
|
|
|
622
1329
|
* eventos são o conteúdo: clicar num evento emite `ark-event-click` e clicar num
|
|
623
1330
|
* espaço livre emite `ark-slot-click` (útil para criar um evento).
|
|
624
1331
|
*/
|
|
625
|
-
declare class ArkScheduler extends
|
|
1332
|
+
declare class ArkScheduler extends HTMLElementBase {
|
|
626
1333
|
static readonly tagName = "ark-scheduler";
|
|
627
1334
|
private root;
|
|
628
1335
|
private locale;
|
|
@@ -630,6 +1337,8 @@ declare class ArkScheduler extends HTMLElement {
|
|
|
630
1337
|
private refDate;
|
|
631
1338
|
private nowTimer;
|
|
632
1339
|
private navDirection;
|
|
1340
|
+
/** Último período anunciado (título do cabeçalho); o primeiro build só registra, sem anunciar. */
|
|
1341
|
+
private announcedPeriod;
|
|
633
1342
|
private syncingAttr;
|
|
634
1343
|
/** Linhas de "agora" vivas na tela: reposicionadas sem rebuild a cada minuto. */
|
|
635
1344
|
private nowLines;
|
|
@@ -642,12 +1351,13 @@ declare class ArkScheduler extends HTMLElement {
|
|
|
642
1351
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
643
1352
|
/** Lista de eventos (propriedade JS; tem precedência sobre o atributo `events`). */
|
|
644
1353
|
get events(): ArkSchedulerEvent[];
|
|
645
|
-
set events(list: ArkSchedulerEvent[]);
|
|
1354
|
+
set events(list: ArkSchedulerEvent[] | string | null);
|
|
646
1355
|
/** View atual. */
|
|
647
1356
|
get view(): ArkSchedulerView;
|
|
648
1357
|
set view(next: ArkSchedulerView);
|
|
649
1358
|
/** Data de referência da view atual (ISO YYYY-MM-DD). */
|
|
650
1359
|
get date(): string;
|
|
1360
|
+
set date(value: string | null | undefined);
|
|
651
1361
|
private parseEventsAttr;
|
|
652
1362
|
private getLocale;
|
|
653
1363
|
private getIntent;
|
|
@@ -681,6 +1391,7 @@ declare class ArkScheduler extends HTMLElement {
|
|
|
681
1391
|
private buildAgenda;
|
|
682
1392
|
/** Move só a linha de "agora"; rebuildar a cada minuto custaria o scroll e o foco. */
|
|
683
1393
|
private updateNowIndicator;
|
|
1394
|
+
private announcePeriod;
|
|
684
1395
|
private build;
|
|
685
1396
|
}
|
|
686
1397
|
|
|
@@ -692,7 +1403,7 @@ declare class ArkScheduler extends HTMLElement {
|
|
|
692
1403
|
* propriedade JS), nunca de filhos: o <select> exige os <option> dentro dele
|
|
693
1404
|
* e a lib não move filhos do usuário.
|
|
694
1405
|
*/
|
|
695
|
-
declare class ArkSelect extends
|
|
1406
|
+
declare class ArkSelect extends HTMLElementBase {
|
|
696
1407
|
static readonly tagName = "ark-select";
|
|
697
1408
|
private selectEl;
|
|
698
1409
|
private labelEl;
|
|
@@ -721,6 +1432,37 @@ declare class ArkSelect extends HTMLElement {
|
|
|
721
1432
|
private updateAppearance;
|
|
722
1433
|
}
|
|
723
1434
|
|
|
1435
|
+
/**
|
|
1436
|
+
* Seletor de forma da marca de escopo: o PRÓPRIO host é o `role="radiogroup"`
|
|
1437
|
+
* com seis opções `role="radio"` renderizadas pelo componente, cada uma um
|
|
1438
|
+
* ark-mark desenhado em `color` (a cor atual, para o usuário ver o par real)
|
|
1439
|
+
* e nomeada pelo nome localizado da forma. Mesmo teclado do
|
|
1440
|
+
* ark-color-swatches. `change` só quando a seleção muda pelo usuário.
|
|
1441
|
+
*/
|
|
1442
|
+
declare class ArkShapePicker extends HTMLElementBase {
|
|
1443
|
+
static readonly tagName = "ark-shape-picker";
|
|
1444
|
+
private ownClasses;
|
|
1445
|
+
private syncingClass;
|
|
1446
|
+
private options;
|
|
1447
|
+
static get observedAttributes(): string[];
|
|
1448
|
+
constructor();
|
|
1449
|
+
connectedCallback(): void;
|
|
1450
|
+
attributeChangedCallback(name: string): void;
|
|
1451
|
+
/** Forma selecionada; sem atributo ou com valor inválido, nenhuma. */
|
|
1452
|
+
get value(): ArkMarkShape | "";
|
|
1453
|
+
set value(value: ArkMarkShape | "");
|
|
1454
|
+
get disabled(): boolean;
|
|
1455
|
+
set disabled(value: boolean | string | null | undefined);
|
|
1456
|
+
/** Seleciona uma forma como o usuário faria: muda `value`, foca a opção e emite `change`. */
|
|
1457
|
+
select(value: ArkMarkShape): void;
|
|
1458
|
+
private readonly handleKeydown;
|
|
1459
|
+
private getLocale;
|
|
1460
|
+
private getSizing;
|
|
1461
|
+
private render;
|
|
1462
|
+
private applyOwnClasses;
|
|
1463
|
+
private updateAppearance;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
724
1466
|
/**
|
|
725
1467
|
* Placeholder de carregamento. O PRÓPRIO host é o bloco (`.ark-skeleton` de
|
|
726
1468
|
* core: fundo muted suave e raio), `aria-hidden` porque não há nada para ler.
|
|
@@ -733,7 +1475,7 @@ declare class ArkSelect extends HTMLElement {
|
|
|
733
1475
|
* substitui o skeleton
|
|
734
1476
|
* entra com `.ark-animate-fade-in`, sem elemento próprio para isso.
|
|
735
1477
|
*/
|
|
736
|
-
declare class ArkSkeleton extends
|
|
1478
|
+
declare class ArkSkeleton extends HTMLElementBase {
|
|
737
1479
|
static readonly tagName = "ark-skeleton";
|
|
738
1480
|
private ownClasses;
|
|
739
1481
|
private syncingClass;
|
|
@@ -759,13 +1501,104 @@ declare class ArkSkeleton extends HTMLElement {
|
|
|
759
1501
|
private updateAppearance;
|
|
760
1502
|
}
|
|
761
1503
|
|
|
1504
|
+
/**
|
|
1505
|
+
* Indicador de carregamento solto: o PRÓPRIO host é o `role="status"`, com o
|
|
1506
|
+
* mesmo SVG do ark-button girando pelo preset `.ark-animate-spin` (o único
|
|
1507
|
+
* spinner da lib) e um rótulo só para leitores de tela (`label`, padrão a
|
|
1508
|
+
* string `loading` do idioma). Gira sempre, inclusive sob movimento reduzido:
|
|
1509
|
+
* é o único sinal de progresso. Sem `intent` herda a cor do texto ao redor.
|
|
1510
|
+
*/
|
|
1511
|
+
declare class ArkSpinner extends HTMLElementBase {
|
|
1512
|
+
static readonly tagName = "ark-spinner";
|
|
1513
|
+
private ownClasses;
|
|
1514
|
+
private syncingClass;
|
|
1515
|
+
private iconEl;
|
|
1516
|
+
private labelEl;
|
|
1517
|
+
static get observedAttributes(): string[];
|
|
1518
|
+
connectedCallback(): void;
|
|
1519
|
+
attributeChangedCallback(name: string): void;
|
|
1520
|
+
private getLocale;
|
|
1521
|
+
private getSizeClass;
|
|
1522
|
+
private getColorClass;
|
|
1523
|
+
private render;
|
|
1524
|
+
private applyOwnClasses;
|
|
1525
|
+
private updateAppearance;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* Painéis redimensionáveis. Os filhos do usuário são os painéis e ficam onde
|
|
1530
|
+
* estão; as alças são nós próprios acrescentados ao FIM do host (marcados
|
|
1531
|
+
* `data-ark-chrome`), nunca intercalados. O host é uma grid cujas faixas vêm
|
|
1532
|
+
* de `sizes` (painel, alça, painel...): cada alça recebe a coluna/linha
|
|
1533
|
+
* explícita e os painéis se auto-posicionam nas faixas restantes na ordem do
|
|
1534
|
+
* DOM, sem que o componente os toque (`data-min`/`data-max` só são lidos).
|
|
1535
|
+
* Alças são `role="separator"` focáveis: setas redimensionam por teclado e o
|
|
1536
|
+
* arrasto usa pointer capture. `sizes` é a fonte da verdade (o atributo é
|
|
1537
|
+
* reescrito a cada mudança) e `ark-resize` publica os tamanhos; persistir é
|
|
1538
|
+
* do app. Nada anima: redimensionar é interação de alta frequência.
|
|
1539
|
+
*/
|
|
1540
|
+
declare class ArkSplitPane extends HTMLElementBase {
|
|
1541
|
+
static readonly tagName = "ark-split-pane";
|
|
1542
|
+
private handles;
|
|
1543
|
+
private observer;
|
|
1544
|
+
private ownClasses;
|
|
1545
|
+
private syncingClass;
|
|
1546
|
+
private drag;
|
|
1547
|
+
static get observedAttributes(): string[];
|
|
1548
|
+
connectedCallback(): void;
|
|
1549
|
+
disconnectedCallback(): void;
|
|
1550
|
+
attributeChangedCallback(name: string): void;
|
|
1551
|
+
/** Eixo dos painéis. Padrão: "horizontal" (lado a lado). */
|
|
1552
|
+
get direction(): ArkSplitPaneDirection;
|
|
1553
|
+
set direction(value: ArkSplitPaneDirection);
|
|
1554
|
+
/** Tamanhos dos painéis em percentuais que somam 100, na ordem do DOM (faltantes são distribuídos). */
|
|
1555
|
+
get sizes(): number[];
|
|
1556
|
+
set sizes(value: number[] | string);
|
|
1557
|
+
/** Os filhos do usuário: tudo que não é chrome do componente. */
|
|
1558
|
+
private panels;
|
|
1559
|
+
private normalizedSizes;
|
|
1560
|
+
/** Espaço em px ocupado pelos painéis no eixo (o host menos as alças). */
|
|
1561
|
+
private panelSpace;
|
|
1562
|
+
private constraint;
|
|
1563
|
+
/** Move a alça `index` para que o painel anterior fique com `wanted`%, respeitando min/max do par. */
|
|
1564
|
+
private resizePair;
|
|
1565
|
+
private commit;
|
|
1566
|
+
private readonly handlePointerDown;
|
|
1567
|
+
private readonly handlePointerMove;
|
|
1568
|
+
private readonly handlePointerUp;
|
|
1569
|
+
private readonly handleKeydown;
|
|
1570
|
+
private getLocale;
|
|
1571
|
+
private syncHandles;
|
|
1572
|
+
private applyOwnClasses;
|
|
1573
|
+
private updateAppearance;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* Ponto de status: o PRÓPRIO host é o círculo na cor do intent (padrão
|
|
1578
|
+
* neutral). Com `label` vira `role="img"` nomeado; sem ele é decorativo
|
|
1579
|
+
* (`aria-hidden`), para o texto ao lado ser o que conta. Estático por
|
|
1580
|
+
* design: nunca pulsa.
|
|
1581
|
+
*/
|
|
1582
|
+
declare class ArkStatusDot extends HTMLElementBase {
|
|
1583
|
+
static readonly tagName = "ark-status-dot";
|
|
1584
|
+
private ownClasses;
|
|
1585
|
+
private syncingClass;
|
|
1586
|
+
static get observedAttributes(): string[];
|
|
1587
|
+
connectedCallback(): void;
|
|
1588
|
+
attributeChangedCallback(name: string): void;
|
|
1589
|
+
private getSizeClass;
|
|
1590
|
+
private getColorClass;
|
|
1591
|
+
private applyOwnClasses;
|
|
1592
|
+
private updateAppearance;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
762
1595
|
/**
|
|
763
1596
|
* Interruptor liga/desliga com trilho e polegar. O trilho é um <button>
|
|
764
1597
|
* `role="switch"`; um checkbox oculto espelha o estado para o formulário,
|
|
765
1598
|
* submetendo `name`/`value` apenas quando marcado. Tem tabela de proporções
|
|
766
1599
|
* própria, em vez da escala de altura dos demais controles.
|
|
767
1600
|
*/
|
|
768
|
-
declare class ArkSwitch extends
|
|
1601
|
+
declare class ArkSwitch extends HTMLElementBase {
|
|
769
1602
|
static readonly tagName = "ark-switch";
|
|
770
1603
|
private trackEl;
|
|
771
1604
|
private thumbEl;
|
|
@@ -793,7 +1626,7 @@ declare class ArkSwitch extends HTMLElement {
|
|
|
793
1626
|
* Seleção e roving tabindex são coordenados pelo ark-tabs; `variant`,
|
|
794
1627
|
* `size`, `intent`, `theme` e idioma chegam propagados dele.
|
|
795
1628
|
*/
|
|
796
|
-
declare class ArkTab extends
|
|
1629
|
+
declare class ArkTab extends HTMLElementBase {
|
|
797
1630
|
static readonly tagName = "ark-tab";
|
|
798
1631
|
private ownClasses;
|
|
799
1632
|
private syncingClass;
|
|
@@ -804,6 +1637,7 @@ declare class ArkTab extends HTMLElement {
|
|
|
804
1637
|
connectedCallback(): void;
|
|
805
1638
|
attributeChangedCallback(name: string): void;
|
|
806
1639
|
get value(): string;
|
|
1640
|
+
set value(value: string | null | undefined);
|
|
807
1641
|
/** Aba ativa; o ark-tabs reflete aqui o seu `value`. */
|
|
808
1642
|
get selected(): boolean;
|
|
809
1643
|
set selected(value: boolean | string | null | undefined);
|
|
@@ -813,6 +1647,7 @@ declare class ArkTab extends HTMLElement {
|
|
|
813
1647
|
set dirty(value: boolean | string | null | undefined);
|
|
814
1648
|
/** Fechável só na variante `editor`; nas outras o atributo é ignorado. */
|
|
815
1649
|
get closable(): boolean;
|
|
1650
|
+
set closable(value: boolean | string | null | undefined);
|
|
816
1651
|
/** Pede a seleção desta aba: emite `change` com o valor, que o ark-tabs consolida. */
|
|
817
1652
|
select(): void;
|
|
818
1653
|
/** Pede o fechamento: emite `ark-close`; remover a aba do DOM é do app. */
|
|
@@ -842,7 +1677,7 @@ declare class ArkTab extends HTMLElement {
|
|
|
842
1677
|
* inserido de uma vez o grupo pode rodar antes de as abas serem upgraded, e
|
|
843
1678
|
* uma propriedade escrita antes do upgrade esconderia o accessor da classe.
|
|
844
1679
|
*/
|
|
845
|
-
declare class ArkTabs extends
|
|
1680
|
+
declare class ArkTabs extends HTMLElementBase {
|
|
846
1681
|
static readonly tagName = "ark-tabs";
|
|
847
1682
|
private observer;
|
|
848
1683
|
private syncingValue;
|
|
@@ -881,7 +1716,7 @@ declare class ArkTabs extends HTMLElement {
|
|
|
881
1716
|
* (`field-sizing: content` nativo, com fallback por JS), `monospace` e
|
|
882
1717
|
* `resize` atendem edição de código e de dados.
|
|
883
1718
|
*/
|
|
884
|
-
declare class ArkTextarea extends
|
|
1719
|
+
declare class ArkTextarea extends HTMLElementBase {
|
|
885
1720
|
static readonly tagName = "ark-textarea";
|
|
886
1721
|
private textareaEl;
|
|
887
1722
|
private labelEl;
|
|
@@ -911,7 +1746,7 @@ declare class ArkTextarea extends HTMLElement {
|
|
|
911
1746
|
* dialogs e menus, e é reaberta a cada toast novo para voltar ao topo da
|
|
912
1747
|
* pilha do top layer quando um overlay abriu depois dela.
|
|
913
1748
|
*/
|
|
914
|
-
declare class ArkToaster extends
|
|
1749
|
+
declare class ArkToaster extends HTMLElementBase {
|
|
915
1750
|
static readonly tagName = "ark-toaster";
|
|
916
1751
|
private root;
|
|
917
1752
|
private toasts;
|
|
@@ -924,6 +1759,7 @@ declare class ArkToaster extends HTMLElement {
|
|
|
924
1759
|
attributeChangedCallback(): void;
|
|
925
1760
|
toast(options: ArkToastOptions): string;
|
|
926
1761
|
dismiss(id?: string): void;
|
|
1762
|
+
private cardOf;
|
|
927
1763
|
private readonly handleToast;
|
|
928
1764
|
private readonly handleDismiss;
|
|
929
1765
|
private getPosition;
|
|
@@ -944,6 +1780,7 @@ declare class ArkToaster extends HTMLElement {
|
|
|
944
1780
|
private getToastIcon;
|
|
945
1781
|
private build;
|
|
946
1782
|
private render;
|
|
1783
|
+
private buildCard;
|
|
947
1784
|
}
|
|
948
1785
|
|
|
949
1786
|
/**
|
|
@@ -951,7 +1788,7 @@ declare class ArkToaster extends HTMLElement {
|
|
|
951
1788
|
* (classes, role, foco, teclado): os filhos do usuário ficam onde estão.
|
|
952
1789
|
* Dentro de um ark-toggle-group vira item de segmented control.
|
|
953
1790
|
*/
|
|
954
|
-
declare class ArkToggle extends
|
|
1791
|
+
declare class ArkToggle extends HTMLElementBase {
|
|
955
1792
|
static readonly tagName = "ark-toggle";
|
|
956
1793
|
private ownClasses;
|
|
957
1794
|
private syncingClass;
|
|
@@ -964,6 +1801,7 @@ declare class ArkToggle extends HTMLElement {
|
|
|
964
1801
|
get disabled(): boolean;
|
|
965
1802
|
set disabled(value: boolean | string | null | undefined);
|
|
966
1803
|
get value(): string;
|
|
1804
|
+
set value(value: string | null | undefined);
|
|
967
1805
|
toggle(): void;
|
|
968
1806
|
private readonly handleClick;
|
|
969
1807
|
private readonly handleKeydown;
|
|
@@ -981,7 +1819,7 @@ declare class ArkToggle extends HTMLElement {
|
|
|
981
1819
|
* (`role="group"` + classes): os itens do usuário ficam onde estão, então
|
|
982
1820
|
* frameworks podem adicionar/remover toggles livremente.
|
|
983
1821
|
*/
|
|
984
|
-
declare class ArkToggleGroup extends
|
|
1822
|
+
declare class ArkToggleGroup extends HTMLElementBase {
|
|
985
1823
|
static readonly tagName = "ark-toggle-group";
|
|
986
1824
|
private observer;
|
|
987
1825
|
private syncingValue;
|
|
@@ -1014,11 +1852,12 @@ declare class ArkToggleGroup extends HTMLElement {
|
|
|
1014
1852
|
* components.css). O gatilho recebe `aria-describedby` do balão e precisa ser
|
|
1015
1853
|
* focável por conta própria.
|
|
1016
1854
|
*
|
|
1017
|
-
* Abre em hover (depois de `delay`) e em foco (na hora); fecha ao sair
|
|
1018
|
-
*
|
|
1855
|
+
* Abre em hover (depois de `delay`) e em foco (na hora); fecha ao sair (com
|
|
1856
|
+
* uma tolerância para o ponteiro chegar ao balão, que mantém a dica aberta),
|
|
1857
|
+
* ao perder o foco, com Esc e no pointerdown. Posicionado por `positionAnchored`
|
|
1019
1858
|
* de core, com flip quando não cabe. Entrada `fade` quick, sem saída animada.
|
|
1020
1859
|
*/
|
|
1021
|
-
declare class ArkTooltip extends
|
|
1860
|
+
declare class ArkTooltip extends HTMLElementBase {
|
|
1022
1861
|
static readonly tagName = "ark-tooltip";
|
|
1023
1862
|
private ownClasses;
|
|
1024
1863
|
private syncingClass;
|
|
@@ -1029,6 +1868,7 @@ declare class ArkTooltip extends HTMLElement {
|
|
|
1029
1868
|
private bubble;
|
|
1030
1869
|
private trigger;
|
|
1031
1870
|
private openTimer;
|
|
1871
|
+
private hideTimer;
|
|
1032
1872
|
private disposePosition;
|
|
1033
1873
|
private isOpen;
|
|
1034
1874
|
private syncingOpen;
|
|
@@ -1051,6 +1891,8 @@ declare class ArkTooltip extends HTMLElement {
|
|
|
1051
1891
|
private getDelay;
|
|
1052
1892
|
private getSide;
|
|
1053
1893
|
private clearTimer;
|
|
1894
|
+
private cancelHide;
|
|
1895
|
+
private scheduleHide;
|
|
1054
1896
|
private scheduleShow;
|
|
1055
1897
|
private place;
|
|
1056
1898
|
private isInside;
|
|
@@ -1067,6 +1909,52 @@ declare class ArkTooltip extends HTMLElement {
|
|
|
1067
1909
|
private updateAppearance;
|
|
1068
1910
|
}
|
|
1069
1911
|
|
|
1912
|
+
declare global {
|
|
1913
|
+
interface HTMLElementTagNameMap {
|
|
1914
|
+
"ark-alert": ArkAlert;
|
|
1915
|
+
"ark-avatar": ArkAvatar;
|
|
1916
|
+
"ark-badge": ArkBadge;
|
|
1917
|
+
"ark-button": ArkButton;
|
|
1918
|
+
"ark-calendar": ArkCalendar;
|
|
1919
|
+
"ark-card": ArkCard;
|
|
1920
|
+
"ark-carousel": ArkCarousel;
|
|
1921
|
+
"ark-checkbox": ArkCheckbox;
|
|
1922
|
+
"ark-clock": ArkClock;
|
|
1923
|
+
"ark-color-swatches": ArkColorSwatches;
|
|
1924
|
+
"ark-command-item": ArkCommandItem;
|
|
1925
|
+
"ark-command-palette": ArkCommandPalette;
|
|
1926
|
+
"ark-copy-button": ArkCopyButton;
|
|
1927
|
+
"ark-datepicker": ArkDatepicker;
|
|
1928
|
+
"ark-dialog": ArkDialog;
|
|
1929
|
+
"ark-drawer": ArkDrawer;
|
|
1930
|
+
"ark-empty": ArkEmpty;
|
|
1931
|
+
"ark-file-input": ArkFileInput;
|
|
1932
|
+
"ark-input": ArkInput;
|
|
1933
|
+
"ark-kbd": ArkKbd;
|
|
1934
|
+
"ark-kv-editor": ArkKvEditor;
|
|
1935
|
+
"ark-mark": ArkMark;
|
|
1936
|
+
"ark-menu": ArkMenu;
|
|
1937
|
+
"ark-menu-item": ArkMenuItem;
|
|
1938
|
+
"ark-progress": ArkProgress;
|
|
1939
|
+
"ark-radio": ArkRadio;
|
|
1940
|
+
"ark-scheduler": ArkScheduler;
|
|
1941
|
+
"ark-select": ArkSelect;
|
|
1942
|
+
"ark-shape-picker": ArkShapePicker;
|
|
1943
|
+
"ark-skeleton": ArkSkeleton;
|
|
1944
|
+
"ark-spinner": ArkSpinner;
|
|
1945
|
+
"ark-split-pane": ArkSplitPane;
|
|
1946
|
+
"ark-status-dot": ArkStatusDot;
|
|
1947
|
+
"ark-switch": ArkSwitch;
|
|
1948
|
+
"ark-tab": ArkTab;
|
|
1949
|
+
"ark-tabs": ArkTabs;
|
|
1950
|
+
"ark-textarea": ArkTextarea;
|
|
1951
|
+
"ark-toaster": ArkToaster;
|
|
1952
|
+
"ark-toggle": ArkToggle;
|
|
1953
|
+
"ark-toggle-group": ArkToggleGroup;
|
|
1954
|
+
"ark-tooltip": ArkTooltip;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1070
1958
|
/**
|
|
1071
1959
|
* Registra os componentes personalizados do Tooark no navegador.
|
|
1072
1960
|
* Esta função deve ser chamada antes de usar os componentes em qualquer framework (React, Angular, Vue)
|
|
@@ -1074,4 +1962,4 @@ declare class ArkTooltip extends HTMLElement {
|
|
|
1074
1962
|
*/
|
|
1075
1963
|
declare function registerTooarkComponents(): void;
|
|
1076
1964
|
|
|
1077
|
-
export { ArkBadge, ArkButton, ArkCalendar, ArkCarousel, ArkClock, ArkDatepicker, ArkDialog, ArkEmpty, ArkInput, ArkMenu, ArkMenuItem, ArkScheduler, ArkSelect, ArkSkeleton, ArkSwitch, ArkTab, ArkTabs, ArkTextarea, ArkToaster, ArkToggle, ArkToggleGroup, ArkTooltip, registerTooarkComponents };
|
|
1965
|
+
export { ARK_MARK_PATHS, ARK_MARK_SHAPES, ArkAlert, ArkAvatar, ArkBadge, ArkButton, ArkCalendar, ArkCard, ArkCarousel, ArkCheckbox, ArkClock, ArkColorSwatches, ArkCommandItem, ArkCommandPalette, ArkCopyButton, ArkDatepicker, ArkDialog, ArkDrawer, ArkEmpty, ArkFileInput, ArkInput, ArkKbd, ArkKvEditor, ArkMark, ArkMenu, ArkMenuItem, ArkProgress, ArkRadio, ArkScheduler, ArkSelect, ArkShapePicker, ArkSkeleton, ArkSpinner, ArkSplitPane, ArkStatusDot, ArkSwitch, ArkTab, ArkTabs, ArkTextarea, ArkToaster, ArkToggle, ArkToggleGroup, ArkTooltip, normalizeMarkShape, registerTooarkComponents };
|