@sberbusiness/triplex-next 0.1.4 → 0.1.6
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 +145 -0
- package/chunks/AlertProcessSpoiler-BuN7zhGO.js +39 -0
- package/chunks/Card.module-ByP22Mc4.js +17 -0
- package/chunks/DropdownListItem-CM0DOekv.js +56 -0
- package/chunks/DropdownMobile.module-gjHocEKh.js +19 -0
- package/chunks/Footer.module-B1rO0bcd.js +11 -0
- package/chunks/FormFieldInput-3TmHcNY0.js +62 -0
- package/chunks/HeaderLayoutSidebar.module-CEXHjsmH.js +9 -0
- package/chunks/HeaderTabs.module-YFm2izz6.js +9 -0
- package/chunks/HeaderTitle.module-lv649tnz.js +9 -0
- package/chunks/ListItemControlsButton-BpUzyKya.js +43 -0
- package/chunks/ListItemTail.module-D7Oa-l-5.js +12 -0
- package/chunks/ListMasterFooter.module-1LjIdZNa.js +10 -0
- package/chunks/Overlay.module-BbpDNlm7.js +18 -0
- package/chunks/Page.module-DAinpecX.js +16 -0
- package/chunks/TabsExtended.module-CQBdl7x1.js +13 -0
- package/chunks/TabsExtendedUtils-BT4b2wK1.js +23 -0
- package/chunks/TooltipDesktop.module-BRkBuup-.js +19 -0
- package/chunks/index-CLQ4mLUp.js +931 -0
- package/chunks/utils-VD40Qwop.js +36 -0
- package/chunks/vendor-CF2m175I.js +5891 -0
- package/components/Alert/AlertContext/AlertContext.js +52 -0
- package/components/Alert/AlertProcess/AlertProcess.js +60 -0
- package/components/Alert/AlertProcess/AlertProcessContext.js +10 -0
- package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +11 -0
- package/components/Alert/AlertTypeUtils.js +12 -0
- package/components/Alert/EAlertType.js +5 -0
- package/components/Alert/index.js +11 -0
- package/components/Body/Body.js +12 -0
- package/components/Body/index.js +5 -0
- package/components/Button/Button.js +14 -0
- package/components/Button/ButtonBase.js +8 -0
- package/components/Button/ButtonDropdown.js +26 -0
- package/components/Button/ButtonDropdownExtended.js +9 -0
- package/components/Button/ButtonIcon.js +29 -0
- package/components/Button/enums.js +7 -0
- package/components/Button/index.js +16 -0
- package/components/Card/CardAction.js +109 -0
- package/components/Card/CardStatic.js +34 -0
- package/components/Card/components/CardContent/CardContent.js +31 -0
- package/components/Card/components/CardContent/components/CardContentBody.js +9 -0
- package/components/Card/components/CardContent/components/CardContentFooter.js +9 -0
- package/components/Card/components/CardContent/components/CardContentHeader.js +9 -0
- package/components/Card/components/CardMedia.js +12 -0
- package/components/Card/enums.js +7 -0
- package/components/Card/index.js +11 -0
- package/components/Card/types.js +2 -0
- package/components/Card/utils.js +14 -0
- package/components/Checkbox/Checkbox.js +36 -0
- package/components/Checkbox/CheckboxXGroup.js +20 -0
- package/components/Checkbox/CheckboxYGroup.js +13 -0
- package/components/Checkbox/enum.js +5 -0
- package/components/Checkbox/index.js +11 -0
- package/components/Col/Col.js +183 -0
- package/components/Col/index.js +5 -0
- package/components/DesignTokens/DesignTokenUtils.js +82 -0
- package/components/DesignTokens/DesignTokensComponents.js +111 -0
- package/components/DesignTokens/DesignTokensComponentsThemeDark.js +111 -0
- package/components/DesignTokens/DesignTokensCore.js +466 -0
- package/components/DesignTokens/DesignTokensCoreThemeDark.js +6 -0
- package/components/DesignTokens/GetTokensValueByTheme.js +11 -0
- package/components/DesignTokens/components/AlertContext.js +20 -0
- package/components/DesignTokens/components/AlertProcess.js +23 -0
- package/components/DesignTokens/components/Button.js +107 -0
- package/components/DesignTokens/components/Card.js +53 -0
- package/components/DesignTokens/components/Checkbox.js +35 -0
- package/components/DesignTokens/components/Dropdown.js +11 -0
- package/components/DesignTokens/components/DropdownList.js +20 -0
- package/components/DesignTokens/components/DropdownMobile.js +23 -0
- package/components/DesignTokens/components/DropdownMobileList.js +11 -0
- package/components/DesignTokens/components/FooterPage.js +9 -0
- package/components/DesignTokens/components/FormField.js +50 -0
- package/components/DesignTokens/components/HeaderPage.js +9 -0
- package/components/DesignTokens/components/Link.js +20 -0
- package/components/DesignTokens/components/ListItem.js +20 -0
- package/components/DesignTokens/components/ListItemControlsButton.js +11 -0
- package/components/DesignTokens/components/ListMaster.js +23 -0
- package/components/DesignTokens/components/Loader.js +11 -0
- package/components/DesignTokens/components/LoaderWidget.js +17 -0
- package/components/DesignTokens/components/Overlay.js +11 -0
- package/components/DesignTokens/components/Page.js +9 -0
- package/components/DesignTokens/components/Pagination.js +23 -0
- package/components/DesignTokens/components/Radio.js +41 -0
- package/components/DesignTokens/components/SegmentedControl.js +20 -0
- package/components/DesignTokens/components/SegmentedControlSegment.js +158 -0
- package/components/DesignTokens/components/Skeleton.js +20 -0
- package/components/DesignTokens/components/Tabs.js +26 -0
- package/components/DesignTokens/components/Tooltip.js +40 -0
- package/components/DesignTokens/components/Typography.js +41 -0
- package/components/DesignTokens/components/UploadZone.js +23 -0
- package/components/DesignTokens/components/index.js +90 -0
- package/components/DesignTokens/index.js +11 -0
- package/components/DesignTokens/types/DesignTokenTypes.js +2 -0
- package/components/DesignTokens/types/DesignTokensTypes.js +134 -0
- package/components/Dropdown/Dropdown.js +10 -0
- package/components/Dropdown/DropdownListContext.js +10 -0
- package/components/Dropdown/desktop/DropdownDesktop.js +21 -0
- package/components/Dropdown/desktop/DropdownList.js +97 -0
- package/components/Dropdown/desktop/DropdownListItem.js +9 -0
- package/components/Dropdown/enums.js +8 -0
- package/components/Dropdown/index.js +32 -0
- package/components/Dropdown/mobile/DropdownMobile.js +22 -0
- package/components/Dropdown/mobile/DropdownMobileBody.js +12 -0
- package/components/Dropdown/mobile/DropdownMobileClose.js +14 -0
- package/components/Dropdown/mobile/DropdownMobileFooter.js +12 -0
- package/components/Dropdown/mobile/DropdownMobileHeader.js +15 -0
- package/components/Dropdown/mobile/DropdownMobileInner.js +56 -0
- package/components/Dropdown/mobile/DropdownMobileInput.js +12 -0
- package/components/Dropdown/mobile/DropdownMobileList.js +21 -0
- package/components/Dropdown/mobile/DropdownMobileListItem.js +37 -0
- package/components/Dropdown/mobile/index.js +21 -0
- package/components/Footer/Footer.js +29 -0
- package/components/Footer/components/FooterDescription.js +20 -0
- package/components/Footer/components/FooterDescriptionContent.js +12 -0
- package/components/Footer/components/FooterDescriptionControls.js +12 -0
- package/components/Footer/index.js +11 -0
- package/components/FormField/FormField.js +76 -0
- package/components/FormField/FormFieldContext.js +27 -0
- package/components/FormField/FormFieldDescriptionContext.js +13 -0
- package/components/FormField/components/FormFieldClear.js +29 -0
- package/components/FormField/components/FormFieldCounter.js +16 -0
- package/components/FormField/components/FormFieldDescription.js +16 -0
- package/components/FormField/components/FormFieldInput.js +9 -0
- package/components/FormField/components/FormFieldLabel.js +42 -0
- package/components/FormField/components/FormFieldMaskedInput.js +95 -0
- package/components/FormField/components/FormFieldMaskedInputPresets.js +168 -0
- package/components/FormField/components/FormFieldPostfix.js +24 -0
- package/components/FormField/components/FormFieldPrefix.js +24 -0
- package/components/FormField/components/FormFieldTextarea.js +42 -0
- package/components/FormField/consts.js +5 -0
- package/components/FormField/enums.js +5 -0
- package/components/FormField/index.js +25 -0
- package/components/FormGroup/FormGroup.js +8 -0
- package/components/FormGroup/index.js +5 -0
- package/components/Gap/Gap.js +8 -0
- package/components/Gap/index.js +5 -0
- package/components/Header/Header.js +40 -0
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js +20 -0
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js +12 -0
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js +12 -0
- package/components/Header/components/HeaderSubheader/HeaderSubheader.js +22 -0
- package/components/Header/components/HeaderTabs/HeaderTabs.js +20 -0
- package/components/Header/components/HeaderTabs/HeaderTabsContent.js +12 -0
- package/components/Header/components/HeaderTabs/HeaderTabsControls.js +12 -0
- package/components/Header/components/HeaderTitle/HeaderTitle.js +20 -0
- package/components/Header/components/HeaderTitle/HeaderTitleContent.js +12 -0
- package/components/Header/components/HeaderTitle/HeaderTitleControls.js +12 -0
- package/components/Header/index.js +25 -0
- package/components/Link/Link.js +72 -0
- package/components/Link/index.js +5 -0
- package/components/List/List.js +23 -0
- package/components/List/ListSortable.js +75 -0
- package/components/List/components/ListEmptyState.js +13 -0
- package/components/List/components/ListItem.js +21 -0
- package/components/List/components/ListItemContent.js +27 -0
- package/components/List/components/ListItemContext.js +10 -0
- package/components/List/components/ListItemControls.js +13 -0
- package/components/List/components/ListItemControlsButton.js +10 -0
- package/components/List/components/ListItemControlsButtonDropdown.js +22 -0
- package/components/List/components/ListItemLoading.js +13 -0
- package/components/List/components/ListItemSelectable.js +46 -0
- package/components/List/components/ListItemTable.js +22 -0
- package/components/List/components/ListItemTailLeft.js +24 -0
- package/components/List/components/ListItemTailRight.js +24 -0
- package/components/List/components/ListSortableItem.js +21 -0
- package/components/List/components/ListSortableItemControls.js +21 -0
- package/components/List/components/ListSortableItemTarget.js +28 -0
- package/components/List/index.js +35 -0
- package/components/ListMaster/ListMaster.js +21 -0
- package/components/ListMaster/components/ListMasterBody.js +19 -0
- package/components/ListMaster/components/ListMasterChipGroup.js +18 -0
- package/components/ListMaster/components/ListMasterFooter.js +26 -0
- package/components/ListMaster/components/ListMasterFooterControls.js +12 -0
- package/components/ListMaster/components/ListMasterFooterDescription.js +12 -0
- package/components/ListMaster/components/ListMasterHeader.js +40 -0
- package/components/ListMaster/components/SelectionControls.js +22 -0
- package/components/ListMaster/index.js +19 -0
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +22 -0
- package/components/Loader/LoaderSmall/LoaderSmall.js +48 -0
- package/components/Loader/LoaderSmall/enum.js +6 -0
- package/components/Loader/index.js +10 -0
- package/components/LoaderWidget/LoaderWidget.js +28 -0
- package/components/LoaderWidget/index.js +5 -0
- package/components/MediaWidth/MediaBetweenWidth.js +9 -0
- package/components/MediaWidth/MediaMaxWidth.js +6 -0
- package/components/MediaWidth/MediaMinWidth.js +6 -0
- package/components/MediaWidth/MediaWidth.js +10 -0
- package/components/MediaWidth/index.js +13 -0
- package/components/MediaWidth/useMatchMedia.js +14 -0
- package/components/MobileView/MobileView.js +8 -0
- package/components/MobileView/index.js +5 -0
- package/components/Overlay/Overlay.js +57 -0
- package/components/Overlay/OverlayBase.js +28 -0
- package/components/Overlay/OverlayMask.js +19 -0
- package/components/Overlay/OverlayPanel.js +46 -0
- package/components/Page/Page.js +23 -0
- package/components/Page/components/BodyPage.js +11 -0
- package/components/Page/components/FooterPage.js +39 -0
- package/components/Page/components/HeaderPage.js +42 -0
- package/components/Page/components/enums.js +6 -0
- package/components/Page/index.js +8 -0
- package/components/Pagination/Pagination.js +22 -0
- package/components/Pagination/components/PaginationExtended.js +22 -0
- package/components/Pagination/components/PaginationNavigation.js +67 -0
- package/components/Pagination/components/PaginationNavigationButton.js +29 -0
- package/components/Pagination/components/PaginationNavigationExtended.js +13 -0
- package/components/Pagination/components/PaginationNavigationExtendedItem.js +10 -0
- package/components/Pagination/components/PaginationPageButton.js +29 -0
- package/components/Pagination/components/PaginationPageEllipsis.js +13 -0
- package/components/Pagination/components/PaginationSelect.js +35 -0
- package/components/Pagination/enums.js +5 -0
- package/components/Pagination/index.js +23 -0
- package/components/Pagination/utils/paginationUtils.js +34 -0
- package/components/Portal/Portal.js +6 -0
- package/components/Radio/Radio.js +30 -0
- package/components/Radio/RadioXGroup.js +20 -0
- package/components/Radio/RadioYGroup.js +13 -0
- package/components/Radio/enum.js +5 -0
- package/components/Radio/index.js +11 -0
- package/components/Row/Row.js +14 -0
- package/components/Row/index.js +5 -0
- package/components/SegmentedControl/SegmentedControl.js +10 -0
- package/components/SegmentedControl/SegmentedControlSegment.js +11 -0
- package/components/SegmentedControl/enums.js +7 -0
- package/components/SegmentedControl/index.js +11 -0
- package/components/SegmentedControl/types.js +2 -0
- package/components/Skeleton/Skeleton.js +22 -0
- package/components/Skeleton/enums.js +5 -0
- package/components/Skeleton/index.js +7 -0
- package/components/SwipeableArea/SwipeableArea.js +140 -0
- package/components/SwipeableArea/index.js +5 -0
- package/components/TabsExtended/TabsExtended.js +38 -0
- package/components/TabsExtended/TabsExtendedContext.js +17 -0
- package/components/TabsExtended/TabsExtendedUtils.js +8 -0
- package/components/TabsExtended/components/TabsExtendedContent.js +20 -0
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +26 -0
- package/components/TabsExtended/components/TabsExtendedTab.js +38 -0
- package/components/TabsExtended/components/TabsExtendedTabButton.js +22 -0
- package/components/TabsExtended/components/TabsExtendedTabContext.js +8 -0
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +70 -0
- package/components/TabsExtended/enums.js +5 -0
- package/components/TabsExtended/index.js +7 -0
- package/components/TextField/MaskedField.js +92 -0
- package/components/TextField/TextField.js +92 -0
- package/components/TextField/TextFieldBase.js +92 -0
- package/components/TextField/index.js +6 -0
- package/components/ThemeProvider/ETriplexNextTheme.js +5 -0
- package/components/ThemeProvider/ThemeProvider.js +28 -0
- package/components/ThemeProvider/ThemeProviderContext.js +14 -0
- package/components/ThemeProvider/components/ThemeProviderView.js +36 -0
- package/components/ThemeProvider/index.js +11 -0
- package/components/ThemeProvider/useToken.js +10 -0
- package/components/Tooltip/Tooltip.js +68 -0
- package/components/Tooltip/TootlipContext.js +18 -0
- package/components/Tooltip/components/common/TooltipBody.js +16 -0
- package/components/Tooltip/components/common/TooltipLink.js +34 -0
- package/components/Tooltip/components/common/TooltipTarget.js +19 -0
- package/components/Tooltip/components/common/TooltipXButton.js +16 -0
- package/components/Tooltip/components/desktop/TooltipDesktop.js +69 -0
- package/components/Tooltip/components/desktop/components/TooltipDesktopBase.js +241 -0
- package/components/Tooltip/components/desktop/components/TooltipDesktopTip.js +29 -0
- package/components/Tooltip/components/mobile/TooltipMobile.js +57 -0
- package/components/Tooltip/components/mobile/components/TooltipMobileCloseButton.js +14 -0
- package/components/Tooltip/components/mobile/components/TooltipMobileHeader.js +18 -0
- package/components/Tooltip/enums.js +14 -0
- package/components/Tooltip/index.js +8 -0
- package/components/Tooltip/types.js +2 -0
- package/components/Tooltip/utils/Positioning.js +124 -0
- package/components/Tooltip/utils/useTooltipTheme.js +31 -0
- package/components/Typography/Caption.js +54 -0
- package/components/Typography/Text.js +62 -0
- package/components/Typography/Title.js +58 -0
- package/components/Typography/enums.js +11 -0
- package/components/Typography/index.js +17 -0
- package/components/Typography/types.js +2 -0
- package/components/Typography/utils.js +6 -0
- package/components/UploadZone/UploadZone.js +10 -0
- package/components/UploadZone/components/UploadZoneInput.js +143 -0
- package/components/UploadZone/index.js +6 -0
- package/components/index.js +256 -0
- package/consts/IndentConst.js +2 -0
- package/enums/EFocusSource.js +5 -0
- package/generated/refTokenTypes.js +5 -0
- package/helpers/breakpoints.js +5 -0
- package/helpers/less/breakpoints.less +9 -0
- package/helpers/less/z-indexes.less +39 -0
- package/index.d.ts +4406 -0
- package/index.js +257 -0
- package/package.json +32 -94
- package/styles/triplex-next.css +333 -0
- package/utils/keyboard.js +50 -0
|
@@ -0,0 +1,931 @@
|
|
|
1
|
+
import { s as ue, D as Ge } from "./DropdownListItem-CM0DOekv.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-3TmHcNY0.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-BpUzyKya.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 ae, 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 le } 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 at } 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 lt } 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 be, ELoaderSmallSize as se } from "../components/Loader/LoaderSmall/enum.js";
|
|
105
|
+
const pt = "button__9e90103a", gt = "sm__7431abb2", bt = "icon__e6d198b8", wt = "md__85c5af41", ht = "lg__bb71fc01", _t = "block__3eb3cf09", Dt = "content__080b748a", yt = "loading__0b417097", St = "loader__81ee9104", Nt = "hidden__8825f7da", z = {
|
|
106
|
+
button: pt,
|
|
107
|
+
sm: gt,
|
|
108
|
+
icon: bt,
|
|
109
|
+
md: wt,
|
|
110
|
+
lg: ht,
|
|
111
|
+
block: _t,
|
|
112
|
+
content: Dt,
|
|
113
|
+
loading: yt,
|
|
114
|
+
loader: St,
|
|
115
|
+
hidden: Nt
|
|
116
|
+
}, Et = "general__81e93e72", It = "expanded__1a4fe561", we = {
|
|
117
|
+
general: Et,
|
|
118
|
+
expanded: It
|
|
119
|
+
}, Lt = "secondary__2e3a9d2c", vt = "expanded__1a4fe561", he = {
|
|
120
|
+
secondary: Lt,
|
|
121
|
+
expanded: vt
|
|
122
|
+
}, Tt = "danger__90b972ec", Ct = "expanded__1a4fe561", _e = {
|
|
123
|
+
danger: Tt,
|
|
124
|
+
expanded: Ct
|
|
125
|
+
}, Rt = "link__30361d77", De = {
|
|
126
|
+
link: Rt
|
|
127
|
+
}, kt = (d, t) => {
|
|
128
|
+
switch (d) {
|
|
129
|
+
case $.GENERAL:
|
|
130
|
+
return { [we.general]: !0, [we.expanded]: t };
|
|
131
|
+
case $.SECONDARY:
|
|
132
|
+
return { [he.secondary]: !0, [he.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 ? be.BRAND : be.NEUTRAL, o = t === P.SM ? se.SM : t === P.LG ? se.LG : se.MD;
|
|
149
|
+
return /* @__PURE__ */ r(at, { 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: a, loading: c, icon: w, ..._ } = d, { "aria-expanded": L } = d, y = k(
|
|
152
|
+
z.button,
|
|
153
|
+
kt(u, !!L),
|
|
154
|
+
Mt(i),
|
|
155
|
+
{ [z.block]: !!a, [z.loading]: !!c },
|
|
156
|
+
{ [z.icon]: !!w && !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
|
+
w,
|
|
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, a = k(ue.dropdownList, m, ue[`dropdownList-${u}`]), { activeDescendant: c, setActiveDescendant: w } = ae(le), _ = p || x.createRef(), L = O([]), [y, N] = j(void 0), E = x.Children.count(t), M = (b) => {
|
|
177
|
+
const n = x.createRef();
|
|
178
|
+
return L.current[b] = n, n;
|
|
179
|
+
}, I = (b) => {
|
|
180
|
+
var v;
|
|
181
|
+
const n = _ == null ? void 0 : _.current, h = (v = L.current[b]) == null ? void 0 : v.current;
|
|
182
|
+
if (n && h) {
|
|
183
|
+
const { top: e, bottom: s } = n.getBoundingClientRect(), { top: f, bottom: D } = h.getBoundingClientRect(), l = 4;
|
|
184
|
+
e > f ? n.scrollTop = n.scrollTop - e + f - l : D > s && (n.scrollTop = n.scrollTop + D - s + l);
|
|
185
|
+
}
|
|
186
|
+
}, C = () => {
|
|
187
|
+
const b = _ == null ? void 0 : _.current;
|
|
188
|
+
b && (b.scrollTop = 0);
|
|
189
|
+
};
|
|
190
|
+
W(() => {
|
|
191
|
+
if (!o)
|
|
192
|
+
return;
|
|
193
|
+
const b = (n) => {
|
|
194
|
+
const { keyCode: h } = n, v = E, e = y;
|
|
195
|
+
let s;
|
|
196
|
+
h === pe.ARROW_DOWN ? (e !== void 0 && e < v - 1 ? s = e + 1 : s = 0, n.preventDefault()) : h === 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", b), () => {
|
|
199
|
+
document.removeEventListener("keydown", b);
|
|
200
|
+
};
|
|
201
|
+
}, [o, y, E]), W(() => {
|
|
202
|
+
if (!o)
|
|
203
|
+
return;
|
|
204
|
+
let b = !1;
|
|
205
|
+
x.Children.forEach(t, (n, h) => {
|
|
206
|
+
n && n.props && n.props.selected && (b = !0, I(h), N(h));
|
|
207
|
+
}), b || (N(0), C());
|
|
208
|
+
}, [o]), W(() => {
|
|
209
|
+
var b, n;
|
|
210
|
+
if (o && y !== void 0) {
|
|
211
|
+
w((n = (b = L.current[y]) == null ? void 0 : b.current) == null ? void 0 : n.id);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
!o && c !== void 0 && w();
|
|
215
|
+
}, [o, y, c, w]), W(() => () => {
|
|
216
|
+
c !== void 0 && w();
|
|
217
|
+
}, [c, w]);
|
|
218
|
+
const A = x.Children.map(t, (b, n) => {
|
|
219
|
+
if (b)
|
|
220
|
+
return x.cloneElement(b, {
|
|
221
|
+
active: o && y === n,
|
|
222
|
+
onMouseOver: (h) => {
|
|
223
|
+
var v, e;
|
|
224
|
+
N(n), (e = (v = b.props).onMouseOver) == null || e.call(v, h);
|
|
225
|
+
},
|
|
226
|
+
ref: M(n)
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
return /* @__PURE__ */ r("div", { className: a, role: "listbox", ref: _, ...i, children: A });
|
|
230
|
+
};
|
|
231
|
+
K.Item = Ge;
|
|
232
|
+
const At = "dropdown__ff240a21", Ft = "dropdownOverflowHidden__cbaea3f9", ye = {
|
|
233
|
+
dropdown: At,
|
|
234
|
+
"dropdown-sm": "dropdown-sm__17ef0018",
|
|
235
|
+
"dropdown-md": "dropdown-md__d8df81ee",
|
|
236
|
+
"dropdown-lg": "dropdown-lg__8609a077",
|
|
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: a,
|
|
246
|
+
setOpened: c,
|
|
247
|
+
style: w,
|
|
248
|
+
targetRef: _,
|
|
249
|
+
size: L = Q.MD,
|
|
250
|
+
...y
|
|
251
|
+
} = d, { scopeClassName: N } = mt(), [E, M] = j({ ...w, opacity: 0 }), I = O(null), C = O({ height: 0, width: 0 }), A = k(ye.dropdown, N, u, ye[`dropdown-${L}`]), b = G(
|
|
252
|
+
(l) => {
|
|
253
|
+
var S;
|
|
254
|
+
(S = I.current) != null && S.contains(l.target) || l.preventDefault();
|
|
255
|
+
},
|
|
256
|
+
[I]
|
|
257
|
+
), n = G((l) => {
|
|
258
|
+
if (l.target === document.body) {
|
|
259
|
+
const S = l.code || l.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")) && l.preventDefault();
|
|
261
|
+
}
|
|
262
|
+
}, []), h = G(
|
|
263
|
+
/** Запрет скролла всей страницы. */
|
|
264
|
+
(l) => {
|
|
265
|
+
l ? (document.addEventListener("wheel", b, { passive: !1 }), document.addEventListener("keydown", n)) : (document.removeEventListener("wheel", b), document.removeEventListener("keydown", n));
|
|
266
|
+
},
|
|
267
|
+
[b, n]
|
|
268
|
+
), v = G(
|
|
269
|
+
(l, S, g) => {
|
|
270
|
+
const R = p ? g.width : Math.max(g.width, S.width);
|
|
271
|
+
m === Z.AUTO ? g.right - R > 0 ? l.left = g.right - R : g.left + R < document.documentElement.clientWidth ? l.left = g.left : l.left = g.right - R : m === Z.RIGHT ? l.left = g.right - R : m === Z.LEFT && (l.left = g.left);
|
|
272
|
+
},
|
|
273
|
+
[m, p]
|
|
274
|
+
), e = G(
|
|
275
|
+
(l, S, g) => {
|
|
276
|
+
i === ee.AUTO ? g.bottom + 4 + S.height < document.documentElement.clientHeight ? l.top = g.bottom + 4 : g.top - 4 - S.height > 0 ? l.bottom = document.documentElement.clientHeight - g.top + 4 : l.top = g.bottom + 4 : i === ee.BOTTOM ? l.top = g.bottom + 4 : i === ee.TOP && (l.bottom = document.documentElement.clientHeight - g.top + 4);
|
|
277
|
+
},
|
|
278
|
+
[i]
|
|
279
|
+
), s = G(() => {
|
|
280
|
+
const { current: l } = I, { current: S } = _;
|
|
281
|
+
if (l && S) {
|
|
282
|
+
const g = l.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({ ...w, ...Y });
|
|
284
|
+
}
|
|
285
|
+
}, [_, p, w, e, v]);
|
|
286
|
+
W(() => {
|
|
287
|
+
a ? s() : (C.current = { height: 0, width: 0 }, M({ ...w, opacity: 0 }));
|
|
288
|
+
}, [a, s, w]), W(() => {
|
|
289
|
+
if (I.current) {
|
|
290
|
+
const { width: l, height: S } = I.current.getBoundingClientRect();
|
|
291
|
+
(l != 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 (a)
|
|
299
|
+
return document.addEventListener("scroll", f, !0), window.addEventListener("resize", f), h(!0), document.body.classList.add(Se), () => {
|
|
300
|
+
document.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f), h(!1), document.body.classList.remove(Se);
|
|
301
|
+
};
|
|
302
|
+
}, [a, f, h]);
|
|
303
|
+
const D = (l) => {
|
|
304
|
+
I.current = l, typeof t == "function" ? t(l) : t && (t.current = l);
|
|
305
|
+
};
|
|
306
|
+
return a ? /* @__PURE__ */ r(
|
|
307
|
+
"div",
|
|
308
|
+
{
|
|
309
|
+
className: A,
|
|
310
|
+
style: { ...E },
|
|
311
|
+
ref: D,
|
|
312
|
+
...y,
|
|
313
|
+
"data-tx": "0.1.6",
|
|
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 }, a) => {
|
|
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: a, children: d }),
|
|
328
|
+
children: /* @__PURE__ */ r($e, { opened: t, setOpened: m, ...u, ref: a, children: (u == null ? void 0 : u.children) || d })
|
|
329
|
+
}
|
|
330
|
+
) : /* @__PURE__ */ r(ce, { opened: t, setOpened: m, ...i, ref: a, children: d }) });
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
Pe.displayName = "Dropdown";
|
|
334
|
+
const Ot = "buttonDropdownExtended__eaf7c3e0", Bt = "buttonDropdownExtendedBlock__00adf9e5", 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: a, ...c } = d, w = 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 b = A.code || A.keyCode;
|
|
353
|
+
N && (T(b, "ESCAPE") || a && T(b, "TAB")) && E(!1);
|
|
354
|
+
}, C = (A) => {
|
|
355
|
+
const b = w.current, n = i.current;
|
|
356
|
+
if (N) {
|
|
357
|
+
const h = A.target;
|
|
358
|
+
h && !(b != null && b.contains(h)) && !(n != null && n.contains(h)) && 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, a, i, E, w]);
|
|
365
|
+
const M = k(Ne.buttonDropdownExtended, t);
|
|
366
|
+
return /* @__PURE__ */ F("div", { className: M, ref: w, ...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__c89a1a0b", zt = "block__3eb3cf09", Wt = "buttonDropdownTarget__735398dd", Gt = "caretIcon__f80cba27", $t = "active__d72757aa", Ut = "buttonDropdownMenuItem__4f070c54", 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: a, selected: c, block: w, disabled: _, ...L } = d, y = O(null), N = O(null), E = k(B.buttonDropdown, { [B.block]: !!w }, p), [M, I] = j(), C = O(Fe()), A = ({ opened: f, setOpened: D }) => {
|
|
409
|
+
const l = k(B.buttonDropdownTarget, "hoverable", {
|
|
410
|
+
[B.active]: f,
|
|
411
|
+
[B.block]: !!w
|
|
412
|
+
});
|
|
413
|
+
return /* @__PURE__ */ F(
|
|
414
|
+
ie,
|
|
415
|
+
{
|
|
416
|
+
className: l,
|
|
417
|
+
theme: u,
|
|
418
|
+
size: i,
|
|
419
|
+
onKeyDown: h({ 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
|
+
}, b = ({ opened: f, setOpened: D }) => {
|
|
435
|
+
const l = k(B.buttonDropdownTarget, "hoverable", {
|
|
436
|
+
[B.active]: f,
|
|
437
|
+
[B.block]: !!w
|
|
438
|
+
});
|
|
439
|
+
return /* @__PURE__ */ r(
|
|
440
|
+
ie,
|
|
441
|
+
{
|
|
442
|
+
className: l,
|
|
443
|
+
theme: $.SECONDARY,
|
|
444
|
+
size: i,
|
|
445
|
+
onKeyDown: h({ 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), h = ({ opened: f, setOpened: D }) => (l) => {
|
|
458
|
+
const { key: S } = l;
|
|
459
|
+
(T(S, "SPACE") || T(S, "ARROW_UP") || T(S, "ARROW_DOWN")) && l.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: l }) => {
|
|
472
|
+
const S = k(B.buttonDropdownMenu, l);
|
|
473
|
+
return /* @__PURE__ */ r(le.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: a.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: a.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 ? b : A,
|
|
527
|
+
renderDropdown: e,
|
|
528
|
+
dropdownRef: N,
|
|
529
|
+
closeOnTab: !0,
|
|
530
|
+
...L
|
|
531
|
+
}
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
);
|
|
535
|
+
Vt.displayName = "ButtonDropdown";
|
|
536
|
+
const jt = "formFieldMaskedInputWrapper__18b96804", Yt = "formFieldMaskedInputPlaceholder__5ddbb445", qt = "formFieldMaskedInput__9f3e2c2a", q = {
|
|
537
|
+
formFieldMaskedInputWrapper: jt,
|
|
538
|
+
formFieldMaskedInputPlaceholder: Yt,
|
|
539
|
+
"size-sm": "size-sm__5c0732be",
|
|
540
|
+
"size-md": "size-md__3275adc6",
|
|
541
|
+
"size-lg": "size-lg__b7e84fba",
|
|
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: a,
|
|
552
|
+
value: c,
|
|
553
|
+
...w
|
|
554
|
+
}) => {
|
|
555
|
+
const [_, L] = j(""), y = O(!1), { valueExist: N, focused: E, size: M } = ae(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] = (a == null ? void 0 : a[D]) || i : s[D] = f[D];
|
|
563
|
+
} else if (a)
|
|
564
|
+
s = a.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, a]);
|
|
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 ? b(s.rawValue) : e : o === X.presets.masks.swiftCode ? e.toUpperCase() : e, b = (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((l, 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 = b(c).value, c) : oe.conformToMask(c, o, { guide: !1, placeholderChar: i }).conformedValue, h = (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]: !!w.error }, d),
|
|
614
|
+
defaultValue: "",
|
|
615
|
+
disabled: m,
|
|
616
|
+
guide: !1,
|
|
617
|
+
render: (e, s) => /* @__PURE__ */ r(Me, { ...s, value: c, placeholder: u || "", ref: h(e) }),
|
|
618
|
+
mask: o,
|
|
619
|
+
onChange: I,
|
|
620
|
+
onPaste: C,
|
|
621
|
+
placeholderChar: i,
|
|
622
|
+
value: n(),
|
|
623
|
+
pipe: A,
|
|
624
|
+
type: "text",
|
|
625
|
+
...w
|
|
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: a, disabled: c, ...w } = d, _ = O(null), L = O(null), [y, N] = j(), E = O(Fe()), M = ({ opened: n, setOpened: h }) => /* @__PURE__ */ r(
|
|
659
|
+
Xe,
|
|
660
|
+
{
|
|
661
|
+
className: "hoverable",
|
|
662
|
+
onKeyDown: C({ opened: n, setOpened: h }),
|
|
663
|
+
onClick: I({ opened: n, setOpened: h }),
|
|
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: b,
|
|
672
|
+
children: o
|
|
673
|
+
}
|
|
674
|
+
), I = ({ opened: n, setOpened: h }) => () => h(!n), C = ({ opened: n, setOpened: h }) => (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")) && h(!0);
|
|
677
|
+
}, A = ({ opened: n, setOpened: h, className: v }) => /* @__PURE__ */ r(le.Provider, { value: { activeDescendant: y, setActiveDescendant: N }, children: /* @__PURE__ */ r(
|
|
678
|
+
V.Dropdown,
|
|
679
|
+
{
|
|
680
|
+
className: v,
|
|
681
|
+
opened: n,
|
|
682
|
+
setOpened: h,
|
|
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: () => h(!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 === (a == null ? void 0 : a.id),
|
|
697
|
+
onSelect: () => {
|
|
698
|
+
var s;
|
|
699
|
+
(s = e.onSelect) == null || s.call(e), h(!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 === (a == null ? void 0 : a.id),
|
|
713
|
+
onSelect: () => {
|
|
714
|
+
var s;
|
|
715
|
+
(s = e.onSelect) == null || s.call(e), h(!1);
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
e.label
|
|
719
|
+
)) })
|
|
720
|
+
}
|
|
721
|
+
) }), b = (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
|
+
...w
|
|
733
|
+
}
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
);
|
|
737
|
+
Xt.displayName = "ListItemControlsButtonDropdown";
|
|
738
|
+
const Zt = "listItemTable__24471b8b", eo = {
|
|
739
|
+
listItemTable: Zt
|
|
740
|
+
}, to = x.forwardRef(
|
|
741
|
+
({ children: d, className: t, controlButtons: m, onClickItem: o, onSelect: p, selected: u, swipeableAreaRef: i, ...a }, c) => {
|
|
742
|
+
const w = typeof p < "u" && typeof u < "u", _ = () => /* @__PURE__ */ r(Qe, { onClick: o, children: d });
|
|
743
|
+
return /* @__PURE__ */ r(xe, { className: k(eo.listItemTable, t), ...a, ref: c, children: /* @__PURE__ */ F(
|
|
744
|
+
lt,
|
|
745
|
+
{
|
|
746
|
+
ref: i,
|
|
747
|
+
rightSwipeableArea: m ? /* @__PURE__ */ r(Je, { children: m }) : void 0,
|
|
748
|
+
children: [
|
|
749
|
+
/* @__PURE__ */ r(et, {}),
|
|
750
|
+
w ? /* @__PURE__ */ r(Ze, { selected: u, onSelect: p, children: _() }) : _()
|
|
751
|
+
]
|
|
752
|
+
}
|
|
753
|
+
) });
|
|
754
|
+
}
|
|
755
|
+
);
|
|
756
|
+
to.displayName = "ListItemTable";
|
|
757
|
+
const oo = "listSortableItem__b60fab31", no = "dragging__e893fe3f", 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: a, transition: c, listeners: w, 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(a), transition: c, ...o },
|
|
777
|
+
...u,
|
|
778
|
+
ref: N,
|
|
779
|
+
children: typeof t == "function" ? t({ disabled: p, dragging: _, listeners: w, setActivatorNodeRef: y }) : t
|
|
780
|
+
}
|
|
781
|
+
);
|
|
782
|
+
}),
|
|
783
|
+
{
|
|
784
|
+
Target: tt
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
ro.displayName = "ListSortableItem";
|
|
788
|
+
const so = "segmentedControlSegment__a5945d69", io = "selected__8d34f887", co = "content__ac0909e7", 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: a,
|
|
803
|
+
value: c,
|
|
804
|
+
disabled: w,
|
|
805
|
+
onSegmentSelect: _
|
|
806
|
+
} = ae(We), y = (() => {
|
|
807
|
+
switch (a) {
|
|
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 (a) {
|
|
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 || w,
|
|
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 ao = "segmentedControl__c4964704", lo = "general1__556f3762", mo = "secondary1__dadefab7", uo = "general2__9f6a19b2", fo = "secondary2__da54a391", po = "sm__45b7565e", go = "md__70427b1b", bo = "lg__5faef581", U = {
|
|
850
|
+
segmentedControl: ao,
|
|
851
|
+
general1: lo,
|
|
852
|
+
secondary1: mo,
|
|
853
|
+
general2: uo,
|
|
854
|
+
secondary2: fo,
|
|
855
|
+
sm: po,
|
|
856
|
+
md: go,
|
|
857
|
+
lg: bo
|
|
858
|
+
}, We = x.createContext({
|
|
859
|
+
type: H.SINGLE,
|
|
860
|
+
value: "",
|
|
861
|
+
disabled: !1,
|
|
862
|
+
onSegmentSelect: () => {
|
|
863
|
+
}
|
|
864
|
+
}), wo = {
|
|
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
|
+
}, ho = {
|
|
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: a, ...c }, w) => {
|
|
876
|
+
const _ = k(
|
|
877
|
+
U.segmentedControl,
|
|
878
|
+
wo[o],
|
|
879
|
+
ho[u],
|
|
880
|
+
t
|
|
881
|
+
), L = ({
|
|
882
|
+
selected: y,
|
|
883
|
+
value: N
|
|
884
|
+
}) => {
|
|
885
|
+
switch (p) {
|
|
886
|
+
case H.SINGLE:
|
|
887
|
+
y && a(N);
|
|
888
|
+
break;
|
|
889
|
+
case H.MULTIPLE:
|
|
890
|
+
a(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.6", ref: w, 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-CLQ4mLUp.js.map
|