@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,73 +1,77 @@
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.Breadcrumb = Breadcrumb;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
8
  var _typography = _interopRequireDefault(require("@papillonarts/css/utilities/typography.scss"));
10
9
  var _array = require("@papillonarts/library/array");
11
10
  var _classnames = _interopRequireDefault(require("classnames"));
12
11
  var _uuid = require("uuid");
13
- var _Breadcrumb = _interopRequireDefault(require("./Breadcrumb.scss"));
14
- var _Breadcrumb2 = require("./Breadcrumb.type");
12
+ var _Breadcrumb = require("./Breadcrumb.const");
13
+ var _Breadcrumb2 = _interopRequireDefault(require("./Breadcrumb.scss"));
15
14
  var _jsxRuntime = require("react/jsx-runtime");
16
- 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; }
17
- 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 jsx-a11y/no-noninteractive-element-interactions */ /* eslint-disable jsx-a11y/click-events-have-key-events */
18
- function Breadcrumb(_ref) {
19
- var _ref$className = _ref.className,
20
- className = _ref$className === void 0 ? _Breadcrumb2.BreadcrumbDefault.ClassName : _ref$className,
21
- ariaAttr = _ref.ariaAttr,
22
- items = _ref.items,
23
- _onClick = _ref.onClick,
24
- _ref$state = _ref.state,
25
- state = _ref$state === void 0 ? _Breadcrumb2.BreadcrumbDefault.State : _ref$state;
26
- var indexItems = (0, _array.getIndexItems)(items);
27
- var label = ariaAttr.label,
28
- current = ariaAttr.current;
15
+ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
16
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
17
+
18
+ function Breadcrumb({
19
+ className = _Breadcrumb.BreadcrumbDefault.ClassName,
20
+ ariaAttr,
21
+ items,
22
+ onClick,
23
+ state = _Breadcrumb.BreadcrumbDefault.State
24
+ }) {
25
+ const indexItems = (0, _array.getIndexItems)(items);
26
+ const {
27
+ label,
28
+ current
29
+ } = ariaAttr;
29
30
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("nav", {
30
- className: (0, _classnames["default"])(className, (0, _defineProperty2["default"])({}, _Breadcrumb["default"]['breadcrumb-inactive'], state === _Breadcrumb2.BreadcrumbState.Inactive)),
31
+ className: (0, _classnames.default)(className, {
32
+ [_Breadcrumb2.default['breadcrumb-inactive']]: state === _Breadcrumb.BreadcrumbState.Inactive
33
+ }),
31
34
  "aria-label": label,
32
35
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ol", {
33
- children: indexItems.map(function (indexItem) {
34
- var href = indexItem.href,
35
- text = indexItem.text,
36
- isSelected = indexItem.isSelected;
37
- var itemOtherProps = isSelected ? _objectSpread({}, {
38
- 'aria-current': current
39
- }) : null;
40
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", _objectSpread(_objectSpread({
41
- onClick: function onClick(e) {
36
+ children: indexItems.map(indexItem => {
37
+ const {
38
+ href,
39
+ text,
40
+ isSelected
41
+ } = indexItem;
42
+ const itemOtherProps = isSelected ? {
43
+ ...{
44
+ 'aria-current': current
45
+ }
46
+ } : null;
47
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
48
+ onClick: e => {
42
49
  e.preventDefault();
43
- var newIndexItems = (0, _array.getIndexItemsWithSelected)(indexItems, indexItem);
44
- _onClick({
50
+ const newIndexItems = (0, _array.getIndexItemsWithSelected)(indexItems, indexItem);
51
+ onClick({
45
52
  active: text,
46
- ariaAttr: ariaAttr,
47
- items: newIndexItems.map(function (newIndexItem) {
48
- return function (_ref2) {
49
- var href = _ref2.href,
50
- text = _ref2.text,
51
- isSelected = _ref2.isSelected;
52
- return {
53
- href: href,
54
- text: text,
55
- isSelected: isSelected
56
- };
57
- }(newIndexItem);
58
- })
53
+ ariaAttr,
54
+ items: newIndexItems.map(newIndexItem => (({
55
+ href,
56
+ text,
57
+ isSelected
58
+ }) => ({
59
+ href,
60
+ text,
61
+ isSelected
62
+ }))(newIndexItem))
59
63
  });
60
64
  },
61
- className: !isSelected ? (0, _classnames["default"])(_Breadcrumb["default"]['breadcrumb-item']) : (0, _classnames["default"])(_Breadcrumb["default"]['breadcrumb-item'], _Breadcrumb["default"]['breadcrumb-item-selected'], _typography["default"]['text-gray'])
65
+ className: !isSelected ? (0, _classnames.default)(_Breadcrumb2.default['breadcrumb-item']) : (0, _classnames.default)(_Breadcrumb2.default['breadcrumb-item'], _Breadcrumb2.default['breadcrumb-item-selected'], _typography.default['text-gray'])
62
66
  // @ts-ignore
63
67
  ,
64
- href: href
65
- }, itemOtherProps), {}, {
68
+ href: href,
69
+ ...itemOtherProps,
66
70
  children: isSelected ? text : /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
67
71
  href: href,
68
72
  children: text
69
73
  })
70
- }), (0, _uuid.v1)());
74
+ }, (0, _uuid.v1)());
71
75
  })
72
76
  })
