@papillonarts/components 0.48.0 → 0.49.1

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 (378) hide show
  1. package/LICENSE +1 -1
  2. package/build/Legacy/Alert/Alert.const.d.ts +4 -0
  3. package/build/Legacy/Alert/Alert.const.d.ts.map +1 -0
  4. package/build/Legacy/Alert/Alert.const.js +26 -0
  5. package/build/Legacy/Alert/Alert.d.ts +3 -2
  6. package/build/Legacy/Alert/Alert.d.ts.map +1 -1
  7. package/build/Legacy/Alert/Alert.js +47 -49
  8. package/build/Legacy/Alert/Alert.type.d.ts +7 -8
  9. package/build/Legacy/Alert/Alert.type.d.ts.map +1 -1
  10. package/build/Legacy/Alert/Alert.type.js +1 -24
  11. package/build/Legacy/Alert/__tests__/Alert.doc.md +2 -2
  12. package/build/Legacy/Alert/index.d.ts +2 -2
  13. package/build/Legacy/Alert/index.d.ts.map +1 -1
  14. package/build/Legacy/Alert/index.js +3 -3
  15. package/build/Legacy/Blankslate/Blankslate.const.d.ts +4 -0
  16. package/build/Legacy/Blankslate/Blankslate.const.d.ts.map +1 -0
  17. package/build/Legacy/Blankslate/Blankslate.const.js +18 -0
  18. package/build/Legacy/Blankslate/Blankslate.d.ts +3 -2
  19. package/build/Legacy/Blankslate/Blankslate.d.ts.map +1 -1
  20. package/build/Legacy/Blankslate/Blankslate.js +17 -14
  21. package/build/Legacy/Blankslate/Blankslate.type.d.ts +2 -4
  22. package/build/Legacy/Blankslate/Blankslate.type.d.ts.map +1 -1
  23. package/build/Legacy/Blankslate/Blankslate.type.js +1 -14
  24. package/build/Legacy/Blankslate/__tests__/Blankslate.doc.md +1 -1
  25. package/build/Legacy/Blankslate/index.d.ts +1 -1
  26. package/build/Legacy/Blankslate/index.d.ts.map +1 -1
  27. package/build/Legacy/Blankslate/index.js +3 -3
  28. package/build/Legacy/Breadcrumb/Breadcrumb.const.d.ts +4 -0
  29. package/build/Legacy/Breadcrumb/Breadcrumb.const.d.ts.map +1 -0
  30. package/build/Legacy/Breadcrumb/Breadcrumb.const.js +14 -0
  31. package/build/Legacy/Breadcrumb/Breadcrumb.d.ts +3 -2
  32. package/build/Legacy/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  33. package/build/Legacy/Breadcrumb/Breadcrumb.js +50 -46
  34. package/build/Legacy/Breadcrumb/Breadcrumb.type.d.ts +9 -6
  35. package/build/Legacy/Breadcrumb/Breadcrumb.type.d.ts.map +1 -1
  36. package/build/Legacy/Breadcrumb/Breadcrumb.type.js +1 -10
  37. package/build/Legacy/Breadcrumb/__tests__/Breadcrumb.doc.md +2 -2
  38. package/build/Legacy/Breadcrumb/index.d.ts +1 -1
  39. package/build/Legacy/Breadcrumb/index.d.ts.map +1 -1
  40. package/build/Legacy/Breadcrumb/index.js +3 -3
  41. package/build/Legacy/Button/Button.const.d.ts +9 -0
  42. package/build/Legacy/Button/Button.const.d.ts.map +1 -0
  43. package/build/Legacy/Button/Button.const.js +48 -0
  44. package/build/Legacy/Button/Button.d.ts +3 -2
  45. package/build/Legacy/Button/Button.d.ts.map +1 -1
  46. package/build/Legacy/Button/Button.js +84 -94
  47. package/build/Legacy/Button/Button.type.d.ts +12 -19
  48. package/build/Legacy/Button/Button.type.d.ts.map +1 -1
  49. package/build/Legacy/Button/Button.type.js +1 -44
  50. package/build/Legacy/Button/__tests__/Button.doc.md +6 -6
  51. package/build/Legacy/Button/index.d.ts +2 -1
  52. package/build/Legacy/Button/index.d.ts.map +1 -1
  53. package/build/Legacy/Button/index.js +8 -8
  54. package/build/Legacy/Dropdown/Dropdown.const.d.ts +4 -0
  55. package/build/Legacy/Dropdown/Dropdown.const.d.ts.map +1 -0
  56. package/build/Legacy/Dropdown/Dropdown.const.js +18 -0
  57. package/build/Legacy/Dropdown/Dropdown.d.ts +3 -2
  58. package/build/Legacy/Dropdown/Dropdown.d.ts.map +1 -1
  59. package/build/Legacy/Dropdown/Dropdown.js +49 -50
  60. package/build/Legacy/Dropdown/Dropdown.type.d.ts +10 -7
  61. package/build/Legacy/Dropdown/Dropdown.type.d.ts.map +1 -1
  62. package/build/Legacy/Dropdown/Dropdown.type.js +1 -14
  63. package/build/Legacy/Dropdown/__tests__/Dropdown.doc.md +1 -1
  64. package/build/Legacy/Dropdown/index.d.ts +2 -1
  65. package/build/Legacy/Dropdown/index.d.ts.map +1 -1
  66. package/build/Legacy/Dropdown/index.js +3 -3
  67. package/build/Legacy/ErrorBoundary/ErrorBoundary.d.ts +7 -8
  68. package/build/Legacy/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  69. package/build/Legacy/ErrorBoundary/ErrorBoundary.js +32 -48
  70. package/build/Legacy/ErrorBoundary/ErrorBoundary.type.d.ts +5 -1
  71. package/build/Legacy/ErrorBoundary/ErrorBoundary.type.d.ts.map +1 -1
  72. package/build/Legacy/ErrorBoundary/__tests__/ErrorBoundary.doc.md +5 -1
  73. package/build/Legacy/ErrorBoundary/index.d.ts +1 -0
  74. package/build/Legacy/ErrorBoundary/index.d.ts.map +1 -1
  75. package/build/Legacy/ErrorBoundary/index.js +1 -1
  76. package/build/Legacy/Form/Checkbox/Checkbox.const.d.ts +5 -0
  77. package/build/Legacy/Form/Checkbox/Checkbox.const.d.ts.map +1 -0
  78. package/build/Legacy/Form/Checkbox/Checkbox.const.js +22 -0
  79. package/build/Legacy/Form/Checkbox/Checkbox.d.ts +3 -2
  80. package/build/Legacy/Form/Checkbox/Checkbox.d.ts.map +1 -1
  81. package/build/Legacy/Form/Checkbox/Checkbox.js +22 -25
  82. package/build/Legacy/Form/Checkbox/Checkbox.type.d.ts +2 -4
  83. package/build/Legacy/Form/Checkbox/Checkbox.type.d.ts.map +1 -1
  84. package/build/Legacy/Form/Checkbox/Checkbox.type.js +1 -18
  85. package/build/Legacy/Form/Checkbox/__tests__/Checkbox.doc.md +1 -1
  86. package/build/Legacy/Form/Checkbox/index.d.ts +1 -1
  87. package/build/Legacy/Form/Checkbox/index.d.ts.map +1 -1
  88. package/build/Legacy/Form/Checkbox/index.js +3 -3
  89. package/build/Legacy/Form/Input/Input.const.d.ts +5 -0
  90. package/build/Legacy/Form/Input/Input.const.d.ts.map +1 -0
  91. package/build/Legacy/Form/Input/Input.const.js +30 -0
  92. package/build/Legacy/Form/Input/Input.d.ts +3 -2
  93. package/build/Legacy/Form/Input/Input.d.ts.map +1 -1
  94. package/build/Legacy/Form/Input/Input.js +25 -32
  95. package/build/Legacy/Form/Input/Input.type.d.ts +5 -7
  96. package/build/Legacy/Form/Input/Input.type.d.ts.map +1 -1
  97. package/build/Legacy/Form/Input/Input.type.js +1 -26
  98. package/build/Legacy/Form/Input/__tests__/Input.doc.md +4 -4
  99. package/build/Legacy/Form/Input/index.d.ts +1 -1
  100. package/build/Legacy/Form/Input/index.d.ts.map +1 -1
  101. package/build/Legacy/Form/Input/index.js +4 -4
  102. package/build/Legacy/Form/Radio/Radio.const.d.ts +5 -0
  103. package/build/Legacy/Form/Radio/Radio.const.d.ts.map +1 -0
  104. package/build/Legacy/Form/Radio/Radio.const.js +22 -0
  105. package/build/Legacy/Form/Radio/Radio.d.ts +3 -2
  106. package/build/Legacy/Form/Radio/Radio.d.ts.map +1 -1
  107. package/build/Legacy/Form/Radio/Radio.js +19 -24
  108. package/build/Legacy/Form/Radio/Radio.type.d.ts +2 -4
  109. package/build/Legacy/Form/Radio/Radio.type.d.ts.map +1 -1
  110. package/build/Legacy/Form/Radio/Radio.type.js +1 -18
  111. package/build/Legacy/Form/Radio/__tests__/Radio.doc.md +1 -1
  112. package/build/Legacy/Form/Radio/index.d.ts +1 -1
  113. package/build/Legacy/Form/Radio/index.d.ts.map +1 -1
  114. package/build/Legacy/Form/Radio/index.js +3 -3
  115. package/build/Legacy/Form/index.js +1 -1
  116. package/build/Legacy/Grid/DisplayTable/DisplayTable.const.d.ts +3 -0
  117. package/build/Legacy/Grid/DisplayTable/DisplayTable.const.d.ts.map +1 -0
  118. package/build/Legacy/Grid/DisplayTable/DisplayTable.const.js +11 -0
  119. package/build/Legacy/Grid/DisplayTable/DisplayTable.d.ts +3 -2
  120. package/build/Legacy/Grid/DisplayTable/DisplayTable.d.ts.map +1 -1
  121. package/build/Legacy/Grid/DisplayTable/DisplayTable.js +26 -31
  122. package/build/Legacy/Grid/DisplayTable/DisplayTable.type.d.ts +7 -7
  123. package/build/Legacy/Grid/DisplayTable/DisplayTable.type.d.ts.map +1 -1
  124. package/build/Legacy/Grid/DisplayTable/DisplayTable.type.js +1 -7
  125. package/build/Legacy/Grid/DisplayTable/__tests__/DisplayTable.doc.md +3 -3
  126. package/build/Legacy/Grid/DisplayTable/index.js +1 -1
  127. package/build/Legacy/Grid/FlexGrid/FlexGrid.const.d.ts +5 -0
  128. package/build/Legacy/Grid/FlexGrid/FlexGrid.const.d.ts.map +1 -0
  129. package/build/Legacy/Grid/FlexGrid/FlexGrid.const.js +28 -0
  130. package/build/Legacy/Grid/FlexGrid/FlexGrid.d.ts +3 -2
  131. package/build/Legacy/Grid/FlexGrid/FlexGrid.d.ts.map +1 -1
  132. package/build/Legacy/Grid/FlexGrid/FlexGrid.js +148 -167
  133. package/build/Legacy/Grid/FlexGrid/FlexGrid.type.d.ts +16 -11
  134. package/build/Legacy/Grid/FlexGrid/FlexGrid.type.d.ts.map +1 -1
  135. package/build/Legacy/Grid/FlexGrid/FlexGrid.type.js +1 -24
  136. package/build/Legacy/Grid/FlexGrid/__tests__/FlexGrid.doc.md +3 -3
  137. package/build/Legacy/Grid/FlexGrid/index.d.ts +1 -1
  138. package/build/Legacy/Grid/FlexGrid/index.d.ts.map +1 -1
  139. package/build/Legacy/Grid/FlexGrid/index.js +4 -4
  140. package/build/Legacy/Grid/index.js +1 -1
  141. package/build/Legacy/Icon/Icon.const.d.ts +656 -0
  142. package/build/Legacy/Icon/Icon.const.d.ts.map +1 -0
  143. package/build/Legacy/Icon/Icon.const.js +678 -0
  144. package/build/Legacy/Icon/Icon.d.ts +3 -2
  145. package/build/Legacy/Icon/Icon.d.ts.map +1 -1
  146. package/build/Legacy/Icon/Icon.js +33 -44
  147. package/build/Legacy/Icon/Icon.part.js +645 -645
  148. package/build/Legacy/Icon/Icon.type.d.ts +0 -654
  149. package/build/Legacy/Icon/Icon.type.d.ts.map +1 -1
  150. package/build/Legacy/Icon/Icon.type.js +1 -674
  151. package/build/Legacy/Icon/index.d.ts +1 -1
  152. package/build/Legacy/Icon/index.d.ts.map +1 -1
  153. package/build/Legacy/Icon/index.js +4 -4
  154. package/build/Legacy/Label/Label.const.d.ts +6 -0
  155. package/build/Legacy/Label/Label.const.d.ts.map +1 -0
  156. package/build/Legacy/Label/Label.const.js +26 -0
  157. package/build/Legacy/Label/Label.d.ts +3 -2
  158. package/build/Legacy/Label/Label.d.ts.map +1 -1
  159. package/build/Legacy/Label/Label.js +16 -15
  160. package/build/Legacy/Label/Label.type.d.ts +0 -4
  161. package/build/Legacy/Label/Label.type.d.ts.map +1 -1
  162. package/build/Legacy/Label/Label.type.js +1 -22
  163. package/build/Legacy/Label/index.js +1 -1
  164. package/build/Legacy/Loader/Loader.const.d.ts +4 -0
  165. package/build/Legacy/Loader/Loader.const.d.ts.map +1 -0
  166. package/build/Legacy/Loader/Loader.const.js +15 -0
  167. package/build/Legacy/Loader/Loader.d.ts +3 -2
  168. package/build/Legacy/Loader/Loader.d.ts.map +1 -1
  169. package/build/Legacy/Loader/Loader.js +19 -19
  170. package/build/Legacy/Loader/Loader.type.d.ts +0 -2
  171. package/build/Legacy/Loader/Loader.type.d.ts.map +1 -1
  172. package/build/Legacy/Loader/Loader.type.js +1 -11
  173. package/build/Legacy/Loader/index.d.ts +1 -1
  174. package/build/Legacy/Loader/index.d.ts.map +1 -1
  175. package/build/Legacy/Loader/index.js +3 -3
  176. package/build/Legacy/Markdown/Markdown.const.d.ts +4 -0
  177. package/build/Legacy/Markdown/Markdown.const.d.ts.map +1 -0
  178. package/build/Legacy/Markdown/Markdown.const.js +14 -0
  179. package/build/Legacy/Markdown/Markdown.d.ts +3 -2
  180. package/build/Legacy/Markdown/Markdown.d.ts.map +1 -1
  181. package/build/Legacy/Markdown/Markdown.js +22 -14
  182. package/build/Legacy/Markdown/Markdown.type.d.ts +0 -2
  183. package/build/Legacy/Markdown/Markdown.type.d.ts.map +1 -1
  184. package/build/Legacy/Markdown/Markdown.type.js +1 -10
  185. package/build/Legacy/Markdown/index.js +1 -1
  186. package/build/Legacy/Navigation/Menu/Menu.const.d.ts +3 -0
  187. package/build/Legacy/Navigation/Menu/Menu.const.d.ts.map +1 -0
  188. package/build/Legacy/Navigation/Menu/Menu.const.js +10 -0
  189. package/build/Legacy/Navigation/Menu/Menu.d.ts +3 -2
  190. package/build/Legacy/Navigation/Menu/Menu.d.ts.map +1 -1
  191. package/build/Legacy/Navigation/Menu/Menu.js +40 -42
  192. package/build/Legacy/Navigation/Menu/Menu.type.d.ts +2 -2
  193. package/build/Legacy/Navigation/Menu/Menu.type.d.ts.map +1 -1
  194. package/build/Legacy/Navigation/Menu/Menu.type.js +1 -6
  195. package/build/Legacy/Navigation/Menu/index.js +1 -1
  196. package/build/Legacy/Navigation/TabNav/TabNav.const.d.ts +4 -0
  197. package/build/Legacy/Navigation/TabNav/TabNav.const.d.ts.map +1 -0
  198. package/build/Legacy/Navigation/TabNav/TabNav.const.js +16 -0
  199. package/build/Legacy/Navigation/TabNav/TabNav.d.ts +3 -2
  200. package/build/Legacy/Navigation/TabNav/TabNav.d.ts.map +1 -1
  201. package/build/Legacy/Navigation/TabNav/TabNav.js +79 -79
  202. package/build/Legacy/Navigation/TabNav/TabNav.type.d.ts +6 -7
  203. package/build/Legacy/Navigation/TabNav/TabNav.type.d.ts.map +1 -1
  204. package/build/Legacy/Navigation/TabNav/TabNav.type.js +1 -12
  205. package/build/Legacy/Navigation/TabNav/__tests__/TabNav.doc.md +2 -2
  206. package/build/Legacy/Navigation/TabNav/index.d.ts +1 -1
  207. package/build/Legacy/Navigation/TabNav/index.d.ts.map +1 -1
  208. package/build/Legacy/Navigation/TabNav/index.js +3 -3
  209. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.const.d.ts +5 -0
  210. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.const.d.ts.map +1 -0
  211. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.const.js +20 -0
  212. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.d.ts +3 -2
  213. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.d.ts.map +1 -1
  214. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.js +64 -63
  215. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.type.d.ts +4 -6
  216. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.type.d.ts.map +1 -1
  217. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.type.js +1 -16
  218. package/build/Legacy/Navigation/UnderlineNav/__tests__/UnderlineNav.doc.md +1 -1
  219. package/build/Legacy/Navigation/UnderlineNav/index.d.ts +1 -1
  220. package/build/Legacy/Navigation/UnderlineNav/index.d.ts.map +1 -1
  221. package/build/Legacy/Navigation/UnderlineNav/index.js +4 -4
  222. package/build/Legacy/Navigation/index.js +1 -1
  223. package/build/Legacy/Pagination/PreviousNext/PreviousNext.const.d.ts +4 -0
  224. package/build/Legacy/Pagination/PreviousNext/PreviousNext.const.d.ts.map +1 -0
  225. package/build/Legacy/Pagination/PreviousNext/PreviousNext.const.js +30 -0
  226. package/build/Legacy/Pagination/PreviousNext/PreviousNext.d.ts +3 -2
  227. package/build/Legacy/Pagination/PreviousNext/PreviousNext.d.ts.map +1 -1
  228. package/build/Legacy/Pagination/PreviousNext/PreviousNext.js +46 -40
  229. package/build/Legacy/Pagination/PreviousNext/PreviousNext.type.d.ts +0 -2
  230. package/build/Legacy/Pagination/PreviousNext/PreviousNext.type.d.ts.map +1 -1
  231. package/build/Legacy/Pagination/PreviousNext/PreviousNext.type.js +1 -26
  232. package/build/Legacy/Pagination/PreviousNext/index.d.ts +1 -1
  233. package/build/Legacy/Pagination/PreviousNext/index.d.ts.map +1 -1
  234. package/build/Legacy/Pagination/PreviousNext/index.js +3 -3
  235. package/build/Legacy/Pagination/index.js +1 -1
  236. package/build/Legacy/Popover/Popover.const.d.ts +5 -0
  237. package/build/Legacy/Popover/Popover.const.d.ts.map +1 -0
  238. package/build/Legacy/Popover/Popover.const.js +29 -0
  239. package/build/Legacy/Popover/Popover.d.ts +3 -2
  240. package/build/Legacy/Popover/Popover.d.ts.map +1 -1
  241. package/build/Legacy/Popover/Popover.js +41 -25
  242. package/build/Legacy/Popover/Popover.type.d.ts +0 -3
  243. package/build/Legacy/Popover/Popover.type.d.ts.map +1 -1
  244. package/build/Legacy/Popover/Popover.type.js +1 -25
  245. package/build/Legacy/Popover/index.d.ts +1 -1
  246. package/build/Legacy/Popover/index.d.ts.map +1 -1
  247. package/build/Legacy/Popover/index.js +4 -4
  248. package/build/Legacy/Progress/Progress.const.d.ts +4 -0
  249. package/build/Legacy/Progress/Progress.const.d.ts.map +1 -0
  250. package/build/Legacy/Progress/Progress.const.js +15 -0
  251. package/build/Legacy/Progress/Progress.d.ts +3 -2
  252. package/build/Legacy/Progress/Progress.d.ts.map +1 -1
  253. package/build/Legacy/Progress/Progress.js +15 -14
  254. package/build/Legacy/Progress/Progress.type.d.ts +0 -2
  255. package/build/Legacy/Progress/Progress.type.d.ts.map +1 -1
  256. package/build/Legacy/Progress/Progress.type.js +1 -11
  257. package/build/Legacy/Progress/index.d.ts +1 -1
  258. package/build/Legacy/Progress/index.d.ts.map +1 -1
  259. package/build/Legacy/Progress/index.js +3 -3
  260. package/build/Legacy/Select/Select.const.d.ts +4 -0
  261. package/build/Legacy/Select/Select.const.d.ts.map +1 -0
  262. package/build/Legacy/Select/Select.const.js +15 -0
  263. package/build/Legacy/Select/Select.d.ts +3 -2
  264. package/build/Legacy/Select/Select.d.ts.map +1 -1
  265. package/build/Legacy/Select/Select.js +31 -35
  266. package/build/Legacy/Select/Select.type.d.ts +0 -2
  267. package/build/Legacy/Select/Select.type.d.ts.map +1 -1
  268. package/build/Legacy/Select/Select.type.js +1 -11
  269. package/build/Legacy/Select/index.d.ts +1 -1
  270. package/build/Legacy/Select/index.d.ts.map +1 -1
  271. package/build/Legacy/Select/index.js +3 -3
  272. package/build/Legacy/SelectMenu/SelectMenu.const.d.ts +3 -0
  273. package/build/Legacy/SelectMenu/SelectMenu.const.d.ts.map +1 -0
  274. package/build/Legacy/SelectMenu/SelectMenu.const.js +10 -0
  275. package/build/Legacy/SelectMenu/SelectMenu.d.ts +3 -2
  276. package/build/Legacy/SelectMenu/SelectMenu.d.ts.map +1 -1
  277. package/build/Legacy/SelectMenu/SelectMenu.js +42 -46
  278. package/build/Legacy/SelectMenu/SelectMenu.type.d.ts +0 -1
  279. package/build/Legacy/SelectMenu/SelectMenu.type.d.ts.map +1 -1
  280. package/build/Legacy/SelectMenu/SelectMenu.type.js +1 -6
  281. package/build/Legacy/SelectMenu/index.js +1 -1
  282. package/build/Legacy/Subhead/Subhead.const.d.ts +3 -0
  283. package/build/Legacy/Subhead/Subhead.const.d.ts.map +1 -0
  284. package/build/Legacy/Subhead/Subhead.const.js +10 -0
  285. package/build/Legacy/Subhead/Subhead.d.ts +3 -2
  286. package/build/Legacy/Subhead/Subhead.d.ts.map +1 -1
  287. package/build/Legacy/Subhead/Subhead.js +12 -12
  288. package/build/Legacy/Subhead/Subhead.type.d.ts +0 -1
  289. package/build/Legacy/Subhead/Subhead.type.d.ts.map +1 -1
  290. package/build/Legacy/Subhead/Subhead.type.js +1 -6
  291. package/build/Legacy/Subhead/index.js +1 -1
  292. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.const.d.ts +6 -0
  293. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.const.d.ts.map +1 -0
  294. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.const.js +25 -0
  295. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.d.ts +3 -2
  296. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.d.ts.map +1 -1
  297. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.js +12 -9
  298. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.type.d.ts +0 -4
  299. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.type.d.ts.map +1 -1
  300. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.type.js +1 -21
  301. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterHLJS.d.ts +3 -2
  302. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterHLJS.d.ts.map +1 -1
  303. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterHLJS.js +9 -10
  304. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterPrism.d.ts +3 -2
  305. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterPrism.d.ts.map +1 -1
  306. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterPrism.js +10 -11
  307. package/build/Legacy/SyntaxHighlighter/index.d.ts +1 -1
  308. package/build/Legacy/SyntaxHighlighter/index.d.ts.map +1 -1
  309. package/build/Legacy/SyntaxHighlighter/index.js +5 -5
  310. package/build/Legacy/Toast/Toast.const.d.ts +4 -0
  311. package/build/Legacy/Toast/Toast.const.d.ts.map +1 -0
  312. package/build/Legacy/Toast/Toast.const.js +18 -0
  313. package/build/Legacy/Toast/Toast.d.ts +3 -2
  314. package/build/Legacy/Toast/Toast.d.ts.map +1 -1
  315. package/build/Legacy/Toast/Toast.js +23 -23
  316. package/build/Legacy/Toast/Toast.type.d.ts +0 -2
  317. package/build/Legacy/Toast/Toast.type.d.ts.map +1 -1
  318. package/build/Legacy/Toast/Toast.type.js +1 -14
  319. package/build/Legacy/Toast/index.d.ts +1 -1
  320. package/build/Legacy/Toast/index.d.ts.map +1 -1
  321. package/build/Legacy/Toast/index.js +3 -3
  322. package/build/Legacy/index.js +1 -1
  323. package/build/Legacy/type.d.ts +25 -2
  324. package/build/Legacy/type.d.ts.map +1 -1
  325. package/build/Modern/Avatar/Avatar.d.ts +1 -1
  326. package/build/Modern/Avatar/Avatar.d.ts.map +1 -1
  327. package/build/Modern/Avatar/Avatar.js +23 -30
  328. package/build/Modern/Avatar/index.js +1 -1
  329. package/build/Modern/AvatarStack/AvatarStack.d.ts +2 -2
  330. package/build/Modern/AvatarStack/AvatarStack.d.ts.map +1 -1
  331. package/build/Modern/AvatarStack/AvatarStack.js +53 -57
  332. package/build/Modern/AvatarStack/index.js +1 -1
  333. package/build/Modern/Flash/Flash.d.ts +1 -1
  334. package/build/Modern/Flash/Flash.d.ts.map +1 -1
  335. package/build/Modern/Flash/Flash.js +13 -17
  336. package/build/Modern/Flash/index.js +1 -1
  337. package/build/Modern/Link/Link.d.ts +5 -5
  338. package/build/Modern/Link/Link.d.ts.map +1 -1
  339. package/build/Modern/Link/Link.js +21 -25
  340. package/build/Modern/Link/index.js +1 -1
  341. package/build/Modern/Pagination/Pagination.d.ts +6 -6
  342. package/build/Modern/Pagination/Pagination.d.ts.map +1 -1
  343. package/build/Modern/Pagination/Pagination.js +69 -82
  344. package/build/Modern/Pagination/Pagination.model.d.ts +3 -2
  345. package/build/Modern/Pagination/Pagination.model.d.ts.map +1 -1
  346. package/build/Modern/Pagination/Pagination.model.js +31 -34
  347. package/build/Modern/Pagination/__tests__/Pagination.doc.md +2 -2
  348. package/build/Modern/Pagination/index.js +1 -1
  349. package/build/Modern/hooks/index.js +2 -2
  350. package/build/Modern/hooks/useMedia.d.ts +3 -3
  351. package/build/Modern/hooks/useMedia.d.ts.map +1 -1
  352. package/build/Modern/hooks/useMedia.js +30 -41
  353. package/build/Modern/hooks/useRefObjectAsForwardedRef.js +1 -3
  354. package/build/Modern/hooks/useResponsiveValue.js +6 -10
  355. package/build/Modern/index.d.ts +2 -2
  356. package/build/Modern/index.js +1 -1
  357. package/build/Modern/type.d.ts +1 -0
  358. package/build/Modern/type.d.ts.map +1 -1
  359. package/build/Modern/utils/environment.js +1 -2
  360. package/build/Modern/utils/hasInteractiveNodes.js +11 -15
  361. package/build/Modern/utils/modern-polymorphic.d.ts +2 -2
  362. package/build/Modern/utils/modern-polymorphic.d.ts.map +1 -1
  363. package/build/Modern/utils/modern-polymorphic.js +1 -1
  364. package/build/Modern/utils/polymorphic.d.ts +1 -1
  365. package/build/Modern/utils/polymorphic.d.ts.map +1 -1
  366. package/build/Modern/utils/testing.d.ts +2 -1
  367. package/build/Modern/utils/testing.d.ts.map +1 -1
  368. package/build/Modern/utils/testing.js +2 -2
  369. package/build/Modern/utils/types/ComponentProps.d.ts +2 -1
  370. package/build/Modern/utils/types/ComponentProps.d.ts.map +1 -1
  371. package/build/Modern/utils/types/Slots.d.ts +2 -1
  372. package/build/Modern/utils/types/Slots.d.ts.map +1 -1
  373. package/build/Modern/utils/types/index.js +3 -3
  374. package/build/Modern/utils/warning.js +4 -7
  375. package/build/index.d.ts +2 -2
  376. package/build/index.d.ts.map +1 -1
  377. package/build/index.js +2 -2
  378. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
