@openedx/paragon 21.12.1 → 21.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionRow/index.js +7 -8
- package/dist/ActionRow/index.js.map +1 -1
- package/dist/Alert/index.js +33 -25
- package/dist/Alert/index.js.map +1 -1
- package/dist/Annotation/index.js +7 -9
- package/dist/Annotation/index.js.map +1 -1
- package/dist/Avatar/index.js +5 -7
- package/dist/Avatar/index.js.map +1 -1
- package/dist/AvatarButton/index.js +10 -12
- package/dist/AvatarButton/index.js.map +1 -1
- package/dist/Badge/index.js +6 -4
- package/dist/Badge/index.js.map +1 -1
- package/dist/Breadcrumb/BreadcrumbLink.js +11 -14
- package/dist/Breadcrumb/BreadcrumbLink.js.map +1 -1
- package/dist/Breadcrumb/index.js +29 -29
- package/dist/Breadcrumb/index.js.map +1 -1
- package/dist/Bubble/index.js +11 -13
- package/dist/Bubble/index.js.map +1 -1
- package/dist/Button/deprecated/index.js +87 -66
- package/dist/Button/deprecated/index.js.map +1 -1
- package/dist/Button/index.js +10 -11
- package/dist/Button/index.js.map +1 -1
- package/dist/Card/CardBody.js +4 -6
- package/dist/Card/CardBody.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarousel.js +11 -13
- package/dist/Card/CardCarousel/CardCarousel.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselControls.js +6 -7
- package/dist/Card/CardCarousel/CardCarouselControls.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselHeader.js +9 -12
- package/dist/Card/CardCarousel/CardCarouselHeader.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselItems.js +6 -9
- package/dist/Card/CardCarousel/CardCarouselItems.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselProvider.js +27 -28
- package/dist/Card/CardCarousel/CardCarouselProvider.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselSubtitle.js +4 -6
- package/dist/Card/CardCarousel/CardCarouselSubtitle.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselTitle.js +4 -6
- package/dist/Card/CardCarousel/CardCarouselTitle.js.map +1 -1
- package/dist/Card/CardContext.js +8 -10
- package/dist/Card/CardContext.js.map +1 -1
- package/dist/Card/CardDeck.js +19 -17
- package/dist/Card/CardDeck.js.map +1 -1
- package/dist/Card/CardDivider.js +3 -5
- package/dist/Card/CardDivider.js.map +1 -1
- package/dist/Card/CardFooter.js +15 -18
- package/dist/Card/CardFooter.js.map +1 -1
- package/dist/Card/CardGrid.js +13 -11
- package/dist/Card/CardGrid.js.map +1 -1
- package/dist/Card/CardHeader.js +17 -22
- package/dist/Card/CardHeader.js.map +1 -1
- package/dist/Card/CardImageCap.js +48 -33
- package/dist/Card/CardImageCap.js.map +1 -1
- package/dist/Card/CardSection.js +11 -14
- package/dist/Card/CardSection.js.map +1 -1
- package/dist/Card/CardStatus.js +11 -14
- package/dist/Card/CardStatus.js.map +1 -1
- package/dist/Card/index.js +18 -20
- package/dist/Card/index.js.map +1 -1
- package/dist/Carousel/index.js +17 -11
- package/dist/Carousel/index.js.map +1 -1
- package/dist/CheckBox/index.js +66 -36
- package/dist/CheckBox/index.js.map +1 -1
- package/dist/Chip/index.js +14 -16
- package/dist/Chip/index.js.map +1 -1
- package/dist/ChipCarousel/index.js +29 -30
- package/dist/ChipCarousel/index.js.map +1 -1
- package/dist/Collapsible/CollapsibleAdvanced.js +82 -62
- package/dist/Collapsible/CollapsibleAdvanced.js.map +1 -1
- package/dist/Collapsible/CollapsibleBody.js +13 -15
- package/dist/Collapsible/CollapsibleBody.js.map +1 -1
- package/dist/Collapsible/CollapsibleTrigger.js +18 -20
- package/dist/Collapsible/CollapsibleTrigger.js.map +1 -1
- package/dist/Collapsible/CollapsibleVisible.js +6 -9
- package/dist/Collapsible/CollapsibleVisible.js.map +1 -1
- package/dist/Collapsible/index.js +17 -18
- package/dist/Collapsible/index.js.map +1 -1
- package/dist/ColorPicker/index.js +58 -33
- package/dist/ColorPicker/index.js.map +1 -1
- package/dist/Container/index.js +8 -9
- package/dist/Container/index.js.map +1 -1
- package/dist/DataTable/ActionDisplay.js +8 -9
- package/dist/DataTable/ActionDisplay.js.map +1 -1
- package/dist/DataTable/BulkActions.js +23 -20
- package/dist/DataTable/BulkActions.js.map +1 -1
- package/dist/DataTable/CardView.js +46 -43
- package/dist/DataTable/CardView.js.map +1 -1
- package/dist/DataTable/CollapsibleButtonGroup.js +57 -39
- package/dist/DataTable/CollapsibleButtonGroup.js.map +1 -1
- package/dist/DataTable/DataTableContext.js +1 -1
- package/dist/DataTable/DataTableContext.js.map +1 -1
- package/dist/DataTable/DataTableLayout.js +6 -9
- package/dist/DataTable/DataTableLayout.js.map +1 -1
- package/dist/DataTable/DataViewToggle.js +25 -20
- package/dist/DataTable/DataViewToggle.js.map +1 -1
- package/dist/DataTable/DropdownFilters.js +41 -28
- package/dist/DataTable/DropdownFilters.js.map +1 -1
- package/dist/DataTable/EmptyTable.js +6 -9
- package/dist/DataTable/EmptyTable.js.map +1 -1
- package/dist/DataTable/ExpandAll.js +2 -4
- package/dist/DataTable/ExpandAll.js.map +1 -1
- package/dist/DataTable/ExpandRow.js +2 -4
- package/dist/DataTable/ExpandRow.js.map +1 -1
- package/dist/DataTable/FilterStatus.js +18 -17
- package/dist/DataTable/FilterStatus.js.map +1 -1
- package/dist/DataTable/RowStatus.js +15 -18
- package/dist/DataTable/RowStatus.js.map +1 -1
- package/dist/DataTable/SidebarFilters.js +16 -13
- package/dist/DataTable/SidebarFilters.js.map +1 -1
- package/dist/DataTable/SmartStatus.js +14 -16
- package/dist/DataTable/SmartStatus.js.map +1 -1
- package/dist/DataTable/Table.js +17 -19
- package/dist/DataTable/Table.js.map +1 -1
- package/dist/DataTable/TableActions.js +11 -13
- package/dist/DataTable/TableActions.js.map +1 -1
- package/dist/DataTable/TableCell.js +6 -10
- package/dist/DataTable/TableCell.js.map +1 -1
- package/dist/DataTable/TableControlBar.js +7 -12
- package/dist/DataTable/TableControlBar.js.map +1 -1
- package/dist/DataTable/TableFilters.js +14 -12
- package/dist/DataTable/TableFilters.js.map +1 -1
- package/dist/DataTable/TableFooter.js +5 -8
- package/dist/DataTable/TableFooter.js.map +1 -1
- package/dist/DataTable/TableHeaderCell.js +11 -15
- package/dist/DataTable/TableHeaderCell.js.map +1 -1
- package/dist/DataTable/TableHeaderRow.js +6 -4
- package/dist/DataTable/TableHeaderRow.js.map +1 -1
- package/dist/DataTable/TablePagination.js +8 -7
- package/dist/DataTable/TablePagination.js.map +1 -1
- package/dist/DataTable/TablePaginationMinimal.js +9 -8
- package/dist/DataTable/TablePaginationMinimal.js.map +1 -1
- package/dist/DataTable/TableRow.js +15 -18
- package/dist/DataTable/TableRow.js.map +1 -1
- package/dist/DataTable/_variables.scss +1 -1
- package/dist/DataTable/filters/CheckboxFilter.js +23 -22
- package/dist/DataTable/filters/CheckboxFilter.js.map +1 -1
- package/dist/DataTable/filters/DropdownFilter.js +14 -19
- package/dist/DataTable/filters/DropdownFilter.js.map +1 -1
- package/dist/DataTable/filters/MultiSelectDropdownFilter.js +19 -20
- package/dist/DataTable/filters/MultiSelectDropdownFilter.js.map +1 -1
- package/dist/DataTable/filters/TextFilter.js +10 -13
- package/dist/DataTable/filters/TextFilter.js.map +1 -1
- package/dist/DataTable/hooks.js +29 -25
- package/dist/DataTable/hooks.js.map +1 -1
- package/dist/DataTable/index.js +120 -104
- package/dist/DataTable/index.js.map +1 -1
- package/dist/DataTable/selection/BaseSelectionStatus.js +29 -31
- package/dist/DataTable/selection/BaseSelectionStatus.js.map +1 -1
- package/dist/DataTable/selection/ControlledSelect.js +13 -9
- package/dist/DataTable/selection/ControlledSelect.js.map +1 -1
- package/dist/DataTable/selection/ControlledSelectHeader.js +19 -15
- package/dist/DataTable/selection/ControlledSelectHeader.js.map +1 -1
- package/dist/DataTable/selection/ControlledSelectionStatus.js +34 -24
- package/dist/DataTable/selection/ControlledSelectionStatus.js.map +1 -1
- package/dist/DataTable/selection/SelectionStatus.js +23 -23
- package/dist/DataTable/selection/SelectionStatus.js.map +1 -1
- package/dist/DataTable/utils/getVisibleColumns.js +36 -44
- package/dist/DataTable/utils/getVisibleColumns.js.map +1 -1
- package/dist/Dropdown/deprecated/DropdownButton.js +9 -13
- package/dist/Dropdown/deprecated/DropdownButton.js.map +1 -1
- package/dist/Dropdown/deprecated/DropdownItem.js +7 -8
- package/dist/Dropdown/deprecated/DropdownItem.js.map +1 -1
- package/dist/Dropdown/deprecated/DropdownMenu.js +8 -12
- package/dist/Dropdown/deprecated/DropdownMenu.js.map +1 -1
- package/dist/Dropdown/deprecated/index.js +136 -103
- package/dist/Dropdown/deprecated/index.js.map +1 -1
- package/dist/Dropdown/index.js +32 -29
- package/dist/Dropdown/index.js.map +1 -1
- package/dist/Dropzone/DefaultContent.js +13 -13
- package/dist/Dropzone/DefaultContent.js.map +1 -1
- package/dist/Dropzone/DragError.js +1 -3
- package/dist/Dropzone/DragError.js.map +1 -1
- package/dist/Dropzone/GenericError.js +7 -7
- package/dist/Dropzone/GenericError.js.map +1 -1
- package/dist/Dropzone/UploadProgress.js +6 -8
- package/dist/Dropzone/UploadProgress.js.map +1 -1
- package/dist/Dropzone/index.js +145 -86
- package/dist/Dropzone/index.js.map +1 -1
- package/dist/Fieldset/index.js +82 -57
- package/dist/Fieldset/index.js.map +1 -1
- package/dist/Form/FormAutosuggest.js +137 -95
- package/dist/Form/FormAutosuggest.js.map +1 -1
- package/dist/Form/FormAutosuggestOption.js +4 -6
- package/dist/Form/FormAutosuggestOption.js.map +1 -1
- package/dist/Form/FormCheckbox.js +35 -42
- package/dist/Form/FormCheckbox.js.map +1 -1
- package/dist/Form/FormCheckboxSet.js +13 -16
- package/dist/Form/FormCheckboxSet.js.map +1 -1
- package/dist/Form/FormCheckboxSetContext.js +39 -34
- package/dist/Form/FormCheckboxSetContext.js.map +1 -1
- package/dist/Form/FormControl.js +41 -35
- package/dist/Form/FormControl.js.map +1 -1
- package/dist/Form/FormControlDecorator.js +3 -5
- package/dist/Form/FormControlDecorator.js.map +1 -1
- package/dist/Form/FormControlDecoratorGroup.js +8 -10
- package/dist/Form/FormControlDecoratorGroup.js.map +1 -1
- package/dist/Form/FormControlFeedback.js +12 -15
- package/dist/Form/FormControlFeedback.js.map +1 -1
- package/dist/Form/FormControlFloatingLabel.js +3 -6
- package/dist/Form/FormControlFloatingLabel.js.map +1 -1
- package/dist/Form/FormControlSet.js +8 -9
- package/dist/Form/FormControlSet.js.map +1 -1
- package/dist/Form/FormGroup.js +11 -12
- package/dist/Form/FormGroup.js.map +1 -1
- package/dist/Form/FormGroupContext.js +64 -39
- package/dist/Form/FormGroupContext.js.map +1 -1
- package/dist/Form/FormLabel.js +15 -17
- package/dist/Form/FormLabel.js.map +1 -1
- package/dist/Form/FormRadio.js +19 -22
- package/dist/Form/FormRadio.js.map +1 -1
- package/dist/Form/FormRadioSet.js +13 -16
- package/dist/Form/FormRadioSet.js.map +1 -1
- package/dist/Form/FormRadioSetContext.js +39 -34
- package/dist/Form/FormRadioSetContext.js.map +1 -1
- package/dist/Form/FormSwitch.js +16 -20
- package/dist/Form/FormSwitch.js.map +1 -1
- package/dist/Form/FormText.js +20 -29
- package/dist/Form/FormText.js.map +1 -1
- package/dist/Form/useCheckboxSetValues.js +46 -23
- package/dist/Form/useCheckboxSetValues.js.map +1 -1
- package/dist/Hyperlink/index.js +25 -25
- package/dist/Hyperlink/index.js.map +1 -1
- package/dist/Hyperlink/index.scss +2 -2
- package/dist/Icon/index.js +21 -20
- package/dist/Icon/index.js.map +1 -1
- package/dist/IconButton/index.js +30 -32
- package/dist/IconButton/index.js.map +1 -1
- package/dist/IconButtonToggle/index.js +16 -16
- package/dist/IconButtonToggle/index.js.map +1 -1
- package/dist/Input/index.js +122 -92
- package/dist/Input/index.js.map +1 -1
- package/dist/InputSelect/index.js +78 -51
- package/dist/InputSelect/index.js.map +1 -1
- package/dist/InputText/index.js +11 -9
- package/dist/InputText/index.js.map +1 -1
- package/dist/Layout/index.js +33 -29
- package/dist/Layout/index.js.map +1 -1
- package/dist/ListBox/index.js +112 -80
- package/dist/ListBox/index.js.map +1 -1
- package/dist/ListBoxOption/index.js +68 -45
- package/dist/ListBoxOption/index.js.map +1 -1
- package/dist/MailtoLink/index.js +37 -34
- package/dist/MailtoLink/index.js.map +1 -1
- package/dist/Menu/MenuItem.js +13 -14
- package/dist/Menu/MenuItem.js.map +1 -1
- package/dist/Menu/SelectMenu.js +68 -44
- package/dist/Menu/SelectMenu.js.map +1 -1
- package/dist/Menu/index.js +10 -11
- package/dist/Menu/index.js.map +1 -1
- package/dist/Modal/AlertModal.js +5 -7
- package/dist/Modal/AlertModal.js.map +1 -1
- package/dist/Modal/FullscreenModal.js +6 -8
- package/dist/Modal/FullscreenModal.js.map +1 -1
- package/dist/Modal/MarketingModal.js +8 -10
- package/dist/Modal/MarketingModal.js.map +1 -1
- package/dist/Modal/ModalCloseButton.js +13 -15
- package/dist/Modal/ModalCloseButton.js.map +1 -1
- package/dist/Modal/ModalContext.js +13 -13
- package/dist/Modal/ModalContext.js.map +1 -1
- package/dist/Modal/ModalDialog.js +22 -23
- package/dist/Modal/ModalDialog.js.map +1 -1
- package/dist/Modal/ModalDialogBody.js +22 -11
- package/dist/Modal/ModalDialogBody.js.map +1 -1
- package/dist/Modal/ModalDialogFooter.js +6 -7
- package/dist/Modal/ModalDialogFooter.js.map +1 -1
- package/dist/Modal/ModalDialogHeader.js +6 -7
- package/dist/Modal/ModalDialogHeader.js.map +1 -1
- package/dist/Modal/ModalDialogHero.js +6 -7
- package/dist/Modal/ModalDialogHero.js.map +1 -1
- package/dist/Modal/ModalDialogHeroBackground.js +8 -9
- package/dist/Modal/ModalDialogHeroBackground.js.map +1 -1
- package/dist/Modal/ModalDialogHeroContent.js +6 -7
- package/dist/Modal/ModalDialogHeroContent.js.map +1 -1
- package/dist/Modal/ModalDialogTitle.js +6 -7
- package/dist/Modal/ModalDialogTitle.js.map +1 -1
- package/dist/Modal/ModalLayer.js +11 -17
- package/dist/Modal/ModalLayer.js.map +1 -1
- package/dist/Modal/ModalPopup.js +17 -17
- package/dist/Modal/ModalPopup.js.map +1 -1
- package/dist/Modal/PopperElement.js +25 -18
- package/dist/Modal/PopperElement.js.map +1 -1
- package/dist/Modal/Portal.js +40 -18
- package/dist/Modal/Portal.js.map +1 -1
- package/dist/Modal/StandardModal.js +6 -8
- package/dist/Modal/StandardModal.js.map +1 -1
- package/dist/Modal/index.js +215 -187
- package/dist/Modal/index.js.map +1 -1
- package/dist/Nav/index.js +3 -2
- package/dist/Nav/index.js.map +1 -1
- package/dist/Navbar/index.js +7 -6
- package/dist/Navbar/index.js.map +1 -1
- package/dist/OverflowScroll/OverflowScroll.js +45 -37
- package/dist/OverflowScroll/OverflowScroll.js.map +1 -1
- package/dist/OverflowScroll/OverflowScrollContext.js +1 -1
- package/dist/OverflowScroll/OverflowScrollContext.js.map +1 -1
- package/dist/OverflowScroll/OverflowScrollItems.js +2 -4
- package/dist/OverflowScroll/OverflowScrollItems.js.map +1 -1
- package/dist/Overlay/index.js +4 -4
- package/dist/Overlay/index.js.map +1 -1
- package/dist/PageBanner/index.js +11 -13
- package/dist/PageBanner/index.js.map +1 -1
- package/dist/Pagination/index.js +331 -296
- package/dist/Pagination/index.js.map +1 -1
- package/dist/Pagination/index.scss +1 -0
- package/dist/Popover/index.js +11 -14
- package/dist/Popover/index.js.map +1 -1
- package/dist/ProductTour/Checkpoint.js +29 -22
- package/dist/ProductTour/Checkpoint.js.map +1 -1
- package/dist/ProductTour/CheckpointActionRow.js +18 -16
- package/dist/ProductTour/CheckpointActionRow.js.map +1 -1
- package/dist/ProductTour/CheckpointBody.js +2 -4
- package/dist/ProductTour/CheckpointBody.js.map +1 -1
- package/dist/ProductTour/CheckpointBreadcrumbs.js +16 -16
- package/dist/ProductTour/CheckpointBreadcrumbs.js.map +1 -1
- package/dist/ProductTour/CheckpointTitle.js +2 -4
- package/dist/ProductTour/CheckpointTitle.js.map +1 -1
- package/dist/ProductTour/index.js +66 -47
- package/dist/ProductTour/index.js.map +1 -1
- package/dist/ProgressBar/index.js +37 -35
- package/dist/ProgressBar/index.js.map +1 -1
- package/dist/RadioButtonGroup/index.js +133 -102
- package/dist/RadioButtonGroup/index.js.map +1 -1
- package/dist/Scrollable/index.js +30 -15
- package/dist/Scrollable/index.js.map +1 -1
- package/dist/SearchField/SearchFieldAdvanced.js +54 -44
- package/dist/SearchField/SearchFieldAdvanced.js.map +1 -1
- package/dist/SearchField/SearchFieldClearButton.js +7 -8
- package/dist/SearchField/SearchFieldClearButton.js.map +1 -1
- package/dist/SearchField/SearchFieldInput.js +8 -9
- package/dist/SearchField/SearchFieldInput.js.map +1 -1
- package/dist/SearchField/SearchFieldLabel.js +5 -8
- package/dist/SearchField/SearchFieldLabel.js.map +1 -1
- package/dist/SearchField/SearchFieldSubmitButton.js +12 -15
- package/dist/SearchField/SearchFieldSubmitButton.js.map +1 -1
- package/dist/SearchField/index.js +22 -22
- package/dist/SearchField/index.js.map +1 -1
- package/dist/SelectableBox/SelectableBoxSet.js +25 -26
- package/dist/SelectableBox/SelectableBoxSet.js.map +1 -1
- package/dist/SelectableBox/index.js +42 -38
- package/dist/SelectableBox/index.js.map +1 -1
- package/dist/Sheet/SheetContainer.js +38 -16
- package/dist/Sheet/SheetContainer.js.map +1 -1
- package/dist/Sheet/index.js +65 -43
- package/dist/Sheet/index.js.map +1 -1
- package/dist/Spinner/index.js +8 -9
- package/dist/Spinner/index.js.map +1 -1
- package/dist/Stack/index.js +9 -11
- package/dist/Stack/index.js.map +1 -1
- package/dist/StatefulButton/index.js +15 -17
- package/dist/StatefulButton/index.js.map +1 -1
- package/dist/StatusAlert/index.js +120 -82
- package/dist/StatusAlert/index.js.map +1 -1
- package/dist/Stepper/Stepper.js +2 -4
- package/dist/Stepper/Stepper.js.map +1 -1
- package/dist/Stepper/StepperActionRow.js +7 -10
- package/dist/Stepper/StepperActionRow.js.map +1 -1
- package/dist/Stepper/StepperContext.js +64 -32
- package/dist/Stepper/StepperContext.js.map +1 -1
- package/dist/Stepper/StepperHeader.js +23 -30
- package/dist/Stepper/StepperHeader.js.map +1 -1
- package/dist/Stepper/StepperHeaderStep.js +14 -17
- package/dist/Stepper/StepperHeaderStep.js.map +1 -1
- package/dist/Stepper/StepperStep.js +23 -24
- package/dist/Stepper/StepperStep.js.map +1 -1
- package/dist/Sticky/index.js +30 -22
- package/dist/Sticky/index.js.map +1 -1
- package/dist/Table/index.js +178 -109
- package/dist/Table/index.js.map +1 -1
- package/dist/Tabs/deprecated/index.js +99 -66
- package/dist/Tabs/deprecated/index.js.map +1 -1
- package/dist/Tabs/index.js +65 -49
- package/dist/Tabs/index.js.map +1 -1
- package/dist/TextArea/index.js +10 -8
- package/dist/TextArea/index.js.map +1 -1
- package/dist/Toast/ToastContainer.js +38 -16
- package/dist/Toast/ToastContainer.js.map +1 -1
- package/dist/Toast/index.js +33 -18
- package/dist/Toast/index.js.map +1 -1
- package/dist/Tooltip/index.js +8 -9
- package/dist/Tooltip/index.js.map +1 -1
- package/dist/TransitionReplace/DemoTransitionReplace.js +12 -3
- package/dist/TransitionReplace/DemoTransitionReplace.js.map +1 -1
- package/dist/TransitionReplace/index.js +136 -100
- package/dist/TransitionReplace/index.js.map +1 -1
- package/dist/Truncate/index.js +30 -24
- package/dist/Truncate/index.js.map +1 -1
- package/dist/ValidationFormGroup/index.js +38 -37
- package/dist/ValidationFormGroup/index.js.map +1 -1
- package/dist/ValidationMessage/index.js +76 -51
- package/dist/ValidationMessage/index.js.map +1 -1
- package/dist/asInput/index.js +251 -202
- package/dist/asInput/index.js.map +1 -1
- package/dist/hooks/useArrowKeyNavigation.js +46 -43
- package/dist/hooks/useArrowKeyNavigation.js.map +1 -1
- package/dist/hooks/useIndexOfLastVisibleChild.js +40 -26
- package/dist/hooks/useIndexOfLastVisibleChild.js.map +1 -1
- package/dist/hooks/useIsVisible.js +20 -13
- package/dist/hooks/useIsVisible.js.map +1 -1
- package/dist/hooks/useToggle.js +18 -11
- package/dist/hooks/useToggle.js.map +1 -1
- package/dist/hooks/useWindowSize.js +17 -6
- package/dist/hooks/useWindowSize.js.map +1 -1
- package/dist/paragon.css +1 -1
- package/dist/withDeprecatedProps.js +79 -58
- package/dist/withDeprecatedProps.js.map +1 -1
- package/package.json +1 -5
- package/src/Button/index.jsx +2 -2
- package/src/DataTable/_variables.scss +1 -1
- package/src/Dropzone/index.jsx +1 -1
- package/src/Hyperlink/index.scss +2 -2
- package/src/Icon/index.jsx +1 -1
- package/src/IconButton/__snapshots__/IconButton.test.jsx.snap +12 -10
- package/src/IconButton/index.jsx +1 -1
- package/src/Menu/MenuItem.jsx +2 -2
- package/src/Overlay/README.md +1 -1
- package/src/Overlay/index.jsx +1 -1
- package/src/Pagination/index.scss +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardHeader.js","names":["React","useCallback","useContext","PropTypes","classNames","Skeleton","CardContext","SKELETON_HEIGHT_VALUE","CardHeader","forwardRef","_ref","ref","actions","className","size","subtitle","title","skeletonHeight","skeletonWidth","isLoading","cloneActions","Action","isValidElement","children","props","addtlActionProps","Array","isArray","map","cloneElement","createElement","containerClassName","height","width","propTypes","node","string","oneOf","number","defaultProps"],"sources":["../../src/Card/CardHeader.jsx"],"sourcesContent":["import React, { useCallback, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Skeleton from 'react-loading-skeleton';\nimport CardContext from './CardContext';\n\nconst SKELETON_HEIGHT_VALUE = 20;\n\nconst CardHeader = React.forwardRef(({\n actions,\n className,\n size,\n subtitle,\n title,\n skeletonHeight,\n skeletonWidth,\n}, ref) => {\n const { isLoading } = useContext(CardContext);\n const cloneActions = useCallback(\n (Action) => {\n if (React.isValidElement(Action)) {\n const { children } = Action.props;\n const addtlActionProps = {\n size,\n children: Array.isArray(children) ? children.map(cloneActions) : cloneActions(children),\n };\n return React.cloneElement(Action, addtlActionProps);\n }\n\n return Action;\n },\n [size],\n );\n\n if (isLoading) {\n return (\n <div className={classNames('pgn__card-header', className)}>\n <Skeleton\n containerClassName=\"pgn__card-header-loader\"\n height={skeletonHeight}\n width={skeletonWidth}\n />\n </div>\n );\n }\n\n return (\n <div className={classNames('pgn__card-header', className)} ref={ref}>\n <div className=\"pgn__card-header-content\">\n {title && <div className={`pgn__card-header-title-${size}`}>{title}</div>}\n {subtitle && <div className={`pgn__card-header-subtitle-${size}`}>{subtitle}</div>}\n </div>\n {actions && (\n <div className=\"pgn__card-header-actions\">\n {size !== 'md' ? cloneActions(actions) : actions}\n </div>\n )}\n </div>\n );\n});\n\nCardHeader.propTypes = {\n /** Optional node to render on the top right of the card header,\n * i.e. ActionRow or a DropdownMenu.\n * */\n actions: PropTypes.node,\n /** The class name for the CardHeader component */\n className: PropTypes.string,\n /** The title for the CardHeader component */\n title: PropTypes.node,\n /** The size of the CardHeader component */\n size: PropTypes.oneOf(['sm', 'md']),\n /** The subtitle of the CardHeader component */\n subtitle: PropTypes.node,\n /** Specifies height of skeleton in loading state. */\n skeletonHeight: PropTypes.number,\n /** Specifies width of skeleton in loading state. */\n skeletonWidth: PropTypes.number,\n};\n\nCardHeader.defaultProps = {\n actions: null,\n className: null,\n size: 'md',\n title: null,\n subtitle: null,\n skeletonHeight: SKELETON_HEIGHT_VALUE,\n skeletonWidth: null,\n};\n\nexport default CardHeader;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AACtD,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,WAAW,MAAM,eAAe;AAEvC,
|
|
1
|
+
{"version":3,"file":"CardHeader.js","names":["React","useCallback","useContext","PropTypes","classNames","Skeleton","CardContext","SKELETON_HEIGHT_VALUE","CardHeader","forwardRef","_ref","ref","actions","className","size","subtitle","title","skeletonHeight","skeletonWidth","_useContext","isLoading","cloneActions","Action","isValidElement","children","props","addtlActionProps","Array","isArray","map","cloneElement","createElement","containerClassName","height","width","concat","propTypes","node","string","oneOf","number","defaultProps"],"sources":["../../src/Card/CardHeader.jsx"],"sourcesContent":["import React, { useCallback, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Skeleton from 'react-loading-skeleton';\nimport CardContext from './CardContext';\n\nconst SKELETON_HEIGHT_VALUE = 20;\n\nconst CardHeader = React.forwardRef(({\n actions,\n className,\n size,\n subtitle,\n title,\n skeletonHeight,\n skeletonWidth,\n}, ref) => {\n const { isLoading } = useContext(CardContext);\n const cloneActions = useCallback(\n (Action) => {\n if (React.isValidElement(Action)) {\n const { children } = Action.props;\n const addtlActionProps = {\n size,\n children: Array.isArray(children) ? children.map(cloneActions) : cloneActions(children),\n };\n return React.cloneElement(Action, addtlActionProps);\n }\n\n return Action;\n },\n [size],\n );\n\n if (isLoading) {\n return (\n <div className={classNames('pgn__card-header', className)}>\n <Skeleton\n containerClassName=\"pgn__card-header-loader\"\n height={skeletonHeight}\n width={skeletonWidth}\n />\n </div>\n );\n }\n\n return (\n <div className={classNames('pgn__card-header', className)} ref={ref}>\n <div className=\"pgn__card-header-content\">\n {title && <div className={`pgn__card-header-title-${size}`}>{title}</div>}\n {subtitle && <div className={`pgn__card-header-subtitle-${size}`}>{subtitle}</div>}\n </div>\n {actions && (\n <div className=\"pgn__card-header-actions\">\n {size !== 'md' ? cloneActions(actions) : actions}\n </div>\n )}\n </div>\n );\n});\n\nCardHeader.propTypes = {\n /** Optional node to render on the top right of the card header,\n * i.e. ActionRow or a DropdownMenu.\n * */\n actions: PropTypes.node,\n /** The class name for the CardHeader component */\n className: PropTypes.string,\n /** The title for the CardHeader component */\n title: PropTypes.node,\n /** The size of the CardHeader component */\n size: PropTypes.oneOf(['sm', 'md']),\n /** The subtitle of the CardHeader component */\n subtitle: PropTypes.node,\n /** Specifies height of skeleton in loading state. */\n skeletonHeight: PropTypes.number,\n /** Specifies width of skeleton in loading state. */\n skeletonWidth: PropTypes.number,\n};\n\nCardHeader.defaultProps = {\n actions: null,\n className: null,\n size: 'md',\n title: null,\n subtitle: null,\n skeletonHeight: SKELETON_HEIGHT_VALUE,\n skeletonWidth: null,\n};\n\nexport default CardHeader;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AACtD,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,WAAW,MAAM,eAAe;AAEvC,IAAMC,qBAAqB,GAAG,EAAE;AAEhC,IAAMC,UAAU,gBAAGR,KAAK,CAACS,UAAU,CAAC,UAAAC,IAAA,EAQjCC,GAAG,EAAK;EAAA,IAPTC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IACRC,KAAK,GAAAN,IAAA,CAALM,KAAK;IACLC,cAAc,GAAAP,IAAA,CAAdO,cAAc;IACdC,aAAa,GAAAR,IAAA,CAAbQ,aAAa;EAEb,IAAAC,WAAA,GAAsBjB,UAAU,CAACI,WAAW,CAAC;IAArCc,SAAS,GAAAD,WAAA,CAATC,SAAS;EACjB,IAAMC,YAAY,GAAGpB,WAAW,CAC9B,UAACqB,MAAM,EAAK;IACV,kBAAItB,KAAK,CAACuB,cAAc,CAACD,MAAM,CAAC,EAAE;MAChC,IAAQE,QAAQ,GAAKF,MAAM,CAACG,KAAK,CAAzBD,QAAQ;MAChB,IAAME,gBAAgB,GAAG;QACvBZ,IAAI,EAAJA,IAAI;QACJU,QAAQ,EAAEG,KAAK,CAACC,OAAO,CAACJ,QAAQ,CAAC,GAAGA,QAAQ,CAACK,GAAG,CAACR,YAAY,CAAC,GAAGA,YAAY,CAACG,QAAQ;MACxF,CAAC;MACD,oBAAOxB,KAAK,CAAC8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EACAxB,QAAQ,EAAEZ,SAAS,CAACkC,IAAI;EACxB;EACApB,cAAc,EAAEd,SAAS,CAACqC,MAAM;EAChC;EACAtB,aAAa,EAAEf,SAAS,CAACqC;AAC3B,CAAC;AAEDhC,UAAU,CAACiC,YAAY,GAAG;EACxB7B,OAAO,EAAE,IAAI;EACbC,SAAS,EAAE,IAAI;EACfC,IAAI,EAAE,IAAI;EACVE,KAAK,EAAE,IAAI;EACXD,QAAQ,EAAE,IAAI;EACdE,cAAc,EAAEV,qBAAqB;EACrCW,aAAa,EAAE;AACjB,CAAC;AAED,eAAeV,UAAU"}
|
|
@@ -1,34 +1,43 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1
7
|
import React, { useContext, useState } from 'react';
|
|
2
8
|
import PropTypes from 'prop-types';
|
|
3
9
|
import classNames from 'classnames';
|
|
4
10
|
import Skeleton from 'react-loading-skeleton';
|
|
5
11
|
import CardContext from './CardContext';
|
|
6
12
|
import cardSrcFallbackImg from './fallback-default.png';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
var SKELETON_HEIGHT_VALUE = 140;
|
|
14
|
+
var LOGO_SKELETON_HEIGHT_VALUE = 41;
|
|
15
|
+
var CardImageCap = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16
|
+
var src = _ref.src,
|
|
17
|
+
fallbackSrc = _ref.fallbackSrc,
|
|
18
|
+
srcAlt = _ref.srcAlt,
|
|
19
|
+
logoSrc = _ref.logoSrc,
|
|
20
|
+
fallbackLogoSrc = _ref.fallbackLogoSrc,
|
|
21
|
+
logoAlt = _ref.logoAlt,
|
|
22
|
+
skeletonHeight = _ref.skeletonHeight,
|
|
23
|
+
skeletonWidth = _ref.skeletonWidth,
|
|
24
|
+
logoSkeleton = _ref.logoSkeleton,
|
|
25
|
+
logoSkeletonHeight = _ref.logoSkeletonHeight,
|
|
26
|
+
logoSkeletonWidth = _ref.logoSkeletonWidth,
|
|
27
|
+
className = _ref.className,
|
|
28
|
+
imageLoadingType = _ref.imageLoadingType;
|
|
29
|
+
var _useContext = useContext(CardContext),
|
|
30
|
+
orientation = _useContext.orientation,
|
|
31
|
+
isLoading = _useContext.isLoading;
|
|
32
|
+
var _useState = useState(false),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
showImageCap = _useState2[0],
|
|
35
|
+
setShowImageCap = _useState2[1];
|
|
36
|
+
var _useState3 = useState(false),
|
|
37
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
38
|
+
showLogoCap = _useState4[0],
|
|
39
|
+
setShowLogoCap = _useState4[1];
|
|
40
|
+
var wrapperClassName = "pgn__card-wrapper-image-cap ".concat(orientation);
|
|
32
41
|
if (isLoading) {
|
|
33
42
|
return /*#__PURE__*/React.createElement("div", {
|
|
34
43
|
className: classNames(wrapperClassName, className),
|
|
@@ -43,10 +52,8 @@ const CardImageCap = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
43
52
|
width: logoSkeletonWidth
|
|
44
53
|
}));
|
|
45
54
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
currentTarget
|
|
49
|
-
} = event;
|
|
55
|
+
var handleSrcFallback = function handleSrcFallback(event, altSrc, imageKey) {
|
|
56
|
+
var currentTarget = event.currentTarget;
|
|
50
57
|
if (!altSrc || currentTarget.src.endsWith(altSrc)) {
|
|
51
58
|
if (imageKey === 'imageCap') {
|
|
52
59
|
currentTarget.src = cardSrcFallbackImg;
|
|
@@ -65,8 +72,12 @@ const CardImageCap = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
65
72
|
show: showImageCap
|
|
66
73
|
}),
|
|
67
74
|
src: src,
|
|
68
|
-
onError:
|
|
69
|
-
|
|
75
|
+
onError: function onError(event) {
|
|
76
|
+
return handleSrcFallback(event, fallbackSrc, 'imageCap');
|
|
77
|
+
},
|
|
78
|
+
onLoad: function onLoad() {
|
|
79
|
+
return setShowImageCap(true);
|
|
80
|
+
},
|
|
70
81
|
alt: srcAlt,
|
|
71
82
|
loading: imageLoadingType
|
|
72
83
|
}), !!logoSrc && /*#__PURE__*/React.createElement("img", {
|
|
@@ -74,8 +85,12 @@ const CardImageCap = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
74
85
|
show: showLogoCap
|
|
75
86
|
}),
|
|
76
87
|
src: logoSrc,
|
|
77
|
-
onError:
|
|
78
|
-
|
|
88
|
+
onError: function onError(event) {
|
|
89
|
+
return handleSrcFallback(event, fallbackLogoSrc, 'logoCap');
|
|
90
|
+
},
|
|
91
|
+
onLoad: function onLoad() {
|
|
92
|
+
return setShowLogoCap(true);
|
|
93
|
+
},
|
|
79
94
|
alt: logoAlt,
|
|
80
95
|
loading: imageLoadingType
|
|
81
96
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardImageCap.js","names":["React","useContext","useState","PropTypes","classNames","Skeleton","CardContext","cardSrcFallbackImg","SKELETON_HEIGHT_VALUE","LOGO_SKELETON_HEIGHT_VALUE","CardImageCap","forwardRef","_ref","ref","src","fallbackSrc","srcAlt","logoSrc","fallbackLogoSrc","logoAlt","skeletonHeight","skeletonWidth","logoSkeleton","logoSkeletonHeight","logoSkeletonWidth","className","imageLoadingType","orientation","isLoading","showImageCap","setShowImageCap","showLogoCap","setShowLogoCap","wrapperClassName","createElement","containerClassName","height","width","handleSrcFallback","event","altSrc","imageKey","currentTarget","endsWith","show","onError","onLoad","alt","loading","propTypes","string","number","bool","oneOf","defaultProps","undefined"],"sources":["../../src/Card/CardImageCap.jsx"],"sourcesContent":["import React, { useContext, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Skeleton from 'react-loading-skeleton';\nimport CardContext from './CardContext';\nimport cardSrcFallbackImg from './fallback-default.png';\n\nconst SKELETON_HEIGHT_VALUE = 140;\nconst LOGO_SKELETON_HEIGHT_VALUE = 41;\n\nconst CardImageCap = React.forwardRef(({\n src,\n fallbackSrc,\n srcAlt,\n logoSrc,\n fallbackLogoSrc,\n logoAlt,\n skeletonHeight,\n skeletonWidth,\n logoSkeleton,\n logoSkeletonHeight,\n logoSkeletonWidth,\n className,\n imageLoadingType,\n}, ref) => {\n const { orientation, isLoading } = useContext(CardContext);\n const [showImageCap, setShowImageCap] = useState(false);\n const [showLogoCap, setShowLogoCap] = useState(false);\n\n const wrapperClassName = `pgn__card-wrapper-image-cap ${orientation}`;\n\n if (isLoading) {\n return (\n <div\n className={classNames(wrapperClassName, className)}\n data-testid=\"image-loader-wrapper\"\n >\n <Skeleton\n containerClassName=\"pgn__card-image-cap-loader\"\n height={orientation === 'horizontal' ? '100%' : skeletonHeight}\n width={skeletonWidth}\n />\n {logoSkeleton && (\n <Skeleton\n containerClassName=\"pgn__card-logo-cap\"\n height={logoSkeletonHeight}\n width={logoSkeletonWidth}\n />\n )}\n </div>\n );\n }\n\n const handleSrcFallback = (event, altSrc, imageKey) => {\n const { currentTarget } = event;\n\n if (!altSrc || currentTarget.src.endsWith(altSrc)) {\n if (imageKey === 'imageCap') {\n currentTarget.src = cardSrcFallbackImg;\n } else {\n setShowLogoCap(false);\n }\n\n return;\n }\n\n currentTarget.src = altSrc;\n };\n\n return (\n <div className={classNames(className, wrapperClassName)} ref={ref}>\n {!!src && (\n <img\n className={classNames('pgn__card-image-cap', { show: showImageCap })}\n src={src}\n onError={(event) => handleSrcFallback(event, fallbackSrc, 'imageCap')}\n onLoad={() => setShowImageCap(true)}\n alt={srcAlt}\n loading={imageLoadingType}\n />\n )}\n {!!logoSrc && (\n <img\n className={classNames('pgn__card-logo-cap', { show: showLogoCap })}\n src={logoSrc}\n onError={(event) => handleSrcFallback(event, fallbackLogoSrc, 'logoCap')}\n onLoad={() => setShowLogoCap(true)}\n alt={logoAlt}\n loading={imageLoadingType}\n />\n )}\n </div>\n );\n});\n\nCardImageCap.propTypes = {\n /** Specifies class name to append to the base element. */\n className: PropTypes.string,\n /** Specifies image src. */\n src: PropTypes.string,\n /** Specifies fallback image src. */\n fallbackSrc: PropTypes.string,\n /** Specifies image alt text. */\n srcAlt: PropTypes.string,\n /** Specifies logo src to put on top of the image. */\n logoSrc: PropTypes.string,\n /** Specifies fallback image logo src. */\n fallbackLogoSrc: PropTypes.string,\n /** Specifies logo image alt text. */\n logoAlt: PropTypes.string,\n /** Specifies height of Image skeleton in loading state. */\n skeletonHeight: PropTypes.number,\n /** Specifies width of Image skeleton in loading state. */\n skeletonWidth: PropTypes.number,\n /** Specifies whether the cap should be displayed during loading. */\n logoSkeleton: PropTypes.bool,\n /** Specifies height of Logo skeleton in loading state. */\n logoSkeletonHeight: PropTypes.number,\n /** Specifies width of Logo skeleton in loading state. */\n logoSkeletonWidth: PropTypes.number,\n /** Specifies loading type for images */\n imageLoadingType: PropTypes.oneOf(['eager', 'lazy']),\n};\n\nCardImageCap.defaultProps = {\n src: undefined,\n fallbackSrc: cardSrcFallbackImg,\n logoSrc: undefined,\n fallbackLogoSrc: undefined,\n className: undefined,\n srcAlt: undefined,\n logoAlt: undefined,\n skeletonHeight: SKELETON_HEIGHT_VALUE,\n logoSkeleton: false,\n logoSkeletonHeight: LOGO_SKELETON_HEIGHT_VALUE,\n skeletonWidth: undefined,\n logoSkeletonWidth: undefined,\n imageLoadingType: 'eager',\n};\n\nexport default CardImageCap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AACnD,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,kBAAkB,MAAM,wBAAwB;AAEvD,
|
|
1
|
+
{"version":3,"file":"CardImageCap.js","names":["React","useContext","useState","PropTypes","classNames","Skeleton","CardContext","cardSrcFallbackImg","SKELETON_HEIGHT_VALUE","LOGO_SKELETON_HEIGHT_VALUE","CardImageCap","forwardRef","_ref","ref","src","fallbackSrc","srcAlt","logoSrc","fallbackLogoSrc","logoAlt","skeletonHeight","skeletonWidth","logoSkeleton","logoSkeletonHeight","logoSkeletonWidth","className","imageLoadingType","_useContext","orientation","isLoading","_useState","_useState2","_slicedToArray","showImageCap","setShowImageCap","_useState3","_useState4","showLogoCap","setShowLogoCap","wrapperClassName","concat","createElement","containerClassName","height","width","handleSrcFallback","event","altSrc","imageKey","currentTarget","endsWith","show","onError","onLoad","alt","loading","propTypes","string","number","bool","oneOf","defaultProps","undefined"],"sources":["../../src/Card/CardImageCap.jsx"],"sourcesContent":["import React, { useContext, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Skeleton from 'react-loading-skeleton';\nimport CardContext from './CardContext';\nimport cardSrcFallbackImg from './fallback-default.png';\n\nconst SKELETON_HEIGHT_VALUE = 140;\nconst LOGO_SKELETON_HEIGHT_VALUE = 41;\n\nconst CardImageCap = React.forwardRef(({\n src,\n fallbackSrc,\n srcAlt,\n logoSrc,\n fallbackLogoSrc,\n logoAlt,\n skeletonHeight,\n skeletonWidth,\n logoSkeleton,\n logoSkeletonHeight,\n logoSkeletonWidth,\n className,\n imageLoadingType,\n}, ref) => {\n const { orientation, isLoading } = useContext(CardContext);\n const [showImageCap, setShowImageCap] = useState(false);\n const [showLogoCap, setShowLogoCap] = useState(false);\n\n const wrapperClassName = `pgn__card-wrapper-image-cap ${orientation}`;\n\n if (isLoading) {\n return (\n <div\n className={classNames(wrapperClassName, className)}\n data-testid=\"image-loader-wrapper\"\n >\n <Skeleton\n containerClassName=\"pgn__card-image-cap-loader\"\n height={orientation === 'horizontal' ? '100%' : skeletonHeight}\n width={skeletonWidth}\n />\n {logoSkeleton && (\n <Skeleton\n containerClassName=\"pgn__card-logo-cap\"\n height={logoSkeletonHeight}\n width={logoSkeletonWidth}\n />\n )}\n </div>\n );\n }\n\n const handleSrcFallback = (event, altSrc, imageKey) => {\n const { currentTarget } = event;\n\n if (!altSrc || currentTarget.src.endsWith(altSrc)) {\n if (imageKey === 'imageCap') {\n currentTarget.src = cardSrcFallbackImg;\n } else {\n setShowLogoCap(false);\n }\n\n return;\n }\n\n currentTarget.src = altSrc;\n };\n\n return (\n <div className={classNames(className, wrapperClassName)} ref={ref}>\n {!!src && (\n <img\n className={classNames('pgn__card-image-cap', { show: showImageCap })}\n src={src}\n onError={(event) => handleSrcFallback(event, fallbackSrc, 'imageCap')}\n onLoad={() => setShowImageCap(true)}\n alt={srcAlt}\n loading={imageLoadingType}\n />\n )}\n {!!logoSrc && (\n <img\n className={classNames('pgn__card-logo-cap', { show: showLogoCap })}\n src={logoSrc}\n onError={(event) => handleSrcFallback(event, fallbackLogoSrc, 'logoCap')}\n onLoad={() => setShowLogoCap(true)}\n alt={logoAlt}\n loading={imageLoadingType}\n />\n )}\n </div>\n );\n});\n\nCardImageCap.propTypes = {\n /** Specifies class name to append to the base element. */\n className: PropTypes.string,\n /** Specifies image src. */\n src: PropTypes.string,\n /** Specifies fallback image src. */\n fallbackSrc: PropTypes.string,\n /** Specifies image alt text. */\n srcAlt: PropTypes.string,\n /** Specifies logo src to put on top of the image. */\n logoSrc: PropTypes.string,\n /** Specifies fallback image logo src. */\n fallbackLogoSrc: PropTypes.string,\n /** Specifies logo image alt text. */\n logoAlt: PropTypes.string,\n /** Specifies height of Image skeleton in loading state. */\n skeletonHeight: PropTypes.number,\n /** Specifies width of Image skeleton in loading state. */\n skeletonWidth: PropTypes.number,\n /** Specifies whether the cap should be displayed during loading. */\n logoSkeleton: PropTypes.bool,\n /** Specifies height of Logo skeleton in loading state. */\n logoSkeletonHeight: PropTypes.number,\n /** Specifies width of Logo skeleton in loading state. */\n logoSkeletonWidth: PropTypes.number,\n /** Specifies loading type for images */\n imageLoadingType: PropTypes.oneOf(['eager', 'lazy']),\n};\n\nCardImageCap.defaultProps = {\n src: undefined,\n fallbackSrc: cardSrcFallbackImg,\n logoSrc: undefined,\n fallbackLogoSrc: undefined,\n className: undefined,\n srcAlt: undefined,\n logoAlt: undefined,\n skeletonHeight: SKELETON_HEIGHT_VALUE,\n logoSkeleton: false,\n logoSkeletonHeight: LOGO_SKELETON_HEIGHT_VALUE,\n skeletonWidth: undefined,\n logoSkeletonWidth: undefined,\n imageLoadingType: 'eager',\n};\n\nexport default CardImageCap;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AACnD,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,kBAAkB,MAAM,wBAAwB;AAEvD,IAAMC,qBAAqB,GAAG,GAAG;AACjC,IAAMC,0BAA0B,GAAG,EAAE;AAErC,IAAMC,YAAY,gBAAGV,KAAK,CAACW,UAAU,CAAC,UAAAC,IAAA,EAcnCC,GAAG,EAAK;EAAA,IAbTC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IACNC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,eAAe,GAAAN,IAAA,CAAfM,eAAe;IACfC,OAAO,GAAAP,IAAA,CAAPO,OAAO;IACPC,cAAc,GAAAR,IAAA,CAAdQ,cAAc;IACdC,aAAa,GAAAT,IAAA,CAAbS,aAAa;IACbC,YAAY,GAAAV,IAAA,CAAZU,YAAY;IACZC,kBAAkB,GAAAX,IAAA,CAAlBW,kBAAkB;IAClBC,iBAAiB,GAAAZ,IAAA,CAAjBY,iBAAiB;IACjBC,SAAS,GAAAb,IAAA,CAATa,SAAS;IACTC,gBAAgB,GAAAd,IAAA,CAAhBc,gBAAgB;EAEhB,IAAAC,WAAA,GAAmC1B,UAAU,CAACK,WAAW,CAAC;IAAlDsB,WAAW,GAAAD,WAAA,CAAXC,WAAW;IAAEC,SAAS,GAAAF,WAAA,CAATE,SAAS;EAC9B,IAAAC,SAAA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AC7B;EACAzC,MAAM,EAAEb,SAAS,CAACsD,MAAM;EACxB;EACAxC,OAAO,EAAEd,SAAS,CAACsD,MAAM;EACzB;EACAvC,eAAe,EAAEf,SAAS,CAACsD,MAAM;EACjC;EACAtC,OAAO,EAAEhB,SAAS,CAACsD,MAAM;EACzB;EACArC,cAAc,EAAEjB,SAAS,CAACuD,MAAM;EAChC;EACArC,aAAa,EAAElB,SAAS,CAACuD,MAAM;EAC/B;EACApC,YAAY,EAAEnB,SAAS,CAACwD,IAAI;EAC5B;EACApC,kBAAkB,EAAEpB,SAAS,CAACuD,MAAM;EACpC;EACAlC,iBAAiB,EAAErB,SAAS,CAACuD,MAAM;EACnC;EACAhC,gBAAgB,EAAEvB,SAAS,CAACyD,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC;AACrD,CAAC;AAEDlD,YAAY,CAACmD,YAAY,GAAG;EAC1B/C,GAAG,EAAEgD,SAAS;EACd/C,WAAW,EAAER,kBAAkB;EAC/BU,OAAO,EAAE6C,SAAS;EAClB5C,eAAe,EAAE4C,SAAS;EAC1BrC,SAAS,EAAEqC,SAAS;EACpB9C,MAAM,EAAE8C,SAAS;EACjB3C,OAAO,EAAE2C,SAAS;EAClB1C,cAAc,EAAEZ,qBAAqB;EACrCc,YAAY,EAAE,KAAK;EACnBC,kBAAkB,EAAEd,0BAA0B;EAC9CY,aAAa,EAAEyC,SAAS;EACxBtC,iBAAiB,EAAEsC,SAAS;EAC5BpC,gBAAgB,EAAE;AACpB,CAAC;AAED,eAAehB,YAAY"}
|
package/dist/Card/CardSection.js
CHANGED
|
@@ -3,20 +3,17 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import Skeleton from 'react-loading-skeleton';
|
|
5
5
|
import CardContext from './CardContext';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const {
|
|
18
|
-
isLoading
|
|
19
|
-
} = useContext(CardContext);
|
|
6
|
+
var SKELETON_HEIGHT_VALUE = 100;
|
|
7
|
+
var CardSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8
|
+
var className = _ref.className,
|
|
9
|
+
children = _ref.children,
|
|
10
|
+
title = _ref.title,
|
|
11
|
+
actions = _ref.actions,
|
|
12
|
+
muted = _ref.muted,
|
|
13
|
+
skeletonHeight = _ref.skeletonHeight,
|
|
14
|
+
skeletonWidth = _ref.skeletonWidth;
|
|
15
|
+
var _useContext = useContext(CardContext),
|
|
16
|
+
isLoading = _useContext.isLoading;
|
|
20
17
|
if (isLoading) {
|
|
21
18
|
return /*#__PURE__*/React.createElement("div", {
|
|
22
19
|
className: classNames('pgn__card-section', className, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardSection.js","names":["React","useContext","PropTypes","classNames","Skeleton","CardContext","SKELETON_HEIGHT_VALUE","CardSection","forwardRef","_ref","ref","className","children","title","actions","muted","skeletonHeight","skeletonWidth","isLoading","createElement","containerClassName","height","width","propTypes","string","node","bool","number","defaultProps","undefined"],"sources":["../../src/Card/CardSection.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Skeleton from 'react-loading-skeleton';\nimport CardContext from './CardContext';\n\nconst SKELETON_HEIGHT_VALUE = 100;\n\nconst CardSection = React.forwardRef(({\n className,\n children,\n title,\n actions,\n muted,\n skeletonHeight,\n skeletonWidth,\n}, ref) => {\n const { isLoading } = useContext(CardContext);\n\n if (isLoading) {\n return (\n <div className={classNames('pgn__card-section', className, { 'is-muted': muted })}>\n <Skeleton\n containerClassName=\"pgn__card-section-loader\"\n height={skeletonHeight}\n width={skeletonWidth}\n />\n </div>\n );\n }\n\n return (\n <div\n className={classNames('pgn__card-section', className, { 'is-muted': muted })}\n ref={ref}\n >\n {title && <div className=\"pgn__card-section-title\">{title}</div>}\n {children}\n {actions && <div className=\"pgn__card-section-actions\">{actions}</div>}\n </div>\n );\n});\n\nCardSection.propTypes = {\n /** Specifies class name to append to the base element. */\n className: PropTypes.string,\n /** Specifies contents of the component. */\n children: PropTypes.node,\n /** Specifies title of the `Section`. */\n title: PropTypes.node,\n /** Specifies node to render on the bottom right of the `Section` (i.e. `ActionRow`). */\n actions: PropTypes.node,\n /** Specifies whether to display `Section` with muted styling. */\n muted: PropTypes.bool,\n /** Specifies height of skeleton in loading state. */\n skeletonHeight: PropTypes.number,\n /** Specifies width of skeleton in loading state. */\n skeletonWidth: PropTypes.number,\n};\n\nCardSection.defaultProps = {\n children: null,\n className: undefined,\n title: undefined,\n actions: undefined,\n muted: false,\n skeletonHeight: SKELETON_HEIGHT_VALUE,\n skeletonWidth: undefined,\n};\n\nexport default CardSection;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,WAAW,MAAM,eAAe;AAEvC,
|
|
1
|
+
{"version":3,"file":"CardSection.js","names":["React","useContext","PropTypes","classNames","Skeleton","CardContext","SKELETON_HEIGHT_VALUE","CardSection","forwardRef","_ref","ref","className","children","title","actions","muted","skeletonHeight","skeletonWidth","_useContext","isLoading","createElement","containerClassName","height","width","propTypes","string","node","bool","number","defaultProps","undefined"],"sources":["../../src/Card/CardSection.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Skeleton from 'react-loading-skeleton';\nimport CardContext from './CardContext';\n\nconst SKELETON_HEIGHT_VALUE = 100;\n\nconst CardSection = React.forwardRef(({\n className,\n children,\n title,\n actions,\n muted,\n skeletonHeight,\n skeletonWidth,\n}, ref) => {\n const { isLoading } = useContext(CardContext);\n\n if (isLoading) {\n return (\n <div className={classNames('pgn__card-section', className, { 'is-muted': muted })}>\n <Skeleton\n containerClassName=\"pgn__card-section-loader\"\n height={skeletonHeight}\n width={skeletonWidth}\n />\n </div>\n );\n }\n\n return (\n <div\n className={classNames('pgn__card-section', className, { 'is-muted': muted })}\n ref={ref}\n >\n {title && <div className=\"pgn__card-section-title\">{title}</div>}\n {children}\n {actions && <div className=\"pgn__card-section-actions\">{actions}</div>}\n </div>\n );\n});\n\nCardSection.propTypes = {\n /** Specifies class name to append to the base element. */\n className: PropTypes.string,\n /** Specifies contents of the component. */\n children: PropTypes.node,\n /** Specifies title of the `Section`. */\n title: PropTypes.node,\n /** Specifies node to render on the bottom right of the `Section` (i.e. `ActionRow`). */\n actions: PropTypes.node,\n /** Specifies whether to display `Section` with muted styling. */\n muted: PropTypes.bool,\n /** Specifies height of skeleton in loading state. */\n skeletonHeight: PropTypes.number,\n /** Specifies width of skeleton in loading state. */\n skeletonWidth: PropTypes.number,\n};\n\nCardSection.defaultProps = {\n children: null,\n className: undefined,\n title: undefined,\n actions: undefined,\n muted: false,\n skeletonHeight: SKELETON_HEIGHT_VALUE,\n skeletonWidth: undefined,\n};\n\nexport default CardSection;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,WAAW,MAAM,eAAe;AAEvC,IAAMC,qBAAqB,GAAG,GAAG;AAEjC,IAAMC,WAAW,gBAAGP,KAAK,CAACQ,UAAU,CAAC,UAAAC,IAAA,EAQlCC,GAAG,EAAK;EAAA,IAPTC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,KAAK,GAAAN,IAAA,CAALM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,YAAY,GAAG;EACzBjB,QAAQ,EAAE,IAAI;EACdD,SAAS,EAAEmB,SAAS;EACpBjB,KAAK,EAAEiB,SAAS;EAChBhB,OAAO,EAAEgB,SAAS;EAClBf,KAAK,EAAE,KAAK;EACZC,cAAc,EAAEV,qBAAqB;EACrCW,aAAa,EAAEa;AACjB,CAAC;AAED,eAAevB,WAAW"}
|
package/dist/Card/CardStatus.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["className", "children", "variant", "icon", "title", "actions"];
|
|
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; }
|
|
@@ -8,19 +8,16 @@ import classNames from 'classnames';
|
|
|
8
8
|
import Skeleton from 'react-loading-skeleton';
|
|
9
9
|
import Icon from '../Icon';
|
|
10
10
|
import CardContext from './CardContext';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
actions
|
|
19
|
-
} = _ref,
|
|
11
|
+
var CardStatus = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12
|
+
var className = _ref.className,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
variant = _ref.variant,
|
|
15
|
+
icon = _ref.icon,
|
|
16
|
+
title = _ref.title,
|
|
17
|
+
actions = _ref.actions,
|
|
20
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
|
|
22
|
-
isLoading
|
|
23
|
-
} = useContext(CardContext);
|
|
19
|
+
var _useContext = useContext(CardContext),
|
|
20
|
+
isLoading = _useContext.isLoading;
|
|
24
21
|
if (isLoading) {
|
|
25
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
23
|
className: classNames('pgn__card-status', className),
|
|
@@ -29,7 +26,7 @@ const CardStatus = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
29
26
|
}, /*#__PURE__*/React.createElement(Skeleton, null));
|
|
30
27
|
}
|
|
31
28
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
32
|
-
className: classNames('pgn__card-status',
|
|
29
|
+
className: classNames('pgn__card-status', "pgn__card-status__".concat(variant), className),
|
|
33
30
|
ref: ref
|
|
34
31
|
}, props), /*#__PURE__*/React.createElement("div", {
|
|
35
32
|
className: "pgn__card-status__content"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardStatus.js","names":["React","useContext","PropTypes","classNames","Skeleton","Icon","CardContext","CardStatus","forwardRef","_ref","ref","className","children","variant","icon","title","actions","props","_objectWithoutProperties","_excluded","isLoading","createElement","_extends","src","propTypes","node","isRequired","string","func","oneOf","oneOfType","element","defaultProps","undefined"],"sources":["../../src/Card/CardStatus.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Skeleton from 'react-loading-skeleton';\nimport Icon from '../Icon';\nimport CardContext from './CardContext';\n\nconst CardStatus = React.forwardRef(({\n className,\n children,\n variant,\n icon,\n title,\n actions,\n ...props\n}, ref) => {\n const { isLoading } = useContext(CardContext);\n\n if (isLoading) {\n return (\n <div\n className={classNames(\n 'pgn__card-status',\n className,\n )}\n data-testid=\"card-status-skeleton\"\n ref={ref}\n >\n <Skeleton />\n </div>\n );\n }\n\n return (\n <div\n className={classNames(\n 'pgn__card-status',\n `pgn__card-status__${variant}`,\n className,\n )}\n ref={ref}\n {...props}\n >\n <div className=\"pgn__card-status__content\">\n {icon && <Icon className=\"pgn__card-status__content-icon\" src={icon} />}\n <div className=\"pgn__card-status__message-content\">\n {title && <div className=\"pgn__card-status__heading\">{title}</div>}\n {children}\n </div>\n </div>\n {!!actions && (\n <div className=\"pgn__card-status__actions\">\n {actions}\n </div>\n )}\n </div>\n );\n});\n\nCardStatus.propTypes = {\n /** Specifies the content of the component. */\n children: PropTypes.node.isRequired,\n /** The class to append to the base element. */\n className: PropTypes.string,\n /** Icon that will be shown in the top-left corner. */\n icon: PropTypes.func,\n /** Specifies variant to use. */\n variant: PropTypes.oneOf([\n 'primary',\n 'success',\n 'danger',\n 'warning',\n ]),\n /** Specifies title for the `Card.Status`. */\n title: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\n /** Specifies any optional actions, e.g. button(s). */\n actions: PropTypes.node,\n};\n\nCardStatus.defaultProps = {\n className: undefined,\n icon: undefined,\n variant: 'warning',\n title: undefined,\n actions: undefined,\n};\n\nexport default CardStatus;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,WAAW,MAAM,eAAe;AAEvC,
|
|
1
|
+
{"version":3,"file":"CardStatus.js","names":["React","useContext","PropTypes","classNames","Skeleton","Icon","CardContext","CardStatus","forwardRef","_ref","ref","className","children","variant","icon","title","actions","props","_objectWithoutProperties","_excluded","_useContext","isLoading","createElement","_extends","concat","src","propTypes","node","isRequired","string","func","oneOf","oneOfType","element","defaultProps","undefined"],"sources":["../../src/Card/CardStatus.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Skeleton from 'react-loading-skeleton';\nimport Icon from '../Icon';\nimport CardContext from './CardContext';\n\nconst CardStatus = React.forwardRef(({\n className,\n children,\n variant,\n icon,\n title,\n actions,\n ...props\n}, ref) => {\n const { isLoading } = useContext(CardContext);\n\n if (isLoading) {\n return (\n <div\n className={classNames(\n 'pgn__card-status',\n className,\n )}\n data-testid=\"card-status-skeleton\"\n ref={ref}\n >\n <Skeleton />\n </div>\n );\n }\n\n return (\n <div\n className={classNames(\n 'pgn__card-status',\n `pgn__card-status__${variant}`,\n className,\n )}\n ref={ref}\n {...props}\n >\n <div className=\"pgn__card-status__content\">\n {icon && <Icon className=\"pgn__card-status__content-icon\" src={icon} />}\n <div className=\"pgn__card-status__message-content\">\n {title && <div className=\"pgn__card-status__heading\">{title}</div>}\n {children}\n </div>\n </div>\n {!!actions && (\n <div className=\"pgn__card-status__actions\">\n {actions}\n </div>\n )}\n </div>\n );\n});\n\nCardStatus.propTypes = {\n /** Specifies the content of the component. */\n children: PropTypes.node.isRequired,\n /** The class to append to the base element. */\n className: PropTypes.string,\n /** Icon that will be shown in the top-left corner. */\n icon: PropTypes.func,\n /** Specifies variant to use. */\n variant: PropTypes.oneOf([\n 'primary',\n 'success',\n 'danger',\n 'warning',\n ]),\n /** Specifies title for the `Card.Status`. */\n title: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\n /** Specifies any optional actions, e.g. button(s). */\n actions: PropTypes.node,\n};\n\nCardStatus.defaultProps = {\n className: undefined,\n icon: undefined,\n variant: 'warning',\n title: undefined,\n actions: undefined,\n};\n\nexport default CardStatus;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,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AAA,CAAAsB,aAAA;IAAKX,SAAS,EAAC;EAA2B,GAAEI,KAAW,CAAC,EACjEH,QACE,CACF,CAAC,EACL,CAAC,CAACI,OAAO,iBACRhB,KAAA,CAAAsB,aAAA;IAAKX,SAAS,EAAC;EAA2B,GACvCK,OACE,CAEJ,CAAC;AAEV,CAAC,CAAC;AAEFT,UAAU,CAACmB,SAAS,GAAG;EACrB;EACAd,QAAQ,EAAEV,SAAS,CAACyB,IAAI,CAACC,UAAU;EACnC;EACAjB,SAAS,EAAET,SAAS,CAAC2B,MAAM;EAC3B;EACAf,IAAI,EAAEZ,SAAS,CAAC4B,IAAI;EACpB;EACAjB,OAAO,EAAEX,SAAS,CAAC6B,KAAK,CAAC,CACvB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,CACV,CAAC;EACF;EACAhB,KAAK,EAAEb,SAAS,CAAC8B,SAAS,CAAC,CAAC9B,SAAS,CAAC+B,OAAO,EAAE/B,SAAS,CAAC2B,MAAM,CAAC,CAAC;EACjE;EACAb,OAAO,EAAEd,SAAS,CAACyB;AACrB,CAAC;AAEDpB,UAAU,CAAC2B,YAAY,GAAG;EACxBvB,SAAS,EAAEwB,SAAS;EACpBrB,IAAI,EAAEqB,SAAS;EACftB,OAAO,EAAE,SAAS;EAClBE,KAAK,EAAEoB,SAAS;EAChBnB,OAAO,EAAEmB;AACX,CAAC;AAED,eAAe5B,UAAU"}
|
package/dist/Card/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
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 = ["orientation", "isLoading", "className", "isClickable", "muted", "variant"];
|
|
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
|
-
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); }
|
|
7
5
|
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); }
|
|
6
|
+
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; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
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); }
|
|
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; }
|
|
10
11
|
import React from 'react';
|
|
@@ -20,28 +21,25 @@ import CardImageCap from './CardImageCap';
|
|
|
20
21
|
import CardBody from './CardBody';
|
|
21
22
|
import CardStatus from './CardStatus';
|
|
22
23
|
import withDeprecatedProps, { DeprTypes } from '../withDeprecatedProps';
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
variant
|
|
32
|
-
} = _ref,
|
|
24
|
+
export var CARD_VARIANTS = ['light', 'dark', 'muted'];
|
|
25
|
+
var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
26
|
+
var orientation = _ref.orientation,
|
|
27
|
+
isLoading = _ref.isLoading,
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
isClickable = _ref.isClickable,
|
|
30
|
+
muted = _ref.muted,
|
|
31
|
+
variant = _ref.variant,
|
|
33
32
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
|
|
33
|
+
var resolvedVariant = muted ? 'muted' : variant;
|
|
35
34
|
return /*#__PURE__*/React.createElement(CardContextProvider, {
|
|
36
35
|
orientation: orientation,
|
|
37
36
|
isLoading: isLoading,
|
|
38
37
|
variant: resolvedVariant
|
|
39
38
|
}, /*#__PURE__*/React.createElement(BaseCard, _extends({}, props, {
|
|
40
|
-
className: classNames(className, 'pgn__card', {
|
|
39
|
+
className: classNames(className, 'pgn__card', _defineProperty({
|
|
41
40
|
horizontal: orientation === 'horizontal',
|
|
42
|
-
clickable: isClickable
|
|
43
|
-
|
|
44
|
-
}),
|
|
41
|
+
clickable: isClickable
|
|
42
|
+
}, "pgn__card-".concat(resolvedVariant), resolvedVariant)),
|
|
45
43
|
ref: ref,
|
|
46
44
|
tabIndex: isClickable ? 0 : -1
|
|
47
45
|
})));
|
|
@@ -73,7 +71,7 @@ Card.defaultProps = _objectSpread(_objectSpread({}, BaseCard.defaultProps), {},
|
|
|
73
71
|
variant: 'light',
|
|
74
72
|
isLoading: false
|
|
75
73
|
});
|
|
76
|
-
|
|
74
|
+
var CardWithDeprecatedProp = withDeprecatedProps(Card, 'Card', {
|
|
77
75
|
muted: {
|
|
78
76
|
deprType: DeprTypes.REMOVED,
|
|
79
77
|
message: 'Use "variant" prop instead, i.e. variant="muted"'
|
package/dist/Card/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","BaseCard","PropTypes","classNames","CardContext","CardContextProvider","CardHeader","CardDivider","CardSection","CardFooter","CardImageCap","CardBody","CardStatus","withDeprecatedProps","DeprTypes","CARD_VARIANTS","Card","forwardRef","_ref","ref","orientation","isLoading","className","isClickable","muted","variant","props","_objectWithoutProperties","_excluded","resolvedVariant","createElement","_extends","horizontal","clickable","tabIndex","default","CardColumns","CardDeck","CardCarousel","CardImg","CardGroup","CardGrid","propTypes","string","oneOf","bool","defaultProps","_objectSpread","undefined","CardWithDeprecatedProp","deprType","REMOVED","message","Status","Header","Divider","Section","Footer","ImageCap","Context","Body"],"sources":["../../src/Card/index.jsx"],"sourcesContent":["import React from 'react';\nimport BaseCard from 'react-bootstrap/Card';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport CardContext, { CardContextProvider } from './CardContext';\nimport CardHeader from './CardHeader';\nimport CardDivider from './CardDivider';\nimport CardSection from './CardSection';\nimport CardFooter from './CardFooter';\nimport CardImageCap from './CardImageCap';\nimport CardBody from './CardBody';\nimport CardStatus from './CardStatus';\nimport withDeprecatedProps, { DeprTypes } from '../withDeprecatedProps';\n\nexport const CARD_VARIANTS = ['light', 'dark', 'muted'];\n\nconst Card = React.forwardRef(({\n orientation,\n isLoading,\n className,\n isClickable,\n muted,\n variant,\n ...props\n}, ref) => {\n const resolvedVariant = muted ? 'muted' : variant;\n\n return (\n <CardContextProvider\n orientation={orientation}\n isLoading={isLoading}\n variant={resolvedVariant}\n >\n <BaseCard\n {...props}\n className={classNames(className, 'pgn__card', {\n horizontal: orientation === 'horizontal',\n clickable: isClickable,\n [`pgn__card-${resolvedVariant}`]: resolvedVariant,\n })}\n ref={ref}\n tabIndex={isClickable ? 0 : -1}\n />\n </CardContextProvider>\n );\n});\n\nexport { default as CardColumns } from 'react-bootstrap/CardColumns';\nexport { default as CardDeck } from './CardDeck';\nexport { default as CardCarousel } from './CardCarousel/CardCarousel';\nexport { default as CardImg } from 'react-bootstrap/CardImg';\nexport { default as CardGroup } from 'react-bootstrap/CardGroup';\nexport { default as CardGrid } from './CardGrid';\n\nCard.propTypes = {\n /** Specifies class name to append to the base element. */\n className: PropTypes.string,\n /** Specifies which orientation to use. */\n orientation: PropTypes.oneOf(['vertical', 'horizontal']),\n /** Specifies whether the `Card` is clickable, if `true` appropriate `hover` and `focus` styling will be added. */\n isClickable: PropTypes.bool,\n /** Specifies loading state. */\n isLoading: PropTypes.bool,\n /** Specifies `Card` style variant. */\n variant: PropTypes.oneOf(CARD_VARIANTS),\n /** **Deprecated**. Specifies whether `Card` uses `muted` variant. Use `variant=\"muted\"` instead. */\n muted: PropTypes.bool,\n};\n\nCard.defaultProps = {\n ...BaseCard.defaultProps,\n className: undefined,\n orientation: 'vertical',\n isClickable: false,\n variant: 'light',\n isLoading: false,\n};\n\nconst CardWithDeprecatedProp = withDeprecatedProps(Card, 'Card', {\n muted: {\n deprType: DeprTypes.REMOVED,\n message: 'Use \"variant\" prop instead, i.e. variant=\"muted\"',\n },\n});\n\nCardWithDeprecatedProp.Status = CardStatus;\nCardWithDeprecatedProp.Header = CardHeader;\nCardWithDeprecatedProp.Divider = CardDivider;\nCardWithDeprecatedProp.Section = CardSection;\nCardWithDeprecatedProp.Footer = CardFooter;\nCardWithDeprecatedProp.ImageCap = CardImageCap;\nCardWithDeprecatedProp.Context = CardContext;\nCardWithDeprecatedProp.Body = CardBody;\n\nexport default CardWithDeprecatedProp;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","BaseCard","PropTypes","classNames","CardContext","CardContextProvider","CardHeader","CardDivider","CardSection","CardFooter","CardImageCap","CardBody","CardStatus","withDeprecatedProps","DeprTypes","CARD_VARIANTS","Card","forwardRef","_ref","ref","orientation","isLoading","className","isClickable","muted","variant","props","_objectWithoutProperties","_excluded","resolvedVariant","createElement","_extends","_defineProperty","horizontal","clickable","concat","tabIndex","default","CardColumns","CardDeck","CardCarousel","CardImg","CardGroup","CardGrid","propTypes","string","oneOf","bool","defaultProps","_objectSpread","undefined","CardWithDeprecatedProp","deprType","REMOVED","message","Status","Header","Divider","Section","Footer","ImageCap","Context","Body"],"sources":["../../src/Card/index.jsx"],"sourcesContent":["import React from 'react';\nimport BaseCard from 'react-bootstrap/Card';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport CardContext, { CardContextProvider } from './CardContext';\nimport CardHeader from './CardHeader';\nimport CardDivider from './CardDivider';\nimport CardSection from './CardSection';\nimport CardFooter from './CardFooter';\nimport CardImageCap from './CardImageCap';\nimport CardBody from './CardBody';\nimport CardStatus from './CardStatus';\nimport withDeprecatedProps, { DeprTypes } from '../withDeprecatedProps';\n\nexport const CARD_VARIANTS = ['light', 'dark', 'muted'];\n\nconst Card = React.forwardRef(({\n orientation,\n isLoading,\n className,\n isClickable,\n muted,\n variant,\n ...props\n}, ref) => {\n const resolvedVariant = muted ? 'muted' : variant;\n\n return (\n <CardContextProvider\n orientation={orientation}\n isLoading={isLoading}\n variant={resolvedVariant}\n >\n <BaseCard\n {...props}\n className={classNames(className, 'pgn__card', {\n horizontal: orientation === 'horizontal',\n clickable: isClickable,\n [`pgn__card-${resolvedVariant}`]: resolvedVariant,\n })}\n ref={ref}\n tabIndex={isClickable ? 0 : -1}\n />\n </CardContextProvider>\n );\n});\n\nexport { default as CardColumns } from 'react-bootstrap/CardColumns';\nexport { default as CardDeck } from './CardDeck';\nexport { default as CardCarousel } from './CardCarousel/CardCarousel';\nexport { default as CardImg } from 'react-bootstrap/CardImg';\nexport { default as CardGroup } from 'react-bootstrap/CardGroup';\nexport { default as CardGrid } from './CardGrid';\n\nCard.propTypes = {\n /** Specifies class name to append to the base element. */\n className: PropTypes.string,\n /** Specifies which orientation to use. */\n orientation: PropTypes.oneOf(['vertical', 'horizontal']),\n /** Specifies whether the `Card` is clickable, if `true` appropriate `hover` and `focus` styling will be added. */\n isClickable: PropTypes.bool,\n /** Specifies loading state. */\n isLoading: PropTypes.bool,\n /** Specifies `Card` style variant. */\n variant: PropTypes.oneOf(CARD_VARIANTS),\n /** **Deprecated**. Specifies whether `Card` uses `muted` variant. Use `variant=\"muted\"` instead. */\n muted: PropTypes.bool,\n};\n\nCard.defaultProps = {\n ...BaseCard.defaultProps,\n className: undefined,\n orientation: 'vertical',\n isClickable: false,\n variant: 'light',\n isLoading: false,\n};\n\nconst CardWithDeprecatedProp = withDeprecatedProps(Card, 'Card', {\n muted: {\n deprType: DeprTypes.REMOVED,\n message: 'Use \"variant\" prop instead, i.e. variant=\"muted\"',\n },\n});\n\nCardWithDeprecatedProp.Status = CardStatus;\nCardWithDeprecatedProp.Header = CardHeader;\nCardWithDeprecatedProp.Divider = CardDivider;\nCardWithDeprecatedProp.Section = CardSection;\nCardWithDeprecatedProp.Footer = CardFooter;\nCardWithDeprecatedProp.ImageCap = CardImageCap;\nCardWithDeprecatedProp.Context = CardContext;\nCardWithDeprecatedProp.Body = CardBody;\n\nexport default CardWithDeprecatedProp;\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,WAAW,IAAIC,mBAAmB,QAAQ,eAAe;AAChE,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,mBAAmB,IAAIC,SAAS,QAAQ,wBAAwB;AAEvE,OAAO,IAAMC,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC;AAEvD,IAAMC,IAAI,gBAAGhB,KAAK,CAACiB,UAAU,CAAC,UAAAC,IAAA,EAQ3BC,GAAG,EAAK;EAAA,IAPTC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,KAAK,GAAAN,IAAA,CAALM,KAAK;IACLC,OAAO,GAAAP,IAAA,CAAPO,OAAO;IACJC,KAAK,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA;EAER,IAAMC,eAAe,GAAGL,KAAK,GAAG,OAAO,GAAGC,OAAO;EAEjD,oBACEzB,KAAA,CAAA8B,aAAA,CAACzB,mBAAmB;IAClBe,WAAW,EAAE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AAW,EAAE,UAAU;EACvBG,WAAW,EAAE,KAAK;EAClBE,OAAO,EAAE,OAAO;EAChBJ,SAAS,EAAE;AAAK,EACjB;AAED,IAAM8B,sBAAsB,GAAGtC,mBAAmB,CAACG,IAAI,EAAE,MAAM,EAAE;EAC/DQ,KAAK,EAAE;IACL4B,QAAQ,EAAEtC,SAAS,CAACuC,OAAO;IAC3BC,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEFH,sBAAsB,CAACI,MAAM,GAAG3C,UAAU;AAC1CuC,sBAAsB,CAACK,MAAM,GAAGlD,UAAU;AAC1C6C,sBAAsB,CAACM,OAAO,GAAGlD,WAAW;AAC5C4C,sBAAsB,CAACO,OAAO,GAAGlD,WAAW;AAC5C2C,sBAAsB,CAACQ,MAAM,GAAGlD,UAAU;AAC1C0C,sBAAsB,CAACS,QAAQ,GAAGlD,YAAY;AAC9CyC,sBAAsB,CAACU,OAAO,GAAGzD,WAAW;AAC5C+C,sBAAsB,CAACW,IAAI,GAAGnD,QAAQ;AAEtC,eAAewC,sBAAsB"}
|
package/dist/Carousel/index.js
CHANGED
|
@@ -4,17 +4,23 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import BaseCarousel from 'react-bootstrap/Carousel';
|
|
5
5
|
import BaseCarouselItem from 'react-bootstrap/CarouselItem';
|
|
6
6
|
import BaseCarouselCaption from 'react-bootstrap/CarouselCaption';
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}))
|
|
7
|
+
export var CAROUSEL_NEXT_LABEL_TEXT = 'Next';
|
|
8
|
+
export var CAROUSEL_PREV_LABEL_TEXT = 'Previous';
|
|
9
|
+
var Carousel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(BaseCarousel, _extends({}, props, {
|
|
11
|
+
ref: ref
|
|
12
|
+
}));
|
|
13
|
+
});
|
|
14
|
+
var CarouselItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
15
|
+
return /*#__PURE__*/React.createElement(BaseCarouselItem, _extends({}, props, {
|
|
16
|
+
ref: ref
|
|
17
|
+
}));
|
|
18
|
+
});
|
|
19
|
+
var CarouselCaption = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20
|
+
return /*#__PURE__*/React.createElement(BaseCarouselCaption, _extends({}, props, {
|
|
21
|
+
ref: ref
|
|
22
|
+
}));
|
|
23
|
+
});
|
|
18
24
|
Carousel.propTypes = {
|
|
19
25
|
/** Specifies element type for this component. */
|
|
20
26
|
as: PropTypes.elementType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","BaseCarousel","BaseCarouselItem","BaseCarouselCaption","CAROUSEL_NEXT_LABEL_TEXT","CAROUSEL_PREV_LABEL_TEXT","Carousel","forwardRef","props","ref","createElement","_extends","CarouselItem","CarouselCaption","propTypes","as","elementType","activeIndex","number","defaultActiveIndex","controls","bool","fade","indicators","interval","keyboard","nextIcon","node","nextLabel","string","onSelect","func","onSlid","onSlide","pause","oneOf","prevIcon","prevLabel","slide","touch","wrap","bsPrefix","defaultProps","undefined","className","Item","Caption"],"sources":["../../src/Carousel/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport BaseCarousel from 'react-bootstrap/Carousel';\nimport BaseCarouselItem from 'react-bootstrap/CarouselItem';\nimport BaseCarouselCaption from 'react-bootstrap/CarouselCaption';\n\nexport const CAROUSEL_NEXT_LABEL_TEXT = 'Next';\nexport const CAROUSEL_PREV_LABEL_TEXT = 'Previous';\n\nconst Carousel = React.forwardRef((props, ref) => <BaseCarousel {...props} ref={ref} />);\n\nconst CarouselItem = React.forwardRef((props, ref) => <BaseCarouselItem {...props} ref={ref} />);\n\nconst CarouselCaption = React.forwardRef((props, ref) => <BaseCarouselCaption {...props} ref={ref} />);\n\nCarousel.propTypes = {\n /** Specifies element type for this component. */\n as: PropTypes.elementType,\n /** Controls the current visible slide. Defaults to `defaultActiveIndex` prop */\n activeIndex: PropTypes.number,\n /** Specifies default active index prop */\n defaultActiveIndex: PropTypes.number,\n /** Show the `Carousel's` previous and next arrows for changing the current slide. */\n controls: PropTypes.bool,\n /** Animates slides with a crossfade animation instead of the default slide animation. */\n fade: PropTypes.bool,\n /** Show a set of slide position indicators. */\n indicators: PropTypes.bool,\n /** The amount of time to delay between automatically cycling an item. */\n interval: PropTypes.number,\n /** Specifies whether the `Carousel` should react to keyboard events. */\n keyboard: PropTypes.bool,\n /** Override the default button icon for the \"next\" control */\n nextIcon: PropTypes.node,\n /** Label shown to screen readers only, can be used to show the next element in the `Carousel` */\n nextLabel: PropTypes.string,\n /** Callback fired when the active item changes. */\n onSelect: PropTypes.func,\n /** Callback fired when a slide transition ends. */\n onSlid: PropTypes.func,\n /** Callback fired when a slide transition starts. */\n onSlide: PropTypes.func,\n /** If set to \"hover\", pauses the cycling of the `Carousel` on mouseenter and\n * resumes the cycling of the carousel on mouseleave.\n * If set to false, hovering over the `Carousel` won't pause it.\n *\n * On touch-enabled devices, when set to \"hover\", cycling will pause on touchend\n * (once the user finished interacting with the `Carousel`) for two intervals,\n * before automatically resuming. Note that this is in addition to the above mouse behavior.\n */\n pause: PropTypes.oneOf(['hover', false]),\n /** Override the default button icon for the \"previous\" control */\n prevIcon: PropTypes.node,\n /** Label shown to screen readers only, can be used to show the\n * previous element in the `Carousel`. Set to null to deactivate. */\n prevLabel: PropTypes.string,\n /** Enables animation on the Carousel as it transitions between slides. */\n slide: PropTypes.bool,\n /** Whether the `Carousel` should support left/right swipe interactions on touchscreen devices. */\n touch: PropTypes.bool,\n /** Whether the `Carousel` should cycle continuously or have hard stops */\n wrap: PropTypes.bool,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nCarouselItem.propTypes = {\n /** Specifies element type for this component. */\n as: PropTypes.elementType,\n /** The amount of time to delay between automatically cycling this specific item.\n * Will default to the `Carousel's` interval prop value if none is specified.\n */\n interval: PropTypes.number,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nCarouselCaption.propTypes = {\n /** Specifies element type for this component. */\n as: PropTypes.elementType,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nCarousel.defaultProps = {\n as: 'div',\n activeIndex: undefined,\n defaultActiveIndex: 0,\n controls: true,\n fade: false,\n indicators: true,\n interval: 5000,\n keyboard: true,\n nextIcon: <span aria-hidden=\"true\" className=\"carousel-control-next-icon\" />,\n nextLabel: CAROUSEL_NEXT_LABEL_TEXT,\n onSelect: undefined,\n onSlid: undefined,\n onSlide: undefined,\n pause: 'hover',\n prevIcon: <span aria-hidden=\"true\" className=\"carousel-control-prev-icon\" />,\n prevLabel: CAROUSEL_PREV_LABEL_TEXT,\n slide: true,\n touch: true,\n wrap: true,\n bsPrefix: 'carousel',\n};\n\nCarouselItem.defaultProps = {\n as: 'div',\n interval: undefined,\n bsPrefix: 'carousel-item',\n};\n\nCarouselCaption.defaultProps = {\n as: 'div',\n bsPrefix: 'carousel-caption',\n};\n\nCarousel.Item = CarouselItem;\nCarousel.Caption = CarouselCaption;\n\nexport { CarouselItem };\nexport default Carousel;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,YAAY,MAAM,0BAA0B;AACnD,OAAOC,gBAAgB,MAAM,8BAA8B;AAC3D,OAAOC,mBAAmB,MAAM,iCAAiC;AAEjE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","BaseCarousel","BaseCarouselItem","BaseCarouselCaption","CAROUSEL_NEXT_LABEL_TEXT","CAROUSEL_PREV_LABEL_TEXT","Carousel","forwardRef","props","ref","createElement","_extends","CarouselItem","CarouselCaption","propTypes","as","elementType","activeIndex","number","defaultActiveIndex","controls","bool","fade","indicators","interval","keyboard","nextIcon","node","nextLabel","string","onSelect","func","onSlid","onSlide","pause","oneOf","prevIcon","prevLabel","slide","touch","wrap","bsPrefix","defaultProps","undefined","className","Item","Caption"],"sources":["../../src/Carousel/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport BaseCarousel from 'react-bootstrap/Carousel';\nimport BaseCarouselItem from 'react-bootstrap/CarouselItem';\nimport BaseCarouselCaption from 'react-bootstrap/CarouselCaption';\n\nexport const CAROUSEL_NEXT_LABEL_TEXT = 'Next';\nexport const CAROUSEL_PREV_LABEL_TEXT = 'Previous';\n\nconst Carousel = React.forwardRef((props, ref) => <BaseCarousel {...props} ref={ref} />);\n\nconst CarouselItem = React.forwardRef((props, ref) => <BaseCarouselItem {...props} ref={ref} />);\n\nconst CarouselCaption = React.forwardRef((props, ref) => <BaseCarouselCaption {...props} ref={ref} />);\n\nCarousel.propTypes = {\n /** Specifies element type for this component. */\n as: PropTypes.elementType,\n /** Controls the current visible slide. Defaults to `defaultActiveIndex` prop */\n activeIndex: PropTypes.number,\n /** Specifies default active index prop */\n defaultActiveIndex: PropTypes.number,\n /** Show the `Carousel's` previous and next arrows for changing the current slide. */\n controls: PropTypes.bool,\n /** Animates slides with a crossfade animation instead of the default slide animation. */\n fade: PropTypes.bool,\n /** Show a set of slide position indicators. */\n indicators: PropTypes.bool,\n /** The amount of time to delay between automatically cycling an item. */\n interval: PropTypes.number,\n /** Specifies whether the `Carousel` should react to keyboard events. */\n keyboard: PropTypes.bool,\n /** Override the default button icon for the \"next\" control */\n nextIcon: PropTypes.node,\n /** Label shown to screen readers only, can be used to show the next element in the `Carousel` */\n nextLabel: PropTypes.string,\n /** Callback fired when the active item changes. */\n onSelect: PropTypes.func,\n /** Callback fired when a slide transition ends. */\n onSlid: PropTypes.func,\n /** Callback fired when a slide transition starts. */\n onSlide: PropTypes.func,\n /** If set to \"hover\", pauses the cycling of the `Carousel` on mouseenter and\n * resumes the cycling of the carousel on mouseleave.\n * If set to false, hovering over the `Carousel` won't pause it.\n *\n * On touch-enabled devices, when set to \"hover\", cycling will pause on touchend\n * (once the user finished interacting with the `Carousel`) for two intervals,\n * before automatically resuming. Note that this is in addition to the above mouse behavior.\n */\n pause: PropTypes.oneOf(['hover', false]),\n /** Override the default button icon for the \"previous\" control */\n prevIcon: PropTypes.node,\n /** Label shown to screen readers only, can be used to show the\n * previous element in the `Carousel`. Set to null to deactivate. */\n prevLabel: PropTypes.string,\n /** Enables animation on the Carousel as it transitions between slides. */\n slide: PropTypes.bool,\n /** Whether the `Carousel` should support left/right swipe interactions on touchscreen devices. */\n touch: PropTypes.bool,\n /** Whether the `Carousel` should cycle continuously or have hard stops */\n wrap: PropTypes.bool,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nCarouselItem.propTypes = {\n /** Specifies element type for this component. */\n as: PropTypes.elementType,\n /** The amount of time to delay between automatically cycling this specific item.\n * Will default to the `Carousel's` interval prop value if none is specified.\n */\n interval: PropTypes.number,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nCarouselCaption.propTypes = {\n /** Specifies element type for this component. */\n as: PropTypes.elementType,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nCarousel.defaultProps = {\n as: 'div',\n activeIndex: undefined,\n defaultActiveIndex: 0,\n controls: true,\n fade: false,\n indicators: true,\n interval: 5000,\n keyboard: true,\n nextIcon: <span aria-hidden=\"true\" className=\"carousel-control-next-icon\" />,\n nextLabel: CAROUSEL_NEXT_LABEL_TEXT,\n onSelect: undefined,\n onSlid: undefined,\n onSlide: undefined,\n pause: 'hover',\n prevIcon: <span aria-hidden=\"true\" className=\"carousel-control-prev-icon\" />,\n prevLabel: CAROUSEL_PREV_LABEL_TEXT,\n slide: true,\n touch: true,\n wrap: true,\n bsPrefix: 'carousel',\n};\n\nCarouselItem.defaultProps = {\n as: 'div',\n interval: undefined,\n bsPrefix: 'carousel-item',\n};\n\nCarouselCaption.defaultProps = {\n as: 'div',\n bsPrefix: 'carousel-caption',\n};\n\nCarousel.Item = CarouselItem;\nCarousel.Caption = CarouselCaption;\n\nexport { CarouselItem };\nexport default Carousel;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,YAAY,MAAM,0BAA0B;AACnD,OAAOC,gBAAgB,MAAM,8BAA8B;AAC3D,OAAOC,mBAAmB,MAAM,iCAAiC;AAEjE,OAAO,IAAMC,wBAAwB,GAAG,MAAM;AAC9C,OAAO,IAAMC,wBAAwB,GAAG,UAAU;AAElD,IAAMC,QAAQ,gBAAGP,KAAK,CAACQ,UAAU,CAAC,UAACC,KAAK,EAAEC,GAAG;EAAA,oBAAKV,KAAA,CAAAW,aAAA,CAACT,YAAY,EAAAU,QAAA,KAAKH,KAAK;IAAEC,GAAG,EAAEA;EAAI,EAAE,CAAC;AAAA,EAAC;AAExF,IAAMG,YAAY,gBAAGb,KAAK,CAACQ,UAAU,CAAC,UAACC,KAAK,EAAEC,GAAG;EAAA,oBAAKV,KAAA,CAAAW,aAAA,CAACR,gBAAgB,EAAAS,QAAA,KAAKH,KAAK;IAAEC,GAAG,EAAEA;EAAI,EAAE,CAAC;AAAA,EAAC;AAEhG,IAAMI,eAAe,gBAAGd,KAAK,CAACQ,UAAU,CAAC,UAACC,KAAK,EAAEC,GAAG;EAAA,oBAAKV,KAAA,CAAAW,aAAA,CAACP,mBAAmB,EAAAQ,QAAA,KAAKH,KAAK;IAAEC,GAAG,EAAEA;EAAI,EAAE,CAAC;AAAA,EAAC;AAEtGH,QAAQ,CAACQ,SAAS,GAAG;EACnB;EACAC,EAAE,EAAEf,SAAS,CAACgB,WAAW;EACzB;EACAC,WAAW,EAAEjB,SAAS,CAACkB,MAAM;EAC7B;EACAC,kBAAkB,EAAEnB,SAAS,CAACkB,MAAM;EACpC;EACAE,QAAQ,EAAEpB,SAAS,CAACqB,IAAI;EACxB;EACAC,I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