@lumx/react 3.5.3 → 3.5.4-alpha-remove-moment-repack.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 (400) hide show
  1. package/_internal/00d05efa.js +111 -0
  2. package/_internal/00d05efa.js.map +1 -0
  3. package/_internal/0110d951.js +168 -0
  4. package/_internal/0110d951.js.map +1 -0
  5. package/_internal/063bb3df.js +33 -0
  6. package/_internal/063bb3df.js.map +1 -0
  7. package/_internal/0d8b4e37.d.ts +106 -0
  8. package/_internal/0da969e1.d.ts +45 -0
  9. package/_internal/1098ba6a.js +26 -0
  10. package/_internal/1098ba6a.js.map +1 -0
  11. package/_internal/1252e3a1.js +108 -0
  12. package/_internal/1252e3a1.js.map +1 -0
  13. package/_internal/135ee91f.d.ts +32 -0
  14. package/_internal/13603836.js +13 -0
  15. package/_internal/13603836.js.map +1 -0
  16. package/_internal/15e9a271.d.ts +26 -0
  17. package/_internal/188706f1.d.ts +107 -0
  18. package/_internal/1e67557e.d.ts +31 -0
  19. package/_internal/1ee4fa8c.js +85 -0
  20. package/_internal/1ee4fa8c.js.map +1 -0
  21. package/_internal/209d0906.js +56 -0
  22. package/_internal/209d0906.js.map +1 -0
  23. package/_internal/22b8c949.d.ts +57 -0
  24. package/_internal/23b03795.js +115 -0
  25. package/_internal/23b03795.js.map +1 -0
  26. package/_internal/25352357.d.ts +51 -0
  27. package/_internal/{types.d.ts → 28b656e3.d.ts} +1 -1
  28. package/_internal/2bd12321.d.ts +22 -0
  29. package/_internal/2c279dd8.d.ts +49 -0
  30. package/_internal/2d7bd818.js +147 -0
  31. package/_internal/2d7bd818.js.map +1 -0
  32. package/_internal/2db3ca7a.js +221 -0
  33. package/_internal/2db3ca7a.js.map +1 -0
  34. package/_internal/2e0ba45f.js +182 -0
  35. package/_internal/2e0ba45f.js.map +1 -0
  36. package/_internal/2e6810c5.js +240 -0
  37. package/_internal/2e6810c5.js.map +1 -0
  38. package/_internal/2ed577d6.d.ts +37 -0
  39. package/_internal/31235bda.js +133 -0
  40. package/_internal/31235bda.js.map +1 -0
  41. package/_internal/339a4cb6.d.ts +106 -0
  42. package/_internal/35c3a78f.js +374 -0
  43. package/_internal/35c3a78f.js.map +1 -0
  44. package/_internal/3669449c.js +135 -0
  45. package/_internal/3669449c.js.map +1 -0
  46. package/_internal/39790d2a.d.ts +52 -0
  47. package/_internal/3bfda595.d.ts +62 -0
  48. package/_internal/3f5e7653.js +205 -0
  49. package/_internal/3f5e7653.js.map +1 -0
  50. package/_internal/43bf2236.js +189 -0
  51. package/_internal/43bf2236.js.map +1 -0
  52. package/_internal/43c20e1c.js +64 -0
  53. package/_internal/43c20e1c.js.map +1 -0
  54. package/_internal/45349a37.js +78 -0
  55. package/_internal/45349a37.js.map +1 -0
  56. package/_internal/48725bae.js +61 -0
  57. package/_internal/48725bae.js.map +1 -0
  58. package/_internal/4a5eff83.js +149 -0
  59. package/_internal/4a5eff83.js.map +1 -0
  60. package/_internal/4f5a23d0.js +74 -0
  61. package/_internal/4f5a23d0.js.map +1 -0
  62. package/_internal/50472283.js +219 -0
  63. package/_internal/50472283.js.map +1 -0
  64. package/_internal/506e7420.js +805 -0
  65. package/_internal/506e7420.js.map +1 -0
  66. package/_internal/51585e5d.d.ts +31 -0
  67. package/_internal/52976f60.js +123 -0
  68. package/_internal/52976f60.js.map +1 -0
  69. package/_internal/53abf616.js +112 -0
  70. package/_internal/53abf616.js.map +1 -0
  71. package/_internal/561b93a4.js +132 -0
  72. package/_internal/561b93a4.js.map +1 -0
  73. package/_internal/56827efd.js +306 -0
  74. package/_internal/56827efd.js.map +1 -0
  75. package/_internal/58085542.js +132 -0
  76. package/_internal/58085542.js.map +1 -0
  77. package/_internal/5d582985.js +55 -0
  78. package/_internal/5d582985.js.map +1 -0
  79. package/_internal/5df3d4a3.d.ts +192 -0
  80. package/_internal/5eac291f.js +52 -0
  81. package/_internal/5eac291f.js.map +1 -0
  82. package/_internal/5ebec897.d.ts +69 -0
  83. package/_internal/62a51bc3.js +73 -0
  84. package/_internal/62a51bc3.js.map +1 -0
  85. package/_internal/648a40d4.js +140 -0
  86. package/_internal/648a40d4.js.map +1 -0
  87. package/_internal/6726fa56.js +113 -0
  88. package/_internal/6726fa56.js.map +1 -0
  89. package/_internal/687128ab.js +60 -0
  90. package/_internal/687128ab.js.map +1 -0
  91. package/_internal/69ec8e49.js +2130 -0
  92. package/_internal/69ec8e49.js.map +1 -0
  93. package/_internal/6a084cc0.js +154 -0
  94. package/_internal/6a084cc0.js.map +1 -0
  95. package/_internal/6b6c99f5.d.ts +59 -0
  96. package/_internal/6f0b1d1c.js +100 -0
  97. package/_internal/6f0b1d1c.js.map +1 -0
  98. package/_internal/717ab5c2.d.ts +33 -0
  99. package/_internal/71e8fb5e.d.ts +54 -0
  100. package/_internal/72b3a542.js +75 -0
  101. package/_internal/72b3a542.js.map +1 -0
  102. package/_internal/73d02a65.js +338 -0
  103. package/_internal/73d02a65.js.map +1 -0
  104. package/_internal/757216a1.js +80 -0
  105. package/_internal/757216a1.js.map +1 -0
  106. package/_internal/7641c1e4.js +49 -0
  107. package/_internal/7641c1e4.js.map +1 -0
  108. package/_internal/782f6fbb.js +94 -0
  109. package/_internal/782f6fbb.js.map +1 -0
  110. package/_internal/787d5d09.js +450 -0
  111. package/_internal/787d5d09.js.map +1 -0
  112. package/_internal/79b3f9aa.d.ts +22 -0
  113. package/_internal/7b8c2b80.js +113 -0
  114. package/_internal/7b8c2b80.js.map +1 -0
  115. package/_internal/7c07908e.d.ts +34 -0
  116. package/_internal/7d468bfd.d.ts +75 -0
  117. package/_internal/834ad334.js +25 -0
  118. package/_internal/834ad334.js.map +1 -0
  119. package/_internal/83dab2b2.js +22 -0
  120. package/_internal/83dab2b2.js.map +1 -0
  121. package/_internal/899e4acd.js +60 -0
  122. package/_internal/899e4acd.js.map +1 -0
  123. package/_internal/89fd6c7c.js +112 -0
  124. package/_internal/89fd6c7c.js.map +1 -0
  125. package/_internal/8aeb24dd.d.ts +24 -0
  126. package/_internal/8c7450ba.d.ts +35 -0
  127. package/_internal/8ea3ecc2.d.ts +46 -0
  128. package/_internal/8efb9d06.js +807 -0
  129. package/_internal/8efb9d06.js.map +1 -0
  130. package/_internal/93943ac3.d.ts +37 -0
  131. package/_internal/96ac5af6.d.ts +47 -0
  132. package/_internal/975a94f4.js +88 -0
  133. package/_internal/975a94f4.js.map +1 -0
  134. package/_internal/9784d7f8.js +283 -0
  135. package/_internal/9784d7f8.js.map +1 -0
  136. package/_internal/97e802dc.d.ts +66 -0
  137. package/_internal/9b9393ee.d.ts +29 -0
  138. package/_internal/9dced38c.js +284 -0
  139. package/_internal/9dced38c.js.map +1 -0
  140. package/_internal/a07fe032.d.ts +57 -0
  141. package/_internal/a08b82a3.d.ts +31 -0
  142. package/_internal/a106724b.d.ts +43 -0
  143. package/_internal/a7807be3.js +120 -0
  144. package/_internal/a7807be3.js.map +1 -0
  145. package/_internal/a79b2c62.js +60 -0
  146. package/_internal/a79b2c62.js.map +1 -0
  147. package/_internal/a7b06ff0.d.ts +16 -0
  148. package/_internal/a8af376d.d.ts +35 -0
  149. package/_internal/abdb0290.d.ts +35 -0
  150. package/_internal/adb2e104.d.ts +101 -0
  151. package/_internal/b13105c1.d.ts +38 -0
  152. package/_internal/b3361376.d.ts +55 -0
  153. package/_internal/b3bb0cc4.d.ts +92 -0
  154. package/_internal/b447833b.d.ts +24 -0
  155. package/_internal/b5deecfd.d.ts +64 -0
  156. package/_internal/b70adcf7.js +310 -0
  157. package/_internal/b70adcf7.js.map +1 -0
  158. package/_internal/b7128df5.js +137 -0
  159. package/_internal/b7128df5.js.map +1 -0
  160. package/_internal/baf84dac.js +29 -0
  161. package/_internal/baf84dac.js.map +1 -0
  162. package/_internal/bd3b5639.d.ts +183 -0
  163. package/_internal/bf97c97c.js +112 -0
  164. package/_internal/bf97c97c.js.map +1 -0
  165. package/_internal/c1482714.js +63 -0
  166. package/_internal/c1482714.js.map +1 -0
  167. package/_internal/c498efeb.js +12 -0
  168. package/_internal/c498efeb.js.map +1 -0
  169. package/_internal/c672b554.d.ts +87 -0
  170. package/_internal/c70420da.js +120 -0
  171. package/_internal/c70420da.js.map +1 -0
  172. package/_internal/ce96edec.d.ts +41 -0
  173. package/_internal/cf2cb6bc.d.ts +22 -0
  174. package/_internal/cf312aff.d.ts +38 -0
  175. package/_internal/cfd18b6d.js +88 -0
  176. package/_internal/cfd18b6d.js.map +1 -0
  177. package/_internal/components/alert-dialog.d.ts +6 -0
  178. package/_internal/components/alert-dialog.js +2 -0
  179. package/_internal/components/alert-dialog.js.map +1 -0
  180. package/_internal/components/autocomplete.d.ts +10 -0
  181. package/_internal/components/autocomplete.js +2 -0
  182. package/_internal/components/autocomplete.js.map +1 -0
  183. package/_internal/components/avatar.d.ts +4 -0
  184. package/_internal/components/avatar.js +2 -0
  185. package/_internal/components/avatar.js.map +1 -0
  186. package/_internal/components/badge.d.ts +3 -0
  187. package/_internal/components/badge.js +2 -0
  188. package/_internal/components/badge.js.map +1 -0
  189. package/_internal/components/button.d.ts +8 -0
  190. package/_internal/components/button.js +4 -0
  191. package/_internal/components/button.js.map +1 -0
  192. package/_internal/components/checkbox.d.ts +3 -0
  193. package/_internal/components/checkbox.js +2 -0
  194. package/_internal/components/checkbox.js.map +1 -0
  195. package/_internal/components/chip.d.ts +3 -0
  196. package/_internal/components/chip.js +3 -0
  197. package/_internal/components/chip.js.map +1 -0
  198. package/_internal/components/comment-block.d.ts +5 -0
  199. package/_internal/components/comment-block.js +2 -0
  200. package/_internal/components/comment-block.js.map +1 -0
  201. package/_internal/components/date-picker.d.ts +7 -0
  202. package/_internal/components/date-picker.js +2 -0
  203. package/_internal/components/date-picker.js.map +1 -0
  204. package/_internal/components/dialog.d.ts +3 -0
  205. package/_internal/components/dialog.js +2 -0
  206. package/_internal/components/dialog.js.map +1 -0
  207. package/_internal/components/divider.d.ts +3 -0
  208. package/_internal/components/divider.js +2 -0
  209. package/_internal/components/divider.js.map +1 -0
  210. package/_internal/components/drag-handle.d.ts +3 -0
  211. package/_internal/components/drag-handle.js +2 -0
  212. package/_internal/components/drag-handle.js.map +1 -0
  213. package/_internal/components/dropdown.d.ts +5 -0
  214. package/_internal/components/dropdown.js +2 -0
  215. package/_internal/components/dropdown.js.map +1 -0
  216. package/_internal/components/expansion-panel.d.ts +7 -0
  217. package/_internal/components/expansion-panel.js +2 -0
  218. package/_internal/components/expansion-panel.js.map +1 -0
  219. package/_internal/components/flag.d.ts +3 -0
  220. package/_internal/components/flag.js +2 -0
  221. package/_internal/components/flag.js.map +1 -0
  222. package/_internal/components/flex-box.d.ts +3 -0
  223. package/_internal/components/flex-box.js +2 -0
  224. package/_internal/components/flex-box.js.map +1 -0
  225. package/_internal/components/generic-block.d.ts +4 -0
  226. package/_internal/components/generic-block.js +2 -0
  227. package/_internal/components/generic-block.js.map +1 -0
  228. package/_internal/components/grid-column.d.ts +3 -0
  229. package/_internal/components/grid-column.js +2 -0
  230. package/_internal/components/grid-column.js.map +1 -0
  231. package/_internal/components/grid.d.ts +3 -0
  232. package/_internal/components/grid.js +2 -0
  233. package/_internal/components/grid.js.map +1 -0
  234. package/_internal/components/heading.d.ts +4 -0
  235. package/_internal/components/heading.js +2 -0
  236. package/_internal/components/heading.js.map +1 -0
  237. package/_internal/components/icon.d.ts +3 -0
  238. package/_internal/components/icon.js +2 -0
  239. package/_internal/components/icon.js.map +1 -0
  240. package/_internal/components/image-block.d.ts +4 -0
  241. package/_internal/components/image-block.js +2 -0
  242. package/_internal/components/image-block.js.map +1 -0
  243. package/_internal/components/inline-list.d.ts +3 -0
  244. package/_internal/components/inline-list.js +2 -0
  245. package/_internal/components/inline-list.js.map +1 -0
  246. package/_internal/components/input-helper.d.ts +3 -0
  247. package/_internal/components/input-helper.js +2 -0
  248. package/_internal/components/input-helper.js.map +1 -0
  249. package/_internal/components/input-label.d.ts +3 -0
  250. package/_internal/components/input-label.js +2 -0
  251. package/_internal/components/input-label.js.map +1 -0
  252. package/_internal/components/lightbox.d.ts +7 -0
  253. package/_internal/components/lightbox.js +2 -0
  254. package/_internal/components/lightbox.js.map +1 -0
  255. package/_internal/components/link-preview.d.ts +5 -0
  256. package/_internal/components/link-preview.js +2 -0
  257. package/_internal/components/link-preview.js.map +1 -0
  258. package/_internal/components/link.d.ts +3 -0
  259. package/_internal/components/link.js +2 -0
  260. package/_internal/components/link.js.map +1 -0
  261. package/_internal/components/list.d.ts +3 -0
  262. package/_internal/components/list.js +3 -0
  263. package/_internal/components/list.js.map +1 -0
  264. package/_internal/components/message.d.ts +3 -0
  265. package/_internal/components/message.js +2 -0
  266. package/_internal/components/message.js.map +1 -0
  267. package/_internal/components/mosaic.d.ts +4 -0
  268. package/_internal/components/mosaic.js +2 -0
  269. package/_internal/components/mosaic.js.map +1 -0
  270. package/_internal/components/navigation.d.ts +3 -0
  271. package/_internal/components/navigation.js +2 -0
  272. package/_internal/components/navigation.js.map +1 -0
  273. package/_internal/components/notification.d.ts +3 -0
  274. package/_internal/components/notification.js +2 -0
  275. package/_internal/components/notification.js.map +1 -0
  276. package/_internal/components/popover.d.ts +4 -0
  277. package/_internal/components/popover.js +3 -0
  278. package/_internal/components/popover.js.map +1 -0
  279. package/_internal/components/post-block.d.ts +4 -0
  280. package/_internal/components/post-block.js +2 -0
  281. package/_internal/components/post-block.js.map +1 -0
  282. package/_internal/components/progress-tracker.d.ts +3 -0
  283. package/_internal/components/progress-tracker.js +2 -0
  284. package/_internal/components/progress-tracker.js.map +1 -0
  285. package/_internal/components/progress.d.ts +3 -0
  286. package/_internal/components/progress.js +2 -0
  287. package/_internal/components/progress.js.map +1 -0
  288. package/_internal/components/radio-button.d.ts +3 -0
  289. package/_internal/components/radio-button.js +2 -0
  290. package/_internal/components/radio-button.js.map +1 -0
  291. package/_internal/components/select.d.ts +7 -0
  292. package/_internal/components/select.js +2 -0
  293. package/_internal/components/select.js.map +1 -0
  294. package/_internal/components/side-navigation.d.ts +7 -0
  295. package/_internal/components/side-navigation.js +2 -0
  296. package/_internal/components/side-navigation.js.map +1 -0
  297. package/_internal/components/skeleton.d.ts +3 -0
  298. package/_internal/components/skeleton.js +2 -0
  299. package/_internal/components/skeleton.js.map +1 -0
  300. package/_internal/components/slider.d.ts +3 -0
  301. package/_internal/components/slider.js +2 -0
  302. package/_internal/components/slider.js.map +1 -0
  303. package/_internal/components/slideshow.d.ts +7 -0
  304. package/_internal/components/slideshow.js +2 -0
  305. package/_internal/components/slideshow.js.map +1 -0
  306. package/_internal/components/switch.d.ts +3 -0
  307. package/_internal/components/switch.js +2 -0
  308. package/_internal/components/switch.js.map +1 -0
  309. package/_internal/components/table.d.ts +3 -0
  310. package/_internal/components/table.js +2 -0
  311. package/_internal/components/table.js.map +1 -0
  312. package/_internal/components/tabs.d.ts +4 -0
  313. package/_internal/components/tabs.js +2 -0
  314. package/_internal/components/tabs.js.map +1 -0
  315. package/_internal/components/text-field.d.ts +7 -0
  316. package/_internal/components/text-field.js +2 -0
  317. package/_internal/components/text-field.js.map +1 -0
  318. package/_internal/components/text.d.ts +3 -0
  319. package/_internal/components/text.js +2 -0
  320. package/_internal/components/text.js.map +1 -0
  321. package/_internal/components/thumbnail.d.ts +4 -0
  322. package/_internal/components/thumbnail.js +3 -0
  323. package/_internal/components/thumbnail.js.map +1 -0
  324. package/_internal/components/toolbar.d.ts +3 -0
  325. package/_internal/components/toolbar.js +2 -0
  326. package/_internal/components/toolbar.js.map +1 -0
  327. package/_internal/components/tooltip.d.ts +4 -0
  328. package/_internal/components/tooltip.js +2 -0
  329. package/_internal/components/tooltip.js.map +1 -0
  330. package/_internal/components/uploader.d.ts +3 -0
  331. package/_internal/components/uploader.js +2 -0
  332. package/_internal/components/uploader.js.map +1 -0
  333. package/_internal/components/user-block.d.ts +5 -0
  334. package/_internal/components/user-block.js +2 -0
  335. package/_internal/components/user-block.js.map +1 -0
  336. package/_internal/d0ab9418.js +217 -0
  337. package/_internal/d0ab9418.js.map +1 -0
  338. package/_internal/d182fae6.js +402 -0
  339. package/_internal/d182fae6.js.map +1 -0
  340. package/_internal/d18db1a2.d.ts +17 -0
  341. package/_internal/d39f1e46.d.ts +65 -0
  342. package/_internal/d737c470.js +312 -0
  343. package/_internal/d737c470.js.map +1 -0
  344. package/_internal/d894ca99.d.ts +49 -0
  345. package/_internal/da84387d.d.ts +36 -0
  346. package/_internal/dbee763e.d.ts +34 -0
  347. package/_internal/dd592f2c.d.ts +6 -0
  348. package/_internal/de727831.d.ts +17 -0
  349. package/_internal/df1fde7b.js +125 -0
  350. package/_internal/df1fde7b.js.map +1 -0
  351. package/_internal/e238e75a.d.ts +20 -0
  352. package/_internal/e50751c9.js +259 -0
  353. package/_internal/e50751c9.js.map +1 -0
  354. package/_internal/e986d261.js +84 -0
  355. package/_internal/e986d261.js.map +1 -0
  356. package/_internal/ebe0cef1.d.ts +88 -0
  357. package/_internal/ef7b6d28.d.ts +43 -0
  358. package/_internal/f0bb348a.js +49 -0
  359. package/_internal/f0bb348a.js.map +1 -0
  360. package/_internal/f0edbfd3.js +399 -0
  361. package/_internal/f0edbfd3.js.map +1 -0
  362. package/_internal/f722684a.js +137 -0
  363. package/_internal/f722684a.js.map +1 -0
  364. package/_internal/{ClickAwayProvider.js → f82d943d.js} +1 -1
  365. package/_internal/f82d943d.js.map +1 -0
  366. package/_internal/f99a63fb.d.ts +118 -0
  367. package/_internal/fc608bd9.js +16 -0
  368. package/_internal/fc608bd9.js.map +1 -0
  369. package/_internal/ff6c8991.js +180 -0
  370. package/_internal/ff6c8991.js.map +1 -0
  371. package/index.d.ts +63 -2847
  372. package/index.js +97 -13086
  373. package/index.js.map +1 -1
  374. package/package.json +3 -5
  375. package/src/components/date-picker/DatePicker.stories.tsx +38 -0
  376. package/src/components/date-picker/DatePicker.tsx +8 -11
  377. package/src/components/date-picker/DatePickerControlled.tsx +35 -43
  378. package/src/components/date-picker/DatePickerField.stories.tsx +0 -1
  379. package/src/components/date-picker/DatePickerField.tsx +7 -8
  380. package/src/components/date-picker/types.ts +1 -1
  381. package/src/utils/date/addMonthResetDay.test.ts +13 -0
  382. package/src/utils/date/addMonthResetDay.ts +9 -0
  383. package/src/utils/date/formatDate.ts +9 -0
  384. package/src/utils/date/formatDayNumber.ts +2 -0
  385. package/src/utils/date/formatMonthYear.ts +5 -0
  386. package/src/utils/date/getFirstDayOfWeek.test.ts +27 -0
  387. package/src/utils/date/getFirstDayOfWeek.ts +59 -0
  388. package/src/utils/date/getMonthCalendar.test.ts +119 -0
  389. package/src/utils/date/getMonthCalendar.ts +52 -0
  390. package/src/utils/date/getWeekDays.test.ts +52 -0
  391. package/src/utils/date/getWeekDays.ts +32 -0
  392. package/src/utils/date/isDateValid.test.ts +15 -0
  393. package/src/utils/date/isDateValid.ts +4 -0
  394. package/src/utils/date/isSameDay.test.ts +27 -0
  395. package/src/utils/date/isSameDay.ts +7 -0
  396. package/src/utils/locale/getCurrentLocale.ts +4 -0
  397. package/src/utils/locale/getLocaleLang.ts +5 -0
  398. package/utils/index.d.ts +1 -1
  399. package/utils/index.js +1 -1
  400. package/_internal/ClickAwayProvider.js.map +0 -1
