@funstack/ui 0.1.0-alpha.22 → 0.1.0-alpha.23

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 (735) hide show
  1. package/dist/accordion/accordion-context.mjs +1 -2
  2. package/dist/accordion/accordion-item.d.mts +1 -3
  3. package/dist/accordion/accordion-item.d.mts.map +1 -1
  4. package/dist/accordion/accordion-item.mjs +14 -8
  5. package/dist/accordion/accordion-item.mjs.map +1 -1
  6. package/dist/accordion/accordion-panel.d.mts +1 -3
  7. package/dist/accordion/accordion-panel.d.mts.map +1 -1
  8. package/dist/accordion/accordion-panel.mjs +3 -4
  9. package/dist/accordion/accordion-root.d.mts +1 -3
  10. package/dist/accordion/accordion-root.d.mts.map +1 -1
  11. package/dist/accordion/accordion-root.mjs +12 -15
  12. package/dist/accordion/accordion-root.mjs.map +1 -1
  13. package/dist/accordion/accordion-trigger.d.mts +1 -3
  14. package/dist/accordion/accordion-trigger.d.mts.map +1 -1
  15. package/dist/accordion/accordion-trigger.mjs +4 -5
  16. package/dist/accordion/index.d.mts +0 -2
  17. package/dist/accordion/index.d.mts.map +1 -1
  18. package/dist/accordion/index.mjs +1 -2
  19. package/dist/alert-dialog/alert-dialog-action.d.mts +5 -5
  20. package/dist/alert-dialog/alert-dialog-action.d.mts.map +1 -1
  21. package/dist/alert-dialog/alert-dialog-action.mjs +1 -2
  22. package/dist/alert-dialog/alert-dialog-action.mjs.map +1 -1
  23. package/dist/alert-dialog/alert-dialog-cancel.d.mts +0 -2
  24. package/dist/alert-dialog/alert-dialog-cancel.d.mts.map +1 -1
  25. package/dist/alert-dialog/alert-dialog-cancel.mjs +4 -5
  26. package/dist/alert-dialog/alert-dialog-context.mjs +2 -3
  27. package/dist/alert-dialog/alert-dialog-description.d.mts +0 -2
  28. package/dist/alert-dialog/alert-dialog-description.d.mts.map +1 -1
  29. package/dist/alert-dialog/alert-dialog-description.mjs +1 -2
  30. package/dist/alert-dialog/alert-dialog-form.d.mts +0 -2
  31. package/dist/alert-dialog/alert-dialog-form.d.mts.map +1 -1
  32. package/dist/alert-dialog/alert-dialog-form.mjs +1 -2
  33. package/dist/alert-dialog/alert-dialog-popup.d.mts +1 -3
  34. package/dist/alert-dialog/alert-dialog-popup.d.mts.map +1 -1
  35. package/dist/alert-dialog/alert-dialog-popup.mjs +3 -4
  36. package/dist/alert-dialog/alert-dialog-root.d.mts +0 -2
  37. package/dist/alert-dialog/alert-dialog-root.d.mts.map +1 -1
  38. package/dist/alert-dialog/alert-dialog-root.mjs +1 -2
  39. package/dist/alert-dialog/alert-dialog-title.d.mts +0 -2
  40. package/dist/alert-dialog/alert-dialog-title.d.mts.map +1 -1
  41. package/dist/alert-dialog/alert-dialog-title.mjs +1 -2
  42. package/dist/alert-dialog/alert-dialog-trigger.d.mts +0 -2
  43. package/dist/alert-dialog/alert-dialog-trigger.d.mts.map +1 -1
  44. package/dist/alert-dialog/alert-dialog-trigger.mjs +1 -2
  45. package/dist/alert-dialog/index.d.mts +0 -2
  46. package/dist/alert-dialog/index.d.mts.map +1 -1
  47. package/dist/alert-dialog/index.mjs +1 -2
  48. package/dist/avatar/avatar-context.mjs +1 -2
  49. package/dist/avatar/avatar-fallback.d.mts +1 -3
  50. package/dist/avatar/avatar-fallback.d.mts.map +1 -1
  51. package/dist/avatar/avatar-fallback.mjs +1 -2
  52. package/dist/avatar/avatar-image.d.mts +1 -3
  53. package/dist/avatar/avatar-image.d.mts.map +1 -1
  54. package/dist/avatar/avatar-image.mjs +2 -3
  55. package/dist/avatar/avatar-root.d.mts +1 -3
  56. package/dist/avatar/avatar-root.d.mts.map +1 -1
  57. package/dist/avatar/avatar-root.mjs +2 -3
  58. package/dist/avatar/index.d.mts +1 -3
  59. package/dist/avatar/index.d.mts.map +1 -1
  60. package/dist/avatar/index.mjs +1 -2
  61. package/dist/bin/skill-installer.mjs +1 -2
  62. package/dist/button/button.d.mts +1 -3
  63. package/dist/button/button.d.mts.map +1 -1
  64. package/dist/button/button.mjs +4 -5
  65. package/dist/checkbox/checkbox.d.mts +1 -3
  66. package/dist/checkbox/checkbox.d.mts.map +1 -1
  67. package/dist/checkbox/checkbox.mjs +2 -3
  68. package/dist/checkbox-group/checkbox-group-context.mjs +1 -2
  69. package/dist/checkbox-group/checkbox-group-item.d.mts +1 -3
  70. package/dist/checkbox-group/checkbox-group-item.d.mts.map +1 -1
  71. package/dist/checkbox-group/checkbox-group-item.mjs +5 -6
  72. package/dist/checkbox-group/checkbox-group-label.d.mts +1 -3
  73. package/dist/checkbox-group/checkbox-group-label.d.mts.map +1 -1
  74. package/dist/checkbox-group/checkbox-group-label.mjs +1 -2
  75. package/dist/checkbox-group/checkbox-group-parent.d.mts +1 -3
  76. package/dist/checkbox-group/checkbox-group-parent.d.mts.map +1 -1
  77. package/dist/checkbox-group/checkbox-group-parent.mjs +7 -8
  78. package/dist/checkbox-group/checkbox-group-parent.mjs.map +1 -1
  79. package/dist/checkbox-group/checkbox-group-root.d.mts +1 -3
  80. package/dist/checkbox-group/checkbox-group-root.d.mts.map +1 -1
  81. package/dist/checkbox-group/checkbox-group-root.mjs +7 -8
  82. package/dist/checkbox-group/index.d.mts +1 -3
  83. package/dist/checkbox-group/index.d.mts.map +1 -1
  84. package/dist/checkbox-group/index.mjs +1 -2
  85. package/dist/collapsible/collapsible-context.mjs +1 -2
  86. package/dist/collapsible/collapsible-panel.d.mts +1 -3
  87. package/dist/collapsible/collapsible-panel.d.mts.map +1 -1
  88. package/dist/collapsible/collapsible-panel.mjs +3 -4
  89. package/dist/collapsible/collapsible-root.d.mts +1 -3
  90. package/dist/collapsible/collapsible-root.d.mts.map +1 -1
  91. package/dist/collapsible/collapsible-root.mjs +18 -18
  92. package/dist/collapsible/collapsible-root.mjs.map +1 -1
  93. package/dist/collapsible/collapsible-trigger.d.mts +1 -3
  94. package/dist/collapsible/collapsible-trigger.d.mts.map +1 -1
  95. package/dist/collapsible/collapsible-trigger.mjs +4 -5
  96. package/dist/collapsible/index.d.mts +0 -2
  97. package/dist/collapsible/index.d.mts.map +1 -1
  98. package/dist/collapsible/index.mjs +1 -2
  99. package/dist/combobox/chip-text.mjs +1 -2
  100. package/dist/combobox/combobox-chips.d.mts +1 -3
  101. package/dist/combobox/combobox-chips.d.mts.map +1 -1
  102. package/dist/combobox/combobox-chips.mjs +3 -4
  103. package/dist/combobox/combobox-clear.d.mts +1 -3
  104. package/dist/combobox/combobox-clear.d.mts.map +1 -1
  105. package/dist/combobox/combobox-clear.mjs +2 -3
  106. package/dist/combobox/combobox-context.mjs +1 -2
  107. package/dist/combobox/combobox-group.d.mts +1 -3
  108. package/dist/combobox/combobox-group.d.mts.map +1 -1
  109. package/dist/combobox/combobox-group.mjs +2 -3
  110. package/dist/combobox/combobox-input.d.mts +1 -3
  111. package/dist/combobox/combobox-input.d.mts.map +1 -1
  112. package/dist/combobox/combobox-input.mjs +5 -6
  113. package/dist/combobox/combobox-keyboard.mjs +2 -3
  114. package/dist/combobox/combobox-label.d.mts +1 -3
  115. package/dist/combobox/combobox-label.d.mts.map +1 -1
  116. package/dist/combobox/combobox-label.mjs +2 -3
  117. package/dist/combobox/combobox-list.d.mts +1 -3
  118. package/dist/combobox/combobox-list.d.mts.map +1 -1
  119. package/dist/combobox/combobox-list.mjs +3 -4
  120. package/dist/combobox/combobox-option.d.mts +1 -3
  121. package/dist/combobox/combobox-option.d.mts.map +1 -1
  122. package/dist/combobox/combobox-option.mjs +2 -3
  123. package/dist/combobox/combobox-popup.d.mts +1 -3
  124. package/dist/combobox/combobox-popup.d.mts.map +1 -1
  125. package/dist/combobox/combobox-popup.mjs +4 -5
  126. package/dist/combobox/combobox-root.d.mts +1 -3
  127. package/dist/combobox/combobox-root.d.mts.map +1 -1
  128. package/dist/combobox/combobox-root.mjs +14 -15
  129. package/dist/combobox/combobox-trigger.d.mts +1 -3
  130. package/dist/combobox/combobox-trigger.d.mts.map +1 -1
  131. package/dist/combobox/combobox-trigger.mjs +5 -6
  132. package/dist/combobox/index.d.mts +1 -3
  133. package/dist/combobox/index.d.mts.map +1 -1
  134. package/dist/combobox/index.mjs +1 -2
  135. package/dist/combobox/use-combobox-form.mjs +3 -5
  136. package/dist/combobox/use-combobox-form.mjs.map +1 -1
  137. package/dist/combobox/use-combobox-text.mjs +3 -4
  138. package/dist/csp/csp-provider.d.mts +0 -2
  139. package/dist/csp/csp-provider.d.mts.map +1 -1
  140. package/dist/csp/csp-provider.mjs +2 -3
  141. package/dist/csp/style-hashes.d.mts +0 -2
  142. package/dist/csp/style-hashes.d.mts.map +1 -1
  143. package/dist/csp/style-hashes.mjs +1 -2
  144. package/dist/dialog/dialog-close.d.mts +10 -6
  145. package/dist/dialog/dialog-close.d.mts.map +1 -1
  146. package/dist/dialog/dialog-close.mjs +5 -5
  147. package/dist/dialog/dialog-close.mjs.map +1 -1
  148. package/dist/dialog/dialog-context.mjs +1 -2
  149. package/dist/dialog/dialog-description.d.mts +1 -3
  150. package/dist/dialog/dialog-description.d.mts.map +1 -1
  151. package/dist/dialog/dialog-description.mjs +1 -2
  152. package/dist/dialog/dialog-dismiss.mjs +51 -21
  153. package/dist/dialog/dialog-dismiss.mjs.map +1 -1
  154. package/dist/dialog/dialog-form.d.mts +1 -3
  155. package/dist/dialog/dialog-form.d.mts.map +1 -1
  156. package/dist/dialog/dialog-form.mjs +6 -7
  157. package/dist/dialog/dialog-popup.d.mts +2 -4
  158. package/dist/dialog/dialog-popup.d.mts.map +1 -1
  159. package/dist/dialog/dialog-popup.mjs +10 -11
  160. package/dist/dialog/dialog-root.d.mts +1 -3
  161. package/dist/dialog/dialog-root.d.mts.map +1 -1
  162. package/dist/dialog/dialog-root.mjs +3 -4
  163. package/dist/dialog/dialog-title.d.mts +1 -3
  164. package/dist/dialog/dialog-title.d.mts.map +1 -1
  165. package/dist/dialog/dialog-title.mjs +1 -2
  166. package/dist/dialog/dialog-trigger.d.mts +1 -3
  167. package/dist/dialog/dialog-trigger.d.mts.map +1 -1
  168. package/dist/dialog/dialog-trigger.mjs +4 -5
  169. package/dist/dialog/index.d.mts +1 -3
  170. package/dist/dialog/index.d.mts.map +1 -1
  171. package/dist/dialog/index.mjs +1 -2
  172. package/dist/docs/components/accordion.md +1 -1
  173. package/dist/docs/components/alert-dialog.md +15 -7
  174. package/dist/docs/components/collapsible.md +1 -1
  175. package/dist/docs/components/dialog.md +14 -6
  176. package/dist/docs/components/drawer.md +3 -3
  177. package/dist/docs/components/menu.md +3 -3
  178. package/dist/docs/components/popover.md +6 -6
  179. package/dist/docs/concepts/pending-and-optimistic.md +1 -0
  180. package/dist/docs/roadmap.md +4 -0
  181. package/dist/drawer/drawer-close.d.mts +0 -2
  182. package/dist/drawer/drawer-close.d.mts.map +1 -1
  183. package/dist/drawer/drawer-close.mjs +1 -2
  184. package/dist/drawer/drawer-description.d.mts +0 -2
  185. package/dist/drawer/drawer-description.d.mts.map +1 -1
  186. package/dist/drawer/drawer-description.mjs +1 -2
  187. package/dist/drawer/drawer-form.d.mts +0 -2
  188. package/dist/drawer/drawer-form.d.mts.map +1 -1
  189. package/dist/drawer/drawer-form.mjs +1 -2
  190. package/dist/drawer/drawer-popup.d.mts +2 -4
  191. package/dist/drawer/drawer-popup.d.mts.map +1 -1
  192. package/dist/drawer/drawer-popup.mjs +3 -4
  193. package/dist/drawer/drawer-root.d.mts +0 -2
  194. package/dist/drawer/drawer-root.d.mts.map +1 -1
  195. package/dist/drawer/drawer-root.mjs +1 -2
  196. package/dist/drawer/drawer-swipe.d.mts +0 -2
  197. package/dist/drawer/drawer-swipe.d.mts.map +1 -1
  198. package/dist/drawer/drawer-swipe.mjs +1 -2
  199. package/dist/drawer/drawer-swipe.mjs.map +1 -1
  200. package/dist/drawer/drawer-title.d.mts +0 -2
  201. package/dist/drawer/drawer-title.d.mts.map +1 -1
  202. package/dist/drawer/drawer-title.mjs +1 -2
  203. package/dist/drawer/drawer-trigger.d.mts +0 -2
  204. package/dist/drawer/drawer-trigger.d.mts.map +1 -1
  205. package/dist/drawer/drawer-trigger.mjs +1 -2
  206. package/dist/drawer/index.d.mts +0 -2
  207. package/dist/drawer/index.d.mts.map +1 -1
  208. package/dist/drawer/index.mjs +1 -2
  209. package/dist/field/field-control.d.mts +2 -4
  210. package/dist/field/field-control.d.mts.map +1 -1
  211. package/dist/field/field-control.mjs +6 -7
  212. package/dist/field/field-description.d.mts +2 -4
  213. package/dist/field/field-description.d.mts.map +1 -1
  214. package/dist/field/field-description.mjs +2 -3
  215. package/dist/field/field-error.d.mts +2 -4
  216. package/dist/field/field-error.d.mts.map +1 -1
  217. package/dist/field/field-error.mjs +3 -4
  218. package/dist/field/field-label.d.mts +2 -4
  219. package/dist/field/field-label.d.mts.map +1 -1
  220. package/dist/field/field-label.mjs +3 -4
  221. package/dist/field/field-root.d.mts +2 -4
  222. package/dist/field/field-root.d.mts.map +1 -1
  223. package/dist/field/field-root.mjs +11 -16
  224. package/dist/field/field-root.mjs.map +1 -1
  225. package/dist/field/index.d.mts +0 -2
  226. package/dist/field/index.d.mts.map +1 -1
  227. package/dist/field/index.mjs +1 -2
  228. package/dist/field/use-server-error-visibility.mjs +1 -2
  229. package/dist/form/form-root.d.mts +1 -3
  230. package/dist/form/form-root.d.mts.map +1 -1
  231. package/dist/form/form-root.mjs +8 -9
  232. package/dist/form/form-submit.d.mts +1 -3
  233. package/dist/form/form-submit.d.mts.map +1 -1
  234. package/dist/form/form-submit.mjs +3 -4
  235. package/dist/form/index.d.mts +0 -2
  236. package/dist/form/index.d.mts.map +1 -1
  237. package/dist/form/index.mjs +1 -2
  238. package/dist/hover-card/hover-card-context.mjs +1 -2
  239. package/dist/hover-card/hover-card-popup.d.mts +2 -4
  240. package/dist/hover-card/hover-card-popup.d.mts.map +1 -1
  241. package/dist/hover-card/hover-card-popup.mjs +6 -7
  242. package/dist/hover-card/hover-card-root.d.mts +1 -3
  243. package/dist/hover-card/hover-card-root.d.mts.map +1 -1
  244. package/dist/hover-card/hover-card-root.mjs +3 -4
  245. package/dist/hover-card/hover-card-trigger.d.mts +1 -3
  246. package/dist/hover-card/hover-card-trigger.d.mts.map +1 -1
  247. package/dist/hover-card/hover-card-trigger.mjs +5 -6
  248. package/dist/hover-card/index.d.mts +0 -2
  249. package/dist/hover-card/index.d.mts.map +1 -1
  250. package/dist/hover-card/index.mjs +1 -2
  251. package/dist/hover-card/use-hover-card-interest.mjs +14 -8
  252. package/dist/hover-card/use-hover-card-interest.mjs.map +1 -1
  253. package/dist/index.d.mts +41 -35
  254. package/dist/internal/action/action-details.mjs +1 -2
  255. package/dist/internal/action/call-urgent-handler.mjs +1 -2
  256. package/dist/internal/action/report-dropped.mjs +1 -2
  257. package/dist/internal/action/use-action-trigger.mjs +2 -3
  258. package/dist/internal/action/use-connected.mjs +1 -2
  259. package/dist/internal/action/use-controllable-action.mjs +4 -5
  260. package/dist/internal/action/use-multiple-selection.mjs +4 -5
  261. package/dist/internal/action/use-pure-trigger.mjs +1 -2
  262. package/dist/internal/action/use-pure-trigger.mjs.map +1 -1
  263. package/dist/internal/action/use-step-commit.mjs +3 -4
  264. package/dist/internal/after-dispatch.mjs +23 -0
  265. package/dist/internal/after-dispatch.mjs.map +1 -0
  266. package/dist/internal/announce.mjs +1 -2
  267. package/dist/internal/arrow-keys.mjs +1 -2
  268. package/dist/internal/csp-context.mjs +1 -2
  269. package/dist/internal/data-attr.mjs +1 -2
  270. package/dist/internal/decimal.mjs +1 -2
  271. package/dist/internal/details-summary.mjs +51 -3
  272. package/dist/internal/details-summary.mjs.map +1 -1
  273. package/dist/internal/dev-warn.mjs +1 -2
  274. package/dist/internal/dom-order.mjs +1 -2
  275. package/dist/internal/form/field-context.d.mts +0 -2
  276. package/dist/internal/form/field-context.d.mts.map +1 -1
  277. package/dist/internal/form/field-context.mjs +2 -3
  278. package/dist/internal/form/focus-first-invalid.mjs +2 -3
  279. package/dist/internal/form/form-status-watcher.mjs +1 -2
  280. package/dist/internal/form/group-member.mjs +1 -2
  281. package/dist/internal/form/hidden-values.mjs +1 -2
  282. package/dist/internal/form/sync-presence.mjs +1 -2
  283. package/dist/internal/form/use-checkable-input.mjs +2 -3
  284. package/dist/internal/form/use-field-control.mjs +3 -4
  285. package/dist/internal/form/use-fieldset-group.mjs +3 -4
  286. package/dist/internal/form/use-form-owner-event.mjs +1 -2
  287. package/dist/internal/form/use-form-reset.mjs +10 -8
  288. package/dist/internal/form/use-form-reset.mjs.map +1 -1
  289. package/dist/internal/form/use-native-checked.mjs +2 -3
  290. package/dist/internal/form/use-native-group-reconciliation.mjs +3 -4
  291. package/dist/internal/form/use-native-select-value.mjs +2 -3
  292. package/dist/internal/form/validity.d.mts +0 -2
  293. package/dist/internal/form/validity.d.mts.map +1 -1
  294. package/dist/internal/form/validity.mjs +1 -2
  295. package/dist/internal/menubar-context.mjs +1 -2
  296. package/dist/internal/merge-props.mjs +1 -2
  297. package/dist/internal/overlay/anchor-position.d.mts +0 -2
  298. package/dist/internal/overlay/anchor-position.d.mts.map +1 -1
  299. package/dist/internal/overlay/anchor-position.mjs +1 -2
  300. package/dist/internal/overlay/content-focus-probe.mjs +1 -2
  301. package/dist/internal/overlay/css-transition-cut.mjs +1 -2
  302. package/dist/internal/overlay/css-transition-cut.mjs.map +1 -1
  303. package/dist/internal/overlay/focus-visible.mjs +1 -2
  304. package/dist/internal/overlay/invokers.mjs +1 -2
  305. package/dist/internal/overlay/modal-registry.mjs +1 -2
  306. package/dist/internal/overlay/overlay-popup.mjs +2 -3
  307. package/dist/internal/overlay/overlay-show.mjs +1 -2
  308. package/dist/internal/overlay/popover-open.mjs +1 -2
  309. package/dist/internal/overlay/trigger-ref.mjs +1 -2
  310. package/dist/internal/overlay/use-apply-open-state.mjs +1 -2
  311. package/dist/internal/overlay/use-exit-animation.mjs +1 -2
  312. package/dist/internal/overlay/use-exit-animation.mjs.map +1 -1
  313. package/dist/internal/overlay/use-interest-dismiss.mjs +3 -4
  314. package/dist/internal/overlay/use-modal-registration.mjs +2 -3
  315. package/dist/internal/overlay/use-overlay-close.mjs +11 -9
  316. package/dist/internal/overlay/use-overlay-close.mjs.map +1 -1
  317. package/dist/internal/overlay/use-overlay-root.d.mts +2 -2
  318. package/dist/internal/overlay/use-overlay-root.mjs +6 -7
  319. package/dist/internal/overlay/use-popover-popup.mjs +6 -7
  320. package/dist/internal/overlay/use-popover-trigger.d.mts +2 -4
  321. package/dist/internal/overlay/use-popover-trigger.d.mts.map +1 -1
  322. package/dist/internal/overlay/use-popover-trigger.mjs +4 -5
  323. package/dist/internal/overlay/use-resolved-placement.mjs +4 -5
  324. package/dist/internal/platform-attributes.d.mts +0 -2
  325. package/dist/internal/platform-attributes.d.mts.map +1 -1
  326. package/dist/internal/pointer-capture.mjs +1 -2
  327. package/dist/internal/range-value.mjs +1 -2
  328. package/dist/internal/render-element.d.mts +2 -2
  329. package/dist/internal/render-element.mjs +2 -3
  330. package/dist/internal/shipped-styles.mjs +1 -2
  331. package/dist/internal/swipe-arithmetic.mjs +0 -1
  332. package/dist/internal/swipe.mjs +2 -3
  333. package/dist/internal/toolbar-context.mjs +1 -2
  334. package/dist/internal/transition-boundary.mjs +2 -3
  335. package/dist/internal/transition-types.mjs +1 -2
  336. package/dist/internal/typeahead.mjs +0 -1
  337. package/dist/internal/types.d.mts +0 -2
  338. package/dist/internal/types.d.mts.map +1 -1
  339. package/dist/internal/use-active-option.mjs +1 -2
  340. package/dist/internal/use-deferred-leave.mjs +2 -3
  341. package/dist/internal/use-delayed-pair.mjs +1 -2
  342. package/dist/internal/use-dev-warning.mjs +0 -1
  343. package/dist/internal/use-element-check.mjs +1 -2
  344. package/dist/internal/use-hydrated-mount.mjs +1 -2
  345. package/dist/internal/use-item-order.mjs +2 -3
  346. package/dist/internal/use-latest.mjs +1 -2
  347. package/dist/internal/use-merged-refs.mjs +2 -3
  348. package/dist/internal/use-mount-fixed.mjs +2 -3
  349. package/dist/internal/use-name-warning.mjs +1 -2
  350. package/dist/internal/use-native-focusgroup.mjs +1 -2
  351. package/dist/internal/use-option-registry.mjs +3 -4
  352. package/dist/internal/use-register-count.mjs +1 -2
  353. package/dist/internal/use-render.d.mts +2 -2
  354. package/dist/internal/use-render.mjs +2 -3
  355. package/dist/internal/use-roving-focus.mjs +2 -3
  356. package/dist/internal/use-value-set.mjs +2 -3
  357. package/dist/internal/value-set.mjs +1 -2
  358. package/dist/menu/index.d.mts +2 -4
  359. package/dist/menu/index.d.mts.map +1 -1
  360. package/dist/menu/index.mjs +2 -3
  361. package/dist/menu/menu-checkbox-item.d.mts +1 -3
  362. package/dist/menu/menu-checkbox-item.d.mts.map +1 -1
  363. package/dist/menu/menu-checkbox-item.mjs +3 -4
  364. package/dist/menu/menu-context-trigger.d.mts +1 -3
  365. package/dist/menu/menu-context-trigger.d.mts.map +1 -1
  366. package/dist/menu/menu-context-trigger.mjs +4 -5
  367. package/dist/menu/menu-context.mjs +1 -2
  368. package/dist/menu/menu-dom.mjs +1 -2
  369. package/dist/menu/menu-gestures.mjs +1 -2
  370. package/dist/menu/menu-group.d.mts +1 -3
  371. package/dist/menu/menu-group.d.mts.map +1 -1
  372. package/dist/menu/menu-group.mjs +2 -3
  373. package/dist/menu/menu-hover.mjs +1 -2
  374. package/dist/menu/menu-item.d.mts +3 -4
  375. package/dist/menu/menu-item.d.mts.map +1 -1
  376. package/dist/menu/menu-item.mjs +6 -3
  377. package/dist/menu/menu-item.mjs.map +1 -1
  378. package/dist/menu/menu-outside.mjs +1 -2
  379. package/dist/menu/menu-point.mjs +1 -2
  380. package/dist/menu/menu-popup.d.mts +2 -4
  381. package/dist/menu/menu-popup.d.mts.map +1 -1
  382. package/dist/menu/menu-popup.mjs +13 -14
  383. package/dist/menu/menu-radio-group.d.mts +1 -3
  384. package/dist/menu/menu-radio-group.d.mts.map +1 -1
  385. package/dist/menu/menu-radio-group.mjs +3 -4
  386. package/dist/menu/menu-radio-item.d.mts +1 -3
  387. package/dist/menu/menu-radio-item.d.mts.map +1 -1
  388. package/dist/menu/menu-radio-item.mjs +2 -3
  389. package/dist/menu/menu-root.d.mts +1 -3
  390. package/dist/menu/menu-root.d.mts.map +1 -1
  391. package/dist/menu/menu-root.mjs +4 -5
  392. package/dist/menu/menu-submenu-trigger.d.mts +1 -3
  393. package/dist/menu/menu-submenu-trigger.d.mts.map +1 -1
  394. package/dist/menu/menu-submenu-trigger.mjs +5 -6
  395. package/dist/menu/menu-trigger.d.mts +1 -3
  396. package/dist/menu/menu-trigger.d.mts.map +1 -1
  397. package/dist/menu/menu-trigger.mjs +5 -6
  398. package/dist/menu/use-menu-item.mjs +2 -3
  399. package/dist/menu/use-menu-keyboard.mjs +2 -3
  400. package/dist/menubar/menubar.d.mts +1 -3
  401. package/dist/menubar/menubar.d.mts.map +1 -1
  402. package/dist/menubar/menubar.mjs +7 -8
  403. package/dist/meter/index.d.mts +1 -3
  404. package/dist/meter/index.d.mts.map +1 -1
  405. package/dist/meter/index.mjs +1 -2
  406. package/dist/meter/meter-context.mjs +1 -2
  407. package/dist/meter/meter-indicator.d.mts +1 -3
  408. package/dist/meter/meter-indicator.d.mts.map +1 -1
  409. package/dist/meter/meter-indicator.mjs +1 -2
  410. package/dist/meter/meter-label.d.mts +1 -3
  411. package/dist/meter/meter-label.d.mts.map +1 -1
  412. package/dist/meter/meter-label.mjs +1 -2
  413. package/dist/meter/meter-region.d.mts +0 -2
  414. package/dist/meter/meter-region.d.mts.map +1 -1
  415. package/dist/meter/meter-region.mjs +1 -2
  416. package/dist/meter/meter-root.d.mts +1 -3
  417. package/dist/meter/meter-root.d.mts.map +1 -1
  418. package/dist/meter/meter-root.mjs +4 -5
  419. package/dist/meter/meter-track.d.mts +1 -3
  420. package/dist/meter/meter-track.d.mts.map +1 -1
  421. package/dist/meter/meter-track.mjs +1 -2
  422. package/dist/meter/meter-value.d.mts +1 -3
  423. package/dist/meter/meter-value.d.mts.map +1 -1
  424. package/dist/meter/meter-value.mjs +1 -2
  425. package/dist/multi-select/index.d.mts +1 -3
  426. package/dist/multi-select/index.d.mts.map +1 -1
  427. package/dist/multi-select/index.mjs +1 -2
  428. package/dist/multi-select/multi-select-context.mjs +1 -2
  429. package/dist/multi-select/multi-select-group.d.mts +1 -3
  430. package/dist/multi-select/multi-select-group.d.mts.map +1 -1
  431. package/dist/multi-select/multi-select-group.mjs +2 -3
  432. package/dist/multi-select/multi-select-keyboard.mjs +1 -2
  433. package/dist/multi-select/multi-select-label.d.mts +1 -3
  434. package/dist/multi-select/multi-select-label.d.mts.map +1 -1
  435. package/dist/multi-select/multi-select-label.mjs +2 -3
  436. package/dist/multi-select/multi-select-list.d.mts +1 -3
  437. package/dist/multi-select/multi-select-list.d.mts.map +1 -1
  438. package/dist/multi-select/multi-select-list.mjs +3 -4
  439. package/dist/multi-select/multi-select-option.d.mts +1 -3
  440. package/dist/multi-select/multi-select-option.d.mts.map +1 -1
  441. package/dist/multi-select/multi-select-option.mjs +3 -4
  442. package/dist/multi-select/multi-select-popup.d.mts +1 -3
  443. package/dist/multi-select/multi-select-popup.d.mts.map +1 -1
  444. package/dist/multi-select/multi-select-popup.mjs +5 -6
  445. package/dist/multi-select/multi-select-root.d.mts +1 -3
  446. package/dist/multi-select/multi-select-root.d.mts.map +1 -1
  447. package/dist/multi-select/multi-select-root.mjs +12 -13
  448. package/dist/multi-select/multi-select-trigger.d.mts +1 -3
  449. package/dist/multi-select/multi-select-trigger.d.mts.map +1 -1
  450. package/dist/multi-select/multi-select-trigger.mjs +8 -9
  451. package/dist/multi-select/multi-select-value.d.mts +1 -3
  452. package/dist/multi-select/multi-select-value.d.mts.map +1 -1
  453. package/dist/multi-select/multi-select-value.mjs +1 -2
  454. package/dist/navigation-menu/index.d.mts +0 -2
  455. package/dist/navigation-menu/index.d.mts.map +1 -1
  456. package/dist/navigation-menu/index.mjs +1 -2
  457. package/dist/navigation-menu/navigation-menu-context.mjs +1 -2
  458. package/dist/navigation-menu/navigation-menu-item.d.mts +1 -3
  459. package/dist/navigation-menu/navigation-menu-item.d.mts.map +1 -1
  460. package/dist/navigation-menu/navigation-menu-item.mjs +3 -4
  461. package/dist/navigation-menu/navigation-menu-link.d.mts +1 -3
  462. package/dist/navigation-menu/navigation-menu-link.d.mts.map +1 -1
  463. package/dist/navigation-menu/navigation-menu-link.mjs +4 -5
  464. package/dist/navigation-menu/navigation-menu-list.d.mts +1 -3
  465. package/dist/navigation-menu/navigation-menu-list.d.mts.map +1 -1
  466. package/dist/navigation-menu/navigation-menu-list.mjs +1 -2
  467. package/dist/navigation-menu/navigation-menu-popup.d.mts +2 -4
  468. package/dist/navigation-menu/navigation-menu-popup.d.mts.map +1 -1
  469. package/dist/navigation-menu/navigation-menu-popup.mjs +8 -9
  470. package/dist/navigation-menu/navigation-menu-root.d.mts +1 -3
  471. package/dist/navigation-menu/navigation-menu-root.d.mts.map +1 -1
  472. package/dist/navigation-menu/navigation-menu-root.mjs +1 -2
  473. package/dist/navigation-menu/navigation-menu-trigger.d.mts +0 -2
  474. package/dist/navigation-menu/navigation-menu-trigger.d.mts.map +1 -1
  475. package/dist/navigation-menu/navigation-menu-trigger.mjs +2 -3
  476. package/dist/number-field/index.d.mts +2 -4
  477. package/dist/number-field/index.d.mts.map +1 -1
  478. package/dist/number-field/index.mjs +1 -2
  479. package/dist/number-field/number-field-arithmetic.mjs +1 -2
  480. package/dist/number-field/number-field-context.d.mts +1 -3
  481. package/dist/number-field/number-field-context.d.mts.map +1 -1
  482. package/dist/number-field/number-field-context.mjs +1 -2
  483. package/dist/number-field/number-field-decrement.d.mts +0 -2
  484. package/dist/number-field/number-field-decrement.d.mts.map +1 -1
  485. package/dist/number-field/number-field-decrement.mjs +1 -2
  486. package/dist/number-field/number-field-format.mjs +1 -2
  487. package/dist/number-field/number-field-increment.d.mts +0 -2
  488. package/dist/number-field/number-field-increment.d.mts.map +1 -1
  489. package/dist/number-field/number-field-increment.mjs +1 -2
  490. package/dist/number-field/number-field-input.d.mts +1 -3
  491. package/dist/number-field/number-field-input.d.mts.map +1 -1
  492. package/dist/number-field/number-field-input.mjs +4 -5
  493. package/dist/number-field/number-field-label.d.mts +1 -3
  494. package/dist/number-field/number-field-label.d.mts.map +1 -1
  495. package/dist/number-field/number-field-label.mjs +3 -4
  496. package/dist/number-field/number-field-root.d.mts +1 -3
  497. package/dist/number-field/number-field-root.d.mts.map +1 -1
  498. package/dist/number-field/number-field-root.mjs +7 -8
  499. package/dist/number-field/number-field-root.mjs.map +1 -1
  500. package/dist/number-field/use-number-field-dev-warnings.mjs +2 -3
  501. package/dist/number-field/use-step-button.d.mts +1 -3
  502. package/dist/number-field/use-step-button.d.mts.map +1 -1
  503. package/dist/number-field/use-step-button.mjs +2 -3
  504. package/dist/otp-field/index.d.mts +2 -4
  505. package/dist/otp-field/index.d.mts.map +1 -1
  506. package/dist/otp-field/index.mjs +1 -2
  507. package/dist/otp-field/otp-field-context.mjs +1 -2
  508. package/dist/otp-field/otp-field-filter.d.mts +0 -2
  509. package/dist/otp-field/otp-field-filter.d.mts.map +1 -1
  510. package/dist/otp-field/otp-field-filter.mjs +1 -2
  511. package/dist/otp-field/otp-field-input.d.mts +1 -3
  512. package/dist/otp-field/otp-field-input.d.mts.map +1 -1
  513. package/dist/otp-field/otp-field-input.mjs +6 -7
  514. package/dist/otp-field/otp-field-root.d.mts +1 -3
  515. package/dist/otp-field/otp-field-root.d.mts.map +1 -1
  516. package/dist/otp-field/otp-field-root.mjs +10 -11
  517. package/dist/otp-field/otp-field-slot.d.mts +1 -3
  518. package/dist/otp-field/otp-field-slot.d.mts.map +1 -1
  519. package/dist/otp-field/otp-field-slot.mjs +2 -3
  520. package/dist/popover/index.d.mts +2 -4
  521. package/dist/popover/index.d.mts.map +1 -1
  522. package/dist/popover/index.mjs +1 -2
  523. package/dist/popover/popover-close.d.mts +10 -6
  524. package/dist/popover/popover-close.d.mts.map +1 -1
  525. package/dist/popover/popover-close.mjs +3 -3
  526. package/dist/popover/popover-close.mjs.map +1 -1
  527. package/dist/popover/popover-context.mjs +1 -2
  528. package/dist/popover/popover-description.d.mts +1 -3
  529. package/dist/popover/popover-description.d.mts.map +1 -1
  530. package/dist/popover/popover-description.mjs +1 -2
  531. package/dist/popover/popover-popup.d.mts +2 -4
  532. package/dist/popover/popover-popup.d.mts.map +1 -1
  533. package/dist/popover/popover-popup.mjs +4 -5
  534. package/dist/popover/popover-root.d.mts +1 -3
  535. package/dist/popover/popover-root.d.mts.map +1 -1
  536. package/dist/popover/popover-root.mjs +2 -3
  537. package/dist/popover/popover-title.d.mts +1 -3
  538. package/dist/popover/popover-title.d.mts.map +1 -1
  539. package/dist/popover/popover-title.mjs +1 -2
  540. package/dist/popover/popover-trigger.d.mts +1 -3
  541. package/dist/popover/popover-trigger.d.mts.map +1 -1
  542. package/dist/popover/popover-trigger.mjs +2 -3
  543. package/dist/progress/index.d.mts +1 -3
  544. package/dist/progress/index.d.mts.map +1 -1
  545. package/dist/progress/index.mjs +1 -2
  546. package/dist/progress/progress-context.mjs +1 -2
  547. package/dist/progress/progress-indicator.d.mts +1 -3
  548. package/dist/progress/progress-indicator.d.mts.map +1 -1
  549. package/dist/progress/progress-indicator.mjs +1 -2
  550. package/dist/progress/progress-label.d.mts +1 -3
  551. package/dist/progress/progress-label.d.mts.map +1 -1
  552. package/dist/progress/progress-label.mjs +1 -2
  553. package/dist/progress/progress-root.d.mts +1 -3
  554. package/dist/progress/progress-root.d.mts.map +1 -1
  555. package/dist/progress/progress-root.mjs +4 -5
  556. package/dist/progress/progress-track.d.mts +1 -3
  557. package/dist/progress/progress-track.d.mts.map +1 -1
  558. package/dist/progress/progress-track.mjs +1 -2
  559. package/dist/progress/progress-value.d.mts +1 -3
  560. package/dist/progress/progress-value.d.mts.map +1 -1
  561. package/dist/progress/progress-value.mjs +1 -2
  562. package/dist/radio-group/index.d.mts +1 -3
  563. package/dist/radio-group/index.d.mts.map +1 -1
  564. package/dist/radio-group/index.mjs +1 -2
  565. package/dist/radio-group/radio-group-context.mjs +1 -2
  566. package/dist/radio-group/radio-group-item.d.mts +1 -3
  567. package/dist/radio-group/radio-group-item.d.mts.map +1 -1
  568. package/dist/radio-group/radio-group-item.mjs +3 -4
  569. package/dist/radio-group/radio-group-label.d.mts +1 -3
  570. package/dist/radio-group/radio-group-label.d.mts.map +1 -1
  571. package/dist/radio-group/radio-group-label.mjs +1 -2
  572. package/dist/radio-group/radio-group-root.d.mts +1 -3
  573. package/dist/radio-group/radio-group-root.d.mts.map +1 -1
  574. package/dist/radio-group/radio-group-root.mjs +4 -5
  575. package/dist/select/index.d.mts +1 -3
  576. package/dist/select/index.d.mts.map +1 -1
  577. package/dist/select/index.mjs +1 -2
  578. package/dist/select/select-context.mjs +1 -2
  579. package/dist/select/select-dom.mjs +2 -3
  580. package/dist/select/select-group-label.d.mts +1 -3
  581. package/dist/select/select-group-label.d.mts.map +1 -1
  582. package/dist/select/select-group-label.mjs +1 -2
  583. package/dist/select/select-group.d.mts +1 -3
  584. package/dist/select/select-group.d.mts.map +1 -1
  585. package/dist/select/select-group.mjs +2 -3
  586. package/dist/select/select-option.d.mts +1 -3
  587. package/dist/select/select-option.d.mts.map +1 -1
  588. package/dist/select/select-option.mjs +3 -4
  589. package/dist/select/select-root.d.mts +1 -3
  590. package/dist/select/select-root.d.mts.map +1 -1
  591. package/dist/select/select-root.mjs +6 -7
  592. package/dist/select/select-separator.d.mts +1 -3
  593. package/dist/select/select-separator.d.mts.map +1 -1
  594. package/dist/select/select-separator.mjs +1 -2
  595. package/dist/select/select-trigger.d.mts +1 -3
  596. package/dist/select/select-trigger.d.mts.map +1 -1
  597. package/dist/select/select-trigger.mjs +1 -2
  598. package/dist/select/select-value.d.mts +1 -3
  599. package/dist/select/select-value.d.mts.map +1 -1
  600. package/dist/select/select-value.mjs +3 -4
  601. package/dist/select/select-value.mjs.map +1 -1
  602. package/dist/separator/separator.d.mts +1 -3
  603. package/dist/separator/separator.d.mts.map +1 -1
  604. package/dist/separator/separator.mjs +1 -2
  605. package/dist/slider/index.d.mts +2 -4
  606. package/dist/slider/index.d.mts.map +1 -1
  607. package/dist/slider/index.mjs +1 -2
  608. package/dist/slider/slider-arithmetic.mjs +1 -2
  609. package/dist/slider/slider-context.mjs +1 -2
  610. package/dist/slider/slider-indicator.d.mts +1 -3
  611. package/dist/slider/slider-indicator.d.mts.map +1 -1
  612. package/dist/slider/slider-indicator.mjs +1 -2
  613. package/dist/slider/slider-label.d.mts +1 -3
  614. package/dist/slider/slider-label.d.mts.map +1 -1
  615. package/dist/slider/slider-label.mjs +3 -4
  616. package/dist/slider/slider-root.d.mts +1 -3
  617. package/dist/slider/slider-root.d.mts.map +1 -1
  618. package/dist/slider/slider-root.mjs +8 -9
  619. package/dist/slider/slider-thumb.d.mts +1 -3
  620. package/dist/slider/slider-thumb.d.mts.map +1 -1
  621. package/dist/slider/slider-thumb.mjs +5 -6
  622. package/dist/slider/slider-track.d.mts +1 -3
  623. package/dist/slider/slider-track.d.mts.map +1 -1
  624. package/dist/slider/slider-track.mjs +2 -3
  625. package/dist/slider/slider-value.d.mts +1 -3
  626. package/dist/slider/slider-value.d.mts.map +1 -1
  627. package/dist/slider/slider-value.mjs +1 -2
  628. package/dist/slider/use-slider-dev-warnings.mjs +2 -3
  629. package/dist/slider/use-thumb-registry.mjs +1 -2
  630. package/dist/switch/switch.d.mts +1 -3
  631. package/dist/switch/switch.d.mts.map +1 -1
  632. package/dist/switch/switch.mjs +2 -3
  633. package/dist/tabs/index.d.mts +0 -2
  634. package/dist/tabs/index.d.mts.map +1 -1
  635. package/dist/tabs/index.mjs +1 -2
  636. package/dist/tabs/tabs-context.d.mts +0 -2
  637. package/dist/tabs/tabs-context.d.mts.map +1 -1
  638. package/dist/tabs/tabs-context.mjs +1 -2
  639. package/dist/tabs/tabs-ids.mjs +1 -2
  640. package/dist/tabs/tabs-indicator.d.mts +1 -3
  641. package/dist/tabs/tabs-indicator.d.mts.map +1 -1
  642. package/dist/tabs/tabs-indicator.mjs +1 -2
  643. package/dist/tabs/tabs-list.d.mts +1 -3
  644. package/dist/tabs/tabs-list.d.mts.map +1 -1
  645. package/dist/tabs/tabs-list.mjs +4 -5
  646. package/dist/tabs/tabs-panel.d.mts +1 -3
  647. package/dist/tabs/tabs-panel.d.mts.map +1 -1
  648. package/dist/tabs/tabs-panel.mjs +4 -5
  649. package/dist/tabs/tabs-root.d.mts +1 -3
  650. package/dist/tabs/tabs-root.d.mts.map +1 -1
  651. package/dist/tabs/tabs-root.mjs +5 -6
  652. package/dist/tabs/tabs-tab.d.mts +1 -3
  653. package/dist/tabs/tabs-tab.d.mts.map +1 -1
  654. package/dist/tabs/tabs-tab.mjs +3 -4
  655. package/dist/tabs/use-until-found.mjs +1 -2
  656. package/dist/toast/index.d.mts +2 -4
  657. package/dist/toast/index.d.mts.map +1 -1
  658. package/dist/toast/index.mjs +2 -3
  659. package/dist/toast/toast-action.d.mts +1 -3
  660. package/dist/toast/toast-action.d.mts.map +1 -1
  661. package/dist/toast/toast-action.mjs +2 -3
  662. package/dist/toast/toast-close.d.mts +1 -3
  663. package/dist/toast/toast-close.d.mts.map +1 -1
  664. package/dist/toast/toast-close.mjs +2 -3
  665. package/dist/toast/toast-context.mjs +1 -2
  666. package/dist/toast/toast-description.d.mts +1 -3
  667. package/dist/toast/toast-description.d.mts.map +1 -1
  668. package/dist/toast/toast-description.mjs +2 -3
  669. package/dist/toast/toast-hotkey.mjs +1 -2
  670. package/dist/toast/toast-queue.mjs +1 -2
  671. package/dist/toast/toast-root.d.mts +1 -3
  672. package/dist/toast/toast-root.d.mts.map +1 -1
  673. package/dist/toast/toast-root.mjs +4 -5
  674. package/dist/toast/toast-root.mjs.map +1 -1
  675. package/dist/toast/toast-timers.mjs +1 -2
  676. package/dist/toast/toast-title.d.mts +1 -3
  677. package/dist/toast/toast-title.d.mts.map +1 -1
  678. package/dist/toast/toast-title.mjs +2 -3
  679. package/dist/toast/toast-viewport.d.mts +1 -3
  680. package/dist/toast/toast-viewport.d.mts.map +1 -1
  681. package/dist/toast/toast-viewport.mjs +9 -10
  682. package/dist/toast/toast.d.mts +1 -3
  683. package/dist/toast/toast.d.mts.map +1 -1
  684. package/dist/toast/toast.mjs +1 -2
  685. package/dist/toast/use-modal-portal-host.mjs +2 -3
  686. package/dist/toast/use-toast-announcements.mjs +2 -3
  687. package/dist/toast/use-toast-announcements.mjs.map +1 -1
  688. package/dist/toast/use-toast-focus.mjs +2 -3
  689. package/dist/toast/use-toast-pauses.mjs +2 -3
  690. package/dist/toggle/toggle.d.mts +1 -3
  691. package/dist/toggle/toggle.d.mts.map +1 -1
  692. package/dist/toggle/toggle.mjs +3 -4
  693. package/dist/toggle-group/index.d.mts +0 -2
  694. package/dist/toggle-group/index.d.mts.map +1 -1
  695. package/dist/toggle-group/index.mjs +1 -2
  696. package/dist/toggle-group/toggle-group-context.d.mts +0 -2
  697. package/dist/toggle-group/toggle-group-context.d.mts.map +1 -1
  698. package/dist/toggle-group/toggle-group-context.mjs +1 -2
  699. package/dist/toggle-group/toggle-group-item.d.mts +1 -3
  700. package/dist/toggle-group/toggle-group-item.d.mts.map +1 -1
  701. package/dist/toggle-group/toggle-group-item.mjs +2 -3
  702. package/dist/toggle-group/toggle-group-root.d.mts +1 -3
  703. package/dist/toggle-group/toggle-group-root.d.mts.map +1 -1
  704. package/dist/toggle-group/toggle-group-root.mjs +8 -9
  705. package/dist/toolbar/index.d.mts +0 -2
  706. package/dist/toolbar/index.d.mts.map +1 -1
  707. package/dist/toolbar/index.mjs +1 -2
  708. package/dist/toolbar/toolbar-root.d.mts +1 -3
  709. package/dist/toolbar/toolbar-root.d.mts.map +1 -1
  710. package/dist/toolbar/toolbar-root.mjs +3 -4
  711. package/dist/toolbar/toolbar-separator.d.mts +1 -3
  712. package/dist/toolbar/toolbar-separator.d.mts.map +1 -1
  713. package/dist/toolbar/toolbar-separator.mjs +1 -2
  714. package/dist/tooltip/index.d.mts +0 -2
  715. package/dist/tooltip/index.d.mts.map +1 -1
  716. package/dist/tooltip/index.mjs +1 -2
  717. package/dist/tooltip/tooltip-arrow.d.mts +1 -3
  718. package/dist/tooltip/tooltip-arrow.d.mts.map +1 -1
  719. package/dist/tooltip/tooltip-arrow.mjs +2 -3
  720. package/dist/tooltip/tooltip-context.d.mts +0 -2
  721. package/dist/tooltip/tooltip-context.d.mts.map +1 -1
  722. package/dist/tooltip/tooltip-context.mjs +1 -2
  723. package/dist/tooltip/tooltip-popup.d.mts +1 -3
  724. package/dist/tooltip/tooltip-popup.d.mts.map +1 -1
  725. package/dist/tooltip/tooltip-popup.mjs +4 -5
  726. package/dist/tooltip/tooltip-root.d.mts +1 -3
  727. package/dist/tooltip/tooltip-root.d.mts.map +1 -1
  728. package/dist/tooltip/tooltip-root.mjs +2 -3
  729. package/dist/tooltip/tooltip-trigger.d.mts +1 -3
  730. package/dist/tooltip/tooltip-trigger.d.mts.map +1 -1
  731. package/dist/tooltip/tooltip-trigger.mjs +6 -7
  732. package/dist/tooltip/tooltip-warm.mjs +1 -2
  733. package/dist/tooltip/use-tooltip-interaction.mjs +2 -3
  734. package/package.json +8 -8
  735. package/skills/funstack-ui-knowledge/SKILL.md +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"use-combobox-form.mjs","names":[],"sources":["../../src/combobox/use-combobox-form.ts"],"sourcesContent":["\"use client\";\nimport { useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport type { RefObject } from \"react\";\nimport type { ChangeReason } from \"../internal/types.js\";\nimport type { FormAssociatedElement } from \"../internal/form/use-form-owner-event.js\";\nimport { useFormReset, useResetTarget } from \"../internal/form/use-form-reset.js\";\n\nexport interface ComboboxFormOptions {\n /** The Root's text props, for the text's reset target. */\n readonly inputValue: string | undefined;\n readonly defaultInputValue: string | undefined;\n readonly inputRef: RefObject<HTMLInputElement | null>;\n readonly hiddenRef: RefObject<HTMLInputElement | null>;\n /** The latest text (the urgent lane). */\n readonly textRef: RefObject<string>;\n readonly writeText: (next: string, reason: ChangeReason, event: Event | undefined) => void;\n /**\n * Dispatches the value's reset target (`\"platform\"`) unless there is nothing to change. The\n * Root computes the target per mode (design 11.1, 15.8).\n */\n readonly resetValue: (event: Event) => void;\n}\n\n/**\n * The Combobox's form behaviour (design/components/combobox.md 11.1, walkthroughs 10 and 11):\n * form reset of the text and the value, the DOM re-sync for a controlled parent that keeps its\n * text, and the mount reconciliation of a text typed before hydration.\n */\nexport function useComboboxForm(options: ComboboxFormOptions): void {\n const { inputValue, defaultInputValue, inputRef, hiddenRef, textRef } = options;\n const { writeText } = options;\n\n // The text's reset target (conventions 3.8 rule 6): uncontrolled, the latest default prop;\n // controlled, the mount-time value.\n const inputDefaultValue = useResetTarget(inputValue, defaultInputValue) ?? \"\";\n // After a form reset a controlled parent may not adopt the text: put React's value back into\n // the DOM (react-dom only does that after its own input events).\n const [resync, setResync] = useState(0);\n useLayoutEffect(() => {\n const input = inputRef.current;\n if (resync > 0 && input !== null && input.value !== textRef.current) {\n input.value = textRef.current;\n }\n }, [resync, inputRef, textRef]);\n\n const formElement = useMemo<RefObject<FormAssociatedElement | null>>(\n () => ({\n get current() {\n return hiddenRef.current ?? inputRef.current;\n },\n set current(_ignored) {},\n }),\n [hiddenRef, inputRef],\n );\n useFormReset(\n formElement,\n (event) => {\n const input = inputRef.current;\n const domText = input?.value ?? inputDefaultValue;\n if (domText !== textRef.current) writeText(domText, \"platform\", event);\n // A controlled parent that does not adopt the text gets the DOM re-synced.\n setResync((n) => n + 1);\n options.resetValue(event);\n },\n () => {\n // react-dom writes `defaultValue = value` after every update of a controlled input, so the\n // reset target is written here, right before the browser's reset algorithm reads it.\n const input = inputRef.current;\n if (input !== null && input.defaultValue !== inputDefaultValue) {\n input.defaultValue = inputDefaultValue;\n }\n },\n );\n\n // Walkthrough 11: react-dom keeps a hydrated text input's DOM value and fires no `onChange`.\n const reconciled = useRef(false);\n useLayoutEffect(() => {\n if (reconciled.current) return;\n reconciled.current = true;\n const input = inputRef.current;\n if (input !== null && input.value !== textRef.current) {\n writeText(input.value, \"platform\", undefined);\n }\n }, [writeText, inputRef, textRef]);\n}\n"],"mappings":";;;;;;;;;AA4BA,SAAgB,gBAAgB,SAAoC;CAClE,MAAM,EAAE,YAAY,mBAAmB,UAAU,WAAW,YAAY;CACxE,MAAM,EAAE,cAAc;CAItB,MAAM,oBAAoB,eAAe,YAAY,iBAAiB,KAAK;CAG3E,MAAM,CAAC,QAAQ,aAAa,SAAS,CAAC;CACtC,sBAAsB;EACpB,MAAM,QAAQ,SAAS;EACvB,IAAI,SAAS,KAAK,UAAU,QAAQ,MAAM,UAAU,QAAQ,SAC1D,MAAM,QAAQ,QAAQ;CAE1B,GAAG;EAAC;EAAQ;EAAU;CAAO,CAAC;CAE9B,MAAM,cAAc,eACX;EACL,IAAI,UAAU;GACZ,OAAO,UAAU,WAAW,SAAS;EACvC;EACA,IAAI,QAAQ,UAAU,CAAC;CACzB,IACA,CAAC,WAAW,QAAQ,CACtB;CACA,aACE,cACC,UAAU;EAET,MAAM,UADQ,SAAS,SACA,SAAS;EAChC,IAAI,YAAY,QAAQ,SAAS,UAAU,SAAS,YAAY,KAAK;EAErE,WAAW,MAAM,IAAI,CAAC;EACtB,QAAQ,WAAW,KAAK;CAC1B,SACM;EAGJ,MAAM,QAAQ,SAAS;EACvB,IAAI,UAAU,QAAQ,MAAM,iBAAiB,mBAC3C,MAAM,eAAe;CAEzB,CACF;CAGA,MAAM,aAAa,OAAO,KAAK;CAC/B,sBAAsB;EACpB,IAAI,WAAW,SAAS;EACxB,WAAW,UAAU;EACrB,MAAM,QAAQ,SAAS;EACvB,IAAI,UAAU,QAAQ,MAAM,UAAU,QAAQ,SAC5C,UAAU,MAAM,OAAO,YAAY,KAAA,CAAS;CAEhD,GAAG;EAAC;EAAW;EAAU;CAAO,CAAC;AACnC"}