73
77
  });
@@ -3,28 +3,31 @@ export interface IBreadcrumbState {
3
3
  Active: string;
4
4
  Inactive: string;
5
5
  }
6
- export declare const BreadcrumbState: IBreadcrumbState;
7
6
  export interface IBreadcrumbDefault {
8
- ClassName: string;
7
+ ClassName: string | null;
9
8
  State: string;
10
9
  }
11
- export declare const BreadcrumbDefault: IBreadcrumbDefault;
12
10
  export interface IAriaAttr {
13
11
  label: string;
14
12
  current: string;
15
13
  }
16
14
  export interface IItem {
17
- href: string;
15
+ href: string | null;
18
16
  text: string;
19
17
  isSelected: boolean;
20
18
  }
21
19
  export interface IIndexedItem extends IIndexed, IItem {
22
20
  }
21
+ export interface IBreadcrumbOnClickValue {
22
+ active: string;
23
+ ariaAttr: IAriaAttr;
24
+ items: IItem[];
25
+ }
23
26
  export interface IBreadcrumb {
24
- className?: string;
27
+ className?: string | null;
25
28
  ariaAttr: IAriaAttr;
26
29
  items: IItem[];
27
- onClick: (value: any) => void;
30
+ onClick: (value: IBreadcrumbOnClickValue) => void;
28
31
  state?: string;
29
32
  }
30
33
  //# sourceMappingURL=Breadcrumb.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.type.d.ts","sourceRoot":"","sources":["../../../src/Legacy/Breadcrumb/Breadcrumb.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAEhE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd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,CAAA;IACZ,UAAU,EAAE,OAAO,CAAA;CACpB;AACD,MAAM,WAAW,YAAa,SAAQ,QAAQ,EAAE,KAAK;CAAG;AACxD,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,KAAK,EAAE,CAAA;CACf;AACD,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,KAAK,EAAE,CAAA;IACd,OAAO,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAA;IACjD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
@@ -2,13 +2,4 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
- });
6
- exports.BreadcrumbState = exports.BreadcrumbDefault = void 0;
7
- var BreadcrumbState = exports.BreadcrumbState = {
8
- Active: 'active',
9
- Inactive: 'inactive'
10
- };
11
- var BreadcrumbDefault = exports.BreadcrumbDefault = {
12
- ClassName: null,
13
- State: BreadcrumbState.Active
14
- };
5
+ });
@@ -16,10 +16,10 @@ Breadcrumb all props and variants
16
16
 
17
17
  ```typescript
18
18
  export interface IBreadcrumb {
19
- className?: string
19
+ className?: string | null
20
20
  ariaAttr: IAriaAttr
21
21
  items: IItem[]
22
- onClick: (value) => void
22
+ onClick: (value: IBreadcrumbOnClickValue) => void
23
23
  state?: string
24
24
  }
25
25
  ```
@@ -1,3 +1,3 @@
1
1
  export { Breadcrumb } from './Breadcrumb';
2
- export { BreadcrumbState } from './Breadcrumb.type';
2
+ export { BreadcrumbState } from './Breadcrumb.const';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Legacy/Breadcrumb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Legacy/Breadcrumb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA"}
@@ -5,15 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "Breadcrumb", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _Breadcrumb.Breadcrumb;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "BreadcrumbState", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _Breadcrumb2.BreadcrumbState;
16
16
  }
