@nadicodeai/ui 12.1.165 → 12.1.167

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 (367) hide show
  1. package/AGENTS.md +8 -9
  2. package/README.md +2 -17
  3. package/dist/components/accordion.d.ts.map +1 -1
  4. package/dist/components/accordion.js +2 -1
  5. package/dist/components/account-menu.d.ts.map +1 -1
  6. package/dist/components/account-menu.js +5 -3
  7. package/dist/components/activity-calendar.d.ts.map +1 -1
  8. package/dist/components/activity-calendar.js +3 -2
  9. package/dist/components/agent-card.js +1 -1
  10. package/dist/components/agent-orb.d.ts.map +1 -1
  11. package/dist/components/agent-orb.js +1 -0
  12. package/dist/components/agent-profile.d.ts.map +1 -1
  13. package/dist/components/agent-profile.js +7 -4
  14. package/dist/components/alert-dialog.d.ts +1 -1
  15. package/dist/components/alert-dialog.d.ts.map +1 -1
  16. package/dist/components/alert-dialog.js +3 -3
  17. package/dist/components/app-mark.js +1 -1
  18. package/dist/components/avatar.js +8 -8
  19. package/dist/components/badge.d.ts +11 -16
  20. package/dist/components/badge.d.ts.map +1 -1
  21. package/dist/components/badge.js +7 -43
  22. package/dist/components/breadcrumb.d.ts.map +1 -1
  23. package/dist/components/breadcrumb.js +3 -2
  24. package/dist/components/button.d.ts +5 -21
  25. package/dist/components/button.d.ts.map +1 -1
  26. package/dist/components/button.js +6 -76
  27. package/dist/components/calendar.d.ts +1 -1
  28. package/dist/components/calendar.d.ts.map +1 -1
  29. package/dist/components/calendar.js +3 -3
  30. package/dist/components/card-row.js +1 -1
  31. package/dist/components/card.d.ts +4 -1
  32. package/dist/components/card.d.ts.map +1 -1
  33. package/dist/components/card.js +3 -2
  34. package/dist/components/catalog-drawer.d.ts.map +1 -1
  35. package/dist/components/catalog-drawer.js +3 -2
  36. package/dist/components/chart-axis.d.ts.map +1 -1
  37. package/dist/components/chart-axis.js +0 -2
  38. package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
  39. package/dist/components/chart-bar-horizontal.js +16 -14
  40. package/dist/components/chart-card.d.ts.map +1 -1
  41. package/dist/components/chart-card.js +0 -1
  42. package/dist/components/chart.d.ts.map +1 -1
  43. package/dist/components/chart.js +18 -32
  44. package/dist/components/checkbox.d.ts +3 -2
  45. package/dist/components/checkbox.d.ts.map +1 -1
  46. package/dist/components/checkbox.js +4 -3
  47. package/dist/components/choicebox.d.ts +5 -5
  48. package/dist/components/choicebox.d.ts.map +1 -1
  49. package/dist/components/choicebox.js +6 -5
  50. package/dist/components/clearable-input.d.ts.map +1 -1
  51. package/dist/components/clearable-input.js +2 -2
  52. package/dist/components/code-block.d.ts.map +1 -1
  53. package/dist/components/code-block.js +4 -2
  54. package/dist/components/collapsible.js +1 -1
  55. package/dist/components/collection-filters.d.ts.map +1 -1
  56. package/dist/components/collection-filters.js +1 -0
  57. package/dist/components/collection-page.js +1 -1
  58. package/dist/components/collection-sort.d.ts.map +1 -1
  59. package/dist/components/collection-sort.js +1 -4
  60. package/dist/components/collection-toolbar.js +1 -1
  61. package/dist/components/combobox.js +4 -4
  62. package/dist/components/command.d.ts.map +1 -1
  63. package/dist/components/command.js +1 -1
  64. package/dist/components/confirm-dialog.js +2 -2
  65. package/dist/components/context-menu.d.ts +1 -1
  66. package/dist/components/context-menu.d.ts.map +1 -1
  67. package/dist/components/copy-button.js +1 -1
  68. package/dist/components/data-table.d.ts +14 -7
  69. package/dist/components/data-table.d.ts.map +1 -1
  70. package/dist/components/data-table.js +24 -15
  71. package/dist/components/dialog.d.ts +1 -1
  72. package/dist/components/dialog.d.ts.map +1 -1
  73. package/dist/components/dialog.js +2 -2
  74. package/dist/components/drawer.d.ts +4 -4
  75. package/dist/components/drawer.d.ts.map +1 -1
  76. package/dist/components/drawer.js +14 -15
  77. package/dist/components/dropdown-menu.d.ts +1 -1
  78. package/dist/components/dropdown-menu.d.ts.map +1 -1
  79. package/dist/components/dropdown-menu.js +9 -5
  80. package/dist/components/empty-art.js +1 -1
  81. package/dist/components/empty-state.js +2 -2
  82. package/dist/components/entry-scene.d.ts.map +1 -1
  83. package/dist/components/entry-scene.js +2 -3
  84. package/dist/components/field.js +3 -3
  85. package/dist/components/file-diff.d.ts.map +1 -1
  86. package/dist/components/file-diff.js +5 -2
  87. package/dist/components/footer.d.ts +1 -1
  88. package/dist/components/footer.d.ts.map +1 -1
  89. package/dist/components/footer.js +3 -3
  90. package/dist/components/form-dialog.d.ts.map +1 -1
  91. package/dist/components/form-dialog.js +2 -1
  92. package/dist/components/form-drawer.d.ts +7 -9
  93. package/dist/components/form-drawer.d.ts.map +1 -1
  94. package/dist/components/form-drawer.js +5 -5
  95. package/dist/components/form.d.ts +26 -0
  96. package/dist/components/form.d.ts.map +1 -0
  97. package/dist/components/form.js +29 -0
  98. package/dist/components/gauge.js +2 -2
  99. package/dist/components/heatmap/calendar-heatmap.d.ts.map +1 -1
  100. package/dist/components/heatmap/calendar-heatmap.js +15 -13
  101. package/dist/components/hive-scene.d.ts.map +1 -1
  102. package/dist/components/hive-scene.js +3 -1
  103. package/dist/components/hover-card.d.ts +1 -1
  104. package/dist/components/hover-card.d.ts.map +1 -1
  105. package/dist/components/hover-card.js +1 -1
  106. package/dist/components/input-group.d.ts +5 -6
  107. package/dist/components/input-group.d.ts.map +1 -1
  108. package/dist/components/input-group.js +8 -11
  109. package/dist/components/input-otp.d.ts.map +1 -1
  110. package/dist/components/input-otp.js +2 -2
  111. package/dist/components/item.d.ts +1 -1
  112. package/dist/components/item.js +2 -2
  113. package/dist/components/kbd.d.ts +6 -9
  114. package/dist/components/kbd.d.ts.map +1 -1
  115. package/dist/components/kbd.js +7 -3
  116. package/dist/components/message-notice.js +1 -1
  117. package/dist/components/middle-truncate.d.ts.map +1 -1
  118. package/dist/components/middle-truncate.js +1 -0
  119. package/dist/components/model-identity.d.ts +4 -4
  120. package/dist/components/model-identity.d.ts.map +1 -1
  121. package/dist/components/model-identity.js +2 -2
  122. package/dist/components/model-mark.d.ts.map +1 -1
  123. package/dist/components/model-mark.js +4 -2
  124. package/dist/components/multi-select.js +2 -2
  125. package/dist/components/native-select.d.ts.map +1 -1
  126. package/dist/components/native-select.js +2 -6
  127. package/dist/components/notice-banner.js +1 -1
  128. package/dist/components/object-page.js +2 -2
  129. package/dist/components/object-workspace.d.ts.map +1 -1
  130. package/dist/components/object-workspace.js +1 -3
  131. package/dist/components/overview-page.d.ts +1 -1
  132. package/dist/components/overview-page.d.ts.map +1 -1
  133. package/dist/components/overview-page.js +2 -1
  134. package/dist/components/page-actions.d.ts.map +1 -1
  135. package/dist/components/page-actions.js +9 -4
  136. package/dist/components/pairing-code.js +1 -1
  137. package/dist/components/pending-label.d.ts.map +1 -1
  138. package/dist/components/pending-label.js +0 -1
  139. package/dist/components/popover.d.ts +1 -1
  140. package/dist/components/popover.d.ts.map +1 -1
  141. package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
  142. package/dist/components/portal-sidebar-frame.js +1 -1
  143. package/dist/components/product-message.d.ts.map +1 -1
  144. package/dist/components/product-message.js +1 -0
  145. package/dist/components/progress-checklist.d.ts.map +1 -1
  146. package/dist/components/progress-checklist.js +2 -2
  147. package/dist/components/progress.d.ts.map +1 -1
  148. package/dist/components/progress.js +5 -4
  149. package/dist/components/radio-group.js +2 -2
  150. package/dist/components/reading-column.js +1 -1
  151. package/dist/components/record-identity.d.ts.map +1 -1
  152. package/dist/components/record-identity.js +2 -5
  153. package/dist/components/record-list.d.ts +5 -4
  154. package/dist/components/record-list.d.ts.map +1 -1
  155. package/dist/components/record-list.js +31 -17
  156. package/dist/components/record-sheet.js +1 -1
  157. package/dist/components/record-time.d.ts.map +1 -1
  158. package/dist/components/record-time.js +2 -1
  159. package/dist/components/resizable.d.ts.map +1 -1
  160. package/dist/components/resizable.js +1 -1
  161. package/dist/components/row-edit-form.d.ts +2 -1
  162. package/dist/components/row-edit-form.d.ts.map +1 -1
  163. package/dist/components/row-edit-form.js +2 -1
  164. package/dist/components/run-timeline.js +1 -1
  165. package/dist/components/scope-switcher.js +1 -1
  166. package/dist/components/segmented-control.js +1 -1
  167. package/dist/components/select.js +1 -1
  168. package/dist/components/settings-facts.js +1 -1
  169. package/dist/components/settings-section.js +1 -1
  170. package/dist/components/sheet.d.ts +1 -1
  171. package/dist/components/sheet.d.ts.map +1 -1
  172. package/dist/components/sheet.js +1 -1
  173. package/dist/components/sidebar.d.ts +2 -2
  174. package/dist/components/sidebar.d.ts.map +1 -1
  175. package/dist/components/sidebar.js +16 -18
  176. package/dist/components/site-menu.d.ts +28 -0
  177. package/dist/components/site-menu.d.ts.map +1 -0
  178. package/dist/components/site-menu.js +23 -0
  179. package/dist/components/slider.d.ts.map +1 -1
  180. package/dist/components/slider.js +2 -1
  181. package/dist/components/snippet.d.ts +2 -0
  182. package/dist/components/snippet.d.ts.map +1 -1
  183. package/dist/components/snippet.js +13 -6
  184. package/dist/components/sonner.d.ts.map +1 -1
  185. package/dist/components/sonner.js +3 -4
  186. package/dist/components/status-badge.d.ts +1 -1
  187. package/dist/components/status-badge.d.ts.map +1 -1
  188. package/dist/components/switch.js +1 -1
  189. package/dist/components/table-card.js +1 -1
  190. package/dist/components/table-layouts.d.ts +24 -9
  191. package/dist/components/table-layouts.d.ts.map +1 -1
  192. package/dist/components/table-layouts.js +27 -10
  193. package/dist/components/table.js +4 -4
  194. package/dist/components/tabs-nav.d.ts +52 -0
  195. package/dist/components/tabs-nav.d.ts.map +1 -0
  196. package/dist/components/tabs-nav.js +95 -0
  197. package/dist/components/tabs.d.ts +2 -56
  198. package/dist/components/tabs.d.ts.map +1 -1
  199. package/dist/components/tabs.js +2 -91
  200. package/dist/components/text-link.d.ts +1 -2
  201. package/dist/components/text-link.d.ts.map +1 -1
  202. package/dist/components/text-link.js +1 -2
  203. package/dist/components/textarea.d.ts +5 -2
  204. package/dist/components/textarea.d.ts.map +1 -1
  205. package/dist/components/textarea.js +12 -4
  206. package/dist/components/toast.d.ts +2 -0
  207. package/dist/components/toast.d.ts.map +1 -1
  208. package/dist/components/toast.js +4 -0
  209. package/dist/components/toggle-group.d.ts +3 -1
  210. package/dist/components/toggle-group.d.ts.map +1 -1
  211. package/dist/components/toggle-group.js +3 -6
  212. package/dist/components/toggle.js +1 -1
  213. package/dist/components/tooltip.d.ts +12 -12
  214. package/dist/components/tooltip.d.ts.map +1 -1
  215. package/dist/components/tooltip.js +9 -9
  216. package/dist/components/trend-badge.js +2 -2
  217. package/dist/components/update-card.js +1 -1
  218. package/dist/components/usage-meter.d.ts +1 -1
  219. package/dist/components/usage-meter.d.ts.map +1 -1
  220. package/dist/components/usage-meter.js +9 -7
  221. package/dist/components/waiting-line.js +1 -1
  222. package/dist/index.d.ts +3 -7
  223. package/dist/index.d.ts.map +1 -1
  224. package/dist/index.js +3 -7
  225. package/dist/internal/agent-orb-motion.d.ts +4 -1
  226. package/dist/internal/agent-orb-motion.d.ts.map +1 -1
  227. package/dist/internal/agent-orb-motion.js +9 -7
  228. package/dist/internal/agent-orb.d.ts +4 -1
  229. package/dist/internal/agent-orb.d.ts.map +1 -1
  230. package/dist/internal/agent-orb.js +7 -1
  231. package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
  232. package/dist/internal/assistant-ui/attachment.js +15 -15
  233. package/dist/internal/assistant-ui/follow-up-suggestions.js +1 -1
  234. package/dist/internal/assistant-ui/markdown-text.js +26 -25
  235. package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
  236. package/dist/internal/assistant-ui/reasoning.js +13 -16
  237. package/dist/internal/assistant-ui/thread.d.ts.map +1 -1
  238. package/dist/internal/assistant-ui/thread.js +22 -16
  239. package/dist/internal/assistant-ui/tool-fallback.d.ts.map +1 -1
  240. package/dist/internal/assistant-ui/tool-fallback.js +29 -21
  241. package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
  242. package/dist/internal/assistant-ui/tool-group.js +6 -7
  243. package/dist/internal/assistant-ui/tooltip-icon-button.js +1 -1
  244. package/dist/internal/badge-frame.d.ts +15 -0
  245. package/dist/internal/badge-frame.d.ts.map +1 -0
  246. package/dist/internal/badge-frame.js +44 -0
  247. package/dist/internal/button-classes.d.ts +20 -0
  248. package/dist/internal/button-classes.d.ts.map +1 -0
  249. package/dist/internal/button-classes.js +74 -0
  250. package/dist/internal/catalog-list.d.ts.map +1 -1
  251. package/dist/internal/catalog-list.js +8 -4
  252. package/dist/internal/collection-rail.js +3 -3
  253. package/dist/internal/form-drawer-frame.d.ts +10 -0
  254. package/dist/internal/form-drawer-frame.d.ts.map +1 -0
  255. package/dist/internal/form-drawer-frame.js +9 -0
  256. package/dist/internal/form-submit.d.ts +2 -1
  257. package/dist/internal/form-submit.d.ts.map +1 -1
  258. package/dist/internal/settings-save.d.ts.map +1 -1
  259. package/dist/internal/settings-save.js +4 -2
  260. package/dist/internal/status-mark.d.ts.map +1 -1
  261. package/dist/internal/status-mark.js +4 -1
  262. package/dist/internal/tab-row.d.ts +10 -0
  263. package/dist/internal/tab-row.d.ts.map +1 -0
  264. package/dist/internal/tab-row.js +2 -0
  265. package/dist/internal/table-compact-line.d.ts +1 -1
  266. package/dist/internal/table-compact-line.d.ts.map +1 -1
  267. package/dist/internal/table-compact-line.js +1 -1
  268. package/dist/internal/tooltip-content-frame.d.ts +14 -0
  269. package/dist/internal/tooltip-content-frame.d.ts.map +1 -0
  270. package/dist/internal/tooltip-content-frame.js +11 -0
  271. package/dist/lib/css-variables.d.ts +8 -0
  272. package/dist/lib/css-variables.d.ts.map +1 -0
  273. package/dist/lib/css-variables.js +4 -0
  274. package/dist/lib/merge-tokens.generated.js +1 -1
  275. package/dist/lib/use-copy-to-clipboard.d.ts.map +1 -1
  276. package/dist/lib/use-copy-to-clipboard.js +1 -2
  277. package/dist/showcase/samples.js +1 -1
  278. package/dist/showcase/specimens/choices.d.ts.map +1 -1
  279. package/dist/showcase/specimens/choices.js +3 -2
  280. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  281. package/dist/showcase/specimens/compositions.js +7 -5
  282. package/dist/showcase/specimens/data.d.ts.map +1 -1
  283. package/dist/showcase/specimens/data.js +1 -1
  284. package/dist/showcase/specimens/feedback.d.ts.map +1 -1
  285. package/dist/showcase/specimens/feedback.js +1 -2
  286. package/dist/showcase/specimens/index.d.ts +2 -0
  287. package/dist/showcase/specimens/index.d.ts.map +1 -1
  288. package/dist/showcase/specimens/inputs.d.ts +1 -0
  289. package/dist/showcase/specimens/inputs.d.ts.map +1 -1
  290. package/dist/showcase/specimens/inputs.js +5 -2
  291. package/dist/showcase/specimens/menus.d.ts +1 -0
  292. package/dist/showcase/specimens/menus.d.ts.map +1 -1
  293. package/dist/showcase/specimens/menus.js +7 -2
  294. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  295. package/dist/showcase/specimens/navigation.js +6 -5
  296. package/dist/showcase/specimens/status.d.ts.map +1 -1
  297. package/dist/showcase/specimens/status.js +4 -4
  298. package/dist/showcase/usage.generated.d.ts +1 -1
  299. package/dist/showcase/usage.generated.d.ts.map +1 -1
  300. package/dist/showcase/usage.generated.js +40 -18
  301. package/dist/standalone/index.js +2 -2
  302. package/dist/standalone/orb-page.js +10 -8
  303. package/dist/styles/components.css +14 -1
  304. package/package.json +32 -33
  305. package/dist/eslint/index.js +0 -224
  306. package/dist/eslint/rules/badge-is-static-label.js +0 -93
  307. package/dist/eslint/rules/button-icon-slot.js +0 -102
  308. package/dist/eslint/rules/button-link-for-navigation.js +0 -146
  309. package/dist/eslint/rules/button-no-aria-label-with-text.js +0 -75
  310. package/dist/eslint/rules/button-type-roles-only-in-buttons.js +0 -83
  311. package/dist/eslint/rules/choice-control-has-a-name.js +0 -98
  312. package/dist/eslint/rules/choice-group-in-fieldset.js +0 -86
  313. package/dist/eslint/rules/command-shortcut-single-owner.js +0 -118
  314. package/dist/eslint/rules/confirm-dialog-words.js +0 -63
  315. package/dist/eslint/rules/data-table-one-unsized-column.js +0 -96
  316. package/dist/eslint/rules/destructive-action-placement.js +0 -69
  317. package/dist/eslint/rules/disabled-choice-says-why.js +0 -71
  318. package/dist/eslint/rules/disabled-control-appearance.js +0 -75
  319. package/dist/eslint/rules/ellipsis-opens-a-dialog.js +0 -110
  320. package/dist/eslint/rules/empty-state-owner.js +0 -145
  321. package/dist/eslint/rules/input-group-owners.js +0 -155
  322. package/dist/eslint/rules/jsx-class-utility.js +0 -200
  323. package/dist/eslint/rules/kbd-children-no-modifier-text.js +0 -128
  324. package/dist/eslint/rules/literal-text.js +0 -41
  325. package/dist/eslint/rules/menu-owner.js +0 -75
  326. package/dist/eslint/rules/middle-truncate-placement.js +0 -69
  327. package/dist/eslint/rules/no-app-feature-component.js +0 -100
  328. package/dist/eslint/rules/no-bare-button-label.js +0 -55
  329. package/dist/eslint/rules/no-choice-control-wrapper.js +0 -97
  330. package/dist/eslint/rules/no-comment.js +0 -77
  331. package/dist/eslint/rules/no-control-in-read-only-surface.js +0 -106
  332. package/dist/eslint/rules/no-decorative-icon.js +0 -164
  333. package/dist/eslint/rules/no-deprecated-zod-api.js +0 -215
  334. package/dist/eslint/rules/no-global-patch.js +0 -115
  335. package/dist/eslint/rules/no-hand-built-busy.js +0 -104
  336. package/dist/eslint/rules/no-hand-built-theme-picker.js +0 -144
  337. package/dist/eslint/rules/no-hand-built-tile.js +0 -41
  338. package/dist/eslint/rules/no-hand-formatted-date.js +0 -87
  339. package/dist/eslint/rules/no-hand-stacked-avatars.js +0 -67
  340. package/dist/eslint/rules/no-nested-collapse.js +0 -60
  341. package/dist/eslint/rules/no-package-component-redefinition.js +0 -175
  342. package/dist/eslint/rules/no-search-in-form.js +0 -47
  343. package/dist/eslint/rules/no-shadcn-appearance-override.js +0 -305
  344. package/dist/eslint/rules/no-shell-prompt-in-snippet.js +0 -74
  345. package/dist/eslint/rules/no-stock-error-words.js +0 -56
  346. package/dist/eslint/rules/no-subject-derived-expectation.js +0 -183
  347. package/dist/eslint/rules/no-tooltip-around-labelled-field.js +0 -72
  348. package/dist/eslint/rules/no-weight-class-on-strong-in-type-role.js +0 -57
  349. package/dist/eslint/rules/no-write-in-subscription.js +0 -140
  350. package/dist/eslint/rules/one-submenu-level.js +0 -43
  351. package/dist/eslint/rules/one-toast-per-flow.js +0 -91
  352. package/dist/eslint/rules/option-count.js +0 -167
  353. package/dist/eslint/rules/page-command-link-not-render.js +0 -43
  354. package/dist/eslint/rules/page-composition.js +0 -232
  355. package/dist/eslint/rules/progress-needs-name.js +0 -57
  356. package/dist/eslint/rules/rendered-import.js +0 -121
  357. package/dist/eslint/rules/server-action-discipline.js +0 -233
  358. package/dist/eslint/rules/settings-limit-in-footer.js +0 -94
  359. package/dist/eslint/rules/skeleton-in-region.js +0 -80
  360. package/dist/eslint/rules/sortable-heading-uses-sort.js +0 -79
  361. package/dist/eslint/rules/table-cell-inset-owner.js +0 -107
  362. package/dist/eslint/rules/tabs-selection-is-controlled.js +0 -47
  363. package/dist/eslint/rules/test-files-from-one-definition.js +0 -67
  364. package/dist/eslint/rules/tooltip-only-arrow.js +0 -38
  365. package/dist/eslint/rules/tooltip-trigger-accessible-name.js +0 -114
  366. package/dist/eslint/rules/workspace-declares-imports.js +0 -163
  367. package/dist/eslint/strict-design-system.js +0 -250