1
+ {"version":3,"file":"use-combobox-form.mjs","names":[],"sources":["../../src/combobox/use-combobox-form.ts"],"sourcesContent":["\"use client\";\nimport { useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport type { RefObject } from \"react\";\nimport type { ChangeReason } from \"../internal/types.js\";\nimport type { FormAssociatedElement } from \"../internal/form/use-form-owner-event.js\";\nimport { useFormReset, useResetTarget } from \"../internal/form/use-form-reset.js\";\n\nexport interface ComboboxFormOptions {\n /** The Root's text props, for the text's reset target. */\n readonly inputValue: string | undefined;\n readonly defaultInputValue: string | undefined;\n readonly inputRef: RefObject<HTMLInputElement | null>;\n readonly hiddenRef: RefObject<HTMLInputElement | null>;\n /** The latest text (the urgent lane). */\n readonly textRef: RefObject<string>;\n readonly writeText: (next: string, reason: ChangeReason, event: Event | undefined) => void;\n /**\n * Dispatches the value's reset target (`\"platform\"`) unless there is nothing to change. The\n * Root computes the target per mode (design 11.1, 15.8).\n */\n readonly resetValue: (event: Event) => void;\n}\n\n/**\n * The Combobox's form behaviour (design/components/combobox.md 11.1, walkthroughs 10 and 11):\n * form reset of the text and the value, the DOM re-sync for a controlled parent that keeps its\n * text, and the mount reconciliation of a text typed before hydration.\n */\nexport function useComboboxForm(options: ComboboxFormOptions): void {\n const { inputValue, defaultInputValue, inputRef, hiddenRef, textRef } = options;\n const { writeText } = options;\n\n // The text's reset target (conventions 3.8 rule 6): uncontrolled, the latest default prop;\n // controlled, the mount-time value.\n const inputDefaultValue = useResetTarget(inputValue, defaultInputValue) ?? \"\";\n // After a form reset a controlled parent may not adopt the text: put React's value back into\n // the DOM (react-dom only does that after its own input events).\n const [resync, setResync] = useState(0);\n useLayoutEffect(() => {\n const input = inputRef.current;\n if (resync > 0 && input !== null && input.value !== textRef.current) {\n input.value = textRef.current;\n }\n }, [resync, inputRef, textRef]);\n\n const formElement = useMemo<RefObject<FormAssociatedElement | null>>(\n () => ({\n get current() {\n return hiddenRef.current ?? inputRef.current;\n },\n set current(_ignored) {},\n }),\n [hiddenRef, inputRef],\n );\n useFormReset(\n formElement,\n (event) => {\n // The target is computed, not read from the input (conventions 3.8 rule 6): after a click\n // on a reset button this microtask runs before the browser's reset algorithm, so the input\n // still holds the typed text here (#185).\n if (inputDefaultValue !== textRef.current) {\n writeText(inputDefaultValue, \"platform\", event);\n }\n // A controlled parent that does not adopt the text gets the DOM re-synced.\n setResync((n) => n + 1);\n options.resetValue(event);\n },\n () => {\n // react-dom writes `defaultValue = value` after every update of a controlled input, so the\n // reset target is written here, right before the browser's reset algorithm reads it.\n const input = inputRef.current;\n if (input !== null && input.defaultValue !== inputDefaultValue) {\n input.defaultValue = inputDefaultValue;\n }\n },\n );\n\n // Walkthrough 11: react-dom keeps a hydrated text input's DOM value and fires no `onChange`.\n const reconciled = useRef(false);\n useLayoutEffect(() => {\n if (reconciled.current) return;\n reconciled.current = true;\n const input = inputRef.current;\n if (input !== null && input.value !== textRef.current) {\n writeText(input.value, \"platform\", undefined);\n }\n }, [writeText, inputRef, textRef]);\n}\n"],"mappings":";;;;;;;;;AA4BA,SAAgB,gBAAgB,SAAoC;CAClE,MAAM,EAAE,YAAY,mBAAmB,UAAU,WAAW,YAAY;CACxE,MAAM,EAAE,cAAc;CAItB,MAAM,oBAAoB,eAAe,YAAY,iBAAiB,KAAK;CAG3E,MAAM,CAAC,QAAQ,aAAa,SAAS,CAAC;CACtC,sBAAsB;EACpB,MAAM,QAAQ,SAAS;EACvB,IAAI,SAAS,KAAK,UAAU,QAAQ,MAAM,UAAU,QAAQ,SAC1D,MAAM,QAAQ,QAAQ;CAE1B,GAAG;EAAC;EAAQ;EAAU;CAAO,CAAC;CAE9B,MAAM,cAAc,eACX;EACL,IAAI,UAAU;GACZ,OAAO,UAAU,WAAW,SAAS;EACvC;EACA,IAAI,QAAQ,UAAU,CAAC;CACzB,IACA,CAAC,WAAW,QAAQ,CACtB;CACA,aACE,cACC,UAAU;EAIT,IAAI,sBAAsB,QAAQ,SAChC,UAAU,mBAAmB,YAAY,KAAK;EAGhD,WAAW,MAAM,IAAI,CAAC;EACtB,QAAQ,WAAW,KAAK;CAC1B,SACM;EAGJ,MAAM,QAAQ,SAAS;EACvB,IAAI,UAAU,QAAQ,MAAM,iBAAiB,mBAC3C,MAAM,eAAe;CAEzB,CACF;CAGA,MAAM,aAAa,OAAO,KAAK;CAC/B,sBAAsB;EACpB,IAAI,WAAW,SAAS;EACxB,WAAW,UAAU;EACrB,MAAM,QAAQ,SAAS;EACvB,IAAI,UAAU,QAAQ,MAAM,UAAU,QAAQ,SAC5C,UAAU,MAAM,OAAO,YAAY,KAAA,CAAS;CAEhD,GAAG;EAAC;EAAW;EAAU;CAAO,CAAC;AACnC"}
@@ -1,9 +1,9 @@
1
1
  "use client";
