@wildmason/aegis 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +301 -1
- package/dist/fesm2022/wildmason-aegis.mjs +589 -40
- package/dist/fesm2022/wildmason-aegis.mjs.map +1 -1
- package/dist/types/wildmason-aegis.d.ts +371 -24
- package/inputs.css +85 -6
- package/package.json +6 -2
package/inputs.css
CHANGED
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
.wm-shadow-md box-shadow: --wm-shadow-md — cards, dropdowns, popovers
|
|
27
27
|
.wm-shadow-lg box-shadow: --wm-shadow-lg — modals, overlays
|
|
28
28
|
|
|
29
|
+
Hatch (stand-in texture, DESIGN_LANGUAGE.md §2.8):
|
|
30
|
+
.wm-hatch 135deg bands over the element's own fill
|
|
31
|
+
.wm-hatch--warning warning-toned bands — a value that is missing
|
|
32
|
+
|
|
29
33
|
Menu item:
|
|
30
34
|
.wm-menu-item Hover-background for buttons inside popovers/dropdowns
|
|
31
35
|
|
|
@@ -359,6 +363,45 @@
|
|
|
359
363
|
.wm-shadow-lg { box-shadow: var(--wm-shadow-lg); }
|
|
360
364
|
|
|
361
365
|
|
|
366
|
+
/* ============================================================
|
|
367
|
+
Hatch — .wm-hatch / .wm-hatch--warning
|
|
368
|
+
============================================================
|
|
369
|
+
Marks a stand-in: a slot that holds no real value yet, or a
|
|
370
|
+
node that stands for items not drawn. DESIGN_LANGUAGE.md §2.8.
|
|
371
|
+
|
|
372
|
+
Diagonal bands at 135deg, 4px of tone then 4px clear, painted
|
|
373
|
+
as background-image OVER the element's own fill. Set that fill
|
|
374
|
+
with background-color: the `background` shorthand resets
|
|
375
|
+
background-image and removes the hatch.
|
|
376
|
+
|
|
377
|
+
.wm-hatch neutral — elided nodes, empty placeholders
|
|
378
|
+
.wm-hatch--warning a value that is missing and needs one
|
|
379
|
+
|
|
380
|
+
Each share is the smallest that shows on every theme and
|
|
381
|
+
surface; every point above it costs the text on top contrast.
|
|
382
|
+
--wm-hatch-tone overrides the band colour. It must stay a mix
|
|
383
|
+
toward transparent, so the bands composite over the fill.
|
|
384
|
+
|
|
385
|
+
Text on a hatch is --wm-text-primary. Secondary and muted text
|
|
386
|
+
drop below AA on the band on some themes. The hatch never
|
|
387
|
+
carries the meaning alone, and forced-colors mode removes it:
|
|
388
|
+
pair it with text and a border.
|
|
389
|
+
Guarded by scripts/check-hatch-contrast.mjs.
|
|
390
|
+
============================================================ */
|
|
391
|
+
|
|
392
|
+
.wm-hatch {
|
|
393
|
+
background-image: repeating-linear-gradient(
|
|
394
|
+
135deg,
|
|
395
|
+
var(--wm-hatch-tone, color-mix(in srgb, var(--wm-text-primary) 10%, transparent)) 0 4px,
|
|
396
|
+
transparent 4px 8px
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.wm-hatch--warning {
|
|
401
|
+
--wm-hatch-tone: color-mix(in srgb, var(--wm-color-warning) 14%, transparent);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
|
|
362
405
|
/* ============================================================
|
|
363
406
|
Base input — .wm-input
|
|
364
407
|
============================================================
|
|
@@ -1092,8 +1135,9 @@ select.wm-input {
|
|
|
1092
1135
|
============================================================
|
|
1093
1136
|
Base interactive button. Always pair with a variant modifier.
|
|
1094
1137
|
|
|
1095
|
-
Variants: --primary (default), --secondary, --ghost, --
|
|
1096
|
-
|
|
1138
|
+
Variants: --primary (default), --secondary, --ghost, --flat,
|
|
1139
|
+
--dashed, --destructive
|
|
1140
|
+
Sizes: --xs (22px), --sm (28px), --md (36px, default), --lg (40px)
|
|
1097
1141
|
|
|
1098
1142
|
The focus ring on primary and destructive buttons uses a
|
|
1099
1143
|
double-ring (canvas gap + colour ring) rather than the diffuse
|
|
@@ -1202,6 +1246,34 @@ select.wm-input {
|
|
|
1202
1246
|
background-color: var(--wm-bg-hover);
|
|
1203
1247
|
}
|
|
1204
1248
|
|
|
1249
|
+
/* The empty slot: an empty place a new item goes, such as "New dependent
|
|
1250
|
+
* branch" at the foot of a stack or "Track a new pattern" under a list.
|
|
1251
|
+
*
|
|
1252
|
+
* The dash is the whole message, so it has to be seen. `--wm-border-input`
|
|
1253
|
+
* alone is 2.36:1 on wildmason over bg-float, and `--wm-border` is 1.04:1 on
|
|
1254
|
+
* warm-light: a slot nobody can see is a ghost button. The edge takes the rule
|
|
1255
|
+
* themes.css uses for a boundary that must hold, a mix toward
|
|
1256
|
+
* `--wm-text-primary`. That lightens on dark themes and darkens on light ones,
|
|
1257
|
+
* and 70/30 clears 3:1 on every theme and all four surfaces (worst 3.34:1).
|
|
1258
|
+
*
|
|
1259
|
+
* Hover fills with `--wm-bg-sunken`, as `--secondary` does, not `--wm-bg-hover`:
|
|
1260
|
+
* primary text on bg-hover is 4.41:1 on vampires-kiss. The dash also turns
|
|
1261
|
+
* solid, which is what reads as hover on a surface the fill happens to match.
|
|
1262
|
+
*
|
|
1263
|
+
* Guarded by scripts/check-dashed-contrast.mjs. */
|
|
1264
|
+
.wm-btn--dashed {
|
|
1265
|
+
background-color: transparent;
|
|
1266
|
+
border-style: dashed;
|
|
1267
|
+
border-color: color-mix(in srgb, var(--wm-border-input) 70%, var(--wm-text-primary));
|
|
1268
|
+
color: var(--wm-text-secondary);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
.wm-btn--dashed:hover:not(:disabled) {
|
|
1272
|
+
background-color: var(--wm-bg-sunken);
|
|
1273
|
+
border-style: solid;
|
|
1274
|
+
color: var(--wm-text-primary);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1205
1277
|
/* ── Sizes ─────────────────────────────────────────────────── */
|
|
1206
1278
|
|
|
1207
1279
|
.wm-btn--xs {
|
|
@@ -1226,10 +1298,13 @@ select.wm-input {
|
|
|
1226
1298
|
|
|
1227
1299
|
/* ── Focus ─────────────────────────────────────────────────── */
|
|
1228
1300
|
|
|
1229
|
-
/*
|
|
1301
|
+
/* No fill or a neutral fill: diffuse pulse (border changes from neutral → accent).
|
|
1302
|
+
Each selector here also goes in the reduced-motion list below;
|
|
1303
|
+
scripts/check-focus-pulse.mjs fails the build when one is missing. */
|
|
1230
1304
|
.wm-btn--secondary:focus-visible,
|
|
1231
1305
|
.wm-btn--ghost:focus-visible,
|
|
1232
|
-
.wm-btn--flat:focus-visible
|
|
1306
|
+
.wm-btn--flat:focus-visible,
|
|
1307
|
+
.wm-btn--dashed:focus-visible {
|
|
1233
1308
|
outline: none;
|
|
1234
1309
|
border-color: var(--wm-color-accent);
|
|
1235
1310
|
animation: wm-focus-pulse 400ms cubic-bezier(0.2, 0, 0.4, 1) forwards;
|
|
@@ -1350,13 +1425,17 @@ select.wm-input {
|
|
|
1350
1425
|
transition: none;
|
|
1351
1426
|
}
|
|
1352
1427
|
|
|
1353
|
-
/* Replace the animated pulse with a static diffuse ring
|
|
1428
|
+
/* Replace the animated pulse with a static diffuse ring. Every selector that
|
|
1429
|
+
animates wm-focus-pulse belongs here: scripts/check-focus-pulse.mjs. */
|
|
1354
1430
|
.wm-input:focus,
|
|
1355
1431
|
.wm-input-group:focus-within,
|
|
1356
1432
|
.wm-select-trigger[aria-expanded='true'],
|
|
1357
1433
|
.wm-select-trigger:focus-visible,
|
|
1434
|
+
.wm-checkbox:focus-visible,
|
|
1358
1435
|
.wm-btn--secondary:focus-visible,
|
|
1359
|
-
.wm-btn--ghost:focus-visible
|
|
1436
|
+
.wm-btn--ghost:focus-visible,
|
|
1437
|
+
.wm-btn--flat:focus-visible,
|
|
1438
|
+
.wm-btn--dashed:focus-visible {
|
|
1360
1439
|
animation: none;
|
|
1361
1440
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--wm-color-accent) 25%, transparent);
|
|
1362
1441
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildmason/aegis",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Aegis design system — 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 && npm run check:accent-contrast && npm run check:tooltip-contrast && npm run check:docs && ng-packagr -p ng-package.json && npm run check:entry-points",
|
|
7
|
+
"build": "npm run check:offline-fonts && npm run check:destructive-contrast && npm run check:semantic-contrast && npm run check:accent-contrast && npm run check:tooltip-contrast && npm run check:dashed-contrast && npm run check:toggle-group-contrast && npm run check:hatch-contrast && npm run check:focus-pulse && npm run check:docs && ng-packagr -p ng-package.json && npm run check:entry-points",
|
|
8
8
|
"prepublishOnly": "npm run build",
|
|
9
9
|
"check:destructive-contrast": "node scripts/check-destructive-contrast.mjs",
|
|
10
10
|
"check:semantic-contrast": "node scripts/check-semantic-contrast.mjs",
|
|
11
11
|
"check:tooltip-contrast": "node scripts/check-tooltip-contrast.mjs",
|
|
12
12
|
"check:accent-contrast": "node scripts/check-accent-contrast.mjs",
|
|
13
|
+
"check:dashed-contrast": "node scripts/check-dashed-contrast.mjs",
|
|
14
|
+
"check:toggle-group-contrast": "node scripts/check-toggle-group-contrast.mjs",
|
|
15
|
+
"check:hatch-contrast": "node scripts/check-hatch-contrast.mjs",
|
|
16
|
+
"check:focus-pulse": "node scripts/check-focus-pulse.mjs",
|
|
13
17
|
"check:docs": "node scripts/check-design-language.mjs",
|
|
14
18
|
"check:entry-points": "node scripts/check-entry-points.mjs"
|
|
15
19
|
},
|