@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
@@ -1,7 +1,7 @@
1
1
  import { cn } from "../lib/utils.js";
2
2
  import { TEXT_VARIANT_CLASS_NAMES, TEXT_VARIANT_FACES } from "./text.shared.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
- //#region src/components/text.tsx
4
+ // src/components/text.tsx
5
5
  const WEIGHT_CLASS_NAMES = {
6
6
  light: "font-light",
7
7
  regular: "font-normal",
@@ -21,5 +21,4 @@ const Text = ({ className, variant = "body", ...props }) => /* @__PURE__ */ jsx(
21
21
  "data-variant": variant,
22
22
  ...props
23
23
  });
24
- //#endregion
25
24
  export { Text };
@@ -1,6 +1,5 @@
1
1
  import { TextContract, TextVariant } from "./text.shared.js";
2
2
  import { TextProps } from "react-native";
3
- //#region src/components/text.native.d.ts
4
3
  /** The font a role is set in, for a native control that draws its own text. */
5
4
  export declare const textFontFamily: (variant: TextContract["variant"]) => string;
6
5
  /**
@@ -11,5 +10,4 @@ export declare const textFontFamily: (variant: TextContract["variant"]) => strin
11
10
  export declare const Text: ({ className, style, variant, ...props }: Omit<TextProps, keyof TextContract> & TextContract & {
12
11
  className?: string | undefined;
13
12
  }) => import("react").JSX.Element;
14
- //#endregion
15
13
  export type { TextVariant };
@@ -1,7 +1,7 @@
1
1
  import { TEXT_VARIANT_CLASS_NAMES, TEXT_VARIANT_FACES } from "./text.shared.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { Text as Text$1 } from "react-native";
4
- //#region src/components/text.native.tsx
4
+ // src/components/text.native.tsx
5
5
  /**
6
6
  * The embedded DM Sans face, the web's typeface, for each weight, by the
7
7
  * name the app registers it under.
@@ -34,5 +34,4 @@ const Text = ({ className, style, variant = "body", ...props }) => /* @__PURE__
34
34
  style: [{ fontFamily: textFontFamily(variant) }, style],
35
35
  ...props
36
36
  });
37
- //#endregion
38
37
  export { Text, textFontFamily };
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
- //#region src/components/text.shared.d.ts
3
2
  /** Each role's size, colour and spacing, as Tailwind classes. */
