@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,3 +1,9 @@
|
|
|
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 { useRef, useEffect } from 'react';
|
|
2
8
|
|
|
3
9
|
/**
|
|
@@ -5,11 +11,9 @@ import { useRef, useEffect } from 'react';
|
|
|
5
11
|
*/
|
|
6
12
|
|
|
7
13
|
function handleEnter(_ref) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
activeElement
|
|
12
|
-
} = _ref;
|
|
14
|
+
var event = _ref.event,
|
|
15
|
+
currentIndex = _ref.currentIndex,
|
|
16
|
+
activeElement = _ref.activeElement;
|
|
13
17
|
if (currentIndex === -1) {
|
|
14
18
|
return;
|
|
15
19
|
}
|
|
@@ -17,18 +21,16 @@ function handleEnter(_ref) {
|
|
|
17
21
|
event.preventDefault();
|
|
18
22
|
}
|
|
19
23
|
function handleArrowKey(_ref2) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
availableElements
|
|
24
|
-
} = _ref2;
|
|
24
|
+
var event = _ref2.event,
|
|
25
|
+
currentIndex = _ref2.currentIndex,
|
|
26
|
+
availableElements = _ref2.availableElements;
|
|
25
27
|
// If the focus isn't in the container, focus on the first thing
|
|
26
28
|
if (currentIndex === -1) {
|
|
27
29
|
availableElements[0].focus();
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
// Move the focus up or down. Wrap around ends of list.
|
|
31
|
-
|
|
33
|
+
var nextElement;
|
|
32
34
|
if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {
|
|
33
35
|
nextElement = availableElements[(currentIndex + 1) % availableElements.length];
|
|
34
36
|
}
|
|
@@ -39,7 +41,8 @@ function handleArrowKey(_ref2) {
|
|
|
39
41
|
nextElement = availableElements[availableElements.length - 1];
|
|
40
42
|
}
|
|
41
43
|
if (event.key === 'Home') {
|
|
42
|
-
|
|
44
|
+
var _availableElements = _slicedToArray(availableElements, 1);
|
|
45
|
+
nextElement = _availableElements[0];
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
// eslint-disable-next-line no-unused-expressions
|
|
@@ -51,24 +54,21 @@ function handleArrowKey(_ref2) {
|
|
|
51
54
|
* Implement arrow key navigation for the given parentNode
|
|
52
55
|
*/
|
|
53
56
|
function handleEvents(_ref3) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
ignoredKeys = [],
|
|
57
|
-
parentNode,
|
|
58
|
-
selectors =
|
|
59
|
-
|
|
57
|
+
var event = _ref3.event,
|
|
58
|
+
_ref3$ignoredKeys = _ref3.ignoredKeys,
|
|
59
|
+
ignoredKeys = _ref3$ignoredKeys === void 0 ? [] : _ref3$ignoredKeys,
|
|
60
|
+
parentNode = _ref3.parentNode,
|
|
61
|
+
_ref3$selectors = _ref3.selectors,
|
|
62
|
+
selectors = _ref3$selectors === void 0 ? 'a,button,input' : _ref3$selectors;
|
|
60
63
|
if (!parentNode) {
|
|
61
64
|
return;
|
|
62
65
|
}
|
|
63
|
-
|
|
64
|
-
key
|
|
65
|
-
} = event;
|
|
66
|
+
var key = event.key;
|
|
66
67
|
if (!['ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft', 'Enter', 'Home', 'End'].includes(key) || ignoredKeys.includes(key)) {
|
|
67
68
|
return;
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
-
activeElement
|
|
71
|
-
} = document;
|
|
70
|
+
var _document = document,
|
|
71
|
+
activeElement = _document.activeElement;
|
|
72
72
|
|
|
73
73
|
// If we're not inside the container, don't do anything
|
|
74
74
|
if (!parentNode.contains(activeElement)) {
|
|
@@ -76,7 +76,7 @@ function handleEvents(_ref3) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
// Get the list of elements we're allowed to scroll through
|
|
79
|
-
|
|
79
|
+
var availableElements = parentNode.querySelectorAll(selectors);
|
|
80
80
|
|
|
81
81
|
// No elements are available to loop through.
|
|
82
82
|
if (!availableElements.length) {
|
|
@@ -84,37 +84,40 @@ function handleEvents(_ref3) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// Which index is currently selected
|
|
87
|
-
|
|
87
|
+
var currentIndex = Array.from(availableElements).findIndex(function (availableElement) {
|
|
88
|
+
return availableElement === activeElement;
|
|
89
|
+
});
|
|
88
90
|
if (key === 'Enter') {
|
|
89
91
|
handleEnter({
|
|
90
|
-
event,
|
|
91
|
-
currentIndex,
|
|
92
|
-
activeElement
|
|
92
|
+
event: event,
|
|
93
|
+
currentIndex: currentIndex,
|
|
94
|
+
activeElement: activeElement
|
|
93
95
|
});
|
|
94
96
|
}
|
|
95
97
|
handleArrowKey({
|
|
96
|
-
event,
|
|
97
|
-
currentIndex,
|
|
98
|
-
availableElements
|
|
98
|
+
event: event,
|
|
99
|
+
currentIndex: currentIndex,
|
|
100
|
+
availableElements: availableElements
|
|
99
101
|
});
|
|
100
102
|
}
|
|
101
103
|
export default function useArrowKeyNavigation(props) {
|
|
102
|
-
|
|
103
|
-
selectors,
|
|
104
|
-
ignoredKeys
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const eventHandler = event => {
|
|
104
|
+
var _ref4 = props || {},
|
|
105
|
+
selectors = _ref4.selectors,
|
|
106
|
+
ignoredKeys = _ref4.ignoredKeys;
|
|
107
|
+
var parentNode = useRef();
|
|
108
|
+
useEffect(function () {
|
|
109
|
+
var eventHandler = function eventHandler(event) {
|
|
109
110
|
handleEvents({
|
|
110
|
-
event,
|
|
111
|
-
ignoredKeys,
|
|
111
|
+
event: event,
|
|
112
|
+
ignoredKeys: ignoredKeys,
|
|
112
113
|
parentNode: parentNode.current,
|
|
113
|
-
selectors
|
|
114
|
+
selectors: selectors
|
|
114
115
|
});
|
|
115
116
|
};
|
|
116
117
|
document.addEventListener('keydown', eventHandler);
|
|
117
|
-
return ()
|
|
118
|
+
return function () {
|
|
119
|
+
return document.removeEventListener('keydown', eventHandler);
|
|
120
|
+
};
|
|
118
121
|
}, [ignoredKeys, selectors]);
|
|
119
122
|
return parentNode;
|
|
120
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useArrowKeyNavigation.js","names":["useRef","useEffect","handleEnter","_ref","event","currentIndex","activeElement","click","preventDefault","handleArrowKey","_ref2","availableElements","focus","nextElement","key","length","handleEvents","_ref3","ignoredKeys","parentNode","selectors","includes","document","contains","querySelectorAll","Array","from","findIndex","availableElement","useArrowKeyNavigation","props","eventHandler","current","addEventListener","removeEventListener"],"sources":["../../src/hooks/useArrowKeyNavigation.jsx"],"sourcesContent":["import { useRef, useEffect } from 'react';\n\n/**\n * A React hook to enable arrow key navigation on a component.\n */\n\nfunction handleEnter({ event, currentIndex, activeElement }) {\n if (currentIndex === -1) { return; }\n activeElement.click();\n event.preventDefault();\n}\n\nfunction handleArrowKey({ event, currentIndex, availableElements }) {\n // If the focus isn't in the container, focus on the first thing\n if (currentIndex === -1) { availableElements[0].focus(); }\n\n // Move the focus up or down. Wrap around ends of list.\n let nextElement;\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n nextElement = availableElements[(currentIndex + 1) % availableElements.length];\n }\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n nextElement = currentIndex - 1 < 0\n ? availableElements[currentIndex - 1 + availableElements.length]\n : availableElements[currentIndex - 1];\n }\n if (event.key === 'End') {\n nextElement = availableElements[availableElements.length - 1];\n }\n if (event.key === 'Home') {\n [nextElement] = availableElements;\n }\n\n // eslint-disable-next-line no-unused-expressions\n nextElement && nextElement.focus();\n event.preventDefault();\n}\n\n/**\n * Implement arrow key navigation for the given parentNode\n */\nfunction handleEvents({\n event,\n ignoredKeys = [],\n parentNode,\n selectors = 'a,button,input',\n}) {\n if (!parentNode) { return; }\n\n const { key } = event;\n\n if (!['ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft', 'Enter', 'Home', 'End'].includes(key)\n || ignoredKeys.includes(key)) {\n return;\n }\n\n const { activeElement } = document;\n\n // If we're not inside the container, don't do anything\n if (!parentNode.contains(activeElement)) { return; }\n\n // Get the list of elements we're allowed to scroll through\n const availableElements = parentNode.querySelectorAll(selectors);\n\n // No elements are available to loop through.\n if (!availableElements.length) { return; }\n\n // Which index is currently selected\n const currentIndex = Array.from(availableElements).findIndex(\n (availableElement) => availableElement === activeElement,\n );\n\n if (key === 'Enter') {\n handleEnter({ event, currentIndex, activeElement });\n }\n handleArrowKey({ event, currentIndex, availableElements });\n}\n\nexport default function useArrowKeyNavigation(props) {\n const { selectors, ignoredKeys } = props || {};\n const parentNode = useRef();\n\n useEffect(() => {\n const eventHandler = (event) => {\n handleEvents({\n event, ignoredKeys, parentNode: parentNode.current, selectors,\n });\n };\n\n document.addEventListener('keydown', eventHandler);\n\n return () => document.removeEventListener('keydown', eventHandler);\n }, [ignoredKeys, selectors]);\n\n return parentNode;\n}\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,SAAS,QAAQ,OAAO;;AAEzC;AACA;AACA;;AAEA,SAASC,WAAWA,CAAAC,IAAA,EAAyC;EAAA,
|
|
1
|
+
{"version":3,"file":"useArrowKeyNavigation.js","names":["useRef","useEffect","handleEnter","_ref","event","currentIndex","activeElement","click","preventDefault","handleArrowKey","_ref2","availableElements","focus","nextElement","key","length","_availableElements","_slicedToArray","handleEvents","_ref3","_ref3$ignoredKeys","ignoredKeys","parentNode","_ref3$selectors","selectors","includes","_document","document","contains","querySelectorAll","Array","from","findIndex","availableElement","useArrowKeyNavigation","props","_ref4","eventHandler","current","addEventListener","removeEventListener"],"sources":["../../src/hooks/useArrowKeyNavigation.jsx"],"sourcesContent":["import { useRef, useEffect } from 'react';\n\n/**\n * A React hook to enable arrow key navigation on a component.\n */\n\nfunction handleEnter({ event, currentIndex, activeElement }) {\n if (currentIndex === -1) { return; }\n activeElement.click();\n event.preventDefault();\n}\n\nfunction handleArrowKey({ event, currentIndex, availableElements }) {\n // If the focus isn't in the container, focus on the first thing\n if (currentIndex === -1) { availableElements[0].focus(); }\n\n // Move the focus up or down. Wrap around ends of list.\n let nextElement;\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n nextElement = availableElements[(currentIndex + 1) % availableElements.length];\n }\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n nextElement = currentIndex - 1 < 0\n ? availableElements[currentIndex - 1 + availableElements.length]\n : availableElements[currentIndex - 1];\n }\n if (event.key === 'End') {\n nextElement = availableElements[availableElements.length - 1];\n }\n if (event.key === 'Home') {\n [nextElement] = availableElements;\n }\n\n // eslint-disable-next-line no-unused-expressions\n nextElement && nextElement.focus();\n event.preventDefault();\n}\n\n/**\n * Implement arrow key navigation for the given parentNode\n */\nfunction handleEvents({\n event,\n ignoredKeys = [],\n parentNode,\n selectors = 'a,button,input',\n}) {\n if (!parentNode) { return; }\n\n const { key } = event;\n\n if (!['ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft', 'Enter', 'Home', 'End'].includes(key)\n || ignoredKeys.includes(key)) {\n return;\n }\n\n const { activeElement } = document;\n\n // If we're not inside the container, don't do anything\n if (!parentNode.contains(activeElement)) { return; }\n\n // Get the list of elements we're allowed to scroll through\n const availableElements = parentNode.querySelectorAll(selectors);\n\n // No elements are available to loop through.\n if (!availableElements.length) { return; }\n\n // Which index is currently selected\n const currentIndex = Array.from(availableElements).findIndex(\n (availableElement) => availableElement === activeElement,\n );\n\n if (key === 'Enter') {\n handleEnter({ event, currentIndex, activeElement });\n }\n handleArrowKey({ event, currentIndex, availableElements });\n}\n\nexport default function useArrowKeyNavigation(props) {\n const { selectors, ignoredKeys } = props || {};\n const parentNode = useRef();\n\n useEffect(() => {\n const eventHandler = (event) => {\n handleEvents({\n event, ignoredKeys, parentNode: parentNode.current, selectors,\n });\n };\n\n document.addEventListener('keydown', eventHandler);\n\n return () => document.removeEventListener('keydown', eventHandler);\n }, [ignoredKeys, selectors]);\n\n return parentNode;\n}\n"],"mappings":"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"}
|
|
@@ -1,5 +1,10 @@
|
|
|
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 { useLayoutEffect, useState } from 'react';
|
|
2
|
-
import useWindowSize from './useWindowSize';
|
|
3
8
|
|
|
4
9
|
/**
|
|
5
10
|
* This hook will find the index of the last child of a containing element
|
|
@@ -9,48 +14,52 @@ import useWindowSize from './useWindowSize';
|
|
|
9
14
|
* @param {Element} containerElementRef - container element
|
|
10
15
|
* @param {Element} overflowElementRef - overflow element
|
|
11
16
|
*
|
|
12
|
-
* The hook returns
|
|
13
|
-
* [indexOfLastVisibleChild, containerElementRef, overflowElementRef]
|
|
14
|
-
*
|
|
15
|
-
* indexOfLastVisibleChild - the index of the last visible child
|
|
16
|
-
* containerElementRef - a ref to be added to the containing html node
|
|
17
|
-
* overflowElementRef - a ref to be added to an html node inside the container
|
|
18
|
-
* that is likely to be used to contain a "More" type dropdown or other
|
|
19
|
-
* mechanism to reveal hidden children. The width of this element is always
|
|
20
|
-
* included when determining which children will fit or not. Usage of this ref
|
|
21
|
-
* is optional.
|
|
17
|
+
* The hook returns the index of the last visible child.
|
|
22
18
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
var useIndexOfLastVisibleChild = function useIndexOfLastVisibleChild(containerElementRef, overflowElementRef) {
|
|
20
|
+
var _useState = useState(-1),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
indexOfLastVisibleChild = _useState2[0],
|
|
23
|
+
setIndexOfLastVisibleChild = _useState2[1];
|
|
24
|
+
useLayoutEffect(function () {
|
|
25
|
+
function updateLastVisibleChildIndex() {
|
|
26
|
+
// Get array of child nodes from NodeList form
|
|
27
|
+
var childNodesArr = Array.prototype.slice.call(containerElementRef.children);
|
|
28
|
+
var _childNodesArr$filter = childNodesArr
|
|
29
|
+
// filter out the overflow element
|
|
30
|
+
.filter(function (childNode) {
|
|
31
|
+
return childNode !== overflowElementRef;
|
|
32
|
+
})
|
|
33
|
+
// sum the widths to find the last visible element's index
|
|
34
|
+
.reduce(function (acc, childNode, index) {
|
|
35
|
+
acc.sumWidth += childNode.getBoundingClientRect().width;
|
|
36
|
+
if (acc.sumWidth <= containerElementRef.getBoundingClientRect().width) {
|
|
37
|
+
acc.nextIndexOfLastVisibleChild = index;
|
|
38
|
+
}
|
|
39
|
+
return acc;
|
|
40
|
+
}, {
|
|
41
|
+
// Include the overflow element's width to begin with. Doing this means
|
|
42
|
+
// sometimes we'll show a dropdown with one item in it when it would fit,
|
|
43
|
+
// but allowing this case dramatically simplifies the calculations we need
|
|
44
|
+
// to do above.
|
|
45
|
+
sumWidth: overflowElementRef ? overflowElementRef.getBoundingClientRect().width : 0,
|
|
46
|
+
nextIndexOfLastVisibleChild: -1
|
|
47
|
+
}),
|
|
48
|
+
nextIndexOfLastVisibleChild = _childNodesArr$filter.nextIndexOfLastVisibleChild;
|
|
49
|
+
setIndexOfLastVisibleChild(nextIndexOfLastVisibleChild);
|
|
50
|
+
}
|
|
51
|
+
if (containerElementRef) {
|
|
52
|
+
updateLastVisibleChildIndex();
|
|
53
|
+
var resizeObserver = new ResizeObserver(function () {
|
|
54
|
+
return updateLastVisibleChildIndex();
|
|
55
|
+
});
|
|
56
|
+
resizeObserver.observe(containerElementRef);
|
|
57
|
+
return function () {
|
|
58
|
+
return resizeObserver.disconnect();
|
|
59
|
+
};
|
|
29
60
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const {
|
|
33
|
-
nextIndexOfLastVisibleChild
|
|
34
|
-
} = childNodesArr
|
|
35
|
-
// filter out the overflow element
|
|
36
|
-
.filter(childNode => childNode !== overflowElementRef)
|
|
37
|
-
// sum the widths to find the last visible element's index
|
|
38
|
-
.reduce((acc, childNode, index) => {
|
|
39
|
-
acc.sumWidth += childNode.getBoundingClientRect().width;
|
|
40
|
-
if (acc.sumWidth <= containerElementRef.getBoundingClientRect().width) {
|
|
41
|
-
acc.nextIndexOfLastVisibleChild = index;
|
|
42
|
-
}
|
|
43
|
-
return acc;
|
|
44
|
-
}, {
|
|
45
|
-
// Include the overflow element's width to begin with. Doing this means
|
|
46
|
-
// sometimes we'll show a dropdown with one item in it when it would fit,
|
|
47
|
-
// but allowing this case dramatically simplifies the calculations we need
|
|
48
|
-
// to do above.
|
|
49
|
-
sumWidth: overflowElementRef ? overflowElementRef.getBoundingClientRect().width : 0,
|
|
50
|
-
nextIndexOfLastVisibleChild: -1
|
|
51
|
-
});
|
|
52
|
-
setIndexOfLastVisibleChild(nextIndexOfLastVisibleChild);
|
|
53
|
-
}, [windowSize, containerElementRef, overflowElementRef]);
|
|
61
|
+
return undefined;
|
|
62
|
+
}, [containerElementRef, overflowElementRef]);
|
|
54
63
|
return indexOfLastVisibleChild;
|
|
55
64
|
};
|
|
56
65
|
export default useIndexOfLastVisibleChild;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIndexOfLastVisibleChild.js","names":["useLayoutEffect","useState","
|
|
1
|
+
{"version":3,"file":"useIndexOfLastVisibleChild.js","names":["useLayoutEffect","useState","useIndexOfLastVisibleChild","containerElementRef","overflowElementRef","_useState","_useState2","_slicedToArray","indexOfLastVisibleChild","setIndexOfLastVisibleChild","updateLastVisibleChildIndex","childNodesArr","Array","prototype","slice","call","children","_childNodesArr$filter","filter","childNode","reduce","acc","index","sumWidth","getBoundingClientRect","width","nextIndexOfLastVisibleChild","resizeObserver","ResizeObserver","observe","disconnect","undefined"],"sources":["../../src/hooks/useIndexOfLastVisibleChild.jsx"],"sourcesContent":["import { useLayoutEffect, useState } from 'react';\n\n/**\n * This hook will find the index of the last child of a containing element\n * that fits within its bounding rectangle. This is done by summing the widths\n * of the children until they exceed the width of the container.\n *\n * @param {Element} containerElementRef - container element\n * @param {Element} overflowElementRef - overflow element\n *\n * The hook returns the index of the last visible child.\n */\nconst useIndexOfLastVisibleChild = (containerElementRef, overflowElementRef) => {\n const [indexOfLastVisibleChild, setIndexOfLastVisibleChild] = useState(-1);\n\n useLayoutEffect(() => {\n function updateLastVisibleChildIndex() {\n // Get array of child nodes from NodeList form\n const childNodesArr = Array.prototype.slice.call(containerElementRef.children);\n const { nextIndexOfLastVisibleChild } = childNodesArr\n // filter out the overflow element\n .filter(childNode => childNode !== overflowElementRef)\n // sum the widths to find the last visible element's index\n .reduce((acc, childNode, index) => {\n acc.sumWidth += childNode.getBoundingClientRect().width;\n if (acc.sumWidth <= containerElementRef.getBoundingClientRect().width) {\n acc.nextIndexOfLastVisibleChild = index;\n }\n return acc;\n }, {\n // Include the overflow element's width to begin with. Doing this means\n // sometimes we'll show a dropdown with one item in it when it would fit,\n // but allowing this case dramatically simplifies the calculations we need\n // to do above.\n sumWidth: overflowElementRef ? overflowElementRef.getBoundingClientRect().width : 0,\n nextIndexOfLastVisibleChild: -1,\n });\n\n setIndexOfLastVisibleChild(nextIndexOfLastVisibleChild);\n }\n\n if (containerElementRef) {\n updateLastVisibleChildIndex();\n\n const resizeObserver = new ResizeObserver(() => updateLastVisibleChildIndex());\n resizeObserver.observe(containerElementRef);\n\n return () => resizeObserver.disconnect();\n }\n\n return undefined;\n }, [containerElementRef, overflowElementRef]);\n\n return indexOfLastVisibleChild;\n};\n\nexport default useIndexOfLastVisibleChild;\n"],"mappings":";;;;;;AAAA,SAASA,eAAe,EAAEC,QAAQ,QAAQ,OAAO;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAAIC,mBAAmB,EAAEC,kBAAkB,EAAK;EAC9E,IAAAC,SAAA,GAA8DJ,QAAQ,CAAC,CAAC,CAAC,CAAC;IAAAK,UAAA,GAAAC,cAAA,CAAAF,SAAA;IAAnEG,uBAAuB,GAAAF,UAAA;IAAEG,0BAA0B,GAAAH,UAAA;EAE1DN,eAAe,CAAC,YAAM;IACpB,SAASU,2BAA2BA,CAAA,EAAG;MACrC;MACA,IAAMC,aAAa,GAAGC,KAAK,CAACC,SAAS,CAACC,KAAK,CAACC,IAAI,CAACZ,mBAAmB,CAACa,QAAQ,CAAC;MAC9E,IAAAC,qBAAA,GAAwCN;QACtC;QAAA,CACCO,MAAM,CAAC,UAAAC,SAAS;UAAA,OAAIA,SAAS,KAAKf,kBAAkB;QAAA;QACrD;QAAA,CACCgB,MAAM,CAAC,UAACC,GAAG,EAAEF,SAAS,EAAEG,KAAK,EAAK;UACjCD,GAAG,CAACE,QAAQ,IAAIJ,SAAS,CAACK,qBAAqB,CAAC,CAAC,CAACC,KAAK;UACvD,IAAIJ,GAAG,CAACE,QAAQ,IAAIpB,mBAAmB,CAACqB,qBAAqB,CAAC,CAAC,CAACC,KAAK,EAAE;YACrEJ,GAAG,CAACK,2BAA2B,GAAGJ,KAAK;UACzC;UACA,OAAOD,GAAG;QACZ,CAAC,EAAE;UACD;UACA;UACA;UACA;UACAE,QAAQ,EAAEnB,kBAAkB,GAAGA,kBAAkB,CAACoB,qBAAqB,CAAC,CAAC,CAACC,KAAK,GAAG,CAAC;UACnFC,2BAA2B,EAAE,CAAC;QAChC,CAAC,CAAC;QAjBIA,2BAA2B,GAAAT,qBAAA,CAA3BS,2BAA2B;MAmBnCjB,0BAA0B,CAACiB,2BAA2B,CAAC;IACzD;IAEA,IAAIvB,mBAAmB,EAAE;MACvBO,2BAA2B,CAAC,CAAC;MAE7B,IAAMiB,cAAc,GAAG,IAAIC,cAAc,CAAC;QAAA,OAAMlB,2BAA2B,CAAC,CAAC;MAAA,EAAC;MAC9EiB,cAAc,CAACE,OAAO,CAAC1B,mBAAmB,CAAC;MAE3C,OAAO;QAAA,OAAMwB,cAAc,CAACG,UAAU,CAAC,CAAC;MAAA;IAC1C;IAEA,OAAOC,SAAS;EAClB,CAAC,EAAE,CAAC5B,mBAAmB,EAAEC,kBAAkB,CAAC,CAAC;EAE7C,OAAOI,uBAAuB;AAChC,CAAC;AAED,eAAeN,0BAA0B"}
|
|
@@ -1,33 +1,40 @@
|
|
|
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 { useRef, useState, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
var useIsVisible = function useIsVisible() {
|
|
9
|
+
var defaultIsVisible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
10
|
+
var sentinelRef = useRef();
|
|
11
|
+
var _useState = useState(defaultIsVisible),
|
|
12
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13
|
+
isVisible = _useState2[0],
|
|
14
|
+
setIsVisible = _useState2[1];
|
|
15
|
+
useEffect(function () {
|
|
7
16
|
try {
|
|
8
17
|
if (sentinelRef.current) {
|
|
9
|
-
|
|
10
|
-
entries.forEach(_ref
|
|
11
|
-
|
|
12
|
-
isIntersecting
|
|
13
|
-
} = _ref;
|
|
18
|
+
var observer = new IntersectionObserver(function (entries) {
|
|
19
|
+
entries.forEach(function (_ref) {
|
|
20
|
+
var isIntersecting = _ref.isIntersecting;
|
|
14
21
|
setIsVisible(isIntersecting);
|
|
15
22
|
});
|
|
16
23
|
}, {});
|
|
17
24
|
observer.observe(sentinelRef.current);
|
|
18
|
-
return ()
|
|
25
|
+
return function () {
|
|
19
26
|
observer.disconnect();
|
|
20
27
|
};
|
|
21
28
|
}
|
|
22
29
|
} catch (e) {
|
|
23
|
-
|
|
30
|
+
var isReferenceError = e instanceof ReferenceError;
|
|
24
31
|
if (!isReferenceError) {
|
|
25
32
|
throw e;
|
|
26
33
|
}
|
|
27
34
|
// Do nothing if an intersection observer can't be created.
|
|
28
35
|
}
|
|
29
36
|
|
|
30
|
-
return ()
|
|
37
|
+
return function () {};
|
|
31
38
|
}, []);
|
|
32
39
|
return [isVisible, sentinelRef];
|
|
33
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsVisible.js","names":["useRef","useState","useEffect","useIsVisible","defaultIsVisible","arguments","length","undefined","sentinelRef","isVisible","setIsVisible","current","observer","IntersectionObserver","entries","forEach","_ref","isIntersecting","observe","disconnect","e","isReferenceError","ReferenceError"],"sources":["../../src/hooks/useIsVisible.jsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'react';\n\nconst useIsVisible = (defaultIsVisible = true) => {\n const sentinelRef = useRef();\n const [isVisible, setIsVisible] = useState(defaultIsVisible);\n\n useEffect(() => {\n try {\n if (sentinelRef.current) {\n const observer = new IntersectionObserver((entries) => {\n entries.forEach(({ isIntersecting }) => {\n setIsVisible(isIntersecting);\n });\n }, {});\n observer.observe(sentinelRef.current);\n return () => {\n observer.disconnect();\n };\n }\n } catch (e) {\n const isReferenceError = e instanceof ReferenceError;\n if (!isReferenceError) {\n throw e;\n }\n // Do nothing if an intersection observer can't be created.\n }\n return () => {};\n }, []);\n\n return [isVisible, sentinelRef];\n};\n\nexport default useIsVisible;\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAEnD,
|
|
1
|
+
{"version":3,"file":"useIsVisible.js","names":["useRef","useState","useEffect","useIsVisible","defaultIsVisible","arguments","length","undefined","sentinelRef","_useState","_useState2","_slicedToArray","isVisible","setIsVisible","current","observer","IntersectionObserver","entries","forEach","_ref","isIntersecting","observe","disconnect","e","isReferenceError","ReferenceError"],"sources":["../../src/hooks/useIsVisible.jsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'react';\n\nconst useIsVisible = (defaultIsVisible = true) => {\n const sentinelRef = useRef();\n const [isVisible, setIsVisible] = useState(defaultIsVisible);\n\n useEffect(() => {\n try {\n if (sentinelRef.current) {\n const observer = new IntersectionObserver((entries) => {\n entries.forEach(({ isIntersecting }) => {\n setIsVisible(isIntersecting);\n });\n }, {});\n observer.observe(sentinelRef.current);\n return () => {\n observer.disconnect();\n };\n }\n } catch (e) {\n const isReferenceError = e instanceof ReferenceError;\n if (!isReferenceError) {\n throw e;\n }\n // Do nothing if an intersection observer can't be created.\n }\n return () => {};\n }, []);\n\n return [isVisible, sentinelRef];\n};\n\nexport default useIsVisible;\n"],"mappings":";;;;;;AAAA,SAASA,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAEnD,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAA,EAAgC;EAAA,IAA5BC,gBAAgB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAC3C,IAAMG,WAAW,GAAGR,MAAM,CAAC,CAAC;EAC5B,IAAAS,SAAA,GAAkCR,QAAQ,CAACG,gBAAgB,CAAC;IAAAM,UAAA,GAAAC,cAAA,CAAAF,SAAA;IAArDG,SAAS,GAAAF,UAAA;IAAEG,YAAY,GAAAH,UAAA;EAE9BR,SAAS,CAAC,YAAM;IACd,IAAI;MACF,IAAIM,WAAW,CAACM,OAAO,EAAE;QACvB,IAAMC,QAAQ,GAAG,IAAIC,oBAAoB,CAAC,UAACC,OAAO,EAAK;UACrDA,OAAO,CAACC,OAAO,CAAC,UAAAC,IAAA,EAAwB;YAAA,IAArBC,cAAc,GAAAD,IAAA,CAAdC,cAAc;YAC/BP,YAAY,CAACO,cAAc,CAAC;UAC9B,CAAC,CAAC;QACJ,CAAC,EAAE,CAAC,CAAC,CAAC;QACNL,QAAQ,CAACM,OAAO,CAACb,WAAW,CAACM,OAAO,CAAC;QACrC,OAAO,YAAM;UACXC,QAAQ,CAACO,UAAU,CAAC,CAAC;QACvB,CAAC;MACH;IACF,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,IAAMC,gBAAgB,GAAGD,CAAC,YAAYE,cAAc;MACpD,IAAI,CAACD,gBAAgB,EAAE;QACrB,MAAMD,CAAC;MACT;MACA;IACF;;IACA,OAAO,YAAM,CAAC,CAAC;EACjB,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO,CAACX,SAAS,EAAEJ,WAAW,CAAC;AACjC,CAAC;AAED,eAAeL,YAAY"}
|
package/dist/hooks/useToggle.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
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 { useState, useCallback } from 'react';
|
|
2
8
|
export default function useToggle(defaultIsOn) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
var handlers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10
|
+
var handleToggleOn = handlers.handleToggleOn,
|
|
11
|
+
handleToggleOff = handlers.handleToggleOff,
|
|
12
|
+
handleToggle = handlers.handleToggle;
|
|
13
|
+
var _useState = useState(defaultIsOn || false),
|
|
14
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15
|
+
isOn = _useState2[0],
|
|
16
|
+
setIsOn = _useState2[1];
|
|
17
|
+
var setOn = useCallback(function () {
|
|
11
18
|
setIsOn(true);
|
|
12
19
|
// istanbul ignore else
|
|
13
20
|
if (handleToggleOn) {
|
|
@@ -18,7 +25,7 @@ export default function useToggle(defaultIsOn) {
|
|
|
18
25
|
handleToggle(true);
|
|
19
26
|
}
|
|
20
27
|
}, [handleToggleOn, handleToggle]);
|
|
21
|
-
|
|
28
|
+
var setOff = useCallback(function () {
|
|
22
29
|
setIsOn(false);
|
|
23
30
|
// istanbul ignore else
|
|
24
31
|
if (handleToggleOff) {
|
|
@@ -29,8 +36,8 @@ export default function useToggle(defaultIsOn) {
|
|
|
29
36
|
handleToggle(false);
|
|
30
37
|
}
|
|
31
38
|
}, [handleToggleOff, handleToggle]);
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
var toggle = useCallback(function () {
|
|
40
|
+
var doToggle = isOn ? setOff : setOn;
|
|
34
41
|
doToggle();
|
|
35
42
|
}, [isOn, setOn, setOff]);
|
|
36
43
|
return [isOn, setOn, setOff, toggle];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToggle.js","names":["useState","useCallback","useToggle","defaultIsOn","handlers","arguments","length","undefined","handleToggleOn","handleToggleOff","handleToggle","isOn","setIsOn","setOn","setOff","toggle","doToggle"],"sources":["../../src/hooks/useToggle.jsx"],"sourcesContent":["import { useState, useCallback } from 'react';\n\nexport default function useToggle(defaultIsOn, handlers = {}) {\n const { handleToggleOn, handleToggleOff, handleToggle } = handlers;\n const [isOn, setIsOn] = useState(defaultIsOn || false);\n\n const setOn = useCallback(() => {\n setIsOn(true);\n // istanbul ignore else\n if (handleToggleOn) {\n handleToggleOn();\n }\n // istanbul ignore else\n if (handleToggle) {\n handleToggle(true);\n }\n }, [handleToggleOn, handleToggle]);\n\n const setOff = useCallback(() => {\n setIsOn(false);\n // istanbul ignore else\n if (handleToggleOff) {\n handleToggleOff();\n }\n // istanbul ignore else\n if (handleToggle) {\n handleToggle(false);\n }\n }, [handleToggleOff, handleToggle]);\n\n const toggle = useCallback(() => {\n const doToggle = isOn ? setOff : setOn;\n doToggle();\n }, [isOn, setOn, setOff]);\n\n return [isOn, setOn, setOff, toggle];\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAE7C,eAAe,SAASC,SAASA,CAACC,WAAW,EAAiB;EAAA,IAAfC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAC1D,
|
|
1
|
+
{"version":3,"file":"useToggle.js","names":["useState","useCallback","useToggle","defaultIsOn","handlers","arguments","length","undefined","handleToggleOn","handleToggleOff","handleToggle","_useState","_useState2","_slicedToArray","isOn","setIsOn","setOn","setOff","toggle","doToggle"],"sources":["../../src/hooks/useToggle.jsx"],"sourcesContent":["import { useState, useCallback } from 'react';\n\nexport default function useToggle(defaultIsOn, handlers = {}) {\n const { handleToggleOn, handleToggleOff, handleToggle } = handlers;\n const [isOn, setIsOn] = useState(defaultIsOn || false);\n\n const setOn = useCallback(() => {\n setIsOn(true);\n // istanbul ignore else\n if (handleToggleOn) {\n handleToggleOn();\n }\n // istanbul ignore else\n if (handleToggle) {\n handleToggle(true);\n }\n }, [handleToggleOn, handleToggle]);\n\n const setOff = useCallback(() => {\n setIsOn(false);\n // istanbul ignore else\n if (handleToggleOff) {\n handleToggleOff();\n }\n // istanbul ignore else\n if (handleToggle) {\n handleToggle(false);\n }\n }, [handleToggleOff, handleToggle]);\n\n const toggle = useCallback(() => {\n const doToggle = isOn ? setOff : setOn;\n doToggle();\n }, [isOn, setOn, setOff]);\n\n return [isOn, setOn, setOff, toggle];\n}\n"],"mappings":";;;;;;AAAA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAE7C,eAAe,SAASC,SAASA,CAACC,WAAW,EAAiB;EAAA,IAAfC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAC1D,IAAQG,cAAc,GAAoCJ,QAAQ,CAA1DI,cAAc;IAAEC,eAAe,GAAmBL,QAAQ,CAA1CK,eAAe;IAAEC,YAAY,GAAKN,QAAQ,CAAzBM,YAAY;EACrD,IAAAC,SAAA,GAAwBX,QAAQ,CAACG,WAAW,IAAI,KAAK,CAAC;IAAAS,UAAA,GAAAC,cAAA,CAAAF,SAAA;IAA/CG,IAAI,GAAAF,UAAA;IAAEG,OAAO,GAAAH,UAAA;EAEpB,IAAMI,KAAK,GAAGf,WAAW,CAAC,YAAM;IAC9Bc,OAAO,CAAC,IAAI,CAAC;IACb;IACA,IAAIP,cAAc,EAAE;MAClBA,cAAc,CAAC,CAAC;IAClB;IACA;IACA,IAAIE,YAAY,EAAE;MAChBA,YAAY,CAAC,IAAI,CAAC;IACpB;EACF,CAAC,EAAE,CAACF,cAAc,EAAEE,YAAY,CAAC,CAAC;EAElC,IAAMO,MAAM,GAAGhB,WAAW,CAAC,YAAM;IAC/Bc,OAAO,CAAC,KAAK,CAAC;IACd;IACA,IAAIN,eAAe,EAAE;MACnBA,eAAe,CAAC,CAAC;IACnB;IACA;IACA,IAAIC,YAAY,EAAE;MAChBA,YAAY,CAAC,KAAK,CAAC;IACrB;EACF,CAAC,EAAE,CAACD,eAAe,EAAEC,YAAY,CAAC,CAAC;EAEnC,IAAMQ,MAAM,GAAGjB,WAAW,CAAC,YAAM;IAC/B,IAAMkB,QAAQ,GAAGL,IAAI,GAAGG,MAAM,GAAGD,KAAK;IACtCG,QAAQ,CAAC,CAAC;EACZ,CAAC,EAAE,CAACL,IAAI,EAAEE,KAAK,EAAEC,MAAM,CAAC,CAAC;EAEzB,OAAO,CAACH,IAAI,EAAEE,KAAK,EAAEC,MAAM,EAAEC,MAAM,CAAC;AACtC"}
|
|
@@ -1,12 +1,21 @@
|
|
|
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 { useState, useLayoutEffect } from 'react';
|
|
2
8
|
function useWindowSize() {
|
|
3
9
|
// Initialize state with undefined width/height so server and client renders match
|
|
4
10
|
// Learn more here: https://joshwcomeau.com/react/the-perils-of-rehydration/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
var _useState = useState({
|
|
12
|
+
width: undefined,
|
|
13
|
+
height: undefined
|
|
14
|
+
}),
|
|
15
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
16
|
+
windowSize = _useState2[0],
|
|
17
|
+
setWindowSize = _useState2[1];
|
|
18
|
+
useLayoutEffect(function () {
|
|
10
19
|
// Handler to call on window resize
|
|
11
20
|
function handleResize() {
|
|
12
21
|
// Set window width/height to state
|
|
@@ -23,7 +32,9 @@ function useWindowSize() {
|
|
|
23
32
|
handleResize();
|
|
24
33
|
|
|
25
34
|
// Remove event listener on cleanup
|
|
26
|
-
return ()
|
|
35
|
+
return function () {
|
|
36
|
+
return global.removeEventListener('resize', handleResize);
|
|
37
|
+
};
|
|
27
38
|
}, []); // Empty array ensures that effect is only run on mount
|
|
28
39
|
|
|
29
40
|
return windowSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWindowSize.js","names":["useState","useLayoutEffect","useWindowSize","
|
|
1
|
+
{"version":3,"file":"useWindowSize.js","names":["useState","useLayoutEffect","useWindowSize","_useState","width","undefined","height","_useState2","_slicedToArray","windowSize","setWindowSize","handleResize","global","innerWidth","innerHeight","addEventListener","removeEventListener"],"sources":["../../src/hooks/useWindowSize.jsx"],"sourcesContent":["import { useState, useLayoutEffect } from 'react';\n\nfunction useWindowSize() {\n // Initialize state with undefined width/height so server and client renders match\n // Learn more here: https://joshwcomeau.com/react/the-perils-of-rehydration/\n const [windowSize, setWindowSize] = useState({\n width: undefined,\n height: undefined,\n });\n\n useLayoutEffect(() => {\n // Handler to call on window resize\n function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: global.innerWidth,\n height: global.innerHeight,\n });\n }\n\n // Add event listener\n global.addEventListener('resize', handleResize);\n\n // Call handler right away so state gets updated with initial window size\n handleResize();\n\n // Remove event listener on cleanup\n return () => global.removeEventListener('resize', handleResize);\n }, []); // Empty array ensures that effect is only run on mount\n\n return windowSize;\n}\n\nexport default useWindowSize;\n"],"mappings":";;;;;;AAAA,SAASA,QAAQ,EAAEC,eAAe,QAAQ,OAAO;AAEjD,SAASC,aAAaA,CAAA,EAAG;EACvB;EACA;EACA,IAAAC,SAAA,GAAoCH,QAAQ,CAAC;MAC3CI,KAAK,EAAEC,SAAS;MAChBC,MAAM,EAAED;IACV,CAAC,CAAC;IAAAE,UAAA,GAAAC,cAAA,CAAAL,SAAA;IAHKM,UAAU,GAAAF,UAAA;IAAEG,aAAa,GAAAH,UAAA;EAKhCN,eAAe,CAAC,YAAM;IACpB;IACA,SAASU,YAAYA,CAAA,EAAG;MACtB;MACAD,aAAa,CAAC;QACZN,KAAK,EAAEQ,MAAM,CAACC,UAAU;QACxBP,MAAM,EAAEM,MAAM,CAACE;MACjB,CAAC,CAAC;IACJ;;IAEA;IACAF,MAAM,CAACG,gBAAgB,CAAC,QAAQ,EAAEJ,YAAY,CAAC;;IAE/C;IACAA,YAAY,CAAC,CAAC;;IAEd;IACA,OAAO;MAAA,OAAMC,MAAM,CAACI,mBAAmB,CAAC,QAAQ,EAAEL,YAAY,CAAC;IAAA;EACjE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;;EAER,OAAOF,UAAU;AACnB;AAEA,eAAeP,aAAa"}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "إغلاق قائمة الخيارات",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "فتح قائمة الخيارات",
|
|
30
30
|
"pgn.Toast.closeLabel": "إغلاق ",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "Close the options menu",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "Open the options menu",
|
|
30
30
|
"pgn.Toast.closeLabel": "Close",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "Cerrar el menú de opciones",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "Abre el menú de opciones",
|
|
30
30
|
"pgn.Toast.closeLabel": "Cerrar",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "Cerrar el menú de opciones",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "Abre el menú de opciones",
|
|
30
30
|
"pgn.Toast.closeLabel": "Cerrar",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "Cerrar el menú de opciones",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "Abre el menú de opciones",
|
|
30
30
|
"pgn.Toast.closeLabel": "Cerrar",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "Close the options menu",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "Open the options menu",
|
|
30
30
|
"pgn.Toast.closeLabel": "Close",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "Close the options menu",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "Open the options menu",
|
|
30
30
|
"pgn.Toast.closeLabel": "Close",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "Close the options menu",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "Open the options menu",
|
|
30
30
|
"pgn.Toast.closeLabel": "Close",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "Close the options menu",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "Open the options menu",
|
|
30
30
|
"pgn.Toast.closeLabel": "Chiudi",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"pgn.FormAutosuggest.iconButtonClosed": "Close the options menu",
|
|
29
29
|
"pgn.FormAutosuggest.iconButtonOpened": "Open the options menu",
|
|
30
30
|
"pgn.Toast.closeLabel": "Close",
|
|
31
|
-
"pgn.ProductTour.Checkpoint.position-text": "Top of step {step}"
|
|
31
|
+
"pgn.ProductTour.Checkpoint.top-position-text": "Top of step {step}",
|
|
32
|
+
"pgn.ProductTour.Checkpoint.bottom-position-text": "Bottom of step {step}"
|
|
32
33
|
}
|