@openedx/paragon 21.12.1 → 21.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. package/dist/ActionRow/index.js +7 -8
  2. package/dist/ActionRow/index.js.map +1 -1
  3. package/dist/Alert/index.js +33 -25
  4. package/dist/Alert/index.js.map +1 -1
  5. package/dist/Annotation/index.js +7 -9
  6. package/dist/Annotation/index.js.map +1 -1
  7. package/dist/Avatar/index.js +5 -7
  8. package/dist/Avatar/index.js.map +1 -1
  9. package/dist/AvatarButton/index.js +10 -12
  10. package/dist/AvatarButton/index.js.map +1 -1
  11. package/dist/Badge/index.js +6 -4
  12. package/dist/Badge/index.js.map +1 -1
  13. package/dist/Breadcrumb/BreadcrumbLink.js +11 -14
  14. package/dist/Breadcrumb/BreadcrumbLink.js.map +1 -1
  15. package/dist/Breadcrumb/index.js +29 -29
  16. package/dist/Breadcrumb/index.js.map +1 -1
  17. package/dist/Bubble/index.js +11 -13
  18. package/dist/Bubble/index.js.map +1 -1
  19. package/dist/Button/deprecated/index.js +87 -66
  20. package/dist/Button/deprecated/index.js.map +1 -1
  21. package/dist/Button/index.js +10 -11
  22. package/dist/Button/index.js.map +1 -1
  23. package/dist/Card/CardBody.js +4 -6
  24. package/dist/Card/CardBody.js.map +1 -1
  25. package/dist/Card/CardCarousel/CardCarousel.js +11 -13
  26. package/dist/Card/CardCarousel/CardCarousel.js.map +1 -1
  27. package/dist/Card/CardCarousel/CardCarouselControls.js +6 -7
  28. package/dist/Card/CardCarousel/CardCarouselControls.js.map +1 -1
  29. package/dist/Card/CardCarousel/CardCarouselHeader.js +9 -12
  30. package/dist/Card/CardCarousel/CardCarouselHeader.js.map +1 -1
  31. package/dist/Card/CardCarousel/CardCarouselItems.js +6 -9
  32. package/dist/Card/CardCarousel/CardCarouselItems.js.map +1 -1
  33. package/dist/Card/CardCarousel/CardCarouselProvider.js +27 -28
  34. package/dist/Card/CardCarousel/CardCarouselProvider.js.map +1 -1
  35. package/dist/Card/CardCarousel/CardCarouselSubtitle.js +4 -6
  36. package/dist/Card/CardCarousel/CardCarouselSubtitle.js.map +1 -1
  37. package/dist/Card/CardCarousel/CardCarouselTitle.js +4 -6
  38. package/dist/Card/CardCarousel/CardCarouselTitle.js.map +1 -1
  39. package/dist/Card/CardContext.js +8 -10
  40. package/dist/Card/CardContext.js.map +1 -1
  41. package/dist/Card/CardDeck.js +19 -17
  42. package/dist/Card/CardDeck.js.map +1 -1
  43. package/dist/Card/CardDivider.js +3 -5
  44. package/dist/Card/CardDivider.js.map +1 -1
  45. package/dist/Card/CardFooter.js +15 -18
  46. package/dist/Card/CardFooter.js.map +1 -1
  47. package/dist/Card/CardGrid.js +13 -11
  48. package/dist/Card/CardGrid.js.map +1 -1
  49. package/dist/Card/CardHeader.js +17 -22
  50. package/dist/Card/CardHeader.js.map +1 -1
  51. package/dist/Card/CardImageCap.js +48 -33
  52. package/dist/Card/CardImageCap.js.map +1 -1
  53. package/dist/Card/CardSection.js +11 -14
  54. package/dist/Card/CardSection.js.map +1 -1
  55. package/dist/Card/CardStatus.js +11 -14
  56. package/dist/Card/CardStatus.js.map +1 -1
  57. package/dist/Card/index.js +18 -20
  58. package/dist/Card/index.js.map +1 -1
  59. package/dist/Carousel/index.js +17 -11
  60. package/dist/Carousel/index.js.map +1 -1
  61. package/dist/CheckBox/index.js +66 -36
  62. package/dist/CheckBox/index.js.map +1 -1
  63. package/dist/Chip/index.js +14 -16
  64. package/dist/Chip/index.js.map +1 -1
  65. package/dist/ChipCarousel/index.js +29 -30
  66. package/dist/ChipCarousel/index.js.map +1 -1
  67. package/dist/Collapsible/CollapsibleAdvanced.js +82 -62
  68. package/dist/Collapsible/CollapsibleAdvanced.js.map +1 -1
  69. package/dist/Collapsible/CollapsibleBody.js +13 -15
  70. package/dist/Collapsible/CollapsibleBody.js.map +1 -1
  71. package/dist/Collapsible/CollapsibleTrigger.js +18 -20
  72. package/dist/Collapsible/CollapsibleTrigger.js.map +1 -1
  73. package/dist/Collapsible/CollapsibleVisible.js +6 -9
  74. package/dist/Collapsible/CollapsibleVisible.js.map +1 -1
  75. package/dist/Collapsible/index.js +17 -18
  76. package/dist/Collapsible/index.js.map +1 -1
  77. package/dist/ColorPicker/index.js +58 -33
  78. package/dist/ColorPicker/index.js.map +1 -1
  79. package/dist/Container/index.js +8 -9
  80. package/dist/Container/index.js.map +1 -1
  81. package/dist/DataTable/ActionDisplay.js +8 -9
  82. package/dist/DataTable/ActionDisplay.js.map +1 -1
  83. package/dist/DataTable/BulkActions.js +23 -20
  84. package/dist/DataTable/BulkActions.js.map +1 -1
  85. package/dist/DataTable/CardView.js +46 -43
  86. package/dist/DataTable/CardView.js.map +1 -1
  87. package/dist/DataTable/CollapsibleButtonGroup.js +57 -39
  88. package/dist/DataTable/CollapsibleButtonGroup.js.map +1 -1
  89. package/dist/DataTable/DataTableContext.js +1 -1
  90. package/dist/DataTable/DataTableContext.js.map +1 -1
  91. package/dist/DataTable/DataTableLayout.js +6 -9
  92. package/dist/DataTable/DataTableLayout.js.map +1 -1
  93. package/dist/DataTable/DataViewToggle.js +25 -20
  94. package/dist/DataTable/DataViewToggle.js.map +1 -1
  95. package/dist/DataTable/DropdownFilters.js +41 -28
  96. package/dist/DataTable/DropdownFilters.js.map +1 -1
  97. package/dist/DataTable/EmptyTable.js +6 -9
  98. package/dist/DataTable/EmptyTable.js.map +1 -1
  99. package/dist/DataTable/ExpandAll.js +2 -4
  100. package/dist/DataTable/ExpandAll.js.map +1 -1
  101. package/dist/DataTable/ExpandRow.js +2 -4
  102. package/dist/DataTable/ExpandRow.js.map +1 -1
  103. package/dist/DataTable/FilterStatus.js +18 -17
  104. package/dist/DataTable/FilterStatus.js.map +1 -1
  105. package/dist/DataTable/RowStatus.js +15 -18
  106. package/dist/DataTable/RowStatus.js.map +1 -1
  107. package/dist/DataTable/SidebarFilters.js +16 -13
  108. package/dist/DataTable/SidebarFilters.js.map +1 -1
  109. package/dist/DataTable/SmartStatus.js +14 -16
  110. package/dist/DataTable/SmartStatus.js.map +1 -1
  111. package/dist/DataTable/Table.js +17 -19
  112. package/dist/DataTable/Table.js.map +1 -1
  113. package/dist/DataTable/TableActions.js +11 -13
  114. package/dist/DataTable/TableActions.js.map +1 -1
  115. package/dist/DataTable/TableCell.js +6 -10
  116. package/dist/DataTable/TableCell.js.map +1 -1
  117. package/dist/DataTable/TableControlBar.js +7 -12
  118. package/dist/DataTable/TableControlBar.js.map +1 -1
  119. package/dist/DataTable/TableFilters.js +14 -12
  120. package/dist/DataTable/TableFilters.js.map +1 -1
  121. package/dist/DataTable/TableFooter.js +5 -8
  122. package/dist/DataTable/TableFooter.js.map +1 -1
  123. package/dist/DataTable/TableHeaderCell.js +11 -15
  124. package/dist/DataTable/TableHeaderCell.js.map +1 -1
  125. package/dist/DataTable/TableHeaderRow.js +6 -4
  126. package/dist/DataTable/TableHeaderRow.js.map +1 -1
  127. package/dist/DataTable/TablePagination.js +8 -7
  128. package/dist/DataTable/TablePagination.js.map +1 -1
  129. package/dist/DataTable/TablePaginationMinimal.js +9 -8
  130. package/dist/DataTable/TablePaginationMinimal.js.map +1 -1
  131. package/dist/DataTable/TableRow.js +15 -18
  132. package/dist/DataTable/TableRow.js.map +1 -1
  133. package/dist/DataTable/filters/CheckboxFilter.js +23 -22
  134. package/dist/DataTable/filters/CheckboxFilter.js.map +1 -1
  135. package/dist/DataTable/filters/DropdownFilter.js +14 -19
  136. package/dist/DataTable/filters/DropdownFilter.js.map +1 -1
  137. package/dist/DataTable/filters/MultiSelectDropdownFilter.js +19 -20
  138. package/dist/DataTable/filters/MultiSelectDropdownFilter.js.map +1 -1
  139. package/dist/DataTable/filters/TextFilter.js +10 -13
  140. package/dist/DataTable/filters/TextFilter.js.map +1 -1
  141. package/dist/DataTable/hooks.js +29 -25
  142. package/dist/DataTable/hooks.js.map +1 -1
  143. package/dist/DataTable/index.js +120 -104
  144. package/dist/DataTable/index.js.map +1 -1
  145. package/dist/DataTable/selection/BaseSelectionStatus.js +29 -31
  146. package/dist/DataTable/selection/BaseSelectionStatus.js.map +1 -1
  147. package/dist/DataTable/selection/ControlledSelect.js +13 -9
  148. package/dist/DataTable/selection/ControlledSelect.js.map +1 -1
  149. package/dist/DataTable/selection/ControlledSelectHeader.js +19 -15
  150. package/dist/DataTable/selection/ControlledSelectHeader.js.map +1 -1
  151. package/dist/DataTable/selection/ControlledSelectionStatus.js +34 -24
  152. package/dist/DataTable/selection/ControlledSelectionStatus.js.map +1 -1
  153. package/dist/DataTable/selection/SelectionStatus.js +23 -23
  154. package/dist/DataTable/selection/SelectionStatus.js.map +1 -1
  155. package/dist/DataTable/utils/getVisibleColumns.js +36 -44
  156. package/dist/DataTable/utils/getVisibleColumns.js.map +1 -1
  157. package/dist/Dropdown/deprecated/DropdownButton.js +9 -13
  158. package/dist/Dropdown/deprecated/DropdownButton.js.map +1 -1
  159. package/dist/Dropdown/deprecated/DropdownItem.js +7 -8
  160. package/dist/Dropdown/deprecated/DropdownItem.js.map +1 -1
  161. package/dist/Dropdown/deprecated/DropdownMenu.js +8 -12
  162. package/dist/Dropdown/deprecated/DropdownMenu.js.map +1 -1
  163. package/dist/Dropdown/deprecated/index.js +136 -103
  164. package/dist/Dropdown/deprecated/index.js.map +1 -1
  165. package/dist/Dropdown/index.js +32 -29
  166. package/dist/Dropdown/index.js.map +1 -1
  167. package/dist/Dropzone/DefaultContent.js +13 -13
  168. package/dist/Dropzone/DefaultContent.js.map +1 -1
  169. package/dist/Dropzone/DragError.js +1 -3
  170. package/dist/Dropzone/DragError.js.map +1 -1
  171. package/dist/Dropzone/GenericError.js +7 -7
  172. package/dist/Dropzone/GenericError.js.map +1 -1
  173. package/dist/Dropzone/UploadProgress.js +6 -8
  174. package/dist/Dropzone/UploadProgress.js.map +1 -1
  175. package/dist/Dropzone/index.js +145 -86
  176. package/dist/Dropzone/index.js.map +1 -1
  177. package/dist/Fieldset/index.js +82 -57
  178. package/dist/Fieldset/index.js.map +1 -1
  179. package/dist/Form/FormAutosuggest.js +137 -95
  180. package/dist/Form/FormAutosuggest.js.map +1 -1
  181. package/dist/Form/FormAutosuggestOption.js +4 -6
  182. package/dist/Form/FormAutosuggestOption.js.map +1 -1
  183. package/dist/Form/FormCheckbox.js +35 -42
  184. package/dist/Form/FormCheckbox.js.map +1 -1
  185. package/dist/Form/FormCheckboxSet.js +13 -16
  186. package/dist/Form/FormCheckboxSet.js.map +1 -1
  187. package/dist/Form/FormCheckboxSetContext.js +39 -34
  188. package/dist/Form/FormCheckboxSetContext.js.map +1 -1
  189. package/dist/Form/FormControl.js +41 -35
  190. package/dist/Form/FormControl.js.map +1 -1
  191. package/dist/Form/FormControlDecorator.js +3 -5
  192. package/dist/Form/FormControlDecorator.js.map +1 -1
  193. package/dist/Form/FormControlDecoratorGroup.js +8 -10
  194. package/dist/Form/FormControlDecoratorGroup.js.map +1 -1
  195. package/dist/Form/FormControlFeedback.js +12 -15
  196. package/dist/Form/FormControlFeedback.js.map +1 -1
  197. package/dist/Form/FormControlFloatingLabel.js +3 -6
  198. package/dist/Form/FormControlFloatingLabel.js.map +1 -1
  199. package/dist/Form/FormControlSet.js +8 -9
  200. package/dist/Form/FormControlSet.js.map +1 -1
  201. package/dist/Form/FormGroup.js +11 -12
  202. package/dist/Form/FormGroup.js.map +1 -1
  203. package/dist/Form/FormGroupContext.js +64 -39
  204. package/dist/Form/FormGroupContext.js.map +1 -1
  205. package/dist/Form/FormLabel.js +15 -17
  206. package/dist/Form/FormLabel.js.map +1 -1
  207. package/dist/Form/FormRadio.js +19 -22
  208. package/dist/Form/FormRadio.js.map +1 -1
  209. package/dist/Form/FormRadioSet.js +13 -16
  210. package/dist/Form/FormRadioSet.js.map +1 -1
  211. package/dist/Form/FormRadioSetContext.js +39 -34
  212. package/dist/Form/FormRadioSetContext.js.map +1 -1
  213. package/dist/Form/FormSwitch.js +16 -20
  214. package/dist/Form/FormSwitch.js.map +1 -1
  215. package/dist/Form/FormText.js +20 -29
  216. package/dist/Form/FormText.js.map +1 -1
  217. package/dist/Form/useCheckboxSetValues.js +46 -23
  218. package/dist/Form/useCheckboxSetValues.js.map +1 -1
  219. package/dist/Hyperlink/index.js +25 -25
  220. package/dist/Hyperlink/index.js.map +1 -1
  221. package/dist/Hyperlink/index.scss +2 -2
  222. package/dist/Icon/index.js +21 -20
  223. package/dist/Icon/index.js.map +1 -1
  224. package/dist/IconButton/index.js +30 -32
  225. package/dist/IconButton/index.js.map +1 -1
  226. package/dist/IconButtonToggle/index.js +16 -16
  227. package/dist/IconButtonToggle/index.js.map +1 -1
  228. package/dist/Input/index.js +122 -92
  229. package/dist/Input/index.js.map +1 -1
  230. package/dist/InputSelect/index.js +78 -51
  231. package/dist/InputSelect/index.js.map +1 -1
  232. package/dist/InputText/index.js +11 -9
  233. package/dist/InputText/index.js.map +1 -1
  234. package/dist/Layout/index.js +33 -29
  235. package/dist/Layout/index.js.map +1 -1
  236. package/dist/ListBox/index.js +112 -80
  237. package/dist/ListBox/index.js.map +1 -1
  238. package/dist/ListBoxOption/index.js +68 -45
  239. package/dist/ListBoxOption/index.js.map +1 -1
  240. package/dist/MailtoLink/index.js +37 -34
  241. package/dist/MailtoLink/index.js.map +1 -1
  242. package/dist/Menu/MenuItem.js +13 -14
  243. package/dist/Menu/MenuItem.js.map +1 -1
  244. package/dist/Menu/SelectMenu.js +68 -44
  245. package/dist/Menu/SelectMenu.js.map +1 -1
  246. package/dist/Menu/index.js +10 -11
  247. package/dist/Menu/index.js.map +1 -1
  248. package/dist/Modal/AlertModal.js +5 -7
  249. package/dist/Modal/AlertModal.js.map +1 -1
  250. package/dist/Modal/FullscreenModal.js +6 -8
  251. package/dist/Modal/FullscreenModal.js.map +1 -1
  252. package/dist/Modal/MarketingModal.js +8 -10
  253. package/dist/Modal/MarketingModal.js.map +1 -1
  254. package/dist/Modal/ModalCloseButton.js +13 -15
  255. package/dist/Modal/ModalCloseButton.js.map +1 -1
  256. package/dist/Modal/ModalContext.js +13 -13
  257. package/dist/Modal/ModalContext.js.map +1 -1
  258. package/dist/Modal/ModalDialog.js +22 -23
  259. package/dist/Modal/ModalDialog.js.map +1 -1
  260. package/dist/Modal/ModalDialogBody.js +22 -11
  261. package/dist/Modal/ModalDialogBody.js.map +1 -1
  262. package/dist/Modal/ModalDialogFooter.js +6 -7
  263. package/dist/Modal/ModalDialogFooter.js.map +1 -1
  264. package/dist/Modal/ModalDialogHeader.js +6 -7
  265. package/dist/Modal/ModalDialogHeader.js.map +1 -1
  266. package/dist/Modal/ModalDialogHero.js +6 -7
  267. package/dist/Modal/ModalDialogHero.js.map +1 -1
  268. package/dist/Modal/ModalDialogHeroBackground.js +8 -9
  269. package/dist/Modal/ModalDialogHeroBackground.js.map +1 -1
  270. package/dist/Modal/ModalDialogHeroContent.js +6 -7
  271. package/dist/Modal/ModalDialogHeroContent.js.map +1 -1
  272. package/dist/Modal/ModalDialogTitle.js +6 -7
  273. package/dist/Modal/ModalDialogTitle.js.map +1 -1
  274. package/dist/Modal/ModalLayer.js +11 -17
  275. package/dist/Modal/ModalLayer.js.map +1 -1
  276. package/dist/Modal/ModalPopup.js +17 -17
  277. package/dist/Modal/ModalPopup.js.map +1 -1
  278. package/dist/Modal/PopperElement.js +25 -18
  279. package/dist/Modal/PopperElement.js.map +1 -1
  280. package/dist/Modal/Portal.js +40 -18
  281. package/dist/Modal/Portal.js.map +1 -1
  282. package/dist/Modal/StandardModal.js +6 -8
  283. package/dist/Modal/StandardModal.js.map +1 -1
  284. package/dist/Modal/index.js +215 -187
  285. package/dist/Modal/index.js.map +1 -1
  286. package/dist/Nav/index.js +3 -2
  287. package/dist/Nav/index.js.map +1 -1
  288. package/dist/Navbar/index.js +7 -6
  289. package/dist/Navbar/index.js.map +1 -1
  290. package/dist/OverflowScroll/OverflowScroll.js +45 -37
  291. package/dist/OverflowScroll/OverflowScroll.js.map +1 -1
  292. package/dist/OverflowScroll/OverflowScrollContext.js +1 -1
  293. package/dist/OverflowScroll/OverflowScrollContext.js.map +1 -1
  294. package/dist/OverflowScroll/OverflowScrollItems.js +2 -4
  295. package/dist/OverflowScroll/OverflowScrollItems.js.map +1 -1
  296. package/dist/Overlay/index.js +4 -4
  297. package/dist/Overlay/index.js.map +1 -1
  298. package/dist/PageBanner/index.js +11 -13
  299. package/dist/PageBanner/index.js.map +1 -1
  300. package/dist/Pagination/index.js +331 -296
  301. package/dist/Pagination/index.js.map +1 -1
  302. package/dist/Popover/index.js +11 -14
  303. package/dist/Popover/index.js.map +1 -1
  304. package/dist/ProductTour/Checkpoint.js +29 -22
  305. package/dist/ProductTour/Checkpoint.js.map +1 -1
  306. package/dist/ProductTour/CheckpointActionRow.js +18 -16
  307. package/dist/ProductTour/CheckpointActionRow.js.map +1 -1
  308. package/dist/ProductTour/CheckpointBody.js +2 -4
  309. package/dist/ProductTour/CheckpointBody.js.map +1 -1
  310. package/dist/ProductTour/CheckpointBreadcrumbs.js +16 -16
  311. package/dist/ProductTour/CheckpointBreadcrumbs.js.map +1 -1
  312. package/dist/ProductTour/CheckpointTitle.js +2 -4
  313. package/dist/ProductTour/CheckpointTitle.js.map +1 -1
  314. package/dist/ProductTour/index.js +66 -47
  315. package/dist/ProductTour/index.js.map +1 -1
  316. package/dist/ProgressBar/index.js +37 -35
  317. package/dist/ProgressBar/index.js.map +1 -1
  318. package/dist/RadioButtonGroup/index.js +133 -102
  319. package/dist/RadioButtonGroup/index.js.map +1 -1
  320. package/dist/Scrollable/index.js +30 -15
  321. package/dist/Scrollable/index.js.map +1 -1
  322. package/dist/SearchField/SearchFieldAdvanced.js +54 -44
  323. package/dist/SearchField/SearchFieldAdvanced.js.map +1 -1
  324. package/dist/SearchField/SearchFieldClearButton.js +7 -8
  325. package/dist/SearchField/SearchFieldClearButton.js.map +1 -1
  326. package/dist/SearchField/SearchFieldInput.js +8 -9
  327. package/dist/SearchField/SearchFieldInput.js.map +1 -1
  328. package/dist/SearchField/SearchFieldLabel.js +5 -8
  329. package/dist/SearchField/SearchFieldLabel.js.map +1 -1
  330. package/dist/SearchField/SearchFieldSubmitButton.js +12 -15
  331. package/dist/SearchField/SearchFieldSubmitButton.js.map +1 -1
  332. package/dist/SearchField/index.js +22 -22
  333. package/dist/SearchField/index.js.map +1 -1
  334. package/dist/SelectableBox/SelectableBoxSet.js +25 -26
  335. package/dist/SelectableBox/SelectableBoxSet.js.map +1 -1
  336. package/dist/SelectableBox/index.js +42 -38
  337. package/dist/SelectableBox/index.js.map +1 -1
  338. package/dist/Sheet/SheetContainer.js +38 -16
  339. package/dist/Sheet/SheetContainer.js.map +1 -1
  340. package/dist/Sheet/index.js +65 -43
  341. package/dist/Sheet/index.js.map +1 -1
  342. package/dist/Spinner/index.js +8 -9
  343. package/dist/Spinner/index.js.map +1 -1
  344. package/dist/Stack/index.js +9 -11
  345. package/dist/Stack/index.js.map +1 -1
  346. package/dist/StatefulButton/index.js +15 -17
  347. package/dist/StatefulButton/index.js.map +1 -1
  348. package/dist/StatusAlert/index.js +120 -82
  349. package/dist/StatusAlert/index.js.map +1 -1
  350. package/dist/Stepper/Stepper.js +2 -4
  351. package/dist/Stepper/Stepper.js.map +1 -1
  352. package/dist/Stepper/StepperActionRow.js +7 -10
  353. package/dist/Stepper/StepperActionRow.js.map +1 -1
  354. package/dist/Stepper/StepperContext.js +64 -32
  355. package/dist/Stepper/StepperContext.js.map +1 -1
  356. package/dist/Stepper/StepperHeader.js +23 -30
  357. package/dist/Stepper/StepperHeader.js.map +1 -1
  358. package/dist/Stepper/StepperHeaderStep.js +14 -17
  359. package/dist/Stepper/StepperHeaderStep.js.map +1 -1
  360. package/dist/Stepper/StepperStep.js +23 -24
  361. package/dist/Stepper/StepperStep.js.map +1 -1
  362. package/dist/Sticky/index.js +30 -22
  363. package/dist/Sticky/index.js.map +1 -1
  364. package/dist/Table/index.js +178 -109
  365. package/dist/Table/index.js.map +1 -1
  366. package/dist/Tabs/deprecated/index.js +99 -66
  367. package/dist/Tabs/deprecated/index.js.map +1 -1
  368. package/dist/Tabs/index.js +65 -49
  369. package/dist/Tabs/index.js.map +1 -1
  370. package/dist/TextArea/index.js +10 -8
  371. package/dist/TextArea/index.js.map +1 -1
  372. package/dist/Toast/ToastContainer.js +38 -16
  373. package/dist/Toast/ToastContainer.js.map +1 -1
  374. package/dist/Toast/index.js +33 -18
  375. package/dist/Toast/index.js.map +1 -1
  376. package/dist/Tooltip/index.js +8 -9
  377. package/dist/Tooltip/index.js.map +1 -1
  378. package/dist/TransitionReplace/DemoTransitionReplace.js +12 -3
  379. package/dist/TransitionReplace/DemoTransitionReplace.js.map +1 -1
  380. package/dist/TransitionReplace/index.js +136 -100
  381. package/dist/TransitionReplace/index.js.map +1 -1
  382. package/dist/Truncate/index.js +30 -24
  383. package/dist/Truncate/index.js.map +1 -1
  384. package/dist/ValidationFormGroup/index.js +38 -37
  385. package/dist/ValidationFormGroup/index.js.map +1 -1
  386. package/dist/ValidationMessage/index.js +76 -51
  387. package/dist/ValidationMessage/index.js.map +1 -1
  388. package/dist/asInput/index.js +251 -202
  389. package/dist/asInput/index.js.map +1 -1
  390. package/dist/hooks/useArrowKeyNavigation.js +46 -43
  391. package/dist/hooks/useArrowKeyNavigation.js.map +1 -1
  392. package/dist/hooks/useIndexOfLastVisibleChild.js +40 -26
  393. package/dist/hooks/useIndexOfLastVisibleChild.js.map +1 -1
  394. package/dist/hooks/useIsVisible.js +20 -13
  395. package/dist/hooks/useIsVisible.js.map +1 -1
  396. package/dist/hooks/useToggle.js +18 -11
  397. package/dist/hooks/useToggle.js.map +1 -1
  398. package/dist/hooks/useWindowSize.js +17 -6
  399. package/dist/hooks/useWindowSize.js.map +1 -1
  400. package/dist/paragon.css +1 -1
  401. package/dist/withDeprecatedProps.js +79 -58
  402. package/dist/withDeprecatedProps.js.map +1 -1
  403. package/package.json +1 -5
  404. package/src/Button/index.jsx +2 -2
  405. package/src/Dropzone/index.jsx +1 -1
  406. package/src/Hyperlink/index.scss +2 -2
  407. package/src/Icon/index.jsx +1 -1
  408. package/src/IconButton/__snapshots__/IconButton.test.jsx.snap +12 -10
  409. package/src/IconButton/index.jsx +1 -1
  410. package/src/Menu/MenuItem.jsx +2 -2
  411. package/src/Overlay/README.md +1 -1
  412. package/src/Overlay/index.jsx +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","classNames","BreadcrumbLink","ChevronRight","Icon","Breadcrumb","_ref","links","activeLabel","spacer","clickHandler","variant","isMobile","ariaLabel","linkAs","props","_objectWithoutProperties","_excluded","linkCount","length","displayLinks","createElement","_extends","className","map","link","i","Fragment","key","label","as","linkProps","role","src","id","propTypes","arrayOf","shape","string","isRequired","element","func","oneOf","bool","elementType","defaultProps","undefined"],"sources":["../../src/Breadcrumb/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nimport BreadcrumbLink from './BreadcrumbLink';\nimport { ChevronRight } from '../../icons';\nimport Icon from '../Icon';\n\nfunction Breadcrumb({\n links, activeLabel, spacer, clickHandler,\n variant, isMobile, ariaLabel, linkAs, ...props\n}) {\n const linkCount = links.length;\n const displayLinks = isMobile ? [links[linkCount - 1]] : links;\n\n return (\n <nav\n aria-label={ariaLabel}\n className={classNames('pgn__breadcrumb', `pgn__breadcrumb-${variant}`)}\n {...props}\n >\n <ol className={classNames('list-inline', { 'is-mobile': isMobile })}>\n {displayLinks.map((link, i) => (\n <React.Fragment key={link.label}>\n <li className={classNames('list-inline-item')}>\n <BreadcrumbLink as={linkAs} clickHandler={clickHandler} linkProps={link} />\n </li>\n {(activeLabel || ((i + 1) < linkCount))\n && (\n <li className=\"list-inline-item\" role=\"presentation\">\n {spacer || <Icon src={ChevronRight} id={`spacer-${i}`} />}\n </li>\n )}\n </React.Fragment>\n ))}\n {!isMobile && activeLabel && <li className=\"list-inline-item active\" key=\"active\" aria-current=\"page\">{activeLabel}</li>}\n </ol>\n </nav>\n );\n}\n\nBreadcrumb.propTypes = {\n /** An array of objects describing links to be rendered. The contents of an object depend on the value of `linkAs`\n * prop as these objects will get passed down as props to the underlying component defined by `linkAs` prop.\n */\n links: PropTypes.arrayOf(PropTypes.shape({\n label: PropTypes.string,\n })).isRequired,\n /** allows to add a label that is not a link to the end of the breadcrumb. */\n activeLabel: PropTypes.string,\n /** label of the element */\n ariaLabel: PropTypes.string,\n /** allows to add a custom element between the breadcrumb items.\n * Defaults to `>` rendered using the `Icon` component. */\n spacer: PropTypes.element,\n /** allows to add a custom function to be called `onClick` of a breadcrumb link.\n * The use case for this is for adding custom analytics to the component. */\n clickHandler: PropTypes.func,\n /** The `Breadcrumbs` style variant to use. */\n variant: PropTypes.oneOf(['light', 'dark']),\n /** The `Breadcrumbs` mobile variant view. */\n isMobile: PropTypes.bool,\n /** Specifies the base element to use when rendering links, you should generally use either plain 'a' or\n * [react-router's Link](https://reactrouter.com/en/main/components/link).\n */\n linkAs: PropTypes.elementType,\n};\n\nBreadcrumb.defaultProps = {\n activeLabel: undefined,\n ariaLabel: 'breadcrumb',\n spacer: undefined,\n clickHandler: undefined,\n variant: 'light',\n isMobile: false,\n linkAs: 'a',\n};\n\nexport default Breadcrumb;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SAASC,YAAY,QAAQ,aAAa;AAC1C,OAAOC,IAAI,MAAM,SAAS;AAE1B,SAASC,UAAUA,CAAAC,IAAA,EAGhB;EAAA,IAHiB;MAClBC,KAAK;MAAEC,WAAW;MAAEC,MAAM;MAAEC,YAAY;MACxCC,OAAO;MAAEC,QAAQ;MAAEC,SAAS;MAAEC;IAChC,CAAC,GAAAR,IAAA;IAD0CS,KAAK,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA;EAE9C,MAAMC,SAAS,GAAGX,KAAK,CAACY,MAAM;EAC9B,MAAMC,YAAY,GAAGR,QAAQ,GAAG,CAACL,KAAK,CA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AS,CAACoC,OAAO,CAACpC,SAAS,CAACqC,KAAK,CAAC;IACvCR,KAAK,EAAE7B,SAAS,CAACsC;EACnB,CAAC,CAAC,CAAC,CAACC,UAAU;EACd;EACA/B,WAAW,EAAER,SAAS,CAACsC,MAAM;EAC7B;EACAzB,SAAS,EAAEb,SAAS,CAACsC,MAAM;EAC3B;AACF;EACE7B,MAAM,EAAET,SAAS,CAACwC,OAAO;EACzB;AACF;EACE9B,YAAY,EAAEV,SAAS,CAACyC,IAAI;EAC5B;EACA9B,OAAO,EAAEX,SAAS,CAAC0C,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;EAC3C;EACA9B,QAAQ,EAAEZ,SAAS,CAAC2C,IAAI;EACxB;AACF;AACA;EACE7B,MAAM,EAAEd,SAAS,CAAC4C;AACpB,CAAC;AAEDvC,UAAU,CAACwC,YAAY,GAAG;EACxBrC,WAAW,EAAEsC,SAAS;EACtBjC,SAAS,EAAE,YAAY;EACvBJ,MAAM,EAAEqC,SAAS;EACjBpC,YAAY,EAAEoC,SAAS;EACvBnC,OAAO,EAAE,OAAO;EAChBC,QAAQ,EAAE,KAAK;EACfE,MAAM,EAAE;AACV,CAAC;AAED,eAAeT,UAAU"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","classNames","BreadcrumbLink","ChevronRight","Icon","Breadcrumb","_ref","links","activeLabel","spacer","clickHandler","variant","isMobile","ariaLabel","linkAs","props","_objectWithoutProperties","_excluded","linkCount","length","displayLinks","createElement","_extends","className","concat","map","link","i","Fragment","key","label","as","linkProps","role","src","id","propTypes","arrayOf","shape","string","isRequired","element","func","oneOf","bool","elementType","defaultProps","undefined"],"sources":["../../src/Breadcrumb/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nimport BreadcrumbLink from './BreadcrumbLink';\nimport { ChevronRight } from '../../icons';\nimport Icon from '../Icon';\n\nfunction Breadcrumb({\n links, activeLabel, spacer, clickHandler,\n variant, isMobile, ariaLabel, linkAs, ...props\n}) {\n const linkCount = links.length;\n const displayLinks = isMobile ? [links[linkCount - 1]] : links;\n\n return (\n <nav\n aria-label={ariaLabel}\n className={classNames('pgn__breadcrumb', `pgn__breadcrumb-${variant}`)}\n {...props}\n >\n <ol className={classNames('list-inline', { 'is-mobile': isMobile })}>\n {displayLinks.map((link, i) => (\n <React.Fragment key={link.label}>\n <li className={classNames('list-inline-item')}>\n <BreadcrumbLink as={linkAs} clickHandler={clickHandler} linkProps={link} />\n </li>\n {(activeLabel || ((i + 1) < linkCount))\n && (\n <li className=\"list-inline-item\" role=\"presentation\">\n {spacer || <Icon src={ChevronRight} id={`spacer-${i}`} />}\n </li>\n )}\n </React.Fragment>\n ))}\n {!isMobile && activeLabel && <li className=\"list-inline-item active\" key=\"active\" aria-current=\"page\">{activeLabel}</li>}\n </ol>\n </nav>\n );\n}\n\nBreadcrumb.propTypes = {\n /** An array of objects describing links to be rendered. The contents of an object depend on the value of `linkAs`\n * prop as these objects will get passed down as props to the underlying component defined by `linkAs` prop.\n */\n links: PropTypes.arrayOf(PropTypes.shape({\n label: PropTypes.string,\n })).isRequired,\n /** allows to add a label that is not a link to the end of the breadcrumb. */\n activeLabel: PropTypes.string,\n /** label of the element */\n ariaLabel: PropTypes.string,\n /** allows to add a custom element between the breadcrumb items.\n * Defaults to `>` rendered using the `Icon` component. */\n spacer: PropTypes.element,\n /** allows to add a custom function to be called `onClick` of a breadcrumb link.\n * The use case for this is for adding custom analytics to the component. */\n clickHandler: PropTypes.func,\n /** The `Breadcrumbs` style variant to use. */\n variant: PropTypes.oneOf(['light', 'dark']),\n /** The `Breadcrumbs` mobile variant view. */\n isMobile: PropTypes.bool,\n /** Specifies the base element to use when rendering links, you should generally use either plain 'a' or\n * [react-router's Link](https://reactrouter.com/en/main/components/link).\n */\n linkAs: PropTypes.elementType,\n};\n\nBreadcrumb.defaultProps = {\n activeLabel: undefined,\n ariaLabel: 'breadcrumb',\n spacer: undefined,\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EAC3C;EACA/B,QAAQ,EAAEZ,SAAS,CAAC4C,IAAI;EACxB;AACF;AACA;EACE9B,MAAM,EAAEd,SAAS,CAAC6C;AACpB,CAAC;AAEDxC,UAAU,CAACyC,YAAY,GAAG;EACxBtC,WAAW,EAAEuC,SAAS;EACtBlC,SAAS,EAAE,YAAY;EACvBJ,MAAM,EAAEsC,SAAS;EACjBrC,YAAY,EAAEqC,SAAS;EACvBpC,OAAO,EAAE,OAAO;EAChBC,QAAQ,EAAE,KAAK;EACfE,MAAM,EAAE;AACV,CAAC;AAED,eAAeT,UAAU"}
@@ -1,25 +1,23 @@
1
- const _excluded = ["variant", "className", "children", "disabled", "expandable"];
1
+ var _excluded = ["variant", "className", "children", "disabled", "expandable"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
5
  import React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import classNames from 'classnames';
8
- const STYLE_VARIANTS = ['primary', 'success', 'error', 'warning'];
9
- const Bubble = /*#__PURE__*/React.forwardRef((_ref, ref) => {
10
- let {
11
- variant,
12
- className,
13
- children,
14
- disabled,
15
- expandable
16
- } = _ref,
8
+ var STYLE_VARIANTS = ['primary', 'success', 'error', 'warning'];
9
+ var Bubble = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
10
+ var variant = _ref.variant,
11
+ className = _ref.className,
12
+ children = _ref.children,
13
+ disabled = _ref.disabled,
14
+ expandable = _ref.expandable,
17
15
  props = _objectWithoutProperties(_ref, _excluded);
18
16
  return /*#__PURE__*/React.createElement("div", _extends({
19
17
  ref: ref,
20
- className: classNames('pgn__bubble', `pgn__bubble-${variant}`, className, {
21
- disabled,
22
- expandable
18
+ className: classNames('pgn__bubble', "pgn__bubble-".concat(variant), className, {
19
+ disabled: disabled,
20
+ expandable: expandable
23
21
  })
24
22
  }, props), children);
25
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","classNames","STYLE_VARIANTS","Bubble","forwardRef","_ref","ref","variant","className","children","disabled","expandable","props","_objectWithoutProperties","_excluded","createElement","_extends","propTypes","node","oneOf","bool","string","defaultProps","undefined"],"sources":["../../src/Bubble/index.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nconst STYLE_VARIANTS = ['primary', 'success', 'error', 'warning'] as const;\n\nexport type BubbleVariant = typeof STYLE_VARIANTS[number];\n\nexport interface BubbleProps {\n children: React.ReactNode;\n variant?: BubbleVariant;\n disabled?: boolean;\n className?: string;\n expandable?: boolean;\n}\n\nconst Bubble = React.forwardRef<HTMLDivElement, BubbleProps>(({\n variant,\n className,\n children,\n disabled,\n expandable,\n ...props\n}, ref) => (\n <div\n ref={ref}\n className={classNames(\n 'pgn__bubble',\n `pgn__bubble-${variant}`,\n className,\n { disabled, expandable },\n )}\n {...props}\n >\n {children}\n </div>\n));\n\nBubble.propTypes = {\n /** Specifies contents of the component. */\n children: PropTypes.node,\n /** The `Bubble` style variant to use. */\n variant: PropTypes.oneOf(STYLE_VARIANTS),\n /** Activates disabled variant. */\n disabled: PropTypes.bool,\n /** A class name to append to the base element. */\n className: PropTypes.string,\n /** Specifies whether to add padding to the `Bubble` or not. */\n expandable: PropTypes.bool,\n};\n\nBubble.defaultProps = {\n children: null,\n variant: 'primary',\n disabled: false,\n className: undefined,\n expandable: false,\n};\n\nexport default Bubble;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,MAAMC,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAU;AAY1E,MAAMC,MAAM,gBAAGJ,KAAK,CAACK,UAAU,CAA8B,CAAAC,IAAA,EAO1DC,GAAG;EAAA,IAPwD;MAC5DC,OAAO;MACPC,SAAS;MACTC,QAAQ;MACRC,QAAQ;MACRC;IAEF,CAAC,GAAAN,IAAA;IADIO,KAAK,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,SAAA;EAAA,oBAERf,KAAA,CAAAgB,aAAA,QAAAC,QAAA;IACEV,GAAG,EAAEA,GAAI;IACTE,SAAS,EAAEP,UAAU,CACnB,aAAa,EACZ,eAAcM,OAAQ,EAAC,EACxBC,SAAS,EACT;MAAEE,QAAQ;MAAEC;IAAW,CACzB;EAAE,GACEC,KAAK,GAERH,QACE,CAAC;AAAA,CACP,CAAC;AAEFN,MAAM,CAACc,SAAS,GAAG;EACjB;EACAR,QAAQ,EAAET,SAAS,CAACkB,IAAI;EACxB;EACAX,OAAO,EAAEP,SAAS,CAACmB,KAAK,CAACjB,cAAc,CAAC;EACxC;EACAQ,QAAQ,EAAEV,SAAS,CAACoB,IAAI;EACxB;EACAZ,SAAS,EAAER,SAAS,CAACqB,MAAM;EAC3B;EACAV,UAAU,EAAEX,SAAS,CAACoB;AACxB,CAAC;AAEDjB,MAAM,CAACmB,YAAY,GAAG;EACpBb,QAAQ,EAAE,IAAI;EACdF,OAAO,EAAE,SAAS;EAClBG,QAAQ,EAAE,KAAK;EACfF,SAAS,EAAEe,SAAS;EACpBZ,UAAU,EAAE;AACd,CAAC;AAED,eAAeR,MAAM"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","classNames","STYLE_VARIANTS","Bubble","forwardRef","_ref","ref","variant","className","children","disabled","expandable","props","_objectWithoutProperties","_excluded","createElement","_extends","concat","propTypes","node","oneOf","bool","string","defaultProps","undefined"],"sources":["../../src/Bubble/index.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nconst STYLE_VARIANTS = ['primary', 'success', 'error', 'warning'] as const;\n\nexport type BubbleVariant = typeof STYLE_VARIANTS[number];\n\nexport interface BubbleProps {\n children: React.ReactNode;\n variant?: BubbleVariant;\n disabled?: boolean;\n className?: string;\n expandable?: boolean;\n}\n\nconst Bubble = React.forwardRef<HTMLDivElement, BubbleProps>(({\n variant,\n className,\n children,\n disabled,\n expandable,\n ...props\n}, ref) => (\n <div\n ref={ref}\n className={classNames(\n 'pgn__bubble',\n `pgn__bubble-${variant}`,\n className,\n { disabled, expandable },\n )}\n {...props}\n >\n {children}\n </div>\n));\n\nBubble.propTypes = {\n /** Specifies contents of the component. */\n children: PropTypes.node,\n /** The `Bubble` style variant to use. */\n variant: PropTypes.oneOf(STYLE_VARIANTS),\n /** Activates disabled variant. */\n disabled: PropTypes.bool,\n /** A class name to append to the base element. */\n className: PropTypes.string,\n /** Specifies whether to add padding to the `Bubble` or not. */\n expandable: PropTypes.bool,\n};\n\nBubble.defaultProps = {\n children: null,\n variant: 'primary',\n disabled: false,\n className: undefined,\n expandable: false,\n};\n\nexport default Bubble;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,IAAMC,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAU;AAY1E,IAAMC,MAAM,gBAAGJ,KAAK,CAACK,UAAU,CAA8B,UAAAC,IAAA,EAO1DC,GAAG;EAAA,IANJC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IACRC,UAAU,GAAAN,IAAA,CAAVM,UAAU;IACPC,KAAK,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,SAAA;EAAA,oBAERf,KAAA,CAAAgB,aAAA,QAAAC,QAAA;IACEV,GAAG,EAAEA,GAAI;IACTE,SAAS,EAAEP,UAAU,CACnB,aAAa,iBAAAgB,MAAA,CACEV,OAAO,GACtBC,SAAS,EACT;MAAEE,QAAQ,EAARA,QAAQ;MAAEC,UAAU,EAAVA;IAAW,CACzB;EAAE,GACEC,KAAK,GAERH,QACE,CAAC;AAAA,CACP,CAAC;AAEFN,MAAM,CAACe,SAAS,GAAG;EACjB;EACAT,QAAQ,EAAET,SAAS,CAACmB,IAAI;EACxB;EACAZ,OAAO,EAAEP,SAAS,CAACoB,KAAK,CAAClB,cAAc,CAAC;EACxC;EACAQ,QAAQ,EAAEV,SAAS,CAACqB,IAAI;EACxB;EACAb,SAAS,EAAER,SAAS,CAACsB,MAAM;EAC3B;EACAX,UAAU,EAAEX,SAAS,CAACqB;AACxB,CAAC;AAEDlB,MAAM,CAACoB,YAAY,GAAG;EACpBd,QAAQ,EAAE,IAAI;EACdF,OAAO,EAAE,SAAS;EAClBG,QAAQ,EAAE,KAAK;EACfF,SAAS,EAAEgB,SAAS;EACpBb,UAAU,EAAE;AACd,CAAC;AAED,eAAeR,MAAM"}
@@ -1,22 +1,39 @@
1
- const _excluded = ["buttonType", "className", "children", "isClose", "type", "inputRef"];
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _excluded = ["buttonType", "className", "children", "isClose", "type", "inputRef"];
2
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
5
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
6
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
13
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
15
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
16
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
17
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
18
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5
19
  import React from 'react';
6
20
  import classNames from 'classnames';
7
21
  import PropTypes from 'prop-types';
8
22
  import withDeprecatedProps, { DeprTypes } from '../../withDeprecatedProps';
9
- class DeprecatedButton extends React.Component {
10
- constructor(props) {
11
- super(props);
12
- const {
13
- onBlur,
14
- onKeyDown
15
- } = props;
16
- this.onBlur = onBlur.bind(this);
17
- this.onKeyDown = onKeyDown.bind(this);
18
- this.onClick = this.onClick.bind(this);
19
- this.setRefs = this.setRefs.bind(this);
23
+ var DeprecatedButton = /*#__PURE__*/function (_React$Component) {
24
+ _inherits(DeprecatedButton, _React$Component);
25
+ var _super = _createSuper(DeprecatedButton);
26
+ function DeprecatedButton(props) {
27
+ var _this;
28
+ _classCallCheck(this, DeprecatedButton);
29
+ _this = _super.call(this, props);
30
+ var onBlur = props.onBlur,
31
+ onKeyDown = props.onKeyDown;
32
+ _this.onBlur = onBlur.bind(_assertThisInitialized(_this));
33
+ _this.onKeyDown = onKeyDown.bind(_assertThisInitialized(_this));
34
+ _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
35
+ _this.setRefs = _this.setRefs.bind(_assertThisInitialized(_this));
36
+ return _this;
20
37
  }
21
38
 
22
39
  /*
@@ -25,55 +42,55 @@ class DeprecatedButton extends React.Component {
25
42
  focus on onClick.
26
43
  See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button.
27
44
  */
28
- onClick(e) {
29
- this.buttonRef.focus();
30
- this.props.onClick(e);
31
- }
45
+ _createClass(DeprecatedButton, [{
46
+ key: "onClick",
47
+ value: function onClick(e) {
48
+ this.buttonRef.focus();
49
+ this.props.onClick(e);
50
+ }
32
51
 
33
- /*
34
- The button component needs a ref to itself to be able to force
35
- focus in its onClick function (buttonRef). It also needs to accept
36
- a callback function from parent components to give those parents
37
- a reference to their child button (e.g. for the modal component).
38
- Therefore, both have been wrapped in a function bound on the class,
39
- since one cannot set two ref attributes on a component.
40
- */
41
- setRefs(input) {
42
- this.buttonRef = input;
43
- this.props.inputRef(input);
44
- }
45
- render() {
46
- const _this$props = this.props,
47
- {
48
- buttonType,
49
- className,
50
- children,
51
- isClose,
52
- type,
53
- /* inputRef is not used directly in the render, but it needs to be assigned
54
- here to prevent it from being passed to the HTML button component as part
55
- of other.
56
- */
57
- inputRef
58
- } = _this$props,
59
- other = _objectWithoutProperties(_this$props, _excluded);
60
- return /*#__PURE__*/React.createElement("button", _extends({}, other, {
61
- className: classNames(['btn', className], {
62
- [`btn-${buttonType}`]: buttonType !== undefined
63
- }, {
64
- close: isClose
65
- }),
66
- onBlur: this.onBlur,
67
- onClick: this.onClick,
68
- onKeyDown: this.onKeyDown
69
- // eslint-disable-next-line react/button-has-type
70
- ,
71
- type: type,
72
- ref: this.setRefs
73
- }), children);
74
- }
75
- }
76
- export const buttonPropTypes = {
52
+ /*
53
+ The button component needs a ref to itself to be able to force
54
+ focus in its onClick function (buttonRef). It also needs to accept
55
+ a callback function from parent components to give those parents
56
+ a reference to their child button (e.g. for the modal component).
57
+ Therefore, both have been wrapped in a function bound on the class,
58
+ since one cannot set two ref attributes on a component.
59
+ */
60
+ }, {
61
+ key: "setRefs",
62
+ value: function setRefs(input) {
63
+ this.buttonRef = input;
64
+ this.props.inputRef(input);
65
+ }
66
+ }, {
67
+ key: "render",
68
+ value: function render() {
69
+ var _this$props = this.props,
70
+ buttonType = _this$props.buttonType,
71
+ className = _this$props.className,
72
+ children = _this$props.children,
73
+ isClose = _this$props.isClose,
74
+ type = _this$props.type,
75
+ inputRef = _this$props.inputRef,
76
+ other = _objectWithoutProperties(_this$props, _excluded);
77
+ return /*#__PURE__*/React.createElement("button", _extends({}, other, {
78
+ className: classNames(['btn', className], _defineProperty({}, "btn-".concat(buttonType), buttonType !== undefined), {
79
+ close: isClose
80
+ }),
81
+ onBlur: this.onBlur,
82
+ onClick: this.onClick,
83
+ onKeyDown: this.onKeyDown
84
+ // eslint-disable-next-line react/button-has-type
85
+ ,
86
+ type: type,
87
+ ref: this.setRefs
88
+ }), children);
89
+ }
90
+ }]);
91
+ return DeprecatedButton;
92
+ }(React.Component);
93
+ export var buttonPropTypes = {
77
94
  /** Used to determine the type of button to be rendered. See [Bootstrap's buttons documentation](https://getbootstrap.com/docs/4.0/components/buttons/) for a list of applicable button types. For example, `buttonType="light"`. The default is `undefined`. */
78
95
  buttonType: PropTypes.string,
79
96
  /** Specifies Bootstrap class names to apply to the button. See [Bootstrap's buttons documentation](https://getbootstrap.com/docs/4.0/components/buttons/) for a list of applicable class names. The default is an empty array. */
@@ -105,11 +122,11 @@ DeprecatedButton.propTypes = buttonPropTypes;
105
122
  DeprecatedButton.defaultProps = {
106
123
  buttonType: undefined,
107
124
  className: undefined,
108
- inputRef: () => {},
125
+ inputRef: function inputRef() {},
109
126
  isClose: false,
110
- onBlur: () => {},
111
- onKeyDown: () => {},
112
- onClick: () => {},
127
+ onBlur: function onBlur() {},
128
+ onKeyDown: function onKeyDown() {},
129
+ onClick: function onClick() {},
113
130
  type: 'button',
114
131
  variant: 'outline-primary'
115
132
  };
@@ -120,8 +137,12 @@ export default withDeprecatedProps(DeprecatedButton, 'Button', {
120
137
  },
121
138
  className: {
122
139
  deprType: DeprTypes.FORMAT,
123
- expect: value => typeof value === 'string',
124
- transform: value => Array.isArray(value) ? value.join(' ') : value,
140
+ expect: function expect(value) {
141
+ return typeof value === 'string';
142
+ },
143
+ transform: function transform(value) {
144
+ return Array.isArray(value) ? value.join(' ') : value;
145
+ },
125
146
  message: 'It should be a string.'
126
147
  }
127
148
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","classNames","PropTypes","withDeprecatedProps","DeprTypes","DeprecatedButton","Component","constructor","props","onBlur","onKeyDown","bind","onClick","setRefs","e","buttonRef","focus","input","inputRef","render","_this$props","buttonType","className","children","isClose","type","other","_objectWithoutProperties","_excluded","createElement","_extends","undefined","close","ref","buttonPropTypes","string","node","isRequired","oneOfType","func","shape","current","instanceOf","element","bool","variant","oneOf","propTypes","defaultProps","label","deprType","MOVED","newName","FORMAT","expect","value","transform","Array","isArray","join","message"],"sources":["../../../src/Button/deprecated/index.jsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\nimport withDeprecatedProps, { DeprTypes } from '../../withDeprecatedProps';\n\nclass DeprecatedButton extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n onBlur,\n onKeyDown,\n } = props;\n\n this.onBlur = onBlur.bind(this);\n this.onKeyDown = onKeyDown.bind(this);\n this.onClick = this.onClick.bind(this);\n this.setRefs = this.setRefs.bind(this);\n }\n\n /*\n The button component is given focus explicitly in its onClick to account\n for the fact that an HTML <button> element in Firefox and Safari does not get\n focus on onClick.\n\n See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button.\n */\n onClick(e) {\n this.buttonRef.focus();\n this.props.onClick(e);\n }\n\n /*\n The button component needs a ref to itself to be able to force\n focus in its onClick function (buttonRef). It also needs to accept\n a callback function from parent components to give those parents\n a reference to their child button (e.g. for the modal component).\n Therefore, both have been wrapped in a function bound on the class,\n since one cannot set two ref attributes on a component.\n */\n setRefs(input) {\n this.buttonRef = input;\n this.props.inputRef(input);\n }\n\n render() {\n const {\n buttonType,\n className,\n children,\n isClose,\n type,\n /* inputRef is not used directly in the render, but it needs to be assigned\n here to prevent it from being passed to the HTML button component as part\n of other.\n */\n inputRef,\n ...other\n } = this.props;\n\n return (\n <button\n {...other}\n className={classNames([\n 'btn',\n className,\n ], {\n [`btn-${buttonType}`]: buttonType !== undefined,\n }, {\n close: isClose,\n })}\n onBlur={this.onBlur}\n onClick={this.onClick}\n onKeyDown={this.onKeyDown}\n // eslint-disable-next-line react/button-has-type\n type={type}\n ref={this.setRefs}\n\n >\n {children}\n </button>\n );\n }\n}\n\nexport const buttonPropTypes = {\n /** Used to determine the type of button to be rendered. See [Bootstrap's buttons documentation](https://getbootstrap.com/docs/4.0/components/buttons/) for a list of applicable button types. For example, `buttonType=\"light\"`. The default is `undefined`. */\n buttonType: PropTypes.string,\n /** Specifies Bootstrap class names to apply to the button. See [Bootstrap's buttons documentation](https://getbootstrap.com/docs/4.0/components/buttons/) for a list of applicable class names. The default is an empty array. */\n className: PropTypes.string,\n /** Specifies the text that is displayed within the button. */\n children: PropTypes.node.isRequired,\n // eslint-disable-next-line max-len\n /** A function that defines a reference for the button. An example `inputRef` from the calling component could look something like: `inputRef={(input) => { this.button = input; }}`. The default is an empty function. */\n inputRef: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({ current: PropTypes.instanceOf(PropTypes.element) }),\n ]),\n /** Used to determine if the button is a \"Close\" style button to leverage bootstrap styling. Example use case is with the Status Alert [dismiss button](https://getbootstrap.com/docs/4.0/components/alerts/#dismissing). The default is false. */\n isClose: PropTypes.bool,\n // eslint-disable-next-line max-len\n /** A function that would specify what the button should do when the `onBlur` event is triggered. For example, the button could change in color or `buttonType` when focus is changed. The default is an empty function. */\n onBlur: PropTypes.func,\n // eslint-disable-next-line max-len\n /** A function that would specify what the button should do when the `onClick` event is triggered. For example, the button could launch a `Modal`. The default is an empty function. */\n onClick: PropTypes.func,\n // eslint-disable-next-line max-len\n /** A function that would specify what the button should do when the `onKeyDown` event is triggered. For example, this could handle using the `Escape` key to trigger the button's action. The default is an empty function. */\n onKeyDown: PropTypes.func,\n /** Used to set the `type` attribute on the `button` tag. The default type is `button`. */\n type: PropTypes.string,\n /** Specifies variant to use. */\n variant: PropTypes.oneOf([\n 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'link', 'outline-primary',\n 'outline-secondary', 'outline-success', 'outline-danger', 'outline-warning', 'outline-info', 'outline-dark', 'outline-light',\n ]),\n};\n\nDeprecatedButton.propTypes = buttonPropTypes;\n\nDeprecatedButton.defaultProps = {\n buttonType: undefined,\n className: undefined,\n inputRef: () => {},\n isClose: false,\n onBlur: () => {},\n onKeyDown: () => {},\n onClick: () => {},\n type: 'button',\n variant: 'outline-primary',\n};\n\nexport default withDeprecatedProps(DeprecatedButton, 'Button', {\n label: {\n deprType: DeprTypes.MOVED,\n newName: 'children',\n },\n className: {\n deprType: DeprTypes.FORMAT,\n expect: value => typeof value === 'string',\n transform: value => (Array.isArray(value) ? value.join(' ') : value),\n message: 'It should be a string.',\n },\n});\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,mBAAmB,IAAIC,SAAS,QAAQ,2BAA2B;AAE1E,MAAMC,gBAAgB,SAASL,KAAK,CAACM,SAAS,CAAC;EAC7CC,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZ,MAAM;MACJC,MAAM;MACNC;IACF,CAAC,GAAGF,KAAK;IAET,IAAI,CAACC,MAAM,GAAGA,MAAM,CAACE,IAAI,CAAC,IAAI,CAAC;IAC/B,IAAI,CAACD,SAAS,GAAGA,SAAS,CAACC,IAAI,CAAC,IAAI,CAAC;IACrC,IAAI,CAACC,OAAO,GAAG,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAC;IACtC,IAAI,CAACE,OAAO,GAAG,IAAI,CAACA,OAAO,CAACF,IAAI,CAAC,IAAI,CAAC;EACxC;;EAEA;AACF;AACA;AACA;AACA;AACA;EAEEC,OAAOA,CAACE,CAAC,EAAE;IACT,IAAI,CAACC,SAAS,CAACC,KAAK,CAAC,CAAC;IACtB,IAAI,CAACR,KAAK,CAACI,OAAO,CAACE,CAAC,CAAC;EACvB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACED,OAAOA,CAACI,KAAK,EAAE;IACb,IAAI,CAACF,SAAS,GAAGE,KAAK;IACtB,IAAI,CAACT,KAAK,CAACU,QAAQ,CAACD,KAAK,CAAC;EAC5B;EAEAE,MAAMA,CAAA,EAAG;IACP,MAAAC,WAAA,GAYI,IAAI,CAACZ,KAAK;MAZR;QACJa,UAAU;QACVC,SAAS;QACTC,QAAQ;QACRC,OAAO;QACPC,IAAI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CAAC4C,KAAK,CAAC,CACvB,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAC1G,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,CAC7H;AACH,CAAC;AAEDzC,gBAAgB,CAAC0C,SAAS,GAAGb,eAAe;AAE5C7B,gBAAgB,CAAC2C,YAAY,GAAG;EAC9B3B,UAAU,EAAEU,SAAS;EACrBT,SAAS,EAAES,SAAS;EACpBb,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClBM,OAAO,EAAE,KAAK;EACdf,MAAM,EAAEA,CAAA,KAAM,CAAC,CAAC;EAChBC,SAAS,EAAEA,CAAA,KAAM,CAAC,CAAC;EACnBE,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC;EACjBa,IAAI,EAAE,QAAQ;EACdoB,OAAO,EAAE;AACX,CAAC;AAED,eAAe1C,mBAAmB,CAACE,gBAAgB,EAAE,QAAQ,EAAE;EAC7D4C,KAAK,EAAE;IACLC,QAAQ,EAAE9C,SAAS,CAAC+C,KAAK;IACzBC,OAAO,EAAE;EACX,CAAC;EACD9B,SAAS,EAAE;IACT4B,QAAQ,EAAE9C,SAAS,CAACiD,MAAM;IAC1BC,MAAM,EAAEC,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ;IAC1CC,SAAS,EAAED,KAAK,IAAKE,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,GAAGA,KAAK,CAACI,IAAI,CAAC,GAAG,CAAC,GAAGJ,KAAM;IACpEK,OAAO,EAAE;EACX;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","names":["React","classNames","PropTypes","withDeprecatedProps","DeprTypes","DeprecatedButton","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","onBlur","onKeyDown","bind","_assertThisInitialized","onClick","setRefs","_createClass","key","value","e","buttonRef","focus","input","inputRef","render","_this$props","buttonType","className","children","isClose","type","other","_objectWithoutProperties","_excluded","createElement","_extends","_defineProperty","concat","undefined","close","ref","Component","buttonPropTypes","string","node","isRequired","oneOfType","func","shape","current","instanceOf","element","bool","variant","oneOf","propTypes","defaultProps","label","deprType","MOVED","newName","FORMAT","expect","transform","Array","isArray","join","message"],"sources":["../../../src/Button/deprecated/index.jsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\nimport withDeprecatedProps, { DeprTypes } from '../../withDeprecatedProps';\n\nclass DeprecatedButton extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n onBlur,\n onKeyDown,\n } = props;\n\n this.onBlur = onBlur.bind(this);\n this.onKeyDown = onKeyDown.bind(this);\n this.onClick = this.onClick.bind(this);\n this.setRefs = this.setRefs.bind(this);\n }\n\n /*\n The button component is given focus explicitly in its onClick to account\n for the fact that an HTML <button> element in Firefox and Safari does not get\n focus on onClick.\n\n See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button.\n */\n onClick(e) {\n this.buttonRef.focus();\n this.props.onClick(e);\n }\n\n /*\n The button component needs a ref to itself to be able to force\n focus in its onClick function (buttonRef). It also needs to accept\n a callback function from parent components to give those parents\n a reference to their child button (e.g. for the modal component).\n Therefore, both have been wrapped in a function bound on the class,\n since one cannot set two ref attributes on a component.\n */\n setRefs(input) {\n this.buttonRef = input;\n this.props.inputRef(input);\n }\n\n render() {\n const {\n buttonType,\n className,\n children,\n isClose,\n type,\n /* inputRef is not used directly in the render, but it needs to be assigned\n here to prevent it from being passed to the HTML button component as part\n of other.\n */\n inputRef,\n ...other\n } = this.props;\n\n return (\n <button\n {...other}\n className={classNames([\n 'btn',\n className,\n ], {\n [`btn-${buttonType}`]: buttonType !== undefined,\n }, {\n close: isClose,\n })}\n onBlur={this.onBlur}\n onClick={this.onClick}\n onKeyDown={this.onKeyDown}\n // eslint-disable-next-line react/button-has-type\n type={type}\n ref={this.setRefs}\n\n >\n {children}\n </button>\n );\n }\n}\n\nexport const buttonPropTypes = {\n /** Used to determine the type of button to be rendered. See [Bootstrap's buttons documentation](https://getbootstrap.com/docs/4.0/components/buttons/) for a list of applicable button types. For example, `buttonType=\"light\"`. The default is `undefined`. */\n buttonType: PropTypes.string,\n /** Specifies Bootstrap class names to apply to the button. See [Bootstrap's buttons documentation](https://getbootstrap.com/docs/4.0/components/buttons/) for a list of applicable class names. The default is an empty array. */\n className: PropTypes.string,\n /** Specifies the text that is displayed within the button. */\n children: PropTypes.node.isRequired,\n // eslint-disable-next-line max-len\n /** A function that defines a reference for the button. An example `inputRef` from the calling component could look something like: `inputRef={(input) => { this.button = input; }}`. The default is an empty function. */\n inputRef: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({ current: PropTypes.instanceOf(PropTypes.element) }),\n ]),\n /** Used to determine if the button is a \"Close\" style button to leverage bootstrap styling. Example use case is with the Status Alert [dismiss button](https://getbootstrap.com/docs/4.0/components/alerts/#dismissing). The default is false. */\n isClose: PropTypes.bool,\n // eslint-disable-next-line max-len\n /** A function that would specify what the button should do when the `onBlur` event is triggered. For example, the button could change in color or `buttonType` when focus is changed. The default is an empty function. */\n onBlur: PropTypes.func,\n // eslint-disable-next-line max-len\n /** A function that would specify what the button should do when the `onClick` event is triggered. For example, the button could launch a `Modal`. The default is an empty function. */\n onClick: PropTypes.func,\n // eslint-disable-next-line max-len\n /** A function that would specify what the button should do when the `onKeyDown` event is triggered. For example, this could handle using the `Escape` key to trigger the button's action. The default is an empty function. */\n onKeyDown: PropTypes.func,\n /** Used to set the `type` attribute on the `button` tag. The default type is `button`. */\n type: PropTypes.string,\n /** Specifies variant to use. */\n variant: PropTypes.oneOf([\n 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'link', 'outline-primary',\n 'outline-secondary', 'outline-success', 'outline-danger', 'outline-warning', 'outline-info', 'outline-dark', 'outline-light',\n ]),\n};\n\nDeprecatedButton.propTypes = buttonPropTypes;\n\nDeprecatedButton.defaultProps = {\n buttonType: undefined,\n className: undefined,\n inputRef: () => {},\n isClose: false,\n onBlur: () => {},\n onKeyDown: () => {},\n onClick: () => {},\n type: 'button',\n variant: 'outline-primary',\n};\n\nexport default withDeprecatedProps(DeprecatedButton, 'Button', {\n label: {\n deprType: DeprTypes.MOVED,\n newName: 'children',\n },\n className: {\n deprType: DeprTypes.FORMAT,\n expect: value => typeof value === 'string',\n transform: value => (Array.isArray(value) ? value.join(' ') : value),\n message: 'It should be a string.',\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,mBAAmB,IAAIC,SAAS,QAAQ,2BAA2B;AAAC,IAErEC,gBAAgB,0BAAAC,gBAAA;EAAAC,SAAA,CAAAF,gBAAA,EAAAC,gBAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,gBAAA;EACpB,SAAAA,iBAAYK,KAAK,EAAE;IAAA,IAAAC,KAAA;IAAAC,eAAA,OAAAP,gBAAA;IACjBM,KAAA,GAAAH,MAAA,CAAAK,IAAA,OAAMH,KAAK;IAEX,IACEI,MAAM,GAEJJ,KAAK,CAFPI,MAAM;MACNC,SAAS,GACPL,KAAK,CADPK,SAAS;IAGXJ,KAAA,CAAKG,MAAM,GAAGA,MAAM,CAACE,IAAI,CAAAC,sBAAA,CAAAN,KAAA,CAAK,CAAC;IAC/BA,KAAA,CAAKI,SAAS,GAAGA,SAAS,CAACC,IAAI,CAAAC,sBAAA,CAAAN,KAAA,CAAK,CAAC;IACrCA,KAAA,CAAKO,OAAO,GAAGP,KAAA,CAAKO,OAAO,CAACF,IAAI,CAAAC,sBAAA,CAAAN,KAAA,CAAK,CAAC;IACtCA,KAAA,CAAKQ,OAAO,GAAGR,KAAA,CAAKQ,OAAO,CAACH,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,SAAS,EAAEW,SAAS;EACpBf,QAAQ,EAAE,SAAAA,SAAA,EAAM,CAAC,CAAC;EAClBM,OAAO,EAAE,KAAK;EACdnB,MAAM,EAAE,SAAAA,OAAA,EAAM,CAAC,CAAC;EAChBC,SAAS,EAAE,SAAAA,UAAA,EAAM,CAAC,CAAC;EACnBG,OAAO,EAAE,SAAAA,QAAA,EAAM,CAAC,CAAC;EACjBgB,IAAI,EAAE,QAAQ;EACduB,OAAO,EAAE;AACX,CAAC;AAED,eAAetD,mBAAmB,CAACE,gBAAgB,EAAE,QAAQ,EAAE;EAC7DwD,KAAK,EAAE;IACLC,QAAQ,EAAE1D,SAAS,CAAC2D,KAAK;IACzBC,OAAO,EAAE;EACX,CAAC;EACDjC,SAAS,EAAE;IACT+B,QAAQ,EAAE1D,SAAS,CAAC6D,MAAM;IAC1BC,MAAM,EAAE,SAAAA,OAAA5C,KAAK;MAAA,OAAI,OAAOA,KAAK,KAAK,QAAQ;IAAA;IAC1C6C,SAAS,EAAE,SAAAA,UAAA7C,KAAK;MAAA,OAAK8C,KAAK,CAACC,OAAO,CAAC/C,KAAK,CAAC,GAAGA,KAAK,CAACgD,IAAI,CAAC,GAAG,CAAC,GAAGhD,KAAK;IAAA,CAAC;IACpEiD,OAAO,EAAE;EACX;AACF,CAAC,CAAC"}
@@ -1,9 +1,10 @@
1
- const _excluded = ["children", "iconAfter", "iconBefore"];
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _excluded = ["children", "iconAfter", "iconBefore"];
2
3
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
4
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
8
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
8
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -15,12 +16,10 @@ import BaseButtonGroup from 'react-bootstrap/ButtonGroup';
15
16
  import BaseButtonToolbar from 'react-bootstrap/ButtonToolbar';
16
17
  import ButtonDeprecated from './deprecated';
17
18
  import Icon from '../Icon';
18
- const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
19
- let {
20
- children,
21
- iconAfter,
22
- iconBefore
23
- } = _ref,
19
+ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20
+ var children = _ref.children,
21
+ iconAfter = _ref.iconAfter,
22
+ iconBefore = _ref.iconBefore,
24
23
  props = _objectWithoutProperties(_ref, _excluded);
25
24
  return /*#__PURE__*/React.createElement(BaseButton, _extends({}, props, {
26
25
  className: classNames(props.className),
@@ -61,10 +60,10 @@ Button.propTypes = _objectSpread(_objectSpread({}, Button.propTypes), {}, {
61
60
  variant: PropTypes.string,
62
61
  /** An icon component to render.
63
62
  * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */
64
- iconBefore: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
63
+ iconBefore: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),
65
64
  /** An icon component to render.
66
65
  * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */
67
- iconAfter: PropTypes.oneOfType([PropTypes.func, PropTypes.node])
66
+ iconAfter: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node])
68
67
  });
69
68
  Button.defaultProps = _objectSpread(_objectSpread({}, Button.defaultProps), {}, {
70
69
  children: undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","classNames","BaseButton","BaseButtonGroup","BaseButtonToolbar","ButtonDeprecated","Icon","Button","forwardRef","_ref","ref","children","iconAfter","iconBefore","props","_objectWithoutProperties","_excluded","createElement","_extends","className","size","src","propTypes","_objectSpread","string","disabled","bool","node","isRequired","onClick","func","onKeyDown","type","variant","oneOfType","defaultProps","undefined","Deprecated","ButtonGroup","ButtonToolbar","as","elementType","role","oneOf","toggle","vertical","bsPrefix"],"sources":["../../src/Button/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport BaseButton from 'react-bootstrap/Button';\nimport BaseButtonGroup from 'react-bootstrap/ButtonGroup';\nimport BaseButtonToolbar from 'react-bootstrap/ButtonToolbar';\nimport ButtonDeprecated from './deprecated';\n\nimport Icon from '../Icon';\n\nconst Button = React.forwardRef(({\n children,\n iconAfter,\n iconBefore,\n ...props\n}, ref) => (\n <BaseButton\n {...props}\n className={classNames(props.className)}\n ref={ref}\n >\n {iconBefore && <Icon className=\"btn-icon-before\" size={props.size} src={iconBefore} />}\n {children}\n {iconAfter && <Icon className=\"btn-icon-after\" size={props.size} src={iconAfter} />}\n </BaseButton>\n));\n\nButton.propTypes = {\n ...Button.propTypes,\n /** Specifies class name to apply to the button */\n className: PropTypes.string,\n /** Disables the Button, preventing mouse events, even if the underlying component is an `<a>` element */\n disabled: PropTypes.bool,\n /** Specifies the text that is displayed within the button. */\n children: PropTypes.node.isRequired,\n /** A function that would specify what the button should do when the `onClick` event is triggered.\n * For example, the button could launch a `Modal`. The default is an empty function. */\n onClick: PropTypes.func,\n /** A function that would specify what the button should do when the `onKeyDown` event is triggered.\n * For example, this could handle using the `Escape` key to trigger the button's action.\n * The default is an empty function. */\n onKeyDown: PropTypes.func,\n /** Used to set the `type` attribute on the `button` tag. The default type is `button`. */\n type: PropTypes.string,\n /** Specifies variant to use.\n * Can be on of the base variants: `primary`, `secondary`, `success`, `danger`, `warning`, `info`, `dark`,\n * `light`, `link`\n *\n * as well as one of the customized variants (= base variant prefixed with `inverse-`, `outline-`\n * or `inverse-outline-`)\n * */\n variant: PropTypes.string,\n /** An icon component to render.\n * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */\n iconBefore: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n /** An icon component to render.\n * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */\n iconAfter: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n};\n\nButton.defaultProps = {\n ...Button.defaultProps,\n children: undefined,\n className: undefined,\n iconBefore: undefined,\n iconAfter: undefined,\n disabled: false,\n};\n\nButton.Deprecated = ButtonDeprecated;\n\nfunction ButtonGroup(props) {\n return <BaseButtonGroup {...props} />;\n}\nfunction ButtonToolbar(props) {\n return <BaseButtonToolbar {...props} />;\n}\n\nButtonGroup.propTypes = {\n /** Specifies element type for this component. */\n as: PropTypes.elementType,\n /** An ARIA role describing the button group. */\n role: PropTypes.string,\n /** Specifies the size for all Buttons in the group. */\n size: PropTypes.oneOf(['sm', 'md', 'lg']),\n /** Display as a button toggle group. */\n toggle: PropTypes.bool,\n /** Specifies if the set of Buttons should appear vertically stacked. */\n vertical: PropTypes.bool,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nButtonGroup.defaultProps = {\n as: 'div',\n role: 'group',\n toggle: false,\n vertical: false,\n bsPrefix: 'btn-group',\n size: 'md',\n};\n\nButtonToolbar.propTypes = {\n /** An ARIA role describing the button group. */\n role: PropTypes.string,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nButtonToolbar.defaultProps = {\n role: 'toolbar',\n bsPrefix: 'btn-toolbar',\n};\n\nexport default Button;\nexport { ButtonGroup, ButtonToolbar };\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACn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ACtB,CAAC;AAEDc,WAAW,CAACH,YAAY,GAAG;EACzBK,EAAE,EAAE,KAAK;EACTE,IAAI,EAAE,OAAO;EACbE,MAAM,EAAE,KAAK;EACbC,QAAQ,EAAE,KAAK;EACfC,QAAQ,EAAE,WAAW;EACrB1B,IAAI,EAAE;AACR,CAAC;AAEDmB,aAAa,CAACjB,SAAS,GAAG;EACxB;EACAoB,IAAI,EAAE1C,SAAS,CAACwB,MAAM;EACtB;EACAsB,QAAQ,EAAE9C,SAAS,CAACwB;AACtB,CAAC;AAEDe,aAAa,CAACJ,YAAY,GAAG;EAC3BO,IAAI,EAAE,SAAS;EACfI,QAAQ,EAAE;AACZ,CAAC;AAED,eAAevC,MAAM;AACrB,SAAS+B,WAAW,EAAEC,aAAa"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","classNames","BaseButton","BaseButtonGroup","BaseButtonToolbar","ButtonDeprecated","Icon","Button","forwardRef","_ref","ref","children","iconAfter","iconBefore","props","_objectWithoutProperties","_excluded","createElement","_extends","className","size","src","propTypes","_objectSpread","string","disabled","bool","node","isRequired","onClick","func","onKeyDown","type","variant","oneOfType","elementType","defaultProps","undefined","Deprecated","ButtonGroup","ButtonToolbar","as","role","oneOf","toggle","vertical","bsPrefix"],"sources":["../../src/Button/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport BaseButton from 'react-bootstrap/Button';\nimport BaseButtonGroup from 'react-bootstrap/ButtonGroup';\nimport BaseButtonToolbar from 'react-bootstrap/ButtonToolbar';\nimport ButtonDeprecated from './deprecated';\n\nimport Icon from '../Icon';\n\nconst Button = React.forwardRef(({\n children,\n iconAfter,\n iconBefore,\n ...props\n}, ref) => (\n <BaseButton\n {...props}\n className={classNames(props.className)}\n ref={ref}\n >\n {iconBefore && <Icon className=\"btn-icon-before\" size={props.size} src={iconBefore} />}\n {children}\n {iconAfter && <Icon className=\"btn-icon-after\" size={props.size} src={iconAfter} />}\n </BaseButton>\n));\n\nButton.propTypes = {\n ...Button.propTypes,\n /** Specifies class name to apply to the button */\n className: PropTypes.string,\n /** Disables the Button, preventing mouse events, even if the underlying component is an `<a>` element */\n disabled: PropTypes.bool,\n /** Specifies the text that is displayed within the button. */\n children: PropTypes.node.isRequired,\n /** A function that would specify what the button should do when the `onClick` event is triggered.\n * For example, the button could launch a `Modal`. The default is an empty function. */\n onClick: PropTypes.func,\n /** A function that would specify what the button should do when the `onKeyDown` event is triggered.\n * For example, this could handle using the `Escape` key to trigger the button's action.\n * The default is an empty function. */\n onKeyDown: PropTypes.func,\n /** Used to set the `type` attribute on the `button` tag. The default type is `button`. */\n type: PropTypes.string,\n /** Specifies variant to use.\n * Can be on of the base variants: `primary`, `secondary`, `success`, `danger`, `warning`, `info`, `dark`,\n * `light`, `link`\n *\n * as well as one of the customized variants (= base variant prefixed with `inverse-`, `outline-`\n * or `inverse-outline-`)\n * */\n variant: PropTypes.string,\n /** An icon component to render.\n * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */\n iconBefore: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),\n /** An icon component to render.\n * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */\n iconAfter: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),\n};\n\nButton.defaultProps = {\n ...Button.defaultProps,\n children: undefined,\n className: undefined,\n iconBefore: undefined,\n iconAfter: undefined,\n disabled: false,\n};\n\nButton.Deprecated = ButtonDeprecated;\n\nfunction ButtonGroup(props) {\n return <BaseButtonGroup {...props} />;\n}\nfunction ButtonToolbar(props) {\n return <BaseButtonToolbar {...props} />;\n}\n\nButtonGroup.propTypes = {\n /** Specifies element type for this component. */\n as: PropTypes.elementType,\n /** An ARIA role describing the button group. */\n role: PropTypes.string,\n /** Specifies the size for all Buttons in the group. */\n size: PropTypes.oneOf(['sm', 'md', 'lg']),\n /** Display as a button toggle group. */\n toggle: PropTypes.bool,\n /** Specifies if the set of Buttons should appear vertically stacked. */\n vertical: PropTypes.bool,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nButtonGroup.defaultProps = {\n as: 'div',\n role: 'group',\n toggle: false,\n vertical: false,\n bsPrefix: 'btn-group',\n size: 'md',\n};\n\nButtonToolbar.propTypes = {\n /** An ARIA role describing the button group. */\n role: PropTypes.string,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nButtonToolbar.defaultProps = {\n role: 'toolbar',\n bsPrefix: 'btn-toolbar',\n};\n\nexport default Button;\nexport { ButtonGroup, ButtonToolbar };\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,eAAe,MAAM,6BAA6B;AACzD,OAAOC,iBAAiB,MAAM,+BAA+B;AAC7D,OAAOC,gBAAgB,MAAM,cAAc;AAE3C,OAAOC,IAAI,MAAM,SAAS;AAE1B,IAAMC,MAAM,gBAAGR,KAAK,CAACS,UAAU,CAAC,UAAAC,IAAA,EAK7BC,GAAG;EAAA,IAJJC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IACPC,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAAA,oBAERjB,KAAA,CAAAkB,aAAA,CAACf,UAAU,EAAAgB,QAAA,KACLJ,KAAK;IACTK,SAAS,EAAElB,UAAU,CAACa,KAAK,CAACK,SAAS,CAAE;IACvCT,GAAG,EAAEA;EAAI,IAERG,UAAU,iBAAId,KAAA,CAAAkB,aAAA,CAACX,IAAI;IAACa,SAAS,EAAC,iBAAiB;IAACC,IAAI,EAAEN,KAAK,CAACM,IAAK;IAACC,GAAG,EAAER;EAAW,CAAE,CAAC,EACrFF,QAAQ,E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kB,aAAA,CAACd,eAAe,EAAKW,KAAQ,CAAC;AACvC;AACA,SAAS0B,aAAaA,CAAC1B,KAAK,EAAE;EAC5B,oBAAOf,KAAA,CAAAkB,aAAA,CAACb,iBAAiB,EAAKU,KAAQ,CAAC;AACzC;AAEAyB,WAAW,CAACjB,SAAS,GAAG;EACtB;EACAmB,EAAE,EAAEzC,SAAS,CAACmC,WAAW;EACzB;EACAO,IAAI,EAAE1C,SAAS,CAACwB,MAAM;EACtB;EACAJ,IAAI,EAAEpB,SAAS,CAAC2C,KAAK,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;EACzC;EACAC,MAAM,EAAE5C,SAAS,CAAC0B,IAAI;EACtB;EACAmB,QAAQ,EAAE7C,SAAS,CAAC0B,IAAI;EACxB;EACAoB,QAAQ,EAAE9C,SAAS,CAACwB;AACtB,CAAC;AAEDe,WAAW,CAACH,YAAY,GAAG;EACzBK,EAAE,EAAE,KAAK;EACTC,IAAI,EAAE,OAAO;EACbE,MAAM,EAAE,KAAK;EACbC,QAAQ,EAAE,KAAK;EACfC,QAAQ,EAAE,WAAW;EACrB1B,IAAI,EAAE;AACR,CAAC;AAEDoB,aAAa,CAAClB,SAAS,GAAG;EACxB;EACAoB,IAAI,EAAE1C,SAAS,CAACwB,MAAM;EACtB;EACAsB,QAAQ,EAAE9C,SAAS,CAACwB;AACtB,CAAC;AAEDgB,aAAa,CAACJ,YAAY,GAAG;EAC3BM,IAAI,EAAE,SAAS;EACfI,QAAQ,EAAE;AACZ,CAAC;AAED,eAAevC,MAAM;AACrB,SAASgC,WAAW,EAAEC,aAAa"}
@@ -1,15 +1,13 @@
1
- const _excluded = ["className", "children"];
1
+ var _excluded = ["className", "children"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
5
  import React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import classNames from 'classnames';
8
- const CardBody = /*#__PURE__*/React.forwardRef((_ref, ref) => {
9
- let {
10
- className,
11
- children
12
- } = _ref,
8
+ var CardBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
9
+ var className = _ref.className,
10
+ children = _ref.children,
13
11
  rest = _objectWithoutProperties(_ref, _excluded);
14
12
  return /*#__PURE__*/React.createElement("div", _extends({
15
13
  className: classNames('pgn__card-body', className),
@@ -1 +1 @@
1
- {"version":3,"file":"CardBody.js","names":["React","PropTypes","classNames","CardBody","forwardRef","_ref","ref","className","children","rest","_objectWithoutProperties","_excluded","createElement","_extends","propTypes","node","string","defaultProps","undefined"],"sources":["../../src/Card/CardBody.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nconst CardBody = React.forwardRef(({ className, children, ...rest }, ref) => (\n <div className={classNames('pgn__card-body', className)} ref={ref} {...rest}>\n {children}\n </div>\n));\n\nCardBody.propTypes = {\n /** Specifies the content of the component. */\n children: PropTypes.node,\n /** The class to append to the base element. */\n className: PropTypes.string,\n};\n\nCardBody.defaultProps = {\n children: undefined,\n className: undefined,\n};\n\nexport default CardBody;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,MAAMC,QAAQ,gBAAGH,KAAK,CAACI,UAAU,CAAC,CAAAC,IAAA,EAAmCC,GAAG;EAAA,IAArC;MAAEC,SAAS;MAAEC;IAAkB,CAAC,GAAAH,IAAA;IAANI,IAAI,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAAA,oBAC/DX,KAAA,CAAAY,aAAA,QAAAC,QAAA;IAAKN,SAAS,EAAEL,UAAU,CAAC,gBAAgB,EAAEK,SAAS,CAAE;IAACD,GAAG,EAAEA;EAAI,GAAKG,IAAI,GACxED,QACE,CAAC;AAAA,CACP,CAAC;AAEFL,QAAQ,CAACW,SAAS,GAAG;EACnB;EACAN,QAAQ,EAAEP,SAAS,CAACc,IAAI;EACxB;EACAR,SAAS,EAAEN,SAAS,CAACe;AACvB,CAAC;AAEDb,QAAQ,CAACc,YAAY,GAAG;EACtBT,QAAQ,EAAEU,SAAS;EACnBX,SAAS,EAAEW;AACb,CAAC;AAED,eAAef,QAAQ"}
1
+ {"version":3,"file":"CardBody.js","names":["React","PropTypes","classNames","CardBody","forwardRef","_ref","ref","className","children","rest","_objectWithoutProperties","_excluded","createElement","_extends","propTypes","node","string","defaultProps","undefined"],"sources":["../../src/Card/CardBody.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nconst CardBody = React.forwardRef(({ className, children, ...rest }, ref) => (\n <div className={classNames('pgn__card-body', className)} ref={ref} {...rest}>\n {children}\n </div>\n));\n\nCardBody.propTypes = {\n /** Specifies the content of the component. */\n children: PropTypes.node,\n /** The class to append to the base element. */\n className: PropTypes.string,\n};\n\nCardBody.defaultProps = {\n children: undefined,\n className: undefined,\n};\n\nexport default CardBody;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,IAAMC,QAAQ,gBAAGH,KAAK,CAACI,UAAU,CAAC,UAAAC,IAAA,EAAmCC,GAAG;EAAA,IAAnCC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAKC,IAAI,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAAA,oBAC/DX,KAAA,CAAAY,aAAA,QAAAC,QAAA;IAAKN,SAAS,EAAEL,UAAU,CAAC,gBAAgB,EAAEK,SAAS,CAAE;IAACD,GAAG,EAAEA;EAAI,GAAKG,IAAI,GACxED,QACE,CAAC;AAAA,CACP,CAAC;AAEFL,QAAQ,CAACW,SAAS,GAAG;EACnB;EACAN,QAAQ,EAAEP,SAAS,CAACc,IAAI;EACxB;EACAR,SAAS,EAAEN,SAAS,CAACe;AACvB,CAAC;AAEDb,QAAQ,CAACc,YAAY,GAAG;EACtBT,QAAQ,EAAEU,SAAS;EACnBX,SAAS,EAAEW;AACb,CAAC;AAED,eAAef,QAAQ"}
@@ -5,19 +5,17 @@ import CardCarouselProvider from './CardCarouselProvider';
5
5
  import CardCarouselHeader from './CardCarouselHeader';
6
6
  import CardCarouselItems from './CardCarouselItems';
7
7
  function CardCarousel(_ref) {
8
- let {
9
- ariaLabel,
10
- children,
11
- title,
12
- subtitle,
13
- columnSizes,
14
- hasInteractiveChildren,
15
- canScrollHorizontal,
16
- disableOpacityMasks,
17
- onScrollPrevious,
18
- onScrollNext,
19
- CardCarouselControls
20
- } = _ref;
8
+ var ariaLabel = _ref.ariaLabel,
9
+ children = _ref.children,
10
+ title = _ref.title,
11
+ subtitle = _ref.subtitle,
12
+ columnSizes = _ref.columnSizes,
13
+ hasInteractiveChildren = _ref.hasInteractiveChildren,
14
+ canScrollHorizontal = _ref.canScrollHorizontal,
15
+ disableOpacityMasks = _ref.disableOpacityMasks,
16
+ onScrollPrevious = _ref.onScrollPrevious,
17
+ onScrollNext = _ref.onScrollNext,
18
+ CardCarouselControls = _ref.CardCarouselControls;
21
19
  return /*#__PURE__*/React.createElement(OverflowScroll, {
22
20
  disableScroll: !canScrollHorizontal,
23
21
  hasInteractiveChildren: hasInteractiveChildren,
@@ -1 +1 @@
1
- {"version":3,"file":"CardCarousel.js","names":["React","PropTypes","OverflowScroll","CardCarouselProvider","CardCarouselHeader","CardCarouselItems","CardCarousel","_ref","ariaLabel","children","title","subtitle","columnSizes","hasInteractiveChildren","canScrollHorizontal","disableOpacityMasks","onScrollPrevious","onScrollNext","CardCarouselControls","createElement","disableScroll","className","propTypes","node","isRequired","string","shape","xs","number","sm","md","lg","xl","bool","func","elementType","defaultProps","undefined"],"sources":["../../../src/Card/CardCarousel/CardCarousel.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { OverflowScroll } from '../../OverflowScroll';\nimport CardCarouselProvider from './CardCarouselProvider';\nimport CardCarouselHeader from './CardCarouselHeader';\nimport CardCarouselItems from './CardCarouselItems';\n\nfunction CardCarousel({\n ariaLabel,\n children,\n title,\n subtitle,\n columnSizes,\n hasInteractiveChildren,\n canScrollHorizontal,\n disableOpacityMasks,\n onScrollPrevious,\n onScrollNext,\n CardCarouselControls,\n}) {\n return (\n <OverflowScroll\n disableScroll={!canScrollHorizontal}\n hasInteractiveChildren={hasInteractiveChildren}\n disableOpacityMasks={disableOpacityMasks}\n onScrollPrevious={onScrollPrevious}\n onScrollNext={onScrollNext}\n ariaLabel={ariaLabel}\n >\n <CardCarouselProvider\n columnSizes={columnSizes}\n hasInteractiveChildren={hasInteractiveChildren}\n canScrollHorizontal={canScrollHorizontal}\n CardCarouselControls={CardCarouselControls}\n >\n <div className=\"pgn__card-carousel\">\n <CardCarouselHeader\n title={title}\n subtitle={subtitle}\n />\n <CardCarouselItems>{children}</CardCarouselItems>\n </div>\n </CardCarouselProvider>\n </OverflowScroll>\n );\n}\n\nCardCarousel.propTypes = {\n /** The `Card` items for the `CardCarousel`. */\n children: PropTypes.node.isRequired,\n /** Text describing the CardCarousel for screen readers */\n ariaLabel: PropTypes.string.isRequired,\n /** An optional title. */\n title: PropTypes.node,\n /** An optional subtitle. */\n subtitle: PropTypes.node,\n /** Customize the responsive columnSizes used by the carousel. */\n columnSizes: PropTypes.shape({\n xs: PropTypes.number,\n sm: PropTypes.number,\n md: PropTypes.number,\n lg: PropTypes.number,\n xl: PropTypes.number,\n }),\n /** Whether the carousel has interactive children (e.g., clickable cards). */\n hasInteractiveChildren: PropTypes.bool,\n /** Whether the carousel can be scrolled manually by users. */\n canScrollHorizontal: PropTypes.bool,\n /** Whether the default opacity masks should be shown at the start/end, if applicable. */\n disableOpacityMasks: PropTypes.bool,\n /** Callback function for when the user scrolls to the previous element. */\n onScrollPrevious: PropTypes.func,\n /** Callback function for when the user scrolls to the next element. */\n onScrollNext: PropTypes.func,\n /** Optional override for the default `CardCarouselControls` */\n CardCarouselControls: PropTypes.elementType,\n};\n\nCardCarousel.defaultProps = {\n title: undefined,\n subtitle: undefined,\n columnSizes: {\n sm: 12,\n lg: 6,\n xl: 4,\n },\n hasInteractiveChildren: false,\n canScrollHorizontal: true,\n disableOpacityMasks: false,\n onScrollPrevious: undefined,\n onScrollNext: undefined,\n CardCarouselControls: undefined,\n};\n\nexport default CardCarousel;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,OAAOC,oBAAoB,MAAM,wBAAwB;AACzD,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,SAASC,YAAYA,CAAAC,IAAA,EAYlB;EAAA,IAZmB;IACpBC,SAAS;IACTC,QAAQ;IACRC,KAAK;IACLC,QAAQ;IACRC,WAAW;IACXC,sBAAsB;IACtBC,mBAAmB;IACnBC,mBAAmB;IACnBC,gBAAgB;IAChBC,YAAY;IACZC;EACF,CAAC,GAAAX,I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AEb,SAAS,CAACgC,IAAI;EACnC;EACAlB,mBAAmB,EAAEd,SAAS,CAACgC,IAAI;EACnC;EACAjB,gBAAgB,EAAEf,SAAS,CAACiC,IAAI;EAChC;EACAjB,YAAY,EAAEhB,SAAS,CAACiC,IAAI;EAC5B;EACAhB,oBAAoB,EAAEjB,SAAS,CAACkC;AAClC,CAAC;AAED7B,YAAY,CAAC8B,YAAY,GAAG;EAC1B1B,KAAK,EAAE2B,SAAS;EAChB1B,QAAQ,EAAE0B,SAAS;EACnBzB,WAAW,EAAE;IACXiB,EAAE,EAAE,EAAE;IACNE,EAAE,EAAE,CAAC;IACLC,EAAE,EAAE;EACN,CAAC;EACDnB,sBAAsB,EAAE,KAAK;EAC7BC,mBAAmB,EAAE,IAAI;EACzBC,mBAAmB,EAAE,KAAK;EAC1BC,gBAAgB,EAAEqB,SAAS;EAC3BpB,YAAY,EAAEoB,SAAS;EACvBnB,oBAAoB,EAAEmB;AACxB,CAAC;AAED,eAAe/B,YAAY"}
1
+ {"version":3,"file":"CardCarousel.js","names":["React","PropTypes","OverflowScroll","CardCarouselProvider","CardCarouselHeader","CardCarouselItems","CardCarousel","_ref","ariaLabel","children","title","subtitle","columnSizes","hasInteractiveChildren","canScrollHorizontal","disableOpacityMasks","onScrollPrevious","onScrollNext","CardCarouselControls","createElement","disableScroll","className","propTypes","node","isRequired","string","shape","xs","number","sm","md","lg","xl","bool","func","elementType","defaultProps","undefined"],"sources":["../../../src/Card/CardCarousel/CardCarousel.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { OverflowScroll } from '../../OverflowScroll';\nimport CardCarouselProvider from './CardCarouselProvider';\nimport CardCarouselHeader from './CardCarouselHeader';\nimport CardCarouselItems from './CardCarouselItems';\n\nfunction CardCarousel({\n ariaLabel,\n children,\n title,\n subtitle,\n columnSizes,\n hasInteractiveChildren,\n canScrollHorizontal,\n disableOpacityMasks,\n onScrollPrevious,\n onScrollNext,\n CardCarouselControls,\n}) {\n return (\n <OverflowScroll\n disableScroll={!canScrollHorizontal}\n hasInteractiveChildren={hasInteractiveChildren}\n disableOpacityMasks={disableOpacityMasks}\n onScrollPrevious={onScrollPrevious}\n onScrollNext={onScrollNext}\n ariaLabel={ariaLabel}\n >\n <CardCarouselProvider\n columnSizes={columnSizes}\n hasInteractiveChildren={hasInteractiveChildren}\n canScrollHorizontal={canScrollHorizontal}\n CardCarouselControls={CardCarouselControls}\n >\n <div className=\"pgn__card-carousel\">\n <CardCarouselHeader\n title={title}\n subtitle={subtitle}\n />\n <CardCarouselItems>{children}</CardCarouselItems>\n </div>\n </CardCarouselProvider>\n </OverflowScroll>\n );\n}\n\nCardCarousel.propTypes = {\n /** The `Card` items for the `CardCarousel`. */\n children: PropTypes.node.isRequired,\n /** Text describing the CardCarousel for screen readers */\n ariaLabel: PropTypes.string.isRequired,\n /** An optional title. */\n title: PropTypes.node,\n /** An optional subtitle. */\n subtitle: PropTypes.node,\n /** Customize the responsive columnSizes used by the carousel. */\n columnSizes: PropTypes.shape({\n xs: PropTypes.number,\n sm: PropTypes.number,\n md: PropTypes.number,\n lg: PropTypes.number,\n xl: PropTypes.number,\n }),\n /** Whether the carousel has interactive children (e.g., clickable cards). */\n hasInteractiveChildren: PropTypes.bool,\n /** Whether the carousel can be scrolled manually by users. */\n canScrollHorizontal: PropTypes.bool,\n /** Whether the default opacity masks should be shown at the start/end, if applicable. */\n disableOpacityMasks: PropTypes.bool,\n /** Callback function for when the user scrolls to the previous element. */\n onScrollPrevious: PropTypes.func,\n /** Callback function for when the user scrolls to the next element. */\n onScrollNext: PropTypes.func,\n /** Optional override for the default `CardCarouselControls` */\n CardCarouselControls: PropTypes.elementType,\n};\n\nCardCarousel.defaultProps = {\n title: undefined,\n subtitle: undefined,\n columnSizes: {\n sm: 12,\n lg: 6,\n xl: 4,\n },\n hasInteractiveChildren: false,\n canScrollHorizontal: true,\n disableOpacityMasks: false,\n onScrollPrevious: undefined,\n onScrollNext: undefined,\n CardCarouselControls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AmB,EAAE,KAAK;EAC1BC,gBAAgB,EAAEqB,SAAS;EAC3BpB,YAAY,EAAEoB,SAAS;EACvBnB,oBAAoB,EAAEmB;AACxB,CAAC;AAED,eAAe/B,YAAY"}
@@ -7,13 +7,12 @@ import { ArrowForward, ArrowBack } from '../../../icons';
7
7
  import { CardCarouselContext } from './CardCarouselProvider';
8
8
  import messages from './messages';
9
9
  function CardCarouselControls() {
10
- const {
11
- isScrolledToStart,
12
- isScrolledToEnd,
13
- scrollToPrevious,
14
- scrollToNext
15
- } = useContext(CardCarouselContext);
16
- const intl = useIntl();
10
+ var _useContext = useContext(CardCarouselContext),
11
+ isScrolledToStart = _useContext.isScrolledToStart,
12
+ isScrolledToEnd = _useContext.isScrolledToEnd,
13
+ scrollToPrevious = _useContext.scrollToPrevious,
14
+ scrollToNext = _useContext.scrollToNext;
15
+ var intl = useIntl();
17
16
  if (isScrolledToStart && isScrolledToEnd) {
18
17
  return null;
19
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CardCarouselControls.js","names":["React","useContext","useIntl","Stack","IconButton","Icon","ArrowForward","ArrowBack","CardCarouselContext","messages","CardCarouselControls","isScrolledToStart","isScrolledToEnd","scrollToPrevious","scrollToNext","intl","createElement","className","direction","gap","disabled","src","iconAs","alt","formatMessage","onClick"],"sources":["../../../src/Card/CardCarousel/CardCarouselControls.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useIntl } from 'react-intl';\nimport Stack from '../../Stack';\nimport IconButton from '../../IconButton';\nimport Icon from '../../Icon';\nimport { ArrowForward, ArrowBack } from '../../../icons';\nimport { CardCarouselContext } from './CardCarouselProvider';\nimport messages from './messages';\n\nfunction CardCarouselControls() {\n const {\n isScrolledToStart,\n isScrolledToEnd,\n scrollToPrevious,\n scrollToNext,\n } = useContext(CardCarouselContext);\n\n const intl = useIntl();\n\n if (isScrolledToStart && isScrolledToEnd) {\n return null;\n }\n\n return (\n <div className=\"pgn__card-carousel-controls\">\n <Stack direction=\"horizontal\" gap={1}>\n <IconButton\n disabled={isScrolledToStart}\n src={ArrowBack}\n iconAs={Icon}\n alt={intl.formatMessage(messages.scrollToPrevious)}\n onClick={scrollToPrevious}\n />\n <IconButton\n disabled={isScrolledToEnd}\n src={ArrowForward}\n iconAs={Icon}\n alt={intl.formatMessage(messages.scrollToNext)}\n onClick={scrollToNext}\n />\n </Stack>\n </div>\n );\n}\n\nexport default CardCarouselControls;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,OAAO,QAAQ,YAAY;AACpC,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,UAAU,MAAM,kBAAkB;AACzC,OAAOC,IAAI,MAAM,YAAY;AAC7B,SAASC,YAAY,EAAEC,SAAS,QAAQ,gBAAgB;AACxD,SAASC,mBAAmB,QAAQ,wBAAwB;AAC5D,OAAOC,QAAQ,MAAM,YAAY;AAEjC,SAASC,oBAAoBA,CAAA,EAAG;EAC9B,MAAM;IACJC,iBAAiB;IACjBC,eAAe;IACfC,gBAAgB;IAChBC;EACF,CAAC,GAAGb,UAAU,CAACO,mBAAmB,CAAC;EAEnC,MAAMO,IAAI,GAAGb,OAAO,CAAC,CAAC;EAEtB,IAAIS,iBAAiB,IAAIC,eAAe,EAAE;IACxC,OAAO,IAAI;EACb;EAEA,oBACEZ,KAAA,CAAAgB,aAAA;IAAKC,SAAS,EAAC;EAA6B,gBAC1CjB,KAAA,CAAAgB,aAAA,CAACb,KAAK;IAACe,SAAS,EAAC,YAAY;IAACC,GAAG,EAAE;EAAE,gBACnCnB,KAAA,CAAAgB,aAAA,CAACZ,UAAU;IACTgB,QAAQ,EAAET,iBAAkB;IAC5BU,GAAG,EAAEd,SAAU;IACfe,MAAM,EAAEjB,IAAK;IACbkB,GAAG,EAAER,IAAI,CAACS,aAAa,CAACf,QAAQ,CAACI,gBAAgB,CAAE;IACnDY,OAAO,EAAEZ;EAAiB,CAC3B,CAAC,eACFb,KAAA,CAAAgB,aAAA,CAACZ,UAAU;IACTgB,QAAQ,EAAER,eAAgB;IAC1BS,GAAG,EAAEf,YAAa;IAClBgB,MAAM,EAAEjB,IAAK;IACbkB,GAAG,EAAER,IAAI,CAACS,aAAa,CAACf,QAAQ,CAACK,YAAY,CAAE;IAC/CW,OAAO,EAAEX;EAAa,CACvB,CACI,CACJ,CAAC;AAEV;AAEA,eAAeJ,oBAAoB"}
1
+ {"version":3,"file":"CardCarouselControls.js","names":["React","useContext","useIntl","Stack","IconButton","Icon","ArrowForward","ArrowBack","CardCarouselContext","messages","CardCarouselControls","_useContext","isScrolledToStart","isScrolledToEnd","scrollToPrevious","scrollToNext","intl","createElement","className","direction","gap","disabled","src","iconAs","alt","formatMessage","onClick"],"sources":["../../../src/Card/CardCarousel/CardCarouselControls.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useIntl } from 'react-intl';\nimport Stack from '../../Stack';\nimport IconButton from '../../IconButton';\nimport Icon from '../../Icon';\nimport { ArrowForward, ArrowBack } from '../../../icons';\nimport { CardCarouselContext } from './CardCarouselProvider';\nimport messages from './messages';\n\nfunction CardCarouselControls() {\n const {\n isScrolledToStart,\n isScrolledToEnd,\n scrollToPrevious,\n scrollToNext,\n } = useContext(CardCarouselContext);\n\n const intl = useIntl();\n\n if (isScrolledToStart && isScrolledToEnd) {\n return null;\n }\n\n return (\n <div className=\"pgn__card-carousel-controls\">\n <Stack direction=\"horizontal\" gap={1}>\n <IconButton\n disabled={isScrolledToStart}\n src={ArrowBack}\n iconAs={Icon}\n alt={intl.formatMessage(messages.scrollToPrevious)}\n onClick={scrollToPrevious}\n />\n <IconButton\n disabled={isScrolledToEnd}\n src={ArrowForward}\n iconAs={Icon}\n alt={intl.formatMessage(messages.scrollToNext)}\n onClick={scrollToNext}\n />\n </Stack>\n </div>\n );\n}\n\nexport default CardCarouselControls;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,OAAO,QAAQ,YAAY;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