@donotdev/ui 0.3.4 → 0.3.5

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 (48) hide show
  1. package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
  2. package/dist/components/cookie-consent/CookieConsent.js +1 -1
  3. package/dist/components/layout/components/Breadcrumbs.d.ts +8 -1
  4. package/dist/components/layout/components/Breadcrumbs.d.ts.map +1 -1
  5. package/dist/components/layout/components/Breadcrumbs.js +1 -1
  6. package/dist/crud/components/useRecordBreadcrumb.d.ts +1 -1
  7. package/dist/crud/components/useRecordBreadcrumb.d.ts.map +1 -1
  8. package/dist/dndev.css +591 -99
  9. package/dist/internal/common/DnDevErrorBoundary.d.ts +3 -1
  10. package/dist/internal/common/DnDevErrorBoundary.d.ts.map +1 -1
  11. package/dist/internal/common/DnDevErrorBoundary.js +1 -1
  12. package/dist/internal/devtools/DebugTools.d.ts.map +1 -1
  13. package/dist/internal/devtools/DebugTools.js +1 -1
  14. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  15. package/dist/internal/layout/components/AutoMetaTags.js +1 -1
  16. package/dist/internal/providers/UIProviders.d.ts.map +1 -1
  17. package/dist/internal/providers/UIProviders.js +1 -1
  18. package/dist/routing/AuthGuard.d.ts +3 -0
  19. package/dist/routing/AuthGuard.d.ts.map +1 -1
  20. package/dist/routing/AuthGuard.js +1 -1
  21. package/dist/routing/hooks/hooks.next.d.ts +1 -1
  22. package/dist/routing/hooks/hooks.next.d.ts.map +1 -1
  23. package/dist/routing/hooks/hooks.next.js +1 -1
  24. package/dist/routing/hooks/hooks.vite.d.ts +1 -1
  25. package/dist/routing/hooks/hooks.vite.d.ts.map +1 -1
  26. package/dist/routing/hooks/hooks.vite.js +1 -1
  27. package/dist/routing/hooks/types.d.ts +10 -0
  28. package/dist/routing/hooks/types.d.ts.map +1 -1
  29. package/dist/routing/hooks/useNavigate.next.d.ts +9 -3
  30. package/dist/routing/hooks/useNavigate.next.d.ts.map +1 -1
  31. package/dist/routing/hooks/useNavigate.next.js +1 -1
  32. package/dist/routing/hooks/useNavigate.vite.d.ts +9 -3
  33. package/dist/routing/hooks/useNavigate.vite.d.ts.map +1 -1
  34. package/dist/routing/hooks/useNavigate.vite.js +1 -1
  35. package/dist/routing/index.d.ts +1 -1
  36. package/dist/routing/index.d.ts.map +1 -1
  37. package/dist/routing/index.js +1 -1
  38. package/dist/routing/parentRoute.d.ts +7 -21
  39. package/dist/routing/parentRoute.d.ts.map +1 -1
  40. package/dist/routing/parentRoute.js +1 -1
  41. package/dist/styles/index.css +591 -99
  42. package/dist/symbol-index.json +1 -1
  43. package/guidelines/COMPONENTS.md +1 -1
  44. package/guidelines/LAYOUTS.md +2 -0
  45. package/guidelines/PAGES.md +3 -0
  46. package/guidelines/ROUTING.md +41 -0
  47. package/guidelines/SEO.md +5 -5
  48. package/package.json +5 -5
@@ -472,6 +472,21 @@
472
472
  [data-density]:where(:not(.dndev-layout)) {
473
473
  --font-size-input: max(16px, var(--font-size-base));
474
474
  }
475
+
476
+ /* Section content gutter: --gap-md, --gap-lg from 1024px. Section pads its content with
477
+ it, Floating aligns its controls on it; an app element that must line up with the page
478
+ content (a custom header's logo) reads it too. Declared on nested [data-density] too,
479
+ so it resolves their own gaps. */
480
+ :where(:root),
481
+ [data-density]:where(:not(.dndev-layout)) {
482
+ --section-gutter: var(--gap-md);
483
+ }
484
+ @media (width >= 1024px) {
485
+ :where(:root),
486
+ [data-density]:where(:not(.dndev-layout)) {
487
+ --section-gutter: var(--gap-lg);
488
+ }
489
+ }
475
490
  /* 2. Theme system - color palette definitions */
476
491
  /* packages/components/src/styles/themes.css */
477
492
 