- import React, { ElementType, type ForwardedRef } from 'react';
2
- import { type PolymorphicProps } from '../utils/modern-polymorphic';
1
+ import type { ElementType, ForwardedRef } from 'react';
2
+ import type { PolymorphicProps } from '../utils/modern-polymorphic';
3
3
  import type { ComponentProps } from '../utils/types';
4
4
  type StyledLinkProps<As extends ElementType = 'a'> = {
5
5
  as?: As;
@@ -8,10 +8,10 @@ type StyledLinkProps<As extends ElementType = 'a'> = {
8
8
  muted?: boolean;
9
9
  inline?: boolean;
10
10
  };
11
- export declare const UnwrappedLink: <As extends ElementType = "a">(props: PolymorphicProps<As, "a", StyledLinkProps>, ref: ForwardedRef<unknown>) => import("react/jsx-runtime").JSX.Element;
12
- export declare const Link: (<As extends ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & StyledLinkProps<"a"> extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & StyledLinkProps<"a"> ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
11
+ export declare const UnwrappedLink: <As extends ElementType = "a">(props: PolymorphicProps<As, "a", StyledLinkProps>, ref: ForwardedRef<unknown>) => import("react").JSX.Element;
12
+ export declare const Link: (<As extends ElementType = "a">(props: (import("react").ComponentPropsWithRef<ElementType extends As ? "a" : As> & StyledLinkProps<"a"> extends infer T ? T extends import("react").ComponentPropsWithRef<ElementType extends As ? "a" : As> & StyledLinkProps<"a"> ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
13
13
  as?: As;
14
- } & React.RefAttributes<unknown>) => React.ReactNode) & {
14
+ } & import("react").RefAttributes<unknown>) => import("react").ReactNode) & {
15
15
  displayName: string;
16
16
  };