2
+ import { useCallback, useDeferredValue, useInsertionEffect, useRef, useState } from "react";
2
3
  import { createActionDetails } from "../internal/action/action-details.mjs";
3
- import { useLatest } from "../internal/use-latest.mjs";
4
4
  import { callUrgentHandler } from "../internal/action/call-urgent-handler.mjs";
5
- import { useCallback, useDeferredValue, useInsertionEffect, useRef, useState } from "react";
6
- //#region src/combobox/use-combobox-text.ts
5
+ import { useLatest } from "../internal/use-latest.mjs";
6
+ // src/combobox/use-combobox-text.ts
7
7
  /**
8
8
  * The text of a combobox, the library's urgent lane (design/components/combobox.md 2.2 and 4):
9
9
  * the controlled or internal `inputValue`, its deferred `query`, and the write that calls
@@ -37,7 +37,6 @@ function useComboboxText({ inputValue, defaultInputValue, onInputValueChange })
37
37
  }, [latest])
38
38
  };
39
39
  }
40
- //#endregion
41
40
  export { useComboboxText };
42
41
 
43
42
  //# sourceMappingURL=use-combobox-text.mjs.map
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
- //#region src/csp/csp-provider.d.ts
3
2
  /**
4
3
  * Props of `CSPProvider`.
5
4
  *
@@ -29,5 +28,4 @@ export declare function CSPProvider({ nonce, children }: CSPProviderProps): impo
29
28
  export declare namespace CSPProvider {
30
29
  var displayName: string;
31
30
  }
32
- //#endregion
33
31
  //# sourceMappingURL=csp-provider.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"csp-provider.d.mts","names":[],"sources":["../../src/csp/csp-provider.tsx"],"mappings":";;;;;;;iBAWiB;;;;;;;EAOf;;EAEA,WAAW;;;;;;;;;;;wBAYG,cAAc,OAAO,YAAY,mCAAgB,IAAA;yBAAjD"}
1
+ {"version":3,"file":"csp-provider.d.mts","names":[],"sources":["../../src/csp/csp-provider.tsx"],"mappings":";;;;;;iBAWiB;;;;;;;EAOf;;EAEA,WAAW;;;;;;;;;;;wBAYG,cAAc,OAAO,YAAY,mCAAgB,IAAA;yBAAjD"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { CSPContext } from "../internal/csp-context.mjs";
3
2
  import { useMemo } from "react";
3
+ import { CSPContext } from "../internal/csp-context.mjs";
4
4
  import { jsx } from "react/jsx-runtime";
5
- //#region src/csp/csp-provider.tsx
5
+ // src/csp/csp-provider.tsx
6
6
  /**
7
7
  * Hands a Content Security Policy nonce to every library part that renders a hoisted `<style>`
8
8
  * (`Menu.Popup`'s point placement rules, `Tooltip.Trigger`'s skip-delay rule with
@@ -20,7 +20,6 @@ function CSPProvider({ nonce, children }) {
20
20
  });
21
21
  }
22
22
  CSPProvider.displayName = "CSPProvider";
23
- //#endregion
24
23
  export { CSPProvider };
25
24
 
26
25
  //# sourceMappingURL=csp-provider.mjs.map
@@ -1,4 +1,3 @@
1
- //#region src/csp/style-hashes.d.ts
2
1
  /**
3
2
  * The base64 SHA-256 of each shipped stylesheet, keyed by its `<style href>`. Allow them with
4
3
  * `style-src 'sha256-<value>'`:
@@ -17,5 +16,4 @@ export declare const STYLE_SHA256: {
17
16
  readonly "@funstack/ui/menu-point": "Wm5aBRstuZ3S9kDs0IbldhidU/prqpIW69jEAS0N9mc=";
18
17
  readonly "@funstack/ui/tooltip-warm": "nFBZGhNvo46ITrlBb48hELUAyWzpeIdJCziCectFQa4=";
19
18
  };
20
- //#endregion
21
19
  //# sourceMappingURL=style-hashes.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style-hashes.d.mts","names":[],"sources":["../../src/csp/style-hashes.ts"],"mappings":";;;;;;;;;;;;;;;qBAkBa;WACX;WACA"}
1
+ {"version":3,"file":"style-hashes.d.mts","names":[],"sources":["../../src/csp/style-hashes.ts"],"mappings":";;;;;;;;;;;;;;qBAkBa;WACX;WACA"}
@@ -1,4 +1,4 @@
1
- //#region src/csp/style-hashes.ts
1
+ // src/csp/style-hashes.ts
2
2
  /**
3
3
  * The base64 SHA-256 of each shipped stylesheet, keyed by its `<style href>`. Allow them with
4
4
  * `style-src 'sha256-<value>'`:
@@ -17,7 +17,6 @@ const STYLE_SHA256 = {
17
17
  "@funstack/ui/menu-point": "Wm5aBRstuZ3S9kDs0IbldhidU/prqpIW69jEAS0N9mc=",
18
18
  "@funstack/ui/tooltip-warm": "nFBZGhNvo46ITrlBb48hELUAyWzpeIdJCziCectFQa4="
19
19
  };
20
- //#endregion
21
20
  export { STYLE_SHA256 };
22
21
 
23
22
  //# sourceMappingURL=style-hashes.mjs.map
@@ -1,13 +1,16 @@
1
+ import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
1
2
  import { Action, ActionDetails, RenderProp, StateValue, WhilePending } from "../internal/types.mjs";
2
3
  import "./dialog-context.mjs";
3
- import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
4
- //#region src/dialog/dialog-close.d.ts
5
4
  /**
6
5
  * State of `Dialog.Close`, passed to the function forms of `className`, `style`, `children` and
7
6
  * `render`.
8
7
  */
