@donotdev/ui 0.2.3 → 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.
Files changed (85) hide show
  1. package/dist/ChildRowsPicker-63M4EQUQ.js +1 -0
  2. package/dist/ChildRowsPicker-ISP365ON.js +1 -0
  3. package/dist/ChildRowsPicker-PQFE6NCR.js +1 -0
  4. package/dist/ChildRowsPicker-XXFFSMWY.js +1 -0
  5. package/dist/GoToDialog-XBK5EZF4.js +1 -0
  6. package/dist/chunk-3CIZFGST.js +1 -0
  7. package/dist/chunk-LHMKU342.js +1 -0
  8. package/dist/chunk-P2DHZWPY.js +1 -0
  9. package/dist/components/layout/components/Breadcrumbs.d.ts.map +1 -1
  10. package/dist/components/layout/components/Breadcrumbs.js +4 -3
  11. package/dist/components/layout/components/header/SettingsMenu.js +2 -2
  12. package/dist/crud/components/ChildRowsPicker.d.ts +21 -0
  13. package/dist/crud/components/ChildRowsPicker.d.ts.map +1 -0
  14. package/dist/crud/components/ChildRowsPicker.js +68 -0
  15. package/dist/crud/components/EntityCardList.d.ts.map +1 -1
  16. package/dist/crud/components/EntityCardList.js +9 -17
  17. package/dist/crud/components/EntityDisplayRenderer.js +2 -2
  18. package/dist/crud/components/EntityFormRenderer.d.ts +4 -2
  19. package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
  20. package/dist/crud/components/EntityFormRenderer.js +137 -55
  21. package/dist/crud/components/EntityList.d.ts +3 -1
  22. package/dist/crud/components/EntityList.d.ts.map +1 -1
  23. package/dist/crud/components/EntityList.js +324 -56
  24. package/dist/crud/components/EntityRecommendations.js +1 -1
  25. package/dist/crud/components/EntityWorkflow.d.ts.map +1 -1
  26. package/dist/crud/components/EntityWorkflow.js +6 -4
  27. package/dist/crud/components/cellEditFor.d.ts +23 -8
  28. package/dist/crud/components/cellEditFor.d.ts.map +1 -1
  29. package/dist/crud/components/cellEditFor.js +40 -20
  30. package/dist/crud/components/entityParent.d.ts +8 -15
  31. package/dist/crud/components/entityParent.d.ts.map +1 -1
  32. package/dist/crud/components/entityParent.js +30 -8
  33. package/dist/crud/components/useRecordBreadcrumb.d.ts +1 -1
  34. package/dist/crud/components/useRecordBreadcrumb.d.ts.map +1 -1
  35. package/dist/crud/components/useRecordBreadcrumb.js +12 -3
  36. package/dist/crud/crudImports.d.ts +11 -2
  37. package/dist/crud/crudImports.d.ts.map +1 -1
  38. package/dist/crud/crudImports.js +10 -1
  39. package/dist/dndev-next.css +302 -51
  40. package/dist/dndev.css +304 -51
  41. package/dist/index.js +4 -4
  42. package/dist/internal/initializers/NextJsStoresInitializer.d.ts +3 -0
  43. package/dist/internal/initializers/NextJsStoresInitializer.d.ts.map +1 -1
  44. package/dist/internal/initializers/NextJsStoresInitializer.js +8 -1
  45. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  46. package/dist/internal/layout/components/AutoMetaTags.js +3 -2
  47. package/dist/internal/layout/components/FontPreloadLinks.d.ts +7 -4
  48. package/dist/internal/layout/components/FontPreloadLinks.d.ts.map +1 -1
  49. package/dist/internal/layout/components/FontPreloadLinks.js +12 -25
  50. package/dist/internal/layout/components/footer/FooterCopyright.d.ts +2 -0
  51. package/dist/internal/layout/components/footer/FooterCopyright.d.ts.map +1 -1
  52. package/dist/internal/layout/components/footer/FooterCopyright.js +4 -0
  53. package/dist/internal/layout/components/footer/useLegalLinks.d.ts +2 -1
  54. package/dist/internal/layout/components/footer/useLegalLinks.d.ts.map +1 -1
  55. package/dist/internal/layout/components/footer/useLegalLinks.js +4 -3
  56. package/dist/internal/providers/UIProviders.d.ts +0 -8
  57. package/dist/internal/providers/UIProviders.d.ts.map +1 -1
  58. package/dist/internal/providers/UIProviders.js +39 -1
  59. package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
  60. package/dist/providers/NextJsAppProviders.js +1 -2
  61. package/dist/providers/ViteAppProviders.d.ts.map +1 -1
  62. package/dist/providers/ViteAppProviders.js +1 -4
  63. package/dist/routing/404.d.ts +8 -1
  64. package/dist/routing/404.d.ts.map +1 -1
  65. package/dist/routing/404.js +6 -2
  66. package/dist/routing/hooks/hooks.next.js +1 -1
  67. package/dist/routing/hooks/useRedirectGuard.next.d.ts +3 -1
  68. package/dist/routing/hooks/useRedirectGuard.next.d.ts.map +1 -1
  69. package/dist/routing/hooks/useRedirectGuard.next.js +11 -9
  70. package/dist/routing/parentRoute.d.ts +27 -0
  71. package/dist/routing/parentRoute.d.ts.map +1 -0
  72. package/dist/routing/parentRoute.js +43 -0
  73. package/dist/routing/useNavigation.d.ts.map +1 -1
  74. package/dist/routing/useNavigation.js +5 -24
  75. package/dist/routing/useRouteDiscovery.d.ts +2 -2
  76. package/dist/routing/useRouteDiscovery.d.ts.map +1 -1
  77. package/dist/routing/useRouteDiscovery.js +6 -5
  78. package/dist/styles/index.css +301 -50
  79. package/dist/symbol-index.json +1 -1
  80. package/guidelines/GOTCHAS.md +2 -0
  81. package/guidelines/LAYOUTS.md +4 -0
  82. package/guidelines/PAGES.md +23 -3
  83. package/guidelines/ROUTING.md +26 -1
  84. package/guidelines/SEO.md +1 -1
  85. package/package.json +8 -8
