@qualcomm-ui/react-core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/LICENSE.txt +31 -0
  2. package/dist/accordion/accordion-context.d.ts +5 -0
  3. package/dist/accordion/accordion-context.d.ts.map +1 -0
  4. package/dist/accordion/index.d.ts +3 -0
  5. package/dist/accordion/index.d.ts.map +1 -0
  6. package/dist/accordion/index.js +2 -0
  7. package/dist/accordion/index.js.map +7 -0
  8. package/dist/accordion/use-accordion.d.ts +10 -0
  9. package/dist/accordion/use-accordion.d.ts.map +1 -0
  10. package/dist/avatar/avatar-context.d.ts +3 -0
  11. package/dist/avatar/avatar-context.d.ts.map +1 -0
  12. package/dist/avatar/index.d.ts +3 -0
  13. package/dist/avatar/index.d.ts.map +1 -0
  14. package/dist/avatar/index.js +2 -0
  15. package/dist/avatar/index.js.map +7 -0
  16. package/dist/avatar/use-avatar.d.ts +7 -0
  17. package/dist/avatar/use-avatar.d.ts.map +1 -0
  18. package/dist/checkbox/checkbox-context.d.ts +5 -0
  19. package/dist/checkbox/checkbox-context.d.ts.map +1 -0
  20. package/dist/checkbox/index.d.ts +3 -0
  21. package/dist/checkbox/index.d.ts.map +1 -0
  22. package/dist/checkbox/index.js +2 -0
  23. package/dist/checkbox/index.js.map +7 -0
  24. package/dist/checkbox/use-checkbox.d.ts +13 -0
  25. package/dist/checkbox/use-checkbox.d.ts.map +1 -0
  26. package/dist/classes/index.d.ts +2 -0
  27. package/dist/classes/index.d.ts.map +1 -0
  28. package/dist/classes/index.js +2 -0
  29. package/dist/classes/index.js.map +7 -0
  30. package/dist/classes/state-classes.d.ts +4 -0
  31. package/dist/classes/state-classes.d.ts.map +1 -0
  32. package/dist/collapsible/collapsible-context.d.ts +3 -0
  33. package/dist/collapsible/collapsible-context.d.ts.map +1 -0
  34. package/dist/collapsible/core-collapsible.d.ts +43 -0
  35. package/dist/collapsible/core-collapsible.d.ts.map +1 -0
  36. package/dist/collapsible/index.d.ts +12 -0
  37. package/dist/collapsible/index.d.ts.map +1 -0
  38. package/dist/collapsible/index.js +2 -0
  39. package/dist/collapsible/index.js.map +7 -0
  40. package/dist/collection/index.d.ts +3 -0
  41. package/dist/collection/index.d.ts.map +1 -0
  42. package/dist/collection/index.js +2 -0
  43. package/dist/collection/index.js.map +7 -0
  44. package/dist/collection/use-async-list-collection.d.ts +38 -0
  45. package/dist/collection/use-async-list-collection.d.ts.map +1 -0
  46. package/dist/collection/use-list-collection.d.ts +88 -0
  47. package/dist/collection/use-list-collection.d.ts.map +1 -0
  48. package/dist/combobox/combobox-context.d.ts +3 -0
  49. package/dist/combobox/combobox-context.d.ts.map +1 -0
  50. package/dist/combobox/combobox-item-context.d.ts +3 -0
  51. package/dist/combobox/combobox-item-context.d.ts.map +1 -0
  52. package/dist/combobox/combobox-item-group-context.d.ts +3 -0
  53. package/dist/combobox/combobox-item-group-context.d.ts.map +1 -0
  54. package/dist/combobox/core-combobox.d.ts +62 -0
  55. package/dist/combobox/core-combobox.d.ts.map +1 -0
  56. package/dist/combobox/index.d.ts +26 -0
  57. package/dist/combobox/index.d.ts.map +1 -0
  58. package/dist/combobox/index.js +2 -0
  59. package/dist/combobox/index.js.map +7 -0
  60. package/dist/context/create-guarded-context.d.ts +19 -0
  61. package/dist/context/create-guarded-context.d.ts.map +1 -0
  62. package/dist/context/index.d.ts +3 -0
  63. package/dist/context/index.d.ts.map +1 -0
  64. package/dist/context/index.js +2 -0
  65. package/dist/context/index.js.map +7 -0
  66. package/dist/context/use-context-id.d.ts +29 -0
  67. package/dist/context/use-context-id.d.ts.map +1 -0
  68. package/dist/descendants/index.d.ts +2 -0
  69. package/dist/descendants/index.d.ts.map +1 -0
  70. package/dist/descendants/index.js +2 -0
  71. package/dist/descendants/index.js.map +7 -0
  72. package/dist/descendants/use-descendants.d.ts +10 -0
  73. package/dist/descendants/use-descendants.d.ts.map +1 -0
  74. package/dist/dialog/core-dialog.d.ts +81 -0
  75. package/dist/dialog/core-dialog.d.ts.map +1 -0
  76. package/dist/dialog/dialog-context.d.ts +3 -0
  77. package/dist/dialog/dialog-context.d.ts.map +1 -0
  78. package/dist/dialog/index.d.ts +17 -0
  79. package/dist/dialog/index.d.ts.map +1 -0
  80. package/dist/dialog/index.js +2 -0
  81. package/dist/dialog/index.js.map +7 -0
  82. package/dist/dom/get-valid-children.d.ts +9 -0
  83. package/dist/dom/get-valid-children.d.ts.map +1 -0
  84. package/dist/dom/index.d.ts +10 -0
  85. package/dist/dom/index.d.ts.map +1 -0
  86. package/dist/dom/index.js +2 -0
  87. package/dist/dom/index.js.map +7 -0
  88. package/dist/dom/is-action-element.d.ts +2 -0
  89. package/dist/dom/is-action-element.d.ts.map +1 -0
  90. package/dist/dom/use-clickable.d.ts +52 -0
  91. package/dist/dom/use-clickable.d.ts.map +1 -0
  92. package/dist/dom/use-event-listeners.d.ts +9 -0
  93. package/dist/dom/use-event-listeners.d.ts.map +1 -0
  94. package/dist/dom/use-grouped-children.d.ts +21 -0
  95. package/dist/dom/use-grouped-children.d.ts.map +1 -0
  96. package/dist/dom/use-intersection-observer.d.ts +72 -0
  97. package/dist/dom/use-intersection-observer.d.ts.map +1 -0
  98. package/dist/dom/use-mutation-observer.d.ts +12 -0
  99. package/dist/dom/use-mutation-observer.d.ts.map +1 -0
  100. package/dist/dom/use-real-shape.d.ts +9 -0
  101. package/dist/dom/use-real-shape.d.ts.map +1 -0
  102. package/dist/dom/use-sizes.d.ts +20 -0
  103. package/dist/dom/use-sizes.d.ts.map +1 -0
  104. package/dist/effects/index.d.ts +8 -0
  105. package/dist/effects/index.d.ts.map +1 -0
  106. package/dist/effects/index.js +2 -0
  107. package/dist/effects/index.js.map +7 -0
  108. package/dist/effects/use-debounce.d.ts +8 -0
  109. package/dist/effects/use-debounce.d.ts.map +1 -0
  110. package/dist/effects/use-effect-once.d.ts +2 -0
  111. package/dist/effects/use-effect-once.d.ts.map +1 -0
  112. package/dist/effects/use-enhanced-effect.d.ts +6 -0
  113. package/dist/effects/use-enhanced-effect.d.ts.map +1 -0
  114. package/dist/effects/use-event-callback.d.ts +8 -0
  115. package/dist/effects/use-event-callback.d.ts.map +1 -0
  116. package/dist/effects/use-on-destroy-when.d.ts +14 -0
  117. package/dist/effects/use-on-destroy-when.d.ts.map +1 -0
  118. package/dist/effects/use-on-destroy.d.ts +12 -0
  119. package/dist/effects/use-on-destroy.d.ts.map +1 -0
  120. package/dist/effects/use-safe-layout-effect.d.ts +3 -0
  121. package/dist/effects/use-safe-layout-effect.d.ts.map +1 -0
  122. package/dist/events/index.d.ts +2 -0
  123. package/dist/events/index.d.ts.map +1 -0
  124. package/dist/events/index.js +2 -0
  125. package/dist/events/index.js.map +7 -0
  126. package/dist/events/use-event.d.ts +12 -0
  127. package/dist/events/use-event.d.ts.map +1 -0
  128. package/dist/field/field-context.d.ts +5 -0
  129. package/dist/field/field-context.d.ts.map +1 -0
  130. package/dist/field/fieldset-context.d.ts +10 -0
  131. package/dist/field/fieldset-context.d.ts.map +1 -0
  132. package/dist/field/index.d.ts +5 -0
  133. package/dist/field/index.d.ts.map +1 -0
  134. package/dist/field/index.js +2 -0
  135. package/dist/field/index.js.map +7 -0
  136. package/dist/field/use-field.d.ts +9 -0
  137. package/dist/field/use-field.d.ts.map +1 -0
  138. package/dist/field/use-fieldset.d.ts +4 -0
  139. package/dist/field/use-fieldset.d.ts.map +1 -0
  140. package/dist/highlight/highlight-text.d.ts +6 -0
  141. package/dist/highlight/highlight-text.d.ts.map +1 -0
  142. package/dist/highlight/index.d.ts +3 -0
  143. package/dist/highlight/index.d.ts.map +1 -0
  144. package/dist/highlight/index.js +2 -0
  145. package/dist/highlight/index.js.map +7 -0
  146. package/dist/highlight/use-highlight.d.ts +6 -0
  147. package/dist/highlight/use-highlight.d.ts.map +1 -0
  148. package/dist/inline-notification/core-inline-notification.d.ts +25 -0
  149. package/dist/inline-notification/core-inline-notification.d.ts.map +1 -0
  150. package/dist/inline-notification/index.d.ts +11 -0
  151. package/dist/inline-notification/index.d.ts.map +1 -0
  152. package/dist/inline-notification/index.js +2 -0
  153. package/dist/inline-notification/index.js.map +7 -0
  154. package/dist/inline-notification/inline-notification-context.d.ts +3 -0
  155. package/dist/inline-notification/inline-notification-context.d.ts.map +1 -0
  156. package/dist/inline-notification/use-inline-notification.d.ts +4 -0
  157. package/dist/inline-notification/use-inline-notification.d.ts.map +1 -0
  158. package/dist/locale/index.d.ts +3 -0
  159. package/dist/locale/index.d.ts.map +1 -0
  160. package/dist/locale/index.js +2 -0
  161. package/dist/locale/index.js.map +7 -0
  162. package/dist/locale/locale-context.d.ts +3 -0
  163. package/dist/locale/locale-context.d.ts.map +1 -0
  164. package/dist/locale/use-filter.d.ts +7 -0
  165. package/dist/locale/use-filter.d.ts.map +1 -0
  166. package/dist/lorem-ipsum/index.d.ts +2 -0
  167. package/dist/lorem-ipsum/index.d.ts.map +1 -0
  168. package/dist/lorem-ipsum/index.js +2 -0
  169. package/dist/lorem-ipsum/index.js.map +7 -0
  170. package/dist/lorem-ipsum/lorem-ipsum.d.ts +10 -0
  171. package/dist/lorem-ipsum/lorem-ipsum.d.ts.map +1 -0
  172. package/dist/lucide/icon.types.d.ts +15 -0
  173. package/dist/lucide/icon.types.d.ts.map +1 -0
  174. package/dist/lucide/index.d.ts +2 -0
  175. package/dist/lucide/index.d.ts.map +1 -0
  176. package/dist/lucide/index.js +1 -0
  177. package/dist/lucide/index.js.map +7 -0
  178. package/dist/machine/index.d.ts +9 -0
  179. package/dist/machine/index.d.ts.map +1 -0
  180. package/dist/machine/index.js +2 -0
  181. package/dist/machine/index.js.map +7 -0
  182. package/dist/machine/normalize-props.d.ts +2 -0
  183. package/dist/machine/normalize-props.d.ts.map +1 -0
  184. package/dist/machine/use-bindable-id-collection.d.ts +3 -0
  185. package/dist/machine/use-bindable-id-collection.d.ts.map +1 -0
  186. package/dist/machine/use-bindable-id.d.ts +3 -0
  187. package/dist/machine/use-bindable-id.d.ts.map +1 -0
  188. package/dist/machine/use-bindable.d.ts +3 -0
  189. package/dist/machine/use-bindable.d.ts.map +1 -0
  190. package/dist/machine/use-machine.d.ts +11 -0
  191. package/dist/machine/use-machine.d.ts.map +1 -0
  192. package/dist/machine/use-optional-content-id.d.ts +11 -0
  193. package/dist/machine/use-optional-content-id.d.ts.map +1 -0
  194. package/dist/machine/use-prop.d.ts +15 -0
  195. package/dist/machine/use-prop.d.ts.map +1 -0
  196. package/dist/machine/use-track.d.ts +2 -0
  197. package/dist/machine/use-track.d.ts.map +1 -0
  198. package/dist/menu/index.d.ts +8 -0
  199. package/dist/menu/index.d.ts.map +1 -0
  200. package/dist/menu/index.js +2 -0
  201. package/dist/menu/index.js.map +7 -0
  202. package/dist/menu/menu-context.d.ts +16 -0
  203. package/dist/menu/menu-context.d.ts.map +1 -0
  204. package/dist/menu/menu-item-context.d.ts +4 -0
  205. package/dist/menu/menu-item-context.d.ts.map +1 -0
  206. package/dist/menu/menu-item-group-context.d.ts +4 -0
  207. package/dist/menu/menu-item-group-context.d.ts.map +1 -0
  208. package/dist/menu/menu-machine-context.d.ts +4 -0
  209. package/dist/menu/menu-machine-context.d.ts.map +1 -0
  210. package/dist/menu/menu-trigger-context.d.ts +3 -0
  211. package/dist/menu/menu-trigger-context.d.ts.map +1 -0
  212. package/dist/menu/use-menu-item.d.ts +38 -0
  213. package/dist/menu/use-menu-item.d.ts.map +1 -0
  214. package/dist/menu/use-menu.d.ts +22 -0
  215. package/dist/menu/use-menu.d.ts.map +1 -0
  216. package/dist/number-input/core-number-input.d.ts +57 -0
  217. package/dist/number-input/core-number-input.d.ts.map +1 -0
  218. package/dist/number-input/index.d.ts +16 -0
  219. package/dist/number-input/index.d.ts.map +1 -0
  220. package/dist/number-input/index.js +2 -0
  221. package/dist/number-input/index.js.map +7 -0
  222. package/dist/number-input/number-input-context.d.ts +3 -0
  223. package/dist/number-input/number-input-context.d.ts.map +1 -0
  224. package/dist/pagination/index.d.ts +3 -0
  225. package/dist/pagination/index.d.ts.map +1 -0
  226. package/dist/pagination/index.js +2 -0
  227. package/dist/pagination/index.js.map +7 -0
  228. package/dist/pagination/pagination-context.d.ts +3 -0
  229. package/dist/pagination/pagination-context.d.ts.map +1 -0
  230. package/dist/pagination/use-pagination.d.ts +25 -0
  231. package/dist/pagination/use-pagination.d.ts.map +1 -0
  232. package/dist/password-input/index.d.ts +3 -0
  233. package/dist/password-input/index.d.ts.map +1 -0
  234. package/dist/password-input/index.js +2 -0
  235. package/dist/password-input/index.js.map +7 -0
  236. package/dist/password-input/password-input-context.d.ts +3 -0
  237. package/dist/password-input/password-input-context.d.ts.map +1 -0
  238. package/dist/password-input/use-password-input.d.ts +12 -0
  239. package/dist/password-input/use-password-input.d.ts.map +1 -0
  240. package/dist/popover/index.d.ts +3 -0
  241. package/dist/popover/index.d.ts.map +1 -0
  242. package/dist/popover/index.js +2 -0
  243. package/dist/popover/index.js.map +7 -0
  244. package/dist/popover/popover-context.d.ts +3 -0
  245. package/dist/popover/popover-context.d.ts.map +1 -0
  246. package/dist/popover/use-popover.d.ts +12 -0
  247. package/dist/popover/use-popover.d.ts.map +1 -0
  248. package/dist/portal/index.d.ts +3 -0
  249. package/dist/portal/index.d.ts.map +1 -0
  250. package/dist/portal/index.js +2 -0
  251. package/dist/portal/index.js.map +7 -0
  252. package/dist/portal/portal-context.d.ts +10 -0
  253. package/dist/portal/portal-context.d.ts.map +1 -0
  254. package/dist/portal/portal.d.ts +19 -0
  255. package/dist/portal/portal.d.ts.map +1 -0
  256. package/dist/position/index.d.ts +2 -0
  257. package/dist/position/index.d.ts.map +1 -0
  258. package/dist/position/index.js +1 -0
  259. package/dist/position/index.js.map +7 -0
  260. package/dist/position/position.types.d.ts +2 -0
  261. package/dist/position/position.types.d.ts.map +1 -0
  262. package/dist/presence/index.d.ts +5 -0
  263. package/dist/presence/index.d.ts.map +1 -0
  264. package/dist/presence/index.js +2 -0
  265. package/dist/presence/index.js.map +7 -0
  266. package/dist/presence/presence-context.d.ts +3 -0
  267. package/dist/presence/presence-context.d.ts.map +1 -0
  268. package/dist/presence/presence.d.ts +11 -0
  269. package/dist/presence/presence.d.ts.map +1 -0
  270. package/dist/presence/render-strategy.d.ts +3 -0
  271. package/dist/presence/render-strategy.d.ts.map +1 -0
  272. package/dist/presence/use-presence.d.ts +18 -0
  273. package/dist/presence/use-presence.d.ts.map +1 -0
  274. package/dist/progress/core-progress.d.ts +53 -0
  275. package/dist/progress/core-progress.d.ts.map +1 -0
  276. package/dist/progress/index.d.ts +14 -0
  277. package/dist/progress/index.d.ts.map +1 -0
  278. package/dist/progress/index.js +2 -0
  279. package/dist/progress/index.js.map +7 -0
  280. package/dist/progress/progress-context.d.ts +3 -0
  281. package/dist/progress/progress-context.d.ts.map +1 -0
  282. package/dist/progress-ring/core-progress-ring.d.ts +45 -0
  283. package/dist/progress-ring/core-progress-ring.d.ts.map +1 -0
  284. package/dist/progress-ring/index.d.ts +14 -0
  285. package/dist/progress-ring/index.d.ts.map +1 -0
  286. package/dist/progress-ring/index.js +2 -0
  287. package/dist/progress-ring/index.js.map +7 -0
  288. package/dist/progress-ring/progress-ring-context.d.ts +3 -0
  289. package/dist/progress-ring/progress-ring-context.d.ts.map +1 -0
  290. package/dist/props/index.d.ts +2 -0
  291. package/dist/props/index.d.ts.map +1 -0
  292. package/dist/props/index.js +2 -0
  293. package/dist/props/index.js.map +7 -0
  294. package/dist/props/use-previous-props.d.ts +2 -0
  295. package/dist/props/use-previous-props.d.ts.map +1 -0
  296. package/dist/radio/index.d.ts +3 -0
  297. package/dist/radio/index.d.ts.map +1 -0
  298. package/dist/radio/index.js +2 -0
  299. package/dist/radio/index.js.map +7 -0
  300. package/dist/radio/radio-context.d.ts +4 -0
  301. package/dist/radio/radio-context.d.ts.map +1 -0
  302. package/dist/radio/use-radio.d.ts +14 -0
  303. package/dist/radio/use-radio.d.ts.map +1 -0
  304. package/dist/refs/compose-refs.d.ts +5 -0
  305. package/dist/refs/compose-refs.d.ts.map +1 -0
  306. package/dist/refs/get-child-ref.d.ts +4 -0
  307. package/dist/refs/get-child-ref.d.ts.map +1 -0
  308. package/dist/refs/index.d.ts +5 -0
  309. package/dist/refs/index.d.ts.map +1 -0
  310. package/dist/refs/index.js +2 -0
  311. package/dist/refs/index.js.map +7 -0
  312. package/dist/refs/set-ref.d.ts +15 -0
  313. package/dist/refs/set-ref.d.ts.map +1 -0
  314. package/dist/refs/use-merged-ref.d.ts +9 -0
  315. package/dist/refs/use-merged-ref.d.ts.map +1 -0
  316. package/dist/segmented-control/index.d.ts +3 -0
  317. package/dist/segmented-control/index.d.ts.map +1 -0
  318. package/dist/segmented-control/index.js +2 -0
  319. package/dist/segmented-control/index.js.map +7 -0
  320. package/dist/segmented-control/segmented-control-context.d.ts +3 -0
  321. package/dist/segmented-control/segmented-control-context.d.ts.map +1 -0
  322. package/dist/segmented-control/use-segmented-control.d.ts +7 -0
  323. package/dist/segmented-control/use-segmented-control.d.ts.map +1 -0
  324. package/dist/select/core-select.d.ts +29 -0
  325. package/dist/select/core-select.d.ts.map +1 -0
  326. package/dist/select/index.d.ts +16 -0
  327. package/dist/select/index.d.ts.map +1 -0
  328. package/dist/select/index.js +2 -0
  329. package/dist/select/index.js.map +7 -0
  330. package/dist/select/select-context.d.ts +4 -0
  331. package/dist/select/select-context.d.ts.map +1 -0
  332. package/dist/select/use-select.d.ts +7 -0
  333. package/dist/select/use-select.d.ts.map +1 -0
  334. package/dist/side-nav/core-side-nav.d.ts +39 -0
  335. package/dist/side-nav/core-side-nav.d.ts.map +1 -0
  336. package/dist/side-nav/index.d.ts +14 -0
  337. package/dist/side-nav/index.d.ts.map +1 -0
  338. package/dist/side-nav/index.js +2 -0
  339. package/dist/side-nav/index.js.map +7 -0
  340. package/dist/side-nav/side-nav-context.d.ts +3 -0
  341. package/dist/side-nav/side-nav-context.d.ts.map +1 -0
  342. package/dist/slider/index.d.ts +3 -0
  343. package/dist/slider/index.d.ts.map +1 -0
  344. package/dist/slider/index.js +2 -0
  345. package/dist/slider/index.js.map +7 -0
  346. package/dist/slider/slider-context.d.ts +4 -0
  347. package/dist/slider/slider-context.d.ts.map +1 -0
  348. package/dist/slider/use-slider.d.ts +22 -0
  349. package/dist/slider/use-slider.d.ts.map +1 -0
  350. package/dist/state/controlled-open.d.ts +23 -0
  351. package/dist/state/controlled-open.d.ts.map +1 -0
  352. package/dist/state/index.d.ts +4 -0
  353. package/dist/state/index.d.ts.map +1 -0
  354. package/dist/state/index.js +3 -0
  355. package/dist/state/index.js.map +7 -0
  356. package/dist/state/use-controlled-id.d.ts +8 -0
  357. package/dist/state/use-controlled-id.d.ts.map +1 -0
  358. package/dist/state/use-controlled-state.d.ts +35 -0
  359. package/dist/state/use-controlled-state.d.ts.map +1 -0
  360. package/dist/switch/index.d.ts +3 -0
  361. package/dist/switch/index.d.ts.map +1 -0
  362. package/dist/switch/index.js +2 -0
  363. package/dist/switch/index.js.map +7 -0
  364. package/dist/switch/switch-context.d.ts +3 -0
  365. package/dist/switch/switch-context.d.ts.map +1 -0
  366. package/dist/switch/use-switch.d.ts +9 -0
  367. package/dist/switch/use-switch.d.ts.map +1 -0
  368. package/dist/system/index.d.ts +5 -0
  369. package/dist/system/index.d.ts.map +1 -0
  370. package/dist/system/index.js +2 -0
  371. package/dist/system/index.js.map +7 -0
  372. package/dist/system/polymorphic-as-element.d.ts +20 -0
  373. package/dist/system/polymorphic-as-element.d.ts.map +1 -0
  374. package/dist/system/polymorphic-element.d.ts +13 -0
  375. package/dist/system/polymorphic-element.d.ts.map +1 -0
  376. package/dist/system/system.types.d.ts +69 -0
  377. package/dist/system/system.types.d.ts.map +1 -0
  378. package/dist/system/system.utils.d.ts +31 -0
  379. package/dist/system/system.utils.d.ts.map +1 -0
  380. package/dist/tabs/core-tabs.d.ts +60 -0
  381. package/dist/tabs/core-tabs.d.ts.map +1 -0
  382. package/dist/tabs/index.d.ts +16 -0
  383. package/dist/tabs/index.d.ts.map +1 -0
  384. package/dist/tabs/index.js +2 -0
  385. package/dist/tabs/index.js.map +7 -0
  386. package/dist/tabs/tab-prop-context.d.ts +3 -0
  387. package/dist/tabs/tab-prop-context.d.ts.map +1 -0
  388. package/dist/tabs/tabs-context.d.ts +3 -0
  389. package/dist/tabs/tabs-context.d.ts.map +1 -0
  390. package/dist/text-area/index.d.ts +2 -0
  391. package/dist/text-area/index.d.ts.map +1 -0
  392. package/dist/text-area/index.js +1 -0
  393. package/dist/text-area/index.js.map +7 -0
  394. package/dist/text-input/index.d.ts +3 -0
  395. package/dist/text-input/index.d.ts.map +1 -0
  396. package/dist/text-input/index.js +2 -0
  397. package/dist/text-input/index.js.map +7 -0
  398. package/dist/text-input/text-input-context.d.ts +3 -0
  399. package/dist/text-input/text-input-context.d.ts.map +1 -0
  400. package/dist/text-input/use-text-input.d.ts +10 -0
  401. package/dist/text-input/use-text-input.d.ts.map +1 -0
  402. package/dist/toast/core-toast.d.ts +35 -0
  403. package/dist/toast/core-toast.d.ts.map +1 -0
  404. package/dist/toast/index.d.ts +13 -0
  405. package/dist/toast/index.d.ts.map +1 -0
  406. package/dist/toast/index.js +2 -0
  407. package/dist/toast/index.js.map +7 -0
  408. package/dist/toast/toast-context.d.ts +3 -0
  409. package/dist/toast/toast-context.d.ts.map +1 -0
  410. package/dist/toast/toaster.d.ts +19 -0
  411. package/dist/toast/toaster.d.ts.map +1 -0
  412. package/dist/tooltip/index.d.ts +3 -0
  413. package/dist/tooltip/index.d.ts.map +1 -0
  414. package/dist/tooltip/index.js +2 -0
  415. package/dist/tooltip/index.js.map +7 -0
  416. package/dist/tooltip/tooltip-context.d.ts +3 -0
  417. package/dist/tooltip/tooltip-context.d.ts.map +1 -0
  418. package/dist/tooltip/use-tooltip.d.ts +9 -0
  419. package/dist/tooltip/use-tooltip.d.ts.map +1 -0
  420. package/dist/transitions/get-transition-props.d.ts +25 -0
  421. package/dist/transitions/get-transition-props.d.ts.map +1 -0
  422. package/dist/transitions/index.d.ts +3 -0
  423. package/dist/transitions/index.d.ts.map +1 -0
  424. package/dist/transitions/index.js +2 -0
  425. package/dist/transitions/index.js.map +7 -0
  426. package/dist/transitions/transitions.types.d.ts +119 -0
  427. package/dist/transitions/transitions.types.d.ts.map +1 -0
  428. package/dist/tree/core-tree.d.ts +63 -0
  429. package/dist/tree/core-tree.d.ts.map +1 -0
  430. package/dist/tree/index.d.ts +20 -0
  431. package/dist/tree/index.d.ts.map +1 -0
  432. package/dist/tree/index.js +2 -0
  433. package/dist/tree/index.js.map +7 -0
  434. package/dist/tree/tree-context.d.ts +7 -0
  435. package/dist/tree/tree-context.d.ts.map +1 -0
  436. package/dist/tree/tree-node-context.d.ts +4 -0
  437. package/dist/tree/tree-node-context.d.ts.map +1 -0
  438. package/dist/tree/use-tree.d.ts +5 -0
  439. package/dist/tree/use-tree.d.ts.map +1 -0
  440. package/dist/tsbuildinfo +1 -0
  441. package/package.json +50 -0
