@klodd/ds 3.10.3 → 3.10.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/js/turbo-nav.js
CHANGED
|
@@ -287,8 +287,16 @@
|
|
|
287
287
|
|
|
288
288
|
try {
|
|
289
289
|
if ( typeof document.startViewTransition === 'function' && ! skipVT ) {
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
let swapDone = false;
|
|
291
|
+
const guardedSwap = () => { swapDone = true; swap(); };
|
|
292
|
+
try {
|
|
293
|
+
const transition = document.startViewTransition( guardedSwap );
|
|
294
|
+
try { await transition.finished; } catch ( _ ) { /* ignore */ }
|
|
295
|
+
} catch ( _ ) {
|
|
296
|
+
// startViewTransition() threw synchronously (e.g. InvalidStateError).
|
|
297
|
+
// Fallback to instant swap without animation.
|
|
298
|
+
if ( ! swapDone ) swap();
|
|
299
|
+
}
|
|
292
300
|
} else {
|
|
293
301
|
swap();
|
|
294
302
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 0014 - Ekonom colored-row/colored-bar migration
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
Pending.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Paketet har .colored-row och .colored-bar med --row-accent/--bar-accent
|
|
8
|
+
token-mekanism (ADR Kategori-monstret i 02-components.md).
|
|
9
|
+
|
|
10
|
+
Ekonom implementerade ett parallellt system innan eller utan adoption
|
|
11
|
+
av paketets komponenter:
|
|
12
|
+
|
|
13
|
+
- .cat-list-row (ekonom.css) - flex-container for kategoriserade rader,
|
|
14
|
+
UTAN border-left och UTAN var(--row-accent). Aktivt anvand i templates.
|
|
15
|
+
- .cat-bar-fill (ekonom.css) - background med cat-X-token, aktivt
|
|
16
|
+
anvand via .cat-bar-mat/-el/... i templates.
|
|
17
|
+
- 8 .cat-tx-X { --row-accent: ... } bindings i ekonom-domain.css -
|
|
18
|
+
setter --row-accent men ingen consumer laser tokenet. DEAD.
|
|
19
|
+
|
|
20
|
+
Jubb har ingen colored-row/colored-bar-bindning alls.
|
|
21
|
+
|
|
22
|
+
## Considered options
|
|
23
|
+
|
|
24
|
+
### Option A: Migrera Ekonom till paketets .colored-row + .colored-bar
|
|
25
|
+
|
|
26
|
+
- Byt .cat-list-row -> .colored-row + cat-tx-X i templates
|
|
27
|
+
- Byt .cat-bar-fill -> .colored-bar + .cat-bar-X i templates
|
|
28
|
+
- Radera parallell implementation i ekonom.css
|
|
29
|
+
- Radera dead --row-accent-bindings i ekonom-domain.css
|
|
30
|
+
|
|
31
|
+
Pros: riktig paritet med paketet, Kategori-monstret anvands som avsett
|
|
32
|
+
Cons: template-migration i 8-15 filer, visuell verifiering per vy
|
|
33
|
+
|
|
34
|
+
### Option B: Minimal cleanup - radera dead bindings
|
|
35
|
+
|
|
36
|
+
- Radera de 8 oanvanda .cat-tx-X { --row-accent: ... } raderna
|
|
37
|
+
ur ekonom-domain.css
|
|
38
|
+
- Behall .cat-list-row och .cat-bar-fill som Ekonom-specifika
|
|
39
|
+
|
|
40
|
+
Pros: snabb, lag risk
|
|
41
|
+
Cons: parallellt system lever kvar, paketets .colored-row oanvand
|
|
42
|
+
|
|
43
|
+
## Pending decision criteria
|
|
44
|
+
|
|
45
|
+
- Prioritet: ar visuellt rikare kategori-rader (border-left accent)
|
|
46
|
+
vard template-migrationen?
|
|
47
|
+
- Timing: kan tas i samma sprint som annan Ekonom-template-migration
|
|
48
|
+
for effektivitet
|
|
49
|
+
|
|
50
|
+
## Beroenden
|
|
51
|
+
|
|
52
|
+
Ingen teknisk blockering. CSS-bindningar redo i paketet sedan 3.1.0.
|