9
8
  export interface DialogCloseState {
10
- /** The `action` is in flight. */
9
+ /**
10
+ * From the click until the close this part asked for has committed: the `action` in flight,
11
+ * then the Root's close (an awaited `openChangeAction(false)`, or another pending action the
12
+ * close is entangled with). Also without `action`, in library mode.
13
+ */
11
14
  readonly pending: boolean;
12
15
  /** The `disabled` prop. */
13
16
  readonly disabled: boolean;
@@ -40,7 +43,8 @@ export interface DialogCloseProps extends Omit<ComponentPropsWithRef<"button">,
40
43
  * cancelled, `aria-disabled="true"` meanwhile). `"run"`: the action runs again (`data-pending`
41
44
  * until every run has settled); the dialog closes once, when the last run settles and only if
42
45
  * the latest run resolved (a rejection leaves it open, as in `"ignore"` mode). No effect
43
- * without `action`.
46
+ * without `action`: the part then shows `data-pending` while the Root's close waits, without
47
+ * `aria-disabled`.
44
48
  *
45
49
  * @defaultValue `"ignore"`
46
50
  */
@@ -72,7 +76,8 @@ export interface DialogCloseProps extends Omit<ComponentPropsWithRef<"button">,
72
76
  * through the Root (`openChangeAction(false)` awaited, then `close(value)` in the commit, inside
73
77
  * the view transition if the Popup's `transition` is set). With `action` the action runs first in
74
78
  * this part's own transition (`data-pending` and `aria-disabled` on the button; a second click
75
- * meanwhile is ignored unless `whilePending="run"`); a rejection leaves the dialog open.
79
+ * meanwhile is ignored unless `whilePending="run"`); a rejection leaves the dialog open. With or
80
+ * without `action`, the button has `data-pending` until the close it asked for has committed.
76
81
  *
