@sberbusiness/triplex-next 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/{AlertProcessSpoiler-B3Xzh0I2.js → AlertProcessSpoiler-B91XiZ7K.js} +6 -6
- package/chunks/Card.module-NgdHcwYS.js +17 -0
- package/chunks/Chip-XyednI9u.js +87 -0
- package/chunks/{DropdownListItem-B1GkU8rn.js → DropdownListItem-g0mYNHIW.js} +16 -16
- package/chunks/DropdownMobile.module-BBY44sVr.js +21 -0
- package/chunks/Footer.module-4a0n1yRR.js +11 -0
- package/chunks/{FormFieldInput-n8Ee4EcP.js → FormFieldInput-qaJqBTBV.js} +16 -16
- package/chunks/HeaderLayoutSidebar.module-BP0DyJae.js +9 -0
- package/chunks/HeaderTabs.module-CXcyvbb5.js +9 -0
- package/chunks/HeaderTitle.module-B-6xJFnf.js +9 -0
- package/chunks/{ListItemControlsButton-BdtSkcyn.js → ListItemControlsButton-Ms4q9wDe.js} +2 -2
- package/chunks/ListItemTail.module-D5VudFCz.js +12 -0
- package/chunks/ListMasterFooter.module-DzXu5TSC.js +10 -0
- package/chunks/Notification.module-MX1NZXsu.js +21 -0
- package/chunks/Overlay.module-B1IlIRoo.js +18 -0
- package/chunks/Page.module-Cwb_zvqj.js +12 -0
- package/chunks/{RightBorderArrow-BA2_2Ry3.js → RightBorderArrow-D6ZllSTT.js} +14 -14
- package/chunks/{SuggestFieldMobileDropdownHint-Dz-VDDoR.js → SuggestFieldMobileDropdownHint-Cc_fZLBH.js} +2 -2
- package/chunks/TableFooter.module-D9_esv5A.js +13 -0
- package/chunks/TabsExtended.module--2PQhvJQ.js +16 -0
- package/chunks/TabsLine.module-CH_sqFyE.js +23 -0
- package/chunks/TooltipDesktop.module-D3cbaDX1.js +19 -0
- package/chunks/{UploadZoneInput-CioKsqkV.js → UploadZoneInput-Bkv3b0F5.js} +9 -9
- package/chunks/{utils-B5p23Ple.js → utils-BZFu5eVD.js} +10 -10
- package/chunks/utils-CVSz7tV_.js +20 -0
- package/chunks/utils-D8e1oAR3.js +72 -0
- package/chunks/utils-DWPj89gs.js +36 -0
- package/chunks/utils-dyCpsmr1.js +48 -0
- package/components/AbstractTree/AbstractTreeNode.js +50 -0
- package/components/AccordionBase/protected/AccordionBase.js +83 -0
- package/components/AccordionBase/types.js +2 -0
- package/components/Alert/AlertContext/AlertContext.js +6 -6
- package/components/Alert/AlertProcess/AlertProcess.js +2 -2
- package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +1 -1
- package/components/Amount/Amount.js +8 -8
- package/components/AmountField/AmountField.js +2 -2
- package/components/Body/Body.js +7 -7
- package/components/Button/Button.js +17 -17
- package/components/Button/ButtonBase.js +1 -1
- package/components/Button/ButtonDropdown.js +13 -13
- package/components/Button/ButtonDropdownExtended.js +4 -4
- package/components/Button/ButtonIcon.js +16 -20
- package/components/Button/enums.js +2 -3
- package/components/Button/index.js +9 -10
- package/components/Card/CardAction.js +11 -11
- package/components/Card/CardStatic.js +2 -2
- package/components/Card/components/CardContent/CardContent.js +1 -1
- package/components/Card/components/CardContent/components/CardContentBody.js +1 -1
- package/components/Card/components/CardContent/components/CardContentFooter.js +1 -1
- package/components/Card/components/CardContent/components/CardContentHeader.js +1 -1
- package/components/Card/components/CardMedia.js +1 -1
- package/components/Card/utils.js +1 -1
- package/components/CarouselExtended/CarouselExtended.js +6 -6
- package/components/Checkbox/Checkbox.js +14 -14
- package/components/Checkbox/CheckboxXGroup.js +12 -12
- package/components/Checkbox/CheckboxYGroup.js +3 -3
- package/components/CheckboxTree/CheckboxTree.js +39 -0
- package/components/CheckboxTree/types.js +2 -0
- package/components/CheckboxTree/utils.js +22 -0
- package/components/CheckboxTreeExtended/CheckboxTreeExtended.js +13 -0
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedArrow.js +52 -0
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedCheckbox.js +39 -0
- package/components/CheckboxTreeExtended/components/CheckboxTreeExtendedNode.js +53 -0
- package/components/CheckboxTreeExtended/isStaticCheckboxTreeExtended.js +5 -0
- package/components/Chip/Chip.js +6 -83
- package/components/Chip/ChipClearButton.js +5 -5
- package/components/Chip/ChipDropdownArrow.js +5 -5
- package/components/Chip/ChipIcon.js +4 -4
- package/components/Chip/ChipOptions.js +9 -9
- package/components/Chip/ChipSelect.js +55 -0
- package/components/Chip/index.js +5 -5
- package/components/ChipGroup/ChipGroup.js +11 -11
- package/components/Col/Col.js +136 -136
- package/components/CollapsableTree/CollapsableTree.js +10 -0
- package/components/CollapsableTree/components/CollapsableTreeNode.js +79 -0
- package/components/DesignTokens/DesignTokenUtils.js +1 -1
- package/components/DesignTokens/DesignTokensComponents.js +31 -24
- package/components/DesignTokens/DesignTokensComponentsThemeDark.js +33 -26
- package/components/DesignTokens/components/LoaderScreen.js +17 -0
- package/components/DesignTokens/components/Marker.js +4 -4
- package/components/DesignTokens/components/Notification.js +15 -0
- package/components/DesignTokens/components/Tag.js +9 -0
- package/components/DesignTokens/components/index.js +38 -32
- package/components/Divider/Divider.js +17 -17
- package/components/Dropdown/desktop/DropdownDesktop.js +10 -10
- package/components/Dropdown/desktop/DropdownList.js +1 -1
- package/components/Dropdown/desktop/DropdownListItem.js +1 -1
- package/components/Dropdown/desktop/index.js +1 -1
- package/components/Dropdown/index.js +1 -1
- package/components/Dropdown/mobile/DropdownMobile.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileBody.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileClose.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileFooter.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileHeader.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileInner.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileInput.js +7 -7
- package/components/Dropdown/mobile/DropdownMobileList.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileListItem.js +1 -1
- package/components/Dropdown/mobile/DropdownMobileLoader.js +1 -1
- package/components/Ellipsis/Ellipsis.js +10 -10
- package/components/ExpandAnimation/ExpandAnimation.js +1 -1
- package/components/Footer/Footer.js +2 -2
- package/components/Footer/components/FooterDescription.js +1 -1
- package/components/Footer/components/FooterDescriptionContent.js +1 -1
- package/components/Footer/components/FooterDescriptionControls.js +1 -1
- package/components/FormField/FormField.js +21 -21
- package/components/FormField/components/FormFieldClear.js +7 -7
- package/components/FormField/components/FormFieldCounter.js +1 -1
- package/components/FormField/components/FormFieldDescription.js +4 -4
- package/components/FormField/components/FormFieldInput.js +1 -1
- package/components/FormField/components/FormFieldLabel.js +12 -12
- package/components/FormField/components/FormFieldMaskedInput.js +15 -15
- package/components/FormField/components/FormFieldPostfix.js +4 -4
- package/components/FormField/components/FormFieldPrefix.js +3 -3
- package/components/FormField/components/FormFieldTarget.js +21 -21
- package/components/FormField/components/FormFieldTextarea.js +1 -1
- package/components/FormField/index.js +1 -1
- package/components/Header/Header.js +4 -4
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js +1 -1
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js +1 -1
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js +1 -1
- package/components/Header/components/HeaderSubheader/HeaderSubheader.js +5 -5
- package/components/Header/components/HeaderTabs/HeaderTabs.js +1 -1
- package/components/Header/components/HeaderTabs/HeaderTabsContent.js +1 -1
- package/components/Header/components/HeaderTabs/HeaderTabsControls.js +1 -1
- package/components/Header/components/HeaderTitle/HeaderTitle.js +1 -1
- package/components/Header/components/HeaderTitle/HeaderTitleContent.js +1 -1
- package/components/Header/components/HeaderTitle/HeaderTitleControls.js +1 -1
- package/components/HelpBox/HelpBox.js +17 -17
- package/components/Island/Island.js +1 -1
- package/components/Island/components/IslandBody.js +3 -3
- package/components/Island/components/IslandFooter.js +3 -3
- package/components/Island/components/IslandHeader.js +3 -3
- package/components/Island/utils.js +1 -1
- package/components/Link/Link.js +17 -17
- package/components/List/List.js +7 -7
- package/components/List/components/ListEmptyState.js +1 -1
- package/components/List/components/ListItem.js +1 -1
- package/components/List/components/ListItemContent.js +11 -11
- package/components/List/components/ListItemControls.js +7 -7
- package/components/List/components/ListItemControlsButton.js +1 -1
- package/components/List/components/ListItemControlsButtonDropdown.js +1 -1
- package/components/List/components/ListItemLoading.js +7 -7
- package/components/List/components/ListItemSelectable.js +10 -10
- package/components/List/components/ListItemTable.js +5 -5
- package/components/List/components/ListItemTailLeft.js +1 -1
- package/components/List/components/ListItemTailRight.js +1 -1
- package/components/List/components/ListSortableItem.js +5 -5
- package/components/List/components/ListSortableItemControls.js +1 -1
- package/components/List/components/ListSortableItemTarget.js +4 -4
- package/components/List/index.js +1 -1
- package/components/ListMaster/ListMaster.js +1 -1
- package/components/ListMaster/components/ListMasterBody.js +1 -1
- package/components/ListMaster/components/ListMasterChipGroup.js +7 -7
- package/components/ListMaster/components/ListMasterFooter.js +1 -1
- package/components/ListMaster/components/ListMasterFooterControls.js +1 -1
- package/components/ListMaster/components/ListMasterFooterDescription.js +1 -1
- package/components/ListMaster/components/ListMasterHeader.js +13 -13
- package/components/ListMaster/components/SelectionControls.js +6 -6
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +1 -1
- package/components/Loader/LoaderSmall/LoaderSmall.js +12 -12
- package/components/LoaderScreen/LoaderScreen.js +29 -0
- package/components/LoaderScreen/index.js +5 -0
- package/components/Marker/Marker.js +1 -1
- package/components/Marker/utils.js +1 -1
- package/components/MarkerStatus/MarkerStatus.js +31 -27
- package/components/Notification/Notification.js +40 -0
- package/components/Notification/NotificationGrouped.js +12 -0
- package/components/Notification/components/NotificationBody.js +19 -0
- package/components/Notification/components/NotificationBodyContent.js +8 -0
- package/components/Notification/components/NotificationBodyList.js +11 -0
- package/components/Notification/components/NotificationClose.js +14 -0
- package/components/Notification/components/NotificationFooter.js +8 -0
- package/components/Notification/components/NotificationGroupedFooter.js +11 -0
- package/components/Notification/components/NotificationHeader.js +8 -0
- package/components/Notification/components/NotificationIcon.js +8 -0
- package/components/Notification/components/NotificationTime.js +8 -0
- package/components/NumberField/NumberField.js +8 -0
- package/components/NumberField/NumberFieldInput.js +38 -0
- package/components/NumberField/index.js +5 -0
- package/components/NumberField/types.js +2 -0
- package/components/OrderedList/OrderedList.js +8 -8
- package/components/OrderedList/OrderedListItem.js +6 -6
- package/components/Overlay/Overlay.js +1 -1
- package/components/Overlay/OverlayMask.js +1 -1
- package/components/Overlay/OverlayPanel.js +1 -1
- package/components/Page/Page.js +1 -1
- package/components/Page/components/BodyPage.js +1 -1
- package/components/Page/components/FooterPage.js +1 -1
- package/components/Page/components/HeaderPage.js +1 -1
- package/components/Pagination/components/PaginationExtended.js +2 -2
- package/components/Pagination/components/PaginationNavigationButton.js +4 -4
- package/components/Pagination/components/PaginationNavigationExtended.js +1 -1
- package/components/Pagination/components/PaginationPageButton.js +1 -1
- package/components/Pagination/components/PaginationPageEllipsis.js +2 -2
- package/components/Pagination/components/PaginationSelect.js +11 -11
- package/components/Radio/Radio.js +16 -16
- package/components/Radio/RadioXGroup.js +13 -13
- package/components/Radio/RadioYGroup.js +6 -6
- package/components/Row/Row.js +6 -6
- package/components/SegmentedControl/SegmentedControl.js +5 -5
- package/components/SegmentedControl/SegmentedControlSegment.js +10 -10
- package/components/SelectExtendedField/SelectExtendedField.js +6 -6
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +1 -1
- package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +7 -7
- package/components/Skeleton/Skeleton.js +10 -10
- package/components/Stepper/RightBorderArrow.js +1 -1
- package/components/Stepper/Stepper.js +8 -8
- package/components/Stepper/StepperExtended.js +4 -4
- package/components/Stepper/StepperStep.js +2 -2
- package/components/Stepper/StepperWrapper.js +2 -2
- package/components/SuggestField/SuggestField.js +1 -1
- package/components/SuggestField/SuggestFieldTarget.js +1 -1
- package/components/SuggestField/SuggestFieldTargetPostfix.js +1 -1
- package/components/SuggestField/desktop/SuggestFieldDesktop.js +3 -3
- package/components/SuggestField/desktop/SuggestFieldDesktopDropdown.js +1 -1
- package/components/SuggestField/index.js +1 -1
- package/components/SuggestField/mobile/SuggestFieldMobile.js +1 -1
- package/components/SuggestField/mobile/SuggestFieldMobileDropdown.js +2 -2
- package/components/SuggestField/mobile/SuggestFieldMobileDropdownHint.js +1 -1
- package/components/SuggestField/mobile/index.js +1 -1
- package/components/SwipeableArea/SwipeableArea.js +20 -20
- package/components/Table/FilterPanel.js +2 -2
- package/components/Table/MasterTable.js +17 -17
- package/components/Table/NoColumns.js +1 -1
- package/components/Table/PaginationPanel.js +2 -2
- package/components/Table/TableBasic/TableBasic.js +1 -1
- package/components/Table/TableBasic/components/TableBasicBody.js +1 -1
- package/components/Table/TableBasic/components/TableBasicHeader.js +1 -1
- package/components/Table/TableBasic/components/TableBasicRow.js +1 -1
- package/components/Table/TableBasicSettings/TableBasicSettings.js +1 -1
- package/components/Table/TableBasicSettings/components/ColumnSettingsSortableListItemTarget.js +5 -5
- package/components/Table/TableBasicSettings/components/ColumnSettingsStaticListItem.js +1 -1
- package/components/Table/TableBasicSettings/components/TableBasicSettingsBody.js +1 -1
- package/components/Table/TableBasicSettings/components/TableBasicSettingsFooter.js +1 -1
- package/components/Table/TableBasicSettings/components/TableBasicSettingsHeader.js +6 -6
- package/components/Table/TableFooter/TableFooter.js +1 -1
- package/components/Table/TableFooter/components/TableFooterSummary.js +1 -1
- package/components/Table/TableFooter/components/TableFooterSummaryAmount.js +1 -1
- package/components/Table/TableFooter/components/TableFooterSummarySelectAllButton.js +1 -1
- package/components/Table/TableFooter/components/TableFooterSummarySelectedCount.js +1 -1
- package/components/Table/TabsLinePanel.js +2 -2
- package/components/Table/TabsLinePanelLinks.js +1 -1
- package/components/Table/utils.js +1 -1
- package/components/Tabs/Tabs.js +13 -13
- package/components/TabsExtended/TabsExtended.js +2 -2
- package/components/TabsExtended/components/TabsExtendedContent.js +1 -1
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +1 -1
- package/components/TabsExtended/components/TabsExtendedTab.js +1 -1
- package/components/TabsExtended/components/TabsExtendedTabButton.js +1 -1
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +1 -1
- package/components/TabsExtended/utils.js +1 -1
- package/components/TabsLine/TabsLine.js +1 -1
- package/components/TabsLine/components/TabsLineDesktop.js +1 -1
- package/components/TabsLine/components/TabsLineDropdown.js +3 -3
- package/components/TabsLine/components/TabsLineItem.js +1 -1
- package/components/TabsLine/components/TabsLineMobile.js +8 -8
- package/components/Tag/Tag.js +70 -0
- package/components/Tag/index.js +5 -0
- package/components/Tag/types.js +2 -0
- package/components/TagGroup/TagGroup.js +25 -0
- package/components/TagGroup/index.js +5 -0
- package/components/TagGroup/types.js +2 -0
- package/components/TextField/TextField.js +1 -1
- package/components/Tooltip/components/common/TooltipBody.js +1 -1
- 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 +1 -1
- package/components/Tooltip/components/desktop/components/TooltipDesktopTip.js +1 -1
- package/components/Tooltip/components/mobile/TooltipMobile.js +1 -1
- package/components/TreeView/TreeView.js +88 -0
- package/components/TreeView/TreeViewAbstractNode.js +38 -0
- package/components/TreeView/TreeViewAbstractNodeUtils.js +112 -0
- package/components/TreeView/TreeViewContext.js +30 -0
- package/components/TreeView/components/TreeViewGroup.js +6 -0
- package/components/TreeView/components/TreeViewNode.js +81 -0
- package/components/Typography/Caption.js +15 -15
- package/components/Typography/Text.js +16 -16
- package/components/Typography/Title.js +13 -13
- package/components/Typography/utils.js +1 -1
- package/components/UnorderedList/UnorderedList.js +5 -5
- package/components/UnorderedList/UnorderedListItem.js +6 -6
- package/components/UploadZone/UploadZone.js +2 -2
- package/components/UploadZone/components/UploadZoneInput.js +1 -1
- package/components/index.js +358 -348
- package/helpers/less/z-indexes.less +3 -3
- package/index.d.ts +215 -33
- package/index.js +362 -352
- package/package.json +17 -5
- package/styles/triplex-next.css +441 -436
- package/chunks/Card.module-Dh5vP2zv.js +0 -17
- package/chunks/DropdownMobile.module-CYlB98Oc.js +0 -21
- package/chunks/Footer.module-Bk8QkaWN.js +0 -11
- package/chunks/HeaderLayoutSidebar.module-CDNHX5_G.js +0 -9
- package/chunks/HeaderTabs.module-yaGpurOU.js +0 -9
- package/chunks/HeaderTitle.module-XzB-YndL.js +0 -9
- package/chunks/ListItemTail.module-D_m5pMsh.js +0 -12
- package/chunks/ListMasterFooter.module-DXrsYZZo.js +0 -10
- package/chunks/Overlay.module-BghrPKKn.js +0 -18
- package/chunks/Page.module-D6xCdUbr.js +0 -12
- package/chunks/TableFooter.module-BzfTOGS_.js +0 -13
- package/chunks/TabsExtended.module-B3nvdhKr.js +0 -16
- package/chunks/TabsLine.module-Dlj__Yjk.js +0 -23
- package/chunks/TooltipDesktop.module-TiWl3v5C.js +0 -19
- package/chunks/utils-BtcCJ4_U.js +0 -20
- package/chunks/utils-D7E_PKCe.js +0 -36
- package/chunks/utils-DPXynVs1.js +0 -72
- package/chunks/utils-DjxtOr-n.js +0 -48
- package/components/Chip/enums.js +0 -5
- package/components/DesignTokens/components/LoaderWidget.js +0 -17
- package/components/LoaderWidget/LoaderWidget.js +0 -29
- package/components/LoaderWidget/index.js +0 -5
|
@@ -3,7 +3,7 @@ import "./ButtonBase.js";
|
|
|
3
3
|
import "./ButtonIcon.js";
|
|
4
4
|
import { jsx as o, jsxs as N, Fragment as q } from "react/jsx-runtime";
|
|
5
5
|
import F, { useRef as _, useState as V, createElement as M } from "react";
|
|
6
|
-
import { c as
|
|
6
|
+
import { c as f, a as J } from "../../chunks/vendor-CehxOAkM.js";
|
|
7
7
|
import { ButtonDropdownExtended as y } from "./ButtonDropdownExtended.js";
|
|
8
8
|
import { EButtonDotsTheme as u, EButtonTheme as d } from "./enums.js";
|
|
9
9
|
import { DotshorizontalStrokeSrvIcon32 as Q, DotshorizontalStrokeSrvIcon20 as B, CaretdownStrokeSrvIcon24 as X, CaretdownStrokeSrvIcon20 as Z, CaretdownStrokeSrvIcon16 as $ } from "@sberbusiness/icons-next";
|
|
@@ -18,7 +18,7 @@ import { Text as ce } from "../Typography/Text.js";
|
|
|
18
18
|
import { ETextSize as se } from "../Typography/enums.js";
|
|
19
19
|
import { DropdownList as L } from "../Dropdown/desktop/DropdownList.js";
|
|
20
20
|
import { EComponentSize as i } from "../../enums/EComponentSize.js";
|
|
21
|
-
const le = "
|
|
21
|
+
const le = "buttonDropdown__67356234", de = "block__924cbdf4", ie = "buttonDropdownTarget__650bb0be", me = "caretIcon__199e39d8", ue = "active__0c75e4ae", De = "buttonDropdownMenuItem__61342fac", n = {
|
|
22
22
|
buttonDropdown: le,
|
|
23
23
|
block: de,
|
|
24
24
|
buttonDropdownTarget: ie,
|
|
@@ -33,10 +33,10 @@ const le = "buttonDropdown__4e8922e2", de = "block__9ef2ad79", ie = "buttonDropd
|
|
|
33
33
|
[i.SM]: /* @__PURE__ */ o($, { paletteIndex: 7, className: n.caretIcon }),
|
|
34
34
|
[i.MD]: /* @__PURE__ */ o(Z, { paletteIndex: 7, className: n.caretIcon }),
|
|
35
35
|
[i.LG]: /* @__PURE__ */ o(X, { paletteIndex: 7, className: n.caretIcon })
|
|
36
|
-
},
|
|
36
|
+
}, be = F.forwardRef(
|
|
37
37
|
(g, p) => {
|
|
38
|
-
const { buttonAttributes: R, children: h, className: z, theme:
|
|
39
|
-
const a =
|
|
38
|
+
const { buttonAttributes: R, children: h, className: z, theme: b, size: c, options: C, selected: l, block: w, disabled: T, ...G } = g, k = _(null), v = _(null), W = f(n.buttonDropdown, { [n.block]: !!w }, z), [S, H] = V(), I = _(J()), P = ({ opened: e, setOpened: r }) => {
|
|
39
|
+
const a = f(n.buttonDropdownTarget, "hoverable", {
|
|
40
40
|
[n.active]: e,
|
|
41
41
|
[n.block]: !!w
|
|
42
42
|
});
|
|
@@ -44,7 +44,7 @@ const le = "buttonDropdown__4e8922e2", de = "block__9ef2ad79", ie = "buttonDropd
|
|
|
44
44
|
x,
|
|
45
45
|
{
|
|
46
46
|
className: a,
|
|
47
|
-
theme:
|
|
47
|
+
theme: b,
|
|
48
48
|
size: c,
|
|
49
49
|
onKeyDown: A({ opened: e, setOpened: r }),
|
|
50
50
|
onClick: E({ opened: e, setOpened: r }),
|
|
@@ -62,7 +62,7 @@ const le = "buttonDropdown__4e8922e2", de = "block__9ef2ad79", ie = "buttonDropd
|
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
}, K = ({ opened: e, setOpened: r }) => {
|
|
65
|
-
const a =
|
|
65
|
+
const a = f(n.buttonDropdownTarget, "hoverable", {
|
|
66
66
|
[n.active]: e,
|
|
67
67
|
[n.block]: !!w
|
|
68
68
|
});
|
|
@@ -70,7 +70,7 @@ const le = "buttonDropdown__4e8922e2", de = "block__9ef2ad79", ie = "buttonDropd
|
|
|
70
70
|
x,
|
|
71
71
|
{
|
|
72
72
|
className: a,
|
|
73
|
-
theme:
|
|
73
|
+
theme: b === u.DOTS_SECONDARY ? d.SECONDARY : d.SECONDARY_LIGHT,
|
|
74
74
|
size: c,
|
|
75
75
|
onKeyDown: A({ opened: e, setOpened: r }),
|
|
76
76
|
onClick: E({ opened: e, setOpened: r }),
|
|
@@ -88,7 +88,7 @@ const le = "buttonDropdown__4e8922e2", de = "block__9ef2ad79", ie = "buttonDropd
|
|
|
88
88
|
const { key: s } = a;
|
|
89
89
|
(D(s, "SPACE") || D(s, "ARROW_UP") || D(s, "ARROW_DOWN")) && a.preventDefault(), !e && (D(s, "ARROW_UP") || D(s, "ARROW_DOWN")) && r(!0);
|
|
90
90
|
}, j = () => {
|
|
91
|
-
switch (
|
|
91
|
+
switch (b) {
|
|
92
92
|
case d.GENERAL:
|
|
93
93
|
case d.DANGER:
|
|
94
94
|
case u.DOTS_SECONDARY:
|
|
@@ -101,7 +101,7 @@ const le = "buttonDropdown__4e8922e2", de = "block__9ef2ad79", ie = "buttonDropd
|
|
|
101
101
|
return null;
|
|
102
102
|
}
|
|
103
103
|
}, U = ({ opened: e, setOpened: r, className: a }) => {
|
|
104
|
-
const s =
|
|
104
|
+
const s = f(n.buttonDropdownMenu, a);
|
|
105
105
|
return /* @__PURE__ */ o(ee.Provider, { value: { activeDescendant: S, setActiveDescendant: H }, children: /* @__PURE__ */ o(
|
|
106
106
|
y.Dropdown,
|
|
107
107
|
{
|
|
@@ -156,7 +156,7 @@ const le = "buttonDropdown__4e8922e2", de = "block__9ef2ad79", ie = "buttonDropd
|
|
|
156
156
|
{
|
|
157
157
|
className: W,
|
|
158
158
|
renderButton: [u.DOTS_SECONDARY, u.DOTS_SECONDARY_LIGHT].includes(
|
|
159
|
-
|
|
159
|
+
b
|
|
160
160
|
) ? K : P,
|
|
161
161
|
renderDropdown: U,
|
|
162
162
|
dropdownRef: v,
|
|
@@ -166,8 +166,8 @@ const le = "buttonDropdown__4e8922e2", de = "block__9ef2ad79", ie = "buttonDropd
|
|
|
166
166
|
);
|
|
167
167
|
}
|
|
168
168
|
);
|
|
169
|
-
|
|
169
|
+
be.displayName = "ButtonDropdown";
|
|
170
170
|
export {
|
|
171
|
-
|
|
171
|
+
be as ButtonDropdown
|
|
172
172
|
};
|
|
173
173
|
//# sourceMappingURL=ButtonDropdown.js.map
|
|
@@ -4,7 +4,7 @@ import { Dropdown as _ } from "../Dropdown/Dropdown.js";
|
|
|
4
4
|
import { isKey as w } from "../../utils/keyboard.js";
|
|
5
5
|
import { DropdownList as g } from "../Dropdown/desktop/DropdownList.js";
|
|
6
6
|
import { c as A } from "../../chunks/vendor-CehxOAkM.js";
|
|
7
|
-
const K = "
|
|
7
|
+
const K = "buttonDropdownExtended__df325646", S = "buttonDropdownExtendedBlock__fc379e05", E = {
|
|
8
8
|
buttonDropdownExtended: K,
|
|
9
9
|
buttonDropdownExtendedBlock: S
|
|
10
10
|
}, D = (s) => {
|
|
@@ -25,10 +25,10 @@ const K = "buttonDropdownExtended__79d3d387", S = "buttonDropdownExtendedBlock__
|
|
|
25
25
|
const n = r.code || r.keyCode;
|
|
26
26
|
e && (w(n, "ESCAPE") || p && w(n, "TAB")) && o(!1);
|
|
27
27
|
}, d = (r) => {
|
|
28
|
-
const n = u.current,
|
|
28
|
+
const n = u.current, i = l.current;
|
|
29
29
|
if (e) {
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const a = r.target;
|
|
31
|
+
a && !(n != null && n.contains(a)) && !(i != null && i.contains(a)) && o(!1);
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
return document.addEventListener("keydown", t), document.addEventListener("mousedown", d), document.addEventListener("touchstart", d), () => {
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { EButtonIconShape as c } from "./enums.js";
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import u from "react";
|
|
4
3
|
import { c as m } from "../../chunks/vendor-CehxOAkM.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { EButtonIconShape as c } from "./enums.js";
|
|
5
|
+
const b = "buttonIcon__8507b62f", I = "circle__b3ec683c", p = "squircle__bba8dd3d", o = {
|
|
6
|
+
buttonIcon: b,
|
|
7
|
+
circle: I,
|
|
8
8
|
squircle: p
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
}, b = i.forwardRef(
|
|
17
|
-
({ className: t, disabled: e, shape: n = c.SQUIRCLE, active: s, ...r }, a) => {
|
|
18
|
-
const u = m(o.buttonIcon, _(n), "hoverable", t, {
|
|
9
|
+
}, f = {
|
|
10
|
+
[c.SQUIRCLE]: o.squircle,
|
|
11
|
+
[c.CIRCLE]: o.circle
|
|
12
|
+
}, _ = u.forwardRef(
|
|
13
|
+
({ className: e, disabled: t, shape: n = c.SQUIRCLE, active: s, ...r }, a) => {
|
|
14
|
+
const l = m(o.buttonIcon, f[n], "hoverable", e, {
|
|
19
15
|
active: !!s,
|
|
20
|
-
disabled: !!
|
|
16
|
+
disabled: !!t
|
|
21
17
|
});
|
|
22
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ i("button", { className: l, disabled: t, ...r, ref: a });
|
|
23
19
|
}
|
|
24
20
|
);
|
|
25
|
-
|
|
21
|
+
_.displayName = "ButtonIcon";
|
|
26
22
|
export {
|
|
27
|
-
|
|
23
|
+
_ as ButtonIcon
|
|
28
24
|
};
|
|
29
25
|
//# sourceMappingURL=ButtonIcon.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
var a = /* @__PURE__ */ ((r) => (r.DOTS_SECONDARY = "dots_secondary", r.DOTS_SECONDARY_LIGHT = "dots_secondary_light", r))(a || {}),
|
|
1
|
+
var a = /* @__PURE__ */ ((r) => (r.DOTS_SECONDARY = "dots_secondary", r.DOTS_SECONDARY_LIGHT = "dots_secondary_light", r))(a || {}), R = /* @__PURE__ */ ((r) => (r.GENERAL = "general", r.SECONDARY = "secondary", r.SECONDARY_LIGHT = "secondary_light", r.DANGER = "danger", r.LINK = "link", r))(R || {}), _ = /* @__PURE__ */ ((r) => (r.SQUIRCLE = "squircle", r.CIRCLE = "circle", r))(_ || {});
|
|
2
2
|
export {
|
|
3
3
|
a as EButtonDotsTheme,
|
|
4
4
|
_ as EButtonIconShape,
|
|
5
|
-
R as
|
|
6
|
-
d as EButtonTheme
|
|
5
|
+
R as EButtonTheme
|
|
7
6
|
};
|
|
8
7
|
//# sourceMappingURL=enums.js.map
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { Button as e } from "./Button.js";
|
|
2
|
-
import { ButtonBase as
|
|
3
|
-
import { ButtonIcon as
|
|
4
|
-
import { ButtonDropdown as
|
|
2
|
+
import { ButtonBase as n } from "./ButtonBase.js";
|
|
3
|
+
import { ButtonIcon as B } from "./ButtonIcon.js";
|
|
4
|
+
import { ButtonDropdown as u } from "./ButtonDropdown.js";
|
|
5
5
|
import { ButtonDropdownExtended as f } from "./ButtonDropdownExtended.js";
|
|
6
|
-
import { EButtonDotsTheme as
|
|
6
|
+
import { EButtonDotsTheme as E, EButtonIconShape as h, EButtonTheme as D } from "./enums.js";
|
|
7
7
|
export {
|
|
8
8
|
e as Button,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
n as ButtonBase,
|
|
10
|
+
u as ButtonDropdown,
|
|
11
11
|
f as ButtonDropdownExtended,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
B as ButtonIcon,
|
|
13
|
+
E as EButtonDotsTheme,
|
|
14
14
|
h as EButtonIconShape,
|
|
15
|
-
D as
|
|
16
|
-
a as EButtonTheme
|
|
15
|
+
D as EButtonTheme
|
|
17
16
|
};
|
|
18
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -10,8 +10,8 @@ import { EFocusSource as r } from "../../enums/EFocusSource.js";
|
|
|
10
10
|
import { mapCardRoundingSizeToCssClass as x, mapCardThemeToCssClass as K } from "./utils.js";
|
|
11
11
|
import { isKey as f } from "../../utils/keyboard.js";
|
|
12
12
|
import { c as k } from "../../chunks/vendor-CehxOAkM.js";
|
|
13
|
-
import { c as B } from "../../chunks/Card.module-
|
|
14
|
-
const O = "
|
|
13
|
+
import { c as B } from "../../chunks/Card.module-NgdHcwYS.js";
|
|
14
|
+
const O = "action__9c6aae7a", F = "selected__96fab4de", V = "focusVisible__f0bcc154", n = {
|
|
15
15
|
action: O,
|
|
16
16
|
selected: F,
|
|
17
17
|
focusVisible: V
|
|
@@ -38,16 +38,16 @@ class l extends u.Component {
|
|
|
38
38
|
s == null || s(e), f(e.keyCode, "SPACE") ? (e.preventDefault(), this.handleToggle()) : f(e.keyCode, "ENTER") && this.handleToggle();
|
|
39
39
|
});
|
|
40
40
|
o(this, "handleFocus", (e) => {
|
|
41
|
-
const { onFocus: s } = this.props, { focusSource: t } = this.state, { current:
|
|
42
|
-
s == null || s(e), !t &&
|
|
41
|
+
const { onFocus: s } = this.props, { focusSource: t } = this.state, { current: a } = this.ref;
|
|
42
|
+
s == null || s(e), !t && a === e.target && this.setState({ focusSource: r.KEYBOARD });
|
|
43
43
|
});
|
|
44
44
|
o(this, "handleBlur", (e) => {
|
|
45
45
|
const { onBlur: s } = this.props, { current: t } = this.ref;
|
|
46
46
|
s == null || s(e), t !== document.activeElement && t === e.target && this.setState({ focusSource: r.NONE });
|
|
47
47
|
});
|
|
48
48
|
o(this, "handleToggle", () => {
|
|
49
|
-
const { toggle: e, selected: s, onToggle: t } = this.props, { isControlled:
|
|
50
|
-
|
|
49
|
+
const { toggle: e, selected: s, onToggle: t } = this.props, { isControlled: a, isSelected: d } = this.state;
|
|
50
|
+
a ? e == null || e(!s) : this.setState(
|
|
51
51
|
(h) => ({ isSelected: !h.isSelected }),
|
|
52
52
|
() => t == null ? void 0 : t(!d)
|
|
53
53
|
);
|
|
@@ -62,7 +62,7 @@ class l extends u.Component {
|
|
|
62
62
|
children: e,
|
|
63
63
|
className: s,
|
|
64
64
|
onClick: t,
|
|
65
|
-
onMouseDown:
|
|
65
|
+
onMouseDown: a,
|
|
66
66
|
onKeyDown: d,
|
|
67
67
|
onFocus: h,
|
|
68
68
|
onBlur: z,
|
|
@@ -74,12 +74,12 @@ class l extends u.Component {
|
|
|
74
74
|
...C
|
|
75
75
|
} = this.props, { isControlled: E, isSelected: g, focusSource: D } = this.state, N = k(
|
|
76
76
|
B.card,
|
|
77
|
-
|
|
77
|
+
n.action,
|
|
78
78
|
K[S],
|
|
79
79
|
x[p],
|
|
80
80
|
{
|
|
81
|
-
[
|
|
82
|
-
[
|
|
81
|
+
[n.focusVisible]: D === r.KEYBOARD,
|
|
82
|
+
[n.selected]: E ? !!m : g
|
|
83
83
|
},
|
|
84
84
|
s
|
|
85
85
|
);
|
|
@@ -96,7 +96,7 @@ class l extends u.Component {
|
|
|
96
96
|
role: "button",
|
|
97
97
|
...C,
|
|
98
98
|
ref: this.ref,
|
|
99
|
-
"data-tx": "1.
|
|
99
|
+
"data-tx": "1.3.0",
|
|
100
100
|
children: e
|
|
101
101
|
}
|
|
102
102
|
);
|
|
@@ -3,7 +3,7 @@ import { CardContent as s } from "./components/CardContent/CardContent.js";
|
|
|
3
3
|
import { CardMedia as e } from "./components/CardMedia.js";
|
|
4
4
|
import { mapCardRoundingSizeToCssClass as C, mapCardThemeToCssClass as p } from "./utils.js";
|
|
5
5
|
import { c } from "../../chunks/vendor-CehxOAkM.js";
|
|
6
|
-
import { c as n } from "../../chunks/Card.module-
|
|
6
|
+
import { c as n } from "../../chunks/Card.module-NgdHcwYS.js";
|
|
7
7
|
import { ECardRoundingSize as f, ECardTheme as l } from "./enums.js";
|
|
8
8
|
const a = ({
|
|
9
9
|
children: r,
|
|
@@ -21,7 +21,7 @@ const a = ({
|
|
|
21
21
|
o
|
|
22
22
|
),
|
|
23
23
|
...d,
|
|
24
|
-
"data-tx": "1.
|
|
24
|
+
"data-tx": "1.3.0",
|
|
25
25
|
children: r
|
|
26
26
|
}
|
|
27
27
|
);
|
|
@@ -4,7 +4,7 @@ import { CardContentHeader as i } from "./components/CardContentHeader.js";
|
|
|
4
4
|
import { CardContentFooter as s } from "./components/CardContentFooter.js";
|
|
5
5
|
import { ECardContentPaddingSize as t } from "../../enums.js";
|
|
6
6
|
import { c as p } from "../../../../chunks/vendor-CehxOAkM.js";
|
|
7
|
-
import { c as r } from "../../../../chunks/Card.module-
|
|
7
|
+
import { c as r } from "../../../../chunks/Card.module-NgdHcwYS.js";
|
|
8
8
|
const c = {
|
|
9
9
|
[t.MD]: r.paddingMD,
|
|
10
10
|
[t.SM]: r.paddingSM
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { c as d } from "../../../../../chunks/vendor-CehxOAkM.js";
|
|
3
|
-
import { c as s } from "../../../../../chunks/Card.module-
|
|
3
|
+
import { c as s } from "../../../../../chunks/Card.module-NgdHcwYS.js";
|
|
4
4
|
const m = ({ children: o, className: t, ...r }) => /* @__PURE__ */ a("div", { className: d(s.cardContentBody, t), ...r, children: o });
|
|
5
5
|
m.displayName = "CardContentBody";
|
|
6
6
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { c as e } from "../../../../../chunks/vendor-CehxOAkM.js";
|
|
3
|
-
import { c as s } from "../../../../../chunks/Card.module-
|
|
3
|
+
import { c as s } from "../../../../../chunks/Card.module-NgdHcwYS.js";
|
|
4
4
|
const m = ({ children: o, className: t, ...r }) => /* @__PURE__ */ a("div", { className: e(s.cardContentFooter, t), ...r, children: o });
|
|
5
5
|
m.displayName = "CardContentFooter";
|
|
6
6
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { c as o } from "../../../../../chunks/vendor-CehxOAkM.js";
|
|
3
|
-
import { c as d } from "../../../../../chunks/Card.module-
|
|
3
|
+
import { c as d } from "../../../../../chunks/Card.module-NgdHcwYS.js";
|
|
4
4
|
const s = ({ children: r, className: a, ...e }) => /* @__PURE__ */ t("div", { className: o(d.cardContentHeader, a), ...e, children: r });
|
|
5
5
|
s.displayName = "CardContentHeader";
|
|
6
6
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { c as e } from "../../../chunks/vendor-CehxOAkM.js";
|
|
3
|
-
import { c as m } from "../../../chunks/Card.module-
|
|
3
|
+
import { c as m } from "../../../chunks/Card.module-NgdHcwYS.js";
|
|
4
4
|
const o = ({ children: a, className: r, ...s }) => {
|
|
5
5
|
const c = e(m.cardMedia, r);
|
|
6
6
|
return /* @__PURE__ */ d("div", { className: c, ...s, children: a });
|
package/components/Card/utils.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsxs as p, jsx as b } from "react/jsx-runtime";
|
|
2
|
-
import C, { useState as w, useRef as D, useCallback as L, useEffect as
|
|
2
|
+
import C, { useState as w, useRef as D, useCallback as L, useEffect as d } from "react";
|
|
3
3
|
import { l as M, c as S } from "../../chunks/vendor-CehxOAkM.js";
|
|
4
4
|
import { scrollSmoothHorizontally as c } from "../../utils/scroll.js";
|
|
5
|
-
const R = "
|
|
5
|
+
const R = "carouselExtended__2cfe386e", k = {
|
|
6
6
|
carouselExtended: R
|
|
7
7
|
}, y = C.forwardRef(
|
|
8
8
|
({ children: l, buttonPrev: a, buttonNext: i, stepPrev: u, stepNext: f, ...h }, s) => {
|
|
9
9
|
const [o, m] = w({ hidden: !0, nextDisabled: !1, prevDisabled: !0 }), r = D(null), t = L(() => {
|
|
10
|
-
const e = r.current,
|
|
10
|
+
const e = r.current, n = {
|
|
11
11
|
hidden: e.scrollWidth == e.clientWidth,
|
|
12
12
|
nextDisabled: Math.round(e.scrollLeft) + e.offsetWidth >= e.scrollWidth,
|
|
13
13
|
prevDisabled: Math.round(e.scrollLeft) <= 0
|
|
14
14
|
};
|
|
15
|
-
M.isEqual(
|
|
15
|
+
M.isEqual(n, o) == !1 && m(n);
|
|
16
16
|
}, [o]);
|
|
17
|
-
|
|
17
|
+
d(() => (window.addEventListener("resize", t), document.addEventListener("scroll", t), () => {
|
|
18
18
|
window.removeEventListener("resize", t), document.removeEventListener("scroll", t);
|
|
19
|
-
}), [t]),
|
|
19
|
+
}), [t]), d(() => {
|
|
20
20
|
t();
|
|
21
21
|
}, [l, t]);
|
|
22
22
|
const x = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as N, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
3
|
import { CheckboxbulkStrokeSrvIcon24 as z, CheckboxtickStrokeSrvIcon24 as C } from "@sberbusiness/icons-next";
|
|
4
4
|
import "../Typography/Title.js";
|
|
5
5
|
import { Text as S } from "../Typography/Text.js";
|
|
@@ -8,7 +8,7 @@ import { ETextSize as l } from "../Typography/enums.js";
|
|
|
8
8
|
import { EComponentSize as t } from "../../enums/EComponentSize.js";
|
|
9
9
|
import { createSizeToClassNameMap as u } from "../../utils/classNameMaps.js";
|
|
10
10
|
import { c as r } from "../../chunks/vendor-CehxOAkM.js";
|
|
11
|
-
const y = "
|
|
11
|
+
const y = "label__02bab0ac", T = "md__cac442a7", M = "nonempty__c5510d2e", g = "lg__e18d740e", j = "disabled__78eaa990", v = "checkbox__a3e1f966", B = "checkboxIcon__1153eae2", D = "checkmarkIcon__6dd24d88", e = {
|
|
12
12
|
label: y,
|
|
13
13
|
md: T,
|
|
14
14
|
nonempty: M,
|
|
@@ -20,29 +20,29 @@ const y = "label__6720880a", T = "md__76775f34", M = "nonempty__91f75798", g = "
|
|
|
20
20
|
}, E = {
|
|
21
21
|
[t.LG]: l.B2,
|
|
22
22
|
[t.MD]: l.B3
|
|
23
|
-
},
|
|
23
|
+
}, i = u(e), L = f.forwardRef((k, b) => {
|
|
24
24
|
const {
|
|
25
|
-
children:
|
|
25
|
+
children: a,
|
|
26
26
|
className: d,
|
|
27
27
|
disabled: n,
|
|
28
28
|
bulk: p,
|
|
29
29
|
labelAttributes: o,
|
|
30
|
-
size:
|
|
30
|
+
size: s = t.MD,
|
|
31
31
|
...x
|
|
32
|
-
} =
|
|
32
|
+
} = k, h = r(e.checkbox, d, i[s]), _ = r(
|
|
33
33
|
e.label,
|
|
34
|
-
|
|
35
|
-
{ [e.disabled]: !!n, [e.nonempty]: !!
|
|
34
|
+
i[s],
|
|
35
|
+
{ [e.disabled]: !!n, [e.nonempty]: !!a },
|
|
36
36
|
o == null ? void 0 : o.className
|
|
37
|
-
),
|
|
37
|
+
), I = () => {
|
|
38
38
|
const m = e.checkmarkIcon;
|
|
39
39
|
return p ? /* @__PURE__ */ c(z, { className: m, paletteIndex: 7 }) : /* @__PURE__ */ c(C, { className: m, paletteIndex: 7 });
|
|
40
40
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */ c("input", { type: "checkbox", className: h, disabled: n, ...x, ref:
|
|
41
|
+
return /* @__PURE__ */ N("label", { ...o, className: _, "data-tx": "1.3.0", children: [
|
|
42
|
+
/* @__PURE__ */ c("input", { type: "checkbox", className: h, disabled: n, ...x, ref: b }),
|
|
43
43
|
/* @__PURE__ */ c("span", { className: e.checkboxIcon }),
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
I(),
|
|
45
|
+
a && /* @__PURE__ */ c(S, { size: E[s], children: a })
|
|
46
46
|
] });
|
|
47
47
|
});
|
|
48
48
|
L.displayName = "Checkbox";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { c as a } from "../../chunks/vendor-CehxOAkM.js";
|
|
3
|
-
const r = "
|
|
3
|
+
const r = "checkboxXGroup__0db8d96c", _ = "label__02bab0ac", e = {
|
|
4
4
|
checkboxXGroup: r,
|
|
5
|
-
"indent-12": "indent-
|
|
5
|
+
"indent-12": "indent-12__b0a586cf",
|
|
6
6
|
label: _,
|
|
7
|
-
"indent-16": "indent-
|
|
8
|
-
"indent-20": "indent-
|
|
9
|
-
"indent-24": "indent-
|
|
10
|
-
"indent-28": "indent-
|
|
11
|
-
"indent-32": "indent-
|
|
12
|
-
},
|
|
13
|
-
const { children:
|
|
14
|
-
return /* @__PURE__ */ i("div", { className: s, role: "group", ...
|
|
7
|
+
"indent-16": "indent-16__23bd78ef",
|
|
8
|
+
"indent-20": "indent-20__fdded4d9",
|
|
9
|
+
"indent-24": "indent-24__843736a1",
|
|
10
|
+
"indent-28": "indent-28__7c2de685",
|
|
11
|
+
"indent-32": "indent-32__42f034a8"
|
|
12
|
+
}, b = (n) => {
|
|
13
|
+
const { children: c, className: t, indent: d = 12, ...o } = n, s = a(e.checkboxXGroup, e[`indent-${d}`], t);
|
|
14
|
+
return /* @__PURE__ */ i("div", { className: s, role: "group", ...o, children: c });
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
b.displayName = "CheckboxXGroup";
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
b as CheckboxXGroup
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=CheckboxXGroup.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { c as t } from "../../chunks/vendor-CehxOAkM.js";
|
|
3
|
-
const a = "
|
|
3
|
+
const a = "checkboxYGroup__5800f39a", x = {
|
|
4
4
|
checkboxYGroup: a
|
|
5
5
|
}, l = (o) => {
|
|
6
|
-
const { children: c, className: s, ...
|
|
7
|
-
return /* @__PURE__ */ p("div", { className:
|
|
6
|
+
const { children: c, className: s, ...r } = o, e = t(x.checkboxYGroup, s);
|
|
7
|
+
return /* @__PURE__ */ p("div", { className: e, role: "group", ...r, children: c });
|
|
8
8
|
};
|
|
9
9
|
l.displayName = "CheckboxYGroup";
|
|
10
10
|
export {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { CheckboxTreeExtended as t } from "../CheckboxTreeExtended/CheckboxTreeExtended.js";
|
|
3
|
+
import { checkChildrenCheckboxes as f, traverseCheckboxes as g, checkParentCheckboxes as T } from "./utils.js";
|
|
4
|
+
const h = ({ checkboxes: e, onChange: N }) => {
|
|
5
|
+
const p = (d) => (r) => {
|
|
6
|
+
const { checked: i } = r.target;
|
|
7
|
+
d.checked = d.bulk ? !0 : i, f(d), g(e, T), N([...e]);
|
|
8
|
+
}, a = (d, r, i) => /* @__PURE__ */ n(
|
|
9
|
+
t.Node,
|
|
10
|
+
{
|
|
11
|
+
id: d.id,
|
|
12
|
+
checkbox: (l) => /* @__PURE__ */ n(
|
|
13
|
+
t.Checkbox,
|
|
14
|
+
{
|
|
15
|
+
...l,
|
|
16
|
+
onChange: p(d),
|
|
17
|
+
bulk: d.bulk,
|
|
18
|
+
checked: d.checked,
|
|
19
|
+
children: d.label
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
prevNodeId: r == null ? void 0 : r.id,
|
|
23
|
+
nextNodeId: i == null ? void 0 : i.id,
|
|
24
|
+
children: d.children && d.children.map(
|
|
25
|
+
(l, m) => {
|
|
26
|
+
var s, u;
|
|
27
|
+
return a(l, (s = d.children) == null ? void 0 : s[m - 1], (u = d.children) == null ? void 0 : u[m + 1]);
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
},
|
|
31
|
+
d.id
|
|
32
|
+
);
|
|
33
|
+
return /* @__PURE__ */ n(t, { children: e.map((d, r) => a(d, e[r - 1], e[r + 1])) });
|
|
34
|
+
};
|
|
35
|
+
h.displayName = "CheckboxTree";
|
|
36
|
+
export {
|
|
37
|
+
h as CheckboxTree
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=CheckboxTree.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const d = (e, r) => {
|
|
2
|
+
e.forEach((l) => {
|
|
3
|
+
l.children && d(l.children, r), r(l);
|
|
4
|
+
});
|
|
5
|
+
}, t = (e) => {
|
|
6
|
+
if (!e.children)
|
|
7
|
+
return;
|
|
8
|
+
let r = 0, l = 0;
|
|
9
|
+
e.children.forEach((n) => {
|
|
10
|
+
n.checked && r++, n.bulk && l++;
|
|
11
|
+
}), r === e.children.length ? (e.checked = !0, e.bulk = l !== 0) : r > 0 ? (e.checked = !0, e.bulk = !0) : e.checked = !1;
|
|
12
|
+
}, h = (e) => {
|
|
13
|
+
e.children && e.children.forEach((r) => {
|
|
14
|
+
r.checked = e.checked, h(r);
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
h as checkChildrenCheckboxes,
|
|
19
|
+
t as checkParentCheckboxes,
|
|
20
|
+
d as traverseCheckboxes
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { CollapsableTree as c } from "../CollapsableTree/CollapsableTree.js";
|
|
3
|
+
import { CheckboxTreeExtendedCheckbox as d } from "./components/CheckboxTreeExtendedCheckbox.js";
|
|
4
|
+
import { CheckboxTreeExtendedNode as m } from "./components/CheckboxTreeExtendedNode.js";
|
|
5
|
+
import { c as s } from "../../chunks/vendor-CehxOAkM.js";
|
|
6
|
+
const e = ({ className: o, ...r }) => /* @__PURE__ */ x(c, { className: s("cssClass[checkboxTreeExtended]", o), ...r });
|
|
7
|
+
e.displayName = "CheckboxTreeExtended";
|
|
8
|
+
e.Checkbox = d;
|
|
9
|
+
e.Node = m;
|
|
10
|
+
export {
|
|
11
|
+
e as CheckboxTreeExtended
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=CheckboxTreeExtended.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var c = (r, o, e) => o in r ? a(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
|
|
3
|
+
var n = (r, o, e) => c(r, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
5
|
+
import { CaretdownStrokeSrvIcon16 as l } from "@sberbusiness/icons-next";
|
|
6
|
+
import { EVENT_KEY_CODES as d } from "../../../utils/keyboard.js";
|
|
7
|
+
import h from "react";
|
|
8
|
+
class N extends h.Component {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
n(this, "arrowNode");
|
|
12
|
+
n(this, "setArrowNode", (e) => {
|
|
13
|
+
this.arrowNode = e;
|
|
14
|
+
});
|
|
15
|
+
n(this, "handleClick", () => {
|
|
16
|
+
const { opened: e, toggle: t } = this.props;
|
|
17
|
+
t(!e);
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Обработчик нажатия клавиш.
|
|
21
|
+
* Стрелка вправо - раскрыть, влево - свернуть.
|
|
22
|
+
* Enter, space - изменить состояние на противоположное.
|
|
23
|
+
*/
|
|
24
|
+
n(this, "handleKeyUp", (e) => {
|
|
25
|
+
const { opened: t, toggle: s } = this.props;
|
|
26
|
+
e.keyCode === d.ARROW_RIGHT ? s(!0) : e.keyCode === d.ARROW_LEFT ? s(!1) : [d.ENTER, d.SPACE].includes(e.keyCode) && s(!t);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
componentDidUpdate(e) {
|
|
30
|
+
var i;
|
|
31
|
+
const { active: t } = this.props, { active: s } = e;
|
|
32
|
+
t && !s && ((i = this.arrowNode) == null || i.focus());
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return /* @__PURE__ */ p(
|
|
36
|
+
"span",
|
|
37
|
+
{
|
|
38
|
+
className: "cssClass[caretIconWrapper]",
|
|
39
|
+
onClick: this.handleClick,
|
|
40
|
+
onKeyUp: this.handleKeyUp,
|
|
41
|
+
ref: this.setArrowNode,
|
|
42
|
+
role: "button",
|
|
43
|
+
tabIndex: -1,
|
|
44
|
+
children: /* @__PURE__ */ p(l, { paletteIndex: 0 })
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
N as CheckboxTreeExtendedArrow
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=CheckboxTreeExtendedArrow.js.map
|