@@ -298,4 +298,4 @@ declare const ThumbnailVariant: {
298
298
  };
299
299
  declare type ThumbnailVariant = ValueOf<typeof ThumbnailVariant>;
300
300
 
301
- export { Alignment as A, Comp as C, Emphasis as E, Falsy as F, GenericProps as G, HasTheme as H, Kind as K, Orientation as O, Size as S, Typography as T, ValueOf as V, HorizontalAlignment as a, ColorPalette as b, VerticalAlignment as c, ColorVariant as d, TextElement as e, HeadingElement as f, AspectRatio as g, FocusPoint as h, ThumbnailSize as i, ThumbnailVariant as j, HasClassName as k, HasAriaLabelOrLabelledBy as l, ComponentRef as m, GlobalSize as n, TypographyInterface as o, Color as p, Theme as q, TypographyTitleCustom as r, TypographyCustom as s, Callback as t, ThumbnailAspectRatio as u };
301
+ export { Alignment as A, Comp as C, Emphasis as E, FocusPoint as F, GlobalSize as G, HasAriaLabelOrLabelledBy as H, Kind as K, Orientation as O, Size as S, Theme as T, VerticalAlignment as V, HorizontalAlignment as a, ColorPalette as b, Color as c, ColorVariant as d, TypographyInterface as e, TypographyTitleCustom as f, TypographyCustom as g, Typography as h, AspectRatio as i, HeadingElement as j, TextElement as k, GenericProps as l, Callback as m, ThumbnailAspectRatio as n, ThumbnailSize as o, ThumbnailVariant as p, HasTheme as q, ValueOf as r, HasClassName as s, ComponentRef as t, Falsy as u };
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from 'react';
2
+ import { l as GenericProps, b as ColorPalette, C as Comp } from './28b656e3.js';
3
+
4
+ /**
5
+ * Defines the props of the component.
6
+ */
7
+ interface BadgeProps extends GenericProps {
8
+ /** Badge content. */
9
+ children?: ReactNode;
10
+ /** Color variant. */
11
+ color?: ColorPalette;
12
+ }
13
+ /**
14
+ * Badge component.
15
+ *
16
+ * @param props Component props.
17
+ * @param ref Component ref.
18
+ * @return React element.
19
+ */
20
+ declare const Badge: Comp<BadgeProps, HTMLDivElement>;
21
+
22
+ export { BadgeProps as B, Badge as a };
@@ -0,0 +1,49 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { S as Size, l as GenericProps, q as HasTheme, O as Orientation, C as Comp } from './28b656e3.js';
3
+ import { a as AvatarProps } from './ef7b6d28.js';
4
+
5
+ /**
6
+ * User block sizes.
7
+ */
8
+ declare type UserBlockSize = Extract<Size, 's' | 'm' | 'l'>;
9
+ /**
10
+ * Defines the props of the component.
11
+ */
12
+ interface UserBlockProps extends GenericProps, HasTheme {
13
+ /** Props to pass to the avatar. */
14
+ avatarProps?: Omit<AvatarProps, 'alt'>;
15
+ /** Additional fields used to describe the user. */
16
+ fields?: string[];
17
+ /** Props to pass to the link wrapping the avatar thumbnail. */
18
+ linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
19
+ /** Custom react component for the link (can be used to inject react router Link). */
20
+ linkAs?: 'a' | any;
21
+ /** Multiple action toolbar content. */
22
+ multipleActions?: ReactNode;
23
+ /** User name. */
24
+ name?: string;
25
+ /** Props to pass to the name block. */
26
+ nameProps?: GenericProps;
27
+ /** Orientation. */
28
+ orientation?: Orientation;
29
+ /** Simple action toolbar content. */
30
+ simpleAction?: ReactNode;
31
+ /** Size variant. */
32
+ size?: UserBlockSize;
33
+ /** On click callback. */
34
+ onClick?(): void;
35
+ /** On mouse enter callback. */
36
+ onMouseEnter?(): void;
37
+ /** On mouse leave callback. */
38
+ onMouseLeave?(): void;
39
+ }
40
+ /**
41
+ * UserBlock component.
42
+ *
43
+ * @param props Component props.
44
+ * @param ref Component ref.
45
+ * @return React element.
46
+ */
47
+ declare const UserBlock: Comp<UserBlockProps, HTMLDivElement>;
48
+
49
+ export { UserBlockSize as U, UserBlockProps as a, UserBlock as b };
@@ -0,0 +1,147 @@
1
+ import { g as getRootClassName, _ as _objectWithoutProperties, a as _extends, j as _objectSpread2, c as classnames, S as Size, E as Emphasis, K as Kind, C as ColorPalette } from './35c3a78f.js';
2
+ import React, { forwardRef } from 'react';
3
+ import { I as Icon, m as mdiAlert, a as mdiInformation, b as mdiCheckCircle, c as mdiAlertCircle } from './52976f60.js';
4
+ import { u as uid } from './fc608bd9.js';
5
+ import { h as handleBasicClasses } from './3f5e7653.js';
6
+ import { a as Button } from './975a94f4.js';
7
+ import { D as Dialog } from './2db3ca7a.js';
8
+ import { T as Toolbar } from './c1482714.js';
9
+
10
+ const _excluded = ["id", "title", "className", "cancelProps", "confirmProps", "kind", "size", "dialogProps", "children"],
11
+ _excluded2 = ["label", "onClick"],
12
+ _excluded3 = ["label", "onClick"];
13
+ /**
14
+ * Associative map from message kind to color and icon.
15
+ */
16
+ const CONFIG = {
17
+ [Kind.error]: {
18
+ color: ColorPalette.red,
19
+ icon: mdiAlert
20
+ },
21
+ [Kind.info]: {
22
+ color: ColorPalette.blue,
23
+ icon: mdiInformation
24
+ },
25
+ [Kind.success]: {
26
+ color: ColorPalette.green,
27
+ icon: mdiCheckCircle
28
+ },
29
+ [Kind.warning]: {
30
+ color: ColorPalette.yellow,
31
+ icon: mdiAlertCircle
32
+ }
33
+ };
34
+
35
+ /**
36
+ * Component display name.
37
+ */
38
+ const COMPONENT_NAME = 'AlertDialog';
39
+
40
+ /**
41
+ * Component default class name and class prefix.
42
+ */
43
+ const CLASSNAME = getRootClassName(COMPONENT_NAME);
44
+
45
+ /**
46
+ * Component default props.
47
+ */
48
+ const DEFAULT_PROPS = {
49
+ size: Size.tiny,
50
+ kind: Kind.info
51
+ };
52
+
53
+ /**
54
+ * AlertDialog component.
55
+ *
56
+ * An alert dialog is a modal dialog that interrupts the user's workflow to
57
+ * communicate an important message and acquire a response.
58
+ *
59
+ * It should not have a complex content.
60
+ * Children of this component should only be strings, paragraphs or links.
61
+ */
62
+ const AlertDialog = /*#__PURE__*/forwardRef((props, ref) => {
63
+ const {
64
+ id,
65
+ title,
66
+ className,
67
+ cancelProps,
68
+ confirmProps,
69
+ kind,
70
+ size,
71
+ dialogProps,
72
+ children
73
+ } = props,
74
+ forwardedProps = _objectWithoutProperties(props, _excluded);
75
+ const cancelButtonRef = React.useRef(null);
76
+ const confirmationButtonRef = React.useRef(null);
77
+ const {
78
+ color,
79
+ icon
80
+ } = CONFIG[kind] || {};
81
+
82
+ // Define a unique ID to target title and description for aria attributes.
83
+ const uniqueId = React.useMemo(() => id || uid(), [id]);
84
+ const titleId = `${uniqueId}-title`;
85
+ const descriptionId = `${uniqueId}-description`;
86
+
87
+ // If content is a string, set in a paragraph.
88
+ const DescriptionElement = typeof children === 'string' ? 'p' : 'div';
89
+ const {
90
+ label: confirmLabel,
91
+ onClick: confirmOnClick
92
+ } = confirmProps,
93
+ forwardedConfirmProps = _objectWithoutProperties(confirmProps, _excluded2);
94
+ const _ref = cancelProps || {},
95
+ {
96
+ label: cancelLabel,
97
+ onClick: cancelOnClick
98
+ } = _ref,
99
+ forwardedCancelProps = _objectWithoutProperties(_ref, _excluded3);
100
+ return /*#__PURE__*/React.createElement(Dialog, _extends({
101
+ ref: ref,
102
+ focusElement: cancelProps ? cancelButtonRef : confirmationButtonRef,
103
+ size: size,
104
+ dialogProps: _objectSpread2({
105
+ id: uniqueId,
106
+ role: 'alertdialog',
107
+ 'aria-labelledby': titleId,
108
+ 'aria-describedby': descriptionId
109
+ }, dialogProps),
110
+ className: classnames(className, handleBasicClasses({
111
+ kind,
112
+ prefix: CLASSNAME
113
+ }))
114
+ }, forwardedProps), /*#__PURE__*/React.createElement("header", null, /*#__PURE__*/React.createElement(Toolbar, {
115
+ className: "lumx-spacing-margin-horizontal",
116
+ before: /*#__PURE__*/React.createElement(Icon, {
117
+ icon: icon,
118
+ size: Size.s,
119
+ color: color
120
+ }),
121
+ label: /*#__PURE__*/React.createElement("h2", {
122
+ id: titleId,
123
+ className: "lumx-typography-title"
124
+ }, title)
125
+ })), children && /*#__PURE__*/React.createElement(DescriptionElement, {
126
+ id: descriptionId,
127
+ className: "lumx-typography-body2 lumx-spacing-padding-vertical-big lumx-spacing-padding-horizontal-huge"
128
+ }, children), /*#__PURE__*/React.createElement("footer", null, /*#__PURE__*/React.createElement(Toolbar, {
129
+ className: "lumx-spacing-margin-horizontal",
130
+ after: /*#__PURE__*/React.createElement(React.Fragment, null, cancelProps && /*#__PURE__*/React.createElement(Button, _extends({}, forwardedCancelProps, {
131
+ ref: cancelButtonRef,
132
+ emphasis: Emphasis.medium,
133
+ onClick: cancelOnClick
134
+ }), cancelLabel), /*#__PURE__*/React.createElement(Button, _extends({}, forwardedConfirmProps, {
135
+ ref: confirmationButtonRef,
136
+ color: color,
137
+ className: "lumx-spacing-margin-left-regular",
138
+ onClick: confirmOnClick
139
+ }), confirmLabel))
140
+ })));
141
+ });
142
+ AlertDialog.displayName = COMPONENT_NAME;
143
+ AlertDialog.className = CLASSNAME;
144
+ AlertDialog.defaultProps = DEFAULT_PROPS;
145
+
146
+ export { AlertDialog as A };
147
+ //# sourceMappingURL=2d7bd818.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2d7bd818.js","sources":["../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport {\n DialogProps,\n Dialog,\n Button,\n Emphasis,\n ColorPalette,\n Icon,\n Size,\n Kind,\n Toolbar,\n ButtonProps,\n} from '@lumx/react';\n\nimport { mdiAlert, mdiAlertCircle, mdiCheckCircle, mdiInformation } from '@lumx/icons/';\nimport { uid } from 'uid';\nimport { Comp } from '@lumx/react/utils/type';\nimport { getRootClassName, handleBasicClasses } from '@lumx/react/utils/className';\n\nexport interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'> {\n /** Message variant. */\n kind?: Kind;\n /** Dialog title. */\n title?: string;\n /** Props forwarded to the confirm button */\n confirmProps: ButtonProps & {\n onClick(): void;\n label: string;\n };\n /**\n * Props forwarded to the cancel button.\n * Will not render a cancel button if undefined.\n */\n cancelProps?: ButtonProps & {\n onClick(): void;\n label: string;\n };\n}\n\n/**\n * Associative map from message kind to color and icon.\n */\nconst CONFIG = {\n [Kind.error]: { color: ColorPalette.red, icon: mdiAlert },\n [Kind.info]: { color: ColorPalette.blue, icon: mdiInformation },\n [Kind.success]: { color: ColorPalette.green, icon: mdiCheckCircle },\n [Kind.warning]: { color: ColorPalette.yellow, icon: mdiAlertCircle },\n};\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'AlertDialog';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<DialogProps> = {\n size: Size.tiny,\n kind: Kind.info,\n};\n\n/**\n * AlertDialog component.\n *\n * An alert dialog is a modal dialog that interrupts the user's workflow to\n * communicate an important message and acquire a response.\n *\n * It should not have a complex content.\n * Children of this component should only be strings, paragraphs or links.\n */\nexport const AlertDialog: Comp<AlertDialogProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n id,\n title,\n className,\n cancelProps,\n confirmProps,\n kind,\n size,\n dialogProps,\n children,\n ...forwardedProps\n } = props;\n\n const cancelButtonRef = React.useRef(null);\n const confirmationButtonRef = React.useRef(null);\n const { color, icon } = CONFIG[kind as Kind] || {};\n\n // Define a unique ID to target title and description for aria attributes.\n const uniqueId = React.useMemo(() => id || uid(), [id]);\n const titleId = `${uniqueId}-title`;\n const descriptionId = `${uniqueId}-description`;\n\n // If content is a string, set in a paragraph.\n const DescriptionElement = typeof children === 'string' ? 'p' : 'div';\n\n const { label: confirmLabel, onClick: confirmOnClick, ...forwardedConfirmProps } = confirmProps;\n const { label: cancelLabel, onClick: cancelOnClick, ...forwardedCancelProps } = cancelProps || {};\n\n return (\n <Dialog\n ref={ref}\n focusElement={cancelProps ? cancelButtonRef : confirmationButtonRef}\n size={size}\n dialogProps={{\n id: uniqueId,\n role: 'alertdialog',\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n ...dialogProps,\n }}\n className={classNames(\n className,\n handleBasicClasses({\n kind,\n prefix: CLASSNAME,\n }),\n )}\n {...forwardedProps}\n >\n <header>\n <Toolbar\n className=\"lumx-spacing-margin-horizontal\"\n before={<Icon icon={icon} size={Size.s} color={color} />}\n label={\n <h2 id={titleId} className=\"lumx-typography-title\">\n {title}\n </h2>\n }\n />\n </header>\n\n {children && (\n <DescriptionElement\n id={descriptionId}\n className=\"lumx-typography-body2 lumx-spacing-padding-vertical-big lumx-spacing-padding-horizontal-huge\"\n >\n {children}\n </DescriptionElement>\n )}\n\n <footer>\n <Toolbar\n className=\"lumx-spacing-margin-horizontal\"\n after={\n <>\n {cancelProps && (\n <Button\n {...forwardedCancelProps}\n ref={cancelButtonRef}\n emphasis={Emphasis.medium}\n onClick={cancelOnClick}\n >\n {cancelLabel}\n </Button>\n )}\n <Button\n {...forwardedConfirmProps}\n ref={confirmationButtonRef}\n color={color}\n className=\"lumx-spacing-margin-left-regular\"\n onClick={confirmOnClick}\n >\n {confirmLabel}\n </Button>\n </>\n }\n />\n </footer>\n </Dialog>\n );\n});\n\nAlertDialog.displayName = COMPONENT_NAME;\nAlertDialog.className = CLASSNAME;\nAlertDialog.defaultProps = DEFAULT_PROPS;\n"],"names":["CONFIG","Kind","error","color","ColorPalette","red","icon","mdiAlert","info","blue","mdiInformation","success","green","mdiCheckCircle","warning","yellow","mdiAlertCircle","COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","size","Size","tiny","kind","AlertDialog","forwardRef","props","ref","id","title","className","cancelProps","confirmProps","dialogProps","children","forwardedProps","_objectWithoutProperties","_excluded","cancelButtonRef","React","useRef","confirmationButtonRef","uniqueId","useMemo","uid","titleId","descriptionId","DescriptionElement","label","confirmLabel","onClick","confirmOnClick","forwardedConfirmProps","_excluded2","_ref","cancelLabel","cancelOnClick","forwardedCancelProps","_excluded3","createElement","Dialog","_extends","focusElement","_objectSpread","role","classNames","handleBasicClasses","prefix","Toolbar","before","Icon","s","after","Fragment","Button","emphasis","Emphasis","medium","displayName","defaultProps"],"mappings":";;;;;;;;;;;;AA0CA;AACA;AACA;AACA,MAAMA,MAAM,GAAG;EACX,CAACC,IAAI,CAACC,KAAK,GAAG;IAAEC,KAAK,EAAEC,YAAY,CAACC,GAAG;IAAEC,IAAI,EAAEC;GAAU;EACzD,CAACN,IAAI,CAACO,IAAI,GAAG;IAAEL,KAAK,EAAEC,YAAY,CAACK,IAAI;IAAEH,IAAI,EAAEI;GAAgB;EAC/D,CAACT,IAAI,CAACU,OAAO,GAAG;IAAER,KAAK,EAAEC,YAAY,CAACQ,KAAK;IAAEN,IAAI,EAAEO;GAAgB;EACnE,CAACZ,IAAI,CAACa,OAAO,GAAG;IAAEX,KAAK,EAAEC,YAAY,CAACW,MAAM;IAAET,IAAI,EAAEU;;AACxD,CAAC;;AAED;AACA;AACA;AACA,MAAMC,cAAc,GAAG,aAAa;;AAEpC;AACA;AACA;AACA,MAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAc,CAAC;;AAElD;AACA;AACA;AACA,MAAMG,aAAmC,GAAG;EACxCC,IAAI,EAAEC,IAAI,CAACC,IAAI;EACfC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DhB,KAAA,CAAAoB,aAAA,CAACe,MAAM,EAAAb,QAAA,KACCT,qBAAqB;MACzBzB,GAAG,EAAEc,qBAAsB;MAC3BvC,KAAK,EAAEA,KAAM;MACb4B,SAAS,EAAC,kCAAkC;MAC5CoB,OAAO,EAAEC;QAERF,YACG,CACV;GAET,CACG,CACJ,CAAC;AAEjB,CAAC;AAEDzB,WAAW,CAACsD,WAAW,GAAG9D,cAAc;AACxCQ,WAAW,CAACM,SAAS,GAAGb,SAAS;AACjCO,WAAW,CAACuD,YAAY,GAAG5D,aAAa;;;;"}
@@ -0,0 +1,221 @@
1
+ import { g as getRootClassName, _ as _objectWithoutProperties, a as _extends, c as classnames, S as Size } from './35c3a78f.js';
2
+ import React, { useState, useEffect, forwardRef, useRef, useMemo, Children } from 'react';
3
+ import { D as DOCUMENT } from './c498efeb.js';
4
+ import { h as handleBasicClasses } from './3f5e7653.js';
5
+ import { m as mergeRefs } from './83dab2b2.js';
6
+ import { i as isComponent } from './48725bae.js';
7
+ import { a as useCallbackOnEscape, u as useFocusTrap } from './0110d951.js';
8
+ import { createPortal } from 'react-dom';
9
+ import { p as partitionMulti } from './834ad334.js';
10
+ import { C as ClickAwayProvider } from './f82d943d.js';
11
+ import { u as useDisableBodyScroll } from './50472283.js';
12
+ import { u as useTransitionVisibility } from './a79b2c62.js';
13
+ import { a as Progress, P as ProgressVariant } from './43bf2236.js';
14
+
15
+ /**
16
+ * Convenient hook to create interaction observers.
17
+ *
18
+ * @param elements Elements to observe.
19
+ * @param options IntersectionObserver options.
20
+ * @return Map of intersections.
21
+ */
22
+ function useIntersectionObserver(elements, options) {
23
+ const [intersections, setIntersections] = useState(() => new Map());
24
+ useEffect(() => {
25
+ if (elements.length < 1 || !elements.some(Boolean)) {
26
+ return undefined;
27
+ }
28
+ const observer = new IntersectionObserver(entries => {
29
+ for (const entry of entries) {
30
+ intersections.set(entry.target, entry);
31
+ }
32
+ setIntersections(new Map(intersections));
33
+ }, options);
34
+ for (const element of elements) {
35
+ if (element) {
36
+ observer.observe(element);
37
+ }
38
+ }
39
+ return () => observer.disconnect();
40
+ },
41
+ // eslint-disable-next-line react-hooks/exhaustive-deps
42
+ [...elements]);
43
+ return intersections;
44
+ }
45
+
46
+ const _excluded = ["children", "className", "header", "focusElement", "forceFooterDivider", "forceHeaderDivider", "footer", "isLoading", "isOpen", "onClose", "parentElement", "contentRef", "preventAutoClose", "size", "zIndex", "dialogProps", "onVisibilityChange", "disableBodyScroll", "preventCloseOnClick", "preventCloseOnEscape"];
47
+
48
+ /**
49
+ * Defines the props of the component.
50
+ */
51
+
52
+ const isHeader = isComponent('header');
53
+ const isFooter = isComponent('footer');
54
+
55
+ /**
56
+ * Component display name.
57
+ */
58
+ const COMPONENT_NAME = 'Dialog';
59
+
60
+ /**
61
+ * Component default class name and class prefix.
62
+ */
63
+ const CLASSNAME = getRootClassName(COMPONENT_NAME);
64
+
65
+ /**
66
+ * Component default props.
67
+ */
68
+ const DEFAULT_PROPS = {
69
+ size: Size.big,
70
+ disableBodyScroll: true
71
+ };
72
+
73
+ /**
74
+ * Dialog component.
75
+ *
76
+ * @param props Component props.
77
+ * @param ref Component ref.
78
+ * @return React element.
79
+ */
80
+ const Dialog = /*#__PURE__*/forwardRef((props, ref) => {
81
+ var _intersections$get$is, _intersections$get, _intersections$get$is2, _intersections$get2;
82
+ if (!DOCUMENT) {
83
+ // Can't render in SSR.
84
+ return null;
85
+ }
86
+ const {
87
+ children,
88
+ className,
89
+ header,
90
+ focusElement,
91
+ forceFooterDivider,
92
+ forceHeaderDivider,
93
+ footer,
94
+ isLoading,
95
+ isOpen,
96
+ onClose,
97
+ parentElement,
98
+ contentRef,
99
+ preventAutoClose,
100
+ size,
101
+ zIndex,
102
+ dialogProps,
103
+ onVisibilityChange,
104
+ disableBodyScroll,
105
+ preventCloseOnClick,
106
+ preventCloseOnEscape
107
+ } = props,
108
+ forwardedProps = _objectWithoutProperties(props, _excluded);
109
+
110
+ // eslint-disable-next-line react-hooks/rules-of-hooks
111
+ const previousOpen = React.useRef(isOpen);
112
+ // eslint-disable-next-line react-hooks/rules-of-hooks
113
+ React.useEffect(() => {
114
+ if (isOpen !== previousOpen.current) {
115
+ previousOpen.current = isOpen;
116
+
117
+ // Focus the parent element on close.
118
+ if (!isOpen && parentElement && parentElement.current) {
119
+ parentElement.current.focus();
120
+ }
121
+ }
122
+ }, [isOpen, parentElement]);
123
+ const shouldPreventCloseOnEscape = preventAutoClose || preventCloseOnEscape;
124
+
125
+ // eslint-disable-next-line react-hooks/rules-of-hooks
126
+ useCallbackOnEscape(onClose, isOpen && !shouldPreventCloseOnEscape);
127
+
128
+ // eslint-disable-next-line react-hooks/rules-of-hooks
129
+ const wrapperRef = useRef(null);
130
+ /**
131
+ * Since the `contentRef` comes from the parent and is optional,
132
+ * we need to create a stable contentRef that will always be available.
133
+ */
134
+ // eslint-disable-next-line react-hooks/rules-of-hooks
135
+ const localContentRef = useRef(null);
136
+ // Handle focus trap.
137
+ // eslint-disable-next-line react-hooks/rules-of-hooks
138
+ useFocusTrap(isOpen && wrapperRef.current, focusElement === null || focusElement === void 0 ? void 0 : focusElement.current);
139
+
140
+ // eslint-disable-next-line react-hooks/rules-of-hooks
141
+ useDisableBodyScroll(disableBodyScroll && isOpen && localContentRef.current);
142
+
143
+ // eslint-disable-next-line react-hooks/rules-of-hooks
144
+ const [sentinelTop, setSentinelTop] = useState(null);
145
+ // eslint-disable-next-line react-hooks/rules-of-hooks
146
+ const [sentinelBottom, setSentinelBottom] = useState(null);
147
+ // eslint-disable-next-line react-hooks/rules-of-hooks
148
+ const intersections = useIntersectionObserver([sentinelTop, sentinelBottom], {
149
+ threshold: [0, 1]
150
+ });
151
+ const hasTopIntersection = sentinelTop && !((_intersections$get$is = (_intersections$get = intersections.get(sentinelTop)) === null || _intersections$get === void 0 ? void 0 : _intersections$get.isIntersecting) !== null && _intersections$get$is !== void 0 ? _intersections$get$is : true);
152
+ const hasBottomIntersection = sentinelBottom && !((_intersections$get$is2 = (_intersections$get2 = intersections.get(sentinelBottom)) === null || _intersections$get2 === void 0 ? void 0 : _intersections$get2.isIntersecting) !== null && _intersections$get$is2 !== void 0 ? _intersections$get$is2 : true);
153
+
154
+ // Separate header, footer and dialog content from children.
155
+ // eslint-disable-next-line react-hooks/rules-of-hooks
156
+ const [[headerChild], [footerChild], content] = useMemo(() => partitionMulti(Children.toArray(children), [isHeader, isFooter]), [children]);
157
+ const headerChildProps = headerChild === null || headerChild === void 0 ? void 0 : headerChild.props;
158
+ const headerChildContent = headerChildProps === null || headerChildProps === void 0 ? void 0 : headerChildProps.children;
159
+ const footerChildProps = footerChild === null || footerChild === void 0 ? void 0 : footerChild.props;
160
+ const footerChildContent = footerChildProps === null || footerChildProps === void 0 ? void 0 : footerChildProps.children;
161
+
162
+ // eslint-disable-next-line react-hooks/rules-of-hooks
163
+ const clickAwayRefs = useRef([wrapperRef]);
164
+
165
+ // eslint-disable-next-line react-hooks/rules-of-hooks
166
+ const rootRef = useRef(null);
167
+
168
+ // eslint-disable-next-line react-hooks/rules-of-hooks
169
+ const isVisible = useTransitionVisibility(rootRef, Boolean(isOpen), onVisibilityChange);
170
+ const shouldPreventCloseOnClickAway = preventAutoClose || preventCloseOnClick;
171
+ return isOpen || isVisible ? /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", _extends({
172
+ ref: mergeRefs(rootRef, ref)
173
+ }, forwardedProps, {
174
+ className: classnames(className, handleBasicClasses({
175
+ isHidden: !isOpen,
176
+ isLoading,
177
+ isShown: isOpen || isVisible,
178
+ prefix: CLASSNAME,
179
+ size
180
+ })),
181
+ style: {
182
+ zIndex
183
+ }
184
+ }), /*#__PURE__*/React.createElement("div", {
185
+ className: `${CLASSNAME}__overlay`
186
+ }), /*#__PURE__*/React.createElement("section", _extends({
187
+ className: `${CLASSNAME}__container`,
188
+ role: "dialog",
189
+ "aria-modal": "true"
190
+ }, dialogProps), /*#__PURE__*/React.createElement(ClickAwayProvider, {
191
+ callback: !shouldPreventCloseOnClickAway && onClose,
192
+ childrenRefs: clickAwayRefs,
193
+ parentRef: rootRef
194
+ }, /*#__PURE__*/React.createElement("div", {
195
+ className: `${CLASSNAME}__wrapper`,
196
+ ref: wrapperRef
197
+ }, (header || headerChildContent) && /*#__PURE__*/React.createElement("header", _extends({}, headerChildProps, {
198
+ className: classnames(`${CLASSNAME}__header`, (forceHeaderDivider || hasTopIntersection) && `${CLASSNAME}__header--has-divider`, headerChildProps === null || headerChildProps === void 0 ? void 0 : headerChildProps.className)
199
+ }), header, headerChildContent), /*#__PURE__*/React.createElement("div", {
200
+ ref: mergeRefs(contentRef, localContentRef),
201
+ className: `${CLASSNAME}__content`
202
+ }, /*#__PURE__*/React.createElement("div", {
203
+ className: `${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--top`,
204
+ ref: setSentinelTop
205
+ }), content, /*#__PURE__*/React.createElement("div", {
206
+ className: `${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--bottom`,
207
+ ref: setSentinelBottom
208
+ })), (footer || footerChildContent) && /*#__PURE__*/React.createElement("footer", _extends({}, footerChildProps, {
209
+ className: classnames(`${CLASSNAME}__footer`, (forceFooterDivider || hasBottomIntersection) && `${CLASSNAME}__footer--has-divider`, footerChildProps === null || footerChildProps === void 0 ? void 0 : footerChildProps.className)
210
+ }), footer, footerChildContent), isLoading && /*#__PURE__*/React.createElement("div", {
211
+ className: `${CLASSNAME}__progress-overlay`
212
+ }, /*#__PURE__*/React.createElement(Progress, {
213
+ variant: ProgressVariant.circular
214
+ })))))), document.body) : null;
215
+ });
216
+ Dialog.displayName = COMPONENT_NAME;
217
+ Dialog.className = CLASSNAME;
218
+ Dialog.defaultProps = DEFAULT_PROPS;
219
+
220
+ export { Dialog as D };
221
+ //# sourceMappingURL=2db3ca7a.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2db3ca7a.js","sources":["../../src/hooks/useIntersectionObserver.tsx","../../src/components/dialog/Dialog.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nexport type Intersections<T> = Map<T, IntersectionObserverEntry>;\n\n/**\n * Convenient hook to create interaction observers.\n *\n * @param elements Elements to observe.\n * @param options IntersectionObserver options.\n * @return Map of intersections.\n */\nexport function useIntersectionObserver<T extends Element>(\n elements: Array<T | null | undefined>,\n options?: IntersectionObserverInit,\n): Intersections<T> {\n const [intersections, setIntersections] = useState<Intersections<T>>(() => new Map());\n\n useEffect(\n () => {\n if (elements.length < 1 || !elements.some(Boolean)) {\n return undefined;\n }\n\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n intersections.set(entry.target as T, entry);\n }\n setIntersections(new Map(intersections));\n }, options);\n\n for (const element of elements) {\n if (element) {\n observer.observe(element);\n }\n }\n return () => observer.disconnect();\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [...elements],\n );\n\n return intersections;\n}\n","import React, { Children, forwardRef, ReactElement, ReactNode, Ref, RefObject, useMemo, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport classNames from 'classnames';\n\nimport { Progress, ProgressVariant, Size } from '@lumx/react';\n\nimport { DOCUMENT } from '@lumx/react/constants';\nimport { useCallbackOnEscape } from '@lumx/react/hooks/useCallbackOnEscape';\nimport { useFocusTrap } from '@lumx/react/hooks/useFocusTrap';\nimport { useIntersectionObserver } from '@lumx/react/hooks/useIntersectionObserver';\n\nimport { Comp, GenericProps, isComponent } from '@lumx/react/utils/type';\nimport { partitionMulti } from '@lumx/react/utils/partitionMulti';\nimport { getRootClassName, handleBasicClasses } from '@lumx/react/utils/className';\nimport { ClickAwayProvider } from '@lumx/react/utils/ClickAwayProvider';\nimport { mergeRefs } from '@lumx/react/utils/mergeRefs';\n\nimport { useDisableBodyScroll } from '@lumx/react/hooks/useDisableBodyScroll';\nimport { useTransitionVisibility } from '@lumx/react/hooks/useTransitionVisibility';\n\n/**\n * Defines the props of the component.\n */\nexport interface DialogProps extends GenericProps {\n /** Footer content. */\n footer?: ReactNode;\n /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */\n forceFooterDivider?: boolean;\n /** Header content. */\n header?: ReactNode;\n /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */\n forceHeaderDivider?: boolean;\n /** Whether the indefinite progress indicator over the dialog content is displayed or not. */\n isLoading?: boolean;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Reference to the parent element that triggered modal opening (will get back focus on close). */\n parentElement?: RefObject<HTMLElement>;\n /** Reference to the dialog content element. */\n contentRef?: Ref<HTMLDivElement>;\n /** Reference to the of the element that should get the focus when the dialogs opens. By default, the first child will take focus. */\n focusElement?: RefObject<HTMLElement>;\n /** Whether to keep the dialog open on clickaway or escape press. */\n preventAutoClose?: boolean;\n /** Whether to keep the dialog open on escape press. */\n preventCloseOnEscape?: boolean;\n /** Whether to keep the dialog open on clickaway. */\n preventCloseOnClick?: boolean;\n /** Size variant. */\n size?: DialogSizes;\n /** Z-axis position. */\n zIndex?: number;\n /** Z-axis position. */\n dialogProps?: GenericProps;\n /** On close callback. */\n onClose?(): void;\n /** Callback called when the open animation starts and the close animation finishes. */\n onVisibilityChange?(isVisible: boolean): void;\n /** whether to disable the scroll on the body or not */\n disableBodyScroll?: boolean;\n}\n\nexport type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;\n\nconst isHeader = isComponent('header');\nconst isFooter = isComponent('footer');\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Dialog';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<DialogProps> = {\n size: Size.big,\n disableBodyScroll: true,\n};\n\n/**\n * Dialog component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Dialog: Comp<DialogProps, HTMLDivElement> = forwardRef((props, ref) => {\n if (!DOCUMENT) {\n // Can't render in SSR.\n return null;\n }\n\n const {\n children,\n className,\n header,\n focusElement,\n forceFooterDivider,\n forceHeaderDivider,\n footer,\n isLoading,\n isOpen,\n onClose,\n parentElement,\n contentRef,\n preventAutoClose,\n size,\n zIndex,\n dialogProps,\n onVisibilityChange,\n disableBodyScroll,\n preventCloseOnClick,\n preventCloseOnEscape,\n ...forwardedProps\n } = props;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const previousOpen = React.useRef(isOpen);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (isOpen !== previousOpen.current) {\n previousOpen.current = isOpen;\n\n // Focus the parent element on close.\n if (!isOpen && parentElement && parentElement.current) {\n parentElement.current.focus();\n }\n }\n }, [isOpen, parentElement]);\n\n const shouldPreventCloseOnEscape = preventAutoClose || preventCloseOnEscape;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useCallbackOnEscape(onClose, isOpen && !shouldPreventCloseOnEscape);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const wrapperRef = useRef<HTMLDivElement>(null);\n /**\n * Since the `contentRef` comes from the parent and is optional,\n * we need to create a stable contentRef that will always be available.\n */\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const localContentRef = useRef<HTMLDivElement>(null);\n // Handle focus trap.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useFocusTrap(isOpen && wrapperRef.current, focusElement?.current);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useDisableBodyScroll(disableBodyScroll && isOpen && localContentRef.current);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [sentinelTop, setSentinelTop] = useState<Element | null>(null);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [sentinelBottom, setSentinelBottom] = useState<Element | null>(null);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const intersections = useIntersectionObserver([sentinelTop, sentinelBottom], {\n threshold: [0, 1],\n });\n\n const hasTopIntersection = sentinelTop && !(intersections.get(sentinelTop)?.isIntersecting ?? true);\n const hasBottomIntersection = sentinelBottom && !(intersections.get(sentinelBottom)?.isIntersecting ?? true);\n\n // Separate header, footer and dialog content from children.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [[headerChild], [footerChild], content] = useMemo(\n () => partitionMulti(Children.toArray(children), [isHeader, isFooter]),\n [children],\n );\n const headerChildProps = (headerChild as ReactElement)?.props;\n const headerChildContent = headerChildProps?.children;\n const footerChildProps = (footerChild as ReactElement)?.props;\n const footerChildContent = footerChildProps?.children;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const clickAwayRefs = useRef([wrapperRef]);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const rootRef = useRef<HTMLDivElement>(null);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const isVisible = useTransitionVisibility(rootRef, Boolean(isOpen), onVisibilityChange);\n\n const shouldPreventCloseOnClickAway = preventAutoClose || preventCloseOnClick;\n\n return isOpen || isVisible\n ? createPortal(\n <div\n ref={mergeRefs(rootRef, ref)}\n {...forwardedProps}\n className={classNames(\n className,\n handleBasicClasses({\n isHidden: !isOpen,\n isLoading,\n isShown: isOpen || isVisible,\n prefix: CLASSNAME,\n size,\n }),\n )}\n style={{ zIndex }}\n >\n <div className={`${CLASSNAME}__overlay`} />\n\n <section className={`${CLASSNAME}__container`} role=\"dialog\" aria-modal=\"true\" {...dialogProps}>\n <ClickAwayProvider\n callback={!shouldPreventCloseOnClickAway && onClose}\n childrenRefs={clickAwayRefs}\n parentRef={rootRef}\n >\n <div className={`${CLASSNAME}__wrapper`} ref={wrapperRef}>\n {(header || headerChildContent) && (\n <header\n {...headerChildProps}\n className={classNames(\n `${CLASSNAME}__header`,\n (forceHeaderDivider || hasTopIntersection) &&\n `${CLASSNAME}__header--has-divider`,\n headerChildProps?.className,\n )}\n >\n {header}\n {headerChildContent}\n </header>\n )}\n\n <div ref={mergeRefs(contentRef, localContentRef)} className={`${CLASSNAME}__content`}>\n <div\n className={`${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--top`}\n ref={setSentinelTop}\n />\n\n {content}\n\n <div\n className={`${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--bottom`}\n ref={setSentinelBottom}\n />\n </div>\n\n {(footer || footerChildContent) && (\n <footer\n {...footerChildProps}\n className={classNames(\n `${CLASSNAME}__footer`,\n (forceFooterDivider || hasBottomIntersection) &&\n `${CLASSNAME}__footer--has-divider`,\n footerChildProps?.className,\n )}\n >\n {footer}\n {footerChildContent}\n </footer>\n )}\n\n {isLoading && (\n <div className={`${CLASSNAME}__progress-overlay`}>\n <Progress variant={ProgressVariant.circular} />\n </div>\n )}\n </div>\n </ClickAwayProvider>\n </section>\n </div>,\n document.body,\n )\n : null;\n});\nDialog.displayName = COMPONENT_NAME;\nDialog.className = CLASSNAME;\nDialog.defaultProps = DEFAULT_PROPS;\n"],"names":["useIntersectionObserver","elements","options","intersections","setIntersections","useState","Map","useEffect","length","some","Boolean","undefined","observer","IntersectionObserver","entries","entry","set","target","element","observe","disconnect","isHeader","isComponent","isFooter","COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","size","Size","big","disableBodyScroll","Dialog","forwardRef","props","ref","_intersections$get$is","_intersections$get","_intersections$get$is2","_intersections$get2","DOCUMENT","children","className","header","focusElement","forceFooterDivider","forceHeaderDivider","footer","isLoading","isOpen","onClose","parentElement","contentRef","preventAutoClose","zIndex","dialogProps","onVisibilityChange","preventCloseOnClick","preventCloseOnEscape","forwardedProps","_objectWithoutProperties","_excluded","previousOpen","React","useRef","current","focus","shouldPreventCloseOnEscape","useCallbackOnEscape","wrapperRef","localContentRef","useFocusTrap","useDisableBodyScroll","sentinelTop","setSentinelTop","sentinelBottom","setSentinelBottom","threshold","hasTopIntersection","get","isIntersecting","hasBottomIntersection","headerChild","footerChild","content","useMemo","partitionMulti","Children","toArray","headerChildProps","headerChildContent","footerChildProps","footerChildContent","clickAwayRefs","rootRef","isVisible","useTransitionVisibility","shouldPreventCloseOnClickAway","createPortal","createElement","_extends","mergeRefs","classNames","handleBasicClasses","isHidden","isShown","prefix","style","role","ClickAwayProvider","callback","childrenRefs","parentRef","Progress","variant","ProgressVariant","circular","document","body","displayName","defaultProps"],"mappings":";;;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,uBAAuBA,CACnCC,QAAqC,EACrCC,OAAkC,EAClB;EAChB,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGC,QAAQ,CAAmB,MAAM,IAAIC,GAAG,EAAE,CAAC;EAErFC,SAAS,CACL,MAAM;IACF,IAAIN,QAAQ,CAACO,MAAM,GAAG,CAAC,IAAI,CAACP,QAAQ,CAACQ,IAAI,CAACC,OAAO,CAAC,EAAE;MAChD,OAAOC,SAAS;;IAGpB,MAAMC,QAAQ,GAAG,IAAIC,oBAAoB,CAAEC,OAAO,IAAK;MACnD,KAAK,MAAMC,KAAK,IAAID,OAAO,EAAE;QACzBX,aAAa,CAACa,GAAG,CAACD,KAAK,CAACE,MAAM,EAAOF,KAAK,CAAC;;MAE/CX,gBAAgB,CAAC,IAAIE,GAAG,CAACH,aAAa,CAAC,CAAC;KAC3C,EAAED,OAAO,CAAC;IAEX,KAAK,MAAMgB,OAAO,IAAIjB,QAAQ,EAAE;MAC5B,IAAIiB,OAAO,EAAE;QACTN,QAAQ,CAACO,OAAO,CAACD,OAAO,CAAC;;;IAGjC,OAAO,MAAMN,QAAQ,CAACQ,UAAU,EAAE;GACrC;;EAED,CAAC,GAAGnB,QAAQ,CAChB,CAAC;EAED,OAAOE,aAAa;AACxB;;;;ACrBA;AACA;AACA;;AA0CA,MAAMkB,QAAQ,GAAGC,WAAW,CAAC,QAAQ,CAAC;AACtC,MAAMC,QAAQ,GAAGD,WAAW,CAAC,QAAQ,CAAC;;AAEtC;AACA;AACA;AACA,MAAME,cAAc,GAAG,QAAQ;;AAE/B;AACA;AACA;AACA,MAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAc,CAAC;;AAElD;AACA;AACA;AACA,MAAMG,aAAmC,GAAG;EACxCC,IAAI,E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