@sberbusiness/triplex-next 1.42.0 → 1.44.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/chunks/{AlertProcessSpoiler-INgYTx9C.js → AlertProcessSpoiler-BKFq5HKa.js} +17 -17
- package/chunks/{AlertProcessSpoiler-INgYTx9C.js.map → AlertProcessSpoiler-BKFq5HKa.js.map} +1 -1
- package/chunks/{CalendarViewItem-NQZCCZDG.js → CalendarViewItem-IqO8CpCn.js} +21 -21
- package/chunks/{CalendarViewItem-NQZCCZDG.js.map → CalendarViewItem-IqO8CpCn.js.map} +1 -1
- package/chunks/Card.module-DvHL4Oak.js +32 -0
- package/chunks/Card.module-DvHL4Oak.js.map +1 -0
- package/chunks/Carousel.module-B1uqtX8a.js +34 -0
- package/chunks/Carousel.module-B1uqtX8a.js.map +1 -0
- package/chunks/CheckboxTreeExtended.module-nKSCkiBt.js +24 -0
- package/chunks/CheckboxTreeExtended.module-nKSCkiBt.js.map +1 -0
- package/chunks/{Chip-BOgrCJUD.js → Chip-BpCsNJTt.js} +17 -17
- package/chunks/{Chip-BOgrCJUD.js.map → Chip-BpCsNJTt.js.map} +1 -1
- package/chunks/Confirm.module-BhW4bMM_.js +24 -0
- package/chunks/Confirm.module-BhW4bMM_.js.map +1 -0
- package/chunks/{DropdownListItem-DHdXJ6f2.js → DropdownListItem-DOjFvzKN.js} +11 -11
- package/chunks/{DropdownListItem-DHdXJ6f2.js.map → DropdownListItem-DOjFvzKN.js.map} +1 -1
- package/chunks/DropdownMobile.module-DZDL8Gw8.js +40 -0
- package/chunks/DropdownMobile.module-DZDL8Gw8.js.map +1 -0
- package/chunks/Footer.module-DUG9712L.js +12 -0
- package/chunks/Footer.module-DUG9712L.js.map +1 -0
- package/chunks/{HeaderLayoutSidebar.module-DyLHbWa3.js → HeaderLayoutSidebar.module-IW43j7gL.js} +4 -4
- package/chunks/HeaderLayoutSidebar.module-IW43j7gL.js.map +1 -0
- package/chunks/HeaderTabs.module-DfEbH7Kd.js +12 -0
- package/chunks/HeaderTabs.module-DfEbH7Kd.js.map +1 -0
- package/chunks/{HeaderTitle.module-Cj2Bk_xQ.js → HeaderTitle.module-G4qS0aG1.js} +4 -4
- package/chunks/HeaderTitle.module-G4qS0aG1.js.map +1 -0
- package/chunks/ImageGalleryExtendedMain.module-Bj1ndZgo.js +28 -0
- package/chunks/ImageGalleryExtendedMain.module-Bj1ndZgo.js.map +1 -0
- package/chunks/{ImageGalleryExtendedThumb-hTnBPgAl.js → ImageGalleryExtendedThumb-ZBgC8mAZ.js} +6 -6
- package/chunks/{ImageGalleryExtendedThumb-hTnBPgAl.js.map → ImageGalleryExtendedThumb-ZBgC8mAZ.js.map} +1 -1
- package/chunks/IslandAccordion.module-BFj1LZrN.js +44 -0
- package/chunks/IslandAccordion.module-BFj1LZrN.js.map +1 -0
- package/chunks/IslandWidgetFooter.module-DVKw7F37.js +18 -0
- package/chunks/IslandWidgetFooter.module-DVKw7F37.js.map +1 -0
- package/chunks/IslandWidgetHeader.module-DHAKalQf.js +28 -0
- package/chunks/IslandWidgetHeader.module-DHAKalQf.js.map +1 -0
- package/chunks/{LightBoxContent-DWuh2HlS.js → LightBoxContent-DmLo1lK3.js} +22 -18
- package/chunks/{LightBoxContent-DWuh2HlS.js.map → LightBoxContent-DmLo1lK3.js.map} +1 -1
- package/chunks/LightBoxControls.module-BfIgufzK.js +26 -0
- package/chunks/LightBoxControls.module-BfIgufzK.js.map +1 -0
- package/chunks/{LightBoxSideOverlayClose.module-Dj3iATzU.js → LightBoxSideOverlayClose.module-Dznuf6b3.js} +4 -4
- package/chunks/LightBoxSideOverlayClose.module-Dznuf6b3.js.map +1 -0
- package/chunks/{ListItemControlsButton-CRuluo8R.js → ListItemControlsButton-BFkW7b6S.js} +10 -10
- package/chunks/{ListItemControlsButton-CRuluo8R.js.map → ListItemControlsButton-BFkW7b6S.js.map} +1 -1
- package/chunks/ListItemTail.module-DjYk6epy.js +18 -0
- package/chunks/ListItemTail.module-DjYk6epy.js.map +1 -0
- package/chunks/ListMasterFooter.module-B5viguka.js +14 -0
- package/chunks/ListMasterFooter.module-B5viguka.js.map +1 -0
- package/chunks/ModalWindow.module-C0p5ZVLh.js +28 -0
- package/chunks/ModalWindow.module-C0p5ZVLh.js.map +1 -0
- package/chunks/Notification.module-DuwX9b1Z.js +34 -0
- package/chunks/Notification.module-DuwX9b1Z.js.map +1 -0
- package/chunks/Overlay.module-Cuh6SDnR.js +30 -0
- package/chunks/Overlay.module-Cuh6SDnR.js.map +1 -0
- package/chunks/Page.module-Bso9TRUt.js +15 -0
- package/chunks/Page.module-Bso9TRUt.js.map +1 -0
- package/chunks/SMSField.module-DHnJVbUI.js +26 -0
- package/chunks/SMSField.module-DHnJVbUI.js.map +1 -0
- package/chunks/SliderExtendedMarks.module-CuyZnXA3.js +24 -0
- package/chunks/SliderExtendedMarks.module-CuyZnXA3.js.map +1 -0
- package/chunks/SliderExtendedRail-CBpr9S0R.js +58 -0
- package/chunks/SliderExtendedRail-CBpr9S0R.js.map +1 -0
- package/chunks/StatusTracker.module-CXFyhzFa.js +44 -0
- package/chunks/StatusTracker.module-CXFyhzFa.js.map +1 -0
- package/chunks/{StepperStepArrowBorder-D6VlXyFw.js → StepperStepArrowBorder-0FWauWM_.js} +16 -16
- package/chunks/{StepperStepArrowBorder-D6VlXyFw.js.map → StepperStepArrowBorder-0FWauWM_.js.map} +1 -1
- package/chunks/{SuggestFieldMobileDropdownHint-ssZcfnsc.js → SuggestFieldMobileDropdownHint-BfrLhHXK.js} +3 -3
- package/chunks/{SuggestFieldMobileDropdownHint-ssZcfnsc.js.map → SuggestFieldMobileDropdownHint-BfrLhHXK.js.map} +1 -1
- package/chunks/TableFooter.module-DRlxkZoa.js +22 -0
- package/chunks/TableFooter.module-DRlxkZoa.js.map +1 -0
- package/chunks/TabsExtended.module-DJH-YNzW.js +26 -0
- package/chunks/TabsExtended.module-DJH-YNzW.js.map +1 -0
- package/chunks/TabsLine.module-_HQwnwAW.js +36 -0
- package/chunks/TabsLine.module-_HQwnwAW.js.map +1 -0
- package/chunks/TooltipDesktop.module-B54hNcxs.js +32 -0
- package/chunks/TooltipDesktop.module-B54hNcxs.js.map +1 -0
- package/chunks/TreeView.module-CmItPF1_.js +12 -0
- package/chunks/TreeView.module-CmItPF1_.js.map +1 -0
- package/chunks/{UploadZoneInput-0kLbusfr.js → UploadZoneInput-CBw00-1a.js} +6 -6
- package/chunks/{UploadZoneInput-0kLbusfr.js.map → UploadZoneInput-CBw00-1a.js.map} +1 -1
- package/chunks/{constants-CvDW-MJO.js → constants-zAYZ7mgb.js} +27 -27
- package/chunks/{constants-CvDW-MJO.js.map → constants-zAYZ7mgb.js.map} +1 -1
- package/chunks/{utils-BO2qfDaA.js → utils-BL5AUOKS.js} +28 -28
- package/chunks/{utils-BO2qfDaA.js.map → utils-BL5AUOKS.js.map} +1 -1
- package/chunks/{utils-Cu21bBFk.js → utils-C8wwfWT9.js} +12 -10
- package/chunks/{utils-Cu21bBFk.js.map → utils-C8wwfWT9.js.map} +1 -1
- package/chunks/{utils-DEIy9WE_.js → utils-CTCsYynd.js} +11 -11
- package/chunks/utils-CTCsYynd.js.map +1 -0
- package/chunks/{utils-DZk7_5zK.js → utils-W5dHMPw5.js} +6 -6
- package/chunks/{utils-DZk7_5zK.js.map → utils-W5dHMPw5.js.map} +1 -1
- package/chunks/{vendor-DfvHt3TJ.js → vendor-D4wvHis9.js} +7446 -7446
- package/chunks/{vendor-DfvHt3TJ.js.map → vendor-D4wvHis9.js.map} +1 -1
- package/components/AbstractTree/AbstractTreeNode.js +1 -1
- package/components/AccordionBase/protected/AccordionBase.js +1 -1
- package/components/Alert/AlertContext/AlertContext.js +8 -8
- package/components/Alert/AlertProcess/AlertProcess.js +3 -3
- package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +2 -2
- package/components/Amount/Amount.js +3 -3
- package/components/Avatar/Avatar.js +14 -14
- package/components/Badge/Badge.js +5 -5
- package/components/Badge/BadgeDot.js +5 -5
- package/components/Badge/components/BadgeContent.js +7 -7
- package/components/Badge/components/BadgePostfix.js +2 -2
- package/components/Badge/components/BadgePrefix.js +2 -2
- package/components/Body/Body.js +4 -4
- package/components/Button/Button.js +21 -21
- package/components/Button/ButtonBase.js +1 -1
- package/components/Button/ButtonDropdown.js +9 -9
- package/components/Button/ButtonDropdownExtended.js +3 -3
- package/components/Button/ButtonIcon.js +4 -4
- package/components/Calendar/Calendar.js +5 -5
- package/components/Calendar/components/CalendarControls.js +1 -1
- package/components/Calendar/components/CalendarFooter.js +2 -2
- package/components/Calendar/components/CalendarViewDays.js +2 -2
- package/components/Calendar/components/CalendarViewItem.js +2 -2
- package/components/Calendar/components/CalendarViewMonths.js +1 -1
- package/components/Calendar/components/CalendarViewYears.js +1 -1
- package/components/Card/CardAction.js +6 -6
- package/components/Card/CardStatic.js +3 -3
- package/components/Card/components/CardContent/CardContent.js +2 -2
- package/components/Card/components/CardContent/components/CardContentBody.js +2 -2
- package/components/Card/components/CardContent/components/CardContentFooter.js +2 -2
- package/components/Card/components/CardContent/components/CardContentHeader.js +2 -2
- package/components/Card/components/CardMedia.js +2 -2
- package/components/Card/utils.js +1 -1
- package/components/Carousel/Carousel.js +2 -2
- package/components/Carousel/CarouselButton.js +6 -6
- package/components/Carousel/CarouselButton.js.map +1 -1
- package/components/Carousel/CarouselIndicators.js +25 -8
- package/components/Carousel/CarouselIndicators.js.map +1 -1
- package/components/Carousel/CarouselItem.js +2 -2
- package/components/Carousel/CarouselTrack.js +2 -2
- package/components/Carousel/CarouselViewport.js +2 -2
- package/components/CarouselExtended/CarouselExtended.js +2 -2
- package/components/Checkbox/Checkbox.js +15 -19
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/CheckboxXGroup.js +9 -9
- package/components/Checkbox/CheckboxXGroup.js.map +1 -1
- package/components/Checkbox/CheckboxYGroup.js +2 -2
- package/components/Checkbox/CheckboxYGroup.js.map +1 -1
- package/components/CheckboxTreeExtended/CheckboxTreeExtended.js +9 -7
- package/components/CheckboxTreeExtended/CheckboxTreeExtended.js.map +1 -1
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedArrow.js +36 -53
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedArrow.js.map +1 -1
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedCheckbox.js +4 -6
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedCheckbox.js.map +1 -1
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedNode.js +15 -7
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedNode.js.map +1 -1
- package/components/Chip/Chip.js +2 -2
- package/components/Chip/ChipClearButton.js +2 -2
- package/components/Chip/ChipDatePicker/ChipDatePicker.js +1 -1
- package/components/Chip/ChipDatePicker/ChipDatePickerTarget.js +1 -1
- package/components/Chip/ChipDropdownArrow.js +3 -3
- package/components/Chip/ChipIcon.js +1 -1
- package/components/Chip/ChipMultiselect.js +2 -2
- package/components/Chip/ChipOptions.js +2 -2
- package/components/Chip/ChipSelect/ChipSelect.js +2 -2
- package/components/Chip/ChipSelect/ChipSelectTarget.js +1 -1
- package/components/Chip/ChipSort.js +2 -2
- package/components/Chip/ChipSuggest/ChipSuggest.js +2 -2
- package/components/Chip/ChipSuggest/ChipSuggestDropdown.js +2 -2
- package/components/Chip/ChipSuggest/ChipSuggestTarget.js +1 -1
- package/components/Chip/ChipSuggest/desktop/ChipSuggestDesktopDropdownField.js +1 -1
- package/components/Chip/index.js +1 -1
- package/components/ChipGroup/ChipGroup.js +15 -13
- package/components/ChipGroup/ChipGroup.js.map +1 -1
- package/components/Col/Col.js +133 -133
- package/components/CollapsibleTree/CollapsibleTree.js +2 -2
- package/components/CollapsibleTree/components/CollapsibleTreeLeafContent.js +2 -2
- package/components/CollapsibleTree/components/CollapsibleTreeLeafNode.js +2 -2
- package/components/CollapsibleTree/components/CollapsibleTreeNodeHeader.js +5 -5
- package/components/CollapsibleTreeExtended/components/CollapsibleTreeExtendedNode.js +2 -2
- package/components/Confirm/Confirm.js +2 -2
- package/components/Confirm/components/ConfirmCloseButton.js +2 -2
- package/components/Confirm/components/ConfirmContent.js +2 -2
- package/components/Confirm/components/ConfirmContentTitle.js +2 -2
- package/components/Confirm/components/ConfirmControls.js +2 -2
- package/components/DateField/DateFieldTarget.js +5 -5
- package/components/DatePickerExtended/DatePickerExtended.js +28 -23
- package/components/DatePickerExtended/DatePickerExtended.js.map +1 -1
- package/components/DatePickerExtended/DatePickerExtendedContext.js.map +1 -1
- package/components/DatePickerExtended/DatePickerExtendedDropdown.js +13 -6
- package/components/DatePickerExtended/DatePickerExtendedDropdown.js.map +1 -1
- package/components/DatePickerExtended/index.js +3 -1
- package/components/DatePickerExtended/index.js.map +1 -1
- package/components/DateRange/DateRange.js +4 -4
- package/components/DesignTokens/DesignTokenUtils.js +2 -2
- package/components/DesignTokens/components/Button.js +1 -1
- package/components/DesignTokens/components/Button.js.map +1 -1
- package/components/DesignTokens/components/Chip.js +1 -1
- package/components/DesignTokens/components/Chip.js.map +1 -1
- package/components/DesignTokens/components/Skeleton.js +18 -12
- package/components/DesignTokens/components/Skeleton.js.map +1 -1
- package/components/Divider/Divider.js +18 -18
- package/components/DocumentNumberEdit/DocumentNumberEdit.js +4 -4
- package/components/Dropdown/desktop/DropdownDesktop.js +7 -7
- package/components/Dropdown/desktop/DropdownList.js +2 -2
- package/components/Dropdown/desktop/DropdownListItem.js +2 -2
- package/components/Dropdown/desktop/index.js +1 -1
- package/components/Dropdown/index.js +1 -1
- package/components/Dropdown/mobile/DropdownMobile.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileBody.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileClose.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileFooter.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileHeader.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInner.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInput.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileList.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileListItem.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileLoader.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileMaskedInput.js +2 -2
- package/components/Ellipsis/Ellipsis.js +4 -4
- package/components/EmptyView/EmptyView.js +5 -5
- package/components/ExpandAnimation/ExpandAnimation.js +16 -11
- package/components/ExpandAnimation/ExpandAnimation.js.map +1 -1
- package/components/FocusTrapExtended/FocusTrapExtended.js +1 -1
- package/components/Footer/Footer.js +1 -1
- package/components/Footer/Footer.js.map +1 -1
- package/components/Footer/components/FooterDescription.js +2 -2
- package/components/Footer/components/FooterDescription.js.map +1 -1
- package/components/Footer/components/FooterDescriptionContent.js +2 -2
- package/components/Footer/components/FooterDescriptionContent.js.map +1 -1
- package/components/Footer/components/FooterDescriptionControls.js +2 -2
- package/components/FormField/FormField.js +12 -12
- package/components/FormField/components/FormFieldClear.js +2 -2
- package/components/FormField/components/FormFieldCounter.js +2 -2
- package/components/FormField/components/FormFieldDescription.js +3 -3
- package/components/FormField/components/FormFieldInput.js +5 -5
- package/components/FormField/components/FormFieldLabel.js +8 -8
- package/components/FormField/components/FormFieldMaskedInput.js +7 -7
- package/components/FormField/components/FormFieldPostfix.js +2 -2
- package/components/FormField/components/FormFieldPrefix.js +2 -2
- package/components/FormField/components/FormFieldTarget.js +9 -9
- package/components/FormField/components/FormFieldTextarea.js +5 -5
- package/components/Gap/Gap.js +9 -9
- package/components/Header/Header.js +1 -1
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js +2 -2
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js +2 -2
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js +2 -2
- package/components/Header/components/HeaderSubheader/HeaderSubheader.js +3 -3
- package/components/Header/components/HeaderTabs/HeaderTabs.js +2 -2
- package/components/Header/components/HeaderTabs/HeaderTabsContent.js +2 -2
- package/components/Header/components/HeaderTabs/HeaderTabsControls.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitle.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitleContent.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitleControls.js +2 -2
- package/components/HelpBox/HelpBox.js +2 -2
- package/components/IconWrapper/IconWrapper.js +3 -3
- package/components/ImageGallery/ImageGallery.js +1 -1
- package/components/ImageGalleryExtended/ImageGalleryExtended.js +3 -3
- package/components/ImageGalleryExtended/components/ImageGalleryExtendedArrow.js +2 -2
- package/components/ImageGalleryExtended/components/ImageGalleryExtendedDots.js +4 -4
- package/components/ImageGalleryExtended/components/ImageGalleryExtendedMain.js +2 -2
- package/components/ImageGalleryExtended/components/ImageGalleryExtendedSlide.js +2 -2
- package/components/ImageGalleryExtended/components/ImageGalleryExtendedSwipeTrack.js +2 -2
- package/components/ImageGalleryExtended/components/ImageGalleryExtendedThumb.js +2 -2
- package/components/ImageGalleryExtended/components/ImageGalleryExtendedThumbnails.js +2 -2
- package/components/ImageGalleryExtended/components/index.js +1 -1
- package/components/ImageGalleryExtended/index.js +1 -1
- package/components/Island/Island.js +10 -3
- package/components/Island/Island.js.map +1 -1
- package/components/Island/components/IslandBody.js +2 -2
- package/components/Island/components/IslandFooter.js +2 -2
- package/components/Island/components/IslandHeader.js +2 -2
- package/components/Island/utils.js +1 -1
- package/components/IslandAccordion/IslandAccordion.js +3 -3
- package/components/IslandAccordion/components/IslandAccordionContent.js +1 -1
- package/components/IslandAccordion/components/IslandAccordionFooter.js +2 -2
- package/components/IslandAccordion/components/IslandAccordionItem.js +3 -3
- package/components/IslandWidget/IslandWidget.js +9 -19
- package/components/IslandWidget/IslandWidget.js.map +1 -1
- package/components/IslandWidget/IslandWidgetContext.js +3 -1
- package/components/IslandWidget/IslandWidgetContext.js.map +1 -1
- package/components/IslandWidget/components/IslandWidgetBody.js +15 -4
- package/components/IslandWidget/components/IslandWidgetBody.js.map +1 -1
- package/components/IslandWidget/components/IslandWidgetExtraFooter.js +2 -2
- package/components/IslandWidget/components/IslandWidgetFooter.js +15 -3
- package/components/IslandWidget/components/IslandWidgetFooter.js.map +1 -1
- package/components/IslandWidget/components/IslandWidgetFooterContent.js +1 -1
- package/components/IslandWidget/components/IslandWidgetFooterControls.js +1 -1
- package/components/IslandWidget/components/IslandWidgetHeader.js +8 -5
- package/components/IslandWidget/components/IslandWidgetHeader.js.map +1 -1
- package/components/IslandWidget/components/IslandWidgetHeaderContent.js +2 -2
- package/components/IslandWidget/components/IslandWidgetHeaderControls.js +2 -2
- package/components/IslandWidget/components/IslandWidgetHeaderDescription.js +2 -2
- package/components/IslandWidget/components/IslandWidgetHeaderTitle.js +2 -2
- package/components/IslandWidget/components/IslandWidgetWrapper.js +2 -2
- package/components/LightBox/LightBox.js +7 -6
- package/components/LightBox/LightBox.js.map +1 -1
- package/components/LightBox/LightBoxContent.js +2 -2
- package/components/LightBox/LightBoxControls/LightBoxArrow.js +2 -2
- package/components/LightBox/LightBoxControls/LightBoxClose.js +2 -2
- package/components/LightBox/LightBoxControls/LightBoxControls.js +2 -2
- package/components/LightBox/LightBoxControls/LightBoxNext.js +2 -2
- package/components/LightBox/LightBoxControls/LightBoxPrev.js +2 -2
- package/components/LightBox/LightBoxSideOverlay/LightBoxSideOverlay.js +13 -13
- package/components/LightBox/LightBoxSideOverlay/LightBoxSideOverlayCloseDesktop.js +2 -2
- package/components/LightBox/LightBoxSideOverlay/LightBoxSideOverlayCloseMobile.js +2 -2
- package/components/LightBox/LightBoxSideOverlay/LightBoxSideOverlayLoader.js +1 -1
- package/components/LightBox/LightBoxSidebars/LightBoxLeftSidebar.js +4 -4
- package/components/LightBox/LightBoxSidebars/LightBoxRightSidebar.js +4 -4
- package/components/LightBox/LightBoxViewManager/LightBoxViewManager.js +1 -1
- package/components/Link/Link.js +6 -6
- package/components/List/List.js +4 -4
- package/components/List/ListSortable.js +1 -1
- package/components/List/components/ListActionItem.js +2 -2
- package/components/List/components/ListEmptyState.js +2 -2
- package/components/List/components/ListItem.js +1 -1
- package/components/List/components/ListItemContent.js +5 -5
- package/components/List/components/ListItemControls.js +2 -2
- package/components/List/components/ListItemControlsButton.js +2 -2
- package/components/List/components/ListItemControlsButtonDropdown.js +2 -2
- package/components/List/components/ListItemLoading.js +2 -2
- package/components/List/components/ListItemSelectable.js +7 -7
- package/components/List/components/ListItemTailLeft.js +2 -2
- package/components/List/components/ListItemTailRight.js +2 -2
- package/components/List/components/ListSortableItem.js +3 -3
- package/components/List/components/ListSortableItemControls.js +2 -2
- package/components/List/components/ListSortableItemTarget.js +5 -5
- package/components/List/components/ListTableItem.js +4 -4
- package/components/List/index.js +1 -1
- package/components/ListMaster/ListMaster.js +1 -1
- package/components/ListMaster/components/ListMasterBody.js +1 -1
- package/components/ListMaster/components/ListMasterChipGroup.js +2 -2
- package/components/ListMaster/components/ListMasterFooter.js +2 -2
- package/components/ListMaster/components/ListMasterFooterControls.js +2 -2
- package/components/ListMaster/components/ListMasterFooterDescription.js +2 -2
- package/components/ListMaster/components/ListMasterHeader.js +3 -3
- package/components/ListMaster/components/SelectionControls.js +3 -3
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +9 -9
- package/components/Loader/LoaderSmall/LoaderSmall.js +11 -11
- package/components/LoaderScreen/LoaderScreen.js +6 -6
- package/components/Marker/Marker.js +2 -2
- package/components/Marker/utils.js +1 -1
- package/components/MarkerStatus/MarkerStatus.js +8 -8
- package/components/ModalWindow/ModalWindow.js +2 -2
- package/components/ModalWindow/components/ModalWindowBody.js +2 -2
- package/components/ModalWindow/components/ModalWindowClose.js +1 -1
- package/components/ModalWindow/components/ModalWindowContent.js +2 -2
- package/components/ModalWindow/components/ModalWindowHeader.js +2 -2
- package/components/ModalWindow/components/ModalWindowViewManager.js +2 -2
- package/components/MonthYearField/MonthYearFieldTarget.js +5 -5
- package/components/MonthYearRange/MonthYearRange.js +4 -4
- package/components/MultiselectField/components/MultiselectFieldDropdown.js +2 -2
- package/components/MultiselectField/components/MultiselectFieldDropdownContent.js +6 -6
- package/components/MultiselectField/components/MultiselectFieldDropdownFooter.js +2 -2
- package/components/MultiselectField/components/MultiselectFieldDropdownHeader.js +2 -2
- package/components/Notification/Notification.js +3 -3
- package/components/Notification/NotificationGrouped.js +1 -1
- package/components/Notification/components/NotificationBody.js +1 -1
- package/components/Notification/components/NotificationBodyList.js +3 -4
- package/components/Notification/components/NotificationBodyList.js.map +1 -1
- package/components/Notification/components/NotificationClose.js +1 -1
- package/components/Notification/components/NotificationFooter.js +1 -1
- package/components/Notification/components/NotificationGroupedFooter.js +2 -2
- package/components/Notification/components/NotificationHeader.js +1 -1
- package/components/Notification/components/NotificationIcon.js +1 -1
- package/components/Notification/components/NotificationTime.js +1 -1
- package/components/OrderedList/OrderedList.js +3 -3
- package/components/OrderedList/OrderedListItem.js +3 -3
- package/components/Overlay/Overlay.js +2 -2
- package/components/Overlay/OverlayBase.js +4 -0
- package/components/Overlay/OverlayBase.js.map +1 -1
- package/components/Overlay/OverlayMask.js +2 -2
- package/components/Overlay/OverlayPanel.js +2 -2
- package/components/Page/Page.js +2 -2
- package/components/Page/components/BodyPage.js +37 -10
- package/components/Page/components/BodyPage.js.map +1 -1
- package/components/Page/components/FooterPage.js +2 -2
- package/components/Page/components/HeaderPage.js +2 -2
- package/components/Page/components/enums.js +1 -0
- package/components/Page/components/enums.js.map +1 -1
- package/components/Pagination/Pagination.js +1 -1
- package/components/Pagination/Pagination.js.map +1 -1
- package/components/Pagination/components/PaginationExtended.js +3 -3
- package/components/Pagination/components/PaginationNavigation.js +4 -3
- package/components/Pagination/components/PaginationNavigation.js.map +1 -1
- package/components/Pagination/components/PaginationNavigationButton.js +2 -2
- package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
- package/components/Pagination/components/PaginationPageButton.js +3 -3
- package/components/Pagination/components/PaginationPageEllipsis.js +2 -2
- package/components/Pagination/components/PaginationSelect.js +3 -3
- package/components/Pagination/utils.js +1 -1
- package/components/Radio/Radio.js +10 -10
- package/components/Radio/RadioXGroup.js +9 -9
- package/components/Radio/RadioYGroup.js +2 -2
- package/components/Row/Row.js +5 -5
- package/components/SMSField/SMSField.js +3 -3
- package/components/SMSField/components/RefreshIcon.js +2 -2
- package/components/SMSField/components/SMSFieldInput.js +2 -2
- package/components/SMSField/components/SMSFieldRefresh.js +2 -2
- package/components/SMSField/components/SMSFieldSubmit.js +2 -2
- package/components/SMSField/components/SMSFieldTooltip.js +1 -1
- package/components/SegmentedControl/SegmentedControl.js +10 -10
- package/components/SegmentedControl/SegmentedControlSegment.js +4 -4
- package/components/SelectExtendedField/SelectExtendedField.js +2 -2
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +1 -1
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdownDefault.js +1 -1
- package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +8 -8
- package/components/SelectField/SelectField.js +2 -2
- package/components/Skeleton/Skeleton.js +20 -12
- package/components/Skeleton/Skeleton.js.map +1 -1
- package/components/Skeleton/enums.js +3 -2
- package/components/Skeleton/enums.js.map +1 -1
- package/components/SliderExtended/SliderExtended.js +81 -105
- package/components/SliderExtended/SliderExtended.js.map +1 -1
- package/components/SliderExtended/SliderExtendedContext.js.map +1 -1
- package/components/SliderExtended/SliderExtendedUtils.js +18 -36
- package/components/SliderExtended/SliderExtendedUtils.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedDot/SliderExtendedDot.js +200 -199
- package/components/SliderExtended/components/SliderExtendedDot/SliderExtendedDot.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedDot/SliderExtendedDotActions.js +15 -2
- package/components/SliderExtended/components/SliderExtendedDot/SliderExtendedDotActions.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedMarks/SliderExtendedMark.js +38 -40
- package/components/SliderExtended/components/SliderExtendedMarks/SliderExtendedMark.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedMarks/SliderExtendedMarkActions.js +7 -19
- package/components/SliderExtended/components/SliderExtendedMarks/SliderExtendedMarkActions.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedMarks/SliderExtendedMarks.js +6 -3
- package/components/SliderExtended/components/SliderExtendedMarks/SliderExtendedMarks.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedMoveHandler.js +21 -16
- package/components/SliderExtended/components/SliderExtendedMoveHandler.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedRail.js +3 -2
- package/components/SliderExtended/components/SliderExtendedRail.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedTooltip/SliderExtendedTooltip.js +47 -36
- package/components/SliderExtended/components/SliderExtendedTooltip/SliderExtendedTooltip.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedTrack/SliderExtendedTrack.js +204 -207
- package/components/SliderExtended/components/SliderExtendedTrack/SliderExtendedTrack.js.map +1 -1
- package/components/SliderExtended/components/SliderExtendedTrack/SliderExtendedTrackActions.js +1 -1
- package/components/SliderExtended/components/SliderExtendedTrack/SliderExtendedTrackActions.js.map +1 -1
- package/components/SliderExtended/utils.js +11 -0
- package/components/SliderExtended/utils.js.map +1 -0
- package/components/SmallInput/SmallInput.js +2 -2
- package/components/Spoiler/Spoiler.js +11 -11
- package/components/StatusTracker/StatusTracker.js +3 -3
- package/components/StatusTracker/components/StatusTrackerAlert.js +2 -2
- package/components/StatusTracker/components/StatusTrackerBody.js +2 -2
- package/components/StatusTracker/components/StatusTrackerButton.js +2 -2
- package/components/StatusTracker/components/StatusTrackerDescription.js +2 -2
- package/components/StatusTracker/components/StatusTrackerFooter.js +2 -2
- package/components/StatusTracker/components/StatusTrackerHeader.js +2 -2
- package/components/StatusTracker/components/StatusTrackerMedia.js +2 -2
- package/components/StatusTracker/components/StatusTrackerStatus.js +2 -2
- package/components/StatusTracker/components/StatusTrackerStatusGroup.js +2 -2
- package/components/StatusTracker/components/StatusTrackerSum.js +2 -2
- package/components/StatusTracker/components/StatusTrackerTitle.js +2 -2
- package/components/Step/Step.js +11 -11
- package/components/Stepper/Stepper.js +9 -9
- package/components/Stepper/StepperExtended.js +2 -2
- package/components/Stepper/StepperStep.js +3 -3
- package/components/Stepper/StepperStepArrowBorder.js +1 -1
- package/components/Suggest/SuggestMobileDropdownContent.js +3 -3
- package/components/Suggest/useSuggest.js +1 -1
- package/components/SuggestField/SuggestField.js +1 -1
- package/components/SuggestField/desktop/SuggestFieldDesktop.js +2 -2
- package/components/SuggestField/desktop/SuggestFieldDesktopDropdown.js +1 -1
- package/components/SuggestField/index.js +1 -1
- package/components/SuggestField/mobile/SuggestFieldMobile.js +1 -1
- package/components/SuggestField/mobile/SuggestFieldMobileDropdown.js +2 -2
- package/components/SuggestField/mobile/SuggestFieldMobileDropdownHint.js +1 -1
- package/components/SuggestField/mobile/index.js +1 -1
- package/components/SwipeableArea/SwipeableArea.js +9 -9
- package/components/Table/ChipPanel.js +2 -2
- package/components/Table/ChipPanelLinks.js +2 -2
- package/components/Table/FilterPanel.js +3 -3
- package/components/Table/MasterTable.js +3 -3
- package/components/Table/NoColumns.js +3 -3
- package/components/Table/PaginationPanel.js +3 -3
- package/components/Table/TableBasic/TableBasic.js +59 -59
- package/components/Table/TableBasic/TableBasic.js.map +1 -1
- package/components/Table/TableBasic/components/TableBasicBody.js +3 -4
- package/components/Table/TableBasic/components/TableBasicBody.js.map +1 -1
- package/components/Table/TableBasic/components/TableBasicHeader.js +49 -66
- package/components/Table/TableBasic/components/TableBasicHeader.js.map +1 -1
- package/components/Table/TableBasic/components/TableBasicRow.js +25 -28
- package/components/Table/TableBasic/components/TableBasicRow.js.map +1 -1
- package/components/Table/TableBasicSettings/TableBasicSettings.js +3 -3
- package/components/Table/TableBasicSettings/components/ColumnSettingsSortableListItemTarget.js +3 -3
- package/components/Table/TableBasicSettings/components/ColumnSettingsStaticListItem.js +2 -2
- package/components/Table/TableBasicSettings/components/TableBasicSettingsBody.js +2 -2
- package/components/Table/TableBasicSettings/components/TableBasicSettingsFooter.js +2 -2
- package/components/Table/TableBasicSettings/components/TableBasicSettingsHeader.js +2 -2
- package/components/Table/TableFooter/TableFooter.js +2 -2
- package/components/Table/TableFooter/components/TableFooterSummary.js +1 -1
- package/components/Table/TableFooter/components/TableFooterSummaryAmount.js +1 -1
- package/components/Table/TableFooter/components/TableFooterSummarySelectAllButton.js +1 -1
- package/components/Table/TableFooter/components/TableFooterSummarySelectedCount.js +1 -1
- package/components/Table/utils.js +1 -1
- package/components/Tabs/Tabs.js +28 -11
- package/components/Tabs/Tabs.js.map +1 -1
- package/components/TabsExtended/TabsExtended.js +38 -38
- package/components/TabsExtended/TabsExtended.js.map +1 -1
- package/components/TabsExtended/TabsExtendedContext.js.map +1 -1
- package/components/TabsExtended/components/TabsExtendedContent.js +23 -14
- package/components/TabsExtended/components/TabsExtendedContent.js.map +1 -1
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +30 -20
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js.map +1 -1
- package/components/TabsExtended/components/TabsExtendedTab.js +5 -4
- package/components/TabsExtended/components/TabsExtendedTab.js.map +1 -1
- package/components/TabsExtended/components/TabsExtendedTabButton.js +3 -3
- package/components/TabsExtended/components/TabsExtendedTabButton.js.map +1 -1
- package/components/TabsExtended/components/TabsExtendedTabContext.js.map +1 -1
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +87 -84
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js.map +1 -1
- package/components/TabsExtended/enums.js.map +1 -1
- package/components/TabsExtended/utils.js +1 -1
- package/components/TabsLine/TabsLine.js +2 -2
- package/components/TabsLine/components/TabsLineDesktop.js +2 -2
- package/components/TabsLine/components/TabsLineDropdown.js +3 -3
- package/components/TabsLine/components/TabsLineItem.js +2 -2
- package/components/TabsLine/components/TabsLineMobile.js +2 -2
- package/components/Tag/Tag.js +51 -56
- package/components/Tag/Tag.js.map +1 -1
- package/components/TagColor/TagColor.js +11 -11
- package/components/TagGroup/TagGroup.js +5 -5
- package/components/ThemeProvider/ThemeProvider.js +1 -1
- package/components/ThemeProvider/components/ThemeProviderView.js +1 -1
- package/components/Tooltip/components/common/TooltipBody.js +2 -2
- package/components/Tooltip/components/common/TooltipLink.js +5 -5
- package/components/Tooltip/components/common/TooltipXButton.js +1 -1
- package/components/Tooltip/components/desktop/components/TooltipDesktopBase.js +2 -2
- package/components/Tooltip/components/desktop/components/TooltipDesktopTip.js +2 -2
- package/components/Tooltip/components/mobile/TooltipMobile.js +5 -5
- package/components/TopOverlay/TopOverlay.js +107 -98
- package/components/TopOverlay/TopOverlay.js.map +1 -1
- package/components/TopOverlay/utils.js +8 -0
- package/components/TopOverlay/utils.js.map +1 -0
- package/components/TreeView/TreeView.js +42 -17
- package/components/TreeView/TreeView.js.map +1 -1
- package/components/TreeView/TreeViewAbstractNodeUtils.js +30 -34
- package/components/TreeView/TreeViewAbstractNodeUtils.js.map +1 -1
- package/components/TreeView/TreeViewContext.js +0 -2
- package/components/TreeView/TreeViewContext.js.map +1 -1
- package/components/TreeView/components/TreeViewGroup.js +10 -2
- package/components/TreeView/components/TreeViewGroup.js.map +1 -1
- package/components/TreeView/components/TreeViewNode.js +9 -11
- package/components/TreeView/components/TreeViewNode.js.map +1 -1
- package/components/Typography/Caption.js +8 -8
- package/components/Typography/CodeText.js +3 -3
- package/components/Typography/Text.js +10 -10
- package/components/Typography/Title.js +10 -10
- package/components/Typography/constants.js +1 -1
- package/components/UnorderedList/UnorderedList.js +2 -19
- package/components/UnorderedList/UnorderedList.js.map +1 -1
- package/components/UnorderedList/UnorderedListItem.js +6 -22
- package/components/UnorderedList/UnorderedListItem.js.map +1 -1
- package/components/UnorderedList/index.js +1 -3
- package/components/UnorderedList/index.js.map +1 -1
- package/components/UnorderedListExtended/UnorderedListExtended.js +27 -0
- package/components/UnorderedListExtended/UnorderedListExtended.js.map +1 -0
- package/components/UnorderedListExtended/UnorderedListExtendedItem.js +34 -0
- package/components/UnorderedListExtended/UnorderedListExtendedItem.js.map +1 -0
- package/components/UnorderedListExtended/UnorderedListExtendedItemMarker.js +26 -0
- package/components/UnorderedListExtended/UnorderedListExtendedItemMarker.js.map +1 -0
- package/components/UnorderedListExtended/index.js +5 -0
- package/components/UnorderedListExtended/index.js.map +1 -0
- package/components/UnorderedListExtended/types.js +2 -0
- package/components/UnorderedListExtended/types.js.map +1 -0
- package/components/UploadZone/UploadZone.js +3 -3
- package/components/UploadZone/components/UploadZoneInput.js +2 -2
- package/components/UploadZone/index.js +1 -1
- package/components/WindowResizeListener/WindowResizeListener.js +6 -7
- package/components/WindowResizeListener/WindowResizeListener.js.map +1 -1
- package/components/index.js +10 -26
- package/components/index.js.map +1 -1
- package/index.d.ts +322 -173
- package/index.js +10 -8
- package/index.js.map +1 -1
- package/package.json +5 -1
- package/styles/triplex-next.css +6308 -6157
- package/utils/amountUtils.js +1 -1
- package/chunks/Card.module-C8BxIXlk.js +0 -32
- package/chunks/Card.module-C8BxIXlk.js.map +0 -1
- package/chunks/Carousel.module-DdE9W6X4.js +0 -30
- package/chunks/Carousel.module-DdE9W6X4.js.map +0 -1
- package/chunks/CheckboxTreeExtended.module-aVi9qPTi.js +0 -24
- package/chunks/CheckboxTreeExtended.module-aVi9qPTi.js.map +0 -1
- package/chunks/Confirm.module-B9qmQlVw.js +0 -24
- package/chunks/Confirm.module-B9qmQlVw.js.map +0 -1
- package/chunks/DropdownMobile.module-CVQO-bnb.js +0 -40
- package/chunks/DropdownMobile.module-CVQO-bnb.js.map +0 -1
- package/chunks/Footer.module-Dinu5OkA.js +0 -12
- package/chunks/Footer.module-Dinu5OkA.js.map +0 -1
- package/chunks/HeaderLayoutSidebar.module-DyLHbWa3.js.map +0 -1
- package/chunks/HeaderTabs.module-SqpRHYeu.js +0 -12
- package/chunks/HeaderTabs.module-SqpRHYeu.js.map +0 -1
- package/chunks/HeaderTitle.module-Cj2Bk_xQ.js.map +0 -1
- package/chunks/ImageGalleryExtendedMain.module-CBZoBZpI.js +0 -28
- package/chunks/ImageGalleryExtendedMain.module-CBZoBZpI.js.map +0 -1
- package/chunks/IslandAccordion.module-B34NqgZt.js +0 -44
- package/chunks/IslandAccordion.module-B34NqgZt.js.map +0 -1
- package/chunks/IslandWidgetFooter.module-DNXGzJkz.js +0 -12
- package/chunks/IslandWidgetFooter.module-DNXGzJkz.js.map +0 -1
- package/chunks/IslandWidgetHeader.module-Wd-6jWcn.js +0 -20
- package/chunks/IslandWidgetHeader.module-Wd-6jWcn.js.map +0 -1
- package/chunks/LightBoxControls.module-D3CYb4VY.js +0 -26
- package/chunks/LightBoxControls.module-D3CYb4VY.js.map +0 -1
- package/chunks/LightBoxSideOverlayClose.module-Dj3iATzU.js.map +0 -1
- package/chunks/ListItemTail.module-BMah5xhB.js +0 -18
- package/chunks/ListItemTail.module-BMah5xhB.js.map +0 -1
- package/chunks/ListMasterFooter.module-DnDmseHc.js +0 -14
- package/chunks/ListMasterFooter.module-DnDmseHc.js.map +0 -1
- package/chunks/ModalWindow.module-DAQCizX7.js +0 -28
- package/chunks/ModalWindow.module-DAQCizX7.js.map +0 -1
- package/chunks/Notification.module-VU_Lk2gb.js +0 -34
- package/chunks/Notification.module-VU_Lk2gb.js.map +0 -1
- package/chunks/Overlay.module-BF5z5chI.js +0 -30
- package/chunks/Overlay.module-BF5z5chI.js.map +0 -1
- package/chunks/Page.module-Bq_fi2vC.js +0 -15
- package/chunks/Page.module-Bq_fi2vC.js.map +0 -1
- package/chunks/SMSField.module-CPLmEXPY.js +0 -26
- package/chunks/SMSField.module-CPLmEXPY.js.map +0 -1
- package/chunks/SliderExtendedMarks.module-Dbz1svyX.js +0 -24
- package/chunks/SliderExtendedMarks.module-Dbz1svyX.js.map +0 -1
- package/chunks/SliderExtendedRail-XBqZJdJj.js +0 -50
- package/chunks/SliderExtendedRail-XBqZJdJj.js.map +0 -1
- package/chunks/StatusTracker.module-BpegxGJ8.js +0 -44
- package/chunks/StatusTracker.module-BpegxGJ8.js.map +0 -1
- package/chunks/TableFooter.module-r_izsS9u.js +0 -22
- package/chunks/TableFooter.module-r_izsS9u.js.map +0 -1
- package/chunks/TabsExtended.module-DOxO-O0b.js +0 -26
- package/chunks/TabsExtended.module-DOxO-O0b.js.map +0 -1
- package/chunks/TabsLine.module-BKT6NOs3.js +0 -36
- package/chunks/TabsLine.module-BKT6NOs3.js.map +0 -1
- package/chunks/TooltipDesktop.module-CaPU2whC.js +0 -32
- package/chunks/TooltipDesktop.module-CaPU2whC.js.map +0 -1
- package/chunks/TreeView.module-DFoYkkgl.js +0 -12
- package/chunks/TreeView.module-DFoYkkgl.js.map +0 -1
- package/chunks/utils-DEIy9WE_.js.map +0 -1
- package/components/SliderExtended/components/SliderExtendedDot/useSliderExtendedDotTabIndex.js +0 -55
- package/components/SliderExtended/components/SliderExtendedDot/useSliderExtendedDotTabIndex.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useState, useMemo, useRef, useCallback, useLayoutEffect, useEffect } from "react";
|
|
3
|
-
import { c as clsx } from "../../chunks/vendor-
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
4
4
|
import { CarouselContext } from "./CarouselContext.js";
|
|
5
5
|
import { ECarouselOrientation, ECarouselScrollMode } from "./enums.js";
|
|
6
6
|
import { resolveViewportPadding, useLatestRef } from "./utils.js";
|
|
7
|
-
import { s as styles } from "../../chunks/Carousel.module-
|
|
7
|
+
import { s as styles } from "../../chunks/Carousel.module-B1uqtX8a.js";
|
|
8
8
|
import { CarouselViewport } from "./CarouselViewport.js";
|
|
9
9
|
import { CarouselTrack } from "./CarouselTrack.js";
|
|
10
10
|
import { CarouselItem } from "./CarouselItem.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useContext, useCallback } from "react";
|
|
3
|
-
import { c as clsx } from "../../chunks/vendor-
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
4
4
|
import { CarouselContext } from "./CarouselContext.js";
|
|
5
5
|
import { useMatchMedia } from "../MediaWidth/useMatchMedia.js";
|
|
6
6
|
import { ButtonIcon } from "../Button/ButtonIcon.js";
|
|
7
7
|
import { CaretupStrokeSrvIcon20, CaretleftStrokeSrvIcon20, CaretdownStrokeSrvIcon20, CaretrightStrokeSrvIcon20 } from "@sberbusiness/icons-next";
|
|
8
8
|
import { ECarouselOrientation } from "./enums.js";
|
|
9
|
-
import { s as styles } from "../../chunks/Carousel.module-
|
|
9
|
+
import { s as styles } from "../../chunks/Carousel.module-B1uqtX8a.js";
|
|
10
10
|
const ORIENTATION_TO_PREV_ICON_MAP = {
|
|
11
11
|
[ECarouselOrientation.HORIZONTAL]: /* @__PURE__ */ jsx(CaretleftStrokeSrvIcon20, { paletteIndex: 7 }),
|
|
12
12
|
[ECarouselOrientation.VERTICAL]: /* @__PURE__ */ jsx(CaretupStrokeSrvIcon20, { paletteIndex: 7 })
|
|
13
13
|
};
|
|
14
14
|
const CarouselPrevButton = React__default.forwardRef(
|
|
15
15
|
({ children, className, onClick, ...restProps }, ref) => {
|
|
16
|
-
const { atStart, prevSlide
|
|
16
|
+
const { orientation, atStart, prevSlide } = useContext(CarouselContext);
|
|
17
17
|
const touchDevice = useMatchMedia("(pointer: coarse)");
|
|
18
18
|
const handleClick = useCallback(
|
|
19
19
|
(event) => {
|
|
@@ -33,7 +33,7 @@ const CarouselPrevButton = React__default.forwardRef(
|
|
|
33
33
|
"aria-disabled": atStart,
|
|
34
34
|
onClick: handleClick,
|
|
35
35
|
ref,
|
|
36
|
-
children: children || ORIENTATION_TO_PREV_ICON_MAP[
|
|
36
|
+
children: children || ORIENTATION_TO_PREV_ICON_MAP[orientation]
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
}
|
|
@@ -45,7 +45,7 @@ const ORIENTATION_TO_NEXT_ICON_MAP = {
|
|
|
45
45
|
};
|
|
46
46
|
const CarouselNextButton = React__default.forwardRef(
|
|
47
47
|
({ children, className, onClick, ...restProps }, ref) => {
|
|
48
|
-
const { atEnd, nextSlide
|
|
48
|
+
const { orientation, atEnd, nextSlide } = useContext(CarouselContext);
|
|
49
49
|
const touchDevice = useMatchMedia("(pointer: coarse)");
|
|
50
50
|
const handleClick = useCallback(
|
|
51
51
|
(event) => {
|
|
@@ -65,7 +65,7 @@ const CarouselNextButton = React__default.forwardRef(
|
|
|
65
65
|
"aria-disabled": atEnd,
|
|
66
66
|
onClick: handleClick,
|
|
67
67
|
ref,
|
|
68
|
-
children: children || ORIENTATION_TO_NEXT_ICON_MAP[
|
|
68
|
+
children: children || ORIENTATION_TO_NEXT_ICON_MAP[orientation]
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselButton.js","sources":["../../../src/components/Carousel/CarouselButton.tsx"],"sourcesContent":["import React, { useContext, useCallback } from \"react\";\nimport clsx from \"clsx\";\nimport { CarouselContext } from \"./CarouselContext\";\nimport { useMatchMedia } from \"../MediaWidth/useMatchMedia\";\nimport { ButtonIcon, IButtonIconProps } from \"../Button/ButtonIcon\";\nimport {\n CaretleftStrokeSrvIcon20,\n CaretupStrokeSrvIcon20,\n CaretrightStrokeSrvIcon20,\n CaretdownStrokeSrvIcon20,\n} from \"@sberbusiness/icons-next\";\nimport { ECarouselOrientation } from \"./enums\";\nimport styles from \"./styles/Carousel.module.less\";\n\nconst ORIENTATION_TO_PREV_ICON_MAP: Record<ECarouselOrientation, React.ReactElement> = {\n [ECarouselOrientation.HORIZONTAL]: <CaretleftStrokeSrvIcon20 paletteIndex={7} />,\n [ECarouselOrientation.VERTICAL]: <CaretupStrokeSrvIcon20 paletteIndex={7} />,\n};\n\nexport const CarouselPrevButton = React.forwardRef<HTMLButtonElement, IButtonIconProps>(\n ({ children, className, onClick, ...restProps }, ref) => {\n const { atStart, prevSlide
|
|
1
|
+
{"version":3,"file":"CarouselButton.js","sources":["../../../src/components/Carousel/CarouselButton.tsx"],"sourcesContent":["import React, { useContext, useCallback } from \"react\";\nimport clsx from \"clsx\";\nimport { CarouselContext } from \"./CarouselContext\";\nimport { useMatchMedia } from \"../MediaWidth/useMatchMedia\";\nimport { ButtonIcon, IButtonIconProps } from \"../Button/ButtonIcon\";\nimport {\n CaretleftStrokeSrvIcon20,\n CaretupStrokeSrvIcon20,\n CaretrightStrokeSrvIcon20,\n CaretdownStrokeSrvIcon20,\n} from \"@sberbusiness/icons-next\";\nimport { ECarouselOrientation } from \"./enums\";\nimport styles from \"./styles/Carousel.module.less\";\n\nconst ORIENTATION_TO_PREV_ICON_MAP: Record<ECarouselOrientation, React.ReactElement> = {\n [ECarouselOrientation.HORIZONTAL]: <CaretleftStrokeSrvIcon20 paletteIndex={7} />,\n [ECarouselOrientation.VERTICAL]: <CaretupStrokeSrvIcon20 paletteIndex={7} />,\n};\n\nexport const CarouselPrevButton = React.forwardRef<HTMLButtonElement, IButtonIconProps>(\n ({ children, className, onClick, ...restProps }, ref) => {\n const { orientation, atStart, prevSlide } = useContext(CarouselContext);\n const touchDevice = useMatchMedia(\"(pointer: coarse)\");\n\n const handleClick = useCallback<React.MouseEventHandler<HTMLButtonElement>>(\n (event) => {\n if (!atStart) prevSlide();\n onClick?.(event);\n },\n [atStart, prevSlide, onClick],\n );\n\n if (touchDevice) {\n return null;\n }\n\n return (\n <ButtonIcon\n {...restProps}\n className={clsx(styles.navButton, styles.prev, className)}\n aria-disabled={atStart}\n onClick={handleClick}\n ref={ref}\n >\n {children || ORIENTATION_TO_PREV_ICON_MAP[orientation]}\n </ButtonIcon>\n );\n },\n);\n\nCarouselPrevButton.displayName = \"Carousel.PrevButton\";\n\nconst ORIENTATION_TO_NEXT_ICON_MAP: Record<ECarouselOrientation, React.ReactElement> = {\n [ECarouselOrientation.HORIZONTAL]: <CaretrightStrokeSrvIcon20 paletteIndex={7} />,\n [ECarouselOrientation.VERTICAL]: <CaretdownStrokeSrvIcon20 paletteIndex={7} />,\n};\n\nexport const CarouselNextButton = React.forwardRef<HTMLButtonElement, IButtonIconProps>(\n ({ children, className, onClick, ...restProps }, ref) => {\n const { orientation, atEnd, nextSlide } = useContext(CarouselContext);\n const touchDevice = useMatchMedia(\"(pointer: coarse)\");\n\n const handleClick = useCallback<React.MouseEventHandler<HTMLButtonElement>>(\n (event) => {\n if (!atEnd) nextSlide();\n onClick?.(event);\n },\n [atEnd, nextSlide, onClick],\n );\n\n if (touchDevice) {\n return null;\n }\n\n return (\n <ButtonIcon\n {...restProps}\n className={clsx(styles.navButton, styles.next, className)}\n aria-disabled={atEnd}\n onClick={handleClick}\n ref={ref}\n >\n {children || ORIENTATION_TO_NEXT_ICON_MAP[orientation]}\n </ButtonIcon>\n );\n },\n);\n\nCarouselNextButton.displayName = \"Carousel.NextButton\";\n"],"names":["React"],"mappings":";;;;;;;;;AAcA,MAAM,+BAAiF;AAAA,EACnF,CAAC,qBAAqB,UAAU,GAAG,oBAAC,0BAAA,EAAyB,cAAc,GAAG;AAAA,EAC9E,CAAC,qBAAqB,QAAQ,GAAG,oBAAC,wBAAA,EAAuB,cAAc,EAAA,CAAG;AAC9E;AAEO,MAAM,qBAAqBA,eAAM;AAAA,EACpC,CAAC,EAAE,UAAU,WAAW,SAAS,GAAG,UAAA,GAAa,QAAQ;AACrD,UAAM,EAAE,aAAa,SAAS,UAAA,IAAc,WAAW,eAAe;AACtE,UAAM,cAAc,cAAc,mBAAmB;AAErD,UAAM,cAAc;AAAA,MAChB,CAAC,UAAU;AACP,YAAI,CAAC,QAAS,WAAA;AACd,2CAAU;AAAA,MACd;AAAA,MACA,CAAC,SAAS,WAAW,OAAO;AAAA,IAAA;AAGhC,QAAI,aAAa;AACb,aAAO;AAAA,IACX;AAEA,WACI;AAAA,MAAC;AAAA,MAAA;AAAA,QACI,GAAG;AAAA,QACJ,WAAW,KAAK,OAAO,WAAW,OAAO,MAAM,SAAS;AAAA,QACxD,iBAAe;AAAA,QACf,SAAS;AAAA,QACT;AAAA,QAEC,UAAA,YAAY,6BAA6B,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAGjE;AACJ;AAEA,mBAAmB,cAAc;AAEjC,MAAM,+BAAiF;AAAA,EACnF,CAAC,qBAAqB,UAAU,GAAG,oBAAC,2BAAA,EAA0B,cAAc,GAAG;AAAA,EAC/E,CAAC,qBAAqB,QAAQ,GAAG,oBAAC,0BAAA,EAAyB,cAAc,EAAA,CAAG;AAChF;AAEO,MAAM,qBAAqBA,eAAM;AAAA,EACpC,CAAC,EAAE,UAAU,WAAW,SAAS,GAAG,UAAA,GAAa,QAAQ;AACrD,UAAM,EAAE,aAAa,OAAO,UAAA,IAAc,WAAW,eAAe;AACpE,UAAM,cAAc,cAAc,mBAAmB;AAErD,UAAM,cAAc;AAAA,MAChB,CAAC,UAAU;AACP,YAAI,CAAC,MAAO,WAAA;AACZ,2CAAU;AAAA,MACd;AAAA,MACA,CAAC,OAAO,WAAW,OAAO;AAAA,IAAA;AAG9B,QAAI,aAAa;AACb,aAAO;AAAA,IACX;AAEA,WACI;AAAA,MAAC;AAAA,MAAA;AAAA,QACI,GAAG;AAAA,QACJ,WAAW,KAAK,OAAO,WAAW,OAAO,MAAM,SAAS;AAAA,QACxD,iBAAe;AAAA,QACf,SAAS;AAAA,QACT;AAAA,QAEC,UAAA,YAAY,6BAA6B,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAGjE;AACJ;AAEA,mBAAmB,cAAc;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useContext, useRef, useCallback, useEffect } from "react";
|
|
3
|
-
import { c as clsx } from "../../chunks/vendor-
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
4
4
|
import { CarouselContext } from "./CarouselContext.js";
|
|
5
5
|
import { mergeRefs, useLatestRef } from "./utils.js";
|
|
6
6
|
import { ECarouselOrientation, ECarouselScrollMode } from "./enums.js";
|
|
7
7
|
import { ButtonBase } from "../Button/ButtonBase.js";
|
|
8
|
-
import { s as styles } from "../../chunks/Carousel.module-
|
|
8
|
+
import { s as styles } from "../../chunks/Carousel.module-B1uqtX8a.js";
|
|
9
9
|
const ORIENTATION_TO_NAVIGATION_KEYS = {
|
|
10
10
|
[ECarouselOrientation.HORIZONTAL]: ["ArrowRight", "ArrowLeft"],
|
|
11
11
|
[ECarouselOrientation.VERTICAL]: ["ArrowDown", "ArrowUp"]
|
|
@@ -53,6 +53,7 @@ const CarouselIndicators = React__default.forwardRef(
|
|
|
53
53
|
}
|
|
54
54
|
return clickHandlersCache.current.get(slideIndex);
|
|
55
55
|
},
|
|
56
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
57
|
[goToSlide]
|
|
57
58
|
);
|
|
58
59
|
const handleKeyDown = useCallback(
|
|
@@ -63,14 +64,14 @@ const CarouselIndicators = React__default.forwardRef(
|
|
|
63
64
|
const homeKeyMatched = event.key === "Home";
|
|
64
65
|
const endKeyMatched = event.key === "End";
|
|
65
66
|
if (nextKeyMatched || prevKeyMatched || homeKeyMatched || endKeyMatched) {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
67
|
+
const currentIndexInArray2 = activeIndices.indexOf(currentIndexRef.current);
|
|
68
|
+
if (currentIndexInArray2 !== -1) {
|
|
68
69
|
event.preventDefault();
|
|
69
|
-
let nextIndexInArray =
|
|
70
|
+
let nextIndexInArray = currentIndexInArray2;
|
|
70
71
|
if (nextKeyMatched) {
|
|
71
|
-
nextIndexInArray = (
|
|
72
|
+
nextIndexInArray = Math.min(currentIndexInArray2 + 1, totalPages - 1);
|
|
72
73
|
} else if (prevKeyMatched) {
|
|
73
|
-
nextIndexInArray = (
|
|
74
|
+
nextIndexInArray = Math.max(currentIndexInArray2 - 1, 0);
|
|
74
75
|
} else if (homeKeyMatched) {
|
|
75
76
|
nextIndexInArray = 0;
|
|
76
77
|
} else if (endKeyMatched) {
|
|
@@ -82,6 +83,7 @@ const CarouselIndicators = React__default.forwardRef(
|
|
|
82
83
|
}
|
|
83
84
|
onKeyDown == null ? void 0 : onKeyDown(event);
|
|
84
85
|
},
|
|
86
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
85
87
|
[activeIndices, totalPages, goToSlide, onKeyDown]
|
|
86
88
|
);
|
|
87
89
|
useEffect(() => {
|
|
@@ -108,6 +110,13 @@ const CarouselIndicators = React__default.forwardRef(
|
|
|
108
110
|
return () => cancelAnimationFrame(rafId);
|
|
109
111
|
}, [currentIndex]);
|
|
110
112
|
if (scrollMode === ECarouselScrollMode.ITEM || totalPages < 1) return null;
|
|
113
|
+
const currentIndexInArray = activeIndices.indexOf(currentIndex);
|
|
114
|
+
let startWindowIndex = 0;
|
|
115
|
+
if (totalPages > 5) {
|
|
116
|
+
startWindowIndex = currentIndexInArray - Math.floor(5 / 2);
|
|
117
|
+
startWindowIndex = Math.max(0, Math.min(startWindowIndex, totalPages - 5));
|
|
118
|
+
}
|
|
119
|
+
const endWindowIndex = startWindowIndex + 5;
|
|
111
120
|
return /* @__PURE__ */ jsx(
|
|
112
121
|
"div",
|
|
113
122
|
{
|
|
@@ -118,8 +127,12 @@ const CarouselIndicators = React__default.forwardRef(
|
|
|
118
127
|
onKeyDown: handleKeyDown,
|
|
119
128
|
ref: combinedRef,
|
|
120
129
|
children: activeIndices.map((slideIndex, index) => {
|
|
130
|
+
const visible = index >= startWindowIndex && index < endWindowIndex;
|
|
131
|
+
if (!visible) return null;
|
|
121
132
|
const selected = currentIndex === slideIndex;
|
|
122
133
|
const page = index + 1;
|
|
134
|
+
const startEdge = index === startWindowIndex && startWindowIndex > 0;
|
|
135
|
+
const endEdge = index === endWindowIndex - 1 && endWindowIndex < totalPages;
|
|
123
136
|
const resolvedIndicatorProps = typeof indicatorProps === "function" ? indicatorProps({ index, page, selected }) : indicatorProps;
|
|
124
137
|
const indicatorRef = getIndicatorRef(slideIndex);
|
|
125
138
|
const indicatorClickHandler = getIndicatorClickHandler(slideIndex);
|
|
@@ -127,7 +140,11 @@ const CarouselIndicators = React__default.forwardRef(
|
|
|
127
140
|
...resolvedIndicatorProps,
|
|
128
141
|
className: clsx(
|
|
129
142
|
styles.indicator,
|
|
130
|
-
{
|
|
143
|
+
{
|
|
144
|
+
[styles.active]: selected,
|
|
145
|
+
[styles.startEdge]: startEdge,
|
|
146
|
+
[styles.endEdge]: endEdge
|
|
147
|
+
},
|
|
131
148
|
resolvedIndicatorProps == null ? void 0 : resolvedIndicatorProps.className
|
|
132
149
|
),
|
|
133
150
|
role: "tab",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselIndicators.js","sources":["../../../src/components/Carousel/CarouselIndicators.tsx"],"sourcesContent":["import React, { useContext, useRef, useCallback, useEffect } from \"react\";\nimport clsx from \"clsx\";\nimport { ICarouselIndicatorsProps, TCarouselIndicatorProps } from \"./types\";\nimport { CarouselContext } from \"./CarouselContext\";\nimport { mergeRefs, useLatestRef } from \"./utils\";\nimport { ECarouselScrollMode, ECarouselOrientation } from \"./enums\";\nimport { ButtonBase } from \"../Button/ButtonBase\";\nimport styles from \"./styles/Carousel.module.less\";\n\nconst ORIENTATION_TO_NAVIGATION_KEYS = {\n [ECarouselOrientation.HORIZONTAL]: [\"ArrowRight\", \"ArrowLeft\"],\n [ECarouselOrientation.VERTICAL]: [\"ArrowDown\", \"ArrowUp\"],\n} as const;\n\nexport const CarouselIndicators = React.forwardRef<HTMLDivElement, ICarouselIndicatorsProps>(\n ({ className, onKeyDown, indicatorProps, renderIndicator, ...restProps }, ref) => {\n const { currentIndex, orientation, scrollMode, activeIndices, goToSlide, orientationRef, currentIndexRef } =\n useContext(CarouselContext);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const combinedRef = mergeRefs(ref, containerRef);\n\n const buttonRefs = useRef<Map<number, HTMLButtonElement>>(new Map());\n const indicatorRefsCache = useRef<Map<number, React.RefCallback<HTMLButtonElement>>>(new Map());\n const clickHandlersCache = useRef<Map<number, React.MouseEventHandler<HTMLButtonElement>>>(new Map());\n\n // Храним актуальный indicatorProps в рефе для стабильных колбэков клика\n const indicatorPropsRef = useLatestRef(indicatorProps);\n // Защита от устаревшего замыкания activeIndices в кэшированных кликах\n const activeIndicesRef = useLatestRef(activeIndices);\n\n const totalPages = activeIndices.length;\n\n const getIndicatorRef = useCallback((slideIndex: number) => {\n if (!indicatorRefsCache.current.has(slideIndex)) {\n indicatorRefsCache.current.set(slideIndex, (node) => {\n if (node) {\n buttonRefs.current.set(slideIndex, node);\n } else {\n buttonRefs.current.delete(slideIndex);\n }\n });\n }\n // Безопасно: запись выше гарантирует наличие ключа в кэше.\n return indicatorRefsCache.current.get(slideIndex)!;\n }, []);\n\n const getIndicatorClickHandler = useCallback(\n (slideIndex: number) => {\n if (!clickHandlersCache.current.has(slideIndex)) {\n clickHandlersCache.current.set(slideIndex, (event) => {\n goToSlide(slideIndex);\n\n const currentPropsInput = indicatorPropsRef.current;\n if (!currentPropsInput) return;\n\n const latestActiveIndices = activeIndicesRef.current;\n const indexInArray = latestActiveIndices.indexOf(slideIndex);\n\n if (indexInArray !== -1) {\n const page = indexInArray + 1;\n const selected = currentIndexRef.current === slideIndex;\n const resolvedProps =\n typeof currentPropsInput === \"function\"\n ? currentPropsInput({ index: indexInArray, page, selected })\n : currentPropsInput;\n\n resolvedProps?.onClick?.(event);\n }\n });\n }\n // Безопасно: запись выше гарантирует наличие ключа в кэше.\n return clickHandlersCache.current.get(slideIndex)!;\n },\n [goToSlide],\n );\n\n const handleKeyDown = useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (event) => {\n const [nextKey, prevKey] = ORIENTATION_TO_NAVIGATION_KEYS[orientationRef.current];\n const nextKeyMatched = event.key === nextKey;\n const prevKeyMatched = event.key === prevKey;\n const homeKeyMatched = event.key === \"Home\";\n const endKeyMatched = event.key === \"End\";\n\n if (nextKeyMatched || prevKeyMatched || homeKeyMatched || endKeyMatched) {\n const currentIndexInArray = activeIndices.indexOf(currentIndexRef.current);\n\n if (currentIndexInArray !== -1) {\n event.preventDefault();\n\n let nextIndexInArray = currentIndexInArray;\n if (nextKeyMatched) {\n nextIndexInArray = (currentIndexInArray + 1) % totalPages;\n } else if (prevKeyMatched) {\n nextIndexInArray = (currentIndexInArray - 1 + totalPages) % totalPages;\n } else if (homeKeyMatched) {\n nextIndexInArray = 0;\n } else if (endKeyMatched) {\n nextIndexInArray = totalPages - 1;\n }\n\n const nextSlideIndex = activeIndices[nextIndexInArray];\n goToSlide(nextSlideIndex);\n }\n }\n\n onKeyDown?.(event);\n },\n [activeIndices, totalPages, goToSlide, onKeyDown],\n );\n\n useEffect(() => {\n const activeSet = new Set(activeIndices);\n\n for (const key of indicatorRefsCache.current.keys()) {\n if (!activeSet.has(key)) {\n indicatorRefsCache.current.delete(key);\n buttonRefs.current.delete(key);\n }\n }\n for (const key of clickHandlersCache.current.keys()) {\n if (!activeSet.has(key)) {\n clickHandlersCache.current.delete(key);\n }\n }\n }, [activeIndices]);\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container?.contains(document.activeElement)) return;\n\n const rafId = requestAnimationFrame(() => {\n const activeButton = buttonRefs.current.get(currentIndexRef.current);\n activeButton?.focus();\n });\n\n return () => cancelAnimationFrame(rafId);\n }, [currentIndex]);\n\n if (scrollMode === ECarouselScrollMode.ITEM || totalPages < 1) return null;\n\n return (\n <div\n {...restProps}\n className={clsx(styles.indicators, className)}\n role=\"tablist\"\n aria-orientation={orientation}\n onKeyDown={handleKeyDown}\n ref={combinedRef}\n >\n {activeIndices.map((slideIndex, index) => {\n const selected = currentIndex === slideIndex;\n const page = index + 1;\n\n const resolvedIndicatorProps =\n typeof indicatorProps === \"function\"\n ? indicatorProps({ index, page, selected })\n : indicatorProps;\n\n const indicatorRef = getIndicatorRef(slideIndex);\n const indicatorClickHandler = getIndicatorClickHandler(slideIndex);\n\n const providedIndicatorProps: TCarouselIndicatorProps = {\n ...resolvedIndicatorProps,\n className: clsx(\n styles.indicator,\n { [styles.active]: selected },\n resolvedIndicatorProps?.className,\n ),\n role: \"tab\",\n tabIndex: selected ? 0 : -1,\n \"aria-selected\": selected,\n onClick: indicatorClickHandler,\n };\n\n if (renderIndicator) {\n return (\n <React.Fragment key={slideIndex}>\n {renderIndicator({\n index,\n page,\n selected,\n props: providedIndicatorProps,\n ref: indicatorRef,\n })}\n </React.Fragment>\n );\n }\n\n return <ButtonBase key={slideIndex} {...providedIndicatorProps} ref={indicatorRef} />;\n })}\n </div>\n );\n },\n);\n\nCarouselIndicators.displayName = \"Carousel.Indicators\";\n"],"names":["React"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"CarouselIndicators.js","sources":["../../../src/components/Carousel/CarouselIndicators.tsx"],"sourcesContent":["import React, { useContext, useRef, useCallback, useEffect } from \"react\";\nimport clsx from \"clsx\";\nimport { ICarouselIndicatorsProps, TCarouselIndicatorProps } from \"./types\";\nimport { CarouselContext } from \"./CarouselContext\";\nimport { mergeRefs, useLatestRef } from \"./utils\";\nimport { ECarouselScrollMode, ECarouselOrientation } from \"./enums\";\nimport { ButtonBase } from \"../Button/ButtonBase\";\nimport styles from \"./styles/Carousel.module.less\";\n\nconst ORIENTATION_TO_NAVIGATION_KEYS = {\n [ECarouselOrientation.HORIZONTAL]: [\"ArrowRight\", \"ArrowLeft\"],\n [ECarouselOrientation.VERTICAL]: [\"ArrowDown\", \"ArrowUp\"],\n} as const;\n\nexport const CarouselIndicators = React.forwardRef<HTMLDivElement, ICarouselIndicatorsProps>(\n ({ className, onKeyDown, indicatorProps, renderIndicator, ...restProps }, ref) => {\n const { currentIndex, orientation, scrollMode, activeIndices, goToSlide, orientationRef, currentIndexRef } =\n useContext(CarouselContext);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const combinedRef = mergeRefs(ref, containerRef);\n\n const buttonRefs = useRef<Map<number, HTMLButtonElement>>(new Map());\n const indicatorRefsCache = useRef<Map<number, React.RefCallback<HTMLButtonElement>>>(new Map());\n const clickHandlersCache = useRef<Map<number, React.MouseEventHandler<HTMLButtonElement>>>(new Map());\n\n // Храним актуальный indicatorProps в рефе для стабильных колбэков клика\n const indicatorPropsRef = useLatestRef(indicatorProps);\n // Защита от устаревшего замыкания activeIndices в кэшированных кликах\n const activeIndicesRef = useLatestRef(activeIndices);\n\n const totalPages = activeIndices.length;\n\n const getIndicatorRef = useCallback((slideIndex: number) => {\n if (!indicatorRefsCache.current.has(slideIndex)) {\n indicatorRefsCache.current.set(slideIndex, (node) => {\n if (node) {\n buttonRefs.current.set(slideIndex, node);\n } else {\n buttonRefs.current.delete(slideIndex);\n }\n });\n }\n // Безопасно: запись выше гарантирует наличие ключа в кэше.\n return indicatorRefsCache.current.get(slideIndex)!;\n }, []);\n\n const getIndicatorClickHandler = useCallback(\n (slideIndex: number) => {\n if (!clickHandlersCache.current.has(slideIndex)) {\n clickHandlersCache.current.set(slideIndex, (event) => {\n goToSlide(slideIndex);\n\n const currentPropsInput = indicatorPropsRef.current;\n if (!currentPropsInput) return;\n\n const latestActiveIndices = activeIndicesRef.current;\n const indexInArray = latestActiveIndices.indexOf(slideIndex);\n\n if (indexInArray !== -1) {\n const page = indexInArray + 1;\n const selected = currentIndexRef.current === slideIndex;\n const resolvedProps =\n typeof currentPropsInput === \"function\"\n ? currentPropsInput({ index: indexInArray, page, selected })\n : currentPropsInput;\n\n resolvedProps?.onClick?.(event);\n }\n });\n }\n // Безопасно: запись выше гарантирует наличие ключа в кэше.\n return clickHandlersCache.current.get(slideIndex)!;\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [goToSlide],\n );\n\n const handleKeyDown = useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (event) => {\n const [nextKey, prevKey] = ORIENTATION_TO_NAVIGATION_KEYS[orientationRef.current];\n const nextKeyMatched = event.key === nextKey;\n const prevKeyMatched = event.key === prevKey;\n const homeKeyMatched = event.key === \"Home\";\n const endKeyMatched = event.key === \"End\";\n\n if (nextKeyMatched || prevKeyMatched || homeKeyMatched || endKeyMatched) {\n const currentIndexInArray = activeIndices.indexOf(currentIndexRef.current);\n\n if (currentIndexInArray !== -1) {\n event.preventDefault();\n\n let nextIndexInArray = currentIndexInArray;\n if (nextKeyMatched) {\n nextIndexInArray = Math.min(currentIndexInArray + 1, totalPages - 1);\n } else if (prevKeyMatched) {\n nextIndexInArray = Math.max(currentIndexInArray - 1, 0);\n } else if (homeKeyMatched) {\n nextIndexInArray = 0;\n } else if (endKeyMatched) {\n nextIndexInArray = totalPages - 1;\n }\n\n const nextSlideIndex = activeIndices[nextIndexInArray];\n goToSlide(nextSlideIndex);\n }\n }\n\n onKeyDown?.(event);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndices, totalPages, goToSlide, onKeyDown],\n );\n\n useEffect(() => {\n const activeSet = new Set(activeIndices);\n\n for (const key of indicatorRefsCache.current.keys()) {\n if (!activeSet.has(key)) {\n indicatorRefsCache.current.delete(key);\n buttonRefs.current.delete(key);\n }\n }\n for (const key of clickHandlersCache.current.keys()) {\n if (!activeSet.has(key)) {\n clickHandlersCache.current.delete(key);\n }\n }\n }, [activeIndices]);\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container?.contains(document.activeElement)) return;\n\n const rafId = requestAnimationFrame(() => {\n const activeButton = buttonRefs.current.get(currentIndexRef.current);\n activeButton?.focus();\n });\n\n return () => cancelAnimationFrame(rafId);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentIndex]);\n\n if (scrollMode === ECarouselScrollMode.ITEM || totalPages < 1) return null;\n\n const currentIndexInArray = activeIndices.indexOf(currentIndex);\n\n let startWindowIndex = 0;\n if (totalPages > 5) {\n startWindowIndex = currentIndexInArray - Math.floor(5 / 2);\n startWindowIndex = Math.max(0, Math.min(startWindowIndex, totalPages - 5));\n }\n const endWindowIndex = startWindowIndex + 5;\n\n return (\n <div\n {...restProps}\n className={clsx(styles.indicators, className)}\n role=\"tablist\"\n aria-orientation={orientation}\n onKeyDown={handleKeyDown}\n ref={combinedRef}\n >\n {activeIndices.map((slideIndex, index) => {\n const visible = index >= startWindowIndex && index < endWindowIndex;\n if (!visible) return null;\n\n const selected = currentIndex === slideIndex;\n const page = index + 1;\n\n const startEdge = index === startWindowIndex && startWindowIndex > 0;\n const endEdge = index === endWindowIndex - 1 && endWindowIndex < totalPages;\n\n const resolvedIndicatorProps =\n typeof indicatorProps === \"function\"\n ? indicatorProps({ index, page, selected })\n : indicatorProps;\n\n const indicatorRef = getIndicatorRef(slideIndex);\n const indicatorClickHandler = getIndicatorClickHandler(slideIndex);\n\n const providedIndicatorProps: TCarouselIndicatorProps = {\n ...resolvedIndicatorProps,\n className: clsx(\n styles.indicator,\n {\n [styles.active]: selected,\n [styles.startEdge]: startEdge,\n [styles.endEdge]: endEdge,\n },\n resolvedIndicatorProps?.className,\n ),\n role: \"tab\",\n tabIndex: selected ? 0 : -1,\n \"aria-selected\": selected,\n onClick: indicatorClickHandler,\n };\n\n if (renderIndicator) {\n return (\n <React.Fragment key={slideIndex}>\n {renderIndicator({\n index,\n page,\n selected,\n props: providedIndicatorProps,\n ref: indicatorRef,\n })}\n </React.Fragment>\n );\n }\n\n return <ButtonBase key={slideIndex} {...providedIndicatorProps} ref={indicatorRef} />;\n })}\n </div>\n );\n },\n);\n\nCarouselIndicators.displayName = \"Carousel.Indicators\";\n"],"names":["React","currentIndexInArray"],"mappings":"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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useContext, useRef, useCallback } from "react";
|
|
3
|
-
import { c as clsx } from "../../chunks/vendor-
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
4
4
|
import { CarouselContext } from "./CarouselContext.js";
|
|
5
5
|
import { mergeRefs } from "./utils.js";
|
|
6
|
-
import { s as styles } from "../../chunks/Carousel.module-
|
|
6
|
+
import { s as styles } from "../../chunks/Carousel.module-B1uqtX8a.js";
|
|
7
7
|
const CarouselItem = React__default.forwardRef(
|
|
8
8
|
({ children, className, index, ...restProps }, ref) => {
|
|
9
9
|
const { slideRefs } = useContext(CarouselContext);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useContext } from "react";
|
|
3
|
-
import { c as clsx } from "../../chunks/vendor-
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
4
4
|
import { CarouselContext } from "./CarouselContext.js";
|
|
5
5
|
import { mergeRefs } from "./utils.js";
|
|
6
6
|
import { ORIENTATION_TRANSFORM } from "./constants.js";
|
|
7
|
-
import { s as styles } from "../../chunks/Carousel.module-
|
|
7
|
+
import { s as styles } from "../../chunks/Carousel.module-B1uqtX8a.js";
|
|
8
8
|
const CarouselTrack = React__default.forwardRef(
|
|
9
9
|
({ children, className, style, ...restProps }, ref) => {
|
|
10
10
|
const { gap, orientation, offset, trackRef } = useContext(CarouselContext);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useContext, useRef, useCallback, useEffect } from "react";
|
|
3
|
-
import { c as clsx } from "../../chunks/vendor-
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
4
4
|
import { CarouselContext } from "./CarouselContext.js";
|
|
5
5
|
import { mergeRefs } from "./utils.js";
|
|
6
6
|
import { ORIENTATION_TRANSFORM } from "./constants.js";
|
|
7
7
|
import { ECarouselOrientation } from "./enums.js";
|
|
8
|
-
import { s as styles } from "../../chunks/Carousel.module-
|
|
8
|
+
import { s as styles } from "../../chunks/Carousel.module-B1uqtX8a.js";
|
|
9
9
|
const ORIENTATION_TO_TOUCH_KEY = {
|
|
10
10
|
[ECarouselOrientation.HORIZONTAL]: "clientX",
|
|
11
11
|
[ECarouselOrientation.VERTICAL]: "clientY"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useState, useRef, useCallback, useEffect } from "react";
|
|
3
3
|
import { scrollSmoothHorizontally } from "../../utils/scroll.js";
|
|
4
|
-
import { i as isEqual } from "../../chunks/vendor-
|
|
5
|
-
const carouselExtended = "
|
|
4
|
+
import { i as isEqual } from "../../chunks/vendor-D4wvHis9.js";
|
|
5
|
+
const carouselExtended = "carouselExtended__58c0970b";
|
|
6
6
|
const styles = {
|
|
7
7
|
carouselExtended
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default from "react";
|
|
3
|
-
import { c as clsx } from "../../chunks/vendor-
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
4
4
|
import { CheckboxbulkStrokeSrvIcon24, CheckboxtickStrokeSrvIcon24 } from "@sberbusiness/icons-next";
|
|
5
5
|
import { ETextSize } from "../Typography/enums.js";
|
|
6
6
|
import "../Typography/Caption.js";
|
|
@@ -9,15 +9,15 @@ import { Text } from "../Typography/Text.js";
|
|
|
9
9
|
import "../Typography/Title.js";
|
|
10
10
|
import { EComponentSize } from "../../enums/EComponentSize.js";
|
|
11
11
|
import { createSizeToClassNameMap } from "../../utils/classNameMaps.js";
|
|
12
|
-
const label = "
|
|
13
|
-
const sm = "
|
|
14
|
-
const nonempty = "
|
|
15
|
-
const md = "
|
|
16
|
-
const lg = "
|
|
17
|
-
const disabled = "
|
|
18
|
-
const checkbox = "
|
|
19
|
-
const checkboxIcon = "
|
|
20
|
-
const checkmarkIcon = "
|
|
12
|
+
const label = "label__eccb491a";
|
|
13
|
+
const sm = "sm__4901ea68";
|
|
14
|
+
const nonempty = "nonempty__12e6066b";
|
|
15
|
+
const md = "md__5171b230";
|
|
16
|
+
const lg = "lg__3b193db4";
|
|
17
|
+
const disabled = "disabled__278ff270";
|
|
18
|
+
const checkbox = "checkbox__3d4a248e";
|
|
19
|
+
const checkboxIcon = "checkboxIcon__1667e86d";
|
|
20
|
+
const checkmarkIcon = "checkmarkIcon__31b84f26";
|
|
21
21
|
const styles = {
|
|
22
22
|
label,
|
|
23
23
|
sm,
|
|
@@ -45,22 +45,18 @@ const Checkbox = React__default.forwardRef((props, ref) => {
|
|
|
45
45
|
size = EComponentSize.MD,
|
|
46
46
|
...inputAttributes
|
|
47
47
|
} = props;
|
|
48
|
-
const
|
|
49
|
-
const classNamesLabel = clsx(
|
|
48
|
+
const labelClassName = clsx(
|
|
50
49
|
styles.label,
|
|
51
50
|
SIZE_TO_CLASS_NAME_MAP[size],
|
|
52
51
|
{ [styles.disabled]: !!disabled2, [styles.nonempty]: !!children },
|
|
53
52
|
className,
|
|
54
53
|
labelAttributes == null ? void 0 : labelAttributes.className
|
|
55
54
|
);
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
return /* @__PURE__ */ jsxs("label", { ...labelAttributes, className: classNamesLabel, "data-tx": "1.42.0", children: [
|
|
61
|
-
/* @__PURE__ */ jsx("input", { type: "checkbox", className: classNames, disabled: disabled2, ...inputAttributes, ref }),
|
|
55
|
+
const CheckmarkIcon = bulk ? CheckboxbulkStrokeSrvIcon24 : CheckboxtickStrokeSrvIcon24;
|
|
56
|
+
return /* @__PURE__ */ jsxs("label", { ...labelAttributes, className: labelClassName, "data-tx": "1.44.0", children: [
|
|
57
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", className: styles.checkbox, disabled: disabled2, ...inputAttributes, ref }),
|
|
62
58
|
/* @__PURE__ */ jsx("span", { className: styles.checkboxIcon }),
|
|
63
|
-
|
|
59
|
+
/* @__PURE__ */ jsx(CheckmarkIcon, { className: styles.checkmarkIcon, paletteIndex: 7 }),
|
|
64
60
|
children && /* @__PURE__ */ jsx(Text, { size: SIZE_TO_TEXT_SIZE_MAP[size], tag: "div", children })
|
|
65
61
|
] });
|
|
66
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\nimport { CheckboxbulkStrokeSrvIcon24, CheckboxtickStrokeSrvIcon24 } from \"@sberbusiness/icons-next\";\nimport { ETextSize, Text } from \"../Typography\";\nimport { EComponentSize } from \"../../enums/EComponentSize\";\nimport { createSizeToClassNameMap } from \"../../utils/classNameMaps\";\nimport styles from \"./styles/Checkbox.module.less\";\n\n/** Свойства компонента Checkbox. */\nexport interface ICheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> {\n /**
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\nimport { CheckboxbulkStrokeSrvIcon24, CheckboxtickStrokeSrvIcon24 } from \"@sberbusiness/icons-next\";\nimport { ETextSize, Text } from \"../Typography\";\nimport { EComponentSize } from \"../../enums/EComponentSize\";\nimport { createSizeToClassNameMap } from \"../../utils/classNameMaps\";\nimport styles from \"./styles/Checkbox.module.less\";\n\n/** Свойства компонента Checkbox. */\nexport interface ICheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> {\n /** Атрибуты корневого label. Его className объединяется с className компонента. */\n labelAttributes?: React.LabelHTMLAttributes<HTMLLabelElement>;\n /** Признак частичного типа выбора: вместо галочки используется bulk-иконка. Её видимость, как и у галочки, определяется checked. По умолчанию false. */\n bulk?: boolean;\n /** Размер чекбокса. По умолчанию EComponentSize.MD. */\n size?: EComponentSize;\n /** Контент лейбла чекбокса. */\n children?: React.ReactNode;\n}\n\n/** Соответствие размера чекбокса размеру текста лейбла. */\nconst SIZE_TO_TEXT_SIZE_MAP: Record<EComponentSize, ETextSize> = {\n [EComponentSize.LG]: ETextSize.B2,\n [EComponentSize.MD]: ETextSize.B3,\n [EComponentSize.SM]: ETextSize.B4,\n};\n\n/** Соответствие размера чекбокса имени класса. */\nconst SIZE_TO_CLASS_NAME_MAP = createSizeToClassNameMap(styles);\n\n/**\n * Чекбокс с описанием.\n * Корневой элемент — label, внутри него нативный input[type=\"checkbox\"], на который указывает ref.\n * className применяется к корневому label, остальные props — к input.\n */\nexport const Checkbox = React.forwardRef<HTMLInputElement, ICheckboxProps>((props, ref) => {\n const {\n children,\n className,\n disabled,\n bulk,\n labelAttributes,\n size = EComponentSize.MD,\n ...inputAttributes\n } = props;\n const labelClassName = clsx(\n styles.label,\n SIZE_TO_CLASS_NAME_MAP[size],\n { [styles.disabled]: !!disabled, [styles.nonempty]: !!children },\n className,\n labelAttributes?.className,\n );\n const CheckmarkIcon = bulk ? CheckboxbulkStrokeSrvIcon24 : CheckboxtickStrokeSrvIcon24;\n\n return (\n <label {...labelAttributes} className={labelClassName} data-tx={process.env.npm_package_version}>\n <input type=\"checkbox\" className={styles.checkbox} disabled={disabled} {...inputAttributes} ref={ref} />\n <span className={styles.checkboxIcon} />\n <CheckmarkIcon className={styles.checkmarkIcon} paletteIndex={7} />\n {children && (\n <Text size={SIZE_TO_TEXT_SIZE_MAP[size]} tag=\"div\">\n {children}\n </Text>\n )}\n </label>\n );\n});\n\nCheckbox.displayName = \"Checkbox\";\n"],"names":["React","disabled"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,wBAA2D;AAAA,EAC7D,CAAC,eAAe,EAAE,GAAG,UAAU;AAAA,EAC/B,CAAC,eAAe,EAAE,GAAG,UAAU;AAAA,EAC/B,CAAC,eAAe,EAAE,GAAG,UAAU;AACnC;AAGA,MAAM,yBAAyB,yBAAyB,MAAM;AAOvD,MAAM,WAAWA,eAAM,WAA6C,CAAC,OAAO,QAAQ;AACvF,QAAM;AAAA,IACF;AAAA,IACA;AAAA,IACA,UAAAC;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,eAAe;AAAA,IACtB,GAAG;AAAA,EAAA,IACH;AACJ,QAAM,iBAAiB;AAAA,IACnB,OAAO;AAAA,IACP,uBAAuB,IAAI;AAAA,IAC3B,EAAE,CAAC,OAAO,QAAQ,GAAG,CAAC,CAACA,WAAU,CAAC,OAAO,QAAQ,GAAG,CAAC,CAAC,SAAA;AAAA,IACtD;AAAA,IACA,mDAAiB;AAAA,EAAA;AAErB,QAAM,gBAAgB,OAAO,8BAA8B;AAE3D,SACI,qBAAC,WAAO,GAAG,iBAAiB,WAAW,gBAAgB,WAAS,UAC5D,UAAA;AAAA,IAAA,oBAAC,SAAA,EAAM,MAAK,YAAW,WAAW,OAAO,UAAU,UAAAA,WAAqB,GAAG,iBAAiB,IAAA,CAAU;AAAA,wBACrG,QAAA,EAAK,WAAW,OAAO,cAAc;AAAA,wBACrC,eAAA,EAAc,WAAW,OAAO,eAAe,cAAc,GAAG;AAAA,IAChE,gCACI,MAAA,EAAK,MAAM,sBAAsB,IAAI,GAAG,KAAI,OACxC,SAAA,CACL;AAAA,EAAA,GAER;AAER,CAAC;AAED,SAAS,cAAc;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default from "react";
|
|
3
|
-
import { c as clsx } from "../../chunks/vendor-
|
|
4
|
-
const checkboxXGroup = "
|
|
5
|
-
const label = "
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
4
|
+
const checkboxXGroup = "checkboxXGroup__97db0e54";
|
|
5
|
+
const label = "label__eccb491a";
|
|
6
6
|
const styles = {
|
|
7
7
|
checkboxXGroup,
|
|
8
|
-
"indent-12": "indent-
|
|
8
|
+
"indent-12": "indent-12__ff9d9dd5",
|
|
9
9
|
label,
|
|
10
|
-
"indent-16": "indent-
|
|
11
|
-
"indent-20": "indent-
|
|
12
|
-
"indent-24": "indent-
|
|
13
|
-
"indent-28": "indent-
|
|
14
|
-
"indent-32": "indent-
|
|
10
|
+
"indent-16": "indent-16__d70adbe7",
|
|
11
|
+
"indent-20": "indent-20__0fed5c60",
|
|
12
|
+
"indent-24": "indent-24__ba8c7c2f",
|
|
13
|
+
"indent-28": "indent-28__8746746f",
|
|
14
|
+
"indent-32": "indent-32__2e3a0911"
|
|
15
15
|
};
|
|
16
16
|
const CheckboxXGroup = React__default.forwardRef((props, ref) => {
|
|
17
17
|
const { children, className, indent = 12, ...rest } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxXGroup.js","sources":["../../../src/components/Checkbox/CheckboxXGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\nimport { TIndentSize } from \"../../consts/IndentConst\";\nimport styles from \"./styles/CheckboxXGroup.module.less\";\n\n/** Свойства компонента CheckboxXGroup. */\nexport interface ICheckboxXGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"role\"> {\n children?: React.ReactNode;\n
|
|
1
|
+
{"version":3,"file":"CheckboxXGroup.js","sources":["../../../src/components/Checkbox/CheckboxXGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\nimport { TIndentSize } from \"../../consts/IndentConst\";\nimport styles from \"./styles/CheckboxXGroup.module.less\";\n\n/** Свойства компонента CheckboxXGroup. */\nexport interface ICheckboxXGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"role\"> {\n /** Содержимое группы, обычно набор Checkbox. */\n children?: React.ReactNode;\n /**\n * Размер горизонтального отступа между чекбоксами, в пикселях. По умолчанию 12.\n * Отступ получают только потомки-Checkbox: маргины вешаются на корневой label компонента Checkbox.\n */\n indent?: TIndentSize;\n}\n\n/**\n * Группа чекбоксов с направлением по оси X.\n * Корневой элемент — div с фиксированной ролью group, на него указывает ref и приходят className и остальные props.\n */\nexport const CheckboxXGroup = React.forwardRef<HTMLDivElement, ICheckboxXGroupProps>((props, ref) => {\n const { children, className, indent = 12, ...rest } = props;\n const classNames = clsx(styles.checkboxXGroup, styles[`indent-${indent}`], className);\n\n return (\n <div className={classNames} {...rest} role=\"group\" ref={ref}>\n {children}\n </div>\n );\n});\n\nCheckboxXGroup.displayName = \"CheckboxXGroup\";\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;AAoBO,MAAM,iBAAiBA,eAAM,WAAiD,CAAC,OAAO,QAAQ;AACjG,QAAM,EAAE,UAAU,WAAW,SAAS,IAAI,GAAG,SAAS;AACtD,QAAM,aAAa,KAAK,OAAO,gBAAgB,OAAO,UAAU,MAAM,EAAE,GAAG,SAAS;AAEpF,SACI,oBAAC,SAAI,WAAW,YAAa,GAAG,MAAM,MAAK,SAAQ,KAC9C,SAAA,CACL;AAER,CAAC;AAED,eAAe,cAAc;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default from "react";
|
|
3
|
-
import { c as clsx } from "../../chunks/vendor-
|
|
4
|
-
const checkboxYGroup = "
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
4
|
+
const checkboxYGroup = "checkboxYGroup__d23bfb7a";
|
|
5
5
|
const styles = {
|
|
6
6
|
checkboxYGroup
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxYGroup.js","sources":["../../../src/components/Checkbox/CheckboxYGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./styles/CheckboxYGroup.module.less\";\n\n/** Свойства компонента CheckboxYGroup. */\nexport interface ICheckboxYGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"role\"> {\n children?: React.ReactNode;\n}\n\n
|
|
1
|
+
{"version":3,"file":"CheckboxYGroup.js","sources":["../../../src/components/Checkbox/CheckboxYGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./styles/CheckboxYGroup.module.less\";\n\n/** Свойства компонента CheckboxYGroup. */\nexport interface ICheckboxYGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"role\"> {\n /**\n * Содержимое группы, обычно набор Checkbox.\n * Вертикальный отступ получают только соседние label-элементы Checkbox одного размера:\n * маргины вешаются на корневой label компонента Checkbox, а обёртка вокруг каждого Checkbox разрывает соседство.\n */\n children?: React.ReactNode;\n}\n\n/**\n * Группа чекбоксов с направлением по оси Y.\n * Корневой элемент — div с фиксированной ролью group, на него указывает ref и приходят className и остальные props.\n */\nexport const CheckboxYGroup = React.forwardRef<HTMLDivElement, ICheckboxYGroupProps>((props, ref) => {\n const { children, className, ...rest } = props;\n const classNames = clsx(styles.checkboxYGroup, className);\n\n return (\n <div className={classNames} {...rest} role=\"group\" ref={ref}>\n {children}\n </div>\n );\n});\n\nCheckboxYGroup.displayName = \"CheckboxYGroup\";\n"],"names":["React"],"mappings":";;;;;;;AAkBO,MAAM,iBAAiBA,eAAM,WAAiD,CAAC,OAAO,QAAQ;AACjG,QAAM,EAAE,UAAU,WAAW,GAAG,SAAS;AACzC,QAAM,aAAa,KAAK,OAAO,gBAAgB,SAAS;AAExD,SACI,oBAAC,SAAI,WAAW,YAAa,GAAG,MAAM,MAAK,SAAQ,KAC9C,SAAA,CACL;AAER,CAAC;AAED,eAAe,cAAc;"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { CheckboxTreeExtendedNode } from "./components/CheckboxTreeExtendedNode.js";
|
|
5
|
-
import { CheckboxTreeExtendedContext } from "./CheckboxTreeExtendedContext.js";
|
|
6
|
-
import { c as clsx } from "../../chunks/vendor-DfvHt3TJ.js";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import { c as clsx } from "../../chunks/vendor-D4wvHis9.js";
|
|
7
4
|
import { EComponentSize } from "../../enums/EComponentSize.js";
|
|
5
|
+
import { CollapsibleTreeExtended } from "../CollapsibleTreeExtended/CollapsibleTreeExtended.js";
|
|
8
6
|
import "../MobileView/MobileView.js";
|
|
9
7
|
import { useMobileView } from "../MobileView/useMobileView.js";
|
|
10
|
-
import {
|
|
8
|
+
import { CheckboxTreeExtendedContext } from "./CheckboxTreeExtendedContext.js";
|
|
9
|
+
import { CheckboxTreeExtendedCheckbox } from "./components/CheckboxTreeExtendedCheckbox.js";
|
|
10
|
+
import { CheckboxTreeExtendedNode } from "./components/CheckboxTreeExtendedNode.js";
|
|
11
|
+
import { s as styles } from "../../chunks/CheckboxTreeExtended.module-nKSCkiBt.js";
|
|
11
12
|
const CheckboxTreeExtended = ({ className, size = EComponentSize.MD, ...rest }) => {
|
|
12
13
|
const adaptive = useMobileView();
|
|
13
|
-
|
|
14
|
+
const contextValue = React__default.useMemo(() => ({ size: adaptive ? EComponentSize.MD : size }), [adaptive, size]);
|
|
15
|
+
return /* @__PURE__ */ jsx(CheckboxTreeExtendedContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(CollapsibleTreeExtended, { className: clsx(styles.checkboxTreeExtended, className), ...rest }) });
|
|
14
16
|
};
|
|
15
17
|
CheckboxTreeExtended.displayName = "CheckboxTreeExtended";
|
|
16
18
|
CheckboxTreeExtended.Checkbox = CheckboxTreeExtendedCheckbox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxTreeExtended.js","sources":["../../../src/components/CheckboxTreeExtended/CheckboxTreeExtended.tsx"],"sourcesContent":["import React from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"CheckboxTreeExtended.js","sources":["../../../src/components/CheckboxTreeExtended/CheckboxTreeExtended.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\nimport { EComponentSize } from \"../../enums/EComponentSize\";\nimport {\n CollapsibleTreeExtended,\n ICollapsibleTreeExtendedProps,\n} from \"../CollapsibleTreeExtended/CollapsibleTreeExtended\";\nimport { useMobileView } from \"../MobileView\";\nimport { CheckboxTreeExtendedContext } from \"./CheckboxTreeExtendedContext\";\nimport { CheckboxTreeExtendedCheckbox } from \"./components/CheckboxTreeExtendedCheckbox\";\nimport { CheckboxTreeExtendedNode } from \"./components/CheckboxTreeExtendedNode\";\nimport styles from \"./styles/CheckboxTreeExtended.module.less\";\n\n/** Свойства CheckboxTreeExtended. */\nexport interface ICheckboxTreeExtendedProps extends ICollapsibleTreeExtendedProps {\n /** Размер дерева чекбоксов. По умолчанию EComponentSize.MD. В мобильном представлении всегда EComponentSize.MD. */\n size?: EComponentSize;\n}\n\n/** CheckboxTreeExtended вместе с составными частями. */\nexport interface ICheckboxTreeExtendedSFC extends React.FC<ICheckboxTreeExtendedProps> {\n /** Чекбокс ноды дерева. */\n Checkbox: typeof CheckboxTreeExtendedCheckbox;\n /** Нода дерева. */\n Node: typeof CheckboxTreeExtendedNode;\n}\n\n/**\n * Декларативное дерево чекбоксов.\n * Является оберткой над CollapsibleTreeExtended.\n */\nexport const CheckboxTreeExtended: ICheckboxTreeExtendedSFC = ({ className, size = EComponentSize.MD, ...rest }) => {\n const adaptive = useMobileView();\n // В мобильном представлении размер зафиксирован, чтобы область нажатия оставалась достаточной.\n const contextValue = React.useMemo(() => ({ size: adaptive ? EComponentSize.MD : size }), [adaptive, size]);\n\n return (\n <CheckboxTreeExtendedContext.Provider value={contextValue}>\n <CollapsibleTreeExtended className={clsx(styles.checkboxTreeExtended, className)} {...rest} />\n </CheckboxTreeExtendedContext.Provider>\n );\n};\n\nCheckboxTreeExtended.displayName = \"CheckboxTreeExtended\";\nCheckboxTreeExtended.Checkbox = CheckboxTreeExtendedCheckbox;\nCheckboxTreeExtended.Node = CheckboxTreeExtendedNode;\n"],"names":["React"],"mappings":";;;;;;;;;;;AA+BO,MAAM,uBAAiD,CAAC,EAAE,WAAW,OAAO,eAAe,IAAI,GAAG,WAAW;AAChH,QAAM,WAAW,cAAA;AAEjB,QAAM,eAAeA,eAAM,QAAQ,OAAO,EAAE,MAAM,WAAW,eAAe,KAAK,KAAA,IAAS,CAAC,UAAU,IAAI,CAAC;AAE1G,6BACK,4BAA4B,UAA5B,EAAqC,OAAO,cACzC,UAAA,oBAAC,yBAAA,EAAwB,WAAW,KAAK,OAAO,sBAAsB,SAAS,GAAI,GAAG,MAAM,GAChG;AAER;AAEA,qBAAqB,cAAc;AACnC,qBAAqB,WAAW;AAChC,qBAAqB,OAAO;"}
|
|
@@ -1,61 +1,44 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useEffect } from "react";
|
|
5
3
|
import { CaretdownStrokeSrvIcon16 } from "@sberbusiness/icons-next";
|
|
6
4
|
import { EVENT_KEY_CODES } from "../../../utils/keyboard.js";
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
__publicField(this, "arrowNode");
|
|
13
|
-
__publicField(this, "setArrowNode", (DOMNode) => {
|
|
14
|
-
this.arrowNode = DOMNode;
|
|
15
|
-
});
|
|
16
|
-
__publicField(this, "handleClick", () => {
|
|
17
|
-
const { opened, toggle } = this.props;
|
|
18
|
-
toggle(!opened);
|
|
19
|
-
});
|
|
20
|
-
/**
|
|
21
|
-
* Обработчик нажатия клавиш.
|
|
22
|
-
* Стрелка вправо - раскрыть, влево - свернуть.
|
|
23
|
-
* Enter, space - изменить состояние на противоположное.
|
|
24
|
-
*/
|
|
25
|
-
__publicField(this, "handleKeyUp", (event) => {
|
|
26
|
-
const { opened, toggle } = this.props;
|
|
27
|
-
if (event.keyCode === EVENT_KEY_CODES.ARROW_RIGHT) {
|
|
28
|
-
toggle(true);
|
|
29
|
-
} else if (event.keyCode === EVENT_KEY_CODES.ARROW_LEFT) {
|
|
30
|
-
toggle(false);
|
|
31
|
-
} else if ([EVENT_KEY_CODES.ENTER, EVENT_KEY_CODES.SPACE].includes(event.keyCode)) {
|
|
32
|
-
toggle(!opened);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
componentDidUpdate(prevProps) {
|
|
5
|
+
import { s as styles } from "../../../chunks/CheckboxTreeExtended.module-nKSCkiBt.js";
|
|
6
|
+
const CheckboxTreeExtendedArrow = ({ active, opened, toggle }) => {
|
|
7
|
+
const arrowNode = useRef(null);
|
|
8
|
+
const prevActive = useRef(active);
|
|
9
|
+
useEffect(() => {
|
|
37
10
|
var _a;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
11
|
+
if (active && !prevActive.current) {
|
|
12
|
+
(_a = arrowNode.current) == null ? void 0 : _a.focus();
|
|
13
|
+
}
|
|
14
|
+
prevActive.current = active;
|
|
15
|
+
}, [active]);
|
|
16
|
+
const handleClick = () => {
|
|
17
|
+
toggle(!opened);
|
|
18
|
+
};
|
|
19
|
+
const handleKeyUp = (event) => {
|
|
20
|
+
if (event.keyCode === EVENT_KEY_CODES.ARROW_RIGHT) {
|
|
21
|
+
toggle(true);
|
|
22
|
+
} else if (event.keyCode === EVENT_KEY_CODES.ARROW_LEFT) {
|
|
23
|
+
toggle(false);
|
|
24
|
+
} else if ([EVENT_KEY_CODES.ENTER, EVENT_KEY_CODES.SPACE].includes(event.keyCode)) {
|
|
25
|
+
toggle(!opened);
|
|
42
26
|
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
"span",
|
|
30
|
+
{
|
|
31
|
+
className: styles.caretIconWrapper,
|
|
32
|
+
onClick: handleClick,
|
|
33
|
+
onKeyUp: handleKeyUp,
|
|
34
|
+
ref: arrowNode,
|
|
35
|
+
role: "button",
|
|
36
|
+
tabIndex: -1,
|
|
37
|
+
children: /* @__PURE__ */ jsx(CaretdownStrokeSrvIcon16, { paletteIndex: 0 })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
CheckboxTreeExtendedArrow.displayName = "CheckboxTreeExtendedArrow";
|
|
59
42
|
export {
|
|
60
43
|
CheckboxTreeExtendedArrow
|
|
61
44
|
};
|