@itcase/ui 1.8.37 → 1.8.39
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_nMPCDjk8.js → Avatar_cjs_mqB6k6yB.js} +2 -2
- package/dist/{Avatar_es_B73a6TzA.js → Avatar_es_DKL6hUIM.js} +2 -2
- package/dist/{Button_cjs_plv5-qcj.js → Button_cjs_CwduBuCx.js} +1 -1
- package/dist/{Button_es_BigB2Wz6.js → Button_es_CBUUZuP3.js} +1 -1
- package/dist/{ChipsGroup_cjs_DrOhD-Fc.js → ChipsGroup_cjs_Dq-QQCR_.js} +1 -1
- package/dist/{ChipsGroup_es_B9m4l0wN.js → ChipsGroup_es_DdU5NMpc.js} +1 -1
- package/dist/{DatePicker_cjs_CmqgSNw7.js → DatePicker_cjs_0MnhwJnY.js} +17 -17
- package/dist/{DatePicker_es_mk9wFTe9.js → DatePicker_es_D4P4DT8L.js} +17 -17
- package/dist/{DropdownItem_cjs_DQvByLbN.js → DropdownItem_cjs_BuT4hQS1.js} +1 -1
- package/dist/{DropdownItem_es_KppIfto7.js → DropdownItem_es_CrwvBzq_.js} +1 -1
- package/dist/{Image_cjs_CCWqbNn4.js → Image_cjs_2zEjohYE.js} +5 -4
- package/dist/{Image_es_DZUVp0FS.js → Image_es_ChF-63wh.js} +5 -4
- package/dist/{Label_cjs_BGJfyrOL.js → Label_cjs_CKR9noZi.js} +1 -1
- package/dist/{Label_es_C4Px7b-N.js → Label_es_Cz9OKQAr.js} +1 -1
- package/dist/{Tooltip_cjs_DHduWa-v.js → Tooltip_cjs_CiY50iRK.js} +7 -4
- package/dist/{Tooltip_es_ltCY-w4M.js → Tooltip_es_Cc2orRUE.js} +7 -4
- package/dist/cjs/components/Accordion.js +3 -1
- package/dist/cjs/components/Avatar.js +5 -3
- package/dist/cjs/components/AvatarStack.js +5 -3
- package/dist/cjs/components/Badge.js +3 -1
- package/dist/cjs/components/Breadcrumbs.js +3 -1
- package/dist/cjs/components/Button.js +4 -2
- package/dist/cjs/components/Cell.js +4 -2
- package/dist/cjs/components/Chips.js +4 -2
- package/dist/cjs/components/Choice.js +3 -1
- package/dist/cjs/components/CookiesWarning.js +4 -2
- package/dist/cjs/components/DatePeriod.js +27 -21
- package/dist/cjs/components/DatePicker.js +6 -4
- package/dist/cjs/components/Drawer.js +3 -1
- package/dist/cjs/components/Dropdown.js +4 -2
- package/dist/cjs/components/HeroTitle.js +3 -1
- package/dist/cjs/components/Icon.js +3 -1
- package/dist/cjs/components/Image.js +5 -3
- package/dist/cjs/components/InputPassword.js +3 -1
- package/dist/cjs/components/Label.js +4 -2
- package/dist/cjs/components/Logo.js +7 -5
- package/dist/cjs/components/MenuItem.js +3 -1
- package/dist/cjs/components/Modal.js +3 -1
- package/dist/cjs/components/Notification.js +3 -2
- package/dist/cjs/components/Pagination.js +4 -2
- package/dist/cjs/components/Response.js +8 -5
- package/dist/cjs/components/SVGContent.js +5 -3
- package/dist/cjs/components/Search.js +3 -1
- package/dist/cjs/components/Segmented.js +3 -1
- package/dist/cjs/components/Select.js +3 -1
- package/dist/cjs/components/Swiper.js +3 -1
- package/dist/cjs/components/Switch.js +0 -1
- package/dist/cjs/components/Tab.js +3 -1
- package/dist/cjs/components/Tile.js +3 -1
- package/dist/cjs/components/Title.js +3 -1
- package/dist/cjs/components/Tooltip.js +3 -1
- package/dist/cjs/context/UrlAssetPrefix.js +17 -0
- package/dist/cjs/hoc/urlWithAssetPrefix.js +64 -0
- package/dist/components/Accordion.js +3 -1
- package/dist/components/Avatar.js +5 -3
- package/dist/components/AvatarStack.js +5 -3
- package/dist/components/Badge.js +3 -1
- package/dist/components/Breadcrumbs.js +3 -1
- package/dist/components/Button.js +4 -2
- package/dist/components/Cell.js +4 -2
- package/dist/components/Chips.js +4 -2
- package/dist/components/Choice.js +3 -1
- package/dist/components/CookiesWarning.js +4 -2
- package/dist/components/DatePeriod.js +27 -21
- package/dist/components/DatePicker.js +6 -4
- package/dist/components/Drawer.js +3 -1
- package/dist/components/Dropdown.js +4 -2
- package/dist/components/HeroTitle.js +3 -1
- package/dist/components/Icon.js +3 -1
- package/dist/components/Image.js +5 -3
- package/dist/components/InputPassword.js +3 -1
- package/dist/components/Label.js +4 -2
- package/dist/components/Logo.js +7 -5
- package/dist/components/MenuItem.js +3 -1
- package/dist/components/Modal.js +3 -1
- package/dist/components/Notification.js +3 -2
- package/dist/components/Pagination.js +4 -2
- package/dist/components/Response.js +8 -5
- package/dist/components/SVGContent.js +5 -3
- package/dist/components/Search.js +3 -1
- package/dist/components/Segmented.js +3 -1
- package/dist/components/Select.js +3 -1
- package/dist/components/Swiper.js +3 -1
- package/dist/components/Switch.js +0 -1
- package/dist/components/Tab.js +3 -1
- package/dist/components/Tile.js +3 -1
- package/dist/components/Title.js +3 -1
- package/dist/components/Tooltip.js +3 -1
- package/dist/context/UrlAssetPrefix.js +14 -0
- package/dist/hoc/urlWithAssetPrefix.js +62 -0
- package/dist/types/components/Icon/Icon.d.ts +6 -2
- package/dist/types/components/Image/Image.d.ts +5 -2
- package/dist/types/components/Logo/Logo.d.ts +6 -2
- package/dist/types/components/Response/Response.d.ts +6 -2
- package/dist/types/components/Response/Response.interface.d.ts +3 -1
- package/dist/types/components/SVGContent/SVGContent.d.ts +5 -2
- package/dist/types/context/UrlAssetPrefix.d.ts +12 -0
- package/dist/types/hoc/urlWithAssetPrefix.d.ts +8 -0
- package/package.json +6 -1
|
@@ -5,7 +5,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
7
7
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
8
|
-
var Tooltip = require('../../
|
|
8
|
+
var Tooltip = require('../../Tooltip_cjs_CiY50iRK.js');
|
|
9
9
|
var Text = require('../../Text_cjs_C9fOm0nd.js');
|
|
10
10
|
require('react');
|
|
11
11
|
require('lodash/camelCase');
|
|
@@ -21,6 +21,8 @@ require('../utils/setViewportProperty.js');
|
|
|
21
21
|
require('lodash/maxBy');
|
|
22
22
|
require('../hooks/useStyles/styleAttributes.js');
|
|
23
23
|
require('react-inlinesvg');
|
|
24
|
+
require('../hoc/urlWithAssetPrefix.js');
|
|
25
|
+
require('../context/UrlAssetPrefix.js');
|
|
24
26
|
require('../../Link_cjs_DbRGq2Yk.js');
|
|
25
27
|
|
|
26
28
|
var tileAppearanceSize = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Tooltip = require('../../
|
|
3
|
+
var Tooltip = require('../../Tooltip_cjs_CiY50iRK.js');
|
|
4
4
|
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
@@ -21,6 +21,8 @@ require('lodash/maxBy');
|
|
|
21
21
|
require('../hooks/useStyles/styleAttributes.js');
|
|
22
22
|
require('../../Text_cjs_C9fOm0nd.js');
|
|
23
23
|
require('react-inlinesvg');
|
|
24
|
+
require('../hoc/urlWithAssetPrefix.js');
|
|
25
|
+
require('../context/UrlAssetPrefix.js');
|
|
24
26
|
require('../../Link_cjs_DbRGq2Yk.js');
|
|
25
27
|
|
|
26
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Tooltip = require('../../
|
|
3
|
+
var Tooltip = require('../../Tooltip_cjs_CiY50iRK.js');
|
|
4
4
|
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
@@ -21,6 +21,8 @@ require('lodash/maxBy');
|
|
|
21
21
|
require('../hooks/useStyles/styleAttributes.js');
|
|
22
22
|
require('../../Text_cjs_C9fOm0nd.js');
|
|
23
23
|
require('react-inlinesvg');
|
|
24
|
+
require('../hoc/urlWithAssetPrefix.js');
|
|
25
|
+
require('../context/UrlAssetPrefix.js');
|
|
24
26
|
require('../../Link_cjs_DbRGq2Yk.js');
|
|
25
27
|
|
|
26
28
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
|
|
6
|
+
var UrlAssetPrefixContext = React.createContext({
|
|
7
|
+
assetPrefix: undefined,
|
|
8
|
+
ignorePathsList: undefined,
|
|
9
|
+
});
|
|
10
|
+
function UrlAssetPrefixProvider(props) {
|
|
11
|
+
var assetPrefix = props.assetPrefix, ignorePathsList = props.ignorePathsList, children = props.children;
|
|
12
|
+
var value = React.useMemo(function () { return ({ assetPrefix: assetPrefix, ignorePathsList: ignorePathsList }); }, [assetPrefix, ignorePathsList]);
|
|
13
|
+
return (jsxRuntime.jsx(UrlAssetPrefixContext.Provider, { value: value, children: children }));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exports.UrlAssetPrefixContext = UrlAssetPrefixContext;
|
|
17
|
+
exports.UrlAssetPrefixProvider = UrlAssetPrefixProvider;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var common = require('@itcase/common');
|
|
7
|
+
var UrlAssetPrefix = require('../context/UrlAssetPrefix.js');
|
|
8
|
+
|
|
9
|
+
var urlPropsList = ['src', 'imageSrc', 'svgSrc', 'placeholderUrl'];
|
|
10
|
+
var urlWithAssetPrefix = function (WrappedComponent) {
|
|
11
|
+
var HOC = React.forwardRef(function HOC(props, ref) {
|
|
12
|
+
var _a = React.useContext(UrlAssetPrefix.UrlAssetPrefixContext), assetPrefix = _a.assetPrefix, ignorePathsList = _a.ignorePathsList;
|
|
13
|
+
var overrideProps = urlPropsList.reduce(function (resultProps, propKey) {
|
|
14
|
+
var url = props[propKey];
|
|
15
|
+
if (url && typeof url === 'string') {
|
|
16
|
+
if (assetPrefix) {
|
|
17
|
+
var cleanUrl = common.formatURL(url);
|
|
18
|
+
var isNeedAssetPrefix = checkIsNeedAssetPrefix(cleanUrl, assetPrefix, ignorePathsList);
|
|
19
|
+
if (isNeedAssetPrefix) {
|
|
20
|
+
var prefixPath = common.formatURL(assetPrefix).slice(0, -1);
|
|
21
|
+
url = "".concat(prefixPath).concat(cleanUrl);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
resultProps[propKey] = url;
|
|
25
|
+
}
|
|
26
|
+
return resultProps;
|
|
27
|
+
}, {});
|
|
28
|
+
return jsxRuntime.jsx(WrappedComponent, tslib_es6.__assign({}, props, overrideProps, { ref: ref }));
|
|
29
|
+
});
|
|
30
|
+
return HOC;
|
|
31
|
+
};
|
|
32
|
+
var checkIsNeedAssetPrefix = function (url, assetPrefix, ignorePathsList) {
|
|
33
|
+
if (ignorePathsList === void 0) { ignorePathsList = []; }
|
|
34
|
+
// Ignore prefix if:
|
|
35
|
+
var isPrefixIgnore =
|
|
36
|
+
// Url is absolute
|
|
37
|
+
url.startsWith('http:') ||
|
|
38
|
+
url.startsWith('https:') ||
|
|
39
|
+
// Url is data string
|
|
40
|
+
url.startsWith('data:') ||
|
|
41
|
+
// Url already have prefix
|
|
42
|
+
url.startsWith(assetPrefix);
|
|
43
|
+
if (isPrefixIgnore) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
// And check special paths for ignore prefix
|
|
47
|
+
for (var _i = 0, ignorePathsList_1 = ignorePathsList; _i < ignorePathsList_1.length; _i++) {
|
|
48
|
+
var urlPath = ignorePathsList_1[_i];
|
|
49
|
+
if (urlPath instanceof RegExp) {
|
|
50
|
+
if (urlPath.test(url)) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
if (url.startsWith(common.formatURL(urlPath))) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// Need to add prefix to url
|
|
61
|
+
return true;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.urlWithAssetPrefix = urlWithAssetPrefix;
|
|
@@ -5,7 +5,7 @@ import clsx from 'clsx';
|
|
|
5
5
|
import castArray from 'lodash/castArray';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
|
-
import { B as Badge, I as Icon } from '../
|
|
8
|
+
import { B as Badge, I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
9
9
|
import { D as Divider } from '../Divider_es_kY-30pft.js';
|
|
10
10
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
11
11
|
import { icons16 } from '@itcase/icons/default';
|
|
@@ -21,6 +21,8 @@ import '../utils/setViewportProperty.js';
|
|
|
21
21
|
import 'lodash/maxBy';
|
|
22
22
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
23
|
import 'react-inlinesvg';
|
|
24
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
25
|
+
import '../context/UrlAssetPrefix.js';
|
|
24
26
|
import '../Link_es_DxtZLeKY.js';
|
|
25
27
|
|
|
26
28
|
var accordionAppearanceSize = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Avatar, b as avatarAppearance, a as avatarConfig } from '../
|
|
1
|
+
export { A as Avatar, b as avatarAppearance, a as avatarConfig } from '../Avatar_es_DKL6hUIM.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -14,11 +14,13 @@ import '../context/UIContext.js';
|
|
|
14
14
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
15
15
|
import 'react-responsive';
|
|
16
16
|
import '../utils/setViewportProperty.js';
|
|
17
|
-
import '../
|
|
17
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
18
18
|
import '../hooks/useStyles/useStyles.js';
|
|
19
19
|
import 'lodash/maxBy';
|
|
20
20
|
import '../hooks/useStyles/styleAttributes.js';
|
|
21
21
|
import '../Text_es_BfLRfj-5.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
import '../Link_es_DxtZLeKY.js';
|
|
24
|
-
import '../
|
|
26
|
+
import '../Image_es_ChF-63wh.js';
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
|
-
import { A as Avatar } from '../
|
|
6
|
+
import { A as Avatar } from '../Avatar_es_DKL6hUIM.js';
|
|
7
7
|
import { G as Group } from '../Group_es_CYW2Hquh.js';
|
|
8
8
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
9
9
|
import 'react';
|
|
@@ -19,10 +19,12 @@ import 'react-responsive';
|
|
|
19
19
|
import '../utils/setViewportProperty.js';
|
|
20
20
|
import 'lodash/maxBy';
|
|
21
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
|
-
import '../
|
|
22
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
23
23
|
import 'react-inlinesvg';
|
|
24
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
25
|
+
import '../context/UrlAssetPrefix.js';
|
|
24
26
|
import '../Link_es_DxtZLeKY.js';
|
|
25
|
-
import '../
|
|
27
|
+
import '../Image_es_ChF-63wh.js';
|
|
26
28
|
|
|
27
29
|
var avatarStackAppearanceSize = {
|
|
28
30
|
size16: {
|
package/dist/components/Badge.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as Badge, f as badgeAppearance, g as badgeConfig } from '../
|
|
1
|
+
export { B as Badge, f as badgeAppearance, g as badgeConfig } from '../Tooltip_es_Cc2orRUE.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -19,4 +19,6 @@ import 'lodash/maxBy';
|
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import '../Text_es_BfLRfj-5.js';
|
|
21
21
|
import 'react-inlinesvg';
|
|
22
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
23
|
+
import '../context/UrlAssetPrefix.js';
|
|
22
24
|
import '../Link_es_DxtZLeKY.js';
|
|
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
6
|
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
|
-
import { I as Icon } from '../
|
|
7
|
+
import { I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
8
8
|
import { a as LinkWrapper } from '../Link_es_DxtZLeKY.js';
|
|
9
9
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
10
10
|
import { icons12, icons14, icons16, icons20, icons24 } from '@itcase/icons/default';
|
|
@@ -21,6 +21,8 @@ import '../utils/setViewportProperty.js';
|
|
|
21
21
|
import 'lodash/maxBy';
|
|
22
22
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
23
|
import 'react-inlinesvg';
|
|
24
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
25
|
+
import '../context/UrlAssetPrefix.js';
|
|
24
26
|
|
|
25
27
|
var breadcrumbsAppearanceAccent = {
|
|
26
28
|
accentPrimary: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../
|
|
1
|
+
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../Button_es_CBUUZuP3.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'clsx';
|
|
6
|
-
import '../
|
|
6
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
7
7
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import 'lodash/camelCase';
|
|
9
9
|
import 'lodash/castArray';
|
|
@@ -20,5 +20,7 @@ import 'lodash/maxBy';
|
|
|
20
20
|
import '../hooks/useStyles/styleAttributes.js';
|
|
21
21
|
import '../Text_es_BfLRfj-5.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
import '../Link_es_DxtZLeKY.js';
|
|
24
26
|
import '../Loader_es_GYOr0UTX.js';
|
package/dist/components/Cell.js
CHANGED
|
@@ -3,8 +3,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
|
-
import { I as Icon } from '../
|
|
7
|
-
import { L as Label } from '../
|
|
6
|
+
import { I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
7
|
+
import { L as Label } from '../Label_es_Cz9OKQAr.js';
|
|
8
8
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'lodash/camelCase';
|
|
@@ -20,6 +20,8 @@ import '../utils/setViewportProperty.js';
|
|
|
20
20
|
import 'lodash/maxBy';
|
|
21
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
import '../Link_es_DxtZLeKY.js';
|
|
24
26
|
|
|
25
27
|
var cellAppearanceSize = {
|
package/dist/components/Chips.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as Chips, b as ChipsGroup, a as chipsAppearance, c as chipsConfig } from '../
|
|
1
|
+
export { C as Chips, b as ChipsGroup, a as chipsAppearance, c as chipsConfig } from '../ChipsGroup_es_DdU5NMpc.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'clsx';
|
|
4
4
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
@@ -17,7 +17,9 @@ import '../utils/setViewportProperty.js';
|
|
|
17
17
|
import '../hooks/useStyles/useStyles.js';
|
|
18
18
|
import 'lodash/maxBy';
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
|
-
import '../
|
|
20
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
21
21
|
import '../Text_es_BfLRfj-5.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
import '../Link_es_DxtZLeKY.js';
|
|
@@ -4,7 +4,7 @@ import React, { useRef, useMemo, createRef, useCallback } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon } from '../
|
|
7
|
+
import { I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
8
8
|
import { L as Loader } from '../Loader_es_GYOr0UTX.js';
|
|
9
9
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
10
10
|
import 'lodash/camelCase';
|
|
@@ -20,6 +20,8 @@ import '../utils/setViewportProperty.js';
|
|
|
20
20
|
import 'lodash/maxBy';
|
|
21
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
import '../Link_es_DxtZLeKY.js';
|
|
24
26
|
|
|
25
27
|
var choiceAppearanceDefault = {
|
|
@@ -4,7 +4,7 @@ import { useRef, useMemo, useCallback, useEffect } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import Cookies from 'js-cookie';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
|
-
import { B as Button } from '../
|
|
7
|
+
import { B as Button } from '../Button_es_CBUUZuP3.js';
|
|
8
8
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
9
9
|
import 'lodash/camelCase';
|
|
10
10
|
import 'lodash/castArray';
|
|
@@ -16,11 +16,13 @@ import '../context/UIContext.js';
|
|
|
16
16
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
17
17
|
import 'react-responsive';
|
|
18
18
|
import '../utils/setViewportProperty.js';
|
|
19
|
-
import '../
|
|
19
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
20
20
|
import '../hooks/useStyles/useStyles.js';
|
|
21
21
|
import 'lodash/maxBy';
|
|
22
22
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
23
|
import 'react-inlinesvg';
|
|
24
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
25
|
+
import '../context/UrlAssetPrefix.js';
|
|
24
26
|
import '../Link_es_DxtZLeKY.js';
|
|
25
27
|
import '../Loader_es_GYOr0UTX.js';
|
|
26
28
|
|
|
@@ -2,11 +2,10 @@ import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { DateTime } from 'luxon';
|
|
6
5
|
import { DATE_PERIOD_INTERVALS } from '@itcase/common';
|
|
7
|
-
import { D as DatePickerInput } from '../
|
|
6
|
+
import { D as DatePickerInput } from '../DatePicker_es_D4P4DT8L.js';
|
|
8
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
9
|
-
import { b as ChipsGroup, C as Chips } from '../
|
|
8
|
+
import { b as ChipsGroup, C as Chips } from '../ChipsGroup_es_DdU5NMpc.js';
|
|
10
9
|
import 'date-fns/locale';
|
|
11
10
|
import 'react-datepicker';
|
|
12
11
|
import '../hooks/useStyles/useStyles.js';
|
|
@@ -20,14 +19,16 @@ import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
|
20
19
|
import 'react-responsive';
|
|
21
20
|
import '../utils/setViewportProperty.js';
|
|
22
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
|
-
import '../
|
|
24
|
-
import '../
|
|
22
|
+
import '../Button_es_CBUUZuP3.js';
|
|
23
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
25
24
|
import '../Text_es_BfLRfj-5.js';
|
|
26
25
|
import 'react-inlinesvg';
|
|
26
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
27
|
+
import '../context/UrlAssetPrefix.js';
|
|
27
28
|
import '../Link_es_DxtZLeKY.js';
|
|
28
29
|
import '../Loader_es_GYOr0UTX.js';
|
|
29
30
|
import '../Input_es_D9Y1Rj5Y.js';
|
|
30
|
-
import '../
|
|
31
|
+
import '../Label_es_Cz9OKQAr.js';
|
|
31
32
|
import '@itcase/icons/default';
|
|
32
33
|
import 'lodash/castArray';
|
|
33
34
|
|
|
@@ -76,7 +77,7 @@ var datePeriodConfig = {
|
|
|
76
77
|
},
|
|
77
78
|
};
|
|
78
79
|
function DatePeriod(props) {
|
|
79
|
-
var className = props.className, appearance = props.appearance, _a = props.datePeriodIntervalsList, datePeriodIntervalsList = _a === void 0 ? Object.values(DATE_PERIOD_INTERVALS) : _a, datePeriodValueEnd = props.datePeriodValueEnd, datePeriodValueStart = props.datePeriodValueStart,
|
|
80
|
+
var className = props.className, appearance = props.appearance, _a = props.datePeriodIntervalsList, datePeriodIntervalsList = _a === void 0 ? Object.values(DATE_PERIOD_INTERVALS) : _a, datePeriodValueEnd = props.datePeriodValueEnd, datePeriodValueStart = props.datePeriodValueStart, monthsShown = props.monthsShown, isSkeleton = props.isSkeleton, onChangeDatePeriod = props.onChangeDatePeriod, onKeyDown = props.onKeyDown;
|
|
80
81
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
81
82
|
var _a;
|
|
82
83
|
return (__assign(__assign({}, resultConfig), (_a = datePeriodConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
@@ -86,18 +87,7 @@ function DatePeriod(props) {
|
|
|
86
87
|
var onClickPeriodChips = useCallback(function (selectedPeriodItem) {
|
|
87
88
|
var dateStartIso = selectedPeriodItem.dateIntervalsList[0];
|
|
88
89
|
var dateEndIso = selectedPeriodItem.dateIntervalsList[1];
|
|
89
|
-
onChangeDatePeriod(dateStartIso, dateEndIso);
|
|
90
|
-
}, [onChangeDatePeriod]);
|
|
91
|
-
var onChangeDatePicker = useCallback(function (dateStart, dateEnd) {
|
|
92
|
-
var dateStartIso = null;
|
|
93
|
-
var dateEndIso = null;
|
|
94
|
-
if (dateStart) {
|
|
95
|
-
dateStartIso = DateTime.fromJSDate(dateStart).toISODate();
|
|
96
|
-
}
|
|
97
|
-
if (dateEnd) {
|
|
98
|
-
dateEndIso = DateTime.fromJSDate(dateEnd).toISODate();
|
|
99
|
-
}
|
|
100
|
-
onChangeDatePeriod(dateStartIso, dateEndIso);
|
|
90
|
+
onChangeDatePeriod(new Date(dateStartIso), new Date(dateEndIso));
|
|
101
91
|
}, [onChangeDatePeriod]);
|
|
102
92
|
var checkIsChipsActive = useCallback(function (targetPeriodItem) {
|
|
103
93
|
var dateStartIso = targetPeriodItem.dateIntervalsList[0];
|
|
@@ -105,14 +95,28 @@ function DatePeriod(props) {
|
|
|
105
95
|
return (dateStartIso === datePeriodValueStart &&
|
|
106
96
|
dateEndIso === datePeriodValueEnd);
|
|
107
97
|
}, [datePeriodValueEnd, datePeriodValueStart]);
|
|
98
|
+
// const onChangeDatePicker = useCallback(
|
|
99
|
+
// (dateStart: Date | null, dateEnd: Date | null) => {
|
|
100
|
+
// let dateStartIso = null
|
|
101
|
+
// let dateEndIso = null
|
|
102
|
+
// if (dateStart) {
|
|
103
|
+
// dateStartIso = DateTime.fromJSDate(dateStart).toISODate()
|
|
104
|
+
// }
|
|
105
|
+
// if (dateEnd) {
|
|
106
|
+
// dateEndIso = DateTime.fromJSDate(dateEnd).toISODate()
|
|
107
|
+
// }
|
|
108
|
+
// onChangeDatePeriod(dateStartIso, dateEndIso)
|
|
109
|
+
// },
|
|
110
|
+
// [onChangeDatePeriod],
|
|
111
|
+
// )
|
|
108
112
|
return (jsx("div", { className: clsx(className, 'date-period', shapeClass && "date-period_shape_".concat(shapeClass), sizeClass && "date-period_size_".concat(sizeClass), isSkeleton && "date-period_skeleton", fillClass && "fill_".concat(fillClass), 'cursor_type_pointer'), children: jsxs(ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map(function (datePeriodItem) { return (jsx(Chips, { appearance: "".concat(chipsAppearance, " ").concat(chipsAppearanceSize), label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: function () { return onClickPeriodChips(datePeriodItem); } }, datePeriodItem.value)); }), jsx(DatePickerInput, { datePickerProps: {
|
|
109
113
|
appearance: "".concat(datePickerAppearance, " ").concat(datePickerAppearanceSize),
|
|
110
114
|
dateFormat: 'dd/MM/yyyy',
|
|
115
|
+
monthsShown: monthsShown,
|
|
111
116
|
selectsRange: true,
|
|
112
117
|
showWeekNumbers: true,
|
|
113
118
|
isClearable: false,
|
|
114
119
|
isStartDefaultNull: true,
|
|
115
|
-
monthsShown: monthsShown,
|
|
116
120
|
onKeyDown: onKeyDown,
|
|
117
121
|
}, endValue: datePeriodValueEnd, inputProps: {
|
|
118
122
|
className: "date-period__datepicker-input date-period__datepicker-input_size_".concat(datePickerInputSize),
|
|
@@ -120,7 +124,9 @@ function DatePeriod(props) {
|
|
|
120
124
|
fillHover: datePickerInputFillHover,
|
|
121
125
|
textSize: datePickerInputTextSize,
|
|
122
126
|
placeholder: 'Выбрать период',
|
|
123
|
-
}, value: datePeriodValueStart,
|
|
127
|
+
}, value: datePeriodValueStart,
|
|
128
|
+
// onChange={onChangeDatePicker}
|
|
129
|
+
onChange: onChangeDatePeriod })] }) }));
|
|
124
130
|
}
|
|
125
131
|
|
|
126
132
|
export { DatePeriod, datePeriodAppearance, datePeriodConfig };
|
|
@@ -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_D4P4DT8L.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -19,12 +19,14 @@ import '../utils/setViewportProperty.js';
|
|
|
19
19
|
import '../hooks/useStyles/useStyles.js';
|
|
20
20
|
import 'lodash/maxBy';
|
|
21
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
|
-
import '../
|
|
23
|
-
import '../
|
|
22
|
+
import '../Button_es_CBUUZuP3.js';
|
|
23
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
24
24
|
import '../Text_es_BfLRfj-5.js';
|
|
25
25
|
import 'react-inlinesvg';
|
|
26
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
27
|
+
import '../context/UrlAssetPrefix.js';
|
|
26
28
|
import '../Link_es_DxtZLeKY.js';
|
|
27
29
|
import '../Loader_es_GYOr0UTX.js';
|
|
28
30
|
import '../Input_es_D9Y1Rj5Y.js';
|
|
29
|
-
import '../
|
|
31
|
+
import '../Label_es_Cz9OKQAr.js';
|
|
30
32
|
import '@itcase/icons/default';
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useRef, useEffect } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import ReactDrawer from 'react-modern-drawer';
|
|
6
|
-
import { I as Icon, b as Title } from '../
|
|
6
|
+
import { I as Icon, b as Title } from '../Tooltip_es_Cc2orRUE.js';
|
|
7
7
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
8
8
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
9
9
|
import { icons24 } from '@itcase/icons/default';
|
|
@@ -20,6 +20,8 @@ import 'react-responsive';
|
|
|
20
20
|
import '../utils/setViewportProperty.js';
|
|
21
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
import '../Link_es_DxtZLeKY.js';
|
|
24
26
|
import 'lodash/castArray';
|
|
25
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as Dropdown, a as DropdownItem, d as dropdownItemAppearance, b as dropdownItemConfig } from '../
|
|
1
|
+
export { D as Dropdown, a as DropdownItem, d as dropdownItemAppearance, b as dropdownItemConfig } from '../DropdownItem_es_CrwvBzq_.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
@@ -18,7 +18,9 @@ import '../hooks/useStyles/useStyles.js';
|
|
|
18
18
|
import 'lodash/maxBy';
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import '../Divider_es_kY-30pft.js';
|
|
21
|
-
import '../
|
|
21
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
22
22
|
import '../Text_es_BfLRfj-5.js';
|
|
23
23
|
import 'react-inlinesvg';
|
|
24
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
25
|
+
import '../context/UrlAssetPrefix.js';
|
|
24
26
|
import '../Link_es_DxtZLeKY.js';
|
|
@@ -4,7 +4,7 @@ import { useMemo } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon } from '../
|
|
7
|
+
import { I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
8
8
|
import 'lodash/camelCase';
|
|
9
9
|
import 'lodash/castArray';
|
|
10
10
|
import 'lodash/upperFirst';
|
|
@@ -19,6 +19,8 @@ import 'lodash/maxBy';
|
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import '../Text_es_BfLRfj-5.js';
|
|
21
21
|
import 'react-inlinesvg';
|
|
22
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
23
|
+
import '../context/UrlAssetPrefix.js';
|
|
22
24
|
import '../Link_es_DxtZLeKY.js';
|
|
23
25
|
|
|
24
26
|
var heroTitleAppearanceSize = {
|
package/dist/components/Icon.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as Icon, e as iconAppearance, i as iconConfig } from '../
|
|
1
|
+
export { I as Icon, e as iconAppearance, i as iconConfig } from '../Tooltip_es_Cc2orRUE.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -19,4 +19,6 @@ import 'lodash/maxBy';
|
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import '../Text_es_BfLRfj-5.js';
|
|
21
21
|
import 'react-inlinesvg';
|
|
22
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
23
|
+
import '../context/UrlAssetPrefix.js';
|
|
22
24
|
import '../Link_es_DxtZLeKY.js';
|
package/dist/components/Image.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export { I as Image } from '../
|
|
1
|
+
export { I as Image } from '../Image_es_ChF-63wh.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
5
|
-
import '../
|
|
5
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
6
6
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
|
+
import '@itcase/common';
|
|
8
|
+
import '../context/UrlAssetPrefix.js';
|
|
9
|
+
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
10
|
import 'lodash/camelCase';
|
|
8
11
|
import 'lodash/castArray';
|
|
9
12
|
import 'lodash/upperFirst';
|
|
10
13
|
import '../context/Notifications.js';
|
|
11
14
|
import 'uuid';
|
|
12
|
-
import '@itcase/common';
|
|
13
15
|
import '../context/UIContext.js';
|
|
14
16
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
15
17
|
import 'react-responsive';
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useMemo, useCallback } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import { I as Icon } from '../
|
|
6
|
+
import { I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import 'lodash/upperFirst';
|
|
@@ -19,6 +19,8 @@ import 'lodash/maxBy';
|
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import '../Text_es_BfLRfj-5.js';
|
|
21
21
|
import 'react-inlinesvg';
|
|
22
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
23
|
+
import '../context/UrlAssetPrefix.js';
|
|
22
24
|
import '../Link_es_DxtZLeKY.js';
|
|
23
25
|
|
|
24
26
|
var inputPasswordAppearanceDefault = {
|
package/dist/components/Label.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { L as Label, a as labelAppearance, l as labelConfig } from '../
|
|
1
|
+
export { L as Label, a as labelAppearance, l as labelConfig } from '../Label_es_Cz9OKQAr.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -17,7 +17,9 @@ import '../utils/setViewportProperty.js';
|
|
|
17
17
|
import '../hooks/useStyles/useStyles.js';
|
|
18
18
|
import 'lodash/maxBy';
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
|
-
import '../
|
|
20
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
21
21
|
import '../Text_es_BfLRfj-5.js';
|
|
22
22
|
import 'react-inlinesvg';
|
|
23
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
24
|
+
import '../context/UrlAssetPrefix.js';
|
|
23
25
|
import '../Link_es_DxtZLeKY.js';
|
package/dist/components/Logo.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { urlWithAssetPrefix } from '../hoc/urlWithAssetPrefix.js';
|
|
4
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
7
|
import { a as LinkWrapper } from '../Link_es_DxtZLeKY.js';
|
|
7
8
|
import 'react';
|
|
9
|
+
import '@itcase/common';
|
|
10
|
+
import '../context/UrlAssetPrefix.js';
|
|
8
11
|
import 'lodash/camelCase';
|
|
9
12
|
import 'lodash/castArray';
|
|
10
13
|
import 'lodash/upperFirst';
|
|
11
14
|
import '../context/Notifications.js';
|
|
12
15
|
import 'uuid';
|
|
13
|
-
import '@itcase/common';
|
|
14
16
|
import '../context/UIContext.js';
|
|
15
17
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
16
18
|
import 'react-responsive';
|
|
@@ -24,17 +26,17 @@ var logoConfig = {
|
|
|
24
26
|
logoConfig.appearance = appearanceConfig;
|
|
25
27
|
},
|
|
26
28
|
};
|
|
27
|
-
function Logo(props) {
|
|
29
|
+
var Logo = urlWithAssetPrefix(function Logo(props) {
|
|
28
30
|
var className = props.className, appearance = props.appearance, size = props.size, href = props.href, link = props.link, mode = props.mode;
|
|
29
31
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
30
32
|
var _a;
|
|
31
33
|
return (__assign(__assign({}, resultConfig), (_a = logoConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
32
34
|
}, {});
|
|
33
35
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
34
|
-
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, alignItemsClass = propsGenerator.alignItemsClass, src = propsGenerator.src, title = propsGenerator.title, alt = propsGenerator.alt,
|
|
36
|
+
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, alignItemsClass = propsGenerator.alignItemsClass, src = propsGenerator.src, title = propsGenerator.title, alt = propsGenerator.alt, widthClass = propsGenerator.widthClass;
|
|
35
37
|
// @ts-expect-error
|
|
36
38
|
var logo = useStyles(props).styles;
|
|
37
|
-
return (jsx("div", { className: clsx(className, 'logo', alignClass && "align_".concat(alignClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignItemsClass && "logo_align-items_".concat(alignItemsClass), alt, title, mode && "logo_mode_".concat(mode), size && "logo_size_".concat(size), widthClass && "width_".concat(widthClass)), style: logo, children: link || href ? (jsx(LinkWrapper, { className: "logo__link", href: link || href, children: jsx("img", { className: "logo__image", src: src
|
|
38
|
-
}
|
|
39
|
+
return (jsx("div", { className: clsx(className, 'logo', alignClass && "align_".concat(alignClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignItemsClass && "logo_align-items_".concat(alignItemsClass), alt, title, mode && "logo_mode_".concat(mode), size && "logo_size_".concat(size), widthClass && "width_".concat(widthClass)), style: logo, children: link || href ? (jsx(LinkWrapper, { className: "logo__link", href: link || href, children: jsx("img", { className: "logo__image", src: src, title: title || alt, alt: alt || title }) })) : (jsx("img", { className: "logo__image", src: src, title: title || alt, alt: alt || title })) }));
|
|
40
|
+
});
|
|
39
41
|
|
|
40
42
|
export { Logo, logoConfig };
|