4
3
  export declare const TEXT_VARIANT_CLASS_NAMES: {
5
4
  readonly body: "text-base";
@@ -45,5 +44,4 @@ export declare const TEXT_VARIANT_FACES: {
45
44
  export type TextContract = {
46
45
  variant?: TextVariant;
47
46
  children?: ReactNode;
48
- };
49
- //#endregion
47
+ };
@@ -1,4 +1,4 @@
1
- //#region src/components/text.shared.ts
1
+ // src/components/text.shared.ts
2
2
  /** Each role's size, colour and spacing, as Tailwind classes. */
3
3
  const TEXT_VARIANT_CLASS_NAMES = {
4
4
  body: "text-base",
@@ -37,5 +37,4 @@ const TEXT_VARIANT_FACES = {
37
37
  badge: sans("medium"),
38
38
  link: sans("regular")
39
39
  };
40
- //#endregion
41
40
  export { TEXT_VARIANT_CLASS_NAMES, TEXT_VARIANT_FACES };
@@ -1,6 +1,5 @@
1
1
  import * as React$1 from "react";
2
2
  import { ControlSize } from "../lib/control-size.js";
3
- //#region src/components/textarea.d.ts
4
3
  type TextareaProps = React$1.ComponentProps<"textarea"> & {
5
4
  size?: ControlSize | number;
6
5
  unstyled?: boolean;
@@ -17,7 +16,16 @@ type TextareaProps = React$1.ComponentProps<"textarea"> & {
17
16
  * table cell or a row must not push its neighbours around.
18
17
  */
19
18
  fieldSizing?: "content" | "fixed";
19
+ /**
20
+ * The most lines it grows to before it scrolls. Without it the field grows
21
+ * with its content without end.
22
+ */
23
+ maxRows?: number | undefined;
24
+ /**
25
+ * Shows `length / maxLength` under the end of the field. Needs `maxLength`;
26
+ * the browser still enforces the limit.
27
+ */
28
+ showCount?: boolean | undefined;
20
29
  };
21
- declare const Textarea: ({ className, size, unstyled, inline, fieldSizing, dir, onChange, ...props }: TextareaProps) => React$1.JSX.Element;
22
- //#endregion
30
+ declare const Textarea: ({ className, size, unstyled, inline, fieldSizing, maxRows, showCount, dir, onChange, style, ...props }: TextareaProps) => React$1.JSX.Element;
23
31
  export { Textarea, type TextareaProps };
@@ -1,44 +1,82 @@
1
1
  "use client";
2
- import { cn } from "../lib/utils.js";
3
- import { CONTROL_SIZE } from "../lib/control-size.js";
4
2
  import { useContentDir } from "../hooks/use-content-dir.js";
3
+ import { CONTROL_SIZE } from "../lib/control-size.js";
4
+ import { cn } from "../lib/utils.js";
5
5
  import { INLINE_FIELD_CLASS_NAME } from "./input-control.js";
6
- import { jsx } from "react/jsx-runtime";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { useState } from "react";
7
8
  import { mergeProps } from "@base-ui/react/merge-props";
8
9
  import { Field } from "@base-ui/react/field";
9
- //#region src/components/textarea.tsx
10
- const Textarea = ({ className, size = CONTROL_SIZE.default, unstyled = false, inline = false, fieldSizing = "content", dir, onChange, ...props }) => {
10
+ // src/components/textarea.tsx
11
+ const Textarea = ({ className, size = CONTROL_SIZE.default, unstyled = false, inline = false, fieldSizing = "content", maxRows, showCount = false, dir, onChange, style, ...props }) => {
11
12
  const controlSize = typeof size === "number" ? CONTROL_SIZE.default : size;
12
13
  const contentDir = useContentDir({
13
14
  dir,
14
15
  value: props.value,
15
16
  defaultValue: props.defaultValue
16
17
  });
18
+ const [typedLength, setTypedLength] = useState(() => textLength(props.defaultValue));
19
+ const length = props.value === void 0 ? typedLength : textLength(props.value);
20
+ const counted = showCount && props.maxLength !== void 0;
17
21
  const handleChange = (event) => {
18
22
  contentDir.trackValue(event.currentTarget.value);
23
+ if (counted) setTypedLength(event.currentTarget.value.length);
19
24
  onChange?.(event);
20
25
  };
21
- return /* @__PURE__ */ jsx("span", {
22
- className: cn(inline && "relative inline-flex w-full", !unstyled && !inline && "border-input bg-background text-foreground ring-ring/24 has-focus-visible:border-ring has-aria-invalid:border-destructive/36 has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 dark:bg-input/32 dark:has-aria-invalid:ring-destructive/24 relative inline-flex w-full rounded-lg border text-base shadow-xs/5 not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:ring-[3px] has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none sm:text-sm dark:not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", className) || void 0,
26
+ const syncCountOnFormReset = (control) => {
27
+ const textarea = control?.querySelector("textarea");
28
+ const form = textarea?.form;
29
+ if (!counted || props.value !== void 0 || !textarea || !form) return;
30
+ const handleReset = () => {
31
+ setTimeout(() => {
32
+ contentDir.trackValue(textarea.value);
33
+ setTypedLength(textarea.value.length);
34
+ }, 0);
35
+ };
36
+ form.addEventListener("reset", handleReset);
37
+ return () => {
38
+ form.removeEventListener("reset", handleReset);
39
+ };
40
+ };
41
+ const textareaStyle = maxRows === void 0 ? style : {
42
+ ...style,
43
+ "--textarea-max-rows": maxRows
44
+ };
45
+ return /* @__PURE__ */ jsxs("span", {
46
+ className: cn(inline && "relative inline-flex w-full", counted && "relative", !unstyled && !inline && "border-input bg-background text-foreground ring-ring/24 has-focus-visible:border-ring has-aria-invalid:border-destructive/36 has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 dark:bg-input/32 dark:has-aria-invalid:ring-destructive/24 relative inline-flex w-full rounded-lg border text-base shadow-xs/5 not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:ring-[3px] has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none sm:text-sm dark:not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", className) || void 0,
23
47
  "data-size": size,
24
48
  "data-slot": "textarea-control",
25
- children: /* @__PURE__ */ jsx(Field.Control, { render: (defaultProps) => /* @__PURE__ */ jsx("textarea", {
26
- className: cn(inline ? cn(INLINE_FIELD_CLASS_NAME, "resize-none") : cn("w-full rounded-[inherit] px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] outline-none", TEXTAREA_SIZE_CLASS_NAMES[controlSize], fieldSizing === "content" && TEXTAREA_FLOOR_CLASS_NAMES[controlSize]), fieldSizing === "content" ? "field-sizing-content" : "field-sizing-fixed resize-none"),
49
+ ref: syncCountOnFormReset,
50
+ children: [/* @__PURE__ */ jsx(Field.Control, { render: (defaultProps) => /* @__PURE__ */ jsx("textarea", {
51
+ className: cn(inline ? cn(INLINE_FIELD_CLASS_NAME, "resize-none [--textarea-pb:0px] [--textarea-pt:0px]") : cn("w-full rounded-[inherit] px-[calc(--spacing(3)-1px)] outline-none", TEXTAREA_SIZE_CLASS_NAMES[controlSize], fieldSizing === "content" && TEXTAREA_FLOOR_CLASS_NAMES[controlSize]), fieldSizing === "content" ? "field-sizing-content" : "field-sizing-fixed resize-none", "pt-(--textarea-pt) pb-(--textarea-pb)", counted && "[--textarea-pb:--spacing(6)]", maxRows !== void 0 && "max-h-[calc(var(--textarea-max-rows)*1lh+var(--textarea-pt)+var(--textarea-pb))] min-h-0 max-sm:min-h-0"),
27
52
  "data-slot": "textarea",
28
53
  ...mergeProps(defaultProps, props, { onChange: handleChange }),
29
- dir: contentDir.dir
30
- }) })
54
+ dir: contentDir.dir,
55
+ style: textareaStyle
56
+ }) }), counted ? /* @__PURE__ */ jsxs("span", {
57
+ className: "text-muted-foreground pointer-events-none absolute end-3 bottom-1.5 text-xs tabular-nums",
58
+ "data-slot": "textarea-count",
59
+ children: [
60
+ length,
61
+ "/",
62
+ props.maxLength
63
+ ]
64
+ }) : null]
31
65
  });
32
66
  };
67
+ /** Each size's block padding, as the variables the padding and cap read. */
33
68
  const TEXTAREA_SIZE_CLASS_NAMES = {
34
- [CONTROL_SIZE.sm]: "px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)]",
35
- [CONTROL_SIZE.default]: void 0,
36
- [CONTROL_SIZE.lg]: "py-[calc(--spacing(2)-1px)]"
69
+ [CONTROL_SIZE.sm]: "px-[calc(--spacing(2.5)-1px)] [--textarea-pb:calc(--spacing(1)-1px)] [--textarea-pt:calc(--spacing(1)-1px)]",
70
+ [CONTROL_SIZE.default]: "[--textarea-pb:calc(--spacing(1.5)-1px)] [--textarea-pt:calc(--spacing(1.5)-1px)]",
71
+ [CONTROL_SIZE.lg]: "[--textarea-pb:calc(--spacing(2)-1px)] [--textarea-pt:calc(--spacing(2)-1px)]"
37
72
  };
38
73
  const TEXTAREA_FLOOR_CLASS_NAMES = {
39
74
  [CONTROL_SIZE.sm]: "min-h-16.5 max-sm:min-h-19.5",
40
75
  [CONTROL_SIZE.default]: "min-h-17.5 max-sm:min-h-20.5",
41
76
  [CONTROL_SIZE.lg]: "min-h-18.5 max-sm:min-h-21.5"
42
77
  };
43
- //#endregion
78
+ function textLength(value) {
79
+ if (value === void 0) return 0;
80
+ return String(value).length;
81
+ }
44
82
  export { Textarea };
@@ -1,10 +1,8 @@
1
1
  import { ComponentProps } from "react";
2
2
  import { NativeField } from "./input.native.js";
3
- //#region src/components/textarea.native.d.ts
4
3
  /**
5
4
  * The web's `Textarea` (./textarea.tsx) on a phone: text that wraps and grows,
6
5
  * in the web's box, or none for a field inside a container that draws one
7
6
  * (the composer).
8
7
  */
9
- export declare const Textarea: ({ size, unstyled, ...props }: Omit<ComponentProps<typeof NativeField>, "box" | "multiline">) => import("react").JSX.Element;
10
- //#endregion
8
+ export declare const Textarea: ({ size, unstyled, ...props }: Omit<ComponentProps<typeof NativeField>, "box" | "multiline">) => import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { NativeField } from "./input.native.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
- //#region src/components/textarea.native.tsx
3
+ // src/components/textarea.native.tsx
4
4
  /** The web textarea's box at each control size: its border and inset. */
5
5
  const BOX = {
6
6
  sm: "min-h-16 rounded-lg border border-input bg-card px-2.5 py-1.5",
@@ -24,5 +24,4 @@ const Textarea = ({ size = "default", unstyled = false, ...props }) => /* @__PUR
24
24
  multiline: true,
25
25
  size
26
26
  });
27
- //#endregion
28
27
  export { Textarea };
@@ -1,4 +1,2 @@
1
1
  import { TextFieldContract } from "./input.shared.js";
2
- //#region src/components/textarea.shared.d.ts
3
- export type TextareaContract = Omit<TextFieldContract, "onValueChange">;
4
- //#endregion
2
+ export type TextareaContract = Omit<TextFieldContract, "onValueChange">;
@@ -0,0 +1,25 @@
1
+ import * as React$1 from "react";
2
+ import { PickerClock } from "./date-picker-popover.logic.js";
3
+ /**
4
+ * Stacks time fields on one grid, so their labels, hours and minutes line up
5
+ * whatever each label's length. A lone TimeField makes its own group.
6
+ */
7
+ declare const TimeFieldGroup: ({ children, className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
8
+ type TimeFieldProps = {
9
+ className?: string | undefined;
10
+ disabled: boolean;
11
+ /** Ties the field to an error or hint shown next to it. */
12
+ describedBy?: string | undefined;
13
+ invalid?: boolean;
14
+ label: string;
15
+ locale: string;
16
+ onChange: (clock: PickerClock) => void;
17
+ /** A wall-clock `HH:mm` time, or `null` while there is none. */
18
+ time: string | null;
19
+ };
20
+ /**
21
+ * A wall-clock time to the minute: hour and minute selects in the locale's
22
+ * own clock and numerals, so `2 PM` and `14` read as each locale writes them.
23
+ */
24
+ declare const TimeField: ({ className, ...props }: TimeFieldProps) => React$1.JSX.Element;
25
+ export { TimeField, TimeFieldGroup, type TimeFieldProps };
@@ -0,0 +1,108 @@
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import { getHourOptions, getMinuteOptions, getTimeFieldNames, splitPickerTime } from "./date-picker-popover.logic.js";
4
+ import { Select, SelectContent as SelectPopup, SelectItem, SelectTrigger, SelectValue } from "./select.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { createContext, useContext, useId, useMemo } from "react";
7
+ // src/components/time-field.tsx
8
+ /**
9
+ * Label, hour, colon, minute. The time tracks never shrink below their value,
10
+ * so a 12-hour `10 AM` is never clipped. Below 13rem, too narrow for the
11
+ * longest label beside its selects, each label takes its own line above them.
12
+ */
13
+ const TIME_FIELD_GRID_CLASS_NAME = "grid items-center gap-x-1.5 gap-y-1.5 grid-cols-[auto_minmax(max-content,1fr)_auto_minmax(max-content,1fr)] @max-[13rem]/time-fields:grid-cols-[minmax(max-content,1fr)_auto_minmax(max-content,1fr)]";
14
+ /** Set inside a TimeFieldGroup, whose grid every field's row shares. */
15
+ const TimeFieldGroupContext = createContext(false);
16
+ /**
17
+ * Stacks time fields on one grid, so their labels, hours and minutes line up
18
+ * whatever each label's length. A lone TimeField makes its own group.
19
+ */
20
+ const TimeFieldGroup = ({ children, className, ...props }) => /* @__PURE__ */ jsx(TimeFieldGroupContext.Provider, {
21
+ value: true,
22
+ children: /* @__PURE__ */ jsx("div", {
23
+ className: cn("@container/time-fields min-w-0", className),
24
+ ...props,
25
+ children: /* @__PURE__ */ jsx("div", {
26
+ className: TIME_FIELD_GRID_CLASS_NAME,
27
+ children
28
+ })
29
+ })
30
+ });
31
+ /**
32
+ * A wall-clock time to the minute: hour and minute selects in the locale's
33
+ * own clock and numerals, so `2 PM` and `14` read as each locale writes them.
34
+ */
35
+ const TimeField = ({ className, ...props }) => {
36
+ return useContext(TimeFieldGroupContext) ? /* @__PURE__ */ jsx(TimeFieldRow, {
37
+ className,
38
+ ...props
39
+ }) : /* @__PURE__ */ jsx(TimeFieldGroup, {
40
+ className,
41
+ children: /* @__PURE__ */ jsx(TimeFieldRow, { ...props })
42
+ });
43
+ };
44
+ const TimeFieldRow = ({ className, describedBy, disabled, invalid = false, label, locale, onChange, time }) => {
45
+ const labelId = useId();
46
+ const hourOptions = useMemo(() => getHourOptions(locale), [locale]);
47
+ const minuteOptions = useMemo(() => getMinuteOptions(locale), [locale]);
48
+ const fieldNames = useMemo(() => getTimeFieldNames(locale), [locale]);
49
+ const clock = time === null ? null : splitPickerTime(time);
50
+ return /* @__PURE__ */ jsxs("div", {
51
+ "aria-describedby": describedBy,
52
+ "aria-labelledby": labelId,
53
+ className: cn("col-span-full grid grid-cols-subgrid items-center", className),
54
+ role: "group",
55
+ children: [
56
+ /* @__PURE__ */ jsx("span", {
57
+ className: "text-foreground-label text-xs @max-[13rem]/time-fields:col-span-full",
58
+ id: labelId,
59
+ children: label
60
+ }),
61
+ /* @__PURE__ */ jsx(TimePartSelect, {
62
+ disabled,
63
+ invalid,
64
+ label: fieldNames.hour,
65
+ onChange: (hour) => onChange({
66
+ hour,
67
+ minute: clock?.minute ?? 0
68
+ }),
69
+ options: hourOptions,
70
+ value: clock?.hour ?? null
71
+ }),
72
+ /* @__PURE__ */ jsx("span", {
73
+ "aria-hidden": "true",
74
+ className: "text-muted-foreground text-xs",
75
+ children: ":"
76
+ }),
77
+ /* @__PURE__ */ jsx(TimePartSelect, {
78
+ disabled,
79
+ invalid,
80
+ label: fieldNames.minute,
81
+ onChange: (minute) => onChange({
82
+ hour: clock?.hour ?? 0,
83
+ minute
84
+ }),
85
+ options: minuteOptions,
86
+ value: clock?.minute ?? null
87
+ })
88
+ ]
89
+ });
90
+ };
91
+ const TimePartSelect = ({ disabled, invalid, label, onChange, options, value }) => /* @__PURE__ */ jsxs(Select, {
92
+ disabled,
93
+ onValueChange: (next) => {
94
+ if (typeof next === "number") onChange(next);
95
+ },
96
+ value,
97
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
98
+ "aria-invalid": invalid || void 0,
99
+ "aria-label": label,
100
+ className: "w-full min-w-0 tabular-nums",
101
+ size: "sm",
102
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "—" })
103
+ }), /* @__PURE__ */ jsx(SelectPopup, { children: options.map((option) => /* @__PURE__ */ jsx(SelectItem, {
104
+ value: option.value,
105
+ children: option.label
106
+ }, option.value)) })]
107
+ });
108
+ export { TimeField, TimeFieldGroup };
@@ -1,6 +1,5 @@
1
1
  import * as React$1 from "react";
2
2
  import { Toast, ToastManagerAddOptions, ToastObject } from "@base-ui/react/toast";
3
- //#region src/components/toast.d.ts
4
3
  type ToastData = {
5
4
  tooltipStyle?: boolean;
6
5
  timeoutPolicy?: {
@@ -92,5 +91,4 @@ declare function toastCountdownMs({ timeout, type }: {
92
91
  declare function resolveToastUpdateTimeout(options: ToastUpdateOptions, previous: Pick<ToastObject<ToastData>, "actionProps" | "data" | "description" | "title" | "type">): {
93
92
  timeout?: number;
94
93
  };
95
- //#endregion
96
94
  export { AnchoredToastProvider, TOAST_RIGHT_OFFSET_VAR, type ToastPosition, ToastProvider, resolveToastUpdateTimeout, stellaToast, toastCountdownMs, toastDedupeId };
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { CircleAlertIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, XIcon } from "../icons.js";
3
- import { cn } from "../lib/utils.js";
4
3
  import { SAFE_AREA_TOAST_GEOMETRY_CLASS_NAME } from "../lib/safe-area.js";
5
- import { Loader } from "./loader.js";
4
+ import { cn } from "../lib/utils.js";
6
5
  import { buttonVariants } from "./button.js";
6
+ import { Loader } from "./loader.js";
7
7
  import { ScrollArea } from "./scroll-area.js";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import * as React$1 from "react";
10
10
  import { Toast } from "@base-ui/react/toast";
11
- //#region src/components/toast.tsx
11
+ // src/components/toast.tsx
12
12
  const toastManager = Toast.createToastManager();
13
13
  const anchoredToastManager = Toast.createToastManager();
14
14
  const TOAST_RIGHT_OFFSET_VAR = "--stella-toast-right-offset";
@@ -108,7 +108,7 @@ const Toasts = ({ position }) => {
108
108
  "data-slot": "toast-action",
109
109
  children: toastItem.actionProps.children
110
110
  }), /* @__PURE__ */ jsx(Toast.Close, {
111
- className: "text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-0.5 select-none",
111
+ className: "text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded-sm p-0.5 select-none",
112
112
  "data-slot": "toast-close",
113
113
  "aria-label": "Close notification",
114
114
  children: /* @__PURE__ */ jsx(XIcon, { className: "size-4" })
@@ -374,5 +374,4 @@ function getToastIcon(type) {
374
374
  function isToastType(type) {
375
375
  return typeof type === "string" && type in TOAST_ICONS;
376
376
  }
377
- //#endregion
378
377
  export { AnchoredToastProvider, TOAST_RIGHT_OFFSET_VAR, ToastProvider, resolveToastUpdateTimeout, stellaToast, toastCountdownMs, toastDedupeId };
@@ -3,7 +3,6 @@ import * as React$1 from "react";
3
3
  import { ButtonSize } from "./button.shared.js";
4
4
  import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
5
5
  import { ToggleProps } from "./toggle.js";
6
- //#region src/components/toggle-group.d.ts
7
6
  /**
8
7
  * A segmented control: a row of toggles in one tray, of which one (or, with
9
8
  * `multiple`, several) is on. Use it for view modes, density, and filter
@@ -28,5 +27,4 @@ type ToggleGroupProps<Value extends string> = ToggleGroup$1.Props<Value> & {
28
27
  size?: ButtonSize | undefined;
29
28
  children?: React$1.ReactNode;
30
29
  };
31
- //#endregion
32
30
  export { ToggleGroup, ToggleGroupItem, type ToggleGroupProps };
@@ -4,7 +4,7 @@ import { Toggle } from "./toggle.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { createContext, useContext } from "react";
6
6
  import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
7
- //#region src/components/toggle-group.tsx
7
+ // src/components/toggle-group.tsx
8
8
  const ToggleGroupSizeContext = createContext("xs");
9
9
  /**
10
10
  * A segmented control: a row of toggles in one tray, of which one (or, with
@@ -41,5 +41,4 @@ const ToggleGroupItem = ({ className, size, variant = "muted", ...props }) => {
41
41
  ...props
42
42
  });
43
43
  };
44
- //#endregion
45
44
  export { ToggleGroup, ToggleGroupItem };
@@ -2,7 +2,6 @@ import "./button.js";
2
2
  import * as React$1 from "react";
3
3
  import { ButtonSize } from "./button.shared.js";
4
4
  import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
5
- //#region src/components/toggle.d.ts
6
5
  /**
7
6
  * A button that stays pressed: a formatting mark, "show resolved", a pinned
8
7
  * view. It is a `Button` underneath, so it shares the button's sizes, focus
@@ -22,5 +21,4 @@ type ToggleProps<Value extends string> = Toggle$1.Props<Value> & {
22
21
  tooltip?: React$1.ReactNode;
23
22
  variant?: ToggleVariant | undefined;
24
23
  };
25
- //#endregion
26
24
  export { Toggle, type ToggleProps, type ToggleVariant };
@@ -2,7 +2,7 @@
2
2
  import { Button } from "./button.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
5
- //#region src/components/toggle.tsx
5
+ // src/components/toggle.tsx
6
6
  /**
7
7
  * A button that stays pressed: a formatting mark, "show resolved", a pinned
8
8
  * view. It is a `Button` underneath, so it shares the button's sizes, focus
@@ -22,5 +22,4 @@ const Toggle = ({ size = "sm", tooltip, variant = "muted", ...props }) => /* @__
22
22
  }),
23
23
  ...props
24
24
  });
25
- //#endregion
26
25
  export { Toggle };
@@ -1,6 +1,5 @@
1
1
  import { Button } from "./button.js";
2
2
  import { ComponentProps, ReactNode } from "react";
3
- //#region src/components/toolbar-icon-action.d.ts
4
3
  type ToolbarIconActionProps = Omit<ComponentProps<typeof Button>, "aria-label" | "children" | "size" | "title" | "tooltip" | "variant"> & {
5
4
  /** Names the action for the tooltip and for assistive technology. */
6
5
  label: string;
@@ -14,5 +13,4 @@ type ToolbarIconActionProps = Omit<ComponentProps<typeof Button>, "aria-label" |
14
13
  * and the accessible name, and the row stays the same shape everywhere.
15
14
  */
16
15
  export declare const ToolbarIconAction: ({ density, icon, label, ...props }: ToolbarIconActionProps) => import("react").JSX.Element;
17
- //#endregion
18
16
  export {};
@@ -1,6 +1,6 @@
1
1
  import { Button } from "./button.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
- //#region src/components/toolbar-icon-action.tsx
3
+ // src/components/toolbar-icon-action.tsx
4
4
  const SIZE_BY_DENSITY = {
5
5
  header: "icon-sm",
6
6
  toolbar: "icon-xs"
@@ -19,5 +19,4 @@ const ToolbarIconAction = ({ density, icon, label, ...props }) => /* @__PURE__ *
19
19
  variant: "ghost",
20
20
  children: icon
21
21
  });
22
- //#endregion
23
22
  export { ToolbarIconAction };
@@ -1,5 +1,4 @@
1
1
  import * as React$1 from "react";
2
- //#region src/components/tooltip-trigger-helper.d.ts
3
2
  type TooltipTriggerOptions = {
4
3
  trigger: React$1.ReactElement;
5
4
  tooltip: React$1.ReactNode;
@@ -10,5 +9,4 @@ type TooltipTriggerOptions = {
10
9
  * `aria-label` to that Button, whose size decides (see `BUTTON_SIZE_CONTENT`).
11
10
  */
12
11
  declare const renderTooltipTrigger: ({ trigger, tooltip }: TooltipTriggerOptions) => React$1.JSX.Element;
13
- //#endregion
14
12
  export { renderTooltipTrigger };
@@ -2,7 +2,7 @@
2
2
  import { hasTooltipContent } from "../lib/tooltip-content.js";
3
3
  import { Tooltip, TooltipContent as TooltipPopup, TooltipTrigger } from "./tooltip.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/tooltip-trigger-helper.tsx
5
+ // src/components/tooltip-trigger-helper.tsx
6
6
  /**
7
7
  * Overlay triggers pass only an explicit `tooltip`. They cannot tell whether
8
8
  * their content is a label or a glyph; a trigger rendered as `Button` hands its
@@ -12,5 +12,4 @@ const renderTooltipTrigger = ({ trigger, tooltip }) => {
12
12
  if (!hasTooltipContent(tooltip)) return trigger;
13
13
  return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: trigger }), /* @__PURE__ */ jsx(TooltipPopup, { children: tooltip })] });
14
14
  };
15
- //#endregion
16
15
  export { renderTooltipTrigger };
@@ -1,6 +1,6 @@
1
+ import { KbdKeys } from "./kbd.js";
1
2
  import { ReactNode } from "react";
2
3
  import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
3
- //#region src/components/tooltip.d.ts
4
4
  declare const TooltipCreateHandle: typeof Tooltip$1.createHandle;
5
5
  /**
6
6
  * How long the pointer rests on a trigger before its tooltip opens. Base UI
@@ -27,10 +27,14 @@ declare const TooltipTrigger: (props: Tooltip$1.Trigger.Props) => import("react"
27
27
  declare const TooltipFactTrigger: ({ children }: {
28
28
  children: ReactNode;
29
29
  }) => import("react").JSX.Element;
30
- declare const TooltipPopup: ({ className, align, sideOffset, side, children, ...props }: Tooltip$1.Popup.Props & {
30
+ declare const TooltipPopup: ({ className, align, sideOffset, side, children, shortcut, ...props }: Tooltip$1.Popup.Props & {
31
+ /**
32
+ * The keys that do the same as the trigger, shown after the label and
33
+ * spelled for the reader's platform (`["mod", "K"]`).
34
+ */
35
+ shortcut?: KbdKeys | undefined;
31
36
  align?: Tooltip$1.Positioner.Props["align"];
32
37
  side?: Tooltip$1.Positioner.Props["side"];
33
38
  sideOffset?: Tooltip$1.Positioner.Props["sideOffset"];
34
39
  }) => import("react").JSX.Element;
35
- //#endregion
36
40
  export { TOOLTIP_OPEN_DELAY_MS, Tooltip, TooltipPopup as TooltipContent, TooltipPopup, TooltipCreateHandle, TooltipFactTrigger, TooltipProvider, TooltipTrigger };
@@ -1,10 +1,11 @@
1
1
  "use client";
2
- import { cn } from "../lib/utils.js";
3
2
  import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
4
3
  import { CONTENT_SIZED_POSITIONER_CLASS_NAME, IN_FLOW_POPUP_CLASS_NAME } from "../lib/positioner-sizing.js";
5
- import { jsx } from "react/jsx-runtime";
4
+ import { cn } from "../lib/utils.js";
5
+ import { Kbd } from "./kbd.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
7
- //#region src/components/tooltip.tsx
8
+ // src/components/tooltip.tsx
8
9
  const TooltipCreateHandle = Tooltip$1.createHandle;
9
10
  /**
10
11
  * How long the pointer rests on a trigger before its tooltip opens. Base UI
@@ -40,7 +41,7 @@ const TooltipFactTrigger = ({ children }) => /* @__PURE__ */ jsx(Tooltip$1.Trigg
40
41
  type: "button",
41
42
  children
42
43
  });
43
- const TooltipPopup = ({ className, align = "center", sideOffset = 4, side = "top", children, ...props }) => /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
44
+ const TooltipPopup = ({ className, align = "center", sideOffset = 4, side = "top", children, shortcut, ...props }) => /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
44
45
  align,
45
46
  className: cn(CONTENT_SIZED_POSITIONER_CLASS_NAME, "transition-[top,left,right,bottom,transform] data-instant:transition-none", OVERLAY_LAYER_CLASS_NAMES.popup),
46
47
  collisionPadding: 8,
@@ -54,9 +55,12 @@ const TooltipPopup = ({ className, align = "center", sideOffset = 4, side = "top
54
55
  children: /* @__PURE__ */ jsx(Tooltip$1.Viewport, {
55
56
  className: "relative size-full overflow-clip px-(--viewport-inline-padding) py-1 [--viewport-inline-padding:--spacing(2)] **:data-current:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-current:opacity-100 **:data-current:transition-opacity **:data-current:data-ending-style:opacity-0 data-instant:transition-none **:data-previous:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-previous:truncate **:data-previous:opacity-100 **:data-previous:transition-opacity **:data-previous:data-ending-style:opacity-0 **:data-current:data-starting-style:opacity-0 **:data-previous:data-starting-style:opacity-0",
56
57
  "data-slot": "tooltip-viewport",
57
- children
58
+ children: shortcut === void 0 ? children : /* @__PURE__ */ jsxs("span", {
59
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
60
+ "data-slot": "tooltip-shortcut-row",
61
+ children: [children, /* @__PURE__ */ jsx(Kbd, { keys: shortcut })]
62
+ })
58
63
  })
59
64
  })
60
65
  }) });
