@nyt87/ui 0.2.7 → 0.3.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/styles.css +18 -1
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -267,6 +267,8 @@
|
|
|
267
267
|
.ds-section__title { margin: 0 0 var(--space-4); font-size: clamp(var(--text-2xl), 3.5vw, var(--text-3xl)); line-height: var(--leading-tight); }
|
|
268
268
|
|
|
269
269
|
.ds-features { display: grid; gap: var(--space-5) var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); margin: 0; padding: 0; list-style: none; }
|
|
270
|
+
.ds-features__icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: var(--space-3); border-radius: var(--radius-md); background: var(--bg-sunken); color: var(--accent-ink); }
|
|
271
|
+
.ds-features__icon > :is(svg, img) { width: 1.75rem; height: 1.75rem; }
|
|
270
272
|
.ds-features__title { margin: 0 0 var(--space-1); font-size: var(--text-md); line-height: var(--leading-tight); }
|
|
271
273
|
.ds-features__text { margin: 0; color: var(--fg-muted); line-height: var(--leading-normal); }
|
|
272
274
|
|
|
@@ -285,6 +287,20 @@
|
|
|
285
287
|
.ds-prose > h3 { font-size: var(--text-lg); }
|
|
286
288
|
.ds-prose > :is(ul, ol):not([class]) { padding-left: 1.25em; }
|
|
287
289
|
.ds-prose a:not([class]) { color: var(--link); }
|
|
290
|
+
.ds-prose > :is(h2, h3, h4) { scroll-margin-top: var(--space-4); }
|
|
291
|
+
.ds-prose > h4 { margin-top: var(--space-5); font-size: var(--text-md); }
|
|
292
|
+
.ds-prose li + li { margin-top: var(--space-1); }
|
|
293
|
+
/* Markdown output: code, tables, quotes, pictures and rules. Wide blocks scroll on their own, not the page. */
|
|
294
|
+
.ds-prose :not(pre) > code { padding: 0.1em 0.35em; font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: 5px; overflow-wrap: break-word; }
|
|
295
|
+
.ds-prose > pre:not([class]) { padding: var(--space-3) var(--space-4); overflow-x: auto; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
296
|
+
.ds-prose > table:not([class]) { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: var(--text-sm); }
|
|
297
|
+
.ds-prose > table:not([class]) :is(th, td) { padding: var(--space-2) var(--space-3); border: 1px solid var(--border); text-align: left; vertical-align: top; }
|
|
298
|
+
.ds-prose > table:not([class]) th { background: var(--bg-sunken); }
|
|
299
|
+
.ds-prose > blockquote:not([class]) { padding: var(--space-2) var(--space-4); border-left: 3px solid var(--accent); background: var(--bg-sunken); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
|
|
300
|
+
.ds-prose > blockquote:not([class]) > * { margin: 0; }
|
|
301
|
+
.ds-prose > blockquote:not([class]) > * + * { margin-top: var(--space-2); }
|
|
302
|
+
.ds-prose img:not([class]) { max-width: 100%; height: auto; }
|
|
303
|
+
.ds-prose > hr:not([class]) { border: 0; border-top: 1px solid var(--border); margin-block: var(--space-6); }
|
|
288
304
|
|
|
289
305
|
/* ---------- App kit: phone-first apps (bottom sheet, toast, chips, list rows, tab bar, search, progress, details, swatches) ---------- */
|
|
290
306
|
|
|
@@ -367,7 +383,8 @@
|
|
|
367
383
|
.ds-details__row:last-child { border-bottom: 0; padding-bottom: 0; }
|
|
368
384
|
.ds-details dt { grid-column: 1; color: var(--fg-muted); font-size: var(--text-sm); }
|
|
369
385
|
.ds-details dd { grid-column: 1; margin: 0; overflow-wrap: anywhere; }
|
|
370
|
-
|
|
386
|
+
/* A <dd>: the only valid child of a row besides <dt>. Two classes, to beat ".ds-details dd". */
|
|
387
|
+
.ds-details .ds-details__action { grid-column: 2; grid-row: 1 / span 2; }
|
|
371
388
|
|
|
372
389
|
/* Colour swatches: a choice of colours as radio buttons. Each swatch sets --ds-swatch. */
|
|
373
390
|
.ds-swatches { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; padding: 0; border: 0; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyt87/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Framework-free UI components for nyt87 products: HTML + CSS, with small vanilla behaviours for the interactive parts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"dist"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@nyt87/tokens": ">=0.1.
|
|
52
|
+
"@nyt87/tokens": ">=0.1.4"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsup && cp src/styles.css dist/styles.css",
|