17
17
  });
18
18
  var _Breadcrumb = require("./Breadcrumb");
19
- var _Breadcrumb2 = require("./Breadcrumb.type");
19
+ var _Breadcrumb2 = require("./Breadcrumb.const");
@@ -0,0 +1,9 @@
1
+ import type { IButtonDefault, IButtonElement, IButtonInputType, IButtonSize, IButtonState, IButtonVariant, IIconAlignment } from './Button.type';
2
+ export declare const ButtonElement: IButtonElement;
3
+ export declare const ButtonSize: IButtonSize;
4
+ export declare const ButtonState: IButtonState;
5
+ export declare const IconAlignment: IIconAlignment;
6
+ export declare const ButtonInputType: IButtonInputType;
7
+ export declare const ButtonVariant: IButtonVariant;
8
+ export declare const ButtonDefault: IButtonDefault;
9
+ //# sourceMappingURL=Button.const.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.const.d.ts","sourceRoot":"","sources":["../../../src/Legacy/Button/Button.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,cAAc,EACf,MAAM,eAAe,CAAA;AAEtB,eAAO,MAAM,aAAa,EAAE,cAG3B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,WAIxB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,YAGzB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,cAG3B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,gBAG7B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,cAO3B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,cAY3B,CAAA"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.IconAlignment = exports.ButtonVariant = exports.ButtonState = exports.ButtonSize = exports.ButtonInputType = exports.ButtonElement = exports.ButtonDefault = void 0;
7
+ const ButtonElement = exports.ButtonElement = {
8
+ Button: 'button',
9
+ A: 'a'
10
+ };
11
+ const ButtonSize = exports.ButtonSize = {
12
+ Small: 'small',
13
+ Normal: 'normal',
14
+ Large: 'large'
15
+ };
16
+ const ButtonState = exports.ButtonState = {
17
+ Active: 'active',
18
+ Inactive: 'inactive'
19
+ };
20
+ const IconAlignment = exports.IconAlignment = {
21
+ Left: 'left',
22
+ Right: 'Right'
23
+ };
24
+ const ButtonInputType = exports.ButtonInputType = {
25
+ File: 'file',
26
+ Submit: 'submit'
27
+ };
28
+ const ButtonVariant = exports.ButtonVariant = {
29
+ Default: 'default',
30
+ Primary: 'primary',
31
+ Danger: 'danger',
32
+ Outline: 'outline',
33
+ Blue: 'blue',
34
+ Orange: 'orange'
35
+ };
36
+ const ButtonDefault = exports.ButtonDefault = {
37
+ DataTestId: null,
38
+ Id: null,
39
+ ClassName: null,
40
+ Element: ButtonElement.Button,
41
+ Href: null,
42
+ Variant: ButtonVariant.Default,
43
+ Size: ButtonSize.Normal,
44
+ State: ButtonState.Active,
45
+ Icon: null,
46
+ InputType: null,
47
+ AutoFocus: false
48
+ };
@@ -1,3 +1,4 @@
1
- import { IButton } from './Button.type';
2
- export declare function Button({ dataTestId, id, className, element, href, text, variant, size, state, icon, onClick, inputType, autoFocus, }: IButton): import("react/jsx-runtime").JSX.Element;
1
+ import type { JSX } from 'react';
2
+ import type { IButton } from './Button.type';
3
+ export declare function Button({ dataTestId, id, className, element, href, text, variant, size, state, icon, onClick, inputType, autoFocus, }: IButton): JSX.Element | null;
3
4
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Legacy/Button/Button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAOL,OAAO,EAER,MAAM,eAAe,CAAA;AAEtB,wBAAgB,MAAM,CAAC,EACrB,UAAqC,EACrC,EAAqB,EACrB,SAAmC,EACnC,OAA+B,EAC/B,IAAyB,EACzB,IAAI,EACJ,OAA+B,EAC/B,IAAyB,EACzB,KAA2B,EAC3B,IAAyB,EACzB,OAAO,EACP,SAAmC,EACnC,SAAmC,GACpC,EAAE,OAAO,2CA+DT"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Legacy/Button/Button.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAIhC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,wBAAgB,MAAM,CAAC,EACrB,UAAqC,EACrC,EAAqB,EACrB,SAAmC,EACnC,OAA+B,EAC/B,IAAyB,EACzB,IAAI,EACJ,OAA+B,EAC/B,IAAyB,EACzB,KAA2B,EAC3B,IAAyB,EACzB,OAAO,EACP,SAAmC,EACnC,SAAmC,GACpC,EAAE,OAAO,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA8D9B"}
@@ -1,111 +1,101 @@
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.Button = Button;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
8
  var _margin = _interopRequireDefault(require("@papillonarts/css/utilities/margin.scss"));