@@ -40,6 +40,15 @@ const dataTableFeatures = tableFeatures({
40
40
  },
41
41
  columnMeta: metaHelper(),
42
42
  });
43
+ function tableColumn(column) {
44
+ const { header, ...rest } = column;
45
+ // SAFETY: rest is the column without its header, and the header put back is one ColumnDef accepts; TypeScript cannot rejoin a distributed Omit.
46
+ // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- the spread of a distributed Omit plus the header is the ColumnDef it came from
47
+ return {
48
+ ...rest,
49
+ header: typeof header === "string" ? header : () => _jsx("span", { className: "sr-only", children: header.hidden }),
50
+ };
51
+ }
43
52
  function isEmptyValue(value) {
44
53
  return value === null || value === undefined;
45
54
  }
@@ -70,12 +79,14 @@ function primaryRowLinkProps({ href, label, wraps, content, }) {
70
79
  // Below its layout's width the table lays out by content, so the identity takes the room the
71
80
  // other columns leave and a long name ends in an ellipsis instead of widening the table.
72
81
  const COMPACT_IDENTITY_CLASS = {
73
- narrow: "@max-md/table:w-full @max-md/table:max-w-0",
74
82
  tight: "@max-xl/table:w-full @max-xl/table:max-w-0",
75
83
  standard: "@max-3xl/table:w-full @max-3xl/table:max-w-0",
76
84
  wide: "@max-5xl/table:w-full @max-5xl/table:max-w-0",
77
85
  roomy: "@max-[68rem]/table:w-full @max-[68rem]/table:max-w-0",
78
86
  spacious: "@max-6xl/table:w-full @max-6xl/table:max-w-0",
87
+ broad: "@max-7xl/table:w-full @max-7xl/table:max-w-0",
88
+ vast: "@max-[96rem]/table:w-full @max-[96rem]/table:max-w-0",
89
+ always: "w-full max-w-0",
79
90
  };
80
91
  function identityWidthClass(column, identityColumnId, compactLayout) {
81
92
  return column.id === identityColumnId && compactLayout
@@ -91,7 +102,6 @@ function definitionId(column) {
91
102
  }
92
103
  export function columnMenuLabel(column) {
93
104
  const header = column.columnDef.header;
94
- // oxlint-disable-next-line anti-slop/no-runtime-typeof -- TanStack types a column header as a string or a render function; only typeof tells them apart.
95
105
  return typeof header === "string" ? header : column.id;
96
106
  }
97
107
  function sortOrder(sorted) {
@@ -158,9 +168,9 @@ function useShownLayout() {
158
168
  return [shownLayout, probeRef];
159
169
  }
160
170
  function LayoutProbeLeadingRecords({ layout, probeRef, children, }) {
161
- return (_jsxs(_Fragment, { children: [layout ? (_jsx("tbody", { ref: probeRef, "aria-hidden": "true", "data-slot": "table-layout-probe", className: tableCompactLayouts[layout].details }, layout)) : null, children] }));
171
+ return (_jsxs(_Fragment, { children: [_jsx("tbody", { ref: probeRef, "aria-hidden": "true", "data-slot": "table-layout-probe", className: tableCompactLayouts[layout].details }, layout), children] }));
162
172
  }
163
- const defaultRowLink = (props) => _jsx("a", { ...props });
173
+ const defaultRowLink = ({ children, ...props }) => (_jsx("a", { ...props, children: children }));
164
174
  function PagerButton({ enabled, label, link, onClick, }) {
165
175
  if (link && enabled) {
166
176
  return (_jsx(ButtonLink, { render: link, variant: "outline", children: label }));
@@ -183,7 +193,7 @@ function DefaultToolbar({ actions }) {
183
193
  * @instead “For a row of descriptive content paired with a single action (membership row, integration row), use `Entity` instead.” (https://vercel.com/geist/table)
184
194
  * “For a key/value metadata block on a detail page, use `Description`, not a two-column table.” (https://vercel.com/geist/table)
185
195
  * Ours: Geist's `Entity` is a `RecordList` row. A registry of entities whose columns `RecordList` cannot hold, more than three facts beside a filter bar the product owns, as Vercel's Deployments list, is this table with `rows="entities"`, which draws the same rows: headings for assistive technology only, 72 px rows, a `RecordIdentity` in the identity column. Its `Description` is `ObjectFacts`. A list on a page of its own is a `CollectionPage`. A descriptive list is `ItemGroup`.
186
- * @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is as wide as its definition's `size`, in pixels, and the columns without one share the rest, so a table gives a size to every column but the one that takes the spare width; a value too long for its column ends in an ellipsis, whole in its title (a record's name carries its own), unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle instead. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings (Vercel's Usage page: *Delivery network*, *Functions*): a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. A row never scrolls sideways: on a card narrower than its columns (the sized ones and 160 px for each without a size) the row keeps its name and its `primaryColumns`, and every other column leaves it, its value joining the one muted line under the name, joined by a middle dot (a `Tag` reads as its text there); entity facts wrap below the name so every value stays readable, while other rows end in an ellipsis unless a column `wraps`, or `dropped` when its `compact` says so, or beside an entity row's name, which ends in an ellipsis before it, when it says `name`, as Vercel's lists read on a phone: no labels, no second line; an `optional` column's empty value is left out of the line. A table whose every column is in `primaryColumns`, a settings matrix, lays out by its content there instead, so the name wraps beside the columns. A document's table, such as a legal page's, is read whole instead: its columns take the `wraps` option, so their words wrap and the row grows, and it keeps its header row; in the compact layout every cell but the identity wraps between words. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right (Vercel's deployments list ends "Deployment retention is enabled. Learn more" with *View recently deleted*); it is the one place a table says a sentence. Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
196
+ * @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is as wide as its definition's `size`, in pixels, and the columns without one share the rest, so a table gives a size to every column but the one that takes the spare width; a value too long for its column ends in an ellipsis, whole in its title (a record's name carries its own), unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle instead. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings (Vercel's Usage page: *Delivery network*, *Functions*): a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. A row never scrolls sideways and never gives a column without a size less than 160 px: on a card narrower than its columns (the sized ones and 160 px for each without a size, however wide that is; columns no card holds lay out this way on every card) the row keeps its name and its `primaryColumns`, and every other column leaves it, its value joining the one muted line under the name, joined by a middle dot (a `Tag` reads as its text there); entity facts wrap below the name so every value stays readable, while other rows end in an ellipsis unless a column `wraps`, or `dropped` when its `compact` says so, or beside an entity row's name, which ends in an ellipsis before it, when it says `name`, as Vercel's lists read on a phone: no labels, no second line; an `optional` column's empty value is left out of the line. A table whose every column is in `primaryColumns`, a settings matrix, lays out by its content there instead, so the name wraps beside the columns. A document's table, such as a legal page's, is read whole instead: its columns take the `wraps` option, so their words wrap and the row grows, and it keeps its header row; in the compact layout every cell but the identity wraps between words. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right (Vercel's deployments list ends "Deployment retention is enabled. Learn more" with *View recently deleted*); it is the one place a table says a sentence. Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
187
197
  * “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table)
188
198
  * “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
189
199
  * Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced.
@@ -209,7 +219,7 @@ export function DataTable(props) {
209
219
  export function EntityTable(props) {
210
220
  return _jsx(RecordsTable, { ...props, kind: "entities" });
211
221
  }
212
- function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPlaceholder, primaryColumns, compactLayout: requestedCompactLayout, tableLabel, heading, footer, footerNote, group, embedded = false, summary, rowHref, rowLabel, primaryColumnId, empty, noMatchMessage, columnsLabel, clearSearchLabel, pageLabels, toolbarActions, externalFilter, sorting: externalSorting, pagination, renderRowLink = defaultRowLink, renderToolbar = DefaultToolbar, wrapCard, rowEditor, rowMenu, }) {
222
+ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPlaceholder, primaryColumns, tableLabel, heading, footer, footerNote, group, embedded = false, summary, rowHref, rowLabel, primaryColumnId, empty, noMatchMessage, columnsLabel, clearSearchLabel, pageLabels, toolbarActions, externalFilter, sorting: externalSorting, pagination, renderRowLink = defaultRowLink, renderToolbar = DefaultToolbar, wrapCard, rowEditor, rowMenu, rowUnderName, }) {
213
223
  const entities = kind === "entities";
214
224
  const [sorting, setSorting] = React.useState([]);
215
225
  const [columnFilters, setColumnFilters] = React.useState([]);
@@ -217,13 +227,14 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
217
227
  const identityColumnId = primaryColumnId ?? definitionId(columns[0]);
218
228
  // TanStack gives a column without a size its default one; only the caller's definition says whether it has one.
219
229
  const sizeOf = new Map(columns.map((column) => [definitionId(column), column.size]));
230
+ const tableColumns = React.useMemo(() => columns.map(tableColumn), [columns]);
220
231
  // An external pager means `data` is already one bounded server page:
221
232
  // `manualPagination` makes the paginated row model a passthrough so every
222
233
  // row of the current page renders.
223
234
  const tableOptions = {
224
235
  features: dataTableFeatures,
225
236
  data,
226
- columns,
237
+ columns: tableColumns,
227
238
  manualPagination: Boolean(pagination) || pagination === false || !pageLabels,
228
239
  onSortingChange: setSorting,
229
240
  onColumnFiltersChange: setColumnFilters,
@@ -242,8 +253,7 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
242
253
  const hasDetailColumns = table
243
254
  .getAllLeafColumns()
244
255
  .some((column) => !primaryColumns.includes(column.id));
245
- const neededLayout = requestedCompactLayout ??
246
- compactLayoutFor(table.getVisibleLeafColumns().map((column) => sizeOf.get(column.id)));
256
+ const neededLayout = compactLayoutFor(table.getVisibleLeafColumns().map((column) => sizeOf.get(column.id)));
247
257
  const compactLayout = hasDetailColumns ? neededLayout : undefined;
248
258
  // A table whose every column stays lays out by its content on a narrow card, so the name wraps
249
259
  // beside the columns instead of collapsing between them.
@@ -256,7 +266,6 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
256
266
  const waitingForPage = pagination ? pagination.isPending === true : false;
257
267
  const filterColumn = filterColumnId ? table.getColumn(filterColumnId) : undefined;
258
268
  const rawFilterValue = filterColumn?.getFilterValue();
259
- // oxlint-disable-next-line anti-slop/no-runtime-typeof -- TanStack types a column filter value as unknown; this is where it is read.
260
269
  const filterValue = typeof rawFilterValue === "string" ? rawFilterValue : "";
261
270
  const canHideColumns = Boolean(columnsLabel) && table.getAllColumns().some((column) => column.getCanHide());
262
271
  const columnsControl = canHideColumns ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { render: _jsx(Button, { variant: "outline", suffix: _jsx(ChevronDown, { "aria-hidden": "true" }), children: columnsLabel }) }), _jsx(DropdownMenuContent, { align: "end", children: _jsx(DropdownMenuGroup, { children: table
@@ -321,9 +330,9 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
321
330
  return _jsx(TableCell, { className: className }, cell.id);
322
331
  }
323
332
  const content = holdsCompactLine ? (_jsx(TableCompactLine, { ...compactLine, children: renderCell(cell) })) : (renderCell(cell));
324
- return (_jsx(TableCell, { className: className, onFocus: cutByEllipsis ? titleWhenCut : undefined, onPointerEnter: cutByEllipsis ? titleWhenCut : undefined, children: isPrimaryLink
325
- ? renderRowLink(primaryRowLinkProps({ href, label, wraps, content }))
326
- : content }, cell.id));
333
+ return (_jsxs(TableCell, { className: className, onFocus: cutByEllipsis ? titleWhenCut : undefined, onPointerEnter: cutByEllipsis ? titleWhenCut : undefined, children: [isPrimaryLink
334
+ ? renderRowLink(primaryRowLinkProps({ href, label, wraps, content }))
335
+ : content, cell.column.id === identityColumnId ? rowUnderName?.(row.original) : null] }, cell.id));
327
336
  }) }), rowEditor?.rowId === row.id ? (_jsx(TableRow, { "data-slot": "table-row-editor", className: "h-auto! [&>td]:bg-transparent!", children: _jsx(TableCell, { colSpan: visibleCells.length, className: "p-0 whitespace-normal", children: rowEditor.render(row.original) }) })) : null, detailRowShown ? (_jsx(TableDetailRow, { layout: compactLayout, colSpan: visibleCells.filter((cell) => !collapseClass(cell.column, primaryColumns, compactLayout)).length, facts: detailFacts() })) : null] }));
328
337
  return (_jsx(React.Fragment, { children: _jsx(ActionContextMenu, { ...(menu ?? NO_ROW_MENU), children: record }) }, row.id));
329
338
  };
@@ -337,13 +346,13 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
337
346
  },
338
347
  }
