@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
package/dist/dndev.css CHANGED
@@ -476,6 +476,21 @@
476
476
  [data-density]:where(:not(.dndev-layout)) {
477
477
  --font-size-input: max(16px, var(--font-size-base));
478
478
  }
479
+
480
+ /* Section content gutter: --gap-md, --gap-lg from 1024px. Section pads its content with
481
+ it, Floating aligns its controls on it; an app element that must line up with the page
482
+ content (a custom header's logo) reads it too. Declared on nested [data-density] too,
483
+ so it resolves their own gaps. */
484
+ :where(:root),
485
+ [data-density]:where(:not(.dndev-layout)) {
486
+ --section-gutter: var(--gap-md);
487
+ }
488
+ @media (width >= 1024px) {
489
+ :where(:root),
490
+ [data-density]:where(:not(.dndev-layout)) {
491
+ --section-gutter: var(--gap-lg);
492
+ }
493
+ }
479
494
  /* 2. Theme system - color palette definitions */
480
495
  /* packages/components/src/styles/themes.css */
481
496
 
@@ -1405,6 +1420,10 @@ em {
1405
1420
  font-size: var(--font-size-base);
1406
1421
  font-weight: var(--font-weight-medium);
1407
1422
  text-transform: var(--text-transform-button, none);
1423
+ /* A control rendered as <a> (Button `render`): base.css resets the underline only
1424
+ for a:not(.dndev-interactive), so the UA underline would show. Only
1425
+ variant="link" underlines (its own rule below). */
1426
+ text-decoration: none;
1408
1427
  transition:
1409
1428
  background var(--dur-fast) var(--ease-in-out),
1410
1429
  color var(--dur-fast) var(--ease-in-out),
@@ -2301,6 +2320,33 @@ em {
2301
2320
  animation: universal-slide var(--dur-heavy) ease-out forwards;
2302
2321
  }
2303
2322
 
2323
+ /* Step change of a multi-step flow (e.g. the auth EmailSignUpFlow): the entering step
2324
+ fades in, sliding from the end side (forward) or the start side (back), mirrored in
2325
+ RTL. `backwards`: no transform is left once it ends (no containing block for fixed
2326
+ descendants). Reduced motion: no slide (base.css). */
2327
+ .dndev-animate-step-forward,
2328
+ .dndev-animate-step-back {
2329
+ animation: universal-slide var(--dur-normal) var(--ease-in-out) backwards;
2330
+ --transform-end: translateX(0);
2331
+ }
2332
+
2333
+ /* Separate rules: a browser without :dir() drops only the RTL ones. */
2334
+ .dndev-animate-step-forward {
2335
+ --transform-start: translateX(1.5rem);
2336
+ }
2337
+
2338
+ .dndev-animate-step-back {
2339
+ --transform-start: translateX(-1.5rem);
2340
+ }
2341
+
2342
+ .dndev-animate-step-forward:dir(rtl) {
2343
+ --transform-start: translateX(-1.5rem);
2344
+ }
2345
+
2346
+ .dndev-animate-step-back:dir(rtl) {
2347
+ --transform-start: translateX(1.5rem);
2348
+ }
2349
+
2304
2350
  .animation-delay-100 {
2305
2351
  animation-delay: 100ms;
2306
2352
  }
@@ -2379,33 +2425,18 @@ em {
2379
2425
  }
2380
2426
 
2381
2427
  .dndev-accordion-content[data-state='open'] {
2382
- animation: slideDown var(--dur-normal) var(--ease-in-out);
2428
+ /* Fade only (shared fade-in keyframes, animations.css): no height slide, no
2429
+ measured height needed; base.css shortens it under prefers-reduced-motion */
2430
+ animation: fade-in var(--dur-normal) var(--ease-in-out);
2383
2431
  }
2384
2432
 
2433
+ /*
2434
+ * Closed content stays mounted (forceMount: in the server HTML for crawlers)
2435
+ * and is hidden here: display:none = not visible, focusable or announced.
2436
+ * Opening fades in; closing is instant. Same as Tabs inactive panels.
2437
+ */
2385
2438
  .dndev-accordion-content[data-state='closed'] {
2386
- animation: slideUp var(--dur-normal) var(--ease-in-out);
2387
- }
2388
-
2389
- @keyframes slideDown {
2390
- from {
2391
- height: 0;
2392
- opacity: 0;
2393
- }
2394
- to {
2395
- height: var(--radix-collapsible-content-height);
2396
- opacity: 1;
2397
- }
2398
- }
2399
-
2400
- @keyframes slideUp {
2401
- from {
2402
- height: var(--radix-collapsible-content-height);
2403
- opacity: 1;
2404
- }
2405
- to {
2406
- height: 0;
2407
- opacity: 0;
2408
- }
2439
+ display: none;
2409
2440
  }
2410
2441
 
2411
2442
  .dndev-accordion-content-inner {
@@ -2417,6 +2448,68 @@ em {
2417
2448
  word-wrap: break-word;
2418
2449
  }
2419
2450
 
2451
+ /* packages/components/src/atomic/ActionBar/ActionBar.css */
2452
+
2453
+ /* Fixed to the bottom of the viewport (portalled to <body>), over the page. While shown, the
2454
+ component sets its height as --action-bar-height on <html>, and the layout reserves it at
2455
+ the bottom (layout-variables.css, @donotdev/ui), so the end of the page scrolls above it.
2456
+ Hidden: slid below the viewport, and visibility hidden once the slide ends (not focusable,
2457
+ not in the accessibility tree). */
2458
+ .dndev-action-bar {
2459
+ position: fixed;
2460
+ inset-inline: 0;
2461
+ inset-block-end: 0;
2462
+ z-index: var(--z-header);
2463
+ background: var(--background);
2464
+ color: var(--foreground);
2465
+ border-block-start: var(--border-hairline) solid var(--border);
2466
+ padding-block: var(--gap-sm) max(var(--gap-sm), env(safe-area-inset-bottom));
2467
+ padding-inline: max(
2468
+ var(--gap-md),
2469
+ env(safe-area-inset-left),
2470
+ env(safe-area-inset-right)
2471
+ );
2472
+ transform: translateY(100%);
2473
+ visibility: hidden;
2474
+ transition:
2475
+ transform var(--dur-normal) var(--ease-in-out),
2476
+ visibility 0s linear var(--dur-normal);
2477
+ }
2478
+
2479
+ .dndev-action-bar[data-open] {
2480
+ transform: none;
2481
+ visibility: visible;
2482
+ transition:
2483
+ transform var(--dur-normal) var(--ease-in-out),
2484
+ visibility 0s;
2485
+ }
2486
+
2487
+ @media (prefers-reduced-motion: reduce) {
2488
+ .dndev-action-bar,
2489
+ .dndev-action-bar[data-open] {
2490
+ transition: none;
2491
+ }
2492
+ }
2493
+
2494
+ /* hideFrom: same thresholds as Grid / BREAKPOINT_THRESHOLDS */
2495
+ @media (min-width: 768px) {
2496
+ .dndev-action-bar[data-hide-from='tablet'] {
2497
+ display: none;
2498
+ }
2499
+ }
2500
+
2501
+ @media (min-width: 1024px) {
2502
+ .dndev-action-bar[data-hide-from='laptop'] {
2503
+ display: none;
2504
+ }
2505
+ }
2506
+
2507
+ @media (min-width: 1440px) {
2508
+ .dndev-action-bar[data-hide-from='desktop'] {
2509
+ display: none;
2510
+ }
2511
+ }
2512
+
2420
2513
  /* packages/components/src/atomic/Alert/Alert.css */
2421
2514
 
2422
2515
  /**
@@ -2881,11 +2974,73 @@ em {
2881
2974
  pointer-events: none;
2882
2975
  }
2883
2976
 
2977
+ /* Disabled / loading Button (a loading Button is disabled): muted, never faded.
2978
+ Filled variants take the --muted background; ghost, link, outline and destructive
2979
+ (drawn outlined) keep a transparent one. Label and spinner (currentColor, below) take
2980
+ --muted-foreground, readable in every theme since both derive from fg/bg.
2981
+ Scoped to Button (.dndev-button): other .dndev-interactive controls (tabs, toggles,
2982
+ menu items) keep the generic fade of patterns.css. The extra class and the
2983
+ [data-variant] / :hover / accent-surface forms outrank every variant, hover and
2984
+ surface rule of patterns.css whatever the load order: a button disabled under the
2985
+ pointer (the click that starts loading) must not keep its hover colour. */
2986
+ .dndev-interactive.dndev-button:disabled,
2987
+ .dndev-interactive.dndev-button[data-variant]:disabled,
2988
+ .dndev-interactive.dndev-button[data-variant]:disabled:hover,
2989
+ .dndev-surface[data-variant='accent'] .dndev-interactive.dndev-button:disabled,
2990
+ .dndev-floating[data-variant='accent'] .dndev-interactive.dndev-button:disabled {
2991
+ opacity: 1;
2992
+ background: var(--muted);
2993
+ color: var(--muted-foreground);
2994
+ }
2995
+
2996
+ .dndev-interactive.dndev-button:is(
2997
+ [data-variant='ghost'],
2998
+ [data-variant='link'],
2999
+ [data-variant='outline'],
3000
+ [data-variant='destructive']
3001
+ ):disabled,
3002
+ .dndev-interactive.dndev-button:is(
3003
+ [data-variant='ghost'],
3004
+ [data-variant='link'],
3005
+ [data-variant='outline'],
3006
+ [data-variant='destructive']
3007
+ ):disabled:hover,
3008
+ .dndev-surface[data-variant='accent']
3009
+ .dndev-interactive.dndev-button:is(
3010
+ [data-variant='ghost'],
3011
+ [data-variant='link'],
3012
+ [data-variant='outline'],
3013
+ [data-variant='destructive']
3014
+ ):disabled,
3015
+ .dndev-floating[data-variant='accent']
3016
+ .dndev-interactive.dndev-button:is(
3017
+ [data-variant='ghost'],
3018
+ [data-variant='link'],
3019
+ [data-variant='outline'],
3020
+ [data-variant='destructive']
3021
+ ):disabled {
3022
+ background: transparent;
3023
+ color: var(--muted-foreground);
3024
+ }
3025
+
3026
+ /* Outlined variants keep their shape, in the neutral border colour */
3027
+ .dndev-interactive.dndev-button:is([data-variant='outline'], [data-variant='destructive']):disabled {
3028
+ border-color: var(--border);
3029
+ }
3030
+
2884
3031
  /* Button spinner - inherits size from button font-size */
2885
3032
  .dndev-button-spinner {
2886
3033
  flex-shrink: 0;
2887
3034
  }
2888
3035
 
3036
+ /* The spinner replaces the icon and takes the label colour: --muted-foreground while
3037
+ the button is loading (see the disabled rules above).
3038
+ Three classes outrank `.dndev-spinner[data-variant]`. */
3039
+ .dndev-interactive .dndev-spinner.dndev-button-spinner {
3040
+ border-top-color: currentColor;
3041
+ border-inline-end-color: currentColor;
3042
+ }
3043
+
2889
3044
  /* Progress ring for upload percentage */
2890
3045
  .dndev-button-progress {
2891
3046
  display: inline-flex;
@@ -3608,16 +3763,9 @@ em {
3608
3763
  align-items: center;
3609
3764
  max-width: var(--content-width);
3610
3765
  margin-inline: auto;
3611
- /* Padding to match PageContainer behavior */
3612
- padding-inline: var(--gap-md);
3613
- }
3614
-
3615
- @media (width >= 1024px) {
3616
-
3617
- .dndev-cta-content {
3618
- padding-inline: var(--gap-lg);
3766
+ /* The Section content gutter: lines up with the page content */
3767
+ padding-inline: var(--section-gutter);
3619
3768
  }
3620
- }
3621
3769
 
3622
3770
  /* Text alignment */
3623
3771
  .dndev-cta-content[data-text-align='start'] {
@@ -4089,34 +4237,19 @@ em {
4089
4237
  }
4090
4238
 
4091
4239
  .dndev-collapsible-content[data-state='open'] {
4092
- animation: slideDown var(--dur-normal) var(--ease-in-out);
4240
+ /* Fade only (shared fade-in keyframes, animations.css): no height slide, no
4241
+ measured height needed; base.css shortens it under prefers-reduced-motion */
4242
+ animation: fade-in var(--dur-normal) var(--ease-in-out);
4093
4243
  overflow: visible; /* Allow dropdowns/overlays to escape when open */
4094
4244
  }
4095
4245
 
4246
+ /*
4247
+ * Closed content stays mounted (forceMount: in the server HTML for crawlers)
4248
+ * and is hidden here: display:none = not visible, focusable or announced.
4249
+ * Opening fades in; closing is instant. Same as Tabs inactive panels.
4250
+ */
4096
4251
  .dndev-collapsible-content[data-state='closed'] {
4097
- animation: slideUp var(--dur-normal) var(--ease-in-out);
4098
- }
4099
-
4100
- @keyframes slideDown {
4101
- from {
4102
- height: 0;
4103
- opacity: 0;
4104
- }
4105
- to {
4106
- height: var(--radix-collapsible-content-height);
4107
- opacity: 1;
4108
- }
4109
- }
4110
-
4111
- @keyframes slideUp {
4112
- from {
4113
- height: var(--radix-collapsible-content-height);
4114
- opacity: 1;
4115
- }
4116
- to {
4117
- height: 0;
4118
- opacity: 0;
4119
- }
4252
+ display: none;
4120
4253
  }
4121
4254
 
4122
4255
  .dndev-collapsible-trigger {
@@ -5096,6 +5229,79 @@ em {
5096
5229
  cursor: pointer;
5097
5230
  }
5098
5231
 
5232
+ /* packages/components/src/atomic/Floating/Floating.css */
5233
+
5234
+ /* One small control at a corner of the page content area, on the header layer; as wide as
5235
+ its content. --floating-control-gutter is the Section content gutter (--section-gutter:
5236
+ --gap-md, --gap-lg from 1024px). */
5237
+ .dndev-floating-control {
5238
+ --floating-control-gutter: var(--section-gutter);
5239
+ z-index: var(--z-header);
5240
+ }
5241
+
5242
+ /* Top placements: in the page flow (first in the page), sticky. At rest: --gap-md, the
5243
+ control, --gap-md, then the page content (a ghost Section right after it drops its own
5244
+ top padding: Section.css). While scrolling: --gap-md below the top of the scroll
5245
+ container (the layout <main>, under the header). Inline: the Section gutter, at the start
5246
+ or end of the content area; fit-content so it never stretches (block or flex parent). */
5247
+ .dndev-floating-control[data-placement^='top'] {
5248
+ --floating-control-inline-offset: var(--floating-control-gutter);
5249
+ position: sticky;
5250
+ inset-block-start: var(--gap-md);
5251
+ inline-size: -moz-fit-content;
5252
+ inline-size: fit-content;
5253
+ margin-block: var(--gap-md);
5254
+ }
5255
+
5256
+ /* PageContainer already pads its content --gap-md inline: add only the rest of the gutter
5257
+ (0 below 1024px), so the control lines up with the Sections' content edge. */
5258
+ .dndev-container > .dndev-floating-control[data-placement^='top'] {
5259
+ --floating-control-inline-offset: calc(
5260
+ var(--floating-control-gutter) - var(--gap-md)
5261
+ );
5262
+ }
5263
+
5264
+ .dndev-floating-control[data-placement='top-start'] {
5265
+ margin-inline: var(--floating-control-inline-offset) auto;
5266
+ }
5267
+
5268
+ .dndev-floating-control[data-placement='top-end'] {
5269
+ margin-inline: auto var(--floating-control-inline-offset);
5270
+ }
5271
+
5272
+ /* Bottom placements: fixed (portalled to <body>), over the page, taking no space. The
5273
+ offsets read the layout tokens declared on <html> (@donotdev/ui layout-variables.css),
5274
+ with fallbacks for a page outside DnDevLayout:
5275
+ - block: --gap-md above the shown ActionBar (--action-bar-height, its safe-area padding
5276
+ included) or above the bottom safe area, whichever is taller;
5277
+ - inline: the Section gutter, after the sidebar on the start side (--sidebar-width),
5278
+ never inside the side safe areas. */
5279
+ .dndev-floating-control[data-placement^='bottom'] {
5280
+ --floating-control-fixed-gutter: max(
5281
+ var(--floating-control-gutter),
5282
+ env(safe-area-inset-left, 0px),
5283
+ env(safe-area-inset-right, 0px)
5284
+ );
5285
+ position: fixed;
5286
+ inset-block-end: calc(
5287
+ var(--gap-md) +
5288
+ max(var(--action-bar-height, 0px), env(safe-area-inset-bottom, 0px))
5289
+ );
5290
+ max-inline-size: calc(
5291
+ 100% - var(--sidebar-width, 0px) - 2 * var(--floating-control-fixed-gutter)
5292
+ );
5293
+ }
5294
+
5295
+ .dndev-floating-control[data-placement='bottom-start'] {
5296
+ inset-inline-start: calc(
5297
+ var(--sidebar-width, 0px) + var(--floating-control-fixed-gutter)
5298
+ );
5299
+ }
5300
+
5301
+ .dndev-floating-control[data-placement='bottom-end'] {
5302
+ inset-inline-end: var(--floating-control-fixed-gutter);
5303
+ }
5304
+
5099
5305
  /* packages/components/src/atomic/Grid/Grid.css */
5100
5306
 
5101
5307
  .dndev-grid-component {
@@ -5259,19 +5465,9 @@ em {
5259
5465
  /* Content constraint + centered */
5260
5466
  max-width: var(--content-width);
5261
5467
  margin-inline: auto;
5262
- /* Padding with hero background - responsive to match PageContainer */
5263
- padding-inline: var(--gap-md);
5468
+ /* Padding with hero background; inline: the Section content gutter (lines up with the page content) */
5469
+ padding-inline: var(--section-gutter);
5264
5470
  padding-block: var(--gap-lg);
5265
- }
5266
-
5267
- @media (width >= 1024px) {
5268
-
5269
- .dndev-hero-section {
5270
- padding-inline: var(--gap-lg);
5271
- }
5272
- }
5273
-
5274
- .dndev-hero-section {
5275
5471
 
5276
5472
  display: flex;
5277
5473
  flex-direction: column;
@@ -5557,10 +5753,46 @@ em {
5557
5753
  /* packages/components/src/advanced/ImageGallery/ImageGallery.css */
5558
5754
 
5559
5755
  .image-gallery {
5756
+ /* Height one thumbnail row takes (the strip never wraps: the bound below is exact). */
5757
+ --image-gallery-thumbnail-block: 60px;
5758
+ /* Viewport height the gallery may fill: below the app header, minus the page spacing
5759
+ above and below it. Bounded like the other framework media (VideoPlayer, Crawl). */
5760
+ --image-gallery-viewport: calc(
5761
+ 100vh - var(--header-height, 0px) - 2 * var(--gap-lg)
5762
+ );
5560
5763
  display: flex;
5561
5764
  flex-direction: column;
5562
5765
  gap: var(--gap-md);
5563
5766
  outline: none;
5767
+ /* Never taller than the viewport: at its ratio (--image-gallery-ratio, the
5768
+ aspectRatio prop) the gallery narrows and centres instead of growing taller. */
5769
+ inline-size: 100%;
5770
+ /* A grid / flex item would otherwise grow to the thumbnail row's full length */
5771
+ min-inline-size: 0;
5772
+ max-inline-size: calc(
5773
+ var(--image-gallery-viewport) * (var(--image-gallery-ratio))
5774
+ );
5775
+ margin-inline: auto;
5776
+ }
5777
+
5778
+ /* svh: the small viewport (mobile browser bars shown), so the bound never jumps on scroll */
5779
+ @supports (height: 100svh) {
5780
+ .image-gallery {
5781
+ --image-gallery-viewport: calc(
5782
+ 100svh - var(--header-height, 0px) - 2 * var(--gap-lg)
5783
+ );
5784
+ }
5785
+ }
5786
+
5787
+ /* With thumbnails: the main image gives up one thumbnail row and the gap above it */
5788
+ .image-gallery--thumbnails {
5789
+ max-inline-size: calc(
5790
+ (
5791
+ var(--image-gallery-viewport) - var(--image-gallery-thumbnail-block) -
5792
+ var(--gap-md)
5793
+ ) *
5794
+ (var(--image-gallery-ratio))
5795
+ );
5564
5796
  }
5565
5797
 
5566
5798
  /* Gallery pictures are always protected (with blockContextMenu + draggable=false):
@@ -5598,6 +5830,7 @@ em {
5598
5830
  .image-gallery__main {
5599
5831
  position: relative;
5600
5832
  width: 100%;
5833
+ aspect-ratio: var(--image-gallery-ratio);
5601
5834
  overflow: hidden;
5602
5835
  border-radius: var(--radius-surface);
5603
5836
  }
@@ -5625,7 +5858,8 @@ em {
5625
5858
 
5626
5859
  /* Arrow / thumbnail / key navigation glides to a neighbour (never a touch swipe) */
5627
5860
  @media (prefers-reduced-motion: no-preference) {
5628
- .image-gallery__strip {
5861
+ .image-gallery__strip,
5862
+ .image-gallery__thumbnails {
5629
5863
  scroll-behavior: smooth;
5630
5864
  }
5631
5865
  }
@@ -5707,17 +5941,25 @@ em {
5707
5941
  inset-inline-end: var(--gap-md);
5708
5942
  }
5709
5943
 
5710
- /* Thumbnails */
5944
+ /* Thumbnails: one row, native horizontal scroll when it overflows (swipe, trackpad);
5945
+ the selected thumbnail is scrolled into view (revealInStrip). */
5711
5946
  .image-gallery__thumbnails {
5712
5947
  display: flex;
5713
- flex-wrap: wrap;
5714
5948
  gap: var(--gap-sm);
5949
+ overflow-x: auto;
5950
+ overflow-y: hidden;
5951
+ overscroll-behavior-x: contain;
5952
+ scrollbar-width: none;
5953
+ }
5954
+
5955
+ .image-gallery__thumbnails::-webkit-scrollbar {
5956
+ display: none;
5715
5957
  }
5716
5958
 
5717
5959
  .image-gallery__thumbnail {
5718
5960
  flex: 0 0 auto;
5719
- width: 80px;
5720
- height: 60px;
5961
+ width: calc(var(--image-gallery-thumbnail-block) * 4 / 3);
5962
+ height: var(--image-gallery-thumbnail-block);
5721
5963
  padding: 0;
5722
5964
  border: 2px solid transparent;
5723
5965
  border-radius: var(--radius-surface);
@@ -5733,9 +5975,10 @@ em {
5733
5975
  border-color: var(--muted-foreground);
5734
5976
  }
5735
5977
 
5978
+ /* Inset: the scrolling row clips anything drawn outside a thumbnail */
5736
5979
  .image-gallery__thumbnail:focus-visible {
5737
5980
  outline: 2px solid var(--primary);
5738
- outline-offset: 2px;
5981
+ outline-offset: -2px;
5739
5982
  }
5740
5983
 
5741
5984
  .image-gallery__thumbnail--selected {
@@ -5778,9 +6021,8 @@ em {
5778
6021
 
5779
6022
  /* Responsive adjustments */
5780
6023
  @media (max-width: 640px) {
5781
- .image-gallery__thumbnail {
5782
- width: 60px;
5783
- height: 45px;
6024
+ .image-gallery {
6025
+ --image-gallery-thumbnail-block: 45px;
5784
6026
  }
5785
6027
 
5786
6028
  .image-gallery__nav {
@@ -6262,8 +6504,11 @@ input[type='number'] {
6262
6504
  color: var(--muted-foreground);
6263
6505
  }
6264
6506
 
6265
- /* Help (i) after the label: the label truncates, the button never does */
6507
+ /* Help (i) after the label: the label truncates, the button never does. Overflow stays
6508
+ visible so the button's hit area (negative margin) is not clipped by the legend; the
6509
+ label child does the truncation. */
6266
6510
  .dndev-floating-legend[data-info] {
6511
+ overflow: visible;
6267
6512
  display: flex;
6268
6513
  align-items: center;
6269
6514
  gap: calc(var(--gap-sm) / 2);
@@ -6281,7 +6526,13 @@ input[type='number'] {
6281
6526
  flex-shrink: 0;
6282
6527
  align-items: center;
6283
6528
  justify-content: center;
6284
- /* Larger hit area than the icon, without growing the legend */
6529
+ /* Larger hit area than the icon, without growing the legend. The area spills past the
6530
+ legend onto its neighbours (the block above, the field's input): its own layer keeps
6531
+ it on top, so the whole area stays clickable (WCAG 2.5.8, 24×24 px minimum). */
6532
+ position: relative;
6533
+ z-index: 1;
6534
+ min-inline-size: 24px;
6535
+ min-block-size: 24px;
6285
6536
  padding: calc(var(--gap-sm) / 2);
6286
6537
  margin: calc(var(--gap-sm) / -2);
6287
6538
  border: none;
@@ -6348,14 +6599,45 @@ input[type='number'] {
6348
6599
  gap: var(--gap-lg);
6349
6600
  }
6350
6601
 
6351
- /* Modern ::marker approach - only when list-style is not 'none' */
6602
+ /* Numbers: items are flex (icon alignment) and a flex item gets no ::marker,
6603
+ so an ordered list draws its numbers with a counter (BUGS #31). */
6352
6604
 
6353
- .dndev-list[data-ordered='true'] {
6605
+ .dndev-list[data-ordered='true']:not([data-marker='none']) {
6354
6606
  list-style-type: decimal;
6607
+ counter-reset: dndev-list-item;
6355
6608
  }
6356
6609
 
6357
- .dndev-list:not([data-ordered='true']):not([style*='list-style: none']) {
6610
+ .dndev-list[data-ordered='true']:not([data-marker='none']) > .dndev-list-item {
6611
+ counter-increment: dndev-list-item;
6612
+ }
6613
+
6614
+ :is(.dndev-list[data-ordered='true']:not([data-marker='none']) > .dndev-list-item)::before {
6615
+ content: counter(dndev-list-item) '.';
6616
+ flex-shrink: 0;
6617
+ min-inline-size: 2ch;
6618
+ text-align: end;
6619
+ font-variant-numeric: tabular-nums;
6620
+ }
6621
+
6622
+ .dndev-list:not([data-ordered='true']):not([data-marker='none']):not([style*='list-style: none']) {
6358
6623
  list-style-type: disc;
6624
+
6625
+ /* Bullets: same reason as the numbers, an icon-less item (data-plain) draws
6626
+ its own bullet; items with an icon keep the icon as their marker (BUGS #31). */
6627
+ }
6628
+
6629
+ .dndev-list:not([data-ordered='true']):not([data-marker='none']):not([style*='list-style: none']) > .dndev-list-item[data-plain='true']::before {
6630
+ content: '\2022';
6631
+ flex-shrink: 0;
6632
+ min-inline-size: 1ch;
6633
+ text-align: end;
6634
+ }
6635
+
6636
+ /* marker="none": the two rules above are excluded by their :not(), so no counter,
6637
+ bullet or native marker is drawn; items keep their flex alignment and gap. */
6638
+
6639
+ .dndev-list[data-marker='none'] {
6640
+ list-style-type: none;
6359
6641
  }
6360
6642
 
6361
6643
  /* Density variants */
@@ -7398,15 +7680,61 @@ input[type='number'] {
7398
7680
  margin-inline: auto;
7399
7681
  min-width: 0; /* Allow shrinking so max-width wins when content would force wider */
7400
7682
  /* Padding with section background - responsive to match PageContainer */
7401
- padding-inline: var(--gap-md);
7683
+ padding-inline: var(--section-gutter);
7402
7684
  padding-top: var(--gap-lg);
7403
7685
  padding-bottom: var(--gap-lg);
7404
7686
  }
7405
- @media (width >= 1024px) {
7406
- .dndev-section-content {
7407
- padding-inline: var(--gap-lg);
7687
+
7688
+ /*
7689
+ * Nested Section (inside another Section's content): flush. The outer Section
7690
+ * already owns the page band (width, centring, side padding, block padding), so
7691
+ * the inner one takes its container's edge and width; spacing to siblings comes
7692
+ * from the parent layout (Stack / Grid gap). A nested Section with a tone
7693
+ * (base, muted, ...) keeps its padding: its background would otherwise sit on
7694
+ * the text edge. No :has() (Safari 14.1): the default tone is data-tone='ghost'.
7695
+ */
7696
+ .dndev-section-content .dndev-section-full-width {
7697
+ width: 100%;
7698
+ margin-inline: 0;
7699
+ }
7700
+
7701
+ .dndev-section-content
7702
+ .dndev-section-full-width[data-tone='ghost']
7703
+ > .dndev-section-content {
7704
+ max-width: none;
7705
+ margin-inline: 0;
7706
+ padding-inline: 0;
7707
+ padding-block: 0;
7708
+ }
7709
+
7710
+ /*
7711
+ * Consecutive Sections share one gap. Each page Section pads its content
7712
+ * `--gap-lg` top and bottom, so two in a row were 2 x `--gap-lg` apart. A
7713
+ * ghost Section that directly follows a ghost Section drops its top padding:
7714
+ * the previous one's bottom padding is the only gap. A toned Section (a
7715
+ * background band) on either side of the pair keeps its padding: the band edge
7716
+ * must not touch text. Nested ghost Sections are already flush (above). No
7717
+ * :has() (Safari 14.1): the rule keys on the following Section, and the default
7718
+ * tone is data-tone='ghost'.
7719
+ */
7720
+ .dndev-section-full-width[data-tone='ghost']
7721
+ + .dndev-section-full-width[data-tone='ghost']
7722
+ > .dndev-section-content {
7723
+ padding-top: 0;
7724
+ }
7725
+
7726
+ /*
7727
+ * A ghost Section right after a top Floating (back link, first in the page)
7728
+ * drops its top padding: the Floating's own --gap-md bottom margin is the only
7729
+ * gap, so the control sits --gap-md from the header and --gap-md from the
7730
+ * Section's first line, at every width. A toned Section keeps its padding (its
7731
+ * band starts --gap-md below the control). No :has() (Safari 14.1).
7732
+ */
7733
+ .dndev-floating-control[data-placement^='top']
7734
+ + .dndev-section-full-width[data-tone='ghost']
7735
+ > .dndev-section-content {
7736
+ padding-top: 0;
7408
7737
  }
7409
- }
7410
7738
 
7411
7739
  /* Content width constraints — background stays full, only inner content narrows */
7412
7740
  .dndev-section-content[data-content-width='standard'] {
@@ -7487,16 +7815,23 @@ input[type='number'] {
7487
7815
  text-align: end;
7488
7816
  }
7489
7817
 
7490
- /* Collapsible title trigger */
7818
+ /*
7819
+ * Collapsible title: heading > <button> trigger. The heading keeps the title
7820
+ * styles and spacing; the button strips UA chrome and inherits them.
7821
+ */
7491
7822
  .dndev-section-title-trigger {
7492
7823
  width: 100%;
7493
7824
  cursor: pointer;
7494
7825
  transition: opacity var(--dur-fast) var(--ease-in-out);
7495
- margin-block-end: var(--gap-md);
7496
- }
7497
-
7498
- .dndev-section-title-trigger .dndev-section-title {
7499
- margin-block-end: 0;
7826
+ margin: 0;
7827
+ padding: 0;
7828
+ border: none;
7829
+ background: none;
7830
+ font: inherit;
7831
+ color: inherit;
7832
+ letter-spacing: inherit;
7833
+ text-transform: inherit;
7834
+ text-align: inherit;
7500
7835
  }
7501
7836
 
7502
7837
  .dndev-section-title-trigger:hover {
@@ -7531,6 +7866,44 @@ input[type='number'] {
7531
7866
  justify-content: flex-end;
7532
7867
  }
7533
7868
 
7869
+ /*
7870
+ * Title row with actions (only rendered when `actions` is set): heading at the
7871
+ * start, actions at the end, centred on the heading. `space-between` puts a
7872
+ * lone item (actions wrapped under the heading) at the start; with no heading
7873
+ * the actions are the only child and go to the end. The heading keeps its
7874
+ * styles; the row owns the block spacing below.
7875
+ */
7876
+ .dndev-section-header {
7877
+ display: flex;
7878
+ flex-wrap: wrap;
7879
+ align-items: center;
7880
+ justify-content: space-between;
7881
+ gap: var(--gap-sm) var(--gap-md);
7882
+ margin-block-end: var(--gap-md);
7883
+ }
7884
+
7885
+ .dndev-section-header > .dndev-section-title {
7886
+ margin-block-end: 0;
7887
+ min-width: 0;
7888
+ }
7889
+
7890
+ /* Collapsible: the trigger spans the heading, which takes the free space */
7891
+ .dndev-section-header[data-collapsible] > .dndev-section-title {
7892
+ flex: 1 1 auto;
7893
+ }
7894
+
7895
+ .dndev-section-actions {
7896
+ display: flex;
7897
+ flex-wrap: wrap;
7898
+ align-items: center;
7899
+ gap: var(--gap-sm);
7900
+ min-width: 0;
7901
+ }
7902
+
7903
+ .dndev-section-actions:only-child {
7904
+ margin-inline-start: auto;
7905
+ }
7906
+
7534
7907
  /* packages/components/src/atomic/Separator/Separator.css */
7535
7908
 
7536
7909
  .dndev-separator {
@@ -9257,9 +9630,11 @@ input[type='number'] {
9257
9630
  display: none;
9258
9631
  }
9259
9632
 
9260
- /* Collapsed: one square + at the inline end. Expanded: [ − qty + ].
9633
+ /* Collapsed: one square + at the inline end (or, with `addLabel`, one "+ label" button
9634
+ over the expanded footprint). Expanded: [ − qty + ].
9261
9635
  Rows are fixed in both states (no vertical shift); only the inline size animates,
9262
- growing from the inline end toward the inline start. */
9636
+ growing from the inline end toward the inline start (labelled: nothing resizes, the
9637
+ content crossfades). */
9263
9638
  .dndev-quantity-stepper {
9264
9639
  --quantity-target: var(--touch-target);
9265
9640
  /* The cell IS the touch target: padding and icons fit inside it. State-independent,
@@ -9320,6 +9695,11 @@ input[type='number'] {
9320
9695
  cursor: not-allowed;
9321
9696
  opacity: 0.6;
9322
9697
  }
9698
+ /* Typed quantity: same input size token as every framework input (no iOS focus zoom).
9699
+ The cell is fixed (--quantity-cell), so the font-size change shifts nothing. */
9700
+ .dndev-quantity-stepper > input {
9701
+ font-size: var(--font-size-input);
9702
+ }
9323
9703
  .dndev-quantity-stepper > button {
9324
9704
  display: flex;
9325
9705
  align-items: center;
@@ -9393,6 +9773,64 @@ input[type='number'] {
9393
9773
  .dndev-quantity-stepper[data-vertical][data-collapsed] > .dndev-quantity-stepper-increment {
9394
9774
  grid-area: 1 / 1 / -1 / -1;
9395
9775
  }
9776
+ /* Labelled add (`addLabel`, never vertical): collapsed, one "+ label" button over the
9777
+ expanded footprint, so nothing changes size. Expanding crossfades the label out and
9778
+ − / quantity / the + icon in (opacity only); the + snaps back to its cell underneath. */
9779
+ .dndev-quantity-stepper[data-add-label] {
9780
+ position: relative;
9781
+ }
9782
+ .dndev-quantity-stepper[data-add-label] > .dndev-quantity-stepper-increment > svg {
9783
+ transition: opacity var(--dur-normal) var(--ease-in-out);
9784
+ }
9785
+ .dndev-quantity-stepper[data-add-label][data-collapsed] {
9786
+ inline-size: var(--quantity-expanded);
9787
+ min-inline-size: var(--quantity-expanded);
9788
+ }
9789
+ .dndev-quantity-stepper[data-add-label][data-collapsed][data-full-width] {
9790
+ inline-size: 100%;
9791
+ }
9792
+ .dndev-quantity-stepper[data-add-label][data-collapsed] > .dndev-quantity-stepper-increment {
9793
+ grid-area: 1 / 1 / -1 / -1;
9794
+ }
9795
+ :is(.dndev-quantity-stepper[data-add-label][data-collapsed] > .dndev-quantity-stepper-increment) > svg {
9796
+ opacity: 0;
9797
+ }
9798
+ :is(.dndev-quantity-stepper[data-add-label][data-collapsed] > .dndev-quantity-stepper-increment) > .dndev-quantity-stepper-add {
9799
+ visibility: visible;
9800
+ opacity: 1;
9801
+ }
9802
+
9803
+ /* The label of a labelled add, laid over the whole group (not the + cell) so it can fade out
9804
+ while the + returns to its cell. Decorative: the + keeps `incrementLabel` as its name. */
9805
+ .dndev-quantity-stepper-add {
9806
+ position: absolute;
9807
+ inset: 0;
9808
+ display: flex;
9809
+ align-items: center;
9810
+ justify-content: center;
9811
+ gap: var(--gap-sm);
9812
+ padding-inline: var(--gap-sm);
9813
+ font-weight: var(--font-weight-medium);
9814
+ white-space: nowrap;
9815
+ pointer-events: none;
9816
+ visibility: hidden;
9817
+ opacity: 0;
9818
+ /* Out faster than − / quantity come in, so the two never read as one jumble. */
9819
+ transition:
9820
+ opacity var(--dur-fast) var(--ease-in-out),
9821
+ visibility var(--dur-fast) var(--ease-in-out);
9822
+ }
9823
+ .dndev-quantity-stepper-add > svg {
9824
+ flex-shrink: 0;
9825
+ inline-size: var(--icon-md);
9826
+ block-size: var(--icon-md);
9827
+ }
9828
+
9829
+ .dndev-quantity-stepper-add-text {
9830
+ min-inline-size: 0;
9831
+ overflow: hidden;
9832
+ text-overflow: ellipsis;
9833
+ }
9396
9834
 
9397
9835
  .dndev-quantity-stepper-value {
9398
9836
  box-sizing: border-box;
@@ -9415,7 +9853,9 @@ input[type='number'] {
9415
9853
  .dndev-quantity-stepper,
9416
9854
  .dndev-quantity-stepper > button,
9417
9855
  .dndev-quantity-stepper > .dndev-quantity-stepper-decrement,
9418
- .dndev-quantity-stepper > .dndev-quantity-stepper-value {
9856
+ .dndev-quantity-stepper > .dndev-quantity-stepper-value,
9857
+ .dndev-quantity-stepper > .dndev-quantity-stepper-increment > svg,
9858
+ .dndev-quantity-stepper-add {
9419
9859
  transition: none;
9420
9860
  }
9421
9861
  }
@@ -9562,6 +10002,21 @@ input[type='number'] {
9562
10002
  font-style: italic;
9563
10003
  }
9564
10004
 
10005
+ .dndev-text-base:is(s) {
10006
+ text-decoration-line: line-through;
10007
+ }
10008
+
10009
+ /* A link in running text must be told apart by more than colour (WCAG 1.4.1).
10010
+ base.css strips the underline from every anchor; framework controls
10011
+ (.dndev-interactive) keep their own look. Same values as Button variant="link".
10012
+ Text levels only (body / small / caption; no data-level = body): a link in a
10013
+ heading (h1-h6, e.g. a card title) is a title, not running text. */
10014
+
10015
+ .dndev-text-base:not([data-level^='h']) a:not(.dndev-interactive) {
10016
+ text-decoration: underline;
10017
+ text-underline-offset: 2px;
10018
+ }
10019
+
9565
10020
  .dndev-text-base[data-variant='default'] {
9566
10021
  color: inherit;
9567
10022
  }
@@ -9658,6 +10113,15 @@ input[type='number'] {
9658
10113
  font-size: var(--font-size-sm);
9659
10114
  }
9660
10115
 
10116
+ /* A heading element set at a text level (`<Text as="h2" level="body">`) is text in
10117
+ every respect, not only size: drop base.css's headline font and heading case/tracking. */
10118
+
10119
+ .dndev-text-base:is(h1,h2,h3,h4,h5,h6):is([data-level='body'],[data-level='small'],[data-level='caption']) {
10120
+ font-family: var(--font-family, var(--font-sans));
10121
+ text-transform: none;
10122
+ letter-spacing: normal;
10123
+ }
10124
+
9661
10125
  /* Font weight overrides (after level rules, so weight prop overrides level defaults) */
9662
10126
 
9663
10127
  .dndev-text-base[data-font-weight='normal'] {
@@ -9680,6 +10144,20 @@ input[type='number'] {
9680
10144
  font-style: italic;
9681
10145
  }
9682
10146
 
10147
+ .dndev-text-base[data-underline] {
10148
+ text-decoration-line: underline;
10149
+ }
10150
+
10151
+ /* lines: clamp to N lines (--text-lines, set by the component) */
10152
+
10153
+ .dndev-text-base[data-lines] {
10154
+ display: -webkit-box;
10155
+ -webkit-box-orient: vertical;
10156
+ -webkit-line-clamp: var(--text-lines);
10157
+ line-clamp: var(--text-lines);
10158
+ overflow: hidden;
10159
+ }
10160
+
9683
10161
  /* packages/components/src/atomic/Toaster/Toaster.css */
9684
10162
 
9685
10163
  .dndev-toast-viewport {
@@ -13220,6 +13698,14 @@ footer[role='contentinfo']:not([data-custom]) a:not(.dndev-interactive):hover {
13220
13698
  }
13221
13699
  }
13222
13700
 
13701
+ /* ActionBar (@donotdev/components): while shown, it sets its height as --action-bar-height on
13702
+ <html> (absent while hidden). The layout reserves it at the bottom, like the bottom
13703
+ mergedBar, so the end of main and a footer (inside main or in its grid row) sit above the
13704
+ bar. The grid shrinks from the bottom: content above the reading position does not move. */
13705
+ .dndev-layout {
13706
+ padding-block-end: var(--action-bar-height, 0px);
13707
+ }
13708
+
13223
13709
  /* Desktop (>=1024px): Always hide merged-bar */
13224
13710
  @media (width >=1024px) {
13225
13711
  .merged-bar {
@@ -13402,17 +13888,23 @@ footer[role='contentinfo']:not([data-custom]) a:not(.dndev-interactive):hover {
13402
13888
  display: none;
13403
13889
  }
13404
13890
 
13405
- /* Breadcrumbs navigation */
13891
+ /* Breadcrumbs navigation. Wraps instead of overflowing (long record names on a phone);
13892
+ flush with the content edge, so a trail placed in page content lines up with it. */
13406
13893
  .breadcrumbs {
13407
13894
  display: flex;
13895
+ flex-wrap: wrap;
13408
13896
  align-items: center;
13409
13897
  gap: var(--gap-sm);
13410
- padding-inline-start: var(--gap-sm);
13411
13898
  font-size: var(--font-size-base);
13412
13899
  min-height: 32px;
13413
13900
  color: var(--muted-foreground);
13414
13901
  }
13415
13902
 
13903
+ /* The layout's breadcrumb bar insets the trail from the bar's edge */
13904
+ .breadcrumbs-container .breadcrumbs {
13905
+ padding-inline-start: var(--gap-sm);
13906
+ }
13907
+
13416
13908
  .breadcrumb-item {
13417
13909
  display: inline-flex;
13418
13910
  align-items: center;