@sberbusiness/triplex-next 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/chunks/AlertProcessSpoiler-B3Xzh0I2.js +39 -0
- package/chunks/Card.module-Dh5vP2zv.js +17 -0
- package/chunks/DropdownListItem-B1GkU8rn.js +57 -0
- package/chunks/DropdownMobile.module-CYlB98Oc.js +21 -0
- package/chunks/Footer.module-Bk8QkaWN.js +11 -0
- package/chunks/{FormFieldInput-rV5ZVe9k.js → FormFieldInput-n8Ee4EcP.js} +23 -23
- package/chunks/HeaderLayoutSidebar.module-CDNHX5_G.js +9 -0
- package/chunks/HeaderTabs.module-yaGpurOU.js +9 -0
- package/chunks/HeaderTitle.module-XzB-YndL.js +9 -0
- package/chunks/{ListItemControlsButton-Ch-5PQYH.js → ListItemControlsButton-BdtSkcyn.js} +10 -10
- package/chunks/ListItemTail.module-D_m5pMsh.js +12 -0
- package/chunks/ListMasterFooter.module-DXrsYZZo.js +10 -0
- package/chunks/Overlay.module-BghrPKKn.js +18 -0
- package/chunks/Page.module-D6xCdUbr.js +12 -0
- package/chunks/RightBorderArrow-BA2_2Ry3.js +146 -0
- package/chunks/SuggestFieldMobileDropdownHint-Dz-VDDoR.js +15 -0
- package/chunks/TableFooter.module-BzfTOGS_.js +13 -0
- package/chunks/TabsExtended.module-B3nvdhKr.js +16 -0
- package/chunks/TabsLine.module-Dlj__Yjk.js +23 -0
- package/chunks/TooltipDesktop.module-TiWl3v5C.js +19 -0
- package/chunks/{UploadZoneInput-CXjerIVV.js → UploadZoneInput-CioKsqkV.js} +6 -6
- package/chunks/utils-B5p23Ple.js +26 -0
- package/chunks/utils-BtcCJ4_U.js +20 -0
- package/chunks/utils-D7E_PKCe.js +36 -0
- package/chunks/utils-DPXynVs1.js +72 -0
- package/chunks/utils-DjxtOr-n.js +48 -0
- package/chunks/vendor-CehxOAkM.js +11907 -0
- package/components/Alert/AlertContext/AlertContext.js +6 -6
- package/components/Alert/AlertProcess/AlertProcess.js +3 -3
- package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +2 -2
- package/components/Amount/Amount.js +37 -0
- package/components/Amount/index.js +5 -0
- package/components/AmountField/AmountBaseInputCore.js +46 -0
- package/components/AmountField/AmountBaseInputFormatter.js +57 -0
- package/components/AmountField/AmountBaseInputParser.js +110 -0
- package/components/AmountField/AmountField.js +76 -0
- package/components/AmountField/index.js +5 -0
- package/components/AmountField/utils.js +38 -0
- package/components/Body/Body.js +4 -4
- package/components/Button/Button.js +68 -67
- package/components/Button/ButtonBase.js +1 -1
- package/components/Button/ButtonDropdown.js +108 -122
- package/components/Button/ButtonDropdownExtended.js +6 -6
- package/components/Button/ButtonIcon.js +2 -2
- package/components/Card/CardAction.js +24 -24
- package/components/Card/CardStatic.js +3 -3
- package/components/Card/components/CardContent/CardContent.js +2 -2
- package/components/Card/components/CardContent/components/CardContentBody.js +2 -2
- package/components/Card/components/CardContent/components/CardContentFooter.js +2 -2
- package/components/Card/components/CardContent/components/CardContentHeader.js +2 -2
- package/components/Card/components/CardMedia.js +2 -2
- package/components/Card/utils.js +1 -1
- package/components/CarouselExtended/CarouselExtended.js +48 -0
- package/components/Checkbox/Checkbox.js +46 -30
- package/components/Checkbox/CheckboxXGroup.js +13 -13
- package/components/Checkbox/CheckboxYGroup.js +4 -4
- package/components/Checkbox/index.js +4 -6
- package/components/Chip/Chip.js +86 -0
- package/components/Chip/ChipClearButton.js +28 -0
- package/components/Chip/ChipDropdownArrow.js +18 -0
- package/components/Chip/ChipIcon.js +9 -0
- package/components/Chip/ChipOptions.js +27 -0
- package/components/Chip/enums.js +5 -0
- package/components/Chip/index.js +15 -0
- package/components/ChipGroup/ChipGroup.js +32 -0
- package/components/ChipGroup/index.js +5 -0
- package/components/Col/Col.js +143 -143
- package/components/DesignTokens/DesignTokenUtils.js +2 -2
- package/components/DesignTokens/DesignTokensComponents.js +89 -69
- package/components/DesignTokens/DesignTokensComponentsThemeDark.js +92 -77
- package/components/DesignTokens/components/Card.js +23 -20
- package/components/DesignTokens/components/Checkbox.js +32 -14
- package/components/DesignTokens/components/Chip.js +59 -0
- package/components/DesignTokens/components/Divider.js +9 -0
- package/components/DesignTokens/components/Dropdown.js +1 -1
- package/components/DesignTokens/components/DropdownList.js +2 -2
- package/components/DesignTokens/components/DropdownMobile.js +3 -3
- package/components/DesignTokens/components/FooterPage.js +3 -3
- package/components/DesignTokens/components/HeaderPage.js +4 -4
- package/components/DesignTokens/components/ListItemControlsButton.js +20 -5
- package/components/DesignTokens/components/Marker.js +20 -0
- package/components/DesignTokens/components/MarkerStatus.js +9 -0
- package/components/DesignTokens/components/Radio.js +22 -13
- package/components/DesignTokens/components/Stepper.js +71 -0
- package/components/DesignTokens/components/TableBasic.js +41 -0
- package/components/DesignTokens/components/Tabs.js +45 -15
- package/components/DesignTokens/components/TabsLine.js +32 -0
- package/components/DesignTokens/components/index.js +100 -79
- package/components/Divider/Divider.js +34 -0
- package/components/Divider/index.js +5 -0
- package/components/Dropdown/desktop/DropdownDesktop.js +52 -51
- package/components/Dropdown/desktop/DropdownList.js +66 -53
- package/components/Dropdown/desktop/DropdownListItem.js +2 -2
- package/components/Dropdown/desktop/index.js +9 -0
- package/components/Dropdown/index.js +33 -29
- package/components/Dropdown/mobile/DropdownMobile.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileBody.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileClose.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileFooter.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileHeader.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInner.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInput.js +9 -8
- package/components/Dropdown/mobile/DropdownMobileList.js +26 -17
- package/components/Dropdown/mobile/DropdownMobileListItem.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileLoader.js +20 -0
- package/components/Dropdown/mobile/index.js +5 -3
- package/components/Ellipsis/Ellipsis.js +27 -0
- package/components/Ellipsis/index.js +5 -0
- package/components/ExpandAnimation/ExpandAnimation.js +72 -0
- package/components/Footer/Footer.js +3 -3
- package/components/Footer/components/FooterDescription.js +2 -2
- package/components/Footer/components/FooterDescriptionContent.js +2 -2
- package/components/Footer/components/FooterDescriptionControls.js +2 -2
- package/components/FormField/FormField.js +37 -36
- package/components/FormField/FormFieldContext.js +8 -7
- package/components/FormField/components/FormFieldClear.js +24 -20
- package/components/FormField/components/FormFieldCounter.js +5 -5
- package/components/FormField/components/FormFieldDescription.js +10 -10
- package/components/FormField/components/FormFieldInput.js +2 -2
- package/components/FormField/components/FormFieldLabel.js +8 -8
- package/components/FormField/components/FormFieldMaskedInput.js +12 -12
- package/components/FormField/components/FormFieldPostfix.js +2 -2
- package/components/FormField/components/FormFieldPrefix.js +4 -4
- package/components/FormField/components/FormFieldTarget.js +14 -14
- package/components/FormField/components/FormFieldTextarea.js +6 -6
- package/components/FormField/index.js +1 -1
- package/components/Header/Header.js +11 -11
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js +2 -2
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js +2 -2
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js +2 -2
- package/components/Header/components/HeaderSubheader/HeaderSubheader.js +6 -6
- package/components/Header/components/HeaderTabs/HeaderTabs.js +2 -2
- package/components/Header/components/HeaderTabs/HeaderTabsContent.js +2 -2
- package/components/Header/components/HeaderTabs/HeaderTabsControls.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitle.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitleContent.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitleControls.js +2 -2
- package/components/HelpBox/HelpBox.js +94 -0
- package/components/Island/Island.js +25 -66
- package/components/Island/components/IslandBody.js +4 -4
- package/components/Island/components/IslandFooter.js +4 -4
- package/components/Island/components/IslandHeader.js +4 -4
- package/components/Island/enums.js +1 -3
- package/components/Island/index.js +4 -6
- package/components/Island/types.js +2 -0
- package/components/Island/utils.js +8 -0
- package/components/Link/Link.js +8 -8
- package/components/List/List.js +12 -20
- package/components/List/ListSortable.js +1 -1
- package/components/List/components/ListEmptyState.js +2 -2
- package/components/List/components/ListItem.js +1 -10
- package/components/List/components/ListItemContent.js +11 -11
- package/components/List/components/ListItemControls.js +6 -6
- package/components/List/components/ListItemControlsButton.js +2 -2
- package/components/List/components/ListItemControlsButtonDropdown.js +4 -2
- package/components/List/components/ListItemLoading.js +11 -9
- package/components/List/components/ListItemSelectable.js +14 -14
- package/components/List/components/ListItemTable.js +6 -6
- package/components/List/components/ListItemTailLeft.js +2 -2
- package/components/List/components/ListItemTailRight.js +2 -2
- package/components/List/components/ListSortableItem.js +6 -6
- package/components/List/components/ListSortableItemControls.js +2 -2
- package/components/List/components/ListSortableItemTarget.js +7 -7
- package/components/List/index.js +1 -1
- package/components/ListMaster/ListMaster.js +1 -1
- package/components/ListMaster/components/ListMasterBody.js +1 -1
- package/components/ListMaster/components/ListMasterChipGroup.js +8 -8
- package/components/ListMaster/components/ListMasterFooter.js +2 -2
- package/components/ListMaster/components/ListMasterFooterControls.js +2 -2
- package/components/ListMaster/components/ListMasterFooterDescription.js +2 -2
- package/components/ListMaster/components/ListMasterHeader.js +10 -10
- package/components/ListMaster/components/SelectionControls.js +3 -3
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +5 -5
- package/components/Loader/LoaderSmall/LoaderSmall.js +24 -35
- package/components/LoaderWidget/LoaderWidget.js +17 -16
- package/components/Marker/Marker.js +20 -0
- package/components/Marker/enums.js +5 -0
- package/components/Marker/index.js +7 -0
- package/components/Marker/utils.js +6 -0
- package/components/MarkerStatus/MarkerStatus.js +36 -0
- package/components/MarkerStatus/index.js +5 -0
- package/components/OrderedList/OrderedList.js +25 -0
- package/components/OrderedList/OrderedListItem.js +27 -0
- package/components/OrderedList/index.js +7 -0
- package/components/OrderedList/types.js +2 -0
- package/components/Overlay/Overlay.js +2 -2
- package/components/Overlay/OverlayMask.js +2 -2
- package/components/Overlay/OverlayPanel.js +2 -2
- package/components/Page/Page.js +2 -2
- package/components/Page/components/BodyPage.js +2 -2
- package/components/Page/components/FooterPage.js +28 -31
- package/components/Page/components/HeaderPage.js +26 -29
- package/components/Page/components/useStickyCornerRadius.js +34 -0
- package/components/Pagination/components/PaginationExtended.js +3 -3
- package/components/Pagination/components/PaginationNavigationButton.js +4 -4
- package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
- package/components/Pagination/components/PaginationPageButton.js +2 -2
- package/components/Pagination/components/PaginationPageEllipsis.js +2 -2
- package/components/Pagination/components/PaginationSelect.js +16 -16
- package/components/Pagination/utils/paginationUtils.js +1 -1
- package/components/Radio/Radio.js +29 -21
- package/components/Radio/RadioXGroup.js +12 -12
- package/components/Radio/RadioYGroup.js +7 -7
- package/components/Radio/index.js +4 -6
- package/components/Row/Row.js +9 -9
- package/components/SegmentedControl/SegmentedControl.js +39 -42
- package/components/SegmentedControl/SegmentedControlSegment.js +2 -2
- package/components/SelectExtendedField/SelectExtendedField.js +7 -7
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +5 -2
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdownDefault.js +22 -18
- package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +36 -35
- package/components/SelectField/SelectField.js +62 -0
- package/components/SelectField/index.js +5 -0
- package/components/Skeleton/Skeleton.js +10 -10
- package/components/Stepper/RightBorderArrow.js +7 -0
- package/components/Stepper/Stepper.js +103 -0
- package/components/Stepper/StepperExtended.js +26 -0
- package/components/Stepper/StepperExtendedContext.js +12 -0
- package/components/Stepper/StepperStep.js +88 -0
- package/components/Stepper/StepperStepIcon.js +23 -0
- package/components/Stepper/StepperWrapper.js +12 -0
- package/components/Stepper/enums.js +7 -0
- package/components/Stepper/index.js +11 -0
- package/components/SuggestField/SuggestField.js +64 -0
- package/components/SuggestField/SuggestFieldTarget.js +67 -0
- package/components/SuggestField/SuggestFieldTargetPostfix.js +28 -0
- package/components/SuggestField/desktop/SuggestFieldDesktop.js +196 -0
- package/components/SuggestField/desktop/SuggestFieldDesktopDropdown.js +76 -0
- package/components/SuggestField/desktop/index.js +7 -0
- package/components/SuggestField/desktop/types.js +2 -0
- package/components/SuggestField/index.js +17 -0
- package/components/SuggestField/mobile/SuggestFieldMobile.js +79 -0
- package/components/SuggestField/mobile/SuggestFieldMobileDropdown.js +94 -0
- package/components/SuggestField/mobile/SuggestFieldMobileDropdownHint.js +10 -0
- package/components/SuggestField/mobile/SuggestFieldMobileTarget.js +30 -0
- package/components/SuggestField/mobile/index.js +11 -0
- package/components/SuggestField/mobile/types.js +2 -0
- package/components/SuggestField/types.js +2 -0
- package/components/SwipeableArea/SwipeableArea.js +15 -15
- package/components/Table/FilterPanel.js +18 -0
- package/components/Table/MasterTable.js +49 -0
- package/components/Table/MasterTableContext.js +11 -0
- package/components/Table/NoColumns.js +17 -0
- package/components/Table/PaginationPanel.js +18 -0
- package/components/Table/TableBasic/TableBasic.js +51 -0
- package/components/Table/TableBasic/components/TableBasicBody.js +18 -0
- package/components/Table/TableBasic/components/TableBasicHeader.js +83 -0
- package/components/Table/TableBasic/components/TableBasicRow.js +53 -0
- package/components/Table/TableBasic/enums.js +8 -0
- package/components/Table/TableBasic/types.js +2 -0
- package/components/Table/TableBasicSettings/TableBasicSettings.js +58 -0
- package/components/Table/TableBasicSettings/components/ColumnSettings.js +20 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsSortableList.js +24 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsSortableListItem.js +25 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsSortableListItemTarget.js +29 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsStaticList.js +17 -0
- package/components/Table/TableBasicSettings/components/ColumnSettingsStaticListItem.js +14 -0
- package/components/Table/TableBasicSettings/components/TableBasicSettingsBody.js +13 -0
- package/components/Table/TableBasicSettings/components/TableBasicSettingsFooter.js +13 -0
- package/components/Table/TableBasicSettings/components/TableBasicSettingsHeader.js +26 -0
- package/components/Table/TableFooter/TableFooter.js +14 -0
- package/components/Table/TableFooter/components/TableFooterSummary.js +19 -0
- package/components/Table/TableFooter/components/TableFooterSummaryAmount.js +18 -0
- package/components/Table/TableFooter/components/TableFooterSummarySelectAllButton.js +31 -0
- package/components/Table/TableFooter/components/TableFooterSummarySelectedCount.js +8 -0
- package/components/Table/TabsLinePanel.js +12 -0
- package/components/Table/TabsLinePanelLinks.js +14 -0
- package/components/Table/index.js +26 -0
- package/components/Table/utils.js +8 -0
- package/components/Tabs/Tabs.js +75 -0
- package/components/Tabs/index.js +5 -0
- package/components/TabsExtended/TabsExtended.js +37 -21
- package/components/TabsExtended/TabsExtendedContext.js +6 -4
- package/components/TabsExtended/components/TabsExtendedContent.js +19 -15
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTab.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTabButton.js +17 -15
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +7 -7
- package/components/TabsExtended/components/index.js +15 -0
- package/components/TabsExtended/enums.js +2 -2
- package/components/TabsExtended/index.js +15 -3
- package/components/TabsExtended/utils.js +9 -0
- package/components/TabsLine/TabsLine.js +48 -0
- package/components/TabsLine/components/TabsLineDesktop.js +81 -0
- package/components/TabsLine/components/TabsLineDropdown.js +151 -0
- package/components/TabsLine/components/TabsLineItem.js +26 -0
- package/components/TabsLine/components/TabsLineMobile.js +21 -0
- package/components/TabsLine/components/index.js +11 -0
- package/components/TabsLine/index.js +13 -0
- package/components/TabsLine/types.js +2 -0
- package/components/TextField/TextField.js +1 -1
- package/components/ThemeProvider/ThemeProvider.js +1 -1
- package/components/ThemeProvider/components/ThemeProviderView.js +4 -4
- package/components/Tooltip/components/common/TooltipBody.js +2 -2
- package/components/Tooltip/components/common/TooltipLink.js +4 -4
- package/components/Tooltip/components/common/TooltipXButton.js +1 -1
- package/components/Tooltip/components/desktop/components/TooltipDesktopBase.js +2 -2
- package/components/Tooltip/components/desktop/components/TooltipDesktopTip.js +2 -2
- package/components/Tooltip/components/mobile/TooltipMobile.js +7 -7
- package/components/Typography/Caption.js +12 -12
- package/components/Typography/Text.js +20 -20
- package/components/Typography/Title.js +13 -13
- package/components/Typography/utils.js +1 -1
- package/components/UnorderedList/UnorderedList.js +25 -0
- package/components/UnorderedList/UnorderedListItem.js +27 -0
- package/components/UnorderedList/index.js +7 -0
- package/components/UnorderedList/types.js +2 -0
- package/components/UploadZone/UploadZone.js +3 -3
- package/components/UploadZone/components/UploadZoneInput.js +2 -2
- package/components/index.js +366 -275
- package/consts/AmountConst.js +10 -0
- package/consts/DataTestId.js +19 -0
- package/enums/EComponentSize.js +5 -0
- package/enums/index.js +7 -0
- package/index.d.ts +1029 -124
- package/index.js +361 -268
- package/package.json +69 -2
- package/styles/triplex-next.css +436 -354
- package/types/CoreTypes.js +2 -0
- package/utils/amountUtils.js +34 -0
- package/utils/classNameMaps.js +10 -0
- package/utils/html/AriaAttributes.js +11 -0
- package/utils/html/DataAttributes.js +11 -0
- package/utils/inputUtils.js +11 -0
- package/utils/isNullOrUndefined.js +5 -0
- package/utils/scroll.js +13 -0
- package/utils/stringUtils.js +13 -0
- package/chunks/AlertProcessSpoiler-Caa0745n.js +0 -39
- package/chunks/Card.module-BRANBAxP.js +0 -17
- package/chunks/DropdownListItem-DIIAnvmw.js +0 -56
- package/chunks/DropdownMobile.module-BUeZuAYr.js +0 -19
- package/chunks/Footer.module-BFo05t5_.js +0 -11
- package/chunks/HeaderLayoutSidebar.module-CEqBuRNu.js +0 -9
- package/chunks/HeaderTabs.module-BEaVu2Hx.js +0 -9
- package/chunks/HeaderTitle.module-Db-1fcNm.js +0 -9
- package/chunks/ListItemTail.module-C5-4SAqt.js +0 -12
- package/chunks/ListMasterFooter.module-Dph-_lLg.js +0 -10
- package/chunks/Overlay.module-D6LEz1jT.js +0 -18
- package/chunks/Page.module-Ct9ky9ko.js +0 -16
- package/chunks/TabsExtended.module-CmU9j8zG.js +0 -13
- package/chunks/TabsExtendedUtils-CkAvE1fA.js +0 -23
- package/chunks/TooltipDesktop.module-KrPZMfQD.js +0 -19
- package/chunks/utils-bbbspEnw.js +0 -36
- package/chunks/vendor-D-uL_icH.js +0 -5895
- package/components/Checkbox/enum.js +0 -5
- package/components/Radio/enum.js +0 -5
- package/components/TabsExtended/TabsExtendedUtils.js +0 -8
|
@@ -1,187 +1,173 @@
|
|
|
1
|
-
import { Button as
|
|
1
|
+
import { Button as x } from "./Button.js";
|
|
2
2
|
import "./ButtonBase.js";
|
|
3
3
|
import "./ButtonIcon.js";
|
|
4
|
-
import { jsx as
|
|
5
|
-
import
|
|
6
|
-
import { c as b,
|
|
7
|
-
import { ButtonDropdownExtended as
|
|
8
|
-
import { EButtonDotsTheme as
|
|
9
|
-
import {
|
|
4
|
+
import { jsx as o, jsxs as N, Fragment as q } from "react/jsx-runtime";
|
|
5
|
+
import F, { useRef as _, useState as V, createElement as M } from "react";
|
|
6
|
+
import { c as b, a as J } from "../../chunks/vendor-CehxOAkM.js";
|
|
7
|
+
import { ButtonDropdownExtended as y } from "./ButtonDropdownExtended.js";
|
|
8
|
+
import { EButtonDotsTheme as u, EButtonTheme as d } from "./enums.js";
|
|
9
|
+
import { DotshorizontalStrokeSrvIcon32 as Q, DotshorizontalStrokeSrvIcon20 as B, CaretdownStrokeSrvIcon24 as X, CaretdownStrokeSrvIcon20 as Z, CaretdownStrokeSrvIcon16 as $ } from "@sberbusiness/icons-next";
|
|
10
10
|
import { isKey as D } from "../../utils/keyboard.js";
|
|
11
|
-
import { DropdownListContext as
|
|
12
|
-
import { DropdownMobileHeader as
|
|
13
|
-
import { DropdownMobileBody as
|
|
14
|
-
import { DropdownMobileList as
|
|
15
|
-
import { DropdownMobileListItem as
|
|
16
|
-
import { DropdownMobileClose as
|
|
17
|
-
import { Text as
|
|
18
|
-
import { ETextSize as
|
|
19
|
-
import { DropdownList as
|
|
20
|
-
import {
|
|
21
|
-
const
|
|
22
|
-
buttonDropdown:
|
|
23
|
-
block:
|
|
11
|
+
import { DropdownListContext as ee } from "../Dropdown/DropdownListContext.js";
|
|
12
|
+
import { DropdownMobileHeader as te } from "../Dropdown/mobile/DropdownMobileHeader.js";
|
|
13
|
+
import { DropdownMobileBody as oe } from "../Dropdown/mobile/DropdownMobileBody.js";
|
|
14
|
+
import { DropdownMobileList as re } from "../Dropdown/mobile/DropdownMobileList.js";
|
|
15
|
+
import { DropdownMobileListItem as ne } from "../Dropdown/mobile/DropdownMobileListItem.js";
|
|
16
|
+
import { DropdownMobileClose as ae } from "../Dropdown/mobile/DropdownMobileClose.js";
|
|
17
|
+
import { Text as ce } from "../Typography/Text.js";
|
|
18
|
+
import { ETextSize as se } from "../Typography/enums.js";
|
|
19
|
+
import { DropdownList as L } from "../Dropdown/desktop/DropdownList.js";
|
|
20
|
+
import { EComponentSize as i } from "../../enums/EComponentSize.js";
|
|
21
|
+
const le = "buttonDropdown__4e8922e2", de = "block__9ef2ad79", ie = "buttonDropdownTarget__55655319", me = "caretIcon__e4b379ba", ue = "active__81245f30", De = "buttonDropdownMenuItem__bdfa1f2a", n = {
|
|
22
|
+
buttonDropdown: le,
|
|
23
|
+
block: de,
|
|
24
24
|
buttonDropdownTarget: ie,
|
|
25
|
-
caretIcon:
|
|
26
|
-
active:
|
|
27
|
-
buttonDropdownMenuItem:
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, De = (l) => {
|
|
40
|
-
switch (l) {
|
|
41
|
-
case d.SM:
|
|
42
|
-
return N.SM;
|
|
43
|
-
case d.MD:
|
|
44
|
-
return N.MD;
|
|
45
|
-
case d.LG:
|
|
46
|
-
return N.LG;
|
|
47
|
-
default:
|
|
48
|
-
return N.MD;
|
|
49
|
-
}
|
|
50
|
-
}, pe = V.forwardRef(
|
|
51
|
-
(l, p) => {
|
|
52
|
-
const { buttonAttributes: M, children: T, className: Y, theme: f, size: w, options: A, selected: s, block: _, disabled: C, ...W } = l, O = E(null), k = E(null), H = b(n.buttonDropdown, { [n.block]: !!_ }, Y), [R, P] = J(), h = E(Q()), K = ({ opened: e, setOpened: o }) => {
|
|
25
|
+
caretIcon: me,
|
|
26
|
+
active: ue,
|
|
27
|
+
buttonDropdownMenuItem: De
|
|
28
|
+
}, pe = {
|
|
29
|
+
[i.SM]: /* @__PURE__ */ o(B, { paletteIndex: 0 }),
|
|
30
|
+
[i.MD]: /* @__PURE__ */ o(B, { paletteIndex: 0 }),
|
|
31
|
+
[i.LG]: /* @__PURE__ */ o(Q, { paletteIndex: 0 })
|
|
32
|
+
}, Y = {
|
|
33
|
+
[i.SM]: /* @__PURE__ */ o($, { paletteIndex: 7, className: n.caretIcon }),
|
|
34
|
+
[i.MD]: /* @__PURE__ */ o(Z, { paletteIndex: 7, className: n.caretIcon }),
|
|
35
|
+
[i.LG]: /* @__PURE__ */ o(X, { paletteIndex: 7, className: n.caretIcon })
|
|
36
|
+
}, fe = F.forwardRef(
|
|
37
|
+
(g, p) => {
|
|
38
|
+
const { buttonAttributes: R, children: h, className: z, theme: f, size: c, options: C, selected: l, block: w, disabled: T, ...G } = g, k = _(null), v = _(null), W = b(n.buttonDropdown, { [n.block]: !!w }, z), [S, H] = V(), I = _(J()), P = ({ opened: e, setOpened: r }) => {
|
|
53
39
|
const a = b(n.buttonDropdownTarget, "hoverable", {
|
|
54
40
|
[n.active]: e,
|
|
55
|
-
[n.block]: !!
|
|
41
|
+
[n.block]: !!w
|
|
56
42
|
});
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
|
|
43
|
+
return /* @__PURE__ */ N(
|
|
44
|
+
x,
|
|
59
45
|
{
|
|
60
46
|
className: a,
|
|
61
47
|
theme: f,
|
|
62
|
-
size:
|
|
63
|
-
onKeyDown:
|
|
64
|
-
onClick:
|
|
65
|
-
disabled:
|
|
48
|
+
size: c,
|
|
49
|
+
onKeyDown: A({ opened: e, setOpened: r }),
|
|
50
|
+
onClick: E({ opened: e, setOpened: r }),
|
|
51
|
+
disabled: T,
|
|
66
52
|
"aria-haspopup": "menu",
|
|
67
53
|
"aria-expanded": e,
|
|
68
|
-
"aria-controls":
|
|
69
|
-
"aria-activedescendant":
|
|
70
|
-
...
|
|
71
|
-
ref:
|
|
54
|
+
"aria-controls": I.current,
|
|
55
|
+
"aria-activedescendant": S,
|
|
56
|
+
...R,
|
|
57
|
+
ref: O,
|
|
72
58
|
children: [
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
h,
|
|
60
|
+
j()
|
|
75
61
|
]
|
|
76
62
|
}
|
|
77
63
|
);
|
|
78
|
-
},
|
|
64
|
+
}, K = ({ opened: e, setOpened: r }) => {
|
|
79
65
|
const a = b(n.buttonDropdownTarget, "hoverable", {
|
|
80
66
|
[n.active]: e,
|
|
81
|
-
[n.block]: !!
|
|
67
|
+
[n.block]: !!w
|
|
82
68
|
});
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
|
|
69
|
+
return /* @__PURE__ */ o(
|
|
70
|
+
x,
|
|
85
71
|
{
|
|
86
72
|
className: a,
|
|
87
|
-
theme: f ===
|
|
88
|
-
size:
|
|
89
|
-
onKeyDown:
|
|
90
|
-
onClick:
|
|
91
|
-
disabled:
|
|
73
|
+
theme: f === u.DOTS_SECONDARY ? d.SECONDARY : d.SECONDARY_LIGHT,
|
|
74
|
+
size: c,
|
|
75
|
+
onKeyDown: A({ opened: e, setOpened: r }),
|
|
76
|
+
onClick: E({ opened: e, setOpened: r }),
|
|
77
|
+
disabled: T,
|
|
92
78
|
"aria-haspopup": "menu",
|
|
93
79
|
"aria-expanded": e,
|
|
94
|
-
"aria-controls":
|
|
95
|
-
"aria-activedescendant":
|
|
96
|
-
...
|
|
97
|
-
ref:
|
|
98
|
-
icon:
|
|
80
|
+
"aria-controls": I.current,
|
|
81
|
+
"aria-activedescendant": S,
|
|
82
|
+
...R,
|
|
83
|
+
ref: O,
|
|
84
|
+
icon: pe[c]
|
|
99
85
|
}
|
|
100
86
|
);
|
|
101
|
-
},
|
|
102
|
-
const { key:
|
|
103
|
-
(D(
|
|
104
|
-
},
|
|
87
|
+
}, E = ({ opened: e, setOpened: r }) => () => r(!e), A = ({ opened: e, setOpened: r }) => (a) => {
|
|
88
|
+
const { key: s } = a;
|
|
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
|
+
}, j = () => {
|
|
105
91
|
switch (f) {
|
|
106
|
-
case
|
|
107
|
-
case
|
|
108
|
-
case
|
|
109
|
-
case
|
|
110
|
-
return
|
|
111
|
-
case
|
|
112
|
-
case
|
|
113
|
-
return
|
|
92
|
+
case d.GENERAL:
|
|
93
|
+
case d.DANGER:
|
|
94
|
+
case u.DOTS_SECONDARY:
|
|
95
|
+
case u.DOTS_SECONDARY_LIGHT:
|
|
96
|
+
return Y[c];
|
|
97
|
+
case d.SECONDARY:
|
|
98
|
+
case d.SECONDARY_LIGHT:
|
|
99
|
+
return Y[c];
|
|
114
100
|
default:
|
|
115
101
|
return null;
|
|
116
102
|
}
|
|
117
|
-
},
|
|
118
|
-
const
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
|
|
103
|
+
}, U = ({ opened: e, setOpened: r, className: a }) => {
|
|
104
|
+
const s = b(n.buttonDropdownMenu, a);
|
|
105
|
+
return /* @__PURE__ */ o(ee.Provider, { value: { activeDescendant: S, setActiveDescendant: H }, children: /* @__PURE__ */ o(
|
|
106
|
+
y.Dropdown,
|
|
121
107
|
{
|
|
122
|
-
size:
|
|
123
|
-
className:
|
|
108
|
+
size: c,
|
|
109
|
+
className: s,
|
|
124
110
|
opened: e,
|
|
125
|
-
setOpened:
|
|
126
|
-
targetRef:
|
|
127
|
-
ref:
|
|
111
|
+
setOpened: r,
|
|
112
|
+
targetRef: k,
|
|
113
|
+
ref: v,
|
|
128
114
|
mobileViewProps: {
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ N(q, { children: [
|
|
116
|
+
/* @__PURE__ */ N(te, { children: [
|
|
117
|
+
/* @__PURE__ */ o(ce, { tag: "div", size: se.B3, children: h }),
|
|
118
|
+
/* @__PURE__ */ o(ae, { onClick: () => r(!1) })
|
|
133
119
|
] }),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
|
|
120
|
+
/* @__PURE__ */ o(oe, { children: /* @__PURE__ */ o(re, { children: C.map((t) => /* @__PURE__ */ M(
|
|
121
|
+
ne,
|
|
136
122
|
{
|
|
137
123
|
...t,
|
|
138
124
|
key: t.id,
|
|
139
|
-
selected: t.id === (
|
|
125
|
+
selected: t.id === (l == null ? void 0 : l.id),
|
|
140
126
|
onSelect: () => {
|
|
141
|
-
var
|
|
142
|
-
(
|
|
127
|
+
var m;
|
|
128
|
+
(m = t.onSelect) == null || m.call(t), r(!1);
|
|
143
129
|
}
|
|
144
130
|
},
|
|
145
131
|
t.label
|
|
146
132
|
)) }) })
|
|
147
133
|
] })
|
|
148
134
|
},
|
|
149
|
-
children: /* @__PURE__ */
|
|
150
|
-
|
|
135
|
+
children: /* @__PURE__ */ o(L, { dropdownOpened: e, id: I.current, size: c, children: C.map((t) => /* @__PURE__ */ M(
|
|
136
|
+
L.Item,
|
|
151
137
|
{
|
|
152
138
|
...t,
|
|
153
139
|
className: n.buttonDropdownMenuItem,
|
|
154
140
|
key: t.id,
|
|
155
|
-
selected: t.id === (
|
|
141
|
+
selected: t.id === (l == null ? void 0 : l.id),
|
|
156
142
|
onSelect: () => {
|
|
157
|
-
var
|
|
158
|
-
(
|
|
143
|
+
var m;
|
|
144
|
+
(m = t.onSelect) == null || m.call(t), r(!1);
|
|
159
145
|
}
|
|
160
146
|
},
|
|
161
147
|
t.label
|
|
162
148
|
)) })
|
|
163
149
|
}
|
|
164
150
|
) });
|
|
165
|
-
},
|
|
166
|
-
|
|
151
|
+
}, O = (e) => {
|
|
152
|
+
k.current = e, typeof p == "function" ? p(e) : p && (p.current = e);
|
|
167
153
|
};
|
|
168
|
-
return /* @__PURE__ */
|
|
169
|
-
|
|
154
|
+
return /* @__PURE__ */ o(
|
|
155
|
+
y,
|
|
170
156
|
{
|
|
171
|
-
className:
|
|
172
|
-
renderButton: [
|
|
157
|
+
className: W,
|
|
158
|
+
renderButton: [u.DOTS_SECONDARY, u.DOTS_SECONDARY_LIGHT].includes(
|
|
173
159
|
f
|
|
174
|
-
) ?
|
|
175
|
-
renderDropdown:
|
|
176
|
-
dropdownRef:
|
|
160
|
+
) ? K : P,
|
|
161
|
+
renderDropdown: U,
|
|
162
|
+
dropdownRef: v,
|
|
177
163
|
closeOnTab: !0,
|
|
178
|
-
...
|
|
164
|
+
...G
|
|
179
165
|
}
|
|
180
166
|
);
|
|
181
167
|
}
|
|
182
168
|
);
|
|
183
|
-
|
|
169
|
+
fe.displayName = "ButtonDropdown";
|
|
184
170
|
export {
|
|
185
|
-
|
|
171
|
+
fe as ButtonDropdown
|
|
186
172
|
};
|
|
187
173
|
//# sourceMappingURL=ButtonDropdown.js.map
|
|
@@ -3,12 +3,12 @@ import { useRef as f, useState as C, useCallback as N, useEffect as R } from "re
|
|
|
3
3
|
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
|
-
import { c as A } from "../../chunks/vendor-
|
|
7
|
-
const K = "
|
|
6
|
+
import { c as A } from "../../chunks/vendor-CehxOAkM.js";
|
|
7
|
+
const K = "buttonDropdownExtended__79d3d387", S = "buttonDropdownExtendedBlock__3ac30139", E = {
|
|
8
8
|
buttonDropdownExtended: K,
|
|
9
9
|
buttonDropdownExtendedBlock: S
|
|
10
10
|
}, D = (s) => {
|
|
11
|
-
const { className:
|
|
11
|
+
const { className: v, opened: x, setOpened: c, renderButton: k, renderDropdown: b, dropdownRef: l, closeOnTab: p, ...L } = s, u = f(null), m = f(s.opened !== void 0), [O, y] = C((s.opened === void 0, !1)), e = m.current ? !!x : O, o = N(
|
|
12
12
|
(t) => {
|
|
13
13
|
if (m.current) {
|
|
14
14
|
c && c(t);
|
|
@@ -35,10 +35,10 @@ const K = "buttonDropdownExtended__be47856e", S = "buttonDropdownExtendedBlock__
|
|
|
35
35
|
document.removeEventListener("keydown", t), document.removeEventListener("mousedown", d), document.removeEventListener("touchstart", d);
|
|
36
36
|
};
|
|
37
37
|
}, [e, p, l, o, u]);
|
|
38
|
-
const B = A(E.buttonDropdownExtended,
|
|
38
|
+
const B = A(E.buttonDropdownExtended, v);
|
|
39
39
|
return /* @__PURE__ */ h("div", { className: B, ref: u, ...L, children: [
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
k({ opened: e, setOpened: o }),
|
|
41
|
+
b({
|
|
42
42
|
className: E.buttonDropdownExtendedBlock,
|
|
43
43
|
opened: e,
|
|
44
44
|
setOpened: o
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
3
|
import { EButtonIconShape as c } from "./enums.js";
|
|
4
|
-
import { c as m } from "../../chunks/vendor-
|
|
5
|
-
const I = "
|
|
4
|
+
import { c as m } from "../../chunks/vendor-CehxOAkM.js";
|
|
5
|
+
const I = "buttonIcon__1e49546f", f = "circle__be682120", p = "squircle__ded68eda", o = {
|
|
6
6
|
buttonIcon: I,
|
|
7
7
|
circle: f,
|
|
8
8
|
squircle: p
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (c, i, e) =>
|
|
4
|
-
import { jsx as
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var y = (c, i, e) => i in c ? b(c, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[i] = e;
|
|
3
|
+
var o = (c, i, e) => y(c, typeof i != "symbol" ? i + "" : i, e);
|
|
4
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
5
5
|
import u from "react";
|
|
6
|
-
import { CardContent as
|
|
7
|
-
import { CardMedia as
|
|
6
|
+
import { CardContent as T } from "./components/CardContent/CardContent.js";
|
|
7
|
+
import { CardMedia as _ } from "./components/CardMedia.js";
|
|
8
8
|
import { ECardRoundingSize as M, ECardTheme as w } from "./enums.js";
|
|
9
9
|
import { EFocusSource as r } from "../../enums/EFocusSource.js";
|
|
10
10
|
import { mapCardRoundingSizeToCssClass as x, mapCardThemeToCssClass as K } from "./utils.js";
|
|
11
|
-
import { isKey as
|
|
12
|
-
import { c as k } from "../../chunks/vendor-
|
|
13
|
-
import { c as B } from "../../chunks/Card.module-
|
|
14
|
-
const O = "
|
|
11
|
+
import { isKey as f } from "../../utils/keyboard.js";
|
|
12
|
+
import { c as k } from "../../chunks/vendor-CehxOAkM.js";
|
|
13
|
+
import { c as B } from "../../chunks/Card.module-Dh5vP2zv.js";
|
|
14
|
+
const O = "action__9eb46b14", F = "selected__feadd5da", V = "focusVisible__740f2efc", a = {
|
|
15
15
|
action: O,
|
|
16
16
|
selected: F,
|
|
17
17
|
focusVisible: V
|
|
@@ -35,19 +35,19 @@ class l extends u.Component {
|
|
|
35
35
|
});
|
|
36
36
|
o(this, "handleKeyDown", (e) => {
|
|
37
37
|
const { onKeyDown: s } = this.props;
|
|
38
|
-
s == null || s(e),
|
|
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: n } = this.ref;
|
|
42
|
+
s == null || s(e), !t && n === 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: n, isSelected: d } = this.state;
|
|
50
|
+
n ? e == null || e(!s) : this.setState(
|
|
51
51
|
(h) => ({ isSelected: !h.isSelected }),
|
|
52
52
|
() => t == null ? void 0 : t(!d)
|
|
53
53
|
);
|
|
@@ -62,11 +62,11 @@ class l extends u.Component {
|
|
|
62
62
|
children: e,
|
|
63
63
|
className: s,
|
|
64
64
|
onClick: t,
|
|
65
|
-
onMouseDown:
|
|
65
|
+
onMouseDown: n,
|
|
66
66
|
onKeyDown: d,
|
|
67
67
|
onFocus: h,
|
|
68
68
|
onBlur: z,
|
|
69
|
-
roundingSize:
|
|
69
|
+
roundingSize: p = M.MD,
|
|
70
70
|
onToggle: A,
|
|
71
71
|
selected: m,
|
|
72
72
|
toggle: U,
|
|
@@ -74,16 +74,16 @@ 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
|
+
a.action,
|
|
78
78
|
K[S],
|
|
79
|
-
x[
|
|
79
|
+
x[p],
|
|
80
80
|
{
|
|
81
|
-
[
|
|
82
|
-
[
|
|
81
|
+
[a.focusVisible]: D === r.KEYBOARD,
|
|
82
|
+
[a.selected]: E ? !!m : g
|
|
83
83
|
},
|
|
84
84
|
s
|
|
85
85
|
);
|
|
86
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ R(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
89
89
|
className: N,
|
|
@@ -96,13 +96,13 @@ 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.2.0",
|
|
100
100
|
children: e
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
o(l, "displayName", "CardAction"), o(l, "Content",
|
|
105
|
+
o(l, "displayName", "CardAction"), o(l, "Content", T), o(l, "Media", _);
|
|
106
106
|
export {
|
|
107
107
|
l as CardAction
|
|
108
108
|
};
|
|
@@ -2,8 +2,8 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
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
|
-
import { c } from "../../chunks/vendor-
|
|
6
|
-
import { c as n } from "../../chunks/Card.module-
|
|
5
|
+
import { c } from "../../chunks/vendor-CehxOAkM.js";
|
|
6
|
+
import { c as n } from "../../chunks/Card.module-Dh5vP2zv.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.2.0",
|
|
25
25
|
children: r
|
|
26
26
|
}
|
|
27
27
|
);
|
|
@@ -3,8 +3,8 @@ import { CardContentBody as C } from "./components/CardContentBody.js";
|
|
|
3
3
|
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
|
-
import { c as p } from "../../../../chunks/vendor-
|
|
7
|
-
import { c as r } from "../../../../chunks/Card.module-
|
|
6
|
+
import { c as p } from "../../../../chunks/vendor-CehxOAkM.js";
|
|
7
|
+
import { c as r } from "../../../../chunks/Card.module-Dh5vP2zv.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
|
-
import { c as d } from "../../../../../chunks/vendor-
|
|
3
|
-
import { c as s } from "../../../../../chunks/Card.module-
|
|
2
|
+
import { c as d } from "../../../../../chunks/vendor-CehxOAkM.js";
|
|
3
|
+
import { c as s } from "../../../../../chunks/Card.module-Dh5vP2zv.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
|
-
import { c as e } from "../../../../../chunks/vendor-
|
|
3
|
-
import { c as s } from "../../../../../chunks/Card.module-
|
|
2
|
+
import { c as e } from "../../../../../chunks/vendor-CehxOAkM.js";
|
|
3
|
+
import { c as s } from "../../../../../chunks/Card.module-Dh5vP2zv.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
|
-
import { c as o } from "../../../../../chunks/vendor-
|
|
3
|
-
import { c as d } from "../../../../../chunks/Card.module-
|
|
2
|
+
import { c as o } from "../../../../../chunks/vendor-CehxOAkM.js";
|
|
3
|
+
import { c as d } from "../../../../../chunks/Card.module-Dh5vP2zv.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
|
-
import { c as e } from "../../../chunks/vendor-
|
|
3
|
-
import { c as m } from "../../../chunks/Card.module-
|
|
2
|
+
import { c as e } from "../../../chunks/vendor-CehxOAkM.js";
|
|
3
|
+
import { c as m } from "../../../chunks/Card.module-Dh5vP2zv.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
|
@@ -0,0 +1,48 @@
|
|
|
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 n } from "react";
|
|
3
|
+
import { l as M, c as S } from "../../chunks/vendor-CehxOAkM.js";
|
|
4
|
+
import { scrollSmoothHorizontally as c } from "../../utils/scroll.js";
|
|
5
|
+
const R = "carouselExtended__ce719d09", k = {
|
|
6
|
+
carouselExtended: R
|
|
7
|
+
}, y = C.forwardRef(
|
|
8
|
+
({ children: l, buttonPrev: a, buttonNext: i, stepPrev: u, stepNext: f, ...h }, s) => {
|
|
9
|
+
const [o, m] = w({ hidden: !0, nextDisabled: !1, prevDisabled: !0 }), r = D(null), t = L(() => {
|
|
10
|
+
const e = r.current, d = {
|
|
11
|
+
hidden: e.scrollWidth == e.clientWidth,
|
|
12
|
+
nextDisabled: Math.round(e.scrollLeft) + e.offsetWidth >= e.scrollWidth,
|
|
13
|
+
prevDisabled: Math.round(e.scrollLeft) <= 0
|
|
14
|
+
};
|
|
15
|
+
M.isEqual(d, o) == !1 && m(d);
|
|
16
|
+
}, [o]);
|
|
17
|
+
n(() => (window.addEventListener("resize", t), document.addEventListener("scroll", t), () => {
|
|
18
|
+
window.removeEventListener("resize", t), document.removeEventListener("scroll", t);
|
|
19
|
+
}), [t]), n(() => {
|
|
20
|
+
t();
|
|
21
|
+
}, [l, t]);
|
|
22
|
+
const x = () => {
|
|
23
|
+
c(r.current, Math.floor(-u));
|
|
24
|
+
}, v = () => {
|
|
25
|
+
c(r.current, Math.ceil(f));
|
|
26
|
+
}, E = (e) => {
|
|
27
|
+
r.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ p("div", { ...h, children: [
|
|
30
|
+
a({
|
|
31
|
+
disabled: o.prevDisabled,
|
|
32
|
+
hidden: o.hidden,
|
|
33
|
+
onClick: x
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ b("div", { className: S(k.carouselExtended), onScroll: t, ref: E, children: l }),
|
|
36
|
+
i({
|
|
37
|
+
disabled: o.nextDisabled,
|
|
38
|
+
hidden: o.hidden,
|
|
39
|
+
onClick: v
|
|
40
|
+
})
|
|
41
|
+
] });
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
y.displayName = "CarouselExtended";
|
|
45
|
+
export {
|
|
46
|
+
y as CarouselExtended
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=CarouselExtended.js.map
|