@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,18 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
const l = e.createContext({
|
|
3
|
+
elements: {
|
|
4
|
+
body: null,
|
|
5
|
+
link: null,
|
|
6
|
+
closeButton: null,
|
|
7
|
+
mobileHeader: null,
|
|
8
|
+
target: null
|
|
9
|
+
},
|
|
10
|
+
setTooltipOpen: () => {
|
|
11
|
+
},
|
|
12
|
+
targetHoveredRef: { current: !1 },
|
|
13
|
+
tooltipOpen: !1
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
l as TooltipContext
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=TootlipContext.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import r from "react";
|
|
3
|
+
import { MobileView as s } from "../../../MobileView/MobileView.js";
|
|
4
|
+
import { Text as a } from "../../../Typography/Text.js";
|
|
5
|
+
import { ELineType as l, ETextSize as p } from "../../../Typography/enums.js";
|
|
6
|
+
import { c } from "../../../../chunks/vendor-CF2m175I.js";
|
|
7
|
+
import { s as f } from "../../../../chunks/TooltipDesktop.module-BRkBuup-.js";
|
|
8
|
+
const d = r.forwardRef(({ className: m, ...i }, t) => {
|
|
9
|
+
const e = c(f.tooltipBody, m);
|
|
10
|
+
return /* @__PURE__ */ o(s, { fallback: /* @__PURE__ */ o("div", { className: e, ...i, ref: t }), children: /* @__PURE__ */ o(a, { className: e, size: p.B3, line: l.NORMAL, tag: "div", ...i, ref: t }) });
|
|
11
|
+
});
|
|
12
|
+
d.displayName = "TooltipBody";
|
|
13
|
+
export {
|
|
14
|
+
d as TooltipBody
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=TooltipBody.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import { c as s } from "../../../../chunks/vendor-CF2m175I.js";
|
|
4
|
+
import { MobileView as a } from "../../../MobileView/MobileView.js";
|
|
5
|
+
const k = "tooltipLink__97250ef3", r = "desktop__d60bfd8c", c = "mobile__766c8fc7", o = {
|
|
6
|
+
tooltipLink: k,
|
|
7
|
+
desktop: r,
|
|
8
|
+
mobile: c
|
|
9
|
+
}, m = n.forwardRef(
|
|
10
|
+
({ children: i, className: e, ...l }, p) => /* @__PURE__ */ t(a, { fallback: /* @__PURE__ */ t(
|
|
11
|
+
"a",
|
|
12
|
+
{
|
|
13
|
+
className: s(o.tooltipLink, o.desktop, e),
|
|
14
|
+
...l,
|
|
15
|
+
"data-tx": "0.1.6",
|
|
16
|
+
ref: p,
|
|
17
|
+
children: i
|
|
18
|
+
}
|
|
19
|
+
), children: /* @__PURE__ */ t(
|
|
20
|
+
"a",
|
|
21
|
+
{
|
|
22
|
+
className: s(o.tooltipLink, o.mobile, e),
|
|
23
|
+
...l,
|
|
24
|
+
"data-tx": "0.1.6",
|
|
25
|
+
ref: p,
|
|
26
|
+
children: i
|
|
27
|
+
}
|
|
28
|
+
) })
|
|
29
|
+
);
|
|
30
|
+
m.displayName = "TooltipLink";
|
|
31
|
+
export {
|
|
32
|
+
m as TooltipLink
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=TooltipLink.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import r, { useContext as d } from "react";
|
|
2
|
+
import { TooltipContext as m } from "../../TootlipContext.js";
|
|
3
|
+
import { isKey as T } from "../../../../utils/keyboard.js";
|
|
4
|
+
const y = ({ children: c }) => {
|
|
5
|
+
const { toggleType: i, tooltipOpen: l, targetHoveredRef: n, setTooltipOpen: p } = d(m), o = r.Children.only(c), s = (t) => (e) => {
|
|
6
|
+
const f = e.code || e.keyCode;
|
|
7
|
+
T(f, "TAB") && l && p(!1), t == null || t(e);
|
|
8
|
+
}, a = (t) => (e) => {
|
|
9
|
+
(i === "click" || i === "hover" && !n.current && e.currentTarget.contains(e.target)) && p(!l), t == null || t(e);
|
|
10
|
+
};
|
|
11
|
+
return r.isValidElement(o) ? r.cloneElement(o, {
|
|
12
|
+
onClick: a(o.props.onClick),
|
|
13
|
+
onKeyDown: s(o.props.onKeyDown)
|
|
14
|
+
}) : o;
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
y as TooltipTarget
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=TooltipTarget.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as p } from "react";
|
|
3
|
+
import { CrossStrokeSrvIcon16 as n } from "@sberbusiness/icons-next";
|
|
4
|
+
import { TooltipContext as i } from "../../TootlipContext.js";
|
|
5
|
+
import { ButtonIcon as l } from "../../../Button/ButtonIcon.js";
|
|
6
|
+
import { s as f } from "../../../../chunks/TooltipDesktop.module-BRkBuup-.js";
|
|
7
|
+
const I = ({ onClick: t, ...r }) => {
|
|
8
|
+
const { setTooltipOpen: e } = p(i), s = (m) => {
|
|
9
|
+
e(!1), t == null || t(m);
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ o(l, { className: f.tooltipXButton, onClick: s, ...r, children: /* @__PURE__ */ o(n, { paletteIndex: 6 }) });
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
I as TooltipXButton
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=TooltipXButton.js.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var h = (n, s, e) => s in n ? l(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
3
|
+
var o = (n, s, e) => h(n, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
5
|
+
import u from "react";
|
|
6
|
+
import { TooltipDesktopBase as a } from "./components/TooltipDesktopBase.js";
|
|
7
|
+
import { TooltipContext as m } from "../../TootlipContext.js";
|
|
8
|
+
import { isKey as f } from "../../../../utils/keyboard.js";
|
|
9
|
+
class p extends u.Component {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
o(this, "tooltip", null);
|
|
13
|
+
o(this, "timeout");
|
|
14
|
+
o(this, "setTooltipRef", (e) => {
|
|
15
|
+
const { toggleType: t } = this.props;
|
|
16
|
+
e && t === "hover" && this.addHoverListeners(e), this.tooltip = e;
|
|
17
|
+
});
|
|
18
|
+
// Закрываем Tooltip при клике за его пределами.
|
|
19
|
+
o(this, "closeIfOuterAction", (e) => {
|
|
20
|
+
const { targetRef: t } = this.props, { setTooltipOpen: i } = this.context;
|
|
21
|
+
if (t.current && this.tooltip) {
|
|
22
|
+
const r = !t.current.contains(e.target), c = !this.tooltip.contains(e.target);
|
|
23
|
+
r && c && i(!1);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
// Закрываем Tooltip по нажатию Esc
|
|
27
|
+
o(this, "closeIfEscapeKey", (e) => {
|
|
28
|
+
const t = e.code || e.keyCode;
|
|
29
|
+
f(t, "ESCAPE") && this.context.setTooltipOpen(!1);
|
|
30
|
+
});
|
|
31
|
+
o(this, "addHoverListeners", (e) => {
|
|
32
|
+
e.addEventListener("mouseenter", this.handleMouseEnter), e.addEventListener("mouseleave", this.handleMouseLeave);
|
|
33
|
+
});
|
|
34
|
+
o(this, "removeHoverListeners", (e) => {
|
|
35
|
+
e.removeEventListener("mouseenter", this.handleMouseEnter), e.removeEventListener("mouseleave", this.handleMouseLeave);
|
|
36
|
+
});
|
|
37
|
+
o(this, "handleMouseEnter", () => {
|
|
38
|
+
const { tooltipOpen: e, targetHoveredRef: t, setTooltipOpen: i } = this.context;
|
|
39
|
+
e || (i(!0), t.current = !0), clearTimeout(this.timeout);
|
|
40
|
+
});
|
|
41
|
+
o(this, "handleMouseLeave", () => {
|
|
42
|
+
const { setTooltipOpen: e } = this.context;
|
|
43
|
+
this.timeout = window.setTimeout(() => {
|
|
44
|
+
e(!1);
|
|
45
|
+
}, 500);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
const { children: e, toggleType: t, ...i } = this.props;
|
|
50
|
+
return /* @__PURE__ */ d(a, { ...i, setTooltipRef: this.setTooltipRef });
|
|
51
|
+
}
|
|
52
|
+
componentDidMount() {
|
|
53
|
+
const { toggleType: e, targetRef: t } = this.props;
|
|
54
|
+
this.props.isOpen && (document.addEventListener("click", this.closeIfOuterAction), document.addEventListener("keydown", this.closeIfEscapeKey)), t.current && e === "hover" && this.addHoverListeners(t.current);
|
|
55
|
+
}
|
|
56
|
+
componentDidUpdate(e) {
|
|
57
|
+
const { targetRef: t } = this.props, i = !e.isOpen && this.props.isOpen, r = e.isOpen && !this.props.isOpen;
|
|
58
|
+
i && (document.addEventListener("mousedown", this.closeIfOuterAction), document.addEventListener("keydown", this.closeIfEscapeKey)), r && (document.removeEventListener("mousedown", this.closeIfOuterAction), document.removeEventListener("keydown", this.closeIfEscapeKey), this.props.toggleType === "hover" && this.removeHoverListeners(this.tooltip)), t.current && e.toggleType != this.props.toggleType && (this.props.toggleType === "hover" ? this.addHoverListeners(t.current) : e.toggleType === "hover" && this.removeHoverListeners(t.current));
|
|
59
|
+
}
|
|
60
|
+
componentWillUnmount() {
|
|
61
|
+
const { toggleType: e, targetRef: t } = this.props;
|
|
62
|
+
document.removeEventListener("mousedown", this.closeIfOuterAction), document.removeEventListener("keydown", this.closeIfEscapeKey), t.current && e === "hover" && this.removeHoverListeners(t.current), clearTimeout(this.timeout);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
o(p, "displayName", "TooltipDesktop"), o(p, "contextType", m);
|
|
66
|
+
export {
|
|
67
|
+
p as TooltipDesktop
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=TooltipDesktop.js.map
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var H = (p, a, i) => a in p ? _(p, a, { enumerable: !0, configurable: !0, writable: !0, value: i }) : p[a] = i;
|
|
3
|
+
var t = (p, a, i) => H(p, typeof a != "symbol" ? a + "" : a, i);
|
|
4
|
+
import { jsxs as S, Fragment as P, jsx as x } from "react/jsx-runtime";
|
|
5
|
+
import O from "react";
|
|
6
|
+
import { i as M, c as $ } from "../../../../../chunks/vendor-CF2m175I.js";
|
|
7
|
+
import { TooltipContext as X } from "../../../TootlipContext.js";
|
|
8
|
+
import { Portal as Y } from "../../../../Portal/Portal.js";
|
|
9
|
+
import { ETooltipPreferPlace as u, ETooltipDirection as B, ETooltipAlign as z, ETooltipFlowTypes as I, ETooltipSizeParameter as r, ETooltipTypeName as C, ETooltipEndCoordinates as N, ETooltipStartCoordinates as R, ETooltipAxesType as G, ETooltipSize as U } from "../../../enums.js";
|
|
10
|
+
import { TooltipDesktopTip as V } from "./TooltipDesktopTip.js";
|
|
11
|
+
import { pickZone as j, axes as q, calcRelPos as K, centerOfBoundsFromBounds as Z, calcBounds as L, equalCoords as J } from "../../../utils/Positioning.js";
|
|
12
|
+
import { s as f } from "../../../../../chunks/TooltipDesktop.module-BRkBuup-.js";
|
|
13
|
+
const Q = {
|
|
14
|
+
column: "translateX",
|
|
15
|
+
row: "translateY"
|
|
16
|
+
}, b = {
|
|
17
|
+
column: "translateY",
|
|
18
|
+
row: "translateX"
|
|
19
|
+
}, tt = {
|
|
20
|
+
[u.ABOVE]: B.DOWN,
|
|
21
|
+
[u.BELOW]: B.UP,
|
|
22
|
+
[u.LEFT]: B.RIGHT,
|
|
23
|
+
[u.RIGHT]: B.LEFT
|
|
24
|
+
}, ot = 200, st = 500, v = 2, n = 8, h = 16;
|
|
25
|
+
class W extends O.Component {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
t(this, "zone", {
|
|
29
|
+
[C.FLOW]: I.COLUMN,
|
|
30
|
+
[C.STANDING]: u.ABOVE,
|
|
31
|
+
[C.SIDE]: z.CENTER,
|
|
32
|
+
cutOff: 0,
|
|
33
|
+
order: 0,
|
|
34
|
+
[r.H]: 0,
|
|
35
|
+
[r.W]: 0
|
|
36
|
+
});
|
|
37
|
+
t(this, "tooltipBodySize", {
|
|
38
|
+
[r.H]: 0,
|
|
39
|
+
[r.W]: 0
|
|
40
|
+
});
|
|
41
|
+
t(this, "targetBounds", {
|
|
42
|
+
[R.X]: 0,
|
|
43
|
+
[N.X]: 0,
|
|
44
|
+
[R.Y]: 0,
|
|
45
|
+
[N.Y]: 0,
|
|
46
|
+
[r.H]: 0,
|
|
47
|
+
[r.W]: 0
|
|
48
|
+
});
|
|
49
|
+
t(this, "windowBounds", {
|
|
50
|
+
[R.X]: 0,
|
|
51
|
+
[N.X]: 0,
|
|
52
|
+
[R.Y]: 0,
|
|
53
|
+
[N.Y]: 0,
|
|
54
|
+
[r.H]: 0,
|
|
55
|
+
[r.W]: 0
|
|
56
|
+
});
|
|
57
|
+
t(this, "bodyRef", O.createRef());
|
|
58
|
+
t(this, "tipRef", O.createRef());
|
|
59
|
+
t(this, "tipEl", null);
|
|
60
|
+
t(this, "bodyEl", null);
|
|
61
|
+
t(this, "tooltipNode", null);
|
|
62
|
+
t(this, "hasTracked", !1);
|
|
63
|
+
t(this, "exitingAnimationTimer1", null);
|
|
64
|
+
t(this, "exitingAnimationTimer2", null);
|
|
65
|
+
t(this, "checkLayoutInterval", null);
|
|
66
|
+
t(this, "state", {
|
|
67
|
+
exiting: !1,
|
|
68
|
+
// для отслеживания того что анимация при закрытии тултипа в прогрессе.
|
|
69
|
+
isOpen: this.props.isOpen,
|
|
70
|
+
// для отслеживания открыт/закрыт ли tooltip.
|
|
71
|
+
needRenderTooltip: this.props.isOpen,
|
|
72
|
+
// нужно рендерить тултип или нет, признак анимационно зависимого рендериннга открыт/закрыт ли tooltip
|
|
73
|
+
standing: u.ABOVE
|
|
74
|
+
});
|
|
75
|
+
// Открыть поповер
|
|
76
|
+
t(this, "prepareOpen", () => {
|
|
77
|
+
this.state.exiting && this.animateExitStop(), this.setState({ isOpen: !0, needRenderTooltip: !0 });
|
|
78
|
+
});
|
|
79
|
+
// Закрыть поповер
|
|
80
|
+
t(this, "close", () => {
|
|
81
|
+
this.setState({ isOpen: !1 });
|
|
82
|
+
});
|
|
83
|
+
// Метод начала отслеживания поповера и анимация его появления
|
|
84
|
+
t(this, "enter", () => {
|
|
85
|
+
this.trackTooltip(), this.animateEnter(), this.props.onShow && this.tooltipNode && this.props.onShow(this.tooltipNode);
|
|
86
|
+
});
|
|
87
|
+
// Метод окончания отслеживания поповера и анимация его исчезновения
|
|
88
|
+
t(this, "exit", () => {
|
|
89
|
+
this.animateExit(), this.untrackTooltip();
|
|
90
|
+
});
|
|
91
|
+
t(this, "setTooltipNode", (i) => {
|
|
92
|
+
const { setTooltipRef: s } = this.props;
|
|
93
|
+
i && (this.bodyEl = this.bodyRef.current, this.tipEl = this.tipRef.current), this.tooltipNode = i, s == null || s(this.tooltipNode);
|
|
94
|
+
});
|
|
95
|
+
// Рендер поповера
|
|
96
|
+
t(this, "resolveTooltipLayout", () => {
|
|
97
|
+
if (!this.tooltipNode)
|
|
98
|
+
return;
|
|
99
|
+
const { alignTip: i } = this.props, s = j(
|
|
100
|
+
this.props.preferPlace,
|
|
101
|
+
this.windowBounds,
|
|
102
|
+
this.targetBounds,
|
|
103
|
+
n,
|
|
104
|
+
h,
|
|
105
|
+
{
|
|
106
|
+
h: this.tooltipBodySize.h + n,
|
|
107
|
+
w: this.tooltipBodySize.w + n
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
this.zone = s, this.setState({
|
|
111
|
+
standing: s.standing
|
|
112
|
+
});
|
|
113
|
+
const o = q[s.flow], l = { ...this.tooltipBodySize };
|
|
114
|
+
l[s.flow === I.ROW ? r.W : r.H] += n;
|
|
115
|
+
const e = K(s, this.targetBounds, l);
|
|
116
|
+
e[o.main.start] += v * s.order;
|
|
117
|
+
let T = 0;
|
|
118
|
+
this.bodyEl && (T = Math.round(+getComputedStyle(this.bodyEl).borderRadius.slice(0, -2)) || 0);
|
|
119
|
+
const d = n + v, m = T * 2 + n * 2 + d, k = this.windowBounds[o.cross.start], A = this.windowBounds[o.cross.end], w = this.windowBounds[o.cross.size], c = w - d * 2, y = k + d, g = A - d, D = e[o.cross.start], F = e[o.cross.end];
|
|
120
|
+
i === z.START ? e[o.cross.start] = this.targetBounds[o.cross.end] - h - n - this.targetBounds[o.cross.size] / 2 : i === z.END ? e[o.cross.start] = this.targetBounds[o.cross.start] - l[o.cross.size] + h + n + this.targetBounds[o.cross.size] / 2 : e.crossLength > w ? e[o.cross.start] = 0 : this.targetBounds[o.cross.end] < m ? e[o.cross.start] = this.targetBounds[o.cross.end] - m : this.targetBounds[o.cross.start] > g ? e[o.cross.start] = this.targetBounds[o.cross.start] - l[o.cross.size] : e.crossLength > c ? e[o.cross.start] = (w - e.crossLength) / 2 : D < y ? e[o.cross.start] = y : F > g && (e[o.cross.start] = e[o.cross.start] - (e[o.cross.end] - g)), this.tooltipNode.style.flexFlow = s.flow, this.bodyEl && (this.bodyEl.style.order = s.order.toString()), this.tooltipNode.style.top = `${e.y}px`, this.tooltipNode.style.left = `${e.x}px`;
|
|
121
|
+
let E = Z(s.flow, G.CROSS, this.targetBounds, e) - n;
|
|
122
|
+
E < h ? E = h : E > e.crossLength - h - n * 2 && (E = e.crossLength - h - n * 2), this.tipEl && (this.tipEl.style.transform = `${Q[s.flow]}(${E}px)`, this.tipEl.style.borderWidth = `${n}px`);
|
|
123
|
+
});
|
|
124
|
+
// Метод проверки изменения границ обернутого элемента.
|
|
125
|
+
t(this, "setAndCheckResizeTargetBounds", () => {
|
|
126
|
+
const { targetRef: i } = this.props;
|
|
127
|
+
if (!i.current)
|
|
128
|
+
return !1;
|
|
129
|
+
const s = L(i.current);
|
|
130
|
+
return this.targetBounds && J(this.targetBounds, s) ? !1 : (this.targetBounds = s, !0);
|
|
131
|
+
});
|
|
132
|
+
// Метод проверки необходимости перерисовки лейаута
|
|
133
|
+
t(this, "checkTargetReposition", () => {
|
|
134
|
+
this.setAndCheckResizeTargetBounds() && this.resolveTooltipLayout();
|
|
135
|
+
});
|
|
136
|
+
// Метод измерения размеров тела тултипа (без стрелочки)
|
|
137
|
+
t(this, "setTooltipBodySize", () => {
|
|
138
|
+
this.bodyEl && (this.tooltipBodySize = { w: this.bodyEl.offsetWidth, h: this.bodyEl.offsetHeight });
|
|
139
|
+
});
|
|
140
|
+
// Очистка таймеров анимации исчезновения
|
|
141
|
+
t(this, "animateExitStop", () => {
|
|
142
|
+
this.exitingAnimationTimer1 && window.clearTimeout(this.exitingAnimationTimer1), this.exitingAnimationTimer2 && window.clearTimeout(this.exitingAnimationTimer2), this.setState({ exiting: !1 });
|
|
143
|
+
});
|
|
144
|
+
// Анимация исчезновения
|
|
145
|
+
t(this, "animateExit", () => {
|
|
146
|
+
this.setState({ exiting: !0 }), this.exitingAnimationTimer2 = window.setTimeout(() => {
|
|
147
|
+
window.setTimeout(() => {
|
|
148
|
+
this.tooltipNode && (this.tooltipNode.style.transform = `${b[this.zone.flow]}(${this.zone.order * 50}px)`, this.tooltipNode.style.opacity = "0");
|
|
149
|
+
}, 0);
|
|
150
|
+
}, 0), this.exitingAnimationTimer1 = window.setTimeout(() => {
|
|
151
|
+
this.setState({ exiting: !1, needRenderTooltip: !1 });
|
|
152
|
+
}, st);
|
|
153
|
+
});
|
|
154
|
+
// Анимация появления
|
|
155
|
+
t(this, "animateEnter", () => {
|
|
156
|
+
this.tooltipNode && (this.tooltipNode.style.transform = `${b[this.zone.flow]}(${this.zone.order * 50}px)`, this.tooltipNode.style.opacity = "0", this.tooltipNode.offsetHeight, this.tipEl && (this.tipEl.style.transition = "transform 150ms ease-in"), this.tooltipNode.style.transitionProperty = "opacity, transform", this.tooltipNode.style.transitionDuration = "500ms", this.tooltipNode.style.transitionTimingFunction = "cubic-bezier(0.230, 1.000, 0.320, 1.000)", this.tooltipNode.style.opacity = "1", this.tooltipNode.style.transform = "translateY(0)");
|
|
157
|
+
});
|
|
158
|
+
// Отслеживание поповера
|
|
159
|
+
t(this, "trackTooltip", () => {
|
|
160
|
+
this.tooltipNode && (this.hasTracked = !0, this.checkLayoutInterval = window.setInterval(this.checkTargetReposition, ot), window.addEventListener("scroll", this.onWindowScroll), window.addEventListener("resize", this.onWindowResize), this.windowBounds = L(window), this.setTooltipBodySize(), this.setAndCheckResizeTargetBounds(), this.resolveTooltipLayout());
|
|
161
|
+
});
|
|
162
|
+
// Отписка от отслеживания поповера
|
|
163
|
+
t(this, "untrackTooltip", () => {
|
|
164
|
+
this.tooltipNode && (this.checkLayoutInterval && window.clearInterval(this.checkLayoutInterval), window.removeEventListener("scroll", this.onWindowScroll), window.removeEventListener("resize", this.onWindowResize), this.hasTracked = !1);
|
|
165
|
+
});
|
|
166
|
+
// Перерисовка при скролле "рамки"
|
|
167
|
+
t(this, "onWindowScroll", () => {
|
|
168
|
+
this.setAndCheckResizeTargetBounds(), this.resolveTooltipLayout();
|
|
169
|
+
});
|
|
170
|
+
// Перерисовка при изменении размеров "рамки"
|
|
171
|
+
t(this, "onWindowResize", () => {
|
|
172
|
+
this.windowBounds = L(window), this.resolveTooltipLayout();
|
|
173
|
+
});
|
|
174
|
+
// Отрисовка самого Tooltip
|
|
175
|
+
t(this, "tooltipRender", () => {
|
|
176
|
+
const {
|
|
177
|
+
className: i,
|
|
178
|
+
size: s,
|
|
179
|
+
preferPlace: o,
|
|
180
|
+
alignTip: l,
|
|
181
|
+
isOpen: e,
|
|
182
|
+
renderContainer: T,
|
|
183
|
+
onShow: d,
|
|
184
|
+
setTooltipRef: m,
|
|
185
|
+
onKeyDown: k,
|
|
186
|
+
targetRef: A,
|
|
187
|
+
...w
|
|
188
|
+
} = this.props, { elements: c } = this.context, y = s === U.SM ? f.tooltipSM : f.tooltipLG, g = $(
|
|
189
|
+
f.tooltipDesktop,
|
|
190
|
+
y,
|
|
191
|
+
{ [f.closable]: !!c.closeButton },
|
|
192
|
+
i
|
|
193
|
+
);
|
|
194
|
+
return /* @__PURE__ */ x("div", { className: f.tooltipOverlay, children: /* @__PURE__ */ S("div", { className: g, ...w, ref: this.setTooltipNode, children: [
|
|
195
|
+
/* @__PURE__ */ S("div", { className: f.tooltipDesktopContent, ref: this.bodyRef, children: [
|
|
196
|
+
c.body,
|
|
197
|
+
c.link,
|
|
198
|
+
c.closeButton
|
|
199
|
+
] }),
|
|
200
|
+
/* @__PURE__ */ x(V, { direction: tt[this.state.standing], ref: this.tipRef })
|
|
201
|
+
] }) });
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
render() {
|
|
205
|
+
const { renderContainer: i } = this.props, { needRenderTooltip: s } = this.state, { elements: o } = this.context;
|
|
206
|
+
return /* @__PURE__ */ S(P, { children: [
|
|
207
|
+
o.target,
|
|
208
|
+
s && /* @__PURE__ */ x(Y, { container: i ?? document.body, children: this.tooltipRender() })
|
|
209
|
+
] });
|
|
210
|
+
}
|
|
211
|
+
componentDidMount() {
|
|
212
|
+
this.props.isOpen && this.enter();
|
|
213
|
+
}
|
|
214
|
+
componentDidUpdate(i, s) {
|
|
215
|
+
const o = this.props, l = this.state, e = !i.isOpen && o.isOpen, T = i.isOpen && !o.isOpen;
|
|
216
|
+
if (e) {
|
|
217
|
+
this.prepareOpen();
|
|
218
|
+
return;
|
|
219
|
+
} else if (T) {
|
|
220
|
+
this.close();
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const d = !s.isOpen && l.isOpen, m = s.isOpen && !l.isOpen;
|
|
224
|
+
if (d) {
|
|
225
|
+
this.enter();
|
|
226
|
+
return;
|
|
227
|
+
} else if (m) {
|
|
228
|
+
this.exit();
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
l.isOpen && !M(i.children, o.children) && (this.setTooltipBodySize(), this.setAndCheckResizeTargetBounds(), this.resolveTooltipLayout());
|
|
232
|
+
}
|
|
233
|
+
componentWillUnmount() {
|
|
234
|
+
this.animateExitStop(), this.hasTracked && this.untrackTooltip();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
t(W, "displayName", "TooltipBase"), t(W, "contextType", X);
|
|
238
|
+
export {
|
|
239
|
+
W as TooltipDesktopBase
|
|
240
|
+
};
|
|
241
|
+
//# sourceMappingURL=TooltipDesktopBase.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
3
|
+
import { ETooltipDirection as e } from "../../../enums.js";
|
|
4
|
+
import { c } from "../../../../../chunks/vendor-CF2m175I.js";
|
|
5
|
+
import { s as t } from "../../../../../chunks/TooltipDesktop.module-BRkBuup-.js";
|
|
6
|
+
const l = p.forwardRef((r, i) => {
|
|
7
|
+
const { direction: s } = r;
|
|
8
|
+
let o;
|
|
9
|
+
switch (s) {
|
|
10
|
+
case e.UP:
|
|
11
|
+
o = t.up;
|
|
12
|
+
break;
|
|
13
|
+
case e.DOWN:
|
|
14
|
+
o = t.down;
|
|
15
|
+
break;
|
|
16
|
+
case e.LEFT:
|
|
17
|
+
o = t.left;
|
|
18
|
+
break;
|
|
19
|
+
case e.RIGHT:
|
|
20
|
+
o = t.right;
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
return /* @__PURE__ */ a("div", { className: c(t.tooltipDesktopTip, o), ref: i });
|
|
24
|
+
});
|
|
25
|
+
l.displayName = "TooltipDesktopTip";
|
|
26
|
+
export {
|
|
27
|
+
l as TooltipDesktopTip
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=TooltipDesktopTip.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as l, Fragment as b, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as f, useRef as u, useEffect as M } from "react";
|
|
3
|
+
import { TooltipContext as C } from "../../TootlipContext.js";
|
|
4
|
+
import { Portal as x } from "../../../Portal/Portal.js";
|
|
5
|
+
import { DropdownMobile as _ } from "../../../Dropdown/mobile/DropdownMobile.js";
|
|
6
|
+
import { DropdownMobileBody as h } from "../../../Dropdown/mobile/DropdownMobileBody.js";
|
|
7
|
+
import { TooltipMobileCloseButton as y } from "./components/TooltipMobileCloseButton.js";
|
|
8
|
+
import { c as B } from "../../../../chunks/vendor-CF2m175I.js";
|
|
9
|
+
const T = "tooltipMobile__47897569", g = "tooltipMobileContent__d269bb2b", H = "headerless__2937d68e", r = {
|
|
10
|
+
tooltipMobile: T,
|
|
11
|
+
tooltipMobileContent: g,
|
|
12
|
+
headerless: H
|
|
13
|
+
}, z = ({
|
|
14
|
+
children: N,
|
|
15
|
+
className: d,
|
|
16
|
+
renderContainer: R,
|
|
17
|
+
targetRef: j,
|
|
18
|
+
disableAdaptiveMode: D,
|
|
19
|
+
isOpen: o,
|
|
20
|
+
onShow: t,
|
|
21
|
+
...p
|
|
22
|
+
}) => {
|
|
23
|
+
const { elements: e, setTooltipOpen: m } = f(C), i = u(null), c = B(r.tooltipMobile, { [r.headerless]: e.mobileHeader === null }, d);
|
|
24
|
+
M(() => {
|
|
25
|
+
o && (t == null || t(i.current));
|
|
26
|
+
}, [o]);
|
|
27
|
+
const a = () => {
|
|
28
|
+
var n;
|
|
29
|
+
return /* @__PURE__ */ s(y, { ...(n = e.closeButton) == null ? void 0 : n.props });
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ l(b, { children: [
|
|
32
|
+
e.target,
|
|
33
|
+
/* @__PURE__ */ s(x, { container: document.body, children: /* @__PURE__ */ l(
|
|
34
|
+
_,
|
|
35
|
+
{
|
|
36
|
+
className: c,
|
|
37
|
+
tabIndex: -1,
|
|
38
|
+
opened: o,
|
|
39
|
+
setOpened: m,
|
|
40
|
+
...p,
|
|
41
|
+
ref: i,
|
|
42
|
+
children: [
|
|
43
|
+
e.mobileHeader,
|
|
44
|
+
/* @__PURE__ */ l(h, { className: r.tooltipMobileContent, children: [
|
|
45
|
+
e.body,
|
|
46
|
+
e.link,
|
|
47
|
+
e.mobileHeader === null && a()
|
|
48
|
+
] })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
) })
|
|
52
|
+
] });
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
z as TooltipMobile
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=TooltipMobile.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as l } from "react";
|
|
3
|
+
import { DropdownMobileClose as s } from "../../../../Dropdown/mobile/DropdownMobileClose.js";
|
|
4
|
+
import { TooltipContext as i } from "../../../TootlipContext.js";
|
|
5
|
+
const d = ({ onClick: o, ...t }) => {
|
|
6
|
+
const { setTooltipOpen: e } = l(i);
|
|
7
|
+
return /* @__PURE__ */ p(s, { onClick: (r) => {
|
|
8
|
+
e(!1), o == null || o(r);
|
|
9
|
+
}, ...t });
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
d as TooltipMobileCloseButton
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=TooltipMobileCloseButton.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as n } from "react";
|
|
3
|
+
import { DropdownMobileHeader as p } from "../../../../Dropdown/mobile/DropdownMobileHeader.js";
|
|
4
|
+
import { TooltipContext as m } from "../../../TootlipContext.js";
|
|
5
|
+
import { TooltipMobileCloseButton as l } from "./TooltipMobileCloseButton.js";
|
|
6
|
+
import { Text as s } from "../../../../Typography/Text.js";
|
|
7
|
+
import { EFontType as d, ETextSize as f } from "../../../../Typography/enums.js";
|
|
8
|
+
const b = ({ children: e, ...r }) => {
|
|
9
|
+
const { elements: i } = n(m);
|
|
10
|
+
return /* @__PURE__ */ o(p, { closeButton: () => {
|
|
11
|
+
var t;
|
|
12
|
+
return /* @__PURE__ */ o(l, { ...(t = i.closeButton) == null ? void 0 : t.props });
|
|
13
|
+
}, ...r, children: /* @__PURE__ */ o(s, { size: f.B3, type: d.PRIMARY, tag: "div", children: e }) });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
b as TooltipMobileHeader
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=TooltipMobileHeader.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var u = /* @__PURE__ */ ((r) => (r.H = "h", r.W = "w", r))(u || {}), v = /* @__PURE__ */ ((r) => (r.X = "x", r.Y = "y", r))(v || {}), n = /* @__PURE__ */ ((r) => (r.X = "x2", r.Y = "y2", r))(n || {}), O = /* @__PURE__ */ ((r) => (r.MAIN = "main", r.CROSS = "cross", r))(O || {}), L = /* @__PURE__ */ ((r) => (r.COLUMN = "column", r.ROW = "row", r))(L || {}), R = /* @__PURE__ */ ((r) => (r.SIDE = "side", r.STANDING = "standing", r.FLOW = "flow", r))(R || {}), I = /* @__PURE__ */ ((r) => (r.ABOVE = "above", r.BELOW = "below", r.RIGHT = "right", r.LEFT = "left", r))(I || {}), N = /* @__PURE__ */ ((r) => (r.END = "end", r.CENTER = "center", r.START = "start", r))(N || {}), W = /* @__PURE__ */ ((r) => (r.UP = "up", r.DOWN = "down", r.LEFT = "left", r.RIGHT = "right", r))(W || {}), a = /* @__PURE__ */ ((r) => (r.SM = "sm", r.LG = "lg", r))(a || {});
|
|
2
|
+
export {
|
|
3
|
+
N as ETooltipAlign,
|
|
4
|
+
O as ETooltipAxesType,
|
|
5
|
+
W as ETooltipDirection,
|
|
6
|
+
n as ETooltipEndCoordinates,
|
|
7
|
+
L as ETooltipFlowTypes,
|
|
8
|
+
I as ETooltipPreferPlace,
|
|
9
|
+
a as ETooltipSize,
|
|
10
|
+
u as ETooltipSizeParameter,
|
|
11
|
+
v as ETooltipStartCoordinates,
|
|
12
|
+
R as ETooltipTypeName
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=enums.js.map
|