@stll/ui 0.65.1 → 0.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/dist/calendar/day-calendar.d.ts +8 -3
  2. package/dist/calendar/day-calendar.js +8 -11
  3. package/dist/calendar/day-calendar.logic.d.ts +0 -2
  4. package/dist/calendar/day-calendar.logic.js +1 -2
  5. package/dist/calendar/primitives.d.ts +1 -3
  6. package/dist/calendar/primitives.js +1 -2
  7. package/dist/calendar/resource-calendar.d.ts +0 -2
  8. package/dist/calendar/resource-calendar.js +1 -2
  9. package/dist/calendar/resource-calendar.logic.d.ts +1 -3
  10. package/dist/calendar/resource-calendar.logic.js +1 -2
  11. package/dist/components/accordion.d.ts +0 -2
  12. package/dist/components/accordion.js +1 -2
  13. package/dist/components/ai-label.d.ts +0 -2
  14. package/dist/components/ai-label.js +1 -2
  15. package/dist/components/alert-dialog.d.ts +0 -2
  16. package/dist/components/alert-dialog.js +2 -3
  17. package/dist/components/animated-count.d.ts +0 -2
  18. package/dist/components/animated-count.js +1 -2
  19. package/dist/components/animated-preview.css +152 -0
  20. package/dist/components/animated-preview.d.ts +75 -0
  21. package/dist/components/animated-preview.js +105 -0
  22. package/dist/components/application-rail.d.ts +1 -3
  23. package/dist/components/application-rail.js +2 -3
  24. package/dist/components/avatar.d.ts +0 -2
  25. package/dist/components/avatar.js +1 -2
  26. package/dist/components/badge.d.ts +0 -2
  27. package/dist/components/badge.js +1 -2
  28. package/dist/components/bidi-text.d.ts +0 -2
  29. package/dist/components/bidi-text.js +1 -2
  30. package/dist/components/brand-icons.d.ts +0 -2
  31. package/dist/components/brand-icons.js +1 -2
  32. package/dist/components/breadcrumb.d.ts +0 -2
  33. package/dist/components/breadcrumb.js +1 -2
  34. package/dist/components/button.d.ts +0 -2
  35. package/dist/components/button.js +37 -15
  36. package/dist/components/button.native-classes.d.ts +0 -2
  37. package/dist/components/button.native-classes.js +1 -2
  38. package/dist/components/button.native.d.ts +0 -2
  39. package/dist/components/button.native.js +1 -2
  40. package/dist/components/button.shared.d.ts +1 -3
  41. package/dist/components/button.shared.js +1 -2
  42. package/dist/components/checkbox.d.ts +0 -2
  43. package/dist/components/checkbox.js +3 -4
  44. package/dist/components/collapsible.d.ts +0 -2
  45. package/dist/components/collapsible.js +1 -2
  46. package/dist/components/color-picker.d.ts +12 -5
  47. package/dist/components/color-picker.js +8 -10
  48. package/dist/components/combobox.d.ts +0 -2
  49. package/dist/components/combobox.js +5 -6
  50. package/dist/components/command.d.ts +0 -2
  51. package/dist/components/command.js +4 -5
  52. package/dist/components/composer-tokens.d.ts +1 -3
  53. package/dist/components/composer-tokens.js +1 -2
  54. package/dist/components/composer.d.ts +0 -2
  55. package/dist/components/composer.js +2 -3
  56. package/dist/components/context-menu.d.ts +9 -2
  57. package/dist/components/context-menu.js +10 -4
  58. package/dist/components/copy-button.d.ts +0 -2
  59. package/dist/components/copy-button.js +1 -2
  60. package/dist/components/court-badge.d.ts +0 -2
  61. package/dist/components/court-badge.js +1 -2
  62. package/dist/components/court-filter.d.ts +0 -2
  63. package/dist/components/court-filter.js +3 -4
  64. package/dist/components/date-picker-popover.d.ts +0 -2
  65. package/dist/components/date-picker-popover.js +6 -70
  66. package/dist/components/date-picker-popover.logic.d.ts +1 -3
  67. package/dist/components/date-picker-popover.logic.js +1 -2
  68. package/dist/components/date-range-filter.d.ts +0 -2
  69. package/dist/components/date-range-filter.js +1 -2
  70. package/dist/components/destructive-action-confirmation.d.ts +0 -2
  71. package/dist/components/destructive-action-confirmation.js +2 -3
  72. package/dist/components/destructive-confirm-dialog.d.ts +0 -2
  73. package/dist/components/destructive-confirm-dialog.js +1 -2
  74. package/dist/components/details-grid.d.ts +13 -5
  75. package/dist/components/details-grid.js +69 -14
  76. package/dist/components/dialog-form-state.d.ts +1 -3
  77. package/dist/components/dialog-form-state.js +1 -2
  78. package/dist/components/dialog.d.ts +0 -2
  79. package/dist/components/dialog.js +4 -5
  80. package/dist/components/directional-icon.d.ts +0 -2
  81. package/dist/components/directional-icon.js +1 -2
  82. package/dist/components/document-identity-badge.d.ts +0 -2
  83. package/dist/components/document-identity-badge.js +2 -3
  84. package/dist/components/document-identity-badge.logic.d.ts +1 -3
  85. package/dist/components/document-identity-badge.logic.js +1 -2
  86. package/dist/components/document-mark.d.ts +9 -0
  87. package/dist/components/document-mark.js +29 -0
  88. package/dist/components/document-mark.native.d.ts +11 -0
  89. package/dist/components/document-mark.native.js +36 -0
  90. package/dist/components/document-mark.shared.d.ts +378 -0
  91. package/dist/components/document-mark.shared.js +756 -0
  92. package/dist/components/entity-actions.d.ts +34 -0
  93. package/dist/components/entity-actions.js +132 -0
  94. package/dist/components/field.d.ts +0 -2
  95. package/dist/components/field.js +1 -2
  96. package/dist/components/file-input.d.ts +0 -2
  97. package/dist/components/file-input.js +2 -3
  98. package/dist/components/form.d.ts +0 -2
  99. package/dist/components/form.js +1 -2
  100. package/dist/components/frame.d.ts +0 -2
  101. package/dist/components/frame.js +1 -2
  102. package/dist/components/hex-color-picker.d.ts +0 -2
  103. package/dist/components/hex-color-picker.js +2 -3
  104. package/dist/components/horizontal-scroller.d.ts +0 -2
  105. package/dist/components/horizontal-scroller.js +3 -4
  106. package/dist/components/identity-text.d.ts +0 -2
  107. package/dist/components/identity-text.js +2 -3
  108. package/dist/components/inline-drop-indicator.d.ts +1 -3
  109. package/dist/components/inline-drop-indicator.js +1 -2
  110. package/dist/components/inline-rename.d.ts +0 -2
  111. package/dist/components/inline-rename.js +2 -3
  112. package/dist/components/input-control.d.ts +1 -3
  113. package/dist/components/input-control.js +1 -2
  114. package/dist/components/input-group.d.ts +0 -2
  115. package/dist/components/input-group.js +4 -5
  116. package/dist/components/input-otp.d.ts +0 -2
  117. package/dist/components/input-otp.js +1 -2
  118. package/dist/components/input.d.ts +0 -2
  119. package/dist/components/input.js +3 -4
  120. package/dist/components/input.native.d.ts +0 -2
  121. package/dist/components/input.native.js +1 -2
  122. package/dist/components/input.shared.d.ts +1 -3
  123. package/dist/components/kbd.d.ts +58 -0
  124. package/dist/components/kbd.js +90 -0
  125. package/dist/components/label.d.ts +0 -2
  126. package/dist/components/label.js +1 -2
  127. package/dist/components/landing.d.ts +0 -2
  128. package/dist/components/landing.js +1 -2
  129. package/dist/components/list.d.ts +0 -2
  130. package/dist/components/list.js +1 -2
  131. package/dist/components/loader.d.ts +0 -2
  132. package/dist/components/loader.js +1 -2
  133. package/dist/components/loader.native.d.ts +0 -2
  134. package/dist/components/loader.native.js +1 -2
  135. package/dist/components/loader.shared.d.ts +1 -3
  136. package/dist/components/loader.shared.js +1 -2
  137. package/dist/components/matter-icon.d.ts +0 -2
  138. package/dist/components/matter-icon.js +2 -3
  139. package/dist/components/matter-icon.native.d.ts +0 -2
  140. package/dist/components/matter-icon.native.js +2 -3
  141. package/dist/components/matter-icon.shared.d.ts +1 -3
  142. package/dist/components/matter-icon.shared.js +1 -2
  143. package/dist/components/menu-section.d.ts +0 -2
  144. package/dist/components/menu-section.js +1 -2
  145. package/dist/components/menu.d.ts +18 -4
  146. package/dist/components/menu.js +29 -9
  147. package/dist/components/middle-truncate.d.ts +0 -2
  148. package/dist/components/middle-truncate.js +1 -2
  149. package/dist/components/middle-truncate.logic.d.ts +0 -2
  150. package/dist/components/middle-truncate.logic.js +1 -2
  151. package/dist/components/number-input.d.ts +0 -2
  152. package/dist/components/number-input.js +2 -3
  153. package/dist/components/outline-rail.d.ts +12 -3
  154. package/dist/components/outline-rail.js +64 -12
  155. package/dist/components/outline-rail.logic.d.ts +0 -2
  156. package/dist/components/outline-rail.logic.js +7 -3
  157. package/dist/components/pagination.d.ts +0 -2
  158. package/dist/components/pagination.js +1 -2
  159. package/dist/components/popover.d.ts +0 -2
  160. package/dist/components/popover.js +2 -3
  161. package/dist/components/preview-card.d.ts +0 -2
  162. package/dist/components/preview-card.js +1 -2
  163. package/dist/components/preview-pane.d.ts +0 -2
  164. package/dist/components/preview-pane.js +1 -2
  165. package/dist/components/prose.d.ts +0 -2
  166. package/dist/components/prose.js +1 -2
  167. package/dist/components/scroll-area.d.ts +0 -2
  168. package/dist/components/scroll-area.js +1 -2
  169. package/dist/components/scroll-to-top.d.ts +1 -3
  170. package/dist/components/scroll-to-top.js +1 -2
  171. package/dist/components/search-field.d.ts +0 -2
  172. package/dist/components/search-field.js +1 -2
  173. package/dist/components/secret-input.d.ts +0 -2
  174. package/dist/components/secret-input.js +1 -2
  175. package/dist/components/segmented-icon-toggle.d.ts +0 -2
  176. package/dist/components/segmented-icon-toggle.js +2 -3
  177. package/dist/components/select.d.ts +0 -2
  178. package/dist/components/select.js +4 -5
  179. package/dist/components/separator.d.ts +0 -2
  180. package/dist/components/separator.js +1 -2
  181. package/dist/components/separator.native.d.ts +1 -3
  182. package/dist/components/separator.native.js +1 -2
  183. package/dist/components/separator.shared.d.ts +1 -3
  184. package/dist/components/sheet.d.ts +0 -2
  185. package/dist/components/sheet.js +3 -4
  186. package/dist/components/sheet.native.d.ts +1 -3
  187. package/dist/components/sheet.native.js +2 -3
  188. package/dist/components/sheet.shared.d.ts +1 -3
  189. package/dist/components/sidebar.d.ts +0 -2
  190. package/dist/components/sidebar.js +5 -6
  191. package/dist/components/sidebar.logic.d.ts +1 -3
  192. package/dist/components/sidebar.logic.js +1 -2
  193. package/dist/components/skeleton.d.ts +0 -2
  194. package/dist/components/skeleton.js +1 -2
  195. package/dist/components/split-button.d.ts +0 -2
  196. package/dist/components/split-button.js +2 -3
  197. package/dist/components/status-mark.d.ts +0 -2
  198. package/dist/components/status-mark.js +1 -2
  199. package/dist/components/stella-mark.d.ts +1 -3
  200. package/dist/components/stella-mark.js +1 -2
  201. package/dist/components/stella-mark.native.d.ts +1 -3
  202. package/dist/components/stella-mark.native.js +1 -2
  203. package/dist/components/stella-mark.shared.d.ts +1 -3
  204. package/dist/components/stella-mark.shared.js +1 -2
  205. package/dist/components/stella-wordmark.d.ts +1 -3
  206. package/dist/components/stella-wordmark.js +1 -2
  207. package/dist/components/stella-wordmark.native.d.ts +1 -3
  208. package/dist/components/stella-wordmark.native.js +1 -2
  209. package/dist/components/stella-wordmark.shared.d.ts +1 -3
  210. package/dist/components/stella-wordmark.shared.js +1 -2
  211. package/dist/components/steps.d.ts +0 -2
  212. package/dist/components/steps.js +1 -2
  213. package/dist/components/swap-text.d.ts +0 -2
  214. package/dist/components/swap-text.js +1 -2
  215. package/dist/components/switch.d.ts +0 -2
  216. package/dist/components/switch.js +1 -2
  217. package/dist/components/switch.native.d.ts +0 -2
  218. package/dist/components/switch.native.js +1 -2
  219. package/dist/components/switch.shared.d.ts +1 -3
  220. package/dist/components/table-chart.d.ts +1 -3
  221. package/dist/components/table-chart.js +1 -2
  222. package/dist/components/table.d.ts +0 -2
  223. package/dist/components/table.js +1 -2
  224. package/dist/components/tabs.d.ts +0 -2
  225. package/dist/components/tabs.js +2 -3
  226. package/dist/components/text.d.ts +0 -2
  227. package/dist/components/text.js +1 -2
  228. package/dist/components/text.native.d.ts +0 -2
  229. package/dist/components/text.native.js +1 -2
  230. package/dist/components/text.shared.d.ts +1 -3
  231. package/dist/components/text.shared.js +1 -2
  232. package/dist/components/textarea.d.ts +11 -3
  233. package/dist/components/textarea.js +53 -15
  234. package/dist/components/textarea.native.d.ts +1 -3
  235. package/dist/components/textarea.native.js +1 -2
  236. package/dist/components/textarea.shared.d.ts +1 -3
  237. package/dist/components/time-field.d.ts +25 -0
  238. package/dist/components/time-field.js +108 -0
  239. package/dist/components/toast.d.ts +0 -2
  240. package/dist/components/toast.js +4 -5
  241. package/dist/components/toggle-group.d.ts +0 -2
  242. package/dist/components/toggle-group.js +1 -2
  243. package/dist/components/toggle.d.ts +0 -2
  244. package/dist/components/toggle.js +1 -2
  245. package/dist/components/toolbar-icon-action.d.ts +0 -2
  246. package/dist/components/toolbar-icon-action.js +1 -2
  247. package/dist/components/tooltip-trigger-helper.d.ts +0 -2
  248. package/dist/components/tooltip-trigger-helper.js +1 -2
  249. package/dist/components/tooltip.d.ts +7 -3
  250. package/dist/components/tooltip.js +10 -6
  251. package/dist/components/truncated-text.d.ts +0 -2
  252. package/dist/components/truncated-text.js +3 -4
  253. package/dist/components/view-toolbar.d.ts +0 -2
  254. package/dist/components/view-toolbar.js +1 -2
  255. package/dist/components/workspace-shell.d.ts +0 -2
  256. package/dist/components/workspace-shell.js +4 -5
  257. package/dist/css.d.ts +0 -1
  258. package/dist/data-table/schema.d.ts +1 -3
  259. package/dist/data-table/schema.js +1 -2
  260. package/dist/data-table/table.d.ts +0 -2
  261. package/dist/data-table/table.js +2 -3
  262. package/dist/hooks/use-contained-handler.d.ts +0 -2
  263. package/dist/hooks/use-contained-handler.js +1 -2
  264. package/dist/hooks/use-content-dir.d.ts +0 -2
  265. package/dist/hooks/use-content-dir.js +1 -2
  266. package/dist/hooks/use-latest.d.ts +1 -3
  267. package/dist/hooks/use-latest.js +1 -2
  268. package/dist/hooks/use-mobile.d.ts +1 -3
  269. package/dist/hooks/use-mobile.js +1 -2
  270. package/dist/hooks/use-prefers-reduced-motion.d.ts +6 -0
  271. package/dist/hooks/use-prefers-reduced-motion.js +17 -0
  272. package/dist/hooks/use-viewport-width.d.ts +1 -3
  273. package/dist/hooks/use-viewport-width.js +1 -2
  274. package/dist/index.d.ts +5 -4
  275. package/dist/index.js +35 -34
  276. package/dist/inspector/chrome.d.ts +1 -3
  277. package/dist/inspector/chrome.js +2 -3
  278. package/dist/inspector/dock.d.ts +0 -2
  279. package/dist/inspector/dock.js +2 -3
  280. package/dist/inspector/entity-tab.d.ts +0 -2
  281. package/dist/inspector/entity-tab.js +3 -4
  282. package/dist/inspector/entity-tab.logic.d.ts +1 -3
  283. package/dist/inspector/entity-tab.logic.js +1 -2
  284. package/dist/inspector/facet-bar.d.ts +1 -3
  285. package/dist/inspector/facet-bar.js +5 -6
  286. package/dist/inspector/facet-bar.logic.d.ts +1 -3
  287. package/dist/inspector/facet-bar.logic.js +1 -2
  288. package/dist/inspector/index.js +2 -2
  289. package/dist/inspector/layout-tokens.d.ts +1 -3
  290. package/dist/inspector/layout-tokens.js +1 -2
  291. package/dist/inspector/pane-width.d.ts +0 -2
  292. package/dist/inspector/pane-width.js +1 -2
  293. package/dist/inspector/use-pane-width.d.ts +0 -2
  294. package/dist/inspector/use-pane-width.js +1 -2
  295. package/dist/kanban/band-peek.d.ts +1 -3
  296. package/dist/kanban/band-peek.js +1 -2
  297. package/dist/kanban/card-properties.d.ts +1 -3
  298. package/dist/kanban/card-properties.js +1 -2
  299. package/dist/kanban/card-shell.d.ts +1 -3
  300. package/dist/kanban/card-shell.js +2 -3
  301. package/dist/kanban/cell-action.d.ts +1 -3
  302. package/dist/kanban/cell-action.js +2 -3
  303. package/dist/kanban/column-band-header.d.ts +1 -3
  304. package/dist/kanban/column-band-header.js +2 -3
  305. package/dist/kanban/column-bands.d.ts +1 -3
  306. package/dist/kanban/column-bands.js +1 -2
  307. package/dist/kanban/column-header.d.ts +1 -3
  308. package/dist/kanban/column-header.js +1 -2
  309. package/dist/kanban/drag-interactions.d.ts +0 -2
  310. package/dist/kanban/drag-interactions.js +1 -2
  311. package/dist/kanban/grouping.d.ts +1 -3
  312. package/dist/kanban/grouping.js +1 -2
  313. package/dist/kanban/index.js +5 -5
  314. package/dist/kanban/layout-tokens.d.ts +1 -3
  315. package/dist/kanban/layout-tokens.js +1 -2
  316. package/dist/kanban/matrix.d.ts +1 -3
  317. package/dist/kanban/matrix.js +1 -2
  318. package/dist/kanban/sortable-edge.d.ts +0 -2
  319. package/dist/kanban/sortable-edge.js +1 -2
  320. package/dist/kanban/sortable-interactions.d.ts +0 -2
  321. package/dist/kanban/sortable-interactions.js +3 -4
  322. package/dist/kanban/sortable-interactions.logic.d.ts +0 -2
  323. package/dist/kanban/sortable-interactions.logic.js +1 -2
  324. package/dist/kanban/sticky-lane.d.ts +0 -2
  325. package/dist/kanban/sticky-lane.js +1 -2
  326. package/dist/kanban/subgroup-board.d.ts +0 -2
  327. package/dist/kanban/subgroup-board.js +5 -6
  328. package/dist/kanban/touch-identity.d.ts +0 -2
  329. package/dist/kanban/touch-identity.js +1 -2
  330. package/dist/kanban/virtual-cell.d.ts +1 -3
  331. package/dist/kanban/virtual-cell.js +3 -4
  332. package/dist/lib/button-disposition.d.ts +0 -2
  333. package/dist/lib/button-disposition.js +1 -2
  334. package/dist/lib/control-size.d.ts +0 -2
  335. package/dist/lib/control-size.js +1 -2
  336. package/dist/lib/field-trigger.d.ts +1 -3
  337. package/dist/lib/field-trigger.js +1 -2
  338. package/dist/lib/file-picker.d.ts +0 -2
  339. package/dist/lib/file-picker.js +1 -2
  340. package/dist/lib/initials.d.ts +1 -3
  341. package/dist/lib/initials.js +1 -2
  342. package/dist/lib/inline-reorder.d.ts +0 -2
  343. package/dist/lib/inline-reorder.js +1 -2
  344. package/dist/lib/matter-colors.d.ts +0 -2
  345. package/dist/lib/matter-colors.js +1 -2
  346. package/dist/lib/menu-row.d.ts +1 -3
  347. package/dist/lib/menu-row.js +1 -2
  348. package/dist/lib/native-context-menu.d.ts +24 -0
  349. package/dist/lib/native-context-menu.js +85 -0
  350. package/dist/lib/option-color.d.ts +1 -3
  351. package/dist/lib/option-color.js +1 -2
  352. package/dist/lib/overlay-layer.d.ts +1 -3
  353. package/dist/lib/overlay-layer.js +1 -2
  354. package/dist/lib/panel-inset.d.ts +1 -3
  355. package/dist/lib/panel-inset.js +1 -2
  356. package/dist/lib/positioner-sizing.d.ts +1 -3
  357. package/dist/lib/positioner-sizing.js +1 -2
  358. package/dist/lib/renders-nothing.d.ts +8 -0
  359. package/dist/lib/renders-nothing.js +14 -0
  360. package/dist/lib/safe-area.d.ts +1 -3
  361. package/dist/lib/safe-area.js +1 -2
  362. package/dist/lib/scroll-edge-fade.d.ts +1 -3
  363. package/dist/lib/scroll-edge-fade.js +1 -2
  364. package/dist/lib/slot.d.ts +0 -2
  365. package/dist/lib/slot.js +1 -2
  366. package/dist/lib/tab-order.d.ts +0 -2
  367. package/dist/lib/tab-order.js +1 -2
  368. package/dist/lib/tooltip-content.d.ts +1 -3
  369. package/dist/lib/tooltip-content.js +1 -2
  370. package/dist/lib/typed-character.d.ts +1 -3
  371. package/dist/lib/typed-character.js +1 -2
  372. package/dist/lib/utils.d.ts +1 -3
  373. package/dist/lib/utils.js +1 -2
  374. package/dist/lib/week.d.ts +1 -3
  375. package/dist/lib/week.js +1 -2
  376. package/dist/review/review-author-avatar.d.ts +0 -2
  377. package/dist/review/review-author-avatar.js +2 -3
  378. package/dist/review/review-comment-card.d.ts +0 -2
  379. package/dist/review/review-comment-card.js +3 -4
  380. package/dist/review/review-decision-actions.d.ts +0 -2
  381. package/dist/review/review-decision-actions.js +2 -3
  382. package/dist/review/review-diff-text.d.ts +0 -2
  383. package/dist/review/review-diff-text.js +1 -2
  384. package/dist/review/review-out-of-date-notice.d.ts +0 -2
  385. package/dist/review/review-out-of-date-notice.js +2 -3
  386. package/dist/review/review-severity-dot.d.ts +0 -2
  387. package/dist/review/review-severity-dot.js +1 -2
  388. package/dist/review/review-status-badge.d.ts +0 -2
  389. package/dist/review/review-status-badge.js +1 -2
  390. package/dist/review/review-word-diff.d.ts +1 -3
  391. package/dist/review/review-word-diff.js +1 -2
  392. package/dist/review/text-mark.d.ts +0 -2
  393. package/dist/review/text-mark.js +1 -2
  394. package/dist/styles/theme.css +50 -23
  395. package/dist/testing/browser-clock.d.ts +1 -3
  396. package/dist/testing/browser-clock.js +1 -2
  397. package/package.json +50 -10
