@judarn/ui 0.8.0 → 0.8.2

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/README.md CHANGED
@@ -23,7 +23,7 @@ export function Status() {
23
23
 
24
24
  ## Class names
25
25
 
26
- `@judarn/ui/styles` and `@judarn/ui/components.css` style only `jd-` classes (`jd-btn`, `jd-badge`, `jd-tag`, `jd-card`, `jd-field`, `jd-navbar`, `jd-footer`, `jd-table`, `jd-matrix`, `jd-lockup`), so a project's own `.btn` or `.card` stays its own. Buttons, badges, and tags are set apart by fill, with a transparent border that high-contrast modes turn into an outline.
26
+ `@judarn/ui/styles` and `@judarn/ui/components.css` style only `jd-` classes (`jd-btn`, `jd-badge`, `jd-tag`, `jd-card`, `jd-field`, `jd-navbar`, `jd-footer`, `jd-table`, `jd-matrix`, `jd-lockup`, `jd-list`), so a project's own `.btn` or `.card` stays its own. Buttons, badges, and tags are set apart by fill, with a transparent border that high-contrast modes turn into an outline. Put `jd-list` on a `ul` or `ol` of text items for bullets or numbers in secondary ink with a hanging indent, and `jd-list jd-list--plain` with `role="list"` on rows of links or data.
27
27
 
28
28
  ## Accent colors
29
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@judarn/ui",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Judarn design foundation tokens and React components for the web",
5
5
  "author": "Ruben Luthman",
6
6
  "license": "MIT",
@@ -239,6 +239,28 @@ select.jd-field__input { cursor: pointer; } /* native appearance keeps the platf
239
239
  .jd-matrix tbody tr:hover td { background: var(--jd-surface-recessed); }
240
240
  .jd-matrix .num { text-align: right; font-variant-numeric: tabular-nums; }
241
241
 
242
+ /* ---- LIST -------------------------------------------------------------- */
243
+ /* Items of text get markers (DESIGN.md, Lists): bullets on ul, numbers on ol, in secondary ink,
244
+ hanging so wrapped lines align with the text. Items are spaced with margins, not gap,
245
+ so the list sits inside .flow as one block. The indent fits two-digit numbers on ol.
246
+ The margin reset has zero specificity, so .flow's space before and after the list still applies. */
247
+ :where(.jd-list) { margin: 0; }
248
+ .jd-list {
249
+ padding-inline-start: var(--jd-space-3);
250
+ max-width: var(--jd-measure-body);
251
+ list-style-type: disc;
252
+ }
253
+ ol.jd-list { list-style-type: decimal; padding-inline-start: var(--jd-space-4); }
254
+ .jd-list > li + li { margin-block-start: var(--jd-space-1); }
255
+ .jd-list > li::marker { color: var(--jd-ink-60); font-variant-numeric: tabular-nums; }
256
+ .jd-card .jd-list { max-width: var(--jd-measure-compact); }
257
+ /* One nested level: hollow bullets, same ink, spacing and indent. */
258
+ .jd-list .jd-list { margin-block-start: var(--jd-space-1); max-width: none; }
259
+ ul.jd-list ul.jd-list { list-style-type: circle; }
260
+ /* Rows of links, data or controls: no markers, no indent, set apart by spacing.
261
+ Give the element role="list": Safari and VoiceOver drop list semantics without markers. */
262
+ .jd-list.jd-list--plain { list-style: none; padding-inline-start: 0; }
263
+
242
264
  /* ---- HIGH CONTRAST RULE SCALING ---------------------------------------- */
243
265
  @media (prefers-contrast: more) {
244
266
  .jd-matrix th,