@itcase/ui 1.8.75 → 1.8.76
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/cjs/components/Drawer.js +15 -9
- package/dist/components/Drawer.js +15 -9
- package/dist/css/components/Drawer/Drawer.css +2 -0
- package/dist/types/components/Drawer/appearance/drawerSize.d.ts +8 -0
- package/dist/types/components/Drawer/appearance/drawerSurface.d.ts +0 -3
- package/package.json +1 -1
|
@@ -4,39 +4,45 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var ReactDrawer = require('react-modern-drawer');
|
|
7
|
+
var Divider = require('../../Divider_cjs_rxMMBfLC.js');
|
|
7
8
|
var Icon = require('../../Icon_cjs_BdX_3y6P.js');
|
|
8
9
|
var Text = require('../../Text_cjs_B8nNXWBA.js');
|
|
9
10
|
var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
10
11
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
11
12
|
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
12
13
|
var _default = require('@itcase/icons/default');
|
|
13
|
-
require('react-inlinesvg');
|
|
14
|
-
require('../hoc/urlWithAssetPrefix.js');
|
|
15
|
-
require('@itcase/common');
|
|
16
|
-
require('../context/UrlAssetPrefix.js');
|
|
17
14
|
require('../hooks/useStyles/useStyles.js');
|
|
18
15
|
require('lodash/camelCase');
|
|
19
16
|
require('lodash/maxBy');
|
|
20
17
|
require('lodash/upperFirst');
|
|
21
18
|
require('../context/Notifications.js');
|
|
22
19
|
require('uuid');
|
|
20
|
+
require('@itcase/common');
|
|
23
21
|
require('../context/UIContext.js');
|
|
24
22
|
require('../hooks/useMediaQueries/useMediaQueries.js');
|
|
25
23
|
require('react-responsive');
|
|
26
24
|
require('../utils/setViewportProperty.js');
|
|
27
25
|
require('../hooks/useStyles/styleAttributes.js');
|
|
26
|
+
require('react-inlinesvg');
|
|
27
|
+
require('../hoc/urlWithAssetPrefix.js');
|
|
28
|
+
require('../context/UrlAssetPrefix.js');
|
|
28
29
|
require('../../Link_cjs_BqT6eVl6.js');
|
|
29
30
|
require('lodash/castArray');
|
|
30
31
|
|
|
32
|
+
var drawerAppearanceSize = {
|
|
33
|
+
sizeH3: {
|
|
34
|
+
titleTextSize: 'h3',
|
|
35
|
+
descTextSize: 's',
|
|
36
|
+
iconSize: 24,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
31
40
|
var drawerAppearanceSurface = {
|
|
32
41
|
surfacePrimary: {
|
|
33
42
|
fill: 'surfacePrimary',
|
|
34
43
|
fillHover: 'surfacePrimaryHover',
|
|
35
44
|
titleTextColor: 'surfaceTextPrimary',
|
|
36
|
-
titleTextSize: 'h3',
|
|
37
45
|
descTextColor: 'surfaceTextPrimary',
|
|
38
|
-
descTextSize: 's',
|
|
39
|
-
iconSize: 24,
|
|
40
46
|
closeIcon: _default.icons24.Action.Close,
|
|
41
47
|
closeIconFillIcon: 'surfaceItemPrimary',
|
|
42
48
|
},
|
|
@@ -59,7 +65,7 @@ var drawerAppearanceSurface = {
|
|
|
59
65
|
},
|
|
60
66
|
};
|
|
61
67
|
|
|
62
|
-
var drawerAppearance = tslib_es6.__assign({}, drawerAppearanceSurface);
|
|
68
|
+
var drawerAppearance = tslib_es6.__assign(tslib_es6.__assign({}, drawerAppearanceSize), drawerAppearanceSurface);
|
|
63
69
|
|
|
64
70
|
var drawerConfig = {
|
|
65
71
|
appearance: drawerAppearance,
|
|
@@ -81,7 +87,7 @@ function Drawer(props) {
|
|
|
81
87
|
}, [isOpenModal, onClose]);
|
|
82
88
|
return (jsxRuntime.jsxs(ReactDrawer, { className: clsx('drawer', type && "drawer_type_".concat(type), className, dataTour && "dataTour-".concat(dataTour), stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), direction: direction || 'right', size: size || 600,
|
|
83
89
|
// Drawer set prefix "EZDrawer" for any id
|
|
84
|
-
customIdSuffix: dataTestId ? "_".concat(dataTestId) : undefined, dataTour: dataTour, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: isOpenModal, 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 }) })), (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, { width: "fill", fill: "surfaceTertiary" }), children && jsxRuntime.jsx("div", { className: "drawer__wrapper", children: children }), after && jsxRuntime.jsx("div", { className: "drawer__after", children: after })] }));
|
|
90
|
+
customIdSuffix: dataTestId ? "_".concat(dataTestId) : undefined, dataTour: dataTour, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: isOpenModal, 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", fill: "surfaceTertiary" }), children && jsxRuntime.jsx("div", { className: "drawer__wrapper", children: children }), after && jsxRuntime.jsx("div", { className: "drawer__after", children: after })] }));
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
exports.Drawer = Drawer;
|
|
@@ -2,39 +2,45 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useRef, useEffect } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import ReactDrawer from 'react-modern-drawer';
|
|
5
|
+
import { D as Divider } from '../Divider_es_CiRU0sTz.js';
|
|
5
6
|
import { I as Icon, b as Title } from '../Icon_es_Xh3eVHNS.js';
|
|
6
7
|
import { T as Text } from '../Text_es_BvmOR4nv.js';
|
|
7
8
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
8
9
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
9
10
|
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
10
11
|
import { icons24 } from '@itcase/icons/default';
|
|
11
|
-
import 'react-inlinesvg';
|
|
12
|
-
import '../hoc/urlWithAssetPrefix.js';
|
|
13
|
-
import '@itcase/common';
|
|
14
|
-
import '../context/UrlAssetPrefix.js';
|
|
15
12
|
import '../hooks/useStyles/useStyles.js';
|
|
16
13
|
import 'lodash/camelCase';
|
|
17
14
|
import 'lodash/maxBy';
|
|
18
15
|
import 'lodash/upperFirst';
|
|
19
16
|
import '../context/Notifications.js';
|
|
20
17
|
import 'uuid';
|
|
18
|
+
import '@itcase/common';
|
|
21
19
|
import '../context/UIContext.js';
|
|
22
20
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
23
21
|
import 'react-responsive';
|
|
24
22
|
import '../utils/setViewportProperty.js';
|
|
25
23
|
import '../hooks/useStyles/styleAttributes.js';
|
|
24
|
+
import 'react-inlinesvg';
|
|
25
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
26
|
+
import '../context/UrlAssetPrefix.js';
|
|
26
27
|
import '../Link_es_BnUIX0QT.js';
|
|
27
28
|
import 'lodash/castArray';
|
|
28
29
|
|
|
30
|
+
var drawerAppearanceSize = {
|
|
31
|
+
sizeH3: {
|
|
32
|
+
titleTextSize: 'h3',
|
|
33
|
+
descTextSize: 's',
|
|
34
|
+
iconSize: 24,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
29
38
|
var drawerAppearanceSurface = {
|
|
30
39
|
surfacePrimary: {
|
|
31
40
|
fill: 'surfacePrimary',
|
|
32
41
|
fillHover: 'surfacePrimaryHover',
|
|
33
42
|
titleTextColor: 'surfaceTextPrimary',
|
|
34
|
-
titleTextSize: 'h3',
|
|
35
43
|
descTextColor: 'surfaceTextPrimary',
|
|
36
|
-
descTextSize: 's',
|
|
37
|
-
iconSize: 24,
|
|
38
44
|
closeIcon: icons24.Action.Close,
|
|
39
45
|
closeIconFillIcon: 'surfaceItemPrimary',
|
|
40
46
|
},
|
|
@@ -57,7 +63,7 @@ var drawerAppearanceSurface = {
|
|
|
57
63
|
},
|
|
58
64
|
};
|
|
59
65
|
|
|
60
|
-
var drawerAppearance = __assign({}, drawerAppearanceSurface);
|
|
66
|
+
var drawerAppearance = __assign(__assign({}, drawerAppearanceSize), drawerAppearanceSurface);
|
|
61
67
|
|
|
62
68
|
var drawerConfig = {
|
|
63
69
|
appearance: drawerAppearance,
|
|
@@ -79,7 +85,7 @@ function Drawer(props) {
|
|
|
79
85
|
}, [isOpenModal, onClose]);
|
|
80
86
|
return (jsxs(ReactDrawer, { className: clsx('drawer', type && "drawer_type_".concat(type), className, dataTour && "dataTour-".concat(dataTour), stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), direction: direction || 'right', size: size || 600,
|
|
81
87
|
// Drawer set prefix "EZDrawer" for any id
|
|
82
|
-
customIdSuffix: dataTestId ? "_".concat(dataTestId) : undefined, dataTour: dataTour, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: isOpenModal, 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 }) })), (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", fill: "surfaceTertiary" }), children && jsx("div", { className: "drawer__wrapper", children: children }), after && jsx("div", { className: "drawer__after", children: after })] }));
|
|
88
|
+
customIdSuffix: dataTestId ? "_".concat(dataTestId) : undefined, dataTour: dataTour, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: isOpenModal, 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", fill: "surfaceTertiary" }), children && jsx("div", { className: "drawer__wrapper", children: children }), after && jsx("div", { className: "drawer__after", children: after })] }));
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
export { Drawer, drawerAppearance, drawerConfig };
|