@klodd/ds 3.9.1 → 3.10.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.
@@ -2,6 +2,8 @@
2
2
  components/badge.css
3
3
  .badge - generisk pill med variants for status.
4
4
  .score-pill - tabular-nums-pill speciellt for relevance-scores.
5
+ Kanonisk definition (chip.css duplicerade tidigare,
6
+ raderad 2026-05-10).
5
7
 
6
8
  BEM-konvention med double-dash for varianter.
7
9
  ================================================================ */
@@ -72,7 +74,7 @@
72
74
  font-size: var(--fs-11);
73
75
  font-weight: var(--fw-medium);
74
76
  font-variant-numeric: tabular-nums;
75
- letter-spacing: 0.01em;
77
+ letter-spacing: var(--ls-wide, 0.01em);
76
78
  line-height: 1.4;
77
79
  border: 1px solid transparent;
78
80
  border-radius: var(--radius-full);
@@ -1,6 +1,6 @@
1
1
  /* ================================================================
2
2
  components/chip.css
3
- Pills- och chips-familjen: sex fristående blocks som delar
3
+ Pills- och chips-familjen: fem fristående blocks som delar
4
4
  form-språket (rounded-full, kompakt padding, inline-flex).
5
5
 
6
6
  Blocks:
@@ -8,7 +8,6 @@
8
8
  .chip-list - sibling-wrapper för chips i rad (har __item/__delete/__add)
9
9
  .brand-pill - projekt-namn-pill i topbar
10
10
  .month-pill - navigations-pill för månadsbyte (Ekonom)
11
- .score-pill - ratings-pill (NB: definieras även i badge.css - identiska regler)
12
11
  .install-chip - PWA install-prompt som flyter ovan bottom-nav
13
12
 
14
13
  HTML-relationer:
@@ -17,7 +16,6 @@
17
16
 
18
17
  Modifiers:
19
18
  .chip --accent/-positive/-negative/-warning/-faint
20
- .score-pill --strong/-medium/-low
21
19
 
22
20
  .install-chip har egna BEM-element (__text/__install/__dismiss) plus
23
21
  keyframe-animation install-chip-up (respekterar prefers-reduced-motion).
@@ -208,45 +206,6 @@
208
206
  }
209
207
 
210
208
 
211
- /* ================================================================
212
- ==== SCORE-PILL
213
- Tabular-nums for sifferjustering. Modifiers: --strong/--medium/--low.
214
- ================================================================ */
215
- .score-pill {
216
- flex-shrink: 0;
217
- display: inline-flex;
218
- align-items: center;
219
- justify-content: center;
220
- font-size: var(--fs-11);
221
- font-weight: var(--fw-medium);
222
- font-variant-numeric: tabular-nums;
223
- letter-spacing: var(--ls-wide, 0.01em);
224
- padding: var(--space-2) var(--space-8);
225
- border-radius: var(--radius-full);
226
- border: 1px solid transparent;
227
- white-space: nowrap;
228
- line-height: 1.4;
229
- }
230
-
231
- .score-pill--strong {
232
- color: var(--positive);
233
- background: var(--positive-dim);
234
- border-color: var(--positive-border);
235
- }
236
-
237
- .score-pill--medium {
238
- color: var(--warning);
239
- background: var(--warning-dim);
240
- border-color: var(--warning-border);
241
- }
242
-
243
- .score-pill--low {
244
- color: var(--text-muted);
245
- background: var(--surface-default);
246
- border-color: var(--border-subtle);
247
- }
248
-
249
-
250
209
  /* ================================================================
251
210
  ==== INSTALL-CHIP
252
211
  PWA install-prompt som flyter ovan bottom-nav.
@@ -9,6 +9,8 @@
9
9
 
10
10
  Element:
11
11
  .kv-list__item - en rad (justify-content: space-between)
12
+ .kv-list__key - vanster-segment (label, kan innehalla chip/svg)
13
+ .kv-list__value - hoger-segment (varde, tabular-nums)
12
14
  .kv-budget-header - rubrik-rad for budget-expandering
13
15
  (compound-block per regel 11)
14
16
  .kv-budget-body - expanderat innehall (compound-block)
@@ -38,6 +40,23 @@
38
40
  color: var(--text-subtle);
39
41
  }
40
42
 
43
+ .kv-list__key {
44
+ display: inline-flex;
45
+ align-items: center;
46
+ gap: var(--space-6);
47
+ flex: 1;
48
+ min-width: 0;
49
+ }
50
+
51
+ .kv-list__value {
52
+ display: inline-flex;
53
+ align-items: center;
54
+ gap: var(--space-6);
55
+ flex-shrink: 0;
56
+ color: var(--text-default);
57
+ font-variant-numeric: tabular-nums;
58
+ }
59
+
41
60
  .kv-list__item--strong {
42
61
  color: var(--text-default);
43
62
  font-weight: var(--fw-medium);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klodd/ds",
3
- "version": "3.9.1",
3
+ "version": "3.10.0",
4
4
  "description": "Klodd Design System - shared tokens, typography, components and JS for Jubb, Ekonom, and future apps. v3.5.3 (2026-05-09): tillagg .heading (17px medium tight) i base/typography.css for dialog-titlar och sheet-rubriker. Tackar luckan mellan .heading-2 (18px) och .heading-3 (15px) - matchar Ekonoms gamla .heading-class.",
5
5
  "main": "css/index.css",
6
6
  "bin": {
@@ -33,7 +33,7 @@ För varje entry gäller:
33
33
  - **Tokens:** `--surface-sunken/-default`, `--accent-9`, `--accent-a3` (focus-ring), `--bg-danger` (error-state)
34
34
 
35
35
  ### badge (`badge.css`)
36
- - **Blocks:** `.badge`, `.score-pill` (sibling, definieras aven i `chip.css` med identiska regler)
36
+ - **Blocks:** `.badge`, `.score-pill` (sibling, kanonisk definition)
37
37
  - **Modifiers:** `.badge--neutral/-success/-warning/-danger/-accent`, `.score-pill--strong/-medium/-low`
38
38
  - **Anvand:** Status-pills (statiska)
39
39
  - **INTE:** Klickbara chips (anvand `.chip`)
@@ -190,9 +190,9 @@ För varje entry gäller:
190
190
  - **INTE:** Vanlig `<h1>` (anvand `.heading-1`)
191
191
 
192
192
  ### chip (`chip.css`)
193
- - **Blocks:** `.chip`, `.chip-list` (sibling-wrapper for chips i rad), `.brand-pill`, `.month-pill`, `.score-pill` (definieras aven i `badge.css`), `.install-chip` (PWA install-prompt)
193
+ - **Blocks:** `.chip`, `.chip-list` (sibling-wrapper for chips i rad), `.brand-pill`, `.month-pill`, `.install-chip` (PWA install-prompt)
194
194
  - **Element:** `.chip-list__item`, `.chip-list__text`, `.chip-list__form`, `.chip-list__delete`, `.chip-list__add`, `.install-chip__text`, `.install-chip__install`, `.install-chip__dismiss`
195
- - **Modifiers:** `.chip--accent/-positive/-negative/-warning/-faint`, `.score-pill--strong/-medium/-low`
195
+ - **Modifiers:** `.chip--accent/-positive/-negative/-warning/-faint`
196
196
  - **Anvand:** Kort-format pills med dot-prefix (status, kategori, count)
197
197
  - **INTE:** Form-inputs (anvand `.input`)
198
198
 
@@ -273,7 +273,7 @@ För varje entry gäller:
273
273
 
274
274
  ### kv-list (`kv-list.css`) - v3.9.0
275
275
  - **Blocks:** `.kv-list` (`<ul>`-wrapper)
276
- - **Element:** `.kv-list__item`, `.kv-budget-header` (compound, klickbar header), `.kv-budget-body` (compound, expanderat innehall)
276
+ - **Element:** `.kv-list__item`, `.kv-list__key`, `.kv-list__value`, `.kv-budget-header` (compound, klickbar header), `.kv-budget-body` (compound, expanderat innehall)
277
277
  - **Modifiers:** `.kv-list__item--strong/-sub/-divider/-budget`
278
278
  - **Anvand:** Key-value list for metric-breakdowns, statistik-paneler, settings-summaries
279
279
  - **INTE:** List av actions (anvand `.list-row` eller `.setting-row`)