10
9
  var _classnames = _interopRequireDefault(require("classnames"));
11
10
  var _react = require("react");
12
11
  var _Icon = require("../Icon");
13
- var _Button = _interopRequireDefault(require("./Button.scss"));
14
- var _Button2 = require("./Button.type");
12
+ var _Button = require("./Button.const");
13
+ var _Button2 = _interopRequireDefault(require("./Button.scss"));
15
14
  var _jsxRuntime = require("react/jsx-runtime");
16
- 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; }
17
- 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; }
18
- function Button(_ref) {
19
- var _ref$dataTestId = _ref.dataTestId,
20
- dataTestId = _ref$dataTestId === void 0 ? _Button2.ButtonDefault.DataTestId : _ref$dataTestId,
21
- _ref$id = _ref.id,
22
- id = _ref$id === void 0 ? _Button2.ButtonDefault.Id : _ref$id,
23
- _ref$className = _ref.className,
24
- className = _ref$className === void 0 ? _Button2.ButtonDefault.ClassName : _ref$className,
25
- _ref$element = _ref.element,
26
- element = _ref$element === void 0 ? _Button2.ButtonDefault.Element : _ref$element,
27
- _ref$href = _ref.href,
28
- href = _ref$href === void 0 ? _Button2.ButtonDefault.Href : _ref$href,
29
- text = _ref.text,
30
- _ref$variant = _ref.variant,
31
- variant = _ref$variant === void 0 ? _Button2.ButtonDefault.Variant : _ref$variant,
32
- _ref$size = _ref.size,
33
- size = _ref$size === void 0 ? _Button2.ButtonDefault.Size : _ref$size,
34
- _ref$state = _ref.state,
35
- state = _ref$state === void 0 ? _Button2.ButtonDefault.State : _ref$state,
36
- _ref$icon = _ref.icon,
37
- icon = _ref$icon === void 0 ? _Button2.ButtonDefault.Icon : _ref$icon,
38
- _onClick = _ref.onClick,
39
- _ref$inputType = _ref.inputType,
40
- inputType = _ref$inputType === void 0 ? _Button2.ButtonDefault.InputType : _ref$inputType,
41
- _ref$autoFocus = _ref.autoFocus,
42
- autoFocus = _ref$autoFocus === void 0 ? _Button2.ButtonDefault.AutoFocus : _ref$autoFocus;
43
- var stateProps = state === _Button2.ButtonState.Inactive ? _objectSpread({}, {
44
- disabled: true,
45
- 'aria-disabled': true
46
- }) : null;
47
- var fileInputRef = (0, _react.useRef)(null);
48
- if (element === _Button2.ButtonElement.Button) {
49
- return (
50
- /*#__PURE__*/
51
- // @ts-ignore
52
- (0, _jsxRuntime.jsxs)("button", _objectSpread(_objectSpread({
53
- "data-testid": dataTestId,
54
- id: id,
55
- className: (0, _classnames["default"])(className, _Button["default"].btn, (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _Button["default"]['btn-sm'], size === _Button2.ButtonSize.Small), _Button["default"]['btn-large'], size === _Button2.ButtonSize.Large), _Button["default"]['btn-primary'], variant === _Button2.ButtonVariant.Primary), _Button["default"]['btn-danger'], variant === _Button2.ButtonVariant.Danger), _Button["default"]['btn-outline'], variant === _Button2.ButtonVariant.Outline), _Button["default"]['btn-blue'], variant === _Button2.ButtonVariant.Blue), _Button["default"]['btn-orange'], variant === _Button2.ButtonVariant.Orange), _Button["default"]['button-inactive'], state === _Button2.ButtonState.Inactive)),
56
- type: "button",
15
+ function Button({
16
+ dataTestId = _Button.ButtonDefault.DataTestId,
17
+ id = _Button.ButtonDefault.Id,
18
+ className = _Button.ButtonDefault.ClassName,
19
+ element = _Button.ButtonDefault.Element,
20
+ href = _Button.ButtonDefault.Href,
21
+ text,
22
+ variant = _Button.ButtonDefault.Variant,
23
+ size = _Button.ButtonDefault.Size,
24
+ state = _Button.ButtonDefault.State,
25
+ icon = _Button.ButtonDefault.Icon,
26
+ onClick,
27
+ inputType = _Button.ButtonDefault.InputType,
28
+ autoFocus = _Button.ButtonDefault.AutoFocus
29
+ }) {
30
+ const stateProps = state === _Button.ButtonState.Inactive ? {
31
+ ...{
32
+ disabled: true,
33
+ 'aria-disabled': true
34
+ }
35
+ } : null;
36
+ const fileInputRef = (0, _react.useRef)(null);
37
+ if (element === _Button.ButtonElement.Button) {
38
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
39
+ "data-testid": dataTestId,
40
+ id: id,
41
+ className: (0, _classnames.default)(className, _Button2.default.btn, {
42
+ [_Button2.default['btn-sm']]: size === _Button.ButtonSize.Small,
43
+ [_Button2.default['btn-large']]: size === _Button.ButtonSize.Large,
44
+ [_Button2.default['btn-primary']]: variant === _Button.ButtonVariant.Primary,
45
+ [_Button2.default['btn-danger']]: variant === _Button.ButtonVariant.Danger,
46
+ [_Button2.default['btn-outline']]: variant === _Button.ButtonVariant.Outline,
47
+ [_Button2.default['btn-blue']]: variant === _Button.ButtonVariant.Blue,
48
+ [_Button2.default['btn-orange']]: variant === _Button.ButtonVariant.Orange,
49
+ [_Button2.default['button-inactive']]: state === _Button.ButtonState.Inactive
50
+ }),
51
+ type: "button",
52
+ autoFocus: autoFocus // eslint-disable-line
53
+ ,
54
+ onClick: () => {
55
+ if (inputType === _Button.ButtonInputType.File) {
56
+ fileInputRef.current?.click();
57
+ }
58
+ if (inputType === _Button.ButtonInputType.Submit) {
59
+ onClick?.();
60
+ }
61
+ if (!inputType) {
62
+ onClick?.();
63
+ }
64
+ },
65
+ ...stateProps,
66
+ children: [icon?.alignment === _Button.IconAlignment.Left && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
67
+ className: _margin.default['mr-2'],
68
+ icon: icon.name,
69
+ size: _Icon.IconSize.Small
70
+ }), text, icon?.alignment === _Button.IconAlignment.Right && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
71
+ className: _margin.default['ml-2'],
72
+ icon: icon.name,
73
+ size: _Icon.IconSize.Small
74
+ }), inputType && inputType === _Button.ButtonInputType.File && /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
75
+ onChange: () => {
76
+ ;
77
+ onClick?.(fileInputRef.current?.files ?? null);
78
+ },
79
+ ref: fileInputRef,
80
+ type: "file",
57
81
  autoFocus: autoFocus // eslint-disable-line
