@papillonarts/components 0.49.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 (344) 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 +2 -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 +0 -2
  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/index.d.ts +1 -1
  12. package/build/Legacy/Alert/index.d.ts.map +1 -1
  13. package/build/Legacy/Alert/index.js +3 -3
  14. package/build/Legacy/Blankslate/Blankslate.const.d.ts +4 -0
  15. package/build/Legacy/Blankslate/Blankslate.const.d.ts.map +1 -0
  16. package/build/Legacy/Blankslate/Blankslate.const.js +18 -0
  17. package/build/Legacy/Blankslate/Blankslate.d.ts +1 -1
  18. package/build/Legacy/Blankslate/Blankslate.d.ts.map +1 -1
  19. package/build/Legacy/Blankslate/Blankslate.js +17 -14
  20. package/build/Legacy/Blankslate/Blankslate.type.d.ts +0 -2
  21. package/build/Legacy/Blankslate/Blankslate.type.d.ts.map +1 -1
  22. package/build/Legacy/Blankslate/Blankslate.type.js +1 -14
  23. package/build/Legacy/Blankslate/index.d.ts +1 -1
  24. package/build/Legacy/Blankslate/index.d.ts.map +1 -1
  25. package/build/Legacy/Blankslate/index.js +3 -3
  26. package/build/Legacy/Breadcrumb/Breadcrumb.const.d.ts +4 -0
  27. package/build/Legacy/Breadcrumb/Breadcrumb.const.d.ts.map +1 -0
  28. package/build/Legacy/Breadcrumb/Breadcrumb.const.js +14 -0
  29. package/build/Legacy/Breadcrumb/Breadcrumb.d.ts +1 -1
  30. package/build/Legacy/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  31. package/build/Legacy/Breadcrumb/Breadcrumb.js +50 -46
  32. package/build/Legacy/Breadcrumb/Breadcrumb.type.d.ts +0 -2
  33. package/build/Legacy/Breadcrumb/Breadcrumb.type.d.ts.map +1 -1
  34. package/build/Legacy/Breadcrumb/Breadcrumb.type.js +1 -10
  35. package/build/Legacy/Breadcrumb/index.d.ts +1 -1
  36. package/build/Legacy/Breadcrumb/index.d.ts.map +1 -1
  37. package/build/Legacy/Breadcrumb/index.js +3 -3
  38. package/build/Legacy/Button/Button.const.d.ts +9 -0
  39. package/build/Legacy/Button/Button.const.d.ts.map +1 -0
  40. package/build/Legacy/Button/Button.const.js +48 -0
  41. package/build/Legacy/Button/Button.d.ts +1 -1
  42. package/build/Legacy/Button/Button.d.ts.map +1 -1
  43. package/build/Legacy/Button/Button.js +60 -66
  44. package/build/Legacy/Button/Button.type.d.ts +0 -7
  45. package/build/Legacy/Button/Button.type.d.ts.map +1 -1
  46. package/build/Legacy/Button/Button.type.js +1 -44
  47. package/build/Legacy/Button/index.d.ts +1 -1
  48. package/build/Legacy/Button/index.d.ts.map +1 -1
  49. package/build/Legacy/Button/index.js +8 -8
  50. package/build/Legacy/Dropdown/Dropdown.const.d.ts +4 -0
  51. package/build/Legacy/Dropdown/Dropdown.const.d.ts.map +1 -0
  52. package/build/Legacy/Dropdown/Dropdown.const.js +18 -0
  53. package/build/Legacy/Dropdown/Dropdown.d.ts +1 -1
  54. package/build/Legacy/Dropdown/Dropdown.d.ts.map +1 -1
  55. package/build/Legacy/Dropdown/Dropdown.js +49 -51
  56. package/build/Legacy/Dropdown/Dropdown.type.d.ts +0 -2
  57. package/build/Legacy/Dropdown/Dropdown.type.d.ts.map +1 -1
  58. package/build/Legacy/Dropdown/Dropdown.type.js +1 -14
  59. package/build/Legacy/Dropdown/index.d.ts +2 -1
  60. package/build/Legacy/Dropdown/index.d.ts.map +1 -1
  61. package/build/Legacy/Dropdown/index.js +3 -3
  62. package/build/Legacy/ErrorBoundary/ErrorBoundary.d.ts +3 -2
  63. package/build/Legacy/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  64. package/build/Legacy/ErrorBoundary/ErrorBoundary.js +31 -45
  65. package/build/Legacy/ErrorBoundary/index.js +1 -1
  66. package/build/Legacy/Form/Checkbox/Checkbox.const.d.ts +5 -0
  67. package/build/Legacy/Form/Checkbox/Checkbox.const.d.ts.map +1 -0
  68. package/build/Legacy/Form/Checkbox/Checkbox.const.js +22 -0
  69. package/build/Legacy/Form/Checkbox/Checkbox.d.ts +1 -1
  70. package/build/Legacy/Form/Checkbox/Checkbox.d.ts.map +1 -1
  71. package/build/Legacy/Form/Checkbox/Checkbox.js +22 -25
  72. package/build/Legacy/Form/Checkbox/Checkbox.type.d.ts +0 -3
  73. package/build/Legacy/Form/Checkbox/Checkbox.type.d.ts.map +1 -1
  74. package/build/Legacy/Form/Checkbox/Checkbox.type.js +1 -18
  75. package/build/Legacy/Form/Checkbox/index.d.ts +1 -1
  76. package/build/Legacy/Form/Checkbox/index.d.ts.map +1 -1
  77. package/build/Legacy/Form/Checkbox/index.js +3 -3
  78. package/build/Legacy/Form/Input/Input.const.d.ts +5 -0
  79. package/build/Legacy/Form/Input/Input.const.d.ts.map +1 -0
  80. package/build/Legacy/Form/Input/Input.const.js +30 -0
  81. package/build/Legacy/Form/Input/Input.d.ts +1 -1
  82. package/build/Legacy/Form/Input/Input.d.ts.map +1 -1
  83. package/build/Legacy/Form/Input/Input.js +25 -32
  84. package/build/Legacy/Form/Input/Input.type.d.ts +0 -3
  85. package/build/Legacy/Form/Input/Input.type.d.ts.map +1 -1
  86. package/build/Legacy/Form/Input/Input.type.js +1 -26
  87. package/build/Legacy/Form/Input/index.d.ts +1 -1
  88. package/build/Legacy/Form/Input/index.d.ts.map +1 -1
  89. package/build/Legacy/Form/Input/index.js +4 -4
  90. package/build/Legacy/Form/Radio/Radio.const.d.ts +5 -0
  91. package/build/Legacy/Form/Radio/Radio.const.d.ts.map +1 -0
  92. package/build/Legacy/Form/Radio/Radio.const.js +22 -0
  93. package/build/Legacy/Form/Radio/Radio.d.ts +1 -1
  94. package/build/Legacy/Form/Radio/Radio.d.ts.map +1 -1
  95. package/build/Legacy/Form/Radio/Radio.js +19 -24
  96. package/build/Legacy/Form/Radio/Radio.type.d.ts +0 -3
  97. package/build/Legacy/Form/Radio/Radio.type.d.ts.map +1 -1
  98. package/build/Legacy/Form/Radio/Radio.type.js +1 -18
  99. package/build/Legacy/Form/Radio/index.d.ts +1 -1
  100. package/build/Legacy/Form/Radio/index.d.ts.map +1 -1
  101. package/build/Legacy/Form/Radio/index.js +3 -3
  102. package/build/Legacy/Form/index.js +1 -1
  103. package/build/Legacy/Grid/DisplayTable/DisplayTable.const.d.ts +3 -0
  104. package/build/Legacy/Grid/DisplayTable/DisplayTable.const.d.ts.map +1 -0
  105. package/build/Legacy/Grid/DisplayTable/DisplayTable.const.js +11 -0
  106. package/build/Legacy/Grid/DisplayTable/DisplayTable.d.ts +1 -1
  107. package/build/Legacy/Grid/DisplayTable/DisplayTable.d.ts.map +1 -1
  108. package/build/Legacy/Grid/DisplayTable/DisplayTable.js +26 -31
  109. package/build/Legacy/Grid/DisplayTable/DisplayTable.type.d.ts +0 -1
  110. package/build/Legacy/Grid/DisplayTable/DisplayTable.type.d.ts.map +1 -1
  111. package/build/Legacy/Grid/DisplayTable/DisplayTable.type.js +1 -7
  112. package/build/Legacy/Grid/DisplayTable/index.js +1 -1
  113. package/build/Legacy/Grid/FlexGrid/FlexGrid.const.d.ts +5 -0
  114. package/build/Legacy/Grid/FlexGrid/FlexGrid.const.d.ts.map +1 -0
  115. package/build/Legacy/Grid/FlexGrid/FlexGrid.const.js +28 -0
  116. package/build/Legacy/Grid/FlexGrid/FlexGrid.d.ts +1 -1
  117. package/build/Legacy/Grid/FlexGrid/FlexGrid.d.ts.map +1 -1
  118. package/build/Legacy/Grid/FlexGrid/FlexGrid.js +148 -167
  119. package/build/Legacy/Grid/FlexGrid/FlexGrid.type.d.ts +1 -4
  120. package/build/Legacy/Grid/FlexGrid/FlexGrid.type.d.ts.map +1 -1
  121. package/build/Legacy/Grid/FlexGrid/FlexGrid.type.js +1 -24
  122. package/build/Legacy/Grid/FlexGrid/index.d.ts +1 -1
  123. package/build/Legacy/Grid/FlexGrid/index.d.ts.map +1 -1
  124. package/build/Legacy/Grid/FlexGrid/index.js +4 -4
  125. package/build/Legacy/Grid/index.js +1 -1
  126. package/build/Legacy/Icon/Icon.const.d.ts +656 -0
  127. package/build/Legacy/Icon/Icon.const.d.ts.map +1 -0
  128. package/build/Legacy/Icon/Icon.const.js +678 -0
  129. package/build/Legacy/Icon/Icon.d.ts +1 -1
  130. package/build/Legacy/Icon/Icon.d.ts.map +1 -1
  131. package/build/Legacy/Icon/Icon.js +33 -44
  132. package/build/Legacy/Icon/Icon.part.js +645 -645
  133. package/build/Legacy/Icon/Icon.type.d.ts +0 -654
  134. package/build/Legacy/Icon/Icon.type.d.ts.map +1 -1
  135. package/build/Legacy/Icon/Icon.type.js +1 -674
  136. package/build/Legacy/Icon/index.d.ts +1 -1
  137. package/build/Legacy/Icon/index.d.ts.map +1 -1
  138. package/build/Legacy/Icon/index.js +4 -4
  139. package/build/Legacy/Label/Label.const.d.ts +6 -0
  140. package/build/Legacy/Label/Label.const.d.ts.map +1 -0
  141. package/build/Legacy/Label/Label.const.js +26 -0
  142. package/build/Legacy/Label/Label.d.ts +1 -1
  143. package/build/Legacy/Label/Label.d.ts.map +1 -1
  144. package/build/Legacy/Label/Label.js +16 -15
  145. package/build/Legacy/Label/Label.type.d.ts +0 -4
  146. package/build/Legacy/Label/Label.type.d.ts.map +1 -1
  147. package/build/Legacy/Label/Label.type.js +1 -22
  148. package/build/Legacy/Label/index.js +1 -1
  149. package/build/Legacy/Loader/Loader.const.d.ts +4 -0
  150. package/build/Legacy/Loader/Loader.const.d.ts.map +1 -0
  151. package/build/Legacy/Loader/Loader.const.js +15 -0
  152. package/build/Legacy/Loader/Loader.d.ts +1 -1
  153. package/build/Legacy/Loader/Loader.d.ts.map +1 -1
  154. package/build/Legacy/Loader/Loader.js +19 -19
  155. package/build/Legacy/Loader/Loader.type.d.ts +0 -2
  156. package/build/Legacy/Loader/Loader.type.d.ts.map +1 -1
  157. package/build/Legacy/Loader/Loader.type.js +1 -11
  158. package/build/Legacy/Loader/index.d.ts +1 -1
  159. package/build/Legacy/Loader/index.d.ts.map +1 -1
  160. package/build/Legacy/Loader/index.js +3 -3
  161. package/build/Legacy/Markdown/Markdown.const.d.ts +4 -0
  162. package/build/Legacy/Markdown/Markdown.const.d.ts.map +1 -0
  163. package/build/Legacy/Markdown/Markdown.const.js +14 -0
  164. package/build/Legacy/Markdown/Markdown.d.ts +1 -1
  165. package/build/Legacy/Markdown/Markdown.d.ts.map +1 -1
  166. package/build/Legacy/Markdown/Markdown.js +20 -16
  167. package/build/Legacy/Markdown/Markdown.type.d.ts +0 -2
  168. package/build/Legacy/Markdown/Markdown.type.d.ts.map +1 -1
  169. package/build/Legacy/Markdown/Markdown.type.js +1 -10
  170. package/build/Legacy/Markdown/index.js +1 -1
  171. package/build/Legacy/Navigation/Menu/Menu.const.d.ts +3 -0
  172. package/build/Legacy/Navigation/Menu/Menu.const.d.ts.map +1 -0
  173. package/build/Legacy/Navigation/Menu/Menu.const.js +10 -0
  174. package/build/Legacy/Navigation/Menu/Menu.d.ts +1 -1
  175. package/build/Legacy/Navigation/Menu/Menu.d.ts.map +1 -1
  176. package/build/Legacy/Navigation/Menu/Menu.js +40 -42
  177. package/build/Legacy/Navigation/Menu/Menu.type.d.ts +0 -1
  178. package/build/Legacy/Navigation/Menu/Menu.type.d.ts.map +1 -1
  179. package/build/Legacy/Navigation/Menu/Menu.type.js +1 -6
  180. package/build/Legacy/Navigation/Menu/index.js +1 -1
  181. package/build/Legacy/Navigation/TabNav/TabNav.const.d.ts +4 -0
  182. package/build/Legacy/Navigation/TabNav/TabNav.const.d.ts.map +1 -0
  183. package/build/Legacy/Navigation/TabNav/TabNav.const.js +16 -0
  184. package/build/Legacy/Navigation/TabNav/TabNav.d.ts +1 -1
  185. package/build/Legacy/Navigation/TabNav/TabNav.d.ts.map +1 -1
  186. package/build/Legacy/Navigation/TabNav/TabNav.js +79 -79
  187. package/build/Legacy/Navigation/TabNav/TabNav.type.d.ts +1 -3
  188. package/build/Legacy/Navigation/TabNav/TabNav.type.d.ts.map +1 -1
  189. package/build/Legacy/Navigation/TabNav/TabNav.type.js +1 -12
  190. package/build/Legacy/Navigation/TabNav/index.d.ts +1 -1
  191. package/build/Legacy/Navigation/TabNav/index.d.ts.map +1 -1
  192. package/build/Legacy/Navigation/TabNav/index.js +3 -3
  193. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.const.d.ts +5 -0
  194. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.const.d.ts.map +1 -0
  195. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.const.js +20 -0
  196. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.d.ts +1 -1
  197. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.d.ts.map +1 -1
  198. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.js +64 -63
  199. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.type.d.ts +0 -3
  200. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.type.d.ts.map +1 -1
  201. package/build/Legacy/Navigation/UnderlineNav/UnderlineNav.type.js +1 -16
  202. package/build/Legacy/Navigation/UnderlineNav/index.d.ts +1 -1
  203. package/build/Legacy/Navigation/UnderlineNav/index.d.ts.map +1 -1
  204. package/build/Legacy/Navigation/UnderlineNav/index.js +4 -4
  205. package/build/Legacy/Navigation/index.js +1 -1
  206. package/build/Legacy/Pagination/PreviousNext/PreviousNext.const.d.ts +4 -0
  207. package/build/Legacy/Pagination/PreviousNext/PreviousNext.const.d.ts.map +1 -0
  208. package/build/Legacy/Pagination/PreviousNext/PreviousNext.const.js +30 -0
  209. package/build/Legacy/Pagination/PreviousNext/PreviousNext.d.ts +1 -1
  210. package/build/Legacy/Pagination/PreviousNext/PreviousNext.d.ts.map +1 -1
  211. package/build/Legacy/Pagination/PreviousNext/PreviousNext.js +46 -40
  212. package/build/Legacy/Pagination/PreviousNext/PreviousNext.type.d.ts +0 -2
  213. package/build/Legacy/Pagination/PreviousNext/PreviousNext.type.d.ts.map +1 -1
  214. package/build/Legacy/Pagination/PreviousNext/PreviousNext.type.js +1 -26
  215. package/build/Legacy/Pagination/PreviousNext/index.d.ts +1 -1
  216. package/build/Legacy/Pagination/PreviousNext/index.d.ts.map +1 -1
  217. package/build/Legacy/Pagination/PreviousNext/index.js +3 -3
  218. package/build/Legacy/Pagination/index.js +1 -1
  219. package/build/Legacy/Popover/Popover.const.d.ts +5 -0
  220. package/build/Legacy/Popover/Popover.const.d.ts.map +1 -0
  221. package/build/Legacy/Popover/Popover.const.js +29 -0
  222. package/build/Legacy/Popover/Popover.d.ts +1 -1
  223. package/build/Legacy/Popover/Popover.d.ts.map +1 -1
  224. package/build/Legacy/Popover/Popover.js +41 -25
  225. package/build/Legacy/Popover/Popover.type.d.ts +0 -3
  226. package/build/Legacy/Popover/Popover.type.d.ts.map +1 -1
  227. package/build/Legacy/Popover/Popover.type.js +1 -25
  228. package/build/Legacy/Popover/index.d.ts +1 -1
  229. package/build/Legacy/Popover/index.d.ts.map +1 -1
  230. package/build/Legacy/Popover/index.js +4 -4
  231. package/build/Legacy/Progress/Progress.const.d.ts +4 -0
  232. package/build/Legacy/Progress/Progress.const.d.ts.map +1 -0
  233. package/build/Legacy/Progress/Progress.const.js +15 -0
  234. package/build/Legacy/Progress/Progress.d.ts +1 -1
  235. package/build/Legacy/Progress/Progress.d.ts.map +1 -1
  236. package/build/Legacy/Progress/Progress.js +15 -14
  237. package/build/Legacy/Progress/Progress.type.d.ts +0 -2
  238. package/build/Legacy/Progress/Progress.type.d.ts.map +1 -1
  239. package/build/Legacy/Progress/Progress.type.js +1 -11
  240. package/build/Legacy/Progress/index.d.ts +1 -1
  241. package/build/Legacy/Progress/index.d.ts.map +1 -1
  242. package/build/Legacy/Progress/index.js +3 -3
  243. package/build/Legacy/Select/Select.const.d.ts +4 -0
  244. package/build/Legacy/Select/Select.const.d.ts.map +1 -0
  245. package/build/Legacy/Select/Select.const.js +15 -0
  246. package/build/Legacy/Select/Select.d.ts +1 -1
  247. package/build/Legacy/Select/Select.d.ts.map +1 -1
  248. package/build/Legacy/Select/Select.js +31 -35
  249. package/build/Legacy/Select/Select.type.d.ts +0 -2
  250. package/build/Legacy/Select/Select.type.d.ts.map +1 -1
  251. package/build/Legacy/Select/Select.type.js +1 -11
  252. package/build/Legacy/Select/index.d.ts +1 -1
  253. package/build/Legacy/Select/index.d.ts.map +1 -1
  254. package/build/Legacy/Select/index.js +3 -3
  255. package/build/Legacy/SelectMenu/SelectMenu.const.d.ts +3 -0
  256. package/build/Legacy/SelectMenu/SelectMenu.const.d.ts.map +1 -0
  257. package/build/Legacy/SelectMenu/SelectMenu.const.js +10 -0
  258. package/build/Legacy/SelectMenu/SelectMenu.d.ts +1 -1
  259. package/build/Legacy/SelectMenu/SelectMenu.d.ts.map +1 -1
  260. package/build/Legacy/SelectMenu/SelectMenu.js +42 -46
  261. package/build/Legacy/SelectMenu/SelectMenu.type.d.ts +0 -1
  262. package/build/Legacy/SelectMenu/SelectMenu.type.d.ts.map +1 -1
  263. package/build/Legacy/SelectMenu/SelectMenu.type.js +1 -6
  264. package/build/Legacy/SelectMenu/index.js +1 -1
  265. package/build/Legacy/Subhead/Subhead.const.d.ts +3 -0
  266. package/build/Legacy/Subhead/Subhead.const.d.ts.map +1 -0
  267. package/build/Legacy/Subhead/Subhead.const.js +10 -0
  268. package/build/Legacy/Subhead/Subhead.d.ts +1 -1
  269. package/build/Legacy/Subhead/Subhead.d.ts.map +1 -1
  270. package/build/Legacy/Subhead/Subhead.js +12 -12
  271. package/build/Legacy/Subhead/Subhead.type.d.ts +0 -1
  272. package/build/Legacy/Subhead/Subhead.type.d.ts.map +1 -1
  273. package/build/Legacy/Subhead/Subhead.type.js +1 -6
  274. package/build/Legacy/Subhead/index.js +1 -1
  275. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.const.d.ts +6 -0
  276. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.const.d.ts.map +1 -0
  277. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.const.js +25 -0
  278. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.d.ts +1 -1
  279. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.d.ts.map +1 -1
  280. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.js +7 -9
  281. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.type.d.ts +0 -4
  282. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.type.d.ts.map +1 -1
  283. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighter.type.js +1 -21
  284. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterHLJS.d.ts +1 -1
  285. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterHLJS.d.ts.map +1 -1
  286. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterHLJS.js +9 -10
  287. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterPrism.d.ts +1 -1
  288. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterPrism.d.ts.map +1 -1
  289. package/build/Legacy/SyntaxHighlighter/SyntaxHighlighterPrism.js +10 -11
  290. package/build/Legacy/SyntaxHighlighter/index.d.ts +1 -1
  291. package/build/Legacy/SyntaxHighlighter/index.d.ts.map +1 -1
  292. package/build/Legacy/SyntaxHighlighter/index.js +5 -5
  293. package/build/Legacy/Toast/Toast.const.d.ts +4 -0
  294. package/build/Legacy/Toast/Toast.const.d.ts.map +1 -0
  295. package/build/Legacy/Toast/Toast.const.js +18 -0
  296. package/build/Legacy/Toast/Toast.d.ts +1 -1
  297. package/build/Legacy/Toast/Toast.d.ts.map +1 -1
  298. package/build/Legacy/Toast/Toast.js +23 -23
  299. package/build/Legacy/Toast/Toast.type.d.ts +0 -2
  300. package/build/Legacy/Toast/Toast.type.d.ts.map +1 -1
  301. package/build/Legacy/Toast/Toast.type.js +1 -14
  302. package/build/Legacy/Toast/index.d.ts +1 -1
  303. package/build/Legacy/Toast/index.d.ts.map +1 -1
  304. package/build/Legacy/Toast/index.js +3 -3
  305. package/build/Legacy/index.js +1 -1
  306. package/build/Modern/Avatar/Avatar.d.ts +1 -1
  307. package/build/Modern/Avatar/Avatar.d.ts.map +1 -1
  308. package/build/Modern/Avatar/Avatar.js +23 -30
  309. package/build/Modern/Avatar/index.js +1 -1
  310. package/build/Modern/AvatarStack/AvatarStack.d.ts +2 -2
  311. package/build/Modern/AvatarStack/AvatarStack.d.ts.map +1 -1
  312. package/build/Modern/AvatarStack/AvatarStack.js +53 -57
  313. package/build/Modern/AvatarStack/index.js +1 -1
  314. package/build/Modern/Flash/Flash.d.ts +1 -1
  315. package/build/Modern/Flash/Flash.d.ts.map +1 -1
  316. package/build/Modern/Flash/Flash.js +13 -17
  317. package/build/Modern/Flash/index.js +1 -1
  318. package/build/Modern/Link/Link.d.ts +3 -3
  319. package/build/Modern/Link/Link.d.ts.map +1 -1
  320. package/build/Modern/Link/Link.js +20 -22
  321. package/build/Modern/Link/index.js +1 -1
  322. package/build/Modern/Pagination/Pagination.d.ts +2 -2
  323. package/build/Modern/Pagination/Pagination.d.ts.map +1 -1
  324. package/build/Modern/Pagination/Pagination.js +68 -79
  325. package/build/Modern/Pagination/Pagination.model.js +30 -34
  326. package/build/Modern/Pagination/index.js +1 -1
  327. package/build/Modern/hooks/index.js +2 -2
  328. package/build/Modern/hooks/useMedia.d.ts +2 -2
  329. package/build/Modern/hooks/useMedia.d.ts.map +1 -1
  330. package/build/Modern/hooks/useMedia.js +29 -38
  331. package/build/Modern/hooks/useRefObjectAsForwardedRef.js +1 -3
  332. package/build/Modern/hooks/useResponsiveValue.js +6 -10
  333. package/build/Modern/index.d.ts +1 -1
  334. package/build/Modern/index.js +1 -1
  335. package/build/Modern/utils/environment.js +1 -2
  336. package/build/Modern/utils/hasInteractiveNodes.js +11 -15
  337. package/build/Modern/utils/modern-polymorphic.js +1 -1
  338. package/build/Modern/utils/polymorphic.d.ts +1 -1
  339. package/build/Modern/utils/polymorphic.d.ts.map +1 -1
  340. package/build/Modern/utils/testing.js +2 -2
  341. package/build/Modern/utils/types/index.js +3 -3
  342. package/build/Modern/utils/warning.js +4 -7
  343. package/build/index.js +2 -2
  344. package/package.json +4 -4