@@ -8,7 +8,7 @@
8
8
  * @author AMBROISE PARK Consulting
9
9
  */
10
10
  import { useMemo } from 'react';
11
- import { useNavigationStore, useTranslation } from '@donotdev/core';
11
+ import { filterNavigationRoutes, useNavigationStore, useTranslation, } from '@donotdev/core';
12
12
  import { USER_ROLES } from '@donotdev/core';
13
13
  // Platform-specific hooks via conditional exports
14
14
  import { useRoutePath } from '@donotdev/ui/routing/hooks';
@@ -39,29 +39,10 @@ export function useNavigationItems() {
39
39
  const authenticated = !!user;
40
40
  const { t } = useTranslation();
41
41
  const role = user?.role || USER_ROLES.GUEST;
42
- // Use Zustand selector for proper caching - only re-runs when auth state changes
43
- const filteredRoutes = useNavigationStore((state) => {
44
- // Guard against undefined state during initialization
45
- if (!state || typeof state.getFilteredRoutes !== 'function') {
46
- if (process.env.NODE_ENV === 'development') {
47
- console.warn('[useNavigationItems] Navigation store not initialized, returning empty routes');
48
- }
49
- return [];
50
- }
51
- return state.getFilteredRoutes({
52
- authenticated,
53
- role,
54
- });
55
- });
42
+ // Select snapshot-owned data; store getters close over live state during hydration.
43
+ const allRoutes = useNavigationStore((state) => state.cache.allRoutes);
56
44
  return useMemo(() => {
57
- // Ensure filteredRoutes is always an array
58
- if (!Array.isArray(filteredRoutes)) {
59
- if (process.env.NODE_ENV === 'development') {
60
- console.warn('[useNavigationItems] filteredRoutes is not an array:', filteredRoutes);
61
- }
62
- return [];
63
- }
64
- return filteredRoutes
45
+ return filterNavigationRoutes(allRoutes, { authenticated, role })
65
46
  .map((route) => ({
66
47
  ...route,
67
48
  label: routeLabel(route, t),
@@ -70,7 +51,7 @@ export function useNavigationItems() {
70
51
  children: undefined,
71
52
  }))
72
53
  .sort((a, b) => a.label.localeCompare(b.label, undefined, { sensitivity: 'base' })); // Alphabetical sorting by label
73
- }, [filteredRoutes, pathname, t]);
54
+ }, [allRoutes, authenticated, role, pathname, t]);
74
55
  }
75
56
  /**
76
57
  * Resolves a single navigation item from the store by path.
@@ -109,8 +109,8 @@ export declare function useAccessibleRoutes(): RouteGroup[];
109
109
  * navigation data with authentication filtering.
110
110
  *
111
111
  * Features:
112
- * - Store-level caching by auth state
113
- * - Automatic updates when auth changes
112
+ * - Memoized filtering of snapshot-owned routes
113
+ * - Automatic updates when routes or auth change
114
114
  * - Consistent filtering logic with AuthGuard
115
115
  * - Optimized for multiple component usage
116
116
  *
@@ -1 +1 @@
1
- {"version":3,"file":"useRouteDiscovery.d.ts","sourceRoot":"","sources":["../../src/routing/useRouteDiscovery.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAEV,eAAe,IAAI,mBAAmB,EACvC,MAAM,gBAAgB,CAAC;AAOxB;;;;;;GAMG;AAC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B,YAAY,gBAK3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB;;;;;;SAQ/B"}
@@ -23,7 +23,7 @@
23
23
  * ```
24
24
  */
