@kismet-ux/constellation 1.8.0 → 1.11.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 (414) hide show
  1. package/README.md +36 -0
  2. package/dist/brand/Logo/logo.css +4 -1
  3. package/dist/form/Checkbox/checkbox.css +48 -34
  4. package/dist/form/Checkbox/checkbox.d.ts +5 -0
  5. package/dist/form/Checkbox/checkbox.d.ts.map +1 -1
  6. package/dist/form/Checkbox/checkbox.js +6 -55
  7. package/dist/form/Checkbox/checkbox.js.map +1 -1
  8. package/dist/form/Checkbox/checkbox.module.scss.js +1 -1
  9. package/dist/form/Combobox/combobox.css +35 -0
  10. package/dist/form/Combobox/combobox.d.ts +41 -0
  11. package/dist/form/Combobox/combobox.d.ts.map +1 -0
  12. package/dist/form/Combobox/combobox.js +152 -0
  13. package/dist/form/Combobox/combobox.js.map +1 -0
  14. package/dist/form/Combobox/combobox.module.scss.js +6 -0
  15. package/dist/form/Combobox/combobox.module.scss.js.map +1 -0
  16. package/dist/form/Combobox/index.d.ts +2 -0
  17. package/dist/form/Combobox/index.d.ts.map +1 -0
  18. package/dist/form/DatePicker/date-picker.d.ts.map +1 -1
  19. package/dist/form/DatePicker/date-picker.js +5 -53
  20. package/dist/form/DatePicker/date-picker.js.map +1 -1
  21. package/dist/form/Input/input.css +12 -0
  22. package/dist/form/Input/input.d.ts.map +1 -1
  23. package/dist/form/Input/input.js +23 -3
  24. package/dist/form/Input/input.js.map +1 -1
  25. package/dist/form/Select/select.css +54 -1
  26. package/dist/form/Select/select.d.ts +41 -3
  27. package/dist/form/Select/select.d.ts.map +1 -1
  28. package/dist/form/Select/select.js +43 -21
  29. package/dist/form/Select/select.js.map +1 -1
  30. package/dist/form/Select/select.module.scss.js +2 -2
  31. package/dist/form/index.d.ts +1 -0
  32. package/dist/form/index.d.ts.map +1 -1
  33. package/dist/form.d.ts +1 -1
  34. package/dist/form.js +2 -1
  35. package/dist/form.js.map +1 -1
  36. package/dist/hooks/index.d.ts +1 -0
  37. package/dist/hooks/index.d.ts.map +1 -1
  38. package/dist/hooks/layout/index.d.ts +1 -0
  39. package/dist/hooks/layout/index.d.ts.map +1 -1
  40. package/dist/hooks/layout/use-flip.d.ts +37 -0
  41. package/dist/hooks/layout/use-flip.d.ts.map +1 -0
  42. package/dist/hooks/layout/use-flip.js +128 -0
  43. package/dist/hooks/layout/use-flip.js.map +1 -0
  44. package/dist/hooks/use-motion.d.ts +30 -0
  45. package/dist/hooks/use-motion.d.ts.map +1 -0
  46. package/dist/hooks/use-motion.js +93 -0
  47. package/dist/hooks/use-motion.js.map +1 -0
  48. package/dist/index-2nHZOukj.d.ts +200 -0
  49. package/dist/index-3Ui8TAHy.d.ts +200 -0
  50. package/dist/index-59JuNTZm.d.ts +537 -0
  51. package/dist/index-5QXWn0de.d.ts +200 -0
  52. package/dist/index-98ozinMf.d.ts +498 -0
  53. package/dist/index-Ah3YQTri.d.ts +566 -0
  54. package/dist/index-As2iBOIu.d.ts +527 -0
  55. package/dist/index-B1Vw0zoR.d.ts +566 -0
  56. package/dist/index-B25sLBMr.d.ts +498 -0
  57. package/dist/index-B4B8aA9X.d.ts +272 -0
  58. package/dist/index-B97hn7Xp.d.ts +514 -0
  59. package/dist/{index-BSSQnlm_.d.ts → index-B9B7JjTb.d.ts} +3 -1
  60. package/dist/index-BFWt_pYt.d.ts +566 -0
  61. package/dist/index-BFZp_Pu6.d.ts +566 -0
  62. package/dist/index-BGL4DvKQ.d.ts +293 -0
  63. package/dist/index-BGP_J4I2.d.ts +498 -0
  64. package/dist/index-BHhoIUD_.d.ts +354 -0
  65. package/dist/index-BI0iaWmp.d.ts +222 -0
  66. package/dist/index-BMSRpHb6.d.ts +273 -0
  67. package/dist/index-BRQWKmfq.d.ts +566 -0
  68. package/dist/index-BTARYt96.d.ts +537 -0
  69. package/dist/index-BTrpuZdU.d.ts +566 -0
  70. package/dist/index-BWTwKQsp.d.ts +354 -0
  71. package/dist/index-B_05Skyi.d.ts +566 -0
  72. package/dist/index-BcQqBGNu.d.ts +200 -0
  73. package/dist/index-Be23E9xD.d.ts +298 -0
  74. package/dist/index-Bf44Z8ak.d.ts +514 -0
  75. package/dist/index-Bg42sKjg.d.ts +498 -0
  76. package/dist/index-Bg_0OPMx.d.ts +566 -0
  77. package/dist/index-BgjRk9l7.d.ts +537 -0
  78. package/dist/index-BhLEMn3N.d.ts +537 -0
  79. package/dist/index-BiqECuUj.d.ts +204 -0
  80. package/dist/index-BjUQiAs1.d.ts +130 -0
  81. package/dist/index-BlKqvax0.d.ts +204 -0
  82. package/dist/index-Bnb0JFqx.d.ts +514 -0
  83. package/dist/index-BpSD6t7A.d.ts +566 -0
  84. package/dist/index-BpxKwrv_.d.ts +537 -0
  85. package/dist/index-Brh7JZAQ.d.ts +514 -0
  86. package/dist/index-C-n7hM4G.d.ts +354 -0
  87. package/dist/index-C0wKb28S.d.ts +514 -0
  88. package/dist/index-C129uthr.d.ts +566 -0
  89. package/dist/index-C1ef0QtQ.d.ts +204 -0
  90. package/dist/index-C4BACHGE.d.ts +272 -0
  91. package/dist/index-C5JU8WTE.d.ts +514 -0
  92. package/dist/index-C63UYi-T.d.ts +195 -0
  93. package/dist/index-C8LoYkC7.d.ts +250 -0
  94. package/dist/index-C9-ECLyr.d.ts +566 -0
  95. package/dist/index-C9B1F-mr.d.ts +293 -0
  96. package/dist/index-CAVmbwa8.d.ts +514 -0
  97. package/dist/index-CBz-v5eM.d.ts +184 -0
  98. package/dist/index-CCpdo0n4.d.ts +130 -0
  99. package/dist/index-CDC_ZncW.d.ts +566 -0
  100. package/dist/index-CFQj-KtR.d.ts +184 -0
  101. package/dist/index-CFaxW5hv.d.ts +184 -0
  102. package/dist/index-CG9DKbG9.d.ts +498 -0
  103. package/dist/index-CGhG7YeI.d.ts +354 -0
  104. package/dist/index-CHC6kRbR.d.ts +537 -0
  105. package/dist/index-CH_q-5fk.d.ts +537 -0
  106. package/dist/index-CIK_SmBm.d.ts +200 -0
  107. package/dist/index-CJ1KPFOf.d.ts +537 -0
  108. package/dist/index-CJ5FEGRG.d.ts +537 -0
  109. package/dist/index-CKX2VNKk.d.ts +240 -0
  110. package/dist/index-CL7kYZ90.d.ts +231 -0
  111. package/dist/index-CNl03fCW.d.ts +498 -0
  112. package/dist/index-CO8Jq0pz.d.ts +298 -0
  113. package/dist/index-CQ-aS-rp.d.ts +566 -0
  114. package/dist/index-CQjzBv4q.d.ts +537 -0
  115. package/dist/index-CRVO4SlF.d.ts +537 -0
  116. package/dist/{index-ibcvWtdH.d.ts → index-CRrCqjAW.d.ts} +11 -1
  117. package/dist/index-CSQFy2xe.d.ts +195 -0
  118. package/dist/index-CWM2ewRz.d.ts +566 -0
  119. package/dist/index-CY6Xq36O.d.ts +204 -0
  120. package/dist/index-CYGOs6JT.d.ts +273 -0
  121. package/dist/index-CYPFkjfk.d.ts +204 -0
  122. package/dist/index-C_hJJ1fH.d.ts +527 -0
  123. package/dist/index-CcM-XHTL.d.ts +273 -0
  124. package/dist/index-CdGF_eEO.d.ts +514 -0
  125. package/dist/index-CdJTE9Lh.d.ts +566 -0
  126. package/dist/index-CdOt-pqR.d.ts +537 -0
  127. package/dist/index-CgeR_2Gi.d.ts +220 -0
  128. package/dist/index-CjUoZbDi.d.ts +354 -0
  129. package/dist/index-CjV6KsFc.d.ts +263 -0
  130. package/dist/index-Ck8LtgBW.d.ts +557 -0
  131. package/dist/index-Cknm9FUU.d.ts +299 -0
  132. package/dist/index-Clv3CnXv.d.ts +184 -0
  133. package/dist/index-Cm4wnJ29.d.ts +514 -0
  134. package/dist/index-Cmz3q-CI.d.ts +273 -0
  135. package/dist/index-CnMBzCft.d.ts +514 -0
  136. package/dist/index-CnVW0FnZ.d.ts +272 -0
  137. package/dist/index-CpIHT-uo.d.ts +231 -0
  138. package/dist/index-CtBEDM0b.d.ts +514 -0
  139. package/dist/index-CtVSiQeY.d.ts +130 -0
  140. package/dist/index-Cu107rOs.d.ts +293 -0
  141. package/dist/index-CxyTd3Ag.d.ts +354 -0
  142. package/dist/index-CywSNvOU.d.ts +200 -0
  143. package/dist/index-CzJL7Lro.d.ts +566 -0
  144. package/dist/index-CzJnKY3r.d.ts +272 -0
  145. package/dist/index-D-R9eOxe.d.ts +354 -0
  146. package/dist/index-D-hdgIbs.d.ts +273 -0
  147. package/dist/index-D-slQ9w4.d.ts +537 -0
  148. package/dist/index-D0jdNDaH.d.ts +204 -0
  149. package/dist/index-D1ir--Li.d.ts +566 -0
  150. package/dist/index-D29_-MCZ.d.ts +354 -0
  151. package/dist/index-D2glATpo.d.ts +273 -0
  152. package/dist/index-D6ATtbor.d.ts +298 -0
  153. package/dist/index-D6HktSlo.d.ts +514 -0
  154. package/dist/index-DB4UBCvy.d.ts +537 -0
  155. package/dist/index-DBd0PU9y.d.ts +222 -0
  156. package/dist/index-DE2Nm-iT.d.ts +354 -0
  157. package/dist/index-DEeJuuvm.d.ts +231 -0
  158. package/dist/index-DHhzBSfL.d.ts +498 -0
  159. package/dist/index-DKpWNCb6.d.ts +204 -0
  160. package/dist/index-DMewi97i.d.ts +566 -0
  161. package/dist/index-DN0gtpck.d.ts +354 -0
  162. package/dist/index-DO23vZ-R.d.ts +514 -0
  163. package/dist/index-DTb2-z6E.d.ts +130 -0
  164. package/dist/index-DV-CN7c0.d.ts +231 -0
  165. package/dist/index-DWgCs62z.d.ts +566 -0
  166. package/dist/index-D_6Qu6ia.d.ts +200 -0
  167. package/dist/index-D_vn8O-I.d.ts +293 -0
  168. package/dist/index-Daq4m4Rf.d.ts +514 -0
  169. package/dist/index-Db6cXpr6.d.ts +537 -0
  170. package/dist/index-DbZ1s2E-.d.ts +514 -0
  171. package/dist/index-DbevJPuY.d.ts +354 -0
  172. package/dist/index-DepmPwP7.d.ts +537 -0
  173. package/dist/index-DfnTWQCz.d.ts +514 -0
  174. package/dist/index-Dfu8WhiS.d.ts +273 -0
  175. package/dist/index-DggMYd7c.d.ts +298 -0
  176. package/dist/index-DhS2nQjt.d.ts +200 -0
  177. package/dist/index-Dn3bC8Ki.d.ts +222 -0
  178. package/dist/index-Dn9bGZvU.d.ts +195 -0
  179. package/dist/index-DnDt7A4Y.d.ts +354 -0
  180. package/dist/index-DpdYKBP2.d.ts +498 -0
  181. package/dist/index-DunP9qIK.d.ts +537 -0
  182. package/dist/index-DxO6-qt5.d.ts +498 -0
  183. package/dist/index-ESQ8WM_8.d.ts +130 -0
  184. package/dist/index-GVz409cm.d.ts +222 -0
  185. package/dist/index-HAx-aLZ0.d.ts +273 -0
  186. package/dist/{index-CkQ6wNCc.d.ts → index-Iuzs6nt9.d.ts} +3 -3
  187. package/dist/index-LnEpnlTq.d.ts +566 -0
  188. package/dist/index-Mihuyg_o.d.ts +204 -0
  189. package/dist/index-Mm1i2OdU.d.ts +537 -0
  190. package/dist/index-P0oxVi77.d.ts +537 -0
  191. package/dist/index-Q5JuPFoN.d.ts +293 -0
  192. package/dist/index-RJviLtvo.d.ts +566 -0
  193. package/dist/index-SnQCbfte.d.ts +498 -0
  194. package/dist/index-Th9It0ZT.d.ts +354 -0
  195. package/dist/index-UHHmyQM5.d.ts +272 -0
  196. package/dist/index-VyGmJYQZ.d.ts +537 -0
  197. package/dist/index-WYH70le_.d.ts +195 -0
  198. package/dist/index-Wj9RYtTX.d.ts +273 -0
  199. package/dist/index-Y-wMZeUG.d.ts +298 -0
  200. package/dist/index-ZgohDspB.d.ts +498 -0
  201. package/dist/index-Zo2rSdXz.d.ts +273 -0
  202. package/dist/index-ZwpWgV4n.d.ts +272 -0
  203. package/dist/index-_oZ4knIl.d.ts +272 -0
  204. package/dist/index-an222nAK.d.ts +354 -0
  205. package/dist/index-daV0QTe0.d.ts +537 -0
  206. package/dist/index-eGZu2HLC.d.ts +231 -0
  207. package/dist/index-eswPA0Un.d.ts +204 -0
  208. package/dist/index-gf6-wf_1.d.ts +566 -0
  209. package/dist/index-hdVr9Wrv.d.ts +566 -0
  210. package/dist/index-iygiXYw2.d.ts +537 -0
  211. package/dist/index-jR29ZGLD.d.ts +514 -0
  212. package/dist/index-kHgI28TP.d.ts +272 -0
  213. package/dist/index-lY4_UCOs.d.ts +566 -0
  214. package/dist/index-miXK87yJ.d.ts +231 -0
  215. package/dist/index-mwbGtZkk.d.ts +273 -0
  216. package/dist/index-ru2DFXcm.d.ts +195 -0
  217. package/dist/index-uj1ll_u-.d.ts +204 -0
  218. package/dist/index-vfq-aH7U.d.ts +537 -0
  219. package/dist/index-xqUz9XjP.d.ts +537 -0
  220. package/dist/index.css +74 -18
  221. package/dist/index.d.ts +78 -12
  222. package/dist/index.js +34 -28
  223. package/dist/index.js.map +1 -1
  224. package/dist/internal/use-scroll-lock.d.ts +15 -0
  225. package/dist/internal/use-scroll-lock.d.ts.map +1 -1
  226. package/dist/internal/use-scroll-lock.js +26 -8
  227. package/dist/internal/use-scroll-lock.js.map +1 -1
  228. package/dist/layout/AppContent/app-content.css +1 -1
  229. package/dist/layout/AppContentBands/app-content-bands.css +21 -0
  230. package/dist/layout/AppContentBands/app-content-bands.d.ts +26 -0
  231. package/dist/layout/AppContentBands/app-content-bands.d.ts.map +1 -0
  232. package/dist/layout/AppContentBands/app-content-bands.js +65 -0
  233. package/dist/layout/AppContentBands/app-content-bands.js.map +1 -0
  234. package/dist/layout/AppContentBands/app-content-bands.module.scss.js +6 -0
  235. package/dist/layout/AppContentBands/app-content-bands.module.scss.js.map +1 -0
  236. package/dist/layout/AppContentBands/index.d.ts +2 -0
  237. package/dist/layout/AppContentBands/index.d.ts.map +1 -0
  238. package/dist/layout/AppContentFooter/app-content-footer.css +9 -0
  239. package/dist/layout/AppContentFooter/app-content-footer.d.ts +38 -0
  240. package/dist/layout/AppContentFooter/app-content-footer.d.ts.map +1 -0
  241. package/dist/layout/AppContentFooter/app-content-footer.js +42 -0
  242. package/dist/layout/AppContentFooter/app-content-footer.js.map +1 -0
  243. package/dist/layout/AppContentFooter/app-content-footer.module.scss.js +6 -0
  244. package/dist/layout/AppContentFooter/app-content-footer.module.scss.js.map +1 -0
  245. package/dist/layout/AppContentFooter/index.d.ts +2 -0
  246. package/dist/layout/AppContentFooter/index.d.ts.map +1 -0
  247. package/dist/layout/AppContentMain/app-content-main.css +6 -0
  248. package/dist/layout/AppContentMain/app-content-main.d.ts +37 -0
  249. package/dist/layout/AppContentMain/app-content-main.d.ts.map +1 -0
  250. package/dist/layout/AppContentMain/app-content-main.js +41 -0
  251. package/dist/layout/AppContentMain/app-content-main.js.map +1 -0
  252. package/dist/layout/AppContentMain/app-content-main.module.scss.js +6 -0
  253. package/dist/layout/AppContentMain/app-content-main.module.scss.js.map +1 -0
  254. package/dist/layout/AppContentMain/index.d.ts +2 -0
  255. package/dist/layout/AppContentMain/index.d.ts.map +1 -0
  256. package/dist/layout/AppFooter/app-footer.js +1 -1
  257. package/dist/layout/AppSidebar/app-sidebar.js +1 -1
  258. package/dist/layout/AppSidebarHeader/app-sidebar-header.css +2 -3
  259. package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts +10 -2
  260. package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts.map +1 -1
  261. package/dist/layout/AppSidebarHeader/app-sidebar-header.js +12 -32
  262. package/dist/layout/AppSidebarHeader/app-sidebar-header.js.map +1 -1
  263. package/dist/layout/Collapse/collapse.css +4 -1
  264. package/dist/layout/Column/column.css +6 -0
  265. package/dist/layout/Column/column.d.ts.map +1 -1
  266. package/dist/layout/Column/column.js +3 -1
  267. package/dist/layout/Column/column.js.map +1 -1
  268. package/dist/layout/Column/column.module.scss.js +1 -1
  269. package/dist/layout/Container/container.css +43 -1
  270. package/dist/layout/Container/container.d.ts.map +1 -1
  271. package/dist/layout/Container/container.js +38 -7
  272. package/dist/layout/Container/container.js.map +1 -1
  273. package/dist/layout/Container/container.module.scss.js +1 -1
  274. package/dist/layout/Grid/grid.css +28 -0
  275. package/dist/layout/Grid/grid.d.ts.map +1 -1
  276. package/dist/layout/Grid/grid.js +40 -4
  277. package/dist/layout/Grid/grid.js.map +1 -1
  278. package/dist/layout/Grid/grid.module.scss.js +1 -1
  279. package/dist/layout/Row/row.css +42 -0
  280. package/dist/layout/Row/row.d.ts.map +1 -1
  281. package/dist/layout/Row/row.js +5 -3
  282. package/dist/layout/Row/row.js.map +1 -1
  283. package/dist/layout/Row/row.module.scss.js +1 -1
  284. package/dist/layout/Sidebar/sidebar.css +4 -2
  285. package/dist/layout/Sidebar/sidebar.d.ts.map +1 -1
  286. package/dist/layout/Sidebar/sidebar.js +1 -1
  287. package/dist/layout/Sidebar/sidebar.js.map +1 -1
  288. package/dist/layout/index.d.ts +2 -0
  289. package/dist/layout/index.d.ts.map +1 -1
  290. package/dist/layout.d.ts +3 -3
  291. package/dist/layout.js +2 -0
  292. package/dist/layout.js.map +1 -1
  293. package/dist/navigation/DropdownMenu/dropdown-menu.d.ts.map +1 -1
  294. package/dist/navigation/DropdownMenu/dropdown-menu.js +1 -1
  295. package/dist/navigation/DropdownMenu/dropdown-menu.js.map +1 -1
  296. package/dist/navigation/NavUser/nav-user.js +2 -2
  297. package/dist/navigation/Sheet/sheet.css +40 -6
  298. package/dist/navigation/Sheet/sheet.d.ts +22 -0
  299. package/dist/navigation/Sheet/sheet.d.ts.map +1 -1
  300. package/dist/navigation/Sheet/sheet.js +5 -30
  301. package/dist/navigation/Sheet/sheet.js.map +1 -1
  302. package/dist/navigation/Sheet/sheet.module.scss.js +1 -1
  303. package/dist/navigation.d.ts +22 -0
  304. package/dist/row-CuhTBQhK.d.ts +21 -0
  305. package/dist/settings/AppearanceDropdown/appearance-dropdown.js +1 -1
  306. package/dist/settings/AppearanceTabs/appearance-tabs.js +2 -27
  307. package/dist/settings/AppearanceTabs/appearance-tabs.js.map +1 -1
  308. package/dist/tokens.css +59 -17
  309. package/dist/tooltip-1qYeAGE9.d.ts +45 -0
  310. package/dist/tooltip-3IOkYFQ-.d.ts +45 -0
  311. package/dist/tooltip-540OmbEG.d.ts +46 -0
  312. package/dist/tooltip-91Nq_Hl8.d.ts +46 -0
  313. package/dist/tooltip-B56sWYK0.d.ts +46 -0
  314. package/dist/tooltip-BIrIF-4z.d.ts +45 -0
  315. package/dist/tooltip-BOipKW5l.d.ts +46 -0
  316. package/dist/tooltip-BPC0RH8i.d.ts +46 -0
  317. package/dist/tooltip-BST1BOCn.d.ts +45 -0
  318. package/dist/tooltip-BhuxNQwX.d.ts +45 -0
  319. package/dist/tooltip-BpAJwi3K.d.ts +46 -0
  320. package/dist/tooltip-C0LBu2Iu.d.ts +45 -0
  321. package/dist/tooltip-C1ZwALiG.d.ts +45 -0
  322. package/dist/tooltip-C55-HA0w.d.ts +45 -0
  323. package/dist/tooltip-CHn6WuDv.d.ts +46 -0
  324. package/dist/tooltip-CNjH7zKO.d.ts +45 -0
  325. package/dist/tooltip-CSBby1OT.d.ts +45 -0
  326. package/dist/tooltip-CXFRzR0L.d.ts +45 -0
  327. package/dist/tooltip-ChpsbkOU.d.ts +46 -0
  328. package/dist/tooltip-CspTy2ZW.d.ts +46 -0
  329. package/dist/tooltip-CvComAZD.d.ts +46 -0
  330. package/dist/tooltip-D19vhhRn.d.ts +45 -0
  331. package/dist/tooltip-D32S1g-7.d.ts +46 -0
  332. package/dist/tooltip-DAvBN683.d.ts +45 -0
  333. package/dist/tooltip-DQz4_i4m.d.ts +45 -0
  334. package/dist/tooltip-DVYPUAb1.d.ts +46 -0
  335. package/dist/tooltip-DXoSckt9.d.ts +46 -0
  336. package/dist/tooltip-Dtoq3bn_.d.ts +46 -0
  337. package/dist/tooltip-DxO_DWMO.d.ts +46 -0
  338. package/dist/tooltip-DxdGb3dX.d.ts +45 -0
  339. package/dist/tooltip-DzAzC0d7.d.ts +45 -0
  340. package/dist/tooltip-Lk4RpuSh.d.ts +45 -0
  341. package/dist/tooltip-ReFyHDhU.d.ts +45 -0
  342. package/dist/tooltip-_wdlSYAb.d.ts +46 -0
  343. package/dist/{tooltip-XagXjWLB.d.ts → tooltip-cjwkBINy.d.ts} +4 -0
  344. package/dist/tooltip-nKcM19C9.d.ts +45 -0
  345. package/dist/types/layout/container.d.ts +30 -1
  346. package/dist/types/layout/container.d.ts.map +1 -1
  347. package/dist/types/layout/grid.d.ts +42 -0
  348. package/dist/types/layout/grid.d.ts.map +1 -1
  349. package/dist/types/layout/row.d.ts +7 -0
  350. package/dist/types/layout/row.d.ts.map +1 -1
  351. package/dist/typography/Typography/typography-variants.d.ts +3 -0
  352. package/dist/typography/Typography/typography-variants.d.ts.map +1 -1
  353. package/dist/typography/Typography/typography-variants.js +25 -0
  354. package/dist/typography/Typography/typography-variants.js.map +1 -1
  355. package/dist/typography/Typography/typography.css +105 -41
  356. package/dist/typography/Typography/typography.d.ts +20 -0
  357. package/dist/typography/Typography/typography.d.ts.map +1 -1
  358. package/dist/typography/Typography/typography.js +11 -2
  359. package/dist/typography/Typography/typography.js.map +1 -1
  360. package/dist/typography/Typography/typography.module.scss.js +1 -1
  361. package/dist/typography-CTGVc_Gg.d.ts +41 -0
  362. package/dist/typography.d.ts +2 -2
  363. package/dist/ui/Alert/alert-provider.d.ts.map +1 -1
  364. package/dist/ui/Alert/alert-provider.js +1 -1
  365. package/dist/ui/Alert/alert-provider.js.map +1 -1
  366. package/dist/ui/Button/button-variants.d.ts +1 -0
  367. package/dist/ui/Button/button-variants.d.ts.map +1 -1
  368. package/dist/ui/Button/button-variants.js +3 -0
  369. package/dist/ui/Button/button-variants.js.map +1 -1
  370. package/dist/ui/Button/button.css +146 -77
  371. package/dist/ui/Button/button.d.ts +4 -0
  372. package/dist/ui/Button/button.d.ts.map +1 -1
  373. package/dist/ui/Button/button.js +8 -2
  374. package/dist/ui/Button/button.js.map +1 -1
  375. package/dist/ui/Button/button.module.scss.js +1 -1
  376. package/dist/ui/Chip/chip.css +32 -11
  377. package/dist/ui/Chip/chip.d.ts +16 -0
  378. package/dist/ui/Chip/chip.d.ts.map +1 -1
  379. package/dist/ui/Chip/chip.js +4 -2
  380. package/dist/ui/Chip/chip.js.map +1 -1
  381. package/dist/ui/CodeBlock/code-block.css +8 -3
  382. package/dist/ui/Dialog/dialog.css +70 -0
  383. package/dist/ui/Dialog/dialog.d.ts +45 -2
  384. package/dist/ui/Dialog/dialog.d.ts.map +1 -1
  385. package/dist/ui/Dialog/dialog.js +256 -7
  386. package/dist/ui/Dialog/dialog.js.map +1 -1
  387. package/dist/ui/Dialog/dialog.module.scss.js +1 -1
  388. package/dist/ui/Icon/icon.css +14 -7
  389. package/dist/ui/ProgressBar/progress-bar.css +10 -3
  390. package/dist/ui/StatCard/stat-card.css +13 -0
  391. package/dist/ui/StatCard/stat-card.d.ts +9 -0
  392. package/dist/ui/StatCard/stat-card.d.ts.map +1 -1
  393. package/dist/ui/StatCard/stat-card.js +2 -2
  394. package/dist/ui/StatCard/stat-card.js.map +1 -1
  395. package/dist/ui/StatusDot/status-dot.css +4 -1
  396. package/dist/ui/StepProgress/step-progress.css +12 -4
  397. package/dist/ui/Switch/switch.css +6 -2
  398. package/dist/ui/Tooltip/tooltip.d.ts.map +1 -1
  399. package/dist/ui/Tooltip/tooltip.js +1 -1
  400. package/dist/ui/Tooltip/tooltip.js.map +1 -1
  401. package/dist/ui.d.ts +3 -3
  402. package/dist/user/UserInfo/user-info.js +1 -1
  403. package/dist/utils/index.d.ts +1 -0
  404. package/dist/utils/index.d.ts.map +1 -1
  405. package/dist/utils/portal.d.ts +34 -0
  406. package/dist/utils/portal.d.ts.map +1 -0
  407. package/dist/utils/portal.js +40 -0
  408. package/dist/utils/portal.js.map +1 -0
  409. package/dist/utils.d.ts +35 -1
  410. package/dist/utils.js +1 -0
  411. package/dist/utils.js.map +1 -1
  412. package/package.json +3 -2
  413. package/src/styles/_mixins.scss +30 -0
  414. package/vite-plugin.mjs +7 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,2 @@