@@ -1401,6 +1416,10 @@ em {
1401
1416
  font-size: var(--font-size-base);
1402
1417
  font-weight: var(--font-weight-medium);
1403
1418
  text-transform: var(--text-transform-button, none);
1419
+ /* A control rendered as <a> (Button `render`): base.css resets the underline only
1420
+ for a:not(.dndev-interactive), so the UA underline would show. Only
1421
+ variant="link" underlines (its own rule below). */
1422
+ text-decoration: none;
1404
1423
  transition:
1405
1424
  background var(--dur-fast) var(--ease-in-out),
1406
1425
  color var(--dur-fast) var(--ease-in-out),
@@ -2297,6 +2316,33 @@ em {
2297
2316
  animation: universal-slide var(--dur-heavy) ease-out forwards;
2298
2317
  }
2299
2318
 
2319
+ /* Step change of a multi-step flow (e.g. the auth EmailSignUpFlow): the entering step
2320
+ fades in, sliding from the end side (forward) or the start side (back), mirrored in
2321
+ RTL. `backwards`: no transform is left once it ends (no containing block for fixed
2322
+ descendants). Reduced motion: no slide (base.css). */
2323
+ .dndev-animate-step-forward,
2324
+ .dndev-animate-step-back {
2325
+ animation: universal-slide var(--dur-normal) var(--ease-in-out) backwards;
2326
+ --transform-end: translateX(0);
2327
+ }
2328
+
2329
+ /* Separate rules: a browser without :dir() drops only the RTL ones. */
2330
+ .dndev-animate-step-forward {
2331
+ --transform-start: translateX(1.5rem);
2332
+ }
2333
+
2334
+ .dndev-animate-step-back {
2335
+ --transform-start: translateX(-1.5rem);
2336
+ }
2337
+
2338
+ .dndev-animate-step-forward:dir(rtl) {
2339
+ --transform-start: translateX(-1.5rem);
2340
+ }
2341
+
2342
+ .dndev-animate-step-back:dir(rtl) {
2343
+ --transform-start: translateX(1.5rem);
2344
+ }
2345
+
2300
2346
  .animation-delay-100 {
2301
2347
  animation-delay: 100ms;
2302
2348
  }
@@ -2375,33 +2421,18 @@ em {
2375
2421
  }
2376
2422
 
2377
2423
  .dndev-accordion-content[data-state='open'] {
2378
- animation: slideDown var(--dur-normal) var(--ease-in-out);
2424
+ /* Fade only (shared fade-in keyframes, animations.css): no height slide, no
2425
+ measured height needed; base.css shortens it under prefers-reduced-motion */
2426
+ animation: fade-in var(--dur-normal) var(--ease-in-out);
2379
2427
  }
2380
2428
 
2429
+ /*
2430
+ * Closed content stays mounted (forceMount: in the server HTML for crawlers)
2431
+ * and is hidden here: display:none = not visible, focusable or announced.
2432
+ * Opening fades in; closing is instant. Same as Tabs inactive panels.
2433
+ */
2381
2434
  .dndev-accordion-content[data-state='closed'] {
2382
- animation: slideUp var(--dur-normal) var(--ease-in-out);
2383
- }
2384
-
2385
- @keyframes slideDown {
2386
- from {
2387
- height: 0;
2388
- opacity: 0;
2389
- }
2390
- to {
2391
- height: var(--radix-collapsible-content-height);
2392
- opacity: 1;
2393
- }
2394
- }
2395
-
2396
- @keyframes slideUp {
2397
- from {
2398
- height: var(--radix-collapsible-content-height);
2399
- opacity: 1;
2400
- }
2401
- to {
2402
- height: 0;
2403
- opacity: 0;
2404
- }
2435
+ display: none;
2405
2436
  }
2406
2437
 
2407
2438
  .dndev-accordion-content-inner {
@@ -2413,6 +2444,68 @@ em {
2413
2444
  word-wrap: break-word;
2414
2445
  }
2415
2446
 
2447
+ /* packages/components/src/atomic/ActionBar/ActionBar.css */
2448
+
2449
+ /* Fixed to the bottom of the viewport (portalled to <body>), over the page. While shown, the
2450
+ component sets its height as --action-bar-height on <html>, and the layout reserves it at
2451
+ the bottom (layout-variables.css, @donotdev/ui), so the end of the page scrolls above it.
2452
+ Hidden: slid below the viewport, and visibility hidden once the slide ends (not focusable,
2453
+ not in the accessibility tree). */
2454
+ .dndev-action-bar {
2455
+ position: fixed;
2456
+ inset-inline: 0;
2457
+ inset-block-end: 0;
2458
+ z-index: var(--z-header);
2459
+ background: var(--background);
2460
+ color: var(--foreground);
2461
+ border-block-start: var(--border-hairline) solid var(--border);
2462
+ padding-block: var(--gap-sm) max(var(--gap-sm), env(safe-area-inset-bottom));
2463
+ padding-inline: max(
2464
+ var(--gap-md),
2465
+ env(safe-area-inset-left),
2466
+ env(safe-area-inset-right)
2467
+ );
2468
+ transform: translateY(100%);
2469
+ visibility: hidden;
2470
+ transition:
2471
+ transform var(--dur-normal) var(--ease-in-out),
2472
+ visibility 0s linear var(--dur-normal);
2473
+ }
2474
+
2475
+ .dndev-action-bar[data-open] {
2476
+ transform: none;
2477
+ visibility: visible;
2478
+ transition:
2479
+ transform var(--dur-normal) var(--ease-in-out),
2480
+ visibility 0s;
2481
+ }
2482
+
2483
+ @media (prefers-reduced-motion: reduce) {
2484
+ .dndev-action-bar,
2485
+ .dndev-action-bar[data-open] {
2486
+ transition: none;
2487
+ }
2488
+ }
2489
+
2490
+ /* hideFrom: same thresholds as Grid / BREAKPOINT_THRESHOLDS */
2491
+ @media (min-width: 768px) {
2492
+ .dndev-action-bar[data-hide-from='tablet'] {
2493
+ display: none;
2494
+ }
2495
+ }
2496
+
2497
+ @media (min-width: 1024px) {
2498
+ .dndev-action-bar[data-hide-from='laptop'] {
2499
+ display: none;
2500
+ }
2501
+ }
2502
+
2503
+ @media (min-width: 1440px) {
2504
+ .dndev-action-bar[data-hide-from='desktop'] {
2505
+ display: none;
2506
+ }
2507
+ }
2508
+
2416
2509
  /* packages/components/src/atomic/Alert/Alert.css */
2417
2510
 
2418
2511
  /**
@@ -2877,11 +2970,73 @@ em {
2877
2970
  pointer-events: none;
2878
2971
  }
2879
2972
 
2973
+ /* Disabled / loading Button (a loading Button is disabled): muted, never faded.
2974
+ Filled variants take the --muted background; ghost, link, outline and destructive
2975
+ (drawn outlined) keep a transparent one. Label and spinner (currentColor, below) take
2976
+ --muted-foreground, readable in every theme since both derive from fg/bg.
2977
+ Scoped to Button (.dndev-button): other .dndev-interactive controls (tabs, toggles,
2978
+ menu items) keep the generic fade of patterns.css. The extra class and the
2979
+ [data-variant] / :hover / accent-surface forms outrank every variant, hover and
2980
+ surface rule of patterns.css whatever the load order: a button disabled under the
2981
+ pointer (the click that starts loading) must not keep its hover colour. */
2982
+ .dndev-interactive.dndev-button:disabled,
2983
+ .dndev-interactive.dndev-button[data-variant]:disabled,
2984
+ .dndev-interactive.dndev-button[data-variant]:disabled:hover,
2985
+ .dndev-surface[data-variant='accent'] .dndev-interactive.dndev-button:disabled,
2986
+ .dndev-floating[data-variant='accent'] .dndev-interactive.dndev-button:disabled {
2987
+ opacity: 1;
2988
+ background: var(--muted);
2989
+ color: var(--muted-foreground);
2990
+ }
2991
+
2992
+ .dndev-interactive.dndev-button:is(
2993
+ [data-variant='ghost'],
2994
+ [data-variant='link'],
2995
+ [data-variant='outline'],
2996
+ [data-variant='destructive']
2997
+ ):disabled,
2998
+ .dndev-interactive.dndev-button:is(
2999
+ [data-variant='ghost'],
3000
+ [data-variant='link'],
3001
+ [data-variant='outline'],
3002
+ [data-variant='destructive']
3003
+ ):disabled:hover,
3004
+ .dndev-surface[data-variant='accent']
3005
+ .dndev-interactive.dndev-button:is(
3006
+ [data-variant='ghost'],
3007
+ [data-variant='link'],
3008
+ [data-variant='outline'],
3009
+ [data-variant='destructive']
3010
+ ):disabled,
3011
+ .dndev-floating[data-variant='accent']
3012
+ .dndev-interactive.dndev-button:is(
3013
+ [data-variant='ghost'],
3014
+ [data-variant='link'],
3015
+ [data-variant='outline'],
3016
+ [data-variant='destructive']
3017
+ ):disabled {
3018
+ background: transparent;
3019
+ color: var(--muted-foreground);
3020
+ }
3021
+
3022
+ /* Outlined variants keep their shape, in the neutral border colour */
3023
+ .dndev-interactive.dndev-button:is([data-variant='outline'], [data-variant='destructive']):disabled {
3024
+ border-color: var(--border);
3025
+ }
3026
+
2880
3027
  /* Button spinner - inherits size from button font-size */
2881
3028
  .dndev-button-spinner {
2882
3029
  flex-shrink: 0;
2883
3030
  }
2884
3031
 
3032
+ /* The spinner replaces the icon and takes the label colour: --muted-foreground while
3033
+ the button is loading (see the disabled rules above).
3034
+ Three classes outrank `.dndev-spinner[data-variant]`. */
3035
+ .dndev-interactive .dndev-spinner.dndev-button-spinner {
3036
+ border-top-color: currentColor;
3037
+ border-inline-end-color: currentColor;
3038
+ }
3039
+
2885
3040
  /* Progress ring for upload percentage */
2886
3041
  .dndev-button-progress {
2887
3042
  display: inline-flex;
@@ -3604,16 +3759,9 @@ em {
3604
3759
  align-items: center;
3605
3760
  max-width: var(--content-width);
3606
3761
  margin-inline: auto;
3607
- /* Padding to match PageContainer behavior */
3608
- padding-inline: var(--gap-md);
3609
- }
3610
-
3611
- @media (width >= 1024px) {
3612
-
3613
- .dndev-cta-content {
3614
- padding-inline: var(--gap-lg);
3762
+ /* The Section content gutter: lines up with the page content */
3763
+ padding-inline: var(--section-gutter);
3615
3764
  }
3616
- }
3617
3765
 
3618
3766
  /* Text alignment */
3619
3767
  .dndev-cta-content[data-text-align='start'] {
@@ -4085,34 +4233,19 @@ em {
4085
4233
  }
4086
4234
 
4087
4235
  .dndev-collapsible-content[data-state='open'] {
4088
- animation: slideDown var(--dur-normal) var(--ease-in-out);
4236
+ /* Fade only (shared fade-in keyframes, animations.css): no height slide, no
4237
+ measured height needed; base.css shortens it under prefers-reduced-motion */
4238
+ animation: fade-in var(--dur-normal) var(--ease-in-out);
4089
4239
  overflow: visible; /* Allow dropdowns/overlays to escape when open */
4090
4240
  }
4091
4241
 
4242
+ /*
4243
+ * Closed content stays mounted (forceMount: in the server HTML for crawlers)
4244
+ * and is hidden here: display:none = not visible, focusable or announced.
4245
+ * Opening fades in; closing is instant. Same as Tabs inactive panels.
4246
+ */
4092
4247
  .dndev-collapsible-content[data-state='closed'] {
4093
- animation: slideUp var(--dur-normal) var(--ease-in-out);
4094
- }
4095
-
4096
- @keyframes slideDown {
4097
- from {
4098
- height: 0;
4099
- opacity: 0;
4100
- }
4101
- to {
4102
- height: var(--radix-collapsible-content-height);
4103
- opacity: 1;
4104
- }
4105
- }
4106
-
4107
- @keyframes slideUp {
4108
- from {
4109
- height: var(--radix-collapsible-content-height);
4110
- opacity: 1;
4111
- }
4112
- to {
4113
- height: 0;
4114
- opacity: 0;
4115
- }
4248
+ display: none;
4116
4249
  }
4117
4250
 
4118
4251
  .dndev-collapsible-trigger {
@@ -5092,6 +5225,79 @@ em {
5092
5225
  cursor: pointer;
5093
5226
  }
5094
5227
 
5228
+ /* packages/components/src/atomic/Floating/Floating.css */
5229
+
5230
+ /* One small control at a corner of the page content area, on the header layer; as wide as
5231
+ its content. --floating-control-gutter is the Section content gutter (--section-gutter:
5232
+ --gap-md, --gap-lg from 1024px). */
5233
+ .dndev-floating-control {
5234
+ --floating-control-gutter: var(--section-gutter);
5235
+ z-index: var(--z-header);
5236
+ }
5237
+
5238
+ /* Top placements: in the page flow (first in the page), sticky. At rest: --gap-md, the
5239
+ control, --gap-md, then the page content (a ghost Section right after it drops its own
5240
+ top padding: Section.css). While scrolling: --gap-md below the top of the scroll
5241
+ container (the layout <main>, under the header). Inline: the Section gutter, at the start
5242
+ or end of the content area; fit-content so it never stretches (block or flex parent). */
5243
+ .dndev-floating-control[data-placement^='top'] {
5244
+ --floating-control-inline-offset: var(--floating-control-gutter);
5245
+ position: sticky;
5246
+ inset-block-start: var(--gap-md);
5247
+ inline-size: -moz-fit-content;
5248
+ inline-size: fit-content;
5249
+ margin-block: var(--gap-md);
5250
+ }
5251
+
5252
+ /* PageContainer already pads its content --gap-md inline: add only the rest of the gutter
5253
+ (0 below 1024px), so the control lines up with the Sections' content edge. */
5254
+ .dndev-container > .dndev-floating-control[data-placement^='top'] {
5255
+ --floating-control-inline-offset: calc(
5256
+ var(--floating-control-gutter) - var(--gap-md)
5257
+ );
5258
+ }
5259
+
5260
+ .dndev-floating-control[data-placement='top-start'] {
5261
+ margin-inline: var(--floating-control-inline-offset) auto;
5262
+ }
5263
+
5264
+ .dndev-floating-control[data-placement='top-end'] {
5265
+ margin-inline: auto var(--floating-control-inline-offset);
5266
+ }
5267
+
5268
+ /* Bottom placements: fixed (portalled to <body>), over the page, taking no space. The
5269
+ offsets read the layout tokens declared on <html> (@donotdev/ui layout-variables.css),
5270
+ with fallbacks for a page outside DnDevLayout:
5271
+ - block: --gap-md above the shown ActionBar (--action-bar-height, its safe-area padding
5272
+ included) or above the bottom safe area, whichever is taller;
5273
+ - inline: the Section gutter, after the sidebar on the start side (--sidebar-width),
5274
+ never inside the side safe areas. */
5275
+ .dndev-floating-control[data-placement^='bottom'] {
5276
+ --floating-control-fixed-gutter: max(
5277
+ var(--floating-control-gutter),
5278
+ env(safe-area-inset-left, 0px),
5279
+ env(safe-area-inset-right, 0px)
5280
+ );
5281
+ position: fixed;
5282
+ inset-block-end: calc(
5283
+ var(--gap-md) +
5284
+ max(var(--action-bar-height, 0px), env(safe-area-inset-bottom, 0px))
5285
+ );
5286
+ max-inline-size: calc(
5287
+ 100% - var(--sidebar-width, 0px) - 2 * var(--floating-control-fixed-gutter)
5288
+ );
5289
+ }
5290
+
5291
+ .dndev-floating-control[data-placement='bottom-start'] {
5292
+ inset-inline-start: calc(
5293
+ var(--sidebar-width, 0px) + var(--floating-control-fixed-gutter)
5294
+ );
5295
+ }
5296
+
5297
+ .dndev-floating-control[data-placement='bottom-end'] {
5298
+ inset-inline-end: var(--floating-control-fixed-gutter);
5299
+ }
5300
+
5095
5301
  /* packages/components/src/atomic/Grid/Grid.css */
5096
5302
 
5097
5303
  .dndev-grid-component {
@@ -5255,19 +5461,9 @@ em {
5255
5461
  /* Content constraint + centered */
5256
5462
  max-width: var(--content-width);
5257
5463
  margin-inline: auto;
5258
- /* Padding with hero background - responsive to match PageContainer */
5259
- padding-inline: var(--gap-md);
5464
+ /* Padding with hero background; inline: the Section content gutter (lines up with the page content) */
5465
+ padding-inline: var(--section-gutter);
5260
5466
  padding-block: var(--gap-lg);
5261
- }
5262
-
5263
- @media (width >= 1024px) {
5264
-
5265
- .dndev-hero-section {
5266
- padding-inline: var(--gap-lg);
5267
- }
5268
- }
5269
-
5270
- .dndev-hero-section {
5271
5467
 
5272
5468
  display: flex;
5273
5469
  flex-direction: column;
@@ -5553,10 +5749,46 @@ em {
5553
5749
  /* packages/components/src/advanced/ImageGallery/ImageGallery.css */
5554
5750
 
5555
5751
  .image-gallery {
5752
+ /* Height one thumbnail row takes (the strip never wraps: the bound below is exact). */
5753
+ --image-gallery-thumbnail-block: 60px;
5754
+ /* Viewport height the gallery may fill: below the app header, minus the page spacing
5755
+ above and below it. Bounded like the other framework media (VideoPlayer, Crawl). */
5756
+ --image-gallery-viewport: calc(
5757
+ 100vh - var(--header-height, 0px) - 2 * var(--gap-lg)
5758
+ );
5556
5759
  display: flex;
5557
5760
  flex-direction: column;
5558
5761
  gap: var(--gap-md);
5559
5762
  outline: none;
5763
+ /* Never taller than the viewport: at its ratio (--image-gallery-ratio, the
5764
+ aspectRatio prop) the gallery narrows and centres instead of growing taller. */
5765
+ inline-size: 100%;
5766
+ /* A grid / flex item would otherwise grow to the thumbnail row's full length */
5767
+ min-inline-size: 0;
5768
+ max-inline-size: calc(
5769
+ var(--image-gallery-viewport) * (var(--image-gallery-ratio))
5770
+ );
5771
+ margin-inline: auto;
5772
+ }
5773
+
5774
+ /* svh: the small viewport (mobile browser bars shown), so the bound never jumps on scroll */
5775
+ @supports (height: 100svh) {
5776
+ .image-gallery {
5777
+ --image-gallery-viewport: calc(
5778
+ 100svh - var(--header-height, 0px) - 2 * var(--gap-lg)
5779
+ );
5780
+ }
5781
+ }
5782
+
5783
+ /* With thumbnails: the main image gives up one thumbnail row and the gap above it */
5784
+ .image-gallery--thumbnails {
5785
+ max-inline-size: calc(
5786
+ (
5787
+ var(--image-gallery-viewport) - var(--image-gallery-thumbnail-block) -
5788
+ var(--gap-md)
5789
+ ) *
5790
+ (var(--image-gallery-ratio))
5791
+ );
5560
5792
  }
5561
5793
 
5562
5794
  /* Gallery pictures are always protected (with blockContextMenu + draggable=false):
@@ -5594,6 +5826,7 @@ em {
5594
5826
  .image-gallery__main {
5595
5827
  position: relative;
5596
5828
  width: 100%;
5829
+ aspect-ratio: var(--image-gallery-ratio);
5597
5830
  overflow: hidden;
5598
5831
  border-radius: var(--radius-surface);
5599
5832
  }
@@ -5621,7 +5854,8 @@ em {
5621
5854
 
5622
5855
  /* Arrow / thumbnail / key navigation glides to a neighbour (never a touch swipe) */
5623
5856
  @media (prefers-reduced-motion: no-preference) {
5624
- .image-gallery__strip {
5857
+ .image-gallery__strip,
5858
+ .image-gallery__thumbnails {
5625
5859
  scroll-behavior: smooth;
5626
5860
  }
5627
5861
  }
@@ -5703,17 +5937,25 @@ em {
5703
5937
  inset-inline-end: var(--gap-md);
5704
5938
  }
5705
5939
 
5706
- /* Thumbnails */
5940
+ /* Thumbnails: one row, native horizontal scroll when it overflows (swipe, trackpad);
5941
+ the selected thumbnail is scrolled into view (revealInStrip). */
5707
5942
  .image-gallery__thumbnails {
5708
5943
  display: flex;
5709
- flex-wrap: wrap;
5710
5944
  gap: var(--gap-sm);
5945
+ overflow-x: auto;
5946
+ overflow-y: hidden;
5947
+ overscroll-behavior-x: contain;
5948
+ scrollbar-width: none;
5949
+ }
5950
+
5951
+ .image-gallery__thumbnails::-webkit-scrollbar {
5952
+ display: none;
5711
5953
  }
5712
5954
 
5713
5955
  .image-gallery__thumbnail {
5714
5956
  flex: 0 0 auto;
5715
- width: 80px;
5716
- height: 60px;
5957
+ width: calc(var(--image-gallery-thumbnail-block) * 4 / 3);
5958
+ height: var(--image-gallery-thumbnail-block);
5717
5959
  padding: 0;
5718
5960
  border: 2px solid transparent;
5719
5961
  border-radius: var(--radius-surface);
@@ -5729,9 +5971,10 @@ em {
5729
5971
  border-color: var(--muted-foreground);
5730
5972
  }
5731
5973
 
5974
+ /* Inset: the scrolling row clips anything drawn outside a thumbnail */
5732
5975
  .image-gallery__thumbnail:focus-visible {
5733
5976
  outline: 2px solid var(--primary);
5734
- outline-offset: 2px;
5977
+ outline-offset: -2px;
5735
5978
  }
5736
5979
 
5737
5980
  .image-gallery__thumbnail--selected {
@@ -5774,9 +6017,8 @@ em {
5774
6017
 
5775
6018
  /* Responsive adjustments */
5776
6019
  @media (max-width: 640px) {
5777
- .image-gallery__thumbnail {
5778
- width: 60px;
5779
- height: 45px;
6020
+ .image-gallery {
6021
+ --image-gallery-thumbnail-block: 45px;
5780
6022
  }
5781
6023
 
5782
6024
  .image-gallery__nav {
@@ -6258,8 +6500,11 @@ input[type='number'] {
6258
6500
  color: var(--muted-foreground);
6259
6501
  }
6260
6502
 
6261
- /* Help (i) after the label: the label truncates, the button never does */
6503
+ /* Help (i) after the label: the label truncates, the button never does. Overflow stays
6504
+ visible so the button's hit area (negative margin) is not clipped by the legend; the
6505
+ label child does the truncation. */
6262
6506
  .dndev-floating-legend[data-info] {
6507
+ overflow: visible;
6263
6508
  display: flex;
6264
6509
  align-items: center;
6265
6510
  gap: calc(var(--gap-sm) / 2);
@@ -6277,7 +6522,13 @@ input[type='number'] {
6277
6522
  flex-shrink: 0;
6278
6523
  align-items: center;
6279
6524
  justify-content: center;
6280
- /* Larger hit area than the icon, without growing the legend */
6525
+ /* Larger hit area than the icon, without growing the legend. The area spills past the
6526
+ legend onto its neighbours (the block above, the field's input): its own layer keeps
6527
+ it on top, so the whole area stays clickable (WCAG 2.5.8, 24×24 px minimum). */
6528
+ position: relative;
6529
+ z-index: 1;
6530
+ min-inline-size: 24px;
6531
+ min-block-size: 24px;
6281
6532
  padding: calc(var(--gap-sm) / 2);
6282
6533
  margin: calc(var(--gap-sm) / -2);
6283
6534
  border: none;
@@ -6344,14 +6595,45 @@ input[type='number'] {
6344
6595
  gap: var(--gap-lg);
6345
6596
  }
6346
6597
 
6347
- /* Modern ::marker approach - only when list-style is not 'none' */
6598
+ /* Numbers: items are flex (icon alignment) and a flex item gets no ::marker,
6599
+ so an ordered list draws its numbers with a counter (BUGS #31). */
6348
6600
 
6349
- .dndev-list[data-ordered='true'] {
6601
+ .dndev-list[data-ordered='true']:not([data-marker='none']) {
6350
6602
  list-style-type: decimal;
6603
+ counter-reset: dndev-list-item;
6351
6604
  }
6352
6605
 
6353
- .dndev-list:not([data-ordered='true']):not([style*='list-style: none']) {
6606
+ .dndev-list[data-ordered='true']:not([data-marker='none']) > .dndev-list-item {
6607
+ counter-increment: dndev-list-item;
6608
+ }
6609
+
6610
+ :is(.dndev-list[data-ordered='true']:not([data-marker='none']) > .dndev-list-item)::before {
6611
+ content: counter(dndev-list-item) '.';
6612
+ flex-shrink: 0;
6613
+ min-inline-size: 2ch;
6614
+ text-align: end;
6615
+ font-variant-numeric: tabular-nums;
6616
+ }
6617
+
6618
+ .dndev-list:not([data-ordered='true']):not([data-marker='none']):not([style*='list-style: none']) {
6354
6619
  list-style-type: disc;
6620
+
6621
+ /* Bullets: same reason as the numbers, an icon-less item (data-plain) draws
6622
+ its own bullet; items with an icon keep the icon as their marker (BUGS #31). */
6623
+ }
6624
+
6625
+ .dndev-list:not([data-ordered='true']):not([data-marker='none']):not([style*='list-style: none']) > .dndev-list-item[data-plain='true']::before {
6626
+ content: '\2022';
6627
+ flex-shrink: 0;
6628
+ min-inline-size: 1ch;
6629
+ text-align: end;
6630
+ }
6631
+
6632
+ /* marker="none": the two rules above are excluded by their :not(), so no counter,
6633
+ bullet or native marker is drawn; items keep their flex alignment and gap. */
6634
+
6635
+ .dndev-list[data-marker='none'] {
6636
+ list-style-type: none;
6355
6637
  }
6356
6638
 
6357
6639
  /* Density variants */
@@ -7394,15 +7676,61 @@ input[type='number'] {
7394
7676
  margin-inline: auto;
7395
7677
  min-width: 0; /* Allow shrinking so max-width wins when content would force wider */
7396
7678
  /* Padding with section background - responsive to match PageContainer */
7397
- padding-inline: var(--gap-md);
7679
+ padding-inline: var(--section-gutter);
7398
7680
  padding-top: var(--gap-lg);
7399
7681
  padding-bottom: var(--gap-lg);
7400
7682
  }
7401
- @media (width >= 1024px) {
7402
- .dndev-section-content {
7403
- padding-inline: var(--gap-lg);
7683
+
7684
+ /*
7685
+ * Nested Section (inside another Section's content): flush. The outer Section
7686
+ * already owns the page band (width, centring, side padding, block padding), so
7687
+ * the inner one takes its container's edge and width; spacing to siblings comes
7688
+ * from the parent layout (Stack / Grid gap). A nested Section with a tone
7689
+ * (base, muted, ...) keeps its padding: its background would otherwise sit on
7690
+ * the text edge. No :has() (Safari 14.1): the default tone is data-tone='ghost'.
7691
+ */
7692
+ .dndev-section-content .dndev-section-full-width {
7693
+ width: 100%;
7694
+ margin-inline: 0;
7695
+ }
7696
+
7697
+ .dndev-section-content
7698
+ .dndev-section-full-width[data-tone='ghost']
7699
+ > .dndev-section-content {
7700
+ max-width: none;
7701
+ margin-inline: 0;
7702
+ padding-inline: 0;
7703
+ padding-block: 0;
7704
+ }
7705
+
7706
+ /*
7707
+ * Consecutive Sections share one gap. Each page Section pads its content
7708
+ * `--gap-lg` top and bottom, so two in a row were 2 x `--gap-lg` apart. A
7709
+ * ghost Section that directly follows a ghost Section drops its top padding:
7710
+ * the previous one's bottom padding is the only gap. A toned Section (a
7711
+ * background band) on either side of the pair keeps its padding: the band edge
7712
+ * must not touch text. Nested ghost Sections are already flush (above). No
7713
+ * :has() (Safari 14.1): the rule keys on the following Section, and the default
7714
+ * tone is data-tone='ghost'.
7715
+ */
7716
+ .dndev-section-full-width[data-tone='ghost']
7717
+ + .dndev-section-full-width[data-tone='ghost']
7718
+ > .dndev-section-content {
7719
+ padding-top: 0;
7720
+ }
7721
+
7722
+ /*
7723
+ * A ghost Section right after a top Floating (back link, first in the page)
7724
+ * drops its top padding: the Floating's own --gap-md bottom margin is the only
7725
+ * gap, so the control sits --gap-md from the header and --gap-md from the
7726
+ * Section's first line, at every width. A toned Section keeps its padding (its
7727
+ * band starts --gap-md below the control). No :has() (Safari 14.1).
7728
+ */
7729
+ .dndev-floating-control[data-placement^='top']
7730
+ + .dndev-section-full-width[data-tone='ghost']
7731
+ > .dndev-section-content {
7732
+ padding-top: 0;
7404
7733
  }
7405
- }
7406
7734
 
7407
7735
  /* Content width constraints — background stays full, only inner content narrows */
7408
7736
  .dndev-section-content[data-content-width='standard'] {
@@ -7483,16 +7811,23 @@ input[type='number'] {
7483
7811
  text-align: end;
7484
7812
  }
7485
7813
 
7486
- /* Collapsible title trigger */
7814
+ /*
7815
+ * Collapsible title: heading > <button> trigger. The heading keeps the title
7816
+ * styles and spacing; the button strips UA chrome and inherits them.
7817
+ */
7487
7818
  .dndev-section-title-trigger {
7488
7819
  width: 100%;
7489
7820
  cursor: pointer;
7490
7821
  transition: opacity var(--dur-fast) var(--ease-in-out);
7491
- margin-block-end: var(--gap-md);
7492
- }
7493
-
7494
- .dndev-section-title-trigger .dndev-section-title {
7495
- margin-block-end: 0;
7822
+ margin: 0;
7823
+ padding: 0;
7824
+ border: none;
7825
+ background: none;
7826
+ font: inherit;
7827
+ color: inherit;
7828
+ letter-spacing: inherit;
7829
+ text-transform: inherit;
7830
+ text-align: inherit;
7496
7831
  }
7497
7832
 
7498
7833
  .dndev-section-title-trigger:hover {
@@ -7527,6 +7862,44 @@ input[type='number'] {
7527
7862
  justify-content: flex-end;
7528
7863
  }
7529
7864
 
7865
+ /*
7866
+ * Title row with actions (only rendered when `actions` is set): heading at the
7867
+ * start, actions at the end, centred on the heading. `space-between` puts a
7868
+ * lone item (actions wrapped under the heading) at the start; with no heading
7869
+ * the actions are the only child and go to the end. The heading keeps its
7870
+ * styles; the row owns the block spacing below.
7871
+ */
7872
+ .dndev-section-header {
7873
+ display: flex;
7874
+ flex-wrap: wrap;
7875
+ align-items: center;
7876
+ justify-content: space-between;
7877
+ gap: var(--gap-sm) var(--gap-md);
7878
+ margin-block-end: var(--gap-md);
7879
+ }
7880
+
7881
+ .dndev-section-header > .dndev-section-title {
7882
+ margin-block-end: 0;
7883
+ min-width: 0;
7884
+ }
7885
+
7886
+ /* Collapsible: the trigger spans the heading, which takes the free space */
7887
+ .dndev-section-header[data-collapsible] > .dndev-section-title {
7888
+ flex: 1 1 auto;
7889
+ }
7890
+
7891
+ .dndev-section-actions {
7892
+ display: flex;
7893
+ flex-wrap: wrap;
7894
+ align-items: center;
7895
+ gap: var(--gap-sm);
7896
+ min-width: 0;
7897
+ }
7898
+
7899
+ .dndev-section-actions:only-child {
7900
+ margin-inline-start: auto;
7901
+ }
7902
+
7530
7903
  /* packages/components/src/atomic/Separator/Separator.css */
7531
7904
 
7532
7905
  .dndev-separator {
@@ -9253,9 +9626,11 @@ input[type='number'] {
9253
9626
  display: none;
9254
9627
  }
9255
9628
 
9256
- /* Collapsed: one square + at the inline end. Expanded: [ − qty + ].
9629
+ /* Collapsed: one square + at the inline end (or, with `addLabel`, one "+ label" button
9630
+ over the expanded footprint). Expanded: [ − qty + ].
9257
9631
  Rows are fixed in both states (no vertical shift); only the inline size animates,
9258
- growing from the inline end toward the inline start. */
9632
+ growing from the inline end toward the inline start (labelled: nothing resizes, the
9633
+ content crossfades). */
9259
9634
  .dndev-quantity-stepper {
9260
9635
  --quantity-target: var(--touch-target);
9261
9636
  /* The cell IS the touch target: padding and icons fit inside it. State-independent,
@@ -9316,6 +9691,11 @@ input[type='number'] {
9316
9691
  cursor: not-allowed;
9317
9692
  opacity: 0.6;
9318
9693
  }
9694
+ /* Typed quantity: same input size token as every framework input (no iOS focus zoom).
9695
+ The cell is fixed (--quantity-cell), so the font-size change shifts nothing. */
9696
+ .dndev-quantity-stepper > input {
9697
+ font-size: var(--font-size-input);
9698
+ }
9319
9699
  .dndev-quantity-stepper > button {
9320
9700
  display: flex;
9321
9701
  align-items: center;
@@ -9389,6 +9769,64 @@ input[type='number'] {
9389
9769
  .dndev-quantity-stepper[data-vertical][data-collapsed] > .dndev-quantity-stepper-increment {
9390
9770
  grid-area: 1 / 1 / -1 / -1;
9391
9771
  }
9772
+ /* Labelled add (`addLabel`, never vertical): collapsed, one "+ label" button over the
9773
+ expanded footprint, so nothing changes size. Expanding crossfades the label out and
9774
+ − / quantity / the + icon in (opacity only); the + snaps back to its cell underneath. */
9775
+ .dndev-quantity-stepper[data-add-label] {
9776
+ position: relative;
9777
+ }
9778
+ .dndev-quantity-stepper[data-add-label] > .dndev-quantity-stepper-increment > svg {
9779
+ transition: opacity var(--dur-normal) var(--ease-in-out);
9780
+ }
9781
+ .dndev-quantity-stepper[data-add-label][data-collapsed] {
9782
+ inline-size: var(--quantity-expanded);
9783
+ min-inline-size: var(--quantity-expanded);
9784
+ }
9785
+ .dndev-quantity-stepper[data-add-label][data-collapsed][data-full-width] {
9786
+ inline-size: 100%;
9787
+ }
9788
+ .dndev-quantity-stepper[data-add-label][data-collapsed] > .dndev-quantity-stepper-increment {
9789
+ grid-area: 1 / 1 / -1 / -1;
9790
+ }
9791
+ :is(.dndev-quantity-stepper[data-add-label][data-collapsed] > .dndev-quantity-stepper-increment) > svg {
9792
+ opacity: 0;
9793
+ }
9794
+ :is(.dndev-quantity-stepper[data-add-label][data-collapsed] > .dndev-quantity-stepper-increment) > .dndev-quantity-stepper-add {
9795
+ visibility: visible;
9796
+ opacity: 1;
9797
+ }
9798
+
9799
+ /* The label of a labelled add, laid over the whole group (not the + cell) so it can fade out
9800
+ while the + returns to its cell. Decorative: the + keeps `incrementLabel` as its name. */
9801
+ .dndev-quantity-stepper-add {
9802
+ position: absolute;
9803
+ inset: 0;
9804
+ display: flex;
9805
+ align-items: center;
9806
+ justify-content: center;
9807
+ gap: var(--gap-sm);
9808
+ padding-inline: var(--gap-sm);
9809
+ font-weight: var(--font-weight-medium);
9810
+ white-space: nowrap;
9811
+ pointer-events: none;
9812
+ visibility: hidden;
9813
+ opacity: 0;
9814
+ /* Out faster than − / quantity come in, so the two never read as one jumble. */
9815
+ transition:
9816
+ opacity var(--dur-fast) var(--ease-in-out),
9817
+ visibility var(--dur-fast) var(--ease-in-out);
9818
+ }
9819
+ .dndev-quantity-stepper-add > svg {
9820
+ flex-shrink: 0;
9821
+ inline-size: var(--icon-md);
9822
+ block-size: var(--icon-md);
9823
+ }
9824
+
9825
+ .dndev-quantity-stepper-add-text {
9826
+ min-inline-size: 0;
9827
+ overflow: hidden;
9828
+ text-overflow: ellipsis;
9829
+ }
9392
9830
 
9393
9831
  .dndev-quantity-stepper-value {
9394
9832
  box-sizing: border-box;
@@ -9411,7 +9849,9 @@ input[type='number'] {
9411
9849
  .dndev-quantity-stepper,
9412
9850
  .dndev-quantity-stepper > button,
9413
9851
  .dndev-quantity-stepper > .dndev-quantity-stepper-decrement,
9414
- .dndev-quantity-stepper > .dndev-quantity-stepper-value {
9852
+ .dndev-quantity-stepper > .dndev-quantity-stepper-value,
9853
+ .dndev-quantity-stepper > .dndev-quantity-stepper-increment > svg,
9854
+ .dndev-quantity-stepper-add {
9415
9855
  transition: none;
9416
9856
  }
9417
9857
  }
@@ -9558,6 +9998,21 @@ input[type='number'] {
9558
9998
  font-style: italic;
9559
9999
  }
9560
10000
 
10001
+ .dndev-text-base:is(s) {
10002
+ text-decoration-line: line-through;
10003
+ }
10004
+
10005
+ /* A link in running text must be told apart by more than colour (WCAG 1.4.1).
10006
+ base.css strips the underline from every anchor; framework controls
10007
+ (.dndev-interactive) keep their own look. Same values as Button variant="link".
10008
+ Text levels only (body / small / caption; no data-level = body): a link in a
10009
+ heading (h1-h6, e.g. a card title) is a title, not running text. */
10010
+
10011
+ .dndev-text-base:not([data-level^='h']) a:not(.dndev-interactive) {
10012
+ text-decoration: underline;
10013
+ text-underline-offset: 2px;
10014
+ }
10015
+
9561
10016
  .dndev-text-base[data-variant='default'] {
9562
10017
  color: inherit;
9563
10018
  }
@@ -9654,6 +10109,15 @@ input[type='number'] {
9654
10109
  font-size: var(--font-size-sm);
9655
10110
  }
9656
10111
 
10112
+ /* A heading element set at a text level (`<Text as="h2" level="body">`) is text in
10113
+ every respect, not only size: drop base.css's headline font and heading case/tracking. */
10114
+
10115
+ .dndev-text-base:is(h1,h2,h3,h4,h5,h6):is([data-level='body'],[data-level='small'],[data-level='caption']) {
10116
+ font-family: var(--font-family, var(--font-sans));
10117
+ text-transform: none;
10118
+ letter-spacing: normal;
10119
+ }
10120
+
9657
10121
  /* Font weight overrides (after level rules, so weight prop overrides level defaults) */
9658
10122
 
9659
10123
  .dndev-text-base[data-font-weight='normal'] {
@@ -9676,6 +10140,20 @@ input[type='number'] {
9676
10140
  font-style: italic;
9677
10141
  }
9678
10142
 
10143
+ .dndev-text-base[data-underline] {
10144
+ text-decoration-line: underline;
10145
+ }
10146
+
10147
+ /* lines: clamp to N lines (--text-lines, set by the component) */
10148
+
10149
+ .dndev-text-base[data-lines] {
10150
+ display: -webkit-box;
10151
+ -webkit-box-orient: vertical;
10152
+ -webkit-line-clamp: var(--text-lines);
10153
+ line-clamp: var(--text-lines);
10154
+ overflow: hidden;
10155
+ }
10156
+
9679
10157
  /* packages/components/src/atomic/Toaster/Toaster.css */
9680
10158
 
9681
10159
  .dndev-toast-viewport {
@@ -13216,6 +13694,14 @@ footer[role='contentinfo']:not([data-custom]) a:not(.dndev-interactive):hover {
13216
13694
  }
13217
13695
  }
13218
13696
 
13697
+ /* ActionBar (@donotdev/components): while shown, it sets its height as --action-bar-height on
13698
+ <html> (absent while hidden). The layout reserves it at the bottom, like the bottom
13699
+ mergedBar, so the end of main and a footer (inside main or in its grid row) sit above the
13700
+ bar. The grid shrinks from the bottom: content above the reading position does not move. */
13701
+ .dndev-layout {
13702
+ padding-block-end: var(--action-bar-height, 0px);
13703
+ }
13704
+
13219
13705
  /* Desktop (>=1024px): Always hide merged-bar */
13220
13706
  @media (width >=1024px) {
13221
13707
  .merged-bar {
@@ -13398,17 +13884,23 @@ footer[role='contentinfo']:not([data-custom]) a:not(.dndev-interactive):hover {
13398
13884
  display: none;
13399
13885
  }
13400
13886
 
13401
- /* Breadcrumbs navigation */
13887
+ /* Breadcrumbs navigation. Wraps instead of overflowing (long record names on a phone);
13888
+ flush with the content edge, so a trail placed in page content lines up with it. */
13402
13889
  .breadcrumbs {
13403
13890
  display: flex;
13891
+ flex-wrap: wrap;
13404
13892
  align-items: center;
13405
13893
  gap: var(--gap-sm);
13406
- padding-inline-start: var(--gap-sm);
13407
13894
  font-size: var(--font-size-base);
13408
13895
  min-height: 32px;
13409
13896
  color: var(--muted-foreground);
13410
13897
  }
13411
13898
 
13899
+ /* The layout's breadcrumb bar insets the trail from the bar's edge */
13900
+ .breadcrumbs-container .breadcrumbs {
13901
+ padding-inline-start: var(--gap-sm);
13902
+ }
13903
+
13412
13904
  .breadcrumb-item {
13413
13905
  display: inline-flex;
13414
13906
  align-items: center;