77
82
  * Owned keys (conventions 1.2): `type` (on a `<button>` only), `disabled`, `commandfor`,
78
83
  * `command` (neither rendered with `action`), `value`, `onClick` (library mode, or with `action`), `aria-disabled`, `data-pending`,
@@ -84,5 +89,4 @@ export declare function DialogClose(props: DialogCloseProps): ReactNode;
84
89
  export declare namespace DialogClose {
85
90
  var displayName: string;
86
91
  }
87
- //#endregion
88
92
  //# sourceMappingURL=dialog-close.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-close.d.mts","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"mappings":";;;;;;;;iBAsBiB;;WAEN;;WAEA;;;iBAIM,2BAA2B;;WAEjC;;;;;;;iBAQM,yBAAyB,KACxC;;;;;;;;;;;;EAcA,SAAS,QAAQ,SAAS;;;;;;;;;;EAU1B,eAAe;;EAEf;;;;;;;;EAQA;;EAEA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;;;wBAmBvC,YAAY,OAAO,mBAAgB;yBAAnC"}
1
+ {"version":3,"file":"dialog-close.d.mts","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"mappings":";;;;;;;iBAsBiB;;;;;;WAMN;;WAEA;;;iBAIM,2BAA2B;;WAEjC;;;;;;;iBAQM,yBAAyB,KACxC;;;;;;;;;;;;EAcA,SAAS,QAAQ,SAAS;;;;;;;;;;;EAW1B,eAAe;;EAEf;;;;;;;;EAQA;;EAEA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;;;;wBAoBvC,YAAY,OAAO,mBAAgB;yBAAnC"}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
+ import { use, useCallback } from "react";
2
3
  import { createActionDetails } from "../internal/action/action-details.mjs";
3
- import { useMergedRefs } from "../internal/use-merged-refs.mjs";
4
4
  import { useOverlayClose } from "../internal/overlay/use-overlay-close.mjs";
5
+ import { useMergedRefs } from "../internal/use-merged-refs.mjs";
5
6
  import { DialogCloseRegistry, useDialogContext } from "./dialog-context.mjs";
6
- import { use, useCallback } from "react";
7
- //#region src/dialog/dialog-close.tsx
7
+ // src/dialog/dialog-close.tsx
8
8
  const isDev = process.env.NODE_ENV !== "production";
9
9
  /**
10
10
  * A close button: `<button type="button" commandfor command="request-close">`, or a plain
@@ -14,7 +14,8 @@ const isDev = process.env.NODE_ENV !== "production";
14
14
  * through the Root (`openChangeAction(false)` awaited, then `close(value)` in the commit, inside
15
15
  * the view transition if the Popup's `transition` is set). With `action` the action runs first in
16
16
  * this part's own transition (`data-pending` and `aria-disabled` on the button; a second click
17
- * meanwhile is ignored unless `whilePending="run"`); a rejection leaves the dialog open.
17
+ * meanwhile is ignored unless `whilePending="run"`); a rejection leaves the dialog open. With or
18
+ * without `action`, the button has `data-pending` until the close it asked for has committed.
18
19
  *
19
20
  * Owned keys (conventions 1.2): `type` (on a `<button>` only), `disabled`, `commandfor`,
20
21
  * `command` (neither rendered with `action`), `value`, `onClick` (library mode, or with `action`), `aria-disabled`, `data-pending`,
@@ -78,7 +79,6 @@ function useDialogClose({ action, whilePending, value, disabled = false, classNa
78
79
  }
79
80
  });
80
81
  }
81
- //#endregion
82
82
  export { DialogClose, useDialogClose };
83
83
 
84
84
  //# sourceMappingURL=dialog-close.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-close.mjs","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"sourcesContent":["\"use client\";\nimport { use, useCallback } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { createActionDetails } from \"../internal/action/action-details.js\";\nimport type {\n Action,\n ActionDetails,\n RenderProp,\n StateValue,\n WhilePending,\n} from \"../internal/types.js\";\nimport { useOverlayClose } from \"../internal/overlay/use-overlay-close.js\";\nimport { useMergedRefs } from \"../internal/use-merged-refs.js\";\nimport { DialogCloseRegistry, useDialogContext } from \"./dialog-context.js\";\nimport type { DialogNamespace } from \"./dialog-context.js\";\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\n/**\n * State of `Dialog.Close`, passed to the function forms of `className`, `style`, `children` and\n * `render`.\n */\nexport interface DialogCloseState {\n /** The `action` is in flight. */\n readonly pending: boolean;\n /** The `disabled` prop. */\n readonly disabled: boolean;\n}\n\n/** Details passed to `Dialog.Close`'s `action`. */\nexport interface DialogCloseDetails extends ActionDetails {\n /** The `value` the dialog closes with (`dialog.returnValue`); `\"\"` without `value`. */\n readonly returnValue: string;\n}\n\n/**\n * Props of `Dialog.Close`.\n *\n * @see https://ui.funstack.work/components/dialog\n */\nexport interface DialogCloseProps extends Omit<\n ComponentPropsWithRef<\"button\">,\n \"onClick\" | \"value\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * Runs inside this part's own transition (`data-pending` on the button), then closes the\n * dialog with `value` as `returnValue`: in library mode through the Root\n * (`openChangeAction(false)` awaited, view transition if set), in JS-free mode with\n * `close(value)`. A rejection reaches the nearest Error Boundary above the Close part and\n * leaves the dialog open. If the dialog was dismissed and opened again while the action ran,\n * the close is dropped: it belonged to the earlier open. With `action` the button is no native\n * close invoker (no `commandfor` / `command`), so a click before hydration does nothing\n * instead of closing the dialog without running the action. Without `action` in JS-free mode\n * the button is a native `command=\"request-close\"` invoker.\n */\n action?: Action<[details: DialogCloseDetails]>;\n /**\n * What a click does while this part's `action` is pending. `\"ignore\"`: nothing (the click is\n * cancelled, `aria-disabled=\"true\"` meanwhile). `\"run\"`: the action runs again (`data-pending`\n * until every run has settled); the dialog closes once, when the last run settles and only if\n * the latest run resolved (a rejection leaves it open, as in `\"ignore\"` mode). No effect\n * without `action`.\n *\n * @defaultValue `\"ignore\"`\n */\n whilePending?: WhilePending;\n /** Becomes `dialog.returnValue` (and `details.returnValue` of `openChangeAction(false)`). */\n value?: string;\n /**\n * Never closes. Native `disabled` on a `<button>`; owned, so a `render` element cannot\n * re-enable it. With a link or component `render` whose click this part handles (library mode,\n * or with `action`), `aria-disabled=\"true\"` instead: the element stays focusable.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, DialogCloseState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, DialogCloseState>;\n /** Content, or a function of the part's state. */\n children?: StateValue<ReactNode, DialogCloseState>;\n /** Replace the default `<button>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"button\">, DialogCloseState>;\n}\n\n/**\n * A close button: `<button type=\"button\" commandfor command=\"request-close\">`, or a plain\n * `<button type=\"button\">` with `action` (it does nothing before hydration). In JS-free mode\n * without `action` the browser closes the dialog (a close request: `cancel`, then `close`), with\n * `value` as the `returnValue`. In library mode the click is always cancelled and the close goes\n * through the Root (`openChangeAction(false)` awaited, then `close(value)` in the commit, inside\n * the view transition if the Popup's `transition` is set). With `action` the action runs first in\n * this part's own transition (`data-pending` and `aria-disabled` on the button; a second click\n * meanwhile is ignored unless `whilePending=\"run\"`); a rejection leaves the dialog open.\n *\n * Owned keys (conventions 1.2): `type` (on a `<button>` only), `disabled`, `commandfor`,\n * `command` (neither rendered with `action`), `value`, `onClick` (library mode, or with `action`), `aria-disabled`, `data-pending`,\n * `data-disabled`.\n *\n * @see https://ui.funstack.work/components/dialog\n */\nexport function DialogClose(props: DialogCloseProps) {\n return useDialogClose(props, { part: \"Dialog.Close\" });\n}\n\nDialogClose.displayName = \"DialogClose\";\n\n/** What a caller of `useDialogClose` sets (design/components/alert-dialog.md 8). */\nexport interface DialogCloseOptions {\n /** Public name of the part (`\"AlertDialog.Cancel\"`). */\n readonly part: `${DialogNamespace}.${string}`;\n /** Extra owned keys (AlertDialog.Cancel's `autoFocus`). */\n readonly ownProps?: ComponentPropsWithRef<\"button\">;\n}\n\n/**\n * The body of `Dialog.Close`, also run by `AlertDialog.Cancel` and `AlertDialog.Action`\n * (alert-dialog.md 8).\n */\nexport function useDialogClose(\n {\n action,\n whilePending,\n value,\n disabled = false,\n className,\n style,\n children,\n render,\n ref,\n ...rest\n }: DialogCloseProps,\n { part, ownProps }: DialogCloseOptions,\n): ReactNode {\n const ctx = useDialogContext(part);\n // A Drawer.Popup's development check that the drawer has a Close (drawer.md 7).\n const registerClose = use(DialogCloseRegistry);\n const reportClose = useCallback(\n (element: HTMLElement | null) => {\n if (element !== null) registerClose?.(element);\n },\n [registerClose],\n );\n // Production passes the consumer's ref through untouched.\n const mergedRef = useMergedRefs<HTMLButtonElement | null>(ref, isDev ? reportClose : undefined);\n const { popupRef, recordCloseIntent } = ctx;\n const isLibrary = ctx.mode === \"library\";\n return useOverlayClose({\n part,\n noun: \"dialog\",\n isLibrary,\n popupId: ctx.ids.popup,\n command: \"request-close\",\n openGeneration: ctx.openGeneration,\n action,\n whilePending,\n details: (event) => createActionDetails(event, { returnValue: value ?? \"\" }),\n close: (event) => {\n const returnValue = value ?? \"\";\n if (isLibrary) {\n // A library-owned close (design 2.3): awaited, then `close(returnValue)` in the commit. A\n // no-op when `false` is already intended (a repeated click, or a dismissal meanwhile).\n ctx.requestClose(event, \"activate\", returnValue);\n return;\n }\n // JS-free mode with `action`: a browser-owned close; there is no Root state to go through.\n const dialog = popupRef.current;\n if (dialog === null || !dialog.open) return;\n recordCloseIntent({ reason: \"activate\", event });\n dialog.close(returnValue);\n },\n ownProps: { value, ...ownProps },\n disabled,\n className,\n style,\n children,\n render,\n rest: { ...rest, ref: mergedRef },\n });\n}\n"],"mappings":";;;;;;;AAgBA,MAAM,QAAQ,QAAQ,IAAI,aAAa;;;;;;;;;;;;;;;;;AAsFvC,SAAgB,YAAY,OAAyB;CACnD,OAAO,eAAe,OAAO,EAAE,MAAM,eAAe,CAAC;AACvD;AAEA,YAAY,cAAc;;;;;AAc1B,SAAgB,eACd,EACE,QACA,cACA,OACA,WAAW,OACX,WACA,OACA,UACA,QACA,KACA,GAAG,QAEL,EAAE,MAAM,YACG;CACX,MAAM,MAAM,iBAAiB,IAAI;CAEjC,MAAM,gBAAgB,IAAI,mBAAmB;CAC7C,MAAM,cAAc,aACjB,YAAgC;EAC/B,IAAI,YAAY,MAAM,gBAAgB,OAAO;CAC/C,GACA,CAAC,aAAa,CAChB;CAEA,MAAM,YAAY,cAAwC,KAAK,QAAQ,cAAc,KAAA,CAAS;CAC9F,MAAM,EAAE,UAAU,sBAAsB;CACxC,MAAM,YAAY,IAAI,SAAS;CAC/B,OAAO,gBAAgB;EACrB;EACA,MAAM;EACN;EACA,SAAS,IAAI,IAAI;EACjB,SAAS;EACT,gBAAgB,IAAI;EACpB;EACA;EACA,UAAU,UAAU,oBAAoB,OAAO,EAAE,aAAa,SAAS,GAAG,CAAC;EAC3E,QAAQ,UAAU;GAChB,MAAM,cAAc,SAAS;GAC7B,IAAI,WAAW;IAGb,IAAI,aAAa,OAAO,YAAY,WAAW;IAC/C;GACF;GAEA,MAAM,SAAS,SAAS;GACxB,IAAI,WAAW,QAAQ,CAAC,OAAO,MAAM;GACrC,kBAAkB;IAAE,QAAQ;IAAY;GAAM,CAAC;GAC/C,OAAO,MAAM,WAAW;EAC1B;EACA,UAAU;GAAE;GAAO,GAAG;EAAS;EAC/B;EACA;EACA;EACA;EACA;EACA,MAAM;GAAE,GAAG;GAAM,KAAK;EAAU;CAClC,CAAC;AACH"}
