@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,124 @@
|
|
|
1
|
+
import { ETooltipStartCoordinates as m, ETooltipSizeParameter as f, ETooltipEndCoordinates as O, ETooltipFlowTypes as d, ETooltipPreferPlace as x, ETooltipAlign as T, ETooltipTypeName as n, ETooltipAxesType as S } from "../enums.js";
|
|
2
|
+
const F = 8, H = (e, t) => e.h === t.h && e.w === t.w && e.x === t.x && e.y === t.y && e.x2 === t.x2 && e.y2 === t.y2, E = {
|
|
3
|
+
column: {
|
|
4
|
+
cross: {
|
|
5
|
+
end: O.X,
|
|
6
|
+
size: f.W,
|
|
7
|
+
start: m.X
|
|
8
|
+
},
|
|
9
|
+
main: {
|
|
10
|
+
end: O.Y,
|
|
11
|
+
size: f.H,
|
|
12
|
+
start: m.Y
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
row: {
|
|
16
|
+
cross: {
|
|
17
|
+
end: O.Y,
|
|
18
|
+
size: f.H,
|
|
19
|
+
start: m.Y
|
|
20
|
+
},
|
|
21
|
+
main: {
|
|
22
|
+
end: O.X,
|
|
23
|
+
size: f.W,
|
|
24
|
+
start: m.X
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}, R = (e, t, r) => r[E[e][t].size] / 2, I = (e, t, r) => r[E[e][t].start] + r[E[e][t].size] / 2, M = (e, t, r, s) => I(e, t, r) - s[E[e][t].start], D = (e, t, r, s, o) => {
|
|
28
|
+
const i = E[e][t];
|
|
29
|
+
return r === T.CENTER ? I(e, t, s) - R(e, t, o) : r === T.END ? s[i.end] : r === T.START ? s[i.start] - o[i.size] : 0;
|
|
30
|
+
}, G = (e) => {
|
|
31
|
+
if (e === window)
|
|
32
|
+
return {
|
|
33
|
+
h: e.innerHeight,
|
|
34
|
+
w: e.innerWidth,
|
|
35
|
+
x: 0,
|
|
36
|
+
x2: e.innerWidth,
|
|
37
|
+
y: 0,
|
|
38
|
+
y2: e.innerHeight
|
|
39
|
+
};
|
|
40
|
+
const t = e.getBoundingClientRect();
|
|
41
|
+
return {
|
|
42
|
+
h: t.bottom - t.top,
|
|
43
|
+
w: t.right - t.left,
|
|
44
|
+
x: t.left,
|
|
45
|
+
x2: t.right,
|
|
46
|
+
y: t.top,
|
|
47
|
+
y2: t.bottom
|
|
48
|
+
};
|
|
49
|
+
}, p = (e) => (t, r) => t[e] >= r[e], C = p(f.W), L = p(f.H), g = (e, t) => C(e, t) && L(e, t), Y = (e, t, r, s, o, i) => {
|
|
50
|
+
let a = r.y + (r.y2 - r.y) / 2;
|
|
51
|
+
const l = t[O.Y] - a;
|
|
52
|
+
l < a && (a = l);
|
|
53
|
+
const N = a + i[f.H] - s - o - F, h = [
|
|
54
|
+
{
|
|
55
|
+
[n.SIDE]: T.START,
|
|
56
|
+
[n.STANDING]: x.ABOVE,
|
|
57
|
+
[n.FLOW]: d.COLUMN,
|
|
58
|
+
h: r.y,
|
|
59
|
+
order: -1,
|
|
60
|
+
w: t.x2
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
[n.SIDE]: T.END,
|
|
64
|
+
[n.STANDING]: x.RIGHT,
|
|
65
|
+
[n.FLOW]: d.ROW,
|
|
66
|
+
h: N,
|
|
67
|
+
order: 1,
|
|
68
|
+
w: t.x2 - r.x2
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
[n.SIDE]: T.END,
|
|
72
|
+
[n.STANDING]: x.BELOW,
|
|
73
|
+
[n.FLOW]: d.COLUMN,
|
|
74
|
+
h: t.y2 - r.y2,
|
|
75
|
+
order: 1,
|
|
76
|
+
w: t.x2
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
[n.SIDE]: T.START,
|
|
80
|
+
[n.STANDING]: x.LEFT,
|
|
81
|
+
[n.FLOW]: d.ROW,
|
|
82
|
+
h: N,
|
|
83
|
+
order: -1,
|
|
84
|
+
w: r.x
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
h.forEach((c) => {
|
|
88
|
+
c.cutOff = /* area */
|
|
89
|
+
-Math.max(0, Math.min(c.w, i.w)) * Math.max(0, Math.min(c.h, i.h));
|
|
90
|
+
}), h.sort((c, y) => (c.cutOff ?? 0) - (y.cutOff ?? 0));
|
|
91
|
+
const W = h.filter((c) => g(c, i));
|
|
92
|
+
if (e) {
|
|
93
|
+
const c = W.filter((A) => A[n.STANDING] === e);
|
|
94
|
+
if (c.length)
|
|
95
|
+
return c[0];
|
|
96
|
+
const y = h.filter((A) => A[n.STANDING] === e);
|
|
97
|
+
if (!W.length && y.length)
|
|
98
|
+
return y[0];
|
|
99
|
+
}
|
|
100
|
+
return W.length ? W[0] : h[0];
|
|
101
|
+
}, w = (e, t, r) => {
|
|
102
|
+
const { main: s, cross: o } = E[e.flow], i = T.CENTER, a = D(e.flow, S.MAIN, e.side, t, r), l = r[s.size], N = D(e.flow, S.CROSS, i, t, r), h = r[o.size];
|
|
103
|
+
return {
|
|
104
|
+
[o.start]: N,
|
|
105
|
+
crossLength: h,
|
|
106
|
+
[o.end]: N + h,
|
|
107
|
+
[s.start]: a,
|
|
108
|
+
mainLength: l,
|
|
109
|
+
[s.end]: a + l
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
E as axes,
|
|
114
|
+
G as calcBounds,
|
|
115
|
+
w as calcRelPos,
|
|
116
|
+
I as centerOfBounds,
|
|
117
|
+
M as centerOfBoundsFromBounds,
|
|
118
|
+
R as centerOfSize,
|
|
119
|
+
g as doesFitWithin,
|
|
120
|
+
H as equalCoords,
|
|
121
|
+
Y as pickZone,
|
|
122
|
+
D as place
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=Positioning.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useEffect as i } from "react";
|
|
2
|
+
import "../../DesignTokens/DesignTokensComponents.js";
|
|
3
|
+
import "../../DesignTokens/DesignTokensComponentsThemeDark.js";
|
|
4
|
+
import "../../ThemeProvider/ThemeProviderContext.js";
|
|
5
|
+
import { useToken as m } from "../../ThemeProvider/useToken.js";
|
|
6
|
+
function g(e, s) {
|
|
7
|
+
const { scopeClassName: t } = m();
|
|
8
|
+
i(() => {
|
|
9
|
+
if (t && s) {
|
|
10
|
+
const o = s.classList;
|
|
11
|
+
e ? (o.contains(t) || o.add(t), r(s, t)) : o.contains(t) && u(s, t) <= 0 && window.setTimeout(() => {
|
|
12
|
+
o.remove(t);
|
|
13
|
+
}, 500);
|
|
14
|
+
}
|
|
15
|
+
}, [t, e, s]), i(() => () => {
|
|
16
|
+
const o = s.classList;
|
|
17
|
+
o.contains(t) && u(s, t) <= 0 && o.remove(t);
|
|
18
|
+
}, [s, t]);
|
|
19
|
+
}
|
|
20
|
+
function r(e, s) {
|
|
21
|
+
const t = `data-tooltip-theme-${s}-counter`, o = e.getAttribute(t), c = o ? parseInt(o, 10) + 1 : 1;
|
|
22
|
+
return e.setAttribute(t, c.toString()), c;
|
|
23
|
+
}
|
|
24
|
+
function u(e, s) {
|
|
25
|
+
const t = `data-tooltip-theme-${s}-counter`, o = e.getAttribute(t), c = o ? parseInt(o, 10) - 1 : 0;
|
|
26
|
+
return c > 0 ? e.setAttribute(t, c.toString()) : e.removeAttribute(t), c;
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
g as useTooltipTheme
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useTooltipTheme.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
import { c as y } from "../../chunks/vendor-CF2m175I.js";
|
|
4
|
+
import { EFontWeightText as e, ECaptionSize as c, EFontType as T } from "./enums.js";
|
|
5
|
+
import { t as s, m as b } from "../../chunks/utils-VD40Qwop.js";
|
|
6
|
+
const R = "caption__13694852", E = "regular__5eaf5817", u = "semibold__ebfbc5a3", x = "c1__d90aca22", S = "c2__7618a56e", h = "d1__afe3b41b", o = {
|
|
7
|
+
caption: R,
|
|
8
|
+
regular: E,
|
|
9
|
+
semibold: u,
|
|
10
|
+
c1: x,
|
|
11
|
+
c2: S,
|
|
12
|
+
d1: h
|
|
13
|
+
}, F = {
|
|
14
|
+
[e.REGULAR]: o.regular,
|
|
15
|
+
[e.SEMIBOLD]: o.semibold
|
|
16
|
+
}, A = {
|
|
17
|
+
[c.C1]: o.c1,
|
|
18
|
+
[c.C2]: o.c2,
|
|
19
|
+
[c.D1]: o.d1
|
|
20
|
+
}, L = g(
|
|
21
|
+
({
|
|
22
|
+
children: n,
|
|
23
|
+
className: p,
|
|
24
|
+
size: r,
|
|
25
|
+
tag: i = "span",
|
|
26
|
+
type: m = T.PRIMARY,
|
|
27
|
+
weight: l = e.REGULAR,
|
|
28
|
+
underline: t,
|
|
29
|
+
strikethrough: a,
|
|
30
|
+
...C
|
|
31
|
+
}, _) => {
|
|
32
|
+
const d = y(
|
|
33
|
+
s.typography,
|
|
34
|
+
o.caption,
|
|
35
|
+
A[r],
|
|
36
|
+
b[m],
|
|
37
|
+
F[l],
|
|
38
|
+
{
|
|
39
|
+
[s.strikethrough]: !!a && !t,
|
|
40
|
+
[s.underline]: !!t && !a,
|
|
41
|
+
[s.underlineStrikethrough]: !!a && !!t
|
|
42
|
+
},
|
|
43
|
+
p
|
|
44
|
+
);
|
|
45
|
+
return /* @__PURE__ */ f(i, { ref: _, className: d, ...C, children: n });
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
L.displayName = "Caption";
|
|
49
|
+
export {
|
|
50
|
+
L as Caption,
|
|
51
|
+
A as mapCaptionSizeToCssClass,
|
|
52
|
+
F as mapFontWeightTextToCssClass
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=Caption.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { c as g } from "../../chunks/vendor-CF2m175I.js";
|
|
4
|
+
import { ETextSize as e, EFontWeightText as b, ELineType as r, EFontType as C } from "./enums.js";
|
|
5
|
+
import { t, m as R } from "../../chunks/utils-VD40Qwop.js";
|
|
6
|
+
const E = "text__db5a2ad3", L = "regular__5eaf5817", A = "semibold__ebfbc5a3", u = "b1__5fd5e8bd", B = "b2__e0cd448c", M = "b3__e2605073", S = "b4__d61c0f6b", s = {
|
|
7
|
+
text: E,
|
|
8
|
+
regular: L,
|
|
9
|
+
semibold: A,
|
|
10
|
+
b1: u,
|
|
11
|
+
b2: B,
|
|
12
|
+
b3: M,
|
|
13
|
+
b4: S
|
|
14
|
+
}, h = {
|
|
15
|
+
[e.B1]: s.b1,
|
|
16
|
+
[e.B2]: s.b2,
|
|
17
|
+
[e.B3]: s.b3,
|
|
18
|
+
[e.B4]: s.b4
|
|
19
|
+
}, F = {
|
|
20
|
+
[b.REGULAR]: s.regular,
|
|
21
|
+
[b.SEMIBOLD]: s.semibold
|
|
22
|
+
}, N = {
|
|
23
|
+
[r.NORMAL]: "",
|
|
24
|
+
[r.COMPACT]: t.compact
|
|
25
|
+
}, O = y(
|
|
26
|
+
({
|
|
27
|
+
children: c,
|
|
28
|
+
className: m,
|
|
29
|
+
size: n,
|
|
30
|
+
tag: p = "span",
|
|
31
|
+
type: l = C.PRIMARY,
|
|
32
|
+
weight: T = b.REGULAR,
|
|
33
|
+
line: i = r.NORMAL,
|
|
34
|
+
underline: o,
|
|
35
|
+
strikethrough: a,
|
|
36
|
+
...x
|
|
37
|
+
}, _) => {
|
|
38
|
+
const d = g(
|
|
39
|
+
t.typography,
|
|
40
|
+
s.text,
|
|
41
|
+
h[n],
|
|
42
|
+
R[l],
|
|
43
|
+
F[T],
|
|
44
|
+
N[i],
|
|
45
|
+
{
|
|
46
|
+
[t.strikethrough]: !!a && !o,
|
|
47
|
+
[t.underline]: !!o && !a,
|
|
48
|
+
[t.underlineStrikethrough]: !!a && !!o
|
|
49
|
+
},
|
|
50
|
+
m
|
|
51
|
+
);
|
|
52
|
+
return /* @__PURE__ */ f(p, { ref: _, className: d, ...x, children: c });
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
O.displayName = "Text";
|
|
56
|
+
export {
|
|
57
|
+
O as Text,
|
|
58
|
+
F as mapFontWeightTextToCssClass,
|
|
59
|
+
N as mapTextLineTypeToCssClass,
|
|
60
|
+
h as mapTextSizeToCssClass
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as T } from "react";
|
|
3
|
+
import { c as b } from "../../chunks/vendor-CF2m175I.js";
|
|
4
|
+
import { ETitleSize as a, EFontWeightTitle as o, EFontType as g } from "./enums.js";
|
|
5
|
+
import { t as s, m as u } from "../../chunks/utils-VD40Qwop.js";
|
|
6
|
+
const y = "title__cb52ba0a", E = "regular__5eaf5817", C = "semibold__ebfbc5a3", S = "medium__ffa29861", M = "bold__2346c450", R = "h1__3f84978c", D = "h2__5c65e98c", F = "h3__03e6f499", t = {
|
|
7
|
+
title: y,
|
|
8
|
+
regular: E,
|
|
9
|
+
semibold: C,
|
|
10
|
+
medium: S,
|
|
11
|
+
bold: M,
|
|
12
|
+
h1: R,
|
|
13
|
+
h2: D,
|
|
14
|
+
h3: F
|
|
15
|
+
}, I = {
|
|
16
|
+
[a.H1]: t.h1,
|
|
17
|
+
[a.H2]: t.h2,
|
|
18
|
+
[a.H3]: t.h3
|
|
19
|
+
}, L = {
|
|
20
|
+
[o.MEDIUM]: t.medium,
|
|
21
|
+
[o.REGULAR]: t.regular,
|
|
22
|
+
[o.SEMIBOLD]: t.semibold,
|
|
23
|
+
[o.BOLD]: t.bold
|
|
24
|
+
}, x = T(
|
|
25
|
+
({
|
|
26
|
+
children: i,
|
|
27
|
+
className: r,
|
|
28
|
+
size: m,
|
|
29
|
+
tag: c = `${m}`,
|
|
30
|
+
type: n = g.PRIMARY,
|
|
31
|
+
weight: h = o.SEMIBOLD,
|
|
32
|
+
underline: e,
|
|
33
|
+
strikethrough: l,
|
|
34
|
+
...p
|
|
35
|
+
}, _) => {
|
|
36
|
+
const d = b(
|
|
37
|
+
s.typography,
|
|
38
|
+
t.title,
|
|
39
|
+
I[m],
|
|
40
|
+
u[n],
|
|
41
|
+
L[h],
|
|
42
|
+
{
|
|
43
|
+
[s.strikethrough]: !!l && !e,
|
|
44
|
+
[s.underline]: !!e && !l,
|
|
45
|
+
[s.underlineStrikethrough]: !!l && !!e
|
|
46
|
+
},
|
|
47
|
+
r
|
|
48
|
+
);
|
|
49
|
+
return /* @__PURE__ */ f(c, { ref: _, className: d, ...p, children: i });
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
x.displayName = "Title";
|
|
53
|
+
export {
|
|
54
|
+
x as Title,
|
|
55
|
+
L as mapFontWeightTitleToCssClass,
|
|
56
|
+
I as mapTitleSizeToCssClass
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=Title.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var a = /* @__PURE__ */ ((r) => (r.B1 = "B1", r.B2 = "B2", r.B3 = "B3", r.B4 = "B4", r))(a || {}), R = /* @__PURE__ */ ((r) => (r.C1 = "C1", r.C2 = "C2", r.D1 = "D1", r))(R || {}), B = /* @__PURE__ */ ((r) => (r.H1 = "h1", r.H2 = "h2", r.H3 = "h3", r))(B || {}), u = /* @__PURE__ */ ((r) => (r.PRIMARY = "primary", r.COMPLEMENTARY = "complementary", r.SECONDARY = "secondary", r.TERTIARY = "tertiary", r.DISABLED = "disabled", r.BRAND = "brand", r.INFO = "info", r.SUCCESS = "success", r.WARNING = "warning", r.ERROR = "error", r.SYSTEM = "system", r))(u || {}), A = /* @__PURE__ */ ((r) => (r.REGULAR = "regular", r.SEMIBOLD = "semibold", r))(A || {}), m = /* @__PURE__ */ ((r) => (r.MEDIUM = "medium", r.REGULAR = "regular", r.SEMIBOLD = "semibold", r.BOLD = "bold", r))(m || {}), D = /* @__PURE__ */ ((r) => (r.NORMAL = "normal", r.COMPACT = "compact", r))(D || {});
|
|
2
|
+
export {
|
|
3
|
+
R as ECaptionSize,
|
|
4
|
+
u as EFontType,
|
|
5
|
+
A as EFontWeightText,
|
|
6
|
+
m as EFontWeightTitle,
|
|
7
|
+
D as ELineType,
|
|
8
|
+
a as ETextSize,
|
|
9
|
+
B as ETitleSize
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Title as o } from "./Title.js";
|
|
2
|
+
import { Text as p } from "./Text.js";
|
|
3
|
+
import { Caption as T } from "./Caption.js";
|
|
4
|
+
import { ECaptionSize as E, EFontType as n, EFontWeightText as f, EFontWeightTitle as m, ELineType as l, ETextSize as z, ETitleSize as F } from "./enums.js";
|
|
5
|
+
export {
|
|
6
|
+
T as Caption,
|
|
7
|
+
E as ECaptionSize,
|
|
8
|
+
n as EFontType,
|
|
9
|
+
f as EFontWeightText,
|
|
10
|
+
m as EFontWeightTitle,
|
|
11
|
+
l as ELineType,
|
|
12
|
+
z as ETextSize,
|
|
13
|
+
F as ETitleSize,
|
|
14
|
+
p as Text,
|
|
15
|
+
o as Title
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom/client";
|
|
4
|
+
import "../../chunks/vendor-CF2m175I.js";
|
|
5
|
+
import { a as e, U as i } from "./components/UploadZoneInput.js";
|
|
6
|
+
export {
|
|
7
|
+
e as UploadZone,
|
|
8
|
+
i as UploadZoneContext
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=UploadZone.js.map
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var f = (s, r, e) => r in s ? m(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
|
|
3
|
+
var o = (s, r, e) => f(s, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jsx as C, jsxs as A } from "react/jsx-runtime";
|
|
5
|
+
import c, { createElement as l } 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__4d93ecba", N = "uploadZoneDragArea__78ab5ceb", x = "uploadZoneContainerDragArea__d4f231c2", _ = "uploadZoneInput__442dd692", 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__ */ l(
|
|
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, ...d } = this.props, i = document.createElement("div");
|
|
60
|
+
return L(i).render(
|
|
61
|
+
/* @__PURE__ */ l(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: h(p.uploadZoneContainerDragArea, t),
|
|
65
|
+
onDragOver: this.handlePreventDefault,
|
|
66
|
+
onDrop: this.fileDrop,
|
|
67
|
+
...d,
|
|
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, ...d } = 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": "0.1.6", children: [
|
|
121
|
+
/* @__PURE__ */ l(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
className: h(p.uploadZoneDragArea, t),
|
|
125
|
+
onClick: this.handleAreaClick,
|
|
126
|
+
...d,
|
|
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);
|
|
138
|
+
export {
|
|
139
|
+
g as U,
|
|
140
|
+
D as UploadZoneInput,
|
|
141
|
+
u as a
|
|
142
|
+
};
|
|
143
|
+
//# sourceMappingURL=UploadZoneInput.js.map
|