@depup/react-aria-components 1.16.0-depup.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 (661) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +31 -0
  3. package/changes.json +10 -0
  4. package/dist/Autocomplete.main.js +78 -0
  5. package/dist/Autocomplete.main.js.map +1 -0
  6. package/dist/Autocomplete.mjs +67 -0
  7. package/dist/Autocomplete.module.js +67 -0
  8. package/dist/Autocomplete.module.js.map +1 -0
  9. package/dist/Breadcrumbs.main.js +103 -0
  10. package/dist/Breadcrumbs.main.js.map +1 -0
  11. package/dist/Breadcrumbs.mjs +92 -0
  12. package/dist/Breadcrumbs.module.js +92 -0
  13. package/dist/Breadcrumbs.module.js.map +1 -0
  14. package/dist/Button.main.js +123 -0
  15. package/dist/Button.main.js.map +1 -0
  16. package/dist/Button.mjs +113 -0
  17. package/dist/Button.module.js +113 -0
  18. package/dist/Button.module.js.map +1 -0
  19. package/dist/Calendar.main.js +364 -0
  20. package/dist/Calendar.main.js.map +1 -0
  21. package/dist/Calendar.mjs +345 -0
  22. package/dist/Calendar.module.js +345 -0
  23. package/dist/Calendar.module.js.map +1 -0
  24. package/dist/Checkbox.main.js +188 -0
  25. package/dist/Checkbox.main.js.map +1 -0
  26. package/dist/Checkbox.mjs +176 -0
  27. package/dist/Checkbox.module.js +176 -0
  28. package/dist/Checkbox.module.js.map +1 -0
  29. package/dist/Collection.main.js +105 -0
  30. package/dist/Collection.main.js.map +1 -0
  31. package/dist/Collection.mjs +91 -0
  32. package/dist/Collection.module.js +91 -0
  33. package/dist/Collection.module.js.map +1 -0
  34. package/dist/ColorArea.main.js +80 -0
  35. package/dist/ColorArea.main.js.map +1 -0
  36. package/dist/ColorArea.mjs +70 -0
  37. package/dist/ColorArea.module.js +70 -0
  38. package/dist/ColorArea.module.js.map +1 -0
  39. package/dist/ColorField.main.js +168 -0
  40. package/dist/ColorField.main.js.map +1 -0
  41. package/dist/ColorField.mjs +158 -0
  42. package/dist/ColorField.module.js +158 -0
  43. package/dist/ColorField.module.js.map +1 -0
  44. package/dist/ColorPicker.main.js +102 -0
  45. package/dist/ColorPicker.main.js.map +1 -0
  46. package/dist/ColorPicker.mjs +91 -0
  47. package/dist/ColorPicker.module.js +91 -0
  48. package/dist/ColorPicker.module.js.map +1 -0
  49. package/dist/ColorSlider.main.js +112 -0
  50. package/dist/ColorSlider.main.js.map +1 -0
  51. package/dist/ColorSlider.mjs +102 -0
  52. package/dist/ColorSlider.module.js +102 -0
  53. package/dist/ColorSlider.module.js.map +1 -0
  54. package/dist/ColorSwatch.main.js +44 -0
  55. package/dist/ColorSwatch.main.js.map +1 -0
  56. package/dist/ColorSwatch.mjs +34 -0
  57. package/dist/ColorSwatch.module.js +34 -0
  58. package/dist/ColorSwatch.module.js.map +1 -0
  59. package/dist/ColorSwatchPicker.main.js +102 -0
  60. package/dist/ColorSwatchPicker.main.js.map +1 -0
  61. package/dist/ColorSwatchPicker.mjs +95 -0
  62. package/dist/ColorSwatchPicker.module.js +95 -0
  63. package/dist/ColorSwatchPicker.module.js.map +1 -0
  64. package/dist/ColorThumb.main.js +67 -0
  65. package/dist/ColorThumb.main.js.map +1 -0
  66. package/dist/ColorThumb.mjs +57 -0
  67. package/dist/ColorThumb.module.js +57 -0
  68. package/dist/ColorThumb.module.js.map +1 -0
  69. package/dist/ColorWheel.main.js +102 -0
  70. package/dist/ColorWheel.main.js.map +1 -0
  71. package/dist/ColorWheel.mjs +90 -0
  72. package/dist/ColorWheel.module.js +90 -0
  73. package/dist/ColorWheel.module.js.map +1 -0
  74. package/dist/ComboBox.main.js +322 -0
  75. package/dist/ComboBox.main.js.map +1 -0
  76. package/dist/ComboBox.mjs +309 -0
  77. package/dist/ComboBox.module.js +309 -0
  78. package/dist/ComboBox.module.js.map +1 -0
  79. package/dist/DateField.main.js +361 -0
  80. package/dist/DateField.main.js.map +1 -0
  81. package/dist/DateField.mjs +345 -0
  82. package/dist/DateField.module.js +345 -0
  83. package/dist/DateField.module.js.map +1 -0
  84. package/dist/DatePicker.main.js +342 -0
  85. package/dist/DatePicker.main.js.map +1 -0
  86. package/dist/DatePicker.mjs +328 -0
  87. package/dist/DatePicker.module.js +328 -0
  88. package/dist/DatePicker.module.js.map +1 -0
  89. package/dist/Dialog.main.js +167 -0
  90. package/dist/Dialog.main.js.map +1 -0
  91. package/dist/Dialog.mjs +155 -0
  92. package/dist/Dialog.module.js +155 -0
  93. package/dist/Dialog.module.js.map +1 -0
  94. package/dist/Disclosure.main.js +171 -0
  95. package/dist/Disclosure.main.js.map +1 -0
  96. package/dist/Disclosure.mjs +157 -0
  97. package/dist/Disclosure.module.js +157 -0
  98. package/dist/Disclosure.module.js.map +1 -0
  99. package/dist/DragAndDrop.main.js +103 -0
  100. package/dist/DragAndDrop.main.js.map +1 -0
  101. package/dist/DragAndDrop.mjs +90 -0
  102. package/dist/DragAndDrop.module.js +90 -0
  103. package/dist/DragAndDrop.module.js.map +1 -0
  104. package/dist/DropZone.main.js +127 -0
  105. package/dist/DropZone.main.js.map +1 -0
  106. package/dist/DropZone.mjs +121 -0
  107. package/dist/DropZone.module.js +121 -0
  108. package/dist/DropZone.module.js.map +1 -0
  109. package/dist/FieldError.main.js +61 -0
  110. package/dist/FieldError.main.js.map +1 -0
  111. package/dist/FieldError.mjs +51 -0
  112. package/dist/FieldError.module.js +51 -0
  113. package/dist/FieldError.module.js.map +1 -0
  114. package/dist/FileTrigger.main.js +60 -0
  115. package/dist/FileTrigger.main.js.map +1 -0
  116. package/dist/FileTrigger.mjs +51 -0
  117. package/dist/FileTrigger.module.js +51 -0
  118. package/dist/FileTrigger.module.js.map +1 -0
  119. package/dist/Form.main.js +49 -0
  120. package/dist/Form.main.js.map +1 -0
  121. package/dist/Form.mjs +39 -0
  122. package/dist/Form.module.js +39 -0
  123. package/dist/Form.module.js.map +1 -0
  124. package/dist/GridList.main.js +589 -0
  125. package/dist/GridList.main.js.map +1 -0
  126. package/dist/GridList.mjs +573 -0
  127. package/dist/GridList.module.js +573 -0
  128. package/dist/GridList.module.js.map +1 -0
  129. package/dist/Group.main.js +72 -0
  130. package/dist/Group.main.js.map +1 -0
  131. package/dist/Group.mjs +62 -0
  132. package/dist/Group.module.js +62 -0
  133. package/dist/Group.module.js.map +1 -0
  134. package/dist/Header.main.js +40 -0
  135. package/dist/Header.main.js.map +1 -0
  136. package/dist/Header.mjs +30 -0
  137. package/dist/Header.module.js +30 -0
  138. package/dist/Header.module.js.map +1 -0
  139. package/dist/Heading.main.js +40 -0
  140. package/dist/Heading.main.js.map +1 -0
  141. package/dist/Heading.mjs +31 -0
  142. package/dist/Heading.module.js +31 -0
  143. package/dist/Heading.module.js.map +1 -0
  144. package/dist/HiddenDateInput.main.js +126 -0
  145. package/dist/HiddenDateInput.main.js.map +1 -0
  146. package/dist/HiddenDateInput.mjs +117 -0
  147. package/dist/HiddenDateInput.module.js +117 -0
  148. package/dist/HiddenDateInput.module.js.map +1 -0
  149. package/dist/Input.main.js +72 -0
  150. package/dist/Input.main.js.map +1 -0
  151. package/dist/Input.mjs +62 -0
  152. package/dist/Input.module.js +62 -0
  153. package/dist/Input.module.js.map +1 -0
  154. package/dist/Keyboard.main.js +38 -0
  155. package/dist/Keyboard.main.js.map +1 -0
  156. package/dist/Keyboard.mjs +28 -0
  157. package/dist/Keyboard.module.js +28 -0
  158. package/dist/Keyboard.module.js.map +1 -0
  159. package/dist/Label.main.js +43 -0
  160. package/dist/Label.main.js.map +1 -0
  161. package/dist/Label.mjs +33 -0
  162. package/dist/Label.module.js +33 -0
  163. package/dist/Label.module.js.map +1 -0
  164. package/dist/Link.main.js +72 -0
  165. package/dist/Link.main.js.map +1 -0
  166. package/dist/Link.mjs +62 -0
  167. package/dist/Link.module.js +62 -0
  168. package/dist/Link.module.js.map +1 -0
  169. package/dist/ListBox.main.js +477 -0
  170. package/dist/ListBox.main.js.map +1 -0
  171. package/dist/ListBox.mjs +463 -0
  172. package/dist/ListBox.module.js +463 -0
  173. package/dist/ListBox.module.js.map +1 -0
  174. package/dist/Menu.main.js +459 -0
  175. package/dist/Menu.main.js.map +1 -0
  176. package/dist/Menu.mjs +443 -0
  177. package/dist/Menu.module.js +443 -0
  178. package/dist/Menu.module.js.map +1 -0
  179. package/dist/Meter.main.js +72 -0
  180. package/dist/Meter.main.js.map +1 -0
  181. package/dist/Meter.mjs +62 -0
  182. package/dist/Meter.module.js +62 -0
  183. package/dist/Meter.module.js.map +1 -0
  184. package/dist/Modal.main.js +191 -0
  185. package/dist/Modal.main.js.map +1 -0
  186. package/dist/Modal.mjs +180 -0
  187. package/dist/Modal.module.js +180 -0
  188. package/dist/Modal.module.js.map +1 -0
  189. package/dist/NumberField.main.js +147 -0
  190. package/dist/NumberField.main.js.map +1 -0
  191. package/dist/NumberField.mjs +136 -0
  192. package/dist/NumberField.module.js +136 -0
  193. package/dist/NumberField.module.js.map +1 -0
  194. package/dist/OverlayArrow.main.js +64 -0
  195. package/dist/OverlayArrow.main.js.map +1 -0
  196. package/dist/OverlayArrow.mjs +54 -0
  197. package/dist/OverlayArrow.module.js +54 -0
  198. package/dist/OverlayArrow.module.js.map +1 -0
  199. package/dist/Popover.main.js +196 -0
  200. package/dist/Popover.main.js.map +1 -0
  201. package/dist/Popover.mjs +186 -0
  202. package/dist/Popover.module.js +186 -0
  203. package/dist/Popover.module.js.map +1 -0
  204. package/dist/ProgressBar.main.js +73 -0
  205. package/dist/ProgressBar.main.js.map +1 -0
  206. package/dist/ProgressBar.mjs +63 -0
  207. package/dist/ProgressBar.module.js +63 -0
  208. package/dist/ProgressBar.module.js.map +1 -0
  209. package/dist/RSPContexts.main.js +37 -0
  210. package/dist/RSPContexts.main.js.map +1 -0
  211. package/dist/RSPContexts.mjs +25 -0
  212. package/dist/RSPContexts.module.js +25 -0
  213. package/dist/RSPContexts.module.js.map +1 -0
  214. package/dist/RadioGroup.main.js +184 -0
  215. package/dist/RadioGroup.main.js.map +1 -0
  216. package/dist/RadioGroup.mjs +171 -0
  217. package/dist/RadioGroup.module.js +171 -0
  218. package/dist/RadioGroup.module.js.map +1 -0
  219. package/dist/SearchField.main.js +140 -0
  220. package/dist/SearchField.main.js.map +1 -0
  221. package/dist/SearchField.mjs +130 -0
  222. package/dist/SearchField.module.js +130 -0
  223. package/dist/SearchField.module.js.map +1 -0
  224. package/dist/Select.main.js +324 -0
  225. package/dist/Select.main.js.map +1 -0
  226. package/dist/Select.mjs +315 -0
  227. package/dist/Select.module.js +315 -0
  228. package/dist/Select.module.js.map +1 -0
  229. package/dist/SelectionIndicator.main.js +45 -0
  230. package/dist/SelectionIndicator.main.js.map +1 -0
  231. package/dist/SelectionIndicator.mjs +35 -0
  232. package/dist/SelectionIndicator.module.js +35 -0
  233. package/dist/SelectionIndicator.module.js.map +1 -0
  234. package/dist/Separator.main.js +71 -0
  235. package/dist/Separator.main.js.map +1 -0
  236. package/dist/Separator.mjs +61 -0
  237. package/dist/Separator.module.js +61 -0
  238. package/dist/Separator.module.js.map +1 -0
  239. package/dist/SharedElementTransition.main.js +140 -0
  240. package/dist/SharedElementTransition.main.js.map +1 -0
  241. package/dist/SharedElementTransition.mjs +130 -0
  242. package/dist/SharedElementTransition.module.js +130 -0
  243. package/dist/SharedElementTransition.module.js.map +1 -0
  244. package/dist/Slider.main.js +220 -0
  245. package/dist/Slider.main.js.map +1 -0
  246. package/dist/Slider.mjs +204 -0
  247. package/dist/Slider.module.js +204 -0
  248. package/dist/Slider.module.js.map +1 -0
  249. package/dist/Switch.main.js +89 -0
  250. package/dist/Switch.main.js.map +1 -0
  251. package/dist/Switch.mjs +79 -0
  252. package/dist/Switch.module.js +79 -0
  253. package/dist/Switch.module.js.map +1 -0
  254. package/dist/Table.main.js +1171 -0
  255. package/dist/Table.main.js.map +1 -0
  256. package/dist/Table.mjs +1154 -0
  257. package/dist/Table.module.js +1154 -0
  258. package/dist/Table.module.js.map +1 -0
  259. package/dist/TableLayout.main.js +38 -0
  260. package/dist/TableLayout.main.js.map +1 -0
  261. package/dist/TableLayout.mjs +33 -0
  262. package/dist/TableLayout.module.js +33 -0
  263. package/dist/TableLayout.module.js.map +1 -0
  264. package/dist/Tabs.main.js +330 -0
  265. package/dist/Tabs.main.js.map +1 -0
  266. package/dist/Tabs.mjs +315 -0
  267. package/dist/Tabs.module.js +315 -0
  268. package/dist/Tabs.module.js.map +1 -0
  269. package/dist/TagGroup.main.js +255 -0
  270. package/dist/TagGroup.main.js.map +1 -0
  271. package/dist/TagGroup.mjs +242 -0
  272. package/dist/TagGroup.module.js +242 -0
  273. package/dist/TagGroup.module.js.map +1 -0
  274. package/dist/Text.main.js +41 -0
  275. package/dist/Text.main.js.map +1 -0
  276. package/dist/Text.mjs +31 -0
  277. package/dist/Text.module.js +31 -0
  278. package/dist/Text.module.js.map +1 -0
  279. package/dist/TextArea.main.js +57 -0
  280. package/dist/TextArea.main.js.map +1 -0
  281. package/dist/TextArea.mjs +47 -0
  282. package/dist/TextArea.module.js +47 -0
  283. package/dist/TextArea.module.js.map +1 -0
  284. package/dist/TextField.main.js +145 -0
  285. package/dist/TextField.main.js.map +1 -0
  286. package/dist/TextField.mjs +135 -0
  287. package/dist/TextField.module.js +135 -0
  288. package/dist/TextField.module.js.map +1 -0
  289. package/dist/Toast.main.js +183 -0
  290. package/dist/Toast.main.js.map +1 -0
  291. package/dist/Toast.mjs +170 -0
  292. package/dist/Toast.module.js +170 -0
  293. package/dist/Toast.module.js.map +1 -0
  294. package/dist/ToggleButton.main.js +96 -0
  295. package/dist/ToggleButton.main.js.map +1 -0
  296. package/dist/ToggleButton.mjs +86 -0
  297. package/dist/ToggleButton.module.js +86 -0
  298. package/dist/ToggleButton.module.js.map +1 -0
  299. package/dist/ToggleButtonGroup.main.js +66 -0
  300. package/dist/ToggleButtonGroup.main.js.map +1 -0
  301. package/dist/ToggleButtonGroup.mjs +55 -0
  302. package/dist/ToggleButtonGroup.module.js +55 -0
  303. package/dist/ToggleButtonGroup.module.js.map +1 -0
  304. package/dist/Toolbar.main.js +55 -0
  305. package/dist/Toolbar.main.js.map +1 -0
  306. package/dist/Toolbar.mjs +45 -0
  307. package/dist/Toolbar.module.js +45 -0
  308. package/dist/Toolbar.module.js.map +1 -0
  309. package/dist/Tooltip.main.js +132 -0
  310. package/dist/Tooltip.main.js.map +1 -0
  311. package/dist/Tooltip.mjs +120 -0
  312. package/dist/Tooltip.module.js +120 -0
  313. package/dist/Tooltip.module.js.map +1 -0
  314. package/dist/Tree.main.js +834 -0
  315. package/dist/Tree.main.js.map +1 -0
  316. package/dist/Tree.mjs +818 -0
  317. package/dist/Tree.module.js +818 -0
  318. package/dist/Tree.module.js.map +1 -0
  319. package/dist/TreeDropTargetDelegate.main.js +216 -0
  320. package/dist/TreeDropTargetDelegate.main.js.map +1 -0
  321. package/dist/TreeDropTargetDelegate.mjs +211 -0
  322. package/dist/TreeDropTargetDelegate.module.js +211 -0
  323. package/dist/TreeDropTargetDelegate.module.js.map +1 -0
  324. package/dist/Virtualizer.main.js +135 -0
  325. package/dist/Virtualizer.main.js.map +1 -0
  326. package/dist/Virtualizer.mjs +126 -0
  327. package/dist/Virtualizer.module.js +126 -0
  328. package/dist/Virtualizer.module.js.map +1 -0
  329. package/dist/ar-AE.main.js +9 -0
  330. package/dist/ar-AE.main.js.map +1 -0
  331. package/dist/ar-AE.mjs +11 -0
  332. package/dist/ar-AE.module.js +11 -0
  333. package/dist/ar-AE.module.js.map +1 -0
  334. package/dist/bg-BG.main.js +9 -0
  335. package/dist/bg-BG.main.js.map +1 -0
  336. package/dist/bg-BG.mjs +11 -0
  337. package/dist/bg-BG.module.js +11 -0
  338. package/dist/bg-BG.module.js.map +1 -0
  339. package/dist/cs-CZ.main.js +9 -0
  340. package/dist/cs-CZ.main.js.map +1 -0
  341. package/dist/cs-CZ.mjs +11 -0
  342. package/dist/cs-CZ.module.js +11 -0
  343. package/dist/cs-CZ.module.js.map +1 -0
  344. package/dist/da-DK.main.js +9 -0
  345. package/dist/da-DK.main.js.map +1 -0
  346. package/dist/da-DK.mjs +11 -0
  347. package/dist/da-DK.module.js +11 -0
  348. package/dist/da-DK.module.js.map +1 -0
  349. package/dist/de-DE.main.js +9 -0
  350. package/dist/de-DE.main.js.map +1 -0
  351. package/dist/de-DE.mjs +11 -0
  352. package/dist/de-DE.module.js +11 -0
  353. package/dist/de-DE.module.js.map +1 -0
  354. package/dist/el-GR.main.js +9 -0
  355. package/dist/el-GR.main.js.map +1 -0
  356. package/dist/el-GR.mjs +11 -0
  357. package/dist/el-GR.module.js +11 -0
  358. package/dist/el-GR.module.js.map +1 -0
  359. package/dist/en-US.main.js +9 -0
  360. package/dist/en-US.main.js.map +1 -0
  361. package/dist/en-US.mjs +11 -0
  362. package/dist/en-US.module.js +11 -0
  363. package/dist/en-US.module.js.map +1 -0
  364. package/dist/es-ES.main.js +9 -0
  365. package/dist/es-ES.main.js.map +1 -0
  366. package/dist/es-ES.mjs +11 -0
  367. package/dist/es-ES.module.js +11 -0
  368. package/dist/es-ES.module.js.map +1 -0
  369. package/dist/et-EE.main.js +9 -0
  370. package/dist/et-EE.main.js.map +1 -0
  371. package/dist/et-EE.mjs +11 -0
  372. package/dist/et-EE.module.js +11 -0
  373. package/dist/et-EE.module.js.map +1 -0
  374. package/dist/fi-FI.main.js +9 -0
  375. package/dist/fi-FI.main.js.map +1 -0
  376. package/dist/fi-FI.mjs +11 -0
  377. package/dist/fi-FI.module.js +11 -0
  378. package/dist/fi-FI.module.js.map +1 -0
  379. package/dist/fr-FR.main.js +9 -0
  380. package/dist/fr-FR.main.js.map +1 -0
  381. package/dist/fr-FR.mjs +11 -0
  382. package/dist/fr-FR.module.js +11 -0
  383. package/dist/fr-FR.module.js.map +1 -0
  384. package/dist/he-IL.main.js +9 -0
  385. package/dist/he-IL.main.js.map +1 -0
  386. package/dist/he-IL.mjs +11 -0
  387. package/dist/he-IL.module.js +11 -0
  388. package/dist/he-IL.module.js.map +1 -0
  389. package/dist/hr-HR.main.js +9 -0
  390. package/dist/hr-HR.main.js.map +1 -0
  391. package/dist/hr-HR.mjs +11 -0
  392. package/dist/hr-HR.module.js +11 -0
  393. package/dist/hr-HR.module.js.map +1 -0
  394. package/dist/hu-HU.main.js +9 -0
  395. package/dist/hu-HU.main.js.map +1 -0
  396. package/dist/hu-HU.mjs +11 -0
  397. package/dist/hu-HU.module.js +11 -0
  398. package/dist/hu-HU.module.js.map +1 -0
  399. package/dist/import.mjs +161 -0
  400. package/dist/intlStrings.main.js +108 -0
  401. package/dist/intlStrings.main.js.map +1 -0
  402. package/dist/intlStrings.mjs +110 -0
  403. package/dist/intlStrings.module.js +110 -0
  404. package/dist/intlStrings.module.js.map +1 -0
  405. package/dist/it-IT.main.js +9 -0
  406. package/dist/it-IT.main.js.map +1 -0
  407. package/dist/it-IT.mjs +11 -0
  408. package/dist/it-IT.module.js +11 -0
  409. package/dist/it-IT.module.js.map +1 -0
  410. package/dist/ja-JP.main.js +9 -0
  411. package/dist/ja-JP.main.js.map +1 -0
  412. package/dist/ja-JP.mjs +11 -0
  413. package/dist/ja-JP.module.js +11 -0
  414. package/dist/ja-JP.module.js.map +1 -0
  415. package/dist/ko-KR.main.js +9 -0
  416. package/dist/ko-KR.main.js.map +1 -0
  417. package/dist/ko-KR.mjs +11 -0
  418. package/dist/ko-KR.module.js +11 -0
  419. package/dist/ko-KR.module.js.map +1 -0
  420. package/dist/lt-LT.main.js +9 -0
  421. package/dist/lt-LT.main.js.map +1 -0
  422. package/dist/lt-LT.mjs +11 -0
  423. package/dist/lt-LT.module.js +11 -0
  424. package/dist/lt-LT.module.js.map +1 -0
  425. package/dist/lv-LV.main.js +9 -0
  426. package/dist/lv-LV.main.js.map +1 -0
  427. package/dist/lv-LV.mjs +11 -0
  428. package/dist/lv-LV.module.js +11 -0
  429. package/dist/lv-LV.module.js.map +1 -0
  430. package/dist/main.js +430 -0
  431. package/dist/main.js.map +1 -0
  432. package/dist/module.js +161 -0
  433. package/dist/module.js.map +1 -0
  434. package/dist/nb-NO.main.js +9 -0
  435. package/dist/nb-NO.main.js.map +1 -0
  436. package/dist/nb-NO.mjs +11 -0
  437. package/dist/nb-NO.module.js +11 -0
  438. package/dist/nb-NO.module.js.map +1 -0
  439. package/dist/nl-NL.main.js +9 -0
  440. package/dist/nl-NL.main.js.map +1 -0
  441. package/dist/nl-NL.mjs +11 -0
  442. package/dist/nl-NL.module.js +11 -0
  443. package/dist/nl-NL.module.js.map +1 -0
  444. package/dist/pl-PL.main.js +9 -0
  445. package/dist/pl-PL.main.js.map +1 -0
  446. package/dist/pl-PL.mjs +11 -0
  447. package/dist/pl-PL.module.js +11 -0
  448. package/dist/pl-PL.module.js.map +1 -0
  449. package/dist/pt-BR.main.js +9 -0
  450. package/dist/pt-BR.main.js.map +1 -0
  451. package/dist/pt-BR.mjs +11 -0
  452. package/dist/pt-BR.module.js +11 -0
  453. package/dist/pt-BR.module.js.map +1 -0
  454. package/dist/pt-PT.main.js +9 -0
  455. package/dist/pt-PT.main.js.map +1 -0
  456. package/dist/pt-PT.mjs +11 -0
  457. package/dist/pt-PT.module.js +11 -0
  458. package/dist/pt-PT.module.js.map +1 -0
  459. package/dist/ro-RO.main.js +9 -0
  460. package/dist/ro-RO.main.js.map +1 -0
  461. package/dist/ro-RO.mjs +11 -0
  462. package/dist/ro-RO.module.js +11 -0
  463. package/dist/ro-RO.module.js.map +1 -0
  464. package/dist/ru-RU.main.js +9 -0
  465. package/dist/ru-RU.main.js.map +1 -0
  466. package/dist/ru-RU.mjs +11 -0
  467. package/dist/ru-RU.module.js +11 -0
  468. package/dist/ru-RU.module.js.map +1 -0
  469. package/dist/sk-SK.main.js +9 -0
  470. package/dist/sk-SK.main.js.map +1 -0
  471. package/dist/sk-SK.mjs +11 -0
  472. package/dist/sk-SK.module.js +11 -0
  473. package/dist/sk-SK.module.js.map +1 -0
  474. package/dist/sl-SI.main.js +9 -0
  475. package/dist/sl-SI.main.js.map +1 -0
  476. package/dist/sl-SI.mjs +11 -0
  477. package/dist/sl-SI.module.js +11 -0
  478. package/dist/sl-SI.module.js.map +1 -0
  479. package/dist/sr-SP.main.js +9 -0
  480. package/dist/sr-SP.main.js.map +1 -0
  481. package/dist/sr-SP.mjs +11 -0
  482. package/dist/sr-SP.module.js +11 -0
  483. package/dist/sr-SP.module.js.map +1 -0
  484. package/dist/sv-SE.main.js +9 -0
  485. package/dist/sv-SE.main.js.map +1 -0
  486. package/dist/sv-SE.mjs +11 -0
  487. package/dist/sv-SE.module.js +11 -0
  488. package/dist/sv-SE.module.js.map +1 -0
  489. package/dist/tr-TR.main.js +9 -0
  490. package/dist/tr-TR.main.js.map +1 -0
  491. package/dist/tr-TR.mjs +11 -0
  492. package/dist/tr-TR.module.js +11 -0
  493. package/dist/tr-TR.module.js.map +1 -0
  494. package/dist/types.d.ts +3764 -0
  495. package/dist/types.d.ts.map +1 -0
  496. package/dist/uk-UA.main.js +9 -0
  497. package/dist/uk-UA.main.js.map +1 -0
  498. package/dist/uk-UA.mjs +11 -0
  499. package/dist/uk-UA.module.js +11 -0
  500. package/dist/uk-UA.module.js.map +1 -0
  501. package/dist/useDragAndDrop.main.js +74 -0
  502. package/dist/useDragAndDrop.main.js.map +1 -0
  503. package/dist/useDragAndDrop.mjs +69 -0
  504. package/dist/useDragAndDrop.module.js +69 -0
  505. package/dist/useDragAndDrop.module.js.map +1 -0
  506. package/dist/utils.main.js +205 -0
  507. package/dist/utils.main.js.map +1 -0
  508. package/dist/utils.mjs +188 -0
  509. package/dist/utils.module.js +188 -0
  510. package/dist/utils.module.js.map +1 -0
  511. package/dist/zh-CN.main.js +9 -0
  512. package/dist/zh-CN.main.js.map +1 -0
  513. package/dist/zh-CN.mjs +11 -0
  514. package/dist/zh-CN.module.js +11 -0
  515. package/dist/zh-CN.module.js.map +1 -0
  516. package/dist/zh-TW.main.js +9 -0
  517. package/dist/zh-TW.main.js.map +1 -0
  518. package/dist/zh-TW.mjs +11 -0
  519. package/dist/zh-TW.module.js +11 -0
  520. package/dist/zh-TW.module.js.map +1 -0
  521. package/i18n/ar-AE.js +1 -0
  522. package/i18n/ar-AE.mjs +1 -0
  523. package/i18n/bg-BG.js +1 -0
  524. package/i18n/bg-BG.mjs +1 -0
  525. package/i18n/cs-CZ.js +1 -0
  526. package/i18n/cs-CZ.mjs +1 -0
  527. package/i18n/da-DK.js +1 -0
  528. package/i18n/da-DK.mjs +1 -0
  529. package/i18n/de-DE.js +1 -0
  530. package/i18n/de-DE.mjs +1 -0
  531. package/i18n/el-GR.js +1 -0
  532. package/i18n/el-GR.mjs +1 -0
  533. package/i18n/en-US.js +1 -0
  534. package/i18n/en-US.mjs +1 -0
  535. package/i18n/es-ES.js +1 -0
  536. package/i18n/es-ES.mjs +1 -0
  537. package/i18n/et-EE.js +1 -0
  538. package/i18n/et-EE.mjs +1 -0
  539. package/i18n/fi-FI.js +1 -0
  540. package/i18n/fi-FI.mjs +1 -0
  541. package/i18n/fr-FR.js +1 -0
  542. package/i18n/fr-FR.mjs +1 -0
  543. package/i18n/he-IL.js +1 -0
  544. package/i18n/he-IL.mjs +1 -0
  545. package/i18n/hr-HR.js +1 -0
  546. package/i18n/hr-HR.mjs +1 -0
  547. package/i18n/hu-HU.js +1 -0
  548. package/i18n/hu-HU.mjs +1 -0
  549. package/i18n/index.d.ts +13 -0
  550. package/i18n/index.js +118 -0
  551. package/i18n/index.mjs +115 -0
  552. package/i18n/it-IT.js +1 -0
  553. package/i18n/it-IT.mjs +1 -0
  554. package/i18n/ja-JP.js +1 -0
  555. package/i18n/ja-JP.mjs +1 -0
  556. package/i18n/ko-KR.js +1 -0
  557. package/i18n/ko-KR.mjs +1 -0
  558. package/i18n/lang.d.ts +7 -0
  559. package/i18n/lt-LT.js +1 -0
  560. package/i18n/lt-LT.mjs +1 -0
  561. package/i18n/lv-LV.js +1 -0
  562. package/i18n/lv-LV.mjs +1 -0
  563. package/i18n/nb-NO.js +1 -0
  564. package/i18n/nb-NO.mjs +1 -0
  565. package/i18n/nl-NL.js +1 -0
  566. package/i18n/nl-NL.mjs +1 -0
  567. package/i18n/pl-PL.js +1 -0
  568. package/i18n/pl-PL.mjs +1 -0
  569. package/i18n/pt-BR.js +1 -0
  570. package/i18n/pt-BR.mjs +1 -0
  571. package/i18n/pt-PT.js +1 -0
  572. package/i18n/pt-PT.mjs +1 -0
  573. package/i18n/ro-RO.js +1 -0
  574. package/i18n/ro-RO.mjs +1 -0
  575. package/i18n/ru-RU.js +1 -0
  576. package/i18n/ru-RU.mjs +1 -0
  577. package/i18n/sk-SK.js +1 -0
  578. package/i18n/sk-SK.mjs +1 -0
  579. package/i18n/sl-SI.js +1 -0
  580. package/i18n/sl-SI.mjs +1 -0
  581. package/i18n/sr-SP.js +1 -0
  582. package/i18n/sr-SP.mjs +1 -0
  583. package/i18n/sv-SE.js +1 -0
  584. package/i18n/sv-SE.mjs +1 -0
  585. package/i18n/tr-TR.js +1 -0
  586. package/i18n/tr-TR.mjs +1 -0
  587. package/i18n/uk-UA.js +1 -0
  588. package/i18n/uk-UA.mjs +1 -0
  589. package/i18n/zh-CN.js +1 -0
  590. package/i18n/zh-CN.mjs +1 -0
  591. package/i18n/zh-TW.js +1 -0
  592. package/i18n/zh-TW.mjs +1 -0
  593. package/package.json +105 -0
  594. package/src/Autocomplete.tsx +64 -0
  595. package/src/Breadcrumbs.tsx +137 -0
  596. package/src/Button.tsx +185 -0
  597. package/src/Calendar.tsx +620 -0
  598. package/src/Checkbox.tsx +282 -0
  599. package/src/Collection.tsx +225 -0
  600. package/src/ColorArea.tsx +89 -0
  601. package/src/ColorField.tsx +243 -0
  602. package/src/ColorPicker.tsx +63 -0
  603. package/src/ColorSlider.tsx +110 -0
  604. package/src/ColorSwatch.tsx +54 -0
  605. package/src/ColorSwatchPicker.tsx +125 -0
  606. package/src/ColorThumb.tsx +108 -0
  607. package/src/ColorWheel.tsx +122 -0
  608. package/src/ComboBox.tsx +325 -0
  609. package/src/DateField.tsx +425 -0
  610. package/src/DatePicker.tsx +334 -0
  611. package/src/Dialog.tsx +159 -0
  612. package/src/Disclosure.tsx +259 -0
  613. package/src/DragAndDrop.tsx +115 -0
  614. package/src/DropZone.tsx +145 -0
  615. package/src/FieldError.tsx +57 -0
  616. package/src/FileTrigger.tsx +79 -0
  617. package/src/Form.tsx +52 -0
  618. package/src/GridList.tsx +678 -0
  619. package/src/Group.tsx +114 -0
  620. package/src/Header.tsx +28 -0
  621. package/src/Heading.tsx +31 -0
  622. package/src/HiddenDateInput.tsx +152 -0
  623. package/src/Input.tsx +113 -0
  624. package/src/Keyboard.tsx +23 -0
  625. package/src/Label.tsx +29 -0
  626. package/src/Link.tsx +115 -0
  627. package/src/ListBox.tsx +577 -0
  628. package/src/Menu.tsx +496 -0
  629. package/src/Meter.tsx +93 -0
  630. package/src/Modal.tsx +262 -0
  631. package/src/NumberField.tsx +152 -0
  632. package/src/OverlayArrow.tsx +91 -0
  633. package/src/Popover.tsx +267 -0
  634. package/src/ProgressBar.tsx +101 -0
  635. package/src/RSPContexts.ts +52 -0
  636. package/src/RadioGroup.tsx +273 -0
  637. package/src/SearchField.tsx +152 -0
  638. package/src/Select.tsx +356 -0
  639. package/src/SelectionIndicator.tsx +46 -0
  640. package/src/Separator.tsx +76 -0
  641. package/src/SharedElementTransition.tsx +186 -0
  642. package/src/Slider.tsx +310 -0
  643. package/src/Switch.tsx +146 -0
  644. package/src/Table.tsx +1597 -0
  645. package/src/TableLayout.ts +28 -0
  646. package/src/Tabs.tsx +495 -0
  647. package/src/TagGroup.tsx +310 -0
  648. package/src/Text.tsx +28 -0
  649. package/src/TextArea.tsx +65 -0
  650. package/src/TextField.tsx +148 -0
  651. package/src/Toast.tsx +248 -0
  652. package/src/ToggleButton.tsx +103 -0
  653. package/src/ToggleButtonGroup.tsx +90 -0
  654. package/src/Toolbar.tsx +69 -0
  655. package/src/Tooltip.tsx +187 -0
  656. package/src/Tree.tsx +1066 -0
  657. package/src/TreeDropTargetDelegate.ts +308 -0
  658. package/src/Virtualizer.tsx +174 -0
  659. package/src/index.ts +160 -0
  660. package/src/useDragAndDrop.tsx +150 -0
  661. package/src/utils.tsx +351 -0