61
- //#endregion
62
66
  export { TOOLTIP_OPEN_DELAY_MS, Tooltip, TooltipPopup as TooltipContent, TooltipPopup, TooltipCreateHandle, TooltipFactTrigger, TooltipProvider, TooltipTrigger };
@@ -1,7 +1,6 @@
1
1
  import * as React$1 from "react";
2
2
  import { TooltipContent as TooltipPopup } from "./tooltip.js";
3
3
  import { useRender } from "@base-ui/react/use-render";
4
- //#region src/components/truncated-text.d.ts
5
4
  /**
6
5
  * Text that ends in an ellipsis when it does not fit, and shows the whole of
7
6
  * it only when it was actually cut: on hover or focus with a tooltip, and on
@@ -29,5 +28,4 @@ type TruncatedTextProps = useRender.ComponentProps<"span"> & {
29
28
  };
30
29
  /** Whether the element's text is cut by its box, in either direction. */
31
30
  declare function isTextOverflowing(element: Pick<HTMLElement, "clientHeight" | "clientWidth" | "scrollHeight" | "scrollWidth"> | null): boolean;
32
- //#endregion
33
31
  export { TruncatedText, type TruncatedTextLines, type TruncatedTextProps, isTextOverflowing };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { cn } from "../lib/utils.js";
3
- import { Tooltip, TooltipContent as TooltipPopup, TooltipTrigger } from "./tooltip.js";
4
2
  import { containedEventHandler } from "../hooks/use-contained-handler.js";
3
+ import { cn } from "../lib/utils.js";
5
4
  import { Popover, PopoverContent as PopoverPopup } from "./popover.js";
5
+ import { Tooltip, TooltipContent as TooltipPopup, TooltipTrigger } from "./tooltip.js";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import * as React$1 from "react";
8
8
  import { mergeProps } from "@base-ui/react/merge-props";
9
9
  import { useRender } from "@base-ui/react/use-render";
10
- //#region src/components/truncated-text.tsx
10
+ // src/components/truncated-text.tsx
11
11
  /**
12
12
  * Text that ends in an ellipsis when it does not fit, and shows the whole of
13
13
  * it only when it was actually cut: on hover or focus with a tooltip, and on
@@ -107,5 +107,4 @@ const CONTROL_SELECTOR = "a[href], button, label, summary, [role=button], [role=
107
107
  function isInsideControl(element) {
108
108
  return element.closest(CONTROL_SELECTOR) !== null;
109
109
  }
110
- //#endregion
111
110
  export { TruncatedText, isTextOverflowing };