17
17
  export type LinkProps = ComponentProps<typeof Link>;
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/Modern/Link/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAmB,WAAW,EAAE,KAAK,YAAY,EAAqB,MAAM,OAAO,CAAA;AAEjG,OAAO,EAAE,KAAK,gBAAgB,EAAmB,MAAM,6BAA6B,CAAA;AAEpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAGpD,KAAK,eAAe,CAAC,EAAE,SAAS,WAAW,GAAG,GAAG,IAAI;IACnD,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,EAAE,SAAS,WAAW,GAAG,GAAG,EACxD,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,eAAe,CAAC,EACjD,KAAK,YAAY,CAAC,OAAO,CAAC,4CAmC3B,CAAA;AAID,eAAO,MAAM,IAAI,IAzCa,EAAE,SAAS,WAAW;;;;CAyCqB,CAAA;AAEzE,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA"}
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/Modern/Link/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAc,WAAW,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAGlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAGnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAGpD,KAAK,eAAe,CAAC,EAAE,SAAS,WAAW,GAAG,GAAG,IAAI;IACnD,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,EAAE,SAAS,WAAW,GAAG,GAAG,EACxD,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,eAAe,CAAC,EACjD,KAAK,YAAY,CAAC,OAAO,CAAC,gCAmC3B,CAAA;AAID,eAAO,MAAM,IAAI,IAzCa,EAAE,SAAS,WAAW;;;;CAyCqB,CAAA;AAEzE,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA"}
@@ -1,32 +1,27 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.UnwrappedLink = exports.Link = void 0;
9
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
8
  var _clsx = require("clsx");