1
+ export * from './combobox';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/Combobox/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../src/form/DatePicker/date-picker.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAK5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,iBAAS,UAAU,CAAC,EAClB,KAAK,EAAE,SAAS,EAChB,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,UAAU,EACV,KAAa,EACb,QAAgB,EAChB,WAAW,EACX,WAAW,EACX,GAAG,EACH,GAAG,EACH,QAAgB,EAChB,EAAE,EACF,SAAS,EACT,IAAI,GACL,EAAE,eAAe,qBAmcjB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../src/form/DatePicker/date-picker.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAK5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,iBAAS,UAAU,CAAC,EAClB,KAAK,EAAE,SAAS,EAChB,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,UAAU,EACV,KAAa,EACb,QAAgB,EAChB,WAAW,EACX,WAAW,EACX,GAAG,EACH,GAAG,EACH,QAAgB,EAChB,EAAE,EACF,SAAS,EACT,IAAI,GACL,EAAE,eAAe,qBAocjB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -3,63 +3,15 @@ import inputStyles from '../Input/input.module.scss.js';
3
3
  import { Label } from '../Label/label.js';
4
4
  import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../Select/select.js';
5
5
  import { useBreakpoint } from '../../hooks/use-mobile.js';
6
+ import { Typography } from '../../typography/Typography/typography.js';
6
7
  import cn from 'clsx';
