@openedx/paragon 21.12.0 → 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.
- 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 +14 -11
- 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/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 +19 -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 +32 -31
- package/dist/Hyperlink/index.js.map +1 -1
- package/dist/Hyperlink/index.scss +2 -2
- package/dist/Icon/index.js +38 -30
- package/dist/Icon/index.js.map +1 -1
- package/dist/IconButton/index.js +31 -33
- 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 +25 -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 +226 -193
- 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/Popover/index.js +18 -21
- package/dist/Popover/index.js.map +1 -1
- package/dist/ProductTour/Checkpoint.js +39 -30
- 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/ProductTour/messages.js +16 -0
- 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 +66 -51
- 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 +8 -11
- 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 -23
- 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 +72 -56
- 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 +50 -41
- 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/i18n/messages/ar.json +2 -1
- package/dist/i18n/messages/ca.json +2 -1
- package/dist/i18n/messages/es_419.json +2 -1
- package/dist/i18n/messages/es_AR.json +2 -1
- package/dist/i18n/messages/es_ES.json +2 -1
- package/dist/i18n/messages/fr.json +2 -1
- package/dist/i18n/messages/he.json +2 -1
- package/dist/i18n/messages/id.json +2 -1
- package/dist/i18n/messages/it_IT.json +2 -1
- package/dist/i18n/messages/ko_KR.json +2 -1
- package/dist/i18n/messages/pl.json +2 -1
- package/dist/i18n/messages/pt_BR.json +2 -1
- package/dist/i18n/messages/pt_PT.json +2 -1
- package/dist/i18n/messages/ru.json +2 -1
- package/dist/i18n/messages/th.json +2 -1
- package/dist/i18n/messages/tr_TR.json +2 -1
- package/dist/i18n/messages/uk.json +2 -1
- package/dist/i18n/messages/zh_CN.json +2 -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/Container/index.jsx +4 -0
- package/src/Dropdown/index.jsx +4 -0
- package/src/Dropzone/index.jsx +1 -1
- package/src/Form/FormSwitch.jsx +3 -0
- package/src/Hyperlink/index.jsx +7 -6
- package/src/Hyperlink/index.scss +2 -2
- package/src/Icon/index.jsx +18 -11
- package/src/IconButton/__snapshots__/IconButton.test.jsx.snap +12 -10
- package/src/IconButton/index.jsx +2 -2
- package/src/Layout/index.jsx +1 -4
- package/src/Menu/MenuItem.jsx +2 -2
- package/src/Modal/ModalDialog.jsx +3 -0
- package/src/Modal/index.jsx +11 -6
- package/src/Overlay/README.md +1 -1
- package/src/Overlay/index.jsx +1 -1
- package/src/Popover/README.md +0 -1
- package/src/Popover/index.jsx +11 -11
- package/src/ProductTour/Checkpoint.jsx +9 -6
- package/src/ProductTour/messages.js +16 -0
- package/src/SearchField/SearchFieldAdvanced.jsx +12 -7
- package/src/SearchField/SearchFieldLabel.jsx +3 -3
- package/src/SearchField/index.jsx +0 -1
- package/src/Tabs/index.jsx +19 -13
- package/src/hooks/tests/useIndexOfLastVisibleChild.test.jsx +3 -3
- package/src/hooks/useIndexOfLastVisibleChild.jsx +36 -38
- package/src/hooks/useIndexOfLastVisibleChild.mdx +3 -3
- package/src/i18n/messages/ar.json +2 -1
- package/src/i18n/messages/ca.json +2 -1
- package/src/i18n/messages/es_419.json +2 -1
- package/src/i18n/messages/es_AR.json +2 -1
- package/src/i18n/messages/es_ES.json +2 -1
- package/src/i18n/messages/fr.json +2 -1
- package/src/i18n/messages/he.json +2 -1
- package/src/i18n/messages/id.json +2 -1
- package/src/i18n/messages/it_IT.json +2 -1
- package/src/i18n/messages/ko_KR.json +2 -1
- package/src/i18n/messages/pl.json +2 -1
- package/src/i18n/messages/pt_BR.json +2 -1
- package/src/i18n/messages/pt_PT.json +2 -1
- package/src/i18n/messages/ru.json +2 -1
- package/src/i18n/messages/th.json +2 -1
- package/src/i18n/messages/tr_TR.json +2 -1
- package/src/i18n/messages/uk.json +2 -1
- package/src/i18n/messages/zh_CN.json +2 -1
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["children"];
|
|
2
|
+
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
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; }
|
|
3
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
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
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); } }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
+
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); }
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
|
+
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); }; }
|
|
11
|
+
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); }
|
|
12
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
13
|
+
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; } }
|
|
14
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4
15
|
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
|
|
6
|
-
function _toPrimitive(input, hint) { if (
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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
18
|
/* eslint no-console: 0 */
|
|
8
19
|
import React from 'react';
|
|
9
|
-
export
|
|
20
|
+
export var DeprTypes = /*#__PURE__*/function (DeprTypes) {
|
|
10
21
|
DeprTypes["MOVED"] = "MOVED";
|
|
11
22
|
DeprTypes["REMOVED"] = "REMOVED";
|
|
12
23
|
DeprTypes["FORMAT"] = "FORMAT";
|
|
@@ -14,68 +25,78 @@ export let DeprTypes = /*#__PURE__*/function (DeprTypes) {
|
|
|
14
25
|
return DeprTypes;
|
|
15
26
|
}({});
|
|
16
27
|
function withDeprecatedProps(WrappedComponent, componentName, deprecatedProps) {
|
|
17
|
-
|
|
28
|
+
var WithDeprecatedProps = /*#__PURE__*/function (_React$Component) {
|
|
29
|
+
_inherits(WithDeprecatedProps, _React$Component);
|
|
30
|
+
var _super = _createSuper(WithDeprecatedProps);
|
|
18
31
|
// eslint-disable-next-line react/static-property-placement
|
|
19
32
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
this
|
|
33
|
+
function WithDeprecatedProps(props) {
|
|
34
|
+
var _this;
|
|
35
|
+
_classCallCheck(this, WithDeprecatedProps);
|
|
36
|
+
_this = _super.call(this, props);
|
|
37
|
+
_this.transformProps = _this.transformProps.bind(_assertThisInitialized(_this));
|
|
38
|
+
return _this;
|
|
23
39
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
40
|
+
_createClass(WithDeprecatedProps, [{
|
|
41
|
+
key: "warn",
|
|
42
|
+
value: function warn(message) {
|
|
43
|
+
if (process.env.NODE_ENV === 'development') {
|
|
44
|
+
if (console) {
|
|
45
|
+
console.warn("[Deprecated] ".concat(message));
|
|
46
|
+
}
|
|
28
47
|
}
|
|
29
48
|
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
49
|
+
}, {
|
|
50
|
+
key: "transformProps",
|
|
51
|
+
value: function transformProps(acc, propName) {
|
|
52
|
+
if (deprecatedProps[propName] === undefined) {
|
|
53
|
+
acc[propName] = this.props[propName];
|
|
54
|
+
return acc;
|
|
55
|
+
}
|
|
56
|
+
var _deprecatedProps$prop = deprecatedProps[propName],
|
|
57
|
+
deprType = _deprecatedProps$prop.deprType,
|
|
58
|
+
newName = _deprecatedProps$prop.newName,
|
|
59
|
+
expect = _deprecatedProps$prop.expect,
|
|
60
|
+
transform = _deprecatedProps$prop.transform,
|
|
61
|
+
message = _deprecatedProps$prop.message;
|
|
62
|
+
switch (deprType) {
|
|
63
|
+
case DeprTypes.MOVED:
|
|
64
|
+
this.warn("".concat(componentName, ": The prop '").concat(propName, "' has been moved to '").concat(newName, "'."));
|
|
65
|
+
acc[newName] = this.props[propName];
|
|
66
|
+
break;
|
|
67
|
+
case DeprTypes.REMOVED:
|
|
68
|
+
this.warn("".concat(componentName, ": The prop '").concat(propName, "' has been removed. '").concat(message, "'"));
|
|
69
|
+
break;
|
|
70
|
+
case DeprTypes.FORMAT:
|
|
71
|
+
if (!expect(this.props[propName])) {
|
|
72
|
+
this.warn("".concat(componentName, ": The prop '").concat(propName, "' expects a new format. ").concat(message));
|
|
73
|
+
acc[propName] = transform(this.props[propName], this.props);
|
|
74
|
+
} else {
|
|
75
|
+
acc[propName] = this.props[propName];
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
case DeprTypes.MOVED_AND_FORMAT:
|
|
79
|
+
this.warn("".concat(componentName, ": The prop '").concat(propName, "' has been moved to '").concat(newName, "' and expects a new format. ").concat(message));
|
|
80
|
+
acc[newName] = transform(this.props[propName], this.props);
|
|
81
|
+
break;
|
|
82
|
+
default:
|
|
83
|
+
acc[propName] = this.props[propName];
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
34
86
|
return acc;
|
|
35
87
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
switch (deprType) {
|
|
44
|
-
case DeprTypes.MOVED:
|
|
45
|
-
this.warn(`${componentName}: The prop '${propName}' has been moved to '${newName}'.`);
|
|
46
|
-
acc[newName] = this.props[propName];
|
|
47
|
-
break;
|
|
48
|
-
case DeprTypes.REMOVED:
|
|
49
|
-
this.warn(`${componentName}: The prop '${propName}' has been removed. '${message}'`);
|
|
50
|
-
break;
|
|
51
|
-
case DeprTypes.FORMAT:
|
|
52
|
-
if (!expect(this.props[propName])) {
|
|
53
|
-
this.warn(`${componentName}: The prop '${propName}' expects a new format. ${message}`);
|
|
54
|
-
acc[propName] = transform(this.props[propName], this.props);
|
|
55
|
-
} else {
|
|
56
|
-
acc[propName] = this.props[propName];
|
|
57
|
-
}
|
|
58
|
-
break;
|
|
59
|
-
case DeprTypes.MOVED_AND_FORMAT:
|
|
60
|
-
this.warn(`${componentName}: The prop '${propName}' has been moved to '${newName}' and expects a new format. ${message}`);
|
|
61
|
-
acc[newName] = transform(this.props[propName], this.props);
|
|
62
|
-
break;
|
|
63
|
-
default:
|
|
64
|
-
acc[propName] = this.props[propName];
|
|
65
|
-
break;
|
|
88
|
+
}, {
|
|
89
|
+
key: "render",
|
|
90
|
+
value: function render() {
|
|
91
|
+
var _Object$keys$reduce = Object.keys(this.props).reduce(this.transformProps, {}),
|
|
92
|
+
children = _Object$keys$reduce.children,
|
|
93
|
+
transformedProps = _objectWithoutProperties(_Object$keys$reduce, _excluded);
|
|
94
|
+
return /*#__PURE__*/React.createElement(WrappedComponent, transformedProps, this.props.children || children);
|
|
66
95
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
children
|
|
73
|
-
} = _Object$keys$reduce,
|
|
74
|
-
transformedProps = _objectWithoutProperties(_Object$keys$reduce, _excluded);
|
|
75
|
-
return /*#__PURE__*/React.createElement(WrappedComponent, transformedProps, this.props.children || children);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
_defineProperty(WithDeprecatedProps, "displayName", `withDeprecatedProps(${componentName})`);
|
|
96
|
+
}]);
|
|
97
|
+
return WithDeprecatedProps;
|
|
98
|
+
}(React.Component);
|
|
99
|
+
_defineProperty(WithDeprecatedProps, "displayName", "withDeprecatedProps(".concat(componentName, ")"));
|
|
79
100
|
return WithDeprecatedProps;
|
|
80
101
|
}
|
|
81
102
|
export default withDeprecatedProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withDeprecatedProps.js","names":["React","DeprTypes","withDeprecatedProps","WrappedComponent","componentName","deprecatedProps","WithDeprecatedProps","Component","
|
|
1
|
+
{"version":3,"file":"withDeprecatedProps.js","names":["React","DeprTypes","withDeprecatedProps","WrappedComponent","componentName","deprecatedProps","WithDeprecatedProps","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","transformProps","bind","_assertThisInitialized","_createClass","key","value","warn","message","process","env","NODE_ENV","console","concat","acc","propName","undefined","_deprecatedProps$prop","deprType","newName","expect","transform","MOVED","REMOVED","FORMAT","MOVED_AND_FORMAT","render","_Object$keys$reduce","Object","keys","reduce","children","transformedProps","_objectWithoutProperties","_excluded","createElement","Component","_defineProperty"],"sources":["../src/withDeprecatedProps.tsx"],"sourcesContent":["/* eslint no-console: 0 */\nimport React from 'react';\n\nexport enum DeprTypes {\n MOVED = 'MOVED',\n REMOVED = 'REMOVED',\n FORMAT = 'FORMAT',\n MOVED_AND_FORMAT = 'MOVED_AND_FORMAT',\n}\n\nexport interface DeprecatedProps extends Record<string, any> {\n deprType: DeprTypes,\n newName?: string,\n expect?: (propValue: any) => boolean,\n transform?: (propValue: any, allProps: Record<string, any>) => any,\n message?: string,\n}\n\nfunction withDeprecatedProps<T extends Record<string, any>>(\n WrappedComponent: React.ComponentType<any>,\n componentName: string,\n deprecatedProps: Record<string, DeprecatedProps>,\n) : any {\n class WithDeprecatedProps extends React.Component<T> {\n // eslint-disable-next-line react/static-property-placement\n public static displayName = `withDeprecatedProps(${componentName})`;\n\n constructor(props: T) {\n super(props);\n this.transformProps = this.transformProps.bind(this);\n }\n\n warn(message: string) {\n if (process.env.NODE_ENV === 'development') {\n if (console) { console.warn(`[Deprecated] ${message}`); }\n }\n }\n\n transformProps(acc: Record<string, any>, propName: string) : Record<string, any> {\n if (deprecatedProps[propName] === undefined) {\n acc[propName] = this.props[propName];\n return acc;\n }\n\n const {\n deprType,\n newName,\n expect,\n transform,\n message,\n } = deprecatedProps[propName];\n\n switch (deprType) {\n case DeprTypes.MOVED:\n this.warn(`${componentName}: The prop '${propName}' has been moved to '${newName}'.`);\n acc[newName!] = this.props[propName];\n break;\n case DeprTypes.REMOVED:\n this.warn(`${componentName}: The prop '${propName}' has been removed. '${message}'`);\n break;\n case DeprTypes.FORMAT:\n if (!expect!(this.props[propName])) {\n this.warn(`${componentName}: The prop '${propName}' expects a new format. ${message}`);\n acc[propName] = transform!(this.props[propName], this.props);\n } else {\n acc[propName] = this.props[propName];\n }\n break;\n case DeprTypes.MOVED_AND_FORMAT:\n this.warn(`${componentName}: The prop '${propName}' has been moved to '${newName}' and expects a new format. ${message}`);\n acc[newName!] = transform!(this.props[propName], this.props);\n break;\n default:\n acc[propName] = this.props[propName];\n break;\n }\n\n return acc;\n }\n\n render() {\n const { children, ...transformedProps } = Object\n .keys(this.props)\n .reduce(this.transformProps, {});\n\n return (\n <WrappedComponent {...transformedProps as T}>\n {this.props.children || children}\n </WrappedComponent>\n );\n }\n }\n\n return WithDeprecatedProps;\n}\n\nexport default withDeprecatedProps;\n"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openedx/paragon",
|
|
3
|
-
"version": "21.12.
|
|
3
|
+
"version": "21.12.2",
|
|
4
4
|
"description": "Accessible, responsive UI component library based on Bootstrap.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
"@babel/preset-env": "^7.16.8",
|
|
94
94
|
"@babel/preset-react": "^7.16.7",
|
|
95
95
|
"@babel/preset-typescript": "^7.16.7",
|
|
96
|
-
"@edx/browserslist-config": "^1.2.0",
|
|
97
96
|
"@edx/eslint-config": "^3.2.0",
|
|
98
97
|
"@edx/stylelint-config-edx": "^2.3.0",
|
|
99
98
|
"@edx/typescript-config": "^1.0.1",
|
|
@@ -177,9 +176,6 @@
|
|
|
177
176
|
"/node_modules/(?!(@edx/paragon)/).*/"
|
|
178
177
|
]
|
|
179
178
|
},
|
|
180
|
-
"browserslist": [
|
|
181
|
-
"extends @edx/browserslist-config"
|
|
182
|
-
],
|
|
183
179
|
"husky": {
|
|
184
180
|
"hooks": {
|
|
185
181
|
"pre-commit": "npm run lint"
|
package/src/Button/index.jsx
CHANGED
|
@@ -52,10 +52,10 @@ Button.propTypes = {
|
|
|
52
52
|
variant: PropTypes.string,
|
|
53
53
|
/** An icon component to render.
|
|
54
54
|
* Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */
|
|
55
|
-
iconBefore: PropTypes.oneOfType([PropTypes.
|
|
55
|
+
iconBefore: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),
|
|
56
56
|
/** An icon component to render.
|
|
57
57
|
* Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */
|
|
58
|
-
iconAfter: PropTypes.oneOfType([PropTypes.
|
|
58
|
+
iconAfter: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
Button.defaultProps = {
|
package/src/Container/index.jsx
CHANGED
|
@@ -28,11 +28,14 @@ Container.propTypes = {
|
|
|
28
28
|
...RBContainer.propTypes,
|
|
29
29
|
/** Override the base element */
|
|
30
30
|
as: PropTypes.elementType,
|
|
31
|
+
/** Specifies the contents of the container */
|
|
31
32
|
children: PropTypes.node,
|
|
32
33
|
/** Fill all available space at any breakpoint */
|
|
33
34
|
fluid: PropTypes.bool,
|
|
34
35
|
/** Set the maximum width for the container */
|
|
35
36
|
size: PropTypes.oneOf(Object.keys(SIZE_CLASS_NAMES)),
|
|
37
|
+
/** Overrides underlying component base CSS class name */
|
|
38
|
+
bsPrefix: PropTypes.string,
|
|
36
39
|
};
|
|
37
40
|
|
|
38
41
|
Container.defaultProps = {
|
|
@@ -40,6 +43,7 @@ Container.defaultProps = {
|
|
|
40
43
|
children: undefined,
|
|
41
44
|
fluid: true,
|
|
42
45
|
size: undefined,
|
|
46
|
+
bsPrefix: 'container',
|
|
43
47
|
};
|
|
44
48
|
|
|
45
49
|
export default Container;
|
package/src/Dropdown/index.jsx
CHANGED
|
@@ -69,6 +69,7 @@ const Dropdown = React.forwardRef(
|
|
|
69
69
|
);
|
|
70
70
|
},
|
|
71
71
|
);
|
|
72
|
+
|
|
72
73
|
Dropdown.propTypes = {
|
|
73
74
|
autoClose: PropTypes.oneOfType([
|
|
74
75
|
PropTypes.string,
|
|
@@ -79,6 +80,7 @@ Dropdown.propTypes = {
|
|
|
79
80
|
show: PropTypes.bool,
|
|
80
81
|
variant: PropTypes.oneOf(['light', 'dark']),
|
|
81
82
|
};
|
|
83
|
+
|
|
82
84
|
Dropdown.defaultProps = {
|
|
83
85
|
autoClose: true,
|
|
84
86
|
className: '',
|
|
@@ -127,9 +129,11 @@ Dropdown.Item = React.forwardRef(
|
|
|
127
129
|
);
|
|
128
130
|
},
|
|
129
131
|
);
|
|
132
|
+
|
|
130
133
|
Dropdown.Item.propTypes = {
|
|
131
134
|
className: PropTypes.string,
|
|
132
135
|
};
|
|
136
|
+
|
|
133
137
|
Dropdown.Item.defaultProps = {
|
|
134
138
|
className: undefined,
|
|
135
139
|
};
|
package/src/Dropzone/index.jsx
CHANGED
|
@@ -270,7 +270,7 @@ Dropzone.propTypes = {
|
|
|
270
270
|
*/
|
|
271
271
|
validator: PropTypes.func,
|
|
272
272
|
/** A component to display initial state of the `Dropzone`. */
|
|
273
|
-
inputComponent: PropTypes.oneOfType([PropTypes.
|
|
273
|
+
inputComponent: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]),
|
|
274
274
|
};
|
|
275
275
|
|
|
276
276
|
export default Dropzone;
|
package/src/Form/FormSwitch.jsx
CHANGED
|
@@ -79,8 +79,11 @@ FormSwitch.propTypes = {
|
|
|
79
79
|
children: PropTypes.node.isRequired,
|
|
80
80
|
/** Specifies class name to append to the base element. */
|
|
81
81
|
className: PropTypes.string,
|
|
82
|
+
/** Specifies class name to append to the label element. */
|
|
82
83
|
labelClassName: PropTypes.string,
|
|
84
|
+
/** Specifies helper text to display below the switch. */
|
|
83
85
|
helperText: PropTypes.node,
|
|
86
|
+
/** Determines whether the label should float to the left when the switch is active. */
|
|
84
87
|
floatLabelLeft: PropTypes.bool,
|
|
85
88
|
};
|
|
86
89
|
|
package/src/Hyperlink/index.jsx
CHANGED
|
@@ -101,18 +101,19 @@ Hyperlink.propTypes = {
|
|
|
101
101
|
children: PropTypes.node.isRequired,
|
|
102
102
|
/** Custom class names for the hyperlink */
|
|
103
103
|
className: PropTypes.string,
|
|
104
|
-
/** specifies where the link should open. The default behavior is `_self`, which means that the URL will be
|
|
105
|
-
|
|
104
|
+
/** specifies where the link should open. The default behavior is `_self`, which means that the URL will be
|
|
105
|
+
* loaded into the same browsing context as the current one.
|
|
106
|
+
* If the target is `_blank` (opening a new window) `rel='noopener'` will be added to the anchor tag to prevent
|
|
107
|
+
* any potential [reverse tabnabbing attack](https://www.owasp.org/index.php/Reverse_Tabnabbing).
|
|
108
|
+
*/
|
|
106
109
|
target: PropTypes.string,
|
|
107
110
|
/** specifies the callback function when the link is clicked */
|
|
108
111
|
onClick: PropTypes.func,
|
|
109
|
-
// eslint-disable-next-line max-len
|
|
110
112
|
/** specifies the text for links with a `_blank` target (which loads the URL in a new browsing context). */
|
|
111
113
|
externalLinkAlternativeText: isRequiredIf(
|
|
112
114
|
PropTypes.string,
|
|
113
115
|
props => props.target === '_blank',
|
|
114
116
|
),
|
|
115
|
-
// eslint-disable-next-line max-len
|
|
116
117
|
/** specifies the title for links with a `_blank` target (which loads the URL in a new browsing context). */
|
|
117
118
|
externalLinkTitle: isRequiredIf(
|
|
118
119
|
PropTypes.string,
|
|
@@ -120,9 +121,9 @@ Hyperlink.propTypes = {
|
|
|
120
121
|
),
|
|
121
122
|
/** type of hyperlink */
|
|
122
123
|
variant: PropTypes.oneOf(['default', 'muted', 'brand']),
|
|
123
|
-
/** specify the link style. By default it will be underlined. */
|
|
124
|
+
/** specify the link style. By default, it will be underlined. */
|
|
124
125
|
isInline: PropTypes.bool,
|
|
125
|
-
/** specify if we need to show launch Icon. By default it will be visible. */
|
|
126
|
+
/** specify if we need to show launch Icon. By default, it will be visible. */
|
|
126
127
|
showLaunchIcon: PropTypes.bool,
|
|
127
128
|
};
|
|
128
129
|
|
package/src/Hyperlink/index.scss
CHANGED
package/src/Icon/index.jsx
CHANGED
|
@@ -70,28 +70,35 @@ function Icon({
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
Icon.propTypes = {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
/**
|
|
74
|
+
* An icon component to render.
|
|
75
|
+
* Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';`
|
|
76
|
+
*/
|
|
77
|
+
src: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]),
|
|
76
78
|
/** HTML element attributes to pass through to the underlying svg element */
|
|
77
79
|
svgAttrs: PropTypes.shape({
|
|
78
80
|
'aria-label': PropTypes.string,
|
|
79
81
|
'aria-labelledby': PropTypes.string,
|
|
80
82
|
}),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
/**
|
|
84
|
+
* the `id` property of the Icon element, by default this value is generated
|
|
85
|
+
* with the `newId` function with the `prefix` of `Icon`.
|
|
86
|
+
*/
|
|
83
87
|
id: PropTypes.string,
|
|
84
|
-
// eslint-disable-next-line max-len
|
|
85
88
|
/** The size of the icon. */
|
|
86
89
|
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']),
|
|
87
|
-
// eslint-disable-next-line max-len
|
|
88
90
|
/** A class name that will define what the Icon looks like. */
|
|
89
91
|
className: PropTypes.string,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
/**
|
|
93
|
+
* a boolean that determines the value of `aria-hidden` attribute on the Icon span,
|
|
94
|
+
* this value is `true` by default.
|
|
95
|
+
*/
|
|
92
96
|
hidden: PropTypes.bool,
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
/**
|
|
98
|
+
* a string or an element that will be used on a secondary span leveraging the `sr-only` style
|
|
99
|
+
* for screenreader only text, this value is `undefined` by default. This value is recommended for use unless
|
|
100
|
+
* the Icon is being used in a way that is purely decorative or provides no additional context for screen
|
|
101
|
+
* reader users. This field should be thought of the same way an `alt` attribute would be used for `image` tags.
|
|
95
102
|
*/
|
|
96
103
|
screenReaderText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
97
104
|
};
|
|
@@ -19,16 +19,18 @@ exports[`<IconButton /> renders with required props 1`] = `
|
|
|
19
19
|
role="img"
|
|
20
20
|
src={null}
|
|
21
21
|
style={Object {}}
|
|
22
|
-
viewBox="0 0
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
viewBox="0 0 function SvgInfoOutline(props) {
|
|
23
|
+
return /*#__PURE__*/React.createElement(\\"svg\\", _extends({
|
|
24
|
+
width: 24,
|
|
25
|
+
height: 24,
|
|
26
|
+
viewBox: \\"0 0 24 24\\",
|
|
27
|
+
fill: \\"none\\",
|
|
28
|
+
xmlns: \\"http://www.w3.org/2000/svg\\"
|
|
29
|
+
}, props), /*#__PURE__*/React.createElement(\\"path\\", {
|
|
30
|
+
d: \\"M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z\\",
|
|
31
|
+
fill: \\"currentColor\\"
|
|
32
|
+
}));
|
|
33
|
+
} undefined"
|
|
32
34
|
xmlns="http://www.w3.org/2000/svg"
|
|
33
35
|
>
|
|
34
36
|
<path
|
package/src/IconButton/index.jsx
CHANGED
|
@@ -80,14 +80,14 @@ IconButton.propTypes = {
|
|
|
80
80
|
/** An icon component to render. Example import of a Paragon icon component:
|
|
81
81
|
* `import { Check } from '@edx/paragon/dist/icon';`
|
|
82
82
|
* */
|
|
83
|
-
src: PropTypes.oneOfType([PropTypes.element, PropTypes.
|
|
83
|
+
src: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]),
|
|
84
84
|
/** Alt text for your icon. For best practice, avoid using alt text to describe
|
|
85
85
|
* the image in the `IconButton`. Instead, we recommend describing the function
|
|
86
86
|
* of the button. */
|
|
87
87
|
alt: PropTypes.string.isRequired,
|
|
88
88
|
/** Changes icon styles for dark background */
|
|
89
89
|
invertColors: PropTypes.bool,
|
|
90
|
-
/** Accepts a React fontawesome icon.
|
|
90
|
+
/** Accepts a React fontawesome icon. */
|
|
91
91
|
icon: PropTypes.shape({
|
|
92
92
|
prefix: PropTypes.string,
|
|
93
93
|
iconName: PropTypes.string,
|
package/src/Layout/index.jsx
CHANGED
package/src/Menu/MenuItem.jsx
CHANGED
|
@@ -40,9 +40,9 @@ MenuItem.propTypes = {
|
|
|
40
40
|
/** Specifies the base element */
|
|
41
41
|
as: PropTypes.elementType,
|
|
42
42
|
/** Specifies the jsx before the content of the ``MenuItem`` */
|
|
43
|
-
iconBefore: PropTypes.oneOfType([PropTypes.element, PropTypes.
|
|
43
|
+
iconBefore: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]),
|
|
44
44
|
/** Specifies the jsx after the content of the ``MenuItem`` */
|
|
45
|
-
iconAfter: PropTypes.oneOfType([PropTypes.element, PropTypes.
|
|
45
|
+
iconAfter: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]),
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
MenuItem.defaultProps = {
|
package/src/Modal/index.jsx
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import ReactDOM from 'react-dom';
|
|
4
3
|
import classNames from 'classnames';
|
|
@@ -271,21 +270,26 @@ class Modal extends React.Component {
|
|
|
271
270
|
Modal.propTypes = {
|
|
272
271
|
/** specifies whether the modal renders open or closed on the initial render. It defaults to false. */
|
|
273
272
|
open: PropTypes.bool,
|
|
274
|
-
/** is the selector for an element in the dom which the modal should be rendered under.
|
|
275
|
-
|
|
273
|
+
/** is the selector for an element in the dom which the modal should be rendered under.
|
|
274
|
+
* It uses querySelector to find the first element that matches that selector,
|
|
275
|
+
* and then creates a React portal to a div underneath the parent element.
|
|
276
|
+
*/
|
|
276
277
|
parentSelector: PropTypes.string,
|
|
277
278
|
/** a string or an element that is rendered inside of the modal title, above the modal body. */
|
|
278
279
|
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
|
|
279
280
|
/** a string or an element that is rendered inside of the modal body, between the title and the footer. */
|
|
280
281
|
body: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
|
|
281
|
-
/** an array of either elements or shapes that take the form of the buttonPropTypes.
|
|
282
|
+
/** an array of either elements or shapes that take the form of the buttonPropTypes.
|
|
283
|
+
* See the [buttonPropTypes](https://github.com/openedx/paragon/blob/master/src/Button/index.jsx#L40)
|
|
284
|
+
* for a list of acceptable props to pass as part of a button. */
|
|
282
285
|
buttons: PropTypes.arrayOf(PropTypes.oneOfType([
|
|
283
286
|
PropTypes.element,
|
|
284
287
|
PropTypes.shape({}), // TODO: Only accept nodes in the future
|
|
285
288
|
])),
|
|
286
289
|
/** specifies the display text of the default Close button. It defaults to "Close". */
|
|
287
290
|
closeText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
288
|
-
/** a function that is called on close. It can be used to perform actions upon closing of the modal,
|
|
291
|
+
/** a function that is called on close. It can be used to perform actions upon closing of the modal,
|
|
292
|
+
* such as restoring focus to the previous logical focusable element. */
|
|
289
293
|
onClose: PropTypes.func.isRequired,
|
|
290
294
|
variant: PropTypes.shape({
|
|
291
295
|
status: PropTypes.string,
|
|
@@ -295,7 +299,8 @@ Modal.propTypes = {
|
|
|
295
299
|
/** specifies whether a close button is rendered in the modal header. It defaults to true. */
|
|
296
300
|
renderHeaderCloseButton: PropTypes.bool,
|
|
297
301
|
/**
|
|
298
|
-
* Specifies optional classes to add to the element with the '.modal-dialog' class.
|
|
302
|
+
* Specifies optional classes to add to the element with the '.modal-dialog' class.
|
|
303
|
+
* See Bootstrap documentation for possible classes. Some options: modal-lg, modal-sm, modal-dialog-centered
|
|
299
304
|
*/
|
|
300
305
|
dialogClassName: PropTypes.string,
|
|
301
306
|
};
|
package/src/Overlay/README.md
CHANGED
|
@@ -38,7 +38,7 @@ This component is used to power Tooltips and Popovers.
|
|
|
38
38
|
Click me to see
|
|
39
39
|
</Button>
|
|
40
40
|
</div>
|
|
41
|
-
<Overlay target={target.current} show={
|
|
41
|
+
<Overlay target={target.current} show={isOpen} placement="right">
|
|
42
42
|
{({ placement, arrowProps, show: _show, popper, ...props }) => (
|
|
43
43
|
<div
|
|
44
44
|
{...props}
|
package/src/Overlay/index.jsx
CHANGED
|
@@ -89,7 +89,7 @@ Overlay.propTypes = {
|
|
|
89
89
|
* Animate the entering and exiting of the Overlay. `true` will use the `<Fade>` transition,
|
|
90
90
|
* or a custom react-transition-group `<Transition>` component can be provided.
|
|
91
91
|
*/
|
|
92
|
-
transition: PropTypes.
|
|
92
|
+
transition: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]),
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
OverlayTrigger.propTypes = {
|