25
25
  import { useMemo } from 'react';
26
- import { useNavigationStore, getRoutes, getRouteManifest, } from '@donotdev/core';
26
+ import { useNavigationStore, filterNavigationRoutes, getRoutes, getRouteManifest, } from '@donotdev/core';
27
27
  import { useAuthSafe } from '../utils/useAuthSafe';
28
28
  /**
29
29
  * Hook that provides auto-discovered routes from virtual module system
@@ -130,8 +130,8 @@ export function useAccessibleRoutes() {
130
130
  * navigation data with authentication filtering.
131
131
  *
132
132
  * Features:
133
- * - Store-level caching by auth state
134
- * - Automatic updates when auth changes
133
+ * - Memoized filtering of snapshot-owned routes
134
+ * - Automatic updates when routes or auth change
135
135
  * - Consistent filtering logic with AuthGuard
136
136
  * - Optimized for multiple component usage
137
137
  *
@@ -151,8 +151,9 @@ export function useAccessibleRoutes() {
151
151
  */
152
152
  export function useAccessibleNavigationRoutes() {
153
153
  const user = useAuthSafe('user');
154
+ const allRoutes = useNavigationStore((state) => state.cache.allRoutes);
154
155
  return useMemo(() => {
155
- const filteredRoutes = useNavigationStore.getState().getFilteredRoutes({
156
+ const filteredRoutes = filterNavigationRoutes(allRoutes, {
156
157
  authenticated: !!user,
157
158
  role: user?.role || 'user',
158
159
  });
@@ -162,7 +163,7 @@ export function useAccessibleNavigationRoutes() {
162
163
  icon: route.icon,
163
164
  meta: route.meta,
164
165
  }));
165
- }, [user]);
166
+ }, [allRoutes, user]);
166
167
  }
167
168
  /**
168
169
  * Hook that returns all discovered routes as a flat list
@@ -3346,7 +3346,7 @@ em {
3346
3346
  display: inline-flex;
3347
3347
  align-items: center;
3348
3348
  justify-content: center;
3349
- padding: var(--gap-tight) 1px;
3349
+ padding: var(--gap-sm) 1px;
3350
3350
  border-radius: 2px;
3351
3351
  font-variant-numeric: tabular-nums;
3352
3352
  caret-color: transparent;
@@ -4072,6 +4072,16 @@ em {
4072
4072
  transition: opacity var(--dur-fast) var(--ease-in-out);
4073
4073
  }
4074
4074
 
4075
+ /* <button> the component renders (showIcon, or non-element trigger): strip UA chrome */
4076
+ .dndev-collapsible-trigger--button {
4077
+ background: none;
4078
+ border: none;
4079
+ padding: 0;
4080
+ font: inherit;
4081
+ color: inherit;
4082
+ text-align: start;
4083
+ }
4084
+
4075
4085
  .dndev-collapsible-trigger:hover {
4076
4086
  opacity: var(--opacity-strong);
4077
4087
  }
@@ -4235,7 +4245,7 @@ em {
4235
4245
  height: 100%;
4236
4246
  display: flex;
4237
4247
  align-items: center;
4238
- gap: var(--gap-tight, 4px);
4248
+ gap: 4px; /* 4px: tighter than --gap-sm (8px), the smallest gap token; must match computeTrailingPad() in index.tsx */
4239
4249
  z-index: 1;
4240
4250
  pointer-events: none; /* pass clicks through to input by default */
4241
4251
  }