7
- import '../Input/input.js';
8
- import '../../layout/Sidebar/sidebar-context.js';
9
- import * as React from 'react';
10
- import '../../ui/Alert/alert-context.js';
11
- import '../../ui/Table/table-sort-context.js';
12
- import '../../layout/Skeleton/skeleton.css';
13
- import '../../navigation/Sheet/sheet.js';
14
- import { Button } from '../../ui/Button/button.js';
15
- import '../../ui/Tooltip/tooltip.js';
16
8
  import { CalendarIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
17
- import '../../internal/slot.js';
18
- import '../../layout/Sidebar/sidebar-variants.js';
19
- import '../../layout/Sidebar/sidebar.css';
20
- import '../../layout/AppContent/app-content.css';
21
- import { Row } from '../../layout/Row/row.js';
22
- import '../../navigation/Link/link.js';
23
- import { Typography } from '../../typography/Typography/typography.js';
24
- import '../../layout/AppFooter/app-footer.css';
25
- import '../../navigation/Router/router-context.js';
26
- import '../../ui/Separator/separator.js';
9
+ import * as React from 'react';
27
10
  import { createPortal } from 'react-dom';
28
- import '../../typography/TruncatedText/truncated-text.js';
29
- import '../../navigation/Breadcrumbs/breadcrumbs.css';
30
- import '../../navigation/DropdownMenu/dropdown-menu.js';
31
- import '../../ui/Avatar/avatar.js';
32
- import '../../user/UserInfo/user-info.css';
33
- import '../../navigation/NavUser/nav-user.css';
34
- import '../../ui/Alert/alert.js';
35
- import '../../ui/Alert/alert.css';
36
- import '../../ui/Chip/chip.js';
37
- import '../../ui/CodeBlock/code-block.js';
38
- import '../../ui/DevIndicator/dev-indicator.css';
39
- import '../../ui/Dialog/dialog.js';
40
- import '../../ui/EmptyState/empty-state.js';
41
- import '../../ui/Icon/icon.js';
42
- import '../../ui/List/list.js';
43
- import '../../ui/Pagination/pagination.js';
44
- import '../../ui/ProgressBar/progress-bar.js';
45
- import '../../ui/StatCard/stat-card.js';
46
- import '../../ui/StatusDot/status-dot.js';
47
- import '../../ui/StatusDot/status-dot-variants.js';
48
- import '../../ui/StepProgress/step-progress.js';
49
- import '../../ui/Switch/switch.js';
50
- import '../../ui/Table/table.js';
51
- import '../../ui/TableActionCell/table-action-cell.js';
52
- import '../../ui/TableToolbar/table-toolbar.js';
53
- import '../../ui/Toggle/toggle.js';
54
- import '../../ui/ToggleGroup/toggle-group.js';
55
- import '../../settings/AppearanceTabs/appearance-tabs.css';
56
- import '../../layout/AppSidebarHeader/app-sidebar-header.css';
57
- import '../../layout/Collapse/collapse.js';
58
- import '../../layout/Column/column.css';
59
- import '../../layout/Container/container.js';
60
- import '../../layout/Grid/grid.js';
61
11
  import s from './date-picker.module.scss.js';
62
12
  import { normalizeIsoValue, formatDisplayDate, parseDateValue, useCalendar, formatIso, formatDateValue, isDateWithinRange, maskDateInput } from './use-calendar.js';
13
+ import { Row } from '../../layout/Row/row.js';
14
+ import { Button } from '../../ui/Button/button.js';
63
15
 
64
16
  const ANIMATION_DURATION = 200;
65
17
  function DatePicker({ value: valueProp, defaultValue, onChange, label, helperText, error = false, disabled = false, sizeVariant, placeholder, min, max, required = false, id, className, name, }) {
@@ -274,7 +226,7 @@ function DatePicker({ value: valueProp, defaultValue, onChange, label, helperTex
274
226
  syncCalendarPreview(inputValue);
275
227
  inputRef.current?.focus();
276
228
  }, children: [jsx(CalendarIcon, { className: s['trigger-icon'] }), jsx("span", { className: 'srOnly', children: "Open calendar" })] })] }), helperMessage ? (jsx(Typography, { id: helperId, variant: 'caption', className: inputStyles['helper-text'], children: helperMessage })) : null] }), name && jsx("input", { type: 'hidden', name: name, value: normalizedCurrentValue }), displayOpen
