@itcase/ui 1.8.122 → 1.8.124
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/dist/Avatar_cjs_mojzcWRL.js +161 -0
- package/dist/Avatar_es_BFom0nAS.js +157 -0
- package/dist/{Button_cjs_i0Dn1pkl.js → Button_cjs_CZz8OjWi.js} +42 -30
- package/dist/{Button_es_CtH5EKJd.js → Button_es_Cn3wtv3M.js} +42 -30
- package/dist/ChipsGroup_cjs_Dgskkc1e.js +344 -0
- package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_BVQ7_n0k.js} +48 -35
- package/dist/DatePicker_cjs_Lzrr9Amf.js +182 -0
- package/dist/DatePicker_es_D1LvY5RT.js +178 -0
- package/dist/Divider_cjs_DrmV2ezS.js +105 -0
- package/dist/Divider_es_BiYozVBS.js +101 -0
- package/dist/DropdownItem_cjs_rKLdFxSj.js +211 -0
- package/dist/DropdownItem_es_B-1qtEa7.js +206 -0
- package/dist/Group_cjs_DmfeUcFI.js +59 -0
- package/dist/Group_es_BU5k8f5S.js +55 -0
- package/dist/{Icon_cjs_Cz6IyOkb.js → Icon_cjs_DpFxIFv5.js} +170 -121
- package/dist/{Icon_es_BrwLifge.js → Icon_es_D5eiycFI.js} +170 -121
- package/dist/Image_cjs_CBDMUzv_.js +29 -0
- package/dist/Image_es_BHec4iVN.js +27 -0
- package/dist/{Input_cjs_Du73R-wm.js → Input_cjs_DDi5JVAV.js} +27 -19
- package/dist/{Input_es_CiDHjDqJ.js → Input_es_BnCXATnh.js} +27 -19
- package/dist/{Label_cjs_DMoaOoHi.js → Label_cjs_C-x9blCL.js} +45 -33
- package/dist/{Label_es_SULlg9bL.js → Label_es_DCqpSw_F.js} +45 -33
- package/dist/{Link_cjs_C5UsZUiF.js → Link_cjs_qKXVfU8e.js} +43 -30
- package/dist/{Link_es_XiqbdwLp.js → Link_es_P2b6ya7P.js} +43 -30
- package/dist/Loader_cjs_DIDsIq3J.js +143 -0
- package/dist/Loader_es_CmSggwbR.js +139 -0
- package/dist/Overlay_cjs_tGA2fU43.js +42 -0
- package/dist/Overlay_es_BS7OTFoy.js +38 -0
- package/dist/{Scrollbar_cjs_DcKOfcNp.js → Scrollbar_cjs_Cp-7v2Mt.js} +1 -1
- package/dist/{Scrollbar_es_CThJeCLF.js → Scrollbar_es_CcMgNvGi.js} +1 -1
- package/dist/Text_cjs_BDTjOTVB.js +69 -0
- package/dist/Text_es_CnymlElo.js +65 -0
- package/dist/cjs/components/Accordion.js +37 -34
- package/dist/cjs/components/Avatar.js +5 -6
- package/dist/cjs/components/AvatarStack/stories/__mock__.js +1 -1
- package/dist/cjs/components/AvatarStack.js +17 -16
- package/dist/cjs/components/Badge.js +3 -4
- package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +1 -1
- package/dist/cjs/components/Breadcrumbs.js +27 -23
- package/dist/cjs/components/Button.js +5 -6
- package/dist/cjs/components/Cell/stories/__mock__.js +1 -1
- package/dist/cjs/components/Cell.js +28 -25
- package/dist/cjs/components/Checkbox.js +33 -26
- package/dist/cjs/components/Checkmark.js +28 -23
- package/dist/cjs/components/Chips/stories/__mock__.js +1 -1
- package/dist/cjs/components/Chips.js +4 -5
- package/dist/cjs/components/Choice/stories/__mock__.js +2 -2
- package/dist/cjs/components/Choice.js +46 -40
- package/dist/cjs/components/Code.js +34 -26
- package/dist/cjs/components/CookiesWarning.js +23 -23
- package/dist/cjs/components/Dadata.js +14 -9
- package/dist/cjs/components/DatePeriod.js +32 -30
- package/dist/cjs/components/DatePicker.js +8 -9
- package/dist/cjs/components/Divider.js +1 -2
- package/dist/cjs/components/Dot.js +5 -6
- package/dist/cjs/components/Drawer.js +23 -21
- package/dist/cjs/components/Dropdown/stories/__mock__.js +6 -6
- package/dist/cjs/components/Dropdown.js +5 -6
- package/dist/cjs/components/Flex.js +11 -12
- package/dist/cjs/components/Grid.js +15 -16
- package/dist/cjs/components/Group.js +1 -2
- package/dist/cjs/components/HTMLContent.js +5 -6
- package/dist/cjs/components/HeroTitle.js +17 -16
- package/dist/cjs/components/Icon.js +3 -4
- package/dist/cjs/components/Image.js +1 -2
- package/dist/cjs/components/Input.js +1 -2
- package/dist/cjs/components/InputPassword.js +114 -84
- package/dist/cjs/components/Label.js +4 -5
- package/dist/cjs/components/Link.js +1 -2
- package/dist/cjs/components/List.js +39 -28
- package/dist/cjs/components/Loader.js +2 -3
- package/dist/cjs/components/Logo.js +10 -11
- package/dist/cjs/components/MenuItem.js +36 -33
- package/dist/cjs/components/Modal.js +40 -38
- package/dist/cjs/components/ModalSheetBottom.js +17 -18
- package/dist/cjs/components/Notification/stories/__mock__.js +1 -1
- package/dist/cjs/components/Notification.js +31 -24
- package/dist/cjs/components/Overlay.js +1 -2
- package/dist/cjs/components/Pagination.js +43 -41
- package/dist/cjs/components/Radio.js +34 -26
- package/dist/cjs/components/RangeSlider.js +8 -9
- package/dist/cjs/components/Response/img.js +1 -1
- package/dist/cjs/components/Response.js +102 -84
- package/dist/cjs/components/SVGContent.js +6 -7
- package/dist/cjs/components/ScrollOnDrag/stories/__mock__.js +2 -2
- package/dist/cjs/components/ScrollOnDrag.js +7 -8
- package/dist/cjs/components/ScrollToView.js +8 -9
- package/dist/cjs/components/Scrollbar/stories/__mock__.js +1 -1
- package/dist/cjs/components/Scrollbar.js +1 -1
- package/dist/cjs/components/Search.js +39 -31
- package/dist/cjs/components/Segmented/stories/__mock__.js +23 -10
- package/dist/cjs/components/Segmented.js +47 -42
- package/dist/cjs/components/Select.js +118 -113
- package/dist/cjs/components/Swiper/stories/__mock__.js +3 -3
- package/dist/cjs/components/Swiper.js +27 -29
- package/dist/cjs/components/Switch.js +33 -26
- package/dist/cjs/components/Tab/stories/__mock__.js +1 -1
- package/dist/cjs/components/Tab.js +59 -69
- package/dist/cjs/components/Text.js +1 -2
- package/dist/cjs/components/Textarea.js +26 -18
- package/dist/cjs/components/Tile.js +21 -17
- package/dist/cjs/components/Title.js +3 -4
- package/dist/cjs/components/Tooltip.js +3 -4
- package/dist/cjs/components/Video/stories/__mocks__.js +1 -1
- package/dist/cjs/components/Video.js +3 -4
- package/dist/cjs/components/Warning.js +26 -20
- package/dist/cjs/context/Notifications.js +38 -42
- package/dist/cjs/context/UIContext.js +19 -17
- package/dist/cjs/context/UrlAssetPrefix.js +3 -3
- package/dist/cjs/hoc/urlWithAssetPrefix.js +13 -16
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +25 -29
- package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
- package/dist/cjs/hooks/useAppearanceConfig.js +0 -1
- package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
- package/dist/cjs/hooks/useDevicePropsGenerator.js +0 -1
- package/dist/cjs/hooks/useDeviceTargetClass.js +0 -1
- package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/cjs/hooks/useStyles/useStyles.js +0 -1
- package/dist/cjs/hooks/useStyles.js +0 -1
- package/dist/cjs/hooks/useViewportFix.js +5 -5
- package/dist/cjs/hooks.js +1 -1
- package/dist/cjs/utils/setViewportProperty.js +3 -3
- package/dist/components/Accordion.js +37 -34
- package/dist/components/Avatar.js +5 -6
- package/dist/components/AvatarStack/stories/__mock__.js +1 -1
- package/dist/components/AvatarStack.js +17 -16
- package/dist/components/Badge.js +3 -4
- package/dist/components/Breadcrumbs/stories/__mock__.js +1 -1
- package/dist/components/Breadcrumbs.js +27 -23
- package/dist/components/Button.js +5 -6
- package/dist/components/Cell/stories/__mock__.js +1 -1
- package/dist/components/Cell.js +28 -25
- package/dist/components/Checkbox.js +33 -26
- package/dist/components/Checkmark.js +28 -23
- package/dist/components/Chips/stories/__mock__.js +1 -1
- package/dist/components/Chips.js +4 -5
- package/dist/components/Choice/stories/__mock__.js +2 -2
- package/dist/components/Choice.js +46 -40
- package/dist/components/Code.js +34 -26
- package/dist/components/CookiesWarning.js +23 -23
- package/dist/components/Dadata.js +14 -9
- package/dist/components/DatePeriod.js +32 -30
- package/dist/components/DatePicker.js +8 -9
- package/dist/components/Divider.js +1 -2
- package/dist/components/Dot.js +5 -6
- package/dist/components/Drawer.js +23 -21
- package/dist/components/Dropdown/stories/__mock__.js +6 -6
- package/dist/components/Dropdown.js +5 -6
- package/dist/components/Flex.js +11 -12
- package/dist/components/Grid.js +15 -16
- package/dist/components/Group.js +1 -2
- package/dist/components/HTMLContent.js +5 -6
- package/dist/components/HeroTitle.js +17 -16
- package/dist/components/Icon.js +3 -4
- package/dist/components/Image.js +1 -2
- package/dist/components/Input.js +1 -2
- package/dist/components/InputPassword.js +114 -84
- package/dist/components/Label.js +4 -5
- package/dist/components/Link.js +1 -2
- package/dist/components/List.js +39 -28
- package/dist/components/Loader.js +2 -3
- package/dist/components/Logo.js +10 -11
- package/dist/components/MenuItem.js +36 -33
- package/dist/components/Modal.js +40 -38
- package/dist/components/ModalSheetBottom.js +17 -18
- package/dist/components/Notification/stories/__mock__.js +1 -1
- package/dist/components/Notification.js +31 -24
- package/dist/components/Overlay.js +1 -2
- package/dist/components/Pagination.js +43 -41
- package/dist/components/Radio.js +34 -26
- package/dist/components/RangeSlider.js +8 -9
- package/dist/components/Response/img.js +1 -1
- package/dist/components/Response.js +102 -84
- package/dist/components/SVGContent.js +6 -7
- package/dist/components/ScrollOnDrag/stories/__mock__.js +2 -2
- package/dist/components/ScrollOnDrag.js +7 -8
- package/dist/components/ScrollToView.js +8 -9
- package/dist/components/Scrollbar/stories/__mock__.js +1 -1
- package/dist/components/Scrollbar.js +1 -1
- package/dist/components/Search.js +39 -31
- package/dist/components/Segmented/stories/__mock__.js +23 -10
- package/dist/components/Segmented.js +47 -42
- package/dist/components/Select.js +118 -113
- package/dist/components/Swiper/stories/__mock__.js +3 -3
- package/dist/components/Swiper.js +27 -29
- package/dist/components/Switch.js +33 -26
- package/dist/components/Tab/stories/__mock__.js +1 -1
- package/dist/components/Tab.js +59 -69
- package/dist/components/Text.js +1 -2
- package/dist/components/Textarea.js +26 -18
- package/dist/components/Tile.js +21 -17
- package/dist/components/Title.js +3 -4
- package/dist/components/Tooltip.js +3 -4
- package/dist/components/Video/stories/__mocks__.js +1 -1
- package/dist/components/Video.js +3 -4
- package/dist/components/Warning.js +26 -20
- package/dist/context/Notifications.js +38 -42
- package/dist/context/UIContext.js +19 -17
- package/dist/context/UrlAssetPrefix.js +3 -3
- package/dist/css/components/Checkmark/Checkmark.css +2 -0
- package/dist/css/components/DatePeriod/DatePeriod.css +3 -0
- package/dist/css/components/Input/Input.css +0 -8
- package/dist/css/components/InputPassword/InputPassword.css +34 -43
- package/dist/css/components/Tile/Tile.css +3 -3
- package/dist/hoc/urlWithAssetPrefix.js +13 -16
- package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
- package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
- package/dist/hooks/useActiveClasses/useActiveClasses.js +25 -29
- package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
- package/dist/hooks/useAppearanceConfig.js +0 -1
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
- package/dist/hooks/useDevicePropsGenerator.js +0 -1
- package/dist/hooks/useDeviceTargetClass.js +0 -1
- package/dist/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/hooks/useStyles/useStyles.js +0 -1
- package/dist/hooks/useStyles.js +0 -1
- package/dist/hooks/useViewportFix.js +5 -5
- package/dist/hooks.js +1 -1
- package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +179 -2
- package/dist/types/components/InputPassword/appearance/inputPasswordDefault.d.ts +7 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordDisabled.d.ts +6 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordError.d.ts +6 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordRequire.d.ts +6 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordShape.d.ts +25 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordSize.d.ts +14 -28
- package/dist/types/components/InputPassword/appearance/inputPasswordStyle.d.ts +5 -5
- package/dist/types/components/InputPassword/appearance/inputPasswordSuccess.d.ts +6 -4
- package/dist/types/components/Response/Response.constant.d.ts +32 -35
- package/dist/types/components/Response/appearance/responseConfirm.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseDanger.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseEmpty.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseError.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseFail.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseNothingFound.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseRefresh.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseSuccess.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseUnableLoadData.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseWarning.d.ts +1 -0
- package/dist/types/components/Select/SelectContainer.d.ts +1 -1
- package/dist/types/components/Tab/appearance/tabSize.d.ts +0 -14
- package/dist/types/components/Tab/appearance/tabSurface.d.ts +7 -7
- package/dist/utils/setViewportProperty.js +3 -3
- package/package.json +14 -14
- package/dist/Avatar_cjs_kuE0Rueg.js +0 -157
- package/dist/Avatar_es_lx7s4Vla.js +0 -153
- package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
- package/dist/DatePicker_cjs_DsIAoi01.js +0 -183
- package/dist/DatePicker_es_BP5BrEr-.js +0 -179
- package/dist/Divider_cjs_DUYtmwn2.js +0 -97
- package/dist/Divider_es_CCLBFIx6.js +0 -93
- package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
- package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
- package/dist/Group_cjs_CsJ6ICKK.js +0 -59
- package/dist/Group_es_DRqIIM9m.js +0 -55
- package/dist/Image_cjs_B6YlGx8G.js +0 -28
- package/dist/Image_es_BvYo_cHH.js +0 -26
- package/dist/Loader_cjs_D3lnxPlI.js +0 -132
- package/dist/Loader_es_BUSqFrCd.js +0 -128
- package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
- package/dist/Overlay_es_DF3DAdxS.js +0 -37
- package/dist/Text_cjs_0EINiUq4.js +0 -68
- package/dist/Text_es_CwV9rjFD.js +0 -64
- package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
- package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
|
@@ -20,7 +20,7 @@ var img$1 = "data:image/svg+xml,%3csvg width='180' height='180' viewBox='0 0 180
|
|
|
20
20
|
|
|
21
21
|
var img = "data:image/svg+xml,%3csvg width='180' height='180' viewBox='0 0 180 180' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='180' height='180' rx='90' fill='%23DE8806'/%3e%3cpath d='M90.5029 123.721C93.8166 123.721 96.5029 126.407 96.5029 129.721V134.749C96.5027 138.063 93.8165 140.749 90.5029 140.749C87.1894 140.749 84.5031 138.063 84.5029 134.749V129.721C84.5029 126.407 87.1892 123.721 90.5029 123.721ZM90.5029 39.251C93.8166 39.251 96.5029 41.9383 96.5029 45.252V104.582C96.5024 107.895 93.8163 110.582 90.5029 110.582C87.1895 110.582 84.5034 107.895 84.5029 104.582V45.252C84.5029 41.9382 87.1892 39.251 90.5029 39.251Z' fill='white'/%3e%3c/svg%3e";
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
const responseIcon = {
|
|
24
24
|
Error: img$7,
|
|
25
25
|
Warning: img,
|
|
26
26
|
Success: img$2,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { responseIcon } from './Response/img.js';
|
|
2
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
3
|
import { useMemo } from 'react';
|
|
5
4
|
import clsx from 'clsx';
|
|
@@ -7,9 +6,9 @@ import { urlWithAssetPrefix } from '../hoc/urlWithAssetPrefix.js';
|
|
|
7
6
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
8
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
9
8
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
10
|
-
import { B as Button } from '../
|
|
11
|
-
import { G as Group } from '../
|
|
12
|
-
import { T as Text } from '../
|
|
9
|
+
import { B as Button } from '../Button_es_Cn3wtv3M.js';
|
|
10
|
+
import { G as Group } from '../Group_es_BU5k8f5S.js';
|
|
11
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
13
12
|
import '@itcase/common';
|
|
14
13
|
import '../context/UrlAssetPrefix.js';
|
|
15
14
|
import 'lodash/camelCase';
|
|
@@ -24,18 +23,19 @@ import '../utils/setViewportProperty.js';
|
|
|
24
23
|
import '../hooks.js';
|
|
25
24
|
import '../hooks/useStyles/styleAttributes.js';
|
|
26
25
|
import 'lodash/maxBy';
|
|
27
|
-
import '../
|
|
26
|
+
import '../Icon_es_D5eiycFI.js';
|
|
28
27
|
import 'react-inlinesvg';
|
|
29
|
-
import '../
|
|
30
|
-
import '../
|
|
28
|
+
import '../Link_es_P2b6ya7P.js';
|
|
29
|
+
import '../Loader_es_CmSggwbR.js';
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
const responseAppearanceConfirm = {
|
|
33
32
|
confirm: {
|
|
34
33
|
fill: 'surfacePrimary',
|
|
35
34
|
titleTextColor: 'surfaceTextPrimary',
|
|
36
35
|
titleTextSize: 'xxl',
|
|
37
36
|
labelTextColor: 'surfaceTextPrimary',
|
|
38
37
|
descTextSize: 'm',
|
|
38
|
+
imageSrc: responseIcon.Confirm,
|
|
39
39
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
40
40
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
41
41
|
svgFill: 'surfaceTertiary',
|
|
@@ -43,13 +43,14 @@ var responseAppearanceConfirm = {
|
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
const responseAppearanceDanger = {
|
|
47
47
|
danger: {
|
|
48
48
|
fill: 'surfacePrimary',
|
|
49
49
|
titleTextColor: 'surfaceTextPrimary',
|
|
50
50
|
titleTextSize: 'xxl',
|
|
51
51
|
labelTextColor: 'surfaceTextPrimary',
|
|
52
52
|
descTextSize: 'm',
|
|
53
|
+
imageSrc: responseIcon.Danger,
|
|
53
54
|
primaryButtonAppearance: 'dangerPrimary sizeXXL solid',
|
|
54
55
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
55
56
|
svgFill: 'dangerPrimary',
|
|
@@ -57,13 +58,14 @@ var responseAppearanceDanger = {
|
|
|
57
58
|
},
|
|
58
59
|
};
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
const responseAppearanceEmpty = {
|
|
61
62
|
empty: {
|
|
62
63
|
fill: 'surfacePrimary',
|
|
63
64
|
titleTextColor: 'surfaceTextPrimary',
|
|
64
65
|
titleTextSize: 'xxl',
|
|
65
66
|
labelTextColor: 'surfaceTextPrimary',
|
|
66
67
|
descTextSize: 'm',
|
|
68
|
+
imageSrc: responseIcon.Empty,
|
|
67
69
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
68
70
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
69
71
|
svgFill: 'surfaceTertiary',
|
|
@@ -71,13 +73,14 @@ var responseAppearanceEmpty = {
|
|
|
71
73
|
},
|
|
72
74
|
};
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
const responseAppearanceError = {
|
|
75
77
|
error: {
|
|
76
78
|
fill: 'surfacePrimary',
|
|
77
79
|
titleTextColor: 'surfaceTextPrimary',
|
|
78
80
|
titleTextSize: 'xxl',
|
|
79
81
|
labelTextColor: 'surfaceTextPrimary',
|
|
80
82
|
descTextSize: 'm',
|
|
83
|
+
imageSrc: responseIcon.Error,
|
|
81
84
|
primaryButtonAppearance: 'errorPrimary sizeXXL solid',
|
|
82
85
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
83
86
|
svgFill: 'errorPrimary',
|
|
@@ -85,13 +88,14 @@ var responseAppearanceError = {
|
|
|
85
88
|
},
|
|
86
89
|
};
|
|
87
90
|
|
|
88
|
-
|
|
91
|
+
const responseAppearanceFail = {
|
|
89
92
|
fail: {
|
|
90
93
|
fill: 'surfacePrimary',
|
|
91
94
|
titleTextColor: 'surfaceTextPrimary',
|
|
92
95
|
titleTextSize: 'xxl',
|
|
93
96
|
labelTextColor: 'surfaceTextPrimary',
|
|
94
97
|
descTextSize: 'm',
|
|
98
|
+
imageSrc: responseIcon.Fail,
|
|
95
99
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
96
100
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
97
101
|
svgFill: 'surfaceTertiary',
|
|
@@ -99,13 +103,14 @@ var responseAppearanceFail = {
|
|
|
99
103
|
},
|
|
100
104
|
};
|
|
101
105
|
|
|
102
|
-
|
|
106
|
+
const responseAppearanceNothingFound = {
|
|
103
107
|
nothingFound: {
|
|
104
108
|
fill: 'surfacePrimary',
|
|
105
109
|
titleTextColor: 'surfaceTextPrimary',
|
|
106
110
|
titleTextSize: 'xxl',
|
|
107
111
|
labelTextColor: 'surfaceTextPrimary',
|
|
108
112
|
descTextSize: 'm',
|
|
113
|
+
imageSrc: responseIcon.NothingFound,
|
|
109
114
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
110
115
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
111
116
|
svgFill: 'surfaceTertiary',
|
|
@@ -113,13 +118,14 @@ var responseAppearanceNothingFound = {
|
|
|
113
118
|
},
|
|
114
119
|
};
|
|
115
120
|
|
|
116
|
-
|
|
121
|
+
const responseAppearanceRefresh = {
|
|
117
122
|
refresh: {
|
|
118
123
|
fill: 'surfacePrimary',
|
|
119
124
|
titleTextColor: 'surfaceTextPrimary',
|
|
120
125
|
titleTextSize: 'xxl',
|
|
121
126
|
labelTextColor: 'surfaceTextPrimary',
|
|
122
127
|
descTextSize: 'm',
|
|
128
|
+
imageSrc: responseIcon.Refresh,
|
|
123
129
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
124
130
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
125
131
|
svgFill: 'surfaceTertiary',
|
|
@@ -127,7 +133,7 @@ var responseAppearanceRefresh = {
|
|
|
127
133
|
},
|
|
128
134
|
};
|
|
129
135
|
|
|
130
|
-
|
|
136
|
+
const responseAppearanceStyle = {
|
|
131
137
|
solid: {
|
|
132
138
|
borderColor: 'none',
|
|
133
139
|
},
|
|
@@ -141,13 +147,14 @@ var responseAppearanceStyle = {
|
|
|
141
147
|
},
|
|
142
148
|
};
|
|
143
149
|
|
|
144
|
-
|
|
150
|
+
const responseAppearanceSuccess = {
|
|
145
151
|
success: {
|
|
146
152
|
fill: 'surfacePrimary',
|
|
147
153
|
titleTextColor: 'surfaceTextPrimary',
|
|
148
154
|
titleTextSize: 'xxl',
|
|
149
155
|
labelTextColor: 'surfaceTextPrimary',
|
|
150
156
|
descTextSize: 'm',
|
|
157
|
+
imageSrc: responseIcon.Success,
|
|
151
158
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
152
159
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
153
160
|
svgFill: 'accentPrimary',
|
|
@@ -155,13 +162,14 @@ var responseAppearanceSuccess = {
|
|
|
155
162
|
},
|
|
156
163
|
};
|
|
157
164
|
|
|
158
|
-
|
|
165
|
+
const responseAppearanceUnableLoadData = {
|
|
159
166
|
unableLoadData: {
|
|
160
167
|
fill: 'surfacePrimary',
|
|
161
168
|
titleTextColor: 'surfaceTextPrimary',
|
|
162
169
|
titleTextSize: 'xxl',
|
|
163
170
|
labelTextColor: 'surfaceTextPrimary',
|
|
164
171
|
descTextSize: 'm',
|
|
172
|
+
imageSrc: responseIcon.UnableLoadData,
|
|
165
173
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
166
174
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
167
175
|
svgFill: 'surfaceTertiary',
|
|
@@ -169,13 +177,14 @@ var responseAppearanceUnableLoadData = {
|
|
|
169
177
|
},
|
|
170
178
|
};
|
|
171
179
|
|
|
172
|
-
|
|
180
|
+
const responseAppearanceWarning = {
|
|
173
181
|
warning: {
|
|
174
182
|
fill: 'surfacePrimary',
|
|
175
183
|
titleTextColor: 'surfaceTextPrimary',
|
|
176
184
|
titleTextSize: 'xxl',
|
|
177
185
|
labelTextColor: 'surfaceTextPrimary',
|
|
178
186
|
descTextSize: 'm',
|
|
187
|
+
imageSrc: responseIcon.Warning,
|
|
179
188
|
primaryButtonAppearance: 'warningPrimary sizeXXL solid',
|
|
180
189
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
181
190
|
svgFill: 'warningPrimary',
|
|
@@ -183,32 +192,44 @@ var responseAppearanceWarning = {
|
|
|
183
192
|
},
|
|
184
193
|
};
|
|
185
194
|
|
|
186
|
-
|
|
195
|
+
const responseAppearance = {
|
|
196
|
+
...responseAppearanceConfirm,
|
|
197
|
+
...responseAppearanceEmpty,
|
|
198
|
+
...responseAppearanceDanger,
|
|
199
|
+
...responseAppearanceRefresh,
|
|
200
|
+
...responseAppearanceUnableLoadData,
|
|
201
|
+
...responseAppearanceNothingFound,
|
|
202
|
+
...responseAppearanceFail,
|
|
203
|
+
...responseAppearanceError,
|
|
204
|
+
...responseAppearanceSuccess,
|
|
205
|
+
...responseAppearanceWarning,
|
|
206
|
+
...responseAppearanceStyle,
|
|
207
|
+
};
|
|
187
208
|
|
|
188
|
-
|
|
209
|
+
const responseConfig = {
|
|
189
210
|
appearance: responseAppearance,
|
|
190
|
-
setAppearance:
|
|
211
|
+
setAppearance: (appearanceConfig) => {
|
|
191
212
|
responseConfig.appearance = appearanceConfig;
|
|
192
213
|
},
|
|
193
214
|
};
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
215
|
+
const Response = urlWithAssetPrefix(function Response(props) {
|
|
216
|
+
const { appearance, className, width, height, title, desc, secondaryButton, primaryButton, before, after, isSkeleton, onClickSecondaryButton, } = props;
|
|
217
|
+
const appearanceConfig = useAppearanceConfig(appearance, responseConfig);
|
|
218
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
219
|
+
const { dataTestId, dataTour, fillClass, fillHoverClass, titleTextColor, titleTextSize, titleTextWeight, descTextColor, descTextSize, descTextWeight, borderColorClass, borderColorHoverClass, borderTypeClass, borderWidthClass, onClickPrimaryButton, secondaryButtonAfter, secondaryButtonAppearance, secondaryButtonBefore, secondaryButtonFill, secondaryButtonFillHover, secondaryButtonLabel, secondaryButtonLabelTextColor, secondaryButtonLabelTextSize, secondaryButtonShape, secondaryButtonSize, secondaryButtonWidth, imageSrc, primaryButtonAfter, primaryButtonAppearance, primaryButtonBefore, primaryButtonFill, primaryButtonFillHover, primaryButtonLabel, primaryButtonLabelTextColor, primaryButtonLabelTextSize, primaryButtonShape, primaryButtonSize, primaryButtonWidth, shapeClass, shapeStrengthClass, svgFillClass, SvgImage, svgPathFillClass, svgSrc, widthClass, } = propsGenerator;
|
|
199
220
|
// TODO: use Icon instead?
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
221
|
+
const ImageComponent = useMemo(() => {
|
|
222
|
+
const src = imageSrc || svgSrc;
|
|
223
|
+
const Image = SvgImage;
|
|
203
224
|
if (Image) {
|
|
204
|
-
|
|
225
|
+
const sizes = {};
|
|
205
226
|
if (width) {
|
|
206
227
|
sizes.width = width;
|
|
207
228
|
}
|
|
208
229
|
if (height) {
|
|
209
230
|
sizes.height = height;
|
|
210
231
|
}
|
|
211
|
-
return jsx(Image,
|
|
232
|
+
return jsx(Image, { ...sizes });
|
|
212
233
|
}
|
|
213
234
|
if (src) {
|
|
214
235
|
// if (src.endsWith('.svg') || src.startsWith('data:image/svg')) {
|
|
@@ -223,90 +244,87 @@ var Response = urlWithAssetPrefix(function Response(props) {
|
|
|
223
244
|
return null;
|
|
224
245
|
}, [imageSrc, svgSrc, SvgImage, width, height, svgFillClass]);
|
|
225
246
|
// @ts-expect-error
|
|
226
|
-
|
|
227
|
-
return (jsxs("div", { className: clsx(className, 'response', fillClass &&
|
|
247
|
+
const { styles: responseStyles, wrapper: wrapperStyles } = useStyles(props);
|
|
248
|
+
return (jsxs("div", { className: clsx(className, 'response', fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, widthClass && `width_${widthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, isSkeleton && `response_skeleton`), "data-test-id": dataTestId, "data-tour": dataTour, style: responseStyles, children: [before, jsxs("div", { className: "response__wrapper", style: wrapperStyles, children: [ImageComponent && (jsx("div", { className: clsx('response__image', svgFillClass && `svg_fill_${svgFillClass}`, svgPathFillClass && `svg_path_fill_${svgPathFillClass}`), children: ImageComponent })), jsxs("div", { className: "response__wrapper-inner", children: [title && (jsx(Text, { className: "response__title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title })), desc && (jsx(Text, { className: "response__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] })] }), (primaryButtonLabel ||
|
|
228
249
|
primaryButton ||
|
|
229
250
|
secondaryButtonLabel ||
|
|
230
251
|
secondaryButton ||
|
|
231
252
|
appearanceConfig) && (jsxs(Group, { className: "response__button", width: "fill", children: [primaryButtonLabel ? (jsx(Button, { className: "response__button-item", appearance: primaryButtonAppearance, width: primaryButtonWidth || 'fill', size: primaryButtonSize, fill: primaryButtonFill, fillHover: primaryButtonFillHover, label: primaryButtonLabel, labelTextColor: primaryButtonLabelTextColor, labelTextSize: primaryButtonLabelTextSize, shape: primaryButtonShape, before: primaryButtonBefore, after: primaryButtonAfter, onClick: onClickPrimaryButton })) : (primaryButton), secondaryButtonLabel ? (jsx(Button, { className: "response__button-item", appearance: secondaryButtonAppearance, width: secondaryButtonWidth || 'fill', size: secondaryButtonSize, fill: secondaryButtonFill, fillHover: secondaryButtonFillHover, label: secondaryButtonLabel, labelTextColor: secondaryButtonLabelTextColor, labelTextSize: secondaryButtonLabelTextSize, shape: secondaryButtonShape, before: secondaryButtonBefore, after: secondaryButtonAfter, onClick: onClickSecondaryButton })) : (secondaryButton)] })), after] }));
|
|
232
253
|
});
|
|
233
254
|
|
|
234
|
-
|
|
255
|
+
const RESPONSE_MESSAGES = {
|
|
256
|
+
empty: {
|
|
257
|
+
appearance: 'refresh ghost',
|
|
258
|
+
title: ' Список пуст',
|
|
259
|
+
desc: 'Нет данных по заданным параметрам',
|
|
260
|
+
code: '500',
|
|
261
|
+
imageSrc: responseIcon.Empty,
|
|
262
|
+
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
263
|
+
primaryButtonLabel: 'ОК',
|
|
264
|
+
},
|
|
235
265
|
error: {
|
|
236
|
-
imageSrc: responseIcon.Error,
|
|
237
266
|
appearance: 'error ghost',
|
|
238
267
|
title: 'Ошибка',
|
|
239
|
-
code: '500',
|
|
240
268
|
desc: 'Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com',
|
|
241
|
-
|
|
269
|
+
code: '500',
|
|
270
|
+
imageSrc: responseIcon.Error,
|
|
242
271
|
primaryButtonAppearance: 'errorPrimary sizeXXL solid rounded',
|
|
243
|
-
|
|
272
|
+
primaryButtonLabel: 'ОК',
|
|
244
273
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
245
|
-
},
|
|
246
|
-
errorRequest: {
|
|
247
|
-
imageSrc: responseIcon.UnableLoadData,
|
|
248
|
-
appearance: 'refresh ghost',
|
|
249
|
-
title: 'Доступ ограничен',
|
|
250
|
-
code: '403',
|
|
251
|
-
desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
|
|
252
|
-
primaryButtonLabel: 'Повторить',
|
|
253
|
-
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
254
274
|
secondaryButtonLabel: 'Отмена',
|
|
255
|
-
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
256
275
|
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
276
|
+
warning: {
|
|
277
|
+
appearance: 'warning ghost',
|
|
278
|
+
title: 'Внимание',
|
|
279
|
+
imageSrc: responseIcon.Warning,
|
|
280
|
+
primaryButtonAppearance: 'warningPrimary sizeXXL solid rounded',
|
|
281
|
+
primaryButtonLabel: 'Повторить',
|
|
282
|
+
secondaryButtonAppearance: 'warningPrimary sizeXXL solid rounded',
|
|
265
283
|
secondaryButtonLabel: 'Отмена',
|
|
266
|
-
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
267
284
|
},
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
285
|
+
success: {
|
|
286
|
+
appearance: 'refresh ghost',
|
|
287
|
+
title: 'Готово',
|
|
288
|
+
desc: 'Успешно выполнено',
|
|
272
289
|
code: '500',
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
secondaryButtonLabel: 'Отмена',
|
|
290
|
+
imageSrc: responseIcon.Success,
|
|
291
|
+
primaryButtonAppearance: 'successPrimary sizeXXL solid rounded',
|
|
292
|
+
primaryButtonLabel: 'ОК',
|
|
277
293
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
294
|
+
secondaryButtonLabel: 'Закрыть',
|
|
278
295
|
},
|
|
279
296
|
nothingFound: {
|
|
280
|
-
imageSrc: responseIcon.NothingFound,
|
|
281
297
|
appearance: 'refresh ghost',
|
|
282
298
|
title: 'Ничего не найдено',
|
|
283
|
-
code: '500',
|
|
284
299
|
desc: 'Нет данных по заданным параметрам',
|
|
285
|
-
|
|
300
|
+
code: '500',
|
|
301
|
+
imageSrc: responseIcon.NothingFound,
|
|
286
302
|
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
287
|
-
|
|
303
|
+
primaryButtonLabel: 'Сбросить',
|
|
288
304
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
305
|
+
secondaryButtonLabel: 'Отмена',
|
|
289
306
|
},
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
code: '
|
|
295
|
-
|
|
296
|
-
primaryButtonLabel: 'Сбросить',
|
|
307
|
+
errorNetwork: {
|
|
308
|
+
appearance: 'unableLoadData ghost',
|
|
309
|
+
title: 'Ошибка соединения',
|
|
310
|
+
desc: 'Не удалось подключиться.Проверьте интернет-соединение и повторите попытку',
|
|
311
|
+
code: '503',
|
|
312
|
+
imageSrc: responseIcon.UnableLoadData,
|
|
297
313
|
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
298
|
-
|
|
314
|
+
primaryButtonLabel: 'Обновить',
|
|
299
315
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
316
|
+
secondaryButtonLabel: 'Отмена',
|
|
300
317
|
},
|
|
301
|
-
|
|
302
|
-
imageSrc: responseIcon.Success,
|
|
318
|
+
errorRequest: {
|
|
303
319
|
appearance: 'refresh ghost',
|
|
304
|
-
title: '
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
320
|
+
title: 'Доступ ограничен',
|
|
321
|
+
desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
|
|
322
|
+
code: '403',
|
|
323
|
+
imageSrc: responseIcon.UnableLoadData,
|
|
308
324
|
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
309
|
-
|
|
325
|
+
primaryButtonLabel: 'Повторить',
|
|
326
|
+
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
327
|
+
secondaryButtonLabel: 'Отмена',
|
|
310
328
|
},
|
|
311
329
|
};
|
|
312
330
|
|
|
@@ -4,7 +4,6 @@ import SVG from 'react-inlinesvg';
|
|
|
4
4
|
import { urlWithAssetPrefix } from '../hoc/urlWithAssetPrefix.js';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
8
7
|
import 'react';
|
|
9
8
|
import '@itcase/common';
|
|
10
9
|
import '../context/UrlAssetPrefix.js';
|
|
@@ -21,13 +20,13 @@ import '../hooks.js';
|
|
|
21
20
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
21
|
import 'lodash/maxBy';
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const SVGContent = urlWithAssetPrefix(function SVGContent(props) {
|
|
24
|
+
const { className, src, SvgImage } = props;
|
|
25
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
26
|
+
const { svgFillClass, svgFillHoverClass } = propsGenerator;
|
|
28
27
|
// @ts-expect-error
|
|
29
|
-
|
|
30
|
-
return (jsxs("div", { className: clsx(className, 'svg-content', svgFillClass &&
|
|
28
|
+
const { styles: svgContentStyles } = useStyles(props);
|
|
29
|
+
return (jsxs("div", { className: clsx(className, 'svg-content', svgFillClass && `svg_fill_${svgFillClass}`, svgFillHoverClass && `svg_fill_hover_${svgFillHoverClass}`), style: svgContentStyles, children: [src && jsx(SVG, { src: src }), SvgImage && jsx(SvgImage, {})] }));
|
|
31
30
|
});
|
|
32
31
|
|
|
33
32
|
export { SVGContent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const scrollOnDragMock = (jsx("div", { style: { display: 'flex' }, children: Array.from({ length: 20 }, (_, index) => (jsx("div", { style: {
|
|
4
4
|
height: 65,
|
|
5
5
|
justifyContent: 'center',
|
|
6
6
|
alignItems: 'center',
|
|
@@ -8,6 +8,6 @@ var scrollOnDragMock = (jsx("div", { style: { display: 'flex' }, children: Array
|
|
|
8
8
|
padding: '50px',
|
|
9
9
|
border: '1px solid black',
|
|
10
10
|
display: 'flex',
|
|
11
|
-
}, children: index }, index))
|
|
11
|
+
}, children: index }, index))) }));
|
|
12
12
|
|
|
13
13
|
export { scrollOnDragMock };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import clsx from 'clsx';
|
|
@@ -21,14 +20,14 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
21
20
|
import 'lodash/maxBy';
|
|
22
21
|
|
|
23
22
|
function ScrollOnDrag(props) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const { className, scrollContainerProps, children, isScrollbar } = props;
|
|
24
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
25
|
+
const { ref } = useScrollContainer();
|
|
26
|
+
const { fillClass, fillHoverClass, borderColorClass, borderTypeClass, borderWidthClass, elevationClass, heightClass, widthClass = 'fill', } = propsGenerator;
|
|
28
27
|
// @ts-expect-error
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return (jsx(ScrollOnDragWrapper, { scrollableNodeProps: { ref
|
|
28
|
+
const { scrollContainer: scrollContainerStyles, styles: styles } = useStyles(props);
|
|
29
|
+
const ScrollOnDragWrapper = isScrollbar ? SimpleBar : React.Fragment;
|
|
30
|
+
return (jsx(ScrollOnDragWrapper, { scrollableNodeProps: { ref }, children: jsx("div", { className: clsx('scroll-on-drag', className, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, borderWidthClass && `border-width_${borderWidthClass}`, elevationClass && `elevation_${elevationClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, heightClass && `height_${heightClass}`, widthClass && `width_${widthClass}`), style: styles, children: jsx(ScrollContainer, { className: clsx(!isScrollbar && 'scroll-on-drag__wrapper'), ref: ref, ...scrollContainerProps, style: scrollContainerStyles, children: children }) }) }));
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
export { ScrollOnDrag };
|
|
@@ -3,7 +3,6 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { ScrollLink } from 'react-scroll';
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
6
|
import 'react';
|
|
8
7
|
import 'lodash/camelCase';
|
|
9
8
|
import 'lodash/castArray';
|
|
@@ -19,14 +18,14 @@ import '../hooks.js';
|
|
|
19
18
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
19
|
import 'lodash/maxBy';
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return (jsx(Tag, { id: id, className: clsx(className, 'scroll-to-view', alignItemsClass &&
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
const ScrollToView = ScrollLink(function ScrollToView(props) {
|
|
22
|
+
const { id, className, tag: Tag = 'div', children } = props;
|
|
23
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
24
|
+
const { directionClass, justifyContentClass, alignClass, alignDirectionClass, alignItemsClass, alignSelfClass, textColorActiveClass, textColorClass, textColorHoverClass, heightClass, widthClass, } = propsGenerator;
|
|
25
|
+
const { styles: scrollToViewStyles } = useStyles(props);
|
|
26
|
+
return (jsx(Tag, { id: id, className: clsx(className, 'scroll-to-view', alignItemsClass && `align-items_${alignItemsClass}`, widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, alignDirectionClass && `align_${alignDirectionClass}`, alignClass && `align_${alignClass}`, textColorClass && `scroll-to-view_text-color_${textColorClass}`, textColorActiveClass &&
|
|
27
|
+
`scroll-to-view_text-color_active_${textColorActiveClass}`, textColorHoverClass &&
|
|
28
|
+
`scroll-to-view_text-color_hover_${textColorHoverClass}`, justifyContentClass && `justify-content_${justifyContentClass}`, directionClass && `direction_${directionClass}`, alignSelfClass && `align-self_${alignSelfClass}`), style: Object.assign({}, scrollToViewStyles, props.style), onClick: props.onClick, children: children }));
|
|
30
29
|
});
|
|
31
30
|
|
|
32
31
|
export { ScrollToView };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const scrollbarMock = Array.from({ length: 30 }, (_, index) => (jsx("div", { children: index })));
|
|
4
4
|
|
|
5
5
|
export { scrollbarMock };
|