@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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./Response/img.js');
|
|
4
|
-
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
5
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
5
|
var React = require('react');
|
|
7
6
|
var clsx = require('clsx');
|
|
@@ -9,9 +8,9 @@ var urlWithAssetPrefix = require('../hoc/urlWithAssetPrefix.js');
|
|
|
9
8
|
var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
10
9
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
11
10
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
12
|
-
var Button = require('../../
|
|
13
|
-
var Group = require('../../
|
|
14
|
-
var Text = require('../../
|
|
11
|
+
var Button = require('../../Button_cjs_CZz8OjWi.js');
|
|
12
|
+
var Group = require('../../Group_cjs_DmfeUcFI.js');
|
|
13
|
+
var Text = require('../../Text_cjs_BDTjOTVB.js');
|
|
15
14
|
require('@itcase/common');
|
|
16
15
|
require('../context/UrlAssetPrefix.js');
|
|
17
16
|
require('lodash/camelCase');
|
|
@@ -26,18 +25,19 @@ require('../utils/setViewportProperty.js');
|
|
|
26
25
|
require('../hooks.js');
|
|
27
26
|
require('../hooks/useStyles/styleAttributes.js');
|
|
28
27
|
require('lodash/maxBy');
|
|
29
|
-
require('../../
|
|
28
|
+
require('../../Icon_cjs_DpFxIFv5.js');
|
|
30
29
|
require('react-inlinesvg');
|
|
31
|
-
require('../../
|
|
32
|
-
require('../../
|
|
30
|
+
require('../../Link_cjs_qKXVfU8e.js');
|
|
31
|
+
require('../../Loader_cjs_DIDsIq3J.js');
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
const responseAppearanceConfirm = {
|
|
35
34
|
confirm: {
|
|
36
35
|
fill: 'surfacePrimary',
|
|
37
36
|
titleTextColor: 'surfaceTextPrimary',
|
|
38
37
|
titleTextSize: 'xxl',
|
|
39
38
|
labelTextColor: 'surfaceTextPrimary',
|
|
40
39
|
descTextSize: 'm',
|
|
40
|
+
imageSrc: index.responseIcon.Confirm,
|
|
41
41
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
42
42
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
43
43
|
svgFill: 'surfaceTertiary',
|
|
@@ -45,13 +45,14 @@ var responseAppearanceConfirm = {
|
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
const responseAppearanceDanger = {
|
|
49
49
|
danger: {
|
|
50
50
|
fill: 'surfacePrimary',
|
|
51
51
|
titleTextColor: 'surfaceTextPrimary',
|
|
52
52
|
titleTextSize: 'xxl',
|
|
53
53
|
labelTextColor: 'surfaceTextPrimary',
|
|
54
54
|
descTextSize: 'm',
|
|
55
|
+
imageSrc: index.responseIcon.Danger,
|
|
55
56
|
primaryButtonAppearance: 'dangerPrimary sizeXXL solid',
|
|
56
57
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
57
58
|
svgFill: 'dangerPrimary',
|
|
@@ -59,13 +60,14 @@ var responseAppearanceDanger = {
|
|
|
59
60
|
},
|
|
60
61
|
};
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
const responseAppearanceEmpty = {
|
|
63
64
|
empty: {
|
|
64
65
|
fill: 'surfacePrimary',
|
|
65
66
|
titleTextColor: 'surfaceTextPrimary',
|
|
66
67
|
titleTextSize: 'xxl',
|
|
67
68
|
labelTextColor: 'surfaceTextPrimary',
|
|
68
69
|
descTextSize: 'm',
|
|
70
|
+
imageSrc: index.responseIcon.Empty,
|
|
69
71
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
70
72
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
71
73
|
svgFill: 'surfaceTertiary',
|
|
@@ -73,13 +75,14 @@ var responseAppearanceEmpty = {
|
|
|
73
75
|
},
|
|
74
76
|
};
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
const responseAppearanceError = {
|
|
77
79
|
error: {
|
|
78
80
|
fill: 'surfacePrimary',
|
|
79
81
|
titleTextColor: 'surfaceTextPrimary',
|
|
80
82
|
titleTextSize: 'xxl',
|
|
81
83
|
labelTextColor: 'surfaceTextPrimary',
|
|
82
84
|
descTextSize: 'm',
|
|
85
|
+
imageSrc: index.responseIcon.Error,
|
|
83
86
|
primaryButtonAppearance: 'errorPrimary sizeXXL solid',
|
|
84
87
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
85
88
|
svgFill: 'errorPrimary',
|
|
@@ -87,13 +90,14 @@ var responseAppearanceError = {
|
|
|
87
90
|
},
|
|
88
91
|
};
|
|
89
92
|
|
|
90
|
-
|
|
93
|
+
const responseAppearanceFail = {
|
|
91
94
|
fail: {
|
|
92
95
|
fill: 'surfacePrimary',
|
|
93
96
|
titleTextColor: 'surfaceTextPrimary',
|
|
94
97
|
titleTextSize: 'xxl',
|
|
95
98
|
labelTextColor: 'surfaceTextPrimary',
|
|
96
99
|
descTextSize: 'm',
|
|
100
|
+
imageSrc: index.responseIcon.Fail,
|
|
97
101
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
98
102
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
99
103
|
svgFill: 'surfaceTertiary',
|
|
@@ -101,13 +105,14 @@ var responseAppearanceFail = {
|
|
|
101
105
|
},
|
|
102
106
|
};
|
|
103
107
|
|
|
104
|
-
|
|
108
|
+
const responseAppearanceNothingFound = {
|
|
105
109
|
nothingFound: {
|
|
106
110
|
fill: 'surfacePrimary',
|
|
107
111
|
titleTextColor: 'surfaceTextPrimary',
|
|
108
112
|
titleTextSize: 'xxl',
|
|
109
113
|
labelTextColor: 'surfaceTextPrimary',
|
|
110
114
|
descTextSize: 'm',
|
|
115
|
+
imageSrc: index.responseIcon.NothingFound,
|
|
111
116
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
112
117
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
113
118
|
svgFill: 'surfaceTertiary',
|
|
@@ -115,13 +120,14 @@ var responseAppearanceNothingFound = {
|
|
|
115
120
|
},
|
|
116
121
|
};
|
|
117
122
|
|
|
118
|
-
|
|
123
|
+
const responseAppearanceRefresh = {
|
|
119
124
|
refresh: {
|
|
120
125
|
fill: 'surfacePrimary',
|
|
121
126
|
titleTextColor: 'surfaceTextPrimary',
|
|
122
127
|
titleTextSize: 'xxl',
|
|
123
128
|
labelTextColor: 'surfaceTextPrimary',
|
|
124
129
|
descTextSize: 'm',
|
|
130
|
+
imageSrc: index.responseIcon.Refresh,
|
|
125
131
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
126
132
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
127
133
|
svgFill: 'surfaceTertiary',
|
|
@@ -129,7 +135,7 @@ var responseAppearanceRefresh = {
|
|
|
129
135
|
},
|
|
130
136
|
};
|
|
131
137
|
|
|
132
|
-
|
|
138
|
+
const responseAppearanceStyle = {
|
|
133
139
|
solid: {
|
|
134
140
|
borderColor: 'none',
|
|
135
141
|
},
|
|
@@ -143,13 +149,14 @@ var responseAppearanceStyle = {
|
|
|
143
149
|
},
|
|
144
150
|
};
|
|
145
151
|
|
|
146
|
-
|
|
152
|
+
const responseAppearanceSuccess = {
|
|
147
153
|
success: {
|
|
148
154
|
fill: 'surfacePrimary',
|
|
149
155
|
titleTextColor: 'surfaceTextPrimary',
|
|
150
156
|
titleTextSize: 'xxl',
|
|
151
157
|
labelTextColor: 'surfaceTextPrimary',
|
|
152
158
|
descTextSize: 'm',
|
|
159
|
+
imageSrc: index.responseIcon.Success,
|
|
153
160
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
154
161
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
155
162
|
svgFill: 'accentPrimary',
|
|
@@ -157,13 +164,14 @@ var responseAppearanceSuccess = {
|
|
|
157
164
|
},
|
|
158
165
|
};
|
|
159
166
|
|
|
160
|
-
|
|
167
|
+
const responseAppearanceUnableLoadData = {
|
|
161
168
|
unableLoadData: {
|
|
162
169
|
fill: 'surfacePrimary',
|
|
163
170
|
titleTextColor: 'surfaceTextPrimary',
|
|
164
171
|
titleTextSize: 'xxl',
|
|
165
172
|
labelTextColor: 'surfaceTextPrimary',
|
|
166
173
|
descTextSize: 'm',
|
|
174
|
+
imageSrc: index.responseIcon.UnableLoadData,
|
|
167
175
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid',
|
|
168
176
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
169
177
|
svgFill: 'surfaceTertiary',
|
|
@@ -171,13 +179,14 @@ var responseAppearanceUnableLoadData = {
|
|
|
171
179
|
},
|
|
172
180
|
};
|
|
173
181
|
|
|
174
|
-
|
|
182
|
+
const responseAppearanceWarning = {
|
|
175
183
|
warning: {
|
|
176
184
|
fill: 'surfacePrimary',
|
|
177
185
|
titleTextColor: 'surfaceTextPrimary',
|
|
178
186
|
titleTextSize: 'xxl',
|
|
179
187
|
labelTextColor: 'surfaceTextPrimary',
|
|
180
188
|
descTextSize: 'm',
|
|
189
|
+
imageSrc: index.responseIcon.Warning,
|
|
181
190
|
primaryButtonAppearance: 'warningPrimary sizeXXL solid',
|
|
182
191
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
|
|
183
192
|
svgFill: 'warningPrimary',
|
|
@@ -185,32 +194,44 @@ var responseAppearanceWarning = {
|
|
|
185
194
|
},
|
|
186
195
|
};
|
|
187
196
|
|
|
188
|
-
|
|
197
|
+
const responseAppearance = {
|
|
198
|
+
...responseAppearanceConfirm,
|
|
199
|
+
...responseAppearanceEmpty,
|
|
200
|
+
...responseAppearanceDanger,
|
|
201
|
+
...responseAppearanceRefresh,
|
|
202
|
+
...responseAppearanceUnableLoadData,
|
|
203
|
+
...responseAppearanceNothingFound,
|
|
204
|
+
...responseAppearanceFail,
|
|
205
|
+
...responseAppearanceError,
|
|
206
|
+
...responseAppearanceSuccess,
|
|
207
|
+
...responseAppearanceWarning,
|
|
208
|
+
...responseAppearanceStyle,
|
|
209
|
+
};
|
|
189
210
|
|
|
190
|
-
|
|
211
|
+
const responseConfig = {
|
|
191
212
|
appearance: responseAppearance,
|
|
192
|
-
setAppearance:
|
|
213
|
+
setAppearance: (appearanceConfig) => {
|
|
193
214
|
responseConfig.appearance = appearanceConfig;
|
|
194
215
|
},
|
|
195
216
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
217
|
+
const Response = urlWithAssetPrefix.urlWithAssetPrefix(function Response(props) {
|
|
218
|
+
const { appearance, className, width, height, title, desc, secondaryButton, primaryButton, before, after, isSkeleton, onClickSecondaryButton, } = props;
|
|
219
|
+
const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, responseConfig);
|
|
220
|
+
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
221
|
+
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;
|
|
201
222
|
// TODO: use Icon instead?
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
223
|
+
const ImageComponent = React.useMemo(() => {
|
|
224
|
+
const src = imageSrc || svgSrc;
|
|
225
|
+
const Image = SvgImage;
|
|
205
226
|
if (Image) {
|
|
206
|
-
|
|
227
|
+
const sizes = {};
|
|
207
228
|
if (width) {
|
|
208
229
|
sizes.width = width;
|
|
209
230
|
}
|
|
210
231
|
if (height) {
|
|
211
232
|
sizes.height = height;
|
|
212
233
|
}
|
|
213
|
-
return jsxRuntime.jsx(Image,
|
|
234
|
+
return jsxRuntime.jsx(Image, { ...sizes });
|
|
214
235
|
}
|
|
215
236
|
if (src) {
|
|
216
237
|
// if (src.endsWith('.svg') || src.startsWith('data:image/svg')) {
|
|
@@ -225,90 +246,87 @@ var Response = urlWithAssetPrefix.urlWithAssetPrefix(function Response(props) {
|
|
|
225
246
|
return null;
|
|
226
247
|
}, [imageSrc, svgSrc, SvgImage, width, height, svgFillClass]);
|
|
227
248
|
// @ts-expect-error
|
|
228
|
-
|
|
229
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'response', fillClass &&
|
|
249
|
+
const { styles: responseStyles, wrapper: wrapperStyles } = useStyles.useStyles(props);
|
|
250
|
+
return (jsxRuntime.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, jsxRuntime.jsxs("div", { className: "response__wrapper", style: wrapperStyles, children: [ImageComponent && (jsxRuntime.jsx("div", { className: clsx('response__image', svgFillClass && `svg_fill_${svgFillClass}`, svgPathFillClass && `svg_path_fill_${svgPathFillClass}`), children: ImageComponent })), jsxRuntime.jsxs("div", { className: "response__wrapper-inner", children: [title && (jsxRuntime.jsx(Text.Text, { className: "response__title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title })), desc && (jsxRuntime.jsx(Text.Text, { className: "response__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] })] }), (primaryButtonLabel ||
|
|
230
251
|
primaryButton ||
|
|
231
252
|
secondaryButtonLabel ||
|
|
232
253
|
secondaryButton ||
|
|
233
254
|
appearanceConfig) && (jsxRuntime.jsxs(Group.Group, { className: "response__button", width: "fill", children: [primaryButtonLabel ? (jsxRuntime.jsx(Button.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 ? (jsxRuntime.jsx(Button.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] }));
|
|
234
255
|
});
|
|
235
256
|
|
|
236
|
-
|
|
257
|
+
const RESPONSE_MESSAGES = {
|
|
258
|
+
empty: {
|
|
259
|
+
appearance: 'refresh ghost',
|
|
260
|
+
title: ' Список пуст',
|
|
261
|
+
desc: 'Нет данных по заданным параметрам',
|
|
262
|
+
code: '500',
|
|
263
|
+
imageSrc: index.responseIcon.Empty,
|
|
264
|
+
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
265
|
+
primaryButtonLabel: 'ОК',
|
|
266
|
+
},
|
|
237
267
|
error: {
|
|
238
|
-
imageSrc: index.responseIcon.Error,
|
|
239
268
|
appearance: 'error ghost',
|
|
240
269
|
title: 'Ошибка',
|
|
241
|
-
code: '500',
|
|
242
270
|
desc: 'Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com',
|
|
243
|
-
|
|
271
|
+
code: '500',
|
|
272
|
+
imageSrc: index.responseIcon.Error,
|
|
244
273
|
primaryButtonAppearance: 'errorPrimary sizeXXL solid rounded',
|
|
245
|
-
|
|
274
|
+
primaryButtonLabel: 'ОК',
|
|
246
275
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
247
|
-
},
|
|
248
|
-
errorRequest: {
|
|
249
|
-
imageSrc: index.responseIcon.UnableLoadData,
|
|
250
|
-
appearance: 'refresh ghost',
|
|
251
|
-
title: 'Доступ ограничен',
|
|
252
|
-
code: '403',
|
|
253
|
-
desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
|
|
254
|
-
primaryButtonLabel: 'Повторить',
|
|
255
|
-
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
256
276
|
secondaryButtonLabel: 'Отмена',
|
|
257
|
-
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
258
277
|
},
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
278
|
+
warning: {
|
|
279
|
+
appearance: 'warning ghost',
|
|
280
|
+
title: 'Внимание',
|
|
281
|
+
imageSrc: index.responseIcon.Warning,
|
|
282
|
+
primaryButtonAppearance: 'warningPrimary sizeXXL solid rounded',
|
|
283
|
+
primaryButtonLabel: 'Повторить',
|
|
284
|
+
secondaryButtonAppearance: 'warningPrimary sizeXXL solid rounded',
|
|
267
285
|
secondaryButtonLabel: 'Отмена',
|
|
268
|
-
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
269
286
|
},
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
287
|
+
success: {
|
|
288
|
+
appearance: 'refresh ghost',
|
|
289
|
+
title: 'Готово',
|
|
290
|
+
desc: 'Успешно выполнено',
|
|
274
291
|
code: '500',
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
secondaryButtonLabel: 'Отмена',
|
|
292
|
+
imageSrc: index.responseIcon.Success,
|
|
293
|
+
primaryButtonAppearance: 'successPrimary sizeXXL solid rounded',
|
|
294
|
+
primaryButtonLabel: 'ОК',
|
|
279
295
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
296
|
+
secondaryButtonLabel: 'Закрыть',
|
|
280
297
|
},
|
|
281
298
|
nothingFound: {
|
|
282
|
-
imageSrc: index.responseIcon.NothingFound,
|
|
283
299
|
appearance: 'refresh ghost',
|
|
284
300
|
title: 'Ничего не найдено',
|
|
285
|
-
code: '500',
|
|
286
301
|
desc: 'Нет данных по заданным параметрам',
|
|
287
|
-
|
|
302
|
+
code: '500',
|
|
303
|
+
imageSrc: index.responseIcon.NothingFound,
|
|
288
304
|
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
289
|
-
|
|
305
|
+
primaryButtonLabel: 'Сбросить',
|
|
290
306
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
307
|
+
secondaryButtonLabel: 'Отмена',
|
|
291
308
|
},
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
code: '
|
|
297
|
-
|
|
298
|
-
primaryButtonLabel: 'Сбросить',
|
|
309
|
+
errorNetwork: {
|
|
310
|
+
appearance: 'unableLoadData ghost',
|
|
311
|
+
title: 'Ошибка соединения',
|
|
312
|
+
desc: 'Не удалось подключиться.Проверьте интернет-соединение и повторите попытку',
|
|
313
|
+
code: '503',
|
|
314
|
+
imageSrc: index.responseIcon.UnableLoadData,
|
|
299
315
|
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
300
|
-
|
|
316
|
+
primaryButtonLabel: 'Обновить',
|
|
301
317
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
318
|
+
secondaryButtonLabel: 'Отмена',
|
|
302
319
|
},
|
|
303
|
-
|
|
304
|
-
imageSrc: index.responseIcon.Success,
|
|
320
|
+
errorRequest: {
|
|
305
321
|
appearance: 'refresh ghost',
|
|
306
|
-
title: '
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
322
|
+
title: 'Доступ ограничен',
|
|
323
|
+
desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
|
|
324
|
+
code: '403',
|
|
325
|
+
imageSrc: index.responseIcon.UnableLoadData,
|
|
310
326
|
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
311
|
-
|
|
327
|
+
primaryButtonLabel: 'Повторить',
|
|
328
|
+
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
329
|
+
secondaryButtonLabel: 'Отмена',
|
|
312
330
|
},
|
|
313
331
|
};
|
|
314
332
|
|
|
@@ -6,7 +6,6 @@ var SVG = require('react-inlinesvg');
|
|
|
6
6
|
var urlWithAssetPrefix = require('../hoc/urlWithAssetPrefix.js');
|
|
7
7
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
8
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
9
|
-
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
10
9
|
require('react');
|
|
11
10
|
require('@itcase/common');
|
|
12
11
|
require('../context/UrlAssetPrefix.js');
|
|
@@ -23,13 +22,13 @@ require('../hooks.js');
|
|
|
23
22
|
require('../hooks/useStyles/styleAttributes.js');
|
|
24
23
|
require('lodash/maxBy');
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
const SVGContent = urlWithAssetPrefix.urlWithAssetPrefix(function SVGContent(props) {
|
|
26
|
+
const { className, src, SvgImage } = props;
|
|
27
|
+
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
28
|
+
const { svgFillClass, svgFillHoverClass } = propsGenerator;
|
|
30
29
|
// @ts-expect-error
|
|
31
|
-
|
|
32
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'svg-content', svgFillClass &&
|
|
30
|
+
const { styles: svgContentStyles } = useStyles.useStyles(props);
|
|
31
|
+
return (jsxRuntime.jsxs("div", { className: clsx(className, 'svg-content', svgFillClass && `svg_fill_${svgFillClass}`, svgFillHoverClass && `svg_fill_hover_${svgFillHoverClass}`), style: svgContentStyles, children: [src && jsxRuntime.jsx(SVG, { src: src }), SvgImage && jsxRuntime.jsx(SvgImage, {})] }));
|
|
33
32
|
});
|
|
34
33
|
|
|
35
34
|
exports.SVGContent = SVGContent;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const scrollOnDragMock = (jsxRuntime.jsx("div", { style: { display: 'flex' }, children: Array.from({ length: 20 }, (_, index) => (jsxRuntime.jsx("div", { style: {
|
|
6
6
|
height: 65,
|
|
7
7
|
justifyContent: 'center',
|
|
8
8
|
alignItems: 'center',
|
|
@@ -10,6 +10,6 @@ var scrollOnDragMock = (jsxRuntime.jsx("div", { style: { display: 'flex' }, chil
|
|
|
10
10
|
padding: '50px',
|
|
11
11
|
border: '1px solid black',
|
|
12
12
|
display: 'flex',
|
|
13
|
-
}, children: index }, index))
|
|
13
|
+
}, children: index }, index))) }));
|
|
14
14
|
|
|
15
15
|
exports.scrollOnDragMock = scrollOnDragMock;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
4
|
var React = require('react');
|
|
6
5
|
var clsx = require('clsx');
|
|
@@ -23,14 +22,14 @@ require('../hooks/useStyles/styleAttributes.js');
|
|
|
23
22
|
require('lodash/maxBy');
|
|
24
23
|
|
|
25
24
|
function ScrollOnDrag(props) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
const { className, scrollContainerProps, children, isScrollbar } = props;
|
|
26
|
+
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
27
|
+
const { ref } = ScrollContainer.useScrollContainer();
|
|
28
|
+
const { fillClass, fillHoverClass, borderColorClass, borderTypeClass, borderWidthClass, elevationClass, heightClass, widthClass = 'fill', } = propsGenerator;
|
|
30
29
|
// @ts-expect-error
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return (jsxRuntime.jsx(ScrollOnDragWrapper, { scrollableNodeProps: { ref
|
|
30
|
+
const { scrollContainer: scrollContainerStyles, styles: styles } = useStyles.useStyles(props);
|
|
31
|
+
const ScrollOnDragWrapper = isScrollbar ? SimpleBar : React.Fragment;
|
|
32
|
+
return (jsxRuntime.jsx(ScrollOnDragWrapper, { scrollableNodeProps: { ref }, children: jsxRuntime.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: jsxRuntime.jsx(ScrollContainer, { className: clsx(!isScrollbar && 'scroll-on-drag__wrapper'), ref: ref, ...scrollContainerProps, style: scrollContainerStyles, children: children }) }) }));
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
exports.ScrollOnDrag = ScrollOnDrag;
|
|
@@ -5,7 +5,6 @@ var clsx = require('clsx');
|
|
|
5
5
|
var reactScroll = require('react-scroll');
|
|
6
6
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
7
7
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
8
|
-
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
9
8
|
require('react');
|
|
10
9
|
require('lodash/camelCase');
|
|
11
10
|
require('lodash/castArray');
|
|
@@ -21,14 +20,14 @@ require('../hooks.js');
|
|
|
21
20
|
require('../hooks/useStyles/styleAttributes.js');
|
|
22
21
|
require('lodash/maxBy');
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return (jsxRuntime.jsx(Tag, { id: id, className: clsx(className, 'scroll-to-view', alignItemsClass &&
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
const ScrollToView = reactScroll.ScrollLink(function ScrollToView(props) {
|
|
24
|
+
const { id, className, tag: Tag = 'div', children } = props;
|
|
25
|
+
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
26
|
+
const { directionClass, justifyContentClass, alignClass, alignDirectionClass, alignItemsClass, alignSelfClass, textColorActiveClass, textColorClass, textColorHoverClass, heightClass, widthClass, } = propsGenerator;
|
|
27
|
+
const { styles: scrollToViewStyles } = useStyles.useStyles(props);
|
|
28
|
+
return (jsxRuntime.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 &&
|
|
29
|
+
`scroll-to-view_text-color_active_${textColorActiveClass}`, textColorHoverClass &&
|
|
30
|
+
`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 }));
|
|
32
31
|
});
|
|
33
32
|
|
|
34
33
|
exports.ScrollToView = ScrollToView;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const scrollbarMock = Array.from({ length: 30 }, (_, index) => (jsxRuntime.jsx("div", { children: index })));
|
|
6
6
|
|
|
7
7
|
exports.scrollbarMock = scrollbarMock;
|