58
82
  ,
59
- onClick: function onClick() {
60
- if (inputType === _Button2.ButtonInputType.File) {
61
- fileInputRef.current.click();
62
- }
63
- if (inputType === _Button2.ButtonInputType.Submit) {
64
- _onClick();
65
- }
66
- if (!inputType) {
67
- _onClick();
68
- }
83
+ multiple: true,
84
+ style: {
85
+ display: 'none'
69
86
  }
70
- }, stateProps), {}, {
71
- children: [(icon === null || icon === void 0 ? void 0 : icon.alignment) === _Button2.IconAlignment.Left && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
72
- className: _margin["default"]['mr-2'],
73
- icon: icon.name,
74
- size: _Icon.IconSize.Small
75
- }), text, (icon === null || icon === void 0 ? void 0 : icon.alignment) === _Button2.IconAlignment.Right && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
76
- className: _margin["default"]['ml-2'],
77
- icon: icon.name,
78
- size: _Icon.IconSize.Small
79
- }), inputType && inputType === _Button2.ButtonInputType.File && /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
80
- onChange: function onChange() {
81
- _onClick(fileInputRef.current.files);
82
- },
83
- ref: fileInputRef,
84
- type: "file",
85
- autoFocus: autoFocus // eslint-disable-line
86
- ,
87
- multiple: true,
88
- style: {
89
- display: 'none'
90
- }
91
- })]
92
- }))
93
- );
87
+ })]
88
+ });
94
89
  }
