@lumx/react 3.20.1-alpha.10 → 3.20.1-alpha.12

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 (723) hide show
  1. package/CONTRIBUTING.md +1 -5
  2. package/README.md +0 -2
  3. package/_internal/0420e67b.js +119 -0
  4. package/_internal/0420e67b.js.map +1 -0
  5. package/_internal/0a490b07.js +75 -0
  6. package/_internal/0a490b07.js.map +1 -0
  7. package/_internal/0b9c76cb.js +6 -0
  8. package/_internal/0b9c76cb.js.map +1 -0
  9. package/_internal/0be1006e.js +97 -0
  10. package/_internal/0be1006e.js.map +1 -0
  11. package/_internal/0d1a078c.js +144 -0
  12. package/_internal/0d1a078c.js.map +1 -0
  13. package/_internal/15eab19b.js +75 -0
  14. package/_internal/15eab19b.js.map +1 -0
  15. package/_internal/179a84d1.js +259 -0
  16. package/_internal/179a84d1.js.map +1 -0
  17. package/_internal/193521fa.js +52 -0
  18. package/_internal/193521fa.js.map +1 -0
  19. package/_internal/1a90ea3d.js +51 -0
  20. package/_internal/1a90ea3d.js.map +1 -0
  21. package/_internal/1deba7d7.js +224 -0
  22. package/_internal/1deba7d7.js.map +1 -0
  23. package/_internal/1ea72630.js +146 -0
  24. package/_internal/1ea72630.js.map +1 -0
  25. package/_internal/21b83d16.js +137 -0
  26. package/_internal/21b83d16.js.map +1 -0
  27. package/_internal/230173a8.js +13 -0
  28. package/_internal/230173a8.js.map +1 -0
  29. package/_internal/297bed8f.js +457 -0
  30. package/_internal/297bed8f.js.map +1 -0
  31. package/_internal/2a3d237c.js +12 -0
  32. package/_internal/2a3d237c.js.map +1 -0
  33. package/_internal/2c2b6a89.js +52 -0
  34. package/_internal/2c2b6a89.js.map +1 -0
  35. package/_internal/2f1716fa.js +237 -0
  36. package/_internal/2f1716fa.js.map +1 -0
  37. package/_internal/2f6c7f84.js +103 -0
  38. package/_internal/2f6c7f84.js.map +1 -0
  39. package/_internal/3181f000.js +14 -0
  40. package/_internal/3181f000.js.map +1 -0
  41. package/_internal/329b5f12.js +55 -0
  42. package/_internal/329b5f12.js.map +1 -0
  43. package/_internal/332e9844.js +2 -0
  44. package/_internal/332e9844.js.map +1 -0
  45. package/_internal/34c59f5b.js +681 -0
  46. package/_internal/34c59f5b.js.map +1 -0
  47. package/_internal/36bd7352.js +219 -0
  48. package/_internal/36bd7352.js.map +1 -0
  49. package/_internal/370bdaed.js +61 -0
  50. package/_internal/370bdaed.js.map +1 -0
  51. package/_internal/37b007a4.js +20 -0
  52. package/_internal/37b007a4.js.map +1 -0
  53. package/_internal/3a1facc0.js +18 -0
  54. package/_internal/3a1facc0.js.map +1 -0
  55. package/_internal/3a4e4636.js +162 -0
  56. package/_internal/3a4e4636.js.map +1 -0
  57. package/_internal/3e653144.js +49 -0
  58. package/_internal/3e653144.js.map +1 -0
  59. package/_internal/3f86608e.js +45 -0
  60. package/_internal/3f86608e.js.map +1 -0
  61. package/_internal/478b5c92.js +24 -0
  62. package/_internal/478b5c92.js.map +1 -0
  63. package/_internal/4962be5b.js +121 -0
  64. package/_internal/4962be5b.js.map +1 -0
  65. package/_internal/49bbeed3.js +6 -0
  66. package/_internal/49bbeed3.js.map +1 -0
  67. package/_internal/4cd870a5.js +2155 -0
  68. package/_internal/4cd870a5.js.map +1 -0
  69. package/{src/utils/partitionMulti.ts → _internal/4daccdd5.js} +5 -9
  70. package/_internal/4daccdd5.js.map +1 -0
  71. package/_internal/501f2f9f.js +58 -0
  72. package/_internal/501f2f9f.js.map +1 -0
  73. package/_internal/5e7b90e2.js +2 -0
  74. package/_internal/5e7b90e2.js.map +1 -0
  75. package/_internal/5ec059fe.js +145 -0
  76. package/_internal/5ec059fe.js.map +1 -0
  77. package/_internal/5f8f9454.js +70 -0
  78. package/_internal/5f8f9454.js.map +1 -0
  79. package/_internal/5fe09341.js +112 -0
  80. package/_internal/5fe09341.js.map +1 -0
  81. package/_internal/628468c4.js +313 -0
  82. package/_internal/628468c4.js.map +1 -0
  83. package/_internal/6589b796.js +280 -0
  84. package/_internal/6589b796.js.map +1 -0
  85. package/_internal/65f91970.js +297 -0
  86. package/_internal/65f91970.js.map +1 -0
  87. package/_internal/66f691d3.js +74 -0
  88. package/_internal/66f691d3.js.map +1 -0
  89. package/_internal/68c10f98.js +166 -0
  90. package/_internal/68c10f98.js.map +1 -0
  91. package/_internal/690ca33e.js +109 -0
  92. package/_internal/690ca33e.js.map +1 -0
  93. package/_internal/6ca04271.js +108 -0
  94. package/_internal/6ca04271.js.map +1 -0
  95. package/_internal/6da19518.js +165 -0
  96. package/_internal/6da19518.js.map +1 -0
  97. package/_internal/7093ba23.js +95 -0
  98. package/_internal/7093ba23.js.map +1 -0
  99. package/_internal/74a4a214.js +82 -0
  100. package/_internal/74a4a214.js.map +1 -0
  101. package/_internal/76be70dd.js +42 -0
  102. package/_internal/76be70dd.js.map +1 -0
  103. package/_internal/78df9309.js +20 -0
  104. package/_internal/78df9309.js.map +1 -0
  105. package/_internal/7b221b05.js +9 -0
  106. package/_internal/7b221b05.js.map +1 -0
  107. package/_internal/7daf0f24.js +77 -0
  108. package/_internal/7daf0f24.js.map +1 -0
  109. package/_internal/7f54e947.js +758 -0
  110. package/_internal/7f54e947.js.map +1 -0
  111. package/_internal/825ac334.js +130 -0
  112. package/_internal/825ac334.js.map +1 -0
  113. package/_internal/827b804a.js +6 -0
  114. package/_internal/827b804a.js.map +1 -0
  115. package/_internal/84dfe68f.js +436 -0
  116. package/_internal/84dfe68f.js.map +1 -0
  117. package/_internal/85e3a5ca.js +145 -0
  118. package/_internal/85e3a5ca.js.map +1 -0
  119. package/_internal/86aa4aa4.js +154 -0
  120. package/_internal/86aa4aa4.js.map +1 -0
  121. package/_internal/88ec77c2.js +130 -0
  122. package/_internal/88ec77c2.js.map +1 -0
  123. package/_internal/8ab42752.js +103 -0
  124. package/_internal/8ab42752.js.map +1 -0
  125. package/_internal/95cfd814.js +70 -0
  126. package/_internal/95cfd814.js.map +1 -0
  127. package/_internal/9a4dfad0.js +326 -0
  128. package/_internal/9a4dfad0.js.map +1 -0
  129. package/_internal/9c9df5f2.js +80 -0
  130. package/_internal/9c9df5f2.js.map +1 -0
  131. package/_internal/9d1336a1.js +19 -0
  132. package/_internal/9d1336a1.js.map +1 -0
  133. package/_internal/9fdc715b.js +152 -0
  134. package/_internal/9fdc715b.js.map +1 -0
  135. package/_internal/a003602b.js +116 -0
  136. package/_internal/a003602b.js.map +1 -0
  137. package/_internal/a34639bd.js +97 -0
  138. package/_internal/a34639bd.js.map +1 -0
  139. package/_internal/a84f4981.js +122 -0
  140. package/_internal/a84f4981.js.map +1 -0
  141. package/_internal/b0a7a999.js +59 -0
  142. package/_internal/b0a7a999.js.map +1 -0
  143. package/_internal/b0b2e33d.js +359 -0
  144. package/_internal/b0b2e33d.js.map +1 -0
  145. package/_internal/b1af5979.js +653 -0
  146. package/_internal/b1af5979.js.map +1 -0
  147. package/_internal/b477da26.js +164 -0
  148. package/_internal/b477da26.js.map +1 -0
  149. package/_internal/b8667090.js +36 -0
  150. package/_internal/b8667090.js.map +1 -0
  151. package/_internal/bae266a9.js +61 -0
  152. package/_internal/bae266a9.js.map +1 -0
  153. package/_internal/be6da9b0.js +296 -0
  154. package/_internal/be6da9b0.js.map +1 -0
  155. package/_internal/c0414b89.js +101 -0
  156. package/_internal/c0414b89.js.map +1 -0
  157. package/_internal/c2388b10.js +58 -0
  158. package/_internal/c2388b10.js.map +1 -0
  159. package/_internal/c459a04d.js +148 -0
  160. package/_internal/c459a04d.js.map +1 -0
  161. package/_internal/c6ca7494.js +2 -0
  162. package/_internal/c6ca7494.js.map +1 -0
  163. package/_internal/cdddaed8.js +116 -0
  164. package/_internal/cdddaed8.js.map +1 -0
  165. package/_internal/d0dd1815.js +10 -0
  166. package/_internal/d0dd1815.js.map +1 -0
  167. package/_internal/d45e3f16.js +15 -0
  168. package/_internal/d45e3f16.js.map +1 -0
  169. package/_internal/d5f316cb.js +62 -0
  170. package/_internal/d5f316cb.js.map +1 -0
  171. package/_internal/db4fdc7b.js +310 -0
  172. package/_internal/db4fdc7b.js.map +1 -0
  173. package/_internal/dbe0cf24.js +75 -0
  174. package/_internal/dbe0cf24.js.map +1 -0
  175. package/_internal/de24f857.js +4 -0
  176. package/_internal/de24f857.js.map +1 -0
  177. package/_internal/e2afb13f.js +75 -0
  178. package/_internal/e2afb13f.js.map +1 -0
  179. package/_internal/e52f0d3f.js +94 -0
  180. package/_internal/e52f0d3f.js.map +1 -0
  181. package/_internal/e6dd117e.js +50 -0
  182. package/_internal/e6dd117e.js.map +1 -0
  183. package/_internal/e806b848.js +9 -0
  184. package/_internal/e806b848.js.map +1 -0
  185. package/_internal/ea04260d.js +29 -0
  186. package/_internal/ea04260d.js.map +1 -0
  187. package/_internal/eaa8b1d8.js +150 -0
  188. package/_internal/eaa8b1d8.js.map +1 -0
  189. package/_internal/eaf6c45a.js +4 -0
  190. package/_internal/eaf6c45a.js.map +1 -0
  191. package/_internal/edab29ce.js +308 -0
  192. package/_internal/edab29ce.js.map +1 -0
  193. package/_internal/ef5d1aac.js +4 -0
  194. package/_internal/ef5d1aac.js.map +1 -0
  195. package/_internal/f0900583.js +142 -0
  196. package/_internal/f0900583.js.map +1 -0
  197. package/_internal/f0d7d6ea.js +30 -0
  198. package/_internal/f0d7d6ea.js.map +1 -0
  199. package/_internal/f23cdf84.js +181 -0
  200. package/_internal/f23cdf84.js.map +1 -0
  201. package/_internal/f52e979e.js +3 -0
  202. package/_internal/f52e979e.js.map +1 -0
  203. package/_internal/f5508d3d.js +792 -0
  204. package/_internal/f5508d3d.js.map +1 -0
  205. package/_internal/f93fe83e.js +46 -0
  206. package/_internal/f93fe83e.js.map +1 -0
  207. package/index.d.ts +1 -2
  208. package/index.js +65 -14607
  209. package/index.js.map +1 -1
  210. package/package.json +3 -15
  211. package/utils/index.d.ts +1 -1
  212. package/utils/index.js +3 -1
  213. package/utils/index.js.map +1 -1
  214. package/_internal/index.js +0 -229
  215. package/_internal/index.js.map +0 -1
  216. package/src/components/alert-dialog/AlertDialog.stories.tsx +0 -127
  217. package/src/components/alert-dialog/AlertDialog.test.tsx +0 -34
  218. package/src/components/alert-dialog/AlertDialog.tsx +0 -189
  219. package/src/components/alert-dialog/index.ts +0 -1
  220. package/src/components/autocomplete/Autocomplete.stories.tsx +0 -75
  221. package/src/components/autocomplete/Autocomplete.test.tsx +0 -99
  222. package/src/components/autocomplete/Autocomplete.tsx +0 -294
  223. package/src/components/autocomplete/AutocompleteMultiple.stories.tsx +0 -167
  224. package/src/components/autocomplete/AutocompleteMultiple.test.tsx +0 -61
  225. package/src/components/autocomplete/AutocompleteMultiple.tsx +0 -156
  226. package/src/components/autocomplete/__mockData__/index.ts +0 -39
  227. package/src/components/autocomplete/index.ts +0 -2
  228. package/src/components/avatar/Avatar.stories.tsx +0 -119
  229. package/src/components/avatar/Avatar.test.tsx +0 -32
  230. package/src/components/avatar/Avatar.tsx +0 -114
  231. package/src/components/avatar/index.ts +0 -1
  232. package/src/components/badge/Badge.stories.tsx +0 -69
  233. package/src/components/badge/Badge.test.tsx +0 -45
  234. package/src/components/badge/Badge.tsx +0 -58
  235. package/src/components/badge/BadgeWrapper.stories.tsx +0 -75
  236. package/src/components/badge/BadgeWrapper.test.tsx +0 -47
  237. package/src/components/badge/BadgeWrapper.tsx +0 -37
  238. package/src/components/badge/index.ts +0 -2
  239. package/src/components/button/Button.stories.tsx +0 -355
  240. package/src/components/button/Button.test.tsx +0 -125
  241. package/src/components/button/Button.tsx +0 -101
  242. package/src/components/button/ButtonGroup.stories.tsx +0 -52
  243. package/src/components/button/ButtonGroup.test.tsx +0 -41
  244. package/src/components/button/ButtonGroup.tsx +0 -50
  245. package/src/components/button/ButtonRoot.tsx +0 -163
  246. package/src/components/button/IconButton.stories.tsx +0 -52
  247. package/src/components/button/IconButton.test.tsx +0 -66
  248. package/src/components/button/IconButton.tsx +0 -91
  249. package/src/components/button/index.ts +0 -4
  250. package/src/components/checkbox/Checkbox.stories.tsx +0 -64
  251. package/src/components/checkbox/Checkbox.test.tsx +0 -154
  252. package/src/components/checkbox/Checkbox.tsx +0 -164
  253. package/src/components/checkbox/index.ts +0 -1
  254. package/src/components/chip/Chip.stories.tsx +0 -164
  255. package/src/components/chip/Chip.test.tsx +0 -243
  256. package/src/components/chip/Chip.tsx +0 -168
  257. package/src/components/chip/ChipGroup.stories.tsx +0 -47
  258. package/src/components/chip/ChipGroup.test.tsx +0 -37
  259. package/src/components/chip/ChipGroup.tsx +0 -60
  260. package/src/components/chip/index.ts +0 -2
  261. package/src/components/comment-block/CommentBlock.stories.tsx +0 -91
  262. package/src/components/comment-block/CommentBlock.test.tsx +0 -28
  263. package/src/components/comment-block/CommentBlock.tsx +0 -172
  264. package/src/components/comment-block/index.ts +0 -1
  265. package/src/components/date-picker/DatePicker.stories.tsx +0 -118
  266. package/src/components/date-picker/DatePicker.test.tsx +0 -34
  267. package/src/components/date-picker/DatePicker.tsx +0 -52
  268. package/src/components/date-picker/DatePickerControlled.test.tsx +0 -91
  269. package/src/components/date-picker/DatePickerControlled.tsx +0 -259
  270. package/src/components/date-picker/DatePickerField.stories.tsx +0 -100
  271. package/src/components/date-picker/DatePickerField.test.tsx +0 -70
  272. package/src/components/date-picker/DatePickerField.tsx +0 -135
  273. package/src/components/date-picker/constants.ts +0 -11
  274. package/src/components/date-picker/index.ts +0 -4
  275. package/src/components/date-picker/types.ts +0 -28
  276. package/src/components/dialog/Dialog.stories.tsx +0 -318
  277. package/src/components/dialog/Dialog.test.tsx +0 -97
  278. package/src/components/dialog/Dialog.tsx +0 -288
  279. package/src/components/dialog/index.ts +0 -1
  280. package/src/components/divider/Divider.test.tsx +0 -51
  281. package/src/components/divider/Divider.tsx +0 -50
  282. package/src/components/divider/index.ts +0 -1
  283. package/src/components/drag-handle/DragHandle.test.tsx +0 -36
  284. package/src/components/drag-handle/DragHandle.tsx +0 -51
  285. package/src/components/drag-handle/index.ts +0 -1
  286. package/src/components/dropdown/Dropdown.stories.tsx +0 -31
  287. package/src/components/dropdown/Dropdown.test.tsx +0 -66
  288. package/src/components/dropdown/Dropdown.tsx +0 -186
  289. package/src/components/dropdown/index.ts +0 -1
  290. package/src/components/expansion-panel/ExpansionPanel.stories.tsx +0 -91
  291. package/src/components/expansion-panel/ExpansionPanel.test.tsx +0 -185
  292. package/src/components/expansion-panel/ExpansionPanel.tsx +0 -195
  293. package/src/components/expansion-panel/index.ts +0 -1
  294. package/src/components/flag/Flag.stories.tsx +0 -48
  295. package/src/components/flag/Flag.test.tsx +0 -62
  296. package/src/components/flag/Flag.tsx +0 -52
  297. package/src/components/flag/index.ts +0 -1
  298. package/src/components/flex-box/FlexBox.stories.tsx +0 -156
  299. package/src/components/flex-box/FlexBox.test.tsx +0 -24
  300. package/src/components/flex-box/FlexBox.tsx +0 -100
  301. package/src/components/flex-box/index.ts +0 -1
  302. package/src/components/generic-block/GenericBlock.stories.jsx +0 -128
  303. package/src/components/generic-block/GenericBlock.test.tsx +0 -156
  304. package/src/components/generic-block/GenericBlock.tsx +0 -225
  305. package/src/components/generic-block/constants.ts +0 -9
  306. package/src/components/generic-block/index.ts +0 -2
  307. package/src/components/grid/Grid.tsx +0 -83
  308. package/src/components/grid/GridItem.tsx +0 -55
  309. package/src/components/grid/index.ts +0 -2
  310. package/src/components/grid-column/GridColumn.stories.tsx +0 -45
  311. package/src/components/grid-column/GridColumn.test.jsx +0 -56
  312. package/src/components/grid-column/GridColumn.tsx +0 -83
  313. package/src/components/grid-column/index.ts +0 -1
  314. package/src/components/heading/Heading.stories.tsx +0 -69
  315. package/src/components/heading/Heading.test.tsx +0 -82
  316. package/src/components/heading/Heading.tsx +0 -65
  317. package/src/components/heading/HeadingLevelProvider.tsx +0 -30
  318. package/src/components/heading/constants.ts +0 -16
  319. package/src/components/heading/context.tsx +0 -13
  320. package/src/components/heading/index.ts +0 -3
  321. package/src/components/heading/useHeadingLevel.tsx +0 -8
  322. package/src/components/icon/Icon.stories.tsx +0 -73
  323. package/src/components/icon/Icon.test.tsx +0 -125
  324. package/src/components/icon/Icon.tsx +0 -22
  325. package/src/components/icon/index.ts +0 -1
  326. package/src/components/image-block/ImageBlock.stories.tsx +0 -117
  327. package/src/components/image-block/ImageBlock.test.tsx +0 -58
  328. package/src/components/image-block/ImageBlock.tsx +0 -142
  329. package/src/components/image-block/ImageCaption.tsx +0 -115
  330. package/src/components/image-block/index.ts +0 -1
  331. package/src/components/image-lightbox/ImageLightbox.stories.tsx +0 -160
  332. package/src/components/image-lightbox/ImageLightbox.test.tsx +0 -254
  333. package/src/components/image-lightbox/ImageLightbox.tsx +0 -90
  334. package/src/components/image-lightbox/constants.ts +0 -11
  335. package/src/components/image-lightbox/index.ts +0 -2
  336. package/src/components/image-lightbox/internal/ImageSlide.tsx +0 -107
  337. package/src/components/image-lightbox/internal/ImageSlideshow.tsx +0 -164
  338. package/src/components/image-lightbox/internal/useAnimateScroll.ts +0 -55
  339. package/src/components/image-lightbox/internal/usePointerZoom.ts +0 -148
  340. package/src/components/image-lightbox/types.ts +0 -48
  341. package/src/components/image-lightbox/useImageLightbox.tsx +0 -141
  342. package/src/components/inline-list/InlineList.stories.tsx +0 -77
  343. package/src/components/inline-list/InlineList.test.tsx +0 -52
  344. package/src/components/inline-list/InlineList.tsx +0 -96
  345. package/src/components/inline-list/index.ts +0 -1
  346. package/src/components/input-helper/InputHelper.stories.tsx +0 -35
  347. package/src/components/input-helper/InputHelper.test.tsx +0 -55
  348. package/src/components/input-helper/InputHelper.tsx +0 -65
  349. package/src/components/input-helper/constants.ts +0 -11
  350. package/src/components/input-helper/index.ts +0 -1
  351. package/src/components/input-label/InputLabel.stories.tsx +0 -45
  352. package/src/components/input-label/InputLabel.test.tsx +0 -59
  353. package/src/components/input-label/InputLabel.tsx +0 -69
  354. package/src/components/input-label/index.ts +0 -1
  355. package/src/components/lightbox/Lightbox.stories.tsx +0 -101
  356. package/src/components/lightbox/Lightbox.test.tsx +0 -53
  357. package/src/components/lightbox/Lightbox.tsx +0 -180
  358. package/src/components/lightbox/index.ts +0 -1
  359. package/src/components/link/Link.stories.tsx +0 -195
  360. package/src/components/link/Link.test.tsx +0 -127
  361. package/src/components/link/Link.tsx +0 -106
  362. package/src/components/link/index.ts +0 -1
  363. package/src/components/link-preview/LinkPreview.stories.tsx +0 -61
  364. package/src/components/link-preview/LinkPreview.test.tsx +0 -105
  365. package/src/components/link-preview/LinkPreview.tsx +0 -158
  366. package/src/components/link-preview/index.ts +0 -1
  367. package/src/components/list/List.stories.tsx +0 -116
  368. package/src/components/list/List.test.tsx +0 -18
  369. package/src/components/list/List.tsx +0 -104
  370. package/src/components/list/ListDivider.stories.tsx +0 -12
  371. package/src/components/list/ListDivider.test.tsx +0 -22
  372. package/src/components/list/ListDivider.tsx +0 -35
  373. package/src/components/list/ListItem.stories.tsx +0 -66
  374. package/src/components/list/ListItem.test.tsx +0 -93
  375. package/src/components/list/ListItem.tsx +0 -157
  376. package/src/components/list/ListSubheader.stories.tsx +0 -11
  377. package/src/components/list/ListSubheader.test.tsx +0 -21
  378. package/src/components/list/ListSubheader.tsx +0 -44
  379. package/src/components/list/index.ts +0 -4
  380. package/src/components/list/useInteractiveList.tsx +0 -202
  381. package/src/components/message/Message.stories.tsx +0 -72
  382. package/src/components/message/Message.test.tsx +0 -76
  383. package/src/components/message/Message.tsx +0 -100
  384. package/src/components/message/index.ts +0 -1
  385. package/src/components/mosaic/Mosaic.stories.tsx +0 -89
  386. package/src/components/mosaic/Mosaic.test.tsx +0 -77
  387. package/src/components/mosaic/Mosaic.tsx +0 -98
  388. package/src/components/mosaic/index.ts +0 -1
  389. package/src/components/navigation/Navigation.stories.tsx +0 -234
  390. package/src/components/navigation/Navigation.test.tsx +0 -65
  391. package/src/components/navigation/Navigation.tsx +0 -79
  392. package/src/components/navigation/NavigationItem.test.tsx +0 -35
  393. package/src/components/navigation/NavigationItem.tsx +0 -82
  394. package/src/components/navigation/NavigationSection.test.tsx +0 -137
  395. package/src/components/navigation/NavigationSection.tsx +0 -108
  396. package/src/components/navigation/context.tsx +0 -7
  397. package/src/components/navigation/index.ts +0 -1
  398. package/src/components/notification/Notification.test.tsx +0 -94
  399. package/src/components/notification/Notification.tsx +0 -138
  400. package/src/components/notification/Notifications.stories.tsx +0 -92
  401. package/src/components/notification/constants.ts +0 -28
  402. package/src/components/notification/index.ts +0 -1
  403. package/src/components/popover/Popover.stories.tsx +0 -264
  404. package/src/components/popover/Popover.test.tsx +0 -62
  405. package/src/components/popover/Popover.tsx +0 -201
  406. package/src/components/popover/constants.ts +0 -62
  407. package/src/components/popover/index.ts +0 -3
  408. package/src/components/popover/usePopoverStyle.tsx +0 -184
  409. package/src/components/popover/useRestoreFocusOnClose.tsx +0 -47
  410. package/src/components/popover-dialog/PopoverDialog.stories.tsx +0 -64
  411. package/src/components/popover-dialog/PopoverDialog.test.tsx +0 -139
  412. package/src/components/popover-dialog/PopoverDialog.tsx +0 -74
  413. package/src/components/popover-dialog/index.tsx +0 -1
  414. package/src/components/post-block/PostBlock.test.tsx +0 -27
  415. package/src/components/post-block/PostBlock.tsx +0 -122
  416. package/src/components/post-block/index.ts +0 -1
  417. package/src/components/progress/Progress.tsx +0 -68
  418. package/src/components/progress/ProgressCircular.stories.tsx +0 -43
  419. package/src/components/progress/ProgressCircular.test.tsx +0 -46
  420. package/src/components/progress/ProgressCircular.tsx +0 -82
  421. package/src/components/progress/ProgressLinear.stories.tsx +0 -12
  422. package/src/components/progress/ProgressLinear.test.tsx +0 -30
  423. package/src/components/progress/ProgressLinear.tsx +0 -50
  424. package/src/components/progress/index.ts +0 -3
  425. package/src/components/progress-tracker/ProgressTracker.stories.tsx +0 -145
  426. package/src/components/progress-tracker/ProgressTracker.test.tsx +0 -42
  427. package/src/components/progress-tracker/ProgressTracker.tsx +0 -87
  428. package/src/components/progress-tracker/ProgressTrackerProvider.test.tsx +0 -65
  429. package/src/components/progress-tracker/ProgressTrackerProvider.tsx +0 -67
  430. package/src/components/progress-tracker/ProgressTrackerStep.test.tsx +0 -36
  431. package/src/components/progress-tracker/ProgressTrackerStep.tsx +0 -159
  432. package/src/components/progress-tracker/ProgressTrackerStepPanel.test.tsx +0 -34
  433. package/src/components/progress-tracker/ProgressTrackerStepPanel.tsx +0 -67
  434. package/src/components/progress-tracker/index.ts +0 -4
  435. package/src/components/radio-button/RadioButton.stories.tsx +0 -71
  436. package/src/components/radio-button/RadioButton.test.tsx +0 -143
  437. package/src/components/radio-button/RadioButton.tsx +0 -143
  438. package/src/components/radio-button/RadioGroup.stories.tsx +0 -39
  439. package/src/components/radio-button/RadioGroup.test.tsx +0 -29
  440. package/src/components/radio-button/RadioGroup.tsx +0 -44
  441. package/src/components/radio-button/index.ts +0 -2
  442. package/src/components/select/Select.stories.tsx +0 -385
  443. package/src/components/select/Select.test.tsx +0 -199
  444. package/src/components/select/Select.tsx +0 -199
  445. package/src/components/select/SelectMultiple.stories.tsx +0 -315
  446. package/src/components/select/SelectMultiple.test.tsx +0 -213
  447. package/src/components/select/SelectMultiple.tsx +0 -206
  448. package/src/components/select/WithSelectContext.tsx +0 -147
  449. package/src/components/select/constants.ts +0 -55
  450. package/src/components/select/index.ts +0 -2
  451. package/src/components/side-navigation/SideNavigation.stories.tsx +0 -191
  452. package/src/components/side-navigation/SideNavigation.test.tsx +0 -37
  453. package/src/components/side-navigation/SideNavigation.tsx +0 -52
  454. package/src/components/side-navigation/SideNavigationItem.stories.tsx +0 -133
  455. package/src/components/side-navigation/SideNavigationItem.test.tsx +0 -136
  456. package/src/components/side-navigation/SideNavigationItem.tsx +0 -165
  457. package/src/components/side-navigation/index.ts +0 -2
  458. package/src/components/skeleton/SkeletonCircle.stories.tsx +0 -41
  459. package/src/components/skeleton/SkeletonCircle.test.tsx +0 -27
  460. package/src/components/skeleton/SkeletonCircle.tsx +0 -52
  461. package/src/components/skeleton/SkeletonRectangle.stories.tsx +0 -82
  462. package/src/components/skeleton/SkeletonRectangle.test.tsx +0 -27
  463. package/src/components/skeleton/SkeletonRectangle.tsx +0 -88
  464. package/src/components/skeleton/SkeletonTypography.stories.tsx +0 -19
  465. package/src/components/skeleton/SkeletonTypography.test.tsx +0 -27
  466. package/src/components/skeleton/SkeletonTypography.tsx +0 -59
  467. package/src/components/skeleton/index.ts +0 -3
  468. package/src/components/slider/Slider.stories.tsx +0 -45
  469. package/src/components/slider/Slider.test.tsx +0 -29
  470. package/src/components/slider/Slider.tsx +0 -299
  471. package/src/components/slider/index.ts +0 -2
  472. package/src/components/slideshow/Slides.tsx +0 -130
  473. package/src/components/slideshow/Slideshow.stories.tsx +0 -179
  474. package/src/components/slideshow/Slideshow.test.tsx +0 -35
  475. package/src/components/slideshow/Slideshow.tsx +0 -173
  476. package/src/components/slideshow/SlideshowControls.stories.tsx +0 -100
  477. package/src/components/slideshow/SlideshowControls.tsx +0 -243
  478. package/src/components/slideshow/SlideshowItem.tsx +0 -44
  479. package/src/components/slideshow/SlideshowItemGroup.tsx +0 -60
  480. package/src/components/slideshow/constants.ts +0 -24
  481. package/src/components/slideshow/index.ts +0 -4
  482. package/src/components/slideshow/useKeyNavigate.ts +0 -28
  483. package/src/components/slideshow/usePaginationVisibleRange.ts +0 -37
  484. package/src/components/slideshow/useSlideFocusManagement.tsx +0 -92
  485. package/src/components/slideshow/useSwipeNavigate.ts +0 -18
  486. package/src/components/switch/Switch.stories.tsx +0 -49
  487. package/src/components/switch/Switch.test.tsx +0 -144
  488. package/src/components/switch/Switch.tsx +0 -145
  489. package/src/components/switch/index.ts +0 -1
  490. package/src/components/table/Table.test.tsx +0 -29
  491. package/src/components/table/Table.tsx +0 -59
  492. package/src/components/table/TableBody.test.tsx +0 -30
  493. package/src/components/table/TableBody.tsx +0 -42
  494. package/src/components/table/TableCell.test.tsx +0 -72
  495. package/src/components/table/TableCell.tsx +0 -130
  496. package/src/components/table/TableHeader.test.tsx +0 -30
  497. package/src/components/table/TableHeader.tsx +0 -48
  498. package/src/components/table/TableRow.test.tsx +0 -40
  499. package/src/components/table/TableRow.tsx +0 -71
  500. package/src/components/table/index.ts +0 -5
  501. package/src/components/tabs/Tab.test.tsx +0 -50
  502. package/src/components/tabs/Tab.tsx +0 -133
  503. package/src/components/tabs/TabList.test.tsx +0 -49
  504. package/src/components/tabs/TabList.tsx +0 -94
  505. package/src/components/tabs/TabPanel.test.tsx +0 -37
  506. package/src/components/tabs/TabPanel.tsx +0 -67
  507. package/src/components/tabs/TabProvider.test.tsx +0 -161
  508. package/src/components/tabs/TabProvider.tsx +0 -67
  509. package/src/components/tabs/Tabs.stories.tsx +0 -170
  510. package/src/components/tabs/index.ts +0 -4
  511. package/src/components/tabs/state.ts +0 -114
  512. package/src/components/tabs/test-utils.ts +0 -39
  513. package/src/components/text/Text.stories.tsx +0 -177
  514. package/src/components/text/Text.test.tsx +0 -92
  515. package/src/components/text/Text.tsx +0 -139
  516. package/src/components/text/index.ts +0 -1
  517. package/src/components/text-field/TextField.stories.tsx +0 -180
  518. package/src/components/text-field/TextField.test.tsx +0 -298
  519. package/src/components/text-field/TextField.tsx +0 -493
  520. package/src/components/text-field/index.ts +0 -1
  521. package/src/components/thumbnail/Thumbnail.stories.tsx +0 -448
  522. package/src/components/thumbnail/Thumbnail.test.tsx +0 -88
  523. package/src/components/thumbnail/Thumbnail.tsx +0 -248
  524. package/src/components/thumbnail/index.ts +0 -3
  525. package/src/components/thumbnail/types.ts +0 -48
  526. package/src/components/thumbnail/useFocusPointStyle.test.ts +0 -92
  527. package/src/components/thumbnail/useFocusPointStyle.tsx +0 -107
  528. package/src/components/thumbnail/useImageLoad.ts +0 -40
  529. package/src/components/toolbar/Toolbar.tsx +0 -68
  530. package/src/components/toolbar/index.ts +0 -1
  531. package/src/components/tooltip/Tooltip.stories.tsx +0 -118
  532. package/src/components/tooltip/Tooltip.test.tsx +0 -417
  533. package/src/components/tooltip/Tooltip.tsx +0 -165
  534. package/src/components/tooltip/constants.ts +0 -8
  535. package/src/components/tooltip/context.tsx +0 -17
  536. package/src/components/tooltip/index.ts +0 -1
  537. package/src/components/tooltip/useInjectTooltipRef.tsx +0 -55
  538. package/src/components/tooltip/useTooltipOpen.tsx +0 -143
  539. package/src/components/uploader/Uploader.stories.tsx +0 -109
  540. package/src/components/uploader/Uploader.test.tsx +0 -146
  541. package/src/components/uploader/Uploader.tsx +0 -177
  542. package/src/components/uploader/index.ts +0 -1
  543. package/src/components/user-block/UserBlock.stories.tsx +0 -133
  544. package/src/components/user-block/UserBlock.test.tsx +0 -106
  545. package/src/components/user-block/UserBlock.tsx +0 -193
  546. package/src/components/user-block/index.ts +0 -1
  547. package/src/constants.ts +0 -27
  548. package/src/hooks/useBooleanState.tsx +0 -13
  549. package/src/hooks/useCallbackOnEscape.ts +0 -34
  550. package/src/hooks/useChipGroupNavigation.tsx +0 -75
  551. package/src/hooks/useClickAway.tsx +0 -48
  552. package/src/hooks/useDisableBodyScroll.ts +0 -28
  553. package/src/hooks/useEventCallback.tsx +0 -17
  554. package/src/hooks/useFocus.tsx +0 -21
  555. package/src/hooks/useFocusTrap.ts +0 -93
  556. package/src/hooks/useFocusWithin.ts +0 -33
  557. package/src/hooks/useId.test.tsx +0 -22
  558. package/src/hooks/useId.ts +0 -15
  559. package/src/hooks/useImageSize.ts +0 -17
  560. package/src/hooks/useInfiniteScroll.tsx +0 -60
  561. package/src/hooks/useIntersectionObserver.tsx +0 -43
  562. package/src/hooks/useInterval.tsx +0 -31
  563. package/src/hooks/useKeyboardListNavigation.tsx +0 -204
  564. package/src/hooks/useListenFocus.tsx +0 -26
  565. package/src/hooks/useOverflowTooltipLabel.tsx +0 -32
  566. package/src/hooks/usePopper.ts +0 -12
  567. package/src/hooks/usePreviousValue.ts +0 -12
  568. package/src/hooks/useRovingTabIndex.tsx +0 -90
  569. package/src/hooks/useSizeOnWindowResize.ts +0 -30
  570. package/src/hooks/useSlideshowControls.ts +0 -246
  571. package/src/hooks/useStopPropagation.ts +0 -21
  572. package/src/hooks/useTransitionVisibility.ts +0 -48
  573. package/src/index.ts +0 -63
  574. package/src/stories/controls/color.ts +0 -7
  575. package/src/stories/controls/element.ts +0 -6
  576. package/src/stories/controls/focusPoint.ts +0 -1
  577. package/src/stories/controls/icons.ts +0 -126
  578. package/src/stories/controls/image.ts +0 -84
  579. package/src/stories/controls/selectArgType.ts +0 -8
  580. package/src/stories/controls/theme.ts +0 -3
  581. package/src/stories/controls/typography.ts +0 -5
  582. package/src/stories/controls/withUndefined.ts +0 -1
  583. package/src/stories/decorators/withChromaticForceScreenSize.tsx +0 -7
  584. package/src/stories/decorators/withCombinations.tsx +0 -132
  585. package/src/stories/decorators/withNestedProps.tsx +0 -22
  586. package/src/stories/decorators/withResizableBox.tsx +0 -21
  587. package/src/stories/decorators/withThemedBackground.tsx +0 -16
  588. package/src/stories/decorators/withValueOnChange.tsx +0 -18
  589. package/src/stories/decorators/withWrapper.tsx +0 -19
  590. package/src/stories/generated/Autocomplete/Demos.stories.tsx +0 -7
  591. package/src/stories/generated/Avatar/Demos.stories.tsx +0 -7
  592. package/src/stories/generated/Badge/Demos.stories.tsx +0 -9
  593. package/src/stories/generated/Button/Demos.stories.tsx +0 -11
  594. package/src/stories/generated/Checkbox/Demos.stories.tsx +0 -6
  595. package/src/stories/generated/Chip/Demos.stories.tsx +0 -11
  596. package/src/stories/generated/CommentBlock/Demos.stories.tsx +0 -8
  597. package/src/stories/generated/DatePicker/Demos.stories.tsx +0 -8
  598. package/src/stories/generated/Dialog/Demos.stories.tsx +0 -10
  599. package/src/stories/generated/Divider/Demos.stories.tsx +0 -6
  600. package/src/stories/generated/Dropdown/Demos.stories.tsx +0 -8
  601. package/src/stories/generated/ExpansionPanel/Demos.stories.tsx +0 -9
  602. package/src/stories/generated/Flag/Demos.stories.tsx +0 -6
  603. package/src/stories/generated/GenericBlock/Demos.stories.tsx +0 -8
  604. package/src/stories/generated/Heading/Demos.stories.tsx +0 -6
  605. package/src/stories/generated/Icon/Demos.stories.tsx +0 -8
  606. package/src/stories/generated/ImageBlock/Demos.stories.tsx +0 -9
  607. package/src/stories/generated/ImageLightbox/Demos.stories.tsx +0 -6
  608. package/src/stories/generated/Lightbox/Demos.stories.tsx +0 -6
  609. package/src/stories/generated/LinkPreview/Demos.stories.tsx +0 -7
  610. package/src/stories/generated/List/Demos.stories.tsx +0 -11
  611. package/src/stories/generated/Message/Demos.stories.tsx +0 -11
  612. package/src/stories/generated/Mosaic/Demos.stories.tsx +0 -10
  613. package/src/stories/generated/Notification/Demos.stories.tsx +0 -6
  614. package/src/stories/generated/Popover/Demos.stories.tsx +0 -11
  615. package/src/stories/generated/PopoverDialog/Demos.stories.tsx +0 -6
  616. package/src/stories/generated/PostBlock/Demos.stories.tsx +0 -6
  617. package/src/stories/generated/Progress/Demos.stories.tsx +0 -7
  618. package/src/stories/generated/ProgressTracker/Demos.stories.tsx +0 -9
  619. package/src/stories/generated/RadioButton/Demos.stories.tsx +0 -6
  620. package/src/stories/generated/Select/Demos.stories.tsx +0 -14
  621. package/src/stories/generated/SideNavigation/Demos.stories.tsx +0 -10
  622. package/src/stories/generated/Skeleton/Demos.stories.tsx +0 -9
  623. package/src/stories/generated/Slider/Demos.stories.tsx +0 -9
  624. package/src/stories/generated/Slideshow/Demos.stories.tsx +0 -8
  625. package/src/stories/generated/Switch/Demos.stories.tsx +0 -6
  626. package/src/stories/generated/Table/Demos.stories.tsx +0 -7
  627. package/src/stories/generated/Tabs/Demos.stories.tsx +0 -8
  628. package/src/stories/generated/TextField/Demos.stories.tsx +0 -20
  629. package/src/stories/generated/Thumbnail/Demos.stories.tsx +0 -12
  630. package/src/stories/generated/Toolbar/Demos.stories.tsx +0 -10
  631. package/src/stories/generated/Tooltip/Demos.stories.tsx +0 -8
  632. package/src/stories/generated/Uploader/Demos.stories.tsx +0 -8
  633. package/src/stories/generated/UserBlock/Demos.stories.tsx +0 -11
  634. package/src/stories/utils/CustomLink.tsx +0 -12
  635. package/src/stories/utils/concatPath.tsx +0 -17
  636. package/src/stories/utils/disableArgTypes.ts +0 -3
  637. package/src/stories/utils/initDemoShadowDOMPortal.ts +0 -10
  638. package/src/stories/utils/lorem.ts +0 -59
  639. package/src/stories/utils/theming.tsx +0 -166
  640. package/src/stories/utils/toFlattenProps.ts +0 -28
  641. package/src/stories/utils/withCategory.ts +0 -12
  642. package/src/testing/utils/ThemeSentinel.tsx +0 -10
  643. package/src/testing/utils/commonTestsSuiteRTL.tsx +0 -193
  644. package/src/testing/utils/index.ts +0 -1
  645. package/src/testing/utils/queries.ts +0 -19
  646. package/src/untypped-modules.d.ts +0 -9
  647. package/src/utils/ClickAwayProvider/ClickAwayProvider.stories.jsx +0 -70
  648. package/src/utils/ClickAwayProvider/ClickAwayProvider.tsx +0 -69
  649. package/src/utils/ClickAwayProvider/index.ts +0 -1
  650. package/src/utils/MaterialThemeSwitcher/MaterialThemeSwitcher.tsx +0 -54
  651. package/src/utils/MaterialThemeSwitcher/index.ts +0 -1
  652. package/src/utils/Portal/Portal.test.tsx +0 -31
  653. package/src/utils/Portal/Portal.tsx +0 -33
  654. package/src/utils/Portal/PortalProvider.stories.jsx +0 -22
  655. package/src/utils/Portal/PortalProvider.test.tsx +0 -72
  656. package/src/utils/Portal/PortalProvider.tsx +0 -24
  657. package/src/utils/Portal/index.tsx +0 -2
  658. package/src/utils/browser/DOM/findImage.tsx +0 -3
  659. package/src/utils/browser/DOM/startViewTransition.ts +0 -68
  660. package/src/utils/browser/focus/constants.ts +0 -7
  661. package/src/utils/browser/focus/getFirstAndLastFocusable.test.ts +0 -134
  662. package/src/utils/browser/focus/getFirstAndLastFocusable.ts +0 -21
  663. package/src/utils/browser/focus/getFocusableElements.test.ts +0 -151
  664. package/src/utils/browser/focus/getFocusableElements.ts +0 -7
  665. package/src/utils/browser/isFocusVisible.ts +0 -9
  666. package/src/utils/browser/isHoverNotSupported.test.js +0 -24
  667. package/src/utils/browser/isHoverNotSupported.ts +0 -2
  668. package/src/utils/browser/isReducedMotion.ts +0 -6
  669. package/src/utils/date/addMonthResetDay.test.ts +0 -13
  670. package/src/utils/date/addMonthResetDay.ts +0 -9
  671. package/src/utils/date/formatDayNumber.test.ts +0 -12
  672. package/src/utils/date/formatDayNumber.ts +0 -5
  673. package/src/utils/date/getFirstDayOfWeek.test.ts +0 -20
  674. package/src/utils/date/getFirstDayOfWeek.ts +0 -59
  675. package/src/utils/date/getMonthCalendar.test.ts +0 -127
  676. package/src/utils/date/getMonthCalendar.ts +0 -69
  677. package/src/utils/date/getWeekDays.test.ts +0 -48
  678. package/src/utils/date/getWeekDays.ts +0 -34
  679. package/src/utils/date/getYearDisplayName.test.ts +0 -20
  680. package/src/utils/date/getYearDisplayName.ts +0 -12
  681. package/src/utils/date/isDateValid.test.ts +0 -15
  682. package/src/utils/date/isDateValid.ts +0 -4
  683. package/src/utils/date/isSameDay.test.ts +0 -37
  684. package/src/utils/date/isSameDay.ts +0 -11
  685. package/src/utils/disabled/DisabledStateContext.tsx +0 -29
  686. package/src/utils/disabled/DisabledStateProvider.stories.tsx +0 -92
  687. package/src/utils/disabled/index.ts +0 -2
  688. package/src/utils/disabled/useDisableStateProps.test.tsx +0 -74
  689. package/src/utils/disabled/useDisableStateProps.tsx +0 -37
  690. package/src/utils/function/makeListenerTowerContext.ts +0 -32
  691. package/src/utils/index.ts +0 -7
  692. package/src/utils/locale/getCurrentLocale.ts +0 -4
  693. package/src/utils/locale/parseLocale.test.ts +0 -17
  694. package/src/utils/locale/parseLocale.ts +0 -23
  695. package/src/utils/locale/types.ts +0 -8
  696. package/src/utils/number/clamp.ts +0 -17
  697. package/src/utils/object/isEqual.test.ts +0 -25
  698. package/src/utils/object/isEqual.ts +0 -11
  699. package/src/utils/partitionMulti.test.ts +0 -27
  700. package/src/utils/react/OnBeforeUnmount.tsx +0 -20
  701. package/src/utils/react/RawClickable.test.tsx +0 -153
  702. package/src/utils/react/RawClickable.tsx +0 -65
  703. package/src/utils/react/flattenChildren.ts +0 -32
  704. package/src/utils/react/forwardRef.ts +0 -11
  705. package/src/utils/react/forwardRefPolymorphic.ts +0 -9
  706. package/src/utils/react/mergeRefs.ts +0 -33
  707. package/src/utils/react/renderLink.tsx +0 -17
  708. package/src/utils/react/skipRender.tsx +0 -18
  709. package/src/utils/react/unref.ts +0 -7
  710. package/src/utils/react/wrapChildrenIconWithSpaces.test.tsx +0 -37
  711. package/src/utils/react/wrapChildrenIconWithSpaces.tsx +0 -22
  712. package/src/utils/theme/ThemeContext.ts +0 -16
  713. package/src/utils/theme/invertTheme.ts +0 -4
  714. package/src/utils/type/Comp.ts +0 -14
  715. package/src/utils/type/ComponentRef.ts +0 -16
  716. package/src/utils/type/HasAriaDisabled.ts +0 -6
  717. package/src/utils/type/HasPolymorphicAs.ts +0 -6
  718. package/src/utils/type/HasRequiredLinkHref.ts +0 -1
  719. package/src/utils/type/MaybeElementOrRef.ts +0 -6
  720. package/src/utils/type/index.ts +0 -9
  721. package/src/utils/type/isComponent.ts +0 -33
  722. package/src/utils/type/isComponentType.ts +0 -9
  723. /package/_internal/{Falsy.d.ts → d95844c1.d.ts} +0 -0