1
+ {"version":3,"file":"dialog-close.mjs","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"sourcesContent":["\"use client\";\nimport { use, useCallback } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { createActionDetails } from \"../internal/action/action-details.js\";\nimport type {\n Action,\n ActionDetails,\n RenderProp,\n StateValue,\n WhilePending,\n} from \"../internal/types.js\";\nimport { useOverlayClose } from \"../internal/overlay/use-overlay-close.js\";\nimport { useMergedRefs } from \"../internal/use-merged-refs.js\";\nimport { DialogCloseRegistry, useDialogContext } from \"./dialog-context.js\";\nimport type { DialogNamespace } from \"./dialog-context.js\";\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\n/**\n * State of `Dialog.Close`, passed to the function forms of `className`, `style`, `children` and\n * `render`.\n */\nexport interface DialogCloseState {\n /**\n * From the click until the close this part asked for has committed: the `action` in flight,\n * then the Root's close (an awaited `openChangeAction(false)`, or another pending action the\n * close is entangled with). Also without `action`, in library mode.\n */\n readonly pending: boolean;\n /** The `disabled` prop. */\n readonly disabled: boolean;\n}\n\n/** Details passed to `Dialog.Close`'s `action`. */\nexport interface DialogCloseDetails extends ActionDetails {\n /** The `value` the dialog closes with (`dialog.returnValue`); `\"\"` without `value`. */\n readonly returnValue: string;\n}\n\n/**\n * Props of `Dialog.Close`.\n *\n * @see https://ui.funstack.work/components/dialog\n */\nexport interface DialogCloseProps extends Omit<\n ComponentPropsWithRef<\"button\">,\n \"onClick\" | \"value\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * Runs inside this part's own transition (`data-pending` on the button), then closes the\n * dialog with `value` as `returnValue`: in library mode through the Root\n * (`openChangeAction(false)` awaited, view transition if set), in JS-free mode with\n * `close(value)`. A rejection reaches the nearest Error Boundary above the Close part and\n * leaves the dialog open. If the dialog was dismissed and opened again while the action ran,\n * the close is dropped: it belonged to the earlier open. With `action` the button is no native\n * close invoker (no `commandfor` / `command`), so a click before hydration does nothing\n * instead of closing the dialog without running the action. Without `action` in JS-free mode\n * the button is a native `command=\"request-close\"` invoker.\n */\n action?: Action<[details: DialogCloseDetails]>;\n /**\n * What a click does while this part's `action` is pending. `\"ignore\"`: nothing (the click is\n * cancelled, `aria-disabled=\"true\"` meanwhile). `\"run\"`: the action runs again (`data-pending`\n * until every run has settled); the dialog closes once, when the last run settles and only if\n * the latest run resolved (a rejection leaves it open, as in `\"ignore\"` mode). No effect\n * without `action`: the part then shows `data-pending` while the Root's close waits, without\n * `aria-disabled`.\n *\n * @defaultValue `\"ignore\"`\n */\n whilePending?: WhilePending;\n /** Becomes `dialog.returnValue` (and `details.returnValue` of `openChangeAction(false)`). */\n value?: string;\n /**\n * Never closes. Native `disabled` on a `<button>`; owned, so a `render` element cannot\n * re-enable it. With a link or component `render` whose click this part handles (library mode,\n * or with `action`), `aria-disabled=\"true\"` instead: the element stays focusable.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, DialogCloseState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, DialogCloseState>;\n /** Content, or a function of the part's state. */\n children?: StateValue<ReactNode, DialogCloseState>;\n /** Replace the default `<button>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"button\">, DialogCloseState>;\n}\n\n/**\n * A close button: `<button type=\"button\" commandfor command=\"request-close\">`, or a plain\n * `<button type=\"button\">` with `action` (it does nothing before hydration). In JS-free mode\n * without `action` the browser closes the dialog (a close request: `cancel`, then `close`), with\n * `value` as the `returnValue`. In library mode the click is always cancelled and the close goes\n * through the Root (`openChangeAction(false)` awaited, then `close(value)` in the commit, inside\n * the view transition if the Popup's `transition` is set). With `action` the action runs first in\n * this part's own transition (`data-pending` and `aria-disabled` on the button; a second click\n * meanwhile is ignored unless `whilePending=\"run\"`); a rejection leaves the dialog open. With or\n * without `action`, the button has `data-pending` until the close it asked for has committed.\n *\n * Owned keys (conventions 1.2): `type` (on a `<button>` only), `disabled`, `commandfor`,\n * `command` (neither rendered with `action`), `value`, `onClick` (library mode, or with `action`), `aria-disabled`, `data-pending`,\n * `data-disabled`.\n *\n * @see https://ui.funstack.work/components/dialog\n */\nexport function DialogClose(props: DialogCloseProps) {\n return useDialogClose(props, { part: \"Dialog.Close\" });\n}\n\nDialogClose.displayName = \"DialogClose\";\n\n/** What a caller of `useDialogClose` sets (design/components/alert-dialog.md 8). */\nexport interface DialogCloseOptions {\n /** Public name of the part (`\"AlertDialog.Cancel\"`). */\n readonly part: `${DialogNamespace}.${string}`;\n /** Extra owned keys (AlertDialog.Cancel's `autoFocus`). */\n readonly ownProps?: ComponentPropsWithRef<\"button\">;\n}\n\n/**\n * The body of `Dialog.Close`, also run by `AlertDialog.Cancel` and `AlertDialog.Action`\n * (alert-dialog.md 8).\n */\nexport function useDialogClose(\n {\n action,\n whilePending,\n value,\n disabled = false,\n className,\n style,\n children,\n render,\n ref,\n ...rest\n }: DialogCloseProps,\n { part, ownProps }: DialogCloseOptions,\n): ReactNode {\n const ctx = useDialogContext(part);\n // A Drawer.Popup's development check that the drawer has a Close (drawer.md 7).\n const registerClose = use(DialogCloseRegistry);\n const reportClose = useCallback(\n (element: HTMLElement | null) => {\n if (element !== null) registerClose?.(element);\n },\n [registerClose],\n );\n // Production passes the consumer's ref through untouched.\n const mergedRef = useMergedRefs<HTMLButtonElement | null>(ref, isDev ? reportClose : undefined);\n const { popupRef, recordCloseIntent } = ctx;\n const isLibrary = ctx.mode === \"library\";\n return useOverlayClose({\n part,\n noun: \"dialog\",\n isLibrary,\n popupId: ctx.ids.popup,\n command: \"request-close\",\n openGeneration: ctx.openGeneration,\n action,\n whilePending,\n details: (event) => createActionDetails(event, { returnValue: value ?? \"\" }),\n close: (event) => {\n const returnValue = value ?? \"\";\n if (isLibrary) {\n // A library-owned close (design 2.3): awaited, then `close(returnValue)` in the commit. A\n // no-op when `false` is already intended (a repeated click, or a dismissal meanwhile).\n ctx.requestClose(event, \"activate\", returnValue);\n return;\n }\n // JS-free mode with `action`: a browser-owned close; there is no Root state to go through.\n const dialog = popupRef.current;\n if (dialog === null || !dialog.open) return;\n recordCloseIntent({ reason: \"activate\", event });\n dialog.close(returnValue);\n },\n ownProps: { value, ...ownProps },\n disabled,\n className,\n style,\n children,\n render,\n rest: { ...rest, ref: mergedRef },\n });\n}\n"],"mappings":";;;;;;;AAgBA,MAAM,QAAQ,QAAQ,IAAI,aAAa;;;;;;;;;;;;;;;;;;AA4FvC,SAAgB,YAAY,OAAyB;CACnD,OAAO,eAAe,OAAO,EAAE,MAAM,eAAe,CAAC;AACvD;AAEA,YAAY,cAAc;;;;;AAc1B,SAAgB,eACd,EACE,QACA,cACA,OACA,WAAW,OACX,WACA,OACA,UACA,QACA,KACA,GAAG,QAEL,EAAE,MAAM,YACG;CACX,MAAM,MAAM,iBAAiB,IAAI;CAEjC,MAAM,gBAAgB,IAAI,mBAAmB;CAC7C,MAAM,cAAc,aACjB,YAAgC;EAC/B,IAAI,YAAY,MAAM,gBAAgB,OAAO;CAC/C,GACA,CAAC,aAAa,CAChB;CAEA,MAAM,YAAY,cAAwC,KAAK,QAAQ,cAAc,KAAA,CAAS;CAC9F,MAAM,EAAE,UAAU,sBAAsB;CACxC,MAAM,YAAY,IAAI,SAAS;CAC/B,OAAO,gBAAgB;EACrB;EACA,MAAM;EACN;EACA,SAAS,IAAI,IAAI;EACjB,SAAS;EACT,gBAAgB,IAAI;EACpB;EACA;EACA,UAAU,UAAU,oBAAoB,OAAO,EAAE,aAAa,SAAS,GAAG,CAAC;EAC3E,QAAQ,UAAU;GAChB,MAAM,cAAc,SAAS;GAC7B,IAAI,WAAW;IAGb,IAAI,aAAa,OAAO,YAAY,WAAW;IAC/C;GACF;GAEA,MAAM,SAAS,SAAS;GACxB,IAAI,WAAW,QAAQ,CAAC,OAAO,MAAM;GACrC,kBAAkB;IAAE,QAAQ;IAAY;GAAM,CAAC;GAC/C,OAAO,MAAM,WAAW;EAC1B;EACA,UAAU;GAAE;GAAO,GAAG;EAAS;EAC/B;EACA;EACA;EACA;EACA;EACA,MAAM;GAAE,GAAG;GAAM,KAAK;EAAU;CAClC,CAAC;AACH"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { createContext, use } from "react";
3
- //#region src/dialog/dialog-context.ts
3
+ // src/dialog/dialog-context.ts
4
4
  const DialogContext = createContext(null);
5
5
  /**
6
6
  * Development only: where a Close part inside a `Drawer.Popup` reports its element, for the
@@ -25,7 +25,6 @@ function useDialogContext(part) {
25
25
  function rootPartOf(part) {
26
26
  return `${part.slice(0, part.indexOf("."))}.Root`;
27
27
  }
28
- //#endregion
29
28
  export { DialogCloseRegistry, DialogContext, rootPartOf, useDialogContext };
30
29
 
31
30
  //# sourceMappingURL=dialog-context.mjs.map
@@ -1,8 +1,7 @@
1
+ import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
1
2
  import { RenderProp, StateValue } from "../internal/types.mjs";
2
3
  import "./dialog-context.mjs";
3
4
  import { DialogPopupState } from "./dialog-popup.mjs";
4
- import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
5
- //#region src/dialog/dialog-description.d.ts
6
5
  /** State of `Dialog.Description`: the Popup's state. */
7
6
  export type DialogDescriptionState = DialogPopupState;