@@ -0,0 +1,205 @@
1
+ var $1nknz$reactariautils = require("@react-aria/utils");
2
+ var $1nknz$react = require("react");
3
+
4
+
5
+ function $parcel$interopDefault(a) {
6
+ return a && a.__esModule ? a.default : a;
7
+ }
8
+
9
+ function $parcel$export(e, n, v, s) {
10
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
11
+ }
12
+
13
+ $parcel$export(module.exports, "DEFAULT_SLOT", () => $c5ccf687772c0422$export$c62b8e45d58ddad9);
14
+ $parcel$export(module.exports, "Provider", () => $c5ccf687772c0422$export$2881499e37b75b9a);
15
+ $parcel$export(module.exports, "useRenderProps", () => $c5ccf687772c0422$export$4d86445c2cf5e3);
16
+ $parcel$export(module.exports, "composeRenderProps", () => $c5ccf687772c0422$export$c245e6201fed2f75);
17
+ $parcel$export(module.exports, "useSlottedContext", () => $c5ccf687772c0422$export$fabf2dc03a41866e);
18
+ $parcel$export(module.exports, "useContextProps", () => $c5ccf687772c0422$export$29f1550f4b0d4415);
19
+ $parcel$export(module.exports, "useSlot", () => $c5ccf687772c0422$export$9d4c57ee4c6ffdd8);
20
+ $parcel$export(module.exports, "removeDataAttributes", () => $c5ccf687772c0422$export$ef03459518577ad4);
21
+ $parcel$export(module.exports, "dom", () => $c5ccf687772c0422$export$df3a06d6289f983e);
22
+ /*
23
+ * Copyright 2022 Adobe. All rights reserved.
24
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
25
+ * you may not use this file except in compliance with the License. You may obtain a copy
26
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
27
+ *
28
+ * Unless required by applicable law or agreed to in writing, software distributed under
29
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
30
+ * OF ANY KIND, either express or implied. See the License for the specific language
31
+ * governing permissions and limitations under the License.
32
+ */
33
+
34
+ const $c5ccf687772c0422$export$c62b8e45d58ddad9 = Symbol('default');
35
+ function $c5ccf687772c0422$export$2881499e37b75b9a({ values: values, children: children }) {
36
+ for (let [Context, value] of values)// @ts-ignore
37
+ children = /*#__PURE__*/ (0, ($parcel$interopDefault($1nknz$react))).createElement(Context.Provider, {
38
+ value: value
39
+ }, children);
40
+ return children;
41
+ }
42
+ function $c5ccf687772c0422$export$4d86445c2cf5e3(props) {
43
+ let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values, render: render } = props;
44
+ return (0, $1nknz$react.useMemo)(()=>{
45
+ let computedClassName;
46
+ let computedStyle;
47
+ let computedChildren;
48
+ if (typeof className === 'function') computedClassName = className({
49
+ ...values,
50
+ defaultClassName: defaultClassName
51
+ });
52
+ else computedClassName = className;
53
+ if (typeof style === 'function') computedStyle = style({
54
+ ...values,
55
+ defaultStyle: defaultStyle || {}
56
+ });
57
+ else computedStyle = style;
58
+ if (typeof children === 'function') computedChildren = children({
59
+ ...values,
60
+ defaultChildren: defaultChildren
61
+ });
62
+ else if (children == null) computedChildren = defaultChildren;
63
+ else computedChildren = children;
64
+ return {
65
+ className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
66
+ style: computedStyle || defaultStyle ? {
67
+ ...defaultStyle,
68
+ ...computedStyle
69
+ } : undefined,
70
+ children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
71
+ 'data-rac': '',
72
+ render: render ? (props)=>render(props, values) : undefined
73
+ };
74
+ }, [
75
+ className,
76
+ style,
77
+ children,
78
+ defaultClassName,
79
+ defaultChildren,
80
+ defaultStyle,
81
+ values,
82
+ render
83
+ ]);
84
+ }
85
+ function $c5ccf687772c0422$export$c245e6201fed2f75(// https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage
86
+ value, wrap) {
87
+ return (renderProps)=>wrap(typeof value === 'function' ? value(renderProps) : value, renderProps);
88
+ }
89
+ function $c5ccf687772c0422$export$fabf2dc03a41866e(context, slot) {
90
+ let ctx = (0, $1nknz$react.useContext)(context);
91
+ if (slot === null) // An explicit `null` slot means don't use context.
92
+ return null;
93
+ if (ctx && typeof ctx === 'object' && 'slots' in ctx && ctx.slots) {
94
+ let slotKey = slot || $c5ccf687772c0422$export$c62b8e45d58ddad9;
95
+ if (!ctx.slots[slotKey]) {
96
+ let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p)=>`"${p}"`));
97
+ let errorMessage = slot ? `Invalid slot "${slot}".` : 'A slot prop is required.';
98
+ throw new Error(`${errorMessage} Valid slot names are ${availableSlots}.`);
99
+ }
100
+ return ctx.slots[slotKey];
101
+ }
102
+ // @ts-ignore
103
+ return ctx;
104
+ }
105
+ function $c5ccf687772c0422$export$29f1550f4b0d4415(props, ref, context) {
106
+ let ctx = $c5ccf687772c0422$export$fabf2dc03a41866e(context, props.slot) || {};
107
+ let { ref: contextRef, ...contextProps } = ctx;
108
+ let mergedRef = (0, $1nknz$reactariautils.useObjectRef)((0, $1nknz$react.useMemo)(()=>(0, $1nknz$reactariautils.mergeRefs)(ref, contextRef), [
109
+ ref,
110
+ contextRef
111
+ ]));
112
+ let mergedProps = (0, $1nknz$reactariautils.mergeProps)(contextProps, props);
113
+ // mergeProps does not merge `style`. Adding this there might be a breaking change.
114
+ if ('style' in contextProps && contextProps.style && 'style' in props && props.style) {
115
+ if (typeof contextProps.style === 'function' || typeof props.style === 'function') // @ts-ignore
116
+ mergedProps.style = (renderProps)=>{
117
+ let contextStyle = typeof contextProps.style === 'function' ? contextProps.style(renderProps) : contextProps.style;
118
+ let defaultStyle = {
119
+ ...renderProps.defaultStyle,
120
+ ...contextStyle
121
+ };
122
+ let style = typeof props.style === 'function' ? props.style({
123
+ ...renderProps,
124
+ defaultStyle: defaultStyle
125
+ }) : props.style;
126
+ return {
127
+ ...defaultStyle,
128
+ ...style
129
+ };
130
+ };
131
+ else // @ts-ignore
132
+ mergedProps.style = {
133
+ ...contextProps.style,
134
+ ...props.style
135
+ };
136
+ }
137
+ return [
138
+ mergedProps,
139
+ mergedRef
140
+ ];
141
+ }
142
+ function $c5ccf687772c0422$export$9d4c57ee4c6ffdd8(initialState = true) {
143
+ // Initial state is typically based on the parent having an aria-label or aria-labelledby.
144
+ // If it does, this value should be false so that we don't update the state and cause a rerender when we go through the layoutEffect
145
+ let [hasSlot, setHasSlot] = (0, $1nknz$react.useState)(initialState);
146
+ let hasRun = (0, $1nknz$react.useRef)(false);
147
+ // A callback ref which will run when the slotted element mounts.
148
+ // This should happen before the useLayoutEffect below.
149
+ let ref = (0, $1nknz$react.useCallback)((el)=>{
150
+ hasRun.current = true;
151
+ setHasSlot(!!el);
152
+ }, []);
153
+ // If the callback hasn't been called, then reset to false.
154
+ (0, $1nknz$reactariautils.useLayoutEffect)(()=>{
155
+ if (!hasRun.current) setHasSlot(false);
156
+ }, []);
157
+ return [
158
+ ref,
159
+ hasSlot
160
+ ];
161
+ }
162
+ function $c5ccf687772c0422$export$ef03459518577ad4(props) {
163
+ const prefix = /^(data-.*)$/;
164
+ let filteredProps = {};
165
+ for(const prop in props)if (!prefix.test(prop)) filteredProps[prop] = props[prop];
166
+ return filteredProps;
167
+ }
168
+ function $c5ccf687772c0422$var$DOMElement(ElementType, props, forwardedRef) {
169
+ let { render: render, ...otherProps } = props;
170
+ let elementRef = (0, $1nknz$react.useRef)(null);
171
+ let ref = (0, $1nknz$react.useMemo)(()=>(0, $1nknz$reactariautils.mergeRefs)(forwardedRef, elementRef), [
172
+ forwardedRef,
173
+ elementRef
174
+ ]);
175
+ (0, $1nknz$reactariautils.useLayoutEffect)(()=>{
176
+ if (process.env.NODE_ENV !== 'production' && render) {
177
+ if (!elementRef.current) console.warn('Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?');
178
+ else if (elementRef.current.localName !== ElementType) console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${ElementType}>, got <${elementRef.current.localName}>. This may break the component behavior and accessibility.`);
179
+ }
180
+ }, [
181
+ ElementType,
182
+ render
183
+ ]);
184
+ let domProps = {
185
+ ...otherProps,
186
+ ref: ref
187
+ };
188
+ if (render) return render(domProps, undefined);
189
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($1nknz$react))).createElement(ElementType, domProps);
190
+ }
191
+ const $c5ccf687772c0422$var$domComponentCache = {};
192
+ const $c5ccf687772c0422$export$df3a06d6289f983e = new Proxy({}, {
193
+ get (target, elementType) {
194
+ if (typeof elementType !== 'string') return undefined;
195
+ let res = $c5ccf687772c0422$var$domComponentCache[elementType];
196
+ if (!res) {
197
+ res = /*#__PURE__*/ (0, $1nknz$react.forwardRef)($c5ccf687772c0422$var$DOMElement.bind(null, elementType));
198
+ $c5ccf687772c0422$var$domComponentCache[elementType] = res;
199
+ }
200
+ return res;
201
+ }
202
+ });
203
+
204
+
205
+ //# sourceMappingURL=utils.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"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","sources":["packages/react-aria-components/src/utils.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, RefObject, DOMProps as SharedDOMProps} from '@react-types/shared';\nimport {mergeProps, mergeRefs, useLayoutEffect, useObjectRef} from '@react-aria/utils';\nimport React, {AllHTMLAttributes, AnchorHTMLAttributes, Context, CSSProperties, DetailedHTMLProps, ForwardedRef, forwardRef, JSX, ReactElement, ReactNode, RefCallback, useCallback, useContext, useMemo, useRef, useState} from 'react';\n\nexport const DEFAULT_SLOT = Symbol('default');\n\ninterface SlottedValue<T> {\n slots?: Record<string | symbol, T>\n}\n\nexport type SlottedContextValue<T> = SlottedValue<T> | T | null | undefined;\nexport type ContextValue<T, E> = SlottedContextValue<WithRef<T, E>>;\n\ntype ProviderValue<T> = [Context<T>, T];\ntype ProviderValues<A, B, C, D, E, F, G, H, I, J, K, L> =\n | [ProviderValue<A>]\n | [ProviderValue<A>, ProviderValue<B>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>, ProviderValue<G>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>, ProviderValue<G>, ProviderValue<H>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>, ProviderValue<G>, ProviderValue<H>, ProviderValue<I>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>, ProviderValue<G>, ProviderValue<H>, ProviderValue<I>, ProviderValue<J>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>, ProviderValue<G>, ProviderValue<H>, ProviderValue<I>, ProviderValue<J>, ProviderValue<K>]\n | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>, ProviderValue<G>, ProviderValue<H>, ProviderValue<I>, ProviderValue<J>, ProviderValue<K>, ProviderValue<L>];\n\ninterface ProviderProps<A, B, C, D, E, F, G, H, I, J, K, L> {\n values: ProviderValues<A, B, C, D, E, F, G, H, I, J, K, L>,\n children: ReactNode\n}\n\nexport function Provider<A, B, C, D, E, F, G, H, I, J, K, L>({values, children}: ProviderProps<A, B, C, D, E, F, G, H, I, J, K, L>): JSX.Element {\n for (let [Context, value] of values) {\n // @ts-ignore\n children = <Context.Provider value={value}>{children}</Context.Provider>;\n }\n\n return children as JSX.Element;\n}\n\nexport interface StyleProps {\n /** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. */\n className?: string,\n /** The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. */\n style?: CSSProperties\n}\n\nexport interface DOMProps extends StyleProps, SharedDOMProps {\n /** The children of the component. */\n children?: ReactNode\n}\n\nexport type ClassNameOrFunction<T> = string | ((values: T & {defaultClassName: string | undefined}) => string);\ntype StyleOrFunction<T> = CSSProperties | ((values: T & {defaultStyle: CSSProperties}) => CSSProperties | undefined);\n\nexport interface StyleRenderProps<T, E extends keyof React.JSX.IntrinsicElements = 'div'> extends DOMRenderProps<E, T> {\n /** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. */\n className?: ClassNameOrFunction<T>,\n /** The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state. */\n style?: StyleOrFunction<T>\n}\n\nexport type ChildrenOrFunction<T> = ReactNode | ((values: T & {defaultChildren: ReactNode | undefined}) => ReactNode);\n\nexport interface RenderProps<T, E extends keyof React.JSX.IntrinsicElements = 'div'> extends StyleRenderProps<T, E> {\n /** The children of the component. A function may be provided to alter the children based on component state. */\n children?: ChildrenOrFunction<T>\n}\n\ninterface RenderPropsHookOptions<T, E extends keyof React.JSX.IntrinsicElements> extends RenderProps<T, E>, SharedDOMProps, AriaLabelingProps {\n values: T,\n defaultChildren?: ReactNode,\n defaultClassName?: string,\n defaultStyle?: CSSProperties\n}\n\ninterface RenderPropsHookRetVal<T, E extends keyof React.JSX.IntrinsicElements> {\n className?: string,\n style?: CSSProperties,\n children?: ReactNode,\n 'data-rac': string,\n render?: DOMRenderFunction<E, T>\n}\n\nexport function useRenderProps<T, E extends keyof React.JSX.IntrinsicElements>(props: RenderPropsHookOptions<T, E>): RenderPropsHookRetVal<T, E> {\n let {\n className,\n style,\n children,\n defaultClassName = undefined,\n defaultChildren = undefined,\n defaultStyle,\n values,\n render\n } = props;\n\n return useMemo(() => {\n let computedClassName: string | undefined;\n let computedStyle: React.CSSProperties | undefined;\n let computedChildren: React.ReactNode | undefined;\n\n if (typeof className === 'function') {\n computedClassName = className({...values, defaultClassName});\n } else {\n computedClassName = className;\n }\n\n if (typeof style === 'function') {\n computedStyle = style({...values, defaultStyle: defaultStyle || {}});\n } else {\n computedStyle = style;\n }\n\n if (typeof children === 'function') {\n computedChildren = children({...values, defaultChildren});\n } else if (children == null) {\n computedChildren = defaultChildren;\n } else {\n computedChildren = children;\n }\n\n return {\n className: computedClassName ?? defaultClassName,\n style: (computedStyle || defaultStyle) ? {...defaultStyle, ...computedStyle} : undefined,\n children: computedChildren ?? defaultChildren,\n 'data-rac': '',\n render: render ? (props => render(props, values)) : undefined\n };\n }, [className, style, children, defaultClassName, defaultChildren, defaultStyle, values, render]);\n}\n\n/**\n * A helper function that accepts a user-provided render prop value (either a static value or a function),\n * and combines it with another value to create a final result.\n */\nexport function composeRenderProps<T, U, V extends T>(\n // https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage\n value: T extends any ? (T | ((renderProps: U) => V)) : never,\n wrap: (prevValue: T, renderProps: U) => V\n): (renderProps: U) => V {\n return (renderProps) => wrap(typeof value === 'function' ? value(renderProps) : value, renderProps);\n}\n\nexport type WithRef<T, E> = T & {ref?: ForwardedRef<E>};\nexport interface SlotProps {\n /**\n * A slot name for the component. Slots allow the component to receive props from a parent component.\n * An explicit `null` value indicates that the local props completely override all props received from a parent.\n */\n slot?: string | null\n}\n\nexport function useSlottedContext<T>(context: Context<SlottedContextValue<T>>, slot?: string | null): T | null | undefined {\n let ctx = useContext(context);\n if (slot === null) {\n // An explicit `null` slot means don't use context.\n return null;\n }\n if (ctx && typeof ctx === 'object' && 'slots' in ctx && ctx.slots) {\n let slotKey = slot || DEFAULT_SLOT;\n if (!ctx.slots[slotKey]) {\n let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map(p => `\"${p}\"`));\n let errorMessage = slot ? `Invalid slot \"${slot}\".` : 'A slot prop is required.';\n\n throw new Error(`${errorMessage} Valid slot names are ${availableSlots}.`);\n }\n return ctx.slots[slotKey];\n }\n // @ts-ignore\n return ctx;\n}\n\nexport function useContextProps<T, U extends SlotProps, E extends Element>(props: T & SlotProps, ref: ForwardedRef<E> | undefined, context: Context<ContextValue<U, E>>): [T, RefObject<E | null>] {\n let ctx = useSlottedContext(context, props.slot) || {};\n let {ref: contextRef, ...contextProps} = ctx as any;\n let mergedRef = useObjectRef(useMemo(() => mergeRefs(ref, contextRef), [ref, contextRef]));\n let mergedProps = mergeProps(contextProps, props) as unknown as T;\n\n // mergeProps does not merge `style`. Adding this there might be a breaking change.\n if (\n 'style' in contextProps &&\n contextProps.style &&\n 'style' in props &&\n props.style\n ) {\n if (typeof contextProps.style === 'function' || typeof props.style === 'function') {\n // @ts-ignore\n mergedProps.style = (renderProps) => {\n let contextStyle = typeof contextProps.style === 'function' ? contextProps.style(renderProps) : contextProps.style;\n let defaultStyle = {...renderProps.defaultStyle, ...contextStyle};\n let style = typeof props.style === 'function'\n ? props.style({...renderProps, defaultStyle})\n : props.style;\n return {...defaultStyle, ...style};\n };\n } else {\n // @ts-ignore\n mergedProps.style = {...contextProps.style, ...props.style};\n }\n }\n\n return [mergedProps, mergedRef];\n}\n\nexport function useSlot(initialState: boolean | (() => boolean) = true): [RefCallback<Element>, boolean] {\n // Initial state is typically based on the parent having an aria-label or aria-labelledby.\n // If it does, this value should be false so that we don't update the state and cause a rerender when we go through the layoutEffect\n let [hasSlot, setHasSlot] = useState(initialState);\n let hasRun = useRef(false);\n\n // A callback ref which will run when the slotted element mounts.\n // This should happen before the useLayoutEffect below.\n let ref = useCallback(el => {\n hasRun.current = true;\n setHasSlot(!!el);\n }, []);\n\n // If the callback hasn't been called, then reset to false.\n useLayoutEffect(() => {\n if (!hasRun.current) {\n setHasSlot(false);\n }\n }, []);\n\n return [ref, hasSlot];\n}\n\n/**\n * Filters out `data-*` attributes to keep them from being passed down and duplicated.\n * @param props\n */\nexport function removeDataAttributes<T>(props: T): T {\n const prefix = /^(data-.*)$/;\n let filteredProps = {} as T;\n\n for (const prop in props) {\n if (!prefix.test(prop)) {\n filteredProps[prop] = props[prop];\n }\n }\n\n return filteredProps;\n}\n\n// Override base type to change the default.\nexport interface RACValidation {\n /**\n * Whether to use native HTML form validation to prevent form submission\n * when the value is missing or invalid, or mark the field as required\n * or invalid via ARIA.\n * @default 'native'\n */\n validationBehavior?: 'native' | 'aria'\n}\n\nexport type DOMRenderFunction<E extends keyof React.JSX.IntrinsicElements, T> = (props: React.JSX.IntrinsicElements[E], renderProps: T) => ReactElement;\nexport interface DOMRenderProps<E extends keyof React.JSX.IntrinsicElements, T> {\n /**\n * Overrides the default DOM element with a custom render function.\n * This allows rendering existing components with built-in styles and behaviors\n * such as router links, animation libraries, and pre-styled components.\n * \n * Requirements:\n * \n * * You must render the expected element type (e.g. if `<button>` is expected, you cannot render an `<a>`).\n * * Only a single root DOM element can be rendered (no fragments).\n * * You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.\n */\n render?: DOMRenderFunction<E, T>\n}\n\n// Makes `href` required in AnchorHTMLAttributes\ntype LinkWithRequiredHref = Required<Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>> & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>; \n\n// Same as DOMRenderProps but specific for the case where the element could be a 'a' or 'div' element.\nexport interface PossibleLinkDOMRenderProps<Fallback extends keyof React.JSX.IntrinsicElements, T> {\n /**\n * Overrides the default DOM element with a custom render function.\n * This allows rendering existing components with built-in styles and behaviors\n * such as router links, animation libraries, and pre-styled components.\n * \n * Note: You can check if `'href' in props` in order to tell whether to render an `<a>` element.\n * \n * Requirements:\n * \n * * You must render the expected element type (e.g. if `<a>` is expected, you cannot render a `<button>`).\n * * Only a single root DOM element can be rendered (no fragments).\n * * You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.\n */\n render?: (props: DetailedHTMLProps<LinkWithRequiredHref, HTMLAnchorElement> | React.JSX.IntrinsicElements[Fallback], renderProps: T) => ReactElement\n}\n\nfunction DOMElement(ElementType: string, props: DOMRenderProps<any, any> & AllHTMLAttributes<HTMLElement>, forwardedRef: ForwardedRef<HTMLElement>) {\n let {render, ...otherProps} = props;\n let elementRef = useRef<HTMLElement | null>(null);\n let ref = useMemo(() => mergeRefs(forwardedRef, elementRef), [forwardedRef, elementRef]);\n\n useLayoutEffect(() => {\n if (process.env.NODE_ENV !== 'production' && render) {\n if (!elementRef.current) {\n console.warn('Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?');\n } else if (elementRef.current.localName !== ElementType) {\n console.warn(`Unexpected DOM element returned by custom \\`render\\` function. Expected <${ElementType}>, got <${elementRef.current.localName}>. This may break the component behavior and accessibility.`);\n }\n }\n }, [ElementType, render]);\n\n let domProps: any = {...otherProps, ref};\n if (render) {\n return render(domProps, undefined);\n }\n\n return <ElementType {...domProps} />;\n}\n\ntype DOMComponents = {\n [E in keyof React.JSX.IntrinsicElements]: (props: DOMRenderProps<E, any> & React.JSX.IntrinsicElements[E]) => ReactElement\n};\n\nconst domComponentCache = {};\n\n// Dynamically generates and caches components for each DOM element (e.g. `dom.button`).\nexport const dom = new Proxy({}, {\n get(target, elementType) {\n if (typeof elementType !== 'string') {\n return undefined;\n }\n\n let res = domComponentCache[elementType];\n if (!res) {\n res = forwardRef(DOMElement.bind(null, elementType));\n domComponentCache[elementType] = res;\n }\n\n return res;\n }\n}) as DOMComponents;\n"],"names":[],"version":3,"file":"utils.main.js.map"}
package/dist/utils.mjs ADDED
@@ -0,0 +1,188 @@
1
+ import {useObjectRef as $iETbY$useObjectRef, mergeRefs as $iETbY$mergeRefs, mergeProps as $iETbY$mergeProps, useLayoutEffect as $iETbY$useLayoutEffect} from "@react-aria/utils";
2
+ import $iETbY$react, {useMemo as $iETbY$useMemo, useContext as $iETbY$useContext, useState as $iETbY$useState, useRef as $iETbY$useRef, useCallback as $iETbY$useCallback, forwardRef as $iETbY$forwardRef} from "react";
3
+
4
+ /*
5
+ * Copyright 2022 Adobe. All rights reserved.
6
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License. You may obtain a copy
8
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
12
+ * OF ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ */
15
+
16
+ const $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol('default');
17
+ function $64fa3d84918910a7$export$2881499e37b75b9a({ values: values, children: children }) {
18
+ for (let [Context, value] of values)// @ts-ignore
19
+ children = /*#__PURE__*/ (0, $iETbY$react).createElement(Context.Provider, {
20
+ value: value
21
+ }, children);
22
+ return children;
23
+ }
24
+ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
25
+ let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values, render: render } = props;
26
+ return (0, $iETbY$useMemo)(()=>{
27
+ let computedClassName;
28
+ let computedStyle;
29
+ let computedChildren;
30
+ if (typeof className === 'function') computedClassName = className({
31
+ ...values,
32
+ defaultClassName: defaultClassName
33
+ });
34
+ else computedClassName = className;
35
+ if (typeof style === 'function') computedStyle = style({
36
+ ...values,
37
+ defaultStyle: defaultStyle || {}
38
+ });
39
+ else computedStyle = style;
40
+ if (typeof children === 'function') computedChildren = children({
41
+ ...values,
42
+ defaultChildren: defaultChildren
43
+ });
44
+ else if (children == null) computedChildren = defaultChildren;
45
+ else computedChildren = children;
46
+ return {
47
+ className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
48
+ style: computedStyle || defaultStyle ? {
49
+ ...defaultStyle,
50
+ ...computedStyle
51
+ } : undefined,
52
+ children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
53
+ 'data-rac': '',
54
+ render: render ? (props)=>render(props, values) : undefined
55
+ };
56
+ }, [
57
+ className,
58
+ style,
59
+ children,
60
+ defaultClassName,
61
+ defaultChildren,
62
+ defaultStyle,
63
+ values,
64
+ render
65
+ ]);
66
+ }
67
+ function $64fa3d84918910a7$export$c245e6201fed2f75(// https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage
68
+ value, wrap) {
69
+ return (renderProps)=>wrap(typeof value === 'function' ? value(renderProps) : value, renderProps);
70
+ }
71
+ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
72
+ let ctx = (0, $iETbY$useContext)(context);
73
+ if (slot === null) // An explicit `null` slot means don't use context.
74
+ return null;
75
+ if (ctx && typeof ctx === 'object' && 'slots' in ctx && ctx.slots) {
76
+ let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;
77
+ if (!ctx.slots[slotKey]) {
78
+ let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p)=>`"${p}"`));
79
+ let errorMessage = slot ? `Invalid slot "${slot}".` : 'A slot prop is required.';
80
+ throw new Error(`${errorMessage} Valid slot names are ${availableSlots}.`);
81
+ }
82
+ return ctx.slots[slotKey];
83
+ }
84
+ // @ts-ignore
85
+ return ctx;
86
+ }
87
+ function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
88
+ let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};
89
+ let { ref: contextRef, ...contextProps } = ctx;
90
+ let mergedRef = (0, $iETbY$useObjectRef)((0, $iETbY$useMemo)(()=>(0, $iETbY$mergeRefs)(ref, contextRef), [
91
+ ref,
92
+ contextRef
93
+ ]));
94
+ let mergedProps = (0, $iETbY$mergeProps)(contextProps, props);
95
+ // mergeProps does not merge `style`. Adding this there might be a breaking change.
96
+ if ('style' in contextProps && contextProps.style && 'style' in props && props.style) {
97
+ if (typeof contextProps.style === 'function' || typeof props.style === 'function') // @ts-ignore
98
+ mergedProps.style = (renderProps)=>{
99
+ let contextStyle = typeof contextProps.style === 'function' ? contextProps.style(renderProps) : contextProps.style;
100
+ let defaultStyle = {
101
+ ...renderProps.defaultStyle,
102
+ ...contextStyle
103
+ };
104
+ let style = typeof props.style === 'function' ? props.style({
105
+ ...renderProps,
106
+ defaultStyle: defaultStyle
107
+ }) : props.style;
108
+ return {
109
+ ...defaultStyle,
110
+ ...style
111
+ };
112
+ };
113
+ else // @ts-ignore
114
+ mergedProps.style = {
115
+ ...contextProps.style,
116
+ ...props.style
117
+ };
118
+ }
119
+ return [
120
+ mergedProps,
121
+ mergedRef
122
+ ];
123
+ }
124
+ function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(initialState = true) {
125
+ // Initial state is typically based on the parent having an aria-label or aria-labelledby.
126
+ // If it does, this value should be false so that we don't update the state and cause a rerender when we go through the layoutEffect
127
+ let [hasSlot, setHasSlot] = (0, $iETbY$useState)(initialState);
128
+ let hasRun = (0, $iETbY$useRef)(false);
129
+ // A callback ref which will run when the slotted element mounts.
130
+ // This should happen before the useLayoutEffect below.
131
+ let ref = (0, $iETbY$useCallback)((el)=>{
132
+ hasRun.current = true;
133
+ setHasSlot(!!el);
134
+ }, []);
135
+ // If the callback hasn't been called, then reset to false.
136
+ (0, $iETbY$useLayoutEffect)(()=>{
137
+ if (!hasRun.current) setHasSlot(false);
138
+ }, []);
139
+ return [
140
+ ref,
141
+ hasSlot
142
+ ];
143
+ }
144
+ function $64fa3d84918910a7$export$ef03459518577ad4(props) {
145
+ const prefix = /^(data-.*)$/;
146
+ let filteredProps = {};
147
+ for(const prop in props)if (!prefix.test(prop)) filteredProps[prop] = props[prop];
148
+ return filteredProps;
149
+ }
150
+ function $64fa3d84918910a7$var$DOMElement(ElementType, props, forwardedRef) {
151
+ let { render: render, ...otherProps } = props;
152
+ let elementRef = (0, $iETbY$useRef)(null);
153
+ let ref = (0, $iETbY$useMemo)(()=>(0, $iETbY$mergeRefs)(forwardedRef, elementRef), [
154
+ forwardedRef,
155
+ elementRef
156
+ ]);
157
+ (0, $iETbY$useLayoutEffect)(()=>{
158
+ if (process.env.NODE_ENV !== 'production' && render) {
159
+ if (!elementRef.current) console.warn('Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?');
160
+ else if (elementRef.current.localName !== ElementType) console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${ElementType}>, got <${elementRef.current.localName}>. This may break the component behavior and accessibility.`);
161
+ }
162
+ }, [
163
+ ElementType,
164
+ render
165
+ ]);
166
+ let domProps = {
167
+ ...otherProps,
168
+ ref: ref
169
+ };
170
+ if (render) return render(domProps, undefined);
171
+ return /*#__PURE__*/ (0, $iETbY$react).createElement(ElementType, domProps);
172
+ }
173
+ const $64fa3d84918910a7$var$domComponentCache = {};
174
+ const $64fa3d84918910a7$export$df3a06d6289f983e = new Proxy({}, {
175
+ get (target, elementType) {
176
+ if (typeof elementType !== 'string') return undefined;
177
+ let res = $64fa3d84918910a7$var$domComponentCache[elementType];
178
+ if (!res) {
179
+ res = /*#__PURE__*/ (0, $iETbY$forwardRef)($64fa3d84918910a7$var$DOMElement.bind(null, elementType));
180
+ $64fa3d84918910a7$var$domComponentCache[elementType] = res;
181
+ }
182
+ return res;
183
+ }
184
+ });
185
+
186
+
187
+ export {$64fa3d84918910a7$export$c62b8e45d58ddad9 as DEFAULT_SLOT, $64fa3d84918910a7$export$2881499e37b75b9a as Provider, $64fa3d84918910a7$export$4d86445c2cf5e3 as useRenderProps, $64fa3d84918910a7$export$c245e6201fed2f75 as composeRenderProps, $64fa3d84918910a7$export$fabf2dc03a41866e as useSlottedContext, $64fa3d84918910a7$export$29f1550f4b0d4415 as useContextProps, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as useSlot, $64fa3d84918910a7$export$ef03459518577ad4 as removeDataAttributes, $64fa3d84918910a7$export$df3a06d6289f983e as dom};
188
+ //# sourceMappingURL=utils.module.js.map
@@ -0,0 +1,188 @@
1
+ import {useObjectRef as $iETbY$useObjectRef, mergeRefs as $iETbY$mergeRefs, mergeProps as $iETbY$mergeProps, useLayoutEffect as $iETbY$useLayoutEffect} from "@react-aria/utils";
2
+ import $iETbY$react, {useMemo as $iETbY$useMemo, useContext as $iETbY$useContext, useState as $iETbY$useState, useRef as $iETbY$useRef, useCallback as $iETbY$useCallback, forwardRef as $iETbY$forwardRef} from "react";
3
+
4
+ /*
5
+ * Copyright 2022 Adobe. All rights reserved.
6
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License. You may obtain a copy
8
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software distributed under
11
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
12
+ * OF ANY KIND, either express or implied. See the License for the specific language
13
+ * governing permissions and limitations under the License.
14
+ */
15
+
16
+ const $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol('default');
17
+ function $64fa3d84918910a7$export$2881499e37b75b9a({ values: values, children: children }) {
18
+ for (let [Context, value] of values)// @ts-ignore
19
+ children = /*#__PURE__*/ (0, $iETbY$react).createElement(Context.Provider, {
20
+ value: value
21
+ }, children);
22
+ return children;
23
+ }
24
+ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
25
+ let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values, render: render } = props;
26
+ return (0, $iETbY$useMemo)(()=>{
27
+ let computedClassName;
28
+ let computedStyle;
29
+ let computedChildren;
30
+ if (typeof className === 'function') computedClassName = className({
31
+ ...values,
32
+ defaultClassName: defaultClassName
33
+ });
34
+ else computedClassName = className;
35
+ if (typeof style === 'function') computedStyle = style({
36
+ ...values,
37
+ defaultStyle: defaultStyle || {}
38
+ });
39
+ else computedStyle = style;
40
+ if (typeof children === 'function') computedChildren = children({
41
+ ...values,
42
+ defaultChildren: defaultChildren
43
+ });
44
+ else if (children == null) computedChildren = defaultChildren;
45
+ else computedChildren = children;
46
+ return {
47
+ className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
48
+ style: computedStyle || defaultStyle ? {
49
+ ...defaultStyle,
50
+ ...computedStyle
51
+ } : undefined,
52
+ children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
53
+ 'data-rac': '',
54
+ render: render ? (props)=>render(props, values) : undefined
55
+ };
56
+ }, [
57
+ className,
58
+ style,
59
+ children,
60
+ defaultClassName,
61
+ defaultChildren,
62
+ defaultStyle,
63
+ values,
64
+ render
65
+ ]);
66
+ }
67
+ function $64fa3d84918910a7$export$c245e6201fed2f75(// https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage
68
+ value, wrap) {
69
+ return (renderProps)=>wrap(typeof value === 'function' ? value(renderProps) : value, renderProps);
70
+ }
71
+ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
72
+ let ctx = (0, $iETbY$useContext)(context);
73
+ if (slot === null) // An explicit `null` slot means don't use context.
74
+ return null;
75
+ if (ctx && typeof ctx === 'object' && 'slots' in ctx && ctx.slots) {
76
+ let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;
77
+ if (!ctx.slots[slotKey]) {
78
+ let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p)=>`"${p}"`));
79
+ let errorMessage = slot ? `Invalid slot "${slot}".` : 'A slot prop is required.';
80
+ throw new Error(`${errorMessage} Valid slot names are ${availableSlots}.`);
81
+ }
82
+ return ctx.slots[slotKey];
83
+ }
84
+ // @ts-ignore
85
+ return ctx;
86
+ }
87
+ function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
88
+ let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};
89
+ let { ref: contextRef, ...contextProps } = ctx;
90
+ let mergedRef = (0, $iETbY$useObjectRef)((0, $iETbY$useMemo)(()=>(0, $iETbY$mergeRefs)(ref, contextRef), [
91
+ ref,
92
+ contextRef
93
+ ]));
94
+ let mergedProps = (0, $iETbY$mergeProps)(contextProps, props);
95
+ // mergeProps does not merge `style`. Adding this there might be a breaking change.
96
+ if ('style' in contextProps && contextProps.style && 'style' in props && props.style) {
97
+ if (typeof contextProps.style === 'function' || typeof props.style === 'function') // @ts-ignore
98
+ mergedProps.style = (renderProps)=>{
99
+ let contextStyle = typeof contextProps.style === 'function' ? contextProps.style(renderProps) : contextProps.style;
100
+ let defaultStyle = {
101
+ ...renderProps.defaultStyle,
102
+ ...contextStyle
103
+ };
104
+ let style = typeof props.style === 'function' ? props.style({
105
+ ...renderProps,
106
+ defaultStyle: defaultStyle
107
+ }) : props.style;
108
+ return {
109
+ ...defaultStyle,
110
+ ...style
111
+ };
112
+ };
113
+ else // @ts-ignore
114
+ mergedProps.style = {
115
+ ...contextProps.style,
116
+ ...props.style
117
+ };
118
+ }
119
+ return [
120
+ mergedProps,
121
+ mergedRef
122
+ ];
123
+ }
124
+ function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(initialState = true) {
125
+ // Initial state is typically based on the parent having an aria-label or aria-labelledby.
126
+ // If it does, this value should be false so that we don't update the state and cause a rerender when we go through the layoutEffect
127
+ let [hasSlot, setHasSlot] = (0, $iETbY$useState)(initialState);
128
+ let hasRun = (0, $iETbY$useRef)(false);
129
+ // A callback ref which will run when the slotted element mounts.
130
+ // This should happen before the useLayoutEffect below.
131
+ let ref = (0, $iETbY$useCallback)((el)=>{
132
+ hasRun.current = true;
133
+ setHasSlot(!!el);
134
+ }, []);
135
+ // If the callback hasn't been called, then reset to false.
136
+ (0, $iETbY$useLayoutEffect)(()=>{
137
+ if (!hasRun.current) setHasSlot(false);
138
+ }, []);
139
+ return [
140
+ ref,
141
+ hasSlot
142
+ ];
143
+ }
144
+ function $64fa3d84918910a7$export$ef03459518577ad4(props) {
145
+ const prefix = /^(data-.*)$/;
146
+ let filteredProps = {};
147
+ for(const prop in props)if (!prefix.test(prop)) filteredProps[prop] = props[prop];
148
+ return filteredProps;
149
+ }
150
+ function $64fa3d84918910a7$var$DOMElement(ElementType, props, forwardedRef) {
151
+ let { render: render, ...otherProps } = props;
152
+ let elementRef = (0, $iETbY$useRef)(null);
153
+ let ref = (0, $iETbY$useMemo)(()=>(0, $iETbY$mergeRefs)(forwardedRef, elementRef), [
154
+ forwardedRef,
155
+ elementRef
156
+ ]);
157
+ (0, $iETbY$useLayoutEffect)(()=>{
158
+ if (process.env.NODE_ENV !== 'production' && render) {
159
+ if (!elementRef.current) console.warn('Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?');
160
+ else if (elementRef.current.localName !== ElementType) console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${ElementType}>, got <${elementRef.current.localName}>. This may break the component behavior and accessibility.`);
161
+ }
162
+ }, [
163
+ ElementType,
164
+ render
165
+ ]);
166
+ let domProps = {
167
+ ...otherProps,
168
+ ref: ref
169
+ };
170
+ if (render) return render(domProps, undefined);
171
+ return /*#__PURE__*/ (0, $iETbY$react).createElement(ElementType, domProps);
172
+ }
173
+ const $64fa3d84918910a7$var$domComponentCache = {};
174
+ const $64fa3d84918910a7$export$df3a06d6289f983e = new Proxy({}, {
175
+ get (target, elementType) {
176
+ if (typeof elementType !== 'string') return undefined;
177
+ let res = $64fa3d84918910a7$var$domComponentCache[elementType];
178
+ if (!res) {
179
+ res = /*#__PURE__*/ (0, $iETbY$forwardRef)($64fa3d84918910a7$var$DOMElement.bind(null, elementType));
180
+ $64fa3d84918910a7$var$domComponentCache[elementType] = res;
181
+ }
182
+ return res;
183
+ }
184
+ });
185
+
186
+
187
+ export {$64fa3d84918910a7$export$c62b8e45d58ddad9 as DEFAULT_SLOT, $64fa3d84918910a7$export$2881499e37b75b9a as Provider, $64fa3d84918910a7$export$4d86445c2cf5e3 as useRenderProps, $64fa3d84918910a7$export$c245e6201fed2f75 as composeRenderProps, $64fa3d84918910a7$export$fabf2dc03a41866e as useSlottedContext, $64fa3d84918910a7$export$29f1550f4b0d4415 as useContextProps, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as useSlot, $64fa3d84918910a7$export$ef03459518577ad4 as removeDataAttributes, $64fa3d84918910a7$export$df3a06d6289f983e as dom};
188
+ //# sourceMappingURL=utils.module.js.map