277
- ? createPortal(jsxs("div", { ref: contentRef, className: s.content, "data-state": isOpen ? 'open' : 'closed', "data-closing": isClosing ? 'true' : undefined, "data-side": 'bottom', style: {
229
+ ? createPortal(jsxs("div", { "data-constellation-portal": '', ref: contentRef, className: s.content, "data-state": isOpen ? 'open' : 'closed', "data-closing": isClosing ? 'true' : undefined, "data-side": 'bottom', style: {
278
230
  position: 'fixed',
279
231
  top: position.top,
280
232
  left: position.left,
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.js","sources":["../../../src/form/DatePicker/date-picker.tsx"],"sourcesContent":["import inputStyles from '@constellation/form/Input/input.module.scss';\nimport { Label } from '@constellation/form/Label';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@constellation/form/Select';\nimport { useBreakpoint } from '@constellation/hooks/use-mobile';\nimport { Row } from '@constellation/layout';\nimport { type DatePickerProps } from '@constellation/types';\nimport { Typography } from '@constellation/typography/Typography';\nimport { Button } from '@constellation/ui';\nimport cn from 'clsx';\nimport { CalendarIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport s from './date-picker.module.scss';\nimport {\n formatDateValue,\n formatDisplayDate,\n formatIso,\n isDateWithinRange,\n maskDateInput,\n normalizeIsoValue,\n parseDateValue,\n useCalendar,\n} from './use-calendar';\n\nconst ANIMATION_DURATION = 200;\n\nfunction DatePicker({\n value: valueProp,\n defaultValue,\n onChange,\n label,\n helperText,\n error = false,\n disabled = false,\n sizeVariant,\n placeholder,\n min,\n max,\n required = false,\n id,\n className,\n name,\n}: DatePickerProps) {\n const generatedId = React.useId();\n const triggerId = id ?? generatedId;\n const helperId = `${triggerId}-helper`;\n const fieldRef = React.useRef<HTMLDivElement | null>(null);\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n const contentRef = React.useRef<HTMLDivElement | null>(null);\n const { isBelow } = useBreakpoint();\n const resolvedSize = sizeVariant ?? (isBelow(900) ? 'sm' : 'md');\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = React.useState(() =>\n normalizeIsoValue(defaultValue),\n );\n const currentValue = isControlled ? valueProp : uncontrolledValue;\n const normalizedCurrentValue = normalizeIsoValue(currentValue);\n\n const [isOpen, setIsOpen] = React.useState(false);\n const [isClosing, setIsClosing] = React.useState(false);\n const [isFocused, setIsFocused] = React.useState(false);\n const [manualError, setManualError] = React.useState<string | null>(null);\n const [inputValue, setInputValue] = React.useState(() =>\n formatDisplayDate(normalizedCurrentValue),\n );\n const closeTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n const [position, setPosition] = React.useState<{ top: number; left: number }>({\n top: 0,\n left: 0,\n });\n const hasError = error || !!manualError;\n\n const displayOpen = isOpen || isClosing;\n\n // Pixel-accurate positioning via fixed + raw getBoundingClientRect — matches\n // Tooltip / DropdownMenu / Select. Recomputes on scroll + resize so the\n // popover tracks the trigger when the page or a parent scrolls. Flips\n // above the trigger when there isn't enough room below (DropdownMenu pattern).\n const calcPosition = React.useCallback(() => {\n const rect = fieldRef.current?.getBoundingClientRect();\n if (!rect) return;\n const offset = 4;\n const popoverHeight = contentRef.current?.offsetHeight ?? 0;\n const fitsBelow = window.innerHeight - rect.bottom - offset >= popoverHeight;\n const top = fitsBelow ? rect.bottom + offset : rect.top - popoverHeight - offset;\n setPosition({ top, left: rect.left });\n }, []);\n\n React.useLayoutEffect(() => {\n if (!displayOpen) return;\n calcPosition();\n }, [displayOpen, calcPosition]);\n\n React.useEffect(() => {\n if (!displayOpen) return;\n window.addEventListener('scroll', calcPosition, true);\n window.addEventListener('resize', calcPosition);\n return () => {\n window.removeEventListener('scroll', calcPosition, true);\n window.removeEventListener('resize', calcPosition);\n };\n }, [displayOpen, calcPosition]);\n\n const hasValue = Boolean(normalizedCurrentValue);\n const helperMessage = manualError ?? helperText;\n const draftDate = parseDateValue(inputValue);\n const calendarValue = draftDate ? inputValue : isFocused ? undefined : normalizedCurrentValue;\n const resolvedPlaceholder = placeholder ?? 'MM/DD/YYYY';\n\n React.useEffect(() => {\n setInputValue(formatDisplayDate(normalizedCurrentValue));\n setManualError(null);\n }, [normalizedCurrentValue]);\n\n const {\n viewYear,\n viewMonth,\n setViewYear,\n setViewMonth,\n monthNames,\n yearRange,\n weekdays,\n days,\n goToPrevMonth,\n goToNextMonth,\n canGoPrev,\n canGoNext,\n } = useCalendar({ selectedDate: calendarValue, min, max });\n\n const clearCloseTimer = React.useCallback(() => {\n if (closeTimerRef.current) {\n clearTimeout(closeTimerRef.current);\n closeTimerRef.current = null;\n }\n }, []);\n\n const handleOpenChange = React.useCallback(\n (open: boolean) => {\n if (open) {\n clearCloseTimer();\n setIsClosing(false);\n setIsOpen(true);\n return;\n }\n\n setIsOpen(false);\n setIsClosing(true);\n clearCloseTimer();\n closeTimerRef.current = setTimeout(() => {\n setIsClosing(false);\n }, ANIMATION_DURATION);\n },\n [clearCloseTimer],\n );\n\n React.useEffect(() => {\n return () => clearCloseTimer();\n }, [clearCloseTimer]);\n\n // Click-outside handler\n React.useEffect(() => {\n if (!displayOpen) return;\n\n const handleClickOutside = (e: MouseEvent) => {\n const target = e.target as Node;\n if (fieldRef.current?.contains(target)) return;\n if (contentRef.current?.contains(target)) return;\n handleOpenChange(false);\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [displayOpen, handleOpenChange]);\n\n const syncCalendarPreview = React.useCallback(\n (maskedValue: string) => {\n const digits = maskedValue.replace(/\\D/g, '');\n\n if (digits.length >= 2) {\n const month = Number(digits.slice(0, 2));\n if (month >= 1 && month <= 12) {\n setViewMonth(month - 1);\n }\n }\n\n if (digits.length === 8) {\n const year = Number(digits.slice(4, 8));\n if (year >= 1000 && year <= 9999) {\n setViewYear(year);\n }\n }\n },\n [setViewMonth, setViewYear],\n );\n\n const handleDayClick = React.useCallback(\n (date: Date) => {\n const isoDate = formatIso(date);\n const displayDate = formatDateValue(date);\n if (!isControlled) {\n setUncontrolledValue(isoDate);\n }\n setInputValue(displayDate);\n setManualError(null);\n onChange?.(isoDate);\n handleOpenChange(false);\n },\n [isControlled, onChange, handleOpenChange],\n );\n\n const syncSelectedDate = React.useCallback(\n (date: Date) => {\n const isoDate = formatIso(date);\n const displayDate = formatDateValue(date);\n\n if (!isDateWithinRange(date, min, max)) {\n return;\n }\n\n if (!isControlled) {\n setUncontrolledValue(isoDate);\n }\n setInputValue(displayDate);\n setManualError(null);\n onChange?.(isoDate);\n },\n [isControlled, max, min, onChange],\n );\n\n const commitValue = React.useCallback(\n (nextValue: string) => {\n if (!isControlled) {\n setUncontrolledValue(nextValue);\n }\n onChange?.(nextValue);\n },\n [isControlled, onChange],\n );\n\n const commitTypedValue = React.useCallback(() => {\n const trimmedValue = inputValue.trim();\n\n if (!trimmedValue) {\n setManualError(null);\n commitValue('');\n setInputValue('');\n return;\n }\n\n const parsedDate = parseDateValue(trimmedValue);\n\n if (!parsedDate) {\n setManualError('Enter a valid date in MM/DD/YYYY format.');\n return;\n }\n\n if (!isDateWithinRange(parsedDate, min, max)) {\n setManualError('Entered date is outside the allowed range.');\n return;\n }\n\n const normalizedDate = formatDateValue(parsedDate);\n const isoDate = formatIso(parsedDate);\n setManualError(null);\n commitValue(isoDate);\n setInputValue(normalizedDate);\n }, [commitValue, inputValue, max, min]);\n\n const updateDateFromCalendarView = React.useCallback(\n (nextYear: number, nextMonth: number) => {\n const baseDate = parseDateValue(inputValue) ?? parseDateValue(normalizedCurrentValue);\n\n if (!baseDate) {\n return;\n }\n\n const lastDayOfMonth = new Date(nextYear, nextMonth + 1, 0).getDate();\n const nextDay = Math.min(baseDate.getDate(), lastDayOfMonth);\n const nextDate = new Date(nextYear, nextMonth, nextDay);\n\n syncSelectedDate(nextDate);\n },\n [inputValue, normalizedCurrentValue, syncSelectedDate],\n );\n\n const containerClasses = cn(\n inputStyles.container,\n inputStyles[resolvedSize],\n { [inputStyles.error]: hasError },\n { [inputStyles.disabled]: disabled },\n { [inputStyles.placeholder]: !!resolvedPlaceholder },\n { [inputStyles['has-value']]: hasValue || !!inputValue },\n { [inputStyles['is-focused']]: isFocused || displayOpen },\n className,\n );\n\n return (\n <>\n <div data-slot={'date-picker'} data-constellation-field className={containerClasses}>\n <div ref={fieldRef} className={inputStyles['input-container']}>\n <div className={inputStyles['label-container']}>\n <Label htmlFor={triggerId}>\n {label}\n {required && <span className={inputStyles.required}>*</span>}\n </Label>\n </div>\n <input\n ref={inputRef}\n id={triggerId}\n type={'text'}\n className={cn(inputStyles['input-field'], s['text-input'])}\n value={inputValue}\n disabled={disabled}\n placeholder={resolvedPlaceholder}\n aria-invalid={hasError ? 'true' : undefined}\n aria-describedby={helperMessage ? helperId : undefined}\n inputMode={'numeric'}\n autoComplete={'off'}\n maxLength={10}\n pattern={'\\\\d{2}/\\\\d{2}/\\\\d{4}'}\n onChange={e => {\n const maskedValue = maskDateInput(e.target.value);\n setInputValue(maskedValue);\n syncCalendarPreview(maskedValue);\n setManualError(null);\n }}\n onFocus={() => {\n setIsFocused(true);\n handleOpenChange(true);\n syncCalendarPreview(inputValue);\n }}\n onBlur={() => {\n setIsFocused(false);\n commitTypedValue();\n }}\n onKeyDown={e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n commitTypedValue();\n handleOpenChange(false);\n }\n\n // Guarded + preventDefault so Escape dismisses this calendar and\n // not the Dialog around it, while a closed field ignores the key.\n if (e.key === 'Escape' && displayOpen) {\n e.preventDefault();\n setManualError(null);\n setInputValue(formatDisplayDate(normalizedCurrentValue));\n handleOpenChange(false);\n }\n }}\n />\n <button\n type={'button'}\n className={s.trigger}\n aria-label={'Open calendar'}\n disabled={disabled}\n onMouseDown={e => e.preventDefault()}\n onClick={() => {\n handleOpenChange(true);\n syncCalendarPreview(inputValue);\n inputRef.current?.focus();\n }}\n >\n <CalendarIcon className={s['trigger-icon']} />\n <span className={'srOnly'}>Open calendar</span>\n </button>\n </div>\n {helperMessage ? (\n <Typography id={helperId} variant={'caption'} className={inputStyles['helper-text']}>\n {helperMessage}\n </Typography>\n ) : null}\n </div>\n {name && <input type={'hidden'} name={name} value={normalizedCurrentValue} />}\n {displayOpen\n ? createPortal(\n <div\n ref={contentRef}\n className={s.content}\n data-state={isOpen ? 'open' : 'closed'}\n data-closing={isClosing ? 'true' : undefined}\n data-side={'bottom'}\n style={{\n position: 'fixed',\n top: position.top,\n left: position.left,\n }}\n >\n <Row gap={1} justify={'space-between'}>\n <Button\n type={'button'}\n theme={'inherit'}\n size={'sm'}\n variant={'ghost'}\n iconOnly\n onClick={goToPrevMonth}\n disabled={!canGoPrev}\n aria-label={'Previous month'}\n >\n <ChevronLeftIcon />\n </Button>\n <Row gap={1}>\n <Select\n value={String(viewMonth)}\n onValueChange={v => {\n const nextMonth = Number(v);\n setViewMonth(nextMonth);\n updateDateFromCalendarView(viewYear, nextMonth);\n }}\n >\n <SelectTrigger className={s['header-trigger']} aria-label={'Month'}>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {monthNames.map((name, i) => (\n <SelectItem key={i} value={String(i)}>\n {name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Select\n value={String(viewYear)}\n onValueChange={v => {\n const nextYear = Number(v);\n setViewYear(nextYear);\n updateDateFromCalendarView(nextYear, viewMonth);\n }}\n >\n <SelectTrigger className={s['header-trigger']} aria-label={'Year'}>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {yearRange.map(y => (\n <SelectItem key={y} value={String(y)}>\n {y}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Row>\n <Button\n theme={'inherit'}\n size={'sm'}\n variant={'ghost'}\n iconOnly\n type={'button'}\n onClick={goToNextMonth}\n disabled={!canGoNext}\n aria-label={'Next month'}\n >\n <ChevronRightIcon />\n </Button>\n </Row>\n <div className={s.weekdays}>\n {weekdays.map(wd => (\n <span key={wd} className={s.weekday}>\n {wd}\n </span>\n ))}\n </div>\n <div className={s.grid}>\n {days.map((d, i) => (\n <button\n key={i}\n type={'button'}\n className={cn(\n s.day,\n { [s.outside]: !d.isCurrentMonth },\n { [s.today]: d.isToday },\n { [s.selected]: d.isSelected },\n )}\n disabled={d.isDisabled}\n onClick={() => handleDayClick(d.date)}\n aria-label={d.date.toLocaleDateString(undefined, {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n })}\n >\n {d.day}\n </button>\n ))}\n </div>\n </div>,\n document.body,\n )\n : null}\n </>\n );\n}\n\nexport { DatePicker };\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;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,EACd,SAAS,EAAE,EAAE,CACX,CAAC,CAAC,GAAG,EACL,EAAE,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,EAClC,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,EACxB,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,UAAU,EAAE,CAC/B,EACD,QAAQ,EAAE,CAAC,CAAC,UAAU,EACtB,OAAO,EAAE,MAAM,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,EAAA,YAAA,EACzB,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE;AAC/C,oCAAA,OAAO,EAAE,MAAM;AACf,oCAAA,IAAI,EAAE,SAAS;AACf,oCAAA,KAAK,EAAE,MAAM;AACb,oCAAA,GAAG,EAAE,SAAS;AACf,iCAAA,CAAC,EAAA,QAAA,EAED,CAAC,CAAC,GAAG,IAjBD,CAAC,CAkBC,CACV,CAAC,GACE,CAAA,EAAA,CACF,EACN,QAAQ,CAAC,IAAI;AAEjB,kBAAE,IAAI,CAAA,EAAA,CACP;AAEP;;"}
1
+ {"version":3,"file":"date-picker.js","sources":["../../../src/form/DatePicker/date-picker.tsx"],"sourcesContent":["import inputStyles from '@constellation/form/Input/input.module.scss';\nimport { Label } from '@constellation/form/Label';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@constellation/form/Select';\nimport { useBreakpoint } from '@constellation/hooks/use-mobile';\nimport { Row } from '@constellation/layout';\nimport { type DatePickerProps } from '@constellation/types';\nimport { Typography } from '@constellation/typography/Typography';\nimport { Button } from '@constellation/ui';\nimport cn from 'clsx';\nimport { CalendarIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport s from './date-picker.module.scss';\nimport {\n formatDateValue,\n formatDisplayDate,\n formatIso,\n isDateWithinRange,\n maskDateInput,\n normalizeIsoValue,\n parseDateValue,\n useCalendar,\n} from './use-calendar';\n\nconst ANIMATION_DURATION = 200;\n\nfunction DatePicker({\n value: valueProp,\n defaultValue,\n onChange,\n label,\n helperText,\n error = false,\n disabled = false,\n sizeVariant,\n placeholder,\n min,\n max,\n required = false,\n id,\n className,\n name,\n}: DatePickerProps) {\n const generatedId = React.useId();\n const triggerId = id ?? generatedId;\n const helperId = `${triggerId}-helper`;\n const fieldRef = React.useRef<HTMLDivElement | null>(null);\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n const contentRef = React.useRef<HTMLDivElement | null>(null);\n const { isBelow } = useBreakpoint();\n const resolvedSize = sizeVariant ?? (isBelow(900) ? 'sm' : 'md');\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = React.useState(() =>\n normalizeIsoValue(defaultValue),\n );\n const currentValue = isControlled ? valueProp : uncontrolledValue;\n const normalizedCurrentValue = normalizeIsoValue(currentValue);\n\n const [isOpen, setIsOpen] = React.useState(false);\n const [isClosing, setIsClosing] = React.useState(false);\n const [isFocused, setIsFocused] = React.useState(false);\n const [manualError, setManualError] = React.useState<string | null>(null);\n const [inputValue, setInputValue] = React.useState(() =>\n formatDisplayDate(normalizedCurrentValue),\n );\n const closeTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n const [position, setPosition] = React.useState<{ top: number; left: number }>({\n top: 0,\n left: 0,\n });\n const hasError = error || !!manualError;\n\n const displayOpen = isOpen || isClosing;\n\n // Pixel-accurate positioning via fixed + raw getBoundingClientRect — matches\n // Tooltip / DropdownMenu / Select. Recomputes on scroll + resize so the\n // popover tracks the trigger when the page or a parent scrolls. Flips\n // above the trigger when there isn't enough room below (DropdownMenu pattern).\n const calcPosition = React.useCallback(() => {\n const rect = fieldRef.current?.getBoundingClientRect();\n if (!rect) return;\n const offset = 4;\n const popoverHeight = contentRef.current?.offsetHeight ?? 0;\n const fitsBelow = window.innerHeight - rect.bottom - offset >= popoverHeight;\n const top = fitsBelow ? rect.bottom + offset : rect.top - popoverHeight - offset;\n setPosition({ top, left: rect.left });\n }, []);\n\n React.useLayoutEffect(() => {\n if (!displayOpen) return;\n calcPosition();\n }, [displayOpen, calcPosition]);\n\n React.useEffect(() => {\n if (!displayOpen) return;\n window.addEventListener('scroll', calcPosition, true);\n window.addEventListener('resize', calcPosition);\n return () => {\n window.removeEventListener('scroll', calcPosition, true);\n window.removeEventListener('resize', calcPosition);\n };\n }, [displayOpen, calcPosition]);\n\n const hasValue = Boolean(normalizedCurrentValue);\n const helperMessage = manualError ?? helperText;\n const draftDate = parseDateValue(inputValue);\n const calendarValue = draftDate ? inputValue : isFocused ? undefined : normalizedCurrentValue;\n const resolvedPlaceholder = placeholder ?? 'MM/DD/YYYY';\n\n React.useEffect(() => {\n setInputValue(formatDisplayDate(normalizedCurrentValue));\n setManualError(null);\n }, [normalizedCurrentValue]);\n\n const {\n viewYear,\n viewMonth,\n setViewYear,\n setViewMonth,\n monthNames,\n yearRange,\n weekdays,\n days,\n goToPrevMonth,\n goToNextMonth,\n canGoPrev,\n canGoNext,\n } = useCalendar({ selectedDate: calendarValue, min, max });\n\n const clearCloseTimer = React.useCallback(() => {\n if (closeTimerRef.current) {\n clearTimeout(closeTimerRef.current);\n closeTimerRef.current = null;\n }\n }, []);\n\n const handleOpenChange = React.useCallback(\n (open: boolean) => {\n if (open) {\n clearCloseTimer();\n setIsClosing(false);\n setIsOpen(true);\n return;\n }\n\n setIsOpen(false);\n setIsClosing(true);\n clearCloseTimer();\n closeTimerRef.current = setTimeout(() => {\n setIsClosing(false);\n }, ANIMATION_DURATION);\n },\n [clearCloseTimer],\n );\n\n React.useEffect(() => {\n return () => clearCloseTimer();\n }, [clearCloseTimer]);\n\n // Click-outside handler\n React.useEffect(() => {\n if (!displayOpen) return;\n\n const handleClickOutside = (e: MouseEvent) => {\n const target = e.target as Node;\n if (fieldRef.current?.contains(target)) return;\n if (contentRef.current?.contains(target)) return;\n handleOpenChange(false);\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [displayOpen, handleOpenChange]);\n\n const syncCalendarPreview = React.useCallback(\n (maskedValue: string) => {\n const digits = maskedValue.replace(/\\D/g, '');\n\n if (digits.length >= 2) {\n const month = Number(digits.slice(0, 2));\n if (month >= 1 && month <= 12) {\n setViewMonth(month - 1);\n }\n }\n\n if (digits.length === 8) {\n const year = Number(digits.slice(4, 8));\n if (year >= 1000 && year <= 9999) {\n setViewYear(year);\n }\n }\n },\n [setViewMonth, setViewYear],\n );\n\n const handleDayClick = React.useCallback(\n (date: Date) => {\n const isoDate = formatIso(date);\n const displayDate = formatDateValue(date);\n if (!isControlled) {\n setUncontrolledValue(isoDate);\n }\n setInputValue(displayDate);\n setManualError(null);\n onChange?.(isoDate);\n handleOpenChange(false);\n },\n [isControlled, onChange, handleOpenChange],\n );\n\n const syncSelectedDate = React.useCallback(\n (date: Date) => {\n const isoDate = formatIso(date);\n const displayDate = formatDateValue(date);\n\n if (!isDateWithinRange(date, min, max)) {\n return;\n }\n\n if (!isControlled) {\n setUncontrolledValue(isoDate);\n }\n setInputValue(displayDate);\n setManualError(null);\n onChange?.(isoDate);\n },\n [isControlled, max, min, onChange],\n );\n\n const commitValue = React.useCallback(\n (nextValue: string) => {\n if (!isControlled) {\n setUncontrolledValue(nextValue);\n }\n onChange?.(nextValue);\n },\n [isControlled, onChange],\n );\n\n const commitTypedValue = React.useCallback(() => {\n const trimmedValue = inputValue.trim();\n\n if (!trimmedValue) {\n setManualError(null);\n commitValue('');\n setInputValue('');\n return;\n }\n\n const parsedDate = parseDateValue(trimmedValue);\n\n if (!parsedDate) {\n setManualError('Enter a valid date in MM/DD/YYYY format.');\n return;\n }\n\n if (!isDateWithinRange(parsedDate, min, max)) {\n setManualError('Entered date is outside the allowed range.');\n return;\n }\n\n const normalizedDate = formatDateValue(parsedDate);\n const isoDate = formatIso(parsedDate);\n setManualError(null);\n commitValue(isoDate);\n setInputValue(normalizedDate);\n }, [commitValue, inputValue, max, min]);\n\n const updateDateFromCalendarView = React.useCallback(\n (nextYear: number, nextMonth: number) => {\n const baseDate = parseDateValue(inputValue) ?? parseDateValue(normalizedCurrentValue);\n\n if (!baseDate) {\n return;\n }\n\n const lastDayOfMonth = new Date(nextYear, nextMonth + 1, 0).getDate();\n const nextDay = Math.min(baseDate.getDate(), lastDayOfMonth);\n const nextDate = new Date(nextYear, nextMonth, nextDay);\n\n syncSelectedDate(nextDate);\n },\n [inputValue, normalizedCurrentValue, syncSelectedDate],\n );\n\n const containerClasses = cn(\n inputStyles.container,\n inputStyles[resolvedSize],\n { [inputStyles.error]: hasError },\n { [inputStyles.disabled]: disabled },\n { [inputStyles.placeholder]: !!resolvedPlaceholder },\n { [inputStyles['has-value']]: hasValue || !!inputValue },\n { [inputStyles['is-focused']]: isFocused || displayOpen },\n className,\n );\n\n return (\n <>\n <div data-slot={'date-picker'} data-constellation-field className={containerClasses}>\n <div ref={fieldRef} className={inputStyles['input-container']}>\n <div className={inputStyles['label-container']}>\n <Label htmlFor={triggerId}>\n {label}\n {required && <span className={inputStyles.required}>*</span>}\n </Label>\n </div>\n <input\n ref={inputRef}\n id={triggerId}\n type={'text'}\n className={cn(inputStyles['input-field'], s['text-input'])}\n value={inputValue}\n disabled={disabled}\n placeholder={resolvedPlaceholder}\n aria-invalid={hasError ? 'true' : undefined}\n aria-describedby={helperMessage ? helperId : undefined}\n inputMode={'numeric'}\n autoComplete={'off'}\n maxLength={10}\n pattern={'\\\\d{2}/\\\\d{2}/\\\\d{4}'}\n onChange={e => {\n const maskedValue = maskDateInput(e.target.value);\n setInputValue(maskedValue);\n syncCalendarPreview(maskedValue);\n setManualError(null);\n }}\n onFocus={() => {\n setIsFocused(true);\n handleOpenChange(true);\n syncCalendarPreview(inputValue);\n }}\n onBlur={() => {\n setIsFocused(false);\n commitTypedValue();\n }}\n onKeyDown={e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n commitTypedValue();\n handleOpenChange(false);\n }\n\n // Guarded + preventDefault so Escape dismisses this calendar and\n // not the Dialog around it, while a closed field ignores the key.\n if (e.key === 'Escape' && displayOpen) {\n e.preventDefault();\n setManualError(null);\n setInputValue(formatDisplayDate(normalizedCurrentValue));\n handleOpenChange(false);\n }\n }}\n />\n <button\n type={'button'}\n className={s.trigger}\n aria-label={'Open calendar'}\n disabled={disabled}\n onMouseDown={e => e.preventDefault()}\n onClick={() => {\n handleOpenChange(true);\n syncCalendarPreview(inputValue);\n inputRef.current?.focus();\n }}\n >\n <CalendarIcon className={s['trigger-icon']} />\n <span className={'srOnly'}>Open calendar</span>\n </button>\n </div>\n {helperMessage ? (\n <Typography id={helperId} variant={'caption'} className={inputStyles['helper-text']}>\n {helperMessage}\n </Typography>\n ) : null}\n </div>\n {name && <input type={'hidden'} name={name} value={normalizedCurrentValue} />}\n {displayOpen\n ? createPortal(\n <div\n data-constellation-portal={''}\n ref={contentRef}\n className={s.content}\n data-state={isOpen ? 'open' : 'closed'}\n data-closing={isClosing ? 'true' : undefined}\n data-side={'bottom'}\n style={{\n position: 'fixed',\n top: position.top,\n left: position.left,\n }}\n >\n <Row gap={1} justify={'space-between'}>\n <Button\n type={'button'}\n theme={'inherit'}\n size={'sm'}\n variant={'ghost'}\n iconOnly\n onClick={goToPrevMonth}\n disabled={!canGoPrev}\n aria-label={'Previous month'}\n >\n <ChevronLeftIcon />\n </Button>\n <Row gap={1}>\n <Select\n value={String(viewMonth)}\n onValueChange={v => {\n const nextMonth = Number(v);\n setViewMonth(nextMonth);\n updateDateFromCalendarView(viewYear, nextMonth);\n }}\n >\n <SelectTrigger className={s['header-trigger']} aria-label={'Month'}>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {monthNames.map((name, i) => (\n <SelectItem key={i} value={String(i)}>\n {name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Select\n value={String(viewYear)}\n onValueChange={v => {\n const nextYear = Number(v);\n setViewYear(nextYear);\n updateDateFromCalendarView(nextYear, viewMonth);\n }}\n >\n <SelectTrigger className={s['header-trigger']} aria-label={'Year'}>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {yearRange.map(y => (\n <SelectItem key={y} value={String(y)}>\n {y}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Row>\n <Button\n theme={'inherit'}\n size={'sm'}\n variant={'ghost'}\n iconOnly\n type={'button'}\n onClick={goToNextMonth}\n disabled={!canGoNext}\n aria-label={'Next month'}\n >\n <ChevronRightIcon />\n </Button>\n </Row>\n <div className={s.weekdays}>\n {weekdays.map(wd => (\n <span key={wd} className={s.weekday}>\n {wd}\n </span>\n ))}\n </div>\n <div className={s.grid}>\n {days.map((d, i) => (\n <button\n key={i}\n type={'button'}\n className={cn(\n s.day,\n { [s.outside]: !d.isCurrentMonth },\n { [s.today]: d.isToday },\n { [s.selected]: d.isSelected },\n )}\n disabled={d.isDisabled}\n onClick={() => handleDayClick(d.date)}\n aria-label={d.date.toLocaleDateString(undefined, {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n })}\n >\n {d.day}\n </button>\n ))}\n </div>\n </div>,\n document.body,\n )\n : null}\n </>\n );\n}\n\nexport { DatePicker };\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;AA8BA,MAAM,kBAAkB,GAAG,GAAG;AAE9B,SAAS,UAAU,CAAC,EAClB,KAAK,EAAE,SAAS,EAChB,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,UAAU,EACV,KAAK,GAAG,KAAK,EACb,QAAQ,GAAG,KAAK,EAChB,WAAW,EACX,WAAW,EACX,GAAG,EACH,GAAG,EACH,QAAQ,GAAG,KAAK,EAChB,EAAE,EACF,SAAS,EACT,IAAI,GACY,EAAA;AAChB,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,EAAE;AACjC,IAAA,MAAM,SAAS,GAAG,EAAE,IAAI,WAAW;AACnC,IAAA,MAAM,QAAQ,GAAG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;AACf,oCAAA,IAAI,EAAE,SAAS;AACf,oCAAA,KAAK,EAAE,MAAM;AACb,oCAAA,GAAG,EAAE,SAAS;AACf,iCAAA,CAAC,EAAA,QAAA,EAED,CAAC,CAAC,GAAG,IAjBD,CAAC,CAkBC,CACV,CAAC,GACE,CAAA,EAAA,CACF,EACN,QAAQ,CAAC,IAAI;AAEjB,kBAAE,IAAI,CAAA,EAAA,CACP;AAEP;;"}
@@ -79,6 +79,18 @@
79
79
  font-size: inherit;
80
80
  min-width: 0;
81
81
  outline: none !important;
82
+ /*
83
+ * The other half of the same problem. `min-width: 0` lets the box
84
+ * shrink; this stops it asking to be that wide in the first place, by
85
+ * giving up the UA's own date chrome — the "mm/dd/yyyy" placeholder and
86
+ * the picker glyph — which iOS sizes to a fixed intrinsic width no
87
+ * `width` declaration overrides. Tapping still opens the system picker.
88
+ */
89
+ }
90
+ .input-module_container__bycn1 .input-module_input-container__nw0Oc input[type=date],
91
+ .input-module_container__bycn1 .input-module_input-container__nw0Oc textarea[type=date] {
92
+ appearance: none;
93
+ max-width: 100%;
82
94
  }
83
95
  .input-module_container__bycn1 .input-module_input-container__nw0Oc input--ghosted,
84
96
  .input-module_container__bycn1 .input-module_input-container__nw0Oc textarea--ghosted {
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/form/Input/input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpC,KAAK,SAAS,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;AAElF,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAA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H,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,eAAe,GAAG,cAAc,GACnC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACtC,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,CAAC;AAEJ,KAAK,aAAa,GAAG,cAAc,GACjC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,GAAG;IAClD,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAGJ,KAAK,UAAU,GAAG,eAAe,GAAG,aAAa,CAAC;AAGlD,QAAA,MAAM,KAAK,2GAqLV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -7,7 +7,7 @@ import * as React from 'react';
7
7
  import inputStyles from './input.module.scss.js';
8
8
 
9
9
  // The Custom Input Component
10
- const Input = React.forwardRef(({ label, sizeVariant, error = false, helperText, startAdornment, endAdornment, id, type = 'text', rows, ghost, onFocus, onBlur, ...rest }, ref) => {
10
+ const Input = React.forwardRef(({ label, sizeVariant, error = false, helperText, startAdornment, endAdornment, id, type = 'text', rows, ghost, className, onFocus, onBlur, style, ...rest }, ref) => {
11
11
  const { isBelow } = useBreakpoint();
12
12
  /*
13
13
  * Compose rather than let the caller's handler win.
@@ -31,8 +31,28 @@ const Input = React.forwardRef(({ label, sizeVariant, error = false, helperText,
31
31
  const resolvedSize = sizeVariant === 'md' && isBelow(900) ? 'sm' : (sizeVariant ?? (isBelow(900) ? 'sm' : 'md'));
32
32
  const isTextArea = type === 'textarea';
33
33
  const [isFocused, setIsFocused] = React.useState(false);
34
- const containerClasses = cn(inputStyles.container, inputStyles[resolvedSize], { [inputStyles.error]: error }, { [inputStyles.disabled]: rest.disabled }, { [inputStyles.placeholder]: rest.placeholder }, { [inputStyles['is-focused']]: isFocused }, { [inputStyles['has-value']]: rest.value });
35
- return (jsxs("div", { "data-slot": 'input', "data-constellation-field": true, className: containerClasses, children: [jsxs("div", { className: cn(inputStyles['input-container'], isTextArea && inputStyles['textarea-container']), children: [startAdornment && (jsx("span", { "data-slot": 'input-start-adornment', className: inputStyles['adornment'], children: startAdornment })), jsx("div", { className: inputStyles['label-container'], children: jsxs(Label, { htmlFor: inputId, children: [label, (rest['aria-required'] || rest.required) && jsx("span", { className: inputStyles.required, children: "*" })] }) }), isTextArea ? (jsx("textarea", { "data-slot": 'input-field', id: inputId, className: inputStyles['input-field'], "aria-invalid": error ? 'true' : undefined, "aria-describedby": helperId, onFocus: handleFocus, onBlur: handleBlur, ref: ref, rows: rows, ...rest })) : ghost !== undefined ? (
34
+ const containerClasses = cn(inputStyles.container, inputStyles[resolvedSize], { [inputStyles.error]: error }, { [inputStyles.disabled]: rest.disabled }, { [inputStyles.placeholder]: rest.placeholder }, { [inputStyles['is-focused']]: isFocused }, { [inputStyles['has-value']]: rest.value },
35
+ /*
36
+ * The caller's className lands on the ROOT, next to `style`.
37
+ *
38
+ * It used to ride `...rest` onto the inner <input>, which put it on a
39
+ * different element than `style` — so `.qty-field { flex: 0 0 4.5rem }`
40
+ * was sizing the field inside the box rather than the box, and the
41
+ * wrapper kept its 140px default. Every other component in the library
42
+ * puts className on its root; this now matches.
43
+ */
44
+ className);
45
+ return (
46
+ /*
47
+ * `style` belongs on the ROOT, which is this container.
48
+ *
49
+ * It used to fall through `...rest` onto the inner <input>, so a custom
50
+ * property meant for the wrapper — `--input-min-width` is the obvious one
51
+ * — was set on a child of the element that reads it, and custom
52
+ * properties inherit downward only. The override silently did nothing.
53
+ * Inherited text properties still reach the field from here.
54
+ */
55
+ jsxs("div", { "data-slot": 'input', "data-constellation-field": true, className: containerClasses, style: style, children: [jsxs("div", { className: cn(inputStyles['input-container'], isTextArea && inputStyles['textarea-container']), children: [startAdornment && (jsx("span", { "data-slot": 'input-start-adornment', className: inputStyles['adornment'], children: startAdornment })), jsx("div", { className: inputStyles['label-container'], children: jsxs(Label, { htmlFor: inputId, children: [label, (rest['aria-required'] || rest.required) && jsx("span", { className: inputStyles.required, children: "*" })] }) }), isTextArea ? (jsx("textarea", { "data-slot": 'input-field', id: inputId, className: inputStyles['input-field'], "aria-invalid": error ? 'true' : undefined, "aria-describedby": helperId, onFocus: handleFocus, onBlur: handleBlur, ref: ref, rows: rows, ...rest })) : ghost !== undefined ? (
36
56
  /*
37
57
  * The ghost is drawn by re-rendering the typed value INVISIBLY and
38
58
  * letting the suggestion follow it, so the two share one text flow
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../../../src/form/Input/input.tsx"],"sourcesContent":["import { Label } from '@constellation/form/Label';\nimport { useBreakpoint } from '@constellation/hooks/use-mobile';\nimport { Typography } from '@constellation/typography/Typography';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport s from './input.module.scss';\n\n// Define the possible size variants\ntype InputSize = 'sm' | 'md' | 'lg';\n\ntype InputType = React.InputHTMLAttributes<HTMLInputElement>['type'] | 'textarea';\n\nexport interface InputBaseProps {\n label?: string;\n sizeVariant?: InputSize;\n error?: boolean;\n helperText?: string;\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n /**\n * Inline completion drawn behind the caret — the TAIL only, not the whole\n * word. `value='Avo'` with `ghost='cado'` reads as \"Avocado\", the suggestion\n * dimmed.\n *\n * The component owns the alignment; you own the policy. What to suggest and\n * which key accepts it are decisions about your data and your users (a phone\n * has a spacebar under the thumb and no Tab), so they stay with the caller.\n * Accept by setting `value` to the completed string in your own `onKeyDown`.\n *\n * Pass `''` (not `undefined`) for \"nothing to suggest right now\": the\n * element structure stays stable, so the field is never remounted mid-word.\n *\n * Ignored for `type='textarea'` — a ghost cannot follow a caret across\n * wrapped lines without measuring, which is a different component.\n */\n ghost?: string;\n}\n\ntype InputFieldProps = InputBaseProps &\n React.InputHTMLAttributes<HTMLInputElement> & {\n type?: Exclude<InputType, 'textarea'>;\n rows?: never;\n };\n\ntype TextAreaProps = InputBaseProps &\n React.TextareaHTMLAttributes<HTMLTextAreaElement> & {\n type: 'textarea';\n rows?: number;\n };\n\n// Define the component's prop interface\ntype InputProps = InputFieldProps | TextAreaProps;\n\n// The Custom Input Component\nconst Input = React.forwardRef<HTMLInputElement | HTMLTextAreaElement, InputProps>(\n (\n {\n label,\n sizeVariant,\n error = false,\n helperText,\n startAdornment,\n endAdornment,\n id,\n type = 'text',\n rows,\n ghost,\n onFocus,\n onBlur,\n ...rest\n },\n ref,\n ) => {\n const { isBelow } = useBreakpoint();\n\n /*\n * Compose rather than let the caller's handler win.\n *\n * These used to be set before `{...rest}` spread over them, so any consumer\n * passing `onFocus` — to select-all on entry, say — silently replaced the\n * one driving the floating label, and the label stopped animating with no\n * error to point at it.\n */\n const handleFocus = (event: React.FocusEvent<HTMLInputElement & HTMLTextAreaElement>) => {\n setIsFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: React.FocusEvent<HTMLInputElement & HTMLTextAreaElement>) => {\n setIsFocused(false);\n onBlur?.(event);\n };\n const generatedId = React.useId();\n const inputId = id ?? generatedId;\n const helperId = helperText ? `${inputId}-helper` : undefined;\n const resolvedSize =\n sizeVariant === 'md' && isBelow(900) ? 'sm' : (sizeVariant ?? (isBelow(900) ? 'sm' : 'md'));\n const isTextArea = type === 'textarea';\n const [isFocused, setIsFocused] = React.useState(false);\n\n const containerClasses = cn(\n s.container,\n s[resolvedSize],\n { [s.error]: error },\n { [s.disabled]: rest.disabled },\n { [s.placeholder]: rest.placeholder },\n { [s['is-focused']]: isFocused },\n { [s['has-value']]: rest.value },\n );\n\n return (\n <div data-slot={'input'} data-constellation-field className={containerClasses}>\n <div className={cn(s['input-container'], isTextArea && s['textarea-container'])}>\n {/* Start Adornment */}\n {startAdornment && (\n <span data-slot={'input-start-adornment'} className={s['adornment']}>\n {startAdornment}\n </span>\n )}\n\n <div className={s['label-container']}>\n <Label htmlFor={inputId}>\n {label}\n {(rest['aria-required'] || rest.required) && <span className={s.required}>*</span>}\n </Label>\n </div>\n {isTextArea ? (\n <textarea\n data-slot={'input-field'}\n id={inputId}\n className={s['input-field']}\n aria-invalid={error ? 'true' : undefined}\n aria-describedby={helperId}\n onFocus={handleFocus}\n onBlur={handleBlur}\n ref={ref as React.Ref<HTMLTextAreaElement>}\n rows={rows}\n {...(rest as React.TextareaHTMLAttributes<HTMLTextAreaElement>)}\n />\n ) : ghost !== undefined ? (\n /*\n * The ghost is drawn by re-rendering the typed value INVISIBLY and\n * letting the suggestion follow it, so the two share one text flow\n * and the ghost lands exactly where the caret is — no measuring, and\n * nothing to drift when the font or padding changes.\n *\n * The wrapper exists so `inset: 0` means the input's box rather than\n * the container's, which would be off by the padding and by any\n * start adornment.\n *\n * Branching on `ghost !== undefined` rather than on the string being\n * non-empty is load-bearing: a suggestion appears and disappears as\n * you type, and switching JSX shape underneath a live field makes\n * React unmount and remount the input — which drops focus, the\n * caret and any IME composition mid-word. Pass `ghost=''` for \"no\n * suggestion right now\" and the element stays put.\n */\n <span className={s['ghost-wrap']}>\n {ghost ? (\n <span aria-hidden={'true'} className={s['ghost']}>\n <span className={s['ghost-typed']}>{String(rest.value ?? '')}</span>\n {ghost}\n </span>\n ) : null}\n <input\n data-slot={'input-field'}\n id={inputId}\n className={cn(s['input-field'], ghost && s['input-field--ghosted'])}\n aria-invalid={error ? 'true' : undefined}\n aria-describedby={helperId}\n aria-autocomplete={'inline'}\n onFocus={handleFocus}\n onBlur={handleBlur}\n ref={ref as React.Ref<HTMLInputElement>}\n type={type}\n {...(rest as React.InputHTMLAttributes<HTMLInputElement>)}\n />\n </span>\n ) : (\n <input\n data-slot={'input-field'}\n id={inputId}\n className={s['input-field']}\n aria-invalid={error ? 'true' : undefined}\n aria-describedby={helperId}\n onFocus={handleFocus}\n onBlur={handleBlur}\n ref={ref as React.Ref<HTMLInputElement>}\n type={type}\n {...(rest as React.InputHTMLAttributes<HTMLInputElement>)}\n />\n )}\n\n {/* End Adornment */}\n {endAdornment && (\n <span data-slot={'input-end-adornment'} className={s['adornment']}>\n {endAdornment}\n </span>\n )}\n </div>\n\n {/* Helper Text */}\n {helperText && (\n <Typography\n data-slot={'input-helper-text'}\n id={helperId}\n variant={'caption'}\n className={s['helper-text']}\n >\n {helperText}\n </Typography>\n )}\n </div>\n );\n },\n);\n\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":["s","_jsxs","_jsx"],"mappings":";;;;;;;;AAqDA;AACA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CACE,EACE,KAAK,EACL,WAAW,EACX,KAAK,GAAG,KAAK,EACb,UAAU,EACV,cAAc,EACd,YAAY,EACZ,EAAE,EACF,IAAI,GAAG,MAAM,EACb,IAAI,EACJ,KAAK,EACL,OAAO,EACP,MAAM,EACN,GAAG,IAAI,EACR,EACD,GAAG,KACD;AACF,IAAA,MAAM,EAAE,OAAO,EAAE,GAAG,aAAa,EAAE;AAEnC;;;;;;;AAOG;AACH,IAAA,MAAM,WAAW,GAAG,CAAC,KAA+D,KAAI;QACtF,YAAY,CAAC,IAAI,CAAC;AAClB,QAAA,OAAO,GAAG,KAAK,CAAC;AAClB,IAAA,CAAC;AACD,IAAA,MAAM,UAAU,GAAG,CAAC,KAA+D,KAAI;QACrF,YAAY,CAAC,KAAK,CAAC;AACnB,QAAA,MAAM,GAAG,KAAK,CAAC;AACjB,IAAA,CAAC;AACD,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,EAAE;AACjC,IAAA,MAAM,OAAO,GAAG,EAAE,IAAI,WAAW;AACjC,IAAA,MAAM,QAAQ,GAAG,UAAU,GAAG,CAAA,EAAG,OAAO,CAAA,OAAA,CAAS,GAAG,SAAS;AAC7D,IAAA,MAAM,YAAY,GAChB,WAAW,KAAK,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,WAAW,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAC7F,IAAA,MAAM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,EAAE,GAAkC,EACvC,IAAI,EAAE,IAAI,KACL,IAAoD,EAAA,CACzD,IACG,KAEPE,4BACa,aAAa,EACxB,EAAE,EAAE,OAAO,EACX,SAAS,EAAEF,WAAC,CAAC,aAAa,CAAC,EAAA,cAAA,EACb,KAAK,GAAG,MAAM,GAAG,SAAS,EAAA,kBAAA,EACtB,QAAQ,EAC1B,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,GAAkC,EACvC,IAAI,EAAE,IAAI,EAAA,GACL,IAAoD,EAAA,CACzD,CACH,EAGA,YAAY,KACXE,GAAA,CAAA,MAAA,EAAA,EAAA,WAAA,EAAiB,qBAAqB,EAAE,SAAS,EAAEF,WAAC,CAAC,WAAW,CAAC,YAC9D,YAAY,EAAA,CACR,CACR,CAAA,EAAA,CACG,EAGL,UAAU,KACTE,GAAA,CAAC,UAAU,EAAA,EAAA,WAAA,EACE,mBAAmB,EAC9B,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,SAAS,EAClB,SAAS,EAAEF,WAAC,CAAC,aAAa,CAAC,EAAA,QAAA,EAE1B,UAAU,EAAA,CACA,CACd,CAAA,EAAA,CACG;AAEV,CAAC;AAGH,KAAK,CAAC,WAAW,GAAG,OAAO;;"}
1
+ {"version":3,"file":"input.js","sources":["../../../src/form/Input/input.tsx"],"sourcesContent":["import { Label } from '@constellation/form/Label';\nimport { useBreakpoint } from '@constellation/hooks/use-mobile';\nimport { Typography } from '@constellation/typography/Typography';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport s from './input.module.scss';\n\n// Define the possible size variants\ntype InputSize = 'sm' | 'md' | 'lg';\n\ntype InputType = React.InputHTMLAttributes<HTMLInputElement>['type'] | 'textarea';\n\nexport interface InputBaseProps {\n label?: string;\n sizeVariant?: InputSize;\n error?: boolean;\n helperText?: string;\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n /**\n * Inline completion drawn behind the caret — the TAIL only, not the whole\n * word. `value='Avo'` with `ghost='cado'` reads as \"Avocado\", the suggestion\n * dimmed.\n *\n * The component owns the alignment; you own the policy. What to suggest and\n * which key accepts it are decisions about your data and your users (a phone\n * has a spacebar under the thumb and no Tab), so they stay with the caller.\n * Accept by setting `value` to the completed string in your own `onKeyDown`.\n *\n * Pass `''` (not `undefined`) for \"nothing to suggest right now\": the\n * element structure stays stable, so the field is never remounted mid-word.\n *\n * Ignored for `type='textarea'` — a ghost cannot follow a caret across\n * wrapped lines without measuring, which is a different component.\n */\n ghost?: string;\n}\n\ntype InputFieldProps = InputBaseProps &\n React.InputHTMLAttributes<HTMLInputElement> & {\n type?: Exclude<InputType, 'textarea'>;\n rows?: never;\n };\n\ntype TextAreaProps = InputBaseProps &\n React.TextareaHTMLAttributes<HTMLTextAreaElement> & {\n type: 'textarea';\n rows?: number;\n };\n\n// Define the component's prop interface\ntype InputProps = InputFieldProps | TextAreaProps;\n\n// The Custom Input Component\nconst Input = React.forwardRef<HTMLInputElement | HTMLTextAreaElement, InputProps>(\n (\n {\n label,\n sizeVariant,\n error = false,\n helperText,\n startAdornment,\n endAdornment,\n id,\n type = 'text',\n rows,\n ghost,\n className,\n onFocus,\n onBlur,\n style,\n ...rest\n },\n ref,\n ) => {\n const { isBelow } = useBreakpoint();\n\n /*\n * Compose rather than let the caller's handler win.\n *\n * These used to be set before `{...rest}` spread over them, so any consumer\n * passing `onFocus` — to select-all on entry, say — silently replaced the\n * one driving the floating label, and the label stopped animating with no\n * error to point at it.\n */\n const handleFocus = (event: React.FocusEvent<HTMLInputElement & HTMLTextAreaElement>) => {\n setIsFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: React.FocusEvent<HTMLInputElement & HTMLTextAreaElement>) => {\n setIsFocused(false);\n onBlur?.(event);\n };\n const generatedId = React.useId();\n const inputId = id ?? generatedId;\n const helperId = helperText ? `${inputId}-helper` : undefined;\n const resolvedSize =\n sizeVariant === 'md' && isBelow(900) ? 'sm' : (sizeVariant ?? (isBelow(900) ? 'sm' : 'md'));\n const isTextArea = type === 'textarea';\n const [isFocused, setIsFocused] = React.useState(false);\n\n const containerClasses = cn(\n s.container,\n s[resolvedSize],\n { [s.error]: error },\n { [s.disabled]: rest.disabled },\n { [s.placeholder]: rest.placeholder },\n { [s['is-focused']]: isFocused },\n { [s['has-value']]: rest.value },\n /*\n * The caller's className lands on the ROOT, next to `style`.\n *\n * It used to ride `...rest` onto the inner <input>, which put it on a\n * different element than `style` — so `.qty-field { flex: 0 0 4.5rem }`\n * was sizing the field inside the box rather than the box, and the\n * wrapper kept its 140px default. Every other component in the library\n * puts className on its root; this now matches.\n */\n className,\n );\n\n return (\n /*\n * `style` belongs on the ROOT, which is this container.\n *\n * It used to fall through `...rest` onto the inner <input>, so a custom\n * property meant for the wrapper — `--input-min-width` is the obvious one\n * — was set on a child of the element that reads it, and custom\n * properties inherit downward only. The override silently did nothing.\n * Inherited text properties still reach the field from here.\n */\n <div data-slot={'input'} data-constellation-field className={containerClasses} style={style}>\n <div className={cn(s['input-container'], isTextArea && s['textarea-container'])}>\n {/* Start Adornment */}\n {startAdornment && (\n <span data-slot={'input-start-adornment'} className={s['adornment']}>\n {startAdornment}\n </span>\n )}\n\n <div className={s['label-container']}>\n <Label htmlFor={inputId}>\n {label}\n {(rest['aria-required'] || rest.required) && <span className={s.required}>*</span>}\n </Label>\n </div>\n {isTextArea ? (\n <textarea\n data-slot={'input-field'}\n id={inputId}\n className={s['input-field']}\n aria-invalid={error ? 'true' : undefined}\n aria-describedby={helperId}\n onFocus={handleFocus}\n onBlur={handleBlur}\n ref={ref as React.Ref<HTMLTextAreaElement>}\n rows={rows}\n {...(rest as React.TextareaHTMLAttributes<HTMLTextAreaElement>)}\n />\n ) : ghost !== undefined ? (\n /*\n * The ghost is drawn by re-rendering the typed value INVISIBLY and\n * letting the suggestion follow it, so the two share one text flow\n * and the ghost lands exactly where the caret is — no measuring, and\n * nothing to drift when the font or padding changes.\n *\n * The wrapper exists so `inset: 0` means the input's box rather than\n * the container's, which would be off by the padding and by any\n * start adornment.\n *\n * Branching on `ghost !== undefined` rather than on the string being\n * non-empty is load-bearing: a suggestion appears and disappears as\n * you type, and switching JSX shape underneath a live field makes\n * React unmount and remount the input — which drops focus, the\n * caret and any IME composition mid-word. Pass `ghost=''` for \"no\n * suggestion right now\" and the element stays put.\n */\n <span className={s['ghost-wrap']}>\n {ghost ? (\n <span aria-hidden={'true'} className={s['ghost']}>\n <span className={s['ghost-typed']}>{String(rest.value ?? '')}</span>\n {ghost}\n </span>\n ) : null}\n <input\n data-slot={'input-field'}\n id={inputId}\n className={cn(s['input-field'], ghost && s['input-field--ghosted'])}\n aria-invalid={error ? 'true' : undefined}\n aria-describedby={helperId}\n aria-autocomplete={'inline'}\n onFocus={handleFocus}\n onBlur={handleBlur}\n ref={ref as React.Ref<HTMLInputElement>}\n type={type}\n {...(rest as React.InputHTMLAttributes<HTMLInputElement>)}\n />\n </span>\n ) : (\n <input\n data-slot={'input-field'}\n id={inputId}\n className={s['input-field']}\n aria-invalid={error ? 'true' : undefined}\n aria-describedby={helperId}\n onFocus={handleFocus}\n onBlur={handleBlur}\n ref={ref as React.Ref<HTMLInputElement>}\n type={type}\n {...(rest as React.InputHTMLAttributes<HTMLInputElement>)}\n />\n )}\n\n {/* End Adornment */}\n {endAdornment && (\n <span data-slot={'input-end-adornment'} className={s['adornment']}>\n {endAdornment}\n </span>\n )}\n </div>\n\n {/* Helper Text */}\n {helperText && (\n <Typography\n data-slot={'input-helper-text'}\n id={helperId}\n variant={'caption'}\n className={s['helper-text']}\n >\n {helperText}\n </Typography>\n )}\n </div>\n );\n },\n);\n\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":["s","_jsxs","_jsx"],"mappings":";;;;;;;;AAqDA;AACA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CACE,EACE,KAAK,EACL,WAAW,EACX,KAAK,GAAG,KAAK,EACb,UAAU,EACV,cAAc,EACd,YAAY,EACZ,EAAE,EACF,IAAI,G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AAA,CACzD,CACH,EAGA,YAAY,KACXE,GAAA,CAAA,MAAA,EAAA,EAAA,WAAA,EAAiB,qBAAqB,EAAE,SAAS,EAAEF,WAAC,CAAC,WAAW,CAAC,YAC9D,YAAY,EAAA,CACR,CACR,CAAA,EAAA,CACG,EAGL,UAAU,KACTE,GAAA,CAAC,UAAU,EAAA,EAAA,WAAA,EACE,mBAAmB,EAC9B,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,SAAS,EAClB,SAAS,EAAEF,WAAC,CAAC,aAAa,CAAC,EAAA,QAAA,EAE1B,UAAU,EAAA,CACA,CACd,CAAA,EAAA,CACG;AAEV,CAAC;AAGH,KAAK,CAAC,WAAW,GAAG,OAAO;;"}
@@ -1,3 +1,4 @@
1
+ @charset "UTF-8";
1
2
  :root {
2
3
  --select-duration: 200ms;
3
4
  --select-ease: cubic-bezier(0.4, 0, 0.2, 1);
@@ -83,6 +84,7 @@
83
84
  color: var(--text-primary);
84
85
  max-height: 24rem;
85
86
  max-width: min(24rem, 100vw - 1rem);
87
+ min-width: min(var(--select-trigger-width, 0px), 100vw - 1rem);
86
88
  overflow: hidden;
87
89
  pointer-events: auto;
88
90
  width: fit-content;
@@ -110,7 +112,13 @@
110
112
  overflow-y: auto;
111
113
  overscroll-behavior: contain;
112
114
  padding: 0.25rem;
113
- width: fit-content;
115
+ /*
116
+ * Fills the panel rather than shrink-wrapping its rows. As `fit-content` the
117
+ * viewport sized itself to the longest option while `.content` was held open
118
+ * to the trigger width, so the rows — and the scrollbar — sat in a narrow
119
+ * column against a wide empty panel.
120
+ */
121
+ width: 100%;
114
122
  }
115
123
 
116
124
  .select-module_viewport-popper__KXAMM {
@@ -204,6 +212,51 @@
204
212
  width: 0.875rem;
205
213
  }
206
214
 
215
+ /*
216
+ * A group has to read as ONE block, not as a heading that happens to sit above
217
+ * some rows. Three things do that: a rule above every group but the first, a
218
+ * heading that stays pinned while its own rows scroll past it, and a text edge
219
+ * shared with those rows.
220
+ */
221
+ /*
222
+ * A column, so the rows stretch to the panel width and their hover highlight
223
+ * spans the whole row. Left as a plain block, each row shrink-wraps its own
224
+ * label and the highlight stops mid-row.
225
+ */
226
+ .select-module_group__YQWh5 {
227
+ display: flex;
228
+ flex-direction: column;
229
+ }
230
+
231
+ .select-module_group__YQWh5:not(:first-child) {
232
+ border-top: 1px solid var(--divider);
233
+ margin-top: 0.25rem;
234
+ padding-top: 0.25rem;
235
+ }
236
+
237
+ .select-module_group-label__J50K8 {
238
+ background-color: var(--surface-muted);
239
+ color: var(--text-secondary);
240
+ font-size: 0.68rem;
241
+ font-weight: 600;
242
+ letter-spacing: 0.06em;
243
+ /*
244
+ * Pulled out to the viewport's border box and padded back in, so the heading
245
+ * covers the full panel width while its text still lines up with the item
246
+ * labels below it (0.25rem of viewport padding + 0.5rem of item padding).
247
+ */
248
+ margin-inline: -0.25rem;
249
+ padding: 0.6rem 0.75rem 0.25rem;
250
+ position: sticky;
251
+ text-transform: uppercase;
252
+ /*
253
+ * -0.25rem, not 0: sticky pins to the scrollport's PADDING box, so at 0 a
254
+ * 4px sliver of the scrolling rows shows above the heading.
255
+ */
256
+ top: -0.25rem;
257
+ z-index: 1;
258
+ }
259
+
207
260
  .select-module_separator__aPMWg {
208
261
  background-color: var(--divider);
209
262
  height: 1px;
@@ -1,16 +1,54 @@
1
- import { type SelectContentProps, type SelectFieldProps, type SelectProps } from '@constellation/types';
1
+ import { type SelectAlign, type SelectContentProps, type SelectFieldProps, type SelectPosition, type SelectProps, type SelectSide } from '@constellation/types';
2
2
  import * as React from 'react';
3
+ type SurfaceProps = {
4
+ align?: SelectAlign;
5
+ children: React.ReactNode;
6
+ className?: string;
7
+ collisionPadding?: number;
8
+ contentRef: React.MutableRefObject<HTMLDivElement | null>;
9
+ displayOpen: boolean;
10
+ isClosing?: boolean;
11
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
12
+ open: boolean;
13
+ position?: SelectPosition;
14
+ side?: SelectSide;
15
+ sideOffset?: number;
16
+ triggerRef: React.MutableRefObject<HTMLElement | null>;
17
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'className' | 'onKeyDown'>;
18
+ declare function Surface({ align, children, className, collisionPadding, contentRef, displayOpen, isClosing, onKeyDown, open, position, side, sideOffset, triggerRef, ...props }: SurfaceProps): React.ReactPortal | null;
3
19
  declare function Select({ open: openProp, defaultOpen, onOpenChange, value: valueProp, defaultValue, onValueChange, disabled, children, ...props }: SelectProps): React.JSX.Element;
4
- declare function SelectGroup({ ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
20
+ /**
21
+ * A titled run of options — the `<optgroup>` of this select.
22
+ *
23
+ * The heading is presentational and never focusable: it names the run, it is
24
+ * not a thing you can pick. Labelling the group with `aria-label` rather than
25
+ * pointing at the heading keeps it out of the option list for a screen reader
26
+ * too.
27
+ */
28
+ declare function SelectGroup({ label, children, className, ...props }: React.HTMLAttributes<HTMLDivElement> & {
29
+ label?: React.ReactNode;
30
+ }): React.JSX.Element;
5
31
  declare function SelectValue({ children, placeholder, ...props }: React.HTMLAttributes<HTMLSpanElement> & {
6
32
  placeholder?: React.ReactNode;
7
33
  }): React.JSX.Element;
8
- declare function SelectTrigger({ className, children, onClick, onKeyDown, type, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>): React.JSX.Element;
34
+ declare function SelectTrigger({ className, children, onClick, onKeyDown, type, asChild, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
35
+ /**
36
+ * Render the caller's own element as the trigger, and drop the field styling
37
+ * and the chevron with it.
38
+ *
39
+ * For a control that opens a listbox without looking like a form field — a
40
+ * picker that states itself as an icon and a line of text, say. The caller
41
+ * owns every visual decision; the Select still owns the behaviour, the
42
+ * portaled surface and the ARIA wiring.
43
+ */
44
+ asChild?: boolean;
45
+ }): React.JSX.Element;
9
46
  declare function SelectContent({ align, className, children, collisionPadding, onKeyDown, position, side, sideOffset, ...props }: SelectContentProps): React.JSX.Element;
10
47
  declare function SelectItem({ className, children, disabled, onClick, onMouseMove, value, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
11
48
  value: string;
12
49
  }): React.JSX.Element;
13
50
  declare function SelectSeparator({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
14
51
  declare function SelectField(props: SelectFieldProps): React.JSX.Element;
52
+ export { Surface as __Surface };
15
53
  export { Select, SelectContent, SelectField, SelectGroup, SelectItem, SelectSeparator, SelectTrigger, SelectValue, };
16
54
  //# sourceMappingURL=select.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/form/Select/select.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAErB,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAya/B,iBAAS,MAAM,CAAC,EACd,IAAI,EAAE,QAAQ,EACd,WAAW,EACX,YAAY,EACZ,KAAK,EAAE,SAAS,EAChB,YAAY,EACZ,aAAa,EACb,QAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,qBAoHb;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,qBAEtE;AAED,iBAAS,WAAW,CAAC,EACnB,QAAQ,EACR,WAAW,EACX,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAS3E;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,qBAwD/C;AAED,iBAAS,aAAa,CAAC,EACrB,KAAe,EACf,SAAS,EACT,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