@nyt87/ui 0.2.3 → 0.2.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.
Files changed (2) hide show
  1. package/dist/styles.css +38 -2
  2. package/package.json +2 -2
package/dist/styles.css CHANGED
@@ -1,5 +1,8 @@
1
1
  /* @nyt87/ui styles. Requires @nyt87/tokens/tokens.css. Only tokens are used for colour, size, radius and motion. */
2
2
 
3
+ /* Korean breaks between words, not inside them; a word longer than the line may still wrap. */
4
+ :where(:lang(ko)) { word-break: keep-all; overflow-wrap: anywhere; }
5
+
3
6
  .ds-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
4
7
 
5
8
  /* One focus style for everything interactive. */
@@ -180,10 +183,12 @@
180
183
  .ds-code pre { margin: 0; padding: var(--space-3); overflow-x: auto; font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-normal); }
181
184
 
182
185
  /* ---------- Brand typography: headings and buttons use the heading face ---------- */
183
- .ds-btn, .ds-card__title, .ds-modal__title, .ds-empty__title, .ds-alert__title, .ds-tabs__tab, .ds-stat__num, .ds-brand, .ds-footer__heading {
186
+ .ds-btn, .ds-card__title, .ds-modal__title, .ds-empty__title, .ds-alert__title, .ds-tabs__tab, .ds-stat__num, .ds-brand, .ds-footer__heading,
187
+ .ds-hero__title, .ds-section__title, .ds-features__title, .ds-steps__title, .ds-prose > :is(h1, h2, h3) {
184
188
  font-family: var(--font-heading);
185
189
  }
186
- .ds-card__title, .ds-modal__title, .ds-empty__title { font-weight: var(--weight-heading); letter-spacing: var(--tracking-heading); }
190
+ .ds-card__title, .ds-modal__title, .ds-empty__title,
191
+ .ds-hero__title, .ds-section__title, .ds-features__title, .ds-steps__title, .ds-prose > :is(h1, h2, h3) { font-weight: var(--weight-heading); letter-spacing: var(--tracking-heading); }
187
192
 
188
193
  /* ---------- Layout helpers ---------- */
189
194
  /* --max-width is the width of the content itself; the page gutter sits outside it, so content lines up with page sections. */
@@ -246,6 +251,37 @@
246
251
  .ds-footer__tagline, .ds-footer__credit, .ds-footer__note { font-size: var(--text-sm); color: inherit; }
247
252
  .ds-footer__heart { color: var(--accent-ink); }
248
253
 
254
+ /* ---------- Product site sections: hero, section, features, steps, prose ---------- */
255
+ /* Hold margins and sizes even when the host page styles bare headings, <p> and lists. */
256
+ .ds-hero { display: grid; gap: var(--space-5); padding-block: var(--space-7) var(--space-8); }
257
+ .ds-hero__art { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); object-fit: cover; }
258
+ .ds-hero__title { margin: 0; font-size: clamp(var(--text-3xl), 6vw, calc(var(--text-4xl) * 1.5)); line-height: var(--leading-tight); }
259
+ .ds-hero__lead { margin: 0; max-width: 36em; color: var(--fg-muted); font-size: var(--text-lg); line-height: var(--leading-normal); }
260
+ .ds-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
261
+
262
+ .ds-section { padding-block: var(--space-8); border-top: 1px solid var(--border); }
263
+ .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); }
264
+
265
+ .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; }
266
+ .ds-features__title { margin: 0 0 var(--space-1); font-size: var(--text-md); line-height: var(--leading-tight); }
267
+ .ds-features__text { margin: 0; color: var(--fg-muted); line-height: var(--leading-normal); }
268
+
269
+ .ds-steps { display: grid; gap: var(--space-5); margin: 0; padding-left: 1.5em; }
270
+ .ds-steps > li::marker { color: var(--accent-ink); font-family: var(--font-heading); font-weight: 700; }
271
+ .ds-steps__title { margin: 0 0 var(--space-1); font-size: var(--text-lg); line-height: var(--leading-tight); }
272
+ .ds-steps__text { margin: 0; line-height: var(--leading-normal); }
273
+
274
+ .ds-prose { max-width: 42em; line-height: var(--leading-normal); }
275
+ .ds-prose > * { margin: 0; }
276
+ .ds-prose > * + * { margin-top: var(--space-4); }
277
+ .ds-prose > :is(h2, h3) { margin-top: var(--space-6); line-height: var(--leading-tight); }
278
+ /* Only its own plain children: a component placed inside (like ds-steps) keeps its styles. */
279
+ .ds-prose > h1 { font-size: clamp(var(--text-3xl), 6vw, calc(var(--text-4xl) * 1.5)); line-height: var(--leading-tight); }
280
+ .ds-prose > h2 { font-size: var(--text-2xl); }
281
+ .ds-prose > h3 { font-size: var(--text-lg); }
282
+ .ds-prose > :is(ul, ol):not([class]) { padding-left: 1.25em; }
283
+ .ds-prose a:not([class]) { color: var(--link); }
284
+
249
285
  /* ---------- Dashboard kit ---------- */
250
286
 
251
287
  /* App shell: sidebar + top bar + main. Below 860px the sidebar becomes a drawer opened by .ds-app__toggle (needs @nyt87/ui/menu). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyt87/ui",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
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.2"
52
+ "@nyt87/tokens": ">=0.1.3"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "tsup && cp src/styles.css dist/styles.css",