@@ -0,0 +1,58 @@
1
+ import * as React$1 from "react";
2
+ /**
3
+ * A key or a key combination, drawn as key caps.
4
+ *
5
+ * Give it `keys` and it spells modifiers the way the reader's platform does:
6
+ * `["mod", "K"]` reads `⌘K` on Apple devices and `Ctrl+K` elsewhere. The
7
+ * server and the first client render use the non-Apple spelling, and the
8
+ * label switches once mounted, so hydration never disagrees. Children are
9
+ * shown as written, for a key that needs no translation.
10
+ *
11
+ * `MenuShortcut` and `TooltipPopup`'s `shortcut` render through it, so a
12
+ * shortcut reads the same in a menu, a tooltip and a hint.
13
+ */
14
+ declare const Kbd: ({ className, children, keys, variant, ...props }: KbdProps) => React$1.JSX.Element;
15
+ /** A modifier or named key `Kbd` spells per platform; anything else as is. */
16
+ type KbdNamedKey = "mod" | "ctrl" | "alt" | "shift" | "enter" | "escape" | "backspace" | "delete" | "tab" | "up" | "down" | "left" | "right";
17
+ /**
18
+ * A named key (see `KbdNamedKey`) or any other key (a letter, a digit, a
19
+ * symbol), which is shown as written.
20
+ */
21
+ type KbdKey = string;
22
+ /**
23
+ * A combination: at least one key, so a shortcut can never draw an empty
24
+ * key cap.
25
+ */
26
+ type KbdKeys = readonly [KbdKey, ...KbdKey[]];
27
+ type KbdPlatform = "apple" | "other";
28
+ /**
29
+ * - `cap` (default): a boxed key cap, for a shortcut that stands on its own
30
+ * (a hint, a tooltip).
31
+ * - `plain`: the keys as quiet text with no box, for the end of a row of
32
+ * labels (a menu item), where caps would crowd it.
33
+ */
34
+ type KbdVariant = "cap" | "plain";
35
+ type KbdProps = React$1.ComponentProps<"kbd"> & {
36
+ keys?: KbdKeys | undefined;
37
+ variant?: KbdVariant | undefined;
38
+ };
39
+ /**
40
+ * The combination as the platform writes it: Apple glyphs run together
41
+ * (`⌘⇧K`), other platforms join words with `+` (`Ctrl+Shift+K`).
42
+ */
43
+ declare function formatKeys(keys: readonly KbdKey[], platform: KbdPlatform): string;
44
+ /** What platform detection reads; `userAgentData` is not in every browser. */
45
+ type KbdNavigator = Pick<Navigator, "platform"> & {
46
+ userAgentData?: {
47
+ platform?: string | undefined;
48
+ } | undefined;
49
+ };
50
+ /**
51
+ * The platform a navigator reports. A browser that has `userAgentData` may
52
+ * leave its `platform` empty, so an empty name falls back to
53
+ * `navigator.platform` as a missing one does.
54
+ */
55
+ declare function kbdPlatformOf(nav: KbdNavigator): KbdPlatform;
56
+ /** The reader's platform once mounted; `other` on the server and in hydration. */
57
+ declare function useKbdPlatform(): KbdPlatform;
58
+ export { Kbd, type KbdKey, type KbdKeys, type KbdNamedKey, type KbdNavigator, type KbdPlatform, type KbdProps, type KbdVariant, formatKeys, kbdPlatformOf, useKbdPlatform };
@@ -0,0 +1,90 @@
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { useSyncExternalStore } from "react";
5
+ // src/components/kbd.tsx
6
+ /**
7
+ * A key or a key combination, drawn as key caps.
8
+ *
9
+ * Give it `keys` and it spells modifiers the way the reader's platform does:
10
+ * `["mod", "K"]` reads `⌘K` on Apple devices and `Ctrl+K` elsewhere. The
11
+ * server and the first client render use the non-Apple spelling, and the
12
+ * label switches once mounted, so hydration never disagrees. Children are
13
+ * shown as written, for a key that needs no translation.
14
+ *
15
+ * `MenuShortcut` and `TooltipPopup`'s `shortcut` render through it, so a
16
+ * shortcut reads the same in a menu, a tooltip and a hint.
17
+ */
18
+ const Kbd = ({ className, children, keys, variant = "cap", ...props }) => {
19
+ const platform = useKbdPlatform();
20
+ return /* @__PURE__ */ jsx("kbd", {
21
+ className: cn("inline-flex shrink-0 items-center justify-center gap-0.5 font-sans leading-none font-medium tabular-nums", KBD_VARIANT_CLASS_NAME[variant], className),
22
+ "data-slot": "kbd",
23
+ "data-variant": variant,
24
+ ...props,
25
+ children: keys === void 0 ? children : formatKeys(keys, platform)
26
+ });
27
+ };
28
+ const KBD_VARIANT_CLASS_NAME = {
29
+ cap: "border-border bg-muted text-muted-foreground text-2xs h-5 min-w-5 rounded-sm border px-1",
30
+ plain: "text-foreground-label text-xs tracking-widest"
31
+ };
32
+ const KEY_LABELS = {
33
+ apple: {
34
+ alt: "⌥",
35
+ backspace: "⌫",
36
+ ctrl: "⌃",
37
+ delete: "⌦",
38
+ down: "↓",
39
+ enter: "↩",
40
+ escape: "Esc",
41
+ left: "←",
42
+ mod: "⌘",
43
+ right: "→",
44
+ shift: "⇧",
45
+ tab: "⇥",
46
+ up: "↑"
47
+ },
48
+ other: {
49
+ alt: "Alt",
50
+ backspace: "Backspace",
51
+ ctrl: "Ctrl",
52
+ delete: "Del",
53
+ down: "↓",
54
+ enter: "Enter",
55
+ escape: "Esc",
56
+ left: "←",
57
+ mod: "Ctrl",
58
+ right: "→",
59
+ shift: "Shift",
60
+ tab: "Tab",
61
+ up: "↑"
62
+ }
63
+ };
64
+ function isNamedKey(key) {
65
+ return Object.hasOwn(KEY_LABELS.other, key);
66
+ }
67
+ /**
68
+ * The combination as the platform writes it: Apple glyphs run together
69
+ * (`⌘⇧K`), other platforms join words with `+` (`Ctrl+Shift+K`).
70
+ */
71
+ function formatKeys(keys, platform) {
72
+ return keys.map((key) => isNamedKey(key) ? KEY_LABELS[platform][key] : key).join(platform === "apple" ? "" : "+");
73
+ }
74
+ const APPLE_PLATFORM_PATTERN = /mac|iphone|ipad|ipod/iu;
75
+ /**
76
+ * The platform a navigator reports. A browser that has `userAgentData` may
77
+ * leave its `platform` empty, so an empty name falls back to
78
+ * `navigator.platform` as a missing one does.
79
+ */
80
+ function kbdPlatformOf(nav) {
81
+ const name = nav.userAgentData?.platform || nav.platform;
82
+ return APPLE_PLATFORM_PATTERN.test(name) ? "apple" : "other";
83
+ }
84
+ const detectKbdPlatform = () => kbdPlatformOf(navigator);
85
+ const subscribeToNothing = () => () => void 0;
86
+ /** The reader's platform once mounted; `other` on the server and in hydration. */
87
+ function useKbdPlatform() {
88
+ return useSyncExternalStore(subscribeToNothing, detectKbdPlatform, () => "other");
89
+ }
90
+ export { Kbd, formatKeys, kbdPlatformOf, useKbdPlatform };
@@ -1,5 +1,4 @@
1
1
  import { useRender } from "@base-ui/react/use-render";