12
- var _react = _interopRequireWildcard(require("react"));
9
+ var _react = require("react");
13
10
  var _hooks = require("../hooks");
14
11
  var _modernPolymorphic = require("../utils/modern-polymorphic");
15
12
  var _LinkModule = _interopRequireDefault(require("./Link.module.scss"));
16
13
  var _jsxRuntime = require("react/jsx-runtime");
17
- var _excluded = ["as", "className", "inline", "hoverColor"];
18
14
  /* eslint-disable @typescript-eslint/consistent-type-definitions */
19
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22
- var UnwrappedLink = exports.UnwrappedLink = function UnwrappedLink(props, ref) {
23
- var _props$as = props.as,
24
- Component = _props$as === void 0 ? 'a' : _props$as,
25
- className = props.className,
26
- inline = props.inline,
27
- hoverColor = props.hoverColor,
28
- restProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
29
- var innerRef = (0, _react.useRef)(null);
15
+
16
+ const UnwrappedLink = (props, ref) => {
17
+ const {
18
+ as: Component = 'a',
19
+ className,
20
+ inline,
21
+ hoverColor,
22
+ ...restProps
23
+ } = props;
24
+ const innerRef = (0, _react.useRef)(null);
30
25
  (0, _hooks.useRefObjectAsForwardedRef)(ref, innerRef);
31
26
  if (process.env.NODE_ENV !== 'production') {
32
27
  /**
@@ -36,22 +31,23 @@ var UnwrappedLink = exports.UnwrappedLink = function UnwrappedLink(props, ref) {
36
31
  * shaving precious bytes from the output, and avoiding mounting a noop effect
37
32
  */
38
33
  // eslint-disable-next-line react-hooks/rules-of-hooks
39
- (0, _react.useEffect)(function () {
34
+ (0, _react.useEffect)(() => {
40
35
  if (innerRef.current && !(innerRef.current instanceof HTMLButtonElement) && !(innerRef.current instanceof HTMLAnchorElement)) {
41
36
  console.error('Error: Found `Link` component that renders an inaccessible element', innerRef.current, 'Please ensure `Link` always renders as <a> or <button>');
42
37
  }
43
38
  }, [innerRef]);
44
39
  }
45
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, _objectSpread(_objectSpread({
46
- className: (0, _clsx.clsx)(className, _LinkModule["default"].Link),
40
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
41
+ className: (0, _clsx.clsx)(className, _LinkModule.default.Link),
47
42
  "data-muted": restProps.muted,
48
43
  "data-inline": inline,
49
- "data-hover-color": hoverColor
50
- }, restProps), {}, {
44
+ "data-hover-color": hoverColor,
45
+ ...restProps,
51
46
  ref: innerRef
52
- }));
47
+ });
53
48
  };
