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

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 (296) hide show
  1. package/_internal/{8d67e1e3.d.ts → index.d.ts} +1 -1
  2. package/_internal/index.js +99 -0
  3. package/_internal/index.js.map +1 -0
  4. package/index.d.ts +3000 -66
  5. package/index.js +14554 -64
  6. package/index.js.map +1 -1
  7. package/package.json +3 -3
  8. package/src/components/button/Button.tsx +4 -5
  9. package/src/components/button/ButtonRoot.tsx +1 -3
  10. package/src/components/chip/Chip.tsx +6 -10
  11. package/src/components/dialog/Dialog.tsx +1 -1
  12. package/src/components/expansion-panel/ExpansionPanel.tsx +14 -18
  13. package/src/components/flex-box/FlexBox.tsx +1 -1
  14. package/src/components/generic-block/GenericBlock.tsx +6 -7
  15. package/src/components/generic-block/constants.ts +9 -4
  16. package/src/components/grid-column/GridColumn.tsx +1 -2
  17. package/src/components/link/Link.tsx +3 -5
  18. package/src/components/list/ListItem.tsx +1 -2
  19. package/src/components/list/useInteractiveList.tsx +1 -2
  20. package/src/components/mosaic/Mosaic.test.tsx +3 -3
  21. package/src/components/mosaic/Mosaic.tsx +2 -3
  22. package/src/components/navigation/Navigation.tsx +42 -37
  23. package/src/components/navigation/NavigationSection.tsx +76 -79
  24. package/src/components/notification/Notification.tsx +1 -5
  25. package/src/components/post-block/PostBlock.tsx +4 -8
  26. package/src/components/progress-tracker/ProgressTracker.stories.tsx +11 -11
  27. package/src/components/select/Select.stories.tsx +14 -5
  28. package/src/components/select/Select.tsx +1 -2
  29. package/src/components/select/SelectMultiple.stories.tsx +12 -10
  30. package/src/components/side-navigation/SideNavigationItem.tsx +1 -1
  31. package/src/components/slideshow/Slides.tsx +1 -1
  32. package/src/components/slideshow/SlideshowControls.tsx +1 -1
  33. package/src/components/switch/Switch.tsx +1 -2
  34. package/src/components/tabs/Tabs.stories.tsx +3 -4
  35. package/src/components/text-field/TextField.test.tsx +2 -2
  36. package/src/components/text-field/TextField.tsx +2 -3
  37. package/src/components/user-block/UserBlock.tsx +7 -9
  38. package/src/hooks/useClickAway.tsx +1 -2
  39. package/src/hooks/useInterval.tsx +1 -4
  40. package/src/hooks/useKeyboardListNavigation.tsx +2 -4
  41. package/src/hooks/useStopPropagation.ts +1 -2
  42. package/src/stories/decorators/withCombinations.tsx +1 -1
  43. package/src/testing/utils/commonTestsSuiteRTL.tsx +2 -2
  44. package/src/utils/collection/castArray.test.ts +15 -0
  45. package/src/utils/collection/castArray.ts +3 -0
  46. package/src/utils/collection/chunk.test.ts +15 -0
  47. package/src/utils/collection/chunk.ts +6 -0
  48. package/src/utils/collection/isEmpty.test.js +20 -0
  49. package/src/utils/collection/isEmpty.ts +4 -0
  50. package/src/utils/collection/last.ts +2 -0
  51. package/src/utils/collection/partitionMulti.test.ts +35 -0
  52. package/src/utils/{partitionMulti.ts → collection/partitionMulti.ts} +13 -12
  53. package/src/utils/collection/pull.test.ts +17 -0
  54. package/src/utils/collection/pull.ts +7 -0
  55. package/src/utils/collection/range.test.js +9 -0
  56. package/src/utils/collection/range.ts +2 -0
  57. package/src/utils/date/getMonthCalendar.ts +3 -4
  58. package/src/utils/flattenChildren.ts +2 -3
  59. package/src/utils/makeListenerTowerContext.ts +2 -2
  60. package/src/utils/react/forwardRef.ts +3 -2
  61. package/src/utils/react/forwardRefPolymorphic.ts +1 -2
  62. package/src/utils/utils.test.ts +0 -27
  63. package/utils/index.d.ts +1 -1
  64. package/utils/index.js +1 -96
  65. package/utils/index.js.map +1 -1
  66. package/_internal/17c3ea1d.js +0 -137
  67. package/_internal/17c3ea1d.js.map +0 -1
  68. package/_internal/1da25128.js +0 -411
  69. package/_internal/1da25128.js.map +0 -1
  70. package/_internal/230173a8.js +0 -13
  71. package/_internal/230173a8.js.map +0 -1
  72. package/_internal/23bdba2d.js +0 -71
  73. package/_internal/23bdba2d.js.map +0 -1
  74. package/_internal/26926e5c.d.ts +0 -36
  75. package/_internal/2a3d237c.js +0 -12
  76. package/_internal/2a3d237c.js.map +0 -1
  77. package/_internal/2c5dbb03.js +0 -26
  78. package/_internal/2c5dbb03.js.map +0 -1
  79. package/_internal/2e2abe51.js +0 -2154
  80. package/_internal/2e2abe51.js.map +0 -1
  81. package/_internal/31490c59.d.ts +0 -167
  82. package/_internal/3181f000.js +0 -14
  83. package/_internal/3181f000.js.map +0 -1
  84. package/_internal/35f100be.d.ts +0 -104
  85. package/_internal/36bd7352.js +0 -219
  86. package/_internal/36bd7352.js.map +0 -1
  87. package/_internal/3a1facc0.js +0 -18
  88. package/_internal/3a1facc0.js.map +0 -1
  89. package/_internal/4c20d932.js +0 -89
  90. package/_internal/4c20d932.js.map +0 -1
  91. package/_internal/4c28d012.js +0 -305
  92. package/_internal/4c28d012.js.map +0 -1
  93. package/_internal/4cd0bf32.js +0 -160
  94. package/_internal/4cd0bf32.js.map +0 -1
  95. package/_internal/4daccdd5.js +0 -25
  96. package/_internal/4daccdd5.js.map +0 -1
  97. package/_internal/524b1d04.js +0 -64
  98. package/_internal/524b1d04.js.map +0 -1
  99. package/_internal/53c94227.js +0 -123
  100. package/_internal/53c94227.js.map +0 -1
  101. package/_internal/54d9ded5.js +0 -418
  102. package/_internal/54d9ded5.js.map +0 -1
  103. package/_internal/56aec41b.js +0 -652
  104. package/_internal/56aec41b.js.map +0 -1
  105. package/_internal/5720caf5.js +0 -124
  106. package/_internal/5720caf5.js.map +0 -1
  107. package/_internal/646f0db6.js +0 -113
  108. package/_internal/646f0db6.js.map +0 -1
  109. package/_internal/6cc8dca8.d.ts +0 -22
  110. package/_internal/7f022f8c.d.ts +0 -34
  111. package/_internal/b8f2948d.js +0 -691
  112. package/_internal/b8f2948d.js.map +0 -1
  113. package/_internal/bc28d510.js +0 -784
  114. package/_internal/bc28d510.js.map +0 -1
  115. package/_internal/c68d24e4.js +0 -145
  116. package/_internal/c68d24e4.js.map +0 -1
  117. package/_internal/c6c99f76.js +0 -105
  118. package/_internal/c6c99f76.js.map +0 -1
  119. package/_internal/cae46566.js +0 -65
  120. package/_internal/cae46566.js.map +0 -1
  121. package/_internal/components/alert-dialog/index.ts-623b1ed3.d.ts +0 -37
  122. package/_internal/components/alert-dialog/index.ts-f83bd6ef.js +0 -148
  123. package/_internal/components/alert-dialog/index.ts-f83bd6ef.js.map +0 -1
  124. package/_internal/components/autocomplete/index.ts-3f8f125c.js +0 -264
  125. package/_internal/components/autocomplete/index.ts-3f8f125c.js.map +0 -1
  126. package/_internal/components/autocomplete/index.ts-8d6b123f.d.ts +0 -201
  127. package/_internal/components/avatar/index.ts-93ee0ea9.js +0 -89
  128. package/_internal/components/avatar/index.ts-93ee0ea9.js.map +0 -1
  129. package/_internal/components/avatar/index.ts-f92852b4.d.ts +0 -43
  130. package/_internal/components/badge/index.ts-2d7700ef.d.ts +0 -30
  131. package/_internal/components/badge/index.ts-6753d67f.js +0 -88
  132. package/_internal/components/badge/index.ts-6753d67f.js.map +0 -1
  133. package/_internal/components/button/index.ts-031307ce.js +0 -51
  134. package/_internal/components/button/index.ts-031307ce.js.map +0 -1
  135. package/_internal/components/button/index.ts-b29e26a4.d.ts +0 -22
  136. package/_internal/components/checkbox/index.ts-a33166d7.js +0 -127
  137. package/_internal/components/checkbox/index.ts-a33166d7.js.map +0 -1
  138. package/_internal/components/checkbox/index.ts-f82358ff.d.ts +0 -38
  139. package/_internal/components/chip/index.ts-4a91f1a7.d.ts +0 -68
  140. package/_internal/components/chip/index.ts-a2b5b771.js +0 -110
  141. package/_internal/components/chip/index.ts-a2b5b771.js.map +0 -1
  142. package/_internal/components/comment-block/index.ts-58fa051a.js +0 -121
  143. package/_internal/components/comment-block/index.ts-58fa051a.js.map +0 -1
  144. package/_internal/components/comment-block/index.ts-8cfa5af0.d.ts +0 -67
  145. package/_internal/components/date-picker/index.ts-145262d5.js +0 -2
  146. package/_internal/components/date-picker/index.ts-145262d5.js.map +0 -1
  147. package/_internal/components/date-picker/index.ts-70a34fa7.d.ts +0 -95
  148. package/_internal/components/dialog/index.ts-ea044db2.js +0 -224
  149. package/_internal/components/dialog/index.ts-ea044db2.js.map +0 -1
  150. package/_internal/components/dialog/index.ts-eca28654.d.ts +0 -55
  151. package/_internal/components/divider/index.ts-4a56db75.js +0 -55
  152. package/_internal/components/divider/index.ts-4a56db75.js.map +0 -1
  153. package/_internal/components/divider/index.ts-b011d8ca.d.ts +0 -18
  154. package/_internal/components/drag-handle/index.ts-0aebf92f.js +0 -54
  155. package/_internal/components/drag-handle/index.ts-0aebf92f.js.map +0 -1
  156. package/_internal/components/drag-handle/index.ts-3ab31dd1.d.ts +0 -18
  157. package/_internal/components/dropdown/index.ts-2a17db51.js +0 -154
  158. package/_internal/components/dropdown/index.ts-2a17db51.js.map +0 -1
  159. package/_internal/components/dropdown/index.ts-b648a15c.d.ts +0 -87
  160. package/_internal/components/expansion-panel/index.ts-69f09f5b.d.ts +0 -38
  161. package/_internal/components/expansion-panel/index.ts-fae3762e.js +0 -143
  162. package/_internal/components/expansion-panel/index.ts-fae3762e.js.map +0 -1
  163. package/_internal/components/flag/index.ts-8dcd685b.js +0 -56
  164. package/_internal/components/flag/index.ts-8dcd685b.js.map +0 -1
  165. package/_internal/components/flag/index.ts-fda89adb.d.ts +0 -23
  166. package/_internal/components/flex-box/index.ts-87f2b58d.d.ts +0 -43
  167. package/_internal/components/flex-box/index.ts-c216e957.js +0 -60
  168. package/_internal/components/flex-box/index.ts-c216e957.js.map +0 -1
  169. package/_internal/components/generic-block/index.ts-999a62a4.js +0 -115
  170. package/_internal/components/generic-block/index.ts-999a62a4.js.map +0 -1
  171. package/_internal/components/generic-block/index.ts-cd3b0e21.d.ts +0 -106
  172. package/_internal/components/grid/index.ts-67e0694f.d.ts +0 -50
  173. package/_internal/components/grid/index.ts-fdf1b306.js +0 -113
  174. package/_internal/components/grid/index.ts-fdf1b306.js.map +0 -1
  175. package/_internal/components/grid-column/index.ts-97c61cbe.js +0 -64
  176. package/_internal/components/grid-column/index.ts-97c61cbe.js.map +0 -1
  177. package/_internal/components/grid-column/index.ts-c89e1c18.d.ts +0 -31
  178. package/_internal/components/heading/index.ts-0179e9a9.js +0 -112
  179. package/_internal/components/heading/index.ts-0179e9a9.js.map +0 -1
  180. package/_internal/components/heading/index.ts-587579e8.d.ts +0 -37
  181. package/_internal/components/icon/index.ts-740ca1de.js +0 -2
  182. package/_internal/components/icon/index.ts-740ca1de.js.map +0 -1
  183. package/_internal/components/icon/index.ts-b3fa5e15.d.ts +0 -34
  184. package/_internal/components/image-block/index.ts-36b3828f.d.ts +0 -49
  185. package/_internal/components/image-block/index.ts-ef5e2e7d.js +0 -111
  186. package/_internal/components/image-block/index.ts-ef5e2e7d.js.map +0 -1
  187. package/_internal/components/image-lightbox/index.ts-137f85a8.js +0 -765
  188. package/_internal/components/image-lightbox/index.ts-137f85a8.js.map +0 -1
  189. package/_internal/components/image-lightbox/index.ts-2cb92d18.d.ts +0 -75
  190. package/_internal/components/inline-list/index.ts-033dd358.js +0 -76
  191. package/_internal/components/inline-list/index.ts-033dd358.js.map +0 -1
  192. package/_internal/components/inline-list/index.ts-e1c8a3ff.d.ts +0 -34
  193. package/_internal/components/input-helper/index.ts-32a9ca90.d.ts +0 -22
  194. package/_internal/components/input-helper/index.ts-ab3a1ef5.js +0 -75
  195. package/_internal/components/input-helper/index.ts-ab3a1ef5.js.map +0 -1
  196. package/_internal/components/input-label/index.ts-86f2ea41.d.ts +0 -24
  197. package/_internal/components/input-label/index.ts-d6ca5569.js +0 -60
  198. package/_internal/components/input-label/index.ts-d6ca5569.js.map +0 -1
  199. package/_internal/components/lightbox/index.ts-5370e8e6.d.ts +0 -36
  200. package/_internal/components/lightbox/index.ts-7a16cdc7.js +0 -149
  201. package/_internal/components/lightbox/index.ts-7a16cdc7.js.map +0 -1
  202. package/_internal/components/link/index.ts-26435006.d.ts +0 -37
  203. package/_internal/components/link/index.ts-d04f4e53.js +0 -120
  204. package/_internal/components/link/index.ts-d04f4e53.js.map +0 -1
  205. package/_internal/components/link-preview/index.ts-e560a274.d.ts +0 -36
  206. package/_internal/components/link-preview/index.ts-fee89f66.js +0 -109
  207. package/_internal/components/link-preview/index.ts-fee89f66.js.map +0 -1
  208. package/_internal/components/list/index.ts-ab57902e.d.ts +0 -118
  209. package/_internal/components/list/index.ts-f3101625.js +0 -86
  210. package/_internal/components/list/index.ts-f3101625.js.map +0 -1
  211. package/_internal/components/message/index.ts-041cf0cb.js +0 -97
  212. package/_internal/components/message/index.ts-041cf0cb.js.map +0 -1
  213. package/_internal/components/message/index.ts-2d38e0ea.d.ts +0 -37
  214. package/_internal/components/mosaic/index.ts-232d5aed.d.ts +0 -23
  215. package/_internal/components/mosaic/index.ts-d2128cd3.js +0 -94
  216. package/_internal/components/mosaic/index.ts-d2128cd3.js.map +0 -1
  217. package/_internal/components/navigation/index.ts-6d8bea53.d.ts +0 -58
  218. package/_internal/components/navigation/index.ts-e8dc0a7f.js +0 -222
  219. package/_internal/components/navigation/index.ts-e8dc0a7f.js.map +0 -1
  220. package/_internal/components/notification/index.ts-235fd340.js +0 -140
  221. package/_internal/components/notification/index.ts-235fd340.js.map +0 -1
  222. package/_internal/components/notification/index.ts-bb3f03f6.d.ts +0 -34
  223. package/_internal/components/popover/index.ts-2f17a9b6.js +0 -3
  224. package/_internal/components/popover/index.ts-2f17a9b6.js.map +0 -1
  225. package/_internal/components/popover/index.ts-e3b4ff19.d.ts +0 -66
  226. package/_internal/components/post-block/index.ts-0acb9bb4.js +0 -101
  227. package/_internal/components/post-block/index.ts-0acb9bb4.js.map +0 -1
  228. package/_internal/components/post-block/index.ts-9b8ff90b.d.ts +0 -41
  229. package/_internal/components/progress/index.ts-2a713859.js +0 -189
  230. package/_internal/components/progress/index.ts-2a713859.js.map +0 -1
  231. package/_internal/components/progress/index.ts-dfdfa5fb.d.ts +0 -60
  232. package/_internal/components/progress-tracker/index.ts-2649f756.js +0 -312
  233. package/_internal/components/progress-tracker/index.ts-2649f756.js.map +0 -1
  234. package/_internal/components/progress-tracker/index.ts-95320f32.d.ts +0 -101
  235. package/_internal/components/radio-button/index.ts-5eaab4cf.d.ts +0 -54
  236. package/_internal/components/radio-button/index.ts-b4dfb2a0.js +0 -150
  237. package/_internal/components/radio-button/index.ts-b4dfb2a0.js.map +0 -1
  238. package/_internal/components/select/index.ts-a65e3507.d.ts +0 -91
  239. package/_internal/components/select/index.ts-e8fad28b.js +0 -257
  240. package/_internal/components/select/index.ts-e8fad28b.js.map +0 -1
  241. package/_internal/components/side-navigation/index.ts-3f5f3785.d.ts +0 -60
  242. package/_internal/components/side-navigation/index.ts-c9a5fc3e.js +0 -184
  243. package/_internal/components/side-navigation/index.ts-c9a5fc3e.js.map +0 -1
  244. package/_internal/components/skeleton/index.ts-a7daefac.d.ts +0 -75
  245. package/_internal/components/skeleton/index.ts-ffc995af.js +0 -179
  246. package/_internal/components/skeleton/index.ts-ffc995af.js.map +0 -1
  247. package/_internal/components/slider/index.ts-24a0d598.d.ts +0 -52
  248. package/_internal/components/slider/index.ts-72aadf4c.js +0 -308
  249. package/_internal/components/slider/index.ts-72aadf4c.js.map +0 -1
  250. package/_internal/components/slideshow/index.ts-c99f2892.js +0 -151
  251. package/_internal/components/slideshow/index.ts-c99f2892.js.map +0 -1
  252. package/_internal/components/slideshow/index.ts-e49462c6.d.ts +0 -25
  253. package/_internal/components/switch/index.ts-207ba52b.d.ts +0 -34
  254. package/_internal/components/switch/index.ts-542e6eaf.js +0 -115
  255. package/_internal/components/switch/index.ts-542e6eaf.js.map +0 -1
  256. package/_internal/components/table/index.ts-905ce390.js +0 -310
  257. package/_internal/components/table/index.ts-905ce390.js.map +0 -1
  258. package/_internal/components/table/index.ts-c4f39b2d.d.ts +0 -108
  259. package/_internal/components/tabs/index.ts-713119f4.js +0 -289
  260. package/_internal/components/tabs/index.ts-713119f4.js.map +0 -1
  261. package/_internal/components/tabs/index.ts-dbfc48d9.d.ts +0 -106
  262. package/_internal/components/text/index.ts-6afbe8cd.js +0 -2
  263. package/_internal/components/text/index.ts-6afbe8cd.js.map +0 -1
  264. package/_internal/components/text/index.ts-8a812048.d.ts +0 -53
  265. package/_internal/components/text-field/index.ts-92e6b3b3.d.ts +0 -77
  266. package/_internal/components/text-field/index.ts-c3be8563.js +0 -341
  267. package/_internal/components/text-field/index.ts-c3be8563.js.map +0 -1
  268. package/_internal/components/thumbnail/index.ts-16d7b403.js +0 -40
  269. package/_internal/components/thumbnail/index.ts-16d7b403.js.map +0 -1
  270. package/_internal/components/thumbnail/index.ts-1b6c0b48.d.ts +0 -8
  271. package/_internal/components/toolbar/index.ts-813b902e.js +0 -63
  272. package/_internal/components/toolbar/index.ts-813b902e.js.map +0 -1
  273. package/_internal/components/toolbar/index.ts-9f5129d1.d.ts +0 -24
  274. package/_internal/components/tooltip/index.ts-905c847c.js +0 -322
  275. package/_internal/components/tooltip/index.ts-905c847c.js.map +0 -1
  276. package/_internal/components/tooltip/index.ts-c6931e9e.d.ts +0 -35
  277. package/_internal/components/uploader/index.ts-31f21c2a.js +0 -132
  278. package/_internal/components/uploader/index.ts-31f21c2a.js.map +0 -1
  279. package/_internal/components/uploader/index.ts-c3ccba98.d.ts +0 -51
  280. package/_internal/components/user-block/index.ts-18c58e19.d.ts +0 -50
  281. package/_internal/components/user-block/index.ts-d43e5f3c.js +0 -136
  282. package/_internal/components/user-block/index.ts-d43e5f3c.js.map +0 -1
  283. package/_internal/dc3e28c8.d.ts +0 -38
  284. package/_internal/f39a1ba4.js +0 -73
  285. package/_internal/f39a1ba4.js.map +0 -1
  286. package/_internal/f3e77e3e.js +0 -22
  287. package/_internal/f3e77e3e.js.map +0 -1
  288. package/_internal/f502ab30.js +0 -78
  289. package/_internal/f502ab30.js.map +0 -1
  290. package/_internal/f52adbae.js +0 -36
  291. package/_internal/f52adbae.js.map +0 -1
  292. package/_internal/f57e1239.js +0 -205
  293. package/_internal/f57e1239.js.map +0 -1
  294. package/_internal/f5ff1aa4.d.ts +0 -47
  295. package/_internal/fb975afe.js +0 -52
  296. package/_internal/fb975afe.js.map +0 -1
