@duyluonganduin/acl-web-components 0.0.70 → 0.0.72
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/dist/acl-web-components.cjs +1 -1
- package/dist/acl-web-components.d.ts +2125 -48
- package/dist/acl-web-components.iife.js +2352 -516
- package/dist/acl-web-components.js +293 -163
- package/dist/{anduin-table-K3MtnqRW.js → anduin-autocomplete-BP4cC5KW.js} +13394 -6826
- package/dist/{anduin-table-C07o6qAm.cjs → anduin-autocomplete-Bb0ti6Pi.cjs} +2323 -487
- package/dist/jsx.d.ts +481 -12
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts +2262 -36
- package/dist/react.js +480 -261
- package/dist/tailwind-preset.cjs +1 -1
- package/dist/tailwind-preset.js +1 -0
- package/dist/tailwind-theme.css +2 -0
- package/dist/tokens.css +9 -0
- package/package.json +6 -2
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSResult } from 'lit';
|
|
2
|
+
import { CSSResultGroup } from 'lit';
|
|
2
3
|
import { EventName } from '@lit/react';
|
|
3
4
|
import { LitElement } from 'lit';
|
|
4
5
|
import { nothing } from 'lit';
|
|
@@ -61,17 +62,196 @@ declare class AnduinAiSpinner extends LitElement {
|
|
|
61
62
|
private dropPhaseClasses;
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
/**
|
|
66
|
+
* `<anduin-autocomplete>` — the design repo's free-text field with suggestions. The value is
|
|
67
|
+
* whatever the field holds; picking a suggestion writes its label into the field. Unlike
|
|
68
|
+
* `anduin-combobox` the text is never reverted when the list closes.
|
|
69
|
+
*
|
|
70
|
+
* ```html
|
|
71
|
+
* <anduin-autocomplete>
|
|
72
|
+
* <anduin-autocomplete-input placeholder="Search funds..."></anduin-autocomplete-input>
|
|
73
|
+
* <anduin-autocomplete-content>
|
|
74
|
+
* <anduin-autocomplete-empty>No matching funds</anduin-autocomplete-empty>
|
|
75
|
+
* <anduin-autocomplete-list>
|
|
76
|
+
* <anduin-autocomplete-item value="nw-x">Northwind Real Estate Partners X</anduin-autocomplete-item>
|
|
77
|
+
* </anduin-autocomplete-list>
|
|
78
|
+
* </anduin-autocomplete-content>
|
|
79
|
+
* </anduin-autocomplete>
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* `value` follows the text (written back on every keystroke); a value set from outside updates
|
|
83
|
+
* the field and re-filters without firing `change`, so a controlled binding cannot loop.
|
|
84
|
+
*/
|
|
85
|
+
declare class AnduinAutocomplete extends PickerRoot {
|
|
86
|
+
static family: string;
|
|
87
|
+
private _current;
|
|
88
|
+
firstUpdated(): void;
|
|
89
|
+
updated(changed: PropertyValues<this>): void;
|
|
90
|
+
/** The text in the field. */
|
|
91
|
+
get text(): string;
|
|
92
|
+
private _syncText;
|
|
93
|
+
/** Records new text and reports it as `change`. */
|
|
94
|
+
private _commit;
|
|
95
|
+
protected openQuery(): string;
|
|
96
|
+
protected emptyVisible(_query: string, nothingMatched: boolean): boolean;
|
|
97
|
+
/** With nothing to suggest and no empty element, the panel hides itself rather than show an empty box. */
|
|
98
|
+
protected panelVisible(nothingMatched: boolean): boolean;
|
|
99
|
+
protected onClosed(): void;
|
|
100
|
+
protected onItemChosen(value: string): void;
|
|
101
|
+
/** Commits a suggestion: its label becomes the text, `on-choose` fires with its value, the list closes. */
|
|
102
|
+
choose(value: string): void;
|
|
103
|
+
get hasHighlight(): boolean;
|
|
104
|
+
/** Enter on the highlighted suggestion. */
|
|
105
|
+
chooseHighlighted(): void;
|
|
106
|
+
/** Empties the field (the ✕, or Escape on a closed single-row field) and hands focus back to it. */
|
|
107
|
+
clear(): void;
|
|
108
|
+
fieldFocus(): void;
|
|
109
|
+
fieldInput(text: string): void;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** `<anduin-autocomplete-clear>` — slotted in a field: a ✕ shown only while there is text; clears it and refocuses. */
|
|
113
|
+
declare class AnduinAutocompleteClear extends LitElement {
|
|
114
|
+
static styles: CSSResult;
|
|
115
|
+
hasText: boolean;
|
|
116
|
+
connectedCallback(): void;
|
|
117
|
+
private _onClick;
|
|
118
|
+
render(): TemplateResult<1>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** `<anduin-autocomplete-content>` — the floating panel. `width` (px) pins its width; otherwise it shrink-wraps (min 160px). */
|
|
122
|
+
declare class AnduinAutocompleteContent extends PickerContent {
|
|
123
|
+
static family: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** `<anduin-autocomplete-empty>` — shown when the text matches nothing. Without one, the panel hides instead. */
|
|
127
|
+
declare class AnduinAutocompleteEmpty extends PickerEmpty {
|
|
128
|
+
static family: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** `<anduin-autocomplete-group>` — a labelled section; hides itself when every suggestion in it is filtered out. */
|
|
132
|
+
declare class AnduinAutocompleteGroup extends PickerGroup {
|
|
133
|
+
static family: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* `<anduin-autocomplete-input>` — the single-row field. Attributes: `placeholder`, `size`
|
|
138
|
+
* (`small` 24px / `default` 32px / `large` 40px), `status`, `disabled="true"`, `open-on-focus`,
|
|
139
|
+
* `label`. JS property `filter`. Slot an `<anduin-autocomplete-clear>` for a ✕.
|
|
140
|
+
*/
|
|
141
|
+
declare class AnduinAutocompleteInput extends AutocompleteFieldBase {
|
|
142
|
+
static styles: CSSResult[];
|
|
143
|
+
private _onKeyDown;
|
|
144
|
+
render(): TemplateResult<1>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* `<anduin-autocomplete-item value="…">Label</anduin-autocomplete-item>` — a suggestion. `label`
|
|
149
|
+
* overrides the text committed and filtered on; `start-icon` adds a leading icon; `disabled`
|
|
150
|
+
* keeps it visible but unpickable.
|
|
151
|
+
*/
|
|
152
|
+
declare class AnduinAutocompleteItem extends PickerItem {
|
|
153
|
+
static family: string;
|
|
154
|
+
static styles: CSSResultGroup[];
|
|
155
|
+
startIcon: string;
|
|
156
|
+
protected renderStart(): TemplateResult<1> | typeof nothing;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** `<anduin-autocomplete-label>` — a group's heading. */
|
|
160
|
+
declare class AnduinAutocompleteLabel extends PickerLabel {
|
|
161
|
+
static family: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** `<anduin-autocomplete-list>` — the listbox. `max-height` caps it (any CSS length); `items` (JS) renders data. */
|
|
165
|
+
declare class AnduinAutocompleteList extends PickerList {
|
|
166
|
+
static family: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** `<anduin-autocomplete-separator>` — a divider; hides when left dangling by the filter. */
|
|
170
|
+
declare class AnduinAutocompleteSeparator extends PickerSeparator {
|
|
171
|
+
static family: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* `<anduin-autocomplete-textarea>` — the multi-row field. Same API as the input plus `rows`
|
|
176
|
+
* (default 3) and `max-rows` (default 6): it grows a line at a time between them, then scrolls.
|
|
177
|
+
* Enter commits a highlighted suggestion; otherwise it reports `on-submit` and, unless that is
|
|
178
|
+
* cancelled, inserts a newline. Shift+Enter is always a newline.
|
|
179
|
+
*/
|
|
180
|
+
declare class AnduinAutocompleteTextarea extends AutocompleteFieldBase {
|
|
181
|
+
static styles: CSSResult[];
|
|
182
|
+
rows: number;
|
|
183
|
+
maxRows: number;
|
|
184
|
+
updated(changed: PropertyValues<this>): void;
|
|
185
|
+
/** Grows the field between `rows` and `max-rows` lines; past that it scrolls. */
|
|
186
|
+
private _grow;
|
|
187
|
+
protected _onInput(e: Event): void;
|
|
188
|
+
set text(value: string);
|
|
189
|
+
get text(): string;
|
|
190
|
+
private _onKeyDown;
|
|
191
|
+
render(): TemplateResult<1>;
|
|
192
|
+
}
|
|
193
|
+
|
|
64
194
|
declare class AnduinAvatar extends LitElement {
|
|
65
195
|
static styles: CSSResult;
|
|
66
196
|
src: string;
|
|
67
197
|
name: string;
|
|
68
198
|
alt: string;
|
|
69
199
|
icon: string;
|
|
70
|
-
|
|
200
|
+
/** 16 | 20 | 24 | 32 | 40, or the design repo's 'small' | 'medium' | 'large' | 'extraLarge'. */
|
|
201
|
+
size: AvatarSize | DesignAvatarSize;
|
|
71
202
|
shape: AvatarShape;
|
|
203
|
+
/**
|
|
204
|
+
* Design-repo API. Setting `uid` (even to `""`) or `value` switches the avatar to the design repo's behaviour:
|
|
205
|
+
* initials from `value`, a deterministic colour from `uid`, `uid="anduin"` for the Anduin logo, and an empty
|
|
206
|
+
* `uid` for an inactive avatar that shows its slotted content. `name` / `src` / `icon` keep their old behaviour.
|
|
207
|
+
*/
|
|
208
|
+
uid: string | null;
|
|
209
|
+
value: string | null;
|
|
210
|
+
/** Accessible name (design API); replaces `value` as what the avatar is read as. */
|
|
211
|
+
label: string;
|
|
72
212
|
private _imgError;
|
|
73
213
|
private _onImgError;
|
|
214
|
+
/** The size in pixels, for either API. */
|
|
215
|
+
private get _px();
|
|
216
|
+
/** The design repo's named size, for either API. */
|
|
217
|
+
private get _designSize();
|
|
218
|
+
/** Whether the design repo's `uid` / `value` API is in use. */
|
|
219
|
+
get isDesignMode(): boolean;
|
|
74
220
|
private _iconSize;
|
|
221
|
+
private _renderDesign;
|
|
222
|
+
render(): TemplateResult<1>;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* `<anduin-avatar-block>` — the design repo's avatar + name + email block.
|
|
227
|
+
*
|
|
228
|
+
* The avatar (an `anduin-avatar` in the design `uid` / `value` mode, `aria-hidden` because the name is written
|
|
229
|
+
* beside it) sits on the left; the name (`value`) on top and the email below with a copy-to-clipboard button. Both
|
|
230
|
+
* text rows truncate with an ellipsis when the block is narrower than its content (give it `display: block` or a
|
|
231
|
+
* width to constrain it).
|
|
232
|
+
*
|
|
233
|
+
* Slots: `value` replaces the name row (the `value` attribute still drives the initials); `email` replaces the
|
|
234
|
+
* whole email row, including the copy button.
|
|
235
|
+
*/
|
|
236
|
+
declare class AnduinAvatarBlock extends LitElement {
|
|
237
|
+
static styles: CSSResult;
|
|
238
|
+
/** Drives the avatar colour. Empty: an inactive (gray) avatar; `"anduin"`: the Anduin logo. */
|
|
239
|
+
uid: string;
|
|
240
|
+
/** Full name: the displayed name and the source of the avatar initials. */
|
|
241
|
+
value: string;
|
|
242
|
+
/** Email shown under the name with a copy button. Empty: no email row. */
|
|
243
|
+
email: string;
|
|
244
|
+
/** Avatar shape: 'circle' (default) | 'square'. */
|
|
245
|
+
shape: 'circle' | 'square' | '';
|
|
246
|
+
/** Avatar size: 'small' | 'medium' | 'large' (default) | 'extraLarge'. */
|
|
247
|
+
size: 'small' | 'medium' | 'large' | 'extraLarge' | '';
|
|
248
|
+
private _copyStatus;
|
|
249
|
+
private _announcement;
|
|
250
|
+
private _resetTimer;
|
|
251
|
+
disconnectedCallback(): void;
|
|
252
|
+
/** Copies the email as the built-in copy button does. Resolves with whether the write succeeded. */
|
|
253
|
+
copyEmail(): Promise<boolean>;
|
|
254
|
+
private _renderEmail;
|
|
75
255
|
render(): TemplateResult<1>;
|
|
76
256
|
}
|
|
77
257
|
|
|
@@ -203,6 +383,273 @@ declare class AnduinCheckbox extends LitElement {
|
|
|
203
383
|
render(): TemplateResult<1>;
|
|
204
384
|
}
|
|
205
385
|
|
|
386
|
+
/**
|
|
387
|
+
* `<anduin-clipboard>` — copies `value` to the clipboard when its
|
|
388
|
+
* `<anduin-clipboard-trigger>` (or `<anduin-clipboard-indicator>`) is clicked.
|
|
389
|
+
*
|
|
390
|
+
* The status goes to `copied` at once, to `failed` if the browser refuses the
|
|
391
|
+
* write, and back to `idle` 2 seconds after the request. A polite live region
|
|
392
|
+
* announces the outcome ("Invoice number copied to clipboard").
|
|
393
|
+
*/
|
|
394
|
+
declare class AnduinClipboard extends LitElement {
|
|
395
|
+
static styles: CSSResult;
|
|
396
|
+
/** The text to copy, read at click time. */
|
|
397
|
+
value: string;
|
|
398
|
+
/** What the value is ("Invoice number"): names an icon-only trigger and the announcement. */
|
|
399
|
+
label: string;
|
|
400
|
+
private _status;
|
|
401
|
+
private _announcement;
|
|
402
|
+
private _resetTimer;
|
|
403
|
+
/** Where the last copy stands. */
|
|
404
|
+
get status(): ClipboardStatus;
|
|
405
|
+
constructor();
|
|
406
|
+
disconnectedCallback(): void;
|
|
407
|
+
/** Copies `value` as a trigger click would. Resolves once the write has settled. */
|
|
408
|
+
copy(): Promise<void>;
|
|
409
|
+
private _write;
|
|
410
|
+
/** The pre-`navigator.clipboard` way, for pages without it (plain HTTP). */
|
|
411
|
+
private _copyByExecCommand;
|
|
412
|
+
private _reportOutcome;
|
|
413
|
+
private _setStatus;
|
|
414
|
+
updated(changed: Map<string, unknown>): void;
|
|
415
|
+
render(): TemplateResult<1>;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* `<anduin-clipboard-indicator>` — a ready-made copy icon button (duplicate
|
|
420
|
+
* icon that turns into a check while copied). `appearance`: `plain` (32×32,
|
|
421
|
+
* hover background; default) or `text` (bare inline icon).
|
|
422
|
+
*/
|
|
423
|
+
declare class AnduinClipboardIndicator extends LitElement {
|
|
424
|
+
static styles: CSSResult;
|
|
425
|
+
appearance: ClipboardIndicatorAppearance;
|
|
426
|
+
private _copied;
|
|
427
|
+
private _label;
|
|
428
|
+
private _link;
|
|
429
|
+
connectedCallback(): void;
|
|
430
|
+
disconnectedCallback(): void;
|
|
431
|
+
render(): TemplateResult<1>;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* `<anduin-clipboard-trigger>` — the click target. Wraps its child in an
|
|
436
|
+
* `anduin-tooltip` that says "Click to copy", then "✓ Copied to clipboard".
|
|
437
|
+
* An icon-only child (no text, no `label` / `aria-label`) is named "Copy <label>".
|
|
438
|
+
*/
|
|
439
|
+
declare class AnduinClipboardTrigger extends LitElement {
|
|
440
|
+
static styles: CSSResult;
|
|
441
|
+
private _status;
|
|
442
|
+
private _hovered;
|
|
443
|
+
private _link;
|
|
444
|
+
constructor();
|
|
445
|
+
connectedCallback(): void;
|
|
446
|
+
disconnectedCallback(): void;
|
|
447
|
+
private _onClick;
|
|
448
|
+
private _onRootChange;
|
|
449
|
+
private _tooltip;
|
|
450
|
+
/** Offer an icon-only control a name; a control with its own words or name keeps them. */
|
|
451
|
+
private _nameControl;
|
|
452
|
+
render(): TemplateResult<1>;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* `<anduin-collapsible>` — a disclosure widget: an `<anduin-collapsible-trigger>`
|
|
457
|
+
* shows and hides an `<anduin-collapsible-content>`; an optional
|
|
458
|
+
* `<anduin-collapsible-icon>` rotates with it. The root has no layout box.
|
|
459
|
+
*
|
|
460
|
+
* - Uncontrolled (default): `default-open` sets the start state; clicks toggle it.
|
|
461
|
+
* - Controlled: once `open` is set (attribute or property), clicks only fire
|
|
462
|
+
* `anduin-collapsible-open-change`; the consumer updates `open`.
|
|
463
|
+
*/
|
|
464
|
+
declare class AnduinCollapsible extends LitElement {
|
|
465
|
+
static styles: CSSResult;
|
|
466
|
+
/** Controlled open state. Setting it (attribute or property) switches to controlled mode. */
|
|
467
|
+
get open(): boolean;
|
|
468
|
+
set open(value: boolean);
|
|
469
|
+
private _open;
|
|
470
|
+
private _controlled;
|
|
471
|
+
/** Start state in uncontrolled mode. */
|
|
472
|
+
defaultOpen: boolean;
|
|
473
|
+
/** Ignores the trigger: clicks neither toggle nor fire an event. The open state still follows `open` / `default-open`. */
|
|
474
|
+
disabled: boolean;
|
|
475
|
+
/** Animation axis: `vertical` (height, default) or `horizontal` (width). */
|
|
476
|
+
direction: CollapsibleDirection;
|
|
477
|
+
/** `off`, or a duration such as `100ms`. Absent means 150ms. Read at every toggle. */
|
|
478
|
+
animation: string;
|
|
479
|
+
/** The content panel's id — the trigger's `aria-controls`. */
|
|
480
|
+
readonly contentId: string;
|
|
481
|
+
private _uncontrolledOpen;
|
|
482
|
+
get isControlled(): boolean;
|
|
483
|
+
/** The state the collapsible currently shows. */
|
|
484
|
+
get isOpen(): boolean;
|
|
485
|
+
get isHorizontal(): boolean;
|
|
486
|
+
get animationDuration(): number;
|
|
487
|
+
/** Toggles as a trigger click would: ignored while disabled. */
|
|
488
|
+
toggle(): void;
|
|
489
|
+
updated(): void;
|
|
490
|
+
private _broadcast;
|
|
491
|
+
render(): TemplateResult<1>;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* `<anduin-collapsible-content>` — the panel. Always in the DOM (child state is
|
|
496
|
+
* kept); shown / hidden with a height (or width, `direction="horizontal"`)
|
|
497
|
+
* animation. A horizontal panel's inner box fills the host's height.
|
|
498
|
+
*/
|
|
499
|
+
declare class AnduinCollapsibleContent extends LitElement {
|
|
500
|
+
static styles: CSSResult;
|
|
501
|
+
private _link;
|
|
502
|
+
private _el;
|
|
503
|
+
/** The state last applied to the panel; null until the first one, which never animates. */
|
|
504
|
+
private _shown;
|
|
505
|
+
connectedCallback(): void;
|
|
506
|
+
disconnectedCallback(): void;
|
|
507
|
+
firstUpdated(): void;
|
|
508
|
+
private _onState;
|
|
509
|
+
render(): TemplateResult<1>;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* `<anduin-collapsible-icon>` — wraps an icon and rotates it to `rotation`
|
|
514
|
+
* degrees (default 90; negative turns counterclockwise) while open.
|
|
515
|
+
*/
|
|
516
|
+
declare class AnduinCollapsibleIcon extends LitElement {
|
|
517
|
+
static styles: CSSResult;
|
|
518
|
+
/** The angle, in whole degrees, the icon turns to when open. Unreadable values fall back to 90. */
|
|
519
|
+
rotation: string | number;
|
|
520
|
+
private _link;
|
|
521
|
+
private _el;
|
|
522
|
+
private _shown;
|
|
523
|
+
private get _openAngle();
|
|
524
|
+
connectedCallback(): void;
|
|
525
|
+
disconnectedCallback(): void;
|
|
526
|
+
firstUpdated(): void;
|
|
527
|
+
updated(changed: Map<string, unknown>): void;
|
|
528
|
+
private _rest;
|
|
529
|
+
private _onState;
|
|
530
|
+
render(): TemplateResult<1>;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* `<anduin-collapsible-trigger>` — any click inside toggles the root. No layout
|
|
535
|
+
* box. Writes `aria-expanded` / `aria-controls` / `aria-disabled` on itself and
|
|
536
|
+
* on the element slotted in; a plain `span`/`div` with text becomes a
|
|
537
|
+
* `role="button"` tab stop that toggles on Enter / Space.
|
|
538
|
+
*/
|
|
539
|
+
declare class AnduinCollapsibleTrigger extends LitElement {
|
|
540
|
+
static styles: CSSResult;
|
|
541
|
+
private _link;
|
|
542
|
+
private _synced;
|
|
543
|
+
constructor();
|
|
544
|
+
connectedCallback(): void;
|
|
545
|
+
disconnectedCallback(): void;
|
|
546
|
+
private _onKeyDown;
|
|
547
|
+
private _sync;
|
|
548
|
+
/**
|
|
549
|
+
* `anduin-button` keeps its `<button>` in a shadow root and has no
|
|
550
|
+
* `control-expanded` relay, so the expanded state is written onto that inner
|
|
551
|
+
* button directly (aria-controls cannot cross the shadow boundary).
|
|
552
|
+
*/
|
|
553
|
+
private _relayIntoButton;
|
|
554
|
+
render(): TemplateResult<1>;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* `<anduin-combobox>` — the design repo's pick-from-list field: a text input that filters a list
|
|
559
|
+
* of predefined options. The value is always one of the items; typed text is only a filter, and
|
|
560
|
+
* the input reverts to the chosen item's label when the list closes.
|
|
561
|
+
*
|
|
562
|
+
* ```html
|
|
563
|
+
* <anduin-combobox>
|
|
564
|
+
* <anduin-combobox-input placeholder="Search..."></anduin-combobox-input>
|
|
565
|
+
* <anduin-combobox-content>
|
|
566
|
+
* <anduin-combobox-empty>No results</anduin-combobox-empty>
|
|
567
|
+
* <anduin-combobox-list>
|
|
568
|
+
* <anduin-combobox-item value="us">United States</anduin-combobox-item>
|
|
569
|
+
* </anduin-combobox-list>
|
|
570
|
+
* </anduin-combobox-content>
|
|
571
|
+
* </anduin-combobox>
|
|
572
|
+
* ```
|
|
573
|
+
*
|
|
574
|
+
* `value` is written back on a pick (so uncontrolled markup works) and `change` fires with
|
|
575
|
+
* `{ value }`; a value set from outside updates the field without firing `change`.
|
|
576
|
+
*/
|
|
577
|
+
declare class AnduinCombobox extends PickerRoot {
|
|
578
|
+
static family: string;
|
|
579
|
+
/** Inline-block, as in the design repo: the field shrink-wraps to the input (an autocomplete is block). */
|
|
580
|
+
static styles: CSSResult;
|
|
581
|
+
private _query;
|
|
582
|
+
firstUpdated(): void;
|
|
583
|
+
updated(changed: PropertyValues<this>): void;
|
|
584
|
+
/** Marks the chosen item and, while closed, shows its label in the field. */
|
|
585
|
+
private _syncSelection;
|
|
586
|
+
protected openQuery(): string;
|
|
587
|
+
protected emptyVisible(query: string, nothingMatched: boolean): boolean;
|
|
588
|
+
protected panelVisible(): boolean;
|
|
589
|
+
protected onOpened(): void;
|
|
590
|
+
protected onClosed(): void;
|
|
591
|
+
protected onItemChosen(value: string): void;
|
|
592
|
+
fieldFocus(): void;
|
|
593
|
+
fieldInput(text: string): void;
|
|
594
|
+
/** Keyboard handling for the input (it keeps focus; the highlight is virtual). */
|
|
595
|
+
fieldKeyDown(e: KeyboardEvent): void;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/** `<anduin-combobox-content>` — the floating panel. `width` (px) pins its width; otherwise it shrink-wraps (min 160px). */
|
|
599
|
+
declare class AnduinComboboxContent extends PickerContent {
|
|
600
|
+
static family: string;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/** `<anduin-combobox-empty>` — shown when a non-empty query matches nothing. */
|
|
604
|
+
declare class AnduinComboboxEmpty extends PickerEmpty {
|
|
605
|
+
static family: string;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/** `<anduin-combobox-group>` — a labelled section (`role="group"`); hides itself when every item in it is filtered out. */
|
|
609
|
+
declare class AnduinComboboxGroup extends PickerGroup {
|
|
610
|
+
static family: string;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/** `<anduin-combobox-input>` — the text field that opens, filters and drives the list. Chevron on the right. */
|
|
614
|
+
declare class AnduinComboboxInput extends PickerField {
|
|
615
|
+
static family: string;
|
|
616
|
+
static styles: CSSResult[];
|
|
617
|
+
private _onKeyDown;
|
|
618
|
+
firstUpdated(): void;
|
|
619
|
+
render(): TemplateResult<1>;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* `<anduin-combobox-item value="…">Label</anduin-combobox-item>` — an option. `label` overrides the
|
|
624
|
+
* text used in the field and by the filter; `description` adds a second line; `disabled` keeps it
|
|
625
|
+
* visible but unpickable. The chosen item shows a check.
|
|
626
|
+
*/
|
|
627
|
+
declare class AnduinComboboxItem extends PickerItem {
|
|
628
|
+
static family: string;
|
|
629
|
+
static styles: CSSResultGroup[];
|
|
630
|
+
/** Secondary line under the label (or slot content into `slot="description"`). */
|
|
631
|
+
description: string;
|
|
632
|
+
private _hasSlottedDescription;
|
|
633
|
+
protected rowClass(): string;
|
|
634
|
+
protected renderContent(): TemplateResult<1>;
|
|
635
|
+
protected renderEnd(): TemplateResult<1>;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/** `<anduin-combobox-label>` — a group's heading. */
|
|
639
|
+
declare class AnduinComboboxLabel extends PickerLabel {
|
|
640
|
+
static family: string;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/** `<anduin-combobox-list>` — the listbox. `max-height` caps it (any CSS length); `items` (JS) renders data. */
|
|
644
|
+
declare class AnduinComboboxList extends PickerList {
|
|
645
|
+
static family: string;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/** `<anduin-combobox-separator>` — a divider between groups; hides when left dangling by the filter. */
|
|
649
|
+
declare class AnduinComboboxSeparator extends PickerSeparator {
|
|
650
|
+
static family: string;
|
|
651
|
+
}
|
|
652
|
+
|
|
206
653
|
/**
|
|
207
654
|
* A formatted date input. Displays a pattern such as `MM/dd/yyyy` and lets users
|
|
208
655
|
* type digits into each segment; clicking a segment highlights it, and focus
|
|
@@ -435,6 +882,169 @@ declare class AnduinDateRangeStart extends AnduinDateRangePanel {
|
|
|
435
882
|
protected readonly panelRole: "start";
|
|
436
883
|
}
|
|
437
884
|
|
|
885
|
+
/**
|
|
886
|
+
* Root coordinator. Renders nothing itself (`display: contents`).
|
|
887
|
+
*
|
|
888
|
+
* - Uncontrolled (no `open` attribute): the trigger, overlay, Escape and close
|
|
889
|
+
* parts open/close it directly; `default-open` opens it on mount.
|
|
890
|
+
* - Controlled (`open="true|false"`): a request fires `anduin-dialog-open-change`
|
|
891
|
+
* and then writes `open` itself, like the design repo (so it still closes when
|
|
892
|
+
* the consumer only listens to `anduin-dialog-on-close`).
|
|
893
|
+
*/
|
|
894
|
+
declare class AnduinDialog extends LitElement {
|
|
895
|
+
static styles: CSSResult;
|
|
896
|
+
/** Controlled open state. Leave unset for uncontrolled. */
|
|
897
|
+
open: boolean | undefined;
|
|
898
|
+
/** Uncontrolled: start open. */
|
|
899
|
+
defaultOpen: boolean;
|
|
900
|
+
/** Escape closes the topmost dialog (default true). */
|
|
901
|
+
closeOnEscape: boolean;
|
|
902
|
+
/** Overlay click closes. Unset: true, except for an `alert` content. */
|
|
903
|
+
closeOnClickOutside: boolean | undefined;
|
|
904
|
+
private _visible;
|
|
905
|
+
private _focusFrame;
|
|
906
|
+
/** Whether the dialog is currently shown. */
|
|
907
|
+
get isOpen(): boolean;
|
|
908
|
+
private get _controlled();
|
|
909
|
+
/** This dialog's own content (never a nested dialog's). */
|
|
910
|
+
get contentElement(): AnduinDialogContent | null;
|
|
911
|
+
private get _trigger();
|
|
912
|
+
connectedCallback(): void;
|
|
913
|
+
disconnectedCallback(): void;
|
|
914
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
915
|
+
render(): TemplateResult<1>;
|
|
916
|
+
/** Open or close as a user action would: controlled mode fires `anduin-dialog-open-change` first. */
|
|
917
|
+
requestOpen(wantOpen: boolean): void;
|
|
918
|
+
toggle(): void;
|
|
919
|
+
/** Overlay click: close, or shake when click-outside is off. */
|
|
920
|
+
requestCloseFromOutside(): void;
|
|
921
|
+
private get _closesOnClickOutside();
|
|
922
|
+
private _show;
|
|
923
|
+
private _hide;
|
|
924
|
+
private _attach;
|
|
925
|
+
private _detach;
|
|
926
|
+
/** Focus goes back to the trigger's control after the closed frame renders. */
|
|
927
|
+
private _focusTrigger;
|
|
928
|
+
private _onDocKeyDown;
|
|
929
|
+
/** ACL interop: an `anduin-modal-close` inside the dialog closes it too. */
|
|
930
|
+
private _onLegacyClose;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/** The scrolling middle region. `flush` drops its 16px 24px padding. */
|
|
934
|
+
declare class AnduinDialogBody extends LitElement {
|
|
935
|
+
static styles: CSSResult;
|
|
936
|
+
flush: boolean;
|
|
937
|
+
render(): TemplateResult<1>;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/** Closes its dialog when anything inside it is clicked (both modes; ignores close-on-click-outside). */
|
|
941
|
+
declare class AnduinDialogClose extends LitElement {
|
|
942
|
+
static styles: CSSResult;
|
|
943
|
+
connectedCallback(): void;
|
|
944
|
+
disconnectedCallback(): void;
|
|
945
|
+
private _onClick;
|
|
946
|
+
render(): TemplateResult<1>;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* The overlay + panel. Hidden until its dialog opens; then fixed over the
|
|
951
|
+
* viewport, body scroll locked, focus moved in and trapped.
|
|
952
|
+
*/
|
|
953
|
+
declare class AnduinDialogContent extends LitElement {
|
|
954
|
+
static styles: CSSResult[];
|
|
955
|
+
/** small (480) | medium (720) | large (960) | extraLarge (1160) | full | fitContent, or any CSS width. */
|
|
956
|
+
width: DialogWidth | string;
|
|
957
|
+
/** fill (75vh), or any CSS height. Unset: fits content. */
|
|
958
|
+
height: DialogHeight | string;
|
|
959
|
+
/** Move focus into the dialog on open (default true). */
|
|
960
|
+
autoFocus: boolean;
|
|
961
|
+
/** Alert dialog: role="alertdialog", focus on the first close action, overlay click does not close. */
|
|
962
|
+
alert: boolean;
|
|
963
|
+
/** Explicit accessible name; overrides the title. */
|
|
964
|
+
dialogLabel: string | null;
|
|
965
|
+
private _leaving;
|
|
966
|
+
private _shown;
|
|
967
|
+
private _holdsScrollLock;
|
|
968
|
+
private _leaveTimer;
|
|
969
|
+
private _focusFrame;
|
|
970
|
+
private get _dialog();
|
|
971
|
+
private get _panel();
|
|
972
|
+
connectedCallback(): void;
|
|
973
|
+
disconnectedCallback(): void;
|
|
974
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
975
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
976
|
+
private _applySizing;
|
|
977
|
+
/** Follow the owning dialog's open state (called by the root). */
|
|
978
|
+
syncOpen(): void;
|
|
979
|
+
private _enter;
|
|
980
|
+
private _exit;
|
|
981
|
+
private _releaseScroll;
|
|
982
|
+
/** Own descendants matching `selector` (never a nested dialog's). */
|
|
983
|
+
private _own;
|
|
984
|
+
/** `[autofocus]` / `[data-autofocus]` first, then (alert) the first close action, else the panel. */
|
|
985
|
+
private _focusInitial;
|
|
986
|
+
/** Keep Tab / Shift+Tab inside the panel (called by the root while topmost). */
|
|
987
|
+
trapTab(e: KeyboardEvent): void;
|
|
988
|
+
/** Play the "can't dismiss" nudge (overlay click with click-outside off). */
|
|
989
|
+
shake(): void;
|
|
990
|
+
/**
|
|
991
|
+
* Name / describe the panel from this content's own title and description.
|
|
992
|
+
* IDREFs cannot cross the shadow boundary, so their text is copied into
|
|
993
|
+
* `aria-label` / `aria-description`, as the design repo does.
|
|
994
|
+
*/
|
|
995
|
+
refreshAccessibleText(): void;
|
|
996
|
+
private _onOverlayClick;
|
|
997
|
+
render(): TemplateResult<1>;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
/** Supporting text under the title; also becomes the panel's accessible description. */
|
|
1001
|
+
declare class AnduinDialogDescription extends DialogTextElement {
|
|
1002
|
+
static styles: CSSResult;
|
|
1003
|
+
render(): TemplateResult<1>;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
/** Right-aligned action row. `divider` draws a line above it. */
|
|
1007
|
+
declare class AnduinDialogFooter extends LitElement {
|
|
1008
|
+
static styles: CSSResult;
|
|
1009
|
+
divider: boolean;
|
|
1010
|
+
render(): TemplateResult<1>;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/** Title + description block. `divider` draws a line below it. */
|
|
1014
|
+
declare class AnduinDialogHeader extends LitElement {
|
|
1015
|
+
static styles: CSSResult;
|
|
1016
|
+
divider: boolean;
|
|
1017
|
+
render(): TemplateResult<1>;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* A full-viewport backdrop around its children; a click on the backdrop itself
|
|
1022
|
+
* (not on the children) asks the dialog to close. `anduin-dialog-content`
|
|
1023
|
+
* already draws its own overlay; this is for custom compositions.
|
|
1024
|
+
*/
|
|
1025
|
+
declare class AnduinDialogOverlay extends LitElement {
|
|
1026
|
+
static styles: CSSResult;
|
|
1027
|
+
private _onClick;
|
|
1028
|
+
render(): TemplateResult<1>;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
/** `<h2>` heading with a built-in close (×) button; `show-close-button="false"` hides it. */
|
|
1032
|
+
declare class AnduinDialogTitle extends DialogTextElement {
|
|
1033
|
+
static styles: CSSResult;
|
|
1034
|
+
showCloseButton: boolean;
|
|
1035
|
+
render(): TemplateResult<1>;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/** Wraps the control that opens the dialog; click / Enter / Space toggles it. */
|
|
1039
|
+
declare class AnduinDialogTrigger extends LitElement {
|
|
1040
|
+
static styles: CSSResult;
|
|
1041
|
+
connectedCallback(): void;
|
|
1042
|
+
disconnectedCallback(): void;
|
|
1043
|
+
private _onClick;
|
|
1044
|
+
private _onKeyDown;
|
|
1045
|
+
render(): TemplateResult<1>;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
438
1048
|
declare class AnduinDivider extends LitElement {
|
|
439
1049
|
static styles: CSSResult;
|
|
440
1050
|
direction: string;
|
|
@@ -891,35 +1501,220 @@ declare class AnduinLoadingState extends LitElement {
|
|
|
891
1501
|
declare class AnduinMenu extends LitElement {
|
|
892
1502
|
static styles: CSSResult;
|
|
893
1503
|
open: boolean;
|
|
894
|
-
|
|
1504
|
+
/**
|
|
1505
|
+
* Old API: `bottom-start | bottom | bottom-end | top-start | top | top-end`. With the design parts, any of the
|
|
1506
|
+
* 12 design placements (`top|bottom|left|right` × `start|center|end`).
|
|
1507
|
+
*/
|
|
1508
|
+
placement: string;
|
|
1509
|
+
defaultOpen: boolean;
|
|
1510
|
+
disabled: boolean;
|
|
1511
|
+
offsetX: number;
|
|
1512
|
+
offsetY: number;
|
|
1513
|
+
/** True when the children are design parts rather than `slot="trigger"` + items. */
|
|
1514
|
+
private _design;
|
|
895
1515
|
private _triggerEl;
|
|
896
1516
|
private _panelEl;
|
|
897
1517
|
private _onTriggerClick;
|
|
1518
|
+
/** Whether the design parts are in use (rather than `slot="trigger"`). */
|
|
1519
|
+
get isDesignMode(): boolean;
|
|
1520
|
+
private _detectMode;
|
|
1521
|
+
private _ownParts;
|
|
1522
|
+
/* Excluded from this release type: triggerPart */
|
|
1523
|
+
private get _contentPart();
|
|
1524
|
+
/** Design API: ask for a new open state. Fires `anduin-menu-open-change`, then applies it. */
|
|
1525
|
+
requestOpen(want: boolean): void;
|
|
1526
|
+
/* Excluded from this release type: toggleFromTrigger */
|
|
1527
|
+
/* Excluded from this release type: openAndFocus */
|
|
1528
|
+
private _overlay;
|
|
1529
|
+
private _onDesignPointerDown;
|
|
1530
|
+
private _onItemCommit;
|
|
1531
|
+
private _applyDesignOpen;
|
|
898
1532
|
private _onOutsideClick;
|
|
899
1533
|
private _onItemClick;
|
|
900
1534
|
private _onScrollOrResize;
|
|
901
1535
|
connectedCallback(): void;
|
|
902
1536
|
disconnectedCallback(): void;
|
|
1537
|
+
private _defaultOpenApplied;
|
|
1538
|
+
willUpdate(changed: Map<string, unknown>): void;
|
|
903
1539
|
updated(changed: Map<string, unknown>): void;
|
|
904
1540
|
private _updatePosition;
|
|
905
1541
|
render(): TemplateResult<1>;
|
|
906
1542
|
}
|
|
907
1543
|
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
1544
|
+
/**
|
|
1545
|
+
* The menu popup (`role="menu"`), shown in the top layer next to the trigger. With `standalone`, it renders inline
|
|
1546
|
+
* with no popup chrome — for a menu list inside a popover or a panel.
|
|
1547
|
+
*/
|
|
1548
|
+
declare class AnduinMenuContent extends MenuSurface {
|
|
1549
|
+
static styles: CSSResult[];
|
|
1550
|
+
/** Accessible name; defaults to the trigger's text. */
|
|
1551
|
+
label: string;
|
|
1552
|
+
/** Render inline, without a trigger or popup. Read once, on connect. */
|
|
1553
|
+
standalone: boolean;
|
|
1554
|
+
firstUpdated(): void;
|
|
1555
|
+
protected _beforeShow(): void;
|
|
1556
|
+
protected _anchor(): {
|
|
1557
|
+
ref: HTMLElement;
|
|
1558
|
+
placement: "top-start" | "top-center" | "top-end" | "right-start" | "right-center" | "right-end" | "bottom-start" | "bottom-center" | "bottom-end" | "left-start" | "left-center" | "left-end";
|
|
1559
|
+
dx: number;
|
|
1560
|
+
dy: number;
|
|
1561
|
+
} | null;
|
|
914
1562
|
render(): TemplateResult<1>;
|
|
915
1563
|
}
|
|
916
1564
|
|
|
917
|
-
|
|
1565
|
+
/** Groups related items (`role="group"`), usually under an `anduin-menu-label`. */
|
|
1566
|
+
declare class AnduinMenuGroup extends LitElement {
|
|
918
1567
|
static styles: CSSResult;
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
1568
|
+
render(): TemplateResult<1>;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
/**
|
|
1572
|
+
* A menu item. Old API: `icon`, `variant="default|danger"`, `disabled`, fires `anduin-menu-item:click`.
|
|
1573
|
+
* Design API adds `start-icon`, `variant="gray"`, `checked` (+ `radio`), `inset`, `loading`, `href` (+ `open-new-tab`),
|
|
1574
|
+
* `size="medium|free"`, `description` (or `slot="description"`), `label`, and the cancelable
|
|
1575
|
+
* `anduin-menu-item-selected` event. Inside `anduin-menu-content` it also takes the design repo's metrics
|
|
1576
|
+
* (32px row, 8px icon gap) and roving focus.
|
|
1577
|
+
*/
|
|
1578
|
+
declare class AnduinMenuItem extends LitElement {
|
|
1579
|
+
static shadowRootOptions: {
|
|
1580
|
+
delegatesFocus: boolean;
|
|
1581
|
+
clonable?: boolean;
|
|
1582
|
+
customElementRegistry?: CustomElementRegistry;
|
|
1583
|
+
mode: ShadowRootMode;
|
|
1584
|
+
serializable?: boolean;
|
|
1585
|
+
slotAssignment?: SlotAssignmentMode;
|
|
1586
|
+
};
|
|
1587
|
+
static styles: CSSResult;
|
|
1588
|
+
/** Old API: icon before the label. Same as `start-icon`. */
|
|
1589
|
+
icon: string;
|
|
1590
|
+
/** Design API: icon before the label. */
|
|
1591
|
+
startIcon: string;
|
|
1592
|
+
/** `default` / `gray` (same thing) or `danger`. */
|
|
1593
|
+
variant: 'default' | 'gray' | 'danger';
|
|
1594
|
+
disabled: boolean;
|
|
1595
|
+
/** Present (any value but `"false"` means on): a checkable item showing a check. Absent: a plain item. */
|
|
1596
|
+
checked: boolean | undefined;
|
|
1597
|
+
/** With `checked`: one of a set where a single option is on (announced as a radio item). */
|
|
1598
|
+
radio: boolean;
|
|
1599
|
+
/** Indent the label to line up with items that have an icon. */
|
|
1600
|
+
inset: boolean;
|
|
1601
|
+
/** Busy: a spinner replaces the icon and activation is blocked. */
|
|
1602
|
+
loading: boolean;
|
|
1603
|
+
/** Render as a link. */
|
|
1604
|
+
href: string;
|
|
1605
|
+
openNewTab: boolean;
|
|
1606
|
+
/** `medium` (32px row, default) or `free` (content height). */
|
|
1607
|
+
size: 'medium' | 'free';
|
|
1608
|
+
/** Second line under the label. Rich content can go in `slot="description"` instead. */
|
|
1609
|
+
description: string;
|
|
1610
|
+
/** Accessible name for the item when its text isn't enough. */
|
|
1611
|
+
label: string;
|
|
1612
|
+
private _design;
|
|
1613
|
+
private _slottedDescription;
|
|
1614
|
+
connectedCallback(): void;
|
|
1615
|
+
disconnectedCallback(): void;
|
|
1616
|
+
private _onHostClickCapture;
|
|
1617
|
+
private _onClick;
|
|
1618
|
+
private _onKeyDown;
|
|
1619
|
+
private _onPointerEnter;
|
|
1620
|
+
private _onDescriptionSlotChange;
|
|
1621
|
+
render(): TemplateResult<1>;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
/** A non-interactive heading inside a menu. */
|
|
1625
|
+
declare class AnduinMenuLabel extends LitElement {
|
|
1626
|
+
static styles: CSSResult;
|
|
1627
|
+
render(): TemplateResult<1>;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
/** A 1px divider between menu sections. */
|
|
1631
|
+
declare class AnduinMenuSeparator extends LitElement {
|
|
1632
|
+
static styles: CSSResult;
|
|
1633
|
+
render(): TemplateResult<1>;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* A nested menu: holds an `anduin-menu-sub-trigger` and an `anduin-menu-sub-content`. Opens on hover (and stays
|
|
1638
|
+
* open while the pointer is over the trigger or the panel), on click, and on ArrowRight / Enter / Space.
|
|
1639
|
+
*/
|
|
1640
|
+
declare class AnduinMenuSub extends LitElement {
|
|
1641
|
+
static styles: CSSResult;
|
|
1642
|
+
/** Where the sub-menu opens relative to its trigger (default `right-start`; flips when there's no room). */
|
|
1643
|
+
placement: string;
|
|
1644
|
+
private _open;
|
|
1645
|
+
private _closeTimer;
|
|
1646
|
+
get open(): boolean;
|
|
1647
|
+
private _own;
|
|
1648
|
+
/* Excluded from this release type: triggerPart */
|
|
1649
|
+
/* Excluded from this release type: contentPart */
|
|
1650
|
+
setOpen(open: boolean): void;
|
|
1651
|
+
/** Opens and moves focus to the first item of the sub-menu. */
|
|
1652
|
+
openAndFocusFirst(): Promise<void>;
|
|
1653
|
+
/** Closes and returns focus to the sub-trigger. */
|
|
1654
|
+
closeAndFocusTrigger(): void;
|
|
1655
|
+
/* Excluded from this release type: scheduleClose */
|
|
1656
|
+
/* Excluded from this release type: cancelClose */
|
|
1657
|
+
disconnectedCallback(): void;
|
|
1658
|
+
render(): TemplateResult<1>;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
/** The panel of a sub-menu. ArrowLeft or Escape inside it closes it and returns focus to the sub-trigger. */
|
|
1662
|
+
declare class AnduinMenuSubContent extends MenuSurface {
|
|
1663
|
+
static styles: CSSResult;
|
|
1664
|
+
private get _sub();
|
|
1665
|
+
firstUpdated(): void;
|
|
1666
|
+
protected _anchor(): {
|
|
1667
|
+
ref: AnduinMenuSubTrigger;
|
|
1668
|
+
placement: "top-start" | "top-center" | "top-end" | "right-start" | "right-center" | "right-end" | "bottom-start" | "bottom-center" | "bottom-end" | "left-start" | "left-center" | "left-end";
|
|
1669
|
+
dx: number;
|
|
1670
|
+
dy: number;
|
|
1671
|
+
} | null;
|
|
1672
|
+
protected _handleOwnKey(e: KeyboardEvent): boolean;
|
|
1673
|
+
private _onPointerEnter;
|
|
1674
|
+
private _onPointerLeave;
|
|
1675
|
+
render(): TemplateResult<1>;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
/** The item that opens a sub-menu: an item row with a trailing chevron. */
|
|
1679
|
+
declare class AnduinMenuSubTrigger extends LitElement {
|
|
1680
|
+
static shadowRootOptions: {
|
|
1681
|
+
delegatesFocus: boolean;
|
|
1682
|
+
clonable?: boolean;
|
|
1683
|
+
customElementRegistry?: CustomElementRegistry;
|
|
1684
|
+
mode: ShadowRootMode;
|
|
1685
|
+
serializable?: boolean;
|
|
1686
|
+
slotAssignment?: SlotAssignmentMode;
|
|
1687
|
+
};
|
|
1688
|
+
static styles: CSSResult;
|
|
1689
|
+
disabled: boolean;
|
|
1690
|
+
inset: boolean;
|
|
1691
|
+
startIcon: string;
|
|
1692
|
+
private _expanded;
|
|
1693
|
+
private get _sub();
|
|
1694
|
+
/* Excluded from this release type: setExpanded */
|
|
1695
|
+
private _onPointerEnter;
|
|
1696
|
+
private _onPointerLeave;
|
|
1697
|
+
private _onClick;
|
|
1698
|
+
private _onKeyDown;
|
|
1699
|
+
render(): TemplateResult<1>;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
/** Wraps the element that opens the menu. Click toggles; Enter/Space/ArrowDown open on the first item, ArrowUp on the last. */
|
|
1703
|
+
declare class AnduinMenuTrigger extends LitElement {
|
|
1704
|
+
static styles: CSSResult;
|
|
1705
|
+
connectedCallback(): void;
|
|
1706
|
+
disconnectedCallback(): void;
|
|
1707
|
+
private _onClick;
|
|
1708
|
+
private _onKeyDown;
|
|
1709
|
+
render(): TemplateResult<1>;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
declare class AnduinModal extends LitElement {
|
|
1713
|
+
static styles: CSSResult[];
|
|
1714
|
+
open: boolean;
|
|
1715
|
+
heading: string;
|
|
1716
|
+
hideHeader: boolean;
|
|
1717
|
+
hideFooter: boolean;
|
|
923
1718
|
maxWidth: "480" | "600" | "720" | "960" | "1160" | string;
|
|
924
1719
|
fullscreen: boolean;
|
|
925
1720
|
private _leaving;
|
|
@@ -975,15 +1770,86 @@ declare class AnduinNavigation extends LitElement {
|
|
|
975
1770
|
value: string | null;
|
|
976
1771
|
theme: NavigationTheme;
|
|
977
1772
|
alignment: NavigationAlignment;
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1773
|
+
protected internalValue: string;
|
|
1774
|
+
protected get isControlled(): boolean;
|
|
1775
|
+
protected get selection(): string;
|
|
981
1776
|
connectedCallback(): void;
|
|
982
1777
|
disconnectedCallback(): void;
|
|
983
1778
|
updated(): void;
|
|
984
|
-
|
|
985
|
-
|
|
1779
|
+
protected get items(): AnduinNavigationItem[];
|
|
1780
|
+
protected syncItems(): void;
|
|
986
1781
|
private onItemClick;
|
|
1782
|
+
/** Reacts to an item activation. Subclasses (e.g. anduin-navigation-bar) override the event contract. */
|
|
1783
|
+
protected handleItemClick(clicked: string): void;
|
|
1784
|
+
render(): TemplateResult<1>;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* The design repo's `anduin-navigation-bar`: primary navigation between peer pages.
|
|
1789
|
+
*
|
|
1790
|
+
* Selection is uncontrolled with `default-value`, controlled with `value`, and falls back to the first
|
|
1791
|
+
* item when neither is set. Every activation fires `anduin-navigation-bar-value-change` (`detail: { value }`).
|
|
1792
|
+
* When the items no longer fit, previous/next arrow buttons appear and the active item is scrolled into view.
|
|
1793
|
+
* Items stay ordinary light-DOM children, so they can be wrapped (e.g. in a tooltip trigger).
|
|
1794
|
+
*
|
|
1795
|
+
* Built on `anduin-navigation`'s selection model; `anduin-navigation` itself is unchanged.
|
|
1796
|
+
*/
|
|
1797
|
+
declare class AnduinNavigationBar extends AnduinNavigation {
|
|
1798
|
+
static styles: CSSResult;
|
|
1799
|
+
private overflowing;
|
|
1800
|
+
private viewport;
|
|
1801
|
+
private resizeObserver?;
|
|
1802
|
+
private mutationObserver?;
|
|
1803
|
+
private layoutFrame;
|
|
1804
|
+
connectedCallback(): void;
|
|
1805
|
+
disconnectedCallback(): void;
|
|
1806
|
+
willUpdate(changed: Map<PropertyKey, unknown>): void;
|
|
1807
|
+
firstUpdated(): void;
|
|
1808
|
+
/** Items owned by this bar (nested bars keep their own). */
|
|
1809
|
+
protected get items(): AnduinNavigationBarItem[];
|
|
1810
|
+
protected syncItems(): void;
|
|
1811
|
+
protected handleItemClick(clicked: string): void;
|
|
1812
|
+
private refreshObserved;
|
|
1813
|
+
private scheduleLayout;
|
|
1814
|
+
private updateLayout;
|
|
1815
|
+
private scrollOneItem;
|
|
1816
|
+
private scheduleScrollToValue;
|
|
1817
|
+
private scrollToItem;
|
|
1818
|
+
private renderArrow;
|
|
1819
|
+
render(): TemplateResult<1>;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* The design repo's `anduin-navigation-bar-item`. Renders a native link when `href` is set, otherwise a
|
|
1824
|
+
* native button. `selected` (when present) overrides the bar's selection for this item.
|
|
1825
|
+
*/
|
|
1826
|
+
declare class AnduinNavigationBarItem extends AnduinNavigationItem {
|
|
1827
|
+
static shadowRootOptions: {
|
|
1828
|
+
delegatesFocus: boolean;
|
|
1829
|
+
clonable?: boolean;
|
|
1830
|
+
customElementRegistry?: CustomElementRegistry;
|
|
1831
|
+
mode: ShadowRootMode;
|
|
1832
|
+
serializable?: boolean;
|
|
1833
|
+
slotAssignment?: SlotAssignmentMode;
|
|
1834
|
+
};
|
|
1835
|
+
static styles: CSSResult;
|
|
1836
|
+
/** Design boolean: `disabled="false"` is enabled. */
|
|
1837
|
+
disabled: boolean;
|
|
1838
|
+
/** Opens `href` in a new tab (`target="_blank"`, `rel="noreferrer noopener"`). */
|
|
1839
|
+
openNewTab: boolean;
|
|
1840
|
+
/**
|
|
1841
|
+
* Per-item selection override (attribute `selected`, design boolean). Unset (`null` / `undefined`, or the
|
|
1842
|
+
* attribute removed) means "follow the bar". Typed `boolean` to stay compatible with the base item.
|
|
1843
|
+
*/
|
|
1844
|
+
selected: boolean;
|
|
1845
|
+
/** Set by the parent anduin-navigation-bar; not a consumer-facing attribute. */
|
|
1846
|
+
barSelected: boolean;
|
|
1847
|
+
/** Mirrored onto the inner control, e.g. to name an icon-only item. */
|
|
1848
|
+
controlLabel: string | null;
|
|
1849
|
+
/** Whether the item renders as selected: the `selected` override, else the bar's value. */
|
|
1850
|
+
get isSelected(): boolean;
|
|
1851
|
+
updated(): void;
|
|
1852
|
+
private onControlClick;
|
|
987
1853
|
render(): TemplateResult<1>;
|
|
988
1854
|
}
|
|
989
1855
|
|
|
@@ -1003,6 +1869,57 @@ declare class AnduinNavigationItem extends LitElement {
|
|
|
1003
1869
|
render(): TemplateResult<1>;
|
|
1004
1870
|
}
|
|
1005
1871
|
|
|
1872
|
+
/**
|
|
1873
|
+
* `<anduin-non-ideal-state>` — the design repo's empty / unavailable / error state.
|
|
1874
|
+
*
|
|
1875
|
+
* Fills its parent (`width` and `height: 100%`) and centers its regions in a column with a 12px gap. Compose it
|
|
1876
|
+
* from any of `anduin-non-ideal-state-icon`, `-title`, `-description` and `-action`; a region left out takes no
|
|
1877
|
+
* space. Give the parent an intentional height.
|
|
1878
|
+
*/
|
|
1879
|
+
declare class AnduinNonIdealState extends LitElement {
|
|
1880
|
+
static styles: CSSResult;
|
|
1881
|
+
render(): TemplateResult<1>;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
/** `<anduin-non-ideal-state-action>` — action region; holds one or more buttons or links, intentionally unstyled. */
|
|
1885
|
+
declare class AnduinNonIdealStateAction extends LitElement {
|
|
1886
|
+
static styles: CSSResult;
|
|
1887
|
+
render(): TemplateResult<1>;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* `<anduin-non-ideal-state-description>` — secondary text in the muted foreground colour, 13px / 20px. (The design
|
|
1892
|
+
* repo inherits both from its page base, which is 13px / 20px; ACL pages do not set a body line-height, so it is
|
|
1893
|
+
* explicit here.)
|
|
1894
|
+
*/
|
|
1895
|
+
declare class AnduinNonIdealStateDescription extends LitElement {
|
|
1896
|
+
static styles: CSSResult;
|
|
1897
|
+
render(): TemplateResult<1>;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* `<anduin-non-ideal-state-icon>` — icon region; its content is intentionally unstyled.
|
|
1902
|
+
*
|
|
1903
|
+
* Sets `aria-hidden="true"` on itself unless the consumer already wrote an `aria-hidden` (e.g. `"false"` for an
|
|
1904
|
+
* icon that carries meaning the title does not).
|
|
1905
|
+
*/
|
|
1906
|
+
declare class AnduinNonIdealStateIcon extends LitElement {
|
|
1907
|
+
static styles: CSSResult;
|
|
1908
|
+
connectedCallback(): void;
|
|
1909
|
+
render(): TemplateResult<1>;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
/**
|
|
1913
|
+
* `<anduin-non-ideal-state-title>` — the title, exposed as a heading (`role="heading"`, `aria-level` from
|
|
1914
|
+
* `heading-level`, default 2). 17px / 28px semibold.
|
|
1915
|
+
*/
|
|
1916
|
+
declare class AnduinNonIdealStateTitle extends LitElement {
|
|
1917
|
+
static styles: CSSResult;
|
|
1918
|
+
/** Heading level, 1–6. Anything else falls back to 2. */
|
|
1919
|
+
headingLevel: number | string | null;
|
|
1920
|
+
render(): TemplateResult<1>;
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1006
1923
|
/**
|
|
1007
1924
|
* Page navigation controls for paginated content. Renders a row of page-number
|
|
1008
1925
|
* buttons with previous/next navigators, ellipsis menus for skipped ranges, and
|
|
@@ -1061,20 +1978,49 @@ declare class AnduinPaginationLastPage extends BoundaryButton {
|
|
|
1061
1978
|
declare class AnduinPopover extends LitElement {
|
|
1062
1979
|
static styles: CSSResult;
|
|
1063
1980
|
open: boolean;
|
|
1064
|
-
|
|
1981
|
+
/**
|
|
1982
|
+
* Old API: `bottom-start | bottom | bottom-end | top-start | top | top-end`. With the design parts, any of the
|
|
1983
|
+
* 12 design placements (`top|bottom|left|right` × `start|center|end`).
|
|
1984
|
+
*/
|
|
1985
|
+
placement: string;
|
|
1065
1986
|
fullWidth: boolean;
|
|
1987
|
+
defaultOpen: boolean;
|
|
1988
|
+
disabled: boolean;
|
|
1989
|
+
offsetX: number;
|
|
1990
|
+
offsetY: number;
|
|
1991
|
+
closeOnEscape: boolean;
|
|
1992
|
+
closeOnClickOutside: boolean;
|
|
1993
|
+
/** True when the children are design parts rather than `slot="trigger"` + panel content. */
|
|
1994
|
+
private _design;
|
|
1066
1995
|
private _visible;
|
|
1067
1996
|
private _closing;
|
|
1068
1997
|
private _triggerEl;
|
|
1069
1998
|
private _panelEl;
|
|
1070
1999
|
private _closeTransitionEndHandler;
|
|
1071
2000
|
private _onTriggerClick;
|
|
2001
|
+
/** Whether the design parts are in use (rather than `slot="trigger"`). */
|
|
2002
|
+
get isDesignMode(): boolean;
|
|
2003
|
+
private _detectMode;
|
|
2004
|
+
private _ownParts;
|
|
2005
|
+
/* Excluded from this release type: triggerPart */
|
|
2006
|
+
private get _contentPart();
|
|
2007
|
+
/**
|
|
2008
|
+
* Design API: ask for a new open state. Fires `anduin-popover-open-change`, then applies it. (The design repo's
|
|
2009
|
+
* controlled mode writes `open` itself as well, so controlled and uncontrolled behave alike.)
|
|
2010
|
+
*/
|
|
2011
|
+
requestOpen(want: boolean): void;
|
|
2012
|
+
/* Excluded from this release type: toggleFromTrigger */
|
|
2013
|
+
private _overlay;
|
|
2014
|
+
private _onDesignPointerDown;
|
|
1072
2015
|
private _onOutsideClick;
|
|
1073
2016
|
private _onScrollOrResize;
|
|
1074
2017
|
private _onPopoverClose;
|
|
1075
2018
|
connectedCallback(): void;
|
|
1076
2019
|
disconnectedCallback(): void;
|
|
2020
|
+
private _defaultOpenApplied;
|
|
2021
|
+
willUpdate(changed: Map<string, unknown>): void;
|
|
1077
2022
|
updated(changed: Map<string, unknown>): void;
|
|
2023
|
+
private _applyDesignOpen;
|
|
1078
2024
|
private _cancelCloseAnimation;
|
|
1079
2025
|
private _startCloseAnimation;
|
|
1080
2026
|
private _updatePosition;
|
|
@@ -1087,6 +2033,52 @@ declare class AnduinPopoverClose extends LitElement {
|
|
|
1087
2033
|
render(): TemplateResult<1>;
|
|
1088
2034
|
}
|
|
1089
2035
|
|
|
2036
|
+
/**
|
|
2037
|
+
* The floating panel. Promoted to the top layer (Popover API), positioned against the trigger every frame while
|
|
2038
|
+
* open, flips when there's no room, traps Tab and moves focus inside on open (unless `auto-focus="false"`).
|
|
2039
|
+
*/
|
|
2040
|
+
declare class AnduinPopoverContent extends LitElement {
|
|
2041
|
+
static styles: CSSResult;
|
|
2042
|
+
/** Move focus to the first focusable element on open (default true). */
|
|
2043
|
+
autoFocus: boolean;
|
|
2044
|
+
/** Marks the popup `aria-modal="true"`. */
|
|
2045
|
+
modal: boolean;
|
|
2046
|
+
/** Accessible name; defaults to the text of an `anduin-popover-title` inside. */
|
|
2047
|
+
label: string;
|
|
2048
|
+
private _popup;
|
|
2049
|
+
private _active;
|
|
2050
|
+
private _shown;
|
|
2051
|
+
private _stopTracking;
|
|
2052
|
+
private _focusFrame;
|
|
2053
|
+
/* Excluded from this release type: setActive */
|
|
2054
|
+
firstUpdated(): void;
|
|
2055
|
+
connectedCallback(): void;
|
|
2056
|
+
disconnectedCallback(): void;
|
|
2057
|
+
private _onKeyDown;
|
|
2058
|
+
private _sync;
|
|
2059
|
+
private _accessibleName;
|
|
2060
|
+
private _show;
|
|
2061
|
+
private _hide;
|
|
2062
|
+
private _position;
|
|
2063
|
+
render(): TemplateResult<1>;
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
/** Heading for the content panel, with a built-in close (×) button. */
|
|
2067
|
+
declare class AnduinPopoverTitle extends LitElement {
|
|
2068
|
+
static styles: CSSResult;
|
|
2069
|
+
render(): TemplateResult<1>;
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
/** Wraps the element that opens the popover. Click, Enter and Space toggle it. */
|
|
2073
|
+
declare class AnduinPopoverTrigger extends LitElement {
|
|
2074
|
+
static styles: CSSResult;
|
|
2075
|
+
connectedCallback(): void;
|
|
2076
|
+
disconnectedCallback(): void;
|
|
2077
|
+
private _onClick;
|
|
2078
|
+
private _onKeyDown;
|
|
2079
|
+
render(): TemplateResult<1>;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
1090
2082
|
declare class AnduinProgress extends LitElement {
|
|
1091
2083
|
static styles: CSSResult;
|
|
1092
2084
|
percent: string;
|
|
@@ -1186,6 +2178,463 @@ declare class AnduinResizablePanelGroup extends LitElement {
|
|
|
1186
2178
|
render(): TemplateResult<1>;
|
|
1187
2179
|
}
|
|
1188
2180
|
|
|
2181
|
+
/**
|
|
2182
|
+
* `<anduin-select>` — the design repo's compound single-value select: a free-form
|
|
2183
|
+
* `<anduin-select-trigger>` (usually an `anduin-button`) and an `<anduin-select-content>` popup holding an
|
|
2184
|
+
* optional search input, header/footer, empty state and an `<anduin-select-list>` of items.
|
|
2185
|
+
*
|
|
2186
|
+
* The parts are light-DOM children that find this root with `closest()`; the root drives them imperatively
|
|
2187
|
+
* (selected/highlighted/hidden state, the selected label, the clear ✕) whenever its value, the query or the
|
|
2188
|
+
* markup changes. `anduin-dropdown` (options as a JS array) is a separate element and keeps its own API.
|
|
2189
|
+
*/
|
|
2190
|
+
declare class AnduinSelect extends LitElement {
|
|
2191
|
+
static styles: CSSResult[];
|
|
2192
|
+
/** The selected item's value. Set it to control the select; a pick also writes it back (reflected). */
|
|
2193
|
+
value: string;
|
|
2194
|
+
/** Where the popup opens relative to the trigger. */
|
|
2195
|
+
placement: SelectPlacement;
|
|
2196
|
+
/** While true the list shows a spinner and selection/navigation pause. `loading="false"` is false. */
|
|
2197
|
+
loading: boolean;
|
|
2198
|
+
/** Fixed row height in px for every item (default 32). */
|
|
2199
|
+
itemHeight: number | null;
|
|
2200
|
+
private _announcement;
|
|
2201
|
+
private _open;
|
|
2202
|
+
private _query;
|
|
2203
|
+
private _highlighted;
|
|
2204
|
+
private _ignorePointer;
|
|
2205
|
+
private _typeahead;
|
|
2206
|
+
private _typeaheadTimer;
|
|
2207
|
+
private _syncQueued;
|
|
2208
|
+
private _focusFrame;
|
|
2209
|
+
private _rankedOrder;
|
|
2210
|
+
private _observer;
|
|
2211
|
+
/** Whether the dropdown is open. */
|
|
2212
|
+
get open(): boolean;
|
|
2213
|
+
connectedCallback(): void;
|
|
2214
|
+
disconnectedCallback(): void;
|
|
2215
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
2216
|
+
render(): TemplateResult<1>;
|
|
2217
|
+
private _own;
|
|
2218
|
+
/* Excluded from this release type: _trigger */
|
|
2219
|
+
/* Excluded from this release type: _content */
|
|
2220
|
+
/* Excluded from this release type: _list */
|
|
2221
|
+
/* Excluded from this release type: _input */
|
|
2222
|
+
/* Excluded from this release type: _items */
|
|
2223
|
+
/** The label the trigger shows for a value: the matching item's label, else the raw value. */
|
|
2224
|
+
labelFor(value: string): string;
|
|
2225
|
+
/** Re-derive every part's state on the next microtask (parts call this when they connect or change). */
|
|
2226
|
+
requestSync(): void;
|
|
2227
|
+
private _sync;
|
|
2228
|
+
private _applyFilter;
|
|
2229
|
+
/** The accessible name: the trigger's `label`/`aria-label`, an enclosing field's label, else the placeholder. */
|
|
2230
|
+
private _comboboxName;
|
|
2231
|
+
private _syncTrigger;
|
|
2232
|
+
/** Opens the dropdown. */
|
|
2233
|
+
show(): void;
|
|
2234
|
+
/** Closes the dropdown without changing the value. */
|
|
2235
|
+
hide(): void;
|
|
2236
|
+
/** Opens a closed dropdown, closes an open one. */
|
|
2237
|
+
toggle(): void;
|
|
2238
|
+
private _close;
|
|
2239
|
+
private _teardownOpen;
|
|
2240
|
+
/** Clears the value (firing `change` with `''`), as the ✕ and Delete/Backspace do. */
|
|
2241
|
+
clear(): void;
|
|
2242
|
+
private _selectValue;
|
|
2243
|
+
private _focusTrigger;
|
|
2244
|
+
private _onItemSelected;
|
|
2245
|
+
private _onDocPointerDown;
|
|
2246
|
+
private _onDocPointerMove;
|
|
2247
|
+
private _onDocKeyDown;
|
|
2248
|
+
private _navigable;
|
|
2249
|
+
private _setHighlight;
|
|
2250
|
+
private _scrollIntoView;
|
|
2251
|
+
private _move;
|
|
2252
|
+
private _highlightEdge;
|
|
2253
|
+
private _selectHighlighted;
|
|
2254
|
+
private _typeaheadKey;
|
|
2255
|
+
/* Excluded from this release type: _hover */
|
|
2256
|
+
/* Excluded from this release type: _setQuery */
|
|
2257
|
+
/* Excluded from this release type: _onTriggerKeyDown */
|
|
2258
|
+
/* Excluded from this release type: _onInputKeyDown */
|
|
2259
|
+
/* Excluded from this release type: _onTriggerClick */
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
/** A small ✕ for the trigger, shown only while a value is selected. Clicking it clears without opening. */
|
|
2263
|
+
declare class AnduinSelectClear extends LitElement {
|
|
2264
|
+
static styles: CSSResult;
|
|
2265
|
+
visible: boolean;
|
|
2266
|
+
connectedCallback(): void;
|
|
2267
|
+
disconnectedCallback(): void;
|
|
2268
|
+
private _onClick;
|
|
2269
|
+
render(): TemplateResult<1>;
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
/**
|
|
2273
|
+
* The floating panel. Its light-DOM children (input, header, empty, list, footer) are slotted into a top-layer
|
|
2274
|
+
* popover positioned against the trigger. `width` pins a width in px (or any CSS length); otherwise it
|
|
2275
|
+
* shrink-wraps with a 160px minimum.
|
|
2276
|
+
*/
|
|
2277
|
+
declare class AnduinSelectContent extends LitElement {
|
|
2278
|
+
static styles: CSSResult;
|
|
2279
|
+
width: string | null;
|
|
2280
|
+
private _anchor;
|
|
2281
|
+
private _placement;
|
|
2282
|
+
private _list;
|
|
2283
|
+
private _frame;
|
|
2284
|
+
private _last;
|
|
2285
|
+
/* Excluded from this release type: popup */
|
|
2286
|
+
get isOpen(): boolean;
|
|
2287
|
+
connectedCallback(): void;
|
|
2288
|
+
disconnectedCallback(): void;
|
|
2289
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
2290
|
+
render(): TemplateResult<1>;
|
|
2291
|
+
/* Excluded from this release type: _show */
|
|
2292
|
+
/* Excluded from this release type: _hide */
|
|
2293
|
+
private _reposition;
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
/** Shown in place of the list when the search matches nothing. */
|
|
2297
|
+
declare class AnduinSelectEmpty extends LitElement {
|
|
2298
|
+
static styles: CSSResult;
|
|
2299
|
+
connectedCallback(): void;
|
|
2300
|
+
render(): TemplateResult<1>;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
/** Content pinned below the list, with a full-width divider above it. */
|
|
2304
|
+
declare class AnduinSelectFooter extends LitElement {
|
|
2305
|
+
static styles: CSSResult;
|
|
2306
|
+
render(): TemplateResult<1>;
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
/** Groups items under an `<anduin-select-label>`; hides when the search leaves it empty. */
|
|
2310
|
+
declare class AnduinSelectGroup extends LitElement {
|
|
2311
|
+
static styles: CSSResult;
|
|
2312
|
+
connectedCallback(): void;
|
|
2313
|
+
render(): TemplateResult<1>;
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
/** Content pinned above the list, with a full-width divider below it. */
|
|
2317
|
+
declare class AnduinSelectHeader extends LitElement {
|
|
2318
|
+
static styles: CSSResult;
|
|
2319
|
+
render(): TemplateResult<1>;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
/**
|
|
2323
|
+
* The search field inside the content. Typing filters the items by label (case-insensitive substring), or by
|
|
2324
|
+
* a custom `filter` / `rank` function set as a JS property. `size`: small (24px) / default (32px) / large (40px).
|
|
2325
|
+
*/
|
|
2326
|
+
declare class AnduinSelectInput extends LitElement {
|
|
2327
|
+
static styles: CSSResult;
|
|
2328
|
+
placeholder: string;
|
|
2329
|
+
size: SelectInputSize;
|
|
2330
|
+
/** Accessible name for the search box (the placeholder otherwise). */
|
|
2331
|
+
label: string;
|
|
2332
|
+
private _filter;
|
|
2333
|
+
private _rank;
|
|
2334
|
+
/** Custom match predicate (JS property). */
|
|
2335
|
+
get filter(): SelectItemFilter | null;
|
|
2336
|
+
set filter(fn: SelectItemFilter | null);
|
|
2337
|
+
/** Custom scoring function: matches and orders (JS property). Wins over `filter`. */
|
|
2338
|
+
get rank(): SelectItemRank | null;
|
|
2339
|
+
set rank(fn: SelectItemRank | null);
|
|
2340
|
+
private get _inputEl();
|
|
2341
|
+
/** The current query text. */
|
|
2342
|
+
get query(): string;
|
|
2343
|
+
connectedCallback(): void;
|
|
2344
|
+
focusInput(): void;
|
|
2345
|
+
/* Excluded from this release type: _reset */
|
|
2346
|
+
/* Excluded from this release type: _syncAria */
|
|
2347
|
+
private _onInput;
|
|
2348
|
+
private _onKeyDown;
|
|
2349
|
+
render(): TemplateResult<1>;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* One option. `value` is what the select reports; `label` is what the trigger shows and search matches
|
|
2354
|
+
* (default: the item's text). `description` (or a `slot="description"` child) adds a second line,
|
|
2355
|
+
* `start-icon` an icon, `disabled` keeps it visible but unselectable, `size="free"` lets custom content set
|
|
2356
|
+
* the height. Fires the cancelable `anduin-select-item-selected` when picked.
|
|
2357
|
+
*/
|
|
2358
|
+
declare class AnduinSelectItem extends LitElement {
|
|
2359
|
+
static styles: CSSResult;
|
|
2360
|
+
value: string;
|
|
2361
|
+
label: string | null;
|
|
2362
|
+
description: string;
|
|
2363
|
+
disabled: boolean;
|
|
2364
|
+
size: SelectItemSize;
|
|
2365
|
+
startIcon: string;
|
|
2366
|
+
/** Set by the root. */
|
|
2367
|
+
selected: boolean;
|
|
2368
|
+
/** Set by the root. */
|
|
2369
|
+
highlighted: boolean;
|
|
2370
|
+
private _hasSlottedDescription;
|
|
2371
|
+
/** The label used by the trigger, search and typeahead. */
|
|
2372
|
+
get labelText(): string;
|
|
2373
|
+
connectedCallback(): void;
|
|
2374
|
+
disconnectedCallback(): void;
|
|
2375
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
2376
|
+
private _onClick;
|
|
2377
|
+
private _onPointer;
|
|
2378
|
+
private _onPointerMove;
|
|
2379
|
+
private _onDescriptionSlotChange;
|
|
2380
|
+
render(): TemplateResult<1>;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
/** A group's heading. */
|
|
2384
|
+
declare class AnduinSelectLabel extends LitElement {
|
|
2385
|
+
static styles: CSSResult;
|
|
2386
|
+
connectedCallback(): void;
|
|
2387
|
+
render(): TemplateResult<1>;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
/** The scrolling `listbox` of items. `max-height` caps it with any CSS length (or `none`). */
|
|
2391
|
+
declare class AnduinSelectList extends LitElement {
|
|
2392
|
+
static styles: CSSResult;
|
|
2393
|
+
maxHeight: string | null;
|
|
2394
|
+
loading: boolean;
|
|
2395
|
+
connectedCallback(): void;
|
|
2396
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
2397
|
+
render(): TemplateResult<1>;
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
/** Shows the selected item's label inside the trigger, or `placeholder` (muted) when nothing is selected. */
|
|
2401
|
+
declare class AnduinSelectSelectedLabel extends LitElement {
|
|
2402
|
+
static styles: CSSResult;
|
|
2403
|
+
placeholder: string;
|
|
2404
|
+
connectedCallback(): void;
|
|
2405
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
2406
|
+
/* Excluded from this release type: _show */
|
|
2407
|
+
render(): TemplateResult<1>;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
/** A divider between groups; hides when the search leaves nothing on one side of it. */
|
|
2411
|
+
declare class AnduinSelectSeparator extends LitElement {
|
|
2412
|
+
static styles: CSSResult;
|
|
2413
|
+
connectedCallback(): void;
|
|
2414
|
+
render(): TemplateResult<1>;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
/**
|
|
2418
|
+
* Generic container that toggles the dropdown on click and handles the keyboard. Put any content inside —
|
|
2419
|
+
* usually `<anduin-button end-icon="caretDown">` holding an `<anduin-select-selected-label>`. With a slotted
|
|
2420
|
+
* button the combobox semantics go on its inner `<button>`; otherwise the trigger host itself is the focusable
|
|
2421
|
+
* combobox. `label` (or `aria-label`) names it.
|
|
2422
|
+
*/
|
|
2423
|
+
declare class AnduinSelectTrigger extends LitElement {
|
|
2424
|
+
static styles: CSSResult;
|
|
2425
|
+
label: string;
|
|
2426
|
+
private _root;
|
|
2427
|
+
connectedCallback(): void;
|
|
2428
|
+
disconnectedCallback(): void;
|
|
2429
|
+
protected updated(): void;
|
|
2430
|
+
render(): TemplateResult<1>;
|
|
2431
|
+
private _onClick;
|
|
2432
|
+
private _onKeyDown;
|
|
2433
|
+
/** The slotted `anduin-button` (or native button) that takes focus, if any. */
|
|
2434
|
+
private _control;
|
|
2435
|
+
/* Excluded from this release type: _isDisabled */
|
|
2436
|
+
/* Excluded from this release type: _focusControl */
|
|
2437
|
+
/* Excluded from this release type: _syncAria */
|
|
2438
|
+
private _lastName;
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
/**
|
|
2442
|
+
* `<anduin-sheet>` — the design repo's sheet: a panel that slides in from a
|
|
2443
|
+
* viewport edge. Root of `anduin-sheet-trigger` + `anduin-sheet-content`.
|
|
2444
|
+
* (`anduin-drawer` keeps its own API.)
|
|
2445
|
+
*
|
|
2446
|
+
* - Uncontrolled (default): the trigger toggles it, the overlay / Escape /
|
|
2447
|
+
* `anduin-sheet-close` close it; `default-open` opens it on mount.
|
|
2448
|
+
* - Controlled: once `open` is set (attribute or property), every request fires
|
|
2449
|
+
* `anduin-sheet-open-change` and then applies itself, as the design repo does.
|
|
2450
|
+
*/
|
|
2451
|
+
declare class AnduinSheet extends LitElement {
|
|
2452
|
+
static styles: CSSResult;
|
|
2453
|
+
/** Controlled open state. Setting it (attribute or property) switches to controlled mode. */
|
|
2454
|
+
get open(): boolean;
|
|
2455
|
+
set open(value: boolean);
|
|
2456
|
+
private _open;
|
|
2457
|
+
private _controlled;
|
|
2458
|
+
/** Uncontrolled: open on mount. Ignored in controlled mode. */
|
|
2459
|
+
defaultOpen: boolean;
|
|
2460
|
+
/** Edge the panel slides in from. */
|
|
2461
|
+
side: SheetSide;
|
|
2462
|
+
/** `false` keeps Escape from closing the sheet. */
|
|
2463
|
+
closeOnEscape: boolean;
|
|
2464
|
+
private _visible;
|
|
2465
|
+
private _trigger;
|
|
2466
|
+
private _content;
|
|
2467
|
+
private _focusFrame;
|
|
2468
|
+
/** Whether the sheet is currently open. */
|
|
2469
|
+
get isOpen(): boolean;
|
|
2470
|
+
private get _isControlled();
|
|
2471
|
+
private get _side();
|
|
2472
|
+
constructor();
|
|
2473
|
+
connectedCallback(): void;
|
|
2474
|
+
disconnectedCallback(): void;
|
|
2475
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
2476
|
+
/** Opens or closes the sheet the way a trigger would (fires `anduin-sheet-open-change` when controlled). */
|
|
2477
|
+
requestOpen(wantOpen: boolean): void;
|
|
2478
|
+
private _setContent;
|
|
2479
|
+
private _maybeShowInitial;
|
|
2480
|
+
private _show;
|
|
2481
|
+
private _hide;
|
|
2482
|
+
private _focusTrigger;
|
|
2483
|
+
private _stopAtSelf;
|
|
2484
|
+
private _onRegister;
|
|
2485
|
+
private _onCommand;
|
|
2486
|
+
private _onDocKeyDown;
|
|
2487
|
+
render(): TemplateResult<1>;
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
/** `<anduin-sheet-close>` — clicking anything inside it closes the enclosing sheet. */
|
|
2491
|
+
declare class AnduinSheetClose extends HTMLElement {
|
|
2492
|
+
connectedCallback(): void;
|
|
2493
|
+
disconnectedCallback(): void;
|
|
2494
|
+
private _onClick;
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
/**
|
|
2498
|
+
* `<anduin-sheet-content>` — the panel of an `anduin-sheet`. Fixed to a viewport
|
|
2499
|
+
* edge (the root's `side`), it slides in over a transparent overlay that closes it
|
|
2500
|
+
* on click. Modal by default: body scroll locked, Tab trapped, `aria-modal`.
|
|
2501
|
+
* `modal="false"` lets the page stay in use; `dock="true"` splits the viewport
|
|
2502
|
+
* instead of covering it (implies non-modal). `width` takes small / medium /
|
|
2503
|
+
* large / extraLarge / fitContent or any CSS length; `resizable="true"` adds a
|
|
2504
|
+
* drag handle on the edge facing the page.
|
|
2505
|
+
*/
|
|
2506
|
+
declare class AnduinSheetContent extends LitElement {
|
|
2507
|
+
static styles: CSSResult;
|
|
2508
|
+
/** Splits the viewport instead of covering the page. Implies non-modal. */
|
|
2509
|
+
dock: boolean;
|
|
2510
|
+
/** `false` keeps the page usable: no overlay, no scroll lock, no focus trap. Ignored while docked. */
|
|
2511
|
+
modal: boolean;
|
|
2512
|
+
/** Shows a drag handle on the edge facing the page. */
|
|
2513
|
+
resizable: boolean;
|
|
2514
|
+
/** `false` leaves focus where it was on open. Otherwise focus goes to `[autofocus]` / `[data-autofocus]` or the panel. */
|
|
2515
|
+
autoFocus: boolean;
|
|
2516
|
+
/** small (320) · medium (360) · large (400) · extraLarge (640) · fitContent, or any CSS length. Height for top/bottom. */
|
|
2517
|
+
width: SheetWidth;
|
|
2518
|
+
private _shown;
|
|
2519
|
+
private _entered;
|
|
2520
|
+
private _side;
|
|
2521
|
+
private _dragging;
|
|
2522
|
+
private _closing;
|
|
2523
|
+
private _hideToken;
|
|
2524
|
+
private _releaseLock;
|
|
2525
|
+
private _dockListeners;
|
|
2526
|
+
private _drag;
|
|
2527
|
+
/** The side the panel is (or will be) anchored to. */
|
|
2528
|
+
get side(): SheetSide;
|
|
2529
|
+
/** Whether the open panel blocks the page. A docked panel never does. */
|
|
2530
|
+
get isModal(): boolean;
|
|
2531
|
+
/** Whether the panel is on screen (shown and not closing). */
|
|
2532
|
+
get isPanelOpen(): boolean;
|
|
2533
|
+
get panel(): HTMLElement | null;
|
|
2534
|
+
connectedCallback(): void;
|
|
2535
|
+
disconnectedCallback(): void;
|
|
2536
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
2537
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
2538
|
+
/** Moves the panel to another edge without replaying the open animation. */
|
|
2539
|
+
setSide(side: SheetSide): void;
|
|
2540
|
+
/** Slides the panel in from `side`. */
|
|
2541
|
+
show(side: SheetSide): Promise<void>;
|
|
2542
|
+
/** Slides the panel out, then hides it and hands back the scroll lock / page inset. */
|
|
2543
|
+
hide(): void;
|
|
2544
|
+
/** Called by the sheet's dock toggle. */
|
|
2545
|
+
requestDock(docked: boolean): void;
|
|
2546
|
+
private _applyModalState;
|
|
2547
|
+
private _panelSize;
|
|
2548
|
+
private _syncDockInset;
|
|
2549
|
+
private _applyAccessibleName;
|
|
2550
|
+
private _focusInitial;
|
|
2551
|
+
private _onDocKeyDown;
|
|
2552
|
+
private _onWindowResize;
|
|
2553
|
+
private _onDockToggle;
|
|
2554
|
+
private _onDockRegister;
|
|
2555
|
+
/** `anduin-drawer-close` / `anduin-modal-close` inside the panel close the sheet too. */
|
|
2556
|
+
private _onLegacyClose;
|
|
2557
|
+
private _onOverlayClick;
|
|
2558
|
+
private _onResizeStart;
|
|
2559
|
+
private _onResizeMove;
|
|
2560
|
+
private _onResizeEnd;
|
|
2561
|
+
private _onResizeKeyDown;
|
|
2562
|
+
private _clamp;
|
|
2563
|
+
private _applySize;
|
|
2564
|
+
render(): TemplateResult<1>;
|
|
2565
|
+
/** Whether focus currently sits inside this panel (used by the root to return focus on close). */
|
|
2566
|
+
containsFocus(): boolean;
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
/** `<anduin-sheet-description>` — subdued supporting text under the title. Describes the panel. */
|
|
2570
|
+
declare class AnduinSheetDescription extends LitElement {
|
|
2571
|
+
static styles: CSSResult;
|
|
2572
|
+
render(): TemplateResult<1>;
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
/**
|
|
2576
|
+
* `<anduin-sheet-dock-toggle>` — clicking anything inside it flips the enclosing
|
|
2577
|
+
* panel between docked and floating. Put the docked-state control in
|
|
2578
|
+
* `anduin-sheet-dock-toggle-on` and the floating-state one in `-off`.
|
|
2579
|
+
*/
|
|
2580
|
+
declare class AnduinSheetDockToggle extends HTMLElement {
|
|
2581
|
+
private _docked;
|
|
2582
|
+
private _branches;
|
|
2583
|
+
/** Whether the enclosing panel is docked. */
|
|
2584
|
+
get docked(): boolean;
|
|
2585
|
+
connectedCallback(): void;
|
|
2586
|
+
disconnectedCallback(): void;
|
|
2587
|
+
/** Called by the panel whenever its `dock` changes. */
|
|
2588
|
+
setDocked(docked: boolean): void;
|
|
2589
|
+
private _onClick;
|
|
2590
|
+
private _onBranch;
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
declare abstract class AnduinSheetDockToggleBranch extends HTMLElement {
|
|
2594
|
+
protected abstract readonly showWhenDocked: boolean;
|
|
2595
|
+
connectedCallback(): void;
|
|
2596
|
+
/** Hidden rather than removed, so the consumer's control keeps its own state. */
|
|
2597
|
+
setDocked(docked: boolean): void;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
/** `<anduin-sheet-dock-toggle-off>` — shown while the panel floats (so it offers to dock). */
|
|
2601
|
+
declare class AnduinSheetDockToggleOff extends AnduinSheetDockToggleBranch {
|
|
2602
|
+
protected readonly showWhenDocked = false;
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
/** `<anduin-sheet-dock-toggle-on>` — shown while the panel is docked (so it offers to float). */
|
|
2606
|
+
declare class AnduinSheetDockToggleOn extends AnduinSheetDockToggleBranch {
|
|
2607
|
+
protected readonly showWhenDocked = true;
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
/** `<anduin-sheet-footer>` — action area pushed to the bottom of the panel, 16px padding. */
|
|
2611
|
+
declare class AnduinSheetFooter extends LitElement {
|
|
2612
|
+
static styles: CSSResult;
|
|
2613
|
+
render(): TemplateResult<1>;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
/** `<anduin-sheet-header>` — groups title and description with 16px padding. */
|
|
2617
|
+
declare class AnduinSheetHeader extends LitElement {
|
|
2618
|
+
static styles: CSSResult;
|
|
2619
|
+
render(): TemplateResult<1>;
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
/** `<anduin-sheet-title>` — the sheet's `<h2>` heading, with a built-in close (×) button. Names the panel. */
|
|
2623
|
+
declare class AnduinSheetTitle extends LitElement {
|
|
2624
|
+
static styles: CSSResult;
|
|
2625
|
+
render(): TemplateResult<1>;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
/** `<anduin-sheet-trigger>` — toggles its sheet on click, Enter or Space. */
|
|
2629
|
+
declare class AnduinSheetTrigger extends LitElement {
|
|
2630
|
+
static styles: CSSResult;
|
|
2631
|
+
connectedCallback(): void;
|
|
2632
|
+
disconnectedCallback(): void;
|
|
2633
|
+
private _onClick;
|
|
2634
|
+
private _onKeyDown;
|
|
2635
|
+
render(): TemplateResult<1>;
|
|
2636
|
+
}
|
|
2637
|
+
|
|
1189
2638
|
/**
|
|
1190
2639
|
* anduin-sidebar — a vertical navigation region for an application's primary
|
|
1191
2640
|
* sections. It organises navigable entries into labelled groups, highlights the
|
|
@@ -1343,7 +2792,7 @@ declare class AnduinSpinner extends LitElement {
|
|
|
1343
2792
|
}
|
|
1344
2793
|
|
|
1345
2794
|
declare class AnduinSuggestion extends LitElement {
|
|
1346
|
-
static styles: CSSResult;
|
|
2795
|
+
static styles: CSSResult[];
|
|
1347
2796
|
value: string;
|
|
1348
2797
|
size: 'small' | 'default' | 'large';
|
|
1349
2798
|
disabled: boolean;
|
|
@@ -1382,6 +2831,54 @@ declare class AnduinSuggestion extends LitElement {
|
|
|
1382
2831
|
render(): TemplateResult<1>;
|
|
1383
2832
|
}
|
|
1384
2833
|
|
|
2834
|
+
/**
|
|
2835
|
+
* `<anduin-switch>` — the design repo's name and API for a toggle switch
|
|
2836
|
+
* (`anduin-switcher` keeps its own API).
|
|
2837
|
+
*
|
|
2838
|
+
* - Uncontrolled (default): `default-checked` sets the initial state and the
|
|
2839
|
+
* switch flips itself on click.
|
|
2840
|
+
* - Controlled: once `checked` is set (attribute or property), clicks only
|
|
2841
|
+
* fire `anduin-switch-checked-change`; the consumer updates `checked`.
|
|
2842
|
+
*
|
|
2843
|
+
* Boolean attributes follow the design repo: `disabled="false"` is false.
|
|
2844
|
+
* Inside an `<anduin-field>`, clicking its `<anduin-field-label>` toggles it.
|
|
2845
|
+
*/
|
|
2846
|
+
declare class AnduinSwitch extends LitElement {
|
|
2847
|
+
static shadowRootOptions: {
|
|
2848
|
+
delegatesFocus: boolean;
|
|
2849
|
+
clonable?: boolean;
|
|
2850
|
+
customElementRegistry?: CustomElementRegistry;
|
|
2851
|
+
mode: ShadowRootMode;
|
|
2852
|
+
serializable?: boolean;
|
|
2853
|
+
slotAssignment?: SlotAssignmentMode;
|
|
2854
|
+
};
|
|
2855
|
+
static styles: CSSResult;
|
|
2856
|
+
/** Controlled state. Setting it (attribute or property) switches the element to controlled mode. */
|
|
2857
|
+
get checked(): boolean;
|
|
2858
|
+
set checked(value: boolean);
|
|
2859
|
+
private _checked;
|
|
2860
|
+
/** Initial state in uncontrolled mode. */
|
|
2861
|
+
defaultChecked: boolean;
|
|
2862
|
+
disabled: boolean;
|
|
2863
|
+
/** Accessible name for the switch (an enclosing field's label otherwise). */
|
|
2864
|
+
label: string;
|
|
2865
|
+
private _controlled;
|
|
2866
|
+
private _uncontrolledChecked;
|
|
2867
|
+
private _hasLabel;
|
|
2868
|
+
private _fieldLabel;
|
|
2869
|
+
private _field;
|
|
2870
|
+
/** The state the switch currently shows. */
|
|
2871
|
+
get isChecked(): boolean;
|
|
2872
|
+
connectedCallback(): void;
|
|
2873
|
+
disconnectedCallback(): void;
|
|
2874
|
+
/** Toggles the switch as a click would. */
|
|
2875
|
+
toggle(): void;
|
|
2876
|
+
private _onFieldClick;
|
|
2877
|
+
private _onClick;
|
|
2878
|
+
private _onSlotChange;
|
|
2879
|
+
render(): TemplateResult<1>;
|
|
2880
|
+
}
|
|
2881
|
+
|
|
1385
2882
|
declare class AnduinSwitcher extends LitElement {
|
|
1386
2883
|
static styles: CSSResult;
|
|
1387
2884
|
checked: boolean;
|
|
@@ -1687,6 +3184,8 @@ declare class AnduinTag extends LitElement {
|
|
|
1687
3184
|
icon: string;
|
|
1688
3185
|
/** Colors the icon in place of the variant's color: a palette name, or an ID marked with `uid:` */
|
|
1689
3186
|
iconColor: TagIconColor | '';
|
|
3187
|
+
/** Colors the icon from an ID, as the design repo's `icon-color-uid` does. Wins over `iconColor` */
|
|
3188
|
+
iconColorUid: string;
|
|
1690
3189
|
disabled: boolean;
|
|
1691
3190
|
render(): TemplateResult<1>;
|
|
1692
3191
|
}
|
|
@@ -2009,27 +3508,162 @@ declare class AnduinTooltipContent extends LitElement {
|
|
|
2009
3508
|
render(): TemplateResult<1>;
|
|
2010
3509
|
}
|
|
2011
3510
|
|
|
2012
|
-
declare class AnduinTooltipTrigger extends LitElement {
|
|
2013
|
-
static styles: CSSResult;
|
|
3511
|
+
declare class AnduinTooltipTrigger extends LitElement {
|
|
3512
|
+
static styles: CSSResult;
|
|
3513
|
+
firstUpdated(): void;
|
|
3514
|
+
render(): TemplateResult<1>;
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
/**
|
|
3518
|
+
* `<anduin-truncated>` — the design repo's truncation wrapper.
|
|
3519
|
+
*
|
|
3520
|
+
* It truncates its single element child without introducing a layout box: the host and its shadow root are
|
|
3521
|
+
* `display: contents`, so the child stays the flex / grid / inline item its parent lays out and keeps its own
|
|
3522
|
+
* sizing. The truncation CSS is applied to the child through `::slotted(:only-child)`:
|
|
3523
|
+
*
|
|
3524
|
+
* - default: single-line ellipsis (`overflow: hidden; text-overflow: ellipsis; white-space: nowrap`)
|
|
3525
|
+
* - `line-clamp="N"`: an N-line clamp (`display: -webkit-box; -webkit-line-clamp: N`). Non-positive or invalid
|
|
3526
|
+
* values fall back to one line.
|
|
3527
|
+
*
|
|
3528
|
+
* On pointer entry or keyboard focus it measures the child and, only when the content is actually clipped, shows
|
|
3529
|
+
* the full value in an `anduin-tooltip` anchored to the child. The tooltip text is the `tooltip` attribute when
|
|
3530
|
+
* present (even empty), otherwise the normalized text content. Inside an `anduin-tooltip-trigger` (across shadow
|
|
3531
|
+
* boundaries) its own tooltip stays off so the outer tooltip wins. No `title` is added, and nothing is measured or
|
|
3532
|
+
* rendered until the first interaction.
|
|
3533
|
+
*/
|
|
3534
|
+
declare class AnduinTruncated extends LitElement {
|
|
3535
|
+
static styles: CSSResult;
|
|
3536
|
+
/** Number of lines before clipping. Absent: single-line ellipsis. */
|
|
3537
|
+
lineClamp: number | string | null;
|
|
3538
|
+
/** Tooltip text override. Absent: the element's normalized text content. Read on interaction. */
|
|
3539
|
+
tooltip: string | null;
|
|
3540
|
+
private _tooltipRendered;
|
|
3541
|
+
private _tooltipText;
|
|
3542
|
+
private _describedTarget;
|
|
3543
|
+
/** Bumped by every enter and leave, so a show that finishes rendering after the pointer left is dropped. */
|
|
3544
|
+
private _requestId;
|
|
3545
|
+
connectedCallback(): void;
|
|
3546
|
+
disconnectedCallback(): void;
|
|
3547
|
+
/** The single element child the truncation applies to, or null when there is not exactly one. */
|
|
3548
|
+
get target(): HTMLElement | null;
|
|
3549
|
+
/** Whether the child's content is currently clipped. */
|
|
3550
|
+
get isTruncated(): boolean;
|
|
3551
|
+
private get _normalizedText();
|
|
3552
|
+
private _isInsideTooltipTrigger;
|
|
3553
|
+
private _onEnter;
|
|
3554
|
+
private _onLeave;
|
|
3555
|
+
private _onFocusOut;
|
|
3556
|
+
private _onKeyDown;
|
|
3557
|
+
private _hide;
|
|
3558
|
+
/**
|
|
3559
|
+
* The tooltip describes the element only when it says something the element does not already say: a tooltip that
|
|
3560
|
+
* repeats the visible text is a magnifying glass, not a description.
|
|
3561
|
+
*/
|
|
3562
|
+
private _describe;
|
|
3563
|
+
private _clearDescription;
|
|
3564
|
+
render(): TemplateResult<1>;
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
declare class AnduinWell extends LitElement {
|
|
3568
|
+
static styles: CSSResult;
|
|
3569
|
+
variant: string;
|
|
3570
|
+
render(): TemplateResult<1>;
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
declare class AnduinWellClose extends LitElement {
|
|
3574
|
+
static styles: CSSResult;
|
|
3575
|
+
private onClick;
|
|
3576
|
+
render(): TemplateResult<1>;
|
|
3577
|
+
}
|
|
3578
|
+
|
|
3579
|
+
export declare const Autocomplete: ReactWebComponent<AnduinAutocomplete, {
|
|
3580
|
+
onValueChange: ValueEvent;
|
|
3581
|
+
onChoose: ValueEvent;
|
|
3582
|
+
onClose: ValueEvent<undefined>;
|
|
3583
|
+
}>;
|
|
3584
|
+
|
|
3585
|
+
/** Field: before typed/pasted/dropped text lands — detail `{ value }` (the candidate). Cancelable: refuses it. */
|
|
3586
|
+
export declare const AUTOCOMPLETE_BEFORE_INPUT = "anduin-autocomplete-on-before-input";
|
|
3587
|
+
|
|
3588
|
+
/** Field: focus left the text field — detail `{ value }` (the text). */
|
|
3589
|
+
export declare const AUTOCOMPLETE_BLUR = "anduin-autocomplete-on-blur";
|
|
3590
|
+
|
|
3591
|
+
/** Root: the text changed (every keystroke, and once more with the label on a pick) — detail `{ value }` (the text). */
|
|
3592
|
+
export declare const AUTOCOMPLETE_CHANGE = "change";
|
|
3593
|
+
|
|
3594
|
+
/** Root: a suggestion was picked (click or Enter) — detail `{ value }` (the item's `value`). Fires after `change`. */
|
|
3595
|
+
export declare const AUTOCOMPLETE_CHOOSE = "anduin-autocomplete-on-choose";
|
|
3596
|
+
|
|
3597
|
+
/** Root: the list closed (pick, Escape, Tab, Enter, outside click). Does not bubble. */
|
|
3598
|
+
export declare const AUTOCOMPLETE_CLOSE = "anduin-autocomplete-on-close";
|
|
3599
|
+
|
|
3600
|
+
/** Item: clicked — detail `{ value }`. Cancelable: `preventDefault()` keeps the text and the list open. */
|
|
3601
|
+
export declare const AUTOCOMPLETE_ITEM_SELECTED = "anduin-autocomplete-item-selected";
|
|
3602
|
+
|
|
3603
|
+
/** Field: Enter with no suggestion highlighted — detail `{ value }`. Cancelable: cancelling claims the key. */
|
|
3604
|
+
export declare const AUTOCOMPLETE_SUBMIT = "anduin-autocomplete-on-submit";
|
|
3605
|
+
|
|
3606
|
+
export declare const AutocompleteClear: ReactWebComponent<AnduinAutocompleteClear, {}>;
|
|
3607
|
+
|
|
3608
|
+
export declare const AutocompleteContent: ReactWebComponent<AnduinAutocompleteContent, {}>;
|
|
3609
|
+
|
|
3610
|
+
export declare const AutocompleteEmpty: ReactWebComponent<AnduinAutocompleteEmpty, {}>;
|
|
3611
|
+
|
|
3612
|
+
/** Shared by `-input` and `-textarea`: size, status, disabled, open-on-focus, and the design events. */
|
|
3613
|
+
declare abstract class AutocompleteFieldBase extends PickerField {
|
|
3614
|
+
static family: string;
|
|
3615
|
+
disabled: boolean;
|
|
3616
|
+
/** Open the list on every focus, not only when the field is empty. */
|
|
3617
|
+
openOnFocus: boolean;
|
|
3618
|
+
size: 'small' | 'default' | 'large';
|
|
3619
|
+
/** `valid` | `invalid` | `warning` | `none` — border colour only. */
|
|
3620
|
+
status: string;
|
|
3621
|
+
protected _hasAdornment: boolean;
|
|
3622
|
+
get isDisabled(): boolean;
|
|
3623
|
+
get autocomplete(): AnduinAutocomplete | null;
|
|
2014
3624
|
firstUpdated(): void;
|
|
2015
|
-
|
|
3625
|
+
updated(changed: PropertyValues<this>): void;
|
|
3626
|
+
protected controlClasses(base: string): string;
|
|
3627
|
+
protected wrapperClasses(): string;
|
|
3628
|
+
protected _onSlotChange(e: Event): void;
|
|
3629
|
+
protected _onBlur(): void;
|
|
3630
|
+
/** Reports insertions as a cancelable candidate; cancelling refuses the insertion before the browser applies it. */
|
|
3631
|
+
protected _onBeforeInput(e: InputEvent): void;
|
|
3632
|
+
/** Enter with nothing highlighted: report `on-submit`; cancelling it claims the key. Returns whether it was claimed. */
|
|
3633
|
+
protected submit(e: KeyboardEvent): boolean;
|
|
3634
|
+
protected closeOnEscape(e: KeyboardEvent): boolean;
|
|
2016
3635
|
}
|
|
2017
3636
|
|
|
2018
|
-
declare
|
|
2019
|
-
static styles: CSSResult;
|
|
2020
|
-
variant: string;
|
|
2021
|
-
render(): TemplateResult<1>;
|
|
2022
|
-
}
|
|
3637
|
+
export declare const AutocompleteGroup: ReactWebComponent<AnduinAutocompleteGroup, {}>;
|
|
2023
3638
|
|
|
2024
|
-
declare
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
}
|
|
3639
|
+
export declare const AutocompleteInput: ReactWebComponent<AnduinAutocompleteInput, {
|
|
3640
|
+
onBlur: ValueEvent;
|
|
3641
|
+
onSubmit: ValueEvent;
|
|
3642
|
+
onBeforeInput: ValueEvent;
|
|
3643
|
+
}>;
|
|
3644
|
+
|
|
3645
|
+
export declare const AutocompleteItem: ReactWebComponent<AnduinAutocompleteItem, {
|
|
3646
|
+
onSelect: ValueEvent;
|
|
3647
|
+
}>;
|
|
3648
|
+
|
|
3649
|
+
export declare const AutocompleteLabel: ReactWebComponent<AnduinAutocompleteLabel, {}>;
|
|
3650
|
+
|
|
3651
|
+
export declare const AutocompleteList: ReactWebComponent<AnduinAutocompleteList, {}>;
|
|
3652
|
+
|
|
3653
|
+
export declare const AutocompleteSeparator: ReactWebComponent<AnduinAutocompleteSeparator, {}>;
|
|
3654
|
+
|
|
3655
|
+
export declare const AutocompleteTextarea: ReactWebComponent<AnduinAutocompleteTextarea, {
|
|
3656
|
+
onBlur: ValueEvent;
|
|
3657
|
+
onSubmit: ValueEvent;
|
|
3658
|
+
onBeforeInput: ValueEvent;
|
|
3659
|
+
}>;
|
|
2029
3660
|
|
|
2030
3661
|
export declare const Avatar: ReactWebComponent<AnduinAvatar, {}>;
|
|
2031
3662
|
|
|
2032
|
-
declare
|
|
3663
|
+
export declare const AvatarBlock: ReactWebComponent<AnduinAvatarBlock, {}>;
|
|
3664
|
+
|
|
3665
|
+
/** `square` is the design repo's name for `rounded` (4px corners). */
|
|
3666
|
+
declare type AvatarShape = 'circle' | 'rounded' | 'square';
|
|
2033
3667
|
|
|
2034
3668
|
declare type AvatarSize = 16 | 20 | 24 | 32;
|
|
2035
3669
|
|
|
@@ -2072,6 +3706,67 @@ onChange: string;
|
|
|
2072
3706
|
|
|
2073
3707
|
export declare const CHECKBOX_CHANGE = "anduin-checkbox:change";
|
|
2074
3708
|
|
|
3709
|
+
declare const Clipboard_2: ReactWebComponent<AnduinClipboard, {}>;
|
|
3710
|
+
export { Clipboard_2 as Clipboard }
|
|
3711
|
+
|
|
3712
|
+
export declare const ClipboardIndicator: ReactWebComponent<AnduinClipboardIndicator, {}>;
|
|
3713
|
+
|
|
3714
|
+
declare type ClipboardIndicatorAppearance = 'plain' | 'text';
|
|
3715
|
+
|
|
3716
|
+
/** Where a copy stands: requested-and-written, refused, or back at rest 2 seconds after the request. */
|
|
3717
|
+
declare type ClipboardStatus = 'idle' | 'copied' | 'failed';
|
|
3718
|
+
|
|
3719
|
+
export declare const ClipboardTrigger: ReactWebComponent<AnduinClipboardTrigger, {}>;
|
|
3720
|
+
|
|
3721
|
+
export declare const Collapsible: ReactWebComponent<AnduinCollapsible, {
|
|
3722
|
+
onOpenChange: EventName<CustomEvent<{
|
|
3723
|
+
value: boolean;
|
|
3724
|
+
}>>;
|
|
3725
|
+
}>;
|
|
3726
|
+
|
|
3727
|
+
/**
|
|
3728
|
+
* Fired on `<anduin-collapsible>` when the user toggles it (unless `disabled`).
|
|
3729
|
+
* Detail: `{ value: boolean }` — the requested open state. Does not bubble, as
|
|
3730
|
+
* in the design repo, so a nested collapsible never toggles its parent's handler.
|
|
3731
|
+
*/
|
|
3732
|
+
export declare const COLLAPSIBLE_OPEN_CHANGE = "anduin-collapsible-open-change";
|
|
3733
|
+
|
|
3734
|
+
export declare const CollapsibleContent: ReactWebComponent<AnduinCollapsibleContent, {}>;
|
|
3735
|
+
|
|
3736
|
+
declare type CollapsibleDirection = 'vertical' | 'horizontal';
|
|
3737
|
+
|
|
3738
|
+
export declare const CollapsibleIcon: ReactWebComponent<AnduinCollapsibleIcon, {}>;
|
|
3739
|
+
|
|
3740
|
+
export declare const CollapsibleTrigger: ReactWebComponent<AnduinCollapsibleTrigger, {}>;
|
|
3741
|
+
|
|
3742
|
+
export declare const Combobox: ReactWebComponent<AnduinCombobox, {
|
|
3743
|
+
onValueChange: ValueEvent;
|
|
3744
|
+
}>;
|
|
3745
|
+
|
|
3746
|
+
/** Fired by the root when the user picks an item — detail: `{ value }` (the item's `value`). */
|
|
3747
|
+
export declare const COMBOBOX_CHANGE = "change";
|
|
3748
|
+
|
|
3749
|
+
/** Fired by an item when it is clicked — detail: `{ value }`. Cancelable: `preventDefault()` keeps the list open. */
|
|
3750
|
+
export declare const COMBOBOX_ITEM_SELECTED = "anduin-combobox-item-selected";
|
|
3751
|
+
|
|
3752
|
+
export declare const ComboboxContent: ReactWebComponent<AnduinComboboxContent, {}>;
|
|
3753
|
+
|
|
3754
|
+
export declare const ComboboxEmpty: ReactWebComponent<AnduinComboboxEmpty, {}>;
|
|
3755
|
+
|
|
3756
|
+
export declare const ComboboxGroup: ReactWebComponent<AnduinComboboxGroup, {}>;
|
|
3757
|
+
|
|
3758
|
+
export declare const ComboboxInput: ReactWebComponent<AnduinComboboxInput, {}>;
|
|
3759
|
+
|
|
3760
|
+
export declare const ComboboxItem: ReactWebComponent<AnduinComboboxItem, {
|
|
3761
|
+
onSelect: ValueEvent;
|
|
3762
|
+
}>;
|
|
3763
|
+
|
|
3764
|
+
export declare const ComboboxLabel: ReactWebComponent<AnduinComboboxLabel, {}>;
|
|
3765
|
+
|
|
3766
|
+
export declare const ComboboxList: ReactWebComponent<AnduinComboboxList, {}>;
|
|
3767
|
+
|
|
3768
|
+
export declare const ComboboxSeparator: ReactWebComponent<AnduinComboboxSeparator, {}>;
|
|
3769
|
+
|
|
2075
3770
|
/** Fired when every segment is filled. `event.detail` is the formatted date string. */
|
|
2076
3771
|
export declare const DATE_INPUT_CHANGE = "anduin-date-input:change";
|
|
2077
3772
|
|
|
@@ -2108,8 +3803,58 @@ declare type DateRangePanelRole = 'start' | 'end';
|
|
|
2108
3803
|
|
|
2109
3804
|
export declare const DateRangeStart: ReactWebComponent<AnduinDateRangeStart, {}>;
|
|
2110
3805
|
|
|
3806
|
+
/** The design repo's named sizes: small 20px, medium 24px, large 32px (default), extraLarge 40px. */
|
|
3807
|
+
declare type DesignAvatarSize = 'small' | 'medium' | 'large' | 'extraLarge';
|
|
3808
|
+
|
|
3809
|
+
export declare const Dialog: ReactWebComponent<AnduinDialog, {
|
|
3810
|
+
onOpenChange: string;
|
|
3811
|
+
onOpen: string;
|
|
3812
|
+
onClose: string;
|
|
3813
|
+
}>;
|
|
3814
|
+
|
|
3815
|
+
/** The dialog became hidden (either mode). `detail: { value: undefined }`. Does not bubble. */
|
|
3816
|
+
export declare const DIALOG_ON_CLOSE = "anduin-dialog-on-close";
|
|
3817
|
+
|
|
3818
|
+
/** The dialog became visible (either mode). `detail: { value: undefined }`. Does not bubble. */
|
|
3819
|
+
export declare const DIALOG_ON_OPEN = "anduin-dialog-on-open";
|
|
3820
|
+
|
|
3821
|
+
/** Controlled mode: the dialog asks to open or close. `detail: { value: boolean }`. Does not bubble. */
|
|
3822
|
+
export declare const DIALOG_OPEN_CHANGE = "anduin-dialog-open-change";
|
|
3823
|
+
|
|
3824
|
+
export declare const DialogBody: ReactWebComponent<AnduinDialogBody, {}>;
|
|
3825
|
+
|
|
3826
|
+
export declare const DialogClose: ReactWebComponent<AnduinDialogClose, {}>;
|
|
3827
|
+
|
|
3828
|
+
export declare const DialogContent: ReactWebComponent<AnduinDialogContent, {}>;
|
|
3829
|
+
|
|
3830
|
+
export declare const DialogDescription: ReactWebComponent<AnduinDialogDescription, {}>;
|
|
3831
|
+
|
|
3832
|
+
export declare const DialogFooter: ReactWebComponent<AnduinDialogFooter, {}>;
|
|
3833
|
+
|
|
3834
|
+
export declare const DialogHeader: ReactWebComponent<AnduinDialogHeader, {}>;
|
|
3835
|
+
|
|
3836
|
+
declare type DialogHeight = 'fill';
|
|
3837
|
+
|
|
3838
|
+
export declare const DialogOverlay: ReactWebComponent<AnduinDialogOverlay, {}>;
|
|
3839
|
+
|
|
3840
|
+
/** Re-names the owning content whenever this element's text changes. */
|
|
3841
|
+
declare abstract class DialogTextElement extends LitElement {
|
|
3842
|
+
private _observer?;
|
|
3843
|
+
private _owner;
|
|
3844
|
+
connectedCallback(): void;
|
|
3845
|
+
disconnectedCallback(): void;
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
export declare const DialogTitle: ReactWebComponent<AnduinDialogTitle, {}>;
|
|
3849
|
+
|
|
3850
|
+
export declare const DialogTrigger: ReactWebComponent<AnduinDialogTrigger, {}>;
|
|
3851
|
+
|
|
3852
|
+
declare type DialogWidth = 'small' | 'medium' | 'large' | 'extraLarge' | 'full' | 'fitContent';
|
|
3853
|
+
|
|
2111
3854
|
export declare const Divider: ReactWebComponent<AnduinDivider, {}>;
|
|
2112
3855
|
|
|
3856
|
+
declare type DockSide = 'top' | 'right' | 'bottom' | 'left';
|
|
3857
|
+
|
|
2113
3858
|
export declare const Dot: ReactWebComponent<AnduinDot, {}>;
|
|
2114
3859
|
|
|
2115
3860
|
declare type DotVariant = 'gray' | 'success' | 'primary' | 'danger' | 'warning' | 'purple' | 'customAqua' | 'customBlue' | 'customBlueGreen' | 'customGreen' | 'customHotPink' | 'customIndigo' | 'customMagenta' | 'customOrange' | 'customPink' | 'customPurple' | 'customRed' | 'customYellow' | 'customYellowGreen' | 'customYellowOrange';
|
|
@@ -2205,11 +3950,81 @@ export declare const INPUT_CLEAR = "anduin-input:clear";
|
|
|
2205
3950
|
|
|
2206
3951
|
export declare const LoadingState: ReactWebComponent<AnduinLoadingState, {}>;
|
|
2207
3952
|
|
|
2208
|
-
export declare const Menu: ReactWebComponent<AnduinMenu, {
|
|
3953
|
+
export declare const Menu: ReactWebComponent<AnduinMenu, {
|
|
3954
|
+
onOpenChange: string;
|
|
3955
|
+
}>;
|
|
2209
3956
|
|
|
3957
|
+
/** Old API: fired by `anduin-menu-item` on every click (no detail). */
|
|
2210
3958
|
export declare const MENU_ITEM_CLICK = "anduin-menu-item:click";
|
|
2211
3959
|
|
|
2212
|
-
|
|
3960
|
+
/**
|
|
3961
|
+
* Design API: an item was chosen (click, Enter, Space). `detail` is `{ value: true }`. Cancelable — call
|
|
3962
|
+
* `preventDefault()` to keep the menu open (checkbox-style items, loading items).
|
|
3963
|
+
*/
|
|
3964
|
+
export declare const MENU_ITEM_SELECTED = "anduin-menu-item-selected";
|
|
3965
|
+
|
|
3966
|
+
/** Design API: the menu asks to open (`detail.value === true`) or close. Fired before `open` changes. */
|
|
3967
|
+
export declare const MENU_OPEN_CHANGE = "anduin-menu-open-change";
|
|
3968
|
+
|
|
3969
|
+
export declare const MenuContent: ReactWebComponent<AnduinMenuContent, {}>;
|
|
3970
|
+
|
|
3971
|
+
export declare const MenuGroup: ReactWebComponent<AnduinMenuGroup, {}>;
|
|
3972
|
+
|
|
3973
|
+
export declare const MenuItem: ReactWebComponent<AnduinMenuItem, {
|
|
3974
|
+
onSelect: string;
|
|
3975
|
+
onItemClick: string;
|
|
3976
|
+
}>;
|
|
3977
|
+
|
|
3978
|
+
export declare const MenuLabel: ReactWebComponent<AnduinMenuLabel, {}>;
|
|
3979
|
+
|
|
3980
|
+
export declare const MenuSeparator: ReactWebComponent<AnduinMenuSeparator, {}>;
|
|
3981
|
+
|
|
3982
|
+
export declare const MenuSub: ReactWebComponent<AnduinMenuSub, {}>;
|
|
3983
|
+
|
|
3984
|
+
export declare const MenuSubContent: ReactWebComponent<AnduinMenuSubContent, {}>;
|
|
3985
|
+
|
|
3986
|
+
export declare const MenuSubTrigger: ReactWebComponent<AnduinMenuSubTrigger, {}>;
|
|
3987
|
+
|
|
3988
|
+
/**
|
|
3989
|
+
* Keyboard navigation shared by `anduin-menu-content` and `anduin-menu-sub-content`: ArrowUp/Down (wrapping),
|
|
3990
|
+
* Home/End and typeahead over the items this surface owns (not those of a nested sub-menu).
|
|
3991
|
+
*/
|
|
3992
|
+
declare abstract class MenuSurface extends LitElement {
|
|
3993
|
+
protected _popup: HTMLElement;
|
|
3994
|
+
protected _active: boolean;
|
|
3995
|
+
protected _shown: boolean;
|
|
3996
|
+
private _stopTracking;
|
|
3997
|
+
private _typed;
|
|
3998
|
+
private _typedAt;
|
|
3999
|
+
connectedCallback(): void;
|
|
4000
|
+
disconnectedCallback(): void;
|
|
4001
|
+
/** Enabled items and sub-triggers that belong to this surface, in DOM order. */
|
|
4002
|
+
items(): HTMLElement[];
|
|
4003
|
+
/** Focuses the first or last enabled item. */
|
|
4004
|
+
focusEdge(which: 'first' | 'last'): void;
|
|
4005
|
+
/* Excluded from this release type: setActive */
|
|
4006
|
+
protected _sync(): void;
|
|
4007
|
+
protected _show(): void;
|
|
4008
|
+
protected _hide(): void;
|
|
4009
|
+
protected _beforeShow(): void;
|
|
4010
|
+
protected abstract _anchor(): {
|
|
4011
|
+
ref: Element;
|
|
4012
|
+
placement: PopupPlacement;
|
|
4013
|
+
dx: number;
|
|
4014
|
+
dy: number;
|
|
4015
|
+
} | null;
|
|
4016
|
+
private _position;
|
|
4017
|
+
protected _onKeyDown: (e: KeyboardEvent) => void;
|
|
4018
|
+
/** Keys a surface handles itself before list navigation (sub-menus: ArrowLeft / Escape). */
|
|
4019
|
+
protected _handleOwnKey(_e: KeyboardEvent): boolean;
|
|
4020
|
+
/**
|
|
4021
|
+
* Characters typed within half a second spell one word; the same character repeated cycles through the items
|
|
4022
|
+
* starting with it. Matching ignores case and wraps.
|
|
4023
|
+
*/
|
|
4024
|
+
private _typeahead;
|
|
4025
|
+
}
|
|
4026
|
+
|
|
4027
|
+
export declare const MenuTrigger: ReactWebComponent<AnduinMenuTrigger, {}>;
|
|
2213
4028
|
|
|
2214
4029
|
export declare const Modal: ReactWebComponent<AnduinModal, {
|
|
2215
4030
|
onClose: string;
|
|
@@ -2241,14 +4056,35 @@ export declare const Navigation: ReactWebComponent<AnduinNavigation, {
|
|
|
2241
4056
|
onChange: string;
|
|
2242
4057
|
}>;
|
|
2243
4058
|
|
|
4059
|
+
/** Fired when a user activates an item, even the selected one. `detail: { value }` is the item's `value`. */
|
|
4060
|
+
export declare const NAVIGATION_BAR_VALUE_CHANGE = "anduin-navigation-bar-value-change";
|
|
4061
|
+
|
|
2244
4062
|
export declare const NAVIGATION_CHANGE = "anduin-navigation:change";
|
|
2245
4063
|
|
|
2246
4064
|
declare type NavigationAlignment = 'left' | 'center' | 'right';
|
|
2247
4065
|
|
|
4066
|
+
export declare const NavigationBar: ReactWebComponent<AnduinNavigationBar, {
|
|
4067
|
+
onValueChange: EventName<CustomEvent<{
|
|
4068
|
+
value: string;
|
|
4069
|
+
}>>;
|
|
4070
|
+
}>;
|
|
4071
|
+
|
|
4072
|
+
export declare const NavigationBarItem: ReactWebComponent<AnduinNavigationBarItem, {}>;
|
|
4073
|
+
|
|
2248
4074
|
export declare const NavigationItem: ReactWebComponent<AnduinNavigationItem, {}>;
|
|
2249
4075
|
|
|
2250
4076
|
declare type NavigationTheme = 'light' | 'dark';
|
|
2251
4077
|
|
|
4078
|
+
export declare const NonIdealState: ReactWebComponent<AnduinNonIdealState, {}>;
|
|
4079
|
+
|
|
4080
|
+
export declare const NonIdealStateAction: ReactWebComponent<AnduinNonIdealStateAction, {}>;
|
|
4081
|
+
|
|
4082
|
+
export declare const NonIdealStateDescription: ReactWebComponent<AnduinNonIdealStateDescription, {}>;
|
|
4083
|
+
|
|
4084
|
+
export declare const NonIdealStateIcon: ReactWebComponent<AnduinNonIdealStateIcon, {}>;
|
|
4085
|
+
|
|
4086
|
+
export declare const NonIdealStateTitle: ReactWebComponent<AnduinNonIdealStateTitle, {}>;
|
|
4087
|
+
|
|
2252
4088
|
export declare const Pagination: ReactWebComponent<AnduinPagination, {
|
|
2253
4089
|
onValueChange: string;
|
|
2254
4090
|
}>;
|
|
@@ -2260,15 +4096,271 @@ export declare const PaginationFirstPage: ReactWebComponent<AnduinPaginationFirs
|
|
|
2260
4096
|
|
|
2261
4097
|
export declare const PaginationLastPage: ReactWebComponent<AnduinPaginationLastPage, {}>;
|
|
2262
4098
|
|
|
4099
|
+
declare class PickerContent extends LitElement {
|
|
4100
|
+
static family: string;
|
|
4101
|
+
static styles: CSSResult[];
|
|
4102
|
+
/** Fixed panel width in px. Unset: the panel shrink-wraps its items (min 160px). */
|
|
4103
|
+
width: number | null;
|
|
4104
|
+
private _visible;
|
|
4105
|
+
private _natural;
|
|
4106
|
+
get visible(): boolean;
|
|
4107
|
+
private get _panel();
|
|
4108
|
+
private get _inner();
|
|
4109
|
+
/** Shows/hides the panel; `remeasure` re-reads its natural size (contents changed). */
|
|
4110
|
+
setVisible(visible: boolean, remeasure?: boolean): void;
|
|
4111
|
+
/** Places the panel beside `anchor`, capping its height to the room on the side it opens on. */
|
|
4112
|
+
reposition(anchor: DOMRect, placement: string, remeasure?: boolean): void;
|
|
4113
|
+
render(): TemplateResult<1>;
|
|
4114
|
+
}
|
|
4115
|
+
|
|
4116
|
+
declare class PickerEmpty extends LitElement {
|
|
4117
|
+
static family: string;
|
|
4118
|
+
static styles: CSSResult;
|
|
4119
|
+
connectedCallback(): void;
|
|
4120
|
+
render(): TemplateResult<1>;
|
|
4121
|
+
}
|
|
4122
|
+
|
|
4123
|
+
declare abstract class PickerField extends LitElement {
|
|
4124
|
+
static family: string;
|
|
4125
|
+
placeholder: string;
|
|
4126
|
+
/** Accessible name (else `aria-label`, an enclosing field's label, then the placeholder). */
|
|
4127
|
+
label: string;
|
|
4128
|
+
/** Custom match predicate: `({ query, value, label }) => boolean`, consulted for a non-empty query. */
|
|
4129
|
+
filter: PickerFilter | null;
|
|
4130
|
+
protected _text: string;
|
|
4131
|
+
get root(): PickerRoot | null;
|
|
4132
|
+
/** The native `<input>` / `<textarea>` inside. */
|
|
4133
|
+
get control(): HTMLInputElement | HTMLTextAreaElement | null;
|
|
4134
|
+
get isDisabled(): boolean;
|
|
4135
|
+
/** The text in the field. */
|
|
4136
|
+
get text(): string;
|
|
4137
|
+
set text(value: string);
|
|
4138
|
+
focusField(): void;
|
|
4139
|
+
protected accessibleName(): string;
|
|
4140
|
+
/** Writes the popup state onto the native field (the element with `role="combobox"`). */
|
|
4141
|
+
syncAria(expanded: boolean, list: HTMLElement | null, active: HTMLElement | null): void;
|
|
4142
|
+
protected _onFocus(): void;
|
|
4143
|
+
protected _onInput(e: Event): void;
|
|
4144
|
+
}
|
|
4145
|
+
|
|
4146
|
+
declare type PickerFilter = (item: PickerFilterItem) => boolean;
|
|
4147
|
+
|
|
4148
|
+
/**
|
|
4149
|
+
* Shared internals of the design repo's two text-field pickers:
|
|
4150
|
+
*
|
|
4151
|
+
* - `anduin-combobox` — pick ONE OF the listed items; the typed text is only a filter, and the
|
|
4152
|
+
* field reverts to the chosen item's label when the list closes.
|
|
4153
|
+
* - `anduin-autocomplete` — the value IS the typed text; the list is a shortcut for typing.
|
|
4154
|
+
*
|
|
4155
|
+
* Both are compound: a root coordinates light-DOM parts (`-input`, `-content`, `-list`, `-item`,
|
|
4156
|
+
* `-group`, `-label`, `-separator`, `-empty`) that find their root with `closest()`. Every part
|
|
4157
|
+
* class here is family-agnostic; a family subclass sets `static family` to its root tag name.
|
|
4158
|
+
*
|
|
4159
|
+
* The floating panel reuses `anduin-suggestion`'s shell and positioning (`popupPanelStyles`,
|
|
4160
|
+
* `positionPopup`).
|
|
4161
|
+
*/
|
|
4162
|
+
/** What a custom `filter` predicate receives (design: `ItemFilter`). */
|
|
4163
|
+
declare interface PickerFilterItem {
|
|
4164
|
+
query: string;
|
|
4165
|
+
value: string;
|
|
4166
|
+
label: string;
|
|
4167
|
+
}
|
|
4168
|
+
|
|
4169
|
+
declare class PickerGroup extends LitElement {
|
|
4170
|
+
static family: string;
|
|
4171
|
+
static styles: CSSResult;
|
|
4172
|
+
connectedCallback(): void;
|
|
4173
|
+
render(): TemplateResult<1>;
|
|
4174
|
+
}
|
|
4175
|
+
|
|
4176
|
+
declare class PickerItem extends LitElement {
|
|
4177
|
+
static family: string;
|
|
4178
|
+
static styles: CSSResultGroup;
|
|
4179
|
+
value: string;
|
|
4180
|
+
/** Text shown in the field and matched by the filter (default: the item's text). */
|
|
4181
|
+
label: string | null;
|
|
4182
|
+
disabled: boolean;
|
|
4183
|
+
private _highlighted;
|
|
4184
|
+
get root(): PickerRoot | null;
|
|
4185
|
+
get highlighted(): boolean;
|
|
4186
|
+
set highlighted(value: boolean);
|
|
4187
|
+
/** The item's display label: `label`, else its text (without a `description` slot). */
|
|
4188
|
+
get labelText(): string;
|
|
4189
|
+
connectedCallback(): void;
|
|
4190
|
+
disconnectedCallback(): void;
|
|
4191
|
+
updated(changed: PropertyValues<this>): void;
|
|
4192
|
+
private _onPointer;
|
|
4193
|
+
private _onMouseDown;
|
|
4194
|
+
private _onClick;
|
|
4195
|
+
/** Leading part of the row (autocomplete: `start-icon`). */
|
|
4196
|
+
protected renderStart(): unknown;
|
|
4197
|
+
/** Trailing part of the row (combobox: the check). */
|
|
4198
|
+
protected renderEnd(): unknown;
|
|
4199
|
+
protected renderContent(): unknown;
|
|
4200
|
+
protected rowClass(): string;
|
|
4201
|
+
render(): TemplateResult<1>;
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4204
|
+
/** One entry of a list's data-driven `items` property. */
|
|
4205
|
+
declare interface PickerItemData {
|
|
4206
|
+
value: string;
|
|
4207
|
+
label?: string;
|
|
4208
|
+
description?: string;
|
|
4209
|
+
disabled?: boolean;
|
|
4210
|
+
}
|
|
4211
|
+
|
|
4212
|
+
declare class PickerLabel extends LitElement {
|
|
4213
|
+
static family: string;
|
|
4214
|
+
static styles: CSSResult;
|
|
4215
|
+
render(): TemplateResult<1>;
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4218
|
+
declare class PickerList extends LitElement {
|
|
4219
|
+
static family: string;
|
|
4220
|
+
static styles: CSSResult;
|
|
4221
|
+
/** Cap on the scrolling list: any CSS length (`400px`, `50vh`, `24rem`) or `none`. */
|
|
4222
|
+
maxHeight: string | null;
|
|
4223
|
+
/**
|
|
4224
|
+
* Data-driven items (`{ value, label?, description?, disabled? }`), rendered as items in this
|
|
4225
|
+
* list's light DOM. Not virtualised: every item is materialised.
|
|
4226
|
+
*/
|
|
4227
|
+
items: PickerItemData[] | null;
|
|
4228
|
+
connectedCallback(): void;
|
|
4229
|
+
updated(changed: PropertyValues<this>): void;
|
|
4230
|
+
private _renderItems;
|
|
4231
|
+
render(): TemplateResult<1>;
|
|
4232
|
+
}
|
|
4233
|
+
|
|
4234
|
+
declare abstract class PickerRoot extends LitElement {
|
|
4235
|
+
static family: string;
|
|
4236
|
+
static styles: CSSResult;
|
|
4237
|
+
/** The value. Combobox: the chosen item's `value`. Autocomplete: the text in the field. */
|
|
4238
|
+
value: string;
|
|
4239
|
+
/** Where the panel opens: `bottom-start` (default), `bottom-end`, `top-start`, … */
|
|
4240
|
+
placement: string;
|
|
4241
|
+
/** Row height in px for every item (sets `--<family>-item-height`). */
|
|
4242
|
+
itemHeight: string | null;
|
|
4243
|
+
protected _open: boolean;
|
|
4244
|
+
protected _highlighted: PickerItem | null;
|
|
4245
|
+
private _ignorePointer;
|
|
4246
|
+
private _raf;
|
|
4247
|
+
private _anchorKey;
|
|
4248
|
+
/** Whether the list is open. */
|
|
4249
|
+
get open(): boolean;
|
|
4250
|
+
get family(): string;
|
|
4251
|
+
/** Descendants matching `selector` that belong to this root (not to a nested picker). */
|
|
4252
|
+
protected own<T extends Element>(selector: string): T[];
|
|
4253
|
+
get field(): PickerField | null;
|
|
4254
|
+
get content(): PickerContent | null;
|
|
4255
|
+
get list(): PickerList | null;
|
|
4256
|
+
/** Every item, in DOM order. */
|
|
4257
|
+
items(): PickerItem[];
|
|
4258
|
+
protected get emptyElement(): HTMLElement | null;
|
|
4259
|
+
connectedCallback(): void;
|
|
4260
|
+
disconnectedCallback(): void;
|
|
4261
|
+
updated(changed: PropertyValues<this>): void;
|
|
4262
|
+
render(): TemplateResult<1>;
|
|
4263
|
+
/** The query the list is filtered by when it opens. */
|
|
4264
|
+
protected abstract openQuery(): string;
|
|
4265
|
+
/** Whether the empty element shows for this result. */
|
|
4266
|
+
protected abstract emptyVisible(query: string, nothingMatched: boolean): boolean;
|
|
4267
|
+
/** Whether the panel shows at all for this result. */
|
|
4268
|
+
protected abstract panelVisible(nothingMatched: boolean): boolean;
|
|
4269
|
+
/** An item was clicked (and the consumer did not cancel `-item-selected`). */
|
|
4270
|
+
protected abstract onItemChosen(value: string): void;
|
|
4271
|
+
/** Text field typed into. */
|
|
4272
|
+
abstract fieldInput(text: string): void;
|
|
4273
|
+
/** Text field focused. */
|
|
4274
|
+
abstract fieldFocus(): void;
|
|
4275
|
+
/** Called after the list opened (no keyboard highlight requested). */
|
|
4276
|
+
protected onOpened(): void;
|
|
4277
|
+
/** Called after the list closed. */
|
|
4278
|
+
protected onClosed(): void;
|
|
4279
|
+
/** Opens the list. `highlight` picks the first/last navigable item, as ArrowDown/ArrowUp do. */
|
|
4280
|
+
openPanel(highlight?: 'first' | 'last'): void;
|
|
4281
|
+
closePanel(): void;
|
|
4282
|
+
/** Whether `item` matches a non-empty `query`: the field's `filter`, else a case-insensitive label match. */
|
|
4283
|
+
protected itemMatches(query: string, item: PickerItem): boolean;
|
|
4284
|
+
/** Hides the items that do not match `query`, collapses emptied groups and their separators. */
|
|
4285
|
+
protected applyFilter(query: string): number;
|
|
4286
|
+
private _updateStructure;
|
|
4287
|
+
get highlighted(): PickerItem | null;
|
|
4288
|
+
/** Visible, enabled items: the ones the arrow keys move through. */
|
|
4289
|
+
protected navigable(): PickerItem[];
|
|
4290
|
+
protected setHighlight(item: PickerItem, scroll?: boolean): void;
|
|
4291
|
+
clearHighlight(): void;
|
|
4292
|
+
highlightFirst(): void;
|
|
4293
|
+
highlightLast(): void;
|
|
4294
|
+
/** ArrowDown (+1) / ArrowUp (-1) while open, wrapping, skipping disabled and filtered-out items. */
|
|
4295
|
+
moveHighlight(direction: 1 | -1): void;
|
|
4296
|
+
/** Pointer over an item. Ignored until the pointer really moves after the list opens or re-filters. */
|
|
4297
|
+
itemHovered(item: PickerItem): void;
|
|
4298
|
+
protected ignorePointerUntilMove(): void;
|
|
4299
|
+
protected syncField(): void;
|
|
4300
|
+
/** The label an item shows in the field: its `label`, else its text. */
|
|
4301
|
+
protected labelFor(value: string): string;
|
|
4302
|
+
private _onItemSelected;
|
|
4303
|
+
private _onDocumentPointerDown;
|
|
4304
|
+
private _onDocumentPointerMove;
|
|
4305
|
+
/** The element the panel is placed against: the field host. */
|
|
4306
|
+
protected get anchor(): Element | null;
|
|
4307
|
+
private _startLoop;
|
|
4308
|
+
private _stopLoop;
|
|
4309
|
+
/** Re-measures and places the panel now (after its contents changed). */
|
|
4310
|
+
reposition(): void;
|
|
4311
|
+
}
|
|
4312
|
+
|
|
4313
|
+
declare class PickerSeparator extends LitElement {
|
|
4314
|
+
static family: string;
|
|
4315
|
+
static styles: CSSResult;
|
|
4316
|
+
connectedCallback(): void;
|
|
4317
|
+
render(): symbol;
|
|
4318
|
+
}
|
|
4319
|
+
|
|
2263
4320
|
export declare const Popover: ReactWebComponent<AnduinPopover, {
|
|
2264
4321
|
onOpenChange: string;
|
|
4322
|
+
onOpenChangeRequest: string;
|
|
4323
|
+
onOpen: string;
|
|
4324
|
+
onClose: string;
|
|
2265
4325
|
}>;
|
|
2266
4326
|
|
|
4327
|
+
/**
|
|
4328
|
+
* Design API: the popover asks to open (`detail.value === true`) or close — trigger click, Escape, outside click,
|
|
4329
|
+
* a close part. Fired before `open` changes; set `open` back from the handler to keep it controlled.
|
|
4330
|
+
*/
|
|
4331
|
+
export declare const POPOVER_DESIGN_OPEN_CHANGE = "anduin-popover-open-change";
|
|
4332
|
+
|
|
4333
|
+
/** Design API: the popover was hidden. `detail` is `{ value: undefined }`. */
|
|
4334
|
+
export declare const POPOVER_ON_CLOSE = "anduin-popover-on-close";
|
|
4335
|
+
|
|
4336
|
+
/** Design API: the popover became visible. `detail` is `{ value: undefined }`. */
|
|
4337
|
+
export declare const POPOVER_ON_OPEN = "anduin-popover-on-open";
|
|
4338
|
+
|
|
2267
4339
|
/** Fired whenever `open` changes, including self-initiated toggles and outside clicks. `event.detail` is the new state. */
|
|
2268
4340
|
export declare const POPOVER_OPEN_CHANGE = "anduin-popover:open-change";
|
|
2269
4341
|
|
|
2270
4342
|
export declare const PopoverClose: ReactWebComponent<AnduinPopoverClose, {}>;
|
|
2271
4343
|
|
|
4344
|
+
export declare const PopoverContent: ReactWebComponent<AnduinPopoverContent, {}>;
|
|
4345
|
+
|
|
4346
|
+
export declare const PopoverTitle: ReactWebComponent<AnduinPopoverTitle, {}>;
|
|
4347
|
+
|
|
4348
|
+
export declare const PopoverTrigger: ReactWebComponent<AnduinPopoverTrigger, {}>;
|
|
4349
|
+
|
|
4350
|
+
declare type PopupAlign = 'start' | 'center' | 'end';
|
|
4351
|
+
|
|
4352
|
+
declare type PopupPlacement = `${PopupSide}-${PopupAlign}`;
|
|
4353
|
+
|
|
4354
|
+
/** The design repo's 12 placements (`PlacementTypes.Placement`); `top`/`bottom`/`left`/`right` mean `-center`. */
|
|
4355
|
+
declare type PopupPlacement_2 = 'top-center' | 'top-start' | 'top-end' | 'bottom-center' | 'bottom-start' | 'bottom-end' | 'left-center' | 'left-start' | 'left-end' | 'right-center' | 'right-start' | 'right-end' | 'top' | 'bottom' | 'left' | 'right';
|
|
4356
|
+
|
|
4357
|
+
/**
|
|
4358
|
+
* Shared machinery for the design-API popups (`anduin-popover-content`, `anduin-menu-content`,
|
|
4359
|
+
* `anduin-menu-sub-content`): placement, frame-by-frame tracking, the Escape stack and focus helpers.
|
|
4360
|
+
* Ported from the design repo's `PopupPlacement`, `PopupPositionTracker`, `OverlayStack` and `FocusUtils`.
|
|
4361
|
+
*/
|
|
4362
|
+
declare type PopupSide = 'top' | 'bottom' | 'left' | 'right';
|
|
4363
|
+
|
|
2272
4364
|
export declare const Progress: ReactWebComponent<AnduinProgress, {}>;
|
|
2273
4365
|
|
|
2274
4366
|
export declare const Radio: ReactWebComponent<AnduinRadio, {
|
|
@@ -2298,6 +4390,125 @@ export declare const RESIZE_EVENT = "anduin-resizable:resize";
|
|
|
2298
4390
|
|
|
2299
4391
|
declare type ResizeOrientation = 'horizontal' | 'vertical';
|
|
2300
4392
|
|
|
4393
|
+
export declare const Select: ReactWebComponent<AnduinSelect, {
|
|
4394
|
+
onValueChange: EventName<CustomEvent<{
|
|
4395
|
+
value: string;
|
|
4396
|
+
}>>;
|
|
4397
|
+
onClose: string;
|
|
4398
|
+
}>;
|
|
4399
|
+
|
|
4400
|
+
/**
|
|
4401
|
+
* Fired on `<anduin-select>` when the user picks a value (or clears it) — detail: `{ value: string }`.
|
|
4402
|
+
* The design repo's name, used verbatim: it is the plain `change`.
|
|
4403
|
+
*/
|
|
4404
|
+
export declare const SELECT_CHANGE = "change";
|
|
4405
|
+
|
|
4406
|
+
/** Fired on `<anduin-select>` whenever the dropdown closes (selection, outside click, Escape, trigger). Does not bubble. */
|
|
4407
|
+
export declare const SELECT_CLOSE = "anduin-select-on-close";
|
|
4408
|
+
|
|
4409
|
+
/**
|
|
4410
|
+
* Fired on the `<anduin-select-item>` the user picks (click, or Enter/Space on the highlighted one) — detail:
|
|
4411
|
+
* `{ value: string }`, bubbles, **cancelable**: `preventDefault()` keeps the dropdown open and leaves the value alone.
|
|
4412
|
+
*/
|
|
4413
|
+
export declare const SELECT_ITEM_SELECTED = "anduin-select-item-selected";
|
|
4414
|
+
|
|
4415
|
+
export declare const SelectClear: ReactWebComponent<AnduinSelectClear, {}>;
|
|
4416
|
+
|
|
4417
|
+
export declare const SelectContent: ReactWebComponent<AnduinSelectContent, {}>;
|
|
4418
|
+
|
|
4419
|
+
export declare const SelectEmpty: ReactWebComponent<AnduinSelectEmpty, {}>;
|
|
4420
|
+
|
|
4421
|
+
export declare const SelectFooter: ReactWebComponent<AnduinSelectFooter, {}>;
|
|
4422
|
+
|
|
4423
|
+
export declare const SelectGroup: ReactWebComponent<AnduinSelectGroup, {}>;
|
|
4424
|
+
|
|
4425
|
+
export declare const SelectHeader: ReactWebComponent<AnduinSelectHeader, {}>;
|
|
4426
|
+
|
|
4427
|
+
export declare const SelectInput: ReactWebComponent<AnduinSelectInput, {}>;
|
|
4428
|
+
|
|
4429
|
+
declare type SelectInputSize = 'small' | 'default' | 'large';
|
|
4430
|
+
|
|
4431
|
+
export declare const SelectItem: ReactWebComponent<AnduinSelectItem, {
|
|
4432
|
+
onClick: EventName<CustomEvent<{
|
|
4433
|
+
value: string;
|
|
4434
|
+
}>>;
|
|
4435
|
+
}>;
|
|
4436
|
+
|
|
4437
|
+
/** Return whether the item stays visible. Replaces the default case-insensitive substring match on the label. */
|
|
4438
|
+
declare type SelectItemFilter = (item: SelectItemMatch) => boolean;
|
|
4439
|
+
|
|
4440
|
+
/** What a custom `filter` / `rank` on `<anduin-select-input>` is asked about, once per item per non-empty query. */
|
|
4441
|
+
declare interface SelectItemMatch {
|
|
4442
|
+
query: string;
|
|
4443
|
+
value: string;
|
|
4444
|
+
label: string;
|
|
4445
|
+
}
|
|
4446
|
+
|
|
4447
|
+
/** Return `null`/`undefined` to hide the item, or a score: higher scores sort first within their group. */
|
|
4448
|
+
declare type SelectItemRank = (item: SelectItemMatch) => number | null | undefined;
|
|
4449
|
+
|
|
4450
|
+
declare type SelectItemSize = 'medium' | 'free';
|
|
4451
|
+
|
|
4452
|
+
export declare const SelectLabel: ReactWebComponent<AnduinSelectLabel, {}>;
|
|
4453
|
+
|
|
4454
|
+
export declare const SelectList: ReactWebComponent<AnduinSelectList, {}>;
|
|
4455
|
+
|
|
4456
|
+
declare type SelectPlacement = PopupPlacement_2;
|
|
4457
|
+
|
|
4458
|
+
export declare const SelectSelectedLabel: ReactWebComponent<AnduinSelectSelectedLabel, {}>;
|
|
4459
|
+
|
|
4460
|
+
export declare const SelectSeparator: ReactWebComponent<AnduinSelectSeparator, {}>;
|
|
4461
|
+
|
|
4462
|
+
export declare const SelectTrigger: ReactWebComponent<AnduinSelectTrigger, {}>;
|
|
4463
|
+
|
|
4464
|
+
export declare const Sheet: ReactWebComponent<AnduinSheet, {
|
|
4465
|
+
onOpenChange: string;
|
|
4466
|
+
onOpen: string;
|
|
4467
|
+
onClose: string;
|
|
4468
|
+
}>;
|
|
4469
|
+
|
|
4470
|
+
/** Fired by `anduin-sheet-content` after a built-in dock toggle flips its `dock` — detail `{ value: boolean }` (now docked). */
|
|
4471
|
+
export declare const SHEET_DOCK_CHANGE = "anduin-sheet-dock-change";
|
|
4472
|
+
|
|
4473
|
+
/** Fired by `anduin-sheet` once it closes (both modes). Stops at the sheet element. */
|
|
4474
|
+
export declare const SHEET_ON_CLOSE = "anduin-sheet-on-close";
|
|
4475
|
+
|
|
4476
|
+
/** Fired by `anduin-sheet` once it opens (both modes). Stops at the sheet element. */
|
|
4477
|
+
export declare const SHEET_ON_OPEN = "anduin-sheet-on-open";
|
|
4478
|
+
|
|
4479
|
+
/** Fired by `anduin-sheet-content` when the user resizes it — detail `{ value: number }`, the new size in px. */
|
|
4480
|
+
export declare const SHEET_ON_RESIZE = "anduin-sheet-on-resize";
|
|
4481
|
+
|
|
4482
|
+
/** Fired by `anduin-sheet` in controlled mode when it wants to open or close — detail `{ value: boolean }`. Does not bubble. */
|
|
4483
|
+
export declare const SHEET_OPEN_CHANGE = "anduin-sheet-open-change";
|
|
4484
|
+
|
|
4485
|
+
export declare const SheetClose: ReactWebComponent<AnduinSheetClose, {}>;
|
|
4486
|
+
|
|
4487
|
+
export declare const SheetContent: ReactWebComponent<AnduinSheetContent, {
|
|
4488
|
+
onDockChange: string;
|
|
4489
|
+
onResize: string;
|
|
4490
|
+
}>;
|
|
4491
|
+
|
|
4492
|
+
export declare const SheetDescription: ReactWebComponent<AnduinSheetDescription, {}>;
|
|
4493
|
+
|
|
4494
|
+
export declare const SheetDockToggle: ReactWebComponent<AnduinSheetDockToggle, {}>;
|
|
4495
|
+
|
|
4496
|
+
export declare const SheetDockToggleOff: ReactWebComponent<AnduinSheetDockToggleOff, {}>;
|
|
4497
|
+
|
|
4498
|
+
export declare const SheetDockToggleOn: ReactWebComponent<AnduinSheetDockToggleOn, {}>;
|
|
4499
|
+
|
|
4500
|
+
export declare const SheetFooter: ReactWebComponent<AnduinSheetFooter, {}>;
|
|
4501
|
+
|
|
4502
|
+
export declare const SheetHeader: ReactWebComponent<AnduinSheetHeader, {}>;
|
|
4503
|
+
|
|
4504
|
+
declare type SheetSide = DockSide;
|
|
4505
|
+
|
|
4506
|
+
export declare const SheetTitle: ReactWebComponent<AnduinSheetTitle, {}>;
|
|
4507
|
+
|
|
4508
|
+
export declare const SheetTrigger: ReactWebComponent<AnduinSheetTrigger, {}>;
|
|
4509
|
+
|
|
4510
|
+
declare type SheetWidth = 'small' | 'medium' | 'large' | 'extraLarge' | 'fitContent' | (string & {});
|
|
4511
|
+
|
|
2301
4512
|
export declare const Sidebar: ReactWebComponent<AnduinSidebar, {}>;
|
|
2302
4513
|
|
|
2303
4514
|
/**
|
|
@@ -2358,6 +4569,15 @@ declare interface SuggestionItem {
|
|
|
2358
4569
|
icon?: string;
|
|
2359
4570
|
}
|
|
2360
4571
|
|
|
4572
|
+
export declare const Switch: ReactWebComponent<AnduinSwitch, {
|
|
4573
|
+
onCheckedChange: EventName<CustomEvent<{
|
|
4574
|
+
value: boolean;
|
|
4575
|
+
}>>;
|
|
4576
|
+
}>;
|
|
4577
|
+
|
|
4578
|
+
/** Fired when the user toggles the switch — detail: `{ value: boolean }` (the requested state). */
|
|
4579
|
+
export declare const SWITCH_CHECKED_CHANGE = "anduin-switch-checked-change";
|
|
4580
|
+
|
|
2361
4581
|
export declare const Switcher: ReactWebComponent<AnduinSwitcher, {
|
|
2362
4582
|
onChange: string;
|
|
2363
4583
|
}>;
|
|
@@ -2740,6 +4960,12 @@ export declare const TooltipContent: ReactWebComponent<AnduinTooltipContent, {}>
|
|
|
2740
4960
|
|
|
2741
4961
|
export declare const TooltipTrigger: ReactWebComponent<AnduinTooltipTrigger, {}>;
|
|
2742
4962
|
|
|
4963
|
+
export declare const Truncated: ReactWebComponent<AnduinTruncated, {}>;
|
|
4964
|
+
|
|
4965
|
+
declare type ValueEvent<T = string> = EventName<CustomEvent<{
|
|
4966
|
+
value: T;
|
|
4967
|
+
}>>;
|
|
4968
|
+
|
|
2743
4969
|
export declare const Well: ReactWebComponent<AnduinWell, {}>;
|
|
2744
4970
|
|
|
2745
4971
|
export declare const WELL_CLOSE_CLICK = "anduin-well-close:click";
|