@mgamadeus/ddd-admin-ui 0.1.0-rc.1 → 0.1.0-rc.2

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 (677) hide show
  1. package/.claude/skills/ddd-admin-ui-specialist/SKILL.md +148 -18
  2. package/CHANGELOG.md +17 -0
  3. package/README.md +196 -88
  4. package/STANDARDS.md +385 -0
  5. package/dist/components.css +167 -22
  6. package/dist/form/DrawerFooter.d.ts +18 -0
  7. package/dist/form/DrawerFooter.d.ts.map +1 -0
  8. package/dist/form/DrawerFooter.js +47 -0
  9. package/dist/form/DrawerFooter.js.map +1 -0
  10. package/dist/form/Form.d.ts +25 -10
  11. package/dist/form/Form.d.ts.map +1 -1
  12. package/dist/form/Form.js +17 -8
  13. package/dist/form/Form.js.map +1 -1
  14. package/dist/form/FormActions.d.ts +35 -0
  15. package/dist/form/FormActions.d.ts.map +1 -0
  16. package/dist/form/FormActions.js +80 -0
  17. package/dist/form/FormActions.js.map +1 -0
  18. package/dist/form/FormDrawer.d.ts +36 -0
  19. package/dist/form/FormDrawer.d.ts.map +1 -0
  20. package/dist/form/FormDrawer.js +31 -0
  21. package/dist/form/FormDrawer.js.map +1 -0
  22. package/dist/form/FormErrors.d.ts +22 -0
  23. package/dist/form/FormErrors.d.ts.map +1 -0
  24. package/dist/form/FormErrors.js +46 -0
  25. package/dist/form/FormErrors.js.map +1 -0
  26. package/dist/form/FormField.d.ts +74 -0
  27. package/dist/form/FormField.d.ts.map +1 -0
  28. package/dist/form/FormField.js +46 -0
  29. package/dist/form/FormField.js.map +1 -0
  30. package/dist/form/FormHeader.d.ts +20 -0
  31. package/dist/form/FormHeader.d.ts.map +1 -0
  32. package/dist/form/FormHeader.js +9 -0
  33. package/dist/form/FormHeader.js.map +1 -0
  34. package/dist/form/FormJumpBar.d.ts +20 -0
  35. package/dist/form/FormJumpBar.d.ts.map +1 -0
  36. package/dist/form/FormJumpBar.js +49 -0
  37. package/dist/form/FormJumpBar.js.map +1 -0
  38. package/dist/form/FormSubmitButton.d.ts +17 -0
  39. package/dist/form/FormSubmitButton.d.ts.map +1 -0
  40. package/dist/form/FormSubmitButton.js +14 -0
  41. package/dist/form/FormSubmitButton.js.map +1 -0
  42. package/dist/form/FormWrapper.d.ts +13 -0
  43. package/dist/form/FormWrapper.d.ts.map +1 -0
  44. package/dist/form/FormWrapper.js +15 -0
  45. package/dist/form/FormWrapper.js.map +1 -0
  46. package/dist/form/drawerSlots.d.ts +10 -0
  47. package/dist/form/drawerSlots.d.ts.map +1 -0
  48. package/dist/form/drawerSlots.js +7 -0
  49. package/dist/form/drawerSlots.js.map +1 -0
  50. package/dist/form/fieldLabels.d.ts +15 -8
  51. package/dist/form/fieldLabels.d.ts.map +1 -1
  52. package/dist/form/fieldLabels.js +18 -6
  53. package/dist/form/fieldLabels.js.map +1 -1
  54. package/dist/form/formPanelClasses.d.ts +3 -0
  55. package/dist/form/formPanelClasses.d.ts.map +1 -0
  56. package/dist/form/formPanelClasses.js +3 -0
  57. package/dist/form/formPanelClasses.js.map +1 -0
  58. package/dist/form/index.d.ts +57 -2
  59. package/dist/form/index.d.ts.map +1 -1
  60. package/dist/form/index.js +33 -2
  61. package/dist/form/index.js.map +1 -1
  62. package/dist/form/useConfirmDialog.d.ts +9 -0
  63. package/dist/form/useConfirmDialog.d.ts.map +1 -0
  64. package/dist/form/useConfirmDialog.js +29 -0
  65. package/dist/form/useConfirmDialog.js.map +1 -0
  66. package/dist/glass/ActionRow.d.ts +27 -0
  67. package/dist/glass/ActionRow.d.ts.map +1 -0
  68. package/dist/glass/ActionRow.js +22 -0
  69. package/dist/glass/ActionRow.js.map +1 -0
  70. package/dist/glass/CollapsibleCard.d.ts +36 -0
  71. package/dist/glass/CollapsibleCard.d.ts.map +1 -0
  72. package/dist/glass/CollapsibleCard.js +27 -0
  73. package/dist/glass/CollapsibleCard.js.map +1 -0
  74. package/dist/glass/GlassGroup.d.ts +26 -0
  75. package/dist/glass/GlassGroup.d.ts.map +1 -0
  76. package/dist/glass/GlassGroup.js +34 -0
  77. package/dist/glass/GlassGroup.js.map +1 -0
  78. package/dist/glass/GlassPill.d.ts +23 -0
  79. package/dist/glass/GlassPill.d.ts.map +1 -0
  80. package/dist/glass/GlassPill.js +20 -0
  81. package/dist/glass/GlassPill.js.map +1 -0
  82. package/dist/glass/QuickFilterPills.d.ts +38 -0
  83. package/dist/glass/QuickFilterPills.d.ts.map +1 -0
  84. package/dist/glass/QuickFilterPills.js +30 -0
  85. package/dist/glass/QuickFilterPills.js.map +1 -0
  86. package/dist/glass/index.d.ts +10 -1
  87. package/dist/glass/index.d.ts.map +1 -1
  88. package/dist/glass/index.js +6 -1
  89. package/dist/glass/index.js.map +1 -1
  90. package/dist/i18n/Translate.d.ts +5 -4
  91. package/dist/i18n/Translate.d.ts.map +1 -1
  92. package/dist/i18n/Translate.js +3 -3
  93. package/dist/i18n/Translate.js.map +1 -1
  94. package/dist/i18n/format.d.ts +13 -0
  95. package/dist/i18n/format.d.ts.map +1 -0
  96. package/dist/i18n/format.js +15 -0
  97. package/dist/i18n/format.js.map +1 -0
  98. package/dist/i18n/hints.json +130 -0
  99. package/dist/i18n/index.d.ts +5 -3
  100. package/dist/i18n/index.d.ts.map +1 -1
  101. package/dist/i18n/index.js +5 -3
  102. package/dist/i18n/index.js.map +1 -1
  103. package/dist/i18n/localeFormat.d.ts +10 -0
  104. package/dist/i18n/localeFormat.d.ts.map +1 -0
  105. package/dist/i18n/localeFormat.js +36 -0
  106. package/dist/i18n/localeFormat.js.map +1 -0
  107. package/dist/i18n/plural.d.ts +15 -0
  108. package/dist/i18n/plural.d.ts.map +1 -0
  109. package/dist/i18n/plural.js +95 -0
  110. package/dist/i18n/plural.js.map +1 -0
  111. package/dist/i18n/serverMessages.d.ts +26 -0
  112. package/dist/i18n/serverMessages.d.ts.map +1 -0
  113. package/dist/i18n/serverMessages.js +146 -0
  114. package/dist/i18n/serverMessages.js.map +1 -0
  115. package/dist/i18n/store.d.ts +28 -16
  116. package/dist/i18n/store.d.ts.map +1 -1
  117. package/dist/i18n/store.js +26 -20
  118. package/dist/i18n/store.js.map +1 -1
  119. package/dist/i18n/useTranslate.d.ts +15 -7
  120. package/dist/i18n/useTranslate.d.ts.map +1 -1
  121. package/dist/i18n/useTranslate.js +17 -7
  122. package/dist/i18n/useTranslate.js.map +1 -1
  123. package/dist/i18n-keys.json +1050 -13
  124. package/dist/list/ChipToggleGroup.d.ts +36 -0
  125. package/dist/list/ChipToggleGroup.d.ts.map +1 -0
  126. package/dist/list/ChipToggleGroup.js +34 -0
  127. package/dist/list/ChipToggleGroup.js.map +1 -0
  128. package/dist/list/Combobox.d.ts +32 -0
  129. package/dist/list/Combobox.d.ts.map +1 -0
  130. package/dist/list/Combobox.js +27 -0
  131. package/dist/list/Combobox.js.map +1 -0
  132. package/dist/list/EmptyValue.d.ts +14 -0
  133. package/dist/list/EmptyValue.d.ts.map +1 -0
  134. package/dist/list/EmptyValue.js +11 -0
  135. package/dist/list/EmptyValue.js.map +1 -0
  136. package/dist/list/EntityListBody.d.ts +27 -0
  137. package/dist/list/EntityListBody.d.ts.map +1 -0
  138. package/dist/list/EntityListBody.js +24 -0
  139. package/dist/list/EntityListBody.js.map +1 -0
  140. package/dist/list/EntityListBulkBar.d.ts +38 -0
  141. package/dist/list/EntityListBulkBar.d.ts.map +1 -0
  142. package/dist/list/EntityListBulkBar.js +19 -0
  143. package/dist/list/EntityListBulkBar.js.map +1 -0
  144. package/dist/list/EntityListCard.d.ts +22 -0
  145. package/dist/list/EntityListCard.d.ts.map +1 -0
  146. package/dist/list/EntityListCard.js +15 -0
  147. package/dist/list/EntityListCard.js.map +1 -0
  148. package/dist/list/EntityListEmpty.d.ts +13 -0
  149. package/dist/list/EntityListEmpty.d.ts.map +1 -0
  150. package/dist/list/EntityListEmpty.js +11 -0
  151. package/dist/list/EntityListEmpty.js.map +1 -0
  152. package/dist/list/EntityListGrid.d.ts +29 -0
  153. package/dist/list/EntityListGrid.d.ts.map +1 -0
  154. package/dist/list/EntityListGrid.js +21 -0
  155. package/dist/list/EntityListGrid.js.map +1 -0
  156. package/dist/list/EntityListLoadMore.d.ts +15 -0
  157. package/dist/list/EntityListLoadMore.d.ts.map +1 -0
  158. package/dist/list/EntityListLoadMore.js +27 -0
  159. package/dist/list/EntityListLoadMore.js.map +1 -0
  160. package/dist/list/EntityListStatus.d.ts +11 -0
  161. package/dist/list/EntityListStatus.d.ts.map +1 -0
  162. package/dist/list/EntityListStatus.js +22 -0
  163. package/dist/list/EntityListStatus.js.map +1 -0
  164. package/dist/list/EntityListTable.d.ts +34 -0
  165. package/dist/list/EntityListTable.d.ts.map +1 -0
  166. package/dist/list/EntityListTable.js +43 -0
  167. package/dist/list/EntityListTable.js.map +1 -0
  168. package/dist/list/EntityListToolbar.d.ts +39 -0
  169. package/dist/list/EntityListToolbar.d.ts.map +1 -0
  170. package/dist/list/EntityListToolbar.js +25 -0
  171. package/dist/list/EntityListToolbar.js.map +1 -0
  172. package/dist/list/EntityListViewToggle.d.ts +17 -0
  173. package/dist/list/EntityListViewToggle.d.ts.map +1 -0
  174. package/dist/list/EntityListViewToggle.js +38 -0
  175. package/dist/list/EntityListViewToggle.js.map +1 -0
  176. package/dist/list/MultiSelect.d.ts +33 -0
  177. package/dist/list/MultiSelect.d.ts.map +1 -0
  178. package/dist/list/MultiSelect.js +60 -0
  179. package/dist/list/MultiSelect.js.map +1 -0
  180. package/dist/list/SearchField.d.ts +24 -0
  181. package/dist/list/SearchField.d.ts.map +1 -0
  182. package/dist/list/SearchField.js +42 -0
  183. package/dist/list/SearchField.js.map +1 -0
  184. package/dist/list/StatusBadge.d.ts +34 -0
  185. package/dist/list/StatusBadge.d.ts.map +1 -0
  186. package/dist/list/StatusBadge.js +44 -0
  187. package/dist/list/StatusBadge.js.map +1 -0
  188. package/dist/list/Tag.d.ts +16 -0
  189. package/dist/list/Tag.d.ts.map +1 -0
  190. package/dist/list/Tag.js +15 -0
  191. package/dist/list/Tag.js.map +1 -0
  192. package/dist/list/cells.d.ts +53 -0
  193. package/dist/list/cells.d.ts.map +1 -0
  194. package/dist/list/cells.js +62 -0
  195. package/dist/list/cells.js.map +1 -0
  196. package/dist/list/filterClasses.d.ts +8 -0
  197. package/dist/list/filterClasses.d.ts.map +1 -0
  198. package/dist/list/filterClasses.js +8 -0
  199. package/dist/list/filterClasses.js.map +1 -0
  200. package/dist/list/filterOptions.d.ts +7 -0
  201. package/dist/list/filterOptions.d.ts.map +1 -0
  202. package/dist/list/filterOptions.js +7 -0
  203. package/dist/list/filterOptions.js.map +1 -0
  204. package/dist/list/filters.d.ts +78 -0
  205. package/dist/list/filters.d.ts.map +1 -0
  206. package/dist/list/filters.js +54 -0
  207. package/dist/list/filters.js.map +1 -0
  208. package/dist/list/index.d.ts +88 -2
  209. package/dist/list/index.d.ts.map +1 -1
  210. package/dist/list/index.js +50 -2
  211. package/dist/list/index.js.map +1 -1
  212. package/dist/list/types.d.ts +59 -0
  213. package/dist/list/types.d.ts.map +1 -0
  214. package/dist/list/types.js +3 -0
  215. package/dist/list/types.js.map +1 -0
  216. package/dist/logic/browser/prepareImageFile.d.ts +18 -0
  217. package/dist/logic/browser/prepareImageFile.d.ts.map +1 -0
  218. package/dist/logic/browser/prepareImageFile.js +26 -0
  219. package/dist/logic/browser/prepareImageFile.js.map +1 -0
  220. package/dist/logic/index.d.ts +56 -5
  221. package/dist/logic/index.d.ts.map +1 -1
  222. package/dist/logic/index.js +37 -4
  223. package/dist/logic/index.js.map +1 -1
  224. package/dist/logic/pure/conditions.d.ts +46 -0
  225. package/dist/logic/pure/conditions.d.ts.map +1 -0
  226. package/dist/logic/pure/conditions.js +39 -0
  227. package/dist/logic/pure/conditions.js.map +1 -0
  228. package/dist/logic/pure/confirm.d.ts +19 -0
  229. package/dist/logic/pure/confirm.d.ts.map +1 -0
  230. package/dist/logic/pure/confirm.js +10 -0
  231. package/dist/logic/pure/confirm.js.map +1 -0
  232. package/dist/logic/pure/displayMode.d.ts +12 -0
  233. package/dist/logic/pure/displayMode.d.ts.map +1 -0
  234. package/dist/logic/pure/displayMode.js +11 -0
  235. package/dist/logic/pure/displayMode.js.map +1 -0
  236. package/dist/logic/pure/entityDrawer.d.ts +24 -0
  237. package/dist/logic/pure/entityDrawer.d.ts.map +1 -0
  238. package/dist/logic/pure/entityDrawer.js +3 -0
  239. package/dist/logic/pure/entityDrawer.js.map +1 -0
  240. package/dist/logic/pure/fieldPath.d.ts +9 -0
  241. package/dist/logic/pure/fieldPath.d.ts.map +1 -0
  242. package/dist/logic/pure/fieldPath.js +17 -0
  243. package/dist/logic/pure/fieldPath.js.map +1 -0
  244. package/dist/logic/pure/formValues.d.ts +14 -0
  245. package/dist/logic/pure/formValues.d.ts.map +1 -0
  246. package/dist/logic/pure/formValues.js +82 -0
  247. package/dist/logic/pure/formValues.js.map +1 -0
  248. package/dist/logic/pure/format.d.ts +14 -14
  249. package/dist/logic/pure/format.d.ts.map +1 -1
  250. package/dist/logic/pure/format.js +50 -29
  251. package/dist/logic/pure/format.js.map +1 -1
  252. package/dist/logic/pure/locales.d.ts +27 -0
  253. package/dist/logic/pure/locales.d.ts.map +1 -0
  254. package/dist/logic/pure/locales.js +50 -0
  255. package/dist/logic/pure/locales.js.map +1 -0
  256. package/dist/logic/pure/notify.d.ts +28 -5
  257. package/dist/logic/pure/notify.d.ts.map +1 -1
  258. package/dist/logic/pure/notify.js +41 -22
  259. package/dist/logic/pure/notify.js.map +1 -1
  260. package/dist/logic/pure/rowActivation.d.ts +6 -0
  261. package/dist/logic/pure/rowActivation.d.ts.map +1 -0
  262. package/dist/logic/pure/rowActivation.js +7 -0
  263. package/dist/logic/pure/rowActivation.js.map +1 -0
  264. package/dist/logic/pure/runSequential.d.ts +31 -0
  265. package/dist/logic/pure/runSequential.d.ts.map +1 -0
  266. package/dist/logic/pure/runSequential.js +47 -0
  267. package/dist/logic/pure/runSequential.js.map +1 -0
  268. package/dist/logic/pure/schemas.d.ts +14 -0
  269. package/dist/logic/pure/schemas.d.ts.map +1 -0
  270. package/dist/logic/pure/schemas.js +6 -0
  271. package/dist/logic/pure/schemas.js.map +1 -0
  272. package/dist/logic/pure/serverViolations.d.ts +35 -0
  273. package/dist/logic/pure/serverViolations.d.ts.map +1 -0
  274. package/dist/logic/pure/serverViolations.js +77 -0
  275. package/dist/logic/pure/serverViolations.js.map +1 -0
  276. package/dist/logic/pure/status.d.ts +21 -0
  277. package/dist/logic/pure/status.d.ts.map +1 -0
  278. package/dist/logic/pure/status.js +3 -0
  279. package/dist/logic/pure/status.js.map +1 -0
  280. package/dist/logic/pure/submitError.d.ts +11 -0
  281. package/dist/logic/pure/submitError.d.ts.map +1 -0
  282. package/dist/logic/pure/submitError.js +9 -0
  283. package/dist/logic/pure/submitError.js.map +1 -0
  284. package/dist/logic/pure/translationState.d.ts +29 -0
  285. package/dist/logic/pure/translationState.d.ts.map +1 -0
  286. package/dist/logic/pure/translationState.js +88 -0
  287. package/dist/logic/pure/translationState.js.map +1 -0
  288. package/dist/logic/pure/urlListState.d.ts +18 -0
  289. package/dist/logic/pure/urlListState.d.ts.map +1 -0
  290. package/dist/logic/pure/urlListState.js +3 -0
  291. package/dist/logic/pure/urlListState.js.map +1 -0
  292. package/dist/logic/react/conditionHooks.d.ts +20 -0
  293. package/dist/logic/react/conditionHooks.d.ts.map +1 -0
  294. package/dist/logic/react/conditionHooks.js +51 -0
  295. package/dist/logic/react/conditionHooks.js.map +1 -0
  296. package/dist/logic/react/useCopyToClipboard.d.ts +9 -0
  297. package/dist/logic/react/useCopyToClipboard.d.ts.map +1 -0
  298. package/dist/logic/react/useCopyToClipboard.js +28 -0
  299. package/dist/logic/react/useCopyToClipboard.js.map +1 -0
  300. package/dist/logic/react/useDebouncedValue.d.ts +3 -0
  301. package/dist/logic/react/useDebouncedValue.d.ts.map +1 -0
  302. package/dist/logic/react/useDebouncedValue.js +12 -0
  303. package/dist/logic/react/useDebouncedValue.js.map +1 -0
  304. package/dist/logic/react/useEntityDrawer.d.ts +54 -0
  305. package/dist/logic/react/useEntityDrawer.d.ts.map +1 -0
  306. package/dist/logic/react/useEntityDrawer.js +81 -0
  307. package/dist/logic/react/useEntityDrawer.js.map +1 -0
  308. package/dist/logic/react/useEntityTranslations.d.ts +57 -0
  309. package/dist/logic/react/useEntityTranslations.d.ts.map +1 -0
  310. package/dist/logic/react/useEntityTranslations.js +50 -0
  311. package/dist/logic/react/useEntityTranslations.js.map +1 -0
  312. package/dist/logic/react/useFormDirty.d.ts +15 -0
  313. package/dist/logic/react/useFormDirty.d.ts.map +1 -0
  314. package/dist/logic/react/useFormDirty.js +17 -0
  315. package/dist/logic/react/useFormDirty.js.map +1 -0
  316. package/dist/logic/react/useGrowingWindowList.d.ts +50 -0
  317. package/dist/logic/react/useGrowingWindowList.d.ts.map +1 -0
  318. package/dist/logic/react/useGrowingWindowList.js +38 -0
  319. package/dist/logic/react/useGrowingWindowList.js.map +1 -0
  320. package/dist/logic/react/useHydrated.d.ts +7 -0
  321. package/dist/logic/react/useHydrated.d.ts.map +1 -0
  322. package/dist/logic/react/useHydrated.js +12 -0
  323. package/dist/logic/react/useHydrated.js.map +1 -0
  324. package/dist/logic/react/useInfiniteScrollSentinel.d.ts +6 -0
  325. package/dist/logic/react/useInfiniteScrollSentinel.d.ts.map +1 -0
  326. package/dist/logic/react/useInfiniteScrollSentinel.js +24 -0
  327. package/dist/logic/react/useInfiniteScrollSentinel.js.map +1 -0
  328. package/dist/logic/react/useLocaleName.d.ts +3 -0
  329. package/dist/logic/react/useLocaleName.d.ts.map +1 -0
  330. package/dist/logic/react/useLocaleName.js +10 -0
  331. package/dist/logic/react/useLocaleName.js.map +1 -0
  332. package/dist/logic/react/useRowActivation.d.ts +12 -0
  333. package/dist/logic/react/useRowActivation.d.ts.map +1 -0
  334. package/dist/logic/react/useRowActivation.js +35 -0
  335. package/dist/logic/react/useRowActivation.js.map +1 -0
  336. package/dist/logic/react/useRowSelection.d.ts +40 -0
  337. package/dist/logic/react/useRowSelection.d.ts.map +1 -0
  338. package/dist/logic/react/useRowSelection.js +70 -0
  339. package/dist/logic/react/useRowSelection.js.map +1 -0
  340. package/dist/logic/react/useTranslationRunner.d.ts +27 -0
  341. package/dist/logic/react/useTranslationRunner.d.ts.map +1 -0
  342. package/dist/logic/react/useTranslationRunner.js +57 -0
  343. package/dist/logic/react/useTranslationRunner.js.map +1 -0
  344. package/dist/logic/react/useUnsavedChangesGuard.d.ts +30 -0
  345. package/dist/logic/react/useUnsavedChangesGuard.d.ts.map +1 -0
  346. package/dist/logic/react/useUnsavedChangesGuard.js +66 -0
  347. package/dist/logic/react/useUnsavedChangesGuard.js.map +1 -0
  348. package/dist/logic/react/useUrlListState.d.ts +39 -0
  349. package/dist/logic/react/useUrlListState.d.ts.map +1 -0
  350. package/dist/logic/react/useUrlListState.js +96 -0
  351. package/dist/logic/react/useUrlListState.js.map +1 -0
  352. package/dist/media/FormMediaItemField.d.ts +38 -0
  353. package/dist/media/FormMediaItemField.d.ts.map +1 -0
  354. package/dist/media/FormMediaItemField.js +35 -0
  355. package/dist/media/FormMediaItemField.js.map +1 -0
  356. package/dist/media/MediaItemField.d.ts +17 -3
  357. package/dist/media/MediaItemField.d.ts.map +1 -1
  358. package/dist/media/MediaItemField.js +11 -7
  359. package/dist/media/MediaItemField.js.map +1 -1
  360. package/dist/media/MediaItemPickerDialog.d.ts +48 -0
  361. package/dist/media/MediaItemPickerDialog.d.ts.map +1 -0
  362. package/dist/media/MediaItemPickerDialog.js +36 -0
  363. package/dist/media/MediaItemPickerDialog.js.map +1 -0
  364. package/dist/media/MediaPreview.d.ts +16 -0
  365. package/dist/media/MediaPreview.d.ts.map +1 -0
  366. package/dist/media/MediaPreview.js +20 -0
  367. package/dist/media/MediaPreview.js.map +1 -0
  368. package/dist/media/index.d.ts +17 -2
  369. package/dist/media/index.d.ts.map +1 -1
  370. package/dist/media/index.js +7 -0
  371. package/dist/media/index.js.map +1 -1
  372. package/dist/media/types.d.ts +23 -6
  373. package/dist/media/types.d.ts.map +1 -1
  374. package/dist/next/index.d.ts +7 -2
  375. package/dist/next/index.d.ts.map +1 -1
  376. package/dist/next/index.js +7 -2
  377. package/dist/next/index.js.map +1 -1
  378. package/dist/next/listViewParam.d.ts +3 -0
  379. package/dist/next/listViewParam.d.ts.map +1 -0
  380. package/dist/next/listViewParam.js +3 -0
  381. package/dist/next/listViewParam.js.map +1 -0
  382. package/dist/next/searchParamsWriter.d.ts +30 -6
  383. package/dist/next/searchParamsWriter.d.ts.map +1 -1
  384. package/dist/next/searchParamsWriter.js +80 -27
  385. package/dist/next/searchParamsWriter.js.map +1 -1
  386. package/dist/next/storage.d.ts +11 -0
  387. package/dist/next/storage.d.ts.map +1 -0
  388. package/dist/next/storage.js +34 -0
  389. package/dist/next/storage.js.map +1 -0
  390. package/dist/next/useListViewParam.d.ts +12 -0
  391. package/dist/next/useListViewParam.d.ts.map +1 -0
  392. package/dist/next/useListViewParam.js +45 -0
  393. package/dist/next/useListViewParam.js.map +1 -0
  394. package/dist/next/useNextDrawerUrlAdapter.d.ts +11 -0
  395. package/dist/next/useNextDrawerUrlAdapter.d.ts.map +1 -0
  396. package/dist/next/useNextDrawerUrlAdapter.js +28 -0
  397. package/dist/next/useNextDrawerUrlAdapter.js.map +1 -0
  398. package/dist/next/useNextUrlStateAdapter.d.ts +20 -0
  399. package/dist/next/useNextUrlStateAdapter.d.ts.map +1 -0
  400. package/dist/next/useNextUrlStateAdapter.js +28 -0
  401. package/dist/next/useNextUrlStateAdapter.js.map +1 -0
  402. package/dist/notify-sonner/Toaster.d.ts +8 -0
  403. package/dist/notify-sonner/Toaster.d.ts.map +1 -0
  404. package/dist/notify-sonner/Toaster.js +24 -0
  405. package/dist/notify-sonner/Toaster.js.map +1 -0
  406. package/dist/notify-sonner/index.d.ts +1 -0
  407. package/dist/notify-sonner/index.d.ts.map +1 -1
  408. package/dist/notify-sonner/index.js +2 -0
  409. package/dist/notify-sonner/index.js.map +1 -1
  410. package/dist/notify-sonner/sonnerNotifications.d.ts +1 -1
  411. package/dist/notify-sonner/sonnerNotifications.d.ts.map +1 -1
  412. package/dist/notify-sonner/sonnerNotifications.js +23 -6
  413. package/dist/notify-sonner/sonnerNotifications.js.map +1 -1
  414. package/dist/page/DefinitionList.d.ts +24 -0
  415. package/dist/page/DefinitionList.d.ts.map +1 -0
  416. package/dist/page/DefinitionList.js +20 -0
  417. package/dist/page/DefinitionList.js.map +1 -0
  418. package/dist/page/DetailHeader.d.ts +26 -0
  419. package/dist/page/DetailHeader.d.ts.map +1 -0
  420. package/dist/page/DetailHeader.js +14 -0
  421. package/dist/page/DetailHeader.js.map +1 -0
  422. package/dist/page/EditableCard.d.ts +39 -0
  423. package/dist/page/EditableCard.d.ts.map +1 -0
  424. package/dist/page/EditableCard.js +21 -0
  425. package/dist/page/EditableCard.js.map +1 -0
  426. package/dist/page/EntityDetailShell.d.ts +48 -0
  427. package/dist/page/EntityDetailShell.d.ts.map +1 -0
  428. package/dist/page/EntityDetailShell.js +25 -0
  429. package/dist/page/EntityDetailShell.js.map +1 -0
  430. package/dist/page/EntityListPage.d.ts +30 -0
  431. package/dist/page/EntityListPage.d.ts.map +1 -0
  432. package/dist/page/EntityListPage.js +12 -0
  433. package/dist/page/EntityListPage.js.map +1 -0
  434. package/dist/page/EntityMetadata.d.ts +21 -0
  435. package/dist/page/EntityMetadata.d.ts.map +1 -0
  436. package/dist/page/EntityMetadata.js +39 -0
  437. package/dist/page/EntityMetadata.js.map +1 -0
  438. package/dist/page/EntityTabs.d.ts +38 -0
  439. package/dist/page/EntityTabs.d.ts.map +1 -0
  440. package/dist/page/EntityTabs.js +51 -0
  441. package/dist/page/EntityTabs.js.map +1 -0
  442. package/dist/page/PageFrame.d.ts +18 -2
  443. package/dist/page/PageFrame.d.ts.map +1 -1
  444. package/dist/page/PageFrame.js +8 -2
  445. package/dist/page/PageFrame.js.map +1 -1
  446. package/dist/page/PageHeader.d.ts +27 -0
  447. package/dist/page/PageHeader.d.ts.map +1 -0
  448. package/dist/page/PageHeader.js +16 -0
  449. package/dist/page/PageHeader.js.map +1 -0
  450. package/dist/page/PageLayout.d.ts +15 -0
  451. package/dist/page/PageLayout.d.ts.map +1 -0
  452. package/dist/page/PageLayout.js +10 -0
  453. package/dist/page/PageLayout.js.map +1 -0
  454. package/dist/page/PageToolbar.d.ts +73 -0
  455. package/dist/page/PageToolbar.d.ts.map +1 -0
  456. package/dist/page/PageToolbar.js +49 -0
  457. package/dist/page/PageToolbar.js.map +1 -0
  458. package/dist/page/SectionHeader.d.ts +27 -0
  459. package/dist/page/SectionHeader.d.ts.map +1 -0
  460. package/dist/page/SectionHeader.js +14 -0
  461. package/dist/page/SectionHeader.js.map +1 -0
  462. package/dist/page/StatusCallout.d.ts +28 -0
  463. package/dist/page/StatusCallout.d.ts.map +1 -0
  464. package/dist/page/StatusCallout.js +35 -0
  465. package/dist/page/StatusCallout.js.map +1 -0
  466. package/dist/page/index.d.ts +28 -1
  467. package/dist/page/index.d.ts.map +1 -1
  468. package/dist/page/index.js +18 -0
  469. package/dist/page/index.js.map +1 -1
  470. package/dist/page/links.d.ts +18 -0
  471. package/dist/page/links.d.ts.map +1 -0
  472. package/dist/page/links.js +4 -0
  473. package/dist/page/links.js.map +1 -0
  474. package/dist/primitives/alert.d.ts +17 -0
  475. package/dist/primitives/alert.d.ts.map +1 -0
  476. package/dist/primitives/alert.js +36 -0
  477. package/dist/primitives/alert.js.map +1 -0
  478. package/dist/primitives/badge.d.ts +10 -0
  479. package/dist/primitives/badge.d.ts.map +1 -0
  480. package/dist/primitives/badge.js +30 -0
  481. package/dist/primitives/badge.js.map +1 -0
  482. package/dist/primitives/breadcrumb.d.ts +12 -0
  483. package/dist/primitives/breadcrumb.d.ts.map +1 -0
  484. package/dist/primitives/breadcrumb.js +33 -0
  485. package/dist/primitives/breadcrumb.js.map +1 -0
  486. package/dist/primitives/button.d.ts +10 -8
  487. package/dist/primitives/button.d.ts.map +1 -1
  488. package/dist/primitives/button.js +41 -10
  489. package/dist/primitives/button.js.map +1 -1
  490. package/dist/primitives/card.d.ts +10 -0
  491. package/dist/primitives/card.d.ts.map +1 -0
  492. package/dist/primitives/card.js +29 -0
  493. package/dist/primitives/card.js.map +1 -0
  494. package/dist/primitives/checkbox.d.ts +5 -0
  495. package/dist/primitives/checkbox.d.ts.map +1 -0
  496. package/dist/primitives/checkbox.js +11 -0
  497. package/dist/primitives/checkbox.js.map +1 -0
  498. package/dist/primitives/cn.d.ts +1 -1
  499. package/dist/primitives/cn.d.ts.map +1 -1
  500. package/dist/primitives/cn.js +1 -1
  501. package/dist/primitives/cn.js.map +1 -1
  502. package/dist/primitives/collapsible.d.ts +6 -0
  503. package/dist/primitives/collapsible.d.ts.map +1 -0
  504. package/dist/primitives/collapsible.js +14 -0
  505. package/dist/primitives/collapsible.js.map +1 -0
  506. package/dist/primitives/command.d.ts +19 -0
  507. package/dist/primitives/command.d.ts.map +1 -0
  508. package/dist/primitives/command.js +38 -0
  509. package/dist/primitives/command.js.map +1 -0
  510. package/dist/primitives/dialog.d.ts +17 -9
  511. package/dist/primitives/dialog.d.ts.map +1 -1
  512. package/dist/primitives/dialog.js +39 -14
  513. package/dist/primitives/dialog.js.map +1 -1
  514. package/dist/primitives/dropdown-menu.d.ts +23 -0
  515. package/dist/primitives/dropdown-menu.d.ts.map +1 -0
  516. package/dist/primitives/dropdown-menu.js +48 -0
  517. package/dist/primitives/dropdown-menu.js.map +1 -0
  518. package/dist/primitives/fieldSurface.d.ts +23 -0
  519. package/dist/primitives/fieldSurface.d.ts.map +1 -0
  520. package/dist/primitives/fieldSurface.js +23 -0
  521. package/dist/primitives/fieldSurface.js.map +1 -0
  522. package/dist/primitives/index.d.ts +24 -5
  523. package/dist/primitives/index.d.ts.map +1 -1
  524. package/dist/primitives/index.js +25 -5
  525. package/dist/primitives/index.js.map +1 -1
  526. package/dist/primitives/input.d.ts +12 -0
  527. package/dist/primitives/input.d.ts.map +1 -0
  528. package/dist/primitives/input.js +20 -0
  529. package/dist/primitives/input.js.map +1 -0
  530. package/dist/primitives/label.d.ts +5 -0
  531. package/dist/primitives/label.d.ts.map +1 -0
  532. package/dist/primitives/label.js +10 -0
  533. package/dist/primitives/label.js.map +1 -0
  534. package/dist/primitives/listSurface.d.ts +8 -0
  535. package/dist/primitives/listSurface.d.ts.map +1 -0
  536. package/dist/primitives/listSurface.js +8 -0
  537. package/dist/primitives/listSurface.js.map +1 -0
  538. package/dist/primitives/popover.d.ts +11 -0
  539. package/dist/primitives/popover.d.ts.map +1 -0
  540. package/dist/primitives/popover.js +31 -0
  541. package/dist/primitives/popover.js.map +1 -0
  542. package/dist/primitives/portal.d.ts +16 -0
  543. package/dist/primitives/portal.d.ts.map +1 -0
  544. package/dist/primitives/portal.js +9 -0
  545. package/dist/primitives/portal.js.map +1 -0
  546. package/dist/primitives/select.d.ts +20 -8
  547. package/dist/primitives/select.d.ts.map +1 -1
  548. package/dist/primitives/select.js +46 -12
  549. package/dist/primitives/select.js.map +1 -1
  550. package/dist/primitives/separator.d.ts +5 -0
  551. package/dist/primitives/separator.d.ts.map +1 -0
  552. package/dist/primitives/separator.js +10 -0
  553. package/dist/primitives/separator.js.map +1 -0
  554. package/dist/primitives/sheet.d.ts +14 -8
  555. package/dist/primitives/sheet.d.ts.map +1 -1
  556. package/dist/primitives/sheet.js +42 -11
  557. package/dist/primitives/sheet.js.map +1 -1
  558. package/dist/primitives/skeleton.d.ts +3 -0
  559. package/dist/primitives/skeleton.d.ts.map +1 -0
  560. package/dist/primitives/skeleton.js +7 -0
  561. package/dist/primitives/skeleton.js.map +1 -0
  562. package/dist/primitives/switch.d.ts +7 -0
  563. package/dist/primitives/switch.d.ts.map +1 -0
  564. package/dist/primitives/switch.js +10 -0
  565. package/dist/primitives/switch.js.map +1 -0
  566. package/dist/primitives/table.d.ts +11 -0
  567. package/dist/primitives/table.d.ts.map +1 -0
  568. package/dist/primitives/table.js +30 -0
  569. package/dist/primitives/table.js.map +1 -0
  570. package/dist/primitives/textarea.d.ts +4 -0
  571. package/dist/primitives/textarea.d.ts.map +1 -0
  572. package/dist/primitives/textarea.js +11 -0
  573. package/dist/primitives/textarea.js.map +1 -0
  574. package/dist/primitives/tooltip.d.ts +8 -0
  575. package/dist/primitives/tooltip.d.ts.map +1 -0
  576. package/dist/primitives/tooltip.js +21 -0
  577. package/dist/primitives/tooltip.js.map +1 -0
  578. package/dist/provider/AdminUiProvider.d.ts +8 -6
  579. package/dist/provider/AdminUiProvider.d.ts.map +1 -1
  580. package/dist/provider/AdminUiProvider.js +37 -22
  581. package/dist/provider/AdminUiProvider.js.map +1 -1
  582. package/dist/provider/adminUiContext.d.ts +6 -0
  583. package/dist/provider/adminUiContext.d.ts.map +1 -0
  584. package/dist/provider/adminUiContext.js +9 -0
  585. package/dist/provider/adminUiContext.js.map +1 -0
  586. package/dist/provider/index.d.ts +4 -2
  587. package/dist/provider/index.d.ts.map +1 -1
  588. package/dist/provider/index.js +4 -1
  589. package/dist/provider/index.js.map +1 -1
  590. package/dist/provider/storageKey.d.ts +4 -0
  591. package/dist/provider/storageKey.d.ts.map +1 -0
  592. package/dist/provider/storageKey.js +3 -0
  593. package/dist/provider/storageKey.js.map +1 -0
  594. package/dist/provider/types.d.ts +38 -6
  595. package/dist/provider/types.d.ts.map +1 -1
  596. package/dist/scripts/build-i18n-manifest.mjs +138 -0
  597. package/dist/scripts/check-radix.mjs +131 -0
  598. package/dist/scripts/check-tokens.mjs +236 -0
  599. package/dist/theme.css +15 -11
  600. package/dist/tokens.json +388 -53
  601. package/dist/translations/FormTranslatableFields.d.ts +30 -0
  602. package/dist/translations/FormTranslatableFields.d.ts.map +1 -0
  603. package/dist/translations/FormTranslatableFields.js +58 -0
  604. package/dist/translations/FormTranslatableFields.js.map +1 -0
  605. package/dist/translations/TranslatableField.d.ts +48 -0
  606. package/dist/translations/TranslatableField.d.ts.map +1 -0
  607. package/dist/translations/TranslatableField.js +44 -0
  608. package/dist/translations/TranslatableField.js.map +1 -0
  609. package/dist/translations/TranslatableInput.d.ts +14 -0
  610. package/dist/translations/TranslatableInput.d.ts.map +1 -0
  611. package/dist/translations/TranslatableInput.js +15 -0
  612. package/dist/translations/TranslatableInput.js.map +1 -0
  613. package/dist/translations/TranslatableMarkdown.d.ts +21 -0
  614. package/dist/translations/TranslatableMarkdown.d.ts.map +1 -0
  615. package/dist/translations/TranslatableMarkdown.js +12 -0
  616. package/dist/translations/TranslatableMarkdown.js.map +1 -0
  617. package/dist/translations/TranslationControls.d.ts +22 -0
  618. package/dist/translations/TranslationControls.d.ts.map +1 -0
  619. package/dist/translations/TranslationControls.js +31 -0
  620. package/dist/translations/TranslationControls.js.map +1 -0
  621. package/dist/translations/index.d.ts +30 -1
  622. package/dist/translations/index.d.ts.map +1 -1
  623. package/dist/translations/index.js +17 -1
  624. package/dist/translations/index.js.map +1 -1
  625. package/package.json +27 -29
  626. package/dist/data/StatTile.d.ts +0 -8
  627. package/dist/data/StatTile.d.ts.map +0 -1
  628. package/dist/data/StatTile.js +0 -6
  629. package/dist/data/StatTile.js.map +0 -1
  630. package/dist/data/index.d.ts +0 -2
  631. package/dist/data/index.d.ts.map +0 -1
  632. package/dist/data/index.js +0 -2
  633. package/dist/data/index.js.map +0 -1
  634. package/dist/glass/GlassPanel.d.ts +0 -7
  635. package/dist/glass/GlassPanel.d.ts.map +0 -1
  636. package/dist/glass/GlassPanel.js +0 -5
  637. package/dist/glass/GlassPanel.js.map +0 -1
  638. package/dist/i18n/m.d.ts +0 -7
  639. package/dist/i18n/m.d.ts.map +0 -1
  640. package/dist/i18n/m.js +0 -7
  641. package/dist/i18n/m.js.map +0 -1
  642. package/dist/list/ClearFiltersButton.d.ts +0 -7
  643. package/dist/list/ClearFiltersButton.d.ts.map +0 -1
  644. package/dist/list/ClearFiltersButton.js +0 -10
  645. package/dist/list/ClearFiltersButton.js.map +0 -1
  646. package/dist/list/DateCell.d.ts +0 -8
  647. package/dist/list/DateCell.d.ts.map +0 -1
  648. package/dist/list/DateCell.js +0 -12
  649. package/dist/list/DateCell.js.map +0 -1
  650. package/dist/logic/pure/errors.d.ts +0 -3
  651. package/dist/logic/pure/errors.d.ts.map +0 -1
  652. package/dist/logic/pure/errors.js +0 -5
  653. package/dist/logic/pure/errors.js.map +0 -1
  654. package/dist/logic/pure/statusMap.d.ts +0 -12
  655. package/dist/logic/pure/statusMap.d.ts.map +0 -1
  656. package/dist/logic/pure/statusMap.js +0 -5
  657. package/dist/logic/pure/statusMap.js.map +0 -1
  658. package/dist/logic/react/useToggle.d.ts +0 -8
  659. package/dist/logic/react/useToggle.d.ts.map +0 -1
  660. package/dist/logic/react/useToggle.js +0 -9
  661. package/dist/logic/react/useToggle.js.map +0 -1
  662. package/dist/next/useNextSearchParam.d.ts +0 -3
  663. package/dist/next/useNextSearchParam.d.ts.map +0 -1
  664. package/dist/next/useNextSearchParam.js +0 -16
  665. package/dist/next/useNextSearchParam.js.map +0 -1
  666. package/dist/primitives/portalContainer.d.ts +0 -8
  667. package/dist/primitives/portalContainer.d.ts.map +0 -1
  668. package/dist/primitives/portalContainer.js +0 -12
  669. package/dist/primitives/portalContainer.js.map +0 -1
  670. package/dist/translations/TranslatableInputField.d.ts +0 -8
  671. package/dist/translations/TranslatableInputField.d.ts.map +0 -1
  672. package/dist/translations/TranslatableInputField.js +0 -12
  673. package/dist/translations/TranslatableInputField.js.map +0 -1
  674. package/docs/README.md +0 -11
  675. package/scripts/check-tokens.mjs +0 -136
  676. package/scripts/lib/i18n-manifest.mjs +0 -91
  677. package/scripts/lib/source-scan.mjs +0 -258
