@lumx/react 3.10.1-alpha.0 → 3.10.1-alpha.2

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 (329) hide show
  1. package/_internal/17c3ea1d.js +137 -0
  2. package/_internal/17c3ea1d.js.map +1 -0
  3. package/_internal/1da25128.js +411 -0
  4. package/_internal/1da25128.js.map +1 -0
  5. package/_internal/230173a8.js +13 -0
  6. package/_internal/230173a8.js.map +1 -0
  7. package/_internal/23bdba2d.js +71 -0
  8. package/_internal/23bdba2d.js.map +1 -0
  9. package/_internal/26926e5c.d.ts +36 -0
  10. package/_internal/2a3d237c.js +12 -0
  11. package/_internal/2a3d237c.js.map +1 -0
  12. package/_internal/2c5dbb03.js +26 -0
  13. package/_internal/2c5dbb03.js.map +1 -0
  14. package/_internal/2e2abe51.js +2154 -0
  15. package/_internal/2e2abe51.js.map +1 -0
  16. package/_internal/31490c59.d.ts +167 -0
  17. package/_internal/3181f000.js +14 -0
  18. package/_internal/3181f000.js.map +1 -0
  19. package/_internal/35f100be.d.ts +104 -0
  20. package/_internal/36bd7352.js +219 -0
  21. package/_internal/36bd7352.js.map +1 -0
  22. package/_internal/3a1facc0.js +18 -0
  23. package/_internal/3a1facc0.js.map +1 -0
  24. package/_internal/4c20d932.js +89 -0
  25. package/_internal/4c20d932.js.map +1 -0
  26. package/_internal/4c28d012.js +305 -0
  27. package/_internal/4c28d012.js.map +1 -0
  28. package/_internal/4cd0bf32.js +160 -0
  29. package/_internal/4cd0bf32.js.map +1 -0
  30. package/_internal/4daccdd5.js +25 -0
  31. package/_internal/4daccdd5.js.map +1 -0
  32. package/_internal/524b1d04.js +64 -0
  33. package/_internal/524b1d04.js.map +1 -0
  34. package/_internal/53c94227.js +123 -0
  35. package/_internal/53c94227.js.map +1 -0
  36. package/_internal/54d9ded5.js +418 -0
  37. package/_internal/54d9ded5.js.map +1 -0
  38. package/_internal/56aec41b.js +652 -0
  39. package/_internal/56aec41b.js.map +1 -0
  40. package/_internal/5720caf5.js +124 -0
  41. package/_internal/5720caf5.js.map +1 -0
  42. package/_internal/646f0db6.js +113 -0
  43. package/_internal/646f0db6.js.map +1 -0
  44. package/_internal/6cc8dca8.d.ts +22 -0
  45. package/_internal/7f022f8c.d.ts +34 -0
  46. package/_internal/{index.d.ts → 8d67e1e3.d.ts} +1 -1
  47. package/_internal/b8f2948d.js +691 -0
  48. package/_internal/b8f2948d.js.map +1 -0
  49. package/_internal/bc28d510.js +784 -0
  50. package/_internal/bc28d510.js.map +1 -0
  51. package/_internal/c68d24e4.js +145 -0
  52. package/_internal/c68d24e4.js.map +1 -0
  53. package/_internal/c6c99f76.js +105 -0
  54. package/_internal/c6c99f76.js.map +1 -0
  55. package/_internal/cae46566.js +65 -0
  56. package/_internal/cae46566.js.map +1 -0
  57. package/_internal/components/alert-dialog/index.ts-623b1ed3.d.ts +37 -0
  58. package/_internal/components/alert-dialog/index.ts-f83bd6ef.js +148 -0
  59. package/_internal/components/alert-dialog/index.ts-f83bd6ef.js.map +1 -0
  60. package/_internal/components/autocomplete/index.ts-3f8f125c.js +264 -0
  61. package/_internal/components/autocomplete/index.ts-3f8f125c.js.map +1 -0
  62. package/_internal/components/autocomplete/index.ts-8d6b123f.d.ts +201 -0
  63. package/_internal/components/avatar/index.ts-93ee0ea9.js +89 -0
  64. package/_internal/components/avatar/index.ts-93ee0ea9.js.map +1 -0
  65. package/_internal/components/avatar/index.ts-f92852b4.d.ts +43 -0
  66. package/_internal/components/badge/index.ts-2d7700ef.d.ts +30 -0
  67. package/_internal/components/badge/index.ts-6753d67f.js +88 -0
  68. package/_internal/components/badge/index.ts-6753d67f.js.map +1 -0
  69. package/_internal/components/button/index.ts-031307ce.js +51 -0
  70. package/_internal/components/button/index.ts-031307ce.js.map +1 -0
  71. package/_internal/components/button/index.ts-b29e26a4.d.ts +22 -0
  72. package/_internal/components/checkbox/index.ts-a33166d7.js +127 -0
  73. package/_internal/components/checkbox/index.ts-a33166d7.js.map +1 -0
  74. package/_internal/components/checkbox/index.ts-f82358ff.d.ts +38 -0
  75. package/_internal/components/chip/index.ts-4a91f1a7.d.ts +68 -0
  76. package/_internal/components/chip/index.ts-a2b5b771.js +110 -0
  77. package/_internal/components/chip/index.ts-a2b5b771.js.map +1 -0
  78. package/_internal/components/comment-block/index.ts-58fa051a.js +121 -0
  79. package/_internal/components/comment-block/index.ts-58fa051a.js.map +1 -0
  80. package/_internal/components/comment-block/index.ts-8cfa5af0.d.ts +67 -0
  81. package/_internal/components/date-picker/index.ts-145262d5.js +2 -0
  82. package/_internal/components/date-picker/index.ts-145262d5.js.map +1 -0
  83. package/_internal/components/date-picker/index.ts-70a34fa7.d.ts +95 -0
  84. package/_internal/components/dialog/index.ts-ea044db2.js +224 -0
  85. package/_internal/components/dialog/index.ts-ea044db2.js.map +1 -0
  86. package/_internal/components/dialog/index.ts-eca28654.d.ts +55 -0
  87. package/_internal/components/divider/index.ts-4a56db75.js +55 -0
  88. package/_internal/components/divider/index.ts-4a56db75.js.map +1 -0
  89. package/_internal/components/divider/index.ts-b011d8ca.d.ts +18 -0
  90. package/_internal/components/drag-handle/index.ts-0aebf92f.js +54 -0
  91. package/_internal/components/drag-handle/index.ts-0aebf92f.js.map +1 -0
  92. package/_internal/components/drag-handle/index.ts-3ab31dd1.d.ts +18 -0
  93. package/_internal/components/dropdown/index.ts-2a17db51.js +154 -0
  94. package/_internal/components/dropdown/index.ts-2a17db51.js.map +1 -0
  95. package/_internal/components/dropdown/index.ts-b648a15c.d.ts +87 -0
  96. package/_internal/components/expansion-panel/index.ts-69f09f5b.d.ts +38 -0
  97. package/_internal/components/expansion-panel/index.ts-fae3762e.js +143 -0
  98. package/_internal/components/expansion-panel/index.ts-fae3762e.js.map +1 -0
  99. package/_internal/components/flag/index.ts-8dcd685b.js +56 -0
  100. package/_internal/components/flag/index.ts-8dcd685b.js.map +1 -0
  101. package/_internal/components/flag/index.ts-fda89adb.d.ts +23 -0
  102. package/_internal/components/flex-box/index.ts-87f2b58d.d.ts +43 -0
  103. package/_internal/components/flex-box/index.ts-c216e957.js +60 -0
  104. package/_internal/components/flex-box/index.ts-c216e957.js.map +1 -0
  105. package/_internal/components/generic-block/index.ts-999a62a4.js +115 -0
  106. package/_internal/components/generic-block/index.ts-999a62a4.js.map +1 -0
  107. package/_internal/components/generic-block/index.ts-cd3b0e21.d.ts +106 -0
  108. package/_internal/components/grid/index.ts-67e0694f.d.ts +50 -0
  109. package/_internal/components/grid/index.ts-fdf1b306.js +113 -0
  110. package/_internal/components/grid/index.ts-fdf1b306.js.map +1 -0
  111. package/_internal/components/grid-column/index.ts-97c61cbe.js +64 -0
  112. package/_internal/components/grid-column/index.ts-97c61cbe.js.map +1 -0
  113. package/_internal/components/grid-column/index.ts-c89e1c18.d.ts +31 -0
  114. package/_internal/components/heading/index.ts-0179e9a9.js +112 -0
  115. package/_internal/components/heading/index.ts-0179e9a9.js.map +1 -0
  116. package/_internal/components/heading/index.ts-587579e8.d.ts +37 -0
  117. package/_internal/components/icon/index.ts-740ca1de.js +2 -0
  118. package/_internal/components/icon/index.ts-740ca1de.js.map +1 -0
  119. package/_internal/components/icon/index.ts-b3fa5e15.d.ts +34 -0
  120. package/_internal/components/image-block/index.ts-36b3828f.d.ts +49 -0
  121. package/_internal/components/image-block/index.ts-ef5e2e7d.js +111 -0
  122. package/_internal/components/image-block/index.ts-ef5e2e7d.js.map +1 -0
  123. package/_internal/components/image-lightbox/index.ts-137f85a8.js +765 -0
  124. package/_internal/components/image-lightbox/index.ts-137f85a8.js.map +1 -0
  125. package/_internal/components/image-lightbox/index.ts-2cb92d18.d.ts +75 -0
  126. package/_internal/components/inline-list/index.ts-033dd358.js +76 -0
  127. package/_internal/components/inline-list/index.ts-033dd358.js.map +1 -0
  128. package/_internal/components/inline-list/index.ts-e1c8a3ff.d.ts +34 -0
  129. package/_internal/components/input-helper/index.ts-32a9ca90.d.ts +22 -0
  130. package/_internal/components/input-helper/index.ts-ab3a1ef5.js +75 -0
  131. package/_internal/components/input-helper/index.ts-ab3a1ef5.js.map +1 -0
  132. package/_internal/components/input-label/index.ts-86f2ea41.d.ts +24 -0
  133. package/_internal/components/input-label/index.ts-d6ca5569.js +60 -0
  134. package/_internal/components/input-label/index.ts-d6ca5569.js.map +1 -0
  135. package/_internal/components/lightbox/index.ts-5370e8e6.d.ts +36 -0
  136. package/_internal/components/lightbox/index.ts-7a16cdc7.js +149 -0
  137. package/_internal/components/lightbox/index.ts-7a16cdc7.js.map +1 -0
  138. package/_internal/components/link/index.ts-26435006.d.ts +37 -0
  139. package/_internal/components/link/index.ts-d04f4e53.js +120 -0
  140. package/_internal/components/link/index.ts-d04f4e53.js.map +1 -0
  141. package/_internal/components/link-preview/index.ts-e560a274.d.ts +36 -0
  142. package/_internal/components/link-preview/index.ts-fee89f66.js +109 -0
  143. package/_internal/components/link-preview/index.ts-fee89f66.js.map +1 -0
  144. package/_internal/components/list/index.ts-ab57902e.d.ts +118 -0
  145. package/_internal/components/list/index.ts-f3101625.js +86 -0
  146. package/_internal/components/list/index.ts-f3101625.js.map +1 -0
  147. package/_internal/components/message/index.ts-041cf0cb.js +97 -0
  148. package/_internal/components/message/index.ts-041cf0cb.js.map +1 -0
  149. package/_internal/components/message/index.ts-2d38e0ea.d.ts +37 -0
  150. package/_internal/components/mosaic/index.ts-232d5aed.d.ts +23 -0
  151. package/_internal/components/mosaic/index.ts-d2128cd3.js +94 -0
  152. package/_internal/components/mosaic/index.ts-d2128cd3.js.map +1 -0
  153. package/_internal/components/navigation/index.ts-6d8bea53.d.ts +58 -0
  154. package/_internal/components/navigation/index.ts-e8dc0a7f.js +222 -0
  155. package/_internal/components/navigation/index.ts-e8dc0a7f.js.map +1 -0
  156. package/_internal/components/notification/index.ts-235fd340.js +140 -0
  157. package/_internal/components/notification/index.ts-235fd340.js.map +1 -0
  158. package/_internal/components/notification/index.ts-bb3f03f6.d.ts +34 -0
  159. package/_internal/components/popover/index.ts-2f17a9b6.js +3 -0
  160. package/_internal/components/popover/index.ts-2f17a9b6.js.map +1 -0
  161. package/_internal/components/popover/index.ts-e3b4ff19.d.ts +66 -0
  162. package/_internal/components/post-block/index.ts-0acb9bb4.js +101 -0
  163. package/_internal/components/post-block/index.ts-0acb9bb4.js.map +1 -0
  164. package/_internal/components/post-block/index.ts-9b8ff90b.d.ts +41 -0
  165. package/_internal/components/progress/index.ts-2a713859.js +189 -0
  166. package/_internal/components/progress/index.ts-2a713859.js.map +1 -0
  167. package/_internal/components/progress/index.ts-dfdfa5fb.d.ts +60 -0
  168. package/_internal/components/progress-tracker/index.ts-2649f756.js +312 -0
  169. package/_internal/components/progress-tracker/index.ts-2649f756.js.map +1 -0
  170. package/_internal/components/progress-tracker/index.ts-95320f32.d.ts +101 -0
  171. package/_internal/components/radio-button/index.ts-5eaab4cf.d.ts +54 -0
  172. package/_internal/components/radio-button/index.ts-b4dfb2a0.js +150 -0
  173. package/_internal/components/radio-button/index.ts-b4dfb2a0.js.map +1 -0
  174. package/_internal/components/select/index.ts-a65e3507.d.ts +91 -0
  175. package/_internal/components/select/index.ts-e8fad28b.js +257 -0
  176. package/_internal/components/select/index.ts-e8fad28b.js.map +1 -0
  177. package/_internal/components/side-navigation/index.ts-3f5f3785.d.ts +60 -0
  178. package/_internal/components/side-navigation/index.ts-c9a5fc3e.js +184 -0
  179. package/_internal/components/side-navigation/index.ts-c9a5fc3e.js.map +1 -0
  180. package/_internal/components/skeleton/index.ts-a7daefac.d.ts +75 -0
  181. package/_internal/components/skeleton/index.ts-ffc995af.js +179 -0
  182. package/_internal/components/skeleton/index.ts-ffc995af.js.map +1 -0
  183. package/_internal/components/slider/index.ts-24a0d598.d.ts +52 -0
  184. package/_internal/components/slider/index.ts-72aadf4c.js +308 -0
  185. package/_internal/components/slider/index.ts-72aadf4c.js.map +1 -0
  186. package/_internal/components/slideshow/index.ts-c99f2892.js +151 -0
  187. package/_internal/components/slideshow/index.ts-c99f2892.js.map +1 -0
  188. package/_internal/components/slideshow/index.ts-e49462c6.d.ts +25 -0
  189. package/_internal/components/switch/index.ts-207ba52b.d.ts +34 -0
  190. package/_internal/components/switch/index.ts-542e6eaf.js +115 -0
  191. package/_internal/components/switch/index.ts-542e6eaf.js.map +1 -0
  192. package/_internal/components/table/index.ts-905ce390.js +310 -0
  193. package/_internal/components/table/index.ts-905ce390.js.map +1 -0
  194. package/_internal/components/table/index.ts-c4f39b2d.d.ts +108 -0
  195. package/_internal/components/tabs/index.ts-713119f4.js +289 -0
  196. package/_internal/components/tabs/index.ts-713119f4.js.map +1 -0
  197. package/_internal/components/tabs/index.ts-dbfc48d9.d.ts +106 -0
  198. package/_internal/components/text/index.ts-6afbe8cd.js +2 -0
  199. package/_internal/components/text/index.ts-6afbe8cd.js.map +1 -0
  200. package/_internal/components/text/index.ts-8a812048.d.ts +53 -0
  201. package/_internal/components/text-field/index.ts-92e6b3b3.d.ts +77 -0
  202. package/_internal/components/text-field/index.ts-c3be8563.js +341 -0
  203. package/_internal/components/text-field/index.ts-c3be8563.js.map +1 -0
  204. package/_internal/components/thumbnail/index.ts-16d7b403.js +40 -0
  205. package/_internal/components/thumbnail/index.ts-16d7b403.js.map +1 -0
  206. package/_internal/components/thumbnail/index.ts-1b6c0b48.d.ts +8 -0
  207. package/_internal/components/toolbar/index.ts-813b902e.js +63 -0
  208. package/_internal/components/toolbar/index.ts-813b902e.js.map +1 -0
  209. package/_internal/components/toolbar/index.ts-9f5129d1.d.ts +24 -0
  210. package/_internal/components/tooltip/index.ts-905c847c.js +322 -0
  211. package/_internal/components/tooltip/index.ts-905c847c.js.map +1 -0
  212. package/_internal/components/tooltip/index.ts-c6931e9e.d.ts +35 -0
  213. package/_internal/components/uploader/index.ts-31f21c2a.js +132 -0
  214. package/_internal/components/uploader/index.ts-31f21c2a.js.map +1 -0
  215. package/_internal/components/uploader/index.ts-c3ccba98.d.ts +51 -0
  216. package/_internal/components/user-block/index.ts-18c58e19.d.ts +50 -0
  217. package/_internal/components/user-block/index.ts-d43e5f3c.js +136 -0
  218. package/_internal/components/user-block/index.ts-d43e5f3c.js.map +1 -0
  219. package/_internal/dc3e28c8.d.ts +38 -0
  220. package/_internal/f39a1ba4.js +73 -0
  221. package/_internal/f39a1ba4.js.map +1 -0
  222. package/_internal/f3e77e3e.js +22 -0
  223. package/_internal/f3e77e3e.js.map +1 -0
  224. package/_internal/f502ab30.js +78 -0
  225. package/_internal/f502ab30.js.map +1 -0
  226. package/_internal/f52adbae.js +36 -0
  227. package/_internal/f52adbae.js.map +1 -0
  228. package/_internal/f57e1239.js +205 -0
  229. package/_internal/f57e1239.js.map +1 -0
  230. package/_internal/f5ff1aa4.d.ts +47 -0
  231. package/_internal/fb975afe.js +52 -0
  232. package/_internal/fb975afe.js.map +1 -0
  233. package/index.d.ts +66 -3023
  234. package/index.js +64 -14531
  235. package/index.js.map +1 -1
  236. package/package.json +3 -3
  237. package/src/components/alert-dialog/AlertDialog.tsx +3 -4
  238. package/src/components/autocomplete/Autocomplete.tsx +4 -3
  239. package/src/components/autocomplete/AutocompleteMultiple.tsx +7 -6
  240. package/src/components/avatar/Avatar.tsx +4 -3
  241. package/src/components/badge/Badge.tsx +7 -4
  242. package/src/components/badge/BadgeWrapper.tsx +7 -4
  243. package/src/components/button/Button.tsx +5 -3
  244. package/src/components/button/ButtonGroup.tsx +4 -3
  245. package/src/components/button/ButtonRoot.tsx +4 -3
  246. package/src/components/button/IconButton.tsx +3 -3
  247. package/src/components/checkbox/Checkbox.tsx +4 -3
  248. package/src/components/chip/Chip.tsx +8 -9
  249. package/src/components/chip/ChipGroup.tsx +5 -4
  250. package/src/components/comment-block/CommentBlock.tsx +4 -4
  251. package/src/components/date-picker/DatePicker.tsx +5 -3
  252. package/src/components/date-picker/DatePickerControlled.tsx +6 -3
  253. package/src/components/date-picker/DatePickerField.tsx +4 -3
  254. package/src/components/dialog/Dialog.tsx +4 -3
  255. package/src/components/divider/Divider.tsx +4 -3
  256. package/src/components/drag-handle/DragHandle.test.tsx +1 -1
  257. package/src/components/drag-handle/DragHandle.tsx +4 -3
  258. package/src/components/dropdown/Dropdown.tsx +4 -3
  259. package/src/components/expansion-panel/ExpansionPanel.tsx +4 -3
  260. package/src/components/flag/Flag.tsx +5 -3
  261. package/src/components/flex-box/FlexBox.tsx +8 -5
  262. package/src/components/generic-block/GenericBlock.tsx +4 -1
  263. package/src/components/grid/Grid.tsx +4 -3
  264. package/src/components/grid/GridItem.tsx +4 -3
  265. package/src/components/grid-column/GridColumn.tsx +5 -5
  266. package/src/components/heading/Heading.tsx +8 -4
  267. package/src/components/icon/Icon.tsx +5 -4
  268. package/src/components/image-block/ImageBlock.tsx +4 -3
  269. package/src/components/image-lightbox/ImageLightbox.tsx +4 -3
  270. package/src/components/inline-list/InlineList.tsx +4 -3
  271. package/src/components/input-helper/InputHelper.tsx +7 -4
  272. package/src/components/input-label/InputLabel.tsx +7 -4
  273. package/src/components/lightbox/Lightbox.tsx +4 -3
  274. package/src/components/link/Link.tsx +4 -3
  275. package/src/components/link-preview/LinkPreview.tsx +4 -3
  276. package/src/components/list/List.tsx +7 -5
  277. package/src/components/list/ListDivider.tsx +4 -3
  278. package/src/components/list/ListItem.tsx +4 -3
  279. package/src/components/list/ListSubheader.tsx +4 -3
  280. package/src/components/message/Message.tsx +7 -4
  281. package/src/components/mosaic/Mosaic.tsx +7 -5
  282. package/src/components/navigation/NavigationItem.tsx +1 -1
  283. package/src/components/navigation/NavigationSection.test.tsx +19 -6
  284. package/src/components/notification/Notification.tsx +4 -6
  285. package/src/components/popover/Popover.tsx +3 -2
  286. package/src/components/popover-dialog/PopoverDialog.tsx +5 -3
  287. package/src/components/post-block/PostBlock.tsx +4 -6
  288. package/src/components/progress/Progress.tsx +5 -4
  289. package/src/components/progress/ProgressCircular.tsx +4 -4
  290. package/src/components/progress/ProgressLinear.tsx +4 -4
  291. package/src/components/progress-tracker/ProgressTracker.tsx +5 -3
  292. package/src/components/progress-tracker/ProgressTrackerStep.tsx +5 -5
  293. package/src/components/progress-tracker/ProgressTrackerStepPanel.tsx +24 -24
  294. package/src/components/radio-button/RadioButton.tsx +4 -4
  295. package/src/components/radio-button/RadioGroup.tsx +4 -3
  296. package/src/components/select/Select.tsx +3 -5
  297. package/src/components/select/SelectMultiple.tsx +3 -5
  298. package/src/components/side-navigation/SideNavigation.tsx +4 -4
  299. package/src/components/side-navigation/SideNavigationItem.tsx +4 -5
  300. package/src/components/skeleton/SkeletonCircle.tsx +5 -3
  301. package/src/components/skeleton/SkeletonRectangle.tsx +5 -3
  302. package/src/components/skeleton/SkeletonTypography.tsx +5 -3
  303. package/src/components/slider/Slider.tsx +4 -5
  304. package/src/components/slideshow/Slides.tsx +6 -4
  305. package/src/components/slideshow/Slideshow.tsx +5 -3
  306. package/src/components/slideshow/SlideshowControls.tsx +4 -3
  307. package/src/components/slideshow/SlideshowItem.tsx +4 -3
  308. package/src/components/slideshow/SlideshowItemGroup.tsx +5 -4
  309. package/src/components/switch/Switch.tsx +4 -5
  310. package/src/components/table/Table.tsx +4 -4
  311. package/src/components/table/TableBody.tsx +4 -3
  312. package/src/components/table/TableCell.tsx +5 -5
  313. package/src/components/table/TableHeader.tsx +4 -3
  314. package/src/components/table/TableRow.tsx +4 -3
  315. package/src/components/tabs/Tab.tsx +4 -3
  316. package/src/components/tabs/TabList.tsx +8 -5
  317. package/src/components/tabs/TabPanel.tsx +7 -5
  318. package/src/components/text/Text.tsx +6 -4
  319. package/src/components/text-field/TextField.tsx +4 -3
  320. package/src/components/thumbnail/Thumbnail.tsx +5 -5
  321. package/src/components/toolbar/Toolbar.tsx +4 -3
  322. package/src/components/tooltip/Tooltip.tsx +4 -3
  323. package/src/components/uploader/Uploader.tsx +5 -3
  324. package/src/components/user-block/UserBlock.tsx +6 -4
  325. package/src/testing/utils/commonTestsSuiteRTL.tsx +2 -1
  326. package/src/utils/react/forwardRef.ts +10 -0
  327. package/src/utils/react/forwardRefPolymorphic.ts +10 -0
  328. package/utils/index.d.ts +1 -1
  329. package/src/utils/forwardRefPolymorphic.ts +0 -9