339
348
  : empty) }));
340
- const tableNode = (_jsxs(_Fragment, { children: [_jsx("div", { "aria-live": "polite", "data-slot": "data-table-absence", children: absence }), rows.length === 0 ? null : (_jsx(TableLaidOutCompact, { compact: entities && compactLayout !== undefined && shownLayout === "details", children: _jsxs(Table, { "aria-label": tableLabel, className: "table-fixed text-body-sm", compactDetails: tableLayout, density: entities ? "comfortable" : "default", children: [_jsx(TableColgroup, { children: table.getVisibleLeafColumns().map((column) => {
349
+ const tableNode = (_jsxs(_Fragment, { children: [_jsx("div", { "aria-live": "polite", "data-slot": "data-table-absence", children: absence }), rows.length === 0 ? null : (_jsx(TableLaidOutCompact, { compact: entities && shownLayout === "details", children: _jsxs(Table, { "aria-label": tableLabel, className: "table-fixed text-body-sm", compactDetails: tableLayout, density: entities ? "comfortable" : "default", children: [_jsx(TableColgroup, { children: table.getVisibleLeafColumns().map((column) => {
341
350
  const size = sizeOf.get(column.id);
342
351
  return (_jsx(TableCol, { className: cn(collapseTrackClass(column, primaryColumns, compactLayout)), style: size === undefined ? undefined : { width: size } }, column.id));
343
352
  }) }), _jsx(TableHeader, { className: entities ? "sr-only" : undefined, children: table.getHeaderGroups().map((headerGroup) => (_jsx(TableRow, { children: headerGroup.headers.map((header) => (_jsx(TableHead, { "aria-sort": sortOrder(header.column.getIsSorted()), "data-identity": header.column.id === identityColumnId ? "" : undefined, className: cn(isNumericColumn(header.column) && "text-right tabular-nums", header.column.columnDef.meta?.wraps === true && "last:text-left", header.column.columnDef.meta?.centered === true &&
344
353
  "text-center last:text-center", identityWidthClass(header.column, identityColumnId, tableLayout), collapseClass(header.column, primaryColumns, compactLayout)), children: header.isPlaceholder
345
354
  ? null
346
- : flexRender(header.column.columnDef.header, header.getContext()) }, header.id))) }, headerGroup.id))) }), _jsx(LayoutProbeLeadingRecords, { layout: compactLayout, probeRef: layoutProbeRef, children: sections.map((section) => (_jsxs(React.Fragment, { children: [section.heading === undefined ? null : (_jsx(GroupHeading, { span: table.getVisibleLeafColumns().length, children: section.heading })), section.rows.map(renderRow)] }, section.heading ?? ""))) })] }) }))] }));
355
+ : flexRender(header.column.columnDef.header, header.getContext()) }, header.id))) }, headerGroup.id))) }), _jsx(LayoutProbeLeadingRecords, { layout: tableLayout, probeRef: layoutProbeRef, children: sections.map((section) => (_jsxs(React.Fragment, { children: [section.heading === undefined ? null : (_jsx(GroupHeading, { span: table.getVisibleLeafColumns().length, children: section.heading })), section.rows.map(renderRow)] }, section.heading ?? ""))) })] }) }))] }));
347
356
  const actions = columnsControl || toolbarActions ? (_jsxs(_Fragment, { children: [columnsControl, toolbarActions] })) : null;
