@geotab/zenith 1.22.0-beta.ssr.0 → 1.22.0
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/absolute/absolute.js +6 -11
- package/dist/accordion/accordion.js +0 -5
- package/dist/banner/banner.js +0 -5
- package/dist/betaPill/betaPill.js +1 -6
- package/dist/calendar/calendar.js +4 -6
- package/dist/chart/barChart/getDefaultDatasetStyle.d.ts +1 -1
- package/dist/chart/barChart.js +3 -2
- package/dist/chart/lineChart/getDefaultDatasetStyle.d.ts +1 -1
- package/dist/chart/lineChart/useChartTicks.js +2 -2
- package/dist/chart/lineChart.js +3 -2
- package/dist/chart/pieChart.js +3 -2
- package/dist/chart/plugins/legend/legendPlugin.js +1 -3
- package/dist/chart/plugins/tooltip/renderTooltip.js +8 -20
- package/dist/chart/plugins/tooltip/tooltipPlugin.js +1 -3
- package/dist/combobox/comboboxNavigation.js +2 -5
- package/dist/commonHelpers/arrowNavigation/hooks/useHoldOnScroll.js +1 -1
- package/dist/commonHelpers/arrowNavigation/hooks/useScrollWhileHolding.js +1 -1
- package/dist/commonHelpers/hooks/useDeviceType.d.ts +1 -1
- package/dist/commonHelpers/hooks/useDeviceType.js +2 -3
- package/dist/commonHelpers/hooks/useKeydown.js +2 -5
- package/dist/commonHelpers/hooks/useMobile.js +1 -1
- package/dist/commonHelpers/hooks/useResize.js +2 -2
- package/dist/commonHelpers/hooks/useResizeObserver.js +4 -8
- package/dist/commonHelpers/hooks/useScroll.js +1 -4
- package/dist/commonHelpers/hooks/useTrapFocus.js +8 -13
- package/dist/commonHelpers/utils.js +2 -2
- package/dist/dataGrid/withFlexibleColumns/flexibleColumnsReorder.js +11 -16
- package/dist/dataGrid/withFlexibleColumns/flexibleColumnsResizer.js +8 -10
- package/dist/dateInput/dateInput.js +2 -1
- package/dist/dialog/dialog.js +8 -23
- package/dist/dialog/dialogHelpers.js +2 -4
- package/dist/dropdown/dropdown.js +15 -47
- package/dist/dropdownOld/dropdownOld.js +1 -1
- package/dist/feedbackContainer/feedbackContainer.js +3 -9
- package/dist/feedbackContainer/hooks/useFeedbackAlert.js +1 -1
- package/dist/feedbackContainer/hooks/useFeedbackToast.js +1 -1
- package/dist/feedbackProvider/utils/getDefaultProviderMode.js +2 -2
- package/dist/filtersBar/components/filtersBarDropdown/filtersBarDropdown.js +5 -4
- package/dist/filtersBar/components/filtersBarGroupButton/filtersBarGroupButton.js +2 -2
- package/dist/filtersBar/components/filtersBarGroupsFilter/filtersBarGroupsFilter.js +2 -2
- package/dist/filtersBar/components/filtersBarPeriodPicker/filtersBarPeriodPicker.js +3 -2
- package/dist/filtersBar/components/filtersBarRange/filtersBarRange.js +2 -2
- package/dist/filtersBar/components/filtersBarSearch/filtersBarSearch.js +3 -3
- package/dist/filtersBar/filtersBar.js +0 -5
- package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelCheckboxGroup/filtersBarSidePanelCheckboxGroup.js +2 -1
- package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRadioGroup/filtersBarSidePanelRadioGroup.js +2 -2
- package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.d.ts +1 -1
- package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +3 -6
- package/dist/filtersBar/filtersContainer/filtersContainer.js +7 -7
- package/dist/gridLayout/hooks/useTablet.js +1 -1
- package/dist/header/header.js +3 -8
- package/dist/header/headerHelpers.js +2 -4
- package/dist/icons/deprecated/iconActivity.js +2 -1
- package/dist/icons/deprecated/iconArchive.js +2 -1
- package/dist/icons/deprecated/iconArrowBottom.js +2 -1
- package/dist/icons/deprecated/iconArrowDown.js +2 -1
- package/dist/icons/deprecated/iconArrowTop.js +2 -1
- package/dist/icons/deprecated/iconAssetInactive.js +2 -1
- package/dist/icons/deprecated/iconBackArrow.js +2 -1
- package/dist/icons/deprecated/iconBookmark.js +2 -1
- package/dist/icons/deprecated/iconBookmarkFill.js +2 -1
- package/dist/icons/deprecated/iconCalendar.js +2 -1
- package/dist/icons/deprecated/iconCheckmark.js +2 -1
- package/dist/icons/deprecated/iconChevronDownSmall.js +2 -1
- package/dist/icons/deprecated/iconChevronLeftSmall.js +2 -1
- package/dist/icons/deprecated/iconChevronRightSmall.js +2 -1
- package/dist/icons/deprecated/iconCircleOk.js +2 -1
- package/dist/icons/deprecated/iconCogSettings.js +2 -1
- package/dist/icons/deprecated/iconConditions.js +2 -1
- package/dist/icons/deprecated/iconCrossThin.js +2 -1
- package/dist/icons/deprecated/iconDelete.js +2 -1
- package/dist/icons/deprecated/iconDownload.js +2 -1
- package/dist/icons/deprecated/iconDragAndDrop.js +2 -1
- package/dist/icons/deprecated/iconEdit.js +2 -1
- package/dist/icons/deprecated/iconError.js +2 -1
- package/dist/icons/deprecated/iconErrorNew.js +2 -1
- package/dist/icons/deprecated/iconExclude.js +2 -1
- package/dist/icons/deprecated/iconFilterOutline.js +2 -1
- package/dist/icons/deprecated/iconFlatFilledArrowDown.js +2 -1
- package/dist/icons/deprecated/iconFolderNew.js +2 -1
- package/dist/icons/deprecated/iconFullscreen.js +2 -1
- package/dist/icons/deprecated/iconGlobe.js +2 -1
- package/dist/icons/deprecated/iconHouse.js +2 -1
- package/dist/icons/deprecated/iconInfoCircleTooltip.js +2 -1
- package/dist/icons/deprecated/iconInfoCircled.js +2 -1
- package/dist/icons/deprecated/iconLeftBracketLg.js +2 -1
- package/dist/icons/deprecated/iconLocation.js +2 -1
- package/dist/icons/deprecated/iconLocationPin.js +2 -1
- package/dist/icons/deprecated/iconLoupe.js +2 -1
- package/dist/icons/deprecated/iconLvlUp.js +2 -1
- package/dist/icons/deprecated/iconMap.js +2 -1
- package/dist/icons/deprecated/iconMinusIcon.js +2 -1
- package/dist/icons/deprecated/iconNarrowArrowRight.js +2 -1
- package/dist/icons/deprecated/iconNotificationBell.js +2 -1
- package/dist/icons/deprecated/iconOptionsIcon.js +2 -1
- package/dist/icons/deprecated/iconOrgFilter.js +2 -1
- package/dist/icons/deprecated/iconPlus.js +2 -1
- package/dist/icons/deprecated/iconRefresh.js +2 -1
- package/dist/icons/deprecated/iconReportError.js +2 -1
- package/dist/icons/deprecated/iconRightArrow.js +2 -1
- package/dist/icons/deprecated/iconSelectArrow.js +2 -1
- package/dist/icons/deprecated/iconSettings6SliderThree.js +2 -1
- package/dist/icons/deprecated/iconShrink.js +2 -1
- package/dist/icons/deprecated/iconSortAsc.js +2 -1
- package/dist/icons/deprecated/iconSortDec.js +2 -1
- package/dist/icons/deprecated/iconSpinner.js +2 -1
- package/dist/icons/deprecated/iconStatusNoComm.js +2 -1
- package/dist/icons/deprecated/iconSuccessNew.js +2 -1
- package/dist/icons/deprecated/iconTick.js +2 -1
- package/dist/icons/deprecated/iconVerticalEllipsis.js +2 -1
- package/dist/icons/deprecated/iconWarningNew.js +2 -1
- package/dist/icons/iconActivity.js +2 -1
- package/dist/icons/iconAddPeople.js +2 -1
- package/dist/icons/iconAddPeople2.js +2 -1
- package/dist/icons/iconAiImages.js +2 -1
- package/dist/icons/iconAiSparkles.js +2 -1
- package/dist/icons/iconAiSparkles2.js +2 -1
- package/dist/icons/iconAirplay.js +2 -1
- package/dist/icons/iconAirpods.js +2 -1
- package/dist/icons/iconAlignBottom.js +2 -1
- package/dist/icons/iconAlignLeft.js +2 -1
- package/dist/icons/iconAlignRightBox.js +2 -1
- package/dist/icons/iconAlignTopBox.js +2 -1
- package/dist/icons/iconAlignmentCenter.js +2 -1
- package/dist/icons/iconAlignmentJustify.js +2 -1
- package/dist/icons/iconAlignmentLeft.js +2 -1
- package/dist/icons/iconAlignmentRight.js +2 -1
- package/dist/icons/iconAnchor.js +2 -1
- package/dist/icons/iconAnchor2.js +2 -1
- package/dist/icons/iconArchive.js +2 -1
- package/dist/icons/iconArchive2.js +2 -1
- package/dist/icons/iconArrowBottom.js +2 -1
- package/dist/icons/iconArrowBottomCircle.js +2 -1
- package/dist/icons/iconArrowBottomLeft.js +2 -1
- package/dist/icons/iconArrowBottomRight.js +2 -1
- package/dist/icons/iconArrowDownPath.js +2 -1
- package/dist/icons/iconArrowLeft.js +2 -1
- package/dist/icons/iconArrowLeftCircle.js +2 -1
- package/dist/icons/iconArrowLeftPath.js +2 -1
- package/dist/icons/iconArrowRight.js +2 -1
- package/dist/icons/iconArrowRightCircle.js +2 -1
- package/dist/icons/iconArrowRightPath.js +2 -1
- package/dist/icons/iconArrowTop.js +2 -1
- package/dist/icons/iconArrowTopCircle.js +2 -1
- package/dist/icons/iconArrowTopLeft.js +2 -1
- package/dist/icons/iconArrowTopRight.js +2 -1
- package/dist/icons/iconArrowUpPath.js +2 -1
- package/dist/icons/iconAt.js +2 -1
- package/dist/icons/iconAttachment.js +2 -1
- package/dist/icons/iconAttachment2.js +2 -1
- package/dist/icons/iconAttachmentFile.js +2 -1
- package/dist/icons/iconAudio.js +2 -1
- package/dist/icons/iconAutoSize.js +2 -1
- package/dist/icons/iconBackward.js +2 -1
- package/dist/icons/iconBadge.js +2 -1
- package/dist/icons/iconBag.js +2 -1
- package/dist/icons/iconBag2.js +2 -1
- package/dist/icons/iconBagLuggage.js +2 -1
- package/dist/icons/iconBagLuggage2.js +2 -1
- package/dist/icons/iconBasket.js +2 -1
- package/dist/icons/iconBasket2.js +2 -1
- package/dist/icons/iconBatteryError.js +2 -1
- package/dist/icons/iconBatteryFull.js +2 -1
- package/dist/icons/iconBatteryLoading.js +2 -1
- package/dist/icons/iconBatteryLow.js +2 -1
- package/dist/icons/iconBatteryLow2.js +2 -1
- package/dist/icons/iconBatteryMedium.js +2 -1
- package/dist/icons/iconBell.js +2 -1
- package/dist/icons/iconBeta.js +2 -1
- package/dist/icons/iconBitcoin.js +2 -1
- package/dist/icons/iconBluetooth.js +2 -1
- package/dist/icons/iconBold.js +2 -1
- package/dist/icons/iconBook.js +2 -1
- package/dist/icons/iconBook2.js +2 -1
- package/dist/icons/iconBookmark.js +2 -1
- package/dist/icons/iconBookmarkCheck.js +2 -1
- package/dist/icons/iconBookmarkDelete.js +2 -1
- package/dist/icons/iconBookmarkFill.js +2 -1
- package/dist/icons/iconBookmarkPlus.js +2 -1
- package/dist/icons/iconBookmarkSelectedHover.js +2 -1
- package/dist/icons/iconBranches.js +2 -1
- package/dist/icons/iconBrokenLink.js +2 -1
- package/dist/icons/iconBrowser.js +2 -1
- package/dist/icons/iconBrush.js +2 -1
- package/dist/icons/iconBubble.js +2 -1
- package/dist/icons/iconBubble2.js +2 -1
- package/dist/icons/iconBubble3.js +2 -1
- package/dist/icons/iconBubble4.js +2 -1
- package/dist/icons/iconBubble5.js +2 -1
- package/dist/icons/iconBubble6.js +2 -1
- package/dist/icons/iconBubbleAnnotation.js +2 -1
- package/dist/icons/iconBubbleAnnotation2.js +2 -1
- package/dist/icons/iconBubbleAnnotation4.js +2 -1
- package/dist/icons/iconBubbleAnnotation5.js +2 -1
- package/dist/icons/iconBubbleAnnotation6.js +2 -1
- package/dist/icons/iconBubbleNotification.js +2 -1
- package/dist/icons/iconBubbles.js +2 -1
- package/dist/icons/iconBucket.js +2 -1
- package/dist/icons/iconBuilding.js +2 -1
- package/dist/icons/iconBulkSelect.js +2 -1
- package/dist/icons/iconBulletList.js +2 -1
- package/dist/icons/iconBusiness.js +2 -1
- package/dist/icons/iconCalculator.js +2 -1
- package/dist/icons/iconCalendar.js +2 -1
- package/dist/icons/iconCalendar2.js +2 -1
- package/dist/icons/iconCamera.js +2 -1
- package/dist/icons/iconCamera2.js +2 -1
- package/dist/icons/iconCamera3.js +2 -1
- package/dist/icons/iconCameraAction.js +2 -1
- package/dist/icons/iconCanBus.js +2 -1
- package/dist/icons/iconChart.js +2 -1
- package/dist/icons/iconChart2.js +2 -1
- package/dist/icons/iconChart3.js +2 -1
- package/dist/icons/iconChart4.js +2 -1
- package/dist/icons/iconChart5.js +2 -1
- package/dist/icons/iconChart6.js +2 -1
- package/dist/icons/iconChart7.js +2 -1
- package/dist/icons/iconChart8.js +2 -1
- package/dist/icons/iconCheck.js +2 -1
- package/dist/icons/iconCheckRadio.js +2 -1
- package/dist/icons/iconCheckbox.js +2 -1
- package/dist/icons/iconChevronBottom.js +2 -1
- package/dist/icons/iconChevronDoubleDown.js +2 -1
- package/dist/icons/iconChevronDoubleLeft.js +2 -1
- package/dist/icons/iconChevronDoubleRight.js +2 -1
- package/dist/icons/iconChevronDoubleUp.js +2 -1
- package/dist/icons/iconChevronDownSmall.js +2 -1
- package/dist/icons/iconChevronGrabberHorizontal.js +2 -1
- package/dist/icons/iconChevronGrabberVertical.js +2 -1
- package/dist/icons/iconChevronLeft.js +2 -1
- package/dist/icons/iconChevronLeftSmall.js +2 -1
- package/dist/icons/iconChevronRight.js +2 -1
- package/dist/icons/iconChevronRightSmall.js +2 -1
- package/dist/icons/iconChevronTop.js +2 -1
- package/dist/icons/iconChevronTopSmall.js +2 -1
- package/dist/icons/iconChromecast.js +2 -1
- package/dist/icons/iconCircle.js +2 -1
- package/dist/icons/iconClipboard.js +2 -1
- package/dist/icons/iconClipboard2.js +2 -1
- package/dist/icons/iconClock.js +2 -1
- package/dist/icons/iconClock2.js +2 -1
- package/dist/icons/iconClockSnooze.js +2 -1
- package/dist/icons/iconClockTimer.js +2 -1
- package/dist/icons/iconClose.js +2 -1
- package/dist/icons/iconCloseCircle.js +2 -1
- package/dist/icons/iconCloseSquare.js +2 -1
- package/dist/icons/iconCloud.js +2 -1
- package/dist/icons/iconCloud2.js +2 -1
- package/dist/icons/iconCloudCheck.js +2 -1
- package/dist/icons/iconCloudDownload.js +2 -1
- package/dist/icons/iconCloudLines.js +2 -1
- package/dist/icons/iconCloudOff.js +2 -1
- package/dist/icons/iconCloudOff2.js +2 -1
- package/dist/icons/iconCloudQuestion.js +2 -1
- package/dist/icons/iconCloudSync.js +2 -1
- package/dist/icons/iconCloudUpload.js +2 -1
- package/dist/icons/iconCmd.js +2 -1
- package/dist/icons/iconCmd2.js +2 -1
- package/dist/icons/iconCode.js +2 -1
- package/dist/icons/iconCode2.js +2 -1
- package/dist/icons/iconColor.js +2 -1
- package/dist/icons/iconColorPicker.js +2 -1
- package/dist/icons/iconCommunity.js +2 -1
- package/dist/icons/iconCompass.js +2 -1
- package/dist/icons/iconConnectDevices.js +2 -1
- package/dist/icons/iconConsole.js +2 -1
- package/dist/icons/iconConstruction.js +2 -1
- package/dist/icons/iconCopy.js +2 -1
- package/dist/icons/iconCopy2.js +2 -1
- package/dist/icons/iconCopy3.js +2 -1
- package/dist/icons/iconCopy4.js +2 -1
- package/dist/icons/iconCopy5.js +2 -1
- package/dist/icons/iconCornerDownLeft.js +2 -1
- package/dist/icons/iconCornerDownRight.js +2 -1
- package/dist/icons/iconCornerLeftDown.js +2 -1
- package/dist/icons/iconCornerLeftUp.js +2 -1
- package/dist/icons/iconCornerRightDown.js +2 -1
- package/dist/icons/iconCornerRightUp.js +2 -1
- package/dist/icons/iconCornerUpLeft.js +2 -1
- package/dist/icons/iconCornerUpRight.js +2 -1
- package/dist/icons/iconCornerUpRight2.js +2 -1
- package/dist/icons/iconCreditCard.js +2 -1
- package/dist/icons/iconCreditCard2.js +2 -1
- package/dist/icons/iconCreditCard3.js +2 -1
- package/dist/icons/iconCrop.js +2 -1
- package/dist/icons/iconCrypto.js +2 -1
- package/dist/icons/iconCryptoCoin.js +2 -1
- package/dist/icons/iconCup.js +2 -1
- package/dist/icons/iconCursor.js +2 -1
- package/dist/icons/iconCursor2.js +2 -1
- package/dist/icons/iconCursor3.js +2 -1
- package/dist/icons/iconCursorBox.js +2 -1
- package/dist/icons/iconCursorClick.js +2 -1
- package/dist/icons/iconCycle.js +2 -1
- package/dist/icons/iconDelete.js +2 -1
- package/dist/icons/iconDelete2.js +2 -1
- package/dist/icons/iconDelete3.js +2 -1
- package/dist/icons/iconDeviceUptime.js +2 -1
- package/dist/icons/iconDeviceUptimeDisconnected.js +2 -1
- package/dist/icons/iconDiamondWarning.js +2 -1
- package/dist/icons/iconDisk.js +2 -1
- package/dist/icons/iconDisk2.js +2 -1
- package/dist/icons/iconDispatchAsset.js +2 -1
- package/dist/icons/iconDock.js +2 -1
- package/dist/icons/iconDocument.js +2 -1
- package/dist/icons/iconDocumentWithLines.js +2 -1
- package/dist/icons/iconDollar.js +2 -1
- package/dist/icons/iconDotGrid.js +2 -1
- package/dist/icons/iconDotHorizontal.js +2 -1
- package/dist/icons/iconDotVertical.js +2 -1
- package/dist/icons/iconDownload.js +2 -1
- package/dist/icons/iconDrive.js +2 -1
- package/dist/icons/iconDriver.js +2 -1
- package/dist/icons/iconDvir.js +2 -1
- package/dist/icons/iconEdit.js +2 -1
- package/dist/icons/iconEdit2.js +2 -1
- package/dist/icons/iconEditBig.js +2 -1
- package/dist/icons/iconEditSmall.js +2 -1
- package/dist/icons/iconEmail.js +2 -1
- package/dist/icons/iconEmail2.js +2 -1
- package/dist/icons/iconEmailNotification.js +2 -1
- package/dist/icons/iconEsc.js +2 -1
- package/dist/icons/iconEthereum.js +2 -1
- package/dist/icons/iconEuro.js +2 -1
- package/dist/icons/iconEvse.js +2 -1
- package/dist/icons/iconExcel.js +2 -1
- package/dist/icons/iconException.js +2 -1
- package/dist/icons/iconExpand.js +2 -1
- package/dist/icons/iconEye.js +2 -1
- package/dist/icons/iconEyeOff.js +2 -1
- package/dist/icons/iconFaceId.js +2 -1
- package/dist/icons/iconFile.js +2 -1
- package/dist/icons/iconFileCopy.js +2 -1
- package/dist/icons/iconFileLocked.js +2 -1
- package/dist/icons/iconFileSync.js +2 -1
- package/dist/icons/iconFileSync2.js +2 -1
- package/dist/icons/iconFileSync3.js +2 -1
- package/dist/icons/iconFileSync4.js +2 -1
- package/dist/icons/iconFileSync5.js +2 -1
- package/dist/icons/iconFilter.js +2 -1
- package/dist/icons/iconFilter2.js +2 -1
- package/dist/icons/iconFilter3.js +2 -1
- package/dist/icons/iconFilter3Asc.js +2 -1
- package/dist/icons/iconFilter3Desc.js +2 -1
- package/dist/icons/iconFilterAsc.js +2 -1
- package/dist/icons/iconFilterDesc.js +2 -1
- package/dist/icons/iconFingerPrint.js +2 -1
- package/dist/icons/iconFocus.js +2 -1
- package/dist/icons/iconFolder.js +2 -1
- package/dist/icons/iconFolder2.js +2 -1
- package/dist/icons/iconFolderAdd.js +2 -1
- package/dist/icons/iconFolderBookmarks.js +2 -1
- package/dist/icons/iconFolderCloud.js +2 -1
- package/dist/icons/iconFolderCloud2.js +2 -1
- package/dist/icons/iconFolderDelete.js +2 -1
- package/dist/icons/iconFolderDownload.js +2 -1
- package/dist/icons/iconFolderRestricted.js +2 -1
- package/dist/icons/iconFolderShared.js +2 -1
- package/dist/icons/iconFolderUpload.js +2 -1
- package/dist/icons/iconFolders.js +2 -1
- package/dist/icons/iconFork.js +2 -1
- package/dist/icons/iconFuelGas.js +2 -1
- package/dist/icons/iconGamepad.js +2 -1
- package/dist/icons/iconGeotabDrive.js +2 -1
- package/dist/icons/iconGeotabSales.js +2 -1
- package/dist/icons/iconGift.js +2 -1
- package/dist/icons/iconGlobus.js +2 -1
- package/dist/icons/iconGrab.js +2 -1
- package/dist/icons/iconGraph.js +2 -1
- package/dist/icons/iconGraphChart.js +2 -1
- package/dist/icons/iconGraphLines.js +2 -1
- package/dist/icons/iconGraphPresentation.js +2 -1
- package/dist/icons/iconGraphStatistics.js +2 -1
- package/dist/icons/iconGrids.js +2 -1
- package/dist/icons/iconGrids2.js +2 -1
- package/dist/icons/iconHarness.js +2 -1
- package/dist/icons/iconHeadphones.js +2 -1
- package/dist/icons/iconHeart.js +2 -1
- package/dist/icons/iconHexonalWarning.js +2 -1
- package/dist/icons/iconHistory.js +2 -1
- package/dist/icons/iconHomeDoor.js +2 -1
- package/dist/icons/iconHomeDoor2.js +2 -1
- package/dist/icons/iconHomeRoof.js +2 -1
- package/dist/icons/iconHomeSimple.js +2 -1
- package/dist/icons/iconHourglass.js +2 -1
- package/dist/icons/iconITS.js +2 -1
- package/dist/icons/iconIcon.js +2 -1
- package/dist/icons/iconImac.js +2 -1
- package/dist/icons/iconImac2.js +2 -1
- package/dist/icons/iconImage.js +2 -1
- package/dist/icons/iconImages.js +2 -1
- package/dist/icons/iconImages2.js +2 -1
- package/dist/icons/iconInbox.js +2 -1
- package/dist/icons/iconInbox2.js +2 -1
- package/dist/icons/iconInfoCircle.js +2 -1
- package/dist/icons/iconInfoSquare.js +2 -1
- package/dist/icons/iconInspect.js +2 -1
- package/dist/icons/iconItalic.js +2 -1
- package/dist/icons/iconKeyboard.js +2 -1
- package/dist/icons/iconKeyboardDown.js +2 -1
- package/dist/icons/iconKeyboardUp.js +2 -1
- package/dist/icons/iconKeyboardUp2.js +2 -1
- package/dist/icons/iconLab.js +2 -1
- package/dist/icons/iconLaptop.js +2 -1
- package/dist/icons/iconLayers.js +2 -1
- package/dist/icons/iconLayout.js +2 -1
- package/dist/icons/iconLayoutBottom.js +2 -1
- package/dist/icons/iconLayoutColumn.js +2 -1
- package/dist/icons/iconLayoutLeft.js +2 -1
- package/dist/icons/iconLayoutRight.js +2 -1
- package/dist/icons/iconLayoutSearch.js +2 -1
- package/dist/icons/iconLayoutSidebar.js +2 -1
- package/dist/icons/iconLayoutTop.js +2 -1
- package/dist/icons/iconLayoutTopbar.js +2 -1
- package/dist/icons/iconLayoutWindow.js +2 -1
- package/dist/icons/iconLayoutWindow2.js +2 -1
- package/dist/icons/iconLayoutWindow3.js +2 -1
- package/dist/icons/iconLayoutWindow4.js +2 -1
- package/dist/icons/iconLayoutWindow5.js +2 -1
- package/dist/icons/iconLeaf.js +2 -1
- package/dist/icons/iconLifeBuoy.js +2 -1
- package/dist/icons/iconLightBulb.js +2 -1
- package/dist/icons/iconLightning.js +2 -1
- package/dist/icons/iconLink.js +2 -1
- package/dist/icons/iconLink2.js +2 -1
- package/dist/icons/iconLink3.js +2 -1
- package/dist/icons/iconLinkLines.js +2 -1
- package/dist/icons/iconList.js +2 -1
- package/dist/icons/iconLoader.js +2 -1
- package/dist/icons/iconLocationCompass.js +2 -1
- package/dist/icons/iconLocationMap.js +2 -1
- package/dist/icons/iconLocationOff.js +2 -1
- package/dist/icons/iconLock.js +2 -1
- package/dist/icons/iconLogin.js +2 -1
- package/dist/icons/iconLogout.js +2 -1
- package/dist/icons/iconLowDataQuality.js +2 -1
- package/dist/icons/iconMacbook.js +2 -1
- package/dist/icons/iconMagic.js +2 -1
- package/dist/icons/iconMagic2.js +2 -1
- package/dist/icons/iconMagicEyes.js +2 -1
- package/dist/icons/iconMap.js +2 -1
- package/dist/icons/iconMarketplace.js +2 -1
- package/dist/icons/iconMedal.js +2 -1
- package/dist/icons/iconMemory.js +2 -1
- package/dist/icons/iconMemory2.js +2 -1
- package/dist/icons/iconMenu.js +2 -1
- package/dist/icons/iconMenu2.js +2 -1
- package/dist/icons/iconMenu3.js +2 -1
- package/dist/icons/iconMenuCircle.js +2 -1
- package/dist/icons/iconMenuCircle2.js +2 -1
- package/dist/icons/iconMicrophone.js +2 -1
- package/dist/icons/iconMicrophone2.js +2 -1
- package/dist/icons/iconMinimize.js +2 -1
- package/dist/icons/iconMinus.js +2 -1
- package/dist/icons/iconMinusCircle.js +2 -1
- package/dist/icons/iconMinusSquare.js +2 -1
- package/dist/icons/iconMobi.js +2 -1
- package/dist/icons/iconMoney.js +2 -1
- package/dist/icons/iconMoon.js +2 -1
- package/dist/icons/iconMouse.js +2 -1
- package/dist/icons/iconMouseScrollDown.js +2 -1
- package/dist/icons/iconMouseScrollUp.js +2 -1
- package/dist/icons/iconMove.js +2 -1
- package/dist/icons/iconMove2.js +2 -1
- package/dist/icons/iconMyAdmin.js +2 -1
- package/dist/icons/iconMyGeotab.js +2 -1
- package/dist/icons/iconNews.js +2 -1
- package/dist/icons/iconNewspaper.js +2 -1
- package/dist/icons/iconNote.js +2 -1
- package/dist/icons/iconNotificationAlarm.js +2 -1
- package/dist/icons/iconNotificationBell.js +2 -1
- package/dist/icons/iconNotificationOff.js +2 -1
- package/dist/icons/iconNotifications.js +2 -1
- package/dist/icons/iconNumberedList.js +2 -1
- package/dist/icons/iconOnDuty.js +2 -1
- package/dist/icons/iconOpen.js +2 -1
- package/dist/icons/iconOpen2.js +2 -1
- package/dist/icons/iconOpt.js +2 -1
- package/dist/icons/iconOptAlt.js +2 -1
- package/dist/icons/iconPDF.js +2 -1
- package/dist/icons/iconPackage.js +2 -1
- package/dist/icons/iconPackage2.js +2 -1
- package/dist/icons/iconPackage3.js +2 -1
- package/dist/icons/iconPaperPlane.js +2 -1
- package/dist/icons/iconPassword.js +2 -1
- package/dist/icons/iconPause.js +2 -1
- package/dist/icons/iconPencil.js +2 -1
- package/dist/icons/iconPencil2.js +2 -1
- package/dist/icons/iconPeople.js +2 -1
- package/dist/icons/iconPeopleGroup.js +2 -1
- package/dist/icons/iconPeopleGroup2.js +2 -1
- package/dist/icons/iconPeopleLike.js +2 -1
- package/dist/icons/iconPercent.js +2 -1
- package/dist/icons/iconPerformance.js +2 -1
- package/dist/icons/iconPhone.js +2 -1
- package/dist/icons/iconPhoneMobile.js +2 -1
- package/dist/icons/iconPin.js +2 -1
- package/dist/icons/iconPin2.js +2 -1
- package/dist/icons/iconPinLocation.js +2 -1
- package/dist/icons/iconPinLocation2.js +2 -1
- package/dist/icons/iconPinLocation3.js +2 -1
- package/dist/icons/iconPlay.js +2 -1
- package/dist/icons/iconPlus.js +2 -1
- package/dist/icons/iconPlusCircle.js +2 -1
- package/dist/icons/iconPlusFile.js +2 -1
- package/dist/icons/iconPlusLines.js +2 -1
- package/dist/icons/iconPlusSquare.js +2 -1
- package/dist/icons/iconPound.js +2 -1
- package/dist/icons/iconPrinter.js +2 -1
- package/dist/icons/iconProcessor.js +2 -1
- package/dist/icons/iconPullRequest.js +2 -1
- package/dist/icons/iconPuzzle.js +2 -1
- package/dist/icons/iconQuestion.js +2 -1
- package/dist/icons/iconRadar.js +2 -1
- package/dist/icons/iconReceipt.js +2 -1
- package/dist/icons/iconRecord.js +2 -1
- package/dist/icons/iconRedo.js +2 -1
- package/dist/icons/iconRedo2.js +2 -1
- package/dist/icons/iconRefrigeration.js +2 -1
- package/dist/icons/iconRemovePeople.js +2 -1
- package/dist/icons/iconRepeat.js +2 -1
- package/dist/icons/iconRepeat2.js +2 -1
- package/dist/icons/iconResizeBig.js +2 -1
- package/dist/icons/iconResizeSmall.js +2 -1
- package/dist/icons/iconRotateClockwise.js +2 -1
- package/dist/icons/iconRotateCounterclockwise.js +2 -1
- package/dist/icons/iconRotateRepeat.js +2 -1
- package/dist/icons/iconRotateRepeat2.js +2 -1
- package/dist/icons/iconRoute.js +2 -1
- package/dist/icons/iconRuler.js +2 -1
- package/dist/icons/iconSdCard.js +2 -1
- package/dist/icons/iconSearch.js +2 -1
- package/dist/icons/iconSearchDocument.js +2 -1
- package/dist/icons/iconSearchLines.js +2 -1
- package/dist/icons/iconSearchPage.js +2 -1
- package/dist/icons/iconSeatbelt.js +2 -1
- package/dist/icons/iconSecured.js +2 -1
- package/dist/icons/iconSecuredLines.js +2 -1
- package/dist/icons/iconSend.js +2 -1
- package/dist/icons/iconServer.js +2 -1
- package/dist/icons/iconServer2.js +2 -1
- package/dist/icons/iconServer3.js +2 -1
- package/dist/icons/iconSettings1.js +2 -1
- package/dist/icons/iconSettings2.js +2 -1
- package/dist/icons/iconSettings3.js +2 -1
- package/dist/icons/iconSettings4.js +2 -1
- package/dist/icons/iconSettings6.js +2 -1
- package/dist/icons/iconSettings7.js +2 -1
- package/dist/icons/iconSettings8.js +2 -1
- package/dist/icons/iconShare.js +2 -1
- package/dist/icons/iconShare2.js +2 -1
- package/dist/icons/iconShare3.js +2 -1
- package/dist/icons/iconShield.js +2 -1
- package/dist/icons/iconShield2.js +2 -1
- package/dist/icons/iconShield3.js +2 -1
- package/dist/icons/iconShield4.js +2 -1
- package/dist/icons/iconSidebar.js +2 -1
- package/dist/icons/iconSign.js +2 -1
- package/dist/icons/iconSmiley.js +2 -1
- package/dist/icons/iconSort2Horizontal.js +2 -1
- package/dist/icons/iconSort2Vertical.js +2 -1
- package/dist/icons/iconSortHorizontal.js +2 -1
- package/dist/icons/iconSortVertical.js +2 -1
- package/dist/icons/iconSpeaker.js +2 -1
- package/dist/icons/iconSquare.js +2 -1
- package/dist/icons/iconStar.js +2 -1
- package/dist/icons/iconStarAi.js +2 -1
- package/dist/icons/iconStopwatch.js +2 -1
- package/dist/icons/iconStorage.js +2 -1
- package/dist/icons/iconStore.js +2 -1
- package/dist/icons/iconStrikeThrough.js +2 -1
- package/dist/icons/iconSun.js +2 -1
- package/dist/icons/iconSupport.js +2 -1
- package/dist/icons/iconTable.js +2 -1
- package/dist/icons/iconTachograph.js +2 -1
- package/dist/icons/iconTachographTimeCard.js +2 -1
- package/dist/icons/iconTarget.js +2 -1
- package/dist/icons/iconTarget2.js +2 -1
- package/dist/icons/iconTarget3.js +2 -1
- package/dist/icons/iconTelevision.js +2 -1
- package/dist/icons/iconTelevision2.js +2 -1
- package/dist/icons/iconTextSize.js +2 -1
- package/dist/icons/iconThermograph.js +2 -1
- package/dist/icons/iconThermometer.js +2 -1
- package/dist/icons/iconThumbsDown.js +2 -1
- package/dist/icons/iconThumbsUp.js +2 -1
- package/dist/icons/iconTrailer.js +2 -1
- package/dist/icons/iconUmbrella.js +2 -1
- package/dist/icons/iconUnderline.js +2 -1
- package/dist/icons/iconUndo.js +2 -1
- package/dist/icons/iconUndo2.js +2 -1
- package/dist/icons/iconUndock.js +2 -1
- package/dist/icons/iconUnlocked.js +2 -1
- package/dist/icons/iconUpload.js +2 -1
- package/dist/icons/iconUsb.js +2 -1
- package/dist/icons/iconUsbHub.js +2 -1
- package/dist/icons/iconVideo.js +2 -1
- package/dist/icons/iconVideo2.js +2 -1
- package/dist/icons/iconVideoReplay.js +2 -1
- package/dist/icons/iconVisitPage.js +2 -1
- package/dist/icons/iconVoice.js +2 -1
- package/dist/icons/iconVolumeDown.js +2 -1
- package/dist/icons/iconVolumeFull.js +2 -1
- package/dist/icons/iconVolumeHalf.js +2 -1
- package/dist/icons/iconVolumeMinimum.js +2 -1
- package/dist/icons/iconVolumeOf.js +2 -1
- package/dist/icons/iconVolumeOff.js +2 -1
- package/dist/icons/iconVolumeOn.js +2 -1
- package/dist/icons/iconWallet.js +2 -1
- package/dist/icons/iconWallet1.js +2 -1
- package/dist/icons/iconWarning.js +2 -1
- package/dist/icons/iconWatch.js +2 -1
- package/dist/icons/iconWatch2.js +2 -1
- package/dist/icons/iconWebcam.js +2 -1
- package/dist/icons/iconWhisper.js +2 -1
- package/dist/icons/iconWifi.js +2 -1
- package/dist/icons/iconWifi2.js +2 -1
- package/dist/icons/iconWorkday.js +2 -1
- package/dist/icons/iconWorld.js +2 -1
- package/dist/icons/iconWrench.js +2 -1
- package/dist/icons/iconWrite.js +2 -1
- package/dist/icons/iconYen.js +2 -1
- package/dist/icons/iconZone.js +2 -1
- package/dist/icons/iconZoom.js +2 -1
- package/dist/icons/iconZoom2.js +2 -1
- package/dist/images/imageNothingFound.js +2 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +4 -6
- package/dist/layout/layout.js +7 -22
- package/dist/layout/layoutFullScreen.js +2 -1
- package/dist/lineChart/plugins/htmlLegend.js +6 -9
- package/dist/lineChart/utils.d.ts +1 -1
- package/dist/menu/controlledMenu.js +1 -9
- package/dist/mobileSheet/mobileSheet.js +4 -11
- package/dist/modal/modal.js +13 -19
- package/dist/pillAction/pillAction.js +2 -2
- package/dist/selectList/selectList.js +1 -3
- package/dist/selectRaw/select.helpers.js +2 -3
- package/dist/selectRaw/selectRaw.js +1 -3
- package/dist/sidePanel/sidePanel.js +22 -35
- package/dist/svgIcon/svgIcon.js +2 -2
- package/dist/table/flexible/useFlexibleColumns.js +1 -2
- package/dist/table/flexible/useSettingsStorage.js +1 -3
- package/dist/table/sortable/sortableStorage.js +1 -10
- package/dist/table/table.d.ts +1 -1
- package/dist/table/table.js +0 -5
- package/dist/tabs/tabs.js +10 -11
- package/dist/toolbar/helpers/getWidthWithMargin.js +1 -1
- package/dist/toolbar/helpers/getWidthWithoutPadding.js +1 -1
- package/dist/tooltip/tooltip.js +7 -19
- package/dist/utils/getParentWithHiddenOverflow.js +1 -1
- package/dist/utils/getRelativeParent.js +1 -1
- package/dist/utils/localization/getSupportedLanguage.d.ts +1 -1
- package/dist/utils/localization/getSupportedLanguage.js +1 -1
- package/dist/utils/localization/languageContext.d.ts +1 -1
- package/dist/utils/localization/useLanguage.js +1 -3
- package/dist/utils/positioningUtils/adjustParentRect.js +2 -2
- package/dist/utils/positioningUtils/calculatePosition.js +7 -11
- package/dist/utils/positioningUtils/isChildPopup.js +1 -3
- package/dist/utils/topWindow/topWindowContext.d.ts +1 -1
- package/dist/utils/topWindow/topWindowProvider.d.ts +1 -1
- package/dist/utils/useBodyScroll.js +2 -6
- package/dist/waiting/waiting.js +2 -2
- package/package.json +2 -2
- package/dist/commonHelpers/hooks/useClientReady.d.ts +0 -1
- package/dist/commonHelpers/hooks/useClientReady.js +0 -15
- package/dist/commonHelpers/hooks/usePortal.d.ts +0 -2
- package/dist/commonHelpers/hooks/usePortal.js +0 -18
- package/dist/commonHelpers/isDomEnv.d.ts +0 -1
- package/dist/commonHelpers/isDomEnv.js +0 -11
- package/dist/icons/iconStarFilled.d.ts +0 -4
- package/dist/icons/iconStarFilled.js +0 -17
- package/dist/utils/localization/translations/ko-KR-json.d.ts +0 -228
- package/dist/utils/localization/translations/ko-KR-json.js +0 -231
|
@@ -33,14 +33,12 @@ const Absolute = ({ isOpen, id, paddingX, paddingY, className, children, trigger
|
|
|
33
33
|
}, [role, ariaLabelledby, ariaLabel]);
|
|
34
34
|
const darkClassName = dark ? "zen-dark" : "";
|
|
35
35
|
const renderPopup = () => {
|
|
36
|
-
var _a, _b;
|
|
37
36
|
if (isOpen) {
|
|
38
37
|
const result = (0, jsx_runtime_1.jsx)("div", Object.assign({}, accessableAttr, { ref: popupRef, id: id, onScroll: shouldHoldScroll ? onScrollHandler : undefined, className: (0, classNames_1.classNames)(["zen-absolute", darkClassName, className || ""]), children: children }));
|
|
39
38
|
if (inline) {
|
|
40
39
|
return result;
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
return (0, react_dom_1.createPortal)(result, ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.fullscreenElement) || ((_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _b === void 0 ? void 0 : _b.body));
|
|
41
|
+
return (0, react_dom_1.createPortal)(result, document.fullscreenElement || document.body);
|
|
44
42
|
}
|
|
45
43
|
return "";
|
|
46
44
|
};
|
|
@@ -71,7 +69,7 @@ const Absolute = ({ isOpen, id, paddingX, paddingY, className, children, trigger
|
|
|
71
69
|
(0, useEscape_1.useEscape)(popupRef, handleEscape, isOpen);
|
|
72
70
|
(0, useArrowKey_1.useArrowKey)(popupRef, handleEscape, isOpen);
|
|
73
71
|
(0, react_1.useEffect)(() => {
|
|
74
|
-
var _a, _b
|
|
72
|
+
var _a, _b;
|
|
75
73
|
const closeOnClickOutside = (e) => {
|
|
76
74
|
if (!popupRef.current) {
|
|
77
75
|
return;
|
|
@@ -87,21 +85,18 @@ const Absolute = ({ isOpen, id, paddingX, paddingY, className, children, trigger
|
|
|
87
85
|
onOpenChange(false);
|
|
88
86
|
};
|
|
89
87
|
if (isOpen) {
|
|
90
|
-
|
|
91
|
-
(_a =
|
|
92
|
-
const firstFocusable = (_b = popupRef.current) === null || _b === void 0 ? void 0 : _b.querySelector(focusableSelector_1.FOCUSABLE_SELECTOR);
|
|
88
|
+
document.body.addEventListener("click", closeOnClickOutside, true);
|
|
89
|
+
const firstFocusable = (_a = popupRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(focusableSelector_1.FOCUSABLE_SELECTOR);
|
|
93
90
|
if (useTrapFocusWithTrigger !== "withTrigger") {
|
|
94
91
|
if (firstFocusable) {
|
|
95
92
|
firstFocusable.focus();
|
|
96
93
|
}
|
|
97
94
|
else {
|
|
98
|
-
(
|
|
95
|
+
(_b = popupRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
99
96
|
}
|
|
100
97
|
}
|
|
101
98
|
return () => {
|
|
102
|
-
|
|
103
|
-
// eslint-disable-next-line
|
|
104
|
-
(_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body.removeEventListener("click", closeOnClickOutside, true);
|
|
99
|
+
document.body.removeEventListener("click", closeOnClickOutside, true);
|
|
105
100
|
};
|
|
106
101
|
}
|
|
107
102
|
return () => { };
|
|
@@ -5,13 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const accordionItem_1 = require("./accordionItem/accordionItem");
|
|
7
7
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
8
|
-
const useClientReady_1 = require("../commonHelpers/hooks/useClientReady");
|
|
9
8
|
const Accordion = ({ data = [], className = "", activeIds = [], onItemClick }) => {
|
|
10
9
|
const fullClassName = (0, classNames_1.classNames)(["zen-accordion", className]);
|
|
11
|
-
const isClientReady = (0, useClientReady_1.useClientReady)();
|
|
12
|
-
if (!isClientReady) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
10
|
return (0, jsx_runtime_1.jsx)("div", { className: fullClassName, children: data.map((item) => (0, react_1.createElement)(accordionItem_1.AccordionItem, Object.assign({}, item, { key: item.id, isActive: activeIds.indexOf(item.id) !== -1, onClick: () => onItemClick && onItemClick(item.id) }))) });
|
|
16
11
|
};
|
|
17
12
|
exports.Accordion = Accordion;
|
package/dist/banner/banner.js
CHANGED
|
@@ -5,14 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const bannerSingleLine_1 = require("./bannerSingleLine");
|
|
6
6
|
const bannerMultipLine_1 = require("./bannerMultipLine");
|
|
7
7
|
const useMobile_1 = require("../commonHelpers/hooks/useMobile");
|
|
8
|
-
const useClientReady_1 = require("../commonHelpers/hooks/useClientReady");
|
|
9
8
|
const Banner = ({ children, header, type = "warning", icon, action, size, onClose, multiline, role = "status", ariaAtomic = "true", ariaLive = "polite", className }) => {
|
|
10
9
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
11
10
|
const isMultiline = multiline === undefined ? isMobile : multiline;
|
|
12
|
-
const isClientReady = (0, useClientReady_1.useClientReady)();
|
|
13
|
-
if (!isClientReady) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
11
|
return isMultiline ? (0, jsx_runtime_1.jsx)(bannerMultipLine_1.BannerMultiline, { children,
|
|
17
12
|
header,
|
|
18
13
|
type,
|
|
@@ -10,7 +10,6 @@ const pill_1 = require("../pill/pill");
|
|
|
10
10
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
11
11
|
const pillExpandable_1 = require("../pillExpandable/pillExpandable");
|
|
12
12
|
const betaPillContext_1 = require("./betaPillContext");
|
|
13
|
-
const useClientReady_1 = require("../commonHelpers/hooks/useClientReady");
|
|
14
13
|
const BetaPill = ({ className, feedbackAction, betaOptionAction }) => {
|
|
15
14
|
const { translate } = (0, useLanguage_1.useLanguage)();
|
|
16
15
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
@@ -20,18 +19,14 @@ const BetaPill = ({ className, feedbackAction, betaOptionAction }) => {
|
|
|
20
19
|
isMobile ? "zen-beta-pill--mobile" : "",
|
|
21
20
|
className !== null && className !== void 0 ? className : ""
|
|
22
21
|
]), [isMobile, className]);
|
|
23
|
-
const isClientReady = (0, useClientReady_1.useClientReady)();
|
|
24
22
|
const contextActions = (0, betaPillContext_1.useBetaPillActions)();
|
|
25
23
|
let resolvedMainAction = feedbackAction || (contextActions === null || contextActions === void 0 ? void 0 : contextActions.feedbackAction);
|
|
26
24
|
let resolvedSecondaryAction = betaOptionAction || (contextActions === null || contextActions === void 0 ? void 0 : contextActions.betaOptionAction);
|
|
27
|
-
if (
|
|
25
|
+
if (resolvedMainAction || resolvedSecondaryAction) {
|
|
28
26
|
resolvedMainAction = Object.assign(Object.assign({}, resolvedMainAction), { text: (resolvedMainAction === null || resolvedMainAction === void 0 ? void 0 : resolvedMainAction.text) || translate("Send feedback") });
|
|
29
27
|
resolvedSecondaryAction = Object.assign(Object.assign({}, resolvedSecondaryAction), { text: (resolvedSecondaryAction === null || resolvedSecondaryAction === void 0 ? void 0 : resolvedSecondaryAction.text) || translate("Manage beta option") });
|
|
30
28
|
return ((0, jsx_runtime_1.jsx)(pillExpandable_1.PillExpandable, { isBeta: true, icon: iconLab_1.IconLab, description: translate("This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements."), text: translate("Beta"), type: "info", className: pillClasses, mainAction: resolvedMainAction, secondaryAction: resolvedSecondaryAction }));
|
|
31
29
|
}
|
|
32
|
-
if (!isClientReady) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
30
|
return ((0, jsx_runtime_1.jsx)(pill_1.Pill, { icon: iconLab_1.IconLab, className: pillClasses, type: "info", children: !isMobile && ((0, jsx_runtime_1.jsx)("span", { className: "zen-caption__content", children: translate("Beta") })) }));
|
|
36
31
|
};
|
|
37
32
|
exports.BetaPill = BetaPill;
|
|
@@ -30,14 +30,12 @@ const Calendar = ({ id, value, onChange, disableFutureDates = false, disablePast
|
|
|
30
30
|
const [hoverDate, setHoverDate] = (0, react_1.useState)(fromDate);
|
|
31
31
|
const [focusDate, setFocusDate] = (0, react_1.useState)(fromDate || new Date().toISOString());
|
|
32
32
|
const changeView = (0, react_1.useCallback)((date) => {
|
|
33
|
-
var _a, _b
|
|
34
|
-
|
|
35
|
-
focusRef.current = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.activeElement;
|
|
33
|
+
var _a, _b;
|
|
34
|
+
focusRef.current = document.activeElement;
|
|
36
35
|
const dateLike = new Date(date);
|
|
37
36
|
dateLike.setDate(15);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
(_d = parallelSelectionTriggerRef.current) === null || _d === void 0 ? void 0 : _d.focus();
|
|
37
|
+
if ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.classList.contains("zen-parallel-selection__select")) {
|
|
38
|
+
(_b = parallelSelectionTriggerRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
41
39
|
}
|
|
42
40
|
setViewDate(dateLike.toISOString());
|
|
43
41
|
}, [setViewDate]);
|
|
@@ -8,7 +8,7 @@ export declare const getDefaultDatasetStyle: (dataSet: IBarChartDataset, dsIndex
|
|
|
8
8
|
barThickness?: number | "flex" | undefined;
|
|
9
9
|
maxBarThickness?: number | undefined;
|
|
10
10
|
minBarLength?: number | undefined;
|
|
11
|
-
pointStyle?: false | "circle" | "line" | "rect" | "triangle" | "cross" | "crossRot" | "dash" | "rectRounded" | "rectRot" | "star" | import("chart.js/dist/types/utils")._DeepPartialObject<
|
|
11
|
+
pointStyle?: false | "circle" | "line" | "rect" | "triangle" | "cross" | "crossRot" | "dash" | "rectRounded" | "rectRot" | "star" | import("chart.js/dist/types/utils")._DeepPartialObject<HTMLCanvasElement> | import("chart.js/dist/types/utils")._DeepPartialObject<HTMLImageElement> | undefined;
|
|
12
12
|
grouped?: boolean | undefined;
|
|
13
13
|
indexAxis?: "x" | "y" | undefined;
|
|
14
14
|
clip?: number | false | import("chart.js/dist/types/utils")._DeepPartialObject<import("chart.js").ChartArea> | undefined;
|
package/dist/chart/barChart.js
CHANGED
|
@@ -21,6 +21,7 @@ const utils_1 = require("../commonHelpers/utils");
|
|
|
21
21
|
const useDrive_1 = require("../utils/theme/useDrive");
|
|
22
22
|
const useMobile_1 = require("../commonHelpers/hooks/useMobile");
|
|
23
23
|
const themeContext_1 = require("../utils/theme/themeContext");
|
|
24
|
+
const generateId_1 = require("../commonHelpers/generateId");
|
|
24
25
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
25
26
|
const legendPlugin_1 = require("./plugins/legend/legendPlugin");
|
|
26
27
|
const chartSummary_1 = require("./chartSummary/chartSummary");
|
|
@@ -52,8 +53,8 @@ const BarChart = (_a) => {
|
|
|
52
53
|
};
|
|
53
54
|
auto_1.Chart.defaults.color = dark ? "#FFFFFF" : "#1F2833";
|
|
54
55
|
}, [fontSize, dark]);
|
|
55
|
-
const legendId = (0, react_1.
|
|
56
|
-
const tooltipId = (0, react_1.
|
|
56
|
+
const legendId = (0, react_1.useMemo)(() => (0, generateId_1.generateId)(), []);
|
|
57
|
+
const tooltipId = (0, react_1.useMemo)(() => (0, generateId_1.generateId)(), []);
|
|
57
58
|
const { toLocalDateTime } = (0, react_1.useContext)(userFormatContext_1.userFormatContext);
|
|
58
59
|
const isTimedData = (0, react_1.useMemo)(() => (0, isDateRange_1.isDateRange)(data, false), [data]);
|
|
59
60
|
const yAxisMeta = (0, react_1.useMemo)(() => (0, getYAxisMeta_1.getYAxisMeta)(data), [data]);
|
|
@@ -21,7 +21,7 @@ export declare const getDefaultDatasetStyle: (dataSet: ILineChartNativeDataset,
|
|
|
21
21
|
pointHitRadius?: number | ((ctx: import("chart.js").ScriptableContext<"line">, options: import("chart.js/dist/types/basic").AnyObject) => number | undefined) | readonly (number | undefined)[] | undefined;
|
|
22
22
|
pointRadius?: number | ((ctx: import("chart.js").ScriptableContext<"line">, options: import("chart.js/dist/types/basic").AnyObject) => number | undefined) | readonly (number | undefined)[] | undefined;
|
|
23
23
|
pointRotation?: number | ((ctx: import("chart.js").ScriptableContext<"line">, options: import("chart.js/dist/types/basic").AnyObject) => number | undefined) | readonly (number | undefined)[] | undefined;
|
|
24
|
-
pointStyle?: false | "circle" | "line" | "rect" | "triangle" | "cross" | "crossRot" | "dash" | "rectRounded" | "rectRot" | "star" | ((ctx: import("chart.js").ScriptableContext<"line">, options: import("chart.js/dist/types/basic").AnyObject) => import("chart.js").PointStyle | undefined) | import("chart.js/dist/types/utils")._DeepPartialObject<
|
|
24
|
+
pointStyle?: false | "circle" | "line" | "rect" | "triangle" | "cross" | "crossRot" | "dash" | "rectRounded" | "rectRot" | "star" | ((ctx: import("chart.js").ScriptableContext<"line">, options: import("chart.js/dist/types/basic").AnyObject) => import("chart.js").PointStyle | undefined) | import("chart.js/dist/types/utils")._DeepPartialObject<HTMLCanvasElement> | import("chart.js/dist/types/utils")._DeepPartialObject<HTMLImageElement> | readonly (false | "circle" | "line" | "rect" | "triangle" | "cross" | "crossRot" | "dash" | "rectRounded" | "rectRot" | "star" | import("chart.js/dist/types/utils")._DeepPartialObject<HTMLCanvasElement> | import("chart.js/dist/types/utils")._DeepPartialObject<HTMLImageElement> | undefined)[] | undefined;
|
|
25
25
|
pointHoverBackgroundColor?: string | ((ctx: import("chart.js").ScriptableContext<"line">, options: import("chart.js/dist/types/basic").AnyObject) => import("chart.js").Color | undefined) | import("chart.js/dist/types/utils")._DeepPartialObject<CanvasGradient> | import("chart.js/dist/types/utils")._DeepPartialObject<CanvasPattern> | readonly (string | import("chart.js/dist/types/utils")._DeepPartialObject<CanvasGradient> | import("chart.js/dist/types/utils")._DeepPartialObject<CanvasPattern> | undefined)[] | undefined;
|
|
26
26
|
pointHoverBorderColor?: string | ((ctx: import("chart.js").ScriptableContext<"line">, options: import("chart.js/dist/types/basic").AnyObject) => import("chart.js").Color | undefined) | import("chart.js/dist/types/utils")._DeepPartialObject<CanvasGradient> | import("chart.js/dist/types/utils")._DeepPartialObject<CanvasPattern> | readonly (string | import("chart.js/dist/types/utils")._DeepPartialObject<CanvasGradient> | import("chart.js/dist/types/utils")._DeepPartialObject<CanvasPattern> | undefined)[] | undefined;
|
|
27
27
|
pointHoverBorderWidth?: number | ((ctx: import("chart.js").ScriptableContext<"line">, options: import("chart.js/dist/types/basic").AnyObject) => number | undefined) | readonly (number | undefined)[] | undefined;
|
|
@@ -20,9 +20,9 @@ const useChartTicks = () => {
|
|
|
20
20
|
const handleResize = () => {
|
|
21
21
|
applyWidth();
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
window.addEventListener("resize", handleResize);
|
|
24
24
|
return () => {
|
|
25
|
-
|
|
25
|
+
window.removeEventListener("resize", handleResize);
|
|
26
26
|
};
|
|
27
27
|
}, []);
|
|
28
28
|
const ticks = (0, react_1.useMemo)(() => {
|
package/dist/chart/lineChart.js
CHANGED
|
@@ -22,6 +22,7 @@ const getDefaultDatasetStyle_1 = require("./lineChart/getDefaultDatasetStyle");
|
|
|
22
22
|
const useDrive_1 = require("../utils/theme/useDrive");
|
|
23
23
|
const useMobile_1 = require("../commonHelpers/hooks/useMobile");
|
|
24
24
|
const themeContext_1 = require("../utils/theme/themeContext");
|
|
25
|
+
const generateId_1 = require("../commonHelpers/generateId");
|
|
25
26
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
26
27
|
const legendPlugin_1 = require("./plugins/legend/legendPlugin");
|
|
27
28
|
const chartAxis_1 = require("./chartAxis/chartAxis");
|
|
@@ -54,8 +55,8 @@ const LineChart = (_a) => {
|
|
|
54
55
|
};
|
|
55
56
|
auto_1.Chart.defaults.color = dark ? "#FFFFFF" : "#1F2833";
|
|
56
57
|
}, [fontSize, dark]);
|
|
57
|
-
const legendId = (0, react_1.
|
|
58
|
-
const tooltipId = (0, react_1.
|
|
58
|
+
const legendId = (0, react_1.useMemo)(() => (0, generateId_1.generateId)(), []);
|
|
59
|
+
const tooltipId = (0, react_1.useMemo)(() => (0, generateId_1.generateId)(), []);
|
|
59
60
|
const { isHidden, toggleHidden } = (0, useHidden_1.useHidden)();
|
|
60
61
|
const { toLocalDateTime } = (0, react_1.useContext)(userFormatContext_1.userFormatContext);
|
|
61
62
|
const isTimedData = (0, react_1.useMemo)(() => (0, isDateRange_1.isDateRange)(data, true), [data]);
|
package/dist/chart/pieChart.js
CHANGED
|
@@ -21,6 +21,7 @@ const utils_1 = require("../commonHelpers/utils");
|
|
|
21
21
|
const useDrive_1 = require("../utils/theme/useDrive");
|
|
22
22
|
const useMobile_1 = require("../commonHelpers/hooks/useMobile");
|
|
23
23
|
const themeContext_1 = require("../utils/theme/themeContext");
|
|
24
|
+
const generateId_1 = require("../commonHelpers/generateId");
|
|
24
25
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
25
26
|
const legendPlugin_1 = require("./plugins/legend/legendPlugin");
|
|
26
27
|
const chartSummary_1 = require("./chartSummary/chartSummary");
|
|
@@ -37,8 +38,6 @@ const PieChart = (_a) => {
|
|
|
37
38
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
38
39
|
const fontSize = (0, react_1.useMemo)(() => isDrive ? (isMobile ? 14 : 16) : 12, [isDrive, isMobile]);
|
|
39
40
|
const { dark } = (0, react_1.useContext)(themeContext_1.themeContext);
|
|
40
|
-
const legendId = (0, react_1.useId)();
|
|
41
|
-
const tooltipId = (0, react_1.useId)();
|
|
42
41
|
(0, react_1.useEffect)(() => {
|
|
43
42
|
auto_1.Chart.defaults.font = {
|
|
44
43
|
family: "Roboto",
|
|
@@ -46,6 +45,8 @@ const PieChart = (_a) => {
|
|
|
46
45
|
};
|
|
47
46
|
auto_1.Chart.defaults.color = dark ? "#FFFFFF" : "#1F2833";
|
|
48
47
|
}, [fontSize, dark]);
|
|
48
|
+
const legendId = (0, react_1.useMemo)(() => (0, generateId_1.generateId)(), []);
|
|
49
|
+
const tooltipId = (0, react_1.useMemo)(() => (0, generateId_1.generateId)(), []);
|
|
49
50
|
const defOptions = (0, react_1.useMemo)(() => (0, getDefaultOptions_1.getDefaultOptions)(), []);
|
|
50
51
|
const chartOptions = (0, utils_1.deepMerge)(defOptions, options);
|
|
51
52
|
const { isHidden, toggleHidden } = (0, useHidden_1.useHidden)();
|
|
@@ -10,9 +10,7 @@ const legendPlugin = (containerId, options, isDrive, isHidden, toggleHidden) =>
|
|
|
10
10
|
id: exports.LEGEND_PLUGIN_ID,
|
|
11
11
|
isDrive: isDrive,
|
|
12
12
|
afterUpdate(chart) {
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line
|
|
15
|
-
const container = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.getElementById(containerId);
|
|
13
|
+
const container = document.getElementById(containerId);
|
|
16
14
|
if (!container) {
|
|
17
15
|
return;
|
|
18
16
|
}
|
|
@@ -5,24 +5,19 @@ const escapeHtml_1 = require("../../../utils/escapeHtml");
|
|
|
5
5
|
const calculatePositions_1 = require("./calculatePositions");
|
|
6
6
|
const isOutOfViewport_1 = require("./isOutOfViewport");
|
|
7
7
|
const getOrCreateTooltip = (id, isDark) => {
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
10
|
-
let tooltipEl = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.getElementById(id);
|
|
8
|
+
let tooltipEl = document.body.querySelector(`#${id}`);
|
|
11
9
|
if (!tooltipEl) {
|
|
12
|
-
|
|
13
|
-
tooltipEl = (_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _b === void 0 ? void 0 : _b.createElement("div");
|
|
10
|
+
tooltipEl = document.createElement("div");
|
|
14
11
|
tooltipEl.id = id;
|
|
15
12
|
tooltipEl.className = "zen-chart-tooltip";
|
|
16
13
|
tooltipEl.setAttribute("role", "tooltip");
|
|
17
14
|
tooltipEl.setAttribute("aria-hidden", "true");
|
|
18
|
-
|
|
19
|
-
(_c = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _c === void 0 ? void 0 : _c.body.appendChild(tooltipEl);
|
|
15
|
+
document.body.appendChild(tooltipEl);
|
|
20
16
|
}
|
|
21
17
|
tooltipEl.classList.toggle("zen-dark", isDark);
|
|
22
18
|
return tooltipEl;
|
|
23
19
|
};
|
|
24
20
|
const renderTooltip = (tooltipId, x, y, position, items, title, subtitle, isDark) => {
|
|
25
|
-
var _a, _b;
|
|
26
21
|
const element = getOrCreateTooltip(tooltipId, isDark);
|
|
27
22
|
element.style.display = "block";
|
|
28
23
|
const titleHtml = title ? `<div class="zen-chart-tooltip__header">${(0, escapeHtml_1.htmlEscape)(title)}</div>` : "";
|
|
@@ -34,14 +29,12 @@ const renderTooltip = (tooltipId, x, y, position, items, title, subtitle, isDark
|
|
|
34
29
|
</div>`);
|
|
35
30
|
const itemsHtml = `<div class="zen-chart-tooltip__items">${itemsList.join("")}</div>`;
|
|
36
31
|
element.innerHTML = `${titleHtml}${subtitleHtml}${itemsHtml}`;
|
|
37
|
-
|
|
38
|
-
const arrow = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.createElement("div");
|
|
32
|
+
const arrow = document.createElement("div");
|
|
39
33
|
arrow.className = "zen-chart-tooltip__arrow";
|
|
40
34
|
element.appendChild(arrow);
|
|
41
35
|
const tooltipRect = element.getBoundingClientRect();
|
|
42
36
|
const positionsOrder = [position, ...calculatePositions_1.positionOrder[position]];
|
|
43
|
-
|
|
44
|
-
const bodyRect = (_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _b === void 0 ? void 0 : _b.body.getBoundingClientRect();
|
|
37
|
+
const bodyRect = document.body.getBoundingClientRect();
|
|
45
38
|
let finalPosition = undefined;
|
|
46
39
|
for (let i = 0; i < positionsOrder.length; i++) {
|
|
47
40
|
const pos = positionsOrder[i];
|
|
@@ -69,21 +62,16 @@ const renderTooltip = (tooltipId, x, y, position, items, title, subtitle, isDark
|
|
|
69
62
|
};
|
|
70
63
|
exports.renderTooltip = renderTooltip;
|
|
71
64
|
const hideTooltip = (tooltipId) => {
|
|
72
|
-
|
|
73
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
74
|
-
const element = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.getElementById(tooltipId);
|
|
65
|
+
const element = document.body.querySelector(`#${tooltipId}`);
|
|
75
66
|
if (element) {
|
|
76
67
|
element.style.display = "none";
|
|
77
68
|
}
|
|
78
69
|
};
|
|
79
70
|
exports.hideTooltip = hideTooltip;
|
|
80
71
|
const destroyTooltip = (tooltipId) => {
|
|
81
|
-
|
|
82
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
83
|
-
const element = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.getElementById(tooltipId);
|
|
72
|
+
const element = document.body.querySelector(`#${tooltipId}`);
|
|
84
73
|
if (element) {
|
|
85
|
-
|
|
86
|
-
(_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _b === void 0 ? void 0 : _b.body.removeChild(element);
|
|
74
|
+
document.body.removeChild(element);
|
|
87
75
|
}
|
|
88
76
|
};
|
|
89
77
|
exports.destroyTooltip = destroyTooltip;
|
|
@@ -75,7 +75,6 @@ const TooltipPlugin = (containerId, options, alignment = "top", isHidden, isDark
|
|
|
75
75
|
});
|
|
76
76
|
},
|
|
77
77
|
afterDraw: (chart) => {
|
|
78
|
-
var _a;
|
|
79
78
|
if (options === false) {
|
|
80
79
|
return;
|
|
81
80
|
}
|
|
@@ -98,8 +97,7 @@ const TooltipPlugin = (containerId, options, alignment = "top", isHidden, isDark
|
|
|
98
97
|
values = (0, getPieTooltipItems_1.getPieTooltipItems)(chart.data, datasetIndex, index, options);
|
|
99
98
|
}
|
|
100
99
|
const chartRect = chart.canvas.getBoundingClientRect();
|
|
101
|
-
|
|
102
|
-
(_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body.getBoundingClientRect();
|
|
100
|
+
document.body.getBoundingClientRect();
|
|
103
101
|
const scrollableParent = (0, getScrollableParent_1.getScrollableParent)(chart.canvas);
|
|
104
102
|
const scrollTop = scrollableParent ? scrollableParent.scrollTop : 0;
|
|
105
103
|
const scrollLeft = scrollableParent ? scrollableParent.scrollLeft : 0;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useClickOutside = exports.useComboboxNavigation = void 0;
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
5
4
|
const react_1 = require("react");
|
|
6
5
|
const useKeydown_1 = require("../commonHelpers/hooks/useKeydown");
|
|
7
6
|
const useComboboxNavigation = (callback, subscriptionTrigger, condition) => {
|
|
@@ -13,16 +12,14 @@ const useComboboxNavigation = (callback, subscriptionTrigger, condition) => {
|
|
|
13
12
|
exports.useComboboxNavigation = useComboboxNavigation;
|
|
14
13
|
const useClickOutside = (ref, callback) => {
|
|
15
14
|
(0, react_1.useEffect)(() => {
|
|
16
|
-
var _a;
|
|
17
15
|
const handleClick = (event) => {
|
|
18
16
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
19
17
|
callback();
|
|
20
18
|
}
|
|
21
19
|
};
|
|
22
|
-
|
|
20
|
+
document.body.addEventListener("click", handleClick, true);
|
|
23
21
|
return () => {
|
|
24
|
-
|
|
25
|
-
(_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body.removeEventListener("click", handleClick, true);
|
|
22
|
+
document.body.removeEventListener("click", handleClick, true);
|
|
26
23
|
};
|
|
27
24
|
}, [ref, callback]);
|
|
28
25
|
};
|
|
@@ -8,7 +8,7 @@ const useScrollWhileHolding = ({ action, container, intervalTimer }) => {
|
|
|
8
8
|
if (!container || !action) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
|
-
intervalTimer.current =
|
|
11
|
+
intervalTimer.current = window.setInterval(() => {
|
|
12
12
|
const { left, top } = (0, arrowNavigationHelper_1.getScrollOptions)(action, container);
|
|
13
13
|
(0, arrowNavigationHelper_1.scrollElement)(container, { left, top });
|
|
14
14
|
if ((left === container.scrollWidth && action === "right") || (left === 0 && action === "left")) {
|
|
@@ -8,8 +8,7 @@ const topWindowContext_1 = require("../../utils/topWindow/topWindowContext");
|
|
|
8
8
|
const getParentWindow_1 = require("../../utils/getParentWindow");
|
|
9
9
|
const MobileMaxWidth = 640;
|
|
10
10
|
const getDeviceType = (width) => {
|
|
11
|
-
|
|
12
|
-
if (width === undefined || width > MobileMaxWidth) {
|
|
11
|
+
if (width > MobileMaxWidth) {
|
|
13
12
|
return deviceType_1.DeviceType.Desktop;
|
|
14
13
|
}
|
|
15
14
|
return deviceType_1.DeviceType.Mobile;
|
|
@@ -17,7 +16,7 @@ const getDeviceType = (width) => {
|
|
|
17
16
|
exports.getDeviceType = getDeviceType;
|
|
18
17
|
const useDeviceType = (callback) => {
|
|
19
18
|
const { topWindow } = (0, react_1.useContext)(topWindowContext_1.topWindowContext);
|
|
20
|
-
const win = (0, react_1.useMemo)(() => topWindow || (0, getParentWindow_1.getParentWindow)(
|
|
19
|
+
const win = (0, react_1.useMemo)(() => topWindow || (0, getParentWindow_1.getParentWindow)(window), [topWindow]);
|
|
21
20
|
const [deviceType, setDeviceType] = (0, react_1.useState)((0, exports.getDeviceType)(win.innerWidth));
|
|
22
21
|
(0, useResize_1.useResize)(() => {
|
|
23
22
|
setDeviceType((0, exports.getDeviceType)(win.innerWidth));
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useKeydown = void 0;
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
5
4
|
const react_1 = require("react");
|
|
6
5
|
const useKeydown = (callback, subscriptionTrigger, condition) => {
|
|
7
6
|
(0, react_1.useEffect)(() => {
|
|
8
|
-
var _a;
|
|
9
7
|
if (condition ? condition(subscriptionTrigger) : subscriptionTrigger) {
|
|
10
|
-
|
|
8
|
+
document.body.addEventListener("keydown", callback);
|
|
11
9
|
}
|
|
12
10
|
return () => {
|
|
13
|
-
|
|
14
|
-
(_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body.removeEventListener("keydown", callback);
|
|
11
|
+
document.body.removeEventListener("keydown", callback);
|
|
15
12
|
};
|
|
16
13
|
}, [callback, condition, subscriptionTrigger]);
|
|
17
14
|
};
|
|
@@ -5,7 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const deviceType_1 = require("./deviceType");
|
|
6
6
|
const useDeviceType_1 = require("./useDeviceType");
|
|
7
7
|
const getParentWindow_1 = require("../../utils/getParentWindow");
|
|
8
|
-
const initialParent = (0, getParentWindow_1.getParentWindow)(
|
|
8
|
+
const initialParent = (0, getParentWindow_1.getParentWindow)(window);
|
|
9
9
|
exports.initialValue = (0, useDeviceType_1.getDeviceType)(initialParent.innerWidth);
|
|
10
10
|
const useMobile = () => {
|
|
11
11
|
const [deviceType, setDeviceType] = (0, react_1.useState)(exports.initialValue);
|
|
@@ -7,10 +7,10 @@ const useResize = (callback, active) => {
|
|
|
7
7
|
if (!active) {
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
window.addEventListener("resize", callback);
|
|
11
11
|
// eslint-disable-next-line consistent-return
|
|
12
12
|
return () => {
|
|
13
|
-
|
|
13
|
+
window.removeEventListener("resize", callback);
|
|
14
14
|
};
|
|
15
15
|
}, [callback, active]);
|
|
16
16
|
};
|
|
@@ -10,21 +10,17 @@ const getTarget = (target) => {
|
|
|
10
10
|
const useResizeObserver = ({ target }) => {
|
|
11
11
|
const [result, setResult] = (0, react_1.useState)(null);
|
|
12
12
|
const timeoutRef = (0, react_1.useRef)(null);
|
|
13
|
-
|
|
14
|
-
const ResizeObserverFn = globalThis === null || globalThis === void 0 ? void 0 : globalThis.ResizeObserver;
|
|
15
|
-
// eslint-disable-next-line
|
|
16
|
-
const observerCallback = ResizeObserverFn ? new ResizeObserverFn((entities) => {
|
|
13
|
+
const observer = (0, react_1.useRef)(new ResizeObserver((entities) => {
|
|
17
14
|
timeoutRef.current && cancelAnimationFrame(timeoutRef.current);
|
|
18
15
|
timeoutRef.current = requestAnimationFrame(() => setResult(entities[0]));
|
|
19
|
-
})
|
|
20
|
-
const observer = (0, react_1.useRef)(observerCallback);
|
|
16
|
+
}));
|
|
21
17
|
(0, react_1.useLayoutEffect)(() => {
|
|
22
18
|
const targetObj = getTarget(target);
|
|
23
19
|
const observerObj = observer.current;
|
|
24
|
-
targetObj &&
|
|
20
|
+
targetObj && observerObj.observe(targetObj);
|
|
25
21
|
return () => {
|
|
26
22
|
timeoutRef.current && cancelAnimationFrame(timeoutRef.current);
|
|
27
|
-
observerObj
|
|
23
|
+
observerObj.disconnect();
|
|
28
24
|
};
|
|
29
25
|
}, [target]);
|
|
30
26
|
return { result };
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useScroll = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
|
|
6
|
-
const useScroll = (callback, active, triggerRef) => {
|
|
7
|
-
var _a;
|
|
8
|
-
if (triggerRef === void 0) { triggerRef = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body; }
|
|
5
|
+
const useScroll = (callback, active, triggerRef = document.body) => {
|
|
9
6
|
(0, react_1.useEffect)(() => {
|
|
10
7
|
if (!active || triggerRef === null) {
|
|
11
8
|
return;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useTrapFocus = void 0;
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
5
4
|
const react_1 = require("react");
|
|
6
5
|
const dialogHelpers_1 = require("../../dialog/dialogHelpers");
|
|
7
6
|
const focusableSelector_1 = require("../../utils/focusableSelector");
|
|
@@ -11,14 +10,10 @@ const isElementHidden_1 = require("../../utils/isElementHidden");
|
|
|
11
10
|
const findFirstVisible = (elems, isElementVisible) => elems.find(elem => isElementVisible(elem));
|
|
12
11
|
const useTrapFocus = (containerRef, triggerRef, subscriptionTrigger, condition, isElementVisible) => {
|
|
13
12
|
const handleKeyDown = (0, react_1.useCallback)((e) => {
|
|
14
|
-
var _a
|
|
15
|
-
const getChildCondition = () =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
? !(0, isChildOf_1.isChildOf)(e.target, containerRef.current)
|
|
19
|
-
&& e.target !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body) && !(0, isChildOf_1.isChildOf)(e.target, triggerRef.current)
|
|
20
|
-
: !(0, isChildOf_1.isChildOf)(e.target, containerRef.current) && e.target !== ((_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _b === void 0 ? void 0 : _b.body);
|
|
21
|
-
};
|
|
13
|
+
var _a;
|
|
14
|
+
const getChildCondition = () => triggerRef
|
|
15
|
+
? !(0, isChildOf_1.isChildOf)(e.target, containerRef.current) && e.target !== document.body && !(0, isChildOf_1.isChildOf)(e.target, triggerRef.current)
|
|
16
|
+
: !(0, isChildOf_1.isChildOf)(e.target, containerRef.current) && e.target !== document.body;
|
|
22
17
|
if (!containerRef.current || getChildCondition()) {
|
|
23
18
|
return;
|
|
24
19
|
}
|
|
@@ -43,22 +38,22 @@ const useTrapFocus = (containerRef, triggerRef, subscriptionTrigger, condition,
|
|
|
43
38
|
return;
|
|
44
39
|
}
|
|
45
40
|
if (e.shiftKey) {
|
|
46
|
-
if (
|
|
41
|
+
if (document.activeElement === first) {
|
|
47
42
|
e.preventDefault();
|
|
48
43
|
last === null || last === void 0 ? void 0 : last.focus();
|
|
49
44
|
return;
|
|
50
45
|
}
|
|
51
|
-
if (firstContainerFocusable &&
|
|
46
|
+
if (firstContainerFocusable && document.activeElement === firstContainerFocusable) {
|
|
52
47
|
e.preventDefault();
|
|
53
48
|
lastTriggerFocusable === null || lastTriggerFocusable === void 0 ? void 0 : lastTriggerFocusable.focus();
|
|
54
49
|
}
|
|
55
50
|
return;
|
|
56
51
|
}
|
|
57
|
-
if (
|
|
52
|
+
if (document.activeElement === last) {
|
|
58
53
|
e.preventDefault();
|
|
59
54
|
first === null || first === void 0 ? void 0 : first.focus();
|
|
60
55
|
}
|
|
61
|
-
if (lastTriggerFocusable &&
|
|
56
|
+
if (lastTriggerFocusable && document.activeElement === lastTriggerFocusable) {
|
|
62
57
|
e.preventDefault();
|
|
63
58
|
firstContainerFocusable === null || firstContainerFocusable === void 0 ? void 0 : firstContainerFocusable.focus();
|
|
64
59
|
}
|
|
@@ -47,8 +47,8 @@ const deepCloneFallback = (candidateToCopy) => {
|
|
|
47
47
|
}, {});
|
|
48
48
|
};
|
|
49
49
|
const deepClone = (candidateToCopy) => {
|
|
50
|
-
if (typeof
|
|
51
|
-
return
|
|
50
|
+
if (typeof window.structuredClone === "function") {
|
|
51
|
+
return window.structuredClone(candidateToCopy);
|
|
52
52
|
}
|
|
53
53
|
return (candidateToCopy === undefined ? undefined : deepCloneFallback(candidateToCopy));
|
|
54
54
|
};
|