@@ -1,30 +1,27 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.UnwrappedLink = exports.Link = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
8
  var _clsx = require("clsx");
11
9
  var _react = require("react");
12
10
  var _hooks = require("../hooks");
13
11
  var _modernPolymorphic = require("../utils/modern-polymorphic");
14
12
  var _LinkModule = _interopRequireDefault(require("./Link.module.scss"));
15
13
  var _jsxRuntime = require("react/jsx-runtime");
16
- var _excluded = ["as", "className", "inline", "hoverColor"];
17
14
  /* eslint-disable @typescript-eslint/consistent-type-definitions */
18
- 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; }
19
- 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; }
20
- var UnwrappedLink = exports.UnwrappedLink = function UnwrappedLink(props, ref) {
21
- var _props$as = props.as,
22
- Component = _props$as === void 0 ? 'a' : _props$as,
23
- className = props.className,
24
- inline = props.inline,
25
- hoverColor = props.hoverColor,
26
- restProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
27
- 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);
28
25
  (0, _hooks.useRefObjectAsForwardedRef)(ref, innerRef);
29
26
  if (process.env.NODE_ENV !== 'production') {
30
27
  /**
@@ -34,22 +31,23 @@ var UnwrappedLink = exports.UnwrappedLink = function UnwrappedLink(props, ref) {
34
31
  * shaving precious bytes from the output, and avoiding mounting a noop effect
35
32
  */
36
33
  // eslint-disable-next-line react-hooks/rules-of-hooks
37
- (0, _react.useEffect)(function () {
34
+ (0, _react.useEffect)(() => {
38
35
  if (innerRef.current && !(innerRef.current instanceof HTMLButtonElement) && !(innerRef.current instanceof HTMLAnchorElement)) {
39
36
  console.error('Error: Found `Link` component that renders an inaccessible element', innerRef.current, 'Please ensure `Link` always renders as <a> or <button>');
40
37
  }
41
38
  }, [innerRef]);
42
39
  }
43
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, _objectSpread(_objectSpread({
44
- className: (0, _clsx.clsx)(className, _LinkModule["default"].Link),
40
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
41
+ className: (0, _clsx.clsx)(className, _LinkModule.default.Link),
45
42
  "data-muted": restProps.muted,
46
43
  "data-inline": inline,
47
- "data-hover-color": hoverColor
48
- }, restProps), {}, {
44
+ "data-hover-color": hoverColor,
45
+ ...restProps,
49
46
  ref: innerRef
50
- }));
47
+ });
51
48
  };
