@guildofgleks/ui 21.2.3 → 21.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -12
- package/fesm2022/guildofgleks-ui.mjs +582 -36
- package/fesm2022/guildofgleks-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/src/styles/theme.css +111 -70
- package/src/styles/utilities.css +69 -33
- package/types/guildofgleks-ui.d.ts +308 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, Type, Injector, InjectionToken, OnDestroy, DoCheck, Signal, ModelSignal, ElementRef } from '@angular/core';
|
|
2
|
+
import { TemplateRef, Type, Injector, InjectionToken, OnDestroy, DoCheck, Signal, ModelSignal, ElementRef, Provider } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
5
5
|
import * as _guildofgleks_ui from '@guildofgleks/ui';
|
|
@@ -12,6 +12,20 @@ type GogTagShape = 'rounded' | 'pill';
|
|
|
12
12
|
type GogSkeletonShape = 'text' | 'circle' | 'rect';
|
|
13
13
|
type GogSkeletonAnimation = 'pulse' | 'wave' | 'none';
|
|
14
14
|
type GogPaginatorRangeMode = 'window' | 'ellipsis';
|
|
15
|
+
type GogScrollAxis = 'vertical' | 'horizontal' | 'both';
|
|
16
|
+
type GogScrollSize = 'normal' | 'thin';
|
|
17
|
+
/**
|
|
18
|
+
* Mirrors the CSS `overscroll-behavior` value space directly:
|
|
19
|
+
* - `'auto'` — scrolling past this instance's edge chains to the next scrollable ancestor
|
|
20
|
+
* (a page, a dialog body, another gog-scroll), the same as an un-customized native
|
|
21
|
+
* `overflow: auto` div. The default — matches what most embedded content expects.
|
|
22
|
+
* - `'contain'` — scrolling stops dead at this instance's edge; nothing behind it moves.
|
|
23
|
+
* Suited to overlay-style panels (a dropdown, a modal) where scrolling past the end
|
|
24
|
+
* shouldn't also scroll whatever is behind them.
|
|
25
|
+
* - `'none'` — like `'contain'`, and additionally suppresses the platform's own overscroll
|
|
26
|
+
* affordances (rubber-banding, pull-to-refresh) for this instance.
|
|
27
|
+
*/
|
|
28
|
+
type GogScrollOverscrollBehavior = 'auto' | 'contain' | 'none';
|
|
15
29
|
|
|
16
30
|
declare class ButtonComponent {
|
|
17
31
|
variant: _angular_core.InputSignal<GogVariant>;
|
|
@@ -25,8 +39,9 @@ declare class ButtonComponent {
|
|
|
25
39
|
* guard, not a delay before the first click fires: the first click in a
|
|
26
40
|
* window is emitted immediately (leading edge), and any further clicks
|
|
27
41
|
* within `debounce` ms are silently dropped until the window elapses.
|
|
42
|
+
* Unset, falls back to `GOG_CONFIG.button.debounce`, then to `300`.
|
|
28
43
|
*/
|
|
29
|
-
debounce: _angular_core.InputSignal<number>;
|
|
44
|
+
debounce: _angular_core.InputSignal<number | undefined>;
|
|
30
45
|
/**
|
|
31
46
|
* Accessible name for the button, forwarded to the native <button>.
|
|
32
47
|
* Setting `aria-label` directly on <gog-button> in a template does NOT
|
|
@@ -42,6 +57,8 @@ declare class ButtonComponent {
|
|
|
42
57
|
protected isDisabled: _angular_core.Signal<boolean>;
|
|
43
58
|
private static readonly SPINNER_SIZE_BY_BUTTON_SIZE;
|
|
44
59
|
protected spinnerSize: _angular_core.Signal<GogSize>;
|
|
60
|
+
private readonly globalConfig;
|
|
61
|
+
protected readonly resolvedDebounce: _angular_core.Signal<number>;
|
|
45
62
|
private readonly destroyRef;
|
|
46
63
|
private readonly click$;
|
|
47
64
|
constructor();
|
|
@@ -144,6 +161,47 @@ declare class AccordionComponent {
|
|
|
144
161
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionComponent, "gog-accordion", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "expandFirst": { "alias": "expandFirst"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "skeletonCount": { "alias": "skeletonCount"; "required": false; "isSignal": true; }; "showChevron": { "alias": "showChevron"; "required": false; "isSignal": true; }; "headingLevel": { "alias": "headingLevel"; "required": false; "isSignal": true; }; "openIds": { "alias": "openIds"; "required": false; "isSignal": true; }; }, { "openIds": "openIdsChange"; "gogToggle": "gogToggle"; }, ["headerTpl", "chevronTpl", "contentTpl"], never, true, never>;
|
|
145
162
|
}
|
|
146
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Headless expand/collapse primitive — a trigger toggles a content region open and
|
|
166
|
+
* closed, in place (no portal/overlay, unlike `gog-select`/`gog-multiselect`). Unopinionated
|
|
167
|
+
* about markup: project any element as the trigger via `gogCollapsibleTrigger` and any
|
|
168
|
+
* element as the content via `gogCollapsibleContent`; this component only holds the shared
|
|
169
|
+
* `open` state and generates the id pair linking them for ARIA.
|
|
170
|
+
*/
|
|
171
|
+
declare class CollapsibleComponent {
|
|
172
|
+
private static nextUid;
|
|
173
|
+
/** Two-way bindable open state: `[(open)]="signal"`. */
|
|
174
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
175
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
176
|
+
private readonly uid;
|
|
177
|
+
readonly contentId: _angular_core.Signal<string>;
|
|
178
|
+
toggle(): void;
|
|
179
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CollapsibleComponent, never>;
|
|
180
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CollapsibleComponent, "gog-collapsible", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, ["*"], true, never>;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Marks the element that toggles a `gog-collapsible`. Works on any clickable element
|
|
185
|
+
* (`<button>`, `<a>`, ...) — this only wires the click handler and the ARIA attributes
|
|
186
|
+
* pointing at the matching `gogCollapsibleContent`; it owns no markup of its own.
|
|
187
|
+
*/
|
|
188
|
+
declare class GogCollapsibleTriggerDirective {
|
|
189
|
+
protected readonly collapsible: CollapsibleComponent;
|
|
190
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GogCollapsibleTriggerDirective, never>;
|
|
191
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GogCollapsibleTriggerDirective, "[gogCollapsibleTrigger]", never, {}, {}, never, never, true, never>;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Marks the element that a `gog-collapsible` shows and hides. Applies the open/closed
|
|
196
|
+
* CSS state and the ARIA wiring (`id`, `aria-hidden`, `inert`) to whatever element this is
|
|
197
|
+
* placed on — that element owns its own content and layout.
|
|
198
|
+
*/
|
|
199
|
+
declare class GogCollapsibleContentDirective {
|
|
200
|
+
protected readonly collapsible: CollapsibleComponent;
|
|
201
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GogCollapsibleContentDirective, never>;
|
|
202
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GogCollapsibleContentDirective, "[gogCollapsibleContent]", never, {}, {}, never, never, true, never>;
|
|
203
|
+
}
|
|
204
|
+
|
|
147
205
|
declare class CheckboxComponent implements ControlValueAccessor {
|
|
148
206
|
readonly label: _angular_core.InputSignal<string>;
|
|
149
207
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
@@ -155,7 +213,7 @@ declare class CheckboxComponent implements ControlValueAccessor {
|
|
|
155
213
|
/**
|
|
156
214
|
* Two-way bindable checked state: `[(checked)]="signal"`.
|
|
157
215
|
* This is the same state Angular Forms drives via `writeValue`/`registerOnChange`
|
|
158
|
-
* when the component is used with `formControlName`/`[formControl]
|
|
216
|
+
* when the component is used with `formControlName`/`[formControl]`.
|
|
159
217
|
* Don't wire both a form directive AND `[(checked)]` to the same instance —
|
|
160
218
|
* pick one, otherwise you end up with two competing sources of truth.
|
|
161
219
|
*/
|
|
@@ -185,8 +243,10 @@ declare class CheckboxComponent implements ControlValueAccessor {
|
|
|
185
243
|
protected readonly checkboxPadding = "var(--gog-control-checkbox-padding, 6px)";
|
|
186
244
|
protected readonly labelSize: _angular_core.Signal<"var(--gog-control-checkbox-label-size-xsm, 0.6875rem)" | "var(--gog-control-checkbox-label-size-sm, 0.8125rem)" | "var(--gog-control-checkbox-label-size-md, 0.9375rem)" | "var(--gog-control-checkbox-label-size-lg, 1.0625rem)" | "var(--gog-control-checkbox-label-size-slg, 1.1875rem)">;
|
|
187
245
|
protected readonly iconSize: _angular_core.Signal<"var(--gog-control-checkbox-icon-size-xsm, 10px)" | "var(--gog-control-checkbox-icon-size-sm, 12px)" | "var(--gog-control-checkbox-icon-size-md, 14px)" | "var(--gog-control-checkbox-icon-size-lg, 18px)" | "var(--gog-control-checkbox-icon-size-slg, 22px)">;
|
|
246
|
+
private readonly ngControl;
|
|
188
247
|
private readonly cvaDisabled;
|
|
189
248
|
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
249
|
+
constructor();
|
|
190
250
|
writeValue(val: boolean): void;
|
|
191
251
|
registerOnChange(fn: (val: boolean) => void): void;
|
|
192
252
|
registerOnTouched(fn: () => void): void;
|
|
@@ -420,17 +480,23 @@ declare class ToastContainerComponent {
|
|
|
420
480
|
*
|
|
421
481
|
* `'auto'`: shown once the attached form control has been touched and is invalid — the
|
|
422
482
|
* consumer only supplies the message text, not the timing. Requires a
|
|
423
|
-
* `[formControl]` / `formControlName`
|
|
424
|
-
*
|
|
483
|
+
* `[formControl]` / `formControlName` on the element; without one this falls back to
|
|
484
|
+
* `'manual'`, since there is no control state to key off.
|
|
425
485
|
*/
|
|
426
486
|
type GogErrorDisplay = 'auto' | 'manual';
|
|
427
487
|
|
|
428
488
|
declare class InputfieldComponent implements ControlValueAccessor, DoCheck {
|
|
429
489
|
readonly label: _angular_core.InputSignal<string>;
|
|
430
490
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
431
|
-
readonly type: _angular_core.InputSignal<"text" | "password" | "email">;
|
|
491
|
+
readonly type: _angular_core.InputSignal<"number" | "text" | "password" | "email" | "date">;
|
|
432
492
|
/** Defaults to 'current-password' for password fields, 'off' otherwise */
|
|
433
493
|
readonly autocomplete: _angular_core.InputSignal<string>;
|
|
494
|
+
/** Only applied when `type="number"`. */
|
|
495
|
+
readonly min: _angular_core.InputSignal<number | null>;
|
|
496
|
+
/** Only applied when `type="number"`. */
|
|
497
|
+
readonly max: _angular_core.InputSignal<number | null>;
|
|
498
|
+
/** Only applied when `type="number"`. */
|
|
499
|
+
readonly step: _angular_core.InputSignal<number | null>;
|
|
434
500
|
readonly errorMessage: _angular_core.InputSignal<string>;
|
|
435
501
|
/** See `GogErrorDisplay`. Defaults to `'manual'`, matching every other control in the library. */
|
|
436
502
|
readonly errorDisplay: _angular_core.InputSignal<GogErrorDisplay>;
|
|
@@ -463,7 +529,12 @@ declare class InputfieldComponent implements ControlValueAccessor, DoCheck {
|
|
|
463
529
|
readonly showPasswordLabel: _angular_core.InputSignal<string>;
|
|
464
530
|
/** aria-label for the hide-password button, shown once the password is revealed */
|
|
465
531
|
readonly hidePasswordLabel: _angular_core.InputSignal<string>;
|
|
466
|
-
/**
|
|
532
|
+
/**
|
|
533
|
+
* Two-way bindable value: `[(value)]="signal"` or `[value]` / `(valueChange)`.
|
|
534
|
+
* Always a string, including for `type="number"` — that field's `formControl`/
|
|
535
|
+
* `formControlName` value is a `number` (or `null` when empty); the string here is only
|
|
536
|
+
* the raw text shown in the native input.
|
|
537
|
+
*/
|
|
467
538
|
readonly value: _angular_core.ModelSignal<string>;
|
|
468
539
|
private readonly ngControl;
|
|
469
540
|
private readonly cvaDisabled;
|
|
@@ -471,7 +542,8 @@ declare class InputfieldComponent implements ControlValueAccessor, DoCheck {
|
|
|
471
542
|
private readonly passwordVisible;
|
|
472
543
|
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
473
544
|
protected readonly isPasswordField: _angular_core.Signal<boolean>;
|
|
474
|
-
protected readonly
|
|
545
|
+
protected readonly isNumberField: _angular_core.Signal<boolean>;
|
|
546
|
+
protected readonly effectiveType: _angular_core.Signal<"number" | "text" | "password" | "email" | "date">;
|
|
475
547
|
protected readonly effectiveAutocomplete: _angular_core.Signal<string>;
|
|
476
548
|
protected readonly hasError: _angular_core.Signal<boolean>;
|
|
477
549
|
protected readonly visibleError: _angular_core.Signal<string>;
|
|
@@ -482,12 +554,13 @@ declare class InputfieldComponent implements ControlValueAccessor, DoCheck {
|
|
|
482
554
|
protected readonly effectiveIconEndLabel: _angular_core.Signal<string>;
|
|
483
555
|
protected readonly hasIconEnd: _angular_core.Signal<boolean>;
|
|
484
556
|
protected readonly hasIconEndAction: _angular_core.Signal<boolean>;
|
|
557
|
+
/** `number` for a `type="number"` field (`null` when empty), `string` otherwise. */
|
|
485
558
|
private _onChange;
|
|
486
559
|
private _onTouched;
|
|
487
560
|
constructor();
|
|
488
561
|
ngDoCheck(): void;
|
|
489
|
-
writeValue(val: string): void;
|
|
490
|
-
registerOnChange(fn: (val: string) => void): void;
|
|
562
|
+
writeValue(val: string | number | null): void;
|
|
563
|
+
registerOnChange(fn: (val: string | number | null) => void): void;
|
|
491
564
|
registerOnTouched(fn: () => void): void;
|
|
492
565
|
setDisabledState(isDisabled: boolean): void;
|
|
493
566
|
protected onIconStartClick(): void;
|
|
@@ -495,7 +568,46 @@ declare class InputfieldComponent implements ControlValueAccessor, DoCheck {
|
|
|
495
568
|
onInput(event: Event): void;
|
|
496
569
|
onBlur(): void;
|
|
497
570
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InputfieldComponent, never>;
|
|
498
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputfieldComponent, "gog-inputfield", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errorDisplay": { "alias": "errorDisplay"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "iconStart": { "alias": "iconStart"; "required": false; "isSignal": true; }; "iconEnd": { "alias": "iconEnd"; "required": false; "isSignal": true; }; "iconStartTemplate": { "alias": "iconStartTemplate"; "required": false; "isSignal": true; }; "iconEndTemplate": { "alias": "iconEndTemplate"; "required": false; "isSignal": true; }; "iconStartFn": { "alias": "iconStartFn"; "required": false; "isSignal": true; }; "iconEndFn": { "alias": "iconEndFn"; "required": false; "isSignal": true; }; "iconStartLabel": { "alias": "iconStartLabel"; "required": false; "isSignal": true; }; "iconEndLabel": { "alias": "iconEndLabel"; "required": false; "isSignal": true; }; "showPasswordLabel": { "alias": "showPasswordLabel"; "required": false; "isSignal": true; }; "hidePasswordLabel": { "alias": "hidePasswordLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
571
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputfieldComponent, "gog-inputfield", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errorDisplay": { "alias": "errorDisplay"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "iconStart": { "alias": "iconStart"; "required": false; "isSignal": true; }; "iconEnd": { "alias": "iconEnd"; "required": false; "isSignal": true; }; "iconStartTemplate": { "alias": "iconStartTemplate"; "required": false; "isSignal": true; }; "iconEndTemplate": { "alias": "iconEndTemplate"; "required": false; "isSignal": true; }; "iconStartFn": { "alias": "iconStartFn"; "required": false; "isSignal": true; }; "iconEndFn": { "alias": "iconEndFn"; "required": false; "isSignal": true; }; "iconStartLabel": { "alias": "iconStartLabel"; "required": false; "isSignal": true; }; "iconEndLabel": { "alias": "iconEndLabel"; "required": false; "isSignal": true; }; "showPasswordLabel": { "alias": "showPasswordLabel"; "required": false; "isSignal": true; }; "hidePasswordLabel": { "alias": "hidePasswordLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
declare class TextareaComponent implements ControlValueAccessor, DoCheck {
|
|
575
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
576
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
577
|
+
readonly errorMessage: _angular_core.InputSignal<string>;
|
|
578
|
+
/** See `GogErrorDisplay`. Defaults to `'manual'`, matching every other control in the library. */
|
|
579
|
+
readonly errorDisplay: _angular_core.InputSignal<GogErrorDisplay>;
|
|
580
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
581
|
+
readonly inputId: _angular_core.InputSignal<string>;
|
|
582
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
583
|
+
readonly size: _angular_core.InputSignal<GogSize>;
|
|
584
|
+
/** Native `rows` attribute, controlling the field's initial height. */
|
|
585
|
+
readonly rows: _angular_core.InputSignal<number>;
|
|
586
|
+
/**
|
|
587
|
+
* Full width of the container by default, matching every other field-style control.
|
|
588
|
+
* Set to `false` to shrink the field to fit its content instead.
|
|
589
|
+
*/
|
|
590
|
+
readonly fullWidth: _angular_core.InputSignal<boolean>;
|
|
591
|
+
/** Two-way bindable value: `[(value)]="signal"` or `[value]` / `(valueChange)`. */
|
|
592
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
593
|
+
private readonly ngControl;
|
|
594
|
+
private readonly cvaDisabled;
|
|
595
|
+
private readonly errorState;
|
|
596
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
597
|
+
protected readonly hasError: _angular_core.Signal<boolean>;
|
|
598
|
+
protected readonly visibleError: _angular_core.Signal<string>;
|
|
599
|
+
private _onChange;
|
|
600
|
+
private _onTouched;
|
|
601
|
+
constructor();
|
|
602
|
+
ngDoCheck(): void;
|
|
603
|
+
writeValue(val: string): void;
|
|
604
|
+
registerOnChange(fn: (val: string) => void): void;
|
|
605
|
+
registerOnTouched(fn: () => void): void;
|
|
606
|
+
setDisabledState(isDisabled: boolean): void;
|
|
607
|
+
onInput(event: Event): void;
|
|
608
|
+
onBlur(): void;
|
|
609
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TextareaComponent, never>;
|
|
610
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TextareaComponent, "gog-textarea", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errorDisplay": { "alias": "errorDisplay"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
499
611
|
}
|
|
500
612
|
|
|
501
613
|
declare class ChipComponent {
|
|
@@ -876,6 +988,136 @@ declare class PaginatorComponent {
|
|
|
876
988
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PaginatorComponent, "gog-paginator", never, { "page": { "alias": "page"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "totalPages": { "alias": "totalPages"; "required": false; "isSignal": true; }; "rangeMode": { "alias": "rangeMode"; "required": false; "isSignal": true; }; "visiblePages": { "alias": "visiblePages"; "required": false; "isSignal": true; }; "showFirstPage": { "alias": "showFirstPage"; "required": false; "isSignal": true; }; "showLastPage": { "alias": "showLastPage"; "required": false; "isSignal": true; }; "siblingCount": { "alias": "siblingCount"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; }, never, never, true, never>;
|
|
877
989
|
}
|
|
878
990
|
|
|
991
|
+
/** Snapshot of the viewport's native scroll geometry, emitted on every scroll/resize. */
|
|
992
|
+
interface GogScrollMetrics {
|
|
993
|
+
scrollTop: number;
|
|
994
|
+
scrollLeft: number;
|
|
995
|
+
scrollHeight: number;
|
|
996
|
+
scrollWidth: number;
|
|
997
|
+
clientHeight: number;
|
|
998
|
+
clientWidth: number;
|
|
999
|
+
}
|
|
1000
|
+
type GogScrollDirection = 'vertical' | 'horizontal';
|
|
1001
|
+
/**
|
|
1002
|
+
* Drop-in replacement for a native `overflow: auto` region: the content still scrolls
|
|
1003
|
+
* natively (wheel, touch, keyboard, focus-into-view all keep working unmodified), only the
|
|
1004
|
+
* browser's own scrollbar chrome is hidden and replaced with a themeable, draggable
|
|
1005
|
+
* overlay thumb built from plain pointer events + `ResizeObserver` — no CDK involved, to
|
|
1006
|
+
* stay consistent with the rest of this library's hand-rolled overlay/positioning code.
|
|
1007
|
+
*/
|
|
1008
|
+
declare class ScrollComponent {
|
|
1009
|
+
/** Which axes get an overlay thumb. Native scrolling on the other axis is unaffected. */
|
|
1010
|
+
readonly axis: _angular_core.InputSignal<GogScrollAxis>;
|
|
1011
|
+
/** Unset, falls back to `GOG_CONFIG.scroll.size`, then to `'normal'`. */
|
|
1012
|
+
readonly size: _angular_core.InputSignal<GogScrollSize | undefined>;
|
|
1013
|
+
/**
|
|
1014
|
+
* Fades the thumb out after `hideDelay` ms of inactivity; false keeps it always visible.
|
|
1015
|
+
* Unset, falls back to `GOG_CONFIG.scroll.autoHide`, then to `true`.
|
|
1016
|
+
*/
|
|
1017
|
+
readonly autoHide: _angular_core.InputSignal<boolean | undefined>;
|
|
1018
|
+
/** Unset, falls back to `GOG_CONFIG.scroll.hideDelay`, then to `800`. */
|
|
1019
|
+
readonly hideDelay: _angular_core.InputSignal<number | undefined>;
|
|
1020
|
+
/** Pixel distance from an edge that still counts as "reached" for gogReachStart/End. */
|
|
1021
|
+
readonly reachThreshold: _angular_core.InputSignal<number>;
|
|
1022
|
+
/**
|
|
1023
|
+
* Renders the viewport as its own tab stop (`tabindex="0"`, `role="region"`) per the
|
|
1024
|
+
* WAI-ARIA scrollable-region pattern. Turn off when nesting inside a component that
|
|
1025
|
+
* already owns focus/keyboard handling (a listbox panel, a dialog body) so this doesn't
|
|
1026
|
+
* add a redundant stop — the descendants' own focus still auto-scrolls into view either way.
|
|
1027
|
+
*/
|
|
1028
|
+
readonly focusable: _angular_core.InputSignal<boolean>;
|
|
1029
|
+
/** Accessible name for the viewport when `focusable` is true and there is no visible label. */
|
|
1030
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
1031
|
+
/**
|
|
1032
|
+
* What happens when a scroll gesture reaches this instance's edge. Unset, falls back to
|
|
1033
|
+
* `GOG_CONFIG.scroll.overscrollBehavior`, then to `'auto'`. See `GogScrollOverscrollBehavior`
|
|
1034
|
+
* for what each value does.
|
|
1035
|
+
*/
|
|
1036
|
+
readonly overscrollBehavior: _angular_core.InputSignal<GogScrollOverscrollBehavior | undefined>;
|
|
1037
|
+
readonly gogScroll: _angular_core.OutputEmitterRef<GogScrollMetrics>;
|
|
1038
|
+
readonly gogReachStart: _angular_core.OutputEmitterRef<GogScrollDirection>;
|
|
1039
|
+
readonly gogReachEnd: _angular_core.OutputEmitterRef<GogScrollDirection>;
|
|
1040
|
+
protected readonly viewportRef: _angular_core.Signal<ElementRef<HTMLDivElement>>;
|
|
1041
|
+
protected readonly contentRef: _angular_core.Signal<ElementRef<HTMLDivElement>>;
|
|
1042
|
+
protected readonly showTrackV: _angular_core.WritableSignal<boolean>;
|
|
1043
|
+
protected readonly showTrackH: _angular_core.WritableSignal<boolean>;
|
|
1044
|
+
/**
|
|
1045
|
+
* Flips true once the first real measurement has run. Before that (SSR, or the client
|
|
1046
|
+
* frame before hydration/afterNextRender fires), an allowed axis defaults to `auto` — the
|
|
1047
|
+
* same safe, always-clips behavior this component had before viewportOverflowY/X existed —
|
|
1048
|
+
* rather than guessing `visible` from a `showTrackV`/`H` that just hasn't been measured yet.
|
|
1049
|
+
*/
|
|
1050
|
+
private readonly measured;
|
|
1051
|
+
/**
|
|
1052
|
+
* `overflow-y`/`overflow-x` on the viewport, driven by measured overflow rather than a
|
|
1053
|
+
* static `axis`-only class. Any axis that isn't *currently, actually* scrolling — because
|
|
1054
|
+
* it's disabled by `axis`, or because it's allowed but the content doesn't overflow it —
|
|
1055
|
+
* gets `visible`, never `hidden`/`auto`. A non-`visible` overflow value makes the viewport
|
|
1056
|
+
* a "scroll container" per spec regardless of whether it has anything to scroll, which
|
|
1057
|
+
* becomes the containing block for `position: sticky` descendants (e.g. gog-table's sticky
|
|
1058
|
+
* header) and a scroll-chaining boundary for wheel input. Left non-visible on a disabled or
|
|
1059
|
+
* unneeded axis, an instance nested inside another scroller — axis="horizontal" wrapping a
|
|
1060
|
+
* table that fits, itself inside a taller outer gog-scroll — would silently swallow the
|
|
1061
|
+
* outer axis's wheel scroll and break its sticky headers, even though this instance itself
|
|
1062
|
+
* never visibly scrolls that axis. `visible` whenever the axis is inert avoids both.
|
|
1063
|
+
*/
|
|
1064
|
+
protected readonly viewportOverflowY: _angular_core.Signal<"auto" | "visible">;
|
|
1065
|
+
protected readonly viewportOverflowX: _angular_core.Signal<"auto" | "visible">;
|
|
1066
|
+
/** App/subtree-wide fallbacks for the inputs above that don't set their own value. */
|
|
1067
|
+
private readonly globalConfig;
|
|
1068
|
+
protected readonly resolvedSize: _angular_core.Signal<GogScrollSize>;
|
|
1069
|
+
protected readonly resolvedAutoHide: _angular_core.Signal<boolean>;
|
|
1070
|
+
protected readonly resolvedHideDelay: _angular_core.Signal<number>;
|
|
1071
|
+
protected readonly resolvedOverscrollBehavior: _angular_core.Signal<GogScrollOverscrollBehavior>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Only applies `resolvedOverscrollBehavior` on an axis that's actually acting as a scroll
|
|
1074
|
+
* container — on an axis that's `visible` (see viewportOverflowY/X above) there is no
|
|
1075
|
+
* scroll boundary on it to contain in the first place.
|
|
1076
|
+
*/
|
|
1077
|
+
protected readonly viewportOverscrollY: _angular_core.Signal<GogScrollOverscrollBehavior>;
|
|
1078
|
+
protected readonly viewportOverscrollX: _angular_core.Signal<GogScrollOverscrollBehavior>;
|
|
1079
|
+
protected readonly thumbSizeV: _angular_core.WritableSignal<number>;
|
|
1080
|
+
protected readonly thumbPosV: _angular_core.WritableSignal<number>;
|
|
1081
|
+
protected readonly thumbSizeH: _angular_core.WritableSignal<number>;
|
|
1082
|
+
protected readonly thumbPosH: _angular_core.WritableSignal<number>;
|
|
1083
|
+
protected readonly interacting: _angular_core.WritableSignal<boolean>;
|
|
1084
|
+
protected readonly dragAxis: _angular_core.WritableSignal<GogScrollDirection | null>;
|
|
1085
|
+
private readonly isBrowser;
|
|
1086
|
+
private readonly destroyRef;
|
|
1087
|
+
private resizeObserver;
|
|
1088
|
+
private updateFrame;
|
|
1089
|
+
private hideTimer;
|
|
1090
|
+
/** Read once per token change instead of per drag/scroll tick — see refreshTokens(). */
|
|
1091
|
+
private thumbMinSizePx;
|
|
1092
|
+
private dragStartPointer;
|
|
1093
|
+
private dragStartScroll;
|
|
1094
|
+
private dragTrackLength;
|
|
1095
|
+
private dragThumbSizePct;
|
|
1096
|
+
private readonly reachState;
|
|
1097
|
+
constructor();
|
|
1098
|
+
/** Scrolls the viewport exactly like `Element.scrollTo` — this simply forwards to it. */
|
|
1099
|
+
scrollTo(options: ScrollToOptions): void;
|
|
1100
|
+
scrollToTop(behavior?: ScrollBehavior): void;
|
|
1101
|
+
scrollToBottom(behavior?: ScrollBehavior): void;
|
|
1102
|
+
scrollToLeft(behavior?: ScrollBehavior): void;
|
|
1103
|
+
scrollToRight(behavior?: ScrollBehavior): void;
|
|
1104
|
+
protected onScroll(): void;
|
|
1105
|
+
protected onActivity(): void;
|
|
1106
|
+
protected onTrackPointerDown(event: PointerEvent, axis: GogScrollDirection): void;
|
|
1107
|
+
protected onThumbPointerDown(event: PointerEvent, axis: GogScrollDirection): void;
|
|
1108
|
+
protected onThumbPointerMove(event: PointerEvent, axis: GogScrollDirection): void;
|
|
1109
|
+
protected onThumbPointerUp(event: PointerEvent): void;
|
|
1110
|
+
private restartHideTimer;
|
|
1111
|
+
/** Reads the tokens that feed thumb-size math. Cheap, but still only once per change. */
|
|
1112
|
+
private refreshTokens;
|
|
1113
|
+
/** Coalesces scroll/resize bursts into one measurement per frame. */
|
|
1114
|
+
private scheduleMeasure;
|
|
1115
|
+
private measure;
|
|
1116
|
+
private checkReach;
|
|
1117
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollComponent, never>;
|
|
1118
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScrollComponent, "gog-scroll", never, { "axis": { "alias": "axis"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "autoHide": { "alias": "autoHide"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "hideDelay"; "required": false; "isSignal": true; }; "reachThreshold": { "alias": "reachThreshold"; "required": false; "isSignal": true; }; "focusable": { "alias": "focusable"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "overscrollBehavior": { "alias": "overscrollBehavior"; "required": false; "isSignal": true; }; }, { "gogScroll": "gogScroll"; "gogReachStart": "gogReachStart"; "gogReachEnd": "gogReachEnd"; }, never, ["*"], true, never>;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
879
1121
|
declare class SpinnerOverlayComponent {
|
|
880
1122
|
readonly loading: _angular_core.InputSignal<boolean>;
|
|
881
1123
|
readonly size: _angular_core.InputSignal<GogSize>;
|
|
@@ -1018,5 +1260,58 @@ declare class ThemeService {
|
|
|
1018
1260
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
|
|
1019
1261
|
}
|
|
1020
1262
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1263
|
+
/**
|
|
1264
|
+
* App-wide defaults for the handful of component inputs where that actually makes sense —
|
|
1265
|
+
* timing/behavior knobs a whole app typically wants to set once (a house style for how long
|
|
1266
|
+
* scrollbars stay visible, how aggressively buttons debounce clicks), not visual ones.
|
|
1267
|
+
* Visual defaults (colors, radii, animation *durations expressed in CSS*) already have a
|
|
1268
|
+
* global mechanism: the `--gog-*` custom properties in `styles/theme.css`. This is only for
|
|
1269
|
+
* inputs that can't be a CSS token because a component reads them in TypeScript (a
|
|
1270
|
+
* `setTimeout` delay, an RxJS `timer` duration) — see `styling.instructions.md` and
|
|
1271
|
+
* `gleks-ui-library.instructions.md`'s "Global configuration" section for the line between
|
|
1272
|
+
* the two and for how to add a new field here when a component needs one.
|
|
1273
|
+
*
|
|
1274
|
+
* Every field is optional at every level: set only the ones you want to change from the
|
|
1275
|
+
* component's own built-in default. An instance's own input, when set, always wins over
|
|
1276
|
+
* this — this only fills in what the instance didn't specify itself.
|
|
1277
|
+
*/
|
|
1278
|
+
interface GogGlobalConfig {
|
|
1279
|
+
scroll?: {
|
|
1280
|
+
autoHide?: boolean;
|
|
1281
|
+
hideDelay?: number;
|
|
1282
|
+
size?: GogScrollSize;
|
|
1283
|
+
overscrollBehavior?: GogScrollOverscrollBehavior;
|
|
1284
|
+
};
|
|
1285
|
+
button?: {
|
|
1286
|
+
debounce?: number;
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
/**
|
|
1290
|
+
* Resolves to `{}` — every field falls through to its component's own hardcoded default —
|
|
1291
|
+
* until a `provideGogConfig(...)` call overrides it somewhere in the injector tree.
|
|
1292
|
+
*/
|
|
1293
|
+
declare const GOG_CONFIG: InjectionToken<GogGlobalConfig>;
|
|
1294
|
+
/**
|
|
1295
|
+
* Sets app-wide (or subtree-wide, if placed in a route's or component's own `providers`
|
|
1296
|
+
* instead of the bootstrap config) defaults for every `@guildofgleks/ui` component that
|
|
1297
|
+
* reads `GOG_CONFIG` — one call instead of a separate injection token per setting:
|
|
1298
|
+
*
|
|
1299
|
+
* ```ts
|
|
1300
|
+
* // app.config.ts
|
|
1301
|
+
* providers: [
|
|
1302
|
+
* provideGogConfig({
|
|
1303
|
+
* scroll: { hideDelay: 1000 },
|
|
1304
|
+
* button: { debounce: 500 },
|
|
1305
|
+
* }),
|
|
1306
|
+
* ]
|
|
1307
|
+
* ```
|
|
1308
|
+
*
|
|
1309
|
+
* Providing this again further down the injector tree (a route, a single component's own
|
|
1310
|
+
* `providers`) replaces the whole object for that subtree rather than merging with the
|
|
1311
|
+
* parent's — pass everything you want in effect there, not just the one field you're
|
|
1312
|
+
* changing.
|
|
1313
|
+
*/
|
|
1314
|
+
declare function provideGogConfig(config: GogGlobalConfig): Provider;
|
|
1315
|
+
|
|
1316
|
+
export { AccordionComponent, ButtonComponent, CheckboxComponent, ChipComponent, CollapsibleComponent, Column, ConfirmationDialogComponent, DIALOG_DATA, DIALOG_REF, DialogComponent, DialogService, GOG_CONFIG, GogAccordionChevronDirective, GogAccordionContentDirective, GogAccordionHeaderDirective, GogCollapsibleContentDirective, GogCollapsibleTriggerDirective, GogDropdownBase, ICON_DEFS, IconComponent, InputfieldComponent, MultiselectComponent, PaginatorComponent, ScrollComponent, SelectComponent, SkeletonComponent, SliderComponent, SpinnerComponent, SpinnerOverlayComponent, TableComponent, TagComponent, TemplateDirective, TextareaComponent, ThemeService, ToastComponent, ToastContainerComponent, ToastService, defaultCompare, provideGogConfig };
|
|
1317
|
+
export type { ConfirmDialogData, DialogConfig, DialogHandle, DialogRef, GogAccordionChevronContext, GogAccordionHeaderContext, GogAccordionItem, GogAccordionToggleEvent, GogDropdownDirection, GogDropdownOption, GogGlobalConfig, GogIconName, GogMultiselectOption, GogPaginatorRangeMode, GogScrollAxis, GogScrollMetrics, GogScrollOverscrollBehavior, GogScrollSize, GogSelectOption, GogSize, GogSkeletonAnimation, GogSkeletonShape, GogSpinnerVariant, GogTableBodyContext, GogTableHeaderContext, GogTagShape, GogTagVariant, GogVariant, OpenDialog, SortDirection, Toast, ToastAction, ToastConfig, ToastPosition, ToastType };
|