@@ -1,411 +0,0 @@
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
@@ -1 +0,0 @@
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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GC,cAAK,CAACD;;;;","x_google_ignoreList":[1]}
@@ -1,13 +0,0 @@
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
@@ -1 +0,0 @@
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;;;;"}
@@ -1,71 +0,0 @@
1
- import { h as getRootClassName, E as Emphasis, S as Size, i as forwardRef, T as Theme, j as _objectWithoutProperties, _ as _extends, k as _objectSpread2 } from './1da25128.js';
2
- import React__default from 'react';
3
- import { B as ButtonRoot } from './17c3ea1d.js';
4
- import { u as useTheme } from './3181f000.js';
5
- import { Tooltip } from './components/tooltip/index.ts-905c847c.js';
6
- import { I as Icon } from './c6c99f76.js';
7
-
8
- const _excluded = ["emphasis", "image", "icon", "label", "size", "theme", "tooltipProps", "hideTooltip"];
9
- /**
10
- * Component display name.
11
- */
12
- const COMPONENT_NAME = 'IconButton';
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
- emphasis: Emphasis.high,
24
- size: Size.m
25
- };
26
-
27
- /**
28
- * IconButton component.
29
- *
30
- * @param props Component props.
31
- * @param ref Component ref.
32
- * @return React element.
33
- */
34
- const IconButton = forwardRef((props, ref) => {
35
- const defaultTheme = useTheme() || Theme.light;
36
- const {
37
- emphasis,
38
- image,
39
- icon,
40
- label,
41
- size,
42
- theme = defaultTheme,
43
- tooltipProps,
44
- hideTooltip
45
- } = props,
46
- forwardedProps = _objectWithoutProperties(props, _excluded);
47
- return /*#__PURE__*/React__default.createElement(Tooltip, _extends({
48
- label: hideTooltip ? '' : label
49
- }, tooltipProps), /*#__PURE__*/React__default.createElement(ButtonRoot, _extends({
50
- ref: ref
51
- }, _objectSpread2({
52
- emphasis,
53
- size,
54
- theme
55
- }, forwardedProps), {
56
- "aria-label": label,
57
- variant: "icon"
58
- }), image ? /*#__PURE__*/React__default.createElement("img", {
59
- // no need to set alt as an aria-label is already set on the button
60
- alt: "",
61
- src: image
62
- }) : /*#__PURE__*/React__default.createElement(Icon, {
63
- icon: icon
64
- })));
65
- });
66
- IconButton.displayName = COMPONENT_NAME;
67
- IconButton.className = CLASSNAME;
68
- IconButton.defaultProps = DEFAULT_PROPS;
69
-
70
- export { IconButton as I };
71
- //# sourceMappingURL=23bdba2d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"23bdba2d.js","sources":["../../src/components/button/IconButton.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Emphasis, Icon, Size, Theme, Tooltip, TooltipProps } from '@lumx/react';\nimport { BaseButtonProps, ButtonRoot } from '@lumx/react/components/button/ButtonRoot';\nimport { getRootClassName } from '@lumx/react/utils/className';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nexport interface IconButtonProps extends BaseButtonProps {\n /**\n * Icon (SVG path).\n * If `image` is also set, `image` will be used instead.\n */\n icon?: string;\n /**\n * Image (image url).\n * Has priority over `icon`.\n */\n image?: string;\n /**\n * Label text (required for a11y purpose).\n * If you really don't want an aria-label, you can set an empty label (this is not recommended).\n */\n label: string;\n /**\n * Props to pass to the tooltip.\n * If undefined or if tooltipProps.label is undefined, the label prop will be used as tooltip label.\n * */\n tooltipProps?: Partial<TooltipProps>;\n /** Whether the tooltip should be hidden or not. */\n hideTooltip?: boolean;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'IconButton';\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<IconButtonProps> = {\n emphasis: Emphasis.high,\n size: Size.m,\n};\n\n/**\n * IconButton component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const IconButton = forwardRef<IconButtonProps, HTMLButtonElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n emphasis,\n image,\n icon,\n label,\n size,\n theme = defaultTheme,\n tooltipProps,\n hideTooltip,\n ...forwardedProps\n } = props;\n\n return (\n <Tooltip label={hideTooltip ? '' : label} {...tooltipProps}>\n <ButtonRoot ref={ref} {...{ emphasis, size, theme, ...forwardedProps }} aria-label={label} variant=\"icon\">\n {image ? (\n <img\n // no need to set alt as an aria-label is already set on the button\n alt=\"\"\n src={image}\n />\n ) : (\n <Icon icon={icon as string} />\n )}\n </ButtonRoot>\n </Tooltip>\n );\n});\nIconButton.displayName = COMPONENT_NAME;\nIconButton.className = CLASSNAME;\nIconButton.defaultProps = DEFAULT_PROPS;\n"],"names":["COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","emphasis","Emphasis","high","size","Size","m","IconButton","forwardRef","props","ref","defaultTheme","useTheme","Theme","light","image","icon","label","theme","tooltipProps","hideTooltip","forwardedProps","_objectWithoutProperties","_excluded","React","createElement","Tooltip","_extends","ButtonRoot","_objectSpread","variant","alt","src","Icon","displayName","className","defaultProps"],"mappings":";;;;;;;;AAiCA;AACA;AACA;AACA,MAAMA,cAAc,GAAG,YAAY,CAAA;;AAEnC;AACA;AACA;AACA,MAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAc,CAAC,CAAA;;AAElD;AACA;AACA;AACA,MAAMG,aAAuC,GAAG;EAC5CC,QAAQ,EAAEC,QAAQ,CAACC,IAAI;EACvBC,IAAI,EAAEC,IAAI,CAACC,CAAAA;AACf,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,UAAU,GAAGC,UAAU,CAAqC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACrF,MAAMC,YAAY,GAAGC,QAAQ,EAAE,IAAIC,KAAK,CAACC,KAAK,CAAA;EAC9C,MAAM;MACFb,QAAQ;MACRc,KAAK;MACLC,IAAI;MACJC,KAAK;MACLb,IAAI;AACJc,MAAAA,KAAK,GAAGP,YAAY;MACpBQ,YAAY;AACZC,MAAAA,WAAAA;AAEJ,KAAC,GAAGX,KAAK;AADFY,IAAAA,cAAc,GAAAC,wBAAA,CACjBb,KAAK,EAAAc,SAAA,CAAA,CAAA;AAET,EAAA,oBACIC,cAAA,CAAAC,aAAA,CAACC,OAAO,EAAAC,QAAA,CAAA;AAACV,IAAAA,KAAK,EAAEG,WAAW,GAAG,EAAE,GAAGH,KAAAA;GAAWE,EAAAA,YAAY,gBACtDK,cAAA,CAAAC,aAAA,CAACG,UAAU,EAAAD,QAAA,CAAA;AAACjB,IAAAA,GAAG,EAAEA,GAAAA;AAAI,GAAA,EAAAmB,cAAA,CAAA;IAAO5B,QAAQ;IAAEG,IAAI;AAAEc,IAAAA,KAAAA;AAAK,GAAA,EAAKG,cAAc,CAAA,EAAA;AAAI,IAAA,YAAA,EAAYJ,KAAM;AAACa,IAAAA,OAAO,EAAC,MAAA;AAAM,GAAA,CAAA,EACpGf,KAAK,gBACFS,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACI;AACAM,IAAAA,GAAG,EAAC,EAAE;AACNC,IAAAA,GAAG,EAAEjB,KAAAA;AAAM,GACd,CAAC,gBAEFS,cAAA,CAAAC,aAAA,CAACQ,IAAI,EAAA;AAACjB,IAAAA,IAAI,EAAEA,IAAAA;GAAiB,CAEzB,CACP,CAAC,CAAA;AAElB,CAAC,EAAC;AACFT,UAAU,CAAC2B,WAAW,GAAGrC,cAAc,CAAA;AACvCU,UAAU,CAAC4B,SAAS,GAAGrC,SAAS,CAAA;AAChCS,UAAU,CAAC6B,YAAY,GAAGpC,aAAa;;;;"}
@@ -1,36 +0,0 @@
1
- import { C as Comp } from './8d67e1e3.js';
2
- import { ReactNode } from 'react';
3
- import { B as BaseButtonProps } from './7f022f8c.js';
4
-
5
- /**
6
- * Button emphasis definition.
7
- * @deprecated Use Emphasis instead.
8
- */
9
- declare const ButtonEmphasis: {
10
- readonly low: "low";
11
- readonly medium: "medium";
12
- readonly high: "high";
13
- };
14
- /**
15
- * Defines the props of the component.
16
- */
17
- interface ButtonProps extends BaseButtonProps {
18
- /** Button content. */
19
- children?: ReactNode;
20
- /** Left icon (SVG path). */
21
- leftIcon?: string;
22
- /** Right icon (SVG path). */
23
- rightIcon?: string;
24
- /** When `true`, the button gets as large as possible. */
25
- fullWidth?: boolean;
26
- }
27
- /**
28
- * Button component.
29
- *
30
- * @param props Component props.
31
- * @param ref Component ref.
32
- * @return React element.
33
- */
34
- declare const Button: Comp<ButtonProps, HTMLAnchorElement | HTMLButtonElement>;
35
-
36
- export { ButtonEmphasis as B, type ButtonProps as a, Button as b };
@@ -1,12 +0,0 @@
1
- import { useState, useCallback } from 'react';
2
-
3
- const useBooleanState = defaultValue => {
4
- const [booleanValue, setBoolean] = useState(defaultValue);
5
- const setToFalse = useCallback(() => setBoolean(false), []);
6
- const setToTrue = useCallback(() => setBoolean(true), []);
7
- const toggleBoolean = useCallback(() => setBoolean(previousValue => !previousValue), []);
8
- return [booleanValue, setToFalse, setToTrue, toggleBoolean];
9
- };
10
-
11
- export { useBooleanState as u };
12
- //# sourceMappingURL=2a3d237c.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"2a3d237c.js","sources":["../../src/hooks/useBooleanState.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useBooleanState = (defaultValue: boolean): [boolean, () => void, () => void, () => void] => {\n const [booleanValue, setBoolean] = useState<boolean>(defaultValue);\n\n const setToFalse = useCallback(() => setBoolean(false), []);\n\n const setToTrue = useCallback(() => setBoolean(true), []);\n\n const toggleBoolean = useCallback(() => setBoolean((previousValue) => !previousValue), []);\n\n return [booleanValue, setToFalse, setToTrue, toggleBoolean];\n};\n"],"names":["useBooleanState","defaultValue","booleanValue","setBoolean","useState","setToFalse","useCallback","setToTrue","toggleBoolean","previousValue"],"mappings":";;AAEaA,MAAAA,eAAe,GAAIC,YAAqB,IAAoD;EACrG,MAAM,CAACC,YAAY,EAAEC,UAAU,CAAC,GAAGC,QAAQ,CAAUH,YAAY,CAAC,CAAA;EAElE,MAAMI,UAAU,GAAGC,WAAW,CAAC,MAAMH,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAA;EAE3D,MAAMI,SAAS,GAAGD,WAAW,CAAC,MAAMH,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;AAEzD,EAAA,MAAMK,aAAa,GAAGF,WAAW,CAAC,MAAMH,UAAU,CAAEM,aAAa,IAAK,CAACA,aAAa,CAAC,EAAE,EAAE,CAAC,CAAA;EAE1F,OAAO,CAACP,YAAY,EAAEG,UAAU,EAAEE,SAAS,EAAEC,aAAa,CAAC,CAAA;AAC/D;;;;"}
@@ -1,26 +0,0 @@
1
- import { j as _objectWithoutProperties } from './1da25128.js';
2
- import React__default from 'react';
3
-
4
- const _excluded = ["linkAs"];
5
- /**
6
- * Render link with default <a> HTML component or a custom one provided by `linkAs`.
7
- *
8
- * Can be used to inject the `Link` component from `react-router` and provide better a11y on LumX components.
9
- *
10
- * @param linkAs Custom link component.
11
- * @param children Link children.
12
- * @return A link.
13
- */
14
- const renderLink = function (_ref) {
15
- let {
16
- linkAs
17
- } = _ref,
18
- forwardedProps = _objectWithoutProperties(_ref, _excluded);
19
- for (var _len = arguments.length, children = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
20
- children[_key - 1] = arguments[_key];
21
- }
22
- return /*#__PURE__*/React__default.createElement(linkAs || 'a', forwardedProps, ...children);
23
- };
24
-
25
- export { renderLink as r };
26
- //# sourceMappingURL=2c5dbb03.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"2c5dbb03.js","sources":["../../src/utils/renderLink.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode } from 'react';\n\ninterface Props {\n linkAs?: any;\n}\n\n/**\n * Render link with default <a> HTML component or a custom one provided by `linkAs`.\n *\n * Can be used to inject the `Link` component from `react-router` and provide better a11y on LumX components.\n *\n * @param linkAs Custom link component.\n * @param children Link children.\n * @return A link.\n */\nexport const renderLink = <P extends Props>({ linkAs, ...forwardedProps }: P, ...children: ReactNode[]): ReactElement =>\n React.createElement(linkAs || 'a', forwardedProps, ...children);\n"],"names":["renderLink","_ref","linkAs","forwardedProps","_objectWithoutProperties","_excluded","_len","arguments","length","children","Array","_key","React","createElement"],"mappings":";;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACaA,MAAAA,UAAU,GAAG,UAAAC,IAAA,EAAA;EAAA,IAAkB;AAAEC,MAAAA,MAAAA;AAA6B,KAAC,GAAAD,IAAA;AAAnBE,IAAAA,cAAc,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA,CAAA;EAAA,KAAAC,IAAAA,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAUC,QAAQ,OAAAC,KAAA,CAAAJ,IAAA,GAAAA,CAAAA,GAAAA,IAAA,WAAAK,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,EAAA,EAAA;AAARF,IAAAA,QAAQ,CAAAE,IAAA,GAAAJ,CAAAA,CAAAA,GAAAA,SAAA,CAAAI,IAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,oBACrFC,cAAK,CAACC,aAAa,CAACX,MAAM,IAAI,GAAG,EAAEC,cAAc,EAAE,GAAGM,QAAQ,CAAC,CAAA;AAAA;;;;"}