@@ -0,0 +1,62 @@
1
+ import type { ComponentPropsWithRef, ReactElement } from "react";
2
+ import { type ComboboxApiItemProps, type ComboboxApiProps, type ComboboxApiTriggerProps } from "@qualcomm-ui/core/combobox";
3
+ import { type PresenceApiProps } from "@qualcomm-ui/core/presence";
4
+ import { type ElementRenderProp, type IdProp } from "@qualcomm-ui/react-core/system";
5
+ import type { CollectionItem } from "@qualcomm-ui/utils/collection";
6
+ export interface CoreComboboxRootProps<T extends CollectionItem> extends ComboboxApiProps<T>, PresenceApiProps, IdProp, Omit<ElementRenderProp<"div">, "defaultValue" | "dir" | "onSelect"> {
7
+ }
8
+ export declare function CoreComboboxRoot<T extends CollectionItem = CollectionItem>({ children, id, ...props }: CoreComboboxRootProps<T>): ReactElement;
9
+ export interface CoreComboboxClearTriggerProps extends ElementRenderProp<"button">, IdProp {
10
+ }
11
+ export declare function CoreComboboxClearTrigger({ id, ...props }: CoreComboboxClearTriggerProps): ReactElement;
12
+ export interface CoreComboboxContentProps extends ElementRenderProp<"div">, IdProp {
13
+ }
14
+ export declare function CoreComboboxContent({ id, ...props }: CoreComboboxContentProps): ReactElement | null;
15
+ export interface CoreComboboxControlProps extends ElementRenderProp<"div">, IdProp {
16
+ }
17
+ export declare function CoreComboboxControl({ id, ...props }: CoreComboboxControlProps): ReactElement;
18
+ export interface CoreComboboxEmptyProps extends ElementRenderProp<"div"> {
19
+ }
20
+ export declare function CoreComboboxEmpty(props: CoreComboboxEmptyProps): ReactElement | null;
21
+ export interface CoreComboboxInputProps extends ComponentPropsWithRef<"input">, IdProp {
22
+ }
23
+ export declare function CoreComboboxInput({ id, ...props }: CoreComboboxInputProps): ReactElement;
24
+ export interface CoreComboboxItemProps<T extends CollectionItem> extends ElementRenderProp<"div">, ComboboxApiItemProps<T> {
25
+ }
26
+ export declare function CoreComboboxItem<T extends CollectionItem = CollectionItem>({ item, persistFocus, ...props }: CoreComboboxItemProps<T>): ReactElement;
27
+ export interface CoreComboboxItemTextProps extends ElementRenderProp<"span"> {
28
+ }
29
+ export declare function CoreComboboxItemText(props: CoreComboboxItemTextProps): ReactElement;
30
+ export interface CoreComboboxItemIndicatorProps extends ElementRenderProp<"span"> {
31
+ }
32
+ export declare function CoreComboboxItemIndicator({ ...props }: CoreComboboxItemIndicatorProps): ReactElement;
33
+ export interface CoreComboboxItemGroupProps extends ElementRenderProp<"div"> {
34
+ /**
35
+ * Unique identifier for the combobox item group. Not the final HTML `id`
36
+ * attribute.
37
+ */
38
+ id?: string;
39
+ }
40
+ export declare function CoreComboboxItemGroup({ id: idProp, ...props }: CoreComboboxItemGroupProps): ReactElement;
41
+ export interface CoreComboboxItemGroupLabelProps extends ElementRenderProp<"div"> {
42
+ }
43
+ export declare function CoreComboboxItemGroupLabel({ ...props }: CoreComboboxItemGroupLabelProps): ReactElement;
44
+ export interface CoreComboboxLabelProps extends ElementRenderProp<"label">, IdProp {
45
+ }
46
+ export declare function CoreComboboxLabel({ id, ...props }: CoreComboboxLabelProps): ReactElement;
47
+ export interface CoreComboboxPositionerProps extends ElementRenderProp<"div">, IdProp {
48
+ }
49
+ export declare function CoreComboboxPositioner({ id, ...props }: CoreComboboxPositionerProps): ReactElement | null;
50
+ export interface CoreComboboxTriggerProps extends ElementRenderProp<"button">, ComboboxApiTriggerProps, IdProp {
51
+ }
52
+ export declare function CoreComboboxTrigger({ focusable, id, ...props }: CoreComboboxTriggerProps): ReactElement;
53
+ export interface CoreComboboxHintProps extends ElementRenderProp<"div">, IdProp {
54
+ }
55
+ export declare function CoreComboboxHint({ id, ...props }: CoreComboboxHintProps): ReactElement;
56
+ export interface CoreComboboxErrorTextProps extends ElementRenderProp<"div">, IdProp {
57
+ }
58
+ export declare function CoreComboboxErrorText({ id, ...props }: CoreComboboxErrorTextProps): ReactElement;
59
+ export interface CoreComboboxErrorIndicatorProps extends ElementRenderProp<"span"> {
60
+ }
61
+ export declare function CoreComboboxErrorIndicator({ ...props }: CoreComboboxErrorIndicatorProps): ReactElement;
62
+ //# sourceMappingURL=core-combobox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-combobox.d.ts","sourceRoot":"","sources":["../../src/combobox/core-combobox.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,qBAAqB,EAAE,YAAY,EAAC,MAAM,OAAO,CAAA;AAE9D,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAI7B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAA;AASnC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,MAAM,EAEZ,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAA;AAajE,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,cAAc,CAC7D,SAAQ,gBAAgB,CAAC,CAAC,CAAC,EACzB,gBAAgB,EAChB,MAAM,EACN,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,KAAK,GAAG,UAAU,CAAC;CAAG;AAE1E,wBA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K,EACT,EAAE,wBAAwB,GAAG,YAAY,CAYzC;AAED,MAAM,WAAW,qBACf,SAAQ,iBAAiB,CAAC,KAAK,CAAC,EAC9B,MAAM;CAAG;AAEb,wBAAgB,gBAAgB,CAAC,EAC/B,EAAE,EACF,GAAG,KAAK,EACT,EAAE,qBAAqB,GAAG,YAAY,CAWtC;AAED,MAAM,WAAW,0BACf,SAAQ,iBAAiB,CAAC,KAAK,CAAC,EAC9B,MAAM;CAAG;AAEb,wBAAgB,qBAAqB,CAAC,EACpC,EAAE,EACF,GAAG,KAAK,EACT,EAAE,0BAA0B,GAAG,YAAY,CAW3C;AAED,MAAM,WAAW,+BACf,SAAQ,iBAAiB,CAAC,MAAM,CAAC;CAAG;AAEtC,wBAAgB,0BAA0B,CAAC,EACzC,GAAG,KAAK,EACT,EAAE,+BAA+B,GAAG,YAAY,CAQhD"}
@@ -0,0 +1,26 @@
1
+ import { CoreComboboxClearTrigger, type CoreComboboxClearTriggerProps, CoreComboboxContent, type CoreComboboxContentProps, CoreComboboxControl, type CoreComboboxControlProps, CoreComboboxEmpty, type CoreComboboxEmptyProps, CoreComboboxErrorIndicator, type CoreComboboxErrorIndicatorProps, CoreComboboxErrorText, type CoreComboboxErrorTextProps, CoreComboboxHint, type CoreComboboxHintProps, CoreComboboxInput, type CoreComboboxInputProps, CoreComboboxItem, CoreComboboxItemGroup, CoreComboboxItemGroupLabel, type CoreComboboxItemGroupLabelProps, type CoreComboboxItemGroupProps, CoreComboboxItemIndicator, type CoreComboboxItemIndicatorProps, type CoreComboboxItemProps, CoreComboboxItemText, type CoreComboboxItemTextProps, CoreComboboxLabel, type CoreComboboxLabelProps, CoreComboboxPositioner, type CoreComboboxPositionerProps, CoreComboboxRoot, type CoreComboboxRootProps, CoreComboboxTrigger, type CoreComboboxTriggerProps } from "./core-combobox";
2
+ export * from "./combobox-context";
3
+ export * from "./combobox-item-context";
4
+ export * from "./combobox-item-group-context";
5
+ export type { CoreComboboxRootProps, CoreComboboxClearTriggerProps, CoreComboboxContentProps, CoreComboboxControlProps, CoreComboboxEmptyProps, CoreComboboxInputProps, CoreComboboxItemProps, CoreComboboxItemTextProps, CoreComboboxItemIndicatorProps, CoreComboboxItemGroupProps, CoreComboboxItemGroupLabelProps, CoreComboboxLabelProps, CoreComboboxPositionerProps, CoreComboboxTriggerProps, CoreComboboxHintProps, CoreComboboxErrorTextProps, CoreComboboxErrorIndicatorProps, };
6
+ type CoreComboboxComponent = {
7
+ ClearTrigger: typeof CoreComboboxClearTrigger;
8
+ Content: typeof CoreComboboxContent;
9
+ Control: typeof CoreComboboxControl;
10
+ Empty: typeof CoreComboboxEmpty;
11
+ ErrorIndicator: typeof CoreComboboxErrorIndicator;
12
+ ErrorText: typeof CoreComboboxErrorText;
13
+ Hint: typeof CoreComboboxHint;
14
+ Input: typeof CoreComboboxInput;
15
+ Item: typeof CoreComboboxItem;
16
+ ItemGroup: typeof CoreComboboxItemGroup;
17
+ ItemGroupLabel: typeof CoreComboboxItemGroupLabel;
18
+ ItemIndicator: typeof CoreComboboxItemIndicator;
19
+ ItemText: typeof CoreComboboxItemText;
20
+ Label: typeof CoreComboboxLabel;
21
+ Positioner: typeof CoreComboboxPositioner;
22
+ Root: typeof CoreComboboxRoot;
23
+ Trigger: typeof CoreComboboxTrigger;
24
+ };
25
+ export declare const CoreCombobox: CoreComboboxComponent;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,6BAA6B,EAClC,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,0BAA0B,EAC1B,KAAK,+BAA+B,EACpC,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,iBAAiB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AQ,EAAE,OAAO,oBAAoB,CAAA;IACrC,KAAK,EAAE,OAAO,iBAAiB,CAAA;IAC/B,UAAU,EAAE,OAAO,sBAAsB,CAAA;IACzC,IAAI,EAAE,OAAO,gBAAgB,CAAA;IAC7B,OAAO,EAAE,OAAO,mBAAmB,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,qBAkB1B,CAAA"}
@@ -0,0 +1,2 @@
1
+ import{c as f}from"react/compiler-runtime";import{jsx as s}from"react/jsx-runtime";import{comboboxMachine as J,createComboboxApi as K,splitComboboxProps as Q}from"@qualcomm-ui/core/combobox";import{splitPresenceProps as U}from"@qualcomm-ui/core/presence";import{useOnDestroy as C,useOnDestroyWhen as v}from"@qualcomm-ui/react-core/effects";import{normalizeProps as V,useMachine as X}from"@qualcomm-ui/react-core/machine";import{PresenceContextProvider as Y,usePresence as Z,usePresenceContext as G}from"@qualcomm-ui/react-core/presence";import{useControlledId as c}from"@qualcomm-ui/react-core/state";import{PolymorphicElement as b}from"@qualcomm-ui/react-core/system";import{mergeProps as m}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext as _}from"@qualcomm-ui/react-core/context";var[a,i]=_({hookName:"useComboboxContext",providerName:"<ComboboxContextProvider>",strict:!0});import{createGuardedContext as q}from"@qualcomm-ui/react-core/context";var[l,g]=q({hookName:"useComboboxItemContext",providerName:"<ComboboxItemContextProvider>",strict:!0});import{createGuardedContext as w}from"@qualcomm-ui/react-core/context";var[P,I]=w({hookName:"useComboboxItemGroupContext",providerName:"<ComboboxItemGroupContextProvider>",strict:!0});function B(r){let{children:o,id:t,...e}=r,[n,x]=U(e),[p,d]=Q(x),j=X(J,p),u=K(j,V),S=Z(m({present:u.open},n)),W=m(u.getRootBindings({id:c(t)}),d);return s(Y,{value:S,children:s(a,{value:u,children:s(b,{as:"div",...W,children:o})})})}function y(r){let{id:o,...t}=r,e=i(),n=m(e.getClearTriggerBindings({id:c(o),onDestroy:C()}),t);return s(b,{as:"button",...n})}function T(r){let{id:o,...t}=r,e=i(),n=G(),x=m(e.getContentBindings({id:c(o),onDestroy:v(n.unmounted)}),n.getPresenceBindings(),t);return n.unmounted?null:s(b,{as:"div",...x})}function h(r){let{id:o,...t}=r,e=i(),n=m(e.getControlBindings({id:c(o),onDestroy:C()}),t);return s(b,{as:"div",...n})}function E(r){let o=f(3),t=i();if(t.collection.size>0)return null;let e;if(o[0]!==t||o[1]!==r){let n=m(t.getEmptyBindings(),r);e=s(b,{as:"div",...n}),o[0]=t,o[1]=r,o[2]=e}else e=o[2];return e}function D(r){let{id:o,...t}=r,e=i(),n=m(e.getInputBindings({id:c(o),onDestroy:C()}),t);return s("input",{...n})}function L(r){let{item:o,persistFocus:t,...e}=r,n=i(),x={item:o,persistFocus:t},p=n.getItemState(x),d=m(n.getItemBindings(p),e);return s(l,{value:p,children:s(b,{as:"div",...d})})}function N(r){let o=f(4),t=i(),e=g(),n;if(o[0]!==t||o[1]!==e||o[2]!==r){let x=m(t.getItemTextBindings(e),r);n=s(b,{as:"span",...x}),o[0]=t,o[1]=e,o[2]=r,o[3]=n}else n=o[3];return n}function H(r){let{...o}=r,t=i(),e=g(),n=m(t.getItemIndicatorBindings(e),o);return s(b,{as:"span",...n})}function R(r){let{id:o,...t}=r,e=i(),x={id:c(o)},p=m(e.getItemGroupBindings(x),t);return s(P,{value:x,children:s(b,{as:"div",...p})})}function k(r){let{...o}=r,t=i(),e=I(),n=m(t.getItemGroupLabelBindings({htmlFor:e.id}),o);return s(b,{as:"div",...n})}function M(r){let{id:o,...t}=r,e=i(),n=m(e.getLabelBindings({id:c(o),onDestroy:C()}),t);return s(b,{as:"label",...n})}function z(r){let{id:o,...t}=r,e=i(),n=G(),x=m(e.getPositionerBindings({id:c(o),onDestroy:v(n.unmounted)}),t);return n.unmounted?null:s(b,{as:"div",...x})}function A(r){let{focusable:o,id:t,...e}=r,n=i(),x=m(n.getTriggerBindings({focusable:o,id:c(t),onDestroy:C()}),e);return s(b,{as:"button",...x})}function F(r){let{id:o,...t}=r,e=i(),n=m(e.getHintBindings({id:c(o),onDestroy:C()}),t);return s(b,{as:"div",...n})}function O(r){let{id:o,...t}=r,e=i(),n=m(e.getErrorTextBindings({id:c(o),onDestroy:C()}),t);return s(b,{as:"div",...n})}function $(r){let{...o}=r,t=i(),e=m(t.getErrorIndicatorBindings(),o);return s(b,{as:"span",...e})}var Go={ClearTrigger:y,Content:T,Control:h,Empty:E,ErrorIndicator:$,ErrorText:O,Hint:F,Input:D,Item:L,ItemGroup:R,ItemGroupLabel:k,ItemIndicator:H,ItemText:N,Label:M,Positioner:z,Root:B,Trigger:A};export{a as ComboboxContextProvider,l as ComboboxItemContextProvider,P as ComboboxItemGroupContextProvider,Go as CoreCombobox,i as useComboboxContext,g as useComboboxItemContext,I as useComboboxItemGroupContext};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/combobox/core-combobox.tsx", "../../src/combobox/combobox-context.ts", "../../src/combobox/combobox-item-context.ts", "../../src/combobox/combobox-item-group-context.ts", "../../src/combobox/index.ts"],
4
+ "sourcesContent": ["import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { comboboxMachine, createComboboxApi, splitComboboxProps } from \"@qualcomm-ui/core/combobox\";\nimport { splitPresenceProps } from \"@qualcomm-ui/core/presence\";\nimport { useOnDestroy, useOnDestroyWhen } from \"@qualcomm-ui/react-core/effects\";\nimport { normalizeProps, useMachine } from \"@qualcomm-ui/react-core/machine\";\nimport { PresenceContextProvider, usePresence, usePresenceContext } from \"@qualcomm-ui/react-core/presence\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { ComboboxContextProvider, useComboboxContext } from \"./combobox-context\";\nimport { ComboboxItemContextProvider, useComboboxItemContext } from \"./combobox-item-context\";\nimport { ComboboxItemGroupContextProvider, useComboboxItemGroupContext } from \"./combobox-item-group-context\";\nexport function CoreComboboxRoot(t0) {\n const {\n children,\n id,\n ...props\n } = t0;\n const [presenceProps, comboboxProps] = splitPresenceProps(props);\n const [comboboxMachineProps, localProps] = splitComboboxProps(comboboxProps);\n const machine = useMachine(comboboxMachine, comboboxMachineProps);\n const comboboxApi = createComboboxApi(machine, normalizeProps);\n const presence = usePresence(mergeProps({\n present: comboboxApi.open\n }, presenceProps));\n const mergedProps = mergeProps(comboboxApi.getRootBindings({\n id: useControlledId(id)\n }), localProps);\n return jsx(PresenceContextProvider, {\n value: presence,\n children: jsx(ComboboxContextProvider, {\n value: comboboxApi,\n children: jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n })\n })\n });\n}\nexport function CoreComboboxClearTrigger(t0) {\n const {\n id,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const mergedProps = mergeProps(comboboxContext.getClearTriggerBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"button\",\n ...mergedProps\n });\n}\nexport function CoreComboboxContent(t0) {\n const {\n id,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const presence = usePresenceContext();\n const mergedProps = mergeProps(comboboxContext.getContentBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroyWhen(presence.unmounted)\n }), presence.getPresenceBindings(), props);\n if (presence.unmounted) {\n return null;\n }\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n}\nexport function CoreComboboxControl(t0) {\n const {\n id,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const mergedProps = mergeProps(comboboxContext.getControlBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n}\nexport function CoreComboboxEmpty(props) {\n const $ = _c(3);\n const comboboxContext = useComboboxContext();\n if (comboboxContext.collection.size > 0) {\n return null;\n }\n let t0;\n if ($[0] !== comboboxContext || $[1] !== props) {\n const mergedProps = mergeProps(comboboxContext.getEmptyBindings(), props);\n t0 = jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n $[0] = comboboxContext;\n $[1] = props;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}\nexport function CoreComboboxInput(t0) {\n const {\n id,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const mergedProps = mergeProps(comboboxContext.getInputBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(\"input\", {\n ...mergedProps\n });\n}\nexport function CoreComboboxItem(t0) {\n const {\n item,\n persistFocus,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const itemProps = {\n item,\n persistFocus\n };\n const itemContext = comboboxContext.getItemState(itemProps);\n const mergedProps = mergeProps(comboboxContext.getItemBindings(itemContext), props);\n return jsx(ComboboxItemContextProvider, {\n value: itemContext,\n children: jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n })\n });\n}\nexport function CoreComboboxItemText(props) {\n const $ = _c(4);\n const comboboxContext = useComboboxContext();\n const itemContext = useComboboxItemContext();\n let t0;\n if ($[0] !== comboboxContext || $[1] !== itemContext || $[2] !== props) {\n const mergedProps = mergeProps(comboboxContext.getItemTextBindings(itemContext), props);\n t0 = jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps\n });\n $[0] = comboboxContext;\n $[1] = itemContext;\n $[2] = props;\n $[3] = t0;\n } else {\n t0 = $[3];\n }\n return t0;\n}\nexport function CoreComboboxItemIndicator(t0) {\n const {\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const itemContext = useComboboxItemContext();\n const mergedProps = mergeProps(comboboxContext.getItemIndicatorBindings(itemContext), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps\n });\n}\nexport function CoreComboboxItemGroup(t0) {\n const {\n id: idProp,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const id = useControlledId(idProp);\n const itemGroupProps = {\n id\n };\n const mergedProps = mergeProps(comboboxContext.getItemGroupBindings(itemGroupProps), props);\n return jsx(ComboboxItemGroupContextProvider, {\n value: itemGroupProps,\n children: jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n })\n });\n}\nexport function CoreComboboxItemGroupLabel(t0) {\n const {\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const itemGroupProps = useComboboxItemGroupContext();\n const mergedProps = mergeProps(comboboxContext.getItemGroupLabelBindings({\n htmlFor: itemGroupProps.id\n }), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n}\nexport function CoreComboboxLabel(t0) {\n const {\n id,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const mergedProps = mergeProps(comboboxContext.getLabelBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"label\",\n ...mergedProps\n });\n}\nexport function CoreComboboxPositioner(t0) {\n const {\n id,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const presence = usePresenceContext();\n const mergedProps = mergeProps(comboboxContext.getPositionerBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroyWhen(presence.unmounted)\n }), props);\n if (presence.unmounted) {\n return null;\n }\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n}\nexport function CoreComboboxTrigger(t0) {\n const {\n focusable,\n id,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const mergedProps = mergeProps(comboboxContext.getTriggerBindings({\n focusable,\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"button\",\n ...mergedProps\n });\n}\nexport function CoreComboboxHint(t0) {\n const {\n id,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const mergedProps = mergeProps(comboboxContext.getHintBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n}\nexport function CoreComboboxErrorText(t0) {\n const {\n id,\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const mergedProps = mergeProps(comboboxContext.getErrorTextBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n}\nexport function CoreComboboxErrorIndicator(t0) {\n const {\n ...props\n } = t0;\n const comboboxContext = useComboboxContext();\n const mergedProps = mergeProps(comboboxContext.getErrorIndicatorBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [ComboboxContextProvider, useComboboxContext] = createGuardedContext({\n hookName: \"useComboboxContext\",\n providerName: \"<ComboboxContextProvider>\",\n strict: true\n});", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [ComboboxItemContextProvider, useComboboxItemContext] = createGuardedContext({\n hookName: \"useComboboxItemContext\",\n providerName: \"<ComboboxItemContextProvider>\",\n strict: true\n});", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [ComboboxItemGroupContextProvider, useComboboxItemGroupContext] = createGuardedContext({\n hookName: \"useComboboxItemGroupContext\",\n providerName: \"<ComboboxItemGroupContextProvider>\",\n strict: true\n});", "import { CoreComboboxClearTrigger, CoreComboboxContent, CoreComboboxControl, CoreComboboxEmpty, CoreComboboxErrorIndicator, CoreComboboxErrorText, CoreComboboxHint, CoreComboboxInput, CoreComboboxItem, CoreComboboxItemGroup, CoreComboboxItemGroupLabel, CoreComboboxItemIndicator, CoreComboboxItemText, CoreComboboxLabel, CoreComboboxPositioner, CoreComboboxRoot, CoreComboboxTrigger } from \"./core-combobox\";\nexport * from \"./combobox-context\";\nexport * from \"./combobox-item-context\";\nexport * from \"./combobox-item-group-context\";\nexport const CoreCombobox = {\n ClearTrigger: CoreComboboxClearTrigger,\n Content: CoreComboboxContent,\n Control: CoreComboboxControl,\n Empty: CoreComboboxEmpty,\n ErrorIndicator: CoreComboboxErrorIndicator,\n ErrorText: CoreComboboxErrorText,\n Hint: CoreComboboxHint,\n Input: CoreComboboxInput,\n Item: CoreComboboxItem,\n ItemGroup: CoreComboboxItemGroup,\n ItemGroupLabel: CoreComboboxItemGroupLabel,\n ItemIndicator: CoreComboboxItemIndicator,\n ItemText: CoreComboboxItemText,\n Label: CoreComboboxLabel,\n Positioner: CoreComboboxPositioner,\n Root: CoreComboboxRoot,\n Trigger: CoreComboboxTrigger\n};"],
5
+ "mappings": "AAAA,OAAS,KAAKA,MAAU,yBACxB,OAAS,OAAAC,MAAW,oBACpB,OAAS,mBAAAC,EAAiB,qBAAAC,EAAmB,sBAAAC,MAA0B,6BACvE,OAAS,sBAAAC,MAA0B,6BACnC,OAAS,gBAAAC,EAAc,oBAAAC,MAAwB,kCAC/C,OAAS,kBAAAC,EAAgB,cAAAC,MAAkB,kCAC3C,OAAS,2BAAAC,EAAyB,eAAAC,EAAa,sBAAAC,MAA0B,mCACzE,OAAS,mBAAAC,MAAuB,gCAChC,OAAS,sBAAAC,MAA0B,iCACnC,OAAS,cAAAC,MAAkB,iCCT3B,OAAS,wBAAAC,MAA4B,kCAC9B,GAAM,CAACC,EAAyBC,CAAkB,EAAIF,EAAqB,CAChF,SAAU,qBACV,aAAc,4BACd,OAAQ,EACV,CAAC,ECLD,OAAS,wBAAAG,MAA4B,kCAC9B,GAAM,CAACC,EAA6BC,CAAsB,EAAIF,EAAqB,CACxF,SAAU,yBACV,aAAc,gCACd,OAAQ,EACV,CAAC,ECLD,OAAS,wBAAAG,MAA4B,kCAC9B,GAAM,CAACC,EAAkCC,CAA2B,EAAIF,EAAqB,CAClG,SAAU,8BACV,aAAc,qCACd,OAAQ,EACV,CAAC,EHQM,SAASG,EAAiBC,EAAI,CACnC,GAAM,CACJ,SAAAC,EACA,GAAAC,EACA,GAAGC,CACL,EAAIH,EACE,CAACI,EAAeC,CAA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mB,EACrCR,EAAcD,EAAWQ,EAAgB,gBAAgB,CAC7D,GAAIN,EAAgBlB,CAAE,EACtB,UAAW0B,EAAa,CAC1B,CAAC,EAAGzB,CAAK,EACT,OAAOkB,EAAIG,EAAoB,CAC7B,GAAI,MACJ,GAAGL,CACL,CAAC,CACH,CACO,SAASsC,EAAsBzD,EAAI,CACxC,GAAM,CACJ,GAAAE,EACA,GAAGC,CACL,EAAIH,EACE0B,EAAkBC,EAAmB,EACrCR,EAAcD,EAAWQ,EAAgB,qBAAqB,CAClE,GAAIN,EAAgBlB,CAAE,EACtB,UAAW0B,EAAa,CAC1B,CAAC,EAAGzB,CAAK,EACT,OAAOkB,EAAIG,EAAoB,CAC7B,GAAI,MACJ,GAAGL,CACL,CAAC,CACH,CACO,SAASuC,EAA2B1D,EAAI,CAC7C,GAAM,CACJ,GAAGG,CACL,EAAIH,EACE0B,EAAkBC,EAAmB,EACrCR,EAAcD,EAAWQ,EAAgB,0BAA0B,EAAGvB,CAAK,EACjF,OAAOkB,EAAIG,EAAoB,CAC7B,GAAI,OACJ,GAAGL,CACL,CAAC,CACH,CI1SO,IAAMwC,GAAe,CAC1B,aAAcC,EACd,QAASC,EACT,QAASC,EACT,MAAOC,EACP,eAAgBC,EAChB,UAAWC,EACX,KAAMC,EACN,MAAOC,EACP,KAAMC,EACN,UAAWC,EACX,eAAgBC,EAChB,cAAeC,EACf,SAAUC,EACV,MAAOC,EACP,WAAYC,EACZ,KAAMC,EACN,QAASC,CACX",
6
+ "names": ["_c", "jsx", "comboboxMachine", "createComboboxApi", "splitComboboxProps", "splitPresenceProps", "useOnDestroy", "useOnDestroyWhen", "normalizeProps", "useMachine", "PresenceContextProvider", "usePresence", "usePresenceContext", "useControlledId", "PolymorphicElement", "mergeProps", "createGuardedContext", "ComboboxContextProvider", "useComboboxContext", "createGuardedContext", "ComboboxItemContextProvider", "useComboboxItemContext", "createGuardedContext", "ComboboxItemGroupContextProvider", "useComboboxItemGroupContext", "CoreComboboxRoot", "t0", "children", "id", "props", "presenceProps", "comboboxProps", "splitPresenceProps", "comboboxMachineProps", "localProps", "splitComboboxProps", "machine", "useMachine", "comboboxMachine", "comboboxApi", "createComboboxApi", "normalizeProps", "presence", "usePresence", "mergeProps", "mergedProps", "useControlledId", "jsx", "PresenceContextProvider", "ComboboxContextProvider", "PolymorphicElement", "CoreComboboxClearTrigger", "comboboxContext", "useComboboxContext", "useOnDestroy", "CoreComboboxContent", "usePresenceContext", "useOnDestroyWhen", "CoreComboboxControl", "CoreComboboxEmpty", "$", "_c", "CoreComboboxInput", "CoreComboboxItem", "item", "persistFocus", "itemProps", "itemContext", "ComboboxItemContextProvider", "CoreComboboxItemText", "useComboboxItemContext", "CoreComboboxItemIndicator", "CoreComboboxItemGroup", "idProp", "itemGroupProps", "ComboboxItemGroupContextProvider", "CoreComboboxItemGroupLabel", "useComboboxItemGroupContext", "CoreComboboxLabel", "CoreComboboxPositioner", "CoreComboboxTrigger", "focusable", "CoreComboboxHint", "CoreComboboxErrorText", "CoreComboboxErrorIndicator", "CoreCombobox", "CoreComboboxClearTrigger", "CoreComboboxContent", "CoreComboboxControl", "CoreComboboxEmpty", "CoreComboboxErrorIndicator", "CoreComboboxErrorText", "CoreComboboxHint", "CoreComboboxInput", "CoreComboboxItem", "CoreComboboxItemGroup", "CoreComboboxItemGroupLabel", "CoreComboboxItemIndicator", "CoreComboboxItemText", "CoreComboboxLabel", "CoreComboboxPositioner", "CoreComboboxRoot", "CoreComboboxTrigger"]
7
+ }
@@ -0,0 +1,19 @@
1
+ import { type Context, type Provider } from "react";
2
+ export interface CreateContextOptions<T> {
3
+ defaultValue?: T;
4
+ errorMessage?: string;
5
+ hookName?: string;
6
+ name?: string;
7
+ providerName?: string;
8
+ strict?: boolean;
9
+ }
10
+ export type CreateContextReturn<T> = [
11
+ Provider<T>,
12
+ (requireContext?: boolean) => T,
13
+ Context<T>
14
+ ];
15
+ /**
16
+ * Helper utility for creating context and a guarded hook for consuming it.
17
+ */
18
+ export declare function createGuardedContext<T>(options?: CreateContextOptions<T>): CreateContextReturn<T>;
19
+ //# sourceMappingURL=create-guarded-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-guarded-context.d.ts","sourceRoot":"","sources":["../../src/context/create-guarded-context.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,QAAQ,EAEd,MAAM,OAAO,CAAA;AAEd,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,QAAQ,CAAC,CAAC,CAAC;IACX,CAAC,cAAc,CAAC,EAAE,OAAO,KAAK,CAAC;IAC/B,OAAO,CAAC,CAAC,CAAC;CACX,CAAA;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAE,oBAAoB,CAAC,CAAC,CAAM,GA6BzB,mBAAmB,CAAC,CAAC,CAAC,CACzE"}
@@ -0,0 +1,3 @@
1
+ export * from "./create-guarded-context";
2
+ export * from "./use-context-id";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import{createContext as m,use as p}from"react";function x(f,t){return`${f} returned \`undefined\`. It seems you forgot to wrap this component with ${t}`}function h(f={}){let{defaultValue:t,errorMessage:c,hookName:u="useContext",name:i,providerName:e="Provider",strict:o=!0}=f,r=m(t);r.displayName=i;function n(a=o){let s=p(r);if(a&&!s){let d=new Error(c??x(u,e));throw d.name="ContextError",Error.captureStackTrace?.(d,n),d}return s}return[r.Provider,n,r]}import{c as l}from"react/compiler-runtime";import{useEffect as C}from"react";import{useSafeLayoutEffect as E}from"@qualcomm-ui/react-core/effects";import{useControlledId as I}from"@qualcomm-ui/react-core/state";function $(f){let t=l(9),{contextId:c,defaultValue:u,idProp:i,setContextId:e}=f,o=I(i),r,n;t[0]!==u||t[1]!==e?(r=()=>()=>{e(u||void 0)},n=[e,u],t[0]=u,t[1]=e,t[2]=r,t[3]=n):(r=t[2],n=t[3]),C(r,n);let a,s;return t[4]!==c||t[5]!==o||t[6]!==e?(a=()=>{c!==o&&e(o)},s=[o,c,e],t[4]=c,t[5]=o,t[6]=e,t[7]=a,t[8]=s):(a=t[7],s=t[8]),E(a,s),o}export{h as createGuardedContext,$ as useContextId};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/context/create-guarded-context.tsx", "../../src/context/use-context-id.ts"],
4
+ "sourcesContent": ["import { createContext as createReactContext, use } from \"react\";\nfunction getErrorMessage(hook, provider) {\n return `${hook} returned \\`undefined\\`. It seems you forgot to wrap this component with ${provider}`;\n}\nexport function createGuardedContext(options = {}) {\n const {\n defaultValue,\n errorMessage,\n hookName = \"useContext\",\n name,\n providerName = \"Provider\",\n strict = true\n } = options;\n const Context = createReactContext(defaultValue);\n Context.displayName = name;\n function useContext(requireContext = strict) {\n const context = use(Context);\n if (requireContext && !context) {\n const error = new Error(errorMessage ?? getErrorMessage(hookName, providerName));\n error.name = \"ContextError\";\n Error.captureStackTrace?.(error, useContext);\n throw error;\n }\n return context;\n }\n return [Context.Provider, useContext, Context];\n}", "import { c as _c } from \"react/compiler-runtime\";\nimport { useEffect } from \"react\";\nimport { useSafeLayoutEffect } from \"@qualcomm-ui/react-core/effects\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nexport function useContextId(t0) {\n const $ = _c(9);\n const {\n contextId,\n defaultValue,\n idProp,\n setContextId\n } = t0;\n const id = useControlledId(idProp);\n let t1;\n let t2;\n if ($[0] !== defaultValue || $[1] !== setContextId) {\n t1 = () => () => {\n setContextId(defaultValue || void 0);\n };\n t2 = [setContextId, defaultValue];\n $[0] = defaultValue;\n $[1] = setContextId;\n $[2] = t1;\n $[3] = t2;\n } else {\n t1 = $[2];\n t2 = $[3];\n }\n useEffect(t1, t2);\n let t3;\n let t4;\n if ($[4] !== contextId || $[5] !== id || $[6] !== setContextId) {\n t3 = () => {\n if (contextId !== id) {\n setContextId(id);\n }\n };\n t4 = [id, contextId, setContextId];\n $[4] = contextId;\n $[5] = id;\n $[6] = setContextId;\n $[7] = t3;\n $[8] = t4;\n } else {\n t3 = $[7];\n t4 = $[8];\n }\n useSafeLayoutEffect(t3, t4);\n return id;\n}"],
5
+ "mappings": "AAAA,OAAS,iBAAiBA,EAAoB,OAAAC,MAAW,QACzD,SAASC,EAAgBC,EAAMC,EAAU,CACvC,MAAO,GAAGD,CAAI,4EAA4EC,CAAQ,EACpG,CACO,SAASC,EAAqBC,EAAU,CAAC,EAAG,CACjD,GAAM,CACJ,aAAAC,EACA,aAAAC,EACA,SAAAC,EAAW,aACX,KAAAC,EACA,aAAAC,EAAe,WACf,OAAAC,EAAS,EACX,EAAIN,EACEO,EAAUb,EAAmBO,CAAY,EAC/CM,EAAQ,YAAcH,EACtB,SAASI,EAAWC,EAAiBH,EAAQ,CAC3C,IAAMI,EAAUf,EAAIY,CAAO,EAC3B,GAAIE,GAAkB,CAACC,EAAS,CAC9B,IAAMC,EAAQ,IAAI,MAAMT,GAAgBN,EAAgBO,EAAUE,CAAY,CAAC,EAC/E,MAAAM,EAAM,KAAO,eACb,MAAM,oBAAoBA,EAAOH,CAAU,EACrCG,CACR,CACA,OAAOD,CACT,CACA,MAAO,CAACH,EAAQ,SAAUC,EAAYD,CAAO,CAC/C,CC1BA,OAAS,KAAKK,MAAU,yBACxB,OAAS,aAAAC,MAAiB,QAC1B,OAAS,uBAAAC,MAA2B,kCACpC,OAAS,mBAAAC,MAAuB,gCACzB,SAASC,EAAaC,EAAI,CAC/B,IAAMC,EAAIN,EAAG,CAAC,EACR,CACJ,UAAAO,EACA,aAAAC,EACA,OAAAC,EACA,aAAAC,CACF,EAAIL,EACEM,EAAKR,EAAgBM,CAAM,EAC7BG,EACAC,EACAP,EAAE,CAAC,IAAME,GAAgBF,EAAE,CAAC,IAAMI,GACpCE,EAAK,IAAM,IAAM,CACfF,EAAaF,GAAgB,MAAM,CACrC,EACAK,EAAK,CAACH,EAAcF,CAAY,EAChCF,EAAE,CAAC,EAAIE,EACPF,EAAE,CAAC,EAAII,EACPJ,EAAE,CAAC,EAAIM,EACPN,EAAE,CAAC,EAAIO,IAEPD,EAAKN,EAAE,CAAC,EACRO,EAAKP,EAAE,CAAC,GAEVL,EAAUW,EAAIC,CAAE,EAChB,IAAIC,EACAC,EACJ,OAAIT,EAAE,CAAC,IAAMC,GAAaD,EAAE,CAAC,IAAMK,GAAML,EAAE,CAAC,IAAMI,GAChDI,EAAK,IAAM,CACLP,IAAcI,GAChBD,EAAaC,CAAE,CAEnB,EACAI,EAAK,CAACJ,EAAIJ,EAAWG,CAAY,EACjCJ,EAAE,CAAC,EAAIC,EACPD,EAAE,CAAC,EAAIK,EACPL,EAAE,CAAC,EAAII,EACPJ,EAAE,CAAC,EAAIQ,EACPR,EAAE,CAAC,EAAIS,IAEPD,EAAKR,EAAE,CAAC,EACRS,EAAKT,EAAE,CAAC,GAEVJ,EAAoBY,EAAIC,CAAE,EACnBJ,CACT",
6
+ "names": ["createReactContext", "use", "getErrorMessage", "hook", "provider", "createGuardedContext", "options", "defaultValue", "errorMessage", "hookName", "name", "providerName", "strict", "Context", "useContext", "requireContext", "context", "error", "_c", "useEffect", "useSafeLayoutEffect", "useControlledId", "useContextId", "t0", "$", "contextId", "defaultValue", "idProp", "setContextId", "id", "t1", "t2", "t3", "t4"]
7
+ }
@@ -0,0 +1,29 @@
1
+ import { type Dispatch, type SetStateAction } from "react";
2
+ /**
3
+ * @param contextId the id from context
4
+ * @param id the id passed to the component as a prop, typically optional.
5
+ * @param setContextId the context id setter.
6
+ * @param defaultValue optional default value for unsetting the field on unmounting.
7
+ */
8
+ export interface UseContextIdParams<T extends string | undefined = string | undefined> {
9
+ /**
10
+ * The id stored in context.
11
+ */
12
+ contextId: T;
13
+ /**
14
+ * optional default value for unsetting the field.
15
+ */
16
+ defaultValue?: T;
17
+ idProp: string | undefined;
18
+ /**
19
+ * The context id setter.
20
+ */
21
+ setContextId: Dispatch<SetStateAction<T>>;
22
+ }
23
+ /**
24
+ * Handles syncing an element's id with its parent context.
25
+ *
26
+ * @returns the controlled id
27
+ */
28
+ export declare function useContextId<T extends string | undefined = string | undefined>({ contextId, defaultValue, idProp, setContextId, }: UseContextIdParams<T>): string;
29
+ //# sourceMappingURL=use-context-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-context-id.d.ts","sourceRoot":"","sources":["../../src/context/use-context-id.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAA;AAKnE;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS;IAEjD;;OAEG;IACH,SAAS,EAAE,CAAC,CAAA;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,CAAA;IAEhB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAE1B;;OAEG;IACH,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,EACjD,EACA,SAAS,EACT,YAAY,EACZ,MAAM,EACN,YAAY,GACb,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,MAAM,CAgBhC"}
@@ -0,0 +1,2 @@
1
+ export * from "./use-descendants";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/descendants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import{useRef as o,useState as x}from"react";import{createGuardedContext as D}from"@qualcomm-ui/react-core/context";import{useSafeLayoutEffect as d}from"@qualcomm-ui/react-core/effects";import{useMergedRef as C}from"@qualcomm-ui/react-core/refs";import{DescendantsManager as g}from"@qualcomm-ui/utils/descendants";import{cast as s}from"@qualcomm-ui/utils/functions";function b(){let t=o(new g);return d(()=>()=>t.current.destroy()),t.current}var[N,a]=D({errorMessage:"useDescendantsContext must be used within DescendantsProvider",name:"DescendantsProvider"});function _(t){let n=a(t?.requireContext),[c,u]=x(-1),e=o(null),i=o(t?.onUnregister);d(()=>()=>{if(!e.current)return;let r=Number(e.current.dataset.index);Number.isNaN(r)||i.current?.(r),n.unregister(e.current)},[]),d(()=>{if(!e.current)return;let r=Number(e.current.dataset.index);c!==r&&!Number.isNaN(r)&&u(r)});let f=t?s(n?.register(t)):s(n?.register),m=C(f,e);return{descendants:n,enabledIndex:n?.enabledIndexOf(e.current),index:c,register:m}}function M(){return[s(N),()=>s(a()),()=>b(),e=>_(e)]}export{M as createDescendantContext};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/descendants/use-descendants.ts"],
4
+ "sourcesContent": ["import { useRef, useState } from \"react\";\nimport { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nimport { useSafeLayoutEffect } from \"@qualcomm-ui/react-core/effects\";\nimport { useMergedRef } from \"@qualcomm-ui/react-core/refs\";\nimport { DescendantsManager } from \"@qualcomm-ui/utils/descendants\";\nimport { cast } from \"@qualcomm-ui/utils/functions\";\nfunction useDescendants() {\n const descendants = useRef(new DescendantsManager());\n useSafeLayoutEffect(() => {\n return () => descendants.current.destroy();\n });\n return descendants.current;\n}\nconst [DescendantsContextProvider, useDescendantsContext] = createGuardedContext({\n errorMessage: \"useDescendantsContext must be used within DescendantsProvider\",\n name: \"DescendantsProvider\"\n});\nfunction useDescendant(options) {\n const descendants = useDescendantsContext(options?.requireContext);\n const [index, setIndex] = useState(-1);\n const ref = useRef(null);\n const onUnregisterRef = useRef(options?.onUnregister);\n useSafeLayoutEffect(() => {\n return () => {\n if (!ref.current) {\n return;\n }\n const dataIndex = Number(ref.current.dataset[\"index\"]);\n if (!Number.isNaN(dataIndex)) {\n onUnregisterRef.current?.(dataIndex);\n }\n descendants.unregister(ref.current);\n };\n }, []);\n useSafeLayoutEffect(() => {\n if (!ref.current) {\n return;\n }\n const dataIndex_0 = Number(ref.current.dataset[\"index\"]);\n if (index !== dataIndex_0 && !Number.isNaN(dataIndex_0)) {\n setIndex(dataIndex_0);\n }\n });\n const refCallback = options ? cast(descendants?.register(options)) : cast(descendants?.register);\n const mergedRefs = useMergedRef(refCallback, ref);\n return {\n descendants,\n enabledIndex: descendants?.enabledIndexOf(ref.current),\n index,\n register: mergedRefs\n };\n}\nexport function createDescendantContext() {\n const ContextProvider = cast(DescendantsContextProvider);\n const _useDescendantsContext = () =>\n // eslint-disable-next-line react-hooks/rules-of-hooks\n cast(useDescendantsContext());\n const _useDescendant = options =>\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useDescendant(options);\n const _useDescendants = () => useDescendants();\n return [\n // context provider\n ContextProvider,\n // call this when you need to read from context\n _useDescendantsContext,\n // descendants state information, to be called and passed to `ContextProvider`\n _useDescendants,\n // descendant index information\n _useDescendant];\n}"],
5
+ "mappings": "AAAA,OAAS,UAAAA,EAAQ,YAAAC,MAAgB,QACjC,OAAS,wBAAAC,MAA4B,kCACrC,OAAS,uBAAAC,MAA2B,kCACpC,OAAS,gBAAAC,MAAoB,+BA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Ref", "useState", "createGuardedContext", "useSafeLayoutEffect", "useMergedRef", "DescendantsManager", "cast", "useDescendants", "descendants", "DescendantsContextProvider", "useDescendantsContext", "useDescendant", "options", "index", "setIndex", "ref", "onUnregisterRef", "dataIndex", "dataIndex_0", "refCallback", "mergedRefs", "createDescendantContext"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import { type Provider, type RefCallback } from "react";
2
+ import { type DescendantOptions, DescendantsManager } from "@qualcomm-ui/utils/descendants";
3
+ export type UseDescendantsReturn<T extends HTMLElement = HTMLElement, K extends Record<string, any> = object> = DescendantsManager<T, K>;
4
+ export declare function createDescendantContext<T extends HTMLElement = HTMLElement, K extends Record<string, any> = object>(): readonly [Provider<DescendantsManager<T, K>>, () => DescendantsManager<T, K>, () => UseDescendantsReturn<T, K>, (options?: DescendantOptions<K>) => {
5
+ descendants: UseDescendantsReturn<HTMLElement, object>;
6
+ enabledIndex: number;
7
+ index: number;
8
+ register: RefCallback<T> | null;
9
+ }];
10
+ //# sourceMappingURL=use-descendants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-descendants.d.ts","sourceRoot":"","sources":["../../src/descendants/use-descendants.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAmB,MAAM,OAAO,CAAA;AAKvE,OAAO,EACL,KAAK,iBAAiB,EACtB,kBAAkB,EACnB,MAAM,gCAAgC,CAAA;AAGvC,MAAM,MAAM,oBAAoB,CAC9B,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,IACpC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AA8E5B,wBAAgB,uBAAuB,CACrC,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,gIASJ,iBAAiB,CAAC,CAAC,CAAC;;;;;GAiBvD"}
@@ -0,0 +1,81 @@
1
+ import type { ReactElement, ReactNode } from "react";
2
+ import { type DialogApiProps, type DialogCloseTriggerBindings, type DialogTriggerBindings } from "@qualcomm-ui/core/dialog";
3
+ import { type PresenceApiProps } from "@qualcomm-ui/core/presence";
4
+ import { type BindingRenderProp, type ElementRenderProp, type IdProp } from "@qualcomm-ui/react-core/system";
5
+ export interface CoreDialogRootProps extends DialogApiProps, PresenceApiProps {
6
+ /**
7
+ * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
8
+ */
9
+ children: ReactNode;
10
+ }
11
+ export declare function CoreDialogRoot(props: CoreDialogRootProps): ReactElement;
12
+ export interface CoreDialogContentProps extends IdProp, ElementRenderProp<"section"> {
13
+ /**
14
+ * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
15
+ */
16
+ children?: ReactNode;
17
+ }
18
+ export declare function CoreDialogContent({ children, id: idProp, ref, ...props }: CoreDialogContentProps): ReactNode;
19
+ export interface CoreDialogCloseTriggerProps extends IdProp {
20
+ /**
21
+ * {@link https://react-next.qui.qualcomm.com/render-props#binding-render-prop Render Prop}
22
+ * that provides or binds the event handlers and attributes to the child element.
23
+ *
24
+ * @inheritDoc
25
+ */
26
+ children: BindingRenderProp<DialogCloseTriggerBindings>;
27
+ }
28
+ export declare function CoreDialogCloseTrigger({ children, id, }: CoreDialogCloseTriggerProps): ReactElement;
29
+ export interface CoreDialogBackdropProps extends IdProp, ElementRenderProp<"div"> {
30
+ /**
31
+ * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
32
+ */
33
+ children?: ReactNode;
34
+ }
35
+ export declare function CoreDialogBackdrop({ children, id: idProp, ...props }: CoreDialogBackdropProps): ReactNode;
36
+ export interface CoreDialogBodyProps extends ElementRenderProp<"div"> {
37
+ /**
38
+ * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
39
+ */
40
+ children?: ReactNode;
41
+ }
42
+ export declare function CoreDialogBody({ children, ...props }: CoreDialogBodyProps): ReactElement;
43
+ export interface CoreDialogFooterProps extends ElementRenderProp<"div"> {
44
+ /**
45
+ * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
46
+ */
47
+ children?: ReactNode;
48
+ }
49
+ export declare function CoreDialogFooter(props: CoreDialogFooterProps): ReactElement;
50
+ export interface CoreDialogHeadingProps extends IdProp, ElementRenderProp<"h2"> {
51
+ /**
52
+ * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
53
+ */
54
+ children?: ReactNode;
55
+ }
56
+ export declare function CoreDialogHeading({ children, id, ...props }: CoreDialogHeadingProps): ReactElement;
57
+ export interface CoreDialogPositionerProps extends IdProp, ElementRenderProp<"div"> {
58
+ /**
59
+ * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
60
+ */
61
+ children?: ReactNode;
62
+ }
63
+ export declare function CoreDialogPositioner({ children, id: idProp, ...props }: CoreDialogPositionerProps): ReactNode;
64
+ export interface CoreDialogTriggerProps extends IdProp {
65
+ /**
66
+ * {@link https://react-next.qui.qualcomm.com/render-props#binding-render-prop Render Prop}
67
+ * used to wire up the dialog open behavior.
68
+ *
69
+ * @inheritDoc
70
+ */
71
+ children: BindingRenderProp<DialogTriggerBindings>;
72
+ }
73
+ export declare function CoreDialogTrigger({ children, id, }: CoreDialogTriggerProps): ReactElement;
74
+ export interface CoreDialogDescriptionProps extends IdProp, ElementRenderProp<"div"> {
75
+ /**
76
+ * React {@link https://react.dev/learn/passing-props-to-a-component#passing-jsx-as-children children} prop.
77
+ */
78
+ children?: ReactNode;
79
+ }
80
+ export declare function CoreDialogDescription({ children, id, ...props }: CoreDialogDescriptionProps): ReactElement;
81
+ //# sourceMappingURL=core-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/core-dialog.tsx"],"names":[],"mapp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G,KAAK,EACT,EAAE,0BAA0B,GAAG,YAAY,CAe3C"}
@@ -0,0 +1,3 @@
1
+ import type { DialogApi } from "@qualcomm-ui/core/dialog";
2
+ export declare const DialogContextProvider: import("react").Provider<DialogApi>, useDialogContext: (requireContext?: boolean) => DialogApi;
3
+ //# sourceMappingURL=dialog-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog-context.d.ts","sourceRoot":"","sources":["../../src/dialog/dialog-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAA;AAGvD,eAAO,MAAO,qBAAqB,uCAAE,gBAAgB,yCAKjD,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { CoreDialogBackdrop, type CoreDialogBackdropProps, CoreDialogBody, type CoreDialogBodyProps, CoreDialogCloseTrigger, type CoreDialogCloseTriggerProps, CoreDialogContent, type CoreDialogContentProps, CoreDialogDescription, type CoreDialogDescriptionProps, CoreDialogFooter, type CoreDialogFooterProps, CoreDialogHeading, type CoreDialogHeadingProps, CoreDialogPositioner, type CoreDialogPositionerProps, CoreDialogRoot, type CoreDialogRootProps, CoreDialogTrigger, type CoreDialogTriggerProps } from "./core-dialog";
2
+ export * from "./dialog-context";
3
+ export type { CoreDialogRootProps, CoreDialogContentProps, CoreDialogCloseTriggerProps, CoreDialogBackdropProps, CoreDialogBodyProps, CoreDialogFooterProps, CoreDialogHeadingProps, CoreDialogPositionerProps, CoreDialogTriggerProps, CoreDialogDescriptionProps, };
4
+ type CoreDialogComponent = {
5
+ Backdrop: typeof CoreDialogBackdrop;
6
+ Body: typeof CoreDialogBody;
7
+ CloseTrigger: typeof CoreDialogCloseTrigger;
8
+ Content: typeof CoreDialogContent;
9
+ Description: typeof CoreDialogDescription;
10
+ Footer: typeof CoreDialogFooter;
11
+ Heading: typeof CoreDialogHeading;
12
+ Positioner: typeof CoreDialogPositioner;
13
+ Root: typeof CoreDialogRoot;
14
+ Trigger: typeof CoreDialogTrigger;
15
+ };
16
+ export declare const CoreDialog: CoreDialogComponent;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,cAAc,EACd,KAAK,mBAAmB,EACxB,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,cAAc,EACd,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,KAAK,sBAAsB,EAC5B,MAAM,eAAe,CAAA;AAEtB,cAAc,kBAAkB,CAAA;AAEhC,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,GAC3B,CAAA;AAED,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,OAAO,kBAAkB,CAAA;IACnC,IAAI,EAAE,OAAO,cAAc,CAAA;IAC3B,YAAY,EAAE,OAAO,sBAAsB,CAAA;IAC3C,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,WAAW,EAAE,OAAO,qBAAqB,CAAA;IACzC,MAAM,EAAE,OAAO,gBAAgB,CAAA;IAC/B,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,UAAU,EAAE,OAAO,oBAAoB,CAAA;IACvC,IAAI,EAAE,OAAO,cAAc,CAAA;IAC3B,OAAO,EAAE,OAAO,iBAAiB,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,mBAWxB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import{c as D}from"react/compiler-runtime";import{jsx as g}from"react/jsx-runtime";import{createDialogApi as b,dialogMachine as j}from"@qualcomm-ui/core/dialog";import{splitPresenceProps as z,splitRenderStrategyProps as E}from"@qualcomm-ui/core/presence";import{useOnDestroy as m,useOnDestroyWhen as P}from"@qualcomm-ui/react-core/effects";import{normalizeProps as G,useMachine as I}from"@qualcomm-ui/react-core/machine";import{PresenceContextProvider as W,RenderStrategyPropsProvider as _,usePresence as f,usePresenceContext as x,useRenderStrategyPropsContext as q}from"@qualcomm-ui/react-core/presence";import{composeRefs as w}from"@qualcomm-ui/react-core/refs";import{useControlledId as a}from"@qualcomm-ui/react-core/state";import{bindingRenderProp as y,PolymorphicElement as u}from"@qualcomm-ui/react-core/system";import{mergeProps as l}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext as $}from"@qualcomm-ui/react-core/context";var[C,c]=$({hookName:"useDialogContext",providerName:"<DialogContextProvider>",strict:!0});function B(r){let[o,t]=z(r),{children:e,...i}=t,[n]=E(o),d=I(j,i),s=b(d,G),p=f(l({present:s.open},o));return g(C,{value:s,children:g(W,{value:p,children:g(_,{value:n,children:e})})})}function h({children:r,id:o,ref:t,...e}){let i=c(),n=x(),d=P(n.unmounted),s=a(o);if(n.unmounted)return null;let p=l(i.getContentBindings({id:s,onDestroy:d}),n.getPresenceBindings(),e);return g(u,{as:"section",...p,ref:w(n.ref,t),children:r})}function v(r){let{children:o,id:t}=r,e=c();return y(o,e.getCloseTriggerBindings({id:a(t),onDestroy:m()}))}function R(r){let o=D(3),{children:t,id:e,...i}=r,n=c(),d=q(),s;o[0]!==n.open||o[1]!==d?(s={...d,present:n.open},o[0]=n.open,o[1]=d,o[2]=s):s=o[2];let p=f(s),M=P(p.unmounted),N=a(e);if(p.unmounted)return null;let O=l(n.getBackdropBindings({id:N,onDestroy:M}),p.getPresenceBindings(),i);return g(u,{as:"div",...O,children:t})}function T(r){let{children:o,...t}=r,e=c(),i=l(e.getBodyBindings(),t);return g(u,{as:"div",...i,children:o})}function k(r){let o=D(3),t=c(),e;if(o[0]!==t||o[1]!==r){let i=l(t.getFooterBindings(),r);e=g(u,{as:"div",...i}),o[0]=t,o[1]=r,o[2]=e}else e=o[2];return e}function S(r){let{children:o,id:t,...e}=r,i=c(),n=l(i.getHeadingBindings({id:a(t),onDestroy:m()}),e);return g(u,{as:"h2",...n,children:o})}function F(r){let{children:o,id:t,...e}=r,i=c(),n=x(),d=a(t),s=m();if(n.unmounted)return null;let p=l(i.getPositionerBindings({id:d,onDestroy:s}),e);return g(u,{as:"div",...p,children:o})}function H(r){let{children:o,id:t}=r,e=c();return y(o,e.getTriggerBindings({id:a(t),onDestroy:m()}))}function A(r){let{children:o,id:t,...e}=r,i=c(),n=l(i.getDescriptionBindings({id:a(t),onDestroy:m()}),e);return g(u,{as:"div",...n,children:o})}var co={Backdrop:R,Body:T,CloseTrigger:v,Content:h,Description:A,Footer:k,Heading:S,Positioner:F,Root:B,Trigger:H};export{co as CoreDialog,C as DialogContextProvider,c as useDialogContext};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/dialog/core-dialog.tsx", "../../src/dialog/dialog-context.ts", "../../src/dialog/index.ts"],
4
+ "sourcesContent": ["import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { createDialogApi, dialogMachine } from \"@qualcomm-ui/core/dialog\";\nimport { splitPresenceProps, splitRenderStrategyProps } from \"@qualcomm-ui/core/presence\";\nimport { useOnDestroy, useOnDestroyWhen } from \"@qualcomm-ui/react-core/effects\";\nimport { normalizeProps, useMachine } from \"@qualcomm-ui/react-core/machine\";\nimport { PresenceContextProvider, RenderStrategyPropsProvider, usePresence, usePresenceContext, useRenderStrategyPropsContext } from \"@qualcomm-ui/react-core/presence\";\nimport { composeRefs } from \"@qualcomm-ui/react-core/refs\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { bindingRenderProp, PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { DialogContextProvider, useDialogContext } from \"./dialog-context\";\nexport function CoreDialogRoot(props) {\n const [presenceProps, t0] = splitPresenceProps(props);\n const {\n children,\n ...localProps\n } = t0;\n const [renderStrategyProps] = splitRenderStrategyProps(presenceProps);\n const machine = useMachine(dialogMachine, localProps);\n const dialogApi = createDialogApi(machine, normalizeProps);\n const presenceApi = usePresence(mergeProps({\n present: dialogApi.open\n }, presenceProps));\n return jsx(DialogContextProvider, {\n value: dialogApi,\n children: jsx(PresenceContextProvider, {\n value: presenceApi,\n children: jsx(RenderStrategyPropsProvider, {\n value: renderStrategyProps,\n children\n })\n })\n });\n}\nexport function CoreDialogContent({\n children,\n id: idProp,\n ref,\n ...props\n}) {\n const dialogContext = useDialogContext();\n const presence = usePresenceContext();\n const onDestroy = useOnDestroyWhen(presence.unmounted);\n const id = useControlledId(idProp);\n if (presence.unmounted) {\n return null;\n }\n const mergedProps = mergeProps(dialogContext.getContentBindings({\n id,\n onDestroy\n }), presence.getPresenceBindings(), props);\n return /* @__PURE__ */jsx(PolymorphicElement, {\n as: \"section\",\n ...mergedProps,\n ref: composeRefs(presence.ref, ref),\n children\n });\n}\nexport function CoreDialogCloseTrigger(t0) {\n const {\n children,\n id\n } = t0;\n const context = useDialogContext();\n return bindingRenderProp(children, context.getCloseTriggerBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }));\n}\nexport function CoreDialogBackdrop(t0) {\n const $ = _c(3);\n const {\n children,\n id: idProp,\n ...props\n } = t0;\n const dialogContext = useDialogContext();\n const renderStrategyProps = useRenderStrategyPropsContext();\n let t1;\n if ($[0] !== dialogContext.open || $[1] !== renderStrategyProps) {\n t1 = {\n ...renderStrategyProps,\n present: dialogContext.open\n };\n $[0] = dialogContext.open;\n $[1] = renderStrategyProps;\n $[2] = t1;\n } else {\n t1 = $[2];\n }\n const presence = usePresence(t1);\n const onDestroy = useOnDestroyWhen(presence.unmounted);\n const id = useControlledId(idProp);\n if (presence.unmounted) {\n return null;\n }\n const mergedProps = mergeProps(dialogContext.getBackdropBindings({\n id,\n onDestroy\n }), presence.getPresenceBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}\nexport function CoreDialogBody(t0) {\n const {\n children,\n ...props\n } = t0;\n const dialogContext = useDialogContext();\n const mergedProps = mergeProps(dialogContext.getBodyBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}\nexport function CoreDialogFooter(props) {\n const $ = _c(3);\n const dialogContext = useDialogContext();\n let t0;\n if ($[0] !== dialogContext || $[1] !== props) {\n const mergedProps = mergeProps(dialogContext.getFooterBindings(), props);\n t0 = jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n $[0] = dialogContext;\n $[1] = props;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}\nexport function CoreDialogHeading(t0) {\n const {\n children,\n id,\n ...props\n } = t0;\n const dialogContext = useDialogContext();\n const mergedProps = mergeProps(dialogContext.getHeadingBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"h2\",\n ...mergedProps,\n children\n });\n}\nexport function CoreDialogPositioner(t0) {\n const {\n children,\n id: idProp,\n ...props\n } = t0;\n const dialogContext = useDialogContext();\n const presence = usePresenceContext();\n const id = useControlledId(idProp);\n const onDestroy = useOnDestroy();\n if (presence.unmounted) {\n return null;\n }\n const mergedProps = mergeProps(dialogContext.getPositionerBindings({\n id,\n onDestroy\n }), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}\nexport function CoreDialogTrigger(t0) {\n const {\n children,\n id\n } = t0;\n const dialogContext = useDialogContext();\n return bindingRenderProp(children, dialogContext.getTriggerBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }));\n}\nexport function CoreDialogDescription(t0) {\n const {\n children,\n id,\n ...props\n } = t0;\n const dialogContext = useDialogContext();\n const mergedProps = mergeProps(dialogContext.getDescriptionBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [DialogContextProvider, useDialogContext] = createGuardedContext({\n hookName: \"useDialogContext\",\n providerName: \"<DialogContextProvider>\",\n strict: true\n});", "import { CoreDialogBackdrop, CoreDialogBody, CoreDialogCloseTrigger, CoreDialogContent, CoreDialogDescription, CoreDialogFooter, CoreDialogHeading, CoreDialogPositioner, CoreDialogRoot, CoreDialogTrigger } from \"./core-dialog\";\nexport * from \"./dialog-context\";\nexport const CoreDialog = {\n Backdrop: CoreDialogBackdrop,\n Body: CoreDialogBody,\n CloseTrigger: CoreDialogCloseTrigger,\n Content: CoreDialogContent,\n Description: CoreDialogDescription,\n Footer: CoreDialogFooter,\n Heading: CoreDialogHeading,\n Positioner: CoreDialogPositioner,\n Root: CoreDialogRoot,\n Trigger: CoreDialogTrigger\n};"],
5
+ "mappings": "AAAA,OAAS,KAAKA,MAAU,yBACxB,OAAS,OAAAC,MAAW,oBACpB,OAAS,mBAAAC,EAAiB,iBAAAC,MAAqB,2BAC/C,OAAS,sBAAAC,EAAoB,4BAAAC,MAAgC,6BAC7D,OAAS,gBAAAC,EAAc,oBAAAC,MAAwB,kCAC/C,OAAS,kBAAAC,EAAgB,cAAAC,MAAkB,kCAC3C,OAAS,2BAAAC,EAAyB,+BAAAC,EAA6B,eAAAC,EAAa,sBAAAC,EAAoB,iCAAAC,MAAqC,mCACrI,OAAS,eAAAC,MAAmB,+BAC5B,OAAS,mBAAAC,MAAuB,gCAChC,OAAS,qBAAAC,EAAmB,sBAAAC,MAA0B,iCACtD,OAAS,cAAAC,MAAkB,iCCV3B,OAAS,wBAAAC,MAA4B,kCAC9B,GAAM,CAACC,EAA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,EAAchB,EAAWQ,EAAc,uBAAuB,CAClE,GAAIO,EAAgBD,CAAE,EACtB,UAAWQ,EAAa,CAC1B,CAAC,EAAGtC,CAAK,EACT,OAAOiB,EAAIgB,EAAoB,CAC7B,GAAI,MACJ,GAAGD,EACH,SAAA5B,CACF,CAAC,CACH,CE3MO,IAAM8C,GAAa,CACxB,SAAUC,EACV,KAAMC,EACN,aAAcC,EACd,QAASC,EACT,YAAaC,EACb,OAAQC,EACR,QAASC,EACT,WAAYC,EACZ,KAAMC,EACN,QAASC,CACX",
6
+ "names": ["_c", "jsx", "createDialogApi", "dialogMachine", "splitPresenceProps", "splitRenderStrategyProps", "useOnDestroy", "useOnDestroyWhen", "normalizeProps", "useMachine", "PresenceContextProvider", "RenderStrategyPropsProvider", "usePresence", "usePresenceContext", "useRenderStrategyPropsContext", "composeRefs", "useControlledId", "bindingRenderProp", "PolymorphicElement", "mergeProps", "createGuardedContext", "DialogContextProvider", "useDialogContext", "CoreDialogRoot", "props", "presenceProps", "t0", "splitPresenceProps", "children", "localProps", "renderStrategyProps", "splitRenderStrategyProps", "machine", "useMachine", "dialogMachine", "dialogApi", "createDialogApi", "normalizeProps", "presenceApi", "usePresence", "mergeProps", "jsx", "DialogContextProvider", "PresenceContextProvider", "RenderStrategyPropsProvider", "CoreDialogContent", "idProp", "ref", "dialogContext", "useDialogContext", "presence", "usePresenceContext", "onDestroy", "useOnDestroyWhen", "id", "useControlledId", "mergedProps", "PolymorphicElement", "composeRefs", "CoreDialogCloseTrigger", "context", "bindingRenderProp", "useOnDestroy", "CoreDialogBackdrop", "$", "_c", "useRenderStrategyPropsContext", "t1", "CoreDialogBody", "CoreDialogFooter", "CoreDialogHeading", "CoreDialogPositioner", "CoreDialogTrigger", "CoreDialogDescription", "CoreDialog", "CoreDialogBackdrop", "CoreDialogBody", "CoreDialogCloseTrigger", "CoreDialogContent", "CoreDialogDescription", "CoreDialogFooter", "CoreDialogHeading", "CoreDialogPositioner", "CoreDialogRoot", "CoreDialogTrigger"]
7
+ }
@@ -0,0 +1,9 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ /**
3
+ * Gets only the valid children of a component,
4
+ * and ignores any nullish or falsy child.
5
+ *
6
+ * @param children the children
7
+ */
8
+ export declare function getValidChildren(children: ReactNode): ReactElement[];
9
+ //# sourceMappingURL=get-valid-children.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-valid-children.d.ts","sourceRoot":"","sources":["../../src/dom/get-valid-children.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAEd;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,GAG7C,YAAY,EAAE,CACpB"}
@@ -0,0 +1,10 @@
1
+ export * from "./get-valid-children";
2
+ export * from "./is-action-element";
3
+ export * from "./use-clickable";
4
+ export * from "./use-event-listeners";
5
+ export * from "./use-grouped-children";
6
+ export * from "./use-intersection-observer";
7
+ export * from "./use-mutation-observer";
8
+ export * from "./use-real-shape";
9
+ export * from "./use-sizes";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA"}
@@ -0,0 +1,2 @@
1
+ import{Children as F,isValidElement as Q}from"react";function we(t){return F.toArray(t).filter(e=>Q(e))}function ve(t){return t.tagName==="BUTTON"||t.tagName==="A"}import{useCallback as w,useState as L}from"react";import{useMergedRef as j}from"@qualcomm-ui/react-core/refs";import{booleanDataAttr as _}from"@qualcomm-ui/utils/attributes";import{useCallback as R,useEffect as Y,useRef as Z}from"react";function P(){let t=Z(new Map),e=t.current,n=R((u,i,s,c)=>{t.current.set(s,{el:u,options:c,type:i}),u.addEventListener(i,s,c)},[]),r=R((u,i,s,c)=>{u.removeEventListener(i,s,c),t.current.delete(s)},[]);return Y(()=>()=>{e.forEach((u,i)=>{r(u.el,u.type,i,u.options)})},[r,e]),{add:n,remove:r}}function M(t){let e=t.target,{isContentEditable:n,tagName:r}=e;return r!=="INPUT"&&r!=="TEXTAREA"&&n!==!0}function Ae(t={}){let{clickOnEnter:e=!0,clickOnSpace:n=!0,disabled:r,onClick:u,onKeyDown:i,onKeyUp:s,onMouseDown:c,onMouseLeave:a,onMouseOver:d,onMouseUp:p,readOnly:f,ref:S,tabIndex:m,...g}=t,[l,v]=L(!0),[y,h]=L(!1),b=P(),x=o=>{o&&o.tagName!=="BUTTON"&&v(!1)},A=l?m:m||0,C=r&&!f,N=w(o=>{if(r){o.stopPropagation(),o.preventDefault();return}o.currentTarget.focus(),f||u?.(o)},[r,u,f]),k=w(o=>{y&&M(o)&&(o.preventDefault(),o.stopPropagation(),h(!1),b.remove(document,"keyup",k,!1))},[y,b]),V=w(o=>{if(i?.(o),r||o.defaultPrevented||o.metaKey||f||!M(o.nativeEvent)||l)return;let E=e&&o.key==="Enter";n&&o.key===" "&&(o.preventDefault(),h(!0)),E&&(o.preventDefault(),o.currentTarget.click()),b.add(document,"keyup",k,!1)},[i,r,f,l,e,n,b,k]),H=w(o=>{if(s?.(o),r||o.defaultPrevented||o.metaKey||f||!M(o.nativeEvent)||l)return;n&&o.key===" "&&(o.preventDefault(),h(!1),o.currentTarget.click())},[n,r,l,s,f]),D=w(o=>{o.button===0&&(h(!1),b.remove(document,"mouseup",D,!1))},[b]),W=w(o=>{if(o.button!==0)return;if(r){o.stopPropagation(),o.preventDefault();return}l||h(!0),o.currentTarget.focus({preventScroll:!0}),b.add(document,"mouseup",D,!1),c?.(o)},[r,l,b,D,c]),G=w(o=>{o.button===0&&(l||h(!1),p?.(o))},[p,l]),J=w(o=>{if(r){o.preventDefault();return}d?.(o)},[r,d]),X=w(o=>{y&&(o.preventDefault(),h(!1)),a?.(o)},[y,a]),I=j(S,x);return l?{...g,"aria-disabled":C?void 0:r,disabled:C,onClick:N,onKeyDown:i,onKeyUp:s,onMouseDown:c,onMouseLeave:a,onMouseOver:d,onMouseUp:p,ref:I,tabIndex:A,type:"button"}:{...g,"aria-disabled":r?"true":void 0,"data-active":_(y),disabled:r,onClick:N,onKeyDown:V,onKeyUp:H,onMouseDown:W,onMouseLeave:X,onMouseOver:J,onMouseUp:G,ref:I,role:"button",tabIndex:C?void 0:A}}import{c as ee}from"react/compiler-runtime";import{Children as T,cloneElement as te,isValidElement as re}from"react";import{booleanDataAttr as O}from"@qualcomm-ui/utils/attributes";function Te(t){let e=ee(8),n=T.count(t),r;if(e[0]!==t||e[1]!==n){let i;e[3]!==n?(i=(s,c)=>{let a=s.props;return te(s,{...a,"data-between":O(c>0&&c<n-1),"data-first":O(c===0),"data-group-count":n,"data-group-index":c,"data-group-item":"","data-last":O(c===n-1)})},e[3]=n,e[4]=i):i=e[4],r=T.toArray(t).filter(re).map(i),e[0]=t,e[1]=n,e[2]=r}else r=e[2];let u;return e[5]!==n||e[6]!==r?(u={children:r,count:n},e[5]=n,e[6]=r,e[7]=u):u=e[7],u}import{useEffect as U,useRef as z,useState as K}from"react";function Ke({freezeOnceVisible:t=!1,initialIsIntersecting:e=!1,onChange:n,root:r=null,rootMargin:u="0%",threshold:i=0}={}){let[s,c]=K(null),[a,d]=K(()=>({entry:void 0,isIntersecting:e})),p=z(null);p.current=n;let f=a.entry?.isIntersecting&&t;U(()=>{if(!s||!("IntersectionObserver"in window)||f)return;let g,l=new IntersectionObserver(v=>{let y=Array.isArray(l.thresholds)?l.thresholds:[l.thresholds];v.forEach(h=>{let b=h.isIntersecting&&y.some(x=>h.intersectionRatio>=x);d({entry:h,isIntersecting:b}),p.current&&p.current(b,h),b&&t&&g&&(g(),g=void 0)})},{root:r,rootMargin:u,threshold:i});return l.observe(s),()=>{l.disconnect()}},[s,JSON.stringify(i),r,u,f,t]);let S=z(null);U(()=>{!s&&a.entry?.target&&!t&&!f&&S.current!==a.entry.target&&(S.current=a.entry.target,d({entry:void 0,isIntersecting:e}))},[s,a.entry,t,f,e]);let m=[c,!!a.isIntersecting,a.entry];return m.ref=m[0],m.isIntersecting=m[1],m.entry=m[2],m}import{c as oe}from"react/compiler-runtime";import{useEffect as ne}from"react";var se={attributes:!0,characterData:!0,childList:!0,subtree:!0};function He(t,e,n){let r=oe(5),u=n===void 0?se:n,i,s;r[0]!==e||r[1]!==u||r[2]!==t?(i=()=>{if(t.current){let c=new MutationObserver(e);return c.observe(t.current,u),()=>{c.disconnect()}}},s=[e,u,t],r[0]=e,r[1]=u,r[2]=t,r[3]=i,r[4]=s):(i=r[3],s=r[4]),ne(i,s)}import{c as ie}from"react/compiler-runtime";import{useEffect as ue,useState as ce}from"react";var ae=t=>{let e={height:0,width:0};if(!t||typeof window>"u")return e;let n=t.getBoundingClientRect(),{height:r,width:u}=window.getComputedStyle(t),i=(s,c)=>{if(!s)return 0;let a=s.includes("px")?+s.split("px")[0]:s.includes("%")?+s.split("%")[0]*c*.01:s;return Number.isNaN(+a)?0:+a};return{height:i(`${r}`,n.height),width:i(`${u}`,n.width)}},qe=t=>{let e=ie(9),n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={height:0,width:0},e[0]=n):n=e[0];let[r,u]=ce(n),i;e[1]!==t?(i=()=>{let{height:p,width:f}=ae(t.current);u({height:p,width:f})},e[1]=t,e[2]=i):i=e[2];let s=i,c,a;e[3]!==s?(c=()=>s(),a=[s],e[3]=s,e[4]=c,e[5]=a):(c=e[4],a=e[5]),ue(c,a);let d;return e[6]!==r||e[7]!==s?(d=[r,s],e[6]=r,e[7]=s,e[8]=d):d=e[8],d};import{c as $}from"react/compiler-runtime";import{useState as B}from"react";import{useSafeLayoutEffect as fe}from"@qualcomm-ui/react-core/effects";function le(t,e){if(!t){e(void 0);return}e({height:t.offsetHeight,width:t.offsetWidth});let n=t.ownerDocument.defaultView??window,r=new n.ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;let[i]=u,s,c;if("borderBoxSize"in i){let a=i.borderBoxSize,d=Array.isArray(a)?a[0]:a;s=d.inlineSize,c=d.blockSize}else s=t.offsetWidth,c=t.offsetHeight;e({height:c,width:s})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}function de(t,e){if(!t||!t.parentElement)return;let n=t.ownerDocument?.defaultView??window,r=new n.MutationObserver(()=>{e()});return r.observe(t.parentElement,{childList:!0}),()=>{r.disconnect()}}function pe(t){let e=$(6),{getNodes:n,observeMutation:r}=t,u=r===void 0?!0:r,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[0]=i):i=e[0];let[s,c]=B(i),[a,d]=B(0),p;e[1]!==n||e[2]!==u?(p=()=>{let S=n(),m=S.map((g,l)=>le(g,v=>{c(y=>[...y.slice(0,l),v,...y.slice(l+1)])}));if(u){let g=S[0];m.push(de(g,()=>{d(he)}))}return()=>{m.forEach(me)}},e[1]=n,e[2]=u,e[3]=p):p=e[3];let f;return e[4]!==a?(f=[a],e[4]=a,e[5]=f):f=e[5],fe(p,f),s}function me(t){t?.()}function he(t){return t+1}function be(t){return typeof t=="object"&&t!==null&&"current"in t}function je(t){let e=$(2),n;e[0]!==t?(n={getNodes(){return[be(t)?t.current:t]},observeMutation:!1},e[0]=t,e[1]=n):n=e[1];let[r]=pe(n);return r}export{ae as getRealShape,we as getValidChildren,ve as isActionElement,le as trackElementSize,Ae as useClickable,P as useEventListeners,Te as useGroupedChildren,Ke as useIntersectionObserver,He as useMutationObserver,qe as useRealShape,je as useSize,pe as useSizes};
2
+ //# sourceMappingURL=index.js.map