8
7
  /**
@@ -31,5 +30,4 @@ export declare function DialogDescription(props: DialogDescriptionProps): ReactN
31
30
  export declare namespace DialogDescription {
32
31
  var displayName: string;
33
32
  }
34
- //#endregion
35
33
  //# sourceMappingURL=dialog-description.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-description.d.mts","names":[],"sources":["../../src/dialog/dialog-description.tsx"],"mappings":";;;;;;YASY,yBAAyB;;;;;;iBAOpB,+BAA+B,KAC9C;;EAIA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,4BAA4B;;;;;;;;;wBAUlC,kBAAkB,OAAO,yBAAsB;yBAA/C"}
1
+ {"version":3,"file":"dialog-description.d.mts","names":[],"sources":["../../src/dialog/dialog-description.tsx"],"mappings":";;;;;YASY,yBAAyB;;;;;;iBAOpB,+BAA+B,KAC9C;;EAIA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,4BAA4B;;;;;;;;;wBAUlC,kBAAkB,OAAO,yBAAsB;yBAA/C"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { useRender } from "../internal/use-render.mjs";
3
3
  import { useDialogContext } from "./dialog-context.mjs";
4
- //#region src/dialog/dialog-description.tsx
4
+ // src/dialog/dialog-description.tsx
5
5
  /**
6
6
  * The dialog's description: a `<p>` whose id the Popup references with `aria-describedby`.
7
7
  *
@@ -31,7 +31,6 @@ function useDialogDescription({ className, style, children, render, ...rest }, n
31
31
  libraryProps: { id: ctx.ids.description }
32
32
  });
33
33
  }
34
- //#endregion
35
34
  export { DialogDescription, useDialogDescription };
36
35
 
37
36
  //# sourceMappingURL=dialog-description.mjs.map
@@ -1,12 +1,10 @@
1
+ import { afterDispatch } from "../internal/after-dispatch.mjs";
1
2
  import { isPopoverOpen } from "../internal/overlay/popover-open.mjs";
2
- //#region src/dialog/dialog-dismiss.ts
3
- /** The nearest `<dialog>` around a node (the dialog itself counts). */
4
- function closestDialog(target) {
5
- return target instanceof Element ? target.closest("dialog") : null;
6
- }
3
+ // src/dialog/dialog-dismiss.ts
7
4
  /**
8
5
  * An open popover that takes Escape before the dialog: `auto` or `hint` (they have a close
9
- * watcher). A `manual` popover, or `hint` where the engine maps it to `manual`, does not.
6
+ * watcher). A `manual` popover, or `hint` where the engine maps it to `manual`, does not; one
7
+ * that closes on Escape from JS (HoverCard, Tooltip) prevents the `keydown` instead.
10
8
  */