95
-
96
- // @ts-ignore
97
- if (element === _Button2.ButtonElement.A) {
98
- return (
99
- /*#__PURE__*/
100
- // @ts-ignore
101
- (0, _jsxRuntime.jsx)("a", _objectSpread(_objectSpread({
102
- className: (0, _classnames["default"])(className, _Button["default"].btn),
103
- href: href,
104
- role: "button",
105
- onClick: _onClick
106
- }, stateProps), {}, {
107
- children: text
108
- }))
109
- );
90
+ if (element === _Button.ButtonElement.A) {
91
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
92
+ className: (0, _classnames.default)(className, _Button2.default.btn),
93
+ href: href ?? undefined,
94
+ role: "button",
95
+ onClick: () => onClick?.(),
96
+ ...stateProps,
97
+ children: text
98
+ });
110
99
  }
100
+ return null;
111
101
  }
@@ -2,28 +2,23 @@ export interface IButtonElement {
2
2
  Button: string;
3
3
  A: string;
4
4
  }
5
- export declare const ButtonElement: IButtonElement;
6
5
  export interface IButtonSize {
7
6
  Small: string;
8
7
  Normal: string;
9
8
  Large: string;
10
9
  }
11
- export declare const ButtonSize: IButtonSize;
12
10
  export interface IButtonState {
13
11
  Active: string;
14
12
  Inactive: string;
15
13
  }
16
- export declare const ButtonState: IButtonState;
17
14
  export interface IIconAlignment {
18
15
  Left: string;
19
16
  Right: string;
20
17
  }
21
- export declare const IconAlignment: IIconAlignment;
22
18
  export interface IButtonInputType {
23
19
  File: string;
24
20
  Submit: string;
25
21
  }
26
- export declare const ButtonInputType: IButtonInputType;
27
22
  export interface IButtonVariant {
28
23
  Default: string;
29
24
  Primary: string;
@@ -32,38 +27,36 @@ export interface IButtonVariant {
32
27
  Blue: string;
33
28
  Orange: string;
34
29
  }
35
- export declare const ButtonVariant: IButtonVariant;
36
30
  export interface IButtonDefault {
37
- DataTestId: string;
38
- Id: string;
39
- ClassName: string;
31
+ DataTestId: string | null;
32
+ Id: string | null;
33
+ ClassName: string | null;
40
34
  Element: string;
41
- Href: string;
35
+ Href: string | null;
42
36
  Variant: string;
43
37
  Size: string;
44
38
  State: string;
45
- Icon: IIcon;
46
- InputType: string;
39
+ Icon: IIcon | null;
40
+ InputType: string | null;
47
41
  AutoFocus: boolean;
48
42
  }
49
- export declare const ButtonDefault: IButtonDefault;
50
43
  export interface IIcon {
51
44
  name?: string;
52
45
  alignment?: string;
53
46
  }
54
47
  export interface IButton {
55
- dataTestId?: string;
56
- id?: string;
57
- className?: string;
48
+ dataTestId?: string | null;
49
+ id?: string | null;
50
+ className?: string | null;
58
51
  element?: string;
59
- href?: string;
52
+ href?: string | null;
60
53
  text: string;
61
54
  variant?: string;
62
55
  size?: string;
63
56
  state?: string;
64
57
  icon?: IIcon;
65
- onClick: (value?: string) => void;
66
- inputType?: string;
58
+ onClick?: ((value?: FileList | null) => void) | ((value?: string) => void) | (() => void);
59
+ inputType?: string | null;
67
60
  autoFocus?: boolean;
68
61
  }
69
62
  //# sourceMappingURL=Button.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.type.d.ts","sourceRoot":"","sources":["../../../src/Legacy/Button/Button.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,CAAC,EAAE,MAAM,CAAA;CACV;AAED,eAAO,MAAM,aAAa,EAAE,cAG3B,CAAA;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,UAAU,EAAE,WAIxB,CAAA;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,WAAW,EAAE,YAGzB,CAAA;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,aAAa,EAAE,cAG3B,CAAA;AAED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