@sberbusiness/triplex-next 1.1.0 → 1.2.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-Dp7FRT9y.js → AlertProcessSpoiler-B3Xzh0I2.js} +13 -13
- package/chunks/Card.module-Dh5vP2zv.js +17 -0
- package/chunks/DropdownListItem-B1GkU8rn.js +57 -0
- package/chunks/DropdownMobile.module-CYlB98Oc.js +21 -0
- package/chunks/Footer.module-Bk8QkaWN.js +11 -0
- package/chunks/{FormFieldInput-apk1b0w6.js → FormFieldInput-n8Ee4EcP.js} +23 -23
- package/chunks/HeaderLayoutSidebar.module-CDNHX5_G.js +9 -0
- package/chunks/HeaderTabs.module-yaGpurOU.js +9 -0
- package/chunks/HeaderTitle.module-XzB-YndL.js +9 -0
- package/chunks/{ListItemControlsButton-Cn3Vmrsn.js → ListItemControlsButton-BdtSkcyn.js} +10 -10
- package/chunks/ListItemTail.module-D_m5pMsh.js +12 -0
- package/chunks/ListMasterFooter.module-DXrsYZZo.js +10 -0
- package/chunks/Overlay.module-BghrPKKn.js +18 -0
- package/chunks/Page.module-D6xCdUbr.js +12 -0
- package/chunks/RightBorderArrow-BA2_2Ry3.js +146 -0
- package/chunks/SuggestFieldMobileDropdownHint-Dz-VDDoR.js +15 -0
- package/chunks/TableFooter.module-BzfTOGS_.js +13 -0
- package/chunks/TabsExtended.module-B3nvdhKr.js +16 -0
- package/chunks/TabsLine.module-Dlj__Yjk.js +23 -0
- package/chunks/TooltipDesktop.module-TiWl3v5C.js +19 -0
- package/chunks/{UploadZoneInput-R9729LZY.js → UploadZoneInput-CioKsqkV.js} +10 -10
- package/chunks/utils-B5p23Ple.js +26 -0
- package/chunks/utils-BtcCJ4_U.js +20 -0
- package/chunks/utils-D7E_PKCe.js +36 -0
- package/chunks/utils-DPXynVs1.js +72 -0
- package/chunks/utils-DjxtOr-n.js +48 -0
- package/chunks/vendor-CehxOAkM.js +11907 -0
- package/components/Alert/AlertContext/AlertContext.js +6 -6
- 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 +73 -72
- package/components/Button/ButtonBase.js +1 -1
- package/components/Button/ButtonDropdown.js +113 -127
- package/components/Button/ButtonDropdownExtended.js +2 -2
- package/components/Button/ButtonIcon.js +2 -2
- package/components/Card/CardAction.js +10 -10
- 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 +14 -14
- package/components/Checkbox/CheckboxYGroup.js +4 -4
- package/components/Checkbox/index.js +4 -6
- package/components/Chip/Chip.js +86 -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/enums.js +5 -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 +142 -142
- package/components/DesignTokens/DesignTokenUtils.js +2 -2
- package/components/DesignTokens/DesignTokensComponents.js +89 -69
- package/components/DesignTokens/DesignTokensComponentsThemeDark.js +92 -77
- 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/Marker.js +20 -0
- package/components/DesignTokens/components/MarkerStatus.js +9 -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/index.js +100 -79
- 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 +34 -33
- 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 +5 -5
- package/components/FormField/components/FormFieldInput.js +2 -2
- package/components/FormField/components/FormFieldLabel.js +14 -14
- package/components/FormField/components/FormFieldMaskedInput.js +12 -12
- package/components/FormField/components/FormFieldPostfix.js +6 -6
- package/components/FormField/components/FormFieldPrefix.js +7 -7
- package/components/FormField/components/FormFieldTarget.js +22 -22
- 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 +6 -6
- 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 +4 -4
- package/components/Island/components/IslandFooter.js +4 -4
- package/components/Island/components/IslandHeader.js +2 -2
- 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 +27 -27
- package/components/List/List.js +12 -20
- package/components/List/ListSortable.js +1 -1
- package/components/List/components/ListEmptyState.js +6 -6
- package/components/List/components/ListItem.js +1 -10
- package/components/List/components/ListItemContent.js +7 -7
- package/components/List/components/ListItemControls.js +7 -7
- package/components/List/components/ListItemControlsButton.js +2 -2
- package/components/List/components/ListItemControlsButtonDropdown.js +4 -2
- package/components/List/components/ListItemLoading.js +11 -9
- package/components/List/components/ListItemSelectable.js +5 -5
- 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 +2 -2
- package/components/List/components/ListSortableItemControls.js +2 -2
- package/components/List/components/ListSortableItemTarget.js +8 -8
- 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 +5 -5
- 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 +6 -6
- package/components/ListMaster/components/SelectionControls.js +3 -3
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +5 -5
- package/components/Loader/LoaderSmall/LoaderSmall.js +24 -35
- package/components/LoaderWidget/LoaderWidget.js +15 -14
- 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 +36 -0
- package/components/MarkerStatus/index.js +5 -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 +5 -5
- 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 +7 -7
- package/components/Pagination/utils/paginationUtils.js +1 -1
- package/components/Radio/Radio.js +29 -21
- package/components/Radio/RadioXGroup.js +10 -10
- package/components/Radio/RadioYGroup.js +5 -5
- package/components/Radio/index.js +4 -6
- package/components/Row/Row.js +6 -6
- package/components/SegmentedControl/SegmentedControl.js +36 -39
- package/components/SegmentedControl/SegmentedControlSegment.js +6 -6
- package/components/SelectExtendedField/SelectExtendedField.js +9 -9
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +5 -2
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdownDefault.js +22 -18
- package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +38 -37
- package/components/SelectField/SelectField.js +62 -0
- package/components/SelectField/index.js +5 -0
- package/components/Skeleton/Skeleton.js +11 -11
- 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 +21 -21
- 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/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/Typography/Caption.js +17 -17
- package/components/Typography/Text.js +20 -20
- package/components/Typography/Title.js +15 -15
- 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 +366 -275
- 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/index.d.ts +1029 -124
- package/index.js +361 -268
- package/package.json +69 -2
- package/styles/triplex-next.css +436 -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-Ddt7TQ9Z.js +0 -17
- package/chunks/DropdownListItem-y6Rvj_dd.js +0 -56
- package/chunks/DropdownMobile.module-DrQkghxs.js +0 -19
- package/chunks/Footer.module-CKfl241m.js +0 -11
- package/chunks/HeaderLayoutSidebar.module-DTXnksBK.js +0 -9
- package/chunks/HeaderTabs.module-DVh6MotJ.js +0 -9
- package/chunks/HeaderTitle.module-DOeVL9zC.js +0 -9
- package/chunks/ListItemTail.module-BnbT61OM.js +0 -12
- package/chunks/ListMasterFooter.module-C6QFamKQ.js +0 -10
- package/chunks/Overlay.module-BTSQ5G6t.js +0 -18
- package/chunks/Page.module-DfMBQJob.js +0 -16
- package/chunks/TabsExtended.module-okOlTNQG.js +0 -13
- package/chunks/TabsExtendedUtils-NCwWiX7O.js +0 -23
- package/chunks/TooltipDesktop.module-DTbnIWo1.js +0 -19
- package/chunks/utils-B0khB-Lq.js +0 -36
- package/chunks/vendor-D-uL_icH.js +0 -5895
- package/components/Checkbox/enum.js +0 -5
- package/components/Radio/enum.js +0 -5
- package/components/TabsExtended/TabsExtendedUtils.js +0 -8
|
@@ -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 N } from "../../../chunks/vendor-CehxOAkM.js";
|
|
9
|
+
const _ = "alertContext__4a4ed76d", d = "alertContextText__3e3e2ba8", E = "alertTypeError__24d1fca5", C = "alertTypeInfo__cb4870ca", u = "alertTypeWarning__59a7be5f", A = "alertTypeSystem__0f6e0233", n = {
|
|
10
|
+
alertContext: _,
|
|
11
|
+
alertContextText: d,
|
|
12
12
|
alertTypeError: E,
|
|
13
13
|
alertTypeInfo: C,
|
|
14
14
|
alertTypeWarning: u,
|
|
@@ -34,9 +34,9 @@ const N = "alertContext__afadde77", _ = "alertContextText__9688d2fb", E = "alert
|
|
|
34
34
|
"span",
|
|
35
35
|
{
|
|
36
36
|
role: "alert",
|
|
37
|
-
className:
|
|
37
|
+
className: N(n.alertContext, m[a](n), l),
|
|
38
38
|
...p,
|
|
39
|
-
"data-tx": "1.
|
|
39
|
+
"data-tx": "1.2.0",
|
|
40
40
|
ref: c,
|
|
41
41
|
children: [
|
|
42
42
|
s || O(a),
|
|
@@ -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-B3Xzh0I2.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.2.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-B3Xzh0I2.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 a } 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__f512039e", N = {
|
|
5
|
+
amountAdaptive: f
|
|
6
|
+
}, _ = 14, h = ({
|
|
7
|
+
className: o,
|
|
8
|
+
value: m,
|
|
9
|
+
fractionLength: r,
|
|
10
|
+
currency: n,
|
|
11
|
+
currencyTitle: s,
|
|
12
|
+
adaptive: c,
|
|
13
|
+
dataTestId: e,
|
|
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__ */ a("span", { "data-test-id": e && `${e}__currencyName`, title: s, children: n }, "currencyName")
|
|
27
|
+
];
|
|
28
|
+
return /* @__PURE__ */ l("span", { className: p, ...i, "data-tx": "1.2.0", children: [
|
|
29
|
+
/* @__PURE__ */ a("span", { "data-test-id": e && `${e}__amount`, children: t }),
|
|
30
|
+
n && 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-n8Ee4EcP.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__6f344116", 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 t from "react";
|
|
3
|
-
import { c as a } from "../../chunks/vendor-
|
|
4
|
-
const y = "
|
|
3
|
+
import { c as a } from "../../chunks/vendor-CehxOAkM.js";
|
|
4
|
+
const y = "body__db9d1e41", b = "bodyInner__41e8b63b", d = {
|
|
5
5
|
body: y,
|
|
6
|
-
bodyInner:
|
|
7
|
-
},
|
|
8
|
-
|
|
6
|
+
bodyInner: b
|
|
7
|
+
}, c = t.forwardRef(({ children: e, className: r, ...s }, n) => /* @__PURE__ */ o("div", { className: a(d.body, r), ...s, "data-tx": "1.2.0", ref: n, children: /* @__PURE__ */ o("div", { className: d.bodyInner, children: e }) }));
|
|
8
|
+
c.displayName = "Body";
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
c as Body
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=Body.js.map
|
|
@@ -1,99 +1,100 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import { LoaderSmall as
|
|
5
|
-
import { ELoaderSmallTheme as
|
|
1
|
+
import { jsxs as m, jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import k from "react";
|
|
3
|
+
import { c as g } from "../../chunks/vendor-CehxOAkM.js";
|
|
4
|
+
import { LoaderSmall as R } from "../Loader/LoaderSmall/LoaderSmall.js";
|
|
5
|
+
import { ELoaderSmallTheme as u } from "../Loader/LoaderSmall/enum.js";
|
|
6
6
|
import "../Loader/LoaderMiddle/LoaderMiddle.js";
|
|
7
|
-
import { ButtonBase as
|
|
8
|
-
import {
|
|
9
|
-
|
|
7
|
+
import { ButtonBase as C } from "./ButtonBase.js";
|
|
8
|
+
import { EButtonTheme as o } from "./enums.js";
|
|
9
|
+
import { EComponentSize as s } from "../../enums/EComponentSize.js";
|
|
10
|
+
const A = "general__5141d3ad", B = "expanded__fc18fd80", p = {
|
|
10
11
|
general: A,
|
|
11
|
-
expanded:
|
|
12
|
-
},
|
|
13
|
-
secondary:
|
|
12
|
+
expanded: B
|
|
13
|
+
}, D = "secondary__85974992", T = "expanded__fc18fd80", f = {
|
|
14
|
+
secondary: D,
|
|
14
15
|
expanded: T
|
|
15
|
-
},
|
|
16
|
-
secondaryLight:
|
|
17
|
-
expanded:
|
|
18
|
-
},
|
|
19
|
-
danger:
|
|
20
|
-
expanded:
|
|
21
|
-
},
|
|
22
|
-
link:
|
|
23
|
-
},
|
|
24
|
-
button:
|
|
25
|
-
sm:
|
|
26
|
-
icon:
|
|
27
|
-
md:
|
|
28
|
-
lg:
|
|
29
|
-
block:
|
|
30
|
-
content:
|
|
31
|
-
loading:
|
|
32
|
-
loader:
|
|
33
|
-
hidden:
|
|
34
|
-
},
|
|
16
|
+
}, G = "secondaryLight__a44ff8d3", I = "expanded__fc18fd80", h = {
|
|
17
|
+
secondaryLight: G,
|
|
18
|
+
expanded: I
|
|
19
|
+
}, v = "danger__ce882c06", O = "expanded__fc18fd80", b = {
|
|
20
|
+
danger: v,
|
|
21
|
+
expanded: O
|
|
22
|
+
}, Y = "link__1e5b0707", x = {
|
|
23
|
+
link: Y
|
|
24
|
+
}, w = "button__2cd88713", z = "sm__bd0e31dd", M = "icon__b78b7b18", $ = "md__401601d9", j = "lg__8c2a4c95", H = "block__9ef2ad79", K = "content__2d7cb848", U = "loading__e53f9c33", q = "loader__89749b10", F = "hidden__e5a359b9", e = {
|
|
25
|
+
button: w,
|
|
26
|
+
sm: z,
|
|
27
|
+
icon: M,
|
|
28
|
+
md: $,
|
|
29
|
+
lg: j,
|
|
30
|
+
block: H,
|
|
31
|
+
content: K,
|
|
32
|
+
loading: U,
|
|
33
|
+
loader: q,
|
|
34
|
+
hidden: F
|
|
35
|
+
}, J = (t, n) => {
|
|
35
36
|
switch (t) {
|
|
36
|
-
case
|
|
37
|
-
return { [
|
|
38
|
-
case
|
|
37
|
+
case o.GENERAL:
|
|
38
|
+
return { [p.general]: !0, [p.expanded]: n };
|
|
39
|
+
case o.SECONDARY:
|
|
39
40
|
return {
|
|
40
|
-
[
|
|
41
|
-
[
|
|
41
|
+
[f.secondary]: !0,
|
|
42
|
+
[f.expanded]: n
|
|
42
43
|
};
|
|
43
|
-
case
|
|
44
|
+
case o.SECONDARY_LIGHT:
|
|
44
45
|
return {
|
|
45
|
-
[
|
|
46
|
-
[
|
|
46
|
+
[h.secondaryLight]: !0,
|
|
47
|
+
[h.expanded]: n
|
|
47
48
|
};
|
|
48
|
-
case
|
|
49
|
+
case o.DANGER:
|
|
49
50
|
return {
|
|
50
|
-
[
|
|
51
|
-
[
|
|
51
|
+
[b.danger]: !0,
|
|
52
|
+
[b.expanded]: n
|
|
52
53
|
};
|
|
53
|
-
case
|
|
54
|
+
case o.LINK:
|
|
54
55
|
return {
|
|
55
|
-
[
|
|
56
|
-
[
|
|
56
|
+
[x.link]: !0,
|
|
57
|
+
[x.expanded]: n
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
|
-
},
|
|
60
|
+
}, P = (t) => {
|
|
60
61
|
switch (t) {
|
|
61
|
-
case
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
return
|
|
62
|
+
case s.LG:
|
|
63
|
+
return e.lg;
|
|
64
|
+
case s.MD:
|
|
65
|
+
return e.md;
|
|
66
|
+
case s.SM:
|
|
67
|
+
return e.sm;
|
|
67
68
|
}
|
|
68
|
-
},
|
|
69
|
-
const
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
},
|
|
72
|
-
const { children:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
{ [
|
|
77
|
-
{ [
|
|
69
|
+
}, Q = (t, n) => {
|
|
70
|
+
const d = [o.SECONDARY, o.SECONDARY_LIGHT].includes(t) ? u.BRAND : u.NEUTRAL;
|
|
71
|
+
return /* @__PURE__ */ y(R, { theme: d, size: n });
|
|
72
|
+
}, V = k.forwardRef((t, n) => {
|
|
73
|
+
const { children: d, className: N, disabled: a, theme: r, size: l = s.MD, block: L, loading: c, icon: i, ...S } = t, { "aria-expanded": _ } = t, E = g(
|
|
74
|
+
e.button,
|
|
75
|
+
J(r, !!_),
|
|
76
|
+
P(l),
|
|
77
|
+
{ [e.block]: !!L, [e.loading]: !!c },
|
|
78
|
+
{ [e.icon]: !!i && !d },
|
|
78
79
|
// Классы для иконок, начало.
|
|
79
80
|
"hoverable",
|
|
80
81
|
{
|
|
81
|
-
active: !!
|
|
82
|
-
disabled: !!
|
|
82
|
+
active: !!_,
|
|
83
|
+
disabled: !!a
|
|
83
84
|
},
|
|
84
85
|
// Классы для иконок, конец.
|
|
85
|
-
|
|
86
|
+
N
|
|
86
87
|
);
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
return /* @__PURE__ */ m(C, { className: E, tabIndex: c ? -1 : void 0, disabled: a, ...S, ref: n, children: [
|
|
89
|
+
/* @__PURE__ */ m("span", { className: e.content, children: [
|
|
90
|
+
i,
|
|
91
|
+
d
|
|
91
92
|
] }),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ y("div", { className: g(e.loader, !c && e.hidden), children: Q(r, l) })
|
|
93
94
|
] });
|
|
94
95
|
});
|
|
95
|
-
|
|
96
|
+
V.displayName = "Button";
|
|
96
97
|
export {
|
|
97
|
-
|
|
98
|
+
V as Button
|
|
98
99
|
};
|
|
99
100
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import e from "react";
|
|
3
|
-
const r = e.forwardRef((t, o) => /* @__PURE__ */ a("button", { type: "button", ...t, "data-tx": "1.
|
|
3
|
+
const r = e.forwardRef((t, o) => /* @__PURE__ */ a("button", { type: "button", ...t, "data-tx": "1.2.0", ref: o }));
|
|
4
4
|
r.displayName = "ButtonBase";
|
|
5
5
|
export {
|
|
6
6
|
r as ButtonBase
|