54
- var LinkComponent = (0, _modernPolymorphic.fixedForwardRef)(UnwrappedLink);
55
- var Link = exports.Link = Object.assign(LinkComponent, {
49
+ exports.UnwrappedLink = UnwrappedLink;
50
+ const LinkComponent = (0, _modernPolymorphic.fixedForwardRef)(UnwrappedLink);
51
+ const Link = exports.Link = Object.assign(LinkComponent, {
56
52
  displayName: 'Link'
57
53
  });
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "Link", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _Link.Link;
10
10
  }
11
11
  });
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import type { JSX, MouseEvent, ReactNode } from 'react';
2
2
  import type { ResponsiveValue } from '../hooks/useResponsiveValue';
3
- import { type PageDataProps } from './Pagination.model';
3
+ import type { PageDataProps } from './Pagination.model';
4
4
  export type PageProps = {
5
5
  key: string;
6
- children: React.ReactNode;
6
+ children: ReactNode;
7
7
  number: number;
8
8
  className: string;
9
9
  } & Omit<PageDataProps['props'], 'as' | 'role'>;
@@ -11,12 +11,12 @@ export type PaginationProps = {
11
11
  className?: string;
12
12
  pageCount: number;
13
13
  currentPage: number;
14
- onPageChange?: (e: React.MouseEvent, n: number) => void;
14
+ onPageChange?: (e: MouseEvent, n: number) => void;
15
15
  hrefBuilder?: (n: number) => string;
16
16
  marginPageCount?: number;
17
17
  showPages?: boolean | ResponsiveValue<boolean>;
18
18
  surroundingPageCount?: number;
19
- renderPage?: (props: PageProps) => React.ReactNode;
19
+ renderPage?: (props: PageProps) => ReactNode;
20
20
  };