348
357
  const toolbarSlots = { actions };
349
358
  if (filterColumn && filterPlaceholder !== undefined && clearSearchLabel !== undefined) {
@@ -37,7 +37,7 @@ import { type PhoneLayout } from "../internal/phone-sheet.js";
37
37
  * Ours: `role="dialog"` named by its title. The corner Close is named by `closeLabel`. Focus starts
38
38
  * on the first field or `initialFocus`.
39
39
  */
40
- declare function Dialog({ ...props }: DialogPrimitive.Root.Props): React.JSX.Element;
40
+ declare function Dialog({ ...props }: Omit<DialogPrimitive.Root.Props, "defaultOpen">): React.JSX.Element;
41
41
  declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): React.JSX.Element;
42
42
  declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
43
43
  declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,C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AAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
@@ -64,7 +64,7 @@ function DialogContent({ className, children, showCloseButton = true, closeLabel
64
64
  // the scroll and leaves nothing here to scroll. It must not clip this popup with
65
65
  // `overflow-hidden`: that hides Base UI's trailing focus guard, and Tab then walks out of
66
66
  // the dialog into the page behind it.
67
- "fixed top-1/2 left-1/2 z-50 flex max-h-[min(50rem,80svh)] w-full max-w-[calc(100%-var(--spacing-nadicode-card-padding))] -translate-x-1/2 -translate-y-1/2 flex-col gap-(--dialog-gap) overflow-y-auto rounded-lg border-0 bg-popover p-(--dialog-padding) [--dialog-gap:var(--dialog-padding)] [--dialog-padding:var(--spacing-nadicode-card-padding)] text-sm text-popover-foreground nc-elevation-modal outline-none sm:max-w-135", phoneLayout === "sheet" && phoneSheetLayout, motion === "instant" ? instantModalOverlayMotion : modalOverlayMotion, className), ...props, children: [children, showCloseButton && closeLabel !== undefined && (_jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", "data-corner-close": "", render: _jsx(Button, { "aria-label": closeLabel, variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: _jsx(XIcon, {}) }))] })] }));
67
+ "fixed top-1/2 left-1/2 z-50 flex max-h-[min(50rem,80svh)] w-full max-w-[calc(100%-var(--spacing-nadicode-card-padding))] -translate-1/2 flex-col gap-(--dialog-gap) overflow-y-auto rounded-lg border-0 bg-popover p-(--dialog-padding) [--dialog-gap:var(--dialog-padding)] [--dialog-padding:var(--spacing-nadicode-card-padding)] text-sm text-popover-foreground nc-elevation-modal outline-none sm:max-w-135", phoneLayout === "sheet" && phoneSheetLayout, motion === "instant" ? instantModalOverlayMotion : modalOverlayMotion, className), ...props, children: [children, showCloseButton && closeLabel !== undefined && (_jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", "data-corner-close": "", render: _jsx(Button, { "aria-label": closeLabel, variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: _jsx(XIcon, {}) }))] })] }));
68
68
  }
69
69
  function DialogHeader({ className, ...props }) {
70
70
  return (_jsx("div", { "data-slot": "dialog-header", "data-nc-ui": "", className: cn("flex shrink-0 flex-col gap-2 group-data-[sticky=true]/dialog-content:-mx-(--dialog-padding) group-data-[sticky=true]/dialog-content:-mt-(--dialog-padding) group-data-[sticky=true]/dialog-content:rounded-t-lg group-data-[sticky=true]/dialog-content:border-b group-data-[sticky=true]/dialog-content:border-border group-data-[sticky=true]/dialog-content:bg-recessed group-data-[sticky=true]/dialog-content:p-(--dialog-padding) group-has-[>[data-corner-close]]/dialog-content:pe-8 group-data-[sticky=true]/dialog-content:group-has-[>[data-corner-close]]/dialog-content:pe-12", className), ...props }));
@@ -80,7 +80,7 @@ function DialogBody({ className, ...props }) {
80
80
  return (_jsx("div", { "data-slot": "dialog-body", className: cn("-mx-(--dialog-padding) flex min-h-0 flex-1 flex-col gap-nadicode-sm overflow-y-auto px-(--dialog-padding) group-data-[sticky=false]/dialog-content:shrink-0 group-data-[sticky=false]/dialog-content:overflow-y-visible group-data-[sticky=true]/dialog-content:-my-(--dialog-gap) group-data-[sticky=true]/dialog-content:py-(--dialog-padding)", className), ...props }));
81
81
  }
82
82
  function DialogFooter({ className, showCloseButton, closeLabel, children, ...props }) {
83
- return (_jsxs("div", { "data-slot": "dialog-footer", "data-nc-ui": "", className: cn("-mx-(--dialog-padding) -mb-(--dialog-padding) flex shrink-0 flex-row justify-between gap-nadicode-md rounded-b-lg border-t border-border bg-recessed p-nadicode-sm group-data-[phone-layout=sheet]/dialog-content:max-sm:rounded-b-none group-data-[sticky=false]/dialog-content:sticky group-data-[sticky=false]/dialog-content:-bottom-(--dialog-padding) group-data-[sticky=false]/dialog-content:z-10 *:only:w-full [&_[data-slot=button]]:h-nadicode-control-height-sm [&_[data-slot=button]]:min-h-nadicode-control-height-sm [&_[data-slot=button]]:px-button-padding-inline-sm", className), ...props, children: [showCloseButton ? (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: closeLabel })) : null, children] }));
83
+ return (_jsxs("div", { "data-slot": "dialog-footer", "data-nc-ui": "", className: cn("-mx-(--dialog-padding) -mb-(--dialog-padding) flex shrink-0 flex-row justify-between gap-nadicode-md rounded-b-lg border-t border-border bg-recessed p-nadicode-sm group-data-[phone-layout=sheet]/dialog-content:max-sm:rounded-b-none group-data-[sticky=false]/dialog-content:sticky group-data-[sticky=false]/dialog-content:-bottom-(--dialog-padding) group-data-[sticky=false]/dialog-content:z-10 *:only:w-full **:data-[slot=button]:h-nadicode-control-height-sm **:data-[slot=button]:min-h-nadicode-control-height-sm **:data-[slot=button]:px-button-padding-inline-sm", className), ...props, children: [showCloseButton ? (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: closeLabel })) : null, children] }));
84
84
  }
