@ids-group-ltd/ids-design-system 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +415 -37
- package/components.md +19 -6
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +572 -477
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.1.0.json +2 -1
- package/migrations/0.10.0.json +209 -32
- package/migrations/0.10.1.json +33 -9
- package/migrations/0.10.2.json +88 -22
- package/migrations/0.10.3.json +90 -0
- package/migrations/0.11.0.json +216 -0
- package/migrations/0.2.0.json +22 -9
- package/migrations/0.2.1.json +2 -1
- package/migrations/0.2.2.json +2 -1
- package/migrations/0.3.0.json +16 -10
- package/migrations/0.4.0.json +38 -14
- package/migrations/0.5.0.json +49 -25
- package/migrations/0.5.1.json +75 -33
- package/migrations/0.6.0.json +6 -2
- package/migrations/0.6.1.json +19 -1
- package/migrations/0.6.2.json +3 -1
- package/migrations/0.6.3.json +13 -4
- package/migrations/0.7.0.json +45 -26
- package/migrations/0.7.1.json +57 -19
- package/migrations/0.8.0.json +50 -12
- package/migrations/0.9.0.json +142 -23
- package/migrations/0.9.1.json +2 -1
- package/package.json +2 -1
- package/styles/_field-group-segment.scss +3 -8
- package/styles/_focus.scss +28 -30
- package/styles/_link.scss +1 -2
- package/styles/_overlay-motion.scss +0 -1
- package/styles/_text-clip.scss +5 -10
- package/types/ids-group-ltd-ids-design-system.d.ts +129 -59
- package/migrations/AUTHORING.md +0 -273
package/styles/_focus.scss
CHANGED
|
@@ -1,34 +1,31 @@
|
|
|
1
1
|
// Focus-indicator style, switched in ONE place: `<html data-focus="…">`.
|
|
2
2
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// attribute keeps today's split.
|
|
8
|
-
//
|
|
9
|
-
// `outline` cannot be a box-shadow token, which is why that style also emits a
|
|
10
|
-
// rule: the roles go to `none` and the indicator becomes a real `outline`.
|
|
11
|
-
// `:where()` keeps that rule at zero specificity so a component or a consumer
|
|
12
|
-
// still wins.
|
|
13
|
-
//
|
|
14
|
-
// The forced-colors block is not part of the switch and applies to every style:
|
|
15
|
-
// Windows High Contrast DROPS box-shadow, so a shadow-only indicator disappears
|
|
16
|
-
// entirely there. This is the one place that gap can be closed once.
|
|
3
|
+
// Two families — a soft halo on fields (`--focus-field`), a crisp double ring on
|
|
4
|
+
// controls (`--focus-ring`) — and every component resolves through the
|
|
5
|
+
// `--ds-field-focus-shadow` / `--ds-control-focus-shadow` roles, so a brand-wide
|
|
6
|
+
// switch only has to retarget two roles. No attribute keeps the default split.
|
|
17
7
|
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
// component and app rule still wins.
|
|
8
|
+
// Catches anything focusable that styles nothing itself, so it cannot fall through to
|
|
9
|
+
// the browser default.
|
|
21
10
|
//
|
|
22
|
-
// CONSEQUENCE
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// control and one round the box. The shells that do it: autocomplete, date-picker,
|
|
26
|
-
// field-group, number-stepper, search.
|
|
11
|
+
// CONSEQUENCE inside a shell that rings on `:focus-within`: the shell must silence
|
|
12
|
+
// the control, and `outline: 0` cannot do it because what this sets is a SHADOW.
|
|
13
|
+
// Leave it and the field paints two rings. `owns-the-focus-ring` below is the reset.
|
|
27
14
|
:where(:focus-visible) {
|
|
28
15
|
outline: none;
|
|
29
16
|
box-shadow: var(--ds-control-focus-shadow);
|
|
30
17
|
}
|
|
31
18
|
|
|
19
|
+
// `$control` names ONE control and must never be a blanket: a box-wide reset also
|
|
20
|
+
// silences the tab stops living in the box — a clear button, a stepper arrow — and
|
|
21
|
+
// then tabbing from the field to that button changes nothing on screen.
|
|
22
|
+
// Enforced by tools/check-focus-rings.mjs.
|
|
23
|
+
@mixin owns-the-focus-ring($control) {
|
|
24
|
+
#{$control}:where(:focus-visible) {
|
|
25
|
+
box-shadow: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
32
29
|
:root[data-focus='ring'] {
|
|
33
30
|
--ds-field-focus-shadow: var(--focus-ring);
|
|
34
31
|
--ds-field-focus-shadow-error: var(--focus-ring-error);
|
|
@@ -39,8 +36,7 @@
|
|
|
39
36
|
--ds-control-focus-shadow-error: var(--focus-field-error);
|
|
40
37
|
}
|
|
41
38
|
|
|
42
|
-
//
|
|
43
|
-
// the pin-475 prototype.
|
|
39
|
+
// A hairline flush against the element, no gap — from the pin-475 prototype.
|
|
44
40
|
:root[data-focus='edge'] {
|
|
45
41
|
--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);
|
|
46
42
|
--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error);
|
|
@@ -49,9 +45,8 @@
|
|
|
49
45
|
var(--error);
|
|
50
46
|
}
|
|
51
47
|
|
|
52
|
-
// The one style NOT pinned to :root
|
|
53
|
-
//
|
|
54
|
-
// clipping element and everything inside keeps an indicator instead of losing it.
|
|
48
|
+
// The one style NOT pinned to :root, because a clipping ancestor is a local problem:
|
|
49
|
+
// set it on the clipping element and everything inside keeps an indicator.
|
|
55
50
|
[data-focus='inset'] {
|
|
56
51
|
--ds-field-focus-shadow: var(--focus-ring-inset);
|
|
57
52
|
--ds-field-focus-shadow-error: var(--focus-ring-inset-error);
|
|
@@ -66,15 +61,18 @@
|
|
|
66
61
|
--ds-control-focus-shadow-error: none;
|
|
67
62
|
}
|
|
68
63
|
|
|
64
|
+
// The only style that emits a rule of its own: an `outline` cannot be carried by a
|
|
65
|
+
// box-shadow token, so the roles go to `none` above and this draws the indicator.
|
|
69
66
|
:root[data-focus='outline'] :where(:focus-visible) {
|
|
70
67
|
outline: var(--border-width-strong) solid var(--primary);
|
|
71
68
|
outline-offset: var(--focus-ring-offset);
|
|
72
69
|
}
|
|
73
70
|
|
|
71
|
+
// Not part of the switch — it applies under every style, because Windows High
|
|
72
|
+
// Contrast DROPS box-shadow and a shadow-only indicator vanishes there completely.
|
|
74
73
|
@media (forced-colors: active) {
|
|
75
|
-
// CanvasText, not a brand colour:
|
|
76
|
-
//
|
|
77
|
-
// background.
|
|
74
|
+
// CanvasText, not a brand colour: the palette is replaced, and a system keyword is
|
|
75
|
+
// the only value guaranteed to contrast with the forced background.
|
|
78
76
|
:where(:focus-visible) {
|
|
79
77
|
outline: var(--border-width-strong) solid CanvasText;
|
|
80
78
|
outline-offset: var(--focus-ring-offset);
|
package/styles/_link.scss
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
flow. Modifiers: .quiet, .inline, .standalone, .xs, .sm, .lg. */
|
|
4
4
|
|
|
5
5
|
.link {
|
|
6
|
-
/*
|
|
7
|
-
overrides inherit in. Hover/active derive from the resolved color. */
|
|
6
|
+
/* Hover and active derive from the resolved color. */
|
|
8
7
|
--_link-color: var(--ds-link-color, var(--text-link));
|
|
9
8
|
--_link-color-hover: var(--ds-link-color-hover, color-mix(in srgb, var(--_link-color) 80%, black));
|
|
10
9
|
--_link-color-active: var(--ds-link-color-active, color-mix(in srgb, var(--_link-color) 65%, black));
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
// teardown working and outranks a consumer keyframe carrying its own timing.
|
|
18
18
|
|
|
19
19
|
.cdk-overlay-pane.ds-overlay-pane {
|
|
20
|
-
/* Public --ds-overlay-* are read with fallbacks, never declared — consumer overrides inherit in. */
|
|
21
20
|
--_overlay-enter-keyframes: var(--ds-overlay-enter-keyframes, ds-slide-in);
|
|
22
21
|
--_overlay-enter-duration: var(--ds-overlay-enter-duration, var(--ds-motion-enter-panel-duration));
|
|
23
22
|
--_overlay-enter-easing: var(--ds-overlay-enter-easing, var(--ds-motion-enter-panel-easing));
|
package/styles/_text-clip.scss
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
// Single-line text that truncates with an ellipsis. Mixin-only, so it is NOT
|
|
2
|
-
// forwarded from `ds.scss` — components `@use` it directly, like `chip-row`.
|
|
3
|
-
|
|
4
1
|
@mixin single-line-ellipsis {
|
|
5
2
|
/* `clip` with a margin, not `hidden`: an ellipsis box needs a non-`visible`
|
|
6
|
-
overflow, and where the line box is tighter than the
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
geometry, and `text-overflow` reads any non-`visible` overflow, so the
|
|
12
|
-
ellipsis still applies. */
|
|
3
|
+
overflow, and where the line box is tighter than the glyph box that overflow
|
|
4
|
+
eats the glyph. Mulish measures 1.257em, so --line-height-flat (1) and -tight
|
|
5
|
+
(1.1) are both under it and shave EVERY label, not only the ones with
|
|
6
|
+
descenders (MBP-245). `text-overflow` reads any non-`visible` overflow, so the
|
|
7
|
+
ellipsis still applies under `clip`. */
|
|
13
8
|
overflow: clip;
|
|
14
9
|
overflow-clip-margin: var(--space-1);
|
|
15
10
|
text-overflow: ellipsis;
|
|
@@ -412,11 +412,73 @@ declare class ReserveMessagesDirective {
|
|
|
412
412
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ReserveMessagesDirective, "[dsReserveMessages]", never, {}, {}, never, never, true, never>;
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
type FieldMessageState = 'default' | 'error' | 'warning' | 'success';
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* One validation error, structurally identical to Angular's signal-forms
|
|
419
|
+
* `ValidationError`.
|
|
420
|
+
*
|
|
421
|
+
* Declared here rather than imported from `@angular/forms/signals` on purpose:
|
|
422
|
+
* that module is `@experimental`, and a public DS type must not carry a
|
|
423
|
+
* dependency that can be renamed out from under consumers. Structural
|
|
424
|
+
* compatibility is all the interop needs — signal forms binds by input NAME and
|
|
425
|
+
* assigns its own `ValidationError[]`, which this shape accepts.
|
|
426
|
+
*/
|
|
427
|
+
interface DsFieldError {
|
|
428
|
+
/** Identifies the kind of error, e.g. `required`, `minlength`, `server`. */
|
|
429
|
+
readonly kind: string;
|
|
430
|
+
/** Human-readable text. Authored by the consumer, at the validator. */
|
|
431
|
+
readonly message?: string;
|
|
432
|
+
}
|
|
433
|
+
/** What a field's `errors` input accepts before normalization. */
|
|
434
|
+
type DsFieldErrorsInput = string | DsFieldError | readonly DsFieldError[] | null | undefined;
|
|
435
|
+
/**
|
|
436
|
+
* The one reserved `DsFieldError.kind`. An error carrying it is advisory: it shows
|
|
437
|
+
* in the warning state and does NOT make the control invalid, which is how a form
|
|
438
|
+
* model can raise a non-blocking remark — Angular's own `AbstractControl` has no
|
|
439
|
+
* channel for one, only `errors` and the validity derived from it.
|
|
440
|
+
*/
|
|
441
|
+
declare const DS_FIELD_WARNING_KIND = "warning";
|
|
442
|
+
/** The single line a field shows below itself, already resolved. */
|
|
443
|
+
interface DsFieldMessage {
|
|
444
|
+
readonly text: string;
|
|
445
|
+
readonly state: FieldMessageState;
|
|
446
|
+
}
|
|
447
|
+
|
|
415
448
|
type ButtonColor = 'primary' | 'secondary' | 'tertiary' | 'neutral' | 'error' | 'success' | 'warning';
|
|
416
449
|
type ButtonVariant = 'solid' | 'tonal' | 'ghost' | 'outline' | 'text';
|
|
417
450
|
type ButtonType = 'button' | 'submit' | 'reset';
|
|
418
451
|
|
|
419
|
-
|
|
452
|
+
/**
|
|
453
|
+
* The inputs of anything that renders a `ds-field-message` line — the message half
|
|
454
|
+
* of a field, split out so `ds-button` can take it without also taking `errors`,
|
|
455
|
+
* `invalid` and `touched`, which describe a form control's validation state and
|
|
456
|
+
* mean nothing on a button.
|
|
457
|
+
*
|
|
458
|
+
* `@Directive()` is required, not decoration: Angular refuses to compile a base
|
|
459
|
+
* class that declares inputs without it.
|
|
460
|
+
*/
|
|
461
|
+
declare abstract class DsMessageBase {
|
|
462
|
+
/** Helper text shown below the control. */
|
|
463
|
+
readonly hint: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
464
|
+
/** Error text. Shown immediately — binding it says the consumer has already
|
|
465
|
+
* decided this is in error. Takes precedence over `errors`. */
|
|
466
|
+
readonly error: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
467
|
+
/** Advisory text, shown when there is no error. */
|
|
468
|
+
readonly warning: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
469
|
+
/** Reserve the message-row height even when empty, so the control doesn't shift
|
|
470
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
471
|
+
* `DS_CONFIG.field.reserveMessage`, then off. */
|
|
472
|
+
readonly reserveMessage: _angular_core.InputSignalWithTransform<boolean | null, unknown>;
|
|
473
|
+
/** Glyph on the message line, overriding what the state resolves to. Unset
|
|
474
|
+
* follows `DS_CONFIG.field.stateIcons`; `false` removes the glyph here alone. */
|
|
475
|
+
readonly messageIcon: _angular_core.InputSignal<false | IconName | null>;
|
|
476
|
+
readonly reserveMessageResolved: _angular_core.Signal<boolean>;
|
|
477
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DsMessageBase, never>;
|
|
478
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DsMessageBase, never, never, { "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "reserveMessage": { "alias": "reserveMessage"; "required": false; "isSignal": true; }; "messageIcon": { "alias": "messageIcon"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
declare class ButtonComponent extends DsMessageBase {
|
|
420
482
|
/** Segment of a ds-field-group: the group owns the border, radius and focus
|
|
421
483
|
* ring, so .in-group strips this control back to its bare contents. */
|
|
422
484
|
protected readonly inGroup: boolean;
|
|
@@ -458,6 +520,21 @@ declare class ButtonComponent {
|
|
|
458
520
|
/** ARIA `aria-controls`, forwarded to the inner <button> — the id of the panel
|
|
459
521
|
* this button opens, e.g. `ds-app-layout`'s `railId`. */
|
|
460
522
|
readonly ariaControls: _angular_core.InputSignal<string | null>;
|
|
523
|
+
/** Why the button is refused, shown as its second line. Read only while
|
|
524
|
+
* `disabled` — a greyed control that does not say why is a dead end.
|
|
525
|
+
*
|
|
526
|
+
* Setting it also changes HOW the button is disabled: it takes `aria-disabled`
|
|
527
|
+
* instead of the native attribute, because a natively disabled button cannot be
|
|
528
|
+
* focused and the reason would never be announced. The click is swallowed in
|
|
529
|
+
* `onClick` instead. Leave it unset and nothing changes.
|
|
530
|
+
*
|
|
531
|
+
* Length is deliberately not capped: the text wraps and the button grows. Same
|
|
532
|
+
* name and meaning as `TableRowAction.disabledReason`. */
|
|
533
|
+
readonly disabledReason: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
534
|
+
/** ARIA `aria-describedby` — point the button at a description the app renders
|
|
535
|
+
* itself, such as a `ds-field-message` under a form. Merged with the id of
|
|
536
|
+
* `disabledReason` when both are present. */
|
|
537
|
+
readonly ariaDescribedBy: _angular_core.InputSignal<string | null>;
|
|
461
538
|
/** Fires on click, unless `disabled` or `loading`. */
|
|
462
539
|
readonly pressed: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
463
540
|
/** The inner native <button>, exposed so overlay triggers can position
|
|
@@ -465,10 +542,18 @@ declare class ButtonComponent {
|
|
|
465
542
|
* `(pressed)="pop.toggle(trigger.buttonRef().nativeElement)"`. */
|
|
466
543
|
readonly buttonRef: _angular_core.Signal<ElementRef<HTMLButtonElement>>;
|
|
467
544
|
protected readonly classes: _angular_core.Signal<string>;
|
|
545
|
+
protected readonly softDisabled: _angular_core.Signal<boolean>;
|
|
546
|
+
private readonly uid;
|
|
547
|
+
protected readonly reasonId: string;
|
|
548
|
+
protected readonly hintId: _angular_core.Signal<string | null>;
|
|
549
|
+
protected readonly describedBy: _angular_core.Signal<string | null>;
|
|
550
|
+
protected readonly hasMessageRow: _angular_core.Signal<boolean>;
|
|
551
|
+
private readonly fieldMessage;
|
|
552
|
+
protected readonly message: _angular_core.Signal<DsFieldMessage>;
|
|
468
553
|
constructor();
|
|
469
554
|
protected onClick(event: MouseEvent): void;
|
|
470
555
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
471
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "ds-button", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; }, { "pressed": "pressed"; }, never, ["*", "[dsButtonSubtext]"], true, never>;
|
|
556
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "ds-button", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "disabledReason": { "alias": "disabledReason"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, { "pressed": "pressed"; }, never, ["*", "[dsButtonSubtext]"], true, never>;
|
|
472
557
|
}
|
|
473
558
|
|
|
474
559
|
/** A single binary toggle button (pressed / not pressed) with an optional
|
|
@@ -500,6 +585,11 @@ declare class IconButtonComponent {
|
|
|
500
585
|
readonly icon: _angular_core.InputSignal<IconName>;
|
|
501
586
|
/** Accessible name — required since the button has no visible text. */
|
|
502
587
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
588
|
+
/** ARIA `aria-describedby` — the id of text the app renders beside the button,
|
|
589
|
+
* such as why the action is refused. Icon-only leaves no room for a second
|
|
590
|
+
* line, so unlike `ds-button` there is no `disabledReason` here: the text has
|
|
591
|
+
* to exist on screen already for this to point at it. */
|
|
592
|
+
readonly ariaDescribedBy: _angular_core.InputSignal<string | null>;
|
|
503
593
|
/** Fill style — standard (chromeless), filled, tonal, or outlined. */
|
|
504
594
|
readonly variant: _angular_core.InputSignal<IconButtonVariant>;
|
|
505
595
|
/** Brand/status hue family (shared with ds-button). `variant` is the fill
|
|
@@ -528,7 +618,7 @@ declare class IconButtonComponent {
|
|
|
528
618
|
protected readonly iconSize: _angular_core.Signal<16 | 24 | 20>;
|
|
529
619
|
protected onClick(event: MouseEvent): void;
|
|
530
620
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconButtonComponent, never>;
|
|
531
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconButtonComponent, "ds-icon-button", never, { "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": true; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; }, { "pressed": "pressed"; }, never, never, true, never>;
|
|
621
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconButtonComponent, "ds-icon-button", never, { "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": true; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; }, { "pressed": "pressed"; }, never, never, true, never>;
|
|
532
622
|
}
|
|
533
623
|
|
|
534
624
|
declare class BadgeComponent {
|
|
@@ -1320,39 +1410,6 @@ declare class TabsComponent {
|
|
|
1320
1410
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabsComponent, "ds-tabs", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "urlParam": { "alias": "urlParam"; "required": false; "isSignal": true; }; "rememberLastTab": { "alias": "rememberLastTab"; "required": false; "isSignal": true; }; }, { "selectedIndex": "selectedIndexChange"; "tabClosed": "tabClosed"; }, ["tabs"], never, true, never>;
|
|
1321
1411
|
}
|
|
1322
1412
|
|
|
1323
|
-
type FieldMessageState = 'default' | 'error' | 'warning' | 'success';
|
|
1324
|
-
|
|
1325
|
-
/**
|
|
1326
|
-
* One validation error, structurally identical to Angular's signal-forms
|
|
1327
|
-
* `ValidationError`.
|
|
1328
|
-
*
|
|
1329
|
-
* Declared here rather than imported from `@angular/forms/signals` on purpose:
|
|
1330
|
-
* that module is `@experimental`, and a public DS type must not carry a
|
|
1331
|
-
* dependency that can be renamed out from under consumers. Structural
|
|
1332
|
-
* compatibility is all the interop needs — signal forms binds by input NAME and
|
|
1333
|
-
* assigns its own `ValidationError[]`, which this shape accepts.
|
|
1334
|
-
*/
|
|
1335
|
-
interface DsFieldError {
|
|
1336
|
-
/** Identifies the kind of error, e.g. `required`, `minlength`, `server`. */
|
|
1337
|
-
readonly kind: string;
|
|
1338
|
-
/** Human-readable text. Authored by the consumer, at the validator. */
|
|
1339
|
-
readonly message?: string;
|
|
1340
|
-
}
|
|
1341
|
-
/** What a field's `errors` input accepts before normalization. */
|
|
1342
|
-
type DsFieldErrorsInput = string | DsFieldError | readonly DsFieldError[] | null | undefined;
|
|
1343
|
-
/**
|
|
1344
|
-
* The one reserved `DsFieldError.kind`. An error carrying it is advisory: it shows
|
|
1345
|
-
* in the warning state and does NOT make the control invalid, which is how a form
|
|
1346
|
-
* model can raise a non-blocking remark — Angular's own `AbstractControl` has no
|
|
1347
|
-
* channel for one, only `errors` and the validity derived from it.
|
|
1348
|
-
*/
|
|
1349
|
-
declare const DS_FIELD_WARNING_KIND = "warning";
|
|
1350
|
-
/** The single line a field shows below itself, already resolved. */
|
|
1351
|
-
interface DsFieldMessage {
|
|
1352
|
-
readonly text: string;
|
|
1353
|
-
readonly state: FieldMessageState;
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
1413
|
/**
|
|
1357
1414
|
* The inputs every DS form field has, declared once.
|
|
1358
1415
|
*
|
|
@@ -1361,17 +1418,11 @@ interface DsFieldMessage {
|
|
|
1361
1418
|
* lifting them would hand a checkbox a `success` or a slider a `label` it never
|
|
1362
1419
|
* had — a silent public-API addition.
|
|
1363
1420
|
*
|
|
1364
|
-
*
|
|
1365
|
-
*
|
|
1421
|
+
* The message half lives one level up in `DsMessageBase`, which anything with a
|
|
1422
|
+
* message line can take. What stays here is the validation state a form control
|
|
1423
|
+
* has and a plain control does not.
|
|
1366
1424
|
*/
|
|
1367
|
-
declare abstract class DsFieldBase {
|
|
1368
|
-
/** Helper text shown below the field. */
|
|
1369
|
-
readonly hint: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
1370
|
-
/** Error text. Shown immediately — binding it says the consumer has already
|
|
1371
|
-
* decided this field is in error. Takes precedence over `errors`. */
|
|
1372
|
-
readonly error: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
1373
|
-
/** Advisory text, shown when there is no error. */
|
|
1374
|
-
readonly warning: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
1425
|
+
declare abstract class DsFieldBase extends DsMessageBase {
|
|
1375
1426
|
/** Validation errors, shown once the user has interacted. Bound automatically
|
|
1376
1427
|
* by signal forms; reactive and template-driven forms are read through
|
|
1377
1428
|
* `NgControl` and need nothing here. Accepts a string, one error, or an array. */
|
|
@@ -1383,18 +1434,8 @@ declare abstract class DsFieldBase {
|
|
|
1383
1434
|
/** Whether the user has interacted with the field. Bound by signal forms; gates
|
|
1384
1435
|
* `errors`, so a `required` error does not greet an untouched form. */
|
|
1385
1436
|
readonly touched: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1386
|
-
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
1387
|
-
* the layout below it when a hint/error appears. Falls back to
|
|
1388
|
-
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
1389
|
-
* for a form that shows validation messages. */
|
|
1390
|
-
readonly reserveMessage: _angular_core.InputSignalWithTransform<boolean | null, unknown>;
|
|
1391
|
-
/** Glyph on the message line, overriding what the state resolves to. Unset
|
|
1392
|
-
* follows `DS_CONFIG.field.stateIcons`; `false` removes the glyph on this field
|
|
1393
|
-
* alone. */
|
|
1394
|
-
readonly messageIcon: _angular_core.InputSignal<false | IconName | null>;
|
|
1395
|
-
readonly reserveMessageResolved: _angular_core.Signal<boolean>;
|
|
1396
1437
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DsFieldBase, never>;
|
|
1397
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DsFieldBase, never, never, { "
|
|
1438
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DsFieldBase, never, never, { "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1398
1439
|
}
|
|
1399
1440
|
|
|
1400
1441
|
/**
|
|
@@ -2031,8 +2072,26 @@ interface TableColumn<T = unknown> {
|
|
|
2031
2072
|
* colour and underline while the row is hovered. Only has an effect on a
|
|
2032
2073
|
* `rowInteractive` table: on a passive one every hover treatment is suppressed on
|
|
2033
2074
|
* purpose, so a tint cannot promise a click that does not happen. Style it with
|
|
2034
|
-
* `--ds-table-cell-link-color` / `--ds-table-cell-link-decoration`.
|
|
2075
|
+
* `--ds-table-cell-link-color` / `--ds-table-cell-link-decoration`.
|
|
2076
|
+
*
|
|
2077
|
+
* Prefer `link` where the row leads somewhere: a tint appears only on hover, which
|
|
2078
|
+
* a keyboard or touch user never sees. */
|
|
2035
2079
|
interactive?: boolean;
|
|
2080
|
+
/** Renders this column's value as a real `<a>`, which is the accessible way to say
|
|
2081
|
+
* a row leads somewhere: it is visible without hovering, lands in the tab order as
|
|
2082
|
+
* a link rather than as a table row, and opens in a new tab on Ctrl/Cmd-click —
|
|
2083
|
+
* none of which a clickable `<tr>` can offer.
|
|
2084
|
+
*
|
|
2085
|
+
* Return an Angular route target (a string, or the array form for dynamic
|
|
2086
|
+
* segments); `null` / `undefined` leaves that row's cell as plain text, so a list
|
|
2087
|
+
* where only some rows are reachable needs no second column. For an external URL,
|
|
2088
|
+
* render the cell through a `[cell]` template instead — this takes route targets
|
|
2089
|
+
* only, and the router is touched at all only once a column sets `link`.
|
|
2090
|
+
*
|
|
2091
|
+
* Composes with `rowInteractive`: the link stops its own click from reaching the
|
|
2092
|
+
* row, so the row handler fires for the rest of the row and the link navigates
|
|
2093
|
+
* once. Style it with the same `--ds-table-cell-link-*` tokens as `interactive`. */
|
|
2094
|
+
link?: (row: T) => string | readonly unknown[] | null | undefined;
|
|
2036
2095
|
/** Initial visibility: start hidden. The column picker (or a bound
|
|
2037
2096
|
* `hiddenKeys` set) owns the state from then on; a hidden column stays
|
|
2038
2097
|
* available to `filterable` matching and sorting. */
|
|
@@ -2592,6 +2651,7 @@ declare class TableComponent<T extends object> {
|
|
|
2592
2651
|
protected headerClasses(col: TableColumn<T>): string;
|
|
2593
2652
|
protected sortIcon(col: TableColumn<T>): 'sortAsc' | 'sortDesc' | 'sort';
|
|
2594
2653
|
protected cellValue(row: T, col: TableColumn<T>): string;
|
|
2654
|
+
protected cellLink(row: T, col: TableColumn<T>): string | readonly unknown[] | null;
|
|
2595
2655
|
/** Serialises the visible columns of the rows the TABLE HOLDS as a CSV download.
|
|
2596
2656
|
* On a server-paged table that is one page — prefer `runExport()`, which goes
|
|
2597
2657
|
* through `exportFetcher` and exports the whole set. Pass `rows` to serialise a
|
|
@@ -3244,6 +3304,13 @@ declare class SidenavComponent implements SidenavContract {
|
|
|
3244
3304
|
* "A" tile beside the "MyAdmin" wordmark). Empty = first letter of `brand`;
|
|
3245
3305
|
* unset falls back to `DS_CONFIG.brand.logoLetter`. */
|
|
3246
3306
|
readonly logoLetter: _angular_core.InputSignal<string | null>;
|
|
3307
|
+
/** Route the brand row links to — typically the app's home. Unset leaves the row a
|
|
3308
|
+
* plain, non-interactive block. Router targets only, and `RouterLink` is
|
|
3309
|
+
* instantiated only once this is set, so an app with no router still renders. */
|
|
3310
|
+
readonly brandRoute: _angular_core.InputSignal<string | readonly unknown[] | null>;
|
|
3311
|
+
/** Accessible name for the brand link; unset names it "<brand>, home". Ignored
|
|
3312
|
+
* while `brandRoute` is unset. */
|
|
3313
|
+
readonly brandLinkLabel: _angular_core.InputSignal<string | null>;
|
|
3247
3314
|
/** The template must read THIS, never the input beside it — that one is null
|
|
3248
3315
|
* until bound, and the config default lives here. */
|
|
3249
3316
|
readonly brandName: _angular_core.Signal<string>;
|
|
@@ -3255,8 +3322,9 @@ declare class SidenavComponent implements SidenavContract {
|
|
|
3255
3322
|
* starting with an astral character (an emoji, a rarer CJK glyph) yields half
|
|
3256
3323
|
* a surrogate pair and paints as tofu. */
|
|
3257
3324
|
protected readonly markGlyph: _angular_core.Signal<string>;
|
|
3325
|
+
protected readonly brandAriaLabel: _angular_core.Signal<string>;
|
|
3258
3326
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidenavComponent, never>;
|
|
3259
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidenavComponent, "ds-sidenav", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "rail": { "alias": "rail"; "required": false; "isSignal": true; }; "brand": { "alias": "brand"; "required": false; "isSignal": true; }; "logoLetter": { "alias": "logoLetter"; "required": false; "isSignal": true; }; }, {}, ["brandNameRef"], ["[brand]", "[dsBrandName]", "*"], true, never>;
|
|
3327
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidenavComponent, "ds-sidenav", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "rail": { "alias": "rail"; "required": false; "isSignal": true; }; "brand": { "alias": "brand"; "required": false; "isSignal": true; }; "logoLetter": { "alias": "logoLetter"; "required": false; "isSignal": true; }; "brandRoute": { "alias": "brandRoute"; "required": false; "isSignal": true; }; "brandLinkLabel": { "alias": "brandLinkLabel"; "required": false; "isSignal": true; }; }, {}, ["brandNameRef"], ["[brand]", "[dsBrandName]", "*"], true, never>;
|
|
3260
3328
|
}
|
|
3261
3329
|
|
|
3262
3330
|
declare class SidenavGroupComponent {
|
|
@@ -4857,6 +4925,7 @@ declare class CheckboxComponent extends DsBooleanControlValueAccessor {
|
|
|
4857
4925
|
private readonly fieldMessage;
|
|
4858
4926
|
protected readonly message: _angular_core.Signal<DsFieldMessage>;
|
|
4859
4927
|
protected readonly invalidResolved: _angular_core.Signal<boolean>;
|
|
4928
|
+
protected readonly controlState: _angular_core.Signal<FieldMessageState | null>;
|
|
4860
4929
|
protected readonly fieldClass: _angular_core.Signal<string>;
|
|
4861
4930
|
protected onCheckedChange(event: Event): void;
|
|
4862
4931
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckboxComponent, never>;
|
|
@@ -4949,6 +5018,7 @@ declare class RadioGroupComponent extends DsControlValueAccessor<unknown> implem
|
|
|
4949
5018
|
private readonly fieldMessage;
|
|
4950
5019
|
protected readonly message: _angular_core.Signal<DsFieldMessage>;
|
|
4951
5020
|
protected readonly invalidResolved: _angular_core.Signal<boolean>;
|
|
5021
|
+
protected readonly controlState: _angular_core.Signal<FieldMessageState | null>;
|
|
4952
5022
|
private readonly radios;
|
|
4953
5023
|
private get enabledRadios();
|
|
4954
5024
|
isTabbable(radio: RadioGroupChild): boolean;
|