@itcase/ui 1.8.138 → 1.8.140
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/{Button_cjs_BXEwg-En.js → Button_cjs_CXL-JN3K.js} +17 -17
- package/dist/{Button_es_DEn6z83v.js → Button_es_e5ym7OhG.js} +17 -17
- package/dist/{DatePicker_cjs_Dxbyx8GV.js → DatePicker_cjs_BGkmhu-H.js} +1 -1
- package/dist/{DatePicker_es_mX0NSjO5.js → DatePicker_es_BoeugHyH.js} +1 -1
- package/dist/cjs/components/Button.js +1 -1
- package/dist/cjs/components/CookiesWarning.js +1 -1
- package/dist/cjs/components/DatePeriod.js +2 -2
- package/dist/cjs/components/DatePicker.js +2 -2
- package/dist/cjs/components/Drawer.js +2 -2
- package/dist/cjs/components/Modal.js +2 -2
- package/dist/cjs/components/ModalSheetBottom.js +5 -4
- package/dist/cjs/components/Response.js +16 -16
- package/dist/components/Button.js +1 -1
- package/dist/components/CookiesWarning.js +1 -1
- package/dist/components/DatePeriod.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/Drawer.js +2 -2
- package/dist/components/Modal.js +2 -2
- package/dist/components/ModalSheetBottom.js +5 -4
- package/dist/components/Response.js +16 -16
- package/dist/css/components/Drawer/Drawer.css +13 -8
- package/dist/css/components/Response/Response.css +7 -0
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.appearance.d.ts +0 -3
- package/dist/types/components/ModalSheetBottom/appearance/modalSheetBottomSize.d.ts +11 -0
- package/dist/types/components/ModalSheetBottom/index.d.ts +1 -1
- package/dist/types/components/Response/Response.constant.d.ts +7 -7
- package/package.json +1 -1
|
@@ -61,7 +61,7 @@ const buttonAppearanceDanger = {
|
|
|
61
61
|
},
|
|
62
62
|
dangerPrimary: {
|
|
63
63
|
fill: 'dangerPrimary',
|
|
64
|
-
fillHover: '
|
|
64
|
+
fillHover: 'dangerHoverPrimary',
|
|
65
65
|
labelTextColor: 'dangerTextPrimary',
|
|
66
66
|
labelTextColorHover: 'dangerTextPrimary',
|
|
67
67
|
iconAfterFillIcon: 'dangerItemPrimary',
|
|
@@ -74,7 +74,7 @@ const buttonAppearanceDanger = {
|
|
|
74
74
|
const buttonAppearanceError = {
|
|
75
75
|
error: {
|
|
76
76
|
fill: 'errorPrimary',
|
|
77
|
-
fillHover: '
|
|
77
|
+
fillHover: 'errorHoverPrimary',
|
|
78
78
|
labelTextColor: 'errorTextPrimary',
|
|
79
79
|
labelTextColorHover: 'errorTextPrimary',
|
|
80
80
|
iconAfterFillIcon: 'errorItemPrimary',
|
|
@@ -109,9 +109,9 @@ const buttonAppearanceInfo = {
|
|
|
109
109
|
info: {
|
|
110
110
|
fill: 'infoPrimary',
|
|
111
111
|
fillHover: 'infoPrimaryHover',
|
|
112
|
-
borderColor: 'infoBorderPrimary',
|
|
113
112
|
labelTextColor: 'infoTextPrimary',
|
|
114
113
|
labelTextColorHover: 'infoTextPrimary',
|
|
114
|
+
borderColor: 'infoBorderPrimary',
|
|
115
115
|
iconAfterFillIcon: 'infoItemPrimary',
|
|
116
116
|
iconBeforeFillIcon: 'infoItemPrimary',
|
|
117
117
|
iconFillIcon: 'infoItemPrimary',
|
|
@@ -120,9 +120,9 @@ const buttonAppearanceInfo = {
|
|
|
120
120
|
infoMutedPrimary: {
|
|
121
121
|
fill: 'infoTertiary',
|
|
122
122
|
fillHover: 'infoTertiaryHover',
|
|
123
|
-
borderColor: 'infoBorderSecondary',
|
|
124
123
|
labelTextColor: 'infoTextSecondary',
|
|
125
124
|
labelTextColorHover: 'infoTextSecondary',
|
|
125
|
+
borderColor: 'infoBorderSecondary',
|
|
126
126
|
iconAfterFillIcon: 'infoItemSecondary',
|
|
127
127
|
iconBeforeFillIcon: 'infoItemSecondary',
|
|
128
128
|
iconFillIcon: 'infoItemSecondaryPrimary',
|
|
@@ -131,9 +131,9 @@ const buttonAppearanceInfo = {
|
|
|
131
131
|
infoPrimary: {
|
|
132
132
|
fill: 'infoPrimary',
|
|
133
133
|
fillHover: 'infoPrimaryHover',
|
|
134
|
-
borderColor: 'infoBorderPrimary',
|
|
135
134
|
labelTextColor: 'infoTextPrimary',
|
|
136
135
|
labelTextColorHover: 'infoTextPrimary',
|
|
136
|
+
borderColor: 'infoBorderPrimary',
|
|
137
137
|
iconAfterFillIcon: 'infoItemPrimary',
|
|
138
138
|
iconBeforeFillIcon: 'infoItemPrimary',
|
|
139
139
|
iconFillIcon: 'infoItemPrimary',
|
|
@@ -142,9 +142,9 @@ const buttonAppearanceInfo = {
|
|
|
142
142
|
infoSecondary: {
|
|
143
143
|
fill: 'infoPrimary',
|
|
144
144
|
fillHover: 'infoPrimaryHover',
|
|
145
|
-
borderColor: 'infoBorderPrimary',
|
|
146
145
|
labelTextColor: 'infoTextSecondary',
|
|
147
146
|
labelTextColorHover: 'infoTextSecondary',
|
|
147
|
+
borderColor: 'infoBorderPrimary',
|
|
148
148
|
iconAfterFillIcon: 'infoItemPrimary',
|
|
149
149
|
iconBeforeFillIcon: 'infoItemPrimary',
|
|
150
150
|
iconFillIcon: 'infoItemPrimary',
|
|
@@ -357,8 +357,8 @@ const buttonAppearanceSurface = {
|
|
|
357
357
|
surfaceMutedPrimary: {
|
|
358
358
|
fill: 'surfaceTertiary',
|
|
359
359
|
fillHover: 'surfaceTertiary',
|
|
360
|
-
borderColor: 'surfaceBorderQuaternary',
|
|
361
360
|
labelTextColor: 'surfaceTextQuaternary',
|
|
361
|
+
borderColor: 'surfaceBorderQuaternary',
|
|
362
362
|
iconAfterFillIcon: 'surfaceItemQuaternary',
|
|
363
363
|
iconBeforeFillIcon: 'surfaceItemQuaternary',
|
|
364
364
|
iconFillIcon: 'surfaceItemQuaternary',
|
|
@@ -367,36 +367,36 @@ const buttonAppearanceSurface = {
|
|
|
367
367
|
surfacePrimary: {
|
|
368
368
|
fill: 'surfacePrimary',
|
|
369
369
|
fillHover: 'surfaceSecondary',
|
|
370
|
-
borderColor: 'surfaceBorderTertiary',
|
|
371
370
|
labelTextColor: 'surfaceTextPrimary',
|
|
371
|
+
borderColor: 'surfaceBorderTertiary',
|
|
372
372
|
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
373
373
|
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
374
374
|
iconFillIcon: 'surfaceItemPrimary',
|
|
375
375
|
loaderAppearance: 'surfacePrimary',
|
|
376
376
|
},
|
|
377
|
-
|
|
378
|
-
fill: '
|
|
379
|
-
fillHover: '
|
|
380
|
-
borderColor: 'surfaceBorderTertiary',
|
|
377
|
+
surfaceQuaternary: {
|
|
378
|
+
fill: 'surfaceTertiary',
|
|
379
|
+
fillHover: 'surfaceTertiaryHover',
|
|
381
380
|
labelTextColor: 'surfaceTextPrimary',
|
|
381
|
+
borderColor: 'surfaceBorderTertiary',
|
|
382
382
|
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
383
383
|
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
384
384
|
iconFillIcon: 'surfaceItemPrimary',
|
|
385
385
|
loaderAppearance: 'surfacePrimary',
|
|
386
386
|
},
|
|
387
|
-
|
|
388
|
-
fill: '
|
|
387
|
+
surfaceSecondary: {
|
|
388
|
+
fill: 'surfaceSecondary',
|
|
389
389
|
fillHover: 'surfaceSecondary',
|
|
390
390
|
labelTextColor: 'surfaceTextPrimary',
|
|
391
|
+
borderColor: 'surfaceBorderTertiary',
|
|
391
392
|
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
392
393
|
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
393
394
|
iconFillIcon: 'surfaceItemPrimary',
|
|
394
395
|
loaderAppearance: 'surfacePrimary',
|
|
395
396
|
},
|
|
396
|
-
|
|
397
|
+
surfaceTertiary: {
|
|
397
398
|
fill: 'surfaceTertiary',
|
|
398
|
-
fillHover: '
|
|
399
|
-
borderColor: 'surfaceBorderTertiary',
|
|
399
|
+
fillHover: 'surfaceSecondary',
|
|
400
400
|
labelTextColor: 'surfaceTextPrimary',
|
|
401
401
|
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
402
402
|
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
@@ -59,7 +59,7 @@ const buttonAppearanceDanger = {
|
|
|
59
59
|
},
|
|
60
60
|
dangerPrimary: {
|
|
61
61
|
fill: 'dangerPrimary',
|
|
62
|
-
fillHover: '
|
|
62
|
+
fillHover: 'dangerHoverPrimary',
|
|
63
63
|
labelTextColor: 'dangerTextPrimary',
|
|
64
64
|
labelTextColorHover: 'dangerTextPrimary',
|
|
65
65
|
iconAfterFillIcon: 'dangerItemPrimary',
|
|
@@ -72,7 +72,7 @@ const buttonAppearanceDanger = {
|
|
|
72
72
|
const buttonAppearanceError = {
|
|
73
73
|
error: {
|
|
74
74
|
fill: 'errorPrimary',
|
|
75
|
-
fillHover: '
|
|
75
|
+
fillHover: 'errorHoverPrimary',
|
|
76
76
|
labelTextColor: 'errorTextPrimary',
|
|
77
77
|
labelTextColorHover: 'errorTextPrimary',
|
|
78
78
|
iconAfterFillIcon: 'errorItemPrimary',
|
|
@@ -107,9 +107,9 @@ const buttonAppearanceInfo = {
|
|
|
107
107
|
info: {
|
|
108
108
|
fill: 'infoPrimary',
|
|
109
109
|
fillHover: 'infoPrimaryHover',
|
|
110
|
-
borderColor: 'infoBorderPrimary',
|
|
111
110
|
labelTextColor: 'infoTextPrimary',
|
|
112
111
|
labelTextColorHover: 'infoTextPrimary',
|
|
112
|
+
borderColor: 'infoBorderPrimary',
|
|
113
113
|
iconAfterFillIcon: 'infoItemPrimary',
|
|
114
114
|
iconBeforeFillIcon: 'infoItemPrimary',
|
|
115
115
|
iconFillIcon: 'infoItemPrimary',
|
|
@@ -118,9 +118,9 @@ const buttonAppearanceInfo = {
|
|
|
118
118
|
infoMutedPrimary: {
|
|
119
119
|
fill: 'infoTertiary',
|
|
120
120
|
fillHover: 'infoTertiaryHover',
|
|
121
|
-
borderColor: 'infoBorderSecondary',
|
|
122
121
|
labelTextColor: 'infoTextSecondary',
|
|
123
122
|
labelTextColorHover: 'infoTextSecondary',
|
|
123
|
+
borderColor: 'infoBorderSecondary',
|
|
124
124
|
iconAfterFillIcon: 'infoItemSecondary',
|
|
125
125
|
iconBeforeFillIcon: 'infoItemSecondary',
|
|
126
126
|
iconFillIcon: 'infoItemSecondaryPrimary',
|
|
@@ -129,9 +129,9 @@ const buttonAppearanceInfo = {
|
|
|
129
129
|
infoPrimary: {
|
|
130
130
|
fill: 'infoPrimary',
|
|
131
131
|
fillHover: 'infoPrimaryHover',
|
|
132
|
-
borderColor: 'infoBorderPrimary',
|
|
133
132
|
labelTextColor: 'infoTextPrimary',
|
|
134
133
|
labelTextColorHover: 'infoTextPrimary',
|
|
134
|
+
borderColor: 'infoBorderPrimary',
|
|
135
135
|
iconAfterFillIcon: 'infoItemPrimary',
|
|
136
136
|
iconBeforeFillIcon: 'infoItemPrimary',
|
|
137
137
|
iconFillIcon: 'infoItemPrimary',
|
|
@@ -140,9 +140,9 @@ const buttonAppearanceInfo = {
|
|
|
140
140
|
infoSecondary: {
|
|
141
141
|
fill: 'infoPrimary',
|
|
142
142
|
fillHover: 'infoPrimaryHover',
|
|
143
|
-
borderColor: 'infoBorderPrimary',
|
|
144
143
|
labelTextColor: 'infoTextSecondary',
|
|
145
144
|
labelTextColorHover: 'infoTextSecondary',
|
|
145
|
+
borderColor: 'infoBorderPrimary',
|
|
146
146
|
iconAfterFillIcon: 'infoItemPrimary',
|
|
147
147
|
iconBeforeFillIcon: 'infoItemPrimary',
|
|
148
148
|
iconFillIcon: 'infoItemPrimary',
|
|
@@ -355,8 +355,8 @@ const buttonAppearanceSurface = {
|
|
|
355
355
|
surfaceMutedPrimary: {
|
|
356
356
|
fill: 'surfaceTertiary',
|
|
357
357
|
fillHover: 'surfaceTertiary',
|
|
358
|
-
borderColor: 'surfaceBorderQuaternary',
|
|
359
358
|
labelTextColor: 'surfaceTextQuaternary',
|
|
359
|
+
borderColor: 'surfaceBorderQuaternary',
|
|
360
360
|
iconAfterFillIcon: 'surfaceItemQuaternary',
|
|
361
361
|
iconBeforeFillIcon: 'surfaceItemQuaternary',
|
|
362
362
|
iconFillIcon: 'surfaceItemQuaternary',
|
|
@@ -365,36 +365,36 @@ const buttonAppearanceSurface = {
|
|
|
365
365
|
surfacePrimary: {
|
|
366
366
|
fill: 'surfacePrimary',
|
|
367
367
|
fillHover: 'surfaceSecondary',
|
|
368
|
-
borderColor: 'surfaceBorderTertiary',
|
|
369
368
|
labelTextColor: 'surfaceTextPrimary',
|
|
369
|
+
borderColor: 'surfaceBorderTertiary',
|
|
370
370
|
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
371
371
|
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
372
372
|
iconFillIcon: 'surfaceItemPrimary',
|
|
373
373
|
loaderAppearance: 'surfacePrimary',
|
|
374
374
|
},
|
|
375
|
-
|
|
376
|
-
fill: '
|
|
377
|
-
fillHover: '
|
|
378
|
-
borderColor: 'surfaceBorderTertiary',
|
|
375
|
+
surfaceQuaternary: {
|
|
376
|
+
fill: 'surfaceTertiary',
|
|
377
|
+
fillHover: 'surfaceTertiaryHover',
|
|
379
378
|
labelTextColor: 'surfaceTextPrimary',
|
|
379
|
+
borderColor: 'surfaceBorderTertiary',
|
|
380
380
|
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
381
381
|
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
382
382
|
iconFillIcon: 'surfaceItemPrimary',
|
|
383
383
|
loaderAppearance: 'surfacePrimary',
|
|
384
384
|
},
|
|
385
|
-
|
|
386
|
-
fill: '
|
|
385
|
+
surfaceSecondary: {
|
|
386
|
+
fill: 'surfaceSecondary',
|
|
387
387
|
fillHover: 'surfaceSecondary',
|
|
388
388
|
labelTextColor: 'surfaceTextPrimary',
|
|
389
|
+
borderColor: 'surfaceBorderTertiary',
|
|
389
390
|
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
390
391
|
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
391
392
|
iconFillIcon: 'surfaceItemPrimary',
|
|
392
393
|
loaderAppearance: 'surfacePrimary',
|
|
393
394
|
},
|
|
394
|
-
|
|
395
|
+
surfaceTertiary: {
|
|
395
396
|
fill: 'surfaceTertiary',
|
|
396
|
-
fillHover: '
|
|
397
|
-
borderColor: 'surfaceBorderTertiary',
|
|
397
|
+
fillHover: 'surfaceSecondary',
|
|
398
398
|
labelTextColor: 'surfaceTextPrimary',
|
|
399
399
|
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
400
400
|
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
@@ -8,7 +8,7 @@ var DatePicker = require('react-datepicker');
|
|
|
8
8
|
var useAppearanceConfig = require('./cjs/hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
9
9
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
11
|
-
var Button = require('./
|
|
11
|
+
var Button = require('./Button_cjs_CXL-JN3K.js');
|
|
12
12
|
var Icon = require('./Icon_cjs_DKzT-zmQ.js');
|
|
13
13
|
var Input = require('./Input_cjs_DDi5JVAV.js');
|
|
14
14
|
var Label = require('./Label_cjs_D2YMjCoS.js');
|
|
@@ -6,7 +6,7 @@ import DatePicker from 'react-datepicker';
|
|
|
6
6
|
import { useAppearanceConfig } from './hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
7
7
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
9
|
-
import { B as Button } from './
|
|
9
|
+
import { B as Button } from './Button_es_e5ym7OhG.js';
|
|
10
10
|
import { I as Icon } from './Icon_es_5JUPM7bP.js';
|
|
11
11
|
import { I as Input } from './Input_es_BnCXATnh.js';
|
|
12
12
|
import { L as Label } from './Label_es_B5uGQwNN.js';
|
|
@@ -6,7 +6,7 @@ var clsx = require('clsx');
|
|
|
6
6
|
var Cookies = require('js-cookie');
|
|
7
7
|
var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
8
8
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
9
|
-
var Button = require('../../
|
|
9
|
+
var Button = require('../../Button_cjs_CXL-JN3K.js');
|
|
10
10
|
var Text = require('../../Text_cjs_DaH5tVvz.js');
|
|
11
11
|
require('lodash/camelCase');
|
|
12
12
|
require('lodash/castArray');
|
|
@@ -4,7 +4,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var common = require('@itcase/common');
|
|
7
|
-
var DatePicker = require('../../
|
|
7
|
+
var DatePicker = require('../../DatePicker_cjs_BGkmhu-H.js');
|
|
8
8
|
var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
9
9
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
var ChipsGroup = require('../../ChipsGroup_cjs_BNfzAmhc.js');
|
|
@@ -22,7 +22,7 @@ require('react-responsive');
|
|
|
22
22
|
require('../utils/setViewportProperty.js');
|
|
23
23
|
require('../hooks.js');
|
|
24
24
|
require('../hooks/useStyles/styleAttributes.js');
|
|
25
|
-
require('../../
|
|
25
|
+
require('../../Button_cjs_CXL-JN3K.js');
|
|
26
26
|
require('../../Icon_cjs_DKzT-zmQ.js');
|
|
27
27
|
require('react-inlinesvg');
|
|
28
28
|
require('../hoc/urlWithAssetPrefix.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var DatePicker = require('../../
|
|
3
|
+
var DatePicker = require('../../DatePicker_cjs_BGkmhu-H.js');
|
|
4
4
|
require('react/jsx-runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('clsx');
|
|
@@ -22,7 +22,7 @@ require('../hooks.js');
|
|
|
22
22
|
require('../hooks/useStyles/styleAttributes.js');
|
|
23
23
|
require('../hooks/useStyles/useStyles.js');
|
|
24
24
|
require('lodash/maxBy');
|
|
25
|
-
require('../../
|
|
25
|
+
require('../../Button_cjs_CXL-JN3K.js');
|
|
26
26
|
require('../../Icon_cjs_DKzT-zmQ.js');
|
|
27
27
|
require('react-inlinesvg');
|
|
28
28
|
require('../hoc/urlWithAssetPrefix.js');
|
|
@@ -83,7 +83,7 @@ function Drawer(props) {
|
|
|
83
83
|
const isOpenPrevRef = React.useRef(Boolean(_isOpen));
|
|
84
84
|
const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, drawerConfig);
|
|
85
85
|
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
86
|
-
const { direction, size, titleTextColor, titleTextSize, descTextColor, descTextSize, divider, dividerSize, zeroPadding, closeIcon, closeIconFill, closeIconFillIcon, closeIconFillSize, closeIconShape, closeIconSize, closeIconSrc, } = propsGenerator;
|
|
86
|
+
const { direction, size, titleTextColor, titleTextSize, titleTextWeight, descTextColor, descTextSize, divider, dividerSize, zeroPadding, closeIcon, closeIconFill, closeIconFillIcon, closeIconFillSize, closeIconShape, closeIconSize, closeIconSrc, } = propsGenerator;
|
|
87
87
|
React.useEffect(() => {
|
|
88
88
|
const isFromOpenToClose = isOpenPrevRef.current === true && !_isOpen;
|
|
89
89
|
if (isFromOpenToClose && onClose) {
|
|
@@ -98,7 +98,7 @@ function Drawer(props) {
|
|
|
98
98
|
}, [_isOpen, onClose]);
|
|
99
99
|
return (jsxRuntime.jsxs(ReactDrawer, { className: clsx('drawer', type && `drawer_type_${type}`, className, dataTour && `dataTour-${dataTour}`, stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), dataTour: dataTour, direction: direction || 'right', size: size || 600,
|
|
100
100
|
// Drawer set prefix "EZDrawer" for any id
|
|
101
|
-
customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: _isOpen, onClose: onClickClose, children: [before && jsxRuntime.jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsxRuntime.jsx("div", { className: "drawer__close", children: jsxRuntime.jsx(Icon.Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: onClickClose }) })), (title || desc) && (jsxRuntime.jsxs("div", { className: "drawer__header", children: [jsxRuntime.jsx(Icon.Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, children: title }), jsxRuntime.jsx(Text.Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && (jsxRuntime.jsx(Divider.Divider, { width: "fill", size: dividerSize, fill: "surfaceTertiary" })), children && jsxRuntime.jsx("div", { className: "drawer__wrapper", children: children }), after && jsxRuntime.jsx("div", { className: "drawer__after", children: after })] }));
|
|
101
|
+
customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: _isOpen, onClose: onClickClose, children: [before && jsxRuntime.jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsxRuntime.jsx("div", { className: "drawer__close", children: jsxRuntime.jsx(Icon.Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: onClickClose }) })), (title || desc) && (jsxRuntime.jsxs("div", { className: "drawer__header", children: [jsxRuntime.jsx(Icon.Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title }), jsxRuntime.jsx(Text.Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && (jsxRuntime.jsx(Divider.Divider, { width: "fill", size: dividerSize, fill: "surfaceTertiary" })), children && jsxRuntime.jsx("div", { className: "drawer__wrapper", children: children }), after && jsxRuntime.jsx("div", { className: "drawer__after", children: after })] }));
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
exports.Drawer = Drawer;
|
|
@@ -137,7 +137,7 @@ const getOrCreateModalElement = (modalQuerySelector, className = '') => {
|
|
|
137
137
|
};
|
|
138
138
|
// Modal component that is an abstraction around the portal API.
|
|
139
139
|
const Modal = React.forwardRef(function Modal(props, ref) {
|
|
140
|
-
const { id, appearance, className, dataTestId, dataTour, title, modalQuerySelector = '#modal-global', scroll = false, stickyHeader = false,
|
|
140
|
+
const { id, appearance, className, dataTestId, dataTour, title, absoluteHeader = false, modalQuerySelector = '#modal-global', scroll = false, stickyHeader = false, closeIcon, isDisabled, isSkeleton, isCloseOnBlur = true, isOpen: initialIsOpen = false, isOverlay = true, isScrollOnOpen = true, isSetFocusOnOpen = true, onClickOverlay, onCloseModal, onOpenModal, children, } = props;
|
|
141
141
|
// Query DOM element
|
|
142
142
|
const [modalElement, setModalElement] = React.useState(null);
|
|
143
143
|
const [isOpen, setIsOpen] = React.useState(initialIsOpen);
|
|
@@ -228,7 +228,7 @@ const Modal = React.forwardRef(function Modal(props, ref) {
|
|
|
228
228
|
return (modalElement &&
|
|
229
229
|
ReactDOM.createPortal(
|
|
230
230
|
// Any valid React child: JSX, strings, arrays, etc.
|
|
231
|
-
isOpen ? (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("div", { id: id, className: clsx('modal__content', absoluteHeader && 'modal__content-absolute-header', !title && !closeIcon && 'modal__content-no-header', fillClass && `fill_${fillClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, shapeClass && `shape_${shapeClass}`, sizeClass && `modal_size_${sizeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, elevationClass && `elevation_${elevationClass}`, scroll && `modal-scroll_${scroll}`, stickyHeader && 'modal-scroll_header_sticky', isSkeleton && 'modal_skeleton'), ref: modalContentRef, "data-test-id": dataTestId, "data-tour": dataTour, style: modalStyles, tabIndex: 0, onBlur: isCloseOnBlur ? closeModal : undefined, children: [(title || closeIcon) && (jsxRuntime.jsxs("div", { className: clsx('modal__header', fillClass && `fill_${fillClass}`), children: [title && (jsxRuntime.jsx(Icon.Title, {
|
|
231
|
+
isOpen ? (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("div", { id: id, className: clsx('modal__content', absoluteHeader && 'modal__content-absolute-header', !title && !closeIcon && 'modal__content-no-header', fillClass && `fill_${fillClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, shapeClass && `shape_${shapeClass}`, sizeClass && `modal_size_${sizeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, elevationClass && `elevation_${elevationClass}`, scroll && `modal-scroll_${scroll}`, stickyHeader && 'modal-scroll_header_sticky', isSkeleton && 'modal_skeleton'), ref: modalContentRef, "data-test-id": dataTestId, "data-tour": dataTour, style: modalStyles, tabIndex: 0, onBlur: isCloseOnBlur ? closeModal : undefined, children: [(title || closeIcon) && (jsxRuntime.jsxs("div", { className: clsx('modal__header', fillClass && `fill_${fillClass}`), children: [title && (jsxRuntime.jsx(Icon.Title, { width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, flex: "1", children: title })), closeIcon && (jsxRuntime.jsx("div", { className: "modal__close", onClick: closeModal, children: jsxRuntime.jsx(Icon.Icon, { appearance: `${closeIconAppearance} ${closeIconAppearanceSize}`, fillSize: closeIconFillSize, iconSize: closeIconSize, shape: closeIconShape, SvgImage: closeIconImage ?? _default.icons24.Action.Close }) }))] })), jsxRuntime.jsx("div", { className: "modal__content-wrapper", children: children })] }), jsxRuntime.jsx(Overlay.Overlay, { className: "modal__overlay",
|
|
232
232
|
// ref={modalOverlayRef}
|
|
233
233
|
fill: overlayFill, opacity: overlayOpacity, isOverlay: isOverlay, onClick: onClickOverlay })] })) : null,
|
|
234
234
|
// A DOM element
|
|
@@ -27,7 +27,7 @@ require('../context/UrlAssetPrefix.js');
|
|
|
27
27
|
require('../../Link_cjs_qKXVfU8e.js');
|
|
28
28
|
require('../../Text_cjs_DaH5tVvz.js');
|
|
29
29
|
|
|
30
|
-
const
|
|
30
|
+
const modalSheetBottomAppearanceSize = {
|
|
31
31
|
sizeL: {
|
|
32
32
|
size: 'l',
|
|
33
33
|
titleTextSize: 'h4',
|
|
@@ -36,9 +36,10 @@ const modalSheetBottomAppearance = {
|
|
|
36
36
|
size: 'm',
|
|
37
37
|
titleTextSize: 'h5',
|
|
38
38
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const modalSheetBottomAppearance = {
|
|
42
|
+
...modalSheetBottomAppearanceSize,
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
const modalSheetBottomConfig = {
|
|
@@ -8,7 +8,7 @@ var urlWithAssetPrefix = require('../hoc/urlWithAssetPrefix.js');
|
|
|
8
8
|
var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
9
9
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
11
|
-
var Button = require('../../
|
|
11
|
+
var Button = require('../../Button_cjs_CXL-JN3K.js');
|
|
12
12
|
var Group = require('../../Group_cjs_DxyobxPf.js');
|
|
13
13
|
var Text = require('../../Text_cjs_DaH5tVvz.js');
|
|
14
14
|
require('@itcase/common');
|
|
@@ -215,10 +215,10 @@ const responseConfig = {
|
|
|
215
215
|
},
|
|
216
216
|
};
|
|
217
217
|
const Response = urlWithAssetPrefix.urlWithAssetPrefix(function Response(props) {
|
|
218
|
-
const { appearance, className, width, height, title, desc,
|
|
218
|
+
const { appearance, className, width, height, title, desc, bottomButton, primaryButton, secondaryButton, before, after, isSkeleton, onClickSecondaryButton, } = props;
|
|
219
219
|
const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, responseConfig);
|
|
220
220
|
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
221
|
-
const { dataTestId, dataTour, fillClass, fillHoverClass, titleTextColor, titleTextSize, titleTextWeight, descTextColor, descTextSize, descTextWeight, borderColorClass, borderColorHoverClass, borderTypeClass, borderWidthClass,
|
|
221
|
+
const { dataTestId, dataTour, fillClass, fillHoverClass, titleTextColor, titleTextSize, titleTextWeight, descTextColor, descTextSize, descTextWeight, borderColorClass, borderColorHoverClass, borderTypeClass, borderWidthClass, heightClass, imageSrc, primaryButtonAfter, primaryButtonAppearance, primaryButtonBefore, primaryButtonFill, primaryButtonFillHover, primaryButtonLabel, primaryButtonLabelTextColor, primaryButtonLabelTextSize, primaryButtonShape, primaryButtonSize, primaryButtonWidth, secondaryButtonAfter, secondaryButtonAppearance, secondaryButtonBefore, secondaryButtonFill, secondaryButtonFillHover, secondaryButtonLabel, secondaryButtonLabelTextColor, secondaryButtonLabelTextSize, secondaryButtonShape, secondaryButtonSize, secondaryButtonWidth, shapeClass, shapeStrengthClass, svgFillClass, SvgImage, svgPathFillClass, svgSrc, widthClass, onClickPrimaryButton, } = propsGenerator;
|
|
222
222
|
// TODO: use Icon instead?
|
|
223
223
|
const ImageComponent = React.useMemo(() => {
|
|
224
224
|
const src = imageSrc || svgSrc;
|
|
@@ -247,7 +247,7 @@ const Response = urlWithAssetPrefix.urlWithAssetPrefix(function Response(props)
|
|
|
247
247
|
}, [imageSrc, svgSrc, SvgImage, width, height, svgFillClass]);
|
|
248
248
|
// @ts-expect-error
|
|
249
249
|
const { styles: responseStyles, wrapper: wrapperStyles } = useStyles.useStyles(props);
|
|
250
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'response',
|
|
250
|
+
return (jsxRuntime.jsxs("div", { className: clsx(className, 'response', bottomButton && `response_bottom-button`, borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderTypeClass && `border_type_${borderTypeClass}`, borderWidthClass && `border-width_${borderWidthClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, heightClass && `height_${heightClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, widthClass && `width_${widthClass}`, 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 ||
|
|
251
251
|
primaryButton ||
|
|
252
252
|
secondaryButtonLabel ||
|
|
253
253
|
secondaryButton ||
|
|
@@ -266,6 +266,17 @@ const RESPONSE_MESSAGES = {
|
|
|
266
266
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
267
267
|
secondaryButtonLabel: 'Отмена',
|
|
268
268
|
},
|
|
269
|
+
errorAccessDenied: {
|
|
270
|
+
appearance: 'unableLoadData ghost',
|
|
271
|
+
title: 'Доступ ограничен',
|
|
272
|
+
desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
|
|
273
|
+
code: '401/403',
|
|
274
|
+
imageSrc: index.responseIcon.UnableLoadData,
|
|
275
|
+
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
276
|
+
primaryButtonLabel: 'Повторить',
|
|
277
|
+
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
278
|
+
secondaryButtonLabel: 'Отмена',
|
|
279
|
+
},
|
|
269
280
|
errorNetwork: {
|
|
270
281
|
appearance: 'unableLoadData ghost',
|
|
271
282
|
title: 'Ошибка соединения',
|
|
@@ -289,7 +300,7 @@ const RESPONSE_MESSAGES = {
|
|
|
289
300
|
secondaryButtonLabel: 'Отмена',
|
|
290
301
|
},
|
|
291
302
|
empty: {
|
|
292
|
-
appearance: '
|
|
303
|
+
appearance: 'empty ghost',
|
|
293
304
|
title: 'Список пуст',
|
|
294
305
|
desc: 'Нет данных по заданным параметрам',
|
|
295
306
|
code: '200',
|
|
@@ -297,17 +308,6 @@ const RESPONSE_MESSAGES = {
|
|
|
297
308
|
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
298
309
|
primaryButtonLabel: 'ОК',
|
|
299
310
|
},
|
|
300
|
-
errorAccessDenied: {
|
|
301
|
-
appearance: 'unableLoadData ghost',
|
|
302
|
-
title: 'Доступ ограничен',
|
|
303
|
-
desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
|
|
304
|
-
code: '401/403',
|
|
305
|
-
imageSrc: index.responseIcon.UnableLoadData,
|
|
306
|
-
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
307
|
-
primaryButtonLabel: 'Повторить',
|
|
308
|
-
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
309
|
-
secondaryButtonLabel: 'Отмена',
|
|
310
|
-
},
|
|
311
311
|
warning: {
|
|
312
312
|
appearance: 'warning ghost',
|
|
313
313
|
title: 'Внимание',
|
|
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import Cookies from 'js-cookie';
|
|
5
5
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
|
-
import { B as Button } from '../
|
|
7
|
+
import { B as Button } from '../Button_es_e5ym7OhG.js';
|
|
8
8
|
import { T as Text } from '../Text_es_RDU9GLCV.js';
|
|
9
9
|
import 'lodash/camelCase';
|
|
10
10
|
import 'lodash/castArray';
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { DATE_PERIOD_INTERVALS } from '@itcase/common';
|
|
5
|
-
import { D as DatePickerInput } from '../
|
|
5
|
+
import { D as DatePickerInput } from '../DatePicker_es_BoeugHyH.js';
|
|
6
6
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
7
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { b as ChipsGroup, C as Chips } from '../ChipsGroup_es_UTiUhYs7.js';
|
|
@@ -20,7 +20,7 @@ import 'react-responsive';
|
|
|
20
20
|
import '../utils/setViewportProperty.js';
|
|
21
21
|
import '../hooks.js';
|
|
22
22
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
|
-
import '../
|
|
23
|
+
import '../Button_es_e5ym7OhG.js';
|
|
24
24
|
import '../Icon_es_5JUPM7bP.js';
|
|
25
25
|
import 'react-inlinesvg';
|
|
26
26
|
import '../hoc/urlWithAssetPrefix.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../
|
|
1
|
+
export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../DatePicker_es_BoeugHyH.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
@@ -20,7 +20,7 @@ import '../hooks.js';
|
|
|
20
20
|
import '../hooks/useStyles/styleAttributes.js';
|
|
21
21
|
import '../hooks/useStyles/useStyles.js';
|
|
22
22
|
import 'lodash/maxBy';
|
|
23
|
-
import '../
|
|
23
|
+
import '../Button_es_e5ym7OhG.js';
|
|
24
24
|
import '../Icon_es_5JUPM7bP.js';
|
|
25
25
|
import 'react-inlinesvg';
|
|
26
26
|
import '../hoc/urlWithAssetPrefix.js';
|
|
@@ -81,7 +81,7 @@ function Drawer(props) {
|
|
|
81
81
|
const isOpenPrevRef = useRef(Boolean(_isOpen));
|
|
82
82
|
const appearanceConfig = useAppearanceConfig(appearance, drawerConfig);
|
|
83
83
|
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
84
|
-
const { direction, size, titleTextColor, titleTextSize, descTextColor, descTextSize, divider, dividerSize, zeroPadding, closeIcon, closeIconFill, closeIconFillIcon, closeIconFillSize, closeIconShape, closeIconSize, closeIconSrc, } = propsGenerator;
|
|
84
|
+
const { direction, size, titleTextColor, titleTextSize, titleTextWeight, descTextColor, descTextSize, divider, dividerSize, zeroPadding, closeIcon, closeIconFill, closeIconFillIcon, closeIconFillSize, closeIconShape, closeIconSize, closeIconSrc, } = propsGenerator;
|
|
85
85
|
useEffect(() => {
|
|
86
86
|
const isFromOpenToClose = isOpenPrevRef.current === true && !_isOpen;
|
|
87
87
|
if (isFromOpenToClose && onClose) {
|
|
@@ -96,7 +96,7 @@ function Drawer(props) {
|
|
|
96
96
|
}, [_isOpen, onClose]);
|
|
97
97
|
return (jsxs(ReactDrawer, { className: clsx('drawer', type && `drawer_type_${type}`, className, dataTour && `dataTour-${dataTour}`, stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), dataTour: dataTour, direction: direction || 'right', size: size || 600,
|
|
98
98
|
// Drawer set prefix "EZDrawer" for any id
|
|
99
|
-
customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: _isOpen, onClose: onClickClose, children: [before && jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsx("div", { className: "drawer__close", children: jsx(Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: onClickClose }) })), (title || desc) && (jsxs("div", { className: "drawer__header", children: [jsx(Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, children: title }), jsx(Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && (jsx(Divider, { width: "fill", size: dividerSize, fill: "surfaceTertiary" })), children && jsx("div", { className: "drawer__wrapper", children: children }), after && jsx("div", { className: "drawer__after", children: after })] }));
|
|
99
|
+
customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: _isOpen, onClose: onClickClose, children: [before && jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsx("div", { className: "drawer__close", children: jsx(Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: onClickClose }) })), (title || desc) && (jsxs("div", { className: "drawer__header", children: [jsx(Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title }), jsx(Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && (jsx(Divider, { width: "fill", size: dividerSize, fill: "surfaceTertiary" })), children && jsx("div", { className: "drawer__wrapper", children: children }), after && jsx("div", { className: "drawer__after", children: after })] }));
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export { Drawer, drawerAppearance, drawerConfig };
|
package/dist/components/Modal.js
CHANGED
|
@@ -135,7 +135,7 @@ const getOrCreateModalElement = (modalQuerySelector, className = '') => {
|
|
|
135
135
|
};
|
|
136
136
|
// Modal component that is an abstraction around the portal API.
|
|
137
137
|
const Modal = React.forwardRef(function Modal(props, ref) {
|
|
138
|
-
const { id, appearance, className, dataTestId, dataTour, title, modalQuerySelector = '#modal-global', scroll = false, stickyHeader = false,
|
|
138
|
+
const { id, appearance, className, dataTestId, dataTour, title, absoluteHeader = false, modalQuerySelector = '#modal-global', scroll = false, stickyHeader = false, closeIcon, isDisabled, isSkeleton, isCloseOnBlur = true, isOpen: initialIsOpen = false, isOverlay = true, isScrollOnOpen = true, isSetFocusOnOpen = true, onClickOverlay, onCloseModal, onOpenModal, children, } = props;
|
|
139
139
|
// Query DOM element
|
|
140
140
|
const [modalElement, setModalElement] = useState(null);
|
|
141
141
|
const [isOpen, setIsOpen] = useState(initialIsOpen);
|
|
@@ -226,7 +226,7 @@ const Modal = React.forwardRef(function Modal(props, ref) {
|
|
|
226
226
|
return (modalElement &&
|
|
227
227
|
ReactDOM.createPortal(
|
|
228
228
|
// Any valid React child: JSX, strings, arrays, etc.
|
|
229
|
-
isOpen ? (jsxs(React.Fragment, { children: [jsxs("div", { id: id, className: clsx('modal__content', absoluteHeader && 'modal__content-absolute-header', !title && !closeIcon && 'modal__content-no-header', fillClass && `fill_${fillClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, shapeClass && `shape_${shapeClass}`, sizeClass && `modal_size_${sizeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, elevationClass && `elevation_${elevationClass}`, scroll && `modal-scroll_${scroll}`, stickyHeader && 'modal-scroll_header_sticky', isSkeleton && 'modal_skeleton'), ref: modalContentRef, "data-test-id": dataTestId, "data-tour": dataTour, style: modalStyles, tabIndex: 0, onBlur: isCloseOnBlur ? closeModal : undefined, children: [(title || closeIcon) && (jsxs("div", { className: clsx('modal__header', fillClass && `fill_${fillClass}`), children: [title && (jsx(Title, {
|
|
229
|
+
isOpen ? (jsxs(React.Fragment, { children: [jsxs("div", { id: id, className: clsx('modal__content', absoluteHeader && 'modal__content-absolute-header', !title && !closeIcon && 'modal__content-no-header', fillClass && `fill_${fillClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, shapeClass && `shape_${shapeClass}`, sizeClass && `modal_size_${sizeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, elevationClass && `elevation_${elevationClass}`, scroll && `modal-scroll_${scroll}`, stickyHeader && 'modal-scroll_header_sticky', isSkeleton && 'modal_skeleton'), ref: modalContentRef, "data-test-id": dataTestId, "data-tour": dataTour, style: modalStyles, tabIndex: 0, onBlur: isCloseOnBlur ? closeModal : undefined, children: [(title || closeIcon) && (jsxs("div", { className: clsx('modal__header', fillClass && `fill_${fillClass}`), children: [title && (jsx(Title, { width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, flex: "1", children: title })), closeIcon && (jsx("div", { className: "modal__close", onClick: closeModal, children: jsx(Icon, { appearance: `${closeIconAppearance} ${closeIconAppearanceSize}`, fillSize: closeIconFillSize, iconSize: closeIconSize, shape: closeIconShape, SvgImage: closeIconImage ?? icons24.Action.Close }) }))] })), jsx("div", { className: "modal__content-wrapper", children: children })] }), jsx(Overlay, { className: "modal__overlay",
|
|
230
230
|
// ref={modalOverlayRef}
|
|
231
231
|
fill: overlayFill, opacity: overlayOpacity, isOverlay: isOverlay, onClick: onClickOverlay })] })) : null,
|
|
232
232
|
// A DOM element
|
|
@@ -25,7 +25,7 @@ import '../context/UrlAssetPrefix.js';
|
|
|
25
25
|
import '../Link_es_P2b6ya7P.js';
|
|
26
26
|
import '../Text_es_RDU9GLCV.js';
|
|
27
27
|
|
|
28
|
-
const
|
|
28
|
+
const modalSheetBottomAppearanceSize = {
|
|
29
29
|
sizeL: {
|
|
30
30
|
size: 'l',
|
|
31
31
|
titleTextSize: 'h4',
|
|
@@ -34,9 +34,10 @@ const modalSheetBottomAppearance = {
|
|
|
34
34
|
size: 'm',
|
|
35
35
|
titleTextSize: 'h5',
|
|
36
36
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const modalSheetBottomAppearance = {
|
|
40
|
+
...modalSheetBottomAppearanceSize,
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
const modalSheetBottomConfig = {
|
|
@@ -6,7 +6,7 @@ import { urlWithAssetPrefix } from '../hoc/urlWithAssetPrefix.js';
|
|
|
6
6
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
7
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
9
|
-
import { B as Button } from '../
|
|
9
|
+
import { B as Button } from '../Button_es_e5ym7OhG.js';
|
|
10
10
|
import { G as Group } from '../Group_es_DJ6GHMrs.js';
|
|
11
11
|
import { T as Text } from '../Text_es_RDU9GLCV.js';
|
|
12
12
|
import '@itcase/common';
|
|
@@ -213,10 +213,10 @@ const responseConfig = {
|
|
|
213
213
|
},
|
|
214
214
|
};
|
|
215
215
|
const Response = urlWithAssetPrefix(function Response(props) {
|
|
216
|
-
const { appearance, className, width, height, title, desc,
|
|
216
|
+
const { appearance, className, width, height, title, desc, bottomButton, primaryButton, secondaryButton, before, after, isSkeleton, onClickSecondaryButton, } = props;
|
|
217
217
|
const appearanceConfig = useAppearanceConfig(appearance, responseConfig);
|
|
218
218
|
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
219
|
-
const { dataTestId, dataTour, fillClass, fillHoverClass, titleTextColor, titleTextSize, titleTextWeight, descTextColor, descTextSize, descTextWeight, borderColorClass, borderColorHoverClass, borderTypeClass, borderWidthClass,
|
|
219
|
+
const { dataTestId, dataTour, fillClass, fillHoverClass, titleTextColor, titleTextSize, titleTextWeight, descTextColor, descTextSize, descTextWeight, borderColorClass, borderColorHoverClass, borderTypeClass, borderWidthClass, heightClass, imageSrc, primaryButtonAfter, primaryButtonAppearance, primaryButtonBefore, primaryButtonFill, primaryButtonFillHover, primaryButtonLabel, primaryButtonLabelTextColor, primaryButtonLabelTextSize, primaryButtonShape, primaryButtonSize, primaryButtonWidth, secondaryButtonAfter, secondaryButtonAppearance, secondaryButtonBefore, secondaryButtonFill, secondaryButtonFillHover, secondaryButtonLabel, secondaryButtonLabelTextColor, secondaryButtonLabelTextSize, secondaryButtonShape, secondaryButtonSize, secondaryButtonWidth, shapeClass, shapeStrengthClass, svgFillClass, SvgImage, svgPathFillClass, svgSrc, widthClass, onClickPrimaryButton, } = propsGenerator;
|
|
220
220
|
// TODO: use Icon instead?
|
|
221
221
|
const ImageComponent = useMemo(() => {
|
|
222
222
|
const src = imageSrc || svgSrc;
|
|
@@ -245,7 +245,7 @@ const Response = urlWithAssetPrefix(function Response(props) {
|
|
|
245
245
|
}, [imageSrc, svgSrc, SvgImage, width, height, svgFillClass]);
|
|
246
246
|
// @ts-expect-error
|
|
247
247
|
const { styles: responseStyles, wrapper: wrapperStyles } = useStyles(props);
|
|
248
|
-
return (jsxs("div", { className: clsx(className, 'response',
|
|
248
|
+
return (jsxs("div", { className: clsx(className, 'response', bottomButton && `response_bottom-button`, borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderTypeClass && `border_type_${borderTypeClass}`, borderWidthClass && `border-width_${borderWidthClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, heightClass && `height_${heightClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, widthClass && `width_${widthClass}`, 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 ||
|
|
249
249
|
primaryButton ||
|
|
250
250
|
secondaryButtonLabel ||
|
|
251
251
|
secondaryButton ||
|
|
@@ -264,6 +264,17 @@ const RESPONSE_MESSAGES = {
|
|
|
264
264
|
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
265
265
|
secondaryButtonLabel: 'Отмена',
|
|
266
266
|
},
|
|
267
|
+
errorAccessDenied: {
|
|
268
|
+
appearance: 'unableLoadData ghost',
|
|
269
|
+
title: 'Доступ ограничен',
|
|
270
|
+
desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
|
|
271
|
+
code: '401/403',
|
|
272
|
+
imageSrc: responseIcon.UnableLoadData,
|
|
273
|
+
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
274
|
+
primaryButtonLabel: 'Повторить',
|
|
275
|
+
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
276
|
+
secondaryButtonLabel: 'Отмена',
|
|
277
|
+
},
|
|
267
278
|
errorNetwork: {
|
|
268
279
|
appearance: 'unableLoadData ghost',
|
|
269
280
|
title: 'Ошибка соединения',
|
|
@@ -287,7 +298,7 @@ const RESPONSE_MESSAGES = {
|
|
|
287
298
|
secondaryButtonLabel: 'Отмена',
|
|
288
299
|
},
|
|
289
300
|
empty: {
|
|
290
|
-
appearance: '
|
|
301
|
+
appearance: 'empty ghost',
|
|
291
302
|
title: 'Список пуст',
|
|
292
303
|
desc: 'Нет данных по заданным параметрам',
|
|
293
304
|
code: '200',
|
|
@@ -295,17 +306,6 @@ const RESPONSE_MESSAGES = {
|
|
|
295
306
|
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
296
307
|
primaryButtonLabel: 'ОК',
|
|
297
308
|
},
|
|
298
|
-
errorAccessDenied: {
|
|
299
|
-
appearance: 'unableLoadData ghost',
|
|
300
|
-
title: 'Доступ ограничен',
|
|
301
|
-
desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
|
|
302
|
-
code: '401/403',
|
|
303
|
-
imageSrc: responseIcon.UnableLoadData,
|
|
304
|
-
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
305
|
-
primaryButtonLabel: 'Повторить',
|
|
306
|
-
secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
307
|
-
secondaryButtonLabel: 'Отмена',
|
|
308
|
-
},
|
|
309
309
|
warning: {
|
|
310
310
|
appearance: 'warning ghost',
|
|
311
311
|
title: 'Внимание',
|
|
@@ -53,14 +53,6 @@
|
|
|
53
53
|
&__after {
|
|
54
54
|
z-index: 10;
|
|
55
55
|
}
|
|
56
|
-
&_sticky-button {
|
|
57
|
-
^^&__after {
|
|
58
|
-
width: 100%;
|
|
59
|
-
position: sticky;
|
|
60
|
-
left: 0;
|
|
61
|
-
bottom: 0;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
56
|
}
|
|
65
57
|
.drawer {
|
|
66
58
|
&_reset-padding {
|
|
@@ -69,6 +61,19 @@
|
|
|
69
61
|
}
|
|
70
62
|
}
|
|
71
63
|
}
|
|
64
|
+
.drawer {
|
|
65
|
+
&_sticky-button {
|
|
66
|
+
^&__wrapper {
|
|
67
|
+
padding-bottom: 0;
|
|
68
|
+
}
|
|
69
|
+
^&__after {
|
|
70
|
+
width: 100%;
|
|
71
|
+
position: sticky;
|
|
72
|
+
left: 0;
|
|
73
|
+
bottom: 0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
72
77
|
:root {
|
|
73
78
|
--drawer-overlay-background: rgb(116, 116, 116, 0.5);
|
|
74
79
|
--drawer-overlay-filter: blur(10px);
|
|
@@ -9,17 +9,18 @@ declare const RESPONSE_MESSAGES: {
|
|
|
9
9
|
secondaryButtonAppearance: string;
|
|
10
10
|
secondaryButtonLabel: string;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
errorAccessDenied: {
|
|
13
13
|
appearance: string;
|
|
14
14
|
title: string;
|
|
15
15
|
desc: string;
|
|
16
|
+
code: string;
|
|
16
17
|
imageSrc: any;
|
|
17
18
|
primaryButtonAppearance: string;
|
|
18
19
|
primaryButtonLabel: string;
|
|
19
20
|
secondaryButtonAppearance: string;
|
|
20
21
|
secondaryButtonLabel: string;
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
+
errorNetwork: {
|
|
23
24
|
appearance: string;
|
|
24
25
|
title: string;
|
|
25
26
|
desc: string;
|
|
@@ -29,16 +30,17 @@ declare const RESPONSE_MESSAGES: {
|
|
|
29
30
|
secondaryButtonAppearance: string;
|
|
30
31
|
secondaryButtonLabel: string;
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
+
nothingFound: {
|
|
33
34
|
appearance: string;
|
|
34
35
|
title: string;
|
|
35
36
|
desc: string;
|
|
36
|
-
code: string;
|
|
37
37
|
imageSrc: any;
|
|
38
38
|
primaryButtonAppearance: string;
|
|
39
39
|
primaryButtonLabel: string;
|
|
40
|
+
secondaryButtonAppearance: string;
|
|
41
|
+
secondaryButtonLabel: string;
|
|
40
42
|
};
|
|
41
|
-
|
|
43
|
+
empty: {
|
|
42
44
|
appearance: string;
|
|
43
45
|
title: string;
|
|
44
46
|
desc: string;
|
|
@@ -46,8 +48,6 @@ declare const RESPONSE_MESSAGES: {
|
|
|
46
48
|
imageSrc: any;
|
|
47
49
|
primaryButtonAppearance: string;
|
|
48
50
|
primaryButtonLabel: string;
|
|
49
|
-
secondaryButtonAppearance: string;
|
|
50
|
-
secondaryButtonLabel: string;
|
|
51
51
|
};
|
|
52
52
|
warning: {
|
|
53
53
|
appearance: string;
|