@sberbusiness/triplex-next 0.1.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/AlertProcessSpoiler-Dp7FRT9y.js +39 -0
- package/chunks/Card.module-Ddt7TQ9Z.js +17 -0
- package/chunks/DropdownListItem-y6Rvj_dd.js +56 -0
- package/chunks/DropdownMobile.module-DrQkghxs.js +19 -0
- package/chunks/Footer.module-CKfl241m.js +11 -0
- package/chunks/FormFieldInput-apk1b0w6.js +63 -0
- package/chunks/HeaderLayoutSidebar.module-DTXnksBK.js +9 -0
- package/chunks/HeaderTabs.module-DVh6MotJ.js +9 -0
- package/chunks/HeaderTitle.module-DOeVL9zC.js +9 -0
- package/chunks/{ListItemControlsButton-BtMEMrGK.js → ListItemControlsButton-Cn3Vmrsn.js} +8 -8
- package/chunks/ListItemTail.module-BnbT61OM.js +12 -0
- package/chunks/ListMasterFooter.module-C6QFamKQ.js +10 -0
- package/chunks/Overlay.module-BTSQ5G6t.js +18 -0
- package/chunks/Page.module-DfMBQJob.js +16 -0
- package/chunks/TabsExtended.module-okOlTNQG.js +13 -0
- package/chunks/{TabsExtendedUtils-BOHZcNx8.js → TabsExtendedUtils-NCwWiX7O.js} +6 -6
- package/chunks/TooltipDesktop.module-DTbnIWo1.js +19 -0
- package/chunks/UploadZoneInput-R9729LZY.js +33 -0
- package/chunks/utils-B0khB-Lq.js +36 -0
- package/chunks/{vendor-CF2m175I.js → vendor-D-uL_icH.js} +38 -34
- package/components/Alert/AlertContext/AlertContext.js +10 -10
- package/components/Alert/AlertProcess/AlertProcess.js +3 -3
- package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +2 -2
- package/components/Body/Body.js +6 -6
- package/components/Button/Button.js +95 -10
- package/components/Button/ButtonBase.js +1 -1
- package/components/Button/ButtonDropdown.js +184 -23
- package/components/Button/ButtonDropdownExtended.js +50 -6
- package/components/Button/ButtonIcon.js +2 -2
- package/components/Button/enums.js +5 -4
- package/components/Button/index.js +14 -12
- package/components/Card/CardAction.js +26 -26
- 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/Checkbox/Checkbox.js +7 -7
- package/components/Checkbox/CheckboxXGroup.js +11 -11
- package/components/Checkbox/CheckboxYGroup.js +2 -2
- package/components/Col/Col.js +146 -146
- package/components/DesignTokens/DesignTokenUtils.js +2 -2
- package/components/DesignTokens/DesignTokensComponents.js +9 -7
- package/components/DesignTokens/DesignTokensComponentsThemeDark.js +15 -13
- package/components/DesignTokens/components/Button.js +27 -0
- package/components/DesignTokens/components/FormField.js +22 -4
- package/components/DesignTokens/components/Island.js +26 -0
- package/components/DesignTokens/components/index.js +17 -14
- package/components/Dropdown/Dropdown.js +22 -7
- package/components/Dropdown/desktop/DropdownDesktop.js +94 -18
- package/components/Dropdown/desktop/DropdownList.js +65 -94
- package/components/Dropdown/desktop/DropdownListItem.js +2 -2
- package/components/Dropdown/index.js +27 -25
- package/components/Dropdown/mobile/DropdownMobile.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileBody.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileClose.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileFooter.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileHeader.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInner.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInput.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileList.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileListItem.js +2 -2
- package/components/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 +53 -52
- package/components/FormField/FormFieldContext.js +8 -8
- package/components/FormField/components/FormFieldClear.js +13 -12
- package/components/FormField/components/FormFieldCounter.js +5 -5
- package/components/FormField/components/FormFieldDescription.js +5 -5
- package/components/FormField/components/FormFieldInput.js +4 -3
- package/components/FormField/components/FormFieldLabel.js +32 -31
- package/components/FormField/components/FormFieldMaskedInput.js +102 -92
- package/components/FormField/components/FormFieldPostfix.js +7 -7
- package/components/FormField/components/FormFieldPrefix.js +5 -5
- package/components/FormField/components/FormFieldTarget.js +49 -0
- package/components/FormField/components/FormFieldTextarea.js +25 -24
- package/components/FormField/enums.js +3 -2
- package/components/FormField/index.js +19 -16
- package/components/FormField/types.js +2 -0
- package/components/Header/Header.js +11 -11
- 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/Island/Island.js +78 -0
- package/components/Island/components/IslandBody.js +10 -0
- package/components/Island/components/IslandFooter.js +10 -0
- package/components/Island/components/IslandHeader.js +10 -0
- package/components/Island/enums.js +7 -0
- package/components/Island/index.js +9 -0
- package/components/KeyDownListener/ComposedKeyDownListener.js +13 -0
- package/components/KeyDownListener/KeyDownListener.js +27 -0
- package/components/KeyDownListener/index.js +7 -0
- package/components/Link/Link.js +27 -27
- package/components/List/List.js +3 -3
- package/components/List/ListSortable.js +1 -1
- package/components/List/components/ListEmptyState.js +6 -6
- package/components/List/components/ListItem.js +1 -1
- 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 +98 -15
- package/components/List/components/ListItemLoading.js +2 -2
- package/components/List/components/ListItemSelectable.js +9 -9
- package/components/List/components/ListItemTable.js +29 -19
- package/components/List/components/ListItemTailLeft.js +2 -2
- package/components/List/components/ListItemTailRight.js +2 -2
- package/components/List/components/ListSortableItem.js +37 -18
- package/components/List/components/ListSortableItemControls.js +2 -2
- package/components/List/components/ListSortableItemTarget.js +6 -6
- package/components/List/index.js +22 -20
- 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 +7 -7
- package/components/ListMaster/components/SelectionControls.js +3 -3
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +7 -7
- package/components/Loader/LoaderSmall/LoaderSmall.js +16 -16
- package/components/LoaderWidget/LoaderWidget.js +9 -9
- 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 +2 -2
- package/components/Page/components/HeaderPage.js +2 -2
- package/components/Pagination/components/PaginationExtended.js +3 -3
- package/components/Pagination/components/PaginationNavigationButton.js +6 -6
- package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
- package/components/Pagination/components/PaginationPageButton.js +6 -6
- package/components/Pagination/components/PaginationPageEllipsis.js +2 -2
- package/components/Pagination/components/PaginationSelect.js +12 -12
- package/components/Pagination/utils/paginationUtils.js +10 -10
- package/components/Radio/Radio.js +3 -3
- package/components/Radio/RadioXGroup.js +10 -10
- package/components/Radio/RadioYGroup.js +9 -9
- package/components/Row/Row.js +10 -10
- package/components/SegmentedControl/SegmentedControl.js +64 -7
- package/components/SegmentedControl/SegmentedControlContext.js +13 -0
- package/components/SegmentedControl/SegmentedControlSegment.js +68 -8
- package/components/SegmentedControl/index.js +6 -6
- package/components/SelectExtendedField/SelectExtendedField.js +57 -0
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +25 -0
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdownDefault.js +86 -0
- package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +101 -0
- package/components/SelectExtendedField/index.js +9 -0
- package/components/Skeleton/Skeleton.js +10 -10
- package/components/SwipeableArea/SwipeableArea.js +13 -13
- package/components/TabsExtended/TabsExtended.js +7 -7
- package/components/TabsExtended/TabsExtendedUtils.js +1 -1
- package/components/TabsExtended/components/TabsExtendedContent.js +11 -11
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTab.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTabButton.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +7 -7
- package/components/TabsExtended/types.js +2 -0
- package/components/TextField/MaskedField.js +6 -89
- package/components/TextField/TextField.js +6 -89
- package/components/TextField/TextFieldBase.js +30 -89
- package/components/TextField/index.js +4 -3
- package/components/ThemeProvider/ThemeProvider.js +8 -8
- package/components/ThemeProvider/components/ThemeProviderView.js +8 -8
- package/components/Tooltip/components/common/TooltipBody.js +7 -7
- package/components/Tooltip/components/common/TooltipLink.js +10 -10
- 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 +10 -10
- package/components/Typography/Caption.js +15 -15
- package/components/Typography/Text.js +24 -24
- package/components/Typography/Title.js +13 -13
- package/components/Typography/utils.js +1 -1
- package/components/UploadZone/UploadZone.js +109 -7
- package/components/UploadZone/UploadZoneContext.js +11 -0
- package/components/UploadZone/components/UploadZoneInput.js +5 -140
- package/components/UploadZone/index.js +2 -3
- package/components/UploadZone/types.js +2 -0
- package/components/index.js +279 -248
- package/index.d.ts +212 -27
- package/index.js +277 -246
- package/package.json +13 -1
- package/styles/triplex-next.css +354 -333
- package/chunks/AlertProcessSpoiler-BPbAJJFo.js +0 -39
- package/chunks/Card.module-Oqawy8hF.js +0 -17
- package/chunks/DropdownListItem-CW2MmFpw.js +0 -56
- package/chunks/DropdownMobile.module-DyunEp10.js +0 -19
- package/chunks/Footer.module-o57OEPdy.js +0 -11
- package/chunks/FormFieldInput-C2qWOLr3.js +0 -62
- package/chunks/HeaderLayoutSidebar.module-CzpXvDdH.js +0 -9
- package/chunks/HeaderTabs.module-CC0WAcoC.js +0 -9
- package/chunks/HeaderTitle.module-CH7eRK8R.js +0 -9
- package/chunks/ListItemTail.module-BBV_gvLd.js +0 -12
- package/chunks/ListMasterFooter.module-Cw1r4pz-.js +0 -10
- package/chunks/Overlay.module-08zZh8Y9.js +0 -18
- package/chunks/Page.module-Ccvf_vDR.js +0 -16
- package/chunks/TabsExtended.module-yT8L2ZYS.js +0 -13
- package/chunks/TooltipDesktop.module-CvcpQSlC.js +0 -19
- package/chunks/index-CAZEh1iw.js +0 -931
- package/chunks/utils-9a4dp5-W.js +0 -36
package/chunks/index-CAZEh1iw.js
DELETED
|
@@ -1,931 +0,0 @@
|
|
|
1
|
-
import { s as ue, D as Ge } from "./DropdownListItem-CW2MmFpw.js";
|
|
2
|
-
import { DropdownMobile as $e } from "../components/Dropdown/mobile/DropdownMobile.js";
|
|
3
|
-
import { DropdownMobileBody as Le } from "../components/Dropdown/mobile/DropdownMobileBody.js";
|
|
4
|
-
import { DropdownMobileClose as ve } from "../components/Dropdown/mobile/DropdownMobileClose.js";
|
|
5
|
-
import "../components/Dropdown/mobile/DropdownMobileFooter.js";
|
|
6
|
-
import { DropdownMobileHeader as Te } from "../components/Dropdown/mobile/DropdownMobileHeader.js";
|
|
7
|
-
import "../components/Dropdown/mobile/DropdownMobileInner.js";
|
|
8
|
-
import "../components/Dropdown/mobile/DropdownMobileInput.js";
|
|
9
|
-
import { DropdownMobileList as Ce } from "../components/Dropdown/mobile/DropdownMobileList.js";
|
|
10
|
-
import { DropdownMobileListItem as Re } from "../components/Dropdown/mobile/DropdownMobileListItem.js";
|
|
11
|
-
import { EDropdownListSize as J, EDropdownAlignment as Z, EDropdownDirection as ee, EDropdownSize as Q } from "../components/Dropdown/enums.js";
|
|
12
|
-
import { ButtonBase as ke } from "../components/Button/ButtonBase.js";
|
|
13
|
-
import "../components/Button/ButtonIcon.js";
|
|
14
|
-
import { EButtonSize as P, EButtonTheme as $ } from "../components/Button/enums.js";
|
|
15
|
-
import { FormField as Ue } from "../components/FormField/FormField.js";
|
|
16
|
-
import { FormFieldDescription as He } from "../components/FormField/components/FormFieldDescription.js";
|
|
17
|
-
import { FormFieldCounter as Ke } from "../components/FormField/components/FormFieldCounter.js";
|
|
18
|
-
import { FormFieldLabel as Ve } from "../components/FormField/components/FormFieldLabel.js";
|
|
19
|
-
import "../components/FormField/components/FormFieldClear.js";
|
|
20
|
-
import { s as je, F as Me } from "./FormFieldInput-C2qWOLr3.js";
|
|
21
|
-
import { FormFieldPostfix as Ye } from "../components/FormField/components/FormFieldPostfix.js";
|
|
22
|
-
import { FormFieldPrefix as qe } from "../components/FormField/components/FormFieldPrefix.js";
|
|
23
|
-
import "../components/FormField/components/FormFieldTextarea.js";
|
|
24
|
-
import "../components/FormField/enums.js";
|
|
25
|
-
import "../components/List/List.js";
|
|
26
|
-
import "../components/List/ListSortable.js";
|
|
27
|
-
import { ListItem as xe } from "../components/List/components/ListItem.js";
|
|
28
|
-
import { ListItemControls as Je } from "../components/List/components/ListItemControls.js";
|
|
29
|
-
import { ListItemContent as Qe } from "../components/List/components/ListItemContent.js";
|
|
30
|
-
import { s as fe, L as Xe } from "./ListItemControlsButton-BtMEMrGK.js";
|
|
31
|
-
import "../components/List/components/ListEmptyState.js";
|
|
32
|
-
import "../components/List/components/ListItemLoading.js";
|
|
33
|
-
import { ListItemSelectable as Ze } from "../components/List/components/ListItemSelectable.js";
|
|
34
|
-
import "../components/List/components/ListItemTailLeft.js";
|
|
35
|
-
import { ListItemTailRight as et } from "../components/List/components/ListItemTailRight.js";
|
|
36
|
-
import { ListSortableItemTarget as tt } from "../components/List/components/ListSortableItemTarget.js";
|
|
37
|
-
import "../components/List/components/ListSortableItemControls.js";
|
|
38
|
-
import { ESegmentedControlType as H, ESegmentedControlTheme as te, ESegmentedControlSize as re } from "../components/SegmentedControl/enums.js";
|
|
39
|
-
import { jsxs as F, jsx as r, Fragment as Ae } from "react/jsx-runtime";
|
|
40
|
-
import x, { useContext as le, useRef as O, useState as j, useEffect as W, useCallback as G, createElement as ne } from "react";
|
|
41
|
-
import { c as k, j as Fe, n as ot, o as oe, q as nt, C as rt } from "./vendor-CF2m175I.js";
|
|
42
|
-
import { Portal as st } from "../components/Portal/Portal.js";
|
|
43
|
-
import { EVENT_KEY_CODES as pe, isKey as T } from "../utils/keyboard.js";
|
|
44
|
-
import { DropdownListContext as ae } from "../components/Dropdown/DropdownListContext.js";
|
|
45
|
-
import "../components/Alert/AlertContext/AlertContext.js";
|
|
46
|
-
import "../components/Alert/AlertProcess/AlertProcess.js";
|
|
47
|
-
import "../components/Alert/AlertTypeUtils.js";
|
|
48
|
-
import "../components/Col/Col.js";
|
|
49
|
-
import "../components/Checkbox/Checkbox.js";
|
|
50
|
-
import "../components/Checkbox/CheckboxXGroup.js";
|
|
51
|
-
import "../components/Checkbox/CheckboxYGroup.js";
|
|
52
|
-
import { FormFieldContext as dt } from "../components/FormField/FormFieldContext.js";
|
|
53
|
-
import { presets as it } from "../components/FormField/components/FormFieldMaskedInputPresets.js";
|
|
54
|
-
import { FormGroup as ct } from "../components/FormGroup/FormGroup.js";
|
|
55
|
-
import "../components/Gap/Gap.js";
|
|
56
|
-
import "../components/Link/Link.js";
|
|
57
|
-
import { LoaderSmall as lt } from "../components/Loader/LoaderSmall/LoaderSmall.js";
|
|
58
|
-
import "../components/Loader/LoaderMiddle/LoaderMiddle.js";
|
|
59
|
-
import "../components/LoaderWidget/LoaderWidget.js";
|
|
60
|
-
import "../components/Radio/Radio.js";
|
|
61
|
-
import "../components/Radio/RadioXGroup.js";
|
|
62
|
-
import "../components/Radio/RadioYGroup.js";
|
|
63
|
-
import "../components/Row/Row.js";
|
|
64
|
-
import "../components/TabsExtended/TabsExtended.js";
|
|
65
|
-
import "../components/DesignTokens/DesignTokensComponents.js";
|
|
66
|
-
import "../components/DesignTokens/DesignTokensComponentsThemeDark.js";
|
|
67
|
-
import "../components/ThemeProvider/ThemeProviderContext.js";
|
|
68
|
-
import "../components/Typography/Title.js";
|
|
69
|
-
import { Text as Oe } from "../components/Typography/Text.js";
|
|
70
|
-
import "../components/Typography/Caption.js";
|
|
71
|
-
import { ETextSize as Be } from "../components/Typography/enums.js";
|
|
72
|
-
import { SwipeableArea as at } from "../components/SwipeableArea/SwipeableArea.js";
|
|
73
|
-
import "../components/Footer/Footer.js";
|
|
74
|
-
import "../components/Footer/components/FooterDescription.js";
|
|
75
|
-
import "../components/Footer/components/FooterDescriptionControls.js";
|
|
76
|
-
import "../components/Footer/components/FooterDescriptionContent.js";
|
|
77
|
-
import "../components/Body/Body.js";
|
|
78
|
-
import "../components/Header/Header.js";
|
|
79
|
-
import "../components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js";
|
|
80
|
-
import "../components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js";
|
|
81
|
-
import "../components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js";
|
|
82
|
-
import "../components/Header/components/HeaderSubheader/HeaderSubheader.js";
|
|
83
|
-
import "../components/Header/components/HeaderTabs/HeaderTabs.js";
|
|
84
|
-
import "../components/Header/components/HeaderTabs/HeaderTabsContent.js";
|
|
85
|
-
import "../components/Header/components/HeaderTabs/HeaderTabsControls.js";
|
|
86
|
-
import "../components/Header/components/HeaderTitle/HeaderTitle.js";
|
|
87
|
-
import "../components/Header/components/HeaderTitle/HeaderTitleContent.js";
|
|
88
|
-
import "../components/Header/components/HeaderTitle/HeaderTitleControls.js";
|
|
89
|
-
import "../components/Page/Page.js";
|
|
90
|
-
import "../components/Pagination/components/PaginationExtended.js";
|
|
91
|
-
import "../components/Pagination/components/PaginationNavigation.js";
|
|
92
|
-
import "../components/Pagination/components/PaginationNavigationButton.js";
|
|
93
|
-
import "../components/Pagination/components/PaginationNavigationExtended.js";
|
|
94
|
-
import "../components/Pagination/components/PaginationNavigationExtendedItem.js";
|
|
95
|
-
import "../components/Pagination/components/PaginationPageButton.js";
|
|
96
|
-
import "../components/Pagination/components/PaginationPageEllipsis.js";
|
|
97
|
-
import "../components/Pagination/components/PaginationSelect.js";
|
|
98
|
-
import "../components/Pagination/Pagination.js";
|
|
99
|
-
import "../components/Card/CardAction.js";
|
|
100
|
-
import "../components/Card/CardStatic.js";
|
|
101
|
-
import { useToken as mt } from "../components/ThemeProvider/useToken.js";
|
|
102
|
-
import { MobileView as ut } from "../components/MobileView/MobileView.js";
|
|
103
|
-
import { DotshorizontalStrokeSrvIcon24 as ft, CaretdownStrokeSrvIcon24 as ge } from "@sberbusiness/icons-next";
|
|
104
|
-
import { ELoaderSmallTheme as we, ELoaderSmallSize as se } from "../components/Loader/LoaderSmall/enum.js";
|
|
105
|
-
const pt = "button__fd0b4560", gt = "sm__26f5db5c", wt = "icon__e1df547a", ht = "md__6394704e", bt = "lg__2867d917", _t = "block__0c71d905", Dt = "content__66aab861", yt = "loading__e0424351", St = "loader__2d679f54", Nt = "hidden__8750f8d8", z = {
|
|
106
|
-
button: pt,
|
|
107
|
-
sm: gt,
|
|
108
|
-
icon: wt,
|
|
109
|
-
md: ht,
|
|
110
|
-
lg: bt,
|
|
111
|
-
block: _t,
|
|
112
|
-
content: Dt,
|
|
113
|
-
loading: yt,
|
|
114
|
-
loader: St,
|
|
115
|
-
hidden: Nt
|
|
116
|
-
}, Et = "general__af9a12ae", It = "expanded__28205dfc", he = {
|
|
117
|
-
general: Et,
|
|
118
|
-
expanded: It
|
|
119
|
-
}, Lt = "secondary__ab14b525", vt = "expanded__28205dfc", be = {
|
|
120
|
-
secondary: Lt,
|
|
121
|
-
expanded: vt
|
|
122
|
-
}, Tt = "danger__7c1de1fc", Ct = "expanded__28205dfc", _e = {
|
|
123
|
-
danger: Tt,
|
|
124
|
-
expanded: Ct
|
|
125
|
-
}, Rt = "link__8d860367", De = {
|
|
126
|
-
link: Rt
|
|
127
|
-
}, kt = (d, t) => {
|
|
128
|
-
switch (d) {
|
|
129
|
-
case $.GENERAL:
|
|
130
|
-
return { [he.general]: !0, [he.expanded]: t };
|
|
131
|
-
case $.SECONDARY:
|
|
132
|
-
return { [be.secondary]: !0, [be.expanded]: t };
|
|
133
|
-
case $.DANGER:
|
|
134
|
-
return { [_e.danger]: !0, [_e.expanded]: t };
|
|
135
|
-
case $.LINK:
|
|
136
|
-
return { [De.link]: !0, [De.expanded]: t };
|
|
137
|
-
}
|
|
138
|
-
}, Mt = (d) => {
|
|
139
|
-
switch (d) {
|
|
140
|
-
case P.LG:
|
|
141
|
-
return z.lg;
|
|
142
|
-
case P.MD:
|
|
143
|
-
return z.md;
|
|
144
|
-
case P.SM:
|
|
145
|
-
return z.sm;
|
|
146
|
-
}
|
|
147
|
-
}, xt = (d, t) => {
|
|
148
|
-
const m = d === $.SECONDARY ? we.BRAND : we.NEUTRAL, o = t === P.SM ? se.SM : t === P.LG ? se.LG : se.MD;
|
|
149
|
-
return /* @__PURE__ */ r(lt, { theme: m, size: o });
|
|
150
|
-
}, ie = x.forwardRef((d, t) => {
|
|
151
|
-
const { children: m, className: o, disabled: p, theme: u, size: i = P.MD, block: l, loading: c, icon: h, ..._ } = d, { "aria-expanded": L } = d, y = k(
|
|
152
|
-
z.button,
|
|
153
|
-
kt(u, !!L),
|
|
154
|
-
Mt(i),
|
|
155
|
-
{ [z.block]: !!l, [z.loading]: !!c },
|
|
156
|
-
{ [z.icon]: !!h && !m },
|
|
157
|
-
// Классы для иконок, начало.
|
|
158
|
-
"hoverable",
|
|
159
|
-
{
|
|
160
|
-
active: !!L,
|
|
161
|
-
disabled: !!p
|
|
162
|
-
},
|
|
163
|
-
// Классы для иконок, конец.
|
|
164
|
-
o
|
|
165
|
-
);
|
|
166
|
-
return /* @__PURE__ */ F(ke, { className: y, tabIndex: c ? -1 : void 0, disabled: p, ..._, ref: t, children: [
|
|
167
|
-
/* @__PURE__ */ F("span", { className: z.content, children: [
|
|
168
|
-
h,
|
|
169
|
-
m
|
|
170
|
-
] }),
|
|
171
|
-
/* @__PURE__ */ r("div", { className: k(z.loader, !c && z.hidden), children: xt(u, i) })
|
|
172
|
-
] });
|
|
173
|
-
});
|
|
174
|
-
ie.displayName = "Button";
|
|
175
|
-
const K = (d) => {
|
|
176
|
-
const { children: t, className: m, dropdownOpened: o, listRef: p, size: u = J.MD, ...i } = d, l = k(ue.dropdownList, m, ue[`dropdownList-${u}`]), { activeDescendant: c, setActiveDescendant: h } = le(ae), _ = p || x.createRef(), L = O([]), [y, N] = j(void 0), E = x.Children.count(t), M = (w) => {
|
|
177
|
-
const n = x.createRef();
|
|
178
|
-
return L.current[w] = n, n;
|
|
179
|
-
}, I = (w) => {
|
|
180
|
-
var v;
|
|
181
|
-
const n = _ == null ? void 0 : _.current, b = (v = L.current[w]) == null ? void 0 : v.current;
|
|
182
|
-
if (n && b) {
|
|
183
|
-
const { top: e, bottom: s } = n.getBoundingClientRect(), { top: f, bottom: D } = b.getBoundingClientRect(), a = 4;
|
|
184
|
-
e > f ? n.scrollTop = n.scrollTop - e + f - a : D > s && (n.scrollTop = n.scrollTop + D - s + a);
|
|
185
|
-
}
|
|
186
|
-
}, C = () => {
|
|
187
|
-
const w = _ == null ? void 0 : _.current;
|
|
188
|
-
w && (w.scrollTop = 0);
|
|
189
|
-
};
|
|
190
|
-
W(() => {
|
|
191
|
-
if (!o)
|
|
192
|
-
return;
|
|
193
|
-
const w = (n) => {
|
|
194
|
-
const { keyCode: b } = n, v = E, e = y;
|
|
195
|
-
let s;
|
|
196
|
-
b === pe.ARROW_DOWN ? (e !== void 0 && e < v - 1 ? s = e + 1 : s = 0, n.preventDefault()) : b === pe.ARROW_UP && (e !== void 0 && e > 0 ? s = e - 1 : s = v - 1, n.preventDefault()), s !== void 0 && e !== s && (I(s), N(s));
|
|
197
|
-
};
|
|
198
|
-
return document.addEventListener("keydown", w), () => {
|
|
199
|
-
document.removeEventListener("keydown", w);
|
|
200
|
-
};
|
|
201
|
-
}, [o, y, E]), W(() => {
|
|
202
|
-
if (!o)
|
|
203
|
-
return;
|
|
204
|
-
let w = !1;
|
|
205
|
-
x.Children.forEach(t, (n, b) => {
|
|
206
|
-
n && n.props && n.props.selected && (w = !0, I(b), N(b));
|
|
207
|
-
}), w || (N(0), C());
|
|
208
|
-
}, [o]), W(() => {
|
|
209
|
-
var w, n;
|
|
210
|
-
if (o && y !== void 0) {
|
|
211
|
-
h((n = (w = L.current[y]) == null ? void 0 : w.current) == null ? void 0 : n.id);
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
!o && c !== void 0 && h();
|
|
215
|
-
}, [o, y, c, h]), W(() => () => {
|
|
216
|
-
c !== void 0 && h();
|
|
217
|
-
}, [c, h]);
|
|
218
|
-
const A = x.Children.map(t, (w, n) => {
|
|
219
|
-
if (w)
|
|
220
|
-
return x.cloneElement(w, {
|
|
221
|
-
active: o && y === n,
|
|
222
|
-
onMouseOver: (b) => {
|
|
223
|
-
var v, e;
|
|
224
|
-
N(n), (e = (v = w.props).onMouseOver) == null || e.call(v, b);
|
|
225
|
-
},
|
|
226
|
-
ref: M(n)
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
return /* @__PURE__ */ r("div", { className: l, role: "listbox", ref: _, ...i, children: A });
|
|
230
|
-
};
|
|
231
|
-
K.Item = Ge;
|
|
232
|
-
const At = "dropdown__67fdf3ac", Ft = "dropdownOverflowHidden__893887fc", ye = {
|
|
233
|
-
dropdown: At,
|
|
234
|
-
"dropdown-sm": "dropdown-sm__8dd18102",
|
|
235
|
-
"dropdown-md": "dropdown-md__b6ae4c77",
|
|
236
|
-
"dropdown-lg": "dropdown-lg__03c7d4bb",
|
|
237
|
-
dropdownOverflowHidden: Ft
|
|
238
|
-
}, Se = "dropdownOverflowHidden", ce = x.forwardRef((d, t) => {
|
|
239
|
-
const {
|
|
240
|
-
alignment: m = Z.AUTO,
|
|
241
|
-
children: o,
|
|
242
|
-
fixedWidth: p,
|
|
243
|
-
className: u,
|
|
244
|
-
direction: i = ee.AUTO,
|
|
245
|
-
opened: l,
|
|
246
|
-
setOpened: c,
|
|
247
|
-
style: h,
|
|
248
|
-
targetRef: _,
|
|
249
|
-
size: L = Q.MD,
|
|
250
|
-
...y
|
|
251
|
-
} = d, { scopeClassName: N } = mt(), [E, M] = j({ ...h, opacity: 0 }), I = O(null), C = O({ height: 0, width: 0 }), A = k(ye.dropdown, N, u, ye[`dropdown-${L}`]), w = G(
|
|
252
|
-
(a) => {
|
|
253
|
-
var S;
|
|
254
|
-
(S = I.current) != null && S.contains(a.target) || a.preventDefault();
|
|
255
|
-
},
|
|
256
|
-
[I]
|
|
257
|
-
), n = G((a) => {
|
|
258
|
-
if (a.target === document.body) {
|
|
259
|
-
const S = a.code || a.keyCode;
|
|
260
|
-
(T(S, "SPACE") || T(S, "PAGE_UP") || T(S, "PAGE_DOWN") || T(S, "END") || T(S, "HOME") || T(S, "ARROW_LEFT") || T(S, "ARROW_UP") || T(S, "ARROW_RIGHT") || T(S, "ARROW_DOWN")) && a.preventDefault();
|
|
261
|
-
}
|
|
262
|
-
}, []), b = G(
|
|
263
|
-
/** Запрет скролла всей страницы. */
|
|
264
|
-
(a) => {
|
|
265
|
-
a ? (document.addEventListener("wheel", w, { passive: !1 }), document.addEventListener("keydown", n)) : (document.removeEventListener("wheel", w), document.removeEventListener("keydown", n));
|
|
266
|
-
},
|
|
267
|
-
[w, n]
|
|
268
|
-
), v = G(
|
|
269
|
-
(a, S, g) => {
|
|
270
|
-
const R = p ? g.width : Math.max(g.width, S.width);
|
|
271
|
-
m === Z.AUTO ? g.right - R > 0 ? a.left = g.right - R : g.left + R < document.documentElement.clientWidth ? a.left = g.left : a.left = g.right - R : m === Z.RIGHT ? a.left = g.right - R : m === Z.LEFT && (a.left = g.left);
|
|
272
|
-
},
|
|
273
|
-
[m, p]
|
|
274
|
-
), e = G(
|
|
275
|
-
(a, S, g) => {
|
|
276
|
-
i === ee.AUTO ? g.bottom + 4 + S.height < document.documentElement.clientHeight ? a.top = g.bottom + 4 : g.top - 4 - S.height > 0 ? a.bottom = document.documentElement.clientHeight - g.top + 4 : a.top = g.bottom + 4 : i === ee.BOTTOM ? a.top = g.bottom + 4 : i === ee.TOP && (a.bottom = document.documentElement.clientHeight - g.top + 4);
|
|
277
|
-
},
|
|
278
|
-
[i]
|
|
279
|
-
), s = G(() => {
|
|
280
|
-
const { current: a } = I, { current: S } = _;
|
|
281
|
-
if (a && S) {
|
|
282
|
-
const g = a.getBoundingClientRect(), R = S.getBoundingClientRect(), Y = {};
|
|
283
|
-
p ? Y.width = R.width : Y.minWidth = R.width, e(Y, g, R), v(Y, g, R), C.current = { height: g.height, width: g.width }, M({ ...h, ...Y });
|
|
284
|
-
}
|
|
285
|
-
}, [_, p, h, e, v]);
|
|
286
|
-
W(() => {
|
|
287
|
-
l ? s() : (C.current = { height: 0, width: 0 }, M({ ...h, opacity: 0 }));
|
|
288
|
-
}, [l, s, h]), W(() => {
|
|
289
|
-
if (I.current) {
|
|
290
|
-
const { width: a, height: S } = I.current.getBoundingClientRect();
|
|
291
|
-
(a != C.current.width || S != C.current.height) && s();
|
|
292
|
-
}
|
|
293
|
-
}, [o, s]);
|
|
294
|
-
const f = G(() => {
|
|
295
|
-
setTimeout(s);
|
|
296
|
-
}, [s]);
|
|
297
|
-
W(() => {
|
|
298
|
-
if (l)
|
|
299
|
-
return document.addEventListener("scroll", f, !0), window.addEventListener("resize", f), b(!0), document.body.classList.add(Se), () => {
|
|
300
|
-
document.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f), b(!1), document.body.classList.remove(Se);
|
|
301
|
-
};
|
|
302
|
-
}, [l, f, b]);
|
|
303
|
-
const D = (a) => {
|
|
304
|
-
I.current = a, typeof t == "function" ? t(a) : t && (t.current = a);
|
|
305
|
-
};
|
|
306
|
-
return l ? /* @__PURE__ */ r(
|
|
307
|
-
"div",
|
|
308
|
-
{
|
|
309
|
-
className: A,
|
|
310
|
-
style: { ...E },
|
|
311
|
-
ref: D,
|
|
312
|
-
...y,
|
|
313
|
-
"data-tx": "0.1.9",
|
|
314
|
-
children: o
|
|
315
|
-
}
|
|
316
|
-
) : null;
|
|
317
|
-
});
|
|
318
|
-
ce.displayName = "DropdownDesktop";
|
|
319
|
-
const Pe = x.forwardRef(
|
|
320
|
-
({ children: d, opened: t, setOpened: m, onOpen: o, onClose: p, mobileViewProps: u, ...i }, l) => {
|
|
321
|
-
const c = O(!1);
|
|
322
|
-
return W(() => {
|
|
323
|
-
c.current ? t ? o == null || o() : p == null || p() : c.current = !0;
|
|
324
|
-
}, [t]), /* @__PURE__ */ r(st, { container: document.body, children: u ? /* @__PURE__ */ r(
|
|
325
|
-
ut,
|
|
326
|
-
{
|
|
327
|
-
fallback: /* @__PURE__ */ r(ce, { opened: t, setOpened: m, ...i, ref: l, children: d }),
|
|
328
|
-
children: /* @__PURE__ */ r($e, { opened: t, setOpened: m, ...u, ref: l, children: (u == null ? void 0 : u.children) || d })
|
|
329
|
-
}
|
|
330
|
-
) : /* @__PURE__ */ r(ce, { opened: t, setOpened: m, ...i, ref: l, children: d }) });
|
|
331
|
-
}
|
|
332
|
-
);
|
|
333
|
-
Pe.displayName = "Dropdown";
|
|
334
|
-
const Ot = "buttonDropdownExtended__ba0a98fd", Bt = "buttonDropdownExtendedBlock__e94b0f20", Ne = {
|
|
335
|
-
buttonDropdownExtended: Ot,
|
|
336
|
-
buttonDropdownExtendedBlock: Bt
|
|
337
|
-
}, V = (d) => {
|
|
338
|
-
const { className: t, opened: m, setOpened: o, renderButton: p, renderDropdown: u, dropdownRef: i, closeOnTab: l, ...c } = d, h = O(null), _ = O(d.opened !== void 0), [L, y] = j((d.opened === void 0, !1)), N = _.current ? !!m : L, E = G(
|
|
339
|
-
(I) => {
|
|
340
|
-
if (_.current) {
|
|
341
|
-
o && o(I);
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
y(I);
|
|
345
|
-
},
|
|
346
|
-
[o]
|
|
347
|
-
);
|
|
348
|
-
W(() => {
|
|
349
|
-
if (!N)
|
|
350
|
-
return;
|
|
351
|
-
const I = (A) => {
|
|
352
|
-
const w = A.code || A.keyCode;
|
|
353
|
-
N && (T(w, "ESCAPE") || l && T(w, "TAB")) && E(!1);
|
|
354
|
-
}, C = (A) => {
|
|
355
|
-
const w = h.current, n = i.current;
|
|
356
|
-
if (N) {
|
|
357
|
-
const b = A.target;
|
|
358
|
-
b && !(w != null && w.contains(b)) && !(n != null && n.contains(b)) && E(!1);
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
return document.addEventListener("keydown", I), document.addEventListener("mousedown", C), document.addEventListener("touchstart", C), () => {
|
|
362
|
-
document.removeEventListener("keydown", I), document.removeEventListener("mousedown", C), document.removeEventListener("touchstart", C);
|
|
363
|
-
};
|
|
364
|
-
}, [N, l, i, E, h]);
|
|
365
|
-
const M = k(Ne.buttonDropdownExtended, t);
|
|
366
|
-
return /* @__PURE__ */ F("div", { className: M, ref: h, ...c, children: [
|
|
367
|
-
p({ opened: N, setOpened: E }),
|
|
368
|
-
u({
|
|
369
|
-
className: Ne.buttonDropdownExtendedBlock,
|
|
370
|
-
opened: N,
|
|
371
|
-
setOpened: E
|
|
372
|
-
})
|
|
373
|
-
] });
|
|
374
|
-
};
|
|
375
|
-
V.Dropdown = Pe;
|
|
376
|
-
V.DropdownList = K;
|
|
377
|
-
const Pt = "buttonDropdown__f12fc422", zt = "block__0c71d905", Wt = "buttonDropdownTarget__e31554a0", Gt = "caretIcon__5e0f1548", $t = "active__527e161d", Ut = "buttonDropdownMenuItem__6dee6621", B = {
|
|
378
|
-
buttonDropdown: Pt,
|
|
379
|
-
block: zt,
|
|
380
|
-
buttonDropdownTarget: Wt,
|
|
381
|
-
caretIcon: Gt,
|
|
382
|
-
active: $t,
|
|
383
|
-
buttonDropdownMenuItem: Ut
|
|
384
|
-
}, Ee = "dots", Ht = (d) => {
|
|
385
|
-
switch (d) {
|
|
386
|
-
case P.SM:
|
|
387
|
-
return Q.SM;
|
|
388
|
-
case P.MD:
|
|
389
|
-
return Q.MD;
|
|
390
|
-
case P.LG:
|
|
391
|
-
return Q.LG;
|
|
392
|
-
default:
|
|
393
|
-
return Q.MD;
|
|
394
|
-
}
|
|
395
|
-
}, Kt = (d) => {
|
|
396
|
-
switch (d) {
|
|
397
|
-
case P.SM:
|
|
398
|
-
return J.SM;
|
|
399
|
-
case P.MD:
|
|
400
|
-
return J.MD;
|
|
401
|
-
case P.LG:
|
|
402
|
-
return J.LG;
|
|
403
|
-
default:
|
|
404
|
-
return J.MD;
|
|
405
|
-
}
|
|
406
|
-
}, Vt = x.forwardRef(
|
|
407
|
-
(d, t) => {
|
|
408
|
-
const { buttonAttributes: m, children: o, className: p, theme: u, size: i, options: l, selected: c, block: h, disabled: _, ...L } = d, y = O(null), N = O(null), E = k(B.buttonDropdown, { [B.block]: !!h }, p), [M, I] = j(), C = O(Fe()), A = ({ opened: f, setOpened: D }) => {
|
|
409
|
-
const a = k(B.buttonDropdownTarget, "hoverable", {
|
|
410
|
-
[B.active]: f,
|
|
411
|
-
[B.block]: !!h
|
|
412
|
-
});
|
|
413
|
-
return /* @__PURE__ */ F(
|
|
414
|
-
ie,
|
|
415
|
-
{
|
|
416
|
-
className: a,
|
|
417
|
-
theme: u,
|
|
418
|
-
size: i,
|
|
419
|
-
onKeyDown: b({ opened: f, setOpened: D }),
|
|
420
|
-
onClick: n({ opened: f, setOpened: D }),
|
|
421
|
-
disabled: _,
|
|
422
|
-
"aria-haspopup": "menu",
|
|
423
|
-
"aria-expanded": f,
|
|
424
|
-
"aria-controls": C.current,
|
|
425
|
-
"aria-activedescendant": M,
|
|
426
|
-
...m,
|
|
427
|
-
ref: s,
|
|
428
|
-
children: [
|
|
429
|
-
o,
|
|
430
|
-
v()
|
|
431
|
-
]
|
|
432
|
-
}
|
|
433
|
-
);
|
|
434
|
-
}, w = ({ opened: f, setOpened: D }) => {
|
|
435
|
-
const a = k(B.buttonDropdownTarget, "hoverable", {
|
|
436
|
-
[B.active]: f,
|
|
437
|
-
[B.block]: !!h
|
|
438
|
-
});
|
|
439
|
-
return /* @__PURE__ */ r(
|
|
440
|
-
ie,
|
|
441
|
-
{
|
|
442
|
-
className: a,
|
|
443
|
-
theme: $.SECONDARY,
|
|
444
|
-
size: i,
|
|
445
|
-
onKeyDown: b({ opened: f, setOpened: D }),
|
|
446
|
-
onClick: n({ opened: f, setOpened: D }),
|
|
447
|
-
disabled: _,
|
|
448
|
-
"aria-haspopup": "menu",
|
|
449
|
-
"aria-expanded": f,
|
|
450
|
-
"aria-controls": C.current,
|
|
451
|
-
"aria-activedescendant": M,
|
|
452
|
-
...m,
|
|
453
|
-
ref: s,
|
|
454
|
-
icon: /* @__PURE__ */ r(ft, { paletteIndex: 0 })
|
|
455
|
-
}
|
|
456
|
-
);
|
|
457
|
-
}, n = ({ opened: f, setOpened: D }) => () => D(!f), b = ({ opened: f, setOpened: D }) => (a) => {
|
|
458
|
-
const { key: S } = a;
|
|
459
|
-
(T(S, "SPACE") || T(S, "ARROW_UP") || T(S, "ARROW_DOWN")) && a.preventDefault(), !f && (T(S, "ARROW_UP") || T(S, "ARROW_DOWN")) && D(!0);
|
|
460
|
-
}, v = () => {
|
|
461
|
-
switch (u) {
|
|
462
|
-
case $.GENERAL:
|
|
463
|
-
case $.DANGER:
|
|
464
|
-
case Ee:
|
|
465
|
-
return /* @__PURE__ */ r(ge, { paletteIndex: 7, className: B.caretIcon });
|
|
466
|
-
case $.SECONDARY:
|
|
467
|
-
return /* @__PURE__ */ r(ge, { paletteIndex: 0, className: B.caretIcon });
|
|
468
|
-
default:
|
|
469
|
-
return null;
|
|
470
|
-
}
|
|
471
|
-
}, e = ({ opened: f, setOpened: D, className: a }) => {
|
|
472
|
-
const S = k(B.buttonDropdownMenu, a);
|
|
473
|
-
return /* @__PURE__ */ r(ae.Provider, { value: { activeDescendant: M, setActiveDescendant: I }, children: /* @__PURE__ */ r(
|
|
474
|
-
V.Dropdown,
|
|
475
|
-
{
|
|
476
|
-
size: Ht(i),
|
|
477
|
-
className: S,
|
|
478
|
-
opened: f,
|
|
479
|
-
setOpened: D,
|
|
480
|
-
targetRef: y,
|
|
481
|
-
ref: N,
|
|
482
|
-
mobileViewProps: {
|
|
483
|
-
children: /* @__PURE__ */ F(Ae, { children: [
|
|
484
|
-
/* @__PURE__ */ F(Te, { children: [
|
|
485
|
-
/* @__PURE__ */ r(Oe, { tag: "div", size: Be.B3, children: o }),
|
|
486
|
-
/* @__PURE__ */ r(ve, { onClick: () => D(!1) })
|
|
487
|
-
] }),
|
|
488
|
-
/* @__PURE__ */ r(Le, { children: /* @__PURE__ */ r(Ce, { children: l.map((g) => /* @__PURE__ */ ne(
|
|
489
|
-
Re,
|
|
490
|
-
{
|
|
491
|
-
...g,
|
|
492
|
-
key: g.id,
|
|
493
|
-
selected: g.id === (c == null ? void 0 : c.id),
|
|
494
|
-
onSelect: () => {
|
|
495
|
-
var R;
|
|
496
|
-
(R = g.onSelect) == null || R.call(g), D(!1);
|
|
497
|
-
}
|
|
498
|
-
},
|
|
499
|
-
g.label
|
|
500
|
-
)) }) })
|
|
501
|
-
] })
|
|
502
|
-
},
|
|
503
|
-
children: /* @__PURE__ */ r(K, { dropdownOpened: f, id: C.current, size: Kt(i), children: l.map((g) => /* @__PURE__ */ ne(
|
|
504
|
-
K.Item,
|
|
505
|
-
{
|
|
506
|
-
...g,
|
|
507
|
-
className: B.buttonDropdownMenuItem,
|
|
508
|
-
key: g.id,
|
|
509
|
-
selected: g.id === (c == null ? void 0 : c.id),
|
|
510
|
-
onSelect: () => {
|
|
511
|
-
var R;
|
|
512
|
-
(R = g.onSelect) == null || R.call(g), D(!1);
|
|
513
|
-
}
|
|
514
|
-
},
|
|
515
|
-
g.label
|
|
516
|
-
)) })
|
|
517
|
-
}
|
|
518
|
-
) });
|
|
519
|
-
}, s = (f) => {
|
|
520
|
-
y.current = f, typeof t == "function" ? t(f) : t && (t.current = f);
|
|
521
|
-
};
|
|
522
|
-
return /* @__PURE__ */ r(
|
|
523
|
-
V,
|
|
524
|
-
{
|
|
525
|
-
className: E,
|
|
526
|
-
renderButton: u === Ee ? w : A,
|
|
527
|
-
renderDropdown: e,
|
|
528
|
-
dropdownRef: N,
|
|
529
|
-
closeOnTab: !0,
|
|
530
|
-
...L
|
|
531
|
-
}
|
|
532
|
-
);
|
|
533
|
-
}
|
|
534
|
-
);
|
|
535
|
-
Vt.displayName = "ButtonDropdown";
|
|
536
|
-
const jt = "formFieldMaskedInputWrapper__a446ae98", Yt = "formFieldMaskedInputPlaceholder__863170ea", qt = "formFieldMaskedInput__4a93c7b3", q = {
|
|
537
|
-
formFieldMaskedInputWrapper: jt,
|
|
538
|
-
formFieldMaskedInputPlaceholder: Yt,
|
|
539
|
-
"size-sm": "size-sm__64b9b1f5",
|
|
540
|
-
"size-md": "size-md__90671c7c",
|
|
541
|
-
"size-lg": "size-lg__4e576499",
|
|
542
|
-
formFieldMaskedInput: qt
|
|
543
|
-
}, X = ({
|
|
544
|
-
className: d,
|
|
545
|
-
forwardedRef: t,
|
|
546
|
-
disabled: m,
|
|
547
|
-
mask: o,
|
|
548
|
-
onChange: p,
|
|
549
|
-
placeholder: u,
|
|
550
|
-
placeholderChar: i = "0",
|
|
551
|
-
placeholderMask: l,
|
|
552
|
-
value: c,
|
|
553
|
-
...h
|
|
554
|
-
}) => {
|
|
555
|
-
const [_, L] = j(""), y = O(!1), { valueExist: N, focused: E, size: M } = le(dt);
|
|
556
|
-
W(() => {
|
|
557
|
-
L((() => {
|
|
558
|
-
let s = [];
|
|
559
|
-
if (c) {
|
|
560
|
-
const { conformedValue: f } = oe.conformToMask(c.toString(), o, { guide: !0, placeholderChar: i });
|
|
561
|
-
for (let D = 0; D < o.length; D++)
|
|
562
|
-
typeof o[D] == "string" ? s[D] = f[D] : f[D] === i && !c.toString()[D] ? s[D] = (l == null ? void 0 : l[D]) || i : s[D] = f[D];
|
|
563
|
-
} else if (l)
|
|
564
|
-
s = l.split("");
|
|
565
|
-
else {
|
|
566
|
-
const { conformedValue: f } = oe.conformToMask("", o, { guide: !0, placeholderChar: i });
|
|
567
|
-
s = f.split("");
|
|
568
|
-
}
|
|
569
|
-
return s.join("");
|
|
570
|
-
})());
|
|
571
|
-
}, [c, o, i, l]);
|
|
572
|
-
const I = G(
|
|
573
|
-
(e) => {
|
|
574
|
-
const { value: s } = e.target;
|
|
575
|
-
y.current = !1, c !== s && (p == null || p(e));
|
|
576
|
-
},
|
|
577
|
-
[c, p]
|
|
578
|
-
), C = () => {
|
|
579
|
-
y.current = !0;
|
|
580
|
-
}, A = (e, s) => o === X.presets.masks.phone ? e.length ? w(s.rawValue) : e : o === X.presets.masks.swiftCode ? e.toUpperCase() : e, w = (e) => {
|
|
581
|
-
let s = [];
|
|
582
|
-
if (y.current) {
|
|
583
|
-
let f = /^[78]((\D*\d)*)/;
|
|
584
|
-
e = e.replace(f, "+7 ($1"), f = /^\d7/, e = e.replace(f, (D) => (s = Array.from("+7 (").map((a, S) => S), `+7 (${D}`));
|
|
585
|
-
} else (e === "7" || e === "8") && (e = "+7 (");
|
|
586
|
-
return {
|
|
587
|
-
indexesOfPipedChars: s,
|
|
588
|
-
value: oe.conformToMask(e, o, { guide: !1, placeholderChar: i }).conformedValue
|
|
589
|
-
};
|
|
590
|
-
}, n = () => o === X.presets.masks.phone ? (c = w(c).value, c) : oe.conformToMask(c, o, { guide: !1, placeholderChar: i }).conformedValue, b = (e) => (s) => {
|
|
591
|
-
s && e(s), typeof t == "function" ? t(s) : t && (t.current = s);
|
|
592
|
-
}, v = () => !N && !E || !c && u ? "" : _;
|
|
593
|
-
return /* @__PURE__ */ F("div", { className: k(q.formFieldMaskedInputWrapper, q[`size-${M}`]), children: [
|
|
594
|
-
/* @__PURE__ */ r(
|
|
595
|
-
"input",
|
|
596
|
-
{
|
|
597
|
-
className: k(
|
|
598
|
-
je.formFieldInput,
|
|
599
|
-
q.formFieldMaskedInputPlaceholder,
|
|
600
|
-
d
|
|
601
|
-
),
|
|
602
|
-
disabled: m,
|
|
603
|
-
placeholder: v(),
|
|
604
|
-
readOnly: !0,
|
|
605
|
-
"aria-hidden": "true",
|
|
606
|
-
tabIndex: -1,
|
|
607
|
-
type: "text"
|
|
608
|
-
}
|
|
609
|
-
),
|
|
610
|
-
/* @__PURE__ */ r(
|
|
611
|
-
ot,
|
|
612
|
-
{
|
|
613
|
-
className: k(q.formFieldMaskedInput, { [q.error]: !!h.error }, d),
|
|
614
|
-
defaultValue: "",
|
|
615
|
-
disabled: m,
|
|
616
|
-
guide: !1,
|
|
617
|
-
render: (e, s) => /* @__PURE__ */ r(Me, { ...s, value: c, placeholder: u || "", ref: b(e) }),
|
|
618
|
-
mask: o,
|
|
619
|
-
onChange: I,
|
|
620
|
-
onPaste: C,
|
|
621
|
-
placeholderChar: i,
|
|
622
|
-
value: n(),
|
|
623
|
-
pipe: A,
|
|
624
|
-
type: "text",
|
|
625
|
-
...h
|
|
626
|
-
}
|
|
627
|
-
)
|
|
628
|
-
] });
|
|
629
|
-
};
|
|
630
|
-
X.presets = it;
|
|
631
|
-
const me = ({
|
|
632
|
-
children: d,
|
|
633
|
-
description: t,
|
|
634
|
-
label: m,
|
|
635
|
-
prefix: o,
|
|
636
|
-
postfix: p,
|
|
637
|
-
counter: u,
|
|
638
|
-
...i
|
|
639
|
-
}) => /* @__PURE__ */ F(ct, { children: [
|
|
640
|
-
/* @__PURE__ */ F(Ue, { ...i, children: [
|
|
641
|
-
o ? /* @__PURE__ */ r(qe, { children: o }) : null,
|
|
642
|
-
d,
|
|
643
|
-
m ? /* @__PURE__ */ r(Ve, { children: m }) : null,
|
|
644
|
-
p ? /* @__PURE__ */ r(Ye, { children: p }) : null
|
|
645
|
-
] }),
|
|
646
|
-
t || u ? /* @__PURE__ */ F(He, { children: [
|
|
647
|
-
t,
|
|
648
|
-
u ? /* @__PURE__ */ r(Ke, { children: u }) : null
|
|
649
|
-
] }) : null
|
|
650
|
-
] });
|
|
651
|
-
me.displayName = "TextFieldBase";
|
|
652
|
-
const Jt = ({ inputProps: d, ...t }) => /* @__PURE__ */ r(me, { ...t, children: /* @__PURE__ */ r(Me, { ...d }) });
|
|
653
|
-
Jt.displayName = "TextField";
|
|
654
|
-
const Qt = ({ maskedInputProps: d, ...t }) => /* @__PURE__ */ r(me, { ...t, children: /* @__PURE__ */ r(X, { ...d }) });
|
|
655
|
-
Qt.displayName = "MaskedField";
|
|
656
|
-
const Xt = x.forwardRef(
|
|
657
|
-
(d, t) => {
|
|
658
|
-
const { buttonAttributes: m, children: o, className: p, icon: u, options: i, selected: l, disabled: c, ...h } = d, _ = O(null), L = O(null), [y, N] = j(), E = O(Fe()), M = ({ opened: n, setOpened: b }) => /* @__PURE__ */ r(
|
|
659
|
-
Xe,
|
|
660
|
-
{
|
|
661
|
-
className: "hoverable",
|
|
662
|
-
onKeyDown: C({ opened: n, setOpened: b }),
|
|
663
|
-
onClick: I({ opened: n, setOpened: b }),
|
|
664
|
-
disabled: c,
|
|
665
|
-
"aria-haspopup": "menu",
|
|
666
|
-
"aria-expanded": n,
|
|
667
|
-
"aria-controls": E.current,
|
|
668
|
-
"aria-activedescendant": y,
|
|
669
|
-
icon: u,
|
|
670
|
-
...m,
|
|
671
|
-
ref: w,
|
|
672
|
-
children: o
|
|
673
|
-
}
|
|
674
|
-
), I = ({ opened: n, setOpened: b }) => () => b(!n), C = ({ opened: n, setOpened: b }) => (v) => {
|
|
675
|
-
const { key: e } = v;
|
|
676
|
-
(T(e, "SPACE") || T(e, "ARROW_UP") || T(e, "ARROW_DOWN")) && v.preventDefault(), !n && (T(e, "ARROW_UP") || T(e, "ARROW_DOWN")) && b(!0);
|
|
677
|
-
}, A = ({ opened: n, setOpened: b, className: v }) => /* @__PURE__ */ r(ae.Provider, { value: { activeDescendant: y, setActiveDescendant: N }, children: /* @__PURE__ */ r(
|
|
678
|
-
V.Dropdown,
|
|
679
|
-
{
|
|
680
|
-
className: v,
|
|
681
|
-
opened: n,
|
|
682
|
-
setOpened: b,
|
|
683
|
-
targetRef: _,
|
|
684
|
-
ref: L,
|
|
685
|
-
mobileViewProps: {
|
|
686
|
-
children: /* @__PURE__ */ F(Ae, { children: [
|
|
687
|
-
/* @__PURE__ */ F(Te, { children: [
|
|
688
|
-
/* @__PURE__ */ r(Oe, { tag: "div", size: Be.B1, children: o }),
|
|
689
|
-
/* @__PURE__ */ r(ve, { onClick: () => b(!1) })
|
|
690
|
-
] }),
|
|
691
|
-
/* @__PURE__ */ r(Le, { children: /* @__PURE__ */ r(Ce, { children: i.map((e) => /* @__PURE__ */ ne(
|
|
692
|
-
Re,
|
|
693
|
-
{
|
|
694
|
-
...e,
|
|
695
|
-
key: e.id,
|
|
696
|
-
selected: e.id === (l == null ? void 0 : l.id),
|
|
697
|
-
onSelect: () => {
|
|
698
|
-
var s;
|
|
699
|
-
(s = e.onSelect) == null || s.call(e), b(!1);
|
|
700
|
-
}
|
|
701
|
-
},
|
|
702
|
-
e.label
|
|
703
|
-
)) }) })
|
|
704
|
-
] })
|
|
705
|
-
},
|
|
706
|
-
children: /* @__PURE__ */ r(K, { dropdownOpened: n, id: E.current, children: i.map((e) => /* @__PURE__ */ ne(
|
|
707
|
-
K.Item,
|
|
708
|
-
{
|
|
709
|
-
...e,
|
|
710
|
-
className: fe.buttonDropdownMenuItem,
|
|
711
|
-
key: e.id,
|
|
712
|
-
selected: e.id === (l == null ? void 0 : l.id),
|
|
713
|
-
onSelect: () => {
|
|
714
|
-
var s;
|
|
715
|
-
(s = e.onSelect) == null || s.call(e), b(!1);
|
|
716
|
-
}
|
|
717
|
-
},
|
|
718
|
-
e.label
|
|
719
|
-
)) })
|
|
720
|
-
}
|
|
721
|
-
) }), w = (n) => {
|
|
722
|
-
_.current = n, typeof t == "function" ? t(n) : t && (t.current = n);
|
|
723
|
-
};
|
|
724
|
-
return /* @__PURE__ */ r(
|
|
725
|
-
V,
|
|
726
|
-
{
|
|
727
|
-
className: k(fe.listItemControlsButtonDropdown, p),
|
|
728
|
-
renderButton: M,
|
|
729
|
-
renderDropdown: A,
|
|
730
|
-
dropdownRef: L,
|
|
731
|
-
closeOnTab: !0,
|
|
732
|
-
...h
|
|
733
|
-
}
|
|
734
|
-
);
|
|
735
|
-
}
|
|
736
|
-
);
|
|
737
|
-
Xt.displayName = "ListItemControlsButtonDropdown";
|
|
738
|
-
const Zt = "listItemTable__29dd5203", eo = {
|
|
739
|
-
listItemTable: Zt
|
|
740
|
-
}, to = x.forwardRef(
|
|
741
|
-
({ children: d, className: t, controlButtons: m, onClickItem: o, onSelect: p, selected: u, swipeableAreaRef: i, ...l }, c) => {
|
|
742
|
-
const h = typeof p < "u" && typeof u < "u", _ = () => /* @__PURE__ */ r(Qe, { onClick: o, children: d });
|
|
743
|
-
return /* @__PURE__ */ r(xe, { className: k(eo.listItemTable, t), ...l, ref: c, children: /* @__PURE__ */ F(
|
|
744
|
-
at,
|
|
745
|
-
{
|
|
746
|
-
ref: i,
|
|
747
|
-
rightSwipeableArea: m ? /* @__PURE__ */ r(Je, { children: m }) : void 0,
|
|
748
|
-
children: [
|
|
749
|
-
/* @__PURE__ */ r(et, {}),
|
|
750
|
-
h ? /* @__PURE__ */ r(Ze, { selected: u, onSelect: p, children: _() }) : _()
|
|
751
|
-
]
|
|
752
|
-
}
|
|
753
|
-
) });
|
|
754
|
-
}
|
|
755
|
-
);
|
|
756
|
-
to.displayName = "ListItemTable";
|
|
757
|
-
const oo = "listSortableItem__1dcb979c", no = "dragging__ee9b0408", Ie = {
|
|
758
|
-
listSortableItem: oo,
|
|
759
|
-
dragging: no
|
|
760
|
-
}, ro = Object.assign(
|
|
761
|
-
x.forwardRef(function({ children: t, className: m, style: o, disabled: p, ...u }, i) {
|
|
762
|
-
const { transform: l, transition: c, listeners: h, isDragging: _, setNodeRef: L, setActivatorNodeRef: y } = nt({
|
|
763
|
-
disabled: p,
|
|
764
|
-
id: u.id,
|
|
765
|
-
transition: {
|
|
766
|
-
duration: 300,
|
|
767
|
-
easing: "ease-out"
|
|
768
|
-
}
|
|
769
|
-
}), N = (E) => {
|
|
770
|
-
L(E), typeof i == "function" ? i(E) : i && (i.current = E);
|
|
771
|
-
};
|
|
772
|
-
return /* @__PURE__ */ r(
|
|
773
|
-
xe,
|
|
774
|
-
{
|
|
775
|
-
className: k(Ie.listSortableItem, { [Ie.dragging]: _ }, m),
|
|
776
|
-
style: { transform: rt.Translate.toString(l), transition: c, ...o },
|
|
777
|
-
...u,
|
|
778
|
-
ref: N,
|
|
779
|
-
children: typeof t == "function" ? t({ disabled: p, dragging: _, listeners: h, setActivatorNodeRef: y }) : t
|
|
780
|
-
}
|
|
781
|
-
);
|
|
782
|
-
}),
|
|
783
|
-
{
|
|
784
|
-
Target: tt
|
|
785
|
-
}
|
|
786
|
-
);
|
|
787
|
-
ro.displayName = "ListSortableItem";
|
|
788
|
-
const so = "segmentedControlSegment__2f127d16", io = "selected__1f3b91b0", co = "content__dff06a16", de = {
|
|
789
|
-
segmentedControlSegment: so,
|
|
790
|
-
selected: io,
|
|
791
|
-
content: co
|
|
792
|
-
}, ze = ({
|
|
793
|
-
children: d,
|
|
794
|
-
className: t,
|
|
795
|
-
value: m,
|
|
796
|
-
title: o,
|
|
797
|
-
disabled: p,
|
|
798
|
-
onClick: u,
|
|
799
|
-
...i
|
|
800
|
-
}) => {
|
|
801
|
-
const {
|
|
802
|
-
type: l,
|
|
803
|
-
value: c,
|
|
804
|
-
disabled: h,
|
|
805
|
-
onSegmentSelect: _
|
|
806
|
-
} = le(We), y = (() => {
|
|
807
|
-
switch (l) {
|
|
808
|
-
case H.SINGLE:
|
|
809
|
-
return m === c;
|
|
810
|
-
case H.MULTIPLE:
|
|
811
|
-
return c.includes(m);
|
|
812
|
-
}
|
|
813
|
-
})(), N = k(
|
|
814
|
-
de.segmentedControlSegment,
|
|
815
|
-
{ [de.selected]: y },
|
|
816
|
-
"hoverable",
|
|
817
|
-
{ active: y },
|
|
818
|
-
t
|
|
819
|
-
), E = () => {
|
|
820
|
-
if (o)
|
|
821
|
-
return o;
|
|
822
|
-
if (typeof d == "string")
|
|
823
|
-
return d;
|
|
824
|
-
}, M = (I) => {
|
|
825
|
-
switch (l) {
|
|
826
|
-
case H.SINGLE:
|
|
827
|
-
_({ value: m, selected: !0 });
|
|
828
|
-
break;
|
|
829
|
-
case H.MULTIPLE:
|
|
830
|
-
_({ value: m, selected: !y });
|
|
831
|
-
break;
|
|
832
|
-
}
|
|
833
|
-
u == null || u(I);
|
|
834
|
-
};
|
|
835
|
-
return /* @__PURE__ */ r(
|
|
836
|
-
ke,
|
|
837
|
-
{
|
|
838
|
-
className: N,
|
|
839
|
-
title: E(),
|
|
840
|
-
disabled: p || h,
|
|
841
|
-
"aria-pressed": y,
|
|
842
|
-
onClick: M,
|
|
843
|
-
...i,
|
|
844
|
-
children: /* @__PURE__ */ r("span", { className: de.content, children: d })
|
|
845
|
-
}
|
|
846
|
-
);
|
|
847
|
-
};
|
|
848
|
-
ze.displayName = "SegmentedControlSegment";
|
|
849
|
-
const lo = "segmentedControl__da9a54e5", ao = "general1__e131024b", mo = "secondary1__9ed97801", uo = "general2__f298a47d", fo = "secondary2__926993a6", po = "sm__eeaeb487", go = "md__e0ec547a", wo = "lg__29a8566d", U = {
|
|
850
|
-
segmentedControl: lo,
|
|
851
|
-
general1: ao,
|
|
852
|
-
secondary1: mo,
|
|
853
|
-
general2: uo,
|
|
854
|
-
secondary2: fo,
|
|
855
|
-
sm: po,
|
|
856
|
-
md: go,
|
|
857
|
-
lg: wo
|
|
858
|
-
}, We = x.createContext({
|
|
859
|
-
type: H.SINGLE,
|
|
860
|
-
value: "",
|
|
861
|
-
disabled: !1,
|
|
862
|
-
onSegmentSelect: () => {
|
|
863
|
-
}
|
|
864
|
-
}), ho = {
|
|
865
|
-
[te.GENERAL_1]: U.general1,
|
|
866
|
-
[te.GENERAL_2]: U.general2,
|
|
867
|
-
[te.SECONDARY_1]: U.secondary1,
|
|
868
|
-
[te.SECONDARY_2]: U.secondary2
|
|
869
|
-
}, bo = {
|
|
870
|
-
[re.SM]: U.sm,
|
|
871
|
-
[re.MD]: U.md,
|
|
872
|
-
[re.LG]: U.lg
|
|
873
|
-
}, _o = Object.assign(
|
|
874
|
-
x.forwardRef(
|
|
875
|
-
({ children: d, className: t, value: m, theme: o, type: p, size: u, disabled: i, onSelect: l, ...c }, h) => {
|
|
876
|
-
const _ = k(
|
|
877
|
-
U.segmentedControl,
|
|
878
|
-
ho[o],
|
|
879
|
-
bo[u],
|
|
880
|
-
t
|
|
881
|
-
), L = ({
|
|
882
|
-
selected: y,
|
|
883
|
-
value: N
|
|
884
|
-
}) => {
|
|
885
|
-
switch (p) {
|
|
886
|
-
case H.SINGLE:
|
|
887
|
-
y && l(N);
|
|
888
|
-
break;
|
|
889
|
-
case H.MULTIPLE:
|
|
890
|
-
l(y ? [...m, N] : [...m].filter((E) => E !== N));
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
return /* @__PURE__ */ r(
|
|
894
|
-
We.Provider,
|
|
895
|
-
{
|
|
896
|
-
value: {
|
|
897
|
-
type: p,
|
|
898
|
-
value: m,
|
|
899
|
-
disabled: !!i,
|
|
900
|
-
onSegmentSelect: L
|
|
901
|
-
},
|
|
902
|
-
children: /* @__PURE__ */ r("div", { className: _, ...c, "data-tx": "0.1.9", ref: h, children: d })
|
|
903
|
-
}
|
|
904
|
-
);
|
|
905
|
-
}
|
|
906
|
-
),
|
|
907
|
-
{
|
|
908
|
-
Segment: ze
|
|
909
|
-
}
|
|
910
|
-
);
|
|
911
|
-
_o.displayName = "SegmentedControl";
|
|
912
|
-
export {
|
|
913
|
-
ie as B,
|
|
914
|
-
Pe as D,
|
|
915
|
-
X as F,
|
|
916
|
-
Xt as L,
|
|
917
|
-
Qt as M,
|
|
918
|
-
ze as S,
|
|
919
|
-
Jt as T,
|
|
920
|
-
Vt as a,
|
|
921
|
-
V as b,
|
|
922
|
-
K as c,
|
|
923
|
-
Ee as d,
|
|
924
|
-
ce as e,
|
|
925
|
-
to as f,
|
|
926
|
-
ro as g,
|
|
927
|
-
We as h,
|
|
928
|
-
_o as i,
|
|
929
|
-
me as j
|
|
930
|
-
};
|
|
931
|
-
//# sourceMappingURL=index-CAZEh1iw.js.map
|