85
85
  function DialogTitle({ className, ...props }) {
86
86
  return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", "data-nc-ui": "", className: cn("text-heading-sm group-data-[sticky=true]/dialog-content:leading-6", className), ...props }));
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
3
3
  import { type UnsavedGuard } from "../internal/unsaved-guard.js";
4
- type DrawerProps = Omit<DrawerPrimitive.Root.Props, "swipeDirection"> & {
4
+ type DrawerProps = Omit<DrawerPrimitive.Root.Props, "swipeDirection" | "defaultOpen"> & {
5
5
  showSwipeHandle?: boolean;
6
6
  /** The panel's height in px, only when the default clips the primary action. */
7
7
  height?: number;
@@ -48,13 +48,13 @@ declare function DrawerContent({ className, children, ...props }: DrawerPrimitiv
48
48
  * so each draws the one hairline that separates it from the body; a caller
49
49
  * adds no edge of its own.
50
50
  */
51
- declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
51
+ declare function DrawerHeader(props: Omit<React.ComponentProps<"div">, "className">): React.JSX.Element;
52
52
  /**
53
53
  * The part of a drawer that scrolls, between its header and footer, which stay
54
54
  * in place so the actions remain reachable.
55
55
  */
56
- declare function DrawerBody({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
57
- declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
56
+ declare function DrawerBody(props: Omit<React.ComponentProps<"div">, "className">): React.JSX.Element;
57
+ declare function DrawerFooter(props: Omit<React.ComponentProps<"div">, "className">): React.JSX.Element;
58
58
  declare function DrawerTitle({ className, ...props }: DrawerPrimitive.Title.Props): React.JSX.Element;
59
59
  declare function DrawerDescription({ className, ...props }: DrawerPrimitive.Description.Props): React.JSX.Element;
60
60
  export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerBody, DrawerFooter, DrawerTitle, DrawerDescription, };
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAA4B,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAsBvF,KAAK,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,GAAG;IACtE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wJAAwJ;IACxJ,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,iBAAS,MAAM,CAAC,EACd,KAAY,EACZ,eAAuB,EACvB,UAAU,EACV,MAAM,EACN,OAAO,EACP,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,WAAW,qBAqBb;AAED,iBAAS,aAAa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E,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAY9E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAmDpF;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,qBAQ1E;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,qBAQxE;AAED,iBAAS,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,qBAQ1E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAQxE;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAQpF;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
@@ -4,6 +4,7 @@ import * as React from "react";
4
4
  import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
5
5
  import { holdBackUnsavedDismissal } from "../internal/unsaved-guard.js";
6
6
  import { cn } from "../lib/utils.js";
7
+ import { cssVariables } from "../lib/css-variables.js";
7
8
  const DrawerContext = React.createContext(null);
8
9
  function useDrawer() {
9
10
  const context = React.useContext(DrawerContext);
@@ -41,7 +42,7 @@ function useDrawer() {
41
42
  * visible one uses `DrawerClose`.
42
43
  */
43
44
  function Drawer({ modal = true, showSwipeHandle = false, snapPoints, height, unsaved, onOpenChange, ...props }) {
44
- const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
45
+ const hasSnapPoints = snapPoints !== null && snapPoints !== undefined && snapPoints.length > 0;
45
46
  const contextValue = React.useMemo(() => ({ hasSnapPoints, height, modal, showSwipeHandle }), [hasSnapPoints, height, modal, showSwipeHandle]);
46
47
  return (_jsx(DrawerContext.Provider, { value: contextValue, children: _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", modal: modal, onOpenChange: (open, details) => {
47
48
  if (!holdBackUnsavedDismissal(open, details, unsaved))
@@ -58,20 +59,18 @@ function DrawerClose({ ...props }) {
58
59
  return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
59
60
  }
60
61
  function DrawerOverlay({ className, ...props }) {
61
- return (_jsx(DrawerPrimitive.Backdrop, { "data-slot": "drawer-overlay", className: cn("fixed inset-0 z-50 min-h-dvh bg-scrim/scrim opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-[var(--nc-duration-drawer)] ease-[var(--nc-ease-drawer)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*var(--nc-duration-drawer-swipe))] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute", className), ...props }));
62
+ return (_jsx(DrawerPrimitive.Backdrop, { "data-slot": "drawer-overlay", className: cn("fixed inset-0 z-50 min-h-dvh bg-scrim/scrim opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-(--nc-duration-drawer) ease-(--nc-ease-drawer) select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*var(--nc-duration-drawer-swipe))] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute", className), ...props }));
62
63
  }
63
64
  function DrawerSwipeHandle({ className, ...props }) {
64
- return (_jsx("div", { "data-slot": "drawer-swipe-handle", "aria-hidden": "true", className: cn("relative z-10 flex h-3 w-full shrink-0 cursor-grab items-end justify-center transition-opacity duration-[var(--nc-duration-confirm)] ease-[var(--nc-ease-out-strong)] group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 after:block after:h-1 after:w-24 after:shrink-0 after:rounded-full after:bg-muted active:cursor-grabbing", className), ...props }));
65
+ return (_jsx("div", { "data-slot": "drawer-swipe-handle", "aria-hidden": "true", className: cn("relative z-10 flex h-3 w-full shrink-0 cursor-grab items-end justify-center nc-transition-opacity group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 after:block after:h-1 after:w-24 after:shrink-0 after:rounded-full after:bg-muted active:cursor-grabbing", className), ...props }));
65
66
  }
66
67
  function DrawerContent({ className, children, ...props }) {
67
68
  const { hasSnapPoints, height, modal, showSwipeHandle } = useDrawer();
68
- return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [modal === true && _jsx(DrawerOverlay, { "data-snap-points": hasSnapPoints ? "" : undefined }), _jsx(DrawerPrimitive.Viewport, { "data-slot": "drawer-viewport", "data-modal": modal, className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto",
69
- // SAFETY: CSSProperties lists only standard properties; React sets the `--` custom property key here through style.setProperty.
70
- style: height === undefined
69
+ return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [modal === true && _jsx(DrawerOverlay, { "data-snap-points": hasSnapPoints ? "" : undefined }), _jsx(DrawerPrimitive.Viewport, { "data-slot": "drawer-viewport", "data-modal": modal, className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto", style: height === undefined
71
70
  ? undefined
72
- : { "--drawer-custom-height": `${height}px` }, children: _jsxs(DrawerPrimitive.Popup, { "data-slot": "drawer-popup", "data-snap-points": hasSnapPoints ? "" : undefined, className: cn(
71
+ : cssVariables({ "--drawer-custom-height": `${height}px` }), children: _jsxs(DrawerPrimitive.Popup, { "data-slot": "drawer-popup", "data-snap-points": hasSnapPoints ? "" : undefined, className: cn(
73
72
  // Base.
74
- "group/drawer-popup pointer-events-auto fixed inset-x-0 bottom-0 z-50 flex h-(--drawer-content-height) max-h-(--drawer-content-max-height) min-h-0 w-full origin-bottom transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col rounded-t-md border-0 bg-popover text-sm text-popover-foreground nc-elevation-modal transition-[transform,opacity] duration-[var(--nc-duration-drawer)] ease-[var(--nc-ease-drawer)] outline-none select-none motion-reduce:transition-opacity",
73
+ "group/drawer-popup pointer-events-auto fixed inset-x-0 bottom-0 z-50 flex h-(--drawer-content-height) max-h-(--drawer-content-max-height) min-h-0 w-full origin-bottom transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col rounded-t-md border-0 bg-popover text-sm text-popover-foreground nc-elevation-modal transition-[transform,opacity] duration-(--nc-duration-drawer) ease-(--nc-ease-drawer) outline-none select-none motion-reduce:transition-opacity",
75
74
  // Nested.
76
75
  "data-nested-drawer-open:h-(--stack-height) data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
77
76
  // Bleed.
@@ -83,25 +82,25 @@ function DrawerContent({ className, children, ...props }) {
83
82
  // Position.
84
83
  "[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]",
85
84
  // Transitions.
86
- "[--closed-transform:translate3d(0,calc(100%+2px),0)] data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*var(--nc-duration-drawer-swipe))] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*var(--nc-duration-drawer-swipe))] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*var(--nc-duration-drawer-swipe))] motion-reduce:data-ending-style:transform-none motion-reduce:data-starting-style:transform-none motion-reduce:data-ending-style:opacity-0 motion-reduce:data-starting-style:opacity-0", className), ...props, children: [showSwipeHandle && _jsx(DrawerSwipeHandle, {}), _jsx(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-[var(--nc-duration-open)] ease-[var(--nc-ease-out-strong)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"), children: children })] }) })] }));
85
+ "[--closed-transform:translate3d(0,calc(100%+2px),0)] data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*var(--nc-duration-drawer-swipe))] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*var(--nc-duration-drawer-swipe))] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*var(--nc-duration-drawer-swipe))] motion-reduce:data-ending-style:transform-none motion-reduce:data-starting-style:transform-none motion-reduce:data-ending-style:opacity-0 motion-reduce:data-starting-style:opacity-0", className), ...props, children: [showSwipeHandle && _jsx(DrawerSwipeHandle, {}), _jsx(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-(--nc-duration-open) ease-(--nc-ease-out-strong) select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"), children: children })] }) })] }));
87
86
  }
88
87
  /**
89
88
  * The header and the footer stay in place while the body scrolls between them,
90
89
  * so each draws the one hairline that separates it from the body; a caller
91
90
  * adds no edge of its own.
92
91
  */
93
- function DrawerHeader({ className, ...props }) {
94
- return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex shrink-0 flex-col gap-2 p-nadicode-lg pb-nadicode-md text-center", className), ...props }));
92
+ function DrawerHeader(props) {
93
+ return (_jsx("div", { "data-slot": "drawer-header", className: "flex shrink-0 flex-col gap-2 p-nadicode-lg pb-nadicode-md text-center", ...props }));
95
94
  }
96
95
  /**
97
96
  * The part of a drawer that scrolls, between its header and footer, which stay
98
97
  * in place so the actions remain reachable.
99
98
  */
100
- function DrawerBody({ className, ...props }) {
101
- return (_jsx("div", { "data-slot": "drawer-body", className: cn("flex min-h-0 flex-1 flex-col gap-nadicode-md overflow-y-auto p-nadicode-lg", className), ...props }));
99
+ function DrawerBody(props) {
100
+ return (_jsx("div", { "data-slot": "drawer-body", className: "flex min-h-0 flex-1 flex-col gap-nadicode-md overflow-y-auto p-nadicode-lg", ...props }));
102
101
  }
103
- function DrawerFooter({ className, ...props }) {
104
- return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex shrink-0 flex-col gap-2 border-t border-border bg-recessed px-nadicode-lg py-control-padding-inline", className), ...props }));
102
+ function DrawerFooter(props) {
103
+ return (_jsx("div", { "data-slot": "drawer-footer", className: "mt-auto flex shrink-0 flex-col gap-2 border-t border-border bg-recessed px-nadicode-lg py-control-padding-inline", ...props }));
105
104
  }
106
105
  function DrawerTitle({ className, ...props }) {
107
106
  return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn("text-body-lg leading-6 font-semibold text-foreground", className), ...props }));
@@ -11,7 +11,7 @@ import type { LoadingWord } from "./button.js";
11
11
  * @words "Item children are Title Case `Verb + Noun` (`Rename Project`, `Duplicate Deployment`). Bare verbs like `Rename` or `Edit` are wrong outside obvious single-object context." (https://vercel.com/geist/menu) "End an item with `…` only when activating it opens a follow-up dialog (`Rename…`, `Transfer to Team…`)." (https://vercel.com/geist/menu) "Group destructive items at the bottom, separated by a divider, and keep the destructive copy as `Verb + Noun` (`Delete Project`, never bare `Delete`)." (https://vercel.com/geist/menu) "Section headers (`MenuSection title`) are Title Case, 1–2 words (`Workspace`, `Recent Projects`)." (https://vercel.com/geist/menu) "Cap a Menu around 10 items. Past that, group with `MenuSection` or move secondary actions to a settings page." (https://vercel.com/geist/menu) Ours: sentence case, not Title Case: "Remove mailbox", never a bare "Delete"; a section title is sentence case too. Italian runs a third longer; rows wrap, never truncate.
12
12
  * @access "Up/Down arrows move focus through items, Home/End jump to first/last, Enter or Space activates." (https://vercel.com/geist/menu) "Typeahead jumps to the next item whose label starts with the typed character; keep the visible label first so typeahead matches what the user sees." (https://vercel.com/geist/menu) "Return focus to the trigger on close so keyboard users keep their place in the row." (https://vercel.com/geist/menu) Ours: `role="menu"` named by its trigger, items `menuitem`. Unlike Geist, which skips disabled rows, arrows land on a command that cannot run so its reason is read; it is still never highlighted and never runs. A command's icon is hidden; the value it acts on and its reason are its description. `DropdownMenuCommand` requires its `icon`; a command that cannot run takes `disabledReason`, and one a person may not run is `locked` with its `reason`, so nothing is greyed without saying why.
13
13
  */
14
- declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): React.JSX.Element;
14
+ declare function DropdownMenu({ ...props }: Omit<MenuPrimitive.Root.Props, "defaultOpen">): React.JSX.Element;
15
15
  declare function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props): React.JSX.Element;
16
16
  declare function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props): React.JSX.Element;
17
17
  declare function DropdownMenuContent({ align, alignOffset, density, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> & {
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../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,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
@@ -32,7 +32,7 @@ function DropdownMenuGroup({ ...props }) {
32
32
  return _jsx(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
33
33
  }
34
34
  function DropdownMenuLabel({ className, inset, ...props }) {
35
- return (_jsx(MenuPrimitive.GroupLabel, { "data-slot": "dropdown-menu-label", "data-nc-ui": "", "data-inset": inset, className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground group-data-[density=comfortable]/menu:px-2 group-data-[density=comfortable]/menu:py-2 group-data-[density=comfortable]/menu:text-sm group-data-[density=comfortable]/menu:font-normal data-inset:pl-7", className), ...props }));
35
+ return (_jsx(MenuPrimitive.GroupLabel, { "data-slot": "dropdown-menu-label", "data-nc-ui": "", "data-inset": inset, className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground group-data-[density=comfortable]/menu:p-2 group-data-[density=comfortable]/menu:text-sm group-data-[density=comfortable]/menu:font-normal data-inset:pl-7", className), ...props }));
36
36
  }
37
37
  const itemRow = cn(menuRow, "data-[variant=destructive]:text-destructive-soft-foreground data-[variant=destructive]:not-data-disabled:focus:bg-destructive-soft data-[variant=destructive]:*:[svg]:text-destructive-soft-foreground data-[variant=destructive]:data-disabled:text-muted-foreground data-[variant=destructive]:data-disabled:*:[svg]:text-muted-foreground");
38
38
  function DropdownMenuItem({ className, iconOnly = false, inset, variant = "default", ...props }) {
@@ -75,12 +75,16 @@ function DropdownMenuCommand({ icon, iconEnd = false, children, className, detai
75
75
  "aria-disabled": busy || inert || undefined,
76
76
  closeOnClick: busy ? false : props.closeOnClick,
77
77
  className: cn(className, "h-auto w-full min-w-0 items-start justify-start gap-2 text-left font-normal whitespace-normal data-disabled:pointer-events-auto"),
78
- children: (_jsxs(_Fragment, { children: [iconEnd ? null : (_jsx("span", { "aria-hidden": "true", className: "flex h-5 shrink-0 items-center justify-center text-current", children: icon })), _jsxs("span", { className: "grid min-w-0 flex-1 gap-0.5 break-words", children: [_jsx("span", { id: `${id}-label`, children: loadingLabel === undefined ? (children) : (_jsx(PendingLabel, { pending: busy, pendingLabel: loadingLabel, children: children })) }), detail ? (_jsx("span", { className: "font-label-mono text-label-mono text-muted-foreground", "data-slot": "dropdown-menu-detail", id: `${id}-detail`, children: detail })) : null, why ? (_jsx("span", { className: "text-body-sm text-muted-foreground", "data-slot": "dropdown-menu-reason", id: `${id}-reason`, children: why })) : null] }), end ? (_jsx("span", { "aria-hidden": locked || undefined, className: "ml-auto flex h-5 shrink-0 items-center gap-2 pl-3 text-muted-foreground", "data-slot": "dropdown-menu-suffix", children: end })) : null] })),
78
+ children: (_jsxs(_Fragment, { children: [iconEnd ? null : (_jsx("span", { "aria-hidden": "true", className: "flex h-5 shrink-0 items-center justify-center text-current", children: icon })), _jsxs("span", { className: "grid min-w-0 flex-1 gap-0.5 wrap-break-word", children: [_jsx("span", { id: `${id}-label`, children: loadingLabel === undefined ? (children) : (_jsx(PendingLabel, { pending: busy, pendingLabel: loadingLabel, children: children })) }), detail ? (_jsx("span", { className: "font-label-mono text-label-mono text-muted-foreground", "data-slot": "dropdown-menu-detail", id: `${id}-detail`, children: detail })) : null, why ? (_jsx("span", { className: "text-body-sm text-muted-foreground", "data-slot": "dropdown-menu-reason", id: `${id}-reason`, children: why })) : null] }), end ? (_jsx("span", { "aria-hidden": locked ? true : undefined, className: "ml-auto flex h-5 shrink-0 items-center gap-2 pl-3 text-muted-foreground", "data-slot": "dropdown-menu-suffix", children: end })) : null] })),
79
79
  };
80
- if (link !== undefined && !inert && !busy) {
81
- return _jsx(DropdownMenuLink, { ...row, label: props.label, render: link });
80
+ const linkElement = link ??
81
+ (React.isValidElement(props.render) && props.render.props.href !== undefined
82
+ ? props.render
83
+ : undefined);
84
+ if (linkElement !== undefined && !inert && !busy) {
85
+ return _jsx(DropdownMenuLink, { ...row, label: props.label, render: linkElement });
82
86
  }
83
- return (_jsx(DropdownMenuItem, { "data-slot": "dropdown-menu-item", "data-nc-ui": "", "data-locked": locked || undefined, ...props, ...row, disabled: inert, onClick: busy ? undefined : onClick }));
87
+ return (_jsx(DropdownMenuItem, { "data-slot": "dropdown-menu-item", "data-nc-ui": "", "data-locked": locked ? true : undefined, ...props, ...row, disabled: inert, onClick: busy ? undefined : onClick }));
84
88
  }
85
89
  function DropdownMenuSub({ ...props }) {
86
90
  return _jsx(MenuPrimitive.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
@@ -30,9 +30,9 @@ export const EMPTY_ART_NAMES = [
30
30
  */
31
31
  export function approveEmptyArt(imported) {
32
32
  // SAFETY: the map holds one entry per EMPTY_ART_NAMES name, each the address of that name's imported picture; approving those addresses is this function's job, and the brand has no runtime value.
33
+ // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- Object.fromEntries types its keys as string and EmptyArt is a brand with no runtime value; the map has one entry per EMPTY_ART_NAMES name.
33
34
  return Object.fromEntries(EMPTY_ART_NAMES.map((name) => {
34
35
  const asset = imported[name];
35
- // oxlint-disable-next-line anti-slop/no-runtime-typeof -- an image import is a URL string or Next's StaticImageData depending on the bundler; only typeof tells them apart.
36
36
  return [name, typeof asset === "string" ? asset : asset.src];
37
37
  }));
38
38
  }
@@ -41,7 +41,7 @@ function TitleAndLine({ description, headingLevel, title, }) {
41
41
  return (_jsxs("div", { className: "grid justify-items-center gap-2", children: [_jsx(EmptyTitle, { children: _jsx(SectionHeading, { level: headingLevel, children: title }) }), _jsx(EmptyDescription, { children: description })] }));
42
42
  }
43
43
  function DocsLink({ command }) {
44
- return (_jsx("div", { className: "text-muted-foreground [&_[data-slot=button]]:h-5 [&_[data-slot=button]]:gap-0.5 [&_[data-slot=button]]:px-0! [&_[data-slot=button]]:text-body-sm [&_[data-slot=button]]:font-normal [&_[data-slot=button]]:text-current [&_[data-slot=button]:hover]:text-foreground [&_[data-slot=button]_svg]:size-4!", children: _jsx(PageCommandButton, { command: command, size: "xs", variant: "link" }) }));
44
+ return (_jsx("div", { className: "text-muted-foreground **:data-[slot=button]:h-5 **:data-[slot=button]:gap-0.5 **:data-[slot=button]:px-0! **:data-[slot=button]:text-body-sm **:data-[slot=button]:font-normal **:data-[slot=button]:text-current [&_[data-slot=button]:hover]:text-foreground [&_[data-slot=button]_svg]:size-4!", children: _jsx(PageCommandButton, { command: command, size: "xs", variant: "link" }) }));
45
45
  }
46
46
  function FailedRead({ headingLevel, message, reference, scope, }) {
47
47
  const actions = useRef(null);
@@ -50,5 +50,5 @@ function FailedRead({ headingLevel, message, reference, scope, }) {
50
50
  actions.current?.querySelector("button, a[href]")?.focus();
51
51
  }, [scope]);
52
52
  const body = bodyBeyondTitle(message);
53
- return (_jsxs(Empty, { "data-empty-state": "failed", scope: scope, tone: "error", children: [_jsxs(EmptyHeader, { className: "gap-2", children: [_jsx(EmptyMedia, { variant: "error", children: _jsx(OctagonAlertIcon, { "aria-hidden": "true" }) }), _jsxs("div", { className: "grid min-w-0 gap-2", "data-message-code": message.code, role: "status", children: [_jsx(EmptyTitle, { className: "font-normal break-words text-current", children: _jsx(SectionHeading, { level: headingLevel, children: message.title }) }), body ? (_jsx(EmptyDescription, { className: "break-words text-current", children: body })) : null] }), reference ? (_jsx(Disclosure, { className: "[&_summary]:text-current [&_summary:hover]:text-current", label: reference.label, children: _jsxs("div", { className: "flex min-w-0 items-center justify-center gap-1", "data-empty-reference": true, children: [_jsx("code", { className: "min-w-0 font-mono text-label-mono break-all", children: reference.value }), _jsx(CopyButton, { copiedLabel: reference.copiedLabel, copyFailedLabel: reference.copyFailedLabel, copyLabel: reference.copyLabel, size: "icon-xs", value: reference.value })] }) })) : null] }), message.actions.length > 0 ? (_jsx(EmptyContent, { "data-empty-state-action": true, ref: actions, children: message.actions.slice(0, 2).map((action) => (_jsx(PageCommandButton, { command: action, variant: "outline" }, action.label))) })) : null] }));
53
+ return (_jsxs(Empty, { "data-empty-state": "failed", scope: scope, tone: "error", children: [_jsxs(EmptyHeader, { className: "gap-2", children: [_jsx(EmptyMedia, { variant: "error", children: _jsx(OctagonAlertIcon, { "aria-hidden": "true" }) }), _jsxs("div", { className: "grid min-w-0 gap-2", "data-message-code": message.code, role: "status", children: [_jsx(EmptyTitle, { className: "font-normal wrap-break-word text-current", children: _jsx(SectionHeading, { level: headingLevel, children: message.title }) }), body ? (_jsx(EmptyDescription, { className: "wrap-break-word text-current", children: body })) : null] }), reference ? (_jsx(Disclosure, { className: "[&_summary]:text-current [&_summary:hover]:text-current", label: reference.label, children: _jsxs("div", { className: "flex min-w-0 items-center justify-center gap-1", "data-empty-reference": true, children: [_jsx("code", { className: "min-w-0 font-mono text-label-mono break-all", children: reference.value }), _jsx(CopyButton, { copiedLabel: reference.copiedLabel, copyFailedLabel: reference.copyFailedLabel, copyLabel: reference.copyLabel, size: "icon-xs", value: reference.value })] }) })) : null] }), message.actions.length > 0 ? (_jsx(EmptyContent, { "data-empty-state-action": true, ref: actions, children: message.actions.slice(0, 2).map((action) => (_jsx(PageCommandButton, { command: action, variant: "outline" }, action.label))) })) : null] }));
54
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"entry-scene.d.ts","sourceRoot":"","sources":["../../src/components/entry-scene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAItE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAE5D,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,QAAQ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AA;KAAE,CAAC,CAAC;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAeA"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
+ import { cssVariables } from "../lib/css-variables.js";
3
4
  /**
4
5
  * Nadia's entry screen, contained: the approved picture of the surface behind,
5
6
  * the wordmark at the upper left, Nadia's ribbon and her words centred as one
@@ -26,9 +27,7 @@ export function EntryScene({ aspectRatio = "1220 / 800", minHeight, picture, pic
26
27
  * translation needs, so nothing below it moves between stages.
27
28
  */
28
29
  export function EntryMessage({ lines, live = false, className, children, }) {
29
- return (_jsx("p", { className: cn("nc-entry-message", className), role: live ? "status" : undefined,
30
- // SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
31
- style: lines ? { "--entry-message-lines": lines } : undefined, children: children }));
30
+ return (_jsx("p", { className: cn("nc-entry-message", className), role: live ? "status" : undefined, style: lines ? cssVariables({ "--entry-message-lines": lines }) : undefined, children: children }));
32
31
  }
33
32
  export function EntryActions({ className, children }) {
34
33
  return _jsx("div", { className: cn("nc-entry-actions", className), children: children });
@@ -106,16 +106,16 @@ function FieldError({ className, children, errors, size = "default", ...props })
106
106
  return null;
107
107
  }
108
108
  const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
109
- if (uniqueErrors?.length == 1) {
109
+ if (uniqueErrors?.length === 1) {
110
110
  return uniqueErrors[0]?.message;
111
111
  }
112
112
  return (_jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
113
- // eslint-disable-next-line product-message/raw-text -- a field's validation messages come from the form's schema, worded by the product, and stay with their field
113
+ // oxlint-disable-next-line nadicodeai/raw-error-text -- a field's validation messages come from the form's schema, worded by the product, and stay with their field
114
114
  (error) => error?.message && _jsx("li", { children: error.message }, error.message)) }));
115
115
  }, [children, errors]);
116
116
  if (!content) {
117
117
  return null;
118
118
  }
119
- return (_jsxs("div", { role: "alert", "aria-atomic": "true", "data-slot": "field-error", "data-size": size, className: cn("flex items-start gap-2 text-label-sm leading-5 font-normal text-destructive data-[size=lg]:text-base data-[size=lg]:leading-6", className), ...props, children: [_jsx(OctagonAlertIcon, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0 in-data-[size=lg]:mt-1" }), _jsx("div", { className: "min-w-0", children: content })] }));
119
+ return (_jsxs("div", { role: "alert", "aria-atomic": "true", "data-slot": "field-error", "data-size": size, className: cn("flex items-start gap-2 text-label-sm leading-5 font-normal text-destructive data-[size=lg]:text-base/6 ", className), ...props, children: [_jsx(OctagonAlertIcon, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0 in-data-[size=lg]:mt-1" }), _jsx("div", { className: "min-w-0", children: content })] }));
120
120
  }
121
121
  export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
@@ -1 +1 @@
1
- {"version":3,"file":"file-diff.d.ts","sourceRoot":"","sources":["../../src/components/file-diff.tsx"],"names":[],"mappings":"AAMA,UAAU,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1C;AAYD;;;;;;;;;;;;;;GAcG;AACH,iBAAS,QAAQ,CAAC,EAChB,UAAoB,EACpB,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAW,EACX,YAAwB,EACxB,YAAoD,EACpD,GAAG,KAAK,EACT,EAAE,aAAa,+BAkCf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"file-diff.d.ts","sourceRoot":"","sources":["../../src/components/file-diff.tsx"],"names":[],"mappings":"AAMA,UAAU,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1C;AAgBD;;;;;;;;;;;;;;GAcG;AACH,iBAAS,QAAQ,CAAC,EAChB,UAAoB,EACpB,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAW,EACX,YAAwB,EACxB,YAA6B,EAC7B,GAAG,KAAK,EACT,EAAE,aAAa,+BAkCf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -11,6 +11,9 @@ const MARK = {
11
11
  ...DIFF_MARK,
12
12
  context: "",
13
13
  };
14
+ function unchangedLines(count) {
15
+ return `${count} unchanged lines`;
16
+ }
14
17
  /**
15
18
  * A file's before and after, line by line.
16
19
  *
@@ -26,8 +29,8 @@ const MARK = {
26
29
  * @access Each changed line carries its added or removed label in screen-reader text; the plus and
27
30
  * minus marks are hidden.
28
31
  */
29
- function FileDiff({ addedLabel = "Added", after, before, className, context = 3, removedLabel = "Removed", skippedLabel = (count) => `${count} unchanged lines`, ...props }) {
32
+ function FileDiff({ addedLabel = "Added", after, before, className, context = 3, removedLabel = "Removed", skippedLabel = unchangedLines, ...props }) {
30
33
  const diff = useMemo(() => lineDiff(before, after, context), [after, before, context]);
31
- return (_jsx("div", { className: cn("overflow-hidden rounded-sm border border-border bg-recessed font-code text-code", className), "data-slot": "file-diff", ...props, children: diff.lines.map((line, index) => line.kind === "skipped" ? (_jsx("div", { className: "px-2.5 py-0.5 text-muted-foreground select-none", children: `… ${skippedLabel(line.count)}` }, index)) : (_jsxs("div", { className: cn("grid grid-cols-[1.25rem_minmax(0,1fr)] pr-2.5", ROW[line.kind]), "data-kind": line.kind, children: [_jsx("span", { "aria-hidden": "true", className: "text-center select-none", children: MARK[line.kind] }), line.kind !== "context" ? (_jsx("span", { className: "sr-only", children: line.kind === "added" ? addedLabel : removedLabel })) : null, _jsx("span", { className: "break-words whitespace-pre-wrap", children: line.text || " " })] }, index))) }));
34
+ return (_jsx("div", { className: cn("overflow-hidden rounded-sm border border-border bg-recessed font-code text-code", className), "data-slot": "file-diff", ...props, children: diff.lines.map((line, index) => line.kind === "skipped" ? (_jsx("div", { className: "px-2.5 py-0.5 text-muted-foreground select-none", children: `… ${skippedLabel(line.count)}` }, index)) : (_jsxs("div", { className: cn("grid grid-cols-[1.25rem_minmax(0,1fr)] pr-2.5", ROW[line.kind]), "data-kind": line.kind, children: [_jsx("span", { "aria-hidden": "true", className: "text-center select-none", children: MARK[line.kind] }), line.kind !== "context" ? (_jsx("span", { className: "sr-only", children: line.kind === "added" ? addedLabel : removedLabel })) : null, _jsx("span", { className: "wrap-break-word whitespace-pre-wrap", children: line.text || " " })] }, index))) }));
32
35
  }
33
36
  export { FileDiff };
@@ -44,7 +44,7 @@ declare function FooterInner({ className, variant, width, ...props }: React.Comp
44
44
  variant?: "flat" | "mega";
45
45
  width?: FooterWidth;
46
46
  }): React.JSX.Element;
47
- declare function FooterBrand({ className, ...props }: React.ComponentProps<"a">): React.JSX.Element;
47
+ declare function FooterBrand({ className, children, ...props }: React.ComponentProps<"a">): React.JSX.Element;
48
48
  declare function FooterIdentity({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
49
49
  declare function FooterNav({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
50
50
  declare function FooterMeta({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"foot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AAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAY3E;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,GACf,CAAC"}
@@ -18,10 +18,10 @@ function Footer({ className, variant = "flat", width = "content", ...props }) {
18
18
  return (_jsx("footer", { "data-slot": "footer", "data-variant": variant, "data-width": width, className: cn("dark relative isolate overflow-hidden border-t border-border bg-card py-12 text-foreground [&_a]:no-underline", width === "content" && "px-6", className), ...props }));
19
19
  }
20
20
  function FooterInner({ className, variant = "flat", width = "content", ...props }) {
21
- return (_jsx("div", { "data-slot": "footer-inner", className: cn("relative z-10", width === "page" ? "nc-page" : "mx-auto w-full max-w-[1200px]", variant === "mega" ? "grid gap-8" : "flex flex-wrap items-center justify-between gap-4", className), ...props }));
21
+ return (_jsx("div", { "data-slot": "footer-inner", className: cn("relative z-10", width === "page" ? "nc-page" : "mx-auto w-full max-w-nadicode-content-max", variant === "mega" ? "grid gap-8" : "flex flex-wrap items-center justify-between gap-4", className), ...props }));
22
22
  }
23
- function FooterBrand({ className, ...props }) {
24
- return (_jsx("a", { "data-slot": "footer-brand", className: cn("inline-flex items-center gap-2.5 text-sm font-semibold text-foreground [&_img]:block [&_img]:h-6 [&_img]:w-auto [&_svg]:block [&_svg]:h-6 [&_svg]:w-auto", className), ...props }));
23
+ function FooterBrand({ className, children, ...props }) {
24
+ return (_jsx("a", { "data-slot": "footer-brand", className: cn("inline-flex items-center gap-2.5 text-sm font-semibold text-foreground [&_img]:block [&_img]:h-6 [&_img]:w-auto [&_svg]:block [&_svg]:h-6 [&_svg]:w-auto", className), ...props, children: children }));
25
25
  }
26
26
  function FooterIdentity({ className, ...props }) {
27
27
  return (_jsx("p", { "data-slot": "footer-identity", className: cn("text-body-md m-0 max-w-[52ch] text-muted-foreground", className), ...props }));
@@ -1 +1 @@
1
- {"version":3,"file":"form-dialog.d.ts","sourceRoot":"","sources":["../../src/components/form-dialog.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,wBAAwB,CAAC;AAG1E,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG;IAC/C,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC5C,gGAAgG;IAChG,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAiB,EACjB,OAAO,EACP,OAAe,GAChB,EAAE,eAAe,+BAmBjB;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,MAAM,EACN,MAAM,EACN,WAAmB,EACnB,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,mBAAmB,+BAwBrB"}
1
+ {"version":3,"file":"form-dialog.d.ts","sourceRoot":"","sources":["../../src/components/form-dialog.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,wBAAwB,CAAC;AAG1E,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG;IAC/C,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC5C,gGAAgG;IAChG,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAiB,EACjB,OAAO,EACP,OAAe,GAChB,EAAE,eAAe,+BAmBjB;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,MAAM,EACN,MAAM,EACN,WAAmB,EACnB,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,mBAAmB,+BAwBrB"}