@sberbusiness/triplex-next 1.0.0 → 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-JRcPtVtX.js → AlertProcessSpoiler-Dp7FRT9y.js} +11 -11
- package/chunks/Card.module-Ddt7TQ9Z.js +17 -0
- package/chunks/{DropdownListItem-Be_BBAWh.js → DropdownListItem-y6Rvj_dd.js} +14 -14
- 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-DWU_FtH8.js → ListItemControlsButton-Cn3Vmrsn.js} +10 -10
- 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-BLpZL63j.js → TabsExtendedUtils-NCwWiX7O.js} +4 -4
- 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 +8 -8
- 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 +5 -5
- package/components/Button/enums.js +5 -4
- package/components/Button/index.js +14 -12
- package/components/Card/CardAction.js +14 -14
- 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 +10 -10
- package/components/Checkbox/CheckboxXGroup.js +14 -14
- package/components/Checkbox/CheckboxYGroup.js +2 -2
- package/components/Col/Col.js +142 -142
- 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 +52 -51
- 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 +2 -2
- 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 +9 -9
- package/components/FormField/components/FormFieldPrefix.js +10 -10
- 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 +12 -12
- 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 +9 -9
- 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 +34 -34
- package/components/List/List.js +7 -7
- 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 +3 -3
- package/components/List/components/ListItemControls.js +2 -2
- 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 +4 -4
- 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 +6 -6
- 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 +9 -9
- package/components/ListMaster/components/SelectionControls.js +3 -3
- package/components/Loader/LoaderMiddle/LoaderMiddle.js +2 -2
- package/components/Loader/LoaderSmall/LoaderSmall.js +11 -11
- 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 +4 -4
- package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
- package/components/Pagination/components/PaginationPageButton.js +2 -2
- package/components/Pagination/components/PaginationPageEllipsis.js +3 -3
- 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 +13 -13
- package/components/Radio/RadioYGroup.js +5 -5
- package/components/Row/Row.js +6 -6
- 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 +11 -11
- 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 +17 -17
- 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 +9 -9
- package/components/Typography/Caption.js +14 -14
- package/components/Typography/Text.js +24 -24
- package/components/Typography/Title.js +24 -24
- 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/Card.module-Cr47sRot.js +0 -17
- package/chunks/DropdownMobile.module-PWShExJh.js +0 -19
- package/chunks/Footer.module-Gh9uBYjc.js +0 -11
- package/chunks/FormFieldInput-H-fZrt84.js +0 -62
- package/chunks/HeaderLayoutSidebar.module-MHb8aSSn.js +0 -9
- package/chunks/HeaderTabs.module-Bfiwon3k.js +0 -9
- package/chunks/HeaderTitle.module-xLu0Kmjc.js +0 -9
- package/chunks/ListItemTail.module-DZnDKE1u.js +0 -12
- package/chunks/ListMasterFooter.module-DVmdCqc9.js +0 -10
- package/chunks/Overlay.module-C1GsZR5Z.js +0 -18
- package/chunks/Page.module-kOw5fybr.js +0 -16
- package/chunks/TabsExtended.module-lHzNgwBX.js +0 -13
- package/chunks/TooltipDesktop.module-HNPcWO41.js +0 -19
- package/chunks/index-CgNJLkzr.js +0 -931
- package/chunks/utils-Ck6y6vsC.js +0 -36
|
@@ -5,8 +5,8 @@ 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
|
|
@@ -18,13 +18,13 @@ const T = "tooltipMobile__e6b5e0e8", g = "tooltipMobileContent__fc5c2108", H = "
|
|
|
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__e6b5e0e8", g = "tooltipMobileContent__fc5c2108", 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__10a4111d", b = "regular__a8215ed8", u = "semibold__2c8426c9"
|
|
|
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
|
-
...
|
|
30
|
+
...f
|
|
31
31
|
}, C) => {
|
|
32
|
-
const _ =
|
|
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__10a4111d", b = "regular__a8215ed8", u = "semibold__2c8426c9"
|
|
|
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
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { ETextSize as
|
|
5
|
-
import { t, m as
|
|
6
|
-
const E = "
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
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__185ea821", L = "regular__a8215ed8", A = "semibold__2c8426c9", 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
|
-
[
|
|
25
|
-
}, O =
|
|
23
|
+
[c.NORMAL]: "",
|
|
24
|
+
[c.COMPACT]: t.compact
|
|
25
|
+
}, O = g(
|
|
26
26
|
({
|
|
27
27
|
children: r,
|
|
28
28
|
className: m,
|
|
29
29
|
size: n,
|
|
30
30
|
tag: p = "span",
|
|
31
31
|
type: l = R.PRIMARY,
|
|
32
|
-
weight: T =
|
|
33
|
-
line: i =
|
|
34
|
-
underline:
|
|
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
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as f } from "../../chunks/vendor-
|
|
4
|
-
import { ETitleSize as
|
|
5
|
-
import { t as s, m as u } from "../../chunks/utils-
|
|
6
|
-
const y = "
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as T } from "react";
|
|
3
|
+
import { c as f } from "../../chunks/vendor-D-uL_icH.js";
|
|
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-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,
|
|
@@ -13,40 +13,40 @@ const y = "title__a932cc92", E = "regular__a8215ed8", C = "semibold__2c8426c9",
|
|
|
13
13
|
h2: D,
|
|
14
14
|
h3: F
|
|
15
15
|
}, I = {
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
16
|
+
[m.H1]: t.h1,
|
|
17
|
+
[m.H2]: t.h2,
|
|
18
|
+
[m.H3]: t.h3
|
|
19
19
|
}, L = {
|
|
20
20
|
[o.MEDIUM]: t.medium,
|
|
21
21
|
[o.REGULAR]: t.regular,
|
|
22
22
|
[o.SEMIBOLD]: t.semibold,
|
|
23
23
|
[o.BOLD]: t.bold
|
|
24
|
-
}, x =
|
|
24
|
+
}, x = T(
|
|
25
25
|
({
|
|
26
|
-
children:
|
|
27
|
-
className:
|
|
28
|
-
size:
|
|
29
|
-
tag:
|
|
30
|
-
type:
|
|
31
|
-
weight:
|
|
26
|
+
children: a,
|
|
27
|
+
className: r,
|
|
28
|
+
size: i,
|
|
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
|
-
I[
|
|
40
|
-
u[
|
|
41
|
-
L[
|
|
39
|
+
I[i],
|
|
40
|
+
u[n],
|
|
41
|
+
L[b],
|
|
42
42
|
{
|
|
43
43
|
[s.strikethrough]: !!l && !e,
|
|
44
44
|
[s.underline]: !!e && !l,
|
|
45
45
|
[s.underlineStrikethrough]: !!l && !!e
|
|
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
|
|
@@ -1,143 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import c, { createElement as d } from "react";
|
|
6
|
-
import { createRoot as L } from "react-dom/client";
|
|
7
|
-
import { c as h } from "../../../chunks/vendor-CF2m175I.js";
|
|
8
|
-
const U = "uploadZone__0d6c9555", N = "uploadZoneDragArea__471ab577", x = "uploadZoneContainerDragArea__9e3aa935", _ = "uploadZoneInput__6bd6c8bb", p = {
|
|
9
|
-
uploadZone: U,
|
|
10
|
-
uploadZoneDragArea: N,
|
|
11
|
-
uploadZoneContainerDragArea: x,
|
|
12
|
-
uploadZoneInput: _
|
|
13
|
-
}, D = ({ className: s, ...r }) => {
|
|
14
|
-
const e = c.useContext(g), t = (a) => {
|
|
15
|
-
e.onChange(a.target.files, a);
|
|
16
|
-
}, n = (a) => {
|
|
17
|
-
a.currentTarget.value = "";
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ d(
|
|
20
|
-
"input",
|
|
21
|
-
{
|
|
22
|
-
...r,
|
|
23
|
-
type: "file",
|
|
24
|
-
className: h(s, p.uploadZoneInput),
|
|
25
|
-
onChange: t,
|
|
26
|
-
onClick: n,
|
|
27
|
-
ref: e.setInputNode,
|
|
28
|
-
key: "uploadZoneInput"
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
D.displayName = "UploadZone";
|
|
33
|
-
const g = c.createContext({
|
|
34
|
-
onChange: () => {
|
|
35
|
-
},
|
|
36
|
-
openUploadDialog: () => {
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
class u extends c.PureComponent {
|
|
40
|
-
constructor() {
|
|
41
|
-
super(...arguments);
|
|
42
|
-
// Описание - https://stackoverflow.com/questions/7110353/html5-dragleave-fired-when-hovering-a-child-element.
|
|
43
|
-
// Если counter > 0 - означает, что перетаскиваемый объект в пределах окна браузера.
|
|
44
|
-
/** Каунтер для подсчёта drag-перемещений по странице. */
|
|
45
|
-
o(this, "counter", 0);
|
|
46
|
-
/** Элемент-обёртка для дроп-зоны. */
|
|
47
|
-
o(this, "dropZoneWrapperDiv", null);
|
|
48
|
-
o(this, "state", {
|
|
49
|
-
hoverOnDrag: !1,
|
|
50
|
-
inputNode: void 0
|
|
51
|
-
});
|
|
52
|
-
o(this, "addListeners", (e) => {
|
|
53
|
-
e && (e.addEventListener("dragenter", this.handleDragEnter), e.addEventListener("dragleave", this.handleDragLeave));
|
|
54
|
-
});
|
|
55
|
-
o(this, "removeListeners", (e) => {
|
|
56
|
-
e && (e.removeEventListener("dragenter", this.handleDragEnter), e.removeEventListener("dragleave", this.handleDragLeave));
|
|
57
|
-
});
|
|
58
|
-
o(this, "createDropZoneDiv", () => {
|
|
59
|
-
const { children: e, className: t, onChange: n, renderContainerContent: a, dropZoneContainer: v, ...l } = this.props, i = document.createElement("div");
|
|
60
|
-
return L(i).render(
|
|
61
|
-
/* @__PURE__ */ d(
|
|
62
|
-
"div",
|
|
63
|
-
{
|
|
64
|
-
className: h(p.uploadZoneContainerDragArea, t),
|
|
65
|
-
onDragOver: this.handlePreventDefault,
|
|
66
|
-
onDrop: this.fileDrop,
|
|
67
|
-
...l,
|
|
68
|
-
key: "uploadZoneDragArea",
|
|
69
|
-
role: "none"
|
|
70
|
-
},
|
|
71
|
-
a == null ? void 0 : a()
|
|
72
|
-
)
|
|
73
|
-
), i;
|
|
74
|
-
});
|
|
75
|
-
o(this, "handleAreaClick", (e) => {
|
|
76
|
-
e.stopPropagation(), this.openUploadDialog();
|
|
77
|
-
});
|
|
78
|
-
o(this, "openUploadDialog", () => {
|
|
79
|
-
const { inputNode: e } = this.state;
|
|
80
|
-
e == null || e.click();
|
|
81
|
-
});
|
|
82
|
-
o(this, "handlePreventDefault", (e) => {
|
|
83
|
-
const { onDragOver: t } = this.props;
|
|
84
|
-
e.preventDefault(), t == null || t(e);
|
|
85
|
-
});
|
|
86
|
-
o(this, "handleDragEnter", () => {
|
|
87
|
-
this.counter++, this.counter === 1 && this.setState({ hoverOnDrag: !0 });
|
|
88
|
-
});
|
|
89
|
-
o(this, "handleDragLeave", () => {
|
|
90
|
-
this.counter--, this.counter === 0 && this.setState({ hoverOnDrag: !1 });
|
|
91
|
-
});
|
|
92
|
-
o(this, "fileDrop", (e) => {
|
|
93
|
-
const { onDrop: t, onChange: n } = this.props;
|
|
94
|
-
e.preventDefault(), t == null || t(e), n(e.dataTransfer.files, e), this.setState({ hoverOnDrag: !1 }), this.counter = 0;
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
componentDidMount() {
|
|
98
|
-
this.addListeners(this.props.dropZoneContainer);
|
|
99
|
-
}
|
|
100
|
-
componentDidUpdate(e, t) {
|
|
101
|
-
const { dropZoneContainer: n } = this.props, { hoverOnDrag: a } = this.state;
|
|
102
|
-
n !== e.dropZoneContainer && (this.removeListeners(e.dropZoneContainer), this.addListeners(n)), a !== t.hoverOnDrag && n && (a ? (this.dropZoneWrapperDiv = this.createDropZoneDiv(), n.appendChild(this.dropZoneWrapperDiv)) : this.dropZoneWrapperDiv && n.removeChild(this.dropZoneWrapperDiv));
|
|
103
|
-
}
|
|
104
|
-
componentWillUnmount() {
|
|
105
|
-
this.removeListeners(this.props.dropZoneContainer);
|
|
106
|
-
}
|
|
107
|
-
render() {
|
|
108
|
-
const { children: e, className: t, onChange: n, renderContainerContent: a, dropZoneContainer: v, ...l } = this.props, { inputNode: i } = this.state;
|
|
109
|
-
return /* @__PURE__ */ C(
|
|
110
|
-
g.Provider,
|
|
111
|
-
{
|
|
112
|
-
value: {
|
|
113
|
-
inputNode: i,
|
|
114
|
-
onChange: n,
|
|
115
|
-
openUploadDialog: this.openUploadDialog,
|
|
116
|
-
setInputNode: (Z) => {
|
|
117
|
-
this.setState({ inputNode: Z });
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
children: /* @__PURE__ */ A("div", { className: p.uploadZone, "data-tx": "1.0.0", children: [
|
|
121
|
-
/* @__PURE__ */ d(
|
|
122
|
-
"div",
|
|
123
|
-
{
|
|
124
|
-
className: h(p.uploadZoneDragArea, t),
|
|
125
|
-
onClick: this.handleAreaClick,
|
|
126
|
-
...l,
|
|
127
|
-
key: "uploadZoneDragArea",
|
|
128
|
-
role: "none"
|
|
129
|
-
}
|
|
130
|
-
),
|
|
131
|
-
e({ openUploadDialog: this.openUploadDialog })
|
|
132
|
-
] })
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
o(u, "displayName", "UploadZone"), o(u, "Input", D);
|
|
1
|
+
import "react";
|
|
2
|
+
import "../UploadZoneContext.js";
|
|
3
|
+
import "../../../chunks/vendor-D-uL_icH.js";
|
|
4
|
+
import { U as i } from "../../../chunks/UploadZoneInput-R9729LZY.js";
|
|
138
5
|
export {
|
|
139
|
-
|
|
140
|
-
D as UploadZoneInput,
|
|
141
|
-
u as a
|
|
6
|
+
i as UploadZoneInput
|
|
142
7
|
};
|
|
143
8
|
//# sourceMappingURL=UploadZoneInput.js.map
|