@@ -0,0 +1,75 @@
1
+ import { l as classNames } from './6589b796.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { u as useTheme } from './3181f000.js';
4
+ import { FlexBox } from './329b5f12.js';
5
+ import { T as Text } from './0420e67b.js';
6
+
7
+ /** Internal component used to render image captions */
8
+ const ImageCaption = props => {
9
+ const defaultTheme = useTheme();
10
+ const {
11
+ baseClassName,
12
+ theme = defaultTheme,
13
+ as = 'figcaption',
14
+ title,
15
+ titleProps,
16
+ description,
17
+ descriptionProps,
18
+ tags,
19
+ captionStyle,
20
+ align,
21
+ truncate
22
+ } = props;
23
+ if (!title && !description && !tags) return null;
24
+ const titleColor = {
25
+ color: theme === 'dark' ? 'light' : 'dark'
26
+ };
27
+ const baseColor = {
28
+ color: theme === 'dark' ? 'light' : 'dark',
29
+ colorVariant: 'L2'
30
+ };
31
+
32
+ // Display description as string or HTML
33
+ const descriptionContent = typeof description === 'string' ? {
34
+ children: description
35
+ } : {
36
+ dangerouslySetInnerHTML: description
37
+ };
38
+ return /*#__PURE__*/jsxs(FlexBox, {
39
+ as: as,
40
+ className: classNames(baseClassName && `${baseClassName}__wrapper`),
41
+ style: captionStyle,
42
+ orientation: "vertical",
43
+ vAlign: align,
44
+ hAlign: align === 'center' ? align : undefined,
45
+ gap: "regular",
46
+ children: [(title || description) && /*#__PURE__*/jsxs(Text, {
47
+ as: "p",
48
+ className: classNames(baseClassName && `${baseClassName}__caption`),
49
+ truncate: truncate,
50
+ ...baseColor,
51
+ children: [title && /*#__PURE__*/jsx(Text, {
52
+ ...titleProps,
53
+ as: "span",
54
+ className: classNames(titleProps?.className, baseClassName && `${baseClassName}__title`),
55
+ typography: "subtitle1",
56
+ ...titleColor,
57
+ children: title
58
+ }), ' ', description && /*#__PURE__*/jsx(Text, {
59
+ ...descriptionProps,
60
+ as: "span",
61
+ className: classNames(descriptionProps?.className, baseClassName && `${baseClassName}__description`),
62
+ typography: "body1",
63
+ ...descriptionContent
64
+ })]
65
+ }), tags && /*#__PURE__*/jsx(FlexBox, {
66
+ className: classNames(baseClassName && `${baseClassName}__tags`),
67
+ orientation: "horizontal",
68
+ vAlign: align,
69
+ children: tags
70
+ })]
71
+ });
72
+ };
73
+
74
+ export { ImageCaption as I };
75
+ //# sourceMappingURL=dbe0cf24.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dbe0cf24.js","sources":["../../src/components/image-block/ImageCaption.tsx"],"sourcesContent":["import { CSSProperties, ReactNode } from 'react';\n\nimport { FlexBox, HorizontalAlignment, Text, TextProps, useTheme } from '@lumx/react';\nimport { HasPolymorphicAs, HasTheme } from '@lumx/react/utils/type';\nimport classNames from 'classnames';\n\ntype As = 'div' | 'figcaption';\n\ntype ForwardedTextProps = Omit<TextProps, 'as' | 'typography' | 'color' | 'colorVariant'>;\n\nexport type ImageCaptionMetadata = {\n /** Image title to display in the caption. */\n title?: string;\n /** Props to pass to the title. */\n titleProps?: ForwardedTextProps;\n /** Image description. Can be either a string, or sanitized html. */\n description?: string | { __html: string };\n /** Props to pass to the title. */\n descriptionProps?: ForwardedTextProps;\n /** Tag content. */\n tags?: ReactNode;\n /** Caption custom CSS style. */\n captionStyle?: CSSProperties;\n};\n\nexport type ImageCaptionProps<AS extends As = 'figcaption'> = HasTheme &\n HasPolymorphicAs<AS> &\n ImageCaptionMetadata & {\n /** Base className for sub elements */\n baseClassName?: string;\n /** Alignment. */\n align?: HorizontalAlignment;\n /** Truncate text on title & description (no line wrapping). */\n truncate?: TextProps['truncate'];\n };\n\n/** Internal component used to render image captions */\nexport const ImageCaption = <AS extends As>(props: ImageCaptionProps<AS>) => {\n const defaultTheme = useTheme();\n const {\n baseClassName,\n theme = defaultTheme,\n as = 'figcaption',\n title,\n titleProps,\n description,\n descriptionProps,\n tags,\n captionStyle,\n align,\n truncate,\n } = props;\n if (!title && !description && !tags) return null;\n\n const titleColor = { color: theme === 'dark' ? 'light' : 'dark' } as const;\n const baseColor = { color: theme === 'dark' ? 'light' : 'dark', colorVariant: 'L2' } as const;\n\n // Display description as string or HTML\n const descriptionContent =\n typeof description === 'string' ? { children: description } : { dangerouslySetInnerHTML: description };\n\n return (\n <FlexBox\n as={as}\n className={classNames(baseClassName && `${baseClassName}__wrapper`)}\n style={captionStyle}\n orientation=\"vertical\"\n vAlign={align}\n hAlign={align === 'center' ? align : undefined}\n gap=\"regular\"\n >\n {(title || description) && (\n <Text\n as=\"p\"\n className={classNames(baseClassName && `${baseClassName}__caption`)}\n truncate={truncate}\n {...baseColor}\n >\n {title && (\n <Text\n {...titleProps}\n as=\"span\"\n className={classNames(titleProps?.className, baseClassName && `${baseClassName}__title`)}\n typography=\"subtitle1\"\n {...titleColor}\n >\n {title}\n </Text>\n )}{' '}\n {description && (\n <Text\n {...descriptionProps}\n as=\"span\"\n className={classNames(\n descriptionProps?.className,\n baseClassName && `${baseClassName}__description`,\n )}\n typography=\"body1\"\n {...descriptionContent}\n />\n )}\n </Text>\n )}\n {tags && (\n <FlexBox\n className={classNames(baseClassName && `${baseClassName}__tags`)}\n orientation=\"horizontal\"\n vAlign={align}\n >\n {tags}\n </FlexBox>\n )}\n </FlexBox>\n );\n};\n"],"names":["ImageCaption","props","defaultTheme","useTheme","baseClassName","theme","as","title","titleProps","description","descriptionProps","tags","captionStyle","align","truncate","titleColor","color","baseColor","colorVariant","descriptionContent","children","dangerouslySetInnerHTML","_jsxs","FlexBox","className","classNames","style","orientation","vAlign","hAlign","undefined","gap","Text","_jsx","typography"],"mappings":";;;;;;AAoCA;AACaA,MAAAA,YAAY,GAAmBC,KAA4B,IAAK;AACzE,EAAA,MAAMC,YAAY,GAAGC,QAAQ,EAAE,CAAA;EAC/B,MAAM;IACFC,aAAa;AACbC,IAAAA,KAAK,GAAGH,YAAY;AACpBI,IAAAA,EAAE,GAAG,YAAY;IACjBC,KAAK;IACLC,UAAU;IACVC,WAAW;IACXC,gBAAgB;IAChBC,IAAI;IACJC,YAAY;IACZC,KAAK;AACLC,IAAAA,QAAAA;AACJ,GAAC,GAAGb,KAAK,CAAA;EACT,IAAI,CAACM,KAAK,IAAI,CAACE,WAAW,IAAI,CAACE,IAAI,EAAE,OAAO,IAAI,CAAA;AAEhD,EAAA,MAAMI,UAAU,GAAG;AAAEC,IAAAA,KAAK,EAAEX,KAAK,KAAK,MAAM,GAAG,OAAO,GAAG,MAAA;GAAiB,CAAA;AAC1E,EAAA,MAAMY,SAAS,GAAG;AAAED,IAAAA,KAAK,EAAEX,KAAK,KAAK,MAAM,GAAG,OAAO,GAAG,MAAM;AAAEa,IAAAA,YAAY,EAAE,IAAA;GAAe,CAAA;;AAE7F;AACA,EAAA,MAAMC,kBAAkB,GACpB,OAAOV,WAAW,KAAK,QAAQ,GAAG;AAAEW,IAAAA,QAAQ,EAAEX,WAAAA;AAAY,GAAC,GAAG;AAAEY,IAAAA,uBAAuB,EAAEZ,WAAAA;GAAa,CAAA;EAE1G,oBACIa,IAAA,CAACC,OAAO,EAAA;AACJjB,IAAAA,EAAE,EAAEA,EAAG;IACPkB,SAAS,EAAEC,UAAU,CAACrB,aAAa,IAAI,CAAGA,EAAAA,aAA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S,EAAEC,UAAU,CAACrB,aAAa,IAAI,CAAGA,EAAAA,aAAa,QAAQ,CAAE;AACjEuB,MAAAA,WAAW,EAAC,YAAY;AACxBC,MAAAA,MAAM,EAAEf,KAAM;AAAAO,MAAAA,QAAA,EAEbT,IAAAA;AAAI,KACA,CACZ,CAAA;AAAA,GACI,CAAC,CAAA;AAElB;;;;"}
@@ -0,0 +1,4 @@
1
+ const mdiCheckCircle = 'M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z';
2
+
3
+ export { mdiCheckCircle as m };
4
+ //# sourceMappingURL=de24f857.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"de24f857.js","sources":["../../../lumx-icons/dist/esm/check-circle.js"],"sourcesContent":["export const mdiCheckCircle = 'M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z';"],"names":["mdiCheckCircle"],"mappings":"AAAO,MAAMA,cAAc,GAAG;;;;"}
@@ -0,0 +1,75 @@
1
+ import { l as classNames } from './6589b796.js';
2
+ import isBoolean from 'lodash/isBoolean';
3
+ import isEmpty from 'lodash/isEmpty';
4
+ import kebabCase from 'lodash/kebabCase';
5
+
6
+ /**
7
+ * Get the basic CSS class for the given type.
8
+ *
9
+ * @param prefix The class name prefix for the generated CSS class.
10
+ * @param type The type of CSS class we want to generate (e.g.: 'color', 'variant', ...).
11
+ * @param value The value of the type of the CSS class (e.g.: 'primary', 'button', ...).
12
+ * @return The basic CSS class.
13
+ */
14
+ function getBasicClass({
15
+ prefix,
16
+ type,
17
+ value
18
+ }) {
19
+ if (isBoolean(value)) {
20
+ if (!value) {
21
+ // False value should not return a class.
22
+ return '';
23
+ }
24
+ const booleanPrefixes = ['has', 'is'];
25
+ if (booleanPrefixes.some(booleanPrefix => type.toString().startsWith(booleanPrefix))) {
26
+ return `${prefix}--${kebabCase(type)}`;
27
+ }
28
+ return `${prefix}--is-${kebabCase(type)}`;
29
+ }
30
+ return `${prefix}--${kebabCase(type)}-${value}`;
31
+ }
32
+
33
+ /**
34
+ * Enhance isEmpty method to also works with numbers.
35
+ *
36
+ * @param value The value to check.
37
+ * @return Whether the input value is empty or != 0.
38
+ */
39
+ const _isEmpty = value => {
40
+ if (typeof value === 'number') {
41
+ return value === 0;
42
+ }
43
+ return isEmpty(value);
44
+ };
45
+
46
+ /**
47
+ * Return all basic LumX CSS classes which are available for every components.
48
+ *
49
+ * @see {@link /src/components/index.d.ts} for the possible values of each parameter.
50
+ *
51
+ * @param prefix The class name prefix for the generated CSS class.
52
+ * @param props All the other props you want to generate a class.
53
+ * The rule of thumb: the key is the name of the prop in the class, the value a string that will
54
+ * be used in the classname to represent the value of the given prop.
55
+ * @return All LumX basic CSS classes.
56
+ */
57
+ function handleBasicClasses({
58
+ prefix,
59
+ ...props
60
+ }) {
61
+ const otherClasses = {};
62
+ if (!isEmpty(props)) {
63
+ Object.keys(props).forEach(prop => {
64
+ otherClasses[getBasicClass({
65
+ prefix,
66
+ type: prop,
67
+ value: props[prop]
68
+ })] = isBoolean(props[prop]) ? props[prop] : !_isEmpty(props[prop]);
69
+ });
70
+ }
71
+ return classNames(prefix, otherClasses);
72
+ }
73
+
74
+ export { getBasicClass as g, handleBasicClasses as h };
75
+ //# sourceMappingURL=e2afb13f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e2afb13f.js","sources":["../../../lumx-core/src/js/utils/className/getBasicClass.ts","../../../lumx-core/src/js/utils/className/handleBasicClasses.ts"],"sourcesContent":["import isBoolean from 'lodash/isBoolean';\nimport kebabCase from 'lodash/kebabCase';\n\n/**\n * Get the basic CSS class for the given type.\n *\n * @param prefix The class name prefix for the generated CSS class.\n * @param type The type of CSS class we want to generate (e.g.: 'color', 'variant', ...).\n * @param value The value of the type of the CSS class (e.g.: 'primary', 'button', ...).\n * @return The basic CSS class.\n */\nexport function getBasicClass({\n prefix,\n type,\n value,\n}: {\n prefix: string;\n type: string;\n value: string | number | boolean | undefined;\n}): string {\n if (isBoolean(value)) {\n if (!value) {\n // False value should not return a class.\n return '';\n }\n const booleanPrefixes = ['has', 'is'];\n\n if (booleanPrefixes.some((booleanPrefix) => type.toString().startsWith(booleanPrefix))) {\n return `${prefix}--${kebabCase(type)}`;\n }\n\n return `${prefix}--is-${kebabCase(type)}`;\n }\n\n return `${prefix}--${kebabCase(type)}-${value}`;\n}\n","import classNames from 'classnames';\n\nimport isBoolean from 'lodash/isBoolean';\nimport isEmpty from 'lodash/isEmpty';\n\nimport { getBasicClass } from './getBasicClass';\n\n/**\n * Enhance isEmpty method to also works with numbers.\n *\n * @param value The value to check.\n * @return Whether the input value is empty or != 0.\n */\nconst _isEmpty = (value: any) => {\n if (typeof value === 'number') {\n return value === 0;\n }\n\n return isEmpty(value);\n};\n\n/**\n * Return all basic LumX CSS classes which are available for every components.\n *\n * @see {@link /src/components/index.d.ts} for the possible values of each parameter.\n *\n * @param prefix The class name prefix for the generated CSS class.\n * @param props All the other props you want to generate a class.\n * The rule of thumb: the key is the name of the prop in the class, the value a string that will\n * be used in the classname to represent the value of the given prop.\n * @return All LumX basic CSS classes.\n */\nexport function handleBasicClasses({ prefix, ...props }: { prefix: string; [prop: string]: any }): string {\n const otherClasses: any = {};\n if (!isEmpty(props)) {\n Object.keys(props).forEach((prop) => {\n otherClasses[getBasicClass({ prefix, type: prop, value: props[prop] })] = isBoolean(props[prop])\n ? props[prop]\n : !_isEmpty(props[prop]);\n });\n }\n\n return classNames(prefix, otherClasses);\n}\n"],"names":["getBasicClass","prefix","type","value","isBoolean","booleanPrefixes","some","booleanPrefix","toString","startsWith","kebabCase","_isEmpty","isEmpty","handleBasicClasses","props","otherClasses","Object","keys","forEach","prop","classNames"],"mappings":";;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,aAAaA,CAAC;EAC1BC,MAAM;EACN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I,IAAK;MACjCJ,YAAY,CAACf,aAAa,CAAC;QAAEC,MAAM;AAAEC,QAAAA,IAAI,EAAEiB,IAAI;QAAEhB,KAAK,EAAEW,KAAK,CAACK,IAAI,CAAA;OAAG,CAAC,CAAC,GAAGf,SAAS,CAACU,KAAK,CAACK,IAAI,CAAC,CAAC,GAC1FL,KAAK,CAACK,IAAI,CAAC,GACX,CAACR,QAAQ,CAACG,KAAK,CAACK,IAAI,CAAC,CAAC,CAAA;AAChC,KAAC,CAAC,CAAA;AACN,GAAA;AAEA,EAAA,OAAOC,UAAU,CAACnB,MAAM,EAAEc,YAAY,CAAC,CAAA;AAC3C;;;;"}
@@ -0,0 +1,94 @@
1
+ import { useMemo } from 'react';
2
+ import { m as getRootClassName, n as forwardRef, b as Theme, l as classNames, A as Alignment, i as AspectRatio } from './6589b796.js';
3
+ import take from 'lodash/take';
4
+ import { u as useTheme } from './3181f000.js';
5
+ import { h as handleBasicClasses } from './e2afb13f.js';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+ import { T as Thumbnail } from './628468c4.js';
8
+
9
+ /**
10
+ * Component display name.
11
+ */
12
+ const COMPONENT_NAME = 'Mosaic';
13
+
14
+ /**
15
+ * Component default class name and class prefix.
16
+ */
17
+ const CLASSNAME = getRootClassName(COMPONENT_NAME);
18
+
19
+ /**
20
+ * Component default props.
21
+ */
22
+ const DEFAULT_PROPS = {};
23
+
24
+ /**
25
+ * Mosaic component.
26
+ *
27
+ * @param props Component props.
28
+ * @param ref Component ref.
29
+ * @return React element.
30
+ */
31
+ const Mosaic = forwardRef((props, ref) => {
32
+ const defaultTheme = useTheme() || Theme.light;
33
+ const {
34
+ className,
35
+ theme = defaultTheme,
36
+ thumbnails,
37
+ onImageClick,
38
+ ...forwardedProps
39
+ } = props;
40
+ const handleImageClick = useMemo(() => {
41
+ if (!onImageClick) return undefined;
42
+ return (index, onClick) => event => {
43
+ onClick?.(event);
44
+ onImageClick?.(index);
45
+ };
46
+ }, [onImageClick]);
47
+ return /*#__PURE__*/jsx("div", {
48
+ ref: ref,
49
+ ...forwardedProps,
50
+ className: classNames(className, handleBasicClasses({
51
+ prefix: CLASSNAME,
52
+ theme
53
+ }), {
54
+ [`${CLASSNAME}--has-1-thumbnail`]: thumbnails?.length === 1,
55
+ [`${CLASSNAME}--has-2-thumbnails`]: thumbnails?.length === 2,
56
+ [`${CLASSNAME}--has-3-thumbnails`]: thumbnails?.length === 3,
57
+ [`${CLASSNAME}--has-4-thumbnails`]: thumbnails?.length >= 4
58
+ }),
59
+ children: /*#__PURE__*/jsx("div", {
60
+ className: `${CLASSNAME}__wrapper`,
61
+ children: take(thumbnails, 4).map((thumbnail, index) => {
62
+ const {
63
+ image,
64
+ onClick,
65
+ align,
66
+ ...thumbnailProps
67
+ } = thumbnail;
68
+ return /*#__PURE__*/jsxs("div", {
69
+ className: `${CLASSNAME}__thumbnail`,
70
+ children: [/*#__PURE__*/jsx(Thumbnail, {
71
+ ...thumbnailProps,
72
+ align: align || Alignment.left,
73
+ image: image,
74
+ theme: theme,
75
+ aspectRatio: AspectRatio.free,
76
+ fillHeight: true,
77
+ onClick: handleImageClick?.(index, onClick) || onClick
78
+ }), thumbnails.length > 4 && index === 3 && /*#__PURE__*/jsx("div", {
79
+ className: `${CLASSNAME}__overlay`,
80
+ children: /*#__PURE__*/jsxs("span", {
81
+ children: ["+", thumbnails.length - 4]
82
+ })
83
+ })]
84
+ }, index);
85
+ })
86
+ })
87
+ });
88
+ });
89
+ Mosaic.displayName = COMPONENT_NAME;
90
+ Mosaic.className = CLASSNAME;
91
+ Mosaic.defaultProps = DEFAULT_PROPS;
92
+
93
+ export { Mosaic };
94
+ //# sourceMappingURL=e52f0d3f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e52f0d3f.js","sources":["../../src/components/mosaic/Mosaic.tsx"],"sourcesContent":["import { MouseEventHandler, useMemo } from 'react';\n\nimport classNames from 'classnames';\nimport take from 'lodash/take';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\n\nimport { Alignment, AspectRatio, Theme, Thumbnail, ThumbnailProps } from '@lumx/react';\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport { getRootClassName, handleBasicClasses } from '@lumx/core/js/utils/className';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport interface MosaicProps extends GenericProps, HasTheme {\n /** Thumbnails. */\n thumbnails: ThumbnailProps[];\n /** On image click callback. */\n onImageClick?(index: number): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Mosaic';\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<MosaicProps> = {};\n\n/**\n * Mosaic component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Mosaic = forwardRef<MosaicProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { className, theme = defaultTheme, thumbnails, onImageClick, ...forwardedProps } = props;\n const handleImageClick = useMemo(() => {\n if (!onImageClick) return undefined;\n\n return (index: number, onClick?: MouseEventHandler): MouseEventHandler =>\n (event) => {\n onClick?.(event);\n onImageClick?.(index);\n };\n }, [onImageClick]);\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, theme }), {\n [`${CLASSNAME}--has-1-thumbnail`]: thumbnails?.length === 1,\n [`${CLASSNAME}--has-2-thumbnails`]: thumbnails?.length === 2,\n [`${CLASSNAME}--has-3-thumbnails`]: thumbnails?.length === 3,\n [`${CLASSNAME}--has-4-thumbnails`]: thumbnails?.length >= 4,\n })}\n >\n <div className={`${CLASSNAME}__wrapper`}>\n {take(thumbnails, 4).map((thumbnail: any, index: number) => {\n const { image, onClick, align, ...thumbnailProps } = thumbnail;\n\n return (\n <div key={index} className={`${CLASSNAME}__thumbnail`}>\n <Thumbnail\n {...thumbnailProps}\n align={align || Alignment.left}\n image={image}\n theme={theme}\n aspectRatio={AspectRatio.free}\n fillHeight\n onClick={handleImageClick?.(index, onClick) || onClick}\n />\n\n {thumbnails.length > 4 && index === 3 && (\n <div className={`${CLASSNAME}__overlay`}>\n <span>+{thumbnails.length - 4}</span>\n </div>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n});\nMosaic.displayName = COMPONENT_NAME;\nMosaic.className = CLASSNAME;\nMosaic.defaultProps = DEFAULT_PROPS;\n"],"names":["COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","Mosaic","forwardRef","props","ref","defaultTheme","useTheme","Theme","light","className","theme","thumbnails","onImageClick","forwardedProps","handleImageClick","useMemo","undefined","index","onClick","event","_jsx","classNames","handleBasicClasses","prefix","length","children","take","map","thumbnail","image","align","thumbnailProps","_jsxs","Thumbnail","Alignment","left","aspectRatio","AspectRatio","free","fillHeight","displayName","defaultProps"],"mappings":";;;;;;;;AAqBA;AACA;AACA;AACA,MAAMA,cAAc,GAAG,QAAQ,CAAA;;AAE/B;AACA;AACA;AACA,MAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAc,CAAC,CAAA;;AAElD;AACA;AACA;AACA,MAAMG,aAAmC,GAAG,EAAE,CAAA;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,MAAM,GAAGC,UAAU,CAA8B,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC1E,MAAMC,YAAY,GAAGC,QAAQ,EAAE,IAAIC,KAAK,CAACC,KAAK,CAAA;EAC9C,MAAM;IAAEC,SAAS;AAAEC,IAAAA,KAAK,GAAGL,YAAY;IAAEM,UAAU;IAAEC,YAAY;IAAE,GAAGC,cAAAA;AAAe,GAAC,GAAGV,KAAK,CAAA;AAC9F,EAAA,MAAMW,gBAAgB,GAAGC,OAAO,CAAC,MAAM;AACnC,IAAA,IAAI,CAACH,YAAY,EAAE,OAAOI,SAAS,CAAA;AAEnC,IAAA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EAAAA,SAAS,CAAc,WAAA,CAAA;UAAA2B,QAAA,EAAA,cAClDL,GAAA,CAACa,SAAS,EAAA;AAAA,YAAA,GACFF,cAAc;AAClBD,YAAAA,KAAK,EAAEA,KAAK,IAAII,SAAS,CAACC,IAAK;AAC/BN,YAAAA,KAAK,EAAEA,KAAM;AACbnB,YAAAA,KAAK,EAAEA,KAAM;YACb0B,WAAW,EAAEC,WAAW,CAACC,IAAK;YAC9BC,UAAU,EAAA,IAAA;AACVrB,YAAAA,OAAO,EAAEJ,gBAAgB,GAAGG,KAAK,EAAEC,OAAO,CAAC,IAAIA,OAAAA;AAAQ,WAC1D,CAAC,EAEDP,UAAU,CAACa,MAAM,GAAG,CAAC,IAAIP,KAAK,KAAK,CAAC,iBACjCG,GAAA,CAAA,KAAA,EAAA;YAAKX,SAAS,EAAE,CAAGX,EAAAA,SAAS,CAAY,SAAA,CAAA;AAAA2B,YAAAA,QAAA,eACpCO,IAAA,CAAA,MAAA,EAAA;AAAAP,cAAAA,QAAA,GAAM,GAAC,EAACd,UAAU,CAACa,MAAM,GAAG,CAAC,CAAA;aAAO,CAAA;AAAC,WACpC,CACR,CAAA;AAAA,SAAA,EAfKP,KAgBL,CAAC,CAAA;OAEb,CAAA;KACA,CAAA;AAAC,GACL,CAAC,CAAA;AAEd,CAAC,EAAC;AACFhB,MAAM,CAACuC,WAAW,GAAG3C,cAAc,CAAA;AACnCI,MAAM,CAACQ,SAAS,GAAGX,SAAS,CAAA;AAC5BG,MAAM,CAACwC,YAAY,GAAGzC,aAAa;;;;"}
@@ -0,0 +1,50 @@
1
+ import { useState, useRef, useEffect } from 'react';
2
+ import { W as WINDOW } from './478b5c92.js';
3
+
4
+ /** Check if user prefers reduced motion */
5
+ function isReducedMotion() {
6
+ return WINDOW?.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
7
+ }
8
+
9
+ /**
10
+ * Returns true if the component is visible tracking the opacity transition.
11
+ *
12
+ * @param ref Element on which to listen the transition event.
13
+ * @param isComponentVisible Whether the component intends to be visible or not.
14
+ * @param onVisibilityChange Callback called when the visibility changes.
15
+ * @return true if the component should be rendered
16
+ */
17
+ const useTransitionVisibility = (ref, isComponentVisible, timeout, onVisibilityChange) => {
18
+ const [isVisible, setVisible] = useState(isComponentVisible);
19
+ const previousVisibility = useRef(isVisible);
20
+
21
+ // On component visibility change.
22
+ useEffect(() => {
23
+ if (isComponentVisible) {
24
+ setVisible(true);
25
+ return undefined;
26
+ }
27
+ const {
28
+ current: element
29
+ } = ref;
30
+
31
+ // Transition event is not supported or the user prefers reduced motion.
32
+ // => Skip and set visibility to false directly.
33
+ if (!element || !window.TransitionEvent || isReducedMotion()) {
34
+ setVisible(false);
35
+ return undefined;
36
+ }
37
+ const timer = setTimeout(() => setVisible(false), timeout);
38
+ return () => clearTimeout(timer);
39
+ }, [isComponentVisible, ref, timeout]);
40
+ useEffect(() => {
41
+ if (onVisibilityChange && previousVisibility.current !== isVisible) {
42
+ onVisibilityChange(isVisible);
43
+ previousVisibility.current = isVisible;
44
+ }
45
+ }, [isVisible, onVisibilityChange]);
46
+ return isVisible || isComponentVisible;
47
+ };
48
+
49
+ export { isReducedMotion as i, useTransitionVisibility as u };
50
+ //# sourceMappingURL=e6dd117e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e6dd117e.js","sources":["../../src/utils/browser/isReducedMotion.ts","../../src/hooks/useTransitionVisibility.ts"],"sourcesContent":["import { WINDOW } from '@lumx/react/constants';\n\n/** Check if user prefers reduced motion */\nexport function isReducedMotion() {\n return WINDOW?.matchMedia?.('(prefers-reduced-motion: reduce)').matches;\n}\n","import { RefObject, useEffect, useRef, useState } from 'react';\nimport { isReducedMotion } from '@lumx/react/utils/browser/isReducedMotion';\n\n/**\n * Returns true if the component is visible tracking the opacity transition.\n *\n * @param ref Element on which to listen the transition event.\n * @param isComponentVisible Whether the component intends to be visible or not.\n * @param onVisibilityChange Callback called when the visibility changes.\n * @return true if the component should be rendered\n */\nexport const useTransitionVisibility = (\n ref: RefObject<HTMLElement>,\n isComponentVisible: boolean,\n timeout: number,\n onVisibilityChange?: (isVisible: boolean) => void,\n) => {\n const [isVisible, setVisible] = useState(isComponentVisible);\n const previousVisibility = useRef(isVisible);\n\n // On component visibility change.\n useEffect(() => {\n if (isComponentVisible) {\n setVisible(true);\n return undefined;\n }\n const { current: element } = ref;\n\n // Transition event is not supported or the user prefers reduced motion.\n // => Skip and set visibility to false directly.\n if (!element || !window.TransitionEvent || isReducedMotion()) {\n setVisible(false);\n return undefined;\n }\n\n const timer = setTimeout(() => setVisible(false), timeout);\n return () => clearTimeout(timer);\n }, [isComponentVisible, ref, timeout]);\n\n useEffect(() => {\n if (onVisibilityChange && previousVisibility.current !== isVisible) {\n onVisibilityChange(isVisible);\n previousVisibility.current = isVisible;\n }\n }, [isVisible, onVisibilityChange]);\n\n return isVisible || isComponentVisible;\n};\n"],"names":["isReducedMotion","WINDOW","matchMedia","matches","useTransitionVisibility","ref","isComponentVisible","timeout","onVisibilityChange","isVisible","setVisible","useState","previousVisibility","useRef","useEffect","undefined","current","element","window","TransitionEvent","timer","setTimeout","clearTimeout"],"mappings":";;;AAEA;AACO,SAASA,eAAeA,GAAG;AAC9B,EAAA,OAAOC,MAAM,EAAEC,UAAU,GAAG,kCAAkC,CAAC,CAACC,OAAO,CAAA;AAC3E;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAGA,CACnCC,GAA2B,EAC3BC,kBAA2B,EAC3BC,OAAe,EACfC,kBAAiD,KAChD;EACD,MAAM,CAACC,SAAS,EAAEC,UAAU,CAAC,GAAGC,QAAQ,CAACL,kBAAkB,CAAC,CAAA;AAC5D,EAAA,MAAMM,kBAAkB,GAAGC,MAAM,CAACJ,SAAS,CAAC,CAAA;;AAE5C;AACAK,EAAAA,SAAS,CAAC,MAAM;AACZ,IAAA,IAAIR,kBAAkB,EAAE;MACpBI,UAAU,CAAC,IAAI,CAAC,CAAA;AAChB,MAAA,OAAOK,SAAS,CAAA;AACpB,KAAA;IACA,MAAM;AAAEC,MAAAA,OAAO,EAAEC,OAAAA;AAAQ,KAAC,GAAGZ,GAAG,CAAA;;AAEhC;AACA;IACA,IAAI,CAACY,OAAO,IAAI,CAACC,MAAM,CAACC,eAAe,IAAInB,eAAe,EAAE,EAAE;MAC1DU,UAAU,CAAC,KAAK,CAAC,CAAA;AACjB,MAAA,OAAOK,SAAS,CAAA;AACpB,KAAA;IAEA,MAAMK,KAAK,GAAGC,UAAU,CAAC,MAAMX,UAAU,CAAC,KAAK,CAAC,EAAEH,OAAO,CAAC,CAAA;AAC1D,IAAA,OAAO,MAAMe,YAAY,CAACF,KAAK,CAAC,CAAA;GACnC,EAAE,CAACd,kBAAkB,EAAED,GAAG,EAAEE,OAAO,CAAC,CAAC,CAAA;AAEtCO,EAAAA,SAAS,CAAC,MAAM;AACZ,IAAA,IAAIN,kBAAkB,IAAII,kBAAkB,CAACI,OAAO,KAAKP,SAAS,EAAE;MAChED,kBAAkB,CAACC,SAAS,CAAC,CAAA;MAC7BG,kBAAkB,CAACI,OAAO,GAAGP,SAAS,CAAA;AAC1C,KAAA;AACJ,GAAC,EAAE,CAACA,SAAS,EAAED,kBAAkB,CAAC,CAAC,CAAA;EAEnC,OAAOC,SAAS,IAAIH,kBAAkB,CAAA;AAC1C;;;;"}
@@ -0,0 +1,9 @@
1
+ import React__default from 'react';
2
+
3
+ /**
4
+ * Similar to `isComponent` but more precise as it's not based on the component `displayName` but on the component function reference.
5
+ */
6
+ const isComponentType = type => node => /*#__PURE__*/React__default.isValidElement(node) && node.type === type;
7
+
8
+ export { isComponentType as i };
9
+ //# sourceMappingURL=e806b848.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e806b848.js","sources":["../../src/utils/type/isComponentType.ts"],"sourcesContent":["import React, { ReactElement, ReactNode } from 'react';\n\n/**\n * Similar to `isComponent` but more precise as it's not based on the component `displayName` but on the component function reference.\n */\nexport const isComponentType =\n (type: ReactElement['type']) =>\n (node: ReactNode): node is ReactElement =>\n React.isValidElement(node) && node.type === type;\n"],"names":["isComponentType","type","node","React","isValidElement"],"mappings":";;AAEA;AACA;AACA;MACaA,eAAe,GACvBC,IAA0B,IAC1BC,IAAe,iBACZC,cAAK,CAACC,cAAc,CAACF,IAAI,CAAC,IAAIA,IAAI,CAACD,IAAI,KAAKA;;;;"}
@@ -0,0 +1,29 @@
1
+ import React__default, { useContext } from 'react';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ const DisabledStateContext = /*#__PURE__*/React__default.createContext({
5
+ state: null
6
+ });
7
+ /**
8
+ * Disabled state provider.
9
+ * All nested LumX Design System components inherit this disabled state.
10
+ */
11
+ function DisabledStateProvider({
12
+ children,
13
+ ...value
14
+ }) {
15
+ return /*#__PURE__*/jsx(DisabledStateContext.Provider, {
16
+ value: value,
17
+ children: children
18
+ });
19
+ }
20
+
21
+ /**
22
+ * Get DisabledState context value
23
+ */
24
+ function useDisabledStateContext() {
25
+ return useContext(DisabledStateContext);
26
+ }
27
+
28
+ export { DisabledStateProvider as D, useDisabledStateContext as u };
29
+ //# sourceMappingURL=ea04260d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ea04260d.js","sources":["../../src/utils/disabled/DisabledStateContext.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\n/** Disable state */\ntype DisabledStateContextValue =\n | {\n state: 'disabled';\n }\n | { state: undefined | null };\n\nexport const DisabledStateContext = React.createContext<DisabledStateContextValue>({ state: null });\n\nexport type DisabledStateProviderProps = DisabledStateContextValue & {\n children: React.ReactNode;\n};\n\n/**\n * Disabled state provider.\n * All nested LumX Design System components inherit this disabled state.\n */\nexport function DisabledStateProvider({ children, ...value }: DisabledStateProviderProps) {\n return <DisabledStateContext.Provider value={value}>{children}</DisabledStateContext.Provider>;\n}\n\n/**\n * Get DisabledState context value\n */\nexport function useDisabledStateContext(): DisabledStateContextValue {\n return useContext(DisabledStateContext);\n}\n"],"names":["DisabledStateContext","React","createContext","state","DisabledStateProvider","children","value","_jsx","Provider","useDisabledStateContext","useContext"],"mappings":";;;AASO,MAAMA,oBAAoB,gBAAGC,cAAK,CAACC,aAAa,CAA4B;AAAEC,EAAAA,KAAK,EAAE,IAAA;AAAK,CAAC,CAAC,CAAA;AAMnG;AACA;AACA;AACA;AACO,SAASC,qBAAqBA,CAAC;EAAEC,QAAQ;EAAE,GAAGC,KAAAA;AAAkC,CAAC,EAAE;AACtF,EAAA,oBAAOC,GAAA,CAACP,oBAAoB,CAACQ,QAAQ,EAAA;AAACF,IAAAA,KAAK,EAAEA,KAAM;AAAAD,IAAAA,QAAA,EAAEA,QAAAA;AAAQ,GAAgC,CAAC,CAAA;AAClG,CAAA;;AAEA;AACA;AACA;AACO,SAASI,uBAAuBA,GAA8B;EACjE,OAAOC,UAAU,CAACV,oBAAoB,CAAC,CAAA;AAC3C;;;;"}
@@ -0,0 +1,150 @@
1
+ import React__default, { useEffect } from 'react';
2
+ import { a as SlideshowControls, b as Slides, c as buildSlideShowGroupId, D as DEFAULT_OPTIONS } from './34c59f5b.js';
3
+ export { S as SlideshowItem } from './34c59f5b.js';
4
+ import { m as mergeRefs } from './f0d7d6ea.js';
5
+ import { u as useTheme } from './3181f000.js';
6
+ import { n as forwardRef, b as Theme } from './6589b796.js';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ /**
10
+ * Hook that allows to control when there is a focus event within a given element, meaning
11
+ * that any element within the given target will trigger the focus in and focus out events.
12
+ * @param options - UseFocusWithinOptions
13
+ */
14
+ const useFocusWithin = ({
15
+ element,
16
+ onFocusIn,
17
+ onFocusOut
18
+ }) => {
19
+ useEffect(() => {
20
+ if (element) {
21
+ element.addEventListener('focusin', onFocusIn);
22
+ element.addEventListener('focusout', onFocusOut);
23
+ }
24
+ return () => {
25
+ if (element) {
26
+ element.removeEventListener('focusin', onFocusIn);
27
+ element.removeEventListener('focusout', onFocusOut);
28
+ }
29
+ };
30
+ }, [onFocusIn, element, onFocusOut]);
31
+ };
32
+
33
+ /**
34
+ * Component default props.
35
+ */
36
+ const DEFAULT_PROPS = DEFAULT_OPTIONS;
37
+
38
+ /**
39
+ * Slideshow component.
40
+ *
41
+ * @param props Component props.
42
+ * @param ref Component ref.
43
+ * @return React element.
44
+ */
45
+ const Slideshow = forwardRef((props, ref) => {
46
+ const defaultTheme = useTheme() || Theme.light;
47
+ const {
48
+ activeIndex,
49
+ autoPlay = DEFAULT_PROPS.autoPlay,
50
+ children,
51
+ className,
52
+ fillHeight,
53
+ groupBy = DEFAULT_OPTIONS.groupBy,
54
+ interval = DEFAULT_PROPS.interval,
55
+ onChange,
56
+ slideshowControlsProps,
57
+ theme = defaultTheme,
58
+ id,
59
+ slidesId,
60
+ slideGroupLabel,
61
+ ...forwardedProps
62
+ } = props;
63
+ // Number of slideshow items.
64
+ const itemsCount = React__default.Children.count(children);
65
+ const {
66
+ activeIndex: currentIndex,
67
+ slideshowId,
68
+ setSlideshow,
69
+ isAutoPlaying,
70
+ slideshowSlidesId,
71
+ slidesCount,
72
+ onNextClick,
73
+ onPaginationClick,
74
+ onPreviousClick,
75
+ slideshow,
76
+ stopAutoPlay,
77
+ startAutoPlay,
78
+ toggleAutoPlay,
79
+ toggleForcePause
80
+ } = SlideshowControls.useSlideshowControls({
81
+ activeIndex,
82
+ defaultActiveIndex: DEFAULT_PROPS.activeIndex,
83
+ autoPlay: Boolean(autoPlay),
84
+ itemsCount,
85
+ groupBy,
86
+ id,
87
+ interval,
88
+ onChange,
89
+ slidesId
90
+ });
91
+ useFocusWithin({
92
+ element: slideshow,
93
+ onFocusIn: stopAutoPlay,
94
+ onFocusOut: startAutoPlay
95
+ });
96
+ const showControls = slideshowControlsProps && slidesCount > 1;
97
+ return /*#__PURE__*/jsx(Slides, {
98
+ activeIndex: currentIndex,
99
+ id: slideshowId,
100
+ className: className,
101
+ theme: theme,
102
+ fillHeight: fillHeight,
103
+ groupBy: groupBy,
104
+ isAutoPlaying: isAutoPlaying,
105
+ autoPlay: autoPlay,
106
+ slidesId: slideshowSlidesId,
107
+ toggleAutoPlay: toggleAutoPlay,
108
+ ref: mergeRefs(ref, setSlideshow),
109
+ hasControls: showControls,
110
+ slideGroupLabel: slideGroupLabel,
111
+ afterSlides: slideshowControlsProps && slidesCount > 1 ? /*#__PURE__*/jsx("div", {
112
+ className: `${Slides.className}__controls`,
113
+ children: /*#__PURE__*/jsx(SlideshowControls, {
114
+ ...slideshowControlsProps,
115
+ activeIndex: currentIndex,
116
+ onPaginationClick: onPaginationClick,
117
+ onNextClick: onNextClick,
118
+ onPreviousClick: onPreviousClick,
119
+ slidesCount: slidesCount,
120
+ parentRef: slideshow,
121
+ theme: theme,
122
+ isAutoPlaying: isAutoPlaying,
123
+ nextButtonProps: {
124
+ 'aria-controls': slideshowSlidesId,
125
+ ...slideshowControlsProps.nextButtonProps
126
+ },
127
+ previousButtonProps: {
128
+ 'aria-controls': slideshowSlidesId,
129
+ ...slideshowControlsProps.previousButtonProps
130
+ },
131
+ playButtonProps: autoPlay ? {
132
+ 'aria-controls': slideshowSlidesId,
133
+ onClick: toggleForcePause,
134
+ ...slideshowControlsProps.playButtonProps
135
+ } : undefined,
136
+ paginationItemProps: index => ({
137
+ 'aria-controls': buildSlideShowGroupId(slideshowSlidesId, index),
138
+ ...slideshowControlsProps.paginationItemProps?.(index)
139
+ })
140
+ })
141
+ }) : undefined,
142
+ ...forwardedProps,
143
+ children: children
144
+ });
145
+ });
146
+ Slideshow.displayName = 'Slideshow';
147
+ Slideshow.defaultProps = DEFAULT_PROPS;
148
+
149
+ export { Slides, Slideshow, SlideshowControls };
150
+ //# sourceMappingURL=eaa8b1d8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eaa8b1d8.js","sources":["../../src/hooks/useFocusWithin.ts","../../src/components/slideshow/Slideshow.tsx"],"sourcesContent":["import { useEffect } from 'react';\n\nexport interface UseFocusWithinOptions {\n /** element to add the focus within to */\n element: HTMLElement | null;\n /** callback to be executed on focus in */\n onFocusIn: (ev: FocusEvent) => void;\n /** callback to be executed on focus out */\n onFocusOut: (ev: FocusEvent) => void;\n}\n\n/**\n * Hook that allows to control when there is a focus event within a given element, meaning\n * that any element within the given target will trigger the focus in and focus out events.\n * @param options - UseFocusWithinOptions\n */\nexport const useFocusWithin = ({ element, onFocusIn, onFocusOut }: UseFocusWithinOptions) => {\n useEffect(() => {\n if (element) {\n element.addEventListener('focusin', onFocusIn);\n\n element.addEventListener('focusout', onFocusOut);\n }\n\n return () => {\n if (element) {\n element.removeEventListener('focusin', onFocusIn);\n\n element.removeEventListener('focusout', onFocusOut);\n }\n };\n }, [onFocusIn, element, onFocusOut]);\n};\n","import React from 'react';\n\nimport { SlideshowControls, SlideshowControlsProps, Theme, Slides, SlidesProps } from '@lumx/react';\nimport { DEFAULT_OPTIONS } from '@lumx/react/hooks/useSlideshowControls';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { useFocusWithin } from '@lumx/react/hooks/useFocusWithin';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { buildSlideShowGroupId } from './SlideshowItemGroup';\n\n/**\n * Defines the props of the component.\n */\nexport interface SlideshowProps\n extends GenericProps,\n Pick<SlidesProps, 'autoPlay' | 'slidesId' | 'id' | 'theme' | 'fillHeight' | 'groupBy' | 'slideGroupLabel'> {\n /** current slide active */\n activeIndex?: SlidesProps['activeIndex'];\n /** Interval between each slide when automatic rotation is enabled. */\n interval?: number;\n /** Props to pass to the slideshow controls (minus those already set by the Slideshow props). */\n slideshowControlsProps?: Pick<\n SlideshowControlsProps,\n 'nextButtonProps' | 'previousButtonProps' | 'paginationItemProps'\n > &\n Omit<\n SlideshowControlsProps,\n | 'activeIndex'\n | 'onPaginationClick'\n | 'onNextClick'\n | 'onPreviousClick'\n | 'slidesCount'\n | 'parentRef'\n | 'theme'\n >;\n /** Callback when slide changes */\n onChange?(index: number): void;\n /** Children */\n children?: React.ReactNode;\n}\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<SlideshowProps> = DEFAULT_OPTIONS;\n\n/**\n * Slideshow component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Slideshow = forwardRef<SlideshowProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n activeIndex,\n autoPlay = DEFAULT_PROPS.autoPlay,\n children,\n className,\n fillHeight,\n groupBy = DEFAULT_OPTIONS.groupBy,\n interval = DEFAULT_PROPS.interval,\n onChange,\n slideshowControlsProps,\n theme = defaultTheme,\n id,\n slidesId,\n slideGroupLabel,\n ...forwardedProps\n } = props;\n // Number of slideshow items.\n const itemsCount = React.Children.count(children);\n\n const {\n activeIndex: currentIndex,\n slideshowId,\n setSlideshow,\n isAutoPlaying,\n slideshowSlidesId,\n slidesCount,\n onNextClick,\n onPaginationClick,\n onPreviousClick,\n slideshow,\n stopAutoPlay,\n startAutoPlay,\n toggleAutoPlay,\n toggleForcePause,\n } = SlideshowControls.useSlideshowControls({\n activeIndex,\n defaultActiveIndex: DEFAULT_PROPS.activeIndex as number,\n autoPlay: Boolean(autoPlay),\n itemsCount,\n groupBy,\n id,\n interval,\n onChange,\n slidesId,\n });\n\n useFocusWithin({\n element: slideshow,\n onFocusIn: stopAutoPlay,\n onFocusOut: startAutoPlay,\n });\n\n const showControls = slideshowControlsProps && slidesCount > 1;\n\n return (\n <Slides\n activeIndex={currentIndex}\n id={slideshowId}\n className={className}\n theme={theme}\n fillHeight={fillHeight}\n groupBy={groupBy}\n isAutoPlaying={isAutoPlaying}\n autoPlay={autoPlay}\n slidesId={slideshowSlidesId}\n toggleAutoPlay={toggleAutoPlay}\n ref={mergeRefs(ref, setSlideshow)}\n hasControls={showControls}\n slideGroupLabel={slideGroupLabel}\n afterSlides={\n slideshowControlsProps && slidesCount > 1 ? (\n <div className={`${Slides.className}__controls`}>\n <SlideshowControls\n {...slideshowControlsProps}\n activeIndex={currentIndex}\n onPaginationClick={onPaginationClick}\n onNextClick={onNextClick}\n onPreviousClick={onPreviousClick}\n slidesCount={slidesCount}\n parentRef={slideshow}\n theme={theme}\n isAutoPlaying={isAutoPlaying}\n nextButtonProps={{\n 'aria-controls': slideshowSlidesId,\n ...slideshowControlsProps.nextButtonProps,\n }}\n previousButtonProps={{\n 'aria-controls': slideshowSlidesId,\n ...slideshowControlsProps.previousButtonProps,\n }}\n playButtonProps={\n autoPlay\n ? {\n 'aria-controls': slideshowSlidesId,\n onClick: toggleForcePause,\n ...slideshowControlsProps.playButtonProps,\n }\n : undefined\n }\n paginationItemProps={(index) => ({\n 'aria-controls': buildSlideShowGroupId(slideshowSlidesId, index),\n ...slideshowControlsProps.paginationItemProps?.(index),\n })}\n />\n </div>\n ) : undefined\n }\n {...forwardedProps}\n >\n {children}\n </Slides>\n );\n});\n\nSlideshow.displayName = 'Slideshow';\nSlideshow.defaultProps = DEFAULT_PROPS;\n"],"names":["useFocusWithin","element","onFocusIn","onFocusOut","useEffect","addEventListener","removeEventListener","DEFAULT_PROPS","DEFAULT_OPTIONS","Slideshow","forwardRef","props","ref","defaultTheme","useTheme","Theme","light","activeIndex","autoPlay","children","className","fillHeight","groupBy","interval","onChange","slideshowControlsProps","theme","id","slidesId","slideGroupLabel","forwardedProps","itemsCount","React","Children","count","currentIndex","slideshowId","setSlideshow","isAutoPlaying","slideshowSlidesId","slidesCount","onNextClick","onPaginationClick","onPreviousClick","slideshow","stopAutoPlay","startAutoPlay","toggleAutoPlay","toggleForcePause","SlideshowControls","useSlideshowControls","defaultActiveIndex","Boolean","showControls","_jsx","Slides","mergeRefs","hasControls","afterSlides","parentRef","nextButtonProps","previousButtonProps","playButtonProps","onClick","undefined","paginationItemProps","index","buildSlideShowGroupId","displayName","defaultProps"],"mappings":";;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,GAAGA,CAAC;EAAEC,OAAO;EAAEC,SAAS;AA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AC,CAAA;AAEjB,CAAC,EAAC;AAEFV,SAAS,CAAC2D,WAAW,GAAG,WAAW,CAAA;AACnC3D,SAAS,CAAC4D,YAAY,GAAG9D,aAAa;;;;"}
@@ -0,0 +1,4 @@
1
+ const mdiClose = 'M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z';
2
+
3
+ export { mdiClose as m };
4
+ //# sourceMappingURL=eaf6c45a.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eaf6c45a.js","sources":["../../../lumx-icons/dist/esm/close.js"],"sourcesContent":["export const mdiClose = 'M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z';"],"names":["mdiClose"],"mappings":"AAAO,MAAMA,QAAQ,GAAG;;;;"}