@sberbusiness/triplex-next 0.1.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/AlertProcessSpoiler-Dp7FRT9y.js +39 -0
- package/chunks/Card.module-Ddt7TQ9Z.js +17 -0
- package/chunks/DropdownListItem-y6Rvj_dd.js +56 -0
- package/chunks/DropdownMobile.module-DrQkghxs.js +19 -0
- package/chunks/Footer.module-CKfl241m.js +11 -0
- package/chunks/FormFieldInput-apk1b0w6.js +63 -0
- package/chunks/HeaderLayoutSidebar.module-DTXnksBK.js +9 -0
- package/chunks/HeaderTabs.module-DVh6MotJ.js +9 -0
- package/chunks/HeaderTitle.module-DOeVL9zC.js +9 -0
- package/chunks/{ListItemControlsButton-BtMEMrGK.js → ListItemControlsButton-Cn3Vmrsn.js} +8 -8
- package/chunks/ListItemTail.module-BnbT61OM.js +12 -0
- package/chunks/ListMasterFooter.module-C6QFamKQ.js +10 -0
- package/chunks/Overlay.module-BTSQ5G6t.js +18 -0
- package/chunks/Page.module-DfMBQJob.js +16 -0
- package/chunks/TabsExtended.module-okOlTNQG.js +13 -0
- package/chunks/{TabsExtendedUtils-BOHZcNx8.js → TabsExtendedUtils-NCwWiX7O.js} +6 -6
- package/chunks/TooltipDesktop.module-DTbnIWo1.js +19 -0
- package/chunks/UploadZoneInput-R9729LZY.js +33 -0
- package/chunks/utils-B0khB-Lq.js +36 -0
- package/chunks/{vendor-CF2m175I.js → vendor-D-uL_icH.js} +38 -34
- package/components/Alert/AlertContext/AlertContext.js +10 -10
- package/components/Alert/AlertProcess/AlertProcess.js +3 -3
- package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +2 -2
- package/components/Body/Body.js +6 -6
- package/components/Button/Button.js +95 -10
- package/components/Button/ButtonBase.js +1 -1
- package/components/Button/ButtonDropdown.js +184 -23
- package/components/Button/ButtonDropdownExtended.js +50 -6
- package/components/Button/ButtonIcon.js +2 -2
- package/components/Button/enums.js +5 -4
- package/components/Button/index.js +14 -12
- package/components/Card/CardAction.js +26 -26
- package/components/Card/CardStatic.js +3 -3
- package/components/Card/components/CardContent/CardContent.js +2 -2
- package/components/Card/components/CardContent/components/CardContentBody.js +2 -2
- package/components/Card/components/CardContent/components/CardContentFooter.js +2 -2
- package/components/Card/components/CardContent/components/CardContentHeader.js +2 -2
- package/components/Card/components/CardMedia.js +2 -2
- package/components/Card/utils.js +1 -1
- package/components/Checkbox/Checkbox.js +7 -7
- package/components/Checkbox/CheckboxXGroup.js +11 -11
- package/components/Checkbox/CheckboxYGroup.js +2 -2
- package/components/Col/Col.js +146 -146
- package/components/DesignTokens/DesignTokenUtils.js +2 -2
- package/components/DesignTokens/DesignTokensComponents.js +9 -7
- package/components/DesignTokens/DesignTokensComponentsThemeDark.js +15 -13
- package/components/DesignTokens/components/Button.js +27 -0
- package/components/DesignTokens/components/FormField.js +22 -4
- package/components/DesignTokens/components/Island.js +26 -0
- package/components/DesignTokens/components/index.js +17 -14
- package/components/Dropdown/Dropdown.js +22 -7
- package/components/Dropdown/desktop/DropdownDesktop.js +94 -18
- package/components/Dropdown/desktop/DropdownList.js +65 -94
- package/components/Dropdown/desktop/DropdownListItem.js +2 -2
- package/components/Dropdown/index.js +27 -25
- package/components/Dropdown/mobile/DropdownMobile.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileBody.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileClose.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileFooter.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileHeader.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInner.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileInput.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileList.js +2 -2
- package/components/Dropdown/mobile/DropdownMobileListItem.js +2 -2
- package/components/Footer/Footer.js +3 -3
- package/components/Footer/components/FooterDescription.js +2 -2
- package/components/Footer/components/FooterDescriptionContent.js +2 -2
- package/components/Footer/components/FooterDescriptionControls.js +2 -2
- package/components/FormField/FormField.js +53 -52
- package/components/FormField/FormFieldContext.js +8 -8
- package/components/FormField/components/FormFieldClear.js +13 -12
- package/components/FormField/components/FormFieldCounter.js +5 -5
- package/components/FormField/components/FormFieldDescription.js +5 -5
- package/components/FormField/components/FormFieldInput.js +4 -3
- package/components/FormField/components/FormFieldLabel.js +32 -31
- package/components/FormField/components/FormFieldMaskedInput.js +102 -92
- package/components/FormField/components/FormFieldPostfix.js +7 -7
- package/components/FormField/components/FormFieldPrefix.js +5 -5
- package/components/FormField/components/FormFieldTarget.js +49 -0
- package/components/FormField/components/FormFieldTextarea.js +25 -24
- package/components/FormField/enums.js +3 -2
- package/components/FormField/index.js +19 -16
- package/components/FormField/types.js +2 -0
- package/components/Header/Header.js +11 -11
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js +2 -2
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js +2 -2
- package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js +2 -2
- package/components/Header/components/HeaderSubheader/HeaderSubheader.js +6 -6
- package/components/Header/components/HeaderTabs/HeaderTabs.js +2 -2
- package/components/Header/components/HeaderTabs/HeaderTabsContent.js +2 -2
- package/components/Header/components/HeaderTabs/HeaderTabsControls.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitle.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitleContent.js +2 -2
- package/components/Header/components/HeaderTitle/HeaderTitleControls.js +2 -2
- package/components/Island/Island.js +78 -0
- package/components/Island/components/IslandBody.js +10 -0
- package/components/Island/components/IslandFooter.js +10 -0
- package/components/Island/components/IslandHeader.js +10 -0
- package/components/Island/enums.js +7 -0
- package/components/Island/index.js +9 -0
- package/components/KeyDownListener/ComposedKeyDownListener.js +13 -0
- package/components/KeyDownListener/KeyDownListener.js +27 -0
- package/components/KeyDownListener/index.js +7 -0
- package/components/Link/Link.js +27 -27
- package/components/List/List.js +3 -3
- package/components/List/ListSortable.js +1 -1
- package/components/List/components/ListEmptyState.js +6 -6
- package/components/List/components/ListItem.js +1 -1
- package/components/List/components/ListItemContent.js +7 -7
- package/components/List/components/ListItemControls.js +7 -7
- package/components/List/components/ListItemControlsButton.js +2 -2
- package/components/List/components/ListItemControlsButtonDropdown.js +98 -15
- package/components/List/components/ListItemLoading.js +2 -2
- package/components/List/components/ListItemSelectable.js +9 -9
- package/components/List/components/ListItemTable.js +29 -19
- package/components/List/components/ListItemTailLeft.js +2 -2
- package/components/List/components/ListItemTailRight.js +2 -2
- package/components/List/components/ListSortableItem.js +37 -18
- package/components/List/components/ListSortableItemControls.js +2 -2
- package/components/List/components/ListSortableItemTarget.js +6 -6
- package/components/List/index.js +22 -20
- package/components/ListMaster/ListMaster.js +1 -1
- package/components/ListMaster/components/ListMasterBody.js +1 -1
- package/components/ListMaster/components/ListMasterChipGroup.js +5 -5
- package/components/ListMaster/components/ListMasterFooter.js +2 -2
- package/components/ListMaster/components/ListMasterFooterControls.js +2 -2
- package/components/ListMaster/components/ListMasterFooterDescription.js +2 -2
- package/components/ListMaster/components/ListMasterHeader.js +7 -7
- package/components/ListMaster/components/SelectionControls.js +3 -3
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +7 -7
- package/components/Loader/LoaderSmall/LoaderSmall.js +16 -16
- package/components/LoaderWidget/LoaderWidget.js +9 -9
- package/components/Overlay/Overlay.js +2 -2
- package/components/Overlay/OverlayMask.js +2 -2
- package/components/Overlay/OverlayPanel.js +2 -2
- package/components/Page/Page.js +2 -2
- package/components/Page/components/BodyPage.js +2 -2
- package/components/Page/components/FooterPage.js +2 -2
- package/components/Page/components/HeaderPage.js +2 -2
- package/components/Pagination/components/PaginationExtended.js +3 -3
- package/components/Pagination/components/PaginationNavigationButton.js +6 -6
- package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
- package/components/Pagination/components/PaginationPageButton.js +6 -6
- package/components/Pagination/components/PaginationPageEllipsis.js +2 -2
- package/components/Pagination/components/PaginationSelect.js +12 -12
- package/components/Pagination/utils/paginationUtils.js +10 -10
- package/components/Radio/Radio.js +3 -3
- package/components/Radio/RadioXGroup.js +10 -10
- package/components/Radio/RadioYGroup.js +9 -9
- package/components/Row/Row.js +10 -10
- package/components/SegmentedControl/SegmentedControl.js +64 -7
- package/components/SegmentedControl/SegmentedControlContext.js +13 -0
- package/components/SegmentedControl/SegmentedControlSegment.js +68 -8
- package/components/SegmentedControl/index.js +6 -6
- package/components/SelectExtendedField/SelectExtendedField.js +57 -0
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +25 -0
- package/components/SelectExtendedField/components/SelectExtendedFieldDropdownDefault.js +86 -0
- package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +101 -0
- package/components/SelectExtendedField/index.js +9 -0
- package/components/Skeleton/Skeleton.js +10 -10
- package/components/SwipeableArea/SwipeableArea.js +13 -13
- package/components/TabsExtended/TabsExtended.js +7 -7
- package/components/TabsExtended/TabsExtendedUtils.js +1 -1
- package/components/TabsExtended/components/TabsExtendedContent.js +11 -11
- package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTab.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTabButton.js +2 -2
- package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +7 -7
- package/components/TabsExtended/types.js +2 -0
- package/components/TextField/MaskedField.js +6 -89
- package/components/TextField/TextField.js +6 -89
- package/components/TextField/TextFieldBase.js +30 -89
- package/components/TextField/index.js +4 -3
- package/components/ThemeProvider/ThemeProvider.js +8 -8
- package/components/ThemeProvider/components/ThemeProviderView.js +8 -8
- package/components/Tooltip/components/common/TooltipBody.js +7 -7
- package/components/Tooltip/components/common/TooltipLink.js +10 -10
- package/components/Tooltip/components/common/TooltipXButton.js +1 -1
- package/components/Tooltip/components/desktop/components/TooltipDesktopBase.js +2 -2
- package/components/Tooltip/components/desktop/components/TooltipDesktopTip.js +2 -2
- package/components/Tooltip/components/mobile/TooltipMobile.js +10 -10
- package/components/Typography/Caption.js +15 -15
- package/components/Typography/Text.js +24 -24
- package/components/Typography/Title.js +13 -13
- package/components/Typography/utils.js +1 -1
- package/components/UploadZone/UploadZone.js +109 -7
- package/components/UploadZone/UploadZoneContext.js +11 -0
- package/components/UploadZone/components/UploadZoneInput.js +5 -140
- package/components/UploadZone/index.js +2 -3
- package/components/UploadZone/types.js +2 -0
- package/components/index.js +279 -248
- package/index.d.ts +212 -27
- package/index.js +277 -246
- package/package.json +13 -1
- package/styles/triplex-next.css +354 -333
- package/chunks/AlertProcessSpoiler-BPbAJJFo.js +0 -39
- package/chunks/Card.module-Oqawy8hF.js +0 -17
- package/chunks/DropdownListItem-CW2MmFpw.js +0 -56
- package/chunks/DropdownMobile.module-DyunEp10.js +0 -19
- package/chunks/Footer.module-o57OEPdy.js +0 -11
- package/chunks/FormFieldInput-C2qWOLr3.js +0 -62
- package/chunks/HeaderLayoutSidebar.module-CzpXvDdH.js +0 -9
- package/chunks/HeaderTabs.module-CC0WAcoC.js +0 -9
- package/chunks/HeaderTitle.module-CH7eRK8R.js +0 -9
- package/chunks/ListItemTail.module-BBV_gvLd.js +0 -12
- package/chunks/ListMasterFooter.module-Cw1r4pz-.js +0 -10
- package/chunks/Overlay.module-08zZh8Y9.js +0 -18
- package/chunks/Page.module-Ccvf_vDR.js +0 -16
- package/chunks/TabsExtended.module-yT8L2ZYS.js +0 -13
- package/chunks/TooltipDesktop.module-CvcpQSlC.js +0 -19
- package/chunks/index-CAZEh1iw.js +0 -931
- package/chunks/utils-9a4dp5-W.js +0 -36
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { useState as c, useEffect as
|
|
3
|
-
import {
|
|
2
|
+
import { useState as c, useEffect as i } from "react";
|
|
3
|
+
import { n as x, o as d, q as f } from "../../chunks/vendor-D-uL_icH.js";
|
|
4
4
|
import { DesignTokenUtils as S } from "../DesignTokens/DesignTokenUtils.js";
|
|
5
5
|
import { ThemeProviderView as h } from "./components/ThemeProviderView.js";
|
|
6
6
|
import { ETriplexNextTheme as u } from "./ETriplexNextTheme.js";
|
|
7
|
-
const
|
|
7
|
+
const m = (t) => `${t}${Date.now()}${Math.floor(Math.random() * 1e6)}`, w = ({
|
|
8
8
|
children: t,
|
|
9
9
|
scopeClassName: o,
|
|
10
10
|
scopeRef: n,
|
|
11
11
|
theme: r = u.LIGHT,
|
|
12
12
|
tokens: s
|
|
13
13
|
}) => {
|
|
14
|
-
const [e, a] = c(o ||
|
|
15
|
-
return
|
|
16
|
-
a(o ||
|
|
17
|
-
}, [o]),
|
|
14
|
+
const [e, a] = c(o || m("triplex-next-theme-"));
|
|
15
|
+
return i(() => {
|
|
16
|
+
a(o || m("triplex-next-theme-"));
|
|
17
|
+
}, [o]), i(() => {
|
|
18
18
|
if (x()) {
|
|
19
19
|
const p = `.${e} {${S.getStyle(r, s || {})}}`;
|
|
20
20
|
d(p, `triplex-next-dynamic-tokens-${e}`);
|
|
21
21
|
} else
|
|
22
22
|
console.log("ThemeProvider", "SSR do not support dynamic theme with css variables.");
|
|
23
|
-
}, [e, r, s]),
|
|
23
|
+
}, [e, r, s]), i(() => () => f(`triplex-next-dynamic-tokens-${e}`), [e]), /* @__PURE__ */ l(h, { scopeClassName: e, scopeRef: n, theme: r, tokens: s, children: t });
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
26
|
w as ThemeProvider
|
|
@@ -5,14 +5,14 @@ import { ETriplexNextTheme as m } from "../ETriplexNextTheme.js";
|
|
|
5
5
|
import { DesignTokensCore as D } from "../../DesignTokens/DesignTokensCore.js";
|
|
6
6
|
import { DesignTokensCoreThemeDark as d } from "../../DesignTokens/DesignTokensCoreThemeDark.js";
|
|
7
7
|
import { DesignTokensComponents as v } from "../../DesignTokens/DesignTokensComponents.js";
|
|
8
|
-
import { DesignTokensComponentsThemeDark as
|
|
9
|
-
import {
|
|
8
|
+
import { DesignTokensComponentsThemeDark as g } from "../../DesignTokens/DesignTokensComponentsThemeDark.js";
|
|
9
|
+
import { g as x } from "../../../chunks/vendor-D-uL_icH.js";
|
|
10
10
|
const I = ({
|
|
11
|
-
children:
|
|
11
|
+
children: s,
|
|
12
12
|
scopeClassName: r,
|
|
13
13
|
scopeRef: t,
|
|
14
14
|
theme: e,
|
|
15
|
-
tokens:
|
|
15
|
+
tokens: f
|
|
16
16
|
}) => {
|
|
17
17
|
const o = u("");
|
|
18
18
|
k(() => {
|
|
@@ -22,13 +22,13 @@ const I = ({
|
|
|
22
22
|
o.current && ((i = t.current) == null || i.classList.remove(o.current));
|
|
23
23
|
};
|
|
24
24
|
}, [r]);
|
|
25
|
-
const T =
|
|
25
|
+
const T = x(
|
|
26
26
|
{},
|
|
27
|
-
|
|
27
|
+
f,
|
|
28
28
|
e === m.LIGHT ? D : d,
|
|
29
|
-
e === m.LIGHT ? v :
|
|
29
|
+
e === m.LIGHT ? v : g
|
|
30
30
|
);
|
|
31
|
-
return /* @__PURE__ */ p(c.Provider, { value: { scopeClassName: r, theme: e, tokens: T }, children:
|
|
31
|
+
return /* @__PURE__ */ p(c.Provider, { value: { scopeClassName: r, theme: e, tokens: T }, children: s });
|
|
32
32
|
};
|
|
33
33
|
export {
|
|
34
34
|
I as ThemeProviderView
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import r from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { c } from "
|
|
7
|
-
import { s as f } from "../../../../chunks/TooltipDesktop.module-
|
|
3
|
+
import { c as s } from "../../../../chunks/vendor-D-uL_icH.js";
|
|
4
|
+
import { MobileView as a } from "../../../MobileView/MobileView.js";
|
|
5
|
+
import { Text as l } from "../../../Typography/Text.js";
|
|
6
|
+
import { ELineType as p, ETextSize as c } from "../../../Typography/enums.js";
|
|
7
|
+
import { s as f } from "../../../../chunks/TooltipDesktop.module-DTbnIWo1.js";
|
|
8
8
|
const d = r.forwardRef(({ className: m, ...i }, t) => {
|
|
9
|
-
const e =
|
|
10
|
-
return /* @__PURE__ */ o(
|
|
9
|
+
const e = s(f.tooltipBody, m);
|
|
10
|
+
return /* @__PURE__ */ o(a, { fallback: /* @__PURE__ */ o("div", { className: e, ...i, ref: t }), children: /* @__PURE__ */ o(l, { className: e, size: c.B3, line: p.NORMAL, tag: "div", ...i, ref: t }) });
|
|
11
11
|
});
|
|
12
12
|
d.displayName = "TooltipBody";
|
|
13
13
|
export {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import n from "react";
|
|
3
|
-
import { c as s } from "../../../../chunks/vendor-
|
|
3
|
+
import { c as s } from "../../../../chunks/vendor-D-uL_icH.js";
|
|
4
4
|
import { MobileView as a } from "../../../MobileView/MobileView.js";
|
|
5
|
-
const
|
|
6
|
-
tooltipLink:
|
|
7
|
-
desktop:
|
|
8
|
-
mobile:
|
|
9
|
-
},
|
|
5
|
+
const d = "tooltipLink__4dd334d4", k = "desktop__d5f381d9", r = "mobile__76847c64", o = {
|
|
6
|
+
tooltipLink: d,
|
|
7
|
+
desktop: k,
|
|
8
|
+
mobile: r
|
|
9
|
+
}, m = n.forwardRef(
|
|
10
10
|
({ children: i, className: e, ...l }, p) => /* @__PURE__ */ t(a, { fallback: /* @__PURE__ */ t(
|
|
11
11
|
"a",
|
|
12
12
|
{
|
|
13
13
|
className: s(o.tooltipLink, o.desktop, e),
|
|
14
14
|
...l,
|
|
15
|
-
"data-tx": "
|
|
15
|
+
"data-tx": "1.1.0",
|
|
16
16
|
ref: p,
|
|
17
17
|
children: i
|
|
18
18
|
}
|
|
@@ -21,14 +21,14 @@ const k = "tooltipLink__7f9e1238", r = "desktop__558576b3", m = "mobile__4403db3
|
|
|
21
21
|
{
|
|
22
22
|
className: s(o.tooltipLink, o.mobile, e),
|
|
23
23
|
...l,
|
|
24
|
-
"data-tx": "
|
|
24
|
+
"data-tx": "1.1.0",
|
|
25
25
|
ref: p,
|
|
26
26
|
children: i
|
|
27
27
|
}
|
|
28
28
|
) })
|
|
29
29
|
);
|
|
30
|
-
|
|
30
|
+
m.displayName = "TooltipLink";
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
m as TooltipLink
|
|
33
33
|
};
|
|
34
34
|
//# sourceMappingURL=TooltipLink.js.map
|
|
@@ -3,7 +3,7 @@ import { useContext as p } from "react";
|
|
|
3
3
|
import { CrossStrokeSrvIcon16 as n } from "@sberbusiness/icons-next";
|
|
4
4
|
import { TooltipContext as i } from "../../TootlipContext.js";
|
|
5
5
|
import { ButtonIcon as l } from "../../../Button/ButtonIcon.js";
|
|
6
|
-
import { s as f } from "../../../../chunks/TooltipDesktop.module-
|
|
6
|
+
import { s as f } from "../../../../chunks/TooltipDesktop.module-DTbnIWo1.js";
|
|
7
7
|
const I = ({ onClick: t, ...r }) => {
|
|
8
8
|
const { setTooltipOpen: e } = p(i), s = (m) => {
|
|
9
9
|
e(!1), t == null || t(m);
|
|
@@ -3,13 +3,13 @@ var H = (p, a, i) => a in p ? _(p, a, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var t = (p, a, i) => H(p, typeof a != "symbol" ? a + "" : a, i);
|
|
4
4
|
import { jsxs as S, Fragment as P, jsx as x } from "react/jsx-runtime";
|
|
5
5
|
import O from "react";
|
|
6
|
-
import { i as M, c as $ } from "../../../../../chunks/vendor-
|
|
6
|
+
import { i as M, c as $ } from "../../../../../chunks/vendor-D-uL_icH.js";
|
|
7
7
|
import { TooltipContext as X } from "../../../TootlipContext.js";
|
|
8
8
|
import { Portal as Y } from "../../../../Portal/Portal.js";
|
|
9
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
10
|
import { TooltipDesktopTip as V } from "./TooltipDesktopTip.js";
|
|
11
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-
|
|
12
|
+
import { s as f } from "../../../../../chunks/TooltipDesktop.module-DTbnIWo1.js";
|
|
13
13
|
const Q = {
|
|
14
14
|
column: "translateX",
|
|
15
15
|
row: "translateY"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import p from "react";
|
|
3
3
|
import { ETooltipDirection as e } from "../../../enums.js";
|
|
4
|
-
import { c } from "../../../../../chunks/vendor-
|
|
5
|
-
import { s as t } from "../../../../../chunks/TooltipDesktop.module-
|
|
4
|
+
import { c } from "../../../../../chunks/vendor-D-uL_icH.js";
|
|
5
|
+
import { s as t } from "../../../../../chunks/TooltipDesktop.module-DTbnIWo1.js";
|
|
6
6
|
const l = p.forwardRef((r, i) => {
|
|
7
7
|
const { direction: s } = r;
|
|
8
8
|
let o;
|
|
@@ -5,26 +5,26 @@ import { Portal as x } from "../../../Portal/Portal.js";
|
|
|
5
5
|
import { DropdownMobile as _ } from "../../../Dropdown/mobile/DropdownMobile.js";
|
|
6
6
|
import { DropdownMobileBody as h } from "../../../Dropdown/mobile/DropdownMobileBody.js";
|
|
7
7
|
import { TooltipMobileCloseButton as y } from "./components/TooltipMobileCloseButton.js";
|
|
8
|
-
import { c as B } from "../../../../chunks/vendor-
|
|
9
|
-
const T = "
|
|
8
|
+
import { c as B } from "../../../../chunks/vendor-D-uL_icH.js";
|
|
9
|
+
const T = "tooltipMobile__bf2a5b68", g = "tooltipMobileContent__fc5d1607", H = "headerless__9af8f435", r = {
|
|
10
10
|
tooltipMobile: T,
|
|
11
11
|
tooltipMobileContent: g,
|
|
12
12
|
headerless: H
|
|
13
13
|
}, z = ({
|
|
14
14
|
children: N,
|
|
15
|
-
className:
|
|
15
|
+
className: p,
|
|
16
16
|
renderContainer: R,
|
|
17
17
|
targetRef: j,
|
|
18
18
|
disableAdaptiveMode: D,
|
|
19
19
|
isOpen: o,
|
|
20
20
|
onShow: t,
|
|
21
|
-
...
|
|
21
|
+
...d
|
|
22
22
|
}) => {
|
|
23
|
-
const { elements: e, setTooltipOpen:
|
|
23
|
+
const { elements: e, setTooltipOpen: a } = f(C), i = u(null), c = B(r.tooltipMobile, { [r.headerless]: e.mobileHeader === null }, p);
|
|
24
24
|
M(() => {
|
|
25
25
|
o && (t == null || t(i.current));
|
|
26
26
|
}, [o]);
|
|
27
|
-
const
|
|
27
|
+
const m = () => {
|
|
28
28
|
var n;
|
|
29
29
|
return /* @__PURE__ */ s(y, { ...(n = e.closeButton) == null ? void 0 : n.props });
|
|
30
30
|
};
|
|
@@ -33,18 +33,18 @@ const T = "tooltipMobile__5a4b582f", g = "tooltipMobileContent__b145fdc1", H = "
|
|
|
33
33
|
/* @__PURE__ */ s(x, { container: document.body, children: /* @__PURE__ */ l(
|
|
34
34
|
_,
|
|
35
35
|
{
|
|
36
|
-
className:
|
|
36
|
+
className: c,
|
|
37
37
|
tabIndex: -1,
|
|
38
38
|
opened: o,
|
|
39
|
-
setOpened:
|
|
40
|
-
...
|
|
39
|
+
setOpened: a,
|
|
40
|
+
...d,
|
|
41
41
|
ref: i,
|
|
42
42
|
children: [
|
|
43
43
|
e.mobileHeader,
|
|
44
44
|
/* @__PURE__ */ l(h, { className: r.tooltipMobileContent, children: [
|
|
45
45
|
e.body,
|
|
46
46
|
e.link,
|
|
47
|
-
e.mobileHeader === null &&
|
|
47
|
+
e.mobileHeader === null && m()
|
|
48
48
|
] })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { EFontWeightText as e, ECaptionSize as c, EFontType as
|
|
5
|
-
import { t as s, m as
|
|
6
|
-
const
|
|
7
|
-
caption:
|
|
8
|
-
regular:
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b } from "react";
|
|
3
|
+
import { c as g } from "../../chunks/vendor-D-uL_icH.js";
|
|
4
|
+
import { EFontWeightText as e, ECaptionSize as c, EFontType as y } from "./enums.js";
|
|
5
|
+
import { t as s, m as T } from "../../chunks/utils-B0khB-Lq.js";
|
|
6
|
+
const R = "caption__a0232eb3", E = "regular__b1f2b305", u = "semibold__c23bf0b4", x = "c1__8665eae4", S = "c2__cf697a46", h = "d1__8ff8abd4", o = {
|
|
7
|
+
caption: R,
|
|
8
|
+
regular: E,
|
|
9
9
|
semibold: u,
|
|
10
10
|
c1: x,
|
|
11
11
|
c2: S,
|
|
@@ -17,23 +17,23 @@ const E = "caption__f0dfc92e", b = "regular__e92902df", u = "semibold__c8b11dd7"
|
|
|
17
17
|
[c.C1]: o.c1,
|
|
18
18
|
[c.C2]: o.c2,
|
|
19
19
|
[c.D1]: o.d1
|
|
20
|
-
}, L =
|
|
20
|
+
}, L = b(
|
|
21
21
|
({
|
|
22
22
|
children: n,
|
|
23
23
|
className: p,
|
|
24
24
|
size: r,
|
|
25
25
|
tag: i = "span",
|
|
26
|
-
type: m =
|
|
26
|
+
type: m = y.PRIMARY,
|
|
27
27
|
weight: l = e.REGULAR,
|
|
28
28
|
underline: t,
|
|
29
29
|
strikethrough: a,
|
|
30
|
-
...
|
|
31
|
-
},
|
|
32
|
-
const
|
|
30
|
+
...f
|
|
31
|
+
}, C) => {
|
|
32
|
+
const _ = g(
|
|
33
33
|
s.typography,
|
|
34
34
|
o.caption,
|
|
35
35
|
A[r],
|
|
36
|
-
|
|
36
|
+
T[m],
|
|
37
37
|
F[l],
|
|
38
38
|
{
|
|
39
39
|
[s.strikethrough]: !!a && !t,
|
|
@@ -42,7 +42,7 @@ const E = "caption__f0dfc92e", b = "regular__e92902df", u = "semibold__c8b11dd7"
|
|
|
42
42
|
},
|
|
43
43
|
p
|
|
44
44
|
);
|
|
45
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ d(i, { ref: C, className: _, ...f, children: n });
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
48
|
L.displayName = "Caption";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as g } from "react";
|
|
3
|
-
import { c as C } from "../../chunks/vendor-
|
|
4
|
-
import { ETextSize as
|
|
5
|
-
import { t, m as
|
|
6
|
-
const E = "
|
|
3
|
+
import { c as C } from "../../chunks/vendor-D-uL_icH.js";
|
|
4
|
+
import { ETextSize as o, EFontWeightText as b, ELineType as c, EFontType as R } from "./enums.js";
|
|
5
|
+
import { t, m as d } from "../../chunks/utils-B0khB-Lq.js";
|
|
6
|
+
const E = "text__77006390", L = "regular__b1f2b305", A = "semibold__c23bf0b4", u = "b1__cef053ea", B = "b2__5c9700c6", M = "b3__202d1cb8", S = "b4__bb326c0f", s = {
|
|
7
7
|
text: E,
|
|
8
8
|
regular: L,
|
|
9
9
|
semibold: A,
|
|
@@ -12,44 +12,44 @@ const E = "text__e2739459", L = "regular__e92902df", A = "semibold__c8b11dd7", u
|
|
|
12
12
|
b3: M,
|
|
13
13
|
b4: S
|
|
14
14
|
}, h = {
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
15
|
+
[o.B1]: s.b1,
|
|
16
|
+
[o.B2]: s.b2,
|
|
17
|
+
[o.B3]: s.b3,
|
|
18
|
+
[o.B4]: s.b4
|
|
19
19
|
}, F = {
|
|
20
|
-
[
|
|
21
|
-
[
|
|
20
|
+
[b.REGULAR]: s.regular,
|
|
21
|
+
[b.SEMIBOLD]: s.semibold
|
|
22
22
|
}, N = {
|
|
23
|
-
[
|
|
24
|
-
[
|
|
23
|
+
[c.NORMAL]: "",
|
|
24
|
+
[c.COMPACT]: t.compact
|
|
25
25
|
}, O = g(
|
|
26
26
|
({
|
|
27
|
-
children:
|
|
27
|
+
children: r,
|
|
28
28
|
className: m,
|
|
29
29
|
size: n,
|
|
30
30
|
tag: p = "span",
|
|
31
|
-
type: l =
|
|
32
|
-
weight: T =
|
|
33
|
-
line: i =
|
|
34
|
-
underline:
|
|
31
|
+
type: l = R.PRIMARY,
|
|
32
|
+
weight: T = b.REGULAR,
|
|
33
|
+
line: i = c.NORMAL,
|
|
34
|
+
underline: e,
|
|
35
35
|
strikethrough: a,
|
|
36
36
|
...x
|
|
37
37
|
}, _) => {
|
|
38
|
-
const
|
|
38
|
+
const f = C(
|
|
39
39
|
t.typography,
|
|
40
40
|
s.text,
|
|
41
41
|
h[n],
|
|
42
|
-
|
|
42
|
+
d[l],
|
|
43
43
|
F[T],
|
|
44
44
|
N[i],
|
|
45
45
|
{
|
|
46
|
-
[t.strikethrough]: !!a && !
|
|
47
|
-
[t.underline]: !!
|
|
48
|
-
[t.underlineStrikethrough]: !!a && !!
|
|
46
|
+
[t.strikethrough]: !!a && !e,
|
|
47
|
+
[t.underline]: !!e && !a,
|
|
48
|
+
[t.underlineStrikethrough]: !!a && !!e
|
|
49
49
|
},
|
|
50
50
|
m
|
|
51
51
|
);
|
|
52
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ y(p, { ref: _, className: f, ...x, children: r });
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
O.displayName = "Text";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as T } from "react";
|
|
3
|
-
import { c as f } from "../../chunks/vendor-
|
|
3
|
+
import { c as f } from "../../chunks/vendor-D-uL_icH.js";
|
|
4
4
|
import { ETitleSize as m, EFontWeightTitle as o, EFontType as g } from "./enums.js";
|
|
5
|
-
import { t as s, m as u } from "../../chunks/utils-
|
|
6
|
-
const y = "
|
|
5
|
+
import { t as s, m as u } from "../../chunks/utils-B0khB-Lq.js";
|
|
6
|
+
const y = "title__850984cd", E = "regular__b1f2b305", C = "semibold__c23bf0b4", S = "medium__df283fb2", M = "bold__9b12ae0a", R = "h1__4845788b", D = "h2__80b774c2", F = "h3__8f42a1c0", t = {
|
|
7
7
|
title: y,
|
|
8
8
|
regular: E,
|
|
9
9
|
semibold: C,
|
|
@@ -26,19 +26,19 @@ const y = "title__63dd0a64", E = "regular__e92902df", C = "semibold__c8b11dd7",
|
|
|
26
26
|
children: a,
|
|
27
27
|
className: r,
|
|
28
28
|
size: i,
|
|
29
|
-
tag:
|
|
30
|
-
type:
|
|
31
|
-
weight:
|
|
29
|
+
tag: c = `${i}`,
|
|
30
|
+
type: n = g.PRIMARY,
|
|
31
|
+
weight: b = o.SEMIBOLD,
|
|
32
32
|
underline: e,
|
|
33
33
|
strikethrough: l,
|
|
34
|
-
...
|
|
35
|
-
},
|
|
36
|
-
const
|
|
34
|
+
...d
|
|
35
|
+
}, h) => {
|
|
36
|
+
const p = f(
|
|
37
37
|
s.typography,
|
|
38
38
|
t.title,
|
|
39
39
|
I[i],
|
|
40
|
-
u[
|
|
41
|
-
L[
|
|
40
|
+
u[n],
|
|
41
|
+
L[b],
|
|
42
42
|
{
|
|
43
43
|
[s.strikethrough]: !!l && !e,
|
|
44
44
|
[s.underline]: !!e && !l,
|
|
@@ -46,7 +46,7 @@ const y = "title__63dd0a64", E = "regular__e92902df", C = "semibold__c8b11dd7",
|
|
|
46
46
|
},
|
|
47
47
|
r
|
|
48
48
|
);
|
|
49
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ _(c, { ref: h, className: p, ...d, children: a });
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
x.displayName = "Title";
|
|
@@ -1,10 +1,112 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var u = (s, n, e) => n in s ? m(s, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[n] = e;
|
|
3
|
+
var t = (s, n, e) => u(s, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { jsx as g, jsxs as f } from "react/jsx-runtime";
|
|
5
|
+
import Z, { createElement as l } from "react";
|
|
6
|
+
import { createRoot as C } from "react-dom/client";
|
|
7
|
+
import { c as h } from "../../chunks/vendor-D-uL_icH.js";
|
|
8
|
+
import { U as L, s as d } from "../../chunks/UploadZoneInput-R9729LZY.js";
|
|
9
|
+
import { UploadZoneContext as U } from "./UploadZoneContext.js";
|
|
10
|
+
class c extends Z.PureComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
// Описание - https://stackoverflow.com/questions/7110353/html5-dragleave-fired-when-hovering-a-child-element.
|
|
14
|
+
// Если counter > 0 - означает, что перетаскиваемый объект в пределах окна браузера.
|
|
15
|
+
/** Каунтер для подсчёта drag-перемещений по странице. */
|
|
16
|
+
t(this, "counter", 0);
|
|
17
|
+
/** Элемент-обёртка для дроп-зоны. */
|
|
18
|
+
t(this, "dropZoneWrapperDiv", null);
|
|
19
|
+
t(this, "state", {
|
|
20
|
+
hoverOnDrag: !1,
|
|
21
|
+
inputNode: void 0
|
|
22
|
+
});
|
|
23
|
+
t(this, "addListeners", (e) => {
|
|
24
|
+
e && (e.addEventListener("dragenter", this.handleDragEnter), e.addEventListener("dragleave", this.handleDragLeave));
|
|
25
|
+
});
|
|
26
|
+
t(this, "removeListeners", (e) => {
|
|
27
|
+
e && (e.removeEventListener("dragenter", this.handleDragEnter), e.removeEventListener("dragleave", this.handleDragLeave));
|
|
28
|
+
});
|
|
29
|
+
t(this, "createDropZoneDiv", () => {
|
|
30
|
+
const { children: e, className: r, onChange: o, renderContainerContent: a, dropZoneContainer: D, ...p } = this.props, i = document.createElement("div");
|
|
31
|
+
return C(i).render(
|
|
32
|
+
/* @__PURE__ */ l(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
className: h(d.uploadZoneContainerDragArea, r),
|
|
36
|
+
onDragOver: this.handlePreventDefault,
|
|
37
|
+
onDrop: this.fileDrop,
|
|
38
|
+
...p,
|
|
39
|
+
key: "uploadZoneDragArea",
|
|
40
|
+
role: "none"
|
|
41
|
+
},
|
|
42
|
+
a == null ? void 0 : a()
|
|
43
|
+
)
|
|
44
|
+
), i;
|
|
45
|
+
});
|
|
46
|
+
t(this, "handleAreaClick", (e) => {
|
|
47
|
+
e.stopPropagation(), this.openUploadDialog();
|
|
48
|
+
});
|
|
49
|
+
t(this, "openUploadDialog", () => {
|
|
50
|
+
const { inputNode: e } = this.state;
|
|
51
|
+
e == null || e.click();
|
|
52
|
+
});
|
|
53
|
+
t(this, "handlePreventDefault", (e) => {
|
|
54
|
+
const { onDragOver: r } = this.props;
|
|
55
|
+
e.preventDefault(), r == null || r(e);
|
|
56
|
+
});
|
|
57
|
+
t(this, "handleDragEnter", () => {
|
|
58
|
+
this.counter++, this.counter === 1 && this.setState({ hoverOnDrag: !0 });
|
|
59
|
+
});
|
|
60
|
+
t(this, "handleDragLeave", () => {
|
|
61
|
+
this.counter--, this.counter === 0 && this.setState({ hoverOnDrag: !1 });
|
|
62
|
+
});
|
|
63
|
+
t(this, "fileDrop", (e) => {
|
|
64
|
+
const { onDrop: r, onChange: o } = this.props;
|
|
65
|
+
e.preventDefault(), r == null || r(e), o(e.dataTransfer.files, e), this.setState({ hoverOnDrag: !1 }), this.counter = 0;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
componentDidMount() {
|
|
69
|
+
this.addListeners(this.props.dropZoneContainer);
|
|
70
|
+
}
|
|
71
|
+
componentDidUpdate(e, r) {
|
|
72
|
+
const { dropZoneContainer: o } = this.props, { hoverOnDrag: a } = this.state;
|
|
73
|
+
o !== e.dropZoneContainer && (this.removeListeners(e.dropZoneContainer), this.addListeners(o)), a !== r.hoverOnDrag && o && (a ? (this.dropZoneWrapperDiv = this.createDropZoneDiv(), o.appendChild(this.dropZoneWrapperDiv)) : this.dropZoneWrapperDiv && o.removeChild(this.dropZoneWrapperDiv));
|
|
74
|
+
}
|
|
75
|
+
componentWillUnmount() {
|
|
76
|
+
this.removeListeners(this.props.dropZoneContainer);
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
const { children: e, className: r, onChange: o, renderContainerContent: a, dropZoneContainer: D, ...p } = this.props, { inputNode: i } = this.state;
|
|
80
|
+
return /* @__PURE__ */ g(
|
|
81
|
+
U.Provider,
|
|
82
|
+
{
|
|
83
|
+
value: {
|
|
84
|
+
inputNode: i,
|
|
85
|
+
onChange: o,
|
|
86
|
+
openUploadDialog: this.openUploadDialog,
|
|
87
|
+
setInputNode: (v) => {
|
|
88
|
+
this.setState({ inputNode: v });
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
children: /* @__PURE__ */ f("div", { className: d.uploadZone, "data-tx": "1.1.0", children: [
|
|
92
|
+
/* @__PURE__ */ l(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
className: h(d.uploadZoneDragArea, r),
|
|
96
|
+
onClick: this.handleAreaClick,
|
|
97
|
+
...p,
|
|
98
|
+
key: "uploadZoneDragArea",
|
|
99
|
+
role: "none"
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
e({ openUploadDialog: this.openUploadDialog })
|
|
103
|
+
] })
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
t(c, "displayName", "UploadZone"), t(c, "Input", L);
|
|
6
109
|
export {
|
|
7
|
-
|
|
8
|
-
i as UploadZoneContext
|
|
110
|
+
c as UploadZone
|
|
9
111
|
};
|
|
10
112
|
//# sourceMappingURL=UploadZone.js.map
|