@wildmason/aegis 1.12.0 → 1.14.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/dist/fesm2022/wildmason-aegis.mjs +650 -28
- package/dist/fesm2022/wildmason-aegis.mjs.map +1 -1
- package/dist/types/wildmason-aegis.d.ts +212 -4
- package/fonts/CascadiaCode-OFL.txt +94 -94
- package/package.json +4 -3
- package/themes.css +48 -21
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ElementRef, AfterViewInit, TemplateRef, OnDestroy } from '@angular/core';
|
|
3
|
-
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
3
|
+
import { ScrollStrategy, OverlayRef, ConnectedPosition } from '@angular/cdk/overlay';
|
|
4
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
5
5
|
import * as rxjs from 'rxjs';
|
|
6
6
|
|
|
@@ -110,6 +110,26 @@ interface SelectOption {
|
|
|
110
110
|
disabled?: boolean;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
/**
|
|
114
|
+
* A scroll strategy that keeps a connected overlay anchored to its trigger,
|
|
115
|
+
* including when the thing that scrolled was an ordinary `overflow: auto`
|
|
116
|
+
* element rather than the document.
|
|
117
|
+
*
|
|
118
|
+
* CDK's own reposition strategy does the right thing and is simply never told:
|
|
119
|
+
* it listens through `ScrollDispatcher`, which cannot hear a scroll from a
|
|
120
|
+
* container that is not marked `cdkScrollable`. See `onViewportChange` for the
|
|
121
|
+
* full account. This strategy listens in the capture phase instead, so the
|
|
122
|
+
* consumer annotates nothing.
|
|
123
|
+
*/
|
|
124
|
+
declare class WmAnchoredScrollStrategy implements ScrollStrategy {
|
|
125
|
+
private overlayRef;
|
|
126
|
+
private release;
|
|
127
|
+
attach(overlayRef: OverlayRef): void;
|
|
128
|
+
enable(): void;
|
|
129
|
+
disable(): void;
|
|
130
|
+
detach(): void;
|
|
131
|
+
}
|
|
132
|
+
|
|
113
133
|
/**
|
|
114
134
|
* WmSelect — Accessible dropdown select built on Angular CDK Overlay.
|
|
115
135
|
*
|
|
@@ -143,6 +163,16 @@ interface SelectOption {
|
|
|
143
163
|
* - Always pair with a visible label via <wm-label> or aria-label on the host
|
|
144
164
|
*/
|
|
145
165
|
declare class WmSelect {
|
|
166
|
+
/**
|
|
167
|
+
* Keeps the panel anchored to its trigger while an ancestor scrolls.
|
|
168
|
+
*
|
|
169
|
+
* One instance per component, because a ScrollStrategy holds a single
|
|
170
|
+
* overlayRef and could not tell two open overlays apart. Without it the
|
|
171
|
+
* panel takes CDK's default, which cannot hear a scroll from any container
|
|
172
|
+
* that is not marked `cdkScrollable` - so in a fixed-height shell the panel
|
|
173
|
+
* keeps the coordinates it was born with while the trigger scrolls away.
|
|
174
|
+
*/
|
|
175
|
+
protected readonly scrollStrategy: WmAnchoredScrollStrategy;
|
|
146
176
|
/** Array of options to display. */
|
|
147
177
|
options: _angular_core.InputSignal<SelectOption[]>;
|
|
148
178
|
/** The currently selected value. Two-way bindable. */
|
|
@@ -202,6 +232,16 @@ declare class WmSelect {
|
|
|
202
232
|
* Import WmAutoFocus from @wildmason/aegis/components and add it to your component's imports.
|
|
203
233
|
*/
|
|
204
234
|
declare class WmPopover {
|
|
235
|
+
/**
|
|
236
|
+
* Keeps the panel anchored to its trigger while an ancestor scrolls.
|
|
237
|
+
*
|
|
238
|
+
* One instance per component, because a ScrollStrategy holds a single
|
|
239
|
+
* overlayRef and could not tell two open overlays apart. Without it the
|
|
240
|
+
* panel takes CDK's default, which cannot hear a scroll from any container
|
|
241
|
+
* that is not marked `cdkScrollable` - so in a fixed-height shell the panel
|
|
242
|
+
* keeps the coordinates it was born with while the trigger scrolls away.
|
|
243
|
+
*/
|
|
244
|
+
protected readonly scrollStrategy: WmAnchoredScrollStrategy;
|
|
205
245
|
/** Whether the panel is currently open. */
|
|
206
246
|
readonly isOpen: _angular_core.InputSignal<boolean>;
|
|
207
247
|
/** Panel width in pixels, or 'auto' to match content. */
|
|
@@ -306,7 +346,7 @@ declare class WmButton {
|
|
|
306
346
|
readonly variant: _angular_core.InputSignal<ButtonVariant>;
|
|
307
347
|
readonly size: _angular_core.InputSignal<ButtonSize>;
|
|
308
348
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
309
|
-
readonly type: _angular_core.InputSignal<"
|
|
349
|
+
readonly type: _angular_core.InputSignal<"reset" | "submit" | "button">;
|
|
310
350
|
/** Makes the button square (equal width/height). Use for icon-only buttons. */
|
|
311
351
|
readonly iconOnly: _angular_core.InputSignal<boolean>;
|
|
312
352
|
/** Accessible label forwarded to the inner <button>. Required for icon-only buttons. */
|
|
@@ -595,6 +635,16 @@ declare class ComboboxPanel {
|
|
|
595
635
|
* <wm-combobox formControlName="tag" [options]="tags" />
|
|
596
636
|
*/
|
|
597
637
|
declare class WmCombobox implements ControlValueAccessor, OnDestroy {
|
|
638
|
+
/**
|
|
639
|
+
* Keeps the panel anchored to its trigger while an ancestor scrolls.
|
|
640
|
+
*
|
|
641
|
+
* One instance per component, because a ScrollStrategy holds a single
|
|
642
|
+
* overlayRef and could not tell two open overlays apart. Without it the
|
|
643
|
+
* panel takes CDK's default, which cannot hear a scroll from any container
|
|
644
|
+
* that is not marked `cdkScrollable` - so in a fixed-height shell the panel
|
|
645
|
+
* keeps the coordinates it was born with while the trigger scrolls away.
|
|
646
|
+
*/
|
|
647
|
+
protected readonly scrollStrategy: WmAnchoredScrollStrategy;
|
|
598
648
|
/** Full option list (before filtering). */
|
|
599
649
|
readonly options: _angular_core.InputSignal<ComboboxOption[]>;
|
|
600
650
|
/** Selected value (single-select). Two-way bindable. */
|
|
@@ -774,6 +824,164 @@ declare class WmToastContainer implements OnDestroy {
|
|
|
774
824
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WmToastContainer, "wm-toast-container", never, {}, {}, never, never, true, never>;
|
|
775
825
|
}
|
|
776
826
|
|
|
827
|
+
/** Where the panel sits relative to its host, before any viewport fallback. */
|
|
828
|
+
type WmTooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
829
|
+
/**
|
|
830
|
+
* How the panel is related to the host for assistive technology.
|
|
831
|
+
*
|
|
832
|
+
* `description` points the host at the panel with `aria-describedby`. Use it
|
|
833
|
+
* when the host already has a name and the tooltip adds detail — an icon with
|
|
834
|
+
* an `aria-label`, a truncated cell, a status mark.
|
|
835
|
+
*
|
|
836
|
+
* `label` uses `aria-labelledby` instead, for an icon-only control whose only
|
|
837
|
+
* name is the tooltip. Do not use it alongside an `aria-label` on the same
|
|
838
|
+
* host: `aria-labelledby` wins, and the two texts then disagree about what the
|
|
839
|
+
* control is called depending on whether the tooltip happens to be open.
|
|
840
|
+
*/
|
|
841
|
+
type WmTooltipRelation = 'description' | 'label';
|
|
842
|
+
/**
|
|
843
|
+
* WmTooltip — accessible floating explanation for any element.
|
|
844
|
+
*
|
|
845
|
+
* ```html
|
|
846
|
+
* <button class="wm-btn btn-icon-only" aria-label="Undo" [wmTooltip]="'Undo the last commit'">…</button>
|
|
847
|
+
* ```
|
|
848
|
+
*
|
|
849
|
+
* Why this exists next to the CSS `[data-tooltip]` chip: that chip is a
|
|
850
|
+
* pseudo-element on the host, so it cannot escape an ancestor's
|
|
851
|
+
* `overflow: hidden`, cannot wrap, and is invisible to assistive technology —
|
|
852
|
+
* it is a visual hint that must be paired with an `aria-label` saying the same
|
|
853
|
+
* thing twice. Reach for the chip for a one-to-five word label on a toolbar
|
|
854
|
+
* button. Reach for this directive when the text explains something, when the
|
|
855
|
+
* host sits inside a scrolling container, or when the explanation must be part
|
|
856
|
+
* of the accessible description rather than a duplicate of it.
|
|
857
|
+
*
|
|
858
|
+
* Accessibility:
|
|
859
|
+
* - The panel carries `role="tooltip"` and a generated id.
|
|
860
|
+
* - While open, the host points at that id with `aria-describedby` (default)
|
|
861
|
+
* or `aria-labelledby`. The id is appended to whatever the host already
|
|
862
|
+
* referenced and removed again on hide, so an application's own description
|
|
863
|
+
* survives untouched.
|
|
864
|
+
* - Opens on hover and on `:focus-visible`, so a mouse click that moves focus
|
|
865
|
+
* to a button does not leave a tooltip hanging behind the pointer.
|
|
866
|
+
* - WCAG 1.4.13 (Content on Hover or Focus): Escape dismisses without moving
|
|
867
|
+
* focus; the pointer can travel into the panel and read it without it
|
|
868
|
+
* closing; nothing auto-dismisses on a timer.
|
|
869
|
+
*
|
|
870
|
+
* Keyboard reachability is the caller's responsibility. A tooltip on an element
|
|
871
|
+
* that cannot take focus is unreachable by keyboard, so set
|
|
872
|
+
* `wmTooltipFocusable` to make the host a tab stop — but NOT inside a
|
|
873
|
+
* roving-tabindex container (tree, listbox, grid, tablist). There the container
|
|
874
|
+
* is a single tab stop by design, and adding one stop per row is worse for
|
|
875
|
+
* keyboard users than the gap it closes. Put the tooltip on the row itself, or
|
|
876
|
+
* expose it from a control the roving focus already reaches.
|
|
877
|
+
*/
|
|
878
|
+
declare class WmTooltip {
|
|
879
|
+
/** Tooltip body. Blank or absent means the tooltip never opens. */
|
|
880
|
+
readonly wmTooltip: _angular_core.InputSignal<string>;
|
|
881
|
+
/** Preferred side. Flips automatically when the viewport has no room. */
|
|
882
|
+
readonly wmTooltipPosition: _angular_core.InputSignal<WmTooltipPosition>;
|
|
883
|
+
/** Milliseconds a pointer must rest on the host before the panel opens. */
|
|
884
|
+
readonly wmTooltipDelay: _angular_core.InputSignal<number>;
|
|
885
|
+
/** Suppress the tooltip without unbinding it — for a control whose explanation only applies in some states. */
|
|
886
|
+
readonly wmTooltipDisabled: _angular_core.InputSignal<boolean>;
|
|
887
|
+
/** Whether the panel describes the host or names it. See WmTooltipRelation. */
|
|
888
|
+
readonly wmTooltipRelation: _angular_core.InputSignal<WmTooltipRelation>;
|
|
889
|
+
/**
|
|
890
|
+
* Make a non-focusable host a tab stop so a keyboard user can reach the
|
|
891
|
+
* tooltip. Only applied when the host is not already focusable, and never
|
|
892
|
+
* safe inside a roving-tabindex container — see the class comment.
|
|
893
|
+
*/
|
|
894
|
+
readonly wmTooltipFocusable: _angular_core.InputSignal<boolean>;
|
|
895
|
+
private readonly host;
|
|
896
|
+
private readonly injector;
|
|
897
|
+
private readonly renderer;
|
|
898
|
+
private readonly panelId;
|
|
899
|
+
private overlayRef;
|
|
900
|
+
private panelRef;
|
|
901
|
+
private portal;
|
|
902
|
+
private showTimer;
|
|
903
|
+
private hideTimer;
|
|
904
|
+
private raiseFrame;
|
|
905
|
+
private pointerOnHost;
|
|
906
|
+
private pointerOnPanel;
|
|
907
|
+
private hostFocused;
|
|
908
|
+
private detachDocumentListeners;
|
|
909
|
+
/**
|
|
910
|
+
* Elements between the host and the document that can clip it, resolved
|
|
911
|
+
* once per open. They cannot change while the panel is up, and walking the
|
|
912
|
+
* ancestor chain on every scroll event would be work done per frame.
|
|
913
|
+
*/
|
|
914
|
+
private clippingAncestors;
|
|
915
|
+
constructor();
|
|
916
|
+
/** Open the tooltip immediately, bypassing the hover delay. */
|
|
917
|
+
show(): void;
|
|
918
|
+
/** Close the tooltip immediately, without the pointer grace period. */
|
|
919
|
+
hideNow(): void;
|
|
920
|
+
/** True while the panel is attached. Exposed for tests and for callers driving it manually. */
|
|
921
|
+
get isOpen(): boolean;
|
|
922
|
+
protected onPointerEnterHost(): void;
|
|
923
|
+
protected onPointerLeaveHost(): void;
|
|
924
|
+
protected onFocusHost(): void;
|
|
925
|
+
protected onBlurHost(): void;
|
|
926
|
+
private text;
|
|
927
|
+
private scheduleShow;
|
|
928
|
+
private scheduleHide;
|
|
929
|
+
private clearTimer;
|
|
930
|
+
private ensureOverlay;
|
|
931
|
+
private positions;
|
|
932
|
+
private readonly onPointerEnterPanel;
|
|
933
|
+
private readonly onPointerLeavePanel;
|
|
934
|
+
private attachDocumentListeners;
|
|
935
|
+
private releaseDocumentListeners;
|
|
936
|
+
/**
|
|
937
|
+
* Follow the host, or give up on it.
|
|
938
|
+
*
|
|
939
|
+
* Repositioning alone is not enough. Once the host has scrolled out of its
|
|
940
|
+
* container the panel would be pushed against the container edge and left
|
|
941
|
+
* explaining a row the reader can no longer see - worse than not being there,
|
|
942
|
+
* because it now appears to describe whatever it happens to cover.
|
|
943
|
+
*/
|
|
944
|
+
private reanchor;
|
|
945
|
+
/** Every ancestor that can clip the host, nearest first. */
|
|
946
|
+
private resolveClippingAncestors;
|
|
947
|
+
/** True once no part of the host is inside every container that clips it. */
|
|
948
|
+
private isHostClipped;
|
|
949
|
+
private relationAttribute;
|
|
950
|
+
private linkHostToPanel;
|
|
951
|
+
private unlinkHostFromPanel;
|
|
952
|
+
private isNativelyFocusable;
|
|
953
|
+
private matchesFocusVisible;
|
|
954
|
+
private teardown;
|
|
955
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WmTooltip, never>;
|
|
956
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WmTooltip, "[wmTooltip]", ["wmTooltip"], { "wmTooltip": { "alias": "wmTooltip"; "required": false; "isSignal": true; }; "wmTooltipPosition": { "alias": "wmTooltipPosition"; "required": false; "isSignal": true; }; "wmTooltipDelay": { "alias": "wmTooltipDelay"; "required": false; "isSignal": true; }; "wmTooltipDisabled": { "alias": "wmTooltipDisabled"; "required": false; "isSignal": true; }; "wmTooltipRelation": { "alias": "wmTooltipRelation"; "required": false; "isSignal": true; }; "wmTooltipFocusable": { "alias": "wmTooltipFocusable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Notify a handler whenever anything that can move an anchored overlay moves.
|
|
961
|
+
*
|
|
962
|
+
* This exists because of one property of the DOM that CDK's `ScrollDispatcher`
|
|
963
|
+
* does not account for: **`scroll` does not bubble.**
|
|
964
|
+
*
|
|
965
|
+
* `ScrollDispatcher` has exactly two sources. It listens for `scroll` on the
|
|
966
|
+
* document in the *bubbling* phase, which therefore only ever hears the
|
|
967
|
+
* document itself scrolling; and it hears containers that registered
|
|
968
|
+
* themselves through a `cdkScrollable` directive. In an application shell that
|
|
969
|
+
* is a fixed-height frame with an inner scrolling element — which is every
|
|
970
|
+
* Wildmason product — the document never scrolls and nothing is registered, so
|
|
971
|
+
* both sources are empty and any scroll strategy built on the dispatcher is a
|
|
972
|
+
* silent no-op. The overlay keeps the coordinates it was born with while its
|
|
973
|
+
* trigger scrolls out from under it.
|
|
974
|
+
*
|
|
975
|
+
* A **capture-phase** listener on the document sees the event from any
|
|
976
|
+
* descendant, so nothing has to be annotated. Requiring every consumer to mark
|
|
977
|
+
* their scroll containers — and failing invisibly when they forget — is not a
|
|
978
|
+
* contract a design system should hand out.
|
|
979
|
+
*
|
|
980
|
+
* @param handler called on any scroll or resize while the subscription is live
|
|
981
|
+
* @returns a function that removes exactly what was added
|
|
982
|
+
*/
|
|
983
|
+
declare function onViewportChange(handler: () => void): () => void;
|
|
984
|
+
|
|
777
985
|
interface LicenseStatus {
|
|
778
986
|
valid: boolean;
|
|
779
987
|
org: string | null;
|
|
@@ -843,5 +1051,5 @@ declare class WmLicenseDialog {
|
|
|
843
1051
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WmLicenseDialog, "wm-license-dialog", never, { "visible": { "alias": "visible"; "required": true; "isSignal": true; }; }, { "dismiss": "dismiss"; }, never, never, true, never>;
|
|
844
1052
|
}
|
|
845
1053
|
|
|
846
|
-
export { Checkbox, GhostField, NumberInput, PageHeader, Toggle, WmAutoFocus, WmButton, WmCombobox, WmDialog, WmLicenseDialog, WmLicenseNudge, WmLicenseService, WmModal, WmPopover, WmSelect, WmTab, WmTabs, WmToastContainer, WmToastService };
|
|
847
|
-
export type { ButtonSize, ButtonVariant, ComboboxOption, DialogSize, LicenseStatus, SelectOption, Toast, ToastType, WmDeclaredUseType };
|
|
1054
|
+
export { Checkbox, GhostField, NumberInput, PageHeader, Toggle, WmAnchoredScrollStrategy, WmAutoFocus, WmButton, WmCombobox, WmDialog, WmLicenseDialog, WmLicenseNudge, WmLicenseService, WmModal, WmPopover, WmSelect, WmTab, WmTabs, WmToastContainer, WmToastService, WmTooltip, onViewportChange };
|
|
1055
|
+
export type { ButtonSize, ButtonVariant, ComboboxOption, DialogSize, LicenseStatus, SelectOption, Toast, ToastType, WmDeclaredUseType, WmTooltipPosition, WmTooltipRelation };
|
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
Copyright (c) 2019 - Present, Microsoft Corporation,
|
|
2
|
-
with Reserved Font Name Cascadia Code.
|
|
3
|
-
|
|
4
|
-
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
5
|
-
This license is copied below, and is also available with a FAQ at:
|
|
6
|
-
http://scripts.sil.org/OFL
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-----------------------------------------------------------
|
|
10
|
-
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
11
|
-
-----------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
PREAMBLE
|
|
14
|
-
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
15
|
-
development of collaborative font projects, to support the font creation
|
|
16
|
-
efforts of academic and linguistic communities, and to provide a free and
|
|
17
|
-
open framework in which fonts may be shared and improved in partnership
|
|
18
|
-
with others.
|
|
19
|
-
|
|
20
|
-
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
-
redistributed freely as long as they are not sold by themselves. The
|
|
22
|
-
fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
-
redistributed and/or sold with any software provided that any reserved
|
|
24
|
-
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
-
however, cannot be released under any other type of license. The
|
|
26
|
-
requirement for fonts to remain under this license does not apply
|
|
27
|
-
to any document created using the fonts or their derivatives.
|
|
28
|
-
|
|
29
|
-
DEFINITIONS
|
|
30
|
-
"Font Software" refers to the set of files released by the Copyright
|
|
31
|
-
Holder(s) under this license and clearly marked as such. This may
|
|
32
|
-
include source files, build scripts and documentation.
|
|
33
|
-
|
|
34
|
-
"Reserved Font Name" refers to any names specified as such after the
|
|
35
|
-
copyright statement(s).
|
|
36
|
-
|
|
37
|
-
"Original Version" refers to the collection of Font Software components as
|
|
38
|
-
distributed by the Copyright Holder(s).
|
|
39
|
-
|
|
40
|
-
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
41
|
-
or substituting -- in part or in whole -- any of the components of the
|
|
42
|
-
Original Version, by changing formats or by porting the Font Software to a
|
|
43
|
-
new environment.
|
|
44
|
-
|
|
45
|
-
"Author" refers to any designer, engineer, programmer, technical
|
|
46
|
-
writer or other person who contributed to the Font Software.
|
|
47
|
-
|
|
48
|
-
PERMISSION & CONDITIONS
|
|
49
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
50
|
-
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
51
|
-
redistribute, and sell modified and unmodified copies of the Font
|
|
52
|
-
Software, subject to the following conditions:
|
|
53
|
-
|
|
54
|
-
1) Neither the Font Software nor any of its individual components,
|
|
55
|
-
in Original or Modified Versions, may be sold by itself.
|
|
56
|
-
|
|
57
|
-
2) Original or Modified Versions of the Font Software may be bundled,
|
|
58
|
-
redistributed and/or sold with any software, provided that each copy
|
|
59
|
-
contains the above copyright notice and this license. These can be
|
|
60
|
-
included either as stand-alone text files, human-readable headers or
|
|
61
|
-
in the appropriate machine-readable metadata fields within text or
|
|
62
|
-
binary files as long as those fields can be easily viewed by the user.
|
|
63
|
-
|
|
64
|
-
3) No Modified Version of the Font Software may use the Reserved Font
|
|
65
|
-
Name(s) unless explicit written permission is granted by the corresponding
|
|
66
|
-
Copyright Holder. This restriction only applies to the primary font name as
|
|
67
|
-
presented to the users.
|
|
68
|
-
|
|
69
|
-
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
70
|
-
Software shall not be used to promote, endorse or advertise any
|
|
71
|
-
Modified Version, except to acknowledge the contribution(s) of the
|
|
72
|
-
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
73
|
-
permission.
|
|
74
|
-
|
|
75
|
-
5) The Font Software, modified or unmodified, in part or in whole,
|
|
76
|
-
must be distributed entirely under this license, and must not be
|
|
77
|
-
distributed under any other license. The requirement for fonts to
|
|
78
|
-
remain under this license does not apply to any document created
|
|
79
|
-
using the Font Software.
|
|
80
|
-
|
|
81
|
-
TERMINATION
|
|
82
|
-
This license becomes null and void if any of the above conditions are
|
|
83
|
-
not met.
|
|
84
|
-
|
|
85
|
-
DISCLAIMER
|
|
86
|
-
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
87
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
88
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
89
|
-
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
90
|
-
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
91
|
-
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
92
|
-
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
-
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
94
|
-
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
1
|
+
Copyright (c) 2019 - Present, Microsoft Corporation,
|
|
2
|
+
with Reserved Font Name Cascadia Code.
|
|
3
|
+
|
|
4
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
5
|
+
This license is copied below, and is also available with a FAQ at:
|
|
6
|
+
http://scripts.sil.org/OFL
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
PREAMBLE
|
|
14
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
15
|
+
development of collaborative font projects, to support the font creation
|
|
16
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
17
|
+
open framework in which fonts may be shared and improved in partnership
|
|
18
|
+
with others.
|
|
19
|
+
|
|
20
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
22
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
+
redistributed and/or sold with any software provided that any reserved
|
|
24
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
+
however, cannot be released under any other type of license. The
|
|
26
|
+
requirement for fonts to remain under this license does not apply
|
|
27
|
+
to any document created using the fonts or their derivatives.
|
|
28
|
+
|
|
29
|
+
DEFINITIONS
|
|
30
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
31
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
32
|
+
include source files, build scripts and documentation.
|
|
33
|
+
|
|
34
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
35
|
+
copyright statement(s).
|
|
36
|
+
|
|
37
|
+
"Original Version" refers to the collection of Font Software components as
|
|
38
|
+
distributed by the Copyright Holder(s).
|
|
39
|
+
|
|
40
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
41
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
42
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
43
|
+
new environment.
|
|
44
|
+
|
|
45
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
46
|
+
writer or other person who contributed to the Font Software.
|
|
47
|
+
|
|
48
|
+
PERMISSION & CONDITIONS
|
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
50
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
51
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
52
|
+
Software, subject to the following conditions:
|
|
53
|
+
|
|
54
|
+
1) Neither the Font Software nor any of its individual components,
|
|
55
|
+
in Original or Modified Versions, may be sold by itself.
|
|
56
|
+
|
|
57
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
58
|
+
redistributed and/or sold with any software, provided that each copy
|
|
59
|
+
contains the above copyright notice and this license. These can be
|
|
60
|
+
included either as stand-alone text files, human-readable headers or
|
|
61
|
+
in the appropriate machine-readable metadata fields within text or
|
|
62
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
63
|
+
|
|
64
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
65
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
66
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
67
|
+
presented to the users.
|
|
68
|
+
|
|
69
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
70
|
+
Software shall not be used to promote, endorse or advertise any
|
|
71
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
72
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
73
|
+
permission.
|
|
74
|
+
|
|
75
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
76
|
+
must be distributed entirely under this license, and must not be
|
|
77
|
+
distributed under any other license. The requirement for fonts to
|
|
78
|
+
remain under this license does not apply to any document created
|
|
79
|
+
using the Font Software.
|
|
80
|
+
|
|
81
|
+
TERMINATION
|
|
82
|
+
This license becomes null and void if any of the above conditions are
|
|
83
|
+
not met.
|
|
84
|
+
|
|
85
|
+
DISCLAIMER
|
|
86
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
87
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
88
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
89
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
90
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
91
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
92
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
94
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildmason/aegis",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Aegis design system \u00e2\u20ac\u201d CSS tokens and Angular component library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"check:offline-fonts": "node scripts/check-offline-fonts.mjs",
|
|
7
|
-
"build": "npm run check:offline-fonts && npm run check:destructive-contrast && npm run check:semantic-contrast && ng-packagr -p ng-package.json",
|
|
7
|
+
"build": "npm run check:offline-fonts && npm run check:destructive-contrast && npm run check:semantic-contrast && npm run check:tooltip-contrast && ng-packagr -p ng-package.json",
|
|
8
8
|
"prepublishOnly": "npm run build",
|
|
9
9
|
"check:destructive-contrast": "node scripts/check-destructive-contrast.mjs",
|
|
10
|
-
"check:semantic-contrast": "node scripts/check-semantic-contrast.mjs"
|
|
10
|
+
"check:semantic-contrast": "node scripts/check-semantic-contrast.mjs",
|
|
11
|
+
"check:tooltip-contrast": "node scripts/check-tooltip-contrast.mjs"
|
|
11
12
|
},
|
|
12
13
|
"files": [
|
|
13
14
|
"dist",
|
package/themes.css
CHANGED
|
@@ -275,14 +275,38 @@
|
|
|
275
275
|
--wm-color-warning-readable: var(--wm-color-warning);
|
|
276
276
|
--wm-color-success-readable: var(--wm-color-success);
|
|
277
277
|
|
|
278
|
-
/* "Readable" accent —
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
278
|
+
/* "Readable" accent — the accent in `color:` (text) contexts: active tab
|
|
279
|
+
labels, current nav items, link-style buttons, the selected option in
|
|
280
|
+
`wm-select`. `--wm-color-accent` itself stays the interactive fill, where
|
|
281
|
+
3:1 (WCAG 1.4.11) is the bar.
|
|
282
|
+
|
|
283
|
+
The bar here is APCA Lc 60 AND WCAG AA 4.5:1, against bg-base, bg-raised
|
|
284
|
+
and bg-float, and against each of those wearing the accent's own 10% tint
|
|
285
|
+
— `--wm-bg-active`, which is exactly what `.wm-select-option.is-selected`
|
|
286
|
+
paints behind this colour.
|
|
287
|
+
|
|
288
|
+
APCA is the binding one, and it is the reason every theme now carries an
|
|
289
|
+
override. This token was tuned to WCAG alone, and on that bar it looked
|
|
290
|
+
healthy: the worst reading across all twelve themes was 4.52:1, comfortably
|
|
291
|
+
passing. On APCA, ELEVEN of the twelve failed Lc 60 on a bare surface, and
|
|
292
|
+
all twelve failed once the tint was included — including the two themes
|
|
293
|
+
that already carried a hand-tuned override for the WCAG failure. The two
|
|
294
|
+
models disagree here in the opposite direction to the destructive button,
|
|
295
|
+
where WCAG was the strict one: WCAG 2.x's luminance formula is generous to
|
|
296
|
+
mid-tone coloured text on a mid-tone ground, which is precisely this case.
|
|
297
|
+
Both bars are held rather than one being argued away.
|
|
298
|
+
|
|
299
|
+
`--wm-bg-float` binds on ten of the twelve. `sage-linen` binds on
|
|
300
|
+
bg-raised instead, because a light theme's sidebar is conventionally darker
|
|
301
|
+
than its canvas and its float is the lighter surface.
|
|
302
|
+
|
|
303
|
+
Each value is the nearest colour to the theme's own accent that clears
|
|
304
|
+
Lc 61, found by holding hue and chroma in OKLCH and walking lightness only,
|
|
305
|
+
so it stays that theme's blue, pink or sage. The target is 61 rather than
|
|
306
|
+
the 60 that is actually required: tuning to the bar exactly put
|
|
307
|
+
posh-sandalwood on Lc 60.0, which the guard read as a failure and which a
|
|
308
|
+
single hex rounding would have flipped either way. Guarded by
|
|
309
|
+
scripts/check-semantic-contrast.mjs. */
|
|
286
310
|
--wm-color-accent-readable: var(--wm-color-accent);
|
|
287
311
|
}
|
|
288
312
|
|
|
@@ -317,6 +341,7 @@
|
|
|
317
341
|
--wm-color-accent: #105987;
|
|
318
342
|
--wm-color-accent-hover: #2aa198;
|
|
319
343
|
--wm-color-accent-text: #ffffff;
|
|
344
|
+
--wm-color-accent-readable: #004066;
|
|
320
345
|
|
|
321
346
|
/* Semantic */
|
|
322
347
|
--wm-color-success: #485600;
|
|
@@ -386,6 +411,7 @@
|
|
|
386
411
|
--wm-color-accent: #1b4a9e;
|
|
387
412
|
--wm-color-accent-hover: #3061af;
|
|
388
413
|
--wm-color-accent-text: #ffffff;
|
|
414
|
+
--wm-color-accent-readable: #033285;
|
|
389
415
|
|
|
390
416
|
/* Semantic */
|
|
391
417
|
--wm-color-success: #085a50;
|
|
@@ -461,6 +487,7 @@
|
|
|
461
487
|
--wm-color-accent: #8fc4d3;
|
|
462
488
|
--wm-color-accent-hover: #81a1c1;
|
|
463
489
|
--wm-color-accent-text: #2e3440;
|
|
490
|
+
--wm-color-accent-readable: #a5dbea;
|
|
464
491
|
|
|
465
492
|
/* Semantic */
|
|
466
493
|
--wm-color-success: #b5cf9a;
|
|
@@ -537,6 +564,7 @@
|
|
|
537
564
|
--wm-color-accent: #c9a7fa;
|
|
538
565
|
--wm-color-accent-hover: #ff79c6;
|
|
539
566
|
--wm-color-accent-text: #282a36;
|
|
567
|
+
--wm-color-accent-readable: #dcc6fe;
|
|
540
568
|
|
|
541
569
|
/* Semantic */
|
|
542
570
|
--wm-color-success: #50fa7b;
|
|
@@ -611,6 +639,7 @@
|
|
|
611
639
|
--wm-color-accent: #f5986a;
|
|
612
640
|
--wm-color-accent-hover: #f08458;
|
|
613
641
|
--wm-color-accent-text: #1c1d2e;
|
|
642
|
+
--wm-color-accent-readable: #fead85;
|
|
614
643
|
|
|
615
644
|
/* Semantic */
|
|
616
645
|
--wm-color-success: #5cbfa0;
|
|
@@ -686,6 +715,7 @@
|
|
|
686
715
|
--wm-color-accent: #c4a8d8;
|
|
687
716
|
--wm-color-accent-hover: #9e7abf;
|
|
688
717
|
--wm-color-accent-text: #1a1715;
|
|
718
|
+
--wm-color-accent-readable: #d8bced;
|
|
689
719
|
|
|
690
720
|
/* Semantic */
|
|
691
721
|
--wm-color-success: #7ac4a0;
|
|
@@ -756,6 +786,7 @@
|
|
|
756
786
|
--wm-color-accent: #185c78;
|
|
757
787
|
--wm-color-accent-hover: #1e6e96;
|
|
758
788
|
--wm-color-accent-text: #ffffff;
|
|
789
|
+
--wm-color-accent-readable: #00374c;
|
|
759
790
|
|
|
760
791
|
/* Semantic */
|
|
761
792
|
--wm-color-success: #006036;
|
|
@@ -831,13 +862,9 @@
|
|
|
831
862
|
--wm-color-accent: #f92672;
|
|
832
863
|
--wm-color-accent-hover: #fd971f;
|
|
833
864
|
--wm-color-accent-text: #1c1c15;
|
|
834
|
-
/*
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
background (3.6:1); #ff8ac4 clears 5.03:1 on bg-float while
|
|
838
|
-
staying in the hot-pink hue family. Used wherever components
|
|
839
|
-
reference --wm-color-accent-readable instead of --wm-color-accent. */
|
|
840
|
-
--wm-color-accent-readable: #ff8ac4;
|
|
865
|
+
/* #ff8ac4 was chosen for the WCAG failure (#f92672 is 2.9:1 on bg-float) and
|
|
866
|
+
cleared 5.03:1, but measures APCA Lc 51.4 there. See the note in :root. */
|
|
867
|
+
--wm-color-accent-readable: #ffabd1;
|
|
841
868
|
|
|
842
869
|
/* Semantic */
|
|
843
870
|
--wm-color-success: #a6e22e;
|
|
@@ -913,6 +940,7 @@
|
|
|
913
940
|
--wm-color-accent: #c09d06;
|
|
914
941
|
--wm-color-accent-hover: #b15000;
|
|
915
942
|
--wm-color-accent-text: #060810;
|
|
943
|
+
--wm-color-accent-readable: #dcb83a;
|
|
916
944
|
|
|
917
945
|
/* Semantic */
|
|
918
946
|
--wm-color-success: #4aba80;
|
|
@@ -989,6 +1017,7 @@
|
|
|
989
1017
|
--wm-color-accent: #3fb950;
|
|
990
1018
|
--wm-color-accent-hover: #58a6ff;
|
|
991
1019
|
--wm-color-accent-text: #0d1117;
|
|
1020
|
+
--wm-color-accent-readable: #5dd46a;
|
|
992
1021
|
|
|
993
1022
|
/* Semantic */
|
|
994
1023
|
--wm-color-success: #3fb950;
|
|
@@ -1065,12 +1094,9 @@
|
|
|
1065
1094
|
--wm-color-accent: #82a682;
|
|
1066
1095
|
--wm-color-accent-hover: #94b894;
|
|
1067
1096
|
--wm-color-accent-text: #161817;
|
|
1068
|
-
/*
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
while staying in the moss-green hue family. Used wherever components
|
|
1072
|
-
reference --wm-color-accent-readable instead of --wm-color-accent. */
|
|
1073
|
-
--wm-color-accent-readable: #9bc99b;
|
|
1097
|
+
/* #9bc99b was chosen for the WCAG failure (#82a682 is 3.30:1 on bg-float) and
|
|
1098
|
+
cleared 4.74:1, but measures APCA Lc 54.3 there. See the note in :root. */
|
|
1099
|
+
--wm-color-accent-readable: #abdaab;
|
|
1074
1100
|
|
|
1075
1101
|
/* Semantic */
|
|
1076
1102
|
--wm-color-success: #a0c5a0;
|
|
@@ -1140,6 +1166,7 @@
|
|
|
1140
1166
|
--wm-color-accent: #3a5a43;
|
|
1141
1167
|
--wm-color-accent-hover: #2c4733;
|
|
1142
1168
|
--wm-color-accent-text: #eaf0e7;
|
|
1169
|
+
--wm-color-accent-readable: #203f2a;
|
|
1143
1170
|
|
|
1144
1171
|
/* Semantic */
|
|
1145
1172
|
--wm-color-success: #3a6b48;
|