@tooark/web-components 1.0.1 → 1.2.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 +338 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +924 -39
- package/dist/index.d.ts +924 -39
- package/dist/index.js +317 -100
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
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;
|
|
@@ -274,12 +383,66 @@ declare class ArkCarousel extends HTMLElement {
|
|
|
274
383
|
private build;
|
|
275
384
|
}
|
|
276
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
|
+
|
|
277
440
|
/**
|
|
278
441
|
* Superfície de seleção de hora — colunas digitais roláveis de hora/minuto
|
|
279
442
|
* (/segundo), no estilo DigitalClock do MUI. Valor sempre em 24h "HH:mm:ss";
|
|
280
443
|
* `hours-format="12"` só muda a exibição (coluna AM/PM).
|
|
281
444
|
*/
|
|
282
|
-
declare class ArkClock extends
|
|
445
|
+
declare class ArkClock extends HTMLElementBase {
|
|
283
446
|
static readonly tagName = "ark-clock";
|
|
284
447
|
private root;
|
|
285
448
|
private columnEls;
|
|
@@ -288,6 +451,7 @@ declare class ArkClock extends HTMLElement {
|
|
|
288
451
|
connectedCallback(): void;
|
|
289
452
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
290
453
|
get value(): string;
|
|
454
|
+
set value(value: string | null | undefined);
|
|
291
455
|
private getIntent;
|
|
292
456
|
private showSeconds;
|
|
293
457
|
private is12h;
|
|
@@ -303,6 +467,190 @@ declare class ArkClock extends HTMLElement {
|
|
|
303
467
|
private build;
|
|
304
468
|
}
|
|
305
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
|
+
|
|
306
654
|
/**
|
|
307
655
|
* Seletor de data/hora que compõe ark-input + ark-calendar + ark-clock.
|
|
308
656
|
*
|
|
@@ -318,13 +666,15 @@ declare class ArkClock extends HTMLElement {
|
|
|
318
666
|
* core (abre abaixo, vira para cima sem espaço) e animado com `scale` a
|
|
319
667
|
* partir da origem.
|
|
320
668
|
*/
|
|
321
|
-
declare class ArkDatepicker extends
|
|
669
|
+
declare class ArkDatepicker extends HTMLElementBase {
|
|
322
670
|
static readonly tagName = "ark-datepicker";
|
|
323
671
|
private calendarEl;
|
|
324
672
|
private clockEl;
|
|
325
673
|
private inputComp;
|
|
326
674
|
private toggleEl;
|
|
327
675
|
private popupEl;
|
|
676
|
+
/** Calendário e/ou relógio: inline no host ou dentro do popup. */
|
|
677
|
+
private panelEl;
|
|
328
678
|
/** Para de reposicionar o popup em scroll/resize; só existe enquanto aberto. */
|
|
329
679
|
private disposePosition;
|
|
330
680
|
private hiddenInputEl;
|
|
@@ -338,6 +688,7 @@ declare class ArkDatepicker extends HTMLElement {
|
|
|
338
688
|
disconnectedCallback(): void;
|
|
339
689
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
340
690
|
get value(): string;
|
|
691
|
+
set value(value: string | null | undefined);
|
|
341
692
|
private hasRendered;
|
|
342
693
|
private getMode;
|
|
343
694
|
private isInputMode;
|
|
@@ -386,7 +737,7 @@ declare class ArkDatepicker extends HTMLElement {
|
|
|
386
737
|
* navegando por cursor virtual ainda alcança o conteúdo atrás. A página para
|
|
387
738
|
* de rolar enquanto aberto (`lockScroll` de core), salvo com `no-scroll-lock`.
|
|
388
739
|
*/
|
|
389
|
-
declare class ArkDialog extends
|
|
740
|
+
declare class ArkDialog extends HTMLElementBase {
|
|
390
741
|
static readonly tagName = "ark-dialog";
|
|
391
742
|
private headerEl;
|
|
392
743
|
private titleEl;
|
|
@@ -396,6 +747,8 @@ declare class ArkDialog extends HTMLElement {
|
|
|
396
747
|
private syncingClass;
|
|
397
748
|
/** Visibilidade real: `open` também cobre a animação de entrada; `closing` é a saída ainda visível. */
|
|
398
749
|
private state;
|
|
750
|
+
/** A abertura em curso veio do connectedCallback: o ark-open espera um microtask. */
|
|
751
|
+
private openingOnConnect;
|
|
399
752
|
private releaseTrap;
|
|
400
753
|
/** Motivo pedido por `close(reason)`, lido quando o atributo `open` some. */
|
|
401
754
|
private pendingReason;
|
|
@@ -440,6 +793,75 @@ declare class ArkDialog extends HTMLElement {
|
|
|
440
793
|
private updateAppearance;
|
|
441
794
|
}
|
|
442
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
|
+
|
|
443
865
|
/**
|
|
444
866
|
* Estado vazio: caixa de borda tracejada com ícone apagado, título, descrição
|
|
445
867
|
* e ação opcional. O PRÓPRIO host é a caixa: os filhos do usuário
|
|
@@ -448,7 +870,7 @@ declare class ArkDialog extends HTMLElement {
|
|
|
448
870
|
* `description`, em nós do componente ao fim do host. Filhos sem slot entram
|
|
449
871
|
* entre a descrição e a ação. Não é interativo e não tem role próprio.
|
|
450
872
|
*/
|
|
451
|
-
declare class ArkEmpty extends
|
|
873
|
+
declare class ArkEmpty extends HTMLElementBase {
|
|
452
874
|
static readonly tagName = "ark-empty";
|
|
453
875
|
private ownClasses;
|
|
454
876
|
private syncingClass;
|
|
@@ -465,6 +887,57 @@ declare class ArkEmpty extends HTMLElement {
|
|
|
465
887
|
private updateAppearance;
|
|
466
888
|
}
|
|
467
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
|
+
|
|
468
941
|
/**
|
|
469
942
|
* Campo de texto padronizado da família Ark. Serve tanto de componente público
|
|
470
943
|
* quanto de base visual para orquestradores (ark-datepicker etc.), que colocam
|
|
@@ -478,7 +951,7 @@ declare class ArkEmpty extends HTMLElement {
|
|
|
478
951
|
* um botão de mostrar/ocultar na ponta direita. Atributos nativos como
|
|
479
952
|
* `maxlength` ou `inputmode` são espelhados no <input> sem interpretação.
|
|
480
953
|
*/
|
|
481
|
-
declare class ArkInput extends
|
|
954
|
+
declare class ArkInput extends HTMLElementBase {
|
|
482
955
|
static readonly tagName = "ark-input";
|
|
483
956
|
private inputEl;
|
|
484
957
|
private labelEl;
|
|
@@ -504,6 +977,138 @@ declare class ArkInput extends HTMLElement {
|
|
|
504
977
|
private updateAppearance;
|
|
505
978
|
}
|
|
506
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
|
+
|
|
507
1112
|
/**
|
|
508
1113
|
* Menu suspenso ou de contexto. O PRÓPRIO host é o painel (`role="menu"`),
|
|
509
1114
|
* aberto como `popover="auto"` (top layer, light dismiss e Esc nativos, sem
|
|
@@ -517,7 +1122,7 @@ declare class ArkInput extends HTMLElement {
|
|
|
517
1122
|
* a saída são transições CSS em components.css, porque o light dismiss de um
|
|
518
1123
|
* popover auto não pode ser interceptado por JS para animar antes de esconder.
|
|
519
1124
|
*/
|
|
520
|
-
declare class ArkMenu extends
|
|
1125
|
+
declare class ArkMenu extends HTMLElementBase {
|
|
521
1126
|
static readonly tagName = "ark-menu";
|
|
522
1127
|
private ownClasses;
|
|
523
1128
|
private syncingClass;
|
|
@@ -585,7 +1190,7 @@ declare class ArkMenu extends HTMLElement {
|
|
|
585
1190
|
* item. Seleção, foco e teclado são coordenados pelo ark-menu; `size` e
|
|
586
1191
|
* `theme` chegam propagados dele.
|
|
587
1192
|
*/
|
|
588
|
-
declare class ArkMenuItem extends
|
|
1193
|
+
declare class ArkMenuItem extends HTMLElementBase {
|
|
589
1194
|
static readonly tagName = "ark-menu-item";
|
|
590
1195
|
private ownClasses;
|
|
591
1196
|
private syncingClass;
|
|
@@ -595,6 +1200,7 @@ declare class ArkMenuItem extends HTMLElement {
|
|
|
595
1200
|
connectedCallback(): void;
|
|
596
1201
|
attributeChangedCallback(name: string): void;
|
|
597
1202
|
get value(): string;
|
|
1203
|
+
set value(value: string | null | undefined);
|
|
598
1204
|
get disabled(): boolean;
|
|
599
1205
|
set disabled(value: boolean | string | null | undefined);
|
|
600
1206
|
/** Marcado; só faz sentido num item checkbox (atributo `checked` presente, `"false"` é desmarcado). */
|
|
@@ -614,6 +1220,106 @@ declare class ArkMenuItem extends HTMLElement {
|
|
|
614
1220
|
private updateAppearance;
|
|
615
1221
|
}
|
|
616
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
|
+
|
|
617
1323
|
/**
|
|
618
1324
|
* Agenda/scheduler: exibe eventos em quatro views — `week` e `day` com timeline
|
|
619
1325
|
* por horário (eventos posicionados e sobreposições resolvidas em colunas),
|
|
@@ -623,7 +1329,7 @@ declare class ArkMenuItem extends HTMLElement {
|
|
|
623
1329
|
* eventos são o conteúdo: clicar num evento emite `ark-event-click` e clicar num
|
|
624
1330
|
* espaço livre emite `ark-slot-click` (útil para criar um evento).
|
|
625
1331
|
*/
|
|
626
|
-
declare class ArkScheduler extends
|
|
1332
|
+
declare class ArkScheduler extends HTMLElementBase {
|
|
627
1333
|
static readonly tagName = "ark-scheduler";
|
|
628
1334
|
private root;
|
|
629
1335
|
private locale;
|
|
@@ -631,6 +1337,8 @@ declare class ArkScheduler extends HTMLElement {
|
|
|
631
1337
|
private refDate;
|
|
632
1338
|
private nowTimer;
|
|
633
1339
|
private navDirection;
|
|
1340
|
+
/** Último período anunciado (título do cabeçalho); o primeiro build só registra, sem anunciar. */
|
|
1341
|
+
private announcedPeriod;
|
|
634
1342
|
private syncingAttr;
|
|
635
1343
|
/** Linhas de "agora" vivas na tela: reposicionadas sem rebuild a cada minuto. */
|
|
636
1344
|
private nowLines;
|
|
@@ -643,12 +1351,13 @@ declare class ArkScheduler extends HTMLElement {
|
|
|
643
1351
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
644
1352
|
/** Lista de eventos (propriedade JS; tem precedência sobre o atributo `events`). */
|
|
645
1353
|
get events(): ArkSchedulerEvent[];
|
|
646
|
-
set events(list: ArkSchedulerEvent[]);
|
|
1354
|
+
set events(list: ArkSchedulerEvent[] | string | null);
|
|
647
1355
|
/** View atual. */
|
|
648
1356
|
get view(): ArkSchedulerView;
|
|
649
1357
|
set view(next: ArkSchedulerView);
|
|
650
1358
|
/** Data de referência da view atual (ISO YYYY-MM-DD). */
|
|
651
1359
|
get date(): string;
|
|
1360
|
+
set date(value: string | null | undefined);
|
|
652
1361
|
private parseEventsAttr;
|
|
653
1362
|
private getLocale;
|
|
654
1363
|
private getIntent;
|
|
@@ -682,6 +1391,7 @@ declare class ArkScheduler extends HTMLElement {
|
|
|
682
1391
|
private buildAgenda;
|
|
683
1392
|
/** Move só a linha de "agora"; rebuildar a cada minuto custaria o scroll e o foco. */
|
|
684
1393
|
private updateNowIndicator;
|
|
1394
|
+
private announcePeriod;
|
|
685
1395
|
private build;
|
|
686
1396
|
}
|
|
687
1397
|
|
|
@@ -693,7 +1403,7 @@ declare class ArkScheduler extends HTMLElement {
|
|
|
693
1403
|
* propriedade JS), nunca de filhos: o <select> exige os <option> dentro dele
|
|
694
1404
|
* e a lib não move filhos do usuário.
|
|
695
1405
|
*/
|
|
696
|
-
declare class ArkSelect extends
|
|
1406
|
+
declare class ArkSelect extends HTMLElementBase {
|
|
697
1407
|
static readonly tagName = "ark-select";
|
|
698
1408
|
private selectEl;
|
|
699
1409
|
private labelEl;
|
|
@@ -722,6 +1432,37 @@ declare class ArkSelect extends HTMLElement {
|
|
|
722
1432
|
private updateAppearance;
|
|
723
1433
|
}
|
|
724
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
|
+
|
|
725
1466
|
/**
|
|
726
1467
|
* Placeholder de carregamento. O PRÓPRIO host é o bloco (`.ark-skeleton` de
|
|
727
1468
|
* core: fundo muted suave e raio), `aria-hidden` porque não há nada para ler.
|
|
@@ -734,7 +1475,7 @@ declare class ArkSelect extends HTMLElement {
|
|
|
734
1475
|
* substitui o skeleton
|
|
735
1476
|
* entra com `.ark-animate-fade-in`, sem elemento próprio para isso.
|
|
736
1477
|
*/
|
|
737
|
-
declare class ArkSkeleton extends
|
|
1478
|
+
declare class ArkSkeleton extends HTMLElementBase {
|
|
738
1479
|
static readonly tagName = "ark-skeleton";
|
|
739
1480
|
private ownClasses;
|
|
740
1481
|
private syncingClass;
|
|
@@ -760,13 +1501,104 @@ declare class ArkSkeleton extends HTMLElement {
|
|
|
760
1501
|
private updateAppearance;
|
|
761
1502
|
}
|
|
762
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
|
+
|
|
763
1595
|
/**
|
|
764
1596
|
* Interruptor liga/desliga com trilho e polegar. O trilho é um <button>
|
|
765
1597
|
* `role="switch"`; um checkbox oculto espelha o estado para o formulário,
|
|
766
1598
|
* submetendo `name`/`value` apenas quando marcado. Tem tabela de proporções
|
|
767
1599
|
* própria, em vez da escala de altura dos demais controles.
|
|
768
1600
|
*/
|
|
769
|
-
declare class ArkSwitch extends
|
|
1601
|
+
declare class ArkSwitch extends HTMLElementBase {
|
|
770
1602
|
static readonly tagName = "ark-switch";
|
|
771
1603
|
private trackEl;
|
|
772
1604
|
private thumbEl;
|
|
@@ -794,7 +1626,7 @@ declare class ArkSwitch extends HTMLElement {
|
|
|
794
1626
|
* Seleção e roving tabindex são coordenados pelo ark-tabs; `variant`,
|
|
795
1627
|
* `size`, `intent`, `theme` e idioma chegam propagados dele.
|
|
796
1628
|
*/
|
|
797
|
-
declare class ArkTab extends
|
|
1629
|
+
declare class ArkTab extends HTMLElementBase {
|
|
798
1630
|
static readonly tagName = "ark-tab";
|
|
799
1631
|
private ownClasses;
|
|
800
1632
|
private syncingClass;
|
|
@@ -805,6 +1637,7 @@ declare class ArkTab extends HTMLElement {
|
|
|
805
1637
|
connectedCallback(): void;
|
|
806
1638
|
attributeChangedCallback(name: string): void;
|
|
807
1639
|
get value(): string;
|
|
1640
|
+
set value(value: string | null | undefined);
|
|
808
1641
|
/** Aba ativa; o ark-tabs reflete aqui o seu `value`. */
|
|
809
1642
|
get selected(): boolean;
|
|
810
1643
|
set selected(value: boolean | string | null | undefined);
|
|
@@ -814,6 +1647,7 @@ declare class ArkTab extends HTMLElement {
|
|
|
814
1647
|
set dirty(value: boolean | string | null | undefined);
|
|
815
1648
|
/** Fechável só na variante `editor`; nas outras o atributo é ignorado. */
|
|
816
1649
|
get closable(): boolean;
|
|
1650
|
+
set closable(value: boolean | string | null | undefined);
|
|
817
1651
|
/** Pede a seleção desta aba: emite `change` com o valor, que o ark-tabs consolida. */
|
|
818
1652
|
select(): void;
|
|
819
1653
|
/** Pede o fechamento: emite `ark-close`; remover a aba do DOM é do app. */
|
|
@@ -843,7 +1677,7 @@ declare class ArkTab extends HTMLElement {
|
|
|
843
1677
|
* inserido de uma vez o grupo pode rodar antes de as abas serem upgraded, e
|
|
844
1678
|
* uma propriedade escrita antes do upgrade esconderia o accessor da classe.
|
|
845
1679
|
*/
|
|
846
|
-
declare class ArkTabs extends
|
|
1680
|
+
declare class ArkTabs extends HTMLElementBase {
|
|
847
1681
|
static readonly tagName = "ark-tabs";
|
|
848
1682
|
private observer;
|
|
849
1683
|
private syncingValue;
|
|
@@ -882,7 +1716,7 @@ declare class ArkTabs extends HTMLElement {
|
|
|
882
1716
|
* (`field-sizing: content` nativo, com fallback por JS), `monospace` e
|
|
883
1717
|
* `resize` atendem edição de código e de dados.
|
|
884
1718
|
*/
|
|
885
|
-
declare class ArkTextarea extends
|
|
1719
|
+
declare class ArkTextarea extends HTMLElementBase {
|
|
886
1720
|
static readonly tagName = "ark-textarea";
|
|
887
1721
|
private textareaEl;
|
|
888
1722
|
private labelEl;
|
|
@@ -912,7 +1746,7 @@ declare class ArkTextarea extends HTMLElement {
|
|
|
912
1746
|
* dialogs e menus, e é reaberta a cada toast novo para voltar ao topo da
|
|
913
1747
|
* pilha do top layer quando um overlay abriu depois dela.
|
|
914
1748
|
*/
|
|
915
|
-
declare class ArkToaster extends
|
|
1749
|
+
declare class ArkToaster extends HTMLElementBase {
|
|
916
1750
|
static readonly tagName = "ark-toaster";
|
|
917
1751
|
private root;
|
|
918
1752
|
private toasts;
|
|
@@ -954,7 +1788,7 @@ declare class ArkToaster extends HTMLElement {
|
|
|
954
1788
|
* (classes, role, foco, teclado): os filhos do usuário ficam onde estão.
|
|
955
1789
|
* Dentro de um ark-toggle-group vira item de segmented control.
|
|
956
1790
|
*/
|
|
957
|
-
declare class ArkToggle extends
|
|
1791
|
+
declare class ArkToggle extends HTMLElementBase {
|
|
958
1792
|
static readonly tagName = "ark-toggle";
|
|
959
1793
|
private ownClasses;
|
|
960
1794
|
private syncingClass;
|
|
@@ -967,6 +1801,7 @@ declare class ArkToggle extends HTMLElement {
|
|
|
967
1801
|
get disabled(): boolean;
|
|
968
1802
|
set disabled(value: boolean | string | null | undefined);
|
|
969
1803
|
get value(): string;
|
|
1804
|
+
set value(value: string | null | undefined);
|
|
970
1805
|
toggle(): void;
|
|
971
1806
|
private readonly handleClick;
|
|
972
1807
|
private readonly handleKeydown;
|
|
@@ -984,7 +1819,7 @@ declare class ArkToggle extends HTMLElement {
|
|
|
984
1819
|
* (`role="group"` + classes): os itens do usuário ficam onde estão, então
|
|
985
1820
|
* frameworks podem adicionar/remover toggles livremente.
|
|
986
1821
|
*/
|
|
987
|
-
declare class ArkToggleGroup extends
|
|
1822
|
+
declare class ArkToggleGroup extends HTMLElementBase {
|
|
988
1823
|
static readonly tagName = "ark-toggle-group";
|
|
989
1824
|
private observer;
|
|
990
1825
|
private syncingValue;
|
|
@@ -1017,11 +1852,12 @@ declare class ArkToggleGroup extends HTMLElement {
|
|
|
1017
1852
|
* components.css). O gatilho recebe `aria-describedby` do balão e precisa ser
|
|
1018
1853
|
* focável por conta própria.
|
|
1019
1854
|
*
|
|
1020
|
-
* Abre em hover (depois de `delay`) e em foco (na hora); fecha ao sair
|
|
1021
|
-
*
|
|
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`
|
|
1022
1858
|
* de core, com flip quando não cabe. Entrada `fade` quick, sem saída animada.
|
|
1023
1859
|
*/
|
|
1024
|
-
declare class ArkTooltip extends
|
|
1860
|
+
declare class ArkTooltip extends HTMLElementBase {
|
|
1025
1861
|
static readonly tagName = "ark-tooltip";
|
|
1026
1862
|
private ownClasses;
|
|
1027
1863
|
private syncingClass;
|
|
@@ -1032,6 +1868,7 @@ declare class ArkTooltip extends HTMLElement {
|
|
|
1032
1868
|
private bubble;
|
|
1033
1869
|
private trigger;
|
|
1034
1870
|
private openTimer;
|
|
1871
|
+
private hideTimer;
|
|
1035
1872
|
private disposePosition;
|
|
1036
1873
|
private isOpen;
|
|
1037
1874
|
private syncingOpen;
|
|
@@ -1054,6 +1891,8 @@ declare class ArkTooltip extends HTMLElement {
|
|
|
1054
1891
|
private getDelay;
|
|
1055
1892
|
private getSide;
|
|
1056
1893
|
private clearTimer;
|
|
1894
|
+
private cancelHide;
|
|
1895
|
+
private scheduleHide;
|
|
1057
1896
|
private scheduleShow;
|
|
1058
1897
|
private place;
|
|
1059
1898
|
private isInside;
|
|
@@ -1070,6 +1909,52 @@ declare class ArkTooltip extends HTMLElement {
|
|
|
1070
1909
|
private updateAppearance;
|
|
1071
1910
|
}
|
|
1072
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
|
+
|
|
1073
1958
|
/**
|
|
1074
1959
|
* Registra os componentes personalizados do Tooark no navegador.
|
|
1075
1960
|
* Esta função deve ser chamada antes de usar os componentes em qualquer framework (React, Angular, Vue)
|
|
@@ -1077,4 +1962,4 @@ declare class ArkTooltip extends HTMLElement {
|
|
|
1077
1962
|
*/
|
|
1078
1963
|
declare function registerTooarkComponents(): void;
|
|
1079
1964
|
|
|
1080
|
-
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 };
|