@@ -4298,10 +4308,10 @@ em {
4298
4308
  display: flex;
4299
4309
  flex-wrap: wrap;
4300
4310
  align-items: center;
4301
- gap: var(--gap-tight, 4px);
4311
+ gap: 4px; /* 4px: tighter than --gap-sm (8px), the smallest gap token */
4302
4312
  border: var(--border-hairline) solid var(--line-2);
4303
4313
  border-radius: var(--radius-interactive);
4304
- padding: var(--gap-tight, 4px);
4314
+ padding: 4px; /* 4px: tighter than --gap-sm (8px), the smallest gap token */
4305
4315
  padding-inline-end: var(--combobox-pad-end);
4306
4316
  min-height: var(--touch-target);
4307
4317
  cursor: text;
@@ -4326,7 +4336,7 @@ em {
4326
4336
  flex: 1 1 80px;
4327
4337
  min-width: 80px;
4328
4338
  height: auto;
4329
- padding: var(--gap-tight, 4px) var(--gap-sm);
4339
+ padding: 4px var(--gap-sm); /* 4px: tighter than --gap-sm (8px), the smallest gap token */
4330
4340
  }
4331
4341
 
4332
4342
  /* ──────────────────────────────────────────────────
@@ -4373,7 +4383,7 @@ em {
4373
4383
  .dndev-combobox-option-content {
4374
4384
  display: flex;
4375
4385
  flex-direction: column;
4376
- gap: var(--gap-tight);
4386
+ gap: var(--gap-sm);
4377
4387
  flex: 1;
4378
4388
  }
4379
4389
 
@@ -4390,7 +4400,7 @@ em {
4390
4400
  .dndev-combobox-option-count {
4391
4401
  font-size: var(--font-size-xs);
4392
4402
  color: var(--muted-foreground);
4393
- margin-inline-start: var(--gap-tight);
4403
+ margin-inline-start: var(--gap-sm);
4394
4404
  flex-shrink: 0;
4395
4405
  }
4396
4406
 
@@ -6173,13 +6183,56 @@ input[type='number'] {
6173
6183
  cursor: default;
6174
6184
  display: inline-flex;
6175
6185
  align-items: center;
6176
- gap: var(--gap-tight);
6186
+ gap: var(--gap-sm);
6177
6187
  }
6178
6188
 
6179
6189
  .dndev-floating-fieldset[data-disabled='true'] .dndev-floating-legend {
6180
6190
  color: var(--muted-foreground);
6181
6191
  }
6182
6192
 
6193
+ /* Help (i) after the label: the label truncates, the button never does */
6194
+ .dndev-floating-legend[data-info] {
6195
+ display: flex;
6196
+ align-items: center;
6197
+ gap: calc(var(--gap-sm) / 2);
6198
+ }
6199
+
6200
+ .dndev-floating-legend[data-info] > label {
6201
+ display: block;
6202
+ min-width: 0;
6203
+ overflow: hidden;
6204
+ text-overflow: ellipsis;
6205
+ }
6206
+
6207
+ .dndev-field-info {
6208
+ display: inline-flex;
6209
+ flex-shrink: 0;
6210
+ align-items: center;
6211
+ justify-content: center;
6212
+ /* Larger hit area than the icon, without growing the legend */
6213
+ padding: calc(var(--gap-sm) / 2);
6214
+ margin: calc(var(--gap-sm) / -2);
6215
+ border: none;
6216
+ border-radius: var(--radius-full);
6217
+ background: none;
6218
+ color: var(--muted-foreground);
6219
+ cursor: help;
6220
+ }
6221
+
6222
+ .dndev-field-info:hover,
6223
+ .dndev-field-info:focus-visible {
6224
+ color: var(--foreground);
6225
+ }
6226
+
6227
+ .dndev-field-info:focus-visible {
6228
+ outline: var(--border-hairline) solid var(--ring);
6229
+ }
6230
+
6231
+ .dndev-field-info svg {
6232
+ width: 1.25em;
6233
+ height: 1.25em;
6234
+ }
6235
+
6183
6236
  /* Disable truncation when explicitly set to false */
6184
6237
  .dndev-floating-legend[data-truncate='false'] {
6185
6238
  max-width: none;
@@ -6499,7 +6552,7 @@ input[type='number'] {
6499
6552
  /* packages/components/src/atomic/PasswordInput/PasswordInput.css */
6500
6553
 
6501
6554
  .dndev-password-input-with-toggle {
6502
- padding-inline-end: calc(var(--gap-xl) + var(--gap-md)) !important;
6555
+ padding-inline-end: calc(var(--gap-lg) + var(--gap-md)) !important;
6503
6556
  }
6504
6557
 
6505
6558
  /* Eye icon toggle - ALWAYS at end, cannot be overridden */
@@ -6512,7 +6565,7 @@ input[type='number'] {
6512
6565
  background: none !important;
6513
6566
  border: none !important;
6514
6567
  cursor: pointer !important;
6515
- padding: var(--gap-tight) !important;
6568
+ padding: var(--gap-sm) !important;
6516
6569
  display: flex !important;
6517
6570
  align-items: center !important;
6518
6571
  opacity: var(--opacity-muted) !important;
@@ -6573,7 +6626,7 @@ input[type='number'] {
6573
6626
  background: none;
6574
6627
  border: none;
6575
6628
  cursor: pointer;
6576
- padding: var(--gap-tight, 0.25rem);
6629
+ padding: 0.25rem; /* 4px: tighter than --gap-sm (8px), the smallest gap token */
6577
6630
  margin-inline-start: var(--gap-sm, 0.5rem);
6578
6631
  display: inline-flex;
6579
6632
  align-items: center;
@@ -6898,7 +6951,7 @@ input[type='number'] {
6898
6951
  }
6899
6952
 
6900
6953
  .dndev-range-input-separator {
6901
- padding-inline: var(--gap-tight);
6954
+ padding-inline: var(--gap-sm);
6902
6955
  }
6903
6956
 
6904
6957
  /* packages/components/src/atomic/Rating/Rating.css */
@@ -8392,6 +8445,107 @@ input[type='number'] {
8392
8445
  min-width: var(--touch-target);
8393
8446
  }
8394
8447
 
8448
+ .dndev-swipe-action {
8449
+ --swipe-action-width: 5.5rem;
8450
+ display: flex;
8451
+ min-inline-size: 0;
8452
+ }
8453
+
8454
+ .dndev-swipe-action-viewport {
8455
+ display: flex;
8456
+ flex: 1;
8457
+ min-inline-size: 0;
8458
+ overflow-x: auto;
8459
+ overflow-y: hidden;
8460
+ scroll-snap-type: x mandatory;
8461
+ overscroll-behavior-x: contain;
8462
+ scrollbar-width: none;
8463
+ touch-action: pan-x pan-y pinch-zoom;
8464
+ }
8465
+
8466
+ .dndev-swipe-action-viewport::-webkit-scrollbar {
8467
+ display: none;
8468
+ }
8469
+
8470
+ .dndev-swipe-action[data-disabled] .dndev-swipe-action-viewport,
8471
+ .dndev-swipe-action-viewport[data-input-blocked] {
8472
+ overflow-x: hidden;
8473
+ }
8474
+
8475
+ .dndev-swipe-action-content {
8476
+ flex: 0 0 100%;
8477
+ min-inline-size: 0;
8478
+ min-block-size: 44px;
8479
+ scroll-snap-align: start;
8480
+ background: var(--background);
8481
+ }
8482
+
8483
+ /* Scope to descendants, never a focusable cart/list ancestor. Touch-action is
8484
+ resolved before pointerdown, so controls cannot start horizontal scrolling. */
8485
+ .dndev-swipe-action-content :is(
8486
+ button, a, input, textarea, select, label, summary, [tabindex],
8487
+ [contenteditable]:not([contenteditable="false"]), [draggable="true"],
8488
+ [role="button"], [role="link"], [role="checkbox"], [role="switch"],
8489
+ [role="radio"], [role="slider"], [role="spinbutton"], [role="textbox"],
8490
+ [role="combobox"], [role="searchbox"], [role="menuitem"],
8491
+ [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"],
8492
+ [role="tab"], [role="treeitem"]
8493
+ ) {
8494
+ touch-action: pan-y pinch-zoom;
8495
+ }
8496
+
8497
+ .dndev-swipe-action-toggle,
8498
+ .dndev-swipe-action-delete {
8499
+ display: flex;
8500
+ align-items: center;
8501
+ justify-content: center;
8502
+ min-inline-size: 44px;
8503
+ min-block-size: 44px;
8504
+ border: 0;
8505
+ font: inherit;
8506
+ cursor: pointer;
8507
+ touch-action: manipulation;
8508
+ }
8509
+
8510
+ .dndev-swipe-action-toggle {
8511
+ flex-shrink: 0;
8512
+ background: var(--background);
8513
+ color: var(--foreground);
8514
+ }
8515
+
8516
+ /* Native overflow clips the closed action and progressively reveals its paint.
8517
+ Inert/disabled/ARIA state gates interaction until the open endpoint. */
8518
+ .dndev-swipe-action-delete {
8519
+ flex: 0 0 var(--swipe-action-width);
8520
+ scroll-snap-align: end;
8521
+ flex-direction: column;
8522
+ padding: var(--gap-sm);
8523
+ overflow-wrap: anywhere;
8524
+ background: var(--destructive);
8525
+ color: var(--destructive-foreground);
8526
+ }
8527
+
8528
+ .dndev-swipe-action svg {
8529
+ inline-size: var(--icon-md);
8530
+ block-size: var(--icon-md);
8531
+ flex-shrink: 0;
8532
+ }
8533
+
8534
+ .dndev-swipe-action button:focus-visible {
8535
+ outline: 2px solid var(--ring);
8536
+ outline-offset: -3px;
8537
+ }
8538
+
8539
+ .dndev-swipe-action button:disabled {
8540
+ cursor: default;
8541
+ }
8542
+
8543
+ @media (prefers-reduced-motion: reduce) {
8544
+ .dndev-swipe-action-viewport {
8545
+ scroll-behavior: auto;
8546
+ }
8547
+ }
8548
+
8395
8549
  /* packages/components/src/atomic/Switch/Switch.css */
8396
8550
 
8397
8551
  .dndev-switch {
@@ -8563,7 +8717,7 @@ input[type='number'] {
8563
8717
 
8564
8718
  .dndev-table-filter-row .dndev-table-head {
8565
8719
  background-color: var(--muted);
8566
- padding: var(--gap-xs);
8720
+ padding: var(--gap-sm);
8567
8721
  height: auto;
8568
8722
  min-height: auto;
8569
8723
  }
@@ -8777,7 +8931,7 @@ input[type='number'] {
8777
8931
  }
8778
8932
 
8779
8933
  .dndev-table-bulk-bar {
8780
- padding: var(--gap-xs) var(--gap-sm);
8934
+ padding: var(--gap-sm) var(--gap-sm);
8781
8935
  border: 1px solid var(--border);
8782
8936
  background-color: var(--muted);
8783
8937
  }
@@ -8791,7 +8945,7 @@ input[type='number'] {
8791
8945
  background-color: transparent;
8792
8946
  border: 1px solid transparent;
8793
8947
  border-radius: var(--radius-sm);
8794
- padding: var(--gap-xs);
8948
+ padding: var(--gap-sm);
8795
8949
  }
8796
8950
 
8797
8951
  .dndev-table-cell-editor:hover {
@@ -8820,11 +8974,20 @@ input[type='number'] {
8820
8974
  background-color: color-mix(in oklab, var(--primary) 12%, transparent);
8821
8975
  }
8822
8976
 
8823
- /* Value that does not parse: the save will reject it */
8977
+ /* Value that does not parse, or breaks a rule (cellErrors): the save will reject it */
8824
8978
  .dndev-table-cell[data-invalid='true'] .dndev-table-cell-editor {
8825
8979
  border-color: var(--destructive);
8826
8980
  }
8827
8981
 
8982
+ /* Message of a rule the cell value breaks (cellErrors) */
8983
+ .dndev-table-cell-error {
8984
+ display: block;
8985
+ margin-block-start: var(--gap-sm);
8986
+ color: var(--destructive);
8987
+ font-size: var(--font-size-xs);
8988
+ line-height: 1.3;
8989
+ }
8990
+
8828
8991
  /* Open cell: icon link to the row's record (touch-sized hit area) */
8829
8992
  .dndev-table-open-link {
8830
8993
  display: inline-flex;
@@ -8928,41 +9091,117 @@ input[type='number'] {
8928
9091
  display: none;
8929
9092
  }
8930
9093
 
8931
- /* packages/components/src/atomic/QuantityStepper/QuantityStepper.css */
8932
-
8933
- /* One outlined control (e-commerce standard, e.g. Shopify Dawn): borderless − / +
8934
- buttons around a centred, tabular quantity. Same height and radius as buttons. */
9094
+ /* Reserve the complete footprint, even when zero is presented as one large +. */
8935
9095
  .dndev-quantity-stepper {
8936
- display: inline-flex;
8937
- align-items: stretch;
8938
- min-height: var(--touch-target);
9096
+ --quantity-target: max(var(--touch-target), 44px);
9097
+ /* Include both icon states, padding and inherited text BEFORE placing items.
9098
+ Auto rows otherwise grow for the larger collapsed icon, then shrink on expand. */
9099
+ --quantity-cell: max(
9100
+ var(--quantity-target),
9101
+ calc(max(var(--icon-md), var(--quantity-target) * 0.6, 1lh) + 2 * var(--gap-sm))
9102
+ );
9103
+ display: inline-grid;
9104
+ grid-template-columns: var(--quantity-cell) minmax(var(--quantity-cell), 1fr) var(--quantity-cell);
9105
+ grid-template-rows: var(--quantity-cell);
9106
+ inline-size: calc(3 * var(--quantity-cell));
9107
+ min-inline-size: calc(3 * var(--quantity-cell));
8939
9108
  border: var(--border-hairline) solid var(--border);
8940
9109
  border-radius: var(--radius-interactive);
8941
9110
  background: var(--interactive);
8942
9111
  color: var(--foreground);
8943
9112
  }
8944
9113
  .dndev-quantity-stepper[data-full-width] {
8945
- display: flex;
8946
- width: 100%;
9114
+ display: grid;
9115
+ inline-size: 100%;
8947
9116
  }
8948
9117
  .dndev-quantity-stepper[data-disabled] {
8949
9118
  opacity: 0.6;
8950
9119
  }
8951
- .dndev-quantity-stepper > .dndev-interactive {
8952
- flex: 0 0 auto;
8953
- aspect-ratio: 1;
8954
- min-height: 0;
9120
+ .dndev-quantity-stepper > button,.dndev-quantity-stepper > input {
9121
+ min-inline-size: var(--quantity-target);
9122
+ min-block-size: var(--quantity-target);
8955
9123
  border: none;
8956
9124
  border-radius: inherit;
8957
9125
  background: transparent;
9126
+ color: inherit;
9127
+ font: inherit;
9128
+ touch-action: manipulation;
8958
9129
  }
9130
+ :is(.dndev-quantity-stepper > button,.dndev-quantity-stepper > input):focus-visible {
9131
+ outline: none;
9132
+ box-shadow: var(--shadow-focus);
9133
+ z-index: 1;
9134
+ }
9135
+ :is(.dndev-quantity-stepper > button,.dndev-quantity-stepper > input):disabled {
9136
+ cursor: not-allowed;
9137
+ opacity: 0.6;
9138
+ }
9139
+ .dndev-quantity-stepper > button {
9140
+ display: flex;
9141
+ align-items: center;
9142
+ justify-content: center;
9143
+ padding: var(--gap-sm);
9144
+ cursor: pointer;
9145
+ transition: background-color var(--transition-fast);
9146
+ /* Press-and-hold repeats: no text selection or touch callout on long press. */
9147
+ -moz-user-select: none;
9148
+ user-select: none;
9149
+ -webkit-user-select: none;
9150
+ -webkit-touch-callout: none;
9151
+ }
9152
+ :is(.dndev-quantity-stepper > button):hover:not(:disabled) {
9153
+ background: var(--muted);
9154
+ }
9155
+ :is(.dndev-quantity-stepper > button) > svg {
9156
+ inline-size: var(--icon-md);
9157
+ block-size: var(--icon-md);
9158
+ }
9159
+ .dndev-quantity-stepper > .dndev-quantity-stepper-decrement {
9160
+ grid-area: 1 / 1;
9161
+ }
9162
+ .dndev-quantity-stepper > .dndev-quantity-stepper-value {
9163
+ grid-area: 1 / 2;
9164
+ }
9165
+ .dndev-quantity-stepper > .dndev-quantity-stepper-increment {
9166
+ grid-area: 1 / 3;
9167
+ }
9168
+ .dndev-quantity-stepper[data-vertical] {
9169
+ grid-template-columns: minmax(var(--quantity-cell), 1fr);
9170
+ grid-template-rows: repeat(3, var(--quantity-cell));
9171
+ inline-size: var(--quantity-cell);
9172
+ min-inline-size: var(--quantity-cell);
9173
+ }
9174
+ .dndev-quantity-stepper[data-vertical][data-full-width] {
9175
+ inline-size: 100%;
9176
+ }
9177
+ .dndev-quantity-stepper[data-vertical] > .dndev-quantity-stepper-increment {
9178
+ grid-area: 1 / 1;
9179
+ }
9180
+ .dndev-quantity-stepper[data-vertical] > .dndev-quantity-stepper-value {
9181
+ grid-area: 2 / 1;
9182
+ }
9183
+ .dndev-quantity-stepper[data-vertical] > .dndev-quantity-stepper-decrement {
9184
+ grid-area: 3 / 1;
9185
+ }
9186
+ .dndev-quantity-stepper[data-collapsed] > .dndev-quantity-stepper-decrement,.dndev-quantity-stepper[data-collapsed] > .dndev-quantity-stepper-value {
9187
+ visibility: hidden;
9188
+ pointer-events: none;
9189
+ }
9190
+ .dndev-quantity-stepper[data-collapsed] > .dndev-quantity-stepper-increment {
9191
+ grid-area: 1 / 1 / -1 / -1;
9192
+ }
9193
+ :is(.dndev-quantity-stepper[data-collapsed] > .dndev-quantity-stepper-increment) > svg {
9194
+ inline-size: calc(var(--quantity-target) * 0.6);
9195
+ block-size: calc(var(--quantity-target) * 0.6);
9196
+ }
8959
9197
 
8960
9198
  .dndev-quantity-stepper-value {
8961
- flex: 1 1 auto;
9199
+ box-sizing: border-box;
8962
9200
  display: flex;
8963
9201
  align-items: center;
8964
9202
  justify-content: center;
8965
- min-width: 3ch;
9203
+ inline-size: 100%;
9204
+ min-inline-size: 0;
8966
9205
  padding-inline: var(--gap-sm);
8967
9206
  border: none;
8968
9207
  background: none;
@@ -8971,21 +9210,14 @@ input[type='number'] {
8971
9210
  font-weight: var(--font-weight-medium);
8972
9211
  font-variant-numeric: tabular-nums;
8973
9212
  text-align: center;
8974
- }
8975
-
8976
- .dndev-quantity-stepper-value:is(button) {
8977
- cursor: pointer;
8978
- }
8979
9213
 
8980
- .dndev-quantity-stepper-value:is(button):hover {
8981
- text-decoration: underline;
8982
- text-underline-offset: 0.2em;
8983
- }
9214
+ }
8984
9215
 
8985
- .dndev-quantity-stepper-value:is(button):focus-visible {
8986
- outline: none;
8987
- box-shadow: var(--shadow-focus);
9216
+ @media (prefers-reduced-motion: reduce) {
9217
+ .dndev-quantity-stepper > button {
9218
+ transition: none;
8988
9219
  }
9220
+ }
8989
9221
 
8990
9222
  /* packages/components/src/atomic/Tag/Tag.css */
8991
9223
 
@@ -9252,7 +9484,7 @@ input[type='number'] {
9252
9484
  .dndev-toast-viewport {
9253
9485
  position: fixed;
9254
9486
  top: var(--gap-md);
9255
- z-index: 100;
9487
+ z-index: var(--z-toast);
9256
9488
  display: flex;
9257
9489
  flex-direction: column-reverse;
9258
9490
  max-height: 100dvh;
@@ -9605,7 +9837,7 @@ input[type='number'] {
9605
9837
  display: flex;
9606
9838
  align-items: center;
9607
9839
  gap: var(--gap-sm);
9608
- padding: var(--gap-xs) var(--gap-sm);
9840
+ padding: var(--gap-sm) var(--gap-sm);
9609
9841
  border-radius: var(--radius-interactive);
9610
9842
  cursor: pointer;
9611
9843
  transition:
@@ -12268,10 +12500,20 @@ main[role='main'][data-routing-animation='none'] {
12268
12500
  grid-template-rows: var(--header-height) 1fr auto;
12269
12501
  }
12270
12502
 
12271
- /* Footer inside main: spacing + sizing (slotted mode only) */
12503
+ /* No footer rendered (app.footer: null): no footer row, main takes the space */
12504
+ .dndev-layout:not(:has(> footer)) {
12505
+ grid-template-areas:
12506
+ 'header header'
12507
+ 'sidebar main';
12508
+ grid-template-rows: var(--header-height) 1fr;
12509
+ }
12510
+
12511
+ /* Footer inside main: spacing + sizing (slotted mode only). The gap sits on the page
12512
+ above it: the footer's own block-start margin is `auto` (pinned to the bottom). */
12513
+ main[role='main'] > :has(+ footer[role='contentinfo']:not([data-custom])) {
12514
+ margin-block-end: var(--gap-lg);
12515
+ }
12272
12516
  main[role='main'] > footer[role='contentinfo']:not([data-custom]) {
12273
- margin-top: var(--gap-lg);
12274
- flex-shrink: 0;
12275
12517
  height: auto;
12276
12518
  }
12277
12519
  main[role='main'] > footer[role='contentinfo']:not([data-custom]) > * {
@@ -12632,11 +12874,20 @@ main[role='main'] {
12632
12874
  padding: 0;
12633
12875
  contain: layout style;
12634
12876
 
12635
- /* First child after breadcrumbs grows to fill space, never shrinks (scroll container owns overflow) */
12877
+ /* The page (first child, or the one after breadcrumbs) grows to fill the space and never
12878
+ shrinks (the scroll container owns overflow). Only the page: a footer rendered inside
12879
+ main keeps its own height. */
12636
12880
  }
12637
- main[role='main'] > *:not(.breadcrumbs-container):first-of-type,main[role='main'] > .breadcrumbs-container + * {
12881
+ main[role='main'] > :first-child:not(.breadcrumbs-container,footer),main[role='main'] > .breadcrumbs-container + :not(footer) {
12638
12882
  flex: 1 0 auto;
12639
12883
  }
12884
+ /* Footer inside main: always at the bottom, even while the page is not there yet
12885
+ (a Suspense boundary streaming in leaves only a hidden placeholder): main stays
12886
+ empty above it, nothing shifts when the page arrives. */
12887
+ main[role='main'] > footer {
12888
+ flex: 0 0 auto;
12889
+ margin-block-start: auto;
12890
+ }
12640
12891
 
12641
12892
  /* Footer: Full width by default, app presets start after sidebar */
12642
12893
  /* box-sizing: border-box ensures borders are included in height */