package/STANDARDS.md ADDED
@@ -0,0 +1,385 @@
1
+ # STANDARDS — how every list and detail screen is built
2
+
3
+ One presentation everywhere: a screen keeps its data and behaviour and takes its look from the blocks. Delete the
4
+ local copy when you adopt a block; never keep a screen-local `FilterField`, `Muted`, `StatusBadge`, tab shell, date
5
+ helper or checkbox column. Request bodies and filter strings stay exactly as they are.
6
+
7
+ Where the names below come from (setup and the entry list: [`README.md`](./README.md)):
8
+
9
+ | Entry | Names used here |
10
+ |---|---|
11
+ | `@mgamadeus/ddd-admin-ui/logic` | `useUrlListState`, `useRowSelection`, `useEntityDrawer`, `drawerKey`, `defineStatusMap`, `formatDate`, `formatDateTime`, `runSequentialWithSummary` |
12
+ | `@mgamadeus/ddd-admin-ui/list` | `EntityListToolbar`, `EntityListBody`, `EntityListTable`, `EntityListViewToggle`, `EntityListBulkBar`, `FilterPanel`, `FilterText`, `FilterSelect`, `FilterMultiSelect`, `FilterDateRange`, `YES_NO_FILTER_OPTIONS`, `StatusBadge`, `IdCell`, `DateCell`, `BooleanCell`, `ImageCell`, `EmptyValue`, `orEmpty`, `MultiSelect`, `ChipToggleGroup`, `Combobox`, `Tag` |
13
+ | `@mgamadeus/ddd-admin-ui/page` | `EntityListPage`, `PageToolbar`, `ExportButton`, `AddEntityButton`, `EntityDetailShell`, `SectionHeader`, `DefinitionList`, `EditableCard`, `IconValue`, `IconValueRow`, `PageSections`, `CardGrid`, `PageFrame`, `PageHeader` |
14
+ | `@mgamadeus/ddd-admin-ui/form` | `FormDrawer`, `FormActions`, `FormField`, `FormSection`, `useConfirmDialog` |
15
+ | `@mgamadeus/ddd-admin-ui/glass` | `QuickFilterPills`, `CollapsibleCard`, `GlassGroup`, `ActionRow` |
16
+ | `@mgamadeus/ddd-admin-ui/primitives` | `Button`, `Card`, `CardContent` |
17
+ | `@mgamadeus/ddd-admin-ui/next` | `useNextUrlStateAdapter`, `useNextDrawerUrlAdapter`, `useListViewParam` |
18
+
19
+ Every screen renders below `AdminUiProvider`.
20
+
21
+ ## 1. List state — `useUrlListState`
22
+
23
+ One hook for search + filters, in the URL, 350 ms debounce. Keys = URL parameter names, a module constant.
24
+
25
+ ```tsx
26
+ import { useUrlListState } from '@mgamadeus/ddd-admin-ui/logic';
27
+ import { useNextUrlStateAdapter } from '@mgamadeus/ddd-admin-ui/next'; // or the host's own `UrlStateAdapter`
28
+
29
+ const LIST_KEYS = ['q', 'worldId', 'status', 'createdFrom', 'createdTo'] as const;
30
+
31
+ const list = useUrlListState(LIST_KEYS, { adapter: useNextUrlStateAdapter({ listId: 'admin.campaigns' }), uncounted: ['q'] });
32
+ // inputs: list.values.q / list.setValue('q', value)
33
+ // request: build the filter string from list.debounced (never from list.values)
34
+ // multi: list.getList('status') / list.setList('status', next) → `?status=RUNNING,PAUSED`
35
+ // reset: list.clear() counts: list.activeFilterCount (panel), list.isActive (empty state)
36
+ ```
37
+
38
+ The screen renders inside `<Suspense>`. Build filters with the `@mgamadeus/ddd-web/query` builders.
39
+ `listId` is the list's stable id (a module constant) under which the host adapter remembers the list: e.g. the view in
40
+ localStorage, the filters in this tab's sessionStorage.
41
+
42
+ ## 2. Toolbar and filters
43
+
44
+ Search left, Filters toggle with count, one "Clear filters", scope pickers in `trailing`, view toggle last, bulk bar
45
+ below. Filters go **only** in the panel (never in `trailing`, never as an inline header row).
46
+
47
+ ```tsx
48
+ <EntityListToolbar
49
+ search={{ value: list.values.q, onChange: value => list.setValue('q', value), placeholder: 'Search name or ID' }}
50
+ filters={
51
+ <FilterPanel>
52
+ <FilterText label="ID" inputMode="numeric" value={list.values.id} onChange={value => list.setValue('id', value)} />
53
+ <FilterSelect label="World" allLabel="All Worlds" options={worldOptions} value={list.values.worldId}
54
+ onChange={value => list.setValue('worldId', value)} />
55
+ <FilterMultiSelect label="Status" options={STATUS_OPTIONS} value={list.getList('status')}
56
+ onChange={next => list.setList('status', next)} />
57
+ <FilterDateRange label="Created" from={list.values.createdFrom} to={list.values.createdTo}
58
+ onFromChange={value => list.setValue('createdFrom', value)} onToChange={value => list.setValue('createdTo', value)} />
59
+ </FilterPanel>
60
+ }
61
+ activeFilterCount={list.activeFilterCount}
62
+ onClearFilters={list.clear}
63
+ viewToggle={<EntityListViewToggle displayMode={displayMode} onDisplayModeChange={setDisplayMode} />}
64
+ bulkBar={bulkBar}
65
+ />
66
+ ```
67
+
68
+ - `FilterSelect`: `''` = All (`allLabel`), searchable automatically from 10 options (`searchable` to force).
69
+ - Yes / No filters: `options={YES_NO_FILTER_OPTIONS}` (`'1'` / `'0'`).
70
+ - Body: `isSearchActive={list.isActive}` and `onClearSearch={list.clear}` on `EntityListBody`.
71
+ - Search modes (e.g. an AI search next to the text search): the mode switch goes in `search.leading` (it replaces the
72
+ magnifier at the same spot, ≤ 24 px), Enter / Escape in `search.onKeyDown`. Never lay a control over the field from
73
+ outside.
74
+
75
+ ## 3. Page toolbar (header actions)
76
+
77
+ Order: outline secondaries → `ExportButton` → `MoreActionsMenu` (rare / maintenance) → **one** primary
78
+ `AddEntityButton` ("Add <Entity>", singular, top right; `label` replaces the whole text when an entity name does not
79
+ fit, already translated). Every write control `disabled={!writesAllowed}`.
80
+
81
+ ```tsx
82
+ <EntityListPage
83
+ title="Campaigns"
84
+ headerActions={
85
+ <PageToolbar
86
+ exportAction={<ExportButton onExport={handleExport} disabled={!writesAllowed} />}
87
+ moreActions={[{ id: 'recalc', label: 'Recalculate rankings', icon: <RefreshCw />, onSelect: handleRecalc,
88
+ disabled: !writesAllowed }]}
89
+ primaryAction={<AddEntityButton entity="Campaign" href="/campaigns/create" linkComponent={Link}
90
+ disabled={!writesAllowed} />}
91
+ >
92
+ <Button variant="outline" onClick={openImport}>Import</Button>
93
+ </PageToolbar>
94
+ }
95
+ toolbar={…}
96
+ >
97
+ ```
98
+
99
+ `ExportButton` label defaults to "Export to Excel"; a returned promise shows the spinner.
100
+
101
+ ## 4. Selection and bulk actions
102
+
103
+ ```tsx
104
+ const selection = useRowSelection({
105
+ items: list.items, // useGrowingWindowList().items
106
+ getKey: track => toNumericId(track.id), // a host helper
107
+ resetKey: filterString ?? '', // new filters → empty selection
108
+ disabled: busy,
109
+ });
110
+
111
+ const handleBulkDelete = async () => {
112
+ if (!writesAllowed || !(await confirm({ title: `Delete ${selection.count} track(s)?`, confirmVariant: 'destructive',
113
+ confirmLabel: 'Delete' }))) return;
114
+ setBusy(true);
115
+ await runSequentialWithSummary(selection.selectedKeys, id => deleteTrack({ trackId: id }).unwrap(),
116
+ { progress: 'Deleting', done: 'Deleted', noun: 'track' });
117
+ setBusy(false);
118
+ selection.clear();
119
+ };
120
+
121
+ const bulkBar = (
122
+ <EntityListBulkBar
123
+ selection={selection}
124
+ actions={[{ id: 'recreate', label: 'Recreate', icon: <RotateCcw />, onClick: handleBulkRecreate }]}
125
+ onDelete={handleBulkDelete}
126
+ disabled={!writesAllowed}
127
+ busy={busy}
128
+ />
129
+ );
130
+
131
+ <EntityListBody … selection={selection} />
132
+ ```
133
+
134
+ Never a hand-made checkbox column, never `Promise.all` for bulk writes. A job that needs a result summary or a typed
135
+ confirmation uses the host's dialogs.
136
+
137
+ ## 5. Columns and cells
138
+
139
+ Order: [select] → image → **ID** → name (link) → relations → type / attributes → **Status** → flags → Start / End →
140
+ **Created / Updated** → **Actions**. Title Case headers. Every table with a detail route sets `rowAction`.
141
+
142
+ ```tsx
143
+ const columns: EntityListColumn<Campaign>[] = [
144
+ { id: 'image', header: 'Image', cell: c => <ImageCell src={mediaSizedUrl(c.coverImage?.publicUrl, 'SMALL')} alt="" />,
145
+ className: 'w-16' },
146
+ { id: 'id', header: 'ID', cell: c => <IdCell id={c.id} copyable />, className: 'w-20' },
147
+ { id: 'name', header: 'Name', cell: c => <Link href={campaignRoute(c.id)} className="font-medium hover:underline">
148
+ {c.name}</Link> },
149
+ { id: 'world', header: 'World', cell: c => orEmpty(c.world?.name) },
150
+ { id: 'status', header: 'Status', cell: c => <StatusBadge value={c.status} map={CAMPAIGN_STATUS} /> },
151
+ { id: 'landingpage', header: 'Landing Page', cell: c => <BooleanCell value={c.landingpageEnabled} /> },
152
+ { id: 'start', header: 'Start', cell: c => <DateCell value={c.startDate} format="date" /> },
153
+ { id: 'created', header: 'Created', cell: c => <DateCell value={c.changeHistory?.createdTime} /> },
154
+ { id: 'updated', header: 'Updated', cell: c => <DateCell value={c.changeHistory?.modifiedTime} /> },
155
+ { id: 'actions', header: <span className="sr-only">Actions</span>, className: 'w-24 text-right', cell: c => (
156
+ <div className="flex justify-end gap-1">
157
+ <Button variant="ghost" size="icon-sm" aria-label={`Edit ${c.name}`} …><Pencil /></Button>
158
+ <Button variant="ghost" size="icon-sm" aria-label={`Delete ${c.name}`} className="text-destructive"
159
+ disabled={!writesAllowed} …><Trash2 /></Button>
160
+ </div>
161
+ ) },
162
+ ];
163
+ ```
164
+
165
+ - Empty = `<EmptyValue />` / `orEmpty(value)` → `—`. Never `-`, `N/A`, `''` or a local `Muted`.
166
+ - Dates: `DateCell` in tables, `formatDateTime` / `formatDate` in text. Never raw strings, never
167
+ `toLocaleString()`, never `new Date(value)`.
168
+ - Numbers and ids: the host's formatters (one per kind), never ad-hoc `toFixed` calls.
169
+ - Copy next to a value outside the ID column: a copy button on `useCopyToClipboard`.
170
+
171
+ ## 6. Status badges
172
+
173
+ One family map per enum, defined once in the host with `defineStatusMap` (e.g. `CAMPAIGN_STATUS`, `DELIVERY_STATUS` +
174
+ a `deliveryStatusOf` mapper for a boolean). A new enum gets a map there.
175
+
176
+ ```tsx
177
+ <StatusBadge value={challenge.status} map={CHALLENGE_STATUS} />
178
+ <StatusBadge value={deliveryStatusOf(push.sentSuccessfully)} map={DELIVERY_STATUS} />
179
+ <StatusBadge tone="highlight" label="Electric" icon={Zap} /> // one-off flag
180
+ ```
181
+
182
+ Tones: `neutral` not started / inactive · `info` finished / informational · `success` running / active / done ·
183
+ `warning` paused / pending / needs action · `danger` failed / cancelled · `highlight` featured flag · `brand` identity.
184
+ Always with an icon.
185
+
186
+ ## 7. Multi-select inputs
187
+
188
+ - Filters: `FilterMultiSelect` (above).
189
+ - Forms (roles, worlds, languages): `MultiSelect` inside `FormField`; a short fixed set (≤ ~8, fully visible):
190
+ `ChipToggleGroup`.
191
+
192
+ ```tsx
193
+ <FormField name="roles" label="Roles">
194
+ {({ field, control, disabled }) => (
195
+ <MultiSelect id={control.id} options={ROLE_OPTIONS} value={field.value} onChange={field.onChange}
196
+ aria-label="Roles" maxChips={Infinity} disabled={disabled} />
197
+ )}
198
+ </FormField>
199
+
200
+ <ChipToggleGroup aria-label="Supported Languages" options={localeOptions} value={value} onChange={onChange} />
201
+ <ChipToggleGroup mode="single" aria-label="Interval" options={INTERVALS} value={interval} onChange={setInterval} />
202
+ ```
203
+
204
+ Single searchable select (not a filter): `Combobox`.
205
+
206
+ ## 8. Detail screens — `EntityDetailShell`
207
+
208
+ Every entity detail (World, Campaign, Challenge, Account, Partner, Track, Ticket …) uses the shell: back + centred
209
+ title + description + actions, `EntityMetadata` (ID, Created, Updated), centred segmented route tabs, loading and
210
+ error. Full width (§ 10); the header is `DetailHeader`, `nested` inside another shell.
211
+
212
+ ```tsx
213
+ export const CampaignShell = ({ campaignId, children }: CampaignShellProps) => {
214
+ const pathname = usePathname();
215
+ const query = useCampaignQuery(campaignId);
216
+ const campaign = query.data?.campaign;
217
+ return (
218
+ <EntityDetailShell
219
+ title={campaign?.name}
220
+ fallbackTitle={`Campaign #${campaignId}`}
221
+ description={campaign?.world?.name}
222
+ back={{ href: '/campaigns', label: 'Back to campaigns' }}
223
+ linkComponent={Link}
224
+ metadata={{ id: campaign?.id, changeHistory: campaign?.changeHistory }}
225
+ tabs={CAMPAIGN_TABS.map(tab => ({ id: tab.segment, label: tab.label, href: campaignRoute(campaignId, tab.segment) }))}
226
+ currentPath={pathname}
227
+ tabsLabel="Campaign sections"
228
+ isLoading={query.isLoading}
229
+ error={!query.isLoading && !campaign ? (query.isError ? 'This campaign could not be loaded.' : 'Campaign not found.') : undefined}
230
+ actions={<PageToolbar moreActions={…} />}
231
+ >
232
+ {children}
233
+ </EntityDetailShell>
234
+ );
235
+ };
236
+ ```
237
+
238
+ Inside a tab:
239
+
240
+ ```tsx
241
+ <SectionHeader title="Rankings" description="Top riders of this challenge"
242
+ tabs={[{ id: 'accounts', label: 'Accounts' }, { id: 'teams', label: 'Teams' }]}
243
+ activeTab={tab} onTabSelect={setTab} actions={<ExportButton onExport={exportRankings} />} />
244
+
245
+ <Card><CardContent>
246
+ <DefinitionList columns={3} items={[
247
+ { label: 'Access Code', value: world.accessCode },
248
+ { label: 'Start', value: <DateCell value={world.startDate} format="date" /> },
249
+ { label: 'Description', value: world.description, wide: true },
250
+ ]} />
251
+ </CardContent></Card>
252
+ ```
253
+
254
+ Create screens: no `metadata` id yet → the strip renders nothing. Edit screens outside a shell keep
255
+ `<EntityMetadata id={…} changeHistory={…} />` right under their `FormHeader`.
256
+
257
+ ## 9. Host-specific shared components
258
+
259
+ Host-specific shared components (the markdown editor passed to `FormTranslatableMarkdown` as `renderEditor`, a
260
+ colour input, copy buttons, dialogs, number / id formatters) are documented by the host; the blocks take them as props
261
+ or render slots and never import them.
262
+
263
+ ## 10. Clouds look — surfaces, tabs, titles, read-first cards
264
+
265
+ The look lives in the blocks; a screen never re-draws it.
266
+
267
+ - **No main panel.** Page titles and toolbars sit on the cloud background; content goes into cards. Never wrap a page
268
+ in a big white box, never hand-draw `rounded-xl border bg-card` — use `Card` (primitives), `FormSection`,
269
+ `EditableCard` or, for a custom frame (a chat column, a map), the `.surface rounded-2xl` classes.
270
+ - **Surfaces** are translucent (88 %) with a 12 px blur and the soft three-layer shadow, no border. Nested surfaces
271
+ drop the blur by themselves. Menus, popovers, dialogs and sheets stay opaque.
272
+ - **Widths and inset** come from the shell: every page is full width at the one page inset
273
+ (`PAGE_INSET_CLASS`, shared by the shell column, `PageFrame` and `EntityListPage`); only a one-column `FormWrapper`
274
+ (narrow) stays `max-w-2xl` — its `FormHeader` sits outside the wrapper. Never add a page-level `max-w-*`, never a
275
+ hand-made `data-page-frame` / `--app-gap` frame (use `PageFrame`).
276
+ - **Headers**: `PageHeader` (lists, dashboards, maintenance, frames) or `DetailHeader` (via `EntityDetailShell` /
277
+ `FormHeader`: details and form pages). Inside another entity's shell pass `nested` (an `h2`). Never a raw `h1`.
278
+ - **List cards**: every list — page or detail tab — is an `EntityListCard` (`label`, `toolbar`, body); never a
279
+ `section.surface` with a hand-made toolbar row. Header → card gap comes from `SectionHeader` (never `className="mb-0"`
280
+ in a `space-y-*` stack: it removes the gap).
281
+ - **Tabs** are the segmented pill control: `EntityDetailShell` centres them under the centred title; standalone tab
282
+ bars use `EntityTabs` as is; sub-tabs of a section are `SectionHeader tabs`
283
+ (compact). Never a hand-made underline or pill bar.
284
+ - **Two-tone titles**: wrap the brand part in `<em>` — `title={<>Bike <em>Types</em></>}` (pass `label="Bike Types"` to
285
+ `EntityListPage` then). Only where a title earns it (Home, section headers), not on every list.
286
+ - **Sticky glass bars**: page forms get them from `FormActions` (`sticky={false}` inside a dialog); the bulk bar from
287
+ `EntityListBulkBar`.
288
+
289
+ ```tsx
290
+ <PageSections>
291
+ <section>
292
+ <SectionHeader title={<>General <em>settings</em></>} />
293
+ <CardGrid>
294
+ <EditableCard title="Access" onEdit={openAccessForm} editLabel="Edit access" editDisabled={!writesAllowed}>
295
+ <IconValueRow>
296
+ <IconValue icon={<KeyRound />}>{world.accessCode ?? <EmptyValue />}</IconValue>
297
+ <IconValue icon={<Calendar />}><DateCell value={world.startDate} format="date" /></IconValue>
298
+ </IconValueRow>
299
+ </EditableCard>
300
+ <EditableCard title="Languages" onEdit={openLanguagesForm} editLabel="Edit languages" editDisabled={!writesAllowed}>
301
+ <div className="flex flex-wrap gap-2">
302
+ {locales.map(locale => <Tag key={locale} tone={locale === defaultLocale ? 'primary' : 'default'}>{locale}</Tag>)}
303
+ </div>
304
+ </EditableCard>
305
+ </CardGrid>
306
+ </section>
307
+ </PageSections>
308
+ ```
309
+
310
+ ## 11. Glass tone — quick filters, collapsible cards, group panels
311
+
312
+ Blocks in `glass/`.
313
+
314
+ ```tsx
315
+ // Status quick filters on the clouds: the same list key as the panel's Status field.
316
+ <EntityListPage
317
+ belowHeader={
318
+ <QuickFilterPills aria-label="Status quick filters" allLabel="All Statuses" options={STATUS_OPTIONS}
319
+ value={list.values.status} onChange={value => list.setValue('status', value)} />
320
+ }
321
+ …
322
+ />
323
+ // multi: mode="multi" value={list.getList('status')} onChange={next => list.setList('status', next)}
324
+
325
+ // A collapsible group inside a form card (fields stay mounted unless `forceMount={false}`).
326
+ <CollapsibleCard density="compact" defaultOpen={false} title="Primary" description="Buttons, links…"
327
+ meta={<span className="size-6 rounded-md border" style={{ backgroundColor: preview }} />}>
328
+ …fields…
329
+ </CollapsibleCard>
330
+
331
+ // A grouped to-do list on the clouds: glass group (no shadow) + solid rows.
332
+ <GlassGroup title="Running" count={cards.length} limit={8} emptyText="No challenges">
333
+ {cards.map(card => (
334
+ <Link key={card.id} href={…}><ActionRow as="span" interactive title={card.name} description={card.context}
335
+ tone={CHALLENGE_STATUS[card.status].tone} toneLabel={CHALLENGE_STATUS[card.status].label} /></Link>
336
+ ))}
337
+ </GlassGroup>
338
+ ```
339
+
340
+ - Never invent counts for pills; pass `count` only when the screen already has it.
341
+ - A glass container (`GlassGroup`, glass `CollapsibleCard`) casts no shadow; its solid rows do.
342
+ - Status inside rows and tables stays `StatusBadge`; the `ActionRow` dot is labelled (`toneLabel`).
343
+
344
+ ## 12. Side drawers — `useEntityDrawer` + `FormDrawer`
345
+
346
+ **Drawer** when all hold: no own tabs or sub-lists · ≤ ~15 fields · edited from its list · no large working surface
347
+ (map, conversation, preview + send). **Page** otherwise. Entities with a drawer also create in it (the list's Add
348
+ button).
349
+
350
+ ```tsx
351
+ // The list screen (inside <Suspense>): drawer state in the URL next to the filters — `?edit=<id>` / `?create=1`.
352
+ const drawer = useEntityDrawer({ adapter: useNextDrawerUrlAdapter() }); // ./next, or the host's own adapter
353
+
354
+ <AddEntityButton entity="Sponsor" onClick={drawer.openCreate} disabled={!writesAllowed} />
355
+ rowAction={sponsor => () => drawer.openEdit(id)}
356
+ <Link href={sponsorEditRoute(id)} onClick={drawer.editLinkClick(id)}>{sponsor.name}</Link> // middle click = new tab
357
+ <SponsorFormDrawer drawer={drawer} />
358
+
359
+ // The module's drawer: loads the entity for the header, renders the existing form inside.
360
+ const shown = drawer.shown; // stays set while the close animation runs
361
+ const id = shown?.mode === 'edit' ? shown.id : undefined;
362
+ const query = useGet…Query({ …, id: id ?? '' }, { skip: id === undefined });
363
+ const entity = id ? (query.currentData?.sponsor ?? null) : null; // currentData: never the previous row's
364
+ <FormDrawer open={drawer.isOpen} onClose={drawer.close} title={entity?.name ?? `Sponsor #${id}`}
365
+ metadata={entity ? { id: entity.id, changeHistory: entity.changeHistory } : undefined}>
366
+ <SponsorForm key={drawerKey(shown)} sponsor={entity} onClose={drawer.close} />
367
+ </FormDrawer>
368
+ ```
369
+
370
+ - **One form, no copy.** The page form takes `onClose` instead of routing: Cancel = `confirmDiscard()` then
371
+ `onClose()`; a save resets the form's baseline (`form.reset(values, { keepValues: true })`), toasts and calls
372
+ `onClose()`. `FormActions` moves into the drawer's pinned footer by itself (change status left, buttons right); the
373
+ ✕, Esc and an overlay click ask "Discard changes?" through `useUnsavedChangesGuard`. Request bodies stay as they are.
374
+ - **Header**: entity title + `EntityMetadata variant="inline"` (ID · Created · Updated, one line) via `metadata`;
375
+ create passes a `description` instead. Entity actions that are no save (e.g. "Open as partner", "Reset password")
376
+ go into `headerActions` (outline `sm` buttons at the right end of the header); the save stays in the footer.
377
+ - **History**: opening pushes an entry (Back closes the drawer); `close()` pops it when this page opened the drawer and
378
+ removes the parameter otherwise (a link, a reload). A create that turns into the new entity's edit uses
379
+ `openEdit(newId, { replace: true })`. The writes are shallow (`history.pushState`): the list stays mounted.
380
+ - **Detail routes** (`/<entity>/:id`, `/create`) can stay as redirects to the list with the parameter. Route helpers
381
+ (`sponsorEditRoute`) live in a non-client file (a server page calls them).
382
+ - A list hosting two drawers passes its own `editKey` / `createKey`.
383
+ - **Confirm**: the drawer asks through the package dialog; a host with its own confirmation service passes
384
+ `confirm={hostConfirm}` (stable function, same Radix copy). The same prop exists on the translatable fields.
385
+ - One column inside the drawer (≤ 760 px): no `md:grid-cols-2` form grids.
@@ -1,42 +1,187 @@
1
1
  /*
2
- * @mgamadeus/ddd-admin-ui — structure the blocks rely on.
3
- * Colours are read only through the host's Tailwind theme (--theme(--color-…)), never through bare role variables;
4
- * layout values and alphas are plain custom properties the host sets (see tokens.json).
5
- * Import after `@import "tailwindcss";` (and after theme.css when the host uses it).
6
- */
2
+ Structural CSS of the blocks and primitives. Import it after `tailwindcss` (and `theme.css`). Colours come from the
3
+ host's Tailwind theme (`--theme(--color-…)`), alphas and shadows from plain custom properties the host sets on
4
+ `:root` and `.dark` (`--surface-alpha`, `--surface-shadow`, `--glass-alpha`, `--surface-glass-alpha`,
5
+ `--surface-glass-strong-alpha`, `--glass-shadow`, `--glass-control-shadow`).
6
+ */
7
+ @source './';
7
8
 
8
- /* Lets the host's Tailwind scan this package's built files for class names. */
9
- @source "./";
10
-
11
- /* Layer scale: defaults with zero specificity, so any host value wins. */
12
- :where(:root) {
13
- --layer-raised: 10;
14
- --layer-sticky: 20;
15
- --layer-overlay: 50;
16
- --layer-popover: 50;
9
+ /* Layer scale. The blocks and primitives stack with `z-(--layer-<name>)`; these are only defaults: zero specificity
10
+ (`:where`) in the lowest cascade layer (`theme`), so any host declaration of a `--layer-*` variable wins, layered or
11
+ not. Equal overlay / popover values: a later portal paints on top. */
12
+ @layer theme {
13
+ :where(:root) {
14
+ --layer-raised: 10;
15
+ --layer-sticky: 20;
16
+ --layer-overlay: 50;
17
+ --layer-popover: 50;
18
+ }
17
19
  }
18
20
 
21
+ /* Fluid heading scale: page title 28–36 px, section 20–24 px, card title 18–20 px. */
19
22
  @utility text-title-page {
20
- font-size: 1.5rem;
21
- line-height: 2rem;
22
- font-weight: 600;
23
- letter-spacing: -0.01em;
23
+ font-size: clamp(1.75rem, 1.4rem + 0.6vw, 2.25rem);
24
+ line-height: 1.2;
25
+ }
26
+
27
+ @utility text-title-section {
28
+ font-size: clamp(1.25rem, 1.1rem + 0.3vw, 1.5rem);
29
+ line-height: 1.3;
30
+ }
31
+
32
+ @utility text-title-card {
33
+ font-size: clamp(1.125rem, 1.05rem + 0.15vw, 1.25rem);
34
+ line-height: 1.4;
24
35
  }
25
36
 
37
+ @utility animate-shimmer {
38
+ animation: shimmer 2s infinite;
39
+ }
40
+
41
+ @keyframes shimmer {
42
+ 0% {
43
+ transform: translateX(-100%);
44
+ }
45
+ 100% {
46
+ transform: translateX(100%);
47
+ }
48
+ }
49
+
50
+ /* The card surface over the page background: translucent card colour, 12 px backdrop blur, three-layer soft shadow,
51
+ no border. The radius comes from the element (`rounded-2xl`). A surface inside a surface (grid cards in the list
52
+ card, cards in a card) skips the blur: its backdrop is already frosted. In `components` so a `shadow-*` / `bg-*`
53
+ utility on the same element still wins. */
26
54
  @layer components {
27
55
  .surface {
28
56
  background-color: color-mix(in oklab, --theme(--color-card) var(--surface-alpha), transparent);
57
+ -webkit-backdrop-filter: blur(12px);
58
+ backdrop-filter: blur(12px);
29
59
  box-shadow: var(--surface-shadow);
30
60
  }
31
-
61
+ .surface .surface {
62
+ -webkit-backdrop-filter: none;
63
+ backdrop-filter: none;
64
+ }
65
+ .surface:has([data-entity-grid]) [data-entity-grid] .surface {
66
+ -webkit-backdrop-filter: blur(12px);
67
+ backdrop-filter: blur(12px);
68
+ }
69
+ /* The glass tone: quick-filter pills, collapsible glass cards, group panels, header pills. A solid surface or a card
70
+ inside keeps its own (stronger) fill. */
32
71
  .surface-glass {
33
72
  background-color: color-mix(in oklab, --theme(--color-card) var(--surface-glass-alpha), transparent);
73
+ -webkit-backdrop-filter: blur(16px);
74
+ backdrop-filter: blur(16px);
34
75
  box-shadow: var(--glass-shadow);
35
- backdrop-filter: blur(12px);
36
76
  }
37
-
38
- /* Form actions render first, above the fields. */
77
+ .surface-glass-strong {
78
+ background-color: color-mix(in oklab, --theme(--color-card) var(--surface-glass-strong-alpha), transparent);
79
+ -webkit-backdrop-filter: blur(16px);
80
+ backdrop-filter: blur(16px);
81
+ box-shadow: var(--glass-shadow);
82
+ }
83
+ /* Glass inside a card (a collapsible group in a form section): no second blur, the quiet ink tint instead of
84
+ white-on-white, no shadow; open a step stronger. */
85
+ .surface .surface-glass {
86
+ background-color: --theme(--color-tint);
87
+ -webkit-backdrop-filter: none;
88
+ backdrop-filter: none;
89
+ box-shadow: none;
90
+ }
91
+ .surface .surface-glass-strong {
92
+ background-color: color-mix(in oklab, --theme(--color-card) 60%, --theme(--color-tint-strong));
93
+ -webkit-backdrop-filter: none;
94
+ backdrop-filter: none;
95
+ box-shadow: inset 0 0 0 1px --theme(--color-tint-strong);
96
+ }
97
+ /* Sticky glass bars (bulk bar, form action bar). */
98
+ /* Form actions at the top of the form: written last, shown first, sticky under the chrome. */
99
+ form:has(> [data-form-actions]) {
100
+ display: flex;
101
+ flex-direction: column;
102
+ }
39
103
  form > [data-form-actions] {
40
104
  order: -1;
41
105
  }
106
+ .glass-bar {
107
+ background-color: color-mix(in oklab, --theme(--color-card) var(--glass-alpha), transparent);
108
+ -webkit-backdrop-filter: blur(12px);
109
+ backdrop-filter: blur(12px);
110
+ }
111
+ /* Grid view without cards (empty, no results, error): the state sits in a glass panel instead of floating bare on the
112
+ page background. Layered: no utility of the panel sets these properties, and a host's own look rule can win. */
113
+ .surface:has([data-entity-grid]) [data-entity-grid] [data-list-empty] {
114
+ background-color: color-mix(in oklab, --theme(--color-card) var(--surface-glass-alpha), transparent);
115
+ -webkit-backdrop-filter: blur(16px);
116
+ backdrop-filter: blur(16px);
117
+ /* the same shadow as every list card / table card, so grid and table views look alike */
118
+ box-shadow: var(--surface-shadow);
119
+ }
120
+ /* List card in table view: only the table below the toolbar is a card (radius 24 px). Layered: its element carries no
121
+ utility for these properties, and a host's own look rule (a flat card) can win. */
122
+ .surface:has(> [data-list-toolbar]):not(:has([data-entity-grid])) > [data-list-toolbar] + * {
123
+ overflow: hidden;
124
+ border-radius: 1.5rem;
125
+ background-color: color-mix(in oklab, --theme(--color-card) var(--surface-alpha), transparent);
126
+ -webkit-backdrop-filter: blur(12px);
127
+ backdrop-filter: blur(12px);
128
+ box-shadow: var(--surface-shadow);
129
+ }
130
+ }
131
+
132
+ /* List cards: the toolbar and the filter panel sit straight on the page background — no card background, no rule;
133
+ only the table below is a card (radius 24 px). In grid view the grid cards sit on the background as well, each with
134
+ its own frosted surface. Unlayered: it beats the card's and the toolbar's utilities (`overflow-hidden`,
135
+ `rounded-3xl`, `border-b px-4 py-3`); inside `@layer components` those utilities would win. */
136
+ .surface:has(> [data-list-toolbar]) {
137
+ background-color: transparent;
138
+ -webkit-backdrop-filter: none;
139
+ backdrop-filter: none;
140
+ box-shadow: none;
141
+ overflow: visible;
142
+ border-radius: 0;
143
+ }
144
+ .surface:has(> [data-list-toolbar]) > [data-list-toolbar] {
145
+ border-bottom-width: 0;
146
+ padding-inline: 0;
147
+ padding-top: 0;
148
+ padding-bottom: 1rem;
149
+ }
150
+
151
+ /* Filter controls on the page background in the glass tone: search, filter fields and the outline buttons of the
152
+ toolbar as frosted fields with a soft glass shadow. Shape by role: the pills — the search (`data-control="pill"`), a
153
+ toolbar menu (`SelectTrigger variant="pill"`) and the pill buttons (Filters, Clear filters) — drop their edge; a form
154
+ field in the Filters panel keeps its quiet edge over the glass. */
155
+ .surface:has(> [data-list-toolbar]) > [data-list-toolbar]
156
+ :is(
157
+ [data-slot="input"],
158
+ [data-slot="select-trigger"],
159
+ [data-slot="multi-select"],
160
+ [role="combobox"]:not([data-slot="multi-select"] *),
161
+ [data-slot="button"][data-variant="outline"]
162
+ ) {
163
+ background-color: color-mix(in oklab, --theme(--color-card) var(--surface-glass-strong-alpha), transparent);
164
+ -webkit-backdrop-filter: blur(16px);
165
+ backdrop-filter: blur(16px);
166
+ /* A short glass shadow: the filter panel clips 12 px around its fields (collapse animation). */
167
+ box-shadow: var(--glass-control-shadow);
168
+ }
169
+ .surface:has(> [data-list-toolbar]) > [data-list-toolbar]
170
+ :is([data-control="pill"], [data-slot="button"][data-variant="outline"]) {
171
+ border-color: transparent;
172
+ }
173
+ /* Chips inside the glass multi-select: the quiet ink tint instead of the grey `secondary` block. */
174
+ .surface:has(> [data-list-toolbar]) > [data-list-toolbar] [data-slot="multi-select-chip"] {
175
+ background-color: --theme(--color-tint-strong);
176
+ }
177
+
178
+ /* Grid view: the cards line up flush with the toolbar bar above. The scroll container clips overflow, so it keeps
179
+ room for the card shadow and pulls itself out by the same amount (negative margin) — flush edges, uncut shadows.
180
+ Unlayered so it beats the grid's `p-4`. Room for the full `--surface-shadow` (offset 8 px + blur 24 px) on the sides
181
+ and below. */
182
+ .surface:has([data-entity-grid]) [data-entity-grid] {
183
+ padding-inline: 2rem;
184
+ margin-inline: -2rem;
185
+ padding-bottom: 2.5rem;
186
+ margin-bottom: -2.5rem;
42
187
  }
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface DrawerFooterProps {
3
+ children: ReactNode;
4
+ /** Classes for the content once it sits in the drawer's pinned footer. */
5
+ className?: string;
6
+ /** Classes for the content where it is written, when there is no drawer footer to move into. */
7
+ inlineClassName?: string;
8
+ /** Extra attributes for the inline wrapper (a `data-*` hook for layout CSS). */
9
+ inlineProps?: Record<`data-${string}`, string>;
10
+ }
11
+ /**
12
+ * Pins its content (a form's Save and Cancel) to the bottom of the `FormDrawer` it is rendered in; outside a drawer (a page, a dialog opened from the drawer) it renders where it is written.
13
+ *
14
+ * The portalled footer sits outside the `<form>` in the DOM, so every submit button in it is linked back to its form
15
+ * with the `form` attribute: Save, and Enter in a field, still submit the form.
16
+ */
17
+ export declare const DrawerFooter: ({ children, className, inlineClassName, inlineProps }: DrawerFooterProps) => import("react").JSX.Element;
18
+ //# sourceMappingURL=DrawerFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawerFooter.d.ts","sourceRoot":"","sources":["../../src/form/DrawerFooter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAwD,MAAM,OAAO,CAAC;AAK7F,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC,QAAQ,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC;CAChD;AAOD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,uDAAuD,iBAAiB,gCAoDpG,CAAC"}
@@ -0,0 +1,47 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useContext, useId, useLayoutEffect, useRef, useState } from 'react';
4
+ import { createPortal } from 'react-dom';
5
+ import { DrawerFooterSlotContext } from "./drawerSlots.js";
6
+ /**
7
+ * Pins its content (a form's Save and Cancel) to the bottom of the `FormDrawer` it is rendered in; outside a drawer (a page, a dialog opened from the drawer) it renders where it is written.
8
+ *
9
+ * The portalled footer sits outside the `<form>` in the DOM, so every submit button in it is linked back to its form
10
+ * with the `form` attribute: Save, and Enter in a field, still submit the form.
11
+ */
12
+ export const DrawerFooter = ({ children, className, inlineClassName, inlineProps }) => {
13
+ const slot = useContext(DrawerFooterSlotContext);
14
+ const fallbackFormId = useId();
15
+ const anchorRef = useRef(null);
16
+ const contentRef = useRef(null);
17
+ const [target, setTarget] = useState(null);
18
+ useLayoutEffect(() => {
19
+ const anchor = anchorRef.current;
20
+ // A dialog opened from inside the drawer still sees the drawer's context, but its DOM is portalled to <body>.
21
+ if (!slot || !anchor || !slot.bodyElement.contains(anchor)) {
22
+ setTarget(null);
23
+ return;
24
+ }
25
+ setTarget({ footerElement: slot.footerElement, formElement: anchor.closest('form') });
26
+ }, [slot]);
27
+ const formElement = target?.formElement ?? null;
28
+ useLayoutEffect(() => {
29
+ const content = contentRef.current;
30
+ if (!formElement || !content)
31
+ return;
32
+ if (!formElement.id)
33
+ formElement.id = fallbackFormId;
34
+ const linkSubmitButtons = () => {
35
+ for (const button of content.querySelectorAll('button')) {
36
+ if (button.type === 'submit' && !button.hasAttribute('form'))
37
+ button.setAttribute('form', formElement.id);
38
+ }
39
+ };
40
+ linkSubmitButtons();
41
+ const observer = new MutationObserver(linkSubmitButtons);
42
+ observer.observe(content, { childList: true, subtree: true });
43
+ return () => observer.disconnect();
44
+ }, [formElement, fallbackFormId]);
45
+ return (_jsxs(_Fragment, { children: [_jsx("span", { ref: anchorRef, hidden: true }), target ? (createPortal(_jsx("div", { ref: contentRef, className: className, children: children }), target.footerElement)) : (_jsx("div", { className: inlineClassName, ...inlineProps, children: children }))] }));
46
+ };
47
+ //# sourceMappingURL=DrawerFooter.js.map