@sberbusiness/triplex-next 1.1.1 → 1.3.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/README.md +8 -8
- package/chunks/{AlertProcessSpoiler-Caa0745n.js → AlertProcessSpoiler-B91XiZ7K.js} +9 -9
- package/chunks/Card.module-NgdHcwYS.js +17 -0
- package/chunks/Chip-XyednI9u.js +87 -0
- package/chunks/DropdownListItem-g0mYNHIW.js +57 -0
- package/chunks/DropdownMobile.module-BBY44sVr.js +21 -0
- package/chunks/Footer.module-4a0n1yRR.js +11 -0
- package/chunks/{FormFieldInput-rV5ZVe9k.js → FormFieldInput-qaJqBTBV.js} +19 -19
- package/chunks/HeaderLayoutSidebar.module-BP0DyJae.js +9 -0
- package/chunks/HeaderTabs.module-CXcyvbb5.js +9 -0
- package/chunks/HeaderTitle.module-B-6xJFnf.js +9 -0
- package/chunks/{ListItemControlsButton-Ch-5PQYH.js → ListItemControlsButton-Ms4q9wDe.js} +10 -10
- package/chunks/ListItemTail.module-D5VudFCz.js +12 -0
- package/chunks/ListMasterFooter.module-DzXu5TSC.js +10 -0
- package/chunks/Notification.module-MX1NZXsu.js +21 -0
- package/chunks/Overlay.module-B1IlIRoo.js +18 -0
- package/chunks/Page.module-Cwb_zvqj.js +12 -0
- package/chunks/RightBorderArrow-D6ZllSTT.js +146 -0
- package/chunks/SuggestFieldMobileDropdownHint-Cc_fZLBH.js +15 -0
- package/chunks/TableFooter.module-D9_esv5A.js +13 -0
- package/chunks/TabsExtended.module--2PQhvJQ.js +16 -0
- package/chunks/TabsLine.module-CH_sqFyE.js +23 -0
- package/chunks/TooltipDesktop.module-D3cbaDX1.js +19 -0
- package/chunks/{UploadZoneInput-CXjerIVV.js → UploadZoneInput-Bkv3b0F5.js} +6 -6
- package/chunks/utils-BZFu5eVD.js +26 -0
- package/chunks/utils-CVSz7tV_.js +20 -0
- package/chunks/utils-D8e1oAR3.js +72 -0
- package/chunks/utils-DWPj89gs.js +36 -0
- package/chunks/utils-dyCpsmr1.js +48 -0
- package/chunks/vendor-CehxOAkM.js +11907 -0
- package/components/AbstractTree/AbstractTreeNode.js +50 -0
- package/components/AccordionBase/protected/AccordionBase.js +83 -0
- package/components/AccordionBase/types.js +2 -0
- package/components/Alert/AlertContext/AlertContext.js +9 -9
- package/components/Alert/AlertProcess/AlertProcess.js +3 -3
- package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +2 -2
- package/components/Amount/Amount.js +37 -0
- package/components/Amount/index.js +5 -0
- package/components/AmountField/AmountBaseInputCore.js +46 -0
- package/components/AmountField/AmountBaseInputFormatter.js +57 -0
- package/components/AmountField/AmountBaseInputParser.js +110 -0
- package/components/AmountField/AmountField.js +76 -0
- package/components/AmountField/index.js +5 -0
- package/components/AmountField/utils.js +38 -0
- package/components/Body/Body.js +6 -6
- package/components/Button/Button.js +68 -67
- package/components/Button/ButtonBase.js +1 -1
- package/components/Button/ButtonDropdown.js +113 -127
- package/components/Button/ButtonDropdownExtended.js +9 -9
- package/components/Button/ButtonIcon.js +16 -20
- package/components/Button/enums.js +2 -3
- package/components/Button/index.js +9 -10
- package/components/Card/CardAction.js +16 -16
- 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/CarouselExtended/CarouselExtended.js +48 -0
- package/components/Checkbox/Checkbox.js +46 -30
- package/components/Checkbox/CheckboxXGroup.js +15 -15
- package/components/Checkbox/CheckboxYGroup.js +2 -2
- package/components/Checkbox/index.js +4 -6
- package/components/CheckboxTree/CheckboxTree.js +39 -0
- package/components/CheckboxTree/types.js +2 -0
- package/components/CheckboxTree/utils.js +22 -0
- package/components/CheckboxTreeExtended/CheckboxTreeExtended.js +13 -0
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedArrow.js +52 -0
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedCheckbox.js +39 -0
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedNode.js +53 -0
- package/components/CheckboxTreeExtended/isStaticCheckboxTreeExtended.js +5 -0
- package/components/Chip/Chip.js +9 -0
- package/components/Chip/ChipClearButton.js +28 -0
- package/components/Chip/ChipDropdownArrow.js +18 -0
- package/components/Chip/ChipIcon.js +9 -0
- package/components/Chip/ChipOptions.js +27 -0
- package/components/Chip/ChipSelect.js +55 -0
- package/components/Chip/index.js +15 -0
- package/components/ChipGroup/ChipGroup.js +32 -0
- package/components/ChipGroup/index.js +5 -0
- package/components/Col/Col.js +141 -141
- package/components/CollapsableTree/CollapsableTree.js +10 -0
- package/components/CollapsableTree/components/CollapsableTreeNode.js +79 -0
- package/components/DesignTokens/DesignTokenUtils.js +2 -2
- package/components/DesignTokens/DesignTokensComponents.js +95 -68
- package/components/DesignTokens/DesignTokensComponentsThemeDark.js +98 -76
- package/components/DesignTokens/components/Card.js +23 -20
- package/components/DesignTokens/components/Checkbox.js +32 -14
- package/components/DesignTokens/components/Chip.js +59 -0
- package/components/DesignTokens/components/Divider.js +9 -0
- package/components/DesignTokens/components/Dropdown.js +1 -1
- package/components/DesignTokens/components/DropdownList.js +2 -2
- package/components/DesignTokens/components/DropdownMobile.js +3 -3
- package/components/DesignTokens/components/FooterPage.js +3 -3
- package/components/DesignTokens/components/HeaderPage.js +4 -4
- package/components/DesignTokens/components/ListItemControlsButton.js +20 -5
- package/components/DesignTokens/components/LoaderScreen.js +17 -0
- package/components/DesignTokens/components/Marker.js +20 -0
- package/components/DesignTokens/components/MarkerStatus.js +9 -0
- package/components/DesignTokens/components/Notification.js +15 -0
- package/components/DesignTokens/components/Radio.js +22 -13
- package/components/DesignTokens/components/Stepper.js +71 -0
- package/components/DesignTokens/components/TableBasic.js +41 -0
- package/components/DesignTokens/components/Tabs.js +45 -15
- package/components/DesignTokens/components/TabsLine.js +32 -0
- package/components/DesignTokens/components/Tag.js +9 -0
- package/components/DesignTokens/components/index.js +110 -83
- package/components/Divider/Divider.js +34 -0
- package/components/Divider/index.js +5 -0
- package/components/Dropdown/desktop/DropdownDesktop.js +52 -51
- package/components/Dropdown/desktop/DropdownList.js +66 -53
- package/components/Dropdown/desktop/DropdownListItem.js +2 -2
- package/components/Dropdown/desktop/index.js +9 -0
- package/components/Dropdown/index.js +33 -29
- 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 +9 -8
- package/components/Dropdown/mobile/DropdownMobileList.js +26 -17
- package/components/Dropdown/mobile/DropdownMobileListItem.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileLoader.js +20 -0
- package/components/Dropdown/mobile/index.js +5 -3
- package/components/Ellipsis/Ellipsis.js +27 -0
- package/components/Ellipsis/index.js +5 -0
- package/components/ExpandAnimation/ExpandAnimation.js +72 -0
- package/components/Footer/Footer.js +3 -3
- package/components/Footer/components/FooterDescription.js +2 -2
- package/components/Footer/components/FooterDescriptionContent.js +2 -2
- package/components/Footer/components/FooterDescriptionControls.js +2 -2
- package/components/FormField/FormField.js +36 -35
- package/components/FormField/FormFieldContext.js +8 -7
- package/components/FormField/components/FormFieldClear.js +24 -20
- package/components/FormField/components/FormFieldCounter.js +5 -5
- package/components/FormField/components/FormFieldDescription.js +9 -9
- package/components/FormField/components/FormFieldInput.js +2 -2
- package/components/FormField/components/FormFieldLabel.js +10 -10
- package/components/FormField/components/FormFieldMaskedInput.js +12 -12
- package/components/FormField/components/FormFieldPostfix.js +5 -5
- package/components/FormField/components/FormFieldPrefix.js +2 -2
- package/components/FormField/components/FormFieldTarget.js +17 -17
- package/components/FormField/components/FormFieldTextarea.js +6 -6
- package/components/FormField/index.js +1 -1
- package/components/Header/Header.js +12 -12
- 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 +5 -5
- 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 +94 -0
- package/components/Island/Island.js +25 -66
- package/components/Island/components/IslandBody.js +2 -2
- package/components/Island/components/IslandFooter.js +2 -2
- package/components/Island/components/IslandHeader.js +3 -3
- package/components/Island/enums.js +1 -3
- package/components/Island/index.js +4 -6
- package/components/Island/types.js +2 -0
- package/components/Island/utils.js +8 -0
- package/components/Link/Link.js +18 -18
- package/components/List/List.js +12 -20
- package/components/List/ListSortable.js +1 -1
- package/components/List/components/ListEmptyState.js +2 -2
- package/components/List/components/ListItem.js +1 -10
- package/components/List/components/ListItemContent.js +3 -3
- package/components/List/components/ListItemControls.js +8 -8
- package/components/List/components/ListItemControlsButton.js +2 -2
- package/components/List/components/ListItemControlsButtonDropdown.js +4 -2
- package/components/List/components/ListItemLoading.js +9 -7
- package/components/List/components/ListItemSelectable.js +6 -6
- package/components/List/components/ListItemTable.js +9 -9
- package/components/List/components/ListItemTailLeft.js +2 -2
- package/components/List/components/ListItemTailRight.js +2 -2
- package/components/List/components/ListSortableItem.js +8 -8
- package/components/List/components/ListSortableItemControls.js +2 -2
- package/components/List/components/ListSortableItemTarget.js +6 -6
- 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 +8 -8
- 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 +7 -7
- package/components/ListMaster/components/SelectionControls.js +7 -7
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +5 -5
- package/components/Loader/LoaderSmall/LoaderSmall.js +26 -37
- package/components/LoaderScreen/LoaderScreen.js +29 -0
- package/components/LoaderScreen/index.js +5 -0
- package/components/Marker/Marker.js +20 -0
- package/components/Marker/enums.js +5 -0
- package/components/Marker/index.js +7 -0
- package/components/Marker/utils.js +6 -0
- package/components/MarkerStatus/MarkerStatus.js +40 -0
- package/components/MarkerStatus/index.js +5 -0
- package/components/Notification/Notification.js +40 -0
- package/components/Notification/NotificationGrouped.js +12 -0
- package/components/Notification/components/NotificationBody.js +19 -0
- package/components/Notification/components/NotificationBodyContent.js +8 -0
- package/components/Notification/components/NotificationBodyList.js +11 -0
- package/components/Notification/components/NotificationClose.js +14 -0
- package/components/Notification/components/NotificationFooter.js +8 -0
- package/components/Notification/components/NotificationGroupedFooter.js +11 -0
- package/components/Notification/components/NotificationHeader.js +8 -0
- package/components/Notification/components/NotificationIcon.js +8 -0
- package/components/Notification/components/NotificationTime.js +8 -0
- package/components/NumberField/NumberField.js +8 -0
- package/components/NumberField/NumberFieldInput.js +38 -0
- package/components/NumberField/index.js +5 -0
- package/components/NumberField/types.js +2 -0
- package/components/OrderedList/OrderedList.js +25 -0
- package/components/OrderedList/OrderedListItem.js +27 -0
- package/components/OrderedList/index.js +7 -0
- package/components/OrderedList/types.js +2 -0
- package/components/Overlay/Overlay.js +2 -2
- 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 +2 -2
- package/components/Page/components/FooterPage.js +28 -31
- package/components/Page/components/HeaderPage.js +26 -29
- package/components/Page/components/useStickyCornerRadius.js +34 -0
- package/components/Pagination/components/PaginationExtended.js +3 -3
- package/components/Pagination/components/PaginationNavigationButton.js +1 -1
- package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
- package/components/Pagination/components/PaginationPageButton.js +2 -2
- package/components/Pagination/components/PaginationPageEllipsis.js +3 -3
- package/components/Pagination/components/PaginationSelect.js +9 -9
- package/components/Pagination/utils/paginationUtils.js +1 -1
- package/components/Radio/Radio.js +30 -22
- package/components/Radio/RadioXGroup.js +13 -13
- package/components/Radio/RadioYGroup.js +7 -7
- package/components/Radio/index.js +4 -6
- package/components/Row/Row.js +10 -10
- package/components/SegmentedControl/SegmentedControl.js +39 -42
- package/components/SegmentedControl/SegmentedControlSegment.js +11 -11
- package/components/SelectExtendedField/SelectExtendedField.js +2 -2
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +5 -2
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdownDefault.js +22 -18
- package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +37 -36
- package/components/SelectField/SelectField.js +62 -0
- package/components/SelectField/index.js +5 -0
- package/components/Skeleton/Skeleton.js +8 -8
- package/components/Stepper/RightBorderArrow.js +7 -0
- package/components/Stepper/Stepper.js +103 -0
- package/components/Stepper/StepperExtended.js +26 -0
- package/components/Stepper/StepperExtendedContext.js +12 -0
- package/components/Stepper/StepperStep.js +88 -0
- package/components/Stepper/StepperStepIcon.js +23 -0
- package/components/Stepper/StepperWrapper.js +12 -0
- package/components/Stepper/enums.js +7 -0
- package/components/Stepper/index.js +11 -0
- package/components/SuggestField/SuggestField.js +64 -0
- package/components/SuggestField/SuggestFieldTarget.js +67 -0
- package/components/SuggestField/SuggestFieldTargetPostfix.js +28 -0
- package/components/SuggestField/desktop/SuggestFieldDesktop.js +196 -0
- package/components/SuggestField/desktop/SuggestFieldDesktopDropdown.js +76 -0
- package/components/SuggestField/desktop/index.js +7 -0
- package/components/SuggestField/desktop/types.js +2 -0
- package/components/SuggestField/index.js +17 -0
- package/components/SuggestField/mobile/SuggestFieldMobile.js +79 -0
- package/components/SuggestField/mobile/SuggestFieldMobileDropdown.js +94 -0
- package/components/SuggestField/mobile/SuggestFieldMobileDropdownHint.js +10 -0
- package/components/SuggestField/mobile/SuggestFieldMobileTarget.js +30 -0
- package/components/SuggestField/mobile/index.js +11 -0
- package/components/SuggestField/mobile/types.js +2 -0
- package/components/SuggestField/types.js +2 -0
- package/components/SwipeableArea/SwipeableArea.js +13 -13
- package/components/Table/FilterPanel.js +18 -0
- package/components/Table/MasterTable.js +49 -0
- package/components/Table/MasterTableContext.js +11 -0
- package/components/Table/NoColumns.js +17 -0
- package/components/Table/PaginationPanel.js +18 -0
- package/components/Table/TableBasic/TableBasic.js +51 -0
- package/components/Table/TableBasic/components/TableBasicBody.js +18 -0
- package/components/Table/TableBasic/components/TableBasicHeader.js +83 -0
- package/components/Table/TableBasic/components/TableBasicRow.js +53 -0
- package/components/Table/TableBasic/enums.js +8 -0
- package/components/Table/TableBasic/types.js +2 -0
- package/components/Table/TableBasicSettings/TableBasicSettings.js +58 -0
- package/components/Table/TableBasicSettings/components/ColumnSettings.js +20 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsSortableList.js +24 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsSortableListItem.js +25 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsSortableListItemTarget.js +29 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsStaticList.js +17 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsStaticListItem.js +14 -0
- package/components/Table/TableBasicSettings/components/TableBasicSettingsBody.js +13 -0
- package/components/Table/TableBasicSettings/components/TableBasicSettingsFooter.js +13 -0
- package/components/Table/TableBasicSettings/components/TableBasicSettingsHeader.js +26 -0
- package/components/Table/TableFooter/TableFooter.js +14 -0
- package/components/Table/TableFooter/components/TableFooterSummary.js +19 -0
- package/components/Table/TableFooter/components/TableFooterSummaryAmount.js +18 -0
- package/components/Table/TableFooter/components/TableFooterSummarySelectAllButton.js +31 -0
- package/components/Table/TableFooter/components/TableFooterSummarySelectedCount.js +8 -0
- package/components/Table/TabsLinePanel.js +12 -0
- package/components/Table/TabsLinePanelLinks.js +14 -0
- package/components/Table/index.js +26 -0
- package/components/Table/utils.js +8 -0
- package/components/Tabs/Tabs.js +75 -0
- package/components/Tabs/index.js +5 -0
- package/components/TabsExtended/TabsExtended.js +37 -21
- package/components/TabsExtended/TabsExtendedContext.js +6 -4
- package/components/TabsExtended/components/TabsExtendedContent.js +19 -15
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTab.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTabButton.js +17 -15
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +7 -7
- package/components/TabsExtended/components/index.js +15 -0
- package/components/TabsExtended/enums.js +2 -2
- package/components/TabsExtended/index.js +15 -3
- package/components/TabsExtended/utils.js +9 -0
- package/components/TabsLine/TabsLine.js +48 -0
- package/components/TabsLine/components/TabsLineDesktop.js +81 -0
- package/components/TabsLine/components/TabsLineDropdown.js +151 -0
- package/components/TabsLine/components/TabsLineItem.js +26 -0
- package/components/TabsLine/components/TabsLineMobile.js +21 -0
- package/components/TabsLine/components/index.js +11 -0
- package/components/TabsLine/index.js +13 -0
- package/components/TabsLine/types.js +2 -0
- package/components/Tag/Tag.js +70 -0
- package/components/Tag/index.js +5 -0
- package/components/Tag/types.js +2 -0
- package/components/TagGroup/TagGroup.js +25 -0
- package/components/TagGroup/index.js +5 -0
- package/components/TagGroup/types.js +2 -0
- package/components/TextField/TextField.js +1 -1
- package/components/ThemeProvider/ThemeProvider.js +1 -1
- package/components/ThemeProvider/components/ThemeProviderView.js +4 -4
- package/components/Tooltip/components/common/TooltipBody.js +2 -2
- package/components/Tooltip/components/common/TooltipLink.js +11 -11
- 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 +7 -7
- package/components/TreeView/TreeView.js +88 -0
- package/components/TreeView/TreeViewAbstractNode.js +38 -0
- package/components/TreeView/TreeViewAbstractNodeUtils.js +112 -0
- package/components/TreeView/TreeViewContext.js +30 -0
- package/components/TreeView/components/TreeViewGroup.js +6 -0
- package/components/TreeView/components/TreeViewNode.js +81 -0
- package/components/Typography/Caption.js +12 -12
- package/components/Typography/Text.js +19 -19
- package/components/Typography/Title.js +11 -11
- package/components/Typography/utils.js +1 -1
- package/components/UnorderedList/UnorderedList.js +25 -0
- package/components/UnorderedList/UnorderedListItem.js +27 -0
- package/components/UnorderedList/index.js +7 -0
- package/components/UnorderedList/types.js +2 -0
- package/components/UploadZone/UploadZone.js +3 -3
- package/components/UploadZone/components/UploadZoneInput.js +2 -2
- package/components/index.js +379 -278
- package/consts/AmountConst.js +10 -0
- package/consts/DataTestId.js +19 -0
- package/enums/EComponentSize.js +5 -0
- package/enums/index.js +7 -0
- package/helpers/less/z-indexes.less +3 -3
- package/index.d.ts +1235 -148
- package/index.js +368 -265
- package/package.json +85 -6
- package/styles/triplex-next.css +441 -354
- package/types/CoreTypes.js +2 -0
- package/utils/amountUtils.js +34 -0
- package/utils/classNameMaps.js +10 -0
- package/utils/html/AriaAttributes.js +11 -0
- package/utils/html/DataAttributes.js +11 -0
- package/utils/inputUtils.js +11 -0
- package/utils/isNullOrUndefined.js +5 -0
- package/utils/scroll.js +13 -0
- package/utils/stringUtils.js +13 -0
- package/chunks/Card.module-BRANBAxP.js +0 -17
- package/chunks/DropdownListItem-DIIAnvmw.js +0 -56
- package/chunks/DropdownMobile.module-BUeZuAYr.js +0 -19
- package/chunks/Footer.module-BFo05t5_.js +0 -11
- package/chunks/HeaderLayoutSidebar.module-CEqBuRNu.js +0 -9
- package/chunks/HeaderTabs.module-BEaVu2Hx.js +0 -9
- package/chunks/HeaderTitle.module-Db-1fcNm.js +0 -9
- package/chunks/ListItemTail.module-C5-4SAqt.js +0 -12
- package/chunks/ListMasterFooter.module-Dph-_lLg.js +0 -10
- package/chunks/Overlay.module-D6LEz1jT.js +0 -18
- package/chunks/Page.module-Ct9ky9ko.js +0 -16
- package/chunks/TabsExtended.module-CmU9j8zG.js +0 -13
- package/chunks/TabsExtendedUtils-CkAvE1fA.js +0 -23
- package/chunks/TooltipDesktop.module-KrPZMfQD.js +0 -19
- package/chunks/utils-bbbspEnw.js +0 -36
- package/chunks/vendor-D-uL_icH.js +0 -5895
- package/components/Checkbox/enum.js +0 -5
- package/components/DesignTokens/components/LoaderWidget.js +0 -17
- package/components/LoaderWidget/LoaderWidget.js +0 -28
- package/components/LoaderWidget/index.js +0 -5
- package/components/Radio/enum.js +0 -5
- package/components/TabsExtended/TabsExtendedUtils.js +0 -8
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var d = (t, e, i) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
|
3
|
+
var s = (t, e, i) => d(t, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
+
import { i as l } from "../../chunks/vendor-CehxOAkM.js";
|
|
5
|
+
class u {
|
|
6
|
+
constructor() {
|
|
7
|
+
// Массив дочерних нод.
|
|
8
|
+
s(this, "children", []);
|
|
9
|
+
// Родительская нода.
|
|
10
|
+
s(this, "parent", null);
|
|
11
|
+
/** Возвращает дочерние ноды. */
|
|
12
|
+
s(this, "getChildren", () => this.children);
|
|
13
|
+
/** Добавляет дочернюю ноду к текущим. */
|
|
14
|
+
s(this, "addChild", (e, i, r) => {
|
|
15
|
+
if (e.setParent(this), i) {
|
|
16
|
+
const h = this.children.findIndex((n) => l(n, i));
|
|
17
|
+
this.children.splice(h + 1, 0, e);
|
|
18
|
+
} else if (r) {
|
|
19
|
+
const h = this.children.findIndex((n) => l(n, r));
|
|
20
|
+
this.children.splice(h, 0, e);
|
|
21
|
+
} else
|
|
22
|
+
this.children.push(e);
|
|
23
|
+
});
|
|
24
|
+
/** Удаляет дочернюю ноду. */
|
|
25
|
+
s(this, "removeChild", (e) => {
|
|
26
|
+
const i = this.children.findIndex((r) => l(r, e));
|
|
27
|
+
i > -1 && (this.children.splice(i, 1), e.setParent(null));
|
|
28
|
+
});
|
|
29
|
+
/** Устанавливает дочерние ноды вместо текущих дочерних нод. */
|
|
30
|
+
s(this, "setChildren", (e) => {
|
|
31
|
+
this.children.forEach((i) => i.setParent(null)), e.forEach((i) => i.setParent(this)), this.children = e;
|
|
32
|
+
});
|
|
33
|
+
/** Возвращает родительскую ноду. */
|
|
34
|
+
s(this, "getParent", () => this.parent);
|
|
35
|
+
/** Устанавливает родительскую ноду. */
|
|
36
|
+
s(this, "setParent", (e) => {
|
|
37
|
+
this.parent = e;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function a(t, e) {
|
|
42
|
+
if (e(t) && t.getChildren().length)
|
|
43
|
+
for (const r of t.getChildren())
|
|
44
|
+
a(r, e);
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
u as AbstractTreeNode,
|
|
48
|
+
a as traverseAbstractTree
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=AbstractTreeNode.js.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var l = (a, s, e) => s in a ? c(a, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[s] = e;
|
|
3
|
+
var o = (a, s, e) => l(a, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
+
import { jsxs as O, Fragment as m, jsx as g } from "react/jsx-runtime";
|
|
5
|
+
import h from "react";
|
|
6
|
+
import { ExpandAnimation as f } from "../../ExpandAnimation/ExpandAnimation.js";
|
|
7
|
+
import { a as u, c as x } from "../../../chunks/vendor-CehxOAkM.js";
|
|
8
|
+
class I extends h.Component {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
super(e);
|
|
11
|
+
o(this, "displayName", "AccordionBase");
|
|
12
|
+
// Уникальный id, для передачи a11y aria-атрибутов в header и body.
|
|
13
|
+
o(this, "instanceId", `AccordionBase-${u()}`);
|
|
14
|
+
o(this, "renderHeader", () => {
|
|
15
|
+
const { renderHeader: e, isOpen: n } = this.props, { animating: t, controlled: i, isOpen: r } = this.state, p = !!(i ? n : r);
|
|
16
|
+
return e({
|
|
17
|
+
animating: t,
|
|
18
|
+
ariaAttributes: {
|
|
19
|
+
controls: this.instanceId,
|
|
20
|
+
expanded: p.toString()
|
|
21
|
+
},
|
|
22
|
+
isOpen: p,
|
|
23
|
+
toggle: this.toggle
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
/**
|
|
27
|
+
* Раскрывает/скрывает контент аккордеона.
|
|
28
|
+
*/
|
|
29
|
+
o(this, "toggle", () => {
|
|
30
|
+
const { controlled: e, isOpen: n } = this.state, { toggle: t, isOpen: i } = this.props;
|
|
31
|
+
e ? t && t(!!!(e ? i : n)) : this.setState((p) => ({
|
|
32
|
+
animating: !0,
|
|
33
|
+
isOpen: !p.isOpen
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
o(this, "handleAnimationEnd", () => {
|
|
37
|
+
const { controlled: e, isOpen: n } = this.state, { onToggle: t, isOpen: i } = this.props, r = !!(e ? i : n);
|
|
38
|
+
this.setState({ animating: !1 }, () => {
|
|
39
|
+
t && t(r);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
o(this, "renderBody", () => {
|
|
43
|
+
const { expandAnimationClassName: e, renderBody: n, isOpen: t } = this.props, { animating: i, controlled: r, isOpen: p } = this.state, d = !!(r ? t : p);
|
|
44
|
+
return /* @__PURE__ */ g(
|
|
45
|
+
f,
|
|
46
|
+
{
|
|
47
|
+
className: x(e, {
|
|
48
|
+
"cssClass[globalExpandAnimationAnimating]": i,
|
|
49
|
+
"cssClass[globalExpandAnimationOpened]": d
|
|
50
|
+
}),
|
|
51
|
+
expanded: d,
|
|
52
|
+
onEnd: this.handleAnimationEnd,
|
|
53
|
+
id: this.instanceId,
|
|
54
|
+
children: n({
|
|
55
|
+
animating: i,
|
|
56
|
+
isOpen: d,
|
|
57
|
+
toggle: this.toggle
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
this.state = {
|
|
63
|
+
animating: !1,
|
|
64
|
+
controlled: typeof e.isOpen < "u",
|
|
65
|
+
isOpen: !!e.isOpen
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
componentDidUpdate(e) {
|
|
69
|
+
const { isOpen: n } = this.props, { isOpen: t } = e;
|
|
70
|
+
n !== t && this.setState({ animating: !0 });
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
const e = this.renderHeader(), n = this.renderBody();
|
|
74
|
+
return /* @__PURE__ */ O(m, { children: [
|
|
75
|
+
e,
|
|
76
|
+
n
|
|
77
|
+
] });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
I as AccordionBase
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=AccordionBase.js.map
|
|
@@ -5,10 +5,10 @@ import { alertTypeToClassNameMap as m } from "../AlertTypeUtils.js";
|
|
|
5
5
|
import { Text as y } from "../../Typography/Text.js";
|
|
6
6
|
import { EFontType as r, ETextSize as f } from "../../Typography/enums.js";
|
|
7
7
|
import { SystemStrokeStsIcon16 as I, ErrorStrokeStsIcon16 as S, WarningStrokeStsIcon16 as i, InfoStrokeStsIcon16 as R } from "@sberbusiness/icons-next";
|
|
8
|
-
import { c as
|
|
9
|
-
const
|
|
10
|
-
alertContext:
|
|
11
|
-
alertContextText:
|
|
8
|
+
import { c as d } from "../../../chunks/vendor-CehxOAkM.js";
|
|
9
|
+
const N = "alertContext__6fd00d51", _ = "alertContextText__7677c26a", E = "alertTypeError__21cadb04", C = "alertTypeInfo__802e847a", u = "alertTypeWarning__fb08ad45", A = "alertTypeSystem__c1241af3", n = {
|
|
10
|
+
alertContext: N,
|
|
11
|
+
alertContextText: _,
|
|
12
12
|
alertTypeError: E,
|
|
13
13
|
alertTypeInfo: C,
|
|
14
14
|
alertTypeWarning: u,
|
|
@@ -29,14 +29,14 @@ const _ = "alertContext__c6b14ba5", d = "alertContextText__ffe826e1", E = "alert
|
|
|
29
29
|
[e.WARNING]: r.WARNING,
|
|
30
30
|
[e.ERROR]: r.ERROR,
|
|
31
31
|
[e.SYSTEM]: r.SECONDARY
|
|
32
|
-
},
|
|
32
|
+
}, F = x.forwardRef(
|
|
33
33
|
({ children: o, className: l, type: a, renderIcon: s, ...p }, c) => /* @__PURE__ */ T(
|
|
34
34
|
"span",
|
|
35
35
|
{
|
|
36
36
|
role: "alert",
|
|
37
|
-
className:
|
|
37
|
+
className: d(n.alertContext, m[a](n), l),
|
|
38
38
|
...p,
|
|
39
|
-
"data-tx": "1.
|
|
39
|
+
"data-tx": "1.3.0",
|
|
40
40
|
ref: c,
|
|
41
41
|
children: [
|
|
42
42
|
s || O(a),
|
|
@@ -45,8 +45,8 @@ const _ = "alertContext__c6b14ba5", d = "alertContextText__ffe826e1", E = "alert
|
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
);
|
|
48
|
-
|
|
48
|
+
F.displayName = "AlertContext";
|
|
49
49
|
export {
|
|
50
|
-
|
|
50
|
+
F as AlertContext
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=AlertContext.js.map
|
|
@@ -3,10 +3,10 @@ import P, { useState as n } from "react";
|
|
|
3
3
|
import { EAlertType as t } from "../EAlertType.js";
|
|
4
4
|
import { alertTypeToClassNameMap as k } from "../AlertTypeUtils.js";
|
|
5
5
|
import { ButtonIcon as v } from "../../Button/ButtonIcon.js";
|
|
6
|
-
import { s as r, A as i } from "../../../chunks/AlertProcessSpoiler-
|
|
6
|
+
import { s as r, A as i } from "../../../chunks/AlertProcessSpoiler-B91XiZ7K.js";
|
|
7
7
|
import { AlertProcessContext as R } from "./AlertProcessContext.js";
|
|
8
8
|
import { CrossStrokeSrvIcon16 as E, DefaulticonStrokePrdIcon20 as T, SystemStrokeStsIcon20 as y, ErrorStrokeStsIcon20 as j, WarningStrokeStsIcon20 as w, InfoStrokeStsIcon20 as B } from "@sberbusiness/icons-next";
|
|
9
|
-
import { c as C } from "../../../chunks/vendor-
|
|
9
|
+
import { c as C } from "../../../chunks/vendor-CehxOAkM.js";
|
|
10
10
|
const O = (o) => {
|
|
11
11
|
switch (o) {
|
|
12
12
|
case t.INFO:
|
|
@@ -38,7 +38,7 @@ const O = (o) => {
|
|
|
38
38
|
d
|
|
39
39
|
),
|
|
40
40
|
...f,
|
|
41
|
-
"data-tx": "1.
|
|
41
|
+
"data-tx": "1.3.0",
|
|
42
42
|
ref: u,
|
|
43
43
|
children: [
|
|
44
44
|
/* @__PURE__ */ e("div", { className: r.themeIcon, children: l || O(a) }),
|
|
@@ -3,8 +3,8 @@ import "react";
|
|
|
3
3
|
import "@sberbusiness/icons-next";
|
|
4
4
|
import "../../../Button/ButtonIcon.js";
|
|
5
5
|
import "../AlertProcessContext.js";
|
|
6
|
-
import { A as l } from "../../../../chunks/AlertProcessSpoiler-
|
|
7
|
-
import "../../../../chunks/vendor-
|
|
6
|
+
import { A as l } from "../../../../chunks/AlertProcessSpoiler-B91XiZ7K.js";
|
|
7
|
+
import "../../../../chunks/vendor-CehxOAkM.js";
|
|
8
8
|
export {
|
|
9
9
|
l as AlertProcessSpoiler
|
|
10
10
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { formatAmount as d } from "../../utils/amountUtils.js";
|
|
3
|
+
import { c as A } from "../../chunks/vendor-CehxOAkM.js";
|
|
4
|
+
const f = "amountAdaptive__0f4963ea", N = {
|
|
5
|
+
amountAdaptive: f
|
|
6
|
+
}, _ = 14, h = ({
|
|
7
|
+
className: o,
|
|
8
|
+
value: m,
|
|
9
|
+
fractionLength: r,
|
|
10
|
+
currency: e,
|
|
11
|
+
currencyTitle: s,
|
|
12
|
+
adaptive: c,
|
|
13
|
+
dataTestId: a,
|
|
14
|
+
...i
|
|
15
|
+
}) => {
|
|
16
|
+
let t = d(m, r);
|
|
17
|
+
const p = A(
|
|
18
|
+
{
|
|
19
|
+
[N.amountAdaptive]: !!c && t.length >= _
|
|
20
|
+
},
|
|
21
|
+
o
|
|
22
|
+
);
|
|
23
|
+
t[0] == "-" && (t = t.replace("-", "−"));
|
|
24
|
+
const u = () => [
|
|
25
|
+
" ",
|
|
26
|
+
/* @__PURE__ */ n("span", { "data-test-id": a && `${a}__currencyName`, title: s, children: e }, "currencyName")
|
|
27
|
+
];
|
|
28
|
+
return /* @__PURE__ */ l("span", { className: p, ...i, "data-tx": "1.3.0", children: [
|
|
29
|
+
/* @__PURE__ */ n("span", { "data-test-id": a && `${a}__amount`, children: t }),
|
|
30
|
+
e && u()
|
|
31
|
+
] });
|
|
32
|
+
};
|
|
33
|
+
h.displayName = "Amount";
|
|
34
|
+
export {
|
|
35
|
+
h as Amount
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=Amount.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var o = (i, t, e) => t in i ? r(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var a = (i, t, e) => o(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { AmountBaseInputParser as n } from "./AmountBaseInputParser.js";
|
|
5
|
+
import { AmountBaseInputFormatter as l } from "./AmountBaseInputFormatter.js";
|
|
6
|
+
class m {
|
|
7
|
+
constructor(t, e) {
|
|
8
|
+
/** Значение. */
|
|
9
|
+
a(this, "value");
|
|
10
|
+
/** Отформатированное значение. */
|
|
11
|
+
a(this, "formattedValue");
|
|
12
|
+
/** Положение каретки. */
|
|
13
|
+
a(this, "caret");
|
|
14
|
+
/** Максимальное количество знаков перед запятой. */
|
|
15
|
+
a(this, "maxIntegerDigits");
|
|
16
|
+
/** Количество чисел после запятой. */
|
|
17
|
+
a(this, "fractionDigits");
|
|
18
|
+
/** Кэш для хранения значений. */
|
|
19
|
+
a(this, "cache");
|
|
20
|
+
this.value = "", this.formattedValue = "", this.caret = 0, this.maxIntegerDigits = t, this.fractionDigits = e, this.cache = {
|
|
21
|
+
formattedValue: "",
|
|
22
|
+
key: "",
|
|
23
|
+
selectionDirection: null,
|
|
24
|
+
selectionEnd: null,
|
|
25
|
+
selectionStart: null
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Применение входных данных. */
|
|
29
|
+
apply(t, e) {
|
|
30
|
+
this.parse(t, e), this.format(this.value);
|
|
31
|
+
}
|
|
32
|
+
/** Обработка значения. */
|
|
33
|
+
parse(t, e) {
|
|
34
|
+
const s = new n(this.maxIntegerDigits, this.fractionDigits);
|
|
35
|
+
s.apply(t, e, this.cache.key), this.value = s.getValue(), this.caret = e + s.getCaretOffset();
|
|
36
|
+
}
|
|
37
|
+
/** Форматирование значения. */
|
|
38
|
+
format(t) {
|
|
39
|
+
const e = new l(this.maxIntegerDigits, this.fractionDigits);
|
|
40
|
+
e.apply(t), this.formattedValue = e.getValue(), this.caret += e.getCaretOffset();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
m as AmountBaseInputCore
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=AmountBaseInputCore.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var o = (r, t, i) => t in r ? a(r, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[t] = i;
|
|
3
|
+
var h = (r, t, i) => o(r, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
+
import { AmountConst as n } from "../../consts/AmountConst.js";
|
|
5
|
+
class m {
|
|
6
|
+
constructor(t, i) {
|
|
7
|
+
/** Значение. */
|
|
8
|
+
h(this, "value");
|
|
9
|
+
/** Величина сдвига каретки. */
|
|
10
|
+
h(this, "caretOffset");
|
|
11
|
+
/** Максимальное количество знаков (без учёта пробелов). */
|
|
12
|
+
h(this, "maxLength");
|
|
13
|
+
/** Количество чисел после запятой. */
|
|
14
|
+
h(this, "fractionDigits");
|
|
15
|
+
this.value = "", this.caretOffset = 0, this.maxLength = t, this.fractionDigits = i;
|
|
16
|
+
}
|
|
17
|
+
/** Получение значения. */
|
|
18
|
+
getValue() {
|
|
19
|
+
return this.value;
|
|
20
|
+
}
|
|
21
|
+
/** Получение величины сдвига каретки. */
|
|
22
|
+
getCaretOffset() {
|
|
23
|
+
return this.caretOffset;
|
|
24
|
+
}
|
|
25
|
+
/** Применение входных данные для форматирования. */
|
|
26
|
+
apply(t) {
|
|
27
|
+
const i = t.length;
|
|
28
|
+
this.fractionDigits == 0 ? this.value = this.formatInteger(t, i) : this.value = this.formatDecimal(t, i);
|
|
29
|
+
}
|
|
30
|
+
/** Форматирование значения в виде целого значения. */
|
|
31
|
+
formatInteger(t, i) {
|
|
32
|
+
const s = [];
|
|
33
|
+
if (i > 0) {
|
|
34
|
+
let e = 0;
|
|
35
|
+
for (s.push(t[e]); ++e < i; )
|
|
36
|
+
(i - e) % 3 == 0 && (s.push(" "), this.caretOffset++), s.push(t[e]);
|
|
37
|
+
}
|
|
38
|
+
return s.join("");
|
|
39
|
+
}
|
|
40
|
+
/** Форматирование значения в виде десятичной дроби. */
|
|
41
|
+
formatDecimal(t, i) {
|
|
42
|
+
const s = [];
|
|
43
|
+
if (i) {
|
|
44
|
+
const e = i - this.fractionDigits - 1;
|
|
45
|
+
let f = 0;
|
|
46
|
+
for (s.push(t[f]); ++f < e; )
|
|
47
|
+
(e - f) % 3 == 0 && (s.push(" "), this.caretOffset++), s.push(t[f]);
|
|
48
|
+
for (s.push(n.DecimalComma); ++f < i; )
|
|
49
|
+
s.push(t[f]);
|
|
50
|
+
}
|
|
51
|
+
return s.join("");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
m as AmountBaseInputFormatter
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=AmountBaseInputFormatter.js.map
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var m = (a, t, s) => t in a ? p(a, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[t] = s;
|
|
3
|
+
var n = (a, t, s) => m(a, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
+
import { AmountConst as c } from "../../consts/AmountConst.js";
|
|
5
|
+
import { StringUtils as o } from "../../utils/stringUtils.js";
|
|
6
|
+
import { isKey as D } from "../../utils/keyboard.js";
|
|
7
|
+
class O {
|
|
8
|
+
constructor(t, s) {
|
|
9
|
+
/** Значение. */
|
|
10
|
+
n(this, "value");
|
|
11
|
+
/** Величина сдвига каретки. */
|
|
12
|
+
n(this, "caretOffset");
|
|
13
|
+
/** Значение нажатой клавиши. */
|
|
14
|
+
n(this, "key");
|
|
15
|
+
/** Максимальное количество знаков перед запятой. */
|
|
16
|
+
n(this, "maxIntegerDigits");
|
|
17
|
+
/** Количество чисел после запятой. */
|
|
18
|
+
n(this, "fractionDigits");
|
|
19
|
+
this.value = "", this.caretOffset = 0, this.maxIntegerDigits = t, this.fractionDigits = s, this.key = "";
|
|
20
|
+
}
|
|
21
|
+
/** Получение значения. */
|
|
22
|
+
getValue() {
|
|
23
|
+
return this.value;
|
|
24
|
+
}
|
|
25
|
+
/** Получение величины сдвига каретки. */
|
|
26
|
+
getCaretOffset() {
|
|
27
|
+
return this.caretOffset;
|
|
28
|
+
}
|
|
29
|
+
/** Применение входных данных для обработки. */
|
|
30
|
+
apply(t, s, r) {
|
|
31
|
+
const i = t.length;
|
|
32
|
+
if (this.key = r, this.maxIntegerDigits > 0) {
|
|
33
|
+
if (this.fractionDigits == 0)
|
|
34
|
+
return this.parseInteger(t, s, i);
|
|
35
|
+
if (this.fractionDigits > 0)
|
|
36
|
+
return this.parseDecimal(t, s, i);
|
|
37
|
+
}
|
|
38
|
+
this.value = "", this.caretOffset -= i;
|
|
39
|
+
}
|
|
40
|
+
/** Обработка значения в виде целого числа. */
|
|
41
|
+
parseInteger(t, s, r) {
|
|
42
|
+
this.parseIntegerPart(t, s, r);
|
|
43
|
+
}
|
|
44
|
+
/** Обработка значения в виде десятичной дроби. */
|
|
45
|
+
parseDecimal(t, s, r) {
|
|
46
|
+
const i = this.findSeparatorIndex(t, s, r), [e, f] = i != -1 ? [i, i + 1] : [s, s], [h, g] = [t.substring(0, e), t.substring(f)];
|
|
47
|
+
this.parseIntegerPart(h, Math.min(s, e), e), this.parseFractionalPart(g, Math.max(s - f, 0), r - f);
|
|
48
|
+
}
|
|
49
|
+
/** Обработка целой части числа. */
|
|
50
|
+
parseIntegerPart(t, s, r) {
|
|
51
|
+
const i = [];
|
|
52
|
+
if ([t, s, r] = this.trimLeadingZeros(t, s, r), s > 0) {
|
|
53
|
+
const e = this.maxIntegerDigits - (r - s - Math.floor((r - s) / 4));
|
|
54
|
+
if (e > 0)
|
|
55
|
+
for (let f = 0, h = 0; f < s && !(o.isDigit(t[f]) && (i.push(t[f]), ++h == e)); f++)
|
|
56
|
+
;
|
|
57
|
+
this.caretOffset -= s - i.length;
|
|
58
|
+
}
|
|
59
|
+
if (s < r)
|
|
60
|
+
for (let e = s; e < r; e++)
|
|
61
|
+
o.isDigit(t[e]) ? i.push(t[e]) : this.caretOffset--;
|
|
62
|
+
this.value = i.join("");
|
|
63
|
+
}
|
|
64
|
+
/** Обработка дробной части числа. */
|
|
65
|
+
parseFractionalPart(t, s, r) {
|
|
66
|
+
const i = [];
|
|
67
|
+
if (s > 0) {
|
|
68
|
+
const e = this.fractionDigits;
|
|
69
|
+
for (let f = 0, h = 0; f < s; f++)
|
|
70
|
+
if (o.isDigit(t[f])) {
|
|
71
|
+
if (i.push(t[f]), ++h == e)
|
|
72
|
+
break;
|
|
73
|
+
} else
|
|
74
|
+
this.caretOffset--;
|
|
75
|
+
}
|
|
76
|
+
for (; i.length < this.fractionDigits; ) {
|
|
77
|
+
const e = r - (this.fractionDigits - i.length);
|
|
78
|
+
e >= s ? i.push(t[e]) : (i.push("0"), D(this.key, "DELETE") && this.caretOffset++);
|
|
79
|
+
}
|
|
80
|
+
if (this.value.length == 0)
|
|
81
|
+
if (i.some((e) => e != "0"))
|
|
82
|
+
this.value = "0", this.caretOffset++;
|
|
83
|
+
else
|
|
84
|
+
return;
|
|
85
|
+
this.value += c.DecimalPoint, this.value += i.join("");
|
|
86
|
+
}
|
|
87
|
+
/** Удаление ведущих нулей и всего, что им предшествует. */
|
|
88
|
+
trimLeadingZeros(t, s, r) {
|
|
89
|
+
let i = 0;
|
|
90
|
+
for (let e = 0; e < r && !(o.isDigit(t[e]) && (i = e, t[e] != "0")); e++)
|
|
91
|
+
;
|
|
92
|
+
return this.caretOffset -= i, [t.substring(i), Math.max(s - i, 0), r - i];
|
|
93
|
+
}
|
|
94
|
+
/** Нахождение индекса десятичного разделителя. */
|
|
95
|
+
findSeparatorIndex(t, s, r) {
|
|
96
|
+
if (s < r - (this.fractionDigits + 1)) {
|
|
97
|
+
for (let i = r - 1; i >= 0; i--)
|
|
98
|
+
if (o.isDecimalSeparator(t[i]))
|
|
99
|
+
return i;
|
|
100
|
+
} else
|
|
101
|
+
for (let i = 0; i < r; i++)
|
|
102
|
+
if (o.isDecimalSeparator(t[i]))
|
|
103
|
+
return i;
|
|
104
|
+
return -1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
O as AmountBaseInputParser
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=AmountBaseInputParser.js.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs as d, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import R, { useRef as y, useLayoutEffect as x } from "react";
|
|
3
|
+
import { FormGroup as E } from "../FormGroup/FormGroup.js";
|
|
4
|
+
import { FormField as I } from "../FormField/FormField.js";
|
|
5
|
+
import { FormFieldDescription as T } from "../FormField/components/FormFieldDescription.js";
|
|
6
|
+
import { FormFieldLabel as V } from "../FormField/components/FormFieldLabel.js";
|
|
7
|
+
import { FormFieldPostfix as D } from "../FormField/components/FormFieldPostfix.js";
|
|
8
|
+
import { FormFieldClear as K } from "../FormField/components/FormFieldClear.js";
|
|
9
|
+
import { F as j } from "../../chunks/FormFieldInput-qaJqBTBV.js";
|
|
10
|
+
import { AmountBaseInputCore as A } from "./AmountBaseInputCore.js";
|
|
11
|
+
import { setCaretPosition as L } from "../../utils/inputUtils.js";
|
|
12
|
+
import { createPlaceholder as M, setFallbackCaret as g } from "./utils.js";
|
|
13
|
+
const $ = "currency__ca53f7fe", b = {
|
|
14
|
+
currency: $
|
|
15
|
+
}, Z = R.forwardRef(
|
|
16
|
+
({
|
|
17
|
+
label: f,
|
|
18
|
+
description: i,
|
|
19
|
+
currency: h,
|
|
20
|
+
postfix: s,
|
|
21
|
+
inputProps: t,
|
|
22
|
+
maxIntegerDigits: m = 16,
|
|
23
|
+
fractionDigits: n = 2,
|
|
24
|
+
...F
|
|
25
|
+
}, o) => {
|
|
26
|
+
const u = F["data-test-id"], C = t.placeholder || M(n), a = y(null), e = y();
|
|
27
|
+
e.current === void 0 && (e.current = new A(m, n)), x(() => {
|
|
28
|
+
e.current && a.current == document.activeElement && L(a.current, Math.max(e.current.caret, 0));
|
|
29
|
+
}, [t.value]);
|
|
30
|
+
const _ = () => e.current ? ((t.value != e.current.value || m != e.current.maxIntegerDigits || n != e.current.fractionDigits) && (e.current.maxIntegerDigits = m, e.current.fractionDigits = n, e.current.apply(t.value, t.value.length)), e.current.cache.formattedValue = e.current.formattedValue, e.current.formattedValue) : "", S = (r) => {
|
|
31
|
+
if (!e.current) return;
|
|
32
|
+
const c = r.target.selectionStart ?? r.target.value.length;
|
|
33
|
+
e.current.apply(r.target.value, c), g(r.target, e.current, n), t.onChange(e.current.value);
|
|
34
|
+
}, k = (r) => {
|
|
35
|
+
var c;
|
|
36
|
+
e.current && (e.current.cache.key = r.key, (c = t.onKeyDown) == null || c.call(t, r));
|
|
37
|
+
}, v = (r) => {
|
|
38
|
+
var c;
|
|
39
|
+
e.current && (e.current.cache.key = "", e.current.cache.selectionStart = r.currentTarget.selectionStart, e.current.cache.selectionEnd = r.currentTarget.selectionEnd, e.current.cache.selectionDirection = r.currentTarget.selectionDirection, (c = t.onSelect) == null || c.call(t, r));
|
|
40
|
+
}, w = () => {
|
|
41
|
+
!e.current || !a.current || (e.current.apply("", 0), g(a.current, e.current, n), t.onChange(e.current.value));
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ d(E, { children: [
|
|
44
|
+
/* @__PURE__ */ d(I, { ...F, children: [
|
|
45
|
+
f ? /* @__PURE__ */ l(V, { children: f }) : null,
|
|
46
|
+
/* @__PURE__ */ l(
|
|
47
|
+
j,
|
|
48
|
+
{
|
|
49
|
+
...t,
|
|
50
|
+
ref: (r) => {
|
|
51
|
+
a.current = r, typeof o == "function" ? o(r) : o && (o.current = r);
|
|
52
|
+
},
|
|
53
|
+
value: _(),
|
|
54
|
+
onChange: S,
|
|
55
|
+
onKeyDown: k,
|
|
56
|
+
onSelect: v,
|
|
57
|
+
autoComplete: "off",
|
|
58
|
+
inputMode: "decimal",
|
|
59
|
+
"data-test-id": u && `${u}__input`,
|
|
60
|
+
placeholder: C
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ d(D, { children: [
|
|
64
|
+
/* @__PURE__ */ l(K, { onClick: w }),
|
|
65
|
+
h ? /* @__PURE__ */ l("span", { className: b.currency, "data-test-id": u && `${u}__unit`, children: h }) : null,
|
|
66
|
+
s || null
|
|
67
|
+
] })
|
|
68
|
+
] }),
|
|
69
|
+
i ? /* @__PURE__ */ l(T, { children: i }) : null
|
|
70
|
+
] });
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
export {
|
|
74
|
+
Z as AmountField
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=AmountField.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AmountConst as o } from "../../consts/AmountConst.js";
|
|
2
|
+
import { isKey as c } from "../../utils/keyboard.js";
|
|
3
|
+
import { StringUtils as f } from "../../utils/stringUtils.js";
|
|
4
|
+
function g(t) {
|
|
5
|
+
const r = ["0"];
|
|
6
|
+
if (t > 0) {
|
|
7
|
+
r.push(o.DecimalComma);
|
|
8
|
+
for (let n = 0; n < t; n++)
|
|
9
|
+
r.push("0");
|
|
10
|
+
}
|
|
11
|
+
return r.join("");
|
|
12
|
+
}
|
|
13
|
+
function R(t, r, n) {
|
|
14
|
+
const { formattedValue: i, key: a, selectionStart: e, selectionEnd: l, selectionDirection: s } = r.cache;
|
|
15
|
+
if (t.value = i, !(e === null || l === null || s === null)) {
|
|
16
|
+
if (a === o.DecimalComma || a === o.DecimalPoint) {
|
|
17
|
+
if (e === l && i[e] === o.DecimalComma)
|
|
18
|
+
return t.setSelectionRange(e + 1, e + 1);
|
|
19
|
+
} else if (c(a, "BACKSPACE"))
|
|
20
|
+
if (e === l) {
|
|
21
|
+
if (f.isDigit(i[e - 1]) === !1)
|
|
22
|
+
return t.setSelectionRange(e - 1, l - 1);
|
|
23
|
+
} else
|
|
24
|
+
return t.setSelectionRange(e, e);
|
|
25
|
+
else if (c(a, "DELETE"))
|
|
26
|
+
if (e === l) {
|
|
27
|
+
if (f.isDigit(i[e]) === !1)
|
|
28
|
+
return t.setSelectionRange(e + 1, l + 1);
|
|
29
|
+
} else
|
|
30
|
+
return t.setSelectionRange(l, l);
|
|
31
|
+
return n > 0 && i.length - n - 1 < e && r.formattedValue === i ? t.setSelectionRange(r.caret, r.caret) : s == "backward" ? t.setSelectionRange(l, l) : t.setSelectionRange(e, e);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
g as createPlaceholder,
|
|
36
|
+
R as setFallbackCaret
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=utils.js.map
|
package/components/Body/Body.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import n from "react";
|
|
3
|
-
import { c as t } from "../../chunks/vendor-
|
|
4
|
-
const y = "
|
|
3
|
+
import { c as t } from "../../chunks/vendor-CehxOAkM.js";
|
|
4
|
+
const y = "body__15d00f25", c = "bodyInner__edae3e0c", d = {
|
|
5
5
|
body: y,
|
|
6
|
-
bodyInner:
|
|
7
|
-
},
|
|
8
|
-
|
|
6
|
+
bodyInner: c
|
|
7
|
+
}, m = n.forwardRef(({ children: e, className: r, ...s }, a) => /* @__PURE__ */ o("div", { className: t(d.body, r), ...s, "data-tx": "1.3.0", ref: a, children: /* @__PURE__ */ o("div", { className: d.bodyInner, children: e }) }));
|
|
8
|
+
m.displayName = "Body";
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
m as Body
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=Body.js.map
|