52
- var LinkComponent = (0, _modernPolymorphic.fixedForwardRef)(UnwrappedLink);
53
- 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, {
54
52
  displayName: 'Link'
55
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,6 +1,6 @@
1
- import { JSX, type MouseEvent, type ReactNode } 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
6
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/Modern/Pagination/Pagination.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAA;AAClF,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,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
+ {"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,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.Pagination = Pagination;
8
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
8
  var _octiconsReact = require("@primer/octicons-react");
11
9
  var _clsx = require("clsx");
12
10
  var _react = require("react");
@@ -14,14 +12,11 @@ var _useResponsiveValue = require("../hooks/useResponsiveValue");
14
12
  var _Pagination = require("./Pagination.model");
15
13
  var _PaginationModule = _interopRequireDefault(require("./Pagination.module.scss"));
16
14
  var _jsxRuntime = require("react/jsx-runtime");
17
- var _excluded = ["className", "pageCount", "currentPage", "onPageChange", "hrefBuilder", "marginPageCount", "showPages", "surroundingPageCount", "renderPage"];
18
- 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; }
19
- 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 */
20
- var getViewportRangesToHidePages = function getViewportRangesToHidePages(showPages) {
15
+ /* eslint-disable @typescript-eslint/consistent-type-definitions */
16
+
17
+ const getViewportRangesToHidePages = showPages => {
21
18
  if (showPages && typeof showPages !== 'boolean') {
22
- return Object.keys(showPages).filter(function (key) {
23
- return !showPages[key];
24
- });
19
+ return Object.keys(showPages).filter(key => !showPages[key]);
25
20
  }
26
21
  if (showPages) {
27
22
  return [];
@@ -29,102 +24,96 @@ var getViewportRangesToHidePages = function getViewportRangesToHidePages(showPag
29
24
  return Object.keys(_useResponsiveValue.viewportRanges);
30
25
  }
31
26
  };
32
- var PageLabel = function PageLabel(_ref) {
33
- var children = _ref.children,
34
- direction = _ref.direction;
35
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
36
- children: [direction === 'page-prev' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.ChevronLeftIcon, {}) : null, children, direction === 'page-next' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.ChevronRightIcon, {}) : null]
37
- });
38
- };
39
- function usePaginationPages(_ref2) {
40
- var pageCount = _ref2.pageCount,
41
- currentPage = _ref2.currentPage,
42
- onPageChange = _ref2.onPageChange,
43
- hrefBuilder = _ref2.hrefBuilder,
44
- marginPageCount = _ref2.marginPageCount,
45
- showPages = _ref2.showPages,
46
- surroundingPageCount = _ref2.surroundingPageCount,
47
- renderPage = _ref2.renderPage;
48
- var pageChange = (0, _react.useCallback)(function (n) {
49
- return function (e) {
50
- return onPageChange(e, n);
51
- };
52
- }, [onPageChange]);
53
- 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)(() => {
54
45
  return (0, _Pagination.buildPaginationModel)(pageCount, currentPage, !!showPages, marginPageCount, surroundingPageCount);
55
46
  }, [pageCount, currentPage, showPages, marginPageCount, surroundingPageCount]);