11
9
  function isOpenLightPopover(element) {
12
10
  if (!element.hasAttribute("popover")) return false;
@@ -15,15 +13,19 @@ function isOpenLightPopover(element) {
15
13
  return isPopoverOpen(element);
16
14
  }
17
15
  /**
18
- * Whether Escape belongs to a layer inside `dialog` that sits above it (design 9: "closes the
19
- * innermost one only"): the target is inside an open nested `<dialog>` or popover, or an open
20
- * `auto` / `hint` popover inside the dialog would take the close request (close watchers are
21
- * per document, not per focus).
16
+ * Whether an Escape `keydown` at `dialog` belongs to a layer inside it that sits above it
17
+ * (design 2.6 and 9: "closes the innermost one only"), read from the event path **at the
18
+ * dialog**, where it is complete in any shadow mode: the target is inside an open nested
19
+ * `<dialog>` (that dialog's Escape) or an open `auto` / `hint` popover, or an open `auto` /
20
+ * `hint` popover inside the dialog would take the close request (close watchers are per
21
+ * document, not per focus).
22
22
  */
23
- function escapeBelongsToInnerLayer(dialog, target) {
24
- for (let node = target instanceof Element ? target : null; node !== null && node !== dialog; node = node.parentElement) {
23
+ function escapeBelongsToInnerLayer(dialog, event) {
24
+ const path = event.composedPath();
25
+ const index = path.indexOf(dialog);
26
+ for (const node of path.slice(0, Math.max(index, 0))) {
25
27
  if (node instanceof HTMLDialogElement && node.open) return true;
26
- if (isOpenLightPopover(node)) return true;
28
+ if (node instanceof Element && isOpenLightPopover(node)) return true;
27
29
  }
28
30
  for (const element of dialog.querySelectorAll("[popover]")) if (isOpenLightPopover(element)) return true;
29
31
  return false;
@@ -44,14 +46,41 @@ function onBackdrop(dialog, event) {
44
46
  function listenDialogDismiss(dialog, { modal, lightDismiss }) {
45
47
  const doc = dialog.ownerDocument;
46
48
  const listeners = [];
47
- if (!modal) listeners.push(["keydown", (event) => {
48
- const keyboardEvent = event;
49
- if (keyboardEvent.key !== "Escape" || keyboardEvent.defaultPrevented) return;
50
- if (!dialog.open || closestDialog(keyboardEvent.target) !== dialog) return;
51
- if (escapeBelongsToInnerLayer(dialog, keyboardEvent.target)) return;
52
- keyboardEvent.preventDefault();
49
+ const win = doc.defaultView;
50
+ let pending = null;
51
+ let cancelLate = null;
52
+ const clearPending = () => {
53
+ pending = null;
54
+ win?.removeEventListener("keydown", onWindow);
55
+ cancelLate?.();
56
+ cancelLate = null;
57
+ };
58
+ const settle = (canPrevent) => {
59
+ const record = pending;
60
+ clearPending();
61
+ if (record === null) return;
62
+ const { event, inner } = record;
63
+ if (event.defaultPrevented || inner || !dialog.open || !dialog.isConnected) return;
64
+ if (canPrevent) event.preventDefault();
53
65
  dialog.requestClose();
54
- }]);
66
+ };
67
+ function onWindow(event) {
68
+ if (pending === null || event !== pending.event) return;
69
+ settle(true);
70
+ }
71
+ const record = (event) => {
72
+ const keyboardEvent = event;
73
+ if (keyboardEvent.key !== "Escape" || !dialog.open) return;
74
+ if (pending?.event === keyboardEvent) return;
75
+ clearPending();
76
+ pending = {
77
+ event: keyboardEvent,
78
+ inner: escapeBelongsToInnerLayer(dialog, keyboardEvent)
79
+ };
80
+ win?.addEventListener("keydown", onWindow);
81
+ cancelLate = afterDispatch(keyboardEvent, () => settle(false));
82
+ };
83
+ if (!modal) dialog.addEventListener("keydown", record, true);
55
84
  let pressedOutside = false;
56
85
  const isOutside = (target) => {
57
86
  return !(target instanceof Node) || !dialog.contains(target);
@@ -96,13 +125,14 @@ function listenDialogDismiss(dialog, { modal, lightDismiss }) {
96
125
  for (const [type, listener] of listeners) dialog.addEventListener(type, listener);
97
126
  return () => {
98
127
  for (const [type, listener] of listeners) dialog.removeEventListener(type, listener);
128
+ if (!modal) dialog.removeEventListener("keydown", record, true);
129
+ clearPending();
99
130
  if (outsideAttached) {
100
131
  doc.removeEventListener("pointerdown", onOutsidePointerDown, true);
101
132
  doc.removeEventListener("click", onOutsideClick, true);
102
133
  }
103
134
  };
104
135
  }
105
- //#endregion
106
136
  export { listenDialogDismiss };
107
137
 
108
138
  //# sourceMappingURL=dialog-dismiss.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-dismiss.mjs","names":[],"sources":["../../src/dialog/dialog-dismiss.ts"],"sourcesContent":["// Dialog's JS baseline for what the platform gives only behind `closedby`: Escape on a\n// non-modal dialog and light dismiss (design/components/dialog.md 2.6). No \"use client\"\n// directive: DOM listeners only (conventions 7.1).\nimport { isPopoverOpen } from \"../internal/overlay/popover-open.js\";\n\n/** The nearest `<dialog>` around a node (the dialog itself counts). */\nfunction closestDialog(target: EventTarget | null): Element | null {\n return target instanceof Element ? target.closest(\"dialog\") : null;\n}\n\n/**\n * An open popover that takes Escape before the dialog: `auto` or `hint` (they have a close\n * watcher). A `manual` popover, or `hint` where the engine maps it to `manual`, does not.\n */\nfunction isOpenLightPopover(element: Element): boolean {\n if (!element.hasAttribute(\"popover\")) return false;\n // The IDL attribute reflects the state the engine applies; jsdom has none.\n const reflected: unknown = (element as HTMLElement).popover;\n const state =\n typeof reflected === \"string\" ? reflected : element.getAttribute(\"popover\")!.toLowerCase();\n if (state === \"manual\") return false;\n return isPopoverOpen(element);\n}\n\n/**\n * Whether Escape belongs to a layer inside `dialog` that sits above it (design 9: \"closes the\n * innermost one only\"): the target is inside an open nested `<dialog>` or popover, or an open\n * `auto` / `hint` popover inside the dialog would take the close request (close watchers are\n * per document, not per focus).\n */\nfunction escapeBelongsToInnerLayer(dialog: HTMLDialogElement, target: EventTarget | null): boolean {\n for (\n let node = target instanceof Element ? target : null;\n node !== null && node !== dialog;\n node = node.parentElement\n ) {\n if (node instanceof HTMLDialogElement && node.open) return true;\n if (isOpenLightPopover(node)) return true;\n }\n for (const element of dialog.querySelectorAll(\"[popover]\")) {\n if (isOpenLightPopover(element)) return true;\n }\n return false;\n}\n\n/** Whether a pointer event on the dialog itself lies outside its border box (the `::backdrop`). */\nfunction onBackdrop(dialog: HTMLDialogElement, event: Event): boolean {\n if (event.target !== dialog) return false;\n const { clientX, clientY } = event as MouseEvent;\n const rect = dialog.getBoundingClientRect();\n return !(\n rect.top <= clientY &&\n clientY <= rect.bottom &&\n rect.left <= clientX &&\n clientX <= rect.right\n );\n}\n\nexport interface DialogDismissOptions {\n /** The Root's `modal`. A modal dialog has the platform's close watcher Escape. */\n readonly modal: boolean;\n /** The Popup's `lightDismiss`. */\n readonly lightDismiss: boolean;\n}\n\n/**\n * Installs the JS dismissals of `dialog` and returns their cleanup: Escape for a non-modal\n * dialog, and with `lightDismiss` a click outside (on the backdrop for a modal dialog). Each\n * calls `dialog.requestClose()`, so the close is the browser's, a fact (conventions 3.9.2).\n * Not for a dialog where native `closedby` is in use.\n */\nexport function listenDialogDismiss(\n dialog: HTMLDialogElement,\n { modal, lightDismiss }: DialogDismissOptions,\n): () => void {\n const doc = dialog.ownerDocument;\n const listeners: [string, EventListener][] = [];\n\n if (!modal) {\n // Non-modal dialogs get no close watcher Escape from the platform (design 2.6).\n listeners.push([\n \"keydown\",\n (event) => {\n const keyboardEvent = event as KeyboardEvent;\n if (keyboardEvent.key !== \"Escape\" || keyboardEvent.defaultPrevented) return;\n if (!dialog.open || closestDialog(keyboardEvent.target) !== dialog) return;\n // A popover or nested dialog inside takes this Escape (its close watcher); leave the\n // event alone so that it can.\n if (escapeBelongsToInnerLayer(dialog, keyboardEvent.target)) return;\n keyboardEvent.preventDefault();\n dialog.requestClose();\n },\n ]);\n }\n\n // Light dismiss needs both the press and the click outside, like native `closedby=\"any\"`: a\n // drag that starts inside (selecting text in an input) and ends on the backdrop or outside\n // fires `click` on the common ancestor and must not close (it would lose a half-filled form).\n let pressedOutside = false;\n\n const isOutside = (target: EventTarget | null): boolean => {\n // The Trigger counts as outside, as native `closedby=\"any\"` treats it.\n return !(target instanceof Node) || !dialog.contains(target);\n };\n let outsideAttached = false;\n const onOutsidePointerDown = (event: Event) => {\n pressedOutside = dialog.open && isOutside(event.target);\n };\n const onOutsideClick = (event: Event) => {\n const pressed = pressedOutside;\n pressedOutside = false;\n if (!dialog.open || !pressed || !isOutside(event.target)) return;\n dialog.requestClose();\n };\n const syncOutside = () => {\n const want = dialog.open;\n if (want === outsideAttached) return;\n outsideAttached = want;\n pressedOutside = false;\n if (want) {\n doc.addEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.addEventListener(\"click\", onOutsideClick, true);\n } else {\n doc.removeEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.removeEventListener(\"click\", onOutsideClick, true);\n }\n };\n\n if (lightDismiss) {\n if (modal) {\n // A press or click on the ::backdrop targets the dialog itself, outside its border box.\n listeners.push(\n [\n \"pointerdown\",\n (event) => {\n pressedOutside = dialog.open && onBackdrop(dialog, event);\n },\n ],\n [\n \"click\",\n (event) => {\n const pressed = pressedOutside;\n pressedOutside = false;\n if (!dialog.open || !pressed || !onBackdrop(dialog, event)) return;\n dialog.requestClose();\n },\n ],\n );\n } else {\n // A document listener only while open, following the native `toggle` (the React\n // `onToggle` prop never fires on a hydrated <dialog>); reads `dialog.open`, not\n // `newState` (coalescing).\n listeners.push([\"toggle\", syncOutside]);\n syncOutside();\n }\n }\n\n for (const [type, listener] of listeners) dialog.addEventListener(type, listener);\n return () => {\n for (const [type, listener] of listeners) dialog.removeEventListener(type, listener);\n if (outsideAttached) {\n doc.removeEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.removeEventListener(\"click\", onOutsideClick, true);\n }\n };\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"dialog-dismiss.mjs","names":[],"sources":["../../src/dialog/dialog-dismiss.ts"],"sourcesContent":["// Dialog's JS baseline for what the platform gives only behind `closedby`: Escape on a\n// non-modal dialog and light dismiss (design/components/dialog.md 2.6). No \"use client\"\n// directive: DOM listeners only (conventions 7.1).\nimport { afterDispatch } from \"../internal/after-dispatch.js\";\nimport { isPopoverOpen } from \"../internal/overlay/popover-open.js\";\n\n/**\n * An open popover that takes Escape before the dialog: `auto` or `hint` (they have a close\n * watcher). A `manual` popover, or `hint` where the engine maps it to `manual`, does not; one\n * that closes on Escape from JS (HoverCard, Tooltip) prevents the `keydown` instead.\n */\nfunction isOpenLightPopover(element: Element): boolean {\n if (!element.hasAttribute(\"popover\")) return false;\n // The IDL attribute reflects the state the engine applies; jsdom has none.\n const reflected: unknown = (element as HTMLElement).popover;\n const state =\n typeof reflected === \"string\" ? reflected : element.getAttribute(\"popover\")!.toLowerCase();\n if (state === \"manual\") return false;\n return isPopoverOpen(element);\n}\n\n/**\n * Whether an Escape `keydown` at `dialog` belongs to a layer inside it that sits above it\n * (design 2.6 and 9: \"closes the innermost one only\"), read from the event path **at the\n * dialog**, where it is complete in any shadow mode: the target is inside an open nested\n * `<dialog>` (that dialog's Escape) or an open `auto` / `hint` popover, or an open `auto` /\n * `hint` popover inside the dialog would take the close request (close watchers are per\n * document, not per focus).\n */\nfunction escapeBelongsToInnerLayer(dialog: HTMLDialogElement, event: Event): boolean {\n const path = event.composedPath();\n const index = path.indexOf(dialog);\n for (const node of path.slice(0, Math.max(index, 0))) {\n if (node instanceof HTMLDialogElement && node.open) return true;\n if (node instanceof Element && isOpenLightPopover(node)) return true;\n }\n for (const element of dialog.querySelectorAll(\"[popover]\")) {\n if (isOpenLightPopover(element)) return true;\n }\n return false;\n}\n\n/** Whether a pointer event on the dialog itself lies outside its border box (the `::backdrop`). */\nfunction onBackdrop(dialog: HTMLDialogElement, event: Event): boolean {\n if (event.target !== dialog) return false;\n const { clientX, clientY } = event as MouseEvent;\n const rect = dialog.getBoundingClientRect();\n return !(\n rect.top <= clientY &&\n clientY <= rect.bottom &&\n rect.left <= clientX &&\n clientX <= rect.right\n );\n}\n\nexport interface DialogDismissOptions {\n /** The Root's `modal`. A modal dialog has the platform's close watcher Escape. */\n readonly modal: boolean;\n /** The Popup's `lightDismiss`. */\n readonly lightDismiss: boolean;\n}\n\n/**\n * Installs the JS dismissals of `dialog` and returns their cleanup: Escape for a non-modal\n * dialog, and with `lightDismiss` a click outside (on the backdrop for a modal dialog). Each\n * calls `dialog.requestClose()`, so the close is the browser's, a fact (conventions 3.9.2).\n * Not for a dialog where native `closedby` is in use.\n */\nexport function listenDialogDismiss(\n dialog: HTMLDialogElement,\n { modal, lightDismiss }: DialogDismissOptions,\n): () => void {\n const doc = dialog.ownerDocument;\n const listeners: [string, EventListener][] = [];\n\n // Non-modal dialogs get no close watcher Escape from the platform (design 2.6). Record at the\n // dialog, decide last (#177): a capture listener on the dialog records the Escape and the\n // inner-layer snapshot (the path is complete there in any shadow mode, and no close watcher\n // has closed a layer yet). The decision runs in a window bubble listener added for that event\n // only, after every element and document listener, so an inner layer that closed on Escape\n // from JS (a `manual` HoverCard or Tooltip) has prevented it by then: a prevented `keydown` is\n // no close request, as for a modal dialog's close watcher. `stopPropagation()` does not keep\n // the dialog open: when the event never reaches the window, the late path (`afterDispatch`)\n // decides instead, without preventing (the dispatch is over). The first of the two wins.\n const win = doc.defaultView;\n let pending: { readonly event: KeyboardEvent; readonly inner: boolean } | null = null;\n let cancelLate: (() => void) | null = null;\n const clearPending = () => {\n pending = null;\n win?.removeEventListener(\"keydown\", onWindow);\n cancelLate?.();\n cancelLate = null;\n };\n const settle = (canPrevent: boolean) => {\n const record = pending;\n clearPending();\n if (record === null) return;\n const { event, inner } = record;\n if (event.defaultPrevented || inner || !dialog.open || !dialog.isConnected) return;\n if (canPrevent) event.preventDefault();\n dialog.requestClose();\n };\n function onWindow(event: Event): void {\n if (pending === null || event !== pending.event) return;\n settle(true);\n }\n const record = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n if (keyboardEvent.key !== \"Escape\" || !dialog.open) return;\n if (pending?.event === keyboardEvent) return;\n // A new Escape while one is pending: the old event's dispatch is over; replace it.\n clearPending();\n pending = { event: keyboardEvent, inner: escapeBelongsToInnerLayer(dialog, keyboardEvent) };\n win?.addEventListener(\"keydown\", onWindow);\n cancelLate = afterDispatch(keyboardEvent, () => settle(false));\n };\n if (!modal) dialog.addEventListener(\"keydown\", record, true);\n\n // Light dismiss needs both the press and the click outside, like native `closedby=\"any\"`: a\n // drag that starts inside (selecting text in an input) and ends on the backdrop or outside\n // fires `click` on the common ancestor and must not close (it would lose a half-filled form).\n let pressedOutside = false;\n\n const isOutside = (target: EventTarget | null): boolean => {\n // The Trigger counts as outside, as native `closedby=\"any\"` treats it.\n return !(target instanceof Node) || !dialog.contains(target);\n };\n let outsideAttached = false;\n const onOutsidePointerDown = (event: Event) => {\n pressedOutside = dialog.open && isOutside(event.target);\n };\n const onOutsideClick = (event: Event) => {\n const pressed = pressedOutside;\n pressedOutside = false;\n if (!dialog.open || !pressed || !isOutside(event.target)) return;\n dialog.requestClose();\n };\n const syncOutside = () => {\n const want = dialog.open;\n if (want === outsideAttached) return;\n outsideAttached = want;\n pressedOutside = false;\n if (want) {\n doc.addEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.addEventListener(\"click\", onOutsideClick, true);\n } else {\n doc.removeEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.removeEventListener(\"click\", onOutsideClick, true);\n }\n };\n\n if (lightDismiss) {\n if (modal) {\n // A press or click on the ::backdrop targets the dialog itself, outside its border box.\n listeners.push(\n [\n \"pointerdown\",\n (event) => {\n pressedOutside = dialog.open && onBackdrop(dialog, event);\n },\n ],\n [\n \"click\",\n (event) => {\n const pressed = pressedOutside;\n pressedOutside = false;\n if (!dialog.open || !pressed || !onBackdrop(dialog, event)) return;\n dialog.requestClose();\n },\n ],\n );\n } else {\n // A document listener only while open, following the native `toggle` (the React\n // `onToggle` prop never fires on a hydrated <dialog>); reads `dialog.open`, not\n // `newState` (coalescing).\n listeners.push([\"toggle\", syncOutside]);\n syncOutside();\n }\n }\n\n for (const [type, listener] of listeners) dialog.addEventListener(type, listener);\n return () => {\n for (const [type, listener] of listeners) dialog.removeEventListener(type, listener);\n if (!modal) dialog.removeEventListener(\"keydown\", record, true);\n clearPending();\n if (outsideAttached) {\n doc.removeEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.removeEventListener(\"click\", onOutsideClick, true);\n }\n };\n}\n"],"mappings":"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"}
@@ -1,7 +1,6 @@
1
+ import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
1
2
  import { RenderProp, StateValue } from "../internal/types.mjs";
2
3
  import "./dialog-context.mjs";
3
- import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
4
- //#region src/dialog/dialog-form.d.ts
5
4
  /**
6
5
  * State of `Dialog.Form`, passed to the function forms of `className`, `style`, `children` and
7
6
  * `render`.
@@ -86,5 +85,4 @@ export declare function DialogForm(props: DialogFormProps): ReactNode;
86
85
  export declare namespace DialogForm {
87
86
  var displayName: string;
88
87
  }
89
- //#endregion
90
88
  //# sourceMappingURL=dialog-form.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-form.d.mts","names":[],"sources":["../../src/dialog/dialog-form.tsx"],"mappings":";;;;;;;;iBAkBiB;;WAEN;;;;;;;iBAQM,wBAAwB,KACvC;;;;;;;;;;;;;EAeA,oBAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;EAqB9B;;;;;EAKA,SAAS;;EAET,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,+BAA+B;;;;;;;;;;;;;;;;;;;;wBAqBrC,WAAW,OAAO,kBAAe;yBAAjC"}
1
+ {"version":3,"file":"dialog-form.d.mts","names":[],"sources":["../../src/dialog/dialog-form.tsx"],"mappings":";;;;;;;iBAkBiB;;WAEN;;;;;;;iBAQM,wBAAwB,KACvC;;;;;;;;;;;;;EAeA,oBAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;EAqB9B;;;;;EAKA,SAAS;;EAET,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,+BAA+B;;;;;;;;;;;;;;;;;;;;wBAqBrC,WAAW,OAAO,kBAAe;yBAAjC"}
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { useDevWarning } from "../internal/use-dev-warning.mjs";
3
- import { resolveStateValue } from "../internal/render-element.mjs";
4
- import { useRender } from "../internal/use-render.mjs";
2
+ import { use, useCallback, useRef, useState } from "react";
5
3
  import { FormContext } from "../internal/form/field-context.mjs";
6
- import { useDialogContext } from "./dialog-context.mjs";
4
+ import { resolveStateValue } from "../internal/render-element.mjs";
7
5
  import { FormStatusWatcher } from "../internal/form/form-status-watcher.mjs";
6
+ import { useDevWarning } from "../internal/use-dev-warning.mjs";
7
+ import { useRender } from "../internal/use-render.mjs";
8
8
  import { hasAnyError } from "../internal/form/validity.mjs";
9
- import { use, useCallback, useRef, useState } from "react";
9
+ import { useDialogContext } from "./dialog-context.mjs";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
- //#region src/dialog/dialog-form.tsx
11
+ // src/dialog/dialog-form.tsx
12
12
  const isDev = process.env.NODE_ENV !== "production";
13
13
  /**
14
14
  * A form that completes the dialog. Without `action`: `<form method="dialog">`, so a submit
@@ -129,7 +129,6 @@ function DialogFormSettle({ namespace, watches, missingAction, onPendingChange,
129
129
  onSettled: settled
130
130
  });
131
131
  }
132
- //#endregion
133
132
  export { DialogForm, useDialogForm };
134
133
 
135
134
  //# sourceMappingURL=dialog-form.mjs.map
@@ -1,8 +1,7 @@
1
+ import { CSSProperties, ComponentPropsWithRef, ReactNode, RefObject, ViewTransitionClass } from "react";
1
2
  import { RenderProp, StateValue } from "../internal/types.mjs";
2
- import "./dialog-context.mjs";
3
3
  import "../internal/use-render.mjs";
4
- import { CSSProperties, ComponentPropsWithRef, ReactNode, RefObject, ViewTransitionClass } from "react";
5
- //#region src/dialog/dialog-popup.d.ts
4
+ import "./dialog-context.mjs";
6
5
  /**
7
6
  * State of `Dialog.Popup`, passed to the function forms of `className`, `style`, `children` and
8
7
  * `render`.
@@ -111,5 +110,4 @@ export declare function DialogPopup(props: DialogPopupProps): ReactNode;
111
110
  export declare namespace DialogPopup {
112
111
  var displayName: string;
113
112
  }
114
- //#endregion
115
113
  //# sourceMappingURL=dialog-popup.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-popup.d.mts","names":[],"sources":["../../src/dialog/dialog-popup.tsx"],"mappings":";;;;;;;;;iBAwCiB;;WAEN;;WAEA;;;;;;;iBAQM,yBAAyB,KACxC;;;;;;;;;;;;;EAeA;;;;;;;;;;;EAWA,eAAe,UAAU;;;;;;;;;;EAUzB;;;;;;;;EAQA;;;;;;;;;;;;;;;;EAgBA,aAAa;;EAEb,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;wBAkCvC,YAAY,OAAO,mBAAgB;yBAAnC"}
1
+ {"version":3,"file":"dialog-popup.d.mts","names":[],"sources":["../../src/dialog/dialog-popup.tsx"],"mappings":";;;;;;;;iBAwCiB;;WAEN;;WAEA;;;;;;;iBAQM,yBAAyB,KACxC;;;;;;;;;;;;;EAeA;;;;;;;;;;;EAWA,eAAe,UAAU;;;;;;;;;;EAUzB;;;;;;;;EAQA;;;;;;;;;;;;;;;;EAgBA,aAAa;;EAEb,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;wBAkCvC,YAAY,OAAO,mBAAgB;yBAAnC"}
@@ -1,22 +1,22 @@
1
1
  "use client";
2
- import { dataAttr } from "../internal/data-attr.mjs";
3
- import { useTransitionBoundary } from "../internal/transition-boundary.mjs";
4
- import { resolveStateValue } from "../internal/render-element.mjs";
5
- import { useRender } from "../internal/use-render.mjs";
6
- import { useLatest } from "../internal/use-latest.mjs";
7
- import { useElementCheck } from "../internal/use-element-check.mjs";
8
- import { eventSource } from "../internal/overlay/invokers.mjs";
2
+ import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
9
3
  import { useContentFocusProbe } from "../internal/overlay/content-focus-probe.mjs";
10
4
  import { withCssTransitionCut } from "../internal/overlay/css-transition-cut.mjs";
5
+ import { resolveStateValue } from "../internal/render-element.mjs";
11
6
  import { commandOf, renderOverlayContent, resolveInitialFocus, returnFocusToTrigger, useCloseHold, useInitialFocusTarget, useJsFreePropWarnings } from "../internal/overlay/overlay-popup.mjs";
12
7
  import { createPopupFlags, showWithFocus } from "../internal/overlay/overlay-show.mjs";
13
8
  import { useApplyOpenState } from "../internal/overlay/use-apply-open-state.mjs";
9
+ import { eventSource } from "../internal/overlay/invokers.mjs";
10
+ import { useTransitionBoundary } from "../internal/transition-boundary.mjs";
11
+ import { dataAttr } from "../internal/data-attr.mjs";
12
+ import { useElementCheck } from "../internal/use-element-check.mjs";
13
+ import { useLatest } from "../internal/use-latest.mjs";
14
+ import { useModalRegistration } from "../internal/overlay/use-modal-registration.mjs";
14
15
  import { useShownNameWarning } from "../internal/use-name-warning.mjs";
16
+ import { useRender } from "../internal/use-render.mjs";
15
17
  import { useDialogContext } from "./dialog-context.mjs";
16
- import { useModalRegistration } from "../internal/overlay/use-modal-registration.mjs";
17
18
  import { listenDialogDismiss } from "./dialog-dismiss.mjs";
18
- import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
19
- //#region src/dialog/dialog-popup.tsx
19
+ // src/dialog/dialog-popup.tsx
20
20
  const isDev = process.env.NODE_ENV !== "production";
21
21
  /** The submitter's or invoker's `value` (`""` without one, or where the engine gives no source). */
22
22
  function valueOf(element) {
@@ -304,7 +304,6 @@ function useDialogPopup({ keepMounted, initialFocus, lightDismiss = false, exper
304
304
  });
305
305
  return useTransitionBoundary(part, isLibrary ? transition : void 0, element);
306
306
  }
307
- //#endregion
308
307
  export { DialogPopup, useDialogPopup };
309
308
 
310
309
  //# sourceMappingURL=dialog-popup.mjs.map
@@ -1,7 +1,6 @@
1
+ import { ReactNode } from "react";
1
2
  import { ActionDetails, ChangeAction, ChangeReason, StateValue, UrgentChangeHandler } from "../internal/types.mjs";
2
3
  import "./dialog-context.mjs";
3
- import { ReactNode } from "react";
4
- //#region src/dialog/dialog-root.d.ts
5
4
  /** Details passed as the second argument of `openChangeAction` and `onOpenChange`. */
6
5
  export interface DialogOpenChangeDetails extends ActionDetails {
7
6
  /**
@@ -101,5 +100,4 @@ export declare function DialogRoot({ modal, ...props }: DialogRootProps): ReactN
101
100
  export declare namespace DialogRoot {
102
101
  var displayName: string;
103
102
  }
104
- //#endregion
105
103
  //# sourceMappingURL=dialog-root.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-root.d.mts","names":[],"sources":["../../src/dialog/dialog-root.tsx"],"mappings":";;;;;iBAkBiB,gCAAgC;;;;;;;;WAQtC,QAAQ;;;;;;WAMR;;;iBAIM;;WAEN;;WAEA;;WAEA;;;;;;;iBAQM;;;;;;EAMf;;;;;EAKA;;;;;;;;;;;;;EAaA,mBAAmB,sBAAsB;;;;;;;;;;;;;;;EAezC,eAAe,6BAA6B;;;;;;EAM5C;;EAEA,WAAW,WAAW,WAAW;;;;;;;;;;;;;;;;;wBA0BnB,aAAa,UAAiB,SAAS,kBAAe;yBAAtD"}
1
+ {"version":3,"file":"dialog-root.d.mts","names":[],"sources":["../../src/dialog/dialog-root.tsx"],"mappings":";;;;iBAkBiB,gCAAgC;;;;;;;;WAQtC,QAAQ;;;;;;WAMR;;;iBAIM;;WAEN;;WAEA;;WAEA;;;;;;;iBAQM;;;;;;EAMf;;;;;EAKA;;;;;;;;;;;;;EAaA,mBAAmB,sBAAsB;;;;;;;;;;;;;;;EAezC,eAAe,6BAA6B;;;;;;EAM5C;;EAEA,WAAW,WAAW,WAAW;;;;;;;;;;;;;;;;;wBA0BnB,aAAa,UAAiB,SAAS,kBAAe;yBAAtD"}