2
- //#region src/components/label.d.ts
3
2
  /**
4
3
  * - `default`: the caption above or beside a control.
5
4
  * - `choice`: one row of a list of choices, wrapping its radio or checkbox so
@@ -23,5 +22,4 @@ type LabelVariant = keyof typeof LABEL_VARIANT_CLASS_NAME;
23
22
  declare function Label({ className, render, variant, ...props }: useRender.ComponentProps<"label"> & {
24
23
  variant?: LabelVariant;
25
24
  }): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
26
- //#endregion
27
25
  export { Label, type LabelVariant };
@@ -2,7 +2,7 @@
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { mergeProps } from "@base-ui/react/merge-props";
4
4
  import { useRender } from "@base-ui/react/use-render";
5
- //#region src/components/label.tsx
5
+ // src/components/label.tsx
6
6
  /**
7
7
  * - `default`: the caption above or beside a control.
8
8
  * - `choice`: one row of a list of choices, wrapping its radio or checkbox so
@@ -33,5 +33,4 @@ function Label({ className, render, variant = "default", ...props }) {
33
33
  render
34
34
  });
35
35
  }
36
- //#endregion
37
36
  export { Label };
@@ -1,5 +1,4 @@
1
1
  import { ReactElement, ReactNode } from "react";
2
- //#region src/components/landing.d.ts
3
2
  /**
4
3
  * A home screen's one shape: a greeting and a box in the upper fold, three
5
4
  * columns of what the reader reaches from it below. The chat home and the
@@ -61,5 +60,4 @@ type LandingEmptyProps = {
61
60
  children: ReactNode;
62
61
  };
63
62
  export declare const LandingEmpty: ({ children }: LandingEmptyProps) => import("react").JSX.Element;
64
- //#endregion
65
63
  export {};
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils.js";
3
3
  import { BidiText } from "./bidi-text.js";
4
4
  import { ScrollArea } from "./scroll-area.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- //#region src/components/landing.tsx
6
+ // src/components/landing.tsx
7
7
  const LandingLayout = ({ actions, hero, children, footer }) => /* @__PURE__ */ jsxs("div", {
8
8
  className: "mx-auto flex h-full w-full max-w-5xl flex-1 flex-col overflow-hidden",
9
9
  children: [actions, /* @__PURE__ */ jsx("div", {
@@ -106,5 +106,4 @@ const LandingEmpty = ({ children }) => /* @__PURE__ */ jsx("div", {
106
106
  className: "border-border text-muted-foreground rounded-md border border-dashed px-3 py-3 text-sm",
107
107
  children
108
108
  });
109
- //#endregion
110
109
  export { LANDING_ROW_CLASS, LANDING_SECTION_HEADING_CLASS, LandingButton, LandingEmpty, LandingGreeting, LandingItemText, LandingLayout, LandingRowIcon, LandingSection };
@@ -1,7 +1,6 @@
1
1
  import * as React$1 from "react";
2
2
  import { VariantProps } from "class-variance-authority";
3
3
  import { useRender } from "@base-ui/react/use-render";
4
- //#region src/components/list.d.ts
5
4
  /**
6
5
  * Grouped list: a titled section holding one surface of hairline-divided
7
6
  * rows. Use it for settings and inventories of named things (connections,
@@ -60,5 +59,4 @@ type StatusTone = "neutral" | "success" | "warning" | "destructive";
60
59
  declare const ListItemStatus: ({ tone, className, children, ...props }: React$1.ComponentProps<"span"> & {
61
60
  tone?: StatusTone;
62
61
  }) => React$1.JSX.Element;
63
- //#endregion
64
62
  export { List, ListEmpty, ListGroup, ListGroupAction, ListGroupCount, ListGroupDescription, ListGroupHeader, ListGroupHeading, ListGroupTitle, ListItem, ListItemActions, ListItemContent, ListItemDescription, ListItemMedia, ListItemStatus, ListItemTitle, type StatusTone };
@@ -5,7 +5,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { mergeProps } from "@base-ui/react/merge-props";
6
6
  import { useRender } from "@base-ui/react/use-render";
7
7
  import { cva } from "class-variance-authority";
8
- //#region src/components/list.tsx
8
+ // src/components/list.tsx
9
9
  /**
10
10
  * Grouped list: a titled section holding one surface of hairline-divided
11
11
  * rows. Use it for settings and inventories of named things (connections,
@@ -162,5 +162,4 @@ const ListItemStatus = ({ tone = "neutral", className, children, ...props }) =>
162
162
  className: cn("size-1.5 shrink-0 rounded-full", STATUS_DOT_CLASS[tone])
163
163
  }), children]
164
164
  });
165
- //#endregion
166
165
  export { List, ListEmpty, ListGroup, ListGroupAction, ListGroupCount, ListGroupDescription, ListGroupHeader, ListGroupHeading, ListGroupTitle, ListItem, ListItemActions, ListItemContent, ListItemDescription, ListItemMedia, ListItemStatus, ListItemTitle };
@@ -1,6 +1,5 @@
1
1
  import { ComponentProps } from "react";
2
2
  import { LoaderSize } from "./loader.shared.js";
3
- //#region src/components/loader.d.ts
4
3
  /**
5
4
  * The indeterminate loading indicator for a control or a row: a plain
6
5
  * spinner. Inline (`sm`) next to a control that is busy, `md` in a row or a
@@ -37,5 +36,4 @@ type LoaderStateProps = {
37
36
  hint?: string | undefined;
38
37
  className?: string | undefined;
39
38
  };
40
- //#endregion
41
39
  export { Loader, LoaderState };
@@ -2,7 +2,7 @@ import { LoaderCircleIcon } from "../icons.js";
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { StellaMark } from "./stella-mark.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/loader.tsx
5
+ // src/components/loader.tsx
6
6
  /**
7
7
  * The indeterminate loading indicator for a control or a row: a plain
8
8
  * spinner. Inline (`sm`) next to a control that is busy, `md` in a row or a
@@ -58,5 +58,4 @@ const LOADER_SIZE = {
58
58
  lg: "size-8"
59
59
  };
60
60
  const LoaderMark = () => /* @__PURE__ */ jsx(StellaMark, { className: "animate-loader text-muted-foreground size-full motion-reduce:animate-none motion-reduce:opacity-70" });
61
- //#endregion
62
61
  export { Loader, LoaderState };
@@ -1,6 +1,5 @@
1
1
  import { ActivityIndicatorProps } from "react-native";
2
2
  import { LoaderContract, LoaderSize } from "./loader.shared.js";
3
- //#region src/components/loader.native.d.ts
4
3
  type LoaderProps = Omit<ActivityIndicatorProps, "size"> & {
5
4
  className?: string | undefined;
6
5
  /** The colour is the loader's own: the muted foreground, as on the web. */
@@ -24,5 +23,4 @@ type LoaderProps = Omit<ActivityIndicatorProps, "size"> & {
24
23
  * the platform's spinner in the muted foreground, at the web's sizes.
25
24
  */
26
25
  export declare const Loader: ({ label, size, variant, ...props }: LoaderProps) => import("react").JSX.Element;
27
- //#endregion
28
26
  export type { LoaderContract };
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { ActivityIndicator } from "react-native";
3
- //#region src/components/loader.native.tsx
3
+ // src/components/loader.native.tsx
4
4
  /** The platform's indicator comes in two sizes; `lg` is a region's. */
5
5
  const INDICATOR_SIZE = {
6
6
  sm: "small",
@@ -19,5 +19,4 @@ const Loader = ({ label, size = "md", variant = "status", ...props }) => /* @__P
19
19
  importantForAccessibility: variant === "decorative" ? "no-hide-descendants" : "auto",
20
20
  size: INDICATOR_SIZE[size]
21
21
  });
22
- //#endregion
23
22
  export { Loader };
@@ -1,4 +1,3 @@
1
- //#region src/components/loader.shared.d.ts
2
1
  /** Inline beside a busy control (`sm`), in a row or panel (`md`), or a region (`lg`). */
3
2
  export declare const LOADER_SIZES: readonly ["sm", "md", "lg"];
4
3
  export type LoaderSize = (typeof LOADER_SIZES)[number];
@@ -13,5 +12,4 @@ export type LoaderContract = {
13
12
  /** The surrounding control or text announces the pending state. */
14
13
  variant: "decorative";
15
14
  label?: never;
16
- });
17
- //#endregion
15
+ });
@@ -1,9 +1,8 @@
1
- //#region src/components/loader.shared.ts
1
+ // src/components/loader.shared.ts
2
2
  /** Inline beside a busy control (`sm`), in a row or panel (`md`), or a region (`lg`). */
3
3
  const LOADER_SIZES = [
4
4
  "sm",
5
5
  "md",
6
6
  "lg"
7
7
  ];
8
- //#endregion
9
8
  export { LOADER_SIZES };
@@ -1,5 +1,4 @@
1
1
  import { MatterIconContract } from "./matter-icon.shared.js";
2
- //#region src/components/matter-icon.d.ts
3
2
  type MatterIconProps = {
4
3
  className?: string | undefined;
5
4
  } & MatterIconContract;
@@ -7,5 +6,4 @@ export declare const MatterIcon: (props: MatterIconProps) => import("react").JSX
7
6
  export declare const MattersNavIcon: ({ className }: {
8
7
  className?: string | undefined;
9
8
  }) => import("react").JSX.Element;
10
- //#endregion
11
9
  export {};
@@ -1,9 +1,9 @@
1
1
  import { LayersIcon } from "../icons.js";
2
- import { cn } from "../lib/utils.js";
3
2
  import { resolveMatterColor } from "../lib/matter-colors.js";
3
+ import { cn } from "../lib/utils.js";
4
4
  import { ALL_MATTERS_STACK } from "./matter-icon.shared.js";
5
5
  import { jsx } from "react/jsx-runtime";
6
- //#region src/components/matter-icon.tsx
6
+ // src/components/matter-icon.tsx
7
7
  const MatterIcon = (props) => {
8
8
  if ("matter" in props) return /* @__PURE__ */ jsx(LayersIcon, {
9
9
  "aria-hidden": "true",
@@ -32,5 +32,4 @@ const MattersNavIcon = ({ className }) => /* @__PURE__ */ jsx(MatterIcon, {
32
32
  className,
33
33
  variant: "none"
34
34
  });
35
- //#endregion
36
35
  export { MatterIcon, MattersNavIcon };
@@ -1,5 +1,4 @@
1
1
  import { MatterIconContract } from "./matter-icon.shared.js";
2
- //#region src/components/matter-icon.native.d.ts
3
2
  /**
4
3
  * The shared contract, with a matter's colour optional: the app's matter
5
4
  * records leave it out when none is stored, which the web reads as null.
@@ -21,5 +20,4 @@ type MatterIconProps = ({
21
20
  * matter; the tri-plane stack for all of them.
22
21
  */
23
22
  export declare const MatterIcon: (props: MatterIconProps) => import("react").JSX.Element;
24
- //#endregion
25
23
  export {};
@@ -1,10 +1,10 @@
1
1
  import { resolveMatterColor } from "../lib/matter-colors.js";
2
2
  import { ALL_MATTERS_STACK } from "./matter-icon.shared.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
- import { LayersIcon } from "lucide-react-native";
5
4
  import Svg, { Path } from "react-native-svg";
5
+ import { LayersIcon } from "lucide-react-native";
6
6
  import { useCSSVariable } from "uniwind";
7
- //#region src/components/matter-icon.native.tsx
7
+ // src/components/matter-icon.native.tsx
8
8
  /**
9
9
  * Every palette option a matter can be painted in, as a class. uniwind keeps
10
10
  * only the theme variables some class uses, so naming each option here keeps
@@ -74,5 +74,4 @@ const MatterIcon = (props) => {
74
74
  size
75
75
  });
76
76
  };
77
- //#endregion
78
77
  export { MatterIcon };
@@ -1,4 +1,3 @@
1
- //#region src/components/matter-icon.shared.d.ts
2
1
  export type MatterIconContract = {
3
2
  matter: {
4
3
  id: string;
@@ -17,5 +16,4 @@ export declare const ALL_MATTERS_STACK: readonly [{
17
16
  }, {
18
17
  readonly d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17";
19
18
  readonly option: "green";
20
- }];
21
- //#endregion
19
+ }];
@@ -1,4 +1,4 @@
1
- //#region src/components/matter-icon.shared.ts
1
+ // src/components/matter-icon.shared.ts
2
2
  /** The three planes of the "all matters" glyph, top to bottom, in their tints. */
3
3
  const ALL_MATTERS_STACK = [
4
4
  {
@@ -14,5 +14,4 @@ const ALL_MATTERS_STACK = [
14
14
  option: "green"
15
15
  }
16
16
  ];
17
- //#endregion
18
17
  export { ALL_MATTERS_STACK };
@@ -1,5 +1,4 @@
1
1
  import { PropsWithChildren } from "react";
2
- //#region src/components/menu-section.d.ts
3
2
  /**
4
3
  * A titled group of menu rows. Owns the group's inset, its heading and the
5
4
  * stack the rows sit in, so sibling lists in one panel share a rhythm; the rows
@@ -8,5 +7,4 @@ import { PropsWithChildren } from "react";
8
7
  declare const MenuSection: ({ children, title }: PropsWithChildren<{
9
8
  title: string;
10
9
  }>) => import("react").JSX.Element;
11
- //#endregion
12
10
  export { MenuSection };
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- //#region src/components/menu-section.tsx
2
+ // src/components/menu-section.tsx
3
3
  /**
4
4
  * A titled group of menu rows. Owns the group's inset, its heading and the
5
5
  * stack the rows sit in, so sibling lists in one panel share a rhythm; the rows
@@ -16,5 +16,4 @@ const MenuSection = ({ children, title }) => /* @__PURE__ */ jsxs("section", {
16
16
  children
17
17
  })]
18
18
  });
19
- //#endregion
20
19
  export { MenuSection };
@@ -1,6 +1,6 @@
1
1
  import * as React$1 from "react";
2
+ import { Kbd } from "./kbd.js";
2
3
  import { Menu as Menu$1 } from "@base-ui/react/menu";
3
- //#region src/components/menu.d.ts
4
4
  declare const MenuCreateHandle: typeof Menu$1.createHandle;
5
5
  declare const Menu: typeof Menu$1.Root;
6
6
  declare const MenuPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuPortalProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
@@ -27,6 +27,16 @@ declare const MenuItem: ({ className, inset, variant, ...props }: Menu$1.Item.Pr
27
27
  inset?: boolean;
28
28
  variant?: "default" | "destructive";
29
29
  }) => React$1.JSX.Element;
30
+ /**
31
+ * A menu row that navigates: an `<a>` with the item's look, so it opens in a
32
+ * new tab on a modified click, shows its URL on hover and is announced as a
33
+ * link. Use it for "Open in new tab", "View invoice", help pages; a `MenuItem`
34
+ * with an `onClick` that navigates loses all of that. Pass a router link
35
+ * through `render` to keep client-side navigation.
36
+ */
37
+ declare const MenuLinkItem: ({ className, inset, ...props }: Menu$1.LinkItem.Props & {
38
+ inset?: boolean;
39
+ }) => React$1.JSX.Element;
30
40
  declare const MenuCheckboxItem: ({ className, children, checked, variant, ...props }: Menu$1.CheckboxItem.Props & {
31
41
  variant?: "default" | "switch";
32
42
  }) => React$1.JSX.Element;
@@ -38,7 +48,12 @@ declare const MenuGroupLabel: ({ className, inset, ...props }: Menu$1.GroupLabel
38
48
  inset?: boolean;
39
49
  }) => React$1.JSX.Element;
40
50
  declare const MenuSeparator: ({ className, ...props }: Menu$1.Separator.Props) => React$1.JSX.Element;
41
- declare const MenuShortcut: ({ className, ...props }: React$1.ComponentProps<"kbd">) => React$1.JSX.Element;
51
+ /**
52
+ * The shortcut at the end of a menu row. Pass `keys` (`["mod", "K"]`) to have
53
+ * it spelled for the reader's platform; see `Kbd`. It is the `plain` `Kbd`,
54
+ * with no key-cap box, which would crowd a row of labels.
55
+ */
56
+ declare const MenuShortcut: ({ className, ...props }: Omit<React$1.ComponentProps<typeof Kbd>, "variant">) => React$1.JSX.Element;
42
57
  declare const MenuSub: (props: Menu$1.SubmenuRoot.Props) => React$1.JSX.Element;
43
58
  declare const MenuSubTrigger: ({ className, inset, children, ...props }: Menu$1.SubmenuTrigger.Props & {
44
59
  inset?: boolean;
@@ -50,5 +65,4 @@ declare const MenuSubPopup: ({ className, sideOffset, alignOffset, align, ...pro
50
65
  sideOffset?: Menu$1.Positioner.Props["sideOffset"];
51
66
  alignOffset?: Menu$1.Positioner.Props["alignOffset"];
52
67
  }) => React$1.JSX.Element;
53
- //#endregion
54
- export { Menu as DropdownMenu, Menu, MenuCheckboxItem as DropdownMenuCheckboxItem, MenuCheckboxItem, MenuPopup as DropdownMenuContent, MenuPopup, MenuCreateHandle as DropdownMenuCreateHandle, MenuCreateHandle, MenuGroup as DropdownMenuGroup, MenuGroup, MenuItem as DropdownMenuItem, MenuItem, MenuGroupLabel as DropdownMenuLabel, MenuGroupLabel, MenuPortal as DropdownMenuPortal, MenuPortal, MenuRadioGroup as DropdownMenuRadioGroup, MenuRadioGroup, MenuRadioItem as DropdownMenuRadioItem, MenuRadioItem, MenuSeparator as DropdownMenuSeparator, MenuSeparator, MenuShortcut as DropdownMenuShortcut, MenuShortcut, MenuSub as DropdownMenuSub, MenuSub, MenuSubPopup as DropdownMenuSubContent, MenuSubPopup, MenuSubTrigger as DropdownMenuSubTrigger, MenuSubTrigger, MenuTrigger as DropdownMenuTrigger, MenuTrigger, MenuAnchor };
68
+ export { Menu as DropdownMenu, Menu, MenuCheckboxItem as DropdownMenuCheckboxItem, MenuCheckboxItem, MenuPopup as DropdownMenuContent, MenuPopup, MenuCreateHandle as DropdownMenuCreateHandle, MenuCreateHandle, MenuGroup as DropdownMenuGroup, MenuGroup, MenuItem as DropdownMenuItem, MenuItem, MenuGroupLabel as DropdownMenuLabel, MenuGroupLabel, MenuLinkItem as DropdownMenuLinkItem, MenuLinkItem, MenuPortal as DropdownMenuPortal, MenuPortal, MenuRadioGroup as DropdownMenuRadioGroup, MenuRadioGroup, MenuRadioItem as DropdownMenuRadioItem, MenuRadioItem, MenuSeparator as DropdownMenuSeparator, MenuSeparator, MenuShortcut as DropdownMenuShortcut, MenuShortcut, MenuSub as DropdownMenuSub, MenuSub, MenuSubPopup as DropdownMenuSubContent, MenuSubPopup, MenuSubTrigger as DropdownMenuSubTrigger, MenuSubTrigger, MenuTrigger as DropdownMenuTrigger, MenuTrigger, MenuAnchor };
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { ChevronRightIcon } from "../icons.js";
3
- import { cn } from "../lib/utils.js";
4
3
  import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
5
- import { renderTooltipTrigger } from "./tooltip-trigger-helper.js";
4
+ import { cn } from "../lib/utils.js";
6
5
  import { DirectionalIcon } from "./directional-icon.js";
6
+ import { Kbd } from "./kbd.js";
7
+ import { renderTooltipTrigger } from "./tooltip-trigger-helper.js";
7
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
9
  import { Menu as Menu$1 } from "@base-ui/react/menu";
9
- //#region src/components/menu.tsx
10
+ // src/components/menu.tsx
10
11
  const MenuCreateHandle = Menu$1.createHandle;
11
12
  const Menu = Menu$1.Root;
12
13
  const MenuPortal = Menu$1.Portal;
@@ -50,13 +51,27 @@ const MenuGroup = (props) => /* @__PURE__ */ jsx(Menu$1.Group, {
50
51
  "data-slot": "menu-group",
51
52
  ...props
52
53
  });
54
+ const MENU_ITEM_CLASS_NAME = "text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive-foreground flex min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1 text-base outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-64 data-inset:ps-8 sm:min-h-7 sm:text-sm pointer-coarse:min-h-11 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0 [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4";
53
55
  const MenuItem = ({ className, inset, variant = "default", ...props }) => /* @__PURE__ */ jsx(Menu$1.Item, {
54
- className: cn("text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive-foreground flex min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1 text-base outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-64 data-inset:ps-8 sm:min-h-7 sm:text-sm pointer-coarse:min-h-11 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0 [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4", className),
56
+ className: cn(MENU_ITEM_CLASS_NAME, className),
55
57
  "data-inset": inset,
56
58
  "data-slot": "menu-item",
57
59
  "data-variant": variant,
58
60
  ...props
59
61
  });
62
+ /**
63
+ * A menu row that navigates: an `<a>` with the item's look, so it opens in a
64
+ * new tab on a modified click, shows its URL on hover and is announced as a
65
+ * link. Use it for "Open in new tab", "View invoice", help pages; a `MenuItem`
66
+ * with an `onClick` that navigates loses all of that. Pass a router link
67
+ * through `render` to keep client-side navigation.
68
+ */
69
+ const MenuLinkItem = ({ className, inset, ...props }) => /* @__PURE__ */ jsx(Menu$1.LinkItem, {
70
+ className: cn(MENU_ITEM_CLASS_NAME, className),
71
+ "data-inset": inset,
72
+ "data-slot": "menu-link-item",
73
+ ...props
74
+ });
60
75
  const MenuCheckboxItem = ({ className, children, checked, variant = "default", ...props }) => /* @__PURE__ */ jsx(Menu$1.CheckboxItem, {
61
76
  checked,
62
77
  className: cn("text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground grid min-h-8 cursor-pointer items-center gap-2 rounded-sm py-1 ps-2 text-base outline-none in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-7 sm:text-sm pointer-coarse:min-h-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4", variant === "switch" ? "grid-cols-[1fr_auto] gap-4 pe-1.5" : "grid-cols-[1rem_minmax(0,1fr)] pe-4", className),
@@ -126,10 +141,16 @@ const MenuSeparator = ({ className, ...props }) => /* @__PURE__ */ jsx(Menu$1.Se
126
141
  "data-slot": "menu-separator",
127
142
  ...props
128
143
  });
129
- const MenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("kbd", {
130
- className: cn("text-foreground-label ms-auto font-sans text-xs font-medium tracking-widest", className),
144
+ /**
145
+ * The shortcut at the end of a menu row. Pass `keys` (`["mod", "K"]`) to have
146
+ * it spelled for the reader's platform; see `Kbd`. It is the `plain` `Kbd`,
147
+ * with no key-cap box, which would crowd a row of labels.
148
+ */
149
+ const MenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx(Kbd, {
150
+ className: cn("ms-auto", className),
131
151
  "data-slot": "menu-shortcut",
132
- ...props
152
+ ...props,
153
+ variant: "plain"
133
154
  });
134
155
  const MenuSub = (props) => /* @__PURE__ */ jsx(Menu$1.SubmenuRoot, {
135
156
  "data-slot": "menu-sub",
@@ -156,5 +177,4 @@ const MenuSubPopup = ({ className, sideOffset = 0, alignOffset, align = "start",
156
177
  ...props
157
178
  });
158
179
  };
159
- //#endregion
160
- export { Menu as DropdownMenu, Menu, MenuCheckboxItem as DropdownMenuCheckboxItem, MenuCheckboxItem, MenuPopup as DropdownMenuContent, MenuPopup, MenuCreateHandle as DropdownMenuCreateHandle, MenuCreateHandle, MenuGroup as DropdownMenuGroup, MenuGroup, MenuItem as DropdownMenuItem, MenuItem, MenuGroupLabel as DropdownMenuLabel, MenuGroupLabel, MenuPortal as DropdownMenuPortal, MenuPortal, MenuRadioGroup as DropdownMenuRadioGroup, MenuRadioGroup, MenuRadioItem as DropdownMenuRadioItem, MenuRadioItem, MenuSeparator as DropdownMenuSeparator, MenuSeparator, MenuShortcut as DropdownMenuShortcut, MenuShortcut, MenuSub as DropdownMenuSub, MenuSub, MenuSubPopup as DropdownMenuSubContent, MenuSubPopup, MenuSubTrigger as DropdownMenuSubTrigger, MenuSubTrigger, MenuTrigger as DropdownMenuTrigger, MenuTrigger, MenuAnchor };
180
+ export { Menu as DropdownMenu, Menu, MenuCheckboxItem as DropdownMenuCheckboxItem, MenuCheckboxItem, MenuPopup as DropdownMenuContent, MenuPopup, MenuCreateHandle as DropdownMenuCreateHandle, MenuCreateHandle, MenuGroup as DropdownMenuGroup, MenuGroup, MenuItem as DropdownMenuItem, MenuItem, MenuGroupLabel as DropdownMenuLabel, MenuGroupLabel, MenuLinkItem as DropdownMenuLinkItem, MenuLinkItem, MenuPortal as DropdownMenuPortal, MenuPortal, MenuRadioGroup as DropdownMenuRadioGroup, MenuRadioGroup, MenuRadioItem as DropdownMenuRadioItem, MenuRadioItem, MenuSeparator as DropdownMenuSeparator, MenuSeparator, MenuShortcut as DropdownMenuShortcut, MenuShortcut, MenuSub as DropdownMenuSub, MenuSub, MenuSubPopup as DropdownMenuSubContent, MenuSubPopup, MenuSubTrigger as DropdownMenuSubTrigger, MenuSubTrigger, MenuTrigger as DropdownMenuTrigger, MenuTrigger, MenuAnchor };
@@ -1,4 +1,3 @@
1
- //#region src/components/middle-truncate.d.ts
2
1
  type MiddleTruncateProps = {
3
2
  value: string;
4
3
  className?: string;
@@ -15,5 +14,4 @@ type MiddleTruncateProps = {
15
14
  * text: the element's text and accessible name stay the full value.
16
15
  */
17
16
  export declare const MiddleTruncate: ({ value, className }: MiddleTruncateProps) => import("react").JSX.Element;
18
- //#endregion
19
17
  export {};
@@ -2,7 +2,7 @@
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { graphemesOf, splitForMiddleTruncate } from "./middle-truncate.logic.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/middle-truncate.tsx
5
+ // src/components/middle-truncate.tsx
6
6
  /**
7
7
  * One line of text that, when it does not fit, gives up its middle and keeps
8
8
  * its end: `Smlouva o dílo – revize…klienta.docx`. For names whose end tells
@@ -108,5 +108,4 @@ function fitHead(head) {
108
108
  head.style.clipPath = rtl ? `inset(-0.25em 0 -0.25em ${String(slack)}px)` : `inset(-0.25em ${String(slack)}px -0.25em 0)`;
109
109
  tail.style.translate = `${String(rtl ? slack : -slack)}px 0`;
110
110
  }
111
- //#endregion
112
111
  export { MiddleTruncate };
@@ -1,4 +1,3 @@
1
- //#region src/components/middle-truncate.logic.d.ts
2
1
  /** The value's user-perceived characters, so a cut never splits one. */
3
2
  export declare const graphemesOf: (value: string) => string[];
4
3
  type MiddleTruncateSplit = {
@@ -7,5 +6,4 @@ type MiddleTruncateSplit = {
7
6
  };
8
7
  /** The head and tail of `value`, or null when it should stay in one piece. */
9
8
  export declare const splitForMiddleTruncate: (value: string) => MiddleTruncateSplit | null;
10
- //#endregion
11
9
  export {};
@@ -1,4 +1,4 @@
1
- //#region src/components/middle-truncate.logic.ts
1
+ // src/components/middle-truncate.logic.ts
2
2
  /** The tail aimed for, in graphemes; a word start nearby moves it. */
3
3
  const TAIL = 10;
4
4
  /** The shortest tail a word start may shrink it to. */
@@ -59,5 +59,4 @@ function tailStart(characters) {
59
59
  for (let index = aimed - 1; index >= longest; index--) if (startsWord(index)) return index;
60
60
  return aimed;
61
61
  }
62
- //#endregion
63
62
  export { graphemesOf, splitForMiddleTruncate };
@@ -1,7 +1,6 @@
1
1
  import { ControlSize } from "../lib/control-size.js";
2
2
  import { NumberField } from "@base-ui/react/number-field";
3
3
  import { ReactNode } from "react";
4
- //#region src/components/number-input.d.ts
5
4
  type NumberInputProps = Omit<NumberField.Root.Props, "children" | "className" | "render"> & {
6
5
  className?: string;
7
6
  inputClassName?: string;
@@ -20,5 +19,4 @@ type NumberInputProps = Omit<NumberField.Root.Props, "children" | "className" |
20
19
  * formatting and clamping happen only at Base UI's commit boundaries.
21
20
  */
22
21
  declare const NumberInput: ({ className, inputClassName, inputProps, dir, size, suffix, ...props }: NumberInputProps) => import("react").JSX.Element;
23
- //#endregion
24
22
  export { NumberInput, type NumberInputProps };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { cn } from "../lib/utils.js";
3
2
  import { CONTROL_SIZE } from "../lib/control-size.js";
3
+ import { cn } from "../lib/utils.js";
4
4
  import { INPUT_CONTROL_CLASS_NAME, INPUT_ELEMENT_CLASS_NAME, INPUT_SIZE_CLASS_NAMES } from "./input-control.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { NumberField } from "@base-ui/react/number-field";
7
- //#region src/components/number-input.tsx
7
+ // src/components/number-input.tsx
8
8
  /**
9
9
  * A numeric control that keeps the user's editable text separate from its
10
10
  * canonical numeric value. Parsed changes are reported through `onValueChange`;
@@ -35,5 +35,4 @@ const NumberInput = ({ className, inputClassName, inputProps, dir = "ltr", size
35
35
  children: suffix
36
36
  })]
37
37
  });
38
- //#endregion
39
38
  export { NumberInput };