21
- export declare function Pagination({ className, pageCount, currentPage, onPageChange, hrefBuilder, marginPageCount, showPages, surroundingPageCount, renderPage, ...rest }: PaginationProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function Pagination({ className, pageCount, currentPage, onPageChange, hrefBuilder, marginPageCount, showPages, surroundingPageCount, renderPage, ...rest }: PaginationProps): JSX.Element;
22
22
  //# sourceMappingURL=Pagination.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/Modern/Pagination/Pagination.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA+B,MAAM,OAAO,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAElE,OAAO,EAAE,KAAK,aAAa,EAA4C,MAAM,oBAAoB,CAAA;AAejG,MAAM,MAAM,SAAS,GAAG;IAEtB,GAAG,EAAE,MAAM,CAAA;IAEX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IAEzB,MAAM,EAAE,MAAM,CAAA;IAEd,SAAS,EAAE,MAAM,CAAA;CAClB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;AAoE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACvD,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IACnC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IAC9C,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,KAAK,CAAC,SAAS,CAAA;CACnD,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAmB,EACnB,WAAgC,EAChC,eAAmB,EACnB,SAAgB,EAChB,oBAAwB,EACxB,UAAU,EACV,GAAG,IAAI,EACR,EAAE,eAAe,2CAmBjB"}
1
+ {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/Modern/Pagination/Pagination.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAgBvD,MAAM,MAAM,SAAS,GAAG;IAEtB,GAAG,EAAE,MAAM,CAAA;IAEX,QAAQ,EAAE,SAAS,CAAA;IAEnB,MAAM,EAAE,MAAM,CAAA;IAEd,SAAS,EAAE,MAAM,CAAA;CAClB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;AAoE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACjD,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IACnC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IAC9C,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAA;CAC7C,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAmB,EACnB,WAAgC,EAChC,eAAmB,EACnB,SAAgB,EAChB,oBAAwB,EACxB,UAAU,EACV,GAAG,IAAI,EACR,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAmB/B"}
@@ -1,29 +1,22 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.Pagination = Pagination;
9
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
8
  var _octiconsReact = require("@primer/octicons-react");
12
9
  var _clsx = require("clsx");
13
- var _react = _interopRequireWildcard(require("react"));
10
+ var _react = require("react");
14
11
  var _useResponsiveValue = require("../hooks/useResponsiveValue");
15
12
  var _Pagination = require("./Pagination.model");
16
13
  var _PaginationModule = _interopRequireDefault(require("./Pagination.module.scss"));
17
14
  var _jsxRuntime = require("react/jsx-runtime");
18
- var _excluded = ["className", "pageCount", "currentPage", "onPageChange", "hrefBuilder", "marginPageCount", "showPages", "surroundingPageCount", "renderPage"];
19
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable @typescript-eslint/consistent-type-definitions */
22
- var getViewportRangesToHidePages = function getViewportRangesToHidePages(showPages) {
15
+ /* eslint-disable @typescript-eslint/consistent-type-definitions */
16
+
17
+ const getViewportRangesToHidePages = showPages => {
23
18
  if (showPages && typeof showPages !== 'boolean') {
24
- return Object.keys(showPages).filter(function (key) {
25
- return !showPages[key];
26
- });
19
+ return Object.keys(showPages).filter(key => !showPages[key]);
27
20
  }
28
21
  if (showPages) {
29
22
  return [];
@@ -31,102 +24,96 @@ var getViewportRangesToHidePages = function getViewportRangesToHidePages(showPag
31
24
  return Object.keys(_useResponsiveValue.viewportRanges);
32
25
  }
33
26
  };
34
- var PageLabel = function PageLabel(_ref) {
35
- var children = _ref.children,
36
- direction = _ref.direction;
37
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
38
- children: [direction === 'page-prev' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.ChevronLeftIcon, {}) : null, children, direction === 'page-next' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.ChevronRightIcon, {}) : null]
39
- });
40
- };
41
- function usePaginationPages(_ref2) {
42
- var pageCount = _ref2.pageCount,
43
- currentPage = _ref2.currentPage,
44
- onPageChange = _ref2.onPageChange,
45
- hrefBuilder = _ref2.hrefBuilder,
46
- marginPageCount = _ref2.marginPageCount,
47
- showPages = _ref2.showPages,
48
- surroundingPageCount = _ref2.surroundingPageCount,
49
- renderPage = _ref2.renderPage;
50
- var pageChange = (0, _react.useCallback)(function (n) {
51
- return function (e) {
52
- return onPageChange(e, n);
53
- };
54
- }, [onPageChange]);
55
- var model = (0, _react.useMemo)(function () {
27
+ const PageLabel = ({
28
+ children,
29
+ direction
30
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
31
+ children: [direction === 'page-prev' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.ChevronLeftIcon, {}) : null, children, direction === 'page-next' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.ChevronRightIcon, {}) : null]
32
+ });
33
+ function usePaginationPages({
34
+ pageCount,
35
+ currentPage,
36
+ onPageChange,
37
+ hrefBuilder,
38
+ marginPageCount,
39
+ showPages,
40
+ surroundingPageCount,
41
+ renderPage
42
+ }) {
43
+ const pageChange = (0, _react.useCallback)(n => e => onPageChange(e, n), [onPageChange]);
44
+ const model = (0, _react.useMemo)(() => {
56
45
  return (0, _Pagination.buildPaginationModel)(pageCount, currentPage, !!showPages, marginPageCount, surroundingPageCount);
57
46
  }, [pageCount, currentPage, showPages, marginPageCount, surroundingPageCount]);
58
- var children = (0, _react.useMemo)(function () {
59
- return model.map(function (page) {
60
- var _buildComponentData = (0, _Pagination.buildComponentData)(page, hrefBuilder, pageChange(page.num)),
61
- props = _buildComponentData.props,
62
- key = _buildComponentData.key,
63
- content = _buildComponentData.content;
47
+ const children = (0, _react.useMemo)(() => {
48
+ return model.map(page => {
49
+ const {
50
+ props,
51
+ key,
52
+ content
53
+ } = (0, _Pagination.buildComponentData)(page, hrefBuilder, pageChange(page.num));
64
54
  if (renderPage && props.as !== 'span') {
65
- return renderPage(_objectSpread({
66
- key: key,
55
+ return renderPage({
56
+ key,
67
57
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PageLabel, {
68
58
  direction: key,
69
59
  children: content
70
60
  }),
71
61
  number: page.num,
72
- className: _PaginationModule["default"].Page
73
- }, props));
62
+ className: _PaginationModule.default.Page,
63
+ ...props
64
+ });
74
65
  }
75
- var Component = props.as || 'a';
66
+ const Component = props.as || 'a';
76
67
  return (
77
68
  /*#__PURE__*/
78
69
  // @ts-ignore giving me grief about children and "as" props
79
- (0, _jsxRuntime.jsx)(Component, _objectSpread(_objectSpread({
80
- className: (0, _clsx.clsx)(_PaginationModule["default"].Page)
81
- }, props), {}, {
70
+ (0, _jsxRuntime.jsx)(Component, {
71
+ className: (0, _clsx.clsx)(_PaginationModule.default.Page),
72
+ ...props,
82
73
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PageLabel, {
83
74
  direction: key,
84
75
  children: content
85
76
  })
86
- }), key)
77
+ }, key)
87
78
  );
88
79
  });
89
80
  }, [model, hrefBuilder, pageChange, renderPage]);
90
81
  return children;
91
82
  }
92
- function Pagination(_ref3) {
93
- var className = _ref3.className,
94
- pageCount = _ref3.pageCount,
95
- currentPage = _ref3.currentPage,
96
- _ref3$onPageChange = _ref3.onPageChange,
97
- onPageChange = _ref3$onPageChange === void 0 ? noop : _ref3$onPageChange,
98
- _ref3$hrefBuilder = _ref3.hrefBuilder,
99
- hrefBuilder = _ref3$hrefBuilder === void 0 ? defaultHrefBuilder : _ref3$hrefBuilder,
100
- _ref3$marginPageCount = _ref3.marginPageCount,
101
- marginPageCount = _ref3$marginPageCount === void 0 ? 1 : _ref3$marginPageCount,
102
- _ref3$showPages = _ref3.showPages,
103
- showPages = _ref3$showPages === void 0 ? true : _ref3$showPages,
104
- _ref3$surroundingPage = _ref3.surroundingPageCount,
105
- surroundingPageCount = _ref3$surroundingPage === void 0 ? 2 : _ref3$surroundingPage,
106
- renderPage = _ref3.renderPage,
107
- rest = (0, _objectWithoutProperties2["default"])(_ref3, _excluded);
108
- var pageElements = usePaginationPages({
109
- pageCount: pageCount,
110
- currentPage: currentPage,
111
- onPageChange: onPageChange,
112
- hrefBuilder: hrefBuilder,
113
- marginPageCount: marginPageCount,
114
- showPages: showPages,
115
- surroundingPageCount: surroundingPageCount,
116
- renderPage: renderPage
83
+ function Pagination({
84
+ className,
85
+ pageCount,
86
+ currentPage,
87
+ onPageChange = noop,
88
+ hrefBuilder = defaultHrefBuilder,
89
+ marginPageCount = 1,
90
+ showPages = true,
91
+ surroundingPageCount = 2,
92
+ renderPage,
93
+ ...rest
94
+ }) {
95
+ const pageElements = usePaginationPages({
96
+ pageCount,
97
+ currentPage,
98
+ onPageChange,
99
+ hrefBuilder,
100
+ marginPageCount,
101
+ showPages,
102
+ surroundingPageCount,
103
+ renderPage
117
104
  });
118
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("nav", _objectSpread(_objectSpread({
119
- className: (0, _clsx.clsx)(_PaginationModule["default"].PaginationContainer, className),
120
- "aria-label": "Pagination"
121
- }, rest), {}, {
105
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("nav", {
106
+ className: (0, _clsx.clsx)(_PaginationModule.default.PaginationContainer, className),
107
+ "aria-label": "Pagination",
108
+ ...rest,
122
109
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
123
- className: _PaginationModule["default"].TablePaginationSteps,
110
+ className: _PaginationModule.default.TablePaginationSteps,
124
111
  "data-hidden-viewport-ranges": getViewportRangesToHidePages(showPages).join(' '),
125
112
  children: pageElements
126
113
  })
127
- }));
114
+ });
128
115
  }
129
116
  function defaultHrefBuilder(pageNum) {
130
- return "#".concat(pageNum);
117
+ return `#${pageNum}`;
131
118
  }
132
119
  function noop() {}
@@ -1,3 +1,4 @@
1
+ import type { MouseEvent } from 'react';
1
2
  export declare function buildPaginationModel(pageCount: number, currentPage: number, showPages: boolean, marginPageCount: number, surroundingPageCount: number): PageType[];
2
3
  interface PageType {
3
4
  type: string;
@@ -14,13 +15,13 @@ export interface PageDataProps {
14
15
  'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | boolean;
15
16
  'aria-hidden'?: boolean;
16
17
  'aria-disabled'?: boolean;
17
- onClick?: (e: React.MouseEvent) => void;
18
+ onClick?: (e: MouseEvent) => void;
18
19
  as?: string;
19
20
  role?: string;
20
21
  };
21
22
  key: string;
22
23
  content: string;
23
24
  }
24
- export declare function buildComponentData(page: PageType, hrefBuilder: (n: number) => string, onClick: (e: React.MouseEvent) => void): PageDataProps;
25
+ export declare function buildComponentData(page: PageType, hrefBuilder: (n: number) => string, onClick: (e: MouseEvent) => void): PageDataProps;
25
26
  export {};
26
27
  //# sourceMappingURL=Pagination.model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.model.d.ts","sourceRoot":"","sources":["../../../src/Modern/Pagination/Pagination.model.tsx"],"names":[],"mappings":"AACA,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,EAClB,eAAe,EAAE,MAAM,EACvB,oBAAoB,EAAE,MAAM,cAsH7B;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;QAC5F,aAAa,CAAC,EAAE,OAAO,CAAA;QACvB,eAAe,CAAC,EAAE,OAAO,CAAA;QACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAA;QACvC,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,EACd,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,GACrC,aAAa,CA4Df"}
1
+ {"version":3,"file":"Pagination.model.d.ts","sourceRoot":"","sources":["../../../src/Modern/Pagination/Pagination.model.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEvC,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,EAClB,eAAe,EAAE,MAAM,EACvB,oBAAoB,EAAE,MAAM,cAsH7B;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;QAC5F,aAAa,CAAC,EAAE,OAAO,CAAA;QACvB,eAAe,CAAC,EAAE,OAAO,CAAA;QACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;QACjC,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,GAAG,aAAa,CA4DtI"}
@@ -1,22 +1,19 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.buildComponentData = buildComponentData;
8
7
  exports.buildPaginationModel = buildPaginationModel;
9
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
8
  /* eslint-disable @typescript-eslint/no-inferrable-types */
9
+
13
10
  function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount, surroundingPageCount) {
14
- var prev = {
11
+ const prev = {
15
12
  type: 'PREV',
16
13
  num: currentPage - 1,
17
14
  disabled: currentPage === 1
18
15
  };
19
- var next = {
16
+ const next = {
20
17
  type: 'NEXT',
21
18
  num: currentPage + 1,
22
19
  disabled: currentPage === pageCount
@@ -25,26 +22,27 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
25
22
  return [prev, next];
26
23
  }
27
24
  if (pageCount <= 0) {
28
- return [prev, _objectSpread(_objectSpread({}, next), {}, {
25
+ return [prev, {
26
+ ...next,
29
27
  disabled: true
30
- })];
28
+ }];
31
29
  }
32
- var pages = [];
30
+ const pages = [];
33
31
 
34
32
  // number of pages shown on each side of the current page
35
33
  // [1, ..., 7, 8, _9_, 10, 11, ..., 15]
36
34
  // standardGap: 3
37
- var standardGap = surroundingPageCount + marginPageCount;
35
+ const standardGap = surroundingPageCount + marginPageCount;
38
36
 
39
37
  // the maximum number of pages that can be shown at a given time (account for current page, left and right ellipsis)
40
38
  // [1, ..., 7, 8, _9_, 10, 11, ..., 15]
41
39
  // maxVisiblePages: 9
42
- var maxVisiblePages = standardGap + standardGap + 3;
40
+ const maxVisiblePages = standardGap + standardGap + 3;
43
41
 
44
42
  // if the number of pages is less than the maximum number of pages that can be shown just return all of them
45
43
  if (pageCount <= maxVisiblePages) {
46
44
  addPages(1, pageCount, false);
47
- return [prev].concat(pages, [next]);
45
+ return [prev, ...pages, next];
48
46
  }
49
47
 
50
48
  // startGap is the number of pages hidden by the start ellipsis
@@ -56,8 +54,8 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
56
54
  // [1, _2_, 3, 4, 5, 6, ..., 15]
57
55
  // startGap = 0
58
56
  // startOffset: -3 <--
59
- var startGap = 0;
60
- var startOffset = 0;
57
+ let startGap = 0;
58
+ let startOffset = 0;
61
59
 
62
60
  // When there is overlap
63
61
  if (currentPage - standardGap - 1 <= 1) {
@@ -67,8 +65,8 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
67
65
  }
68
66
 
69
67
  // These are equivalent to startGap and startOffset but at the end of the list
70
- var endGap = 0;
71
- var endOffset = 0;
68
+ let endGap = 0;
69
+ let endOffset = 0;
72
70
 
73
71
  // When there is overlap
74
72
  if (pageCount - currentPage - standardGap <= 1) {
@@ -76,8 +74,8 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
76
74
  } else {
77
75
  endGap = pageCount - currentPage - standardGap;
78
76
  }
79
- var hasStartEllipsis = startGap > 0;
80
- var hasEndEllipsis = endGap > 0;
77
+ const hasStartEllipsis = startGap > 0;
78
+ const hasEndEllipsis = endGap > 0;
81
79
 
82
80
  // add pages "before" the start ellipsis (if any)
83
81
  // [1, ..., 7, 8, _9_, 10, 11, ..., 15]
@@ -112,16 +110,15 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
112
110
  // endOffset: 0
113
111
  // addPages(15, 15)
114
112
  addPages(pageCount - marginPageCount + 1, pageCount);
115
- return [prev].concat(pages, [next]);
113
+ return [prev, ...pages, next];
116
114
  function addEllipsis(previousPage) {
117
115
  pages.push({
118
116
  type: 'BREAK',
119
117
  num: previousPage + 1
120
118
  });
121
119
  }
122
- function addPages(start, end) {
123
- var precedesBreak = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
124
- for (var i = start; i <= end; i++) {
120
+ function addPages(start, end, precedesBreak = false) {
121
+ for (let i = start; i <= end; i++) {
125
122
  pages.push({
126
123
  type: 'NUM',
127
124
  num: i,
@@ -132,9 +129,9 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
132
129
  }
133
130
  }
134
131
  function buildComponentData(page, hrefBuilder, onClick) {
135
- var props = {};
136
- var content = '';
137
- var key = '';
132
+ const props = {};
133
+ let content = '';
134
+ let key = '';
138
135
  switch (page.type) {
139
136
  case 'PREV':
140
137
  {
@@ -152,7 +149,7 @@ function buildComponentData(page, hrefBuilder, onClick) {
152
149
  href: hrefBuilder(page.num),
153
150
  'aria-label': 'Previous Page',
154
151
  'data-testid': 'page-prev',
155
- onClick: onClick
152
+ onClick
156
153
  });
157
154
  }
158
155
  break;
@@ -173,29 +170,29 @@ function buildComponentData(page, hrefBuilder, onClick) {
173
170
  href: hrefBuilder(page.num),
174
171
  'aria-label': 'Next Page',
175
172
  'data-testid': 'page-next',
176
- onClick: onClick
173
+ onClick
177
174
  });
178
175
  }
179
176
  break;
180
177
  }
181
178
  case 'NUM':
182
179
  {
183
- key = "page-".concat(page.num);
180
+ key = `page-${page.num}`;
184
181
  content = String(page.num);
185
182
  Object.assign(props, {
186
183
  href: hrefBuilder(page.num),
187
184
  // We append "..." to the aria-label for pages that preceed a break because screen readers will
188
185
  // change the tone the text is read in.
189
186
  // This is a slightly nicer experience than skipping a bunch of numbers unexpectedly.
190
- 'aria-label': "Page ".concat(page.num).concat(page.precedesBreak ? '...' : ''),
187
+ 'aria-label': `Page ${page.num}${page.precedesBreak ? '...' : ''}`,
191
188
  'aria-current': page.selected ? 'page' : undefined,
192
- onClick: onClick
189
+ onClick
193
190
  });
194
191
  break;
195
192
  }
196
193
  case 'BREAK':
197
194
  {
198
- key = "page-".concat(page.num, "-break");
195
+ key = `page-${page.num}-break`;
199
196
  content = '…';
200
197
  Object.assign(props, {
201
198
  as: 'span',
@@ -204,8 +201,8 @@ function buildComponentData(page, hrefBuilder, onClick) {
204
201
  }
205
202
  }
206
203
  return {
207
- props: props,
208
- key: key,
209
- content: content
204
+ props,
205
+ key,
206
+ content
210
207
  };
211
208
  }
@@ -11,12 +11,12 @@ export type PaginationProps = {
11
11
  className?: string
12
12
  pageCount: number
13
13
  currentPage: number
14
- onPageChange?: (e: React.MouseEvent, n: number) => void
14
+ onPageChange?: (e: MouseEvent, n: number) => void
15
15
  hrefBuilder?: (n: number) => string
16
16
  marginPageCount?: number
17
17
  showPages?: boolean | ResponsiveValue<boolean>
18
18
  surroundingPageCount?: number
19
- renderPage?: (props: PageProps) => React.ReactNode
19
+ renderPage?: (props: PageProps) => ReactNode
20
20
  }
21
21
  ```
22
22
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "Pagination", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _Pagination.Pagination;
10
10
  }
11
11
  });
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "useMedia", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _useMedia.useMedia;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "useRefObjectAsForwardedRef", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _useRefObjectAsForwardedRef.useRefObjectAsForwardedRef;
16
16
  }
17
17
  });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  /**
3
3
  * `useMedia` will use the given `mediaQueryString` with `matchMedia` to
4
4
  * determine if the document matches the media query string.
@@ -15,7 +15,7 @@ import React from 'react';
15
15
  export declare function useMedia(mediaQueryString: string, defaultState?: boolean): boolean;
16
16
  type MediaQueryFeatures = Record<string, boolean | undefined>;
17
17
  interface MatchMediaProps {
18
- children: React.ReactNode;
18
+ children: ReactNode;
19
19
  features?: MediaQueryFeatures;
20
20
  }
21
21
  /**
@@ -32,6 +32,6 @@ interface MatchMediaProps {
32
32
  * <Children />
33
33
  * </MatchMedia>
34
34
  */
35
- export declare function MatchMedia({ children, features }: MatchMediaProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function MatchMedia({ children, features }: MatchMediaProps): import("react").JSX.Element;
36
36
  export {};
37
37
  //# sourceMappingURL=useMedia.d.ts.map