@@ -0,0 +1,137 @@
1
+ import { i as forwardRef, j as _objectWithoutProperties, E as Emphasis, T as Theme, C as ColorPalette, k as _objectSpread2, g as classNames, _ as _extends, l as CSS_PREFIX } from './1da25128.js';
2
+ import React__default from 'react';
3
+ import isEmpty from 'lodash/isEmpty';
4
+ import 'lodash/kebabCase';
5
+ import { h as handleBasicClasses } from './f57e1239.js';
6
+ import { r as renderLink } from './2c5dbb03.js';
7
+
8
+ const _excluded = ["aria-label", "children", "className", "color", "disabled", "emphasis", "hasBackground", "href", "isDisabled", "isSelected", "isActive", "isFocused", "isHovered", "linkAs", "name", "size", "target", "theme", "variant", "type", "fullWidth"];
9
+
10
+ /**
11
+ * Button size definition.
12
+ */
13
+
14
+ /**
15
+ * Component display name.
16
+ */
17
+ const COMPONENT_NAME = 'ButtonRoot';
18
+ const BUTTON_WRAPPER_CLASSNAME = `${CSS_PREFIX}-button-wrapper`;
19
+ const BUTTON_CLASSNAME = `${CSS_PREFIX}-button`;
20
+
21
+ /**
22
+ * Render a button wrapper with the ButtonRoot inside.
23
+ *
24
+ * @param props Component props.
25
+ * @return React element.
26
+ */
27
+ const renderButtonWrapper = props => {
28
+ const {
29
+ color,
30
+ emphasis,
31
+ variant,
32
+ fullWidth
33
+ } = props;
34
+ const adaptedColor = emphasis === Emphasis.low && (color === ColorPalette.light ? ColorPalette.dark : ColorPalette.light);
35
+ const wrapperClassName = classNames(handleBasicClasses({
36
+ color: adaptedColor,
37
+ prefix: BUTTON_WRAPPER_CLASSNAME,
38
+ variant,
39
+ fullWidth
40
+ }));
41
+ const buttonProps = _objectSpread2(_objectSpread2({}, props), {}, {
42
+ hasBackground: false
43
+ });
44
+ return /*#__PURE__*/React__default.createElement("div", {
45
+ className: wrapperClassName
46
+ }, /*#__PURE__*/React__default.createElement(ButtonRoot, buttonProps));
47
+ };
48
+
49
+ /**
50
+ * ButtonRoot component.
51
+ *
52
+ * @param props Component props.
53
+ * @param ref Component ref.
54
+ * @return React element.
55
+ */
56
+ const ButtonRoot = forwardRef((props, ref) => {
57
+ const {
58
+ 'aria-label': ariaLabel,
59
+ children,
60
+ className,
61
+ color,
62
+ disabled,
63
+ emphasis,
64
+ hasBackground,
65
+ href,
66
+ isDisabled = disabled,
67
+ isSelected,
68
+ isActive,
69
+ isFocused,
70
+ isHovered,
71
+ linkAs,
72
+ name,
73
+ size,
74
+ target,
75
+ theme,
76
+ variant,
77
+ type = 'button',
78
+ fullWidth
79
+ } = props,
80
+ forwardedProps = _objectWithoutProperties(props, _excluded);
81
+ const adaptedColor = color || emphasis !== Emphasis.high && theme === Theme.dark && ColorPalette.light || emphasis === Emphasis.high && ColorPalette.primary || ColorPalette.dark;
82
+ if (hasBackground) {
83
+ return renderButtonWrapper(_objectSpread2(_objectSpread2({}, props), {}, {
84
+ ref,
85
+ variant,
86
+ color: adaptedColor
87
+ }));
88
+ }
89
+ const buttonClassName = classNames(className, handleBasicClasses({
90
+ color: adaptedColor,
91
+ emphasis,
92
+ isSelected,
93
+ isDisabled,
94
+ isActive,
95
+ isFocused,
96
+ isHovered,
97
+ prefix: BUTTON_CLASSNAME,
98
+ size,
99
+ theme: emphasis === Emphasis.high && theme,
100
+ variant,
101
+ fullWidth
102
+ }));
103
+
104
+ /**
105
+ * If the linkAs prop is used, we use the linkAs component instead of a <button>.
106
+ * If there is an href attribute, we display an <a> instead of a <button>.
107
+ *
108
+ * However, in any case, if the component is disabled, we returned a <button> since disabled is not compatible with <a>.
109
+ */
110
+ if ((linkAs || !isEmpty(props.href)) && !isDisabled) {
111
+ return renderLink(_objectSpread2(_objectSpread2({
112
+ linkAs
113
+ }, forwardedProps), {}, {
114
+ 'aria-label': ariaLabel,
115
+ href,
116
+ target,
117
+ className: buttonClassName,
118
+ ref: ref
119
+ }), children);
120
+ }
121
+ return /*#__PURE__*/React__default.createElement("button", _extends({}, forwardedProps, {
122
+ disabled: isDisabled,
123
+ "aria-disabled": isDisabled,
124
+ "aria-label": ariaLabel,
125
+ ref: ref,
126
+ className: buttonClassName,
127
+ name: name,
128
+ type:
129
+ // eslint-disable-next-line react/button-has-type
130
+ type
131
+ }), children);
132
+ });
133
+ ButtonRoot.displayName = COMPONENT_NAME;
134
+ ButtonRoot.defaultProps = {};
135
+
136
+ export { ButtonRoot as B };
137
+ //# sourceMappingURL=17c3ea1d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"17c3ea1d.js","sources":["../../src/components/button/ButtonRoot.tsx"],"sourcesContent":["import React, { AriaAttributes, ButtonHTMLAttributes, DetailedHTMLProps, RefObject } from 'react';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport classNames from 'classnames';\n\nimport { ColorPalette, Emphasis, Size, Theme } from '@lumx/react';\nimport { CSS_PREFIX } from '@lumx/react/constants';\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport { handleBasicClasses } from '@lumx/react/utils/className';\nimport { renderLink } from '@lumx/react/utils/renderLink';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\ntype HTMLButtonProps = DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;\n\n/**\n * Button size definition.\n */\nexport type ButtonSize = Extract<Size, 's' | 'm'>;\n\nexport interface BaseButtonProps\n extends GenericProps,\n Pick<AriaAttributes, 'aria-expanded' | 'aria-haspopup' | 'aria-pressed' | 'aria-label'>,\n HasTheme {\n /** Color variant. */\n color?: ColorPalette;\n /** Emphasis variant. */\n emphasis?: Emphasis;\n /** Whether or not the button has a background color in low emphasis. */\n hasBackground?: boolean;\n /** Native anchor href property. It determines whether the Button will be a <button> or an <a>. */\n href?: string;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is selected or not (unsupported in `high` emphasis). */\n isSelected?: boolean;\n /** Native button name property. */\n name?: string;\n /** Size variant. */\n size?: ButtonSize;\n /** Native anchor target property. */\n target?: '_self' | '_blank' | '_parent' | '_top';\n /** Native button type. */\n type?: HTMLButtonProps['type'];\n /** Custom react component for the link (can be used to inject react router Link). */\n linkAs?: 'a' | any;\n}\n\nexport interface ButtonRootProps extends BaseButtonProps {\n variant: 'button' | 'icon';\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'ButtonRoot';\n\nexport const BUTTON_WRAPPER_CLASSNAME = `${CSS_PREFIX}-button-wrapper`;\nexport const BUTTON_CLASSNAME = `${CSS_PREFIX}-button`;\n\n/**\n * Render a button wrapper with the ButtonRoot inside.\n *\n * @param props Component props.\n * @return React element.\n */\nconst renderButtonWrapper: React.FC<ButtonRootProps> = (props) => {\n const { color, emphasis, variant, fullWidth } = props;\n\n const adaptedColor =\n emphasis === Emphasis.low && (color === ColorPalette.light ? ColorPalette.dark : ColorPalette.light);\n\n const wrapperClassName = classNames(\n handleBasicClasses({\n color: adaptedColor,\n prefix: BUTTON_WRAPPER_CLASSNAME,\n variant,\n fullWidth,\n }),\n );\n const buttonProps = { ...props, hasBackground: false };\n\n return (\n <div className={wrapperClassName}>\n {/* eslint-disable-next-line @typescript-eslint/no-use-before-define */}\n <ButtonRoot {...buttonProps} />\n </div>\n );\n};\n\n/**\n * ButtonRoot component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ButtonRoot = forwardRef<ButtonRootProps, HTMLButtonElement | HTMLAnchorElement>((props, ref) => {\n const {\n 'aria-label': ariaLabel,\n children,\n className,\n color,\n disabled,\n emphasis,\n hasBackground,\n href,\n isDisabled = disabled,\n isSelected,\n isActive,\n isFocused,\n isHovered,\n linkAs,\n name,\n size,\n target,\n theme,\n variant,\n type = 'button',\n fullWidth,\n ...forwardedProps\n } = props;\n\n const adaptedColor =\n color ||\n (emphasis !== Emphasis.high && theme === Theme.dark && ColorPalette.light) ||\n (emphasis === Emphasis.high && ColorPalette.primary) ||\n ColorPalette.dark;\n\n if (hasBackground) {\n return renderButtonWrapper({ ...props, ref, variant, color: adaptedColor });\n }\n\n const buttonClassName = classNames(\n className,\n handleBasicClasses({\n color: adaptedColor,\n emphasis,\n isSelected,\n isDisabled,\n isActive,\n isFocused,\n isHovered,\n prefix: BUTTON_CLASSNAME,\n size,\n theme: emphasis === Emphasis.high && theme,\n variant,\n fullWidth,\n }),\n );\n\n /**\n * If the linkAs prop is used, we use the linkAs component instead of a <button>.\n * If there is an href attribute, we display an <a> instead of a <button>.\n *\n * However, in any case, if the component is disabled, we returned a <button> since disabled is not compatible with <a>.\n */\n if ((linkAs || !isEmpty(props.href)) && !isDisabled) {\n return renderLink(\n {\n linkAs,\n ...forwardedProps,\n 'aria-label': ariaLabel,\n href,\n target,\n className: buttonClassName,\n ref: ref as RefObject<HTMLAnchorElement>,\n },\n children,\n );\n }\n return (\n <button\n {...forwardedProps}\n disabled={isDisabled}\n aria-disabled={isDisabled}\n aria-label={ariaLabel}\n ref={ref as RefObject<HTMLButtonElement>}\n className={buttonClassName}\n name={name}\n type={\n // eslint-disable-next-line react/button-has-type\n type\n }\n >\n {children}\n </button>\n );\n});\nButtonRoot.displayName = COMPONENT_NAME;\nButtonRoot.defaultProps = {};\n"],"names":["COMPONENT_NAME","BUTTON_WRAPPER_CLASSNAME","CSS_PREFIX","BUTTON_CLASSNAME","renderButtonWrapper","props","color","emphasis","variant","fullWidth","adaptedColor","Emphasis","low","ColorPalette","light","dark","wrapperClassName","classNames","handleBasicClasses","prefix","buttonProps","_objectSpread","hasBackground","React","createElement","className","ButtonRoot","forwardRef","ref","ariaLabel","children","disabled","href","isDisabled","isSelected","isActive","isFocused","isHovered","linkAs","name","size","target","theme","type","forwardedProps","_objectWithoutProperties","_excluded","high","Theme","primary","buttonClassName","isEmpty","renderLink","_extends","displayName","defaultProps"],"mappings":";;;;;;;;;AAeA;AACA;AACA;;AAmCA;AACA;AACA;AACA,MAAMA,cAAc,GAAG,YAAY,CAAA;AAE5B,MAAMC,wBAAwB,GAAI,CAAA,EAAEC,UAAW,CAAgB,eAAA,CAAA,CAAA;AAC/D,MAAMC,gBAAgB,GAAI,CAAA,EAAED,UAAW,CAAQ,OAAA,CAAA,CAAA;;AAE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CAAA;AAETiB,MAAAA,MAAAA;AAAM,KAAA,EACHM,cAAc,CAAA,EAAA,EAAA,EAAA;AACjB,MAAA,YAAY,EAAEf,SAAS;MACvBG,IAAI;MACJS,MAAM;AACNhB,MAAAA,SAAS,EAAEyB,eAAe;AAC1BtB,MAAAA,GAAG,EAAEA,GAAAA;AAAmC,KAAA,CAAA,EAE5CE,QACJ,CAAC,CAAA;AACL,GAAA;AACA,EAAA,oBACIP,cAAA,CAAAC,aAAA,CAAA6B,QAAAA,EAAAA,QAAA,KACQT,cAAc,EAAA;AAClBb,IAAAA,QAAQ,EAAEE,UAAW;AACrB,IAAA,eAAA,EAAeA,UAAW;AAC1B,IAAA,YAAA,EAAYJ,SAAU;AACtBD,IAAAA,GAAG,EAAEA,GAAoC;AACzCH,IAAAA,SAAS,EAAEyB,eAAgB;AAC3BX,IAAAA,IAAI,EAAEA,IAAK;IACXI,IAAI;AACA;AACAA,IAAAA,IAAAA;AACH,GAAA,CAAA,EAEAb,QACG,CAAC,CAAA;AAEjB,CAAC,EAAC;AACFJ,UAAU,CAAC4B,WAAW,GAAGtD,cAAc,CAAA;AACvC0B,UAAU,CAAC6B,YAAY,GAAG,EAAE;;;;"}
@@ -0,0 +1,411 @@
1
+ import kebabCase from 'lodash/kebabCase';
2
+ import 'lodash/isBoolean';
3
+ import 'lodash/isEmpty';
4
+ import 'lodash/noop';
5
+ import React__default from 'react';
6
+
7
+ function ownKeys(e, r) {
8
+ var t = Object.keys(e);
9
+ if (Object.getOwnPropertySymbols) {
10
+ var o = Object.getOwnPropertySymbols(e);
11
+ r && (o = o.filter(function (r) {
12
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
13
+ })), t.push.apply(t, o);
14
+ }
15
+ return t;
16
+ }
17
+ function _objectSpread2(e) {
18
+ for (var r = 1; r < arguments.length; r++) {
19
+ var t = null != arguments[r] ? arguments[r] : {};
20
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
21
+ _defineProperty(e, r, t[r]);
22
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
23
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
24
+ });
25
+ }
26
+ return e;
27
+ }
28
+ function _toPrimitive(t, r) {
29
+ if ("object" != typeof t || !t) return t;
30
+ var e = t[Symbol.toPrimitive];
31
+ if (void 0 !== e) {
32
+ var i = e.call(t, r || "default");
33
+ if ("object" != typeof i) return i;
34
+ throw new TypeError("@@toPrimitive must return a primitive value.");
35
+ }
36
+ return ("string" === r ? String : Number)(t);
37
+ }
38
+ function _toPropertyKey(t) {
39
+ var i = _toPrimitive(t, "string");
40
+ return "symbol" == typeof i ? i : String(i);
41
+ }
42
+ function _defineProperty(obj, key, value) {
43
+ key = _toPropertyKey(key);
44
+ if (key in obj) {
45
+ Object.defineProperty(obj, key, {
46
+ value: value,
47
+ enumerable: true,
48
+ configurable: true,
49
+ writable: true
50
+ });
51
+ } else {
52
+ obj[key] = value;
53
+ }
54
+ return obj;
55
+ }
56
+ function _extends() {
57
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
58
+ for (var i = 1; i < arguments.length; i++) {
59
+ var source = arguments[i];
60
+ for (var key in source) {
61
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
62
+ target[key] = source[key];
63
+ }
64
+ }
65
+ }
66
+ return target;
67
+ };
68
+ return _extends.apply(this, arguments);
69
+ }
70
+ function _objectWithoutPropertiesLoose(source, excluded) {
71
+ if (source == null) return {};
72
+ var target = {};
73
+ var sourceKeys = Object.keys(source);
74
+ var key, i;
75
+ for (i = 0; i < sourceKeys.length; i++) {
76
+ key = sourceKeys[i];
77
+ if (excluded.indexOf(key) >= 0) continue;
78
+ target[key] = source[key];
79
+ }
80
+ return target;
81
+ }
82
+ function _objectWithoutProperties(source, excluded) {
83
+ if (source == null) return {};
84
+ var target = _objectWithoutPropertiesLoose(source, excluded);
85
+ var key, i;
86
+ if (Object.getOwnPropertySymbols) {
87
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
88
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
89
+ key = sourceSymbolKeys[i];
90
+ if (excluded.indexOf(key) >= 0) continue;
91
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
92
+ target[key] = source[key];
93
+ }
94
+ }
95
+ return target;
96
+ }
97
+
98
+ /**
99
+ * Alignments.
100
+ */
101
+ const Alignment = {
102
+ bottom: 'bottom',
103
+ center: 'center',
104
+ end: 'end',
105
+ left: 'left',
106
+ right: 'right',
107
+ spaceAround: 'space-around',
108
+ spaceBetween: 'space-between',
109
+ spaceEvenly: 'space-evenly',
110
+ start: 'start',
111
+ top: 'top'
112
+ };
113
+ /**
114
+ * See SCSS variable $lumx-color-palette
115
+ */
116
+ const ColorPalette = {
117
+ primary: 'primary',
118
+ secondary: 'secondary',
119
+ blue: 'blue',
120
+ dark: 'dark',
121
+ green: 'green',
122
+ yellow: 'yellow',
123
+ red: 'red',
124
+ light: 'light',
125
+ grey: 'grey'
126
+ };
127
+ /**
128
+ * See SCSS variable $lumx-color-variants
129
+ */
130
+ const ColorVariant = {
131
+ D1: 'D1',
132
+ D2: 'D2',
133
+ L1: 'L1',
134
+ L2: 'L2',
135
+ L3: 'L3',
136
+ L4: 'L4',
137
+ L5: 'L5',
138
+ L6: 'L6',
139
+ N: 'N'
140
+ };
141
+ const Theme = {
142
+ light: 'light',
143
+ dark: 'dark'
144
+ };
145
+ const Size = {
146
+ xxs: 'xxs',
147
+ xs: 'xs',
148
+ s: 's',
149
+ m: 'm',
150
+ l: 'l',
151
+ xl: 'xl',
152
+ xxl: 'xxl',
153
+ tiny: 'tiny',
154
+ regular: 'regular',
155
+ medium: 'medium',
156
+ big: 'big',
157
+ huge: 'huge'
158
+ };
159
+ const Orientation = {
160
+ horizontal: 'horizontal',
161
+ vertical: 'vertical'
162
+ };
163
+ const Emphasis = {
164
+ low: 'low',
165
+ medium: 'medium',
166
+ high: 'high'
167
+ };
168
+ /**
169
+ * List of typographies that can't be customized.
170
+ */
171
+ const TypographyInterface = {
172
+ overline: 'overline',
173
+ caption: 'caption',
174
+ body1: 'body1',
175
+ body2: 'body2',
176
+ subtitle1: 'subtitle1',
177
+ subtitle2: 'subtitle2',
178
+ title: 'title',
179
+ headline: 'headline',
180
+ display1: 'display1'
181
+ };
182
+ /**
183
+ * List of title typographies that can be customized (via CSS variables).
184
+ */
185
+ const TypographyTitleCustom = {
186
+ title1: 'custom-title1',
187
+ title2: 'custom-title2',
188
+ title3: 'custom-title3',
189
+ title4: 'custom-title4',
190
+ title5: 'custom-title5',
191
+ title6: 'custom-title6'
192
+ };
193
+ /**
194
+ * List of typographies that can be customized (via CSS variables).
195
+ */
196
+ const TypographyCustom = _objectSpread2(_objectSpread2({}, TypographyTitleCustom), {}, {
197
+ intro: 'custom-intro',
198
+ 'body-large': 'custom-body-large',
199
+ body: 'custom-body',
200
+ quote: 'custom-quote',
201
+ 'publish-info': 'custom-publish-info',
202
+ button: 'custom-button'
203
+ });
204
+ /**
205
+ * List of all typographies.
206
+ */
207
+ const Typography = _objectSpread2(_objectSpread2({}, TypographyInterface), {}, {
208
+ custom: TypographyCustom
209
+ });
210
+ /**
211
+ * All available aspect ratios.
212
+ */
213
+ const AspectRatio = {
214
+ /** Intrinsic content ratio. */
215
+ original: 'original',
216
+ /** Ratio 3:1 */
217
+ panoramic: 'panoramic',
218
+ /** Ratio 16:9 */
219
+ wide: 'wide',
220
+ /** Ratio 3:2 */
221
+ horizontal: 'horizontal',
222
+ /** Ratio 3:2 */
223
+ vertical: 'vertical',
224
+ /** Ratio 1:1 */
225
+ square: 'square',
226
+ /** Ratio constrained by the parent. */
227
+ free: 'free'
228
+ };
229
+ /**
230
+ * Semantic info about the purpose of the component
231
+ */
232
+ const Kind = {
233
+ info: 'info',
234
+ success: 'success',
235
+ warning: 'warning',
236
+ error: 'error'
237
+ };
238
+ /**
239
+ * All available white-space values
240
+ * */
241
+ const WhiteSpace = {
242
+ normal: 'normal',
243
+ nowrap: 'nowrap',
244
+ pre: 'pre',
245
+ 'pre-wrap': 'pre-wrap',
246
+ 'pre-line': 'pre-line',
247
+ 'break-spaces': 'break-spaces'
248
+ };
249
+
250
+ /**
251
+ * Re-exporting some utils types.
252
+ */
253
+
254
+ var classnames = {exports: {}};
255
+
256
+ /*!
257
+ Copyright (c) 2018 Jed Watson.
258
+ Licensed under the MIT License (MIT), see
259
+ http://jedwatson.github.io/classnames
260
+ */
261
+
262
+ (function (module) {
263
+ /* global define */
264
+
265
+ (function () {
266
+
267
+ var hasOwn = {}.hasOwnProperty;
268
+
269
+ function classNames() {
270
+ var classes = [];
271
+
272
+ for (var i = 0; i < arguments.length; i++) {
273
+ var arg = arguments[i];
274
+ if (!arg) continue;
275
+
276
+ var argType = typeof arg;
277
+
278
+ if (argType === 'string' || argType === 'number') {
279
+ classes.push(arg);
280
+ } else if (Array.isArray(arg)) {
281
+ if (arg.length) {
282
+ var inner = classNames.apply(null, arg);
283
+ if (inner) {
284
+ classes.push(inner);
285
+ }
286
+ }
287
+ } else if (argType === 'object') {
288
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
289
+ classes.push(arg.toString());
290
+ continue;
291
+ }
292
+
293
+ for (var key in arg) {
294
+ if (hasOwn.call(arg, key) && arg[key]) {
295
+ classes.push(key);
296
+ }
297
+ }
298
+ }
299
+ }
300
+
301
+ return classes.join(' ');
302
+ }
303
+
304
+ if (module.exports) {
305
+ classNames.default = classNames;
306
+ module.exports = classNames;
307
+ } else {
308
+ window.classNames = classNames;
309
+ }
310
+ }());
311
+ }(classnames));
312
+
313
+ var classNames = classnames.exports;
314
+
315
+ /**
316
+ * The prefix to use for the CSS classes.
317
+ */
318
+ const CSS_PREFIX = 'lumx';
319
+
320
+ /**
321
+ * Animation duration constants. Take into consideration that if you change one of these variables,
322
+ * you need to update their scss counterpart as well
323
+ */
324
+ const DIALOG_TRANSITION_DURATION = 400;
325
+ const EXPANSION_PANEL_TRANSITION_DURATION = 400;
326
+ const NOTIFICATION_TRANSITION_DURATION = 200;
327
+
328
+ /**
329
+ * Delay on hover after which we open or close the tooltip.
330
+ * Only applies to devices supporting pointer hover.
331
+ */
332
+ const TOOLTIP_HOVER_DELAY = {
333
+ open: 500,
334
+ close: 500
335
+ };
336
+
337
+ /**
338
+ * Delay on long press after which we open or close the tooltip.
339
+ * Only applies to devices not supporting pointer hover.
340
+ */
341
+ const TOOLTIP_LONG_PRESS_DELAY = {
342
+ open: 250,
343
+ close: 3000
344
+ };
345
+
346
+ /**
347
+ * Optional global `window` instance (not defined when running SSR).
348
+ */
349
+ const WINDOW = typeof window !== 'undefined' ? window : undefined;
350
+
351
+ /**
352
+ * Optional global `document` instance (not defined when running SSR).
353
+ */
354
+ const DOCUMENT = typeof document !== 'undefined' ? document : undefined;
355
+
356
+ /**
357
+ * Check if we are running in a true browser
358
+ */
359
+ const IS_BROWSER = typeof navigator !== 'undefined' && !navigator.userAgent.includes('jsdom');
360
+
361
+ /**
362
+ * Visually hidden a11y utility class name
363
+ */
364
+ const VISUALLY_HIDDEN = 'visually-hidden';
365
+
366
+ // See https://regex101.com/r/YjS1uI/3
367
+ const LAST_PART_CLASSNAME = /^(.*)-(.+)$/gi;
368
+
369
+ /**
370
+ * Get the name of the root CSS class of a component based on its name.
371
+ *
372
+ * @param componentName The name of the component. This name should contains the component prefix and be
373
+ * written in PascalCase.
374
+ * @param subComponent Whether the current component is a sub component, if true, define the class according
375
+ * to BEM standards.
376
+ * @return The name of the root CSS class. This classname include the CSS classname prefix and is written in
377
+ * lower-snake-case.
378
+ */
379
+ function getRootClassName(componentName, subComponent) {
380
+ const formattedClassName = `${CSS_PREFIX}-${kebabCase(componentName)}`;
381
+ if (subComponent) {
382
+ return formattedClassName.replace(LAST_PART_CLASSNAME, '$1__$2');
383
+ }
384
+ return formattedClassName;
385
+ }
386
+
387
+ /**
388
+ * Returns the classname associated to the given color and variant.
389
+ * For example, for 'dark' and 'L2' it returns `lumx-color-font-dark-l2`
390
+ */
391
+ const getFontColorClassName = function (color) {
392
+ let colorVariant = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ColorVariant.N;
393
+ return `lumx-color-font-${color}-${colorVariant}`;
394
+ };
395
+
396
+ /**
397
+ * Returns the classname associated to the given typography.
398
+ * For example, for `Typography.title` it returns `lumx-typography-title`
399
+ */
400
+ const getTypographyClassName = typography => {
401
+ return `lumx-typography-${typography}`;
402
+ };
403
+
404
+ /**
405
+ * React.forwardRef but re-typed to attach some custom metadata on our components.
406
+ */
407
+
408
+ const forwardRef = React__default.forwardRef;
409
+
410
+ export { Alignment as A, ColorPalette as C, DOCUMENT as D, Emphasis as E, IS_BROWSER as I, Kind as K, NOTIFICATION_TRANSITION_DURATION as N, Orientation as O, Size as S, Theme as T, VISUALLY_HIDDEN as V, WhiteSpace as W, _extends as _, ColorVariant as a, TypographyInterface as b, TypographyTitleCustom as c, TypographyCustom as d, Typography as e, AspectRatio as f, classNames as g, getRootClassName as h, forwardRef as i, _objectWithoutProperties as j, _objectSpread2 as k, CSS_PREFIX as l, WINDOW as m, DIALOG_TRANSITION_DURATION as n, EXPANSION_PANEL_TRANSITION_DURATION as o, getFontColorClassName as p, getTypographyClassName as q, TOOLTIP_LONG_PRESS_DELAY as r, TOOLTIP_HOVER_DELAY as s };
411
+ //# sourceMappingURL=1da25128.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1da25128.js","sources":["../../src/components/index.ts","../../../../node_modules/classnames/index.js","../../../lumx-core/src/js/constants/index.ts","../../src/constants.ts","../../src/utils/className.ts","../../src/utils/react/forwardRef.ts"],"sourcesContent":["import { ValueOf } from '@lumx/react/utils/type';\n\n/**\n * Alignments.\n */\nexport const Alignment = {\n bottom: 'bottom',\n center: 'center',\n end: 'end',\n left: 'left',\n right: 'right',\n spaceAround: 'space-around',\n spaceBetween: 'space-between',\n spaceEvenly: 'space-evenly',\n start: 'start',\n top: 'top',\n} as const;\nexport type Alignment = ValueOf<typeof Alignment>;\nexport type VerticalAlignment = Extract<Alignment, 'top' | 'center' | 'bottom'>;\nexport type HorizontalAlignment = Extract<Alignment, 'right' | 'center' | 'left'>;\n\n/**\n * See SCSS variable $lumx-color-palette\n */\nexport const ColorPalette = {\n primary: 'primary',\n secondary: 'secondary',\n blue: 'blue',\n dark: 'dark',\n green: 'green',\n yellow: 'yellow',\n red: 'red',\n light: 'light',\n grey: 'grey',\n} as const;\nexport type ColorPalette = ValueOf<typeof ColorPalette>;\nexport type Color = ColorPalette | string;\n\n/**\n * See SCSS variable $lumx-color-variants\n */\nexport const ColorVariant = {\n D1: 'D1',\n D2: 'D2',\n L1: 'L1',\n L2: 'L2',\n L3: 'L3',\n L4: 'L4',\n L5: 'L5',\n L6: 'L6',\n N: 'N',\n} as const;\nexport type ColorVariant = ValueOf<typeof ColorVariant>;\n\nexport const Theme = {\n light: 'light',\n dark: 'dark',\n} as const;\nexport type Theme = ValueOf<typeof Theme>;\n\nexport const Size = {\n xxs: 'xxs',\n xs: 'xs',\n s: 's',\n m: 'm',\n l: 'l',\n xl: 'xl',\n xxl: 'xxl',\n tiny: 'tiny',\n regular: 'regular',\n medium: 'medium',\n big: 'big',\n huge: 'huge',\n} as const;\nexport type Size = ValueOf<typeof Size>;\nexport type GlobalSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;\n\nexport const Orientation = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n} as const;\nexport type Orientation = ValueOf<typeof Orientation>;\n\nexport const Emphasis = {\n low: 'low',\n medium: 'medium',\n high: 'high',\n} as const;\nexport type Emphasis = ValueOf<typeof Emphasis>;\n\n/**\n * List of typographies that can't be customized.\n */\nexport const TypographyInterface = {\n overline: 'overline',\n caption: 'caption',\n body1: 'body1',\n body2: 'body2',\n subtitle1: 'subtitle1',\n subtitle2: 'subtitle2',\n title: 'title',\n headline: 'headline',\n display1: 'display1',\n} as const;\nexport type TypographyInterface = ValueOf<typeof TypographyInterface>;\n\n/**\n * List of title typographies that can be customized (via CSS variables).\n */\nexport const TypographyTitleCustom = {\n title1: 'custom-title1',\n title2: 'custom-title2',\n title3: 'custom-title3',\n title4: 'custom-title4',\n title5: 'custom-title5',\n title6: 'custom-title6',\n} as const;\nexport type TypographyTitleCustom = ValueOf<typeof TypographyTitleCustom>;\n\n/**\n * List of typographies that can be customized (via CSS variables).\n */\nexport const TypographyCustom = {\n ...TypographyTitleCustom,\n intro: 'custom-intro',\n 'body-large': 'custom-body-large',\n body: 'custom-body',\n quote: 'custom-quote',\n 'publish-info': 'custom-publish-info',\n button: 'custom-button',\n} as const;\nexport type TypographyCustom = ValueOf<typeof TypographyCustom>;\n\n/**\n * List of all typographies.\n */\nexport const Typography = {\n ...TypographyInterface,\n custom: TypographyCustom,\n} as const;\nexport type Typography = TypographyInterface | TypographyCustom;\n\n/**\n * All available aspect ratios.\n */\nexport const AspectRatio = {\n /** Intrinsic content ratio. */\n original: 'original',\n /** Ratio 3:1 */\n panoramic: 'panoramic',\n /** Ratio 16:9 */\n wide: 'wide',\n /** Ratio 3:2 */\n horizontal: 'horizontal',\n /** Ratio 3:2 */\n vertical: 'vertical',\n /** Ratio 1:1 */\n square: 'square',\n /** Ratio constrained by the parent. */\n free: 'free',\n} as const;\nexport type AspectRatio = ValueOf<typeof AspectRatio>;\n\n/**\n * Semantic info about the purpose of the component\n */\nexport const Kind = {\n info: 'info',\n success: 'success',\n warning: 'warning',\n error: 'error',\n} as const;\nexport type Kind = ValueOf<typeof Kind>;\n\n/**\n * All available white-space values\n * */\nexport const WhiteSpace = {\n normal: 'normal',\n nowrap: 'nowrap',\n pre: 'pre',\n 'pre-wrap': 'pre-wrap',\n 'pre-line': 'pre-line',\n 'break-spaces': 'break-spaces',\n};\nexport type WhiteSpace = ValueOf<typeof WhiteSpace>;\n\n/**\n * Re-exporting some utils types.\n */\nexport type { HeadingElement, TextElement, GenericProps, Callback } from '../utils/type';\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/**\n * The prefix to use for the CSS classes.\n */\nexport const CSS_PREFIX = 'lumx';\n\n/**\n * Key codes.\n */\nexport * from './keycodes';\n\n/**\n * Animation duration constants. Take into consideration that if you change one of these variables,\n * you need to update their scss counterpart as well\n */\nexport const DIALOG_TRANSITION_DURATION = 400;\nexport const EXPANSION_PANEL_TRANSITION_DURATION = 400;\nexport const NOTIFICATION_TRANSITION_DURATION = 200;\nexport const SLIDESHOW_TRANSITION_DURATION = 5000;\n\n/**\n * Delay on hover after which we open or close the tooltip.\n * Only applies to devices supporting pointer hover.\n */\nexport const TOOLTIP_HOVER_DELAY = {\n open: 500,\n close: 500,\n};\n\n/**\n * Delay on long press after which we open or close the tooltip.\n * Only applies to devices not supporting pointer hover.\n */\nexport const TOOLTIP_LONG_PRESS_DELAY = {\n open: 250,\n close: 3000,\n};\n","export {\n CSS_PREFIX,\n DIALOG_TRANSITION_DURATION,\n NOTIFICATION_TRANSITION_DURATION,\n TOOLTIP_HOVER_DELAY,\n TOOLTIP_LONG_PRESS_DELAY,\n} from '@lumx/core/js/constants';\n\n/**\n * Optional global `window` instance (not defined when running SSR).\n */\nexport const WINDOW = typeof window !== 'undefined' ? window : undefined;\n\n/**\n * Optional global `document` instance (not defined when running SSR).\n */\nexport const DOCUMENT = typeof document !== 'undefined' ? document : undefined;\n\n/**\n * Check if we are running in a true browser\n */\nexport const IS_BROWSER = typeof navigator !== 'undefined' && !navigator.userAgent.includes('jsdom');\n\n/**\n * Visually hidden a11y utility class name\n */\nexport const VISUALLY_HIDDEN = 'visually-hidden';\n","import { CSS_PREFIX } from '@lumx/react/constants';\n\nimport kebabCase from 'lodash/kebabCase';\nimport { ColorPalette, ColorVariant, Typography } from '@lumx/react/components';\n\n// See https://regex101.com/r/YjS1uI/3\nconst LAST_PART_CLASSNAME = /^(.*)-(.+)$/gi;\n\nexport { getBasicClass, handleBasicClasses } from '@lumx/core/js/utils';\n\n/**\n * Get the name of the root CSS class of a component based on its name.\n *\n * @param componentName The name of the component. This name should contains the component prefix and be\n * written in PascalCase.\n * @param subComponent Whether the current component is a sub component, if true, define the class according\n * to BEM standards.\n * @return The name of the root CSS class. This classname include the CSS classname prefix and is written in\n * lower-snake-case.\n */\nexport function getRootClassName(componentName: string, subComponent?: boolean): string {\n const formattedClassName = `${CSS_PREFIX}-${kebabCase(componentName)}`;\n\n if (subComponent) {\n return formattedClassName.replace(LAST_PART_CLASSNAME, '$1__$2');\n }\n return formattedClassName;\n}\n\n/**\n * Returns the classname associated to the given color and variant.\n * For example, for 'dark' and 'L2' it returns `lumx-color-font-dark-l2`\n */\nexport const getFontColorClassName = (color: ColorPalette, colorVariant: ColorVariant = ColorVariant.N) => {\n return `lumx-color-font-${color}-${colorVariant}`;\n};\n\n/**\n * Returns the classname associated to the given typography.\n * For example, for `Typography.title` it returns `lumx-typography-title`\n */\nexport const getTypographyClassName = (typography: Typography) => {\n return `lumx-typography-${typography}`;\n};\n","import React, { type ReactNode, type ForwardedRef } from 'react';\nimport type { Comp } from '../type';\n\ntype ForwardRef = <P, T = HTMLElement>(render: (props: P, ref: ForwardedRef<T>) => ReactNode) => Comp<P, T>;\n\n/**\n * React.forwardRef but re-typed to attach some custom metadata on our components.\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport const forwardRef = React.forwardRef as ForwardRef;\n"],"names":["Alignment","bottom","center","end","left","right","spaceAround","spaceBetween","spaceEvenly","start","top","ColorPalette","primary","secondary","blue","dark","green","yellow","red","light","grey","ColorVariant","D1","D2","L1","L2","L3","L4","L5","L6","N","Theme","Size","xxs","xs","s","m","l","xl","xxl","tiny","regular","medium","big","huge","Orientation","horizontal","vertical","Emphasis","low","high","TypographyInterface","overline","caption","body1","body2","subtitle1","subtitle2","title","headline","display1","TypographyTitleCustom","title1","title2","title3","title4","title5","title6","TypographyCustom","_objectSpread","intro","body","quote","button","Typography","custom","AspectRatio","original","panoramic","wide","square","free","Kind","info","success","warning","error","WhiteSpace","normal","nowrap","pre","CSS_PREFIX","DIALOG_TRANSITION_DURATION","EXPANSION_PANEL_TRANSITION_DURATION","NOTIFICATION_TRANSITION_DURATION","TOOLTIP_HOVER_DELAY","open","close","TOOLTIP_LONG_PRESS_DELAY","WINDOW","window","undefined","DOCUMENT","document","IS_BROWSER","navigator","userAgent","includes","VISUALLY_HIDDEN","LAST_PART_CLASSNAME","getRootClassName","componentName","subComponent","formattedClassName","kebabCase","replace","getFontColorClassName","color","colorVariant","arguments","length","getTypographyClassName","typography","forwardRef","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,YAAY,EAAE,eAAe;AAC7BC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,GAAG,EAAE,KAAA;AACT,EAAU;AAKV;AACA;AACA;AACO,MAAMC,YAAY,GAAG;AACxBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,IAAI,EAAE,MAAA;AACV,EAAU;AAIV;AACA;AACA;AACO,MAAMC,YAAY,GAAG;AACxBC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,E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 -0,0 +1,13 @@
1
+ /** CSS selector listing all tabbable elements. */
2
+ const TABBABLE_ELEMENTS_SELECTOR = 'a[href], button, textarea, input:not([type="hidden"]):not([hidden]), [tabindex]';
3
+
4
+ /** CSS selector matching element that are disabled (should not receive focus). */
5
+ const DISABLED_SELECTOR = '[hidden], [tabindex="-1"], [disabled]:not([disabled="false"]), [aria-disabled]:not([aria-disabled="false"])';
6
+
7
+ const isNotDisabled = element => !element.matches(DISABLED_SELECTOR);
8
+ function getFocusableElements(element) {
9
+ return Array.from(element.querySelectorAll(TABBABLE_ELEMENTS_SELECTOR)).filter(isNotDisabled);
10
+ }
11
+
12
+ export { getFocusableElements as g };
13
+ //# sourceMappingURL=230173a8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"230173a8.js","sources":["../../src/utils/focus/constants.ts","../../src/utils/focus/getFocusableElements.ts"],"sourcesContent":["/** CSS selector listing all tabbable elements. */\nexport const TABBABLE_ELEMENTS_SELECTOR =\n 'a[href], button, textarea, input:not([type=\"hidden\"]):not([hidden]), [tabindex]';\n\n/** CSS selector matching element that are disabled (should not receive focus). */\nexport const DISABLED_SELECTOR =\n '[hidden], [tabindex=\"-1\"], [disabled]:not([disabled=\"false\"]), [aria-disabled]:not([aria-disabled=\"false\"])';\n","import { DISABLED_SELECTOR, TABBABLE_ELEMENTS_SELECTOR } from './constants';\n\nconst isNotDisabled = (element: HTMLElement) => !element.matches(DISABLED_SELECTOR);\n\nexport function getFocusableElements(element: HTMLElement | ShadowRoot): HTMLElement[] {\n return Array.from(element.querySelectorAll<HTMLElement>(TABBABLE_ELEMENTS_SELECTOR)).filter(isNotDisabled);\n}\n"],"names":["TABBABLE_ELEMENTS_SELECTOR","DISABLED_SELECTOR","isNotDisabled","element","matches","getFocusableElements","Array","from","querySelectorAll","filter"],"mappings":"AAAA;AACO,MAAMA,0BAA0B,GACnC,iFAAiF,CAAA;;AAErF;AACO,MAAMC,iBAAiB,GAC1B,6GAA6G;;ACJjH,MAAMC,aAAa,GAAIC,OAAoB,IAAK,CAACA,OAAO,CAACC,OAAO,CAACH,iBAAiB,CAAC,CAAA;AAE5E,SAASI,oBAAoBA,CAACF,OAAiC,EAAiB;AACnF,EAAA,OAAOG,KAAK,CAACC,IAAI,CAACJ,OAAO,CAACK,gBAAgB,CAAcR,0BAA0B,CAAC,CAAC,CAACS,MAAM,CAACP,aAAa,CAAC,CAAA;AAC9G;;;;"}