56
- var children = (0, _react.useMemo)(function () {
57
- return model.map(function (page) {
58
- var _buildComponentData = (0, _Pagination.buildComponentData)(page, hrefBuilder, pageChange(page.num)),
59
- props = _buildComponentData.props,
60
- key = _buildComponentData.key,
61
- 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));
62
54
  if (renderPage && props.as !== 'span') {
63
- return renderPage(_objectSpread({
64
- key: key,
55
+ return renderPage({
56
+ key,
65
57
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PageLabel, {
66
58
  direction: key,
67
59
  children: content
68
60
  }),
69
61
  number: page.num,
70
- className: _PaginationModule["default"].Page
71
- }, props));
62
+ className: _PaginationModule.default.Page,
63
+ ...props
64
+ });
72
65
  }
73
- var Component = props.as || 'a';
66
+ const Component = props.as || 'a';
74
67
  return (
75
68
  /*#__PURE__*/
76
69
  // @ts-ignore giving me grief about children and "as" props
77
- (0, _jsxRuntime.jsx)(Component, _objectSpread(_objectSpread({
78
- className: (0, _clsx.clsx)(_PaginationModule["default"].Page)
79
- }, props), {}, {
70
+ (0, _jsxRuntime.jsx)(Component, {
71
+ className: (0, _clsx.clsx)(_PaginationModule.default.Page),
72
+ ...props,
80
73
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PageLabel, {
81
74
  direction: key,
82
75
  children: content
83
76
  })
84
- }), key)
77
+ }, key)
85
78
  );
86
79
  });
87
80
  }, [model, hrefBuilder, pageChange, renderPage]);
88
81
  return children;
89
82
  }
90
- function Pagination(_ref3) {
91
- var className = _ref3.className,
92
- pageCount = _ref3.pageCount,
93
- currentPage = _ref3.currentPage,
94
- _ref3$onPageChange = _ref3.onPageChange,
95
- onPageChange = _ref3$onPageChange === void 0 ? noop : _ref3$onPageChange,
96
- _ref3$hrefBuilder = _ref3.hrefBuilder,
97
- hrefBuilder = _ref3$hrefBuilder === void 0 ? defaultHrefBuilder : _ref3$hrefBuilder,
98
- _ref3$marginPageCount = _ref3.marginPageCount,
99
- marginPageCount = _ref3$marginPageCount === void 0 ? 1 : _ref3$marginPageCount,
100
- _ref3$showPages = _ref3.showPages,
101
- showPages = _ref3$showPages === void 0 ? true : _ref3$showPages,
102
- _ref3$surroundingPage = _ref3.surroundingPageCount,
103
- surroundingPageCount = _ref3$surroundingPage === void 0 ? 2 : _ref3$surroundingPage,
104
- renderPage = _ref3.renderPage,
105
- rest = (0, _objectWithoutProperties2["default"])(_ref3, _excluded);
106
- var pageElements = usePaginationPages({
107
- pageCount: pageCount,
108
- currentPage: currentPage,
109
- onPageChange: onPageChange,
110
- hrefBuilder: hrefBuilder,
111
- marginPageCount: marginPageCount,
112
- showPages: showPages,
113
- surroundingPageCount: surroundingPageCount,
114
- 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
115
104
  });
116
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("nav", _objectSpread(_objectSpread({
117
- className: (0, _clsx.clsx)(_PaginationModule["default"].PaginationContainer, className),
118
- "aria-label": "Pagination"
119
- }, rest), {}, {
105
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("nav", {
106
+ className: (0, _clsx.clsx)(_PaginationModule.default.PaginationContainer, className),
107
+ "aria-label": "Pagination",
108
+ ...rest,
120
109
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
121
- className: _PaginationModule["default"].TablePaginationSteps,
110
+ className: _PaginationModule.default.TablePaginationSteps,
122
111
  "data-hidden-viewport-ranges": getViewportRangesToHidePages(showPages).join(' '),
123
112
  children: pageElements
124
113
  })
125
- }));
114
+ });
126
115
  }
127
116
  function defaultHrefBuilder(pageNum) {
128
- return "#".concat(pageNum);
117
+ return `#${pageNum}`;
129
118
  }
130
119
  function noop() {}
@@ -1,23 +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 */
13
9
 
14
10
  function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount, surroundingPageCount) {
15
- var prev = {
11
+ const prev = {
16
12
  type: 'PREV',
17
13
  num: currentPage - 1,
18
14
  disabled: currentPage === 1
19
15
  };
20
- var next = {
16
+ const next = {
21
17
  type: 'NEXT',
22
18
  num: currentPage + 1,
23
19
  disabled: currentPage === pageCount
@@ -26,26 +22,27 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
26
22
  return [prev, next];
27
23
  }
28
24
  if (pageCount <= 0) {
29
- return [prev, _objectSpread(_objectSpread({}, next), {}, {
25
+ return [prev, {
26
+ ...next,
30
27
  disabled: true
31
- })];
28
+ }];
32
29
  }
33
- var pages = [];
30
+ const pages = [];
34
31
 
35
32
  // number of pages shown on each side of the current page
36
33
  // [1, ..., 7, 8, _9_, 10, 11, ..., 15]
37
34
  // standardGap: 3
38
- var standardGap = surroundingPageCount + marginPageCount;
35
+ const standardGap = surroundingPageCount + marginPageCount;
39
36
 
40
37
  // the maximum number of pages that can be shown at a given time (account for current page, left and right ellipsis)
41
38
  // [1, ..., 7, 8, _9_, 10, 11, ..., 15]
42
39
  // maxVisiblePages: 9
43
- var maxVisiblePages = standardGap + standardGap + 3;
40
+ const maxVisiblePages = standardGap + standardGap + 3;
44
41
 
45
42
  // if the number of pages is less than the maximum number of pages that can be shown just return all of them
46
43
  if (pageCount <= maxVisiblePages) {
47
44
  addPages(1, pageCount, false);
48
- return [prev].concat(pages, [next]);
45
+ return [prev, ...pages, next];
49
46
  }
50
47
 
51
48
  // startGap is the number of pages hidden by the start ellipsis
@@ -57,8 +54,8 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
57
54
  // [1, _2_, 3, 4, 5, 6, ..., 15]
58
55
  // startGap = 0
59
56
  // startOffset: -3 <--
60
- var startGap = 0;
61
- var startOffset = 0;
57
+ let startGap = 0;
58
+ let startOffset = 0;
62
59
 
63
60
  // When there is overlap
64
61
  if (currentPage - standardGap - 1 <= 1) {
@@ -68,8 +65,8 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
68
65
  }
69
66
 
70
67
  // These are equivalent to startGap and startOffset but at the end of the list
71
- var endGap = 0;
72
- var endOffset = 0;
68
+ let endGap = 0;
69
+ let endOffset = 0;
73
70
 
74
71
  // When there is overlap
75
72
  if (pageCount - currentPage - standardGap <= 1) {
@@ -77,8 +74,8 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
77
74
  } else {
78
75
  endGap = pageCount - currentPage - standardGap;
79
76
  }
80
- var hasStartEllipsis = startGap > 0;
81
- var hasEndEllipsis = endGap > 0;
77
+ const hasStartEllipsis = startGap > 0;
78
+ const hasEndEllipsis = endGap > 0;
82
79
 
83
80
  // add pages "before" the start ellipsis (if any)
84
81
  // [1, ..., 7, 8, _9_, 10, 11, ..., 15]
@@ -113,16 +110,15 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
113
110
  // endOffset: 0
114
111
  // addPages(15, 15)
115
112
  addPages(pageCount - marginPageCount + 1, pageCount);
116
- return [prev].concat(pages, [next]);
113
+ return [prev, ...pages, next];
117
114
  function addEllipsis(previousPage) {
118
115
  pages.push({
119
116
  type: 'BREAK',
120
117
  num: previousPage + 1
121
118
  });
122
119
  }
123
- function addPages(start, end) {
124
- var precedesBreak = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
125
- for (var i = start; i <= end; i++) {
120
+ function addPages(start, end, precedesBreak = false) {
121
+ for (let i = start; i <= end; i++) {
126
122
  pages.push({
127
123
  type: 'NUM',
128
124
  num: i,
@@ -133,9 +129,9 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
133
129
  }
134
130
  }
135
131
  function buildComponentData(page, hrefBuilder, onClick) {
136
- var props = {};
137
- var content = '';
138
- var key = '';
132
+ const props = {};
133
+ let content = '';
134
+ let key = '';
139
135
  switch (page.type) {
140
136
  case 'PREV':
141
137
  {
@@ -153,7 +149,7 @@ function buildComponentData(page, hrefBuilder, onClick) {
153
149
  href: hrefBuilder(page.num),
154
150
  'aria-label': 'Previous Page',
155
151
  'data-testid': 'page-prev',
156
- onClick: onClick
152
+ onClick
157
153
  });
158
154
  }
159
155
  break;
@@ -174,29 +170,29 @@ function buildComponentData(page, hrefBuilder, onClick) {
174
170
  href: hrefBuilder(page.num),
175
171
  'aria-label': 'Next Page',
176
172
  'data-testid': 'page-next',
177
- onClick: onClick
173
+ onClick
178
174
  });
179
175
  }
180
176
  break;
181
177
  }
182
178
  case 'NUM':
183
179
  {
184
- key = "page-".concat(page.num);
180
+ key = `page-${page.num}`;
185
181
  content = String(page.num);
186
182
  Object.assign(props, {
187
183
  href: hrefBuilder(page.num),
188
184
  // We append "..." to the aria-label for pages that preceed a break because screen readers will
189
185
  // change the tone the text is read in.
190
186
  // This is a slightly nicer experience than skipping a bunch of numbers unexpectedly.
191
- 'aria-label': "Page ".concat(page.num).concat(page.precedesBreak ? '...' : ''),
187
+ 'aria-label': `Page ${page.num}${page.precedesBreak ? '...' : ''}`,
192
188
  'aria-current': page.selected ? 'page' : undefined,
193
- onClick: onClick
189
+ onClick
194
190
  });
195
191
  break;
196
192
  }
197
193
  case 'BREAK':
198
194
  {
199
- key = "page-".concat(page.num, "-break");
195
+ key = `page-${page.num}-break`;
200
196
  content = '…';
201
197
  Object.assign(props, {
202
198
  as: 'span',
@@ -205,8 +201,8 @@ function buildComponentData(page, hrefBuilder, onClick) {
205
201
  }
206
202
  }
207
203
  return {
208
- props: props,
209
- key: key,
210
- content: content
204
+ props,
205
+ key,
206
+ content
211
207
  };
212
208
  }
@@ -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 { type ReactNode } 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.
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../../src/Modern/hooks/useMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAkD,MAAM,OAAO,CAAA;AAItF;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,WAgExE;AAED,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,CAAA;AAO7D,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAA0B,EAAE,EAAE,eAAe,2CAGnF"}
1
+ {"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../../src/Modern/hooks/useMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,WAgExE;AAED,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,CAAA;AAO7D,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAA0B,EAAE,EAAE,eAAe,+BAGnF"}