@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
|
@@ -4,7 +4,7 @@ import React 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, T as Tooltip } from '../
|
|
7
|
+
import { I as Icon, T as Tooltip } from '../Tooltip_es_Cc2orRUE.js';
|
|
8
8
|
import { L as Link } from '../Link_es_DxtZLeKY.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
|
|
|
24
26
|
var menuItemAppearanceAccent = {
|
|
25
27
|
accentPrimary: {
|
package/dist/components/Modal.js
CHANGED
|
@@ -6,7 +6,7 @@ import ReactDOM from 'react-dom';
|
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
8
|
import { O as Overlay } from '../Overlay_es_DczPjVL9.js';
|
|
9
|
-
import { b as Title } from '../
|
|
9
|
+
import { b as Title } from '../Tooltip_es_Cc2orRUE.js';
|
|
10
10
|
import { L as Loader } from '../Loader_es_GYOr0UTX.js';
|
|
11
11
|
import 'lodash/camelCase';
|
|
12
12
|
import 'lodash/castArray';
|
|
@@ -22,6 +22,8 @@ import 'lodash/maxBy';
|
|
|
22
22
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
23
|
import '../Text_es_BfLRfj-5.js';
|
|
24
24
|
import 'react-inlinesvg';
|
|
25
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
26
|
+
import '../context/UrlAssetPrefix.js';
|
|
25
27
|
import '../Link_es_DxtZLeKY.js';
|
|
26
28
|
|
|
27
29
|
var modalAppearanceSurface = {
|
|
@@ -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 { I as Icon } from '../
|
|
6
|
+
import { I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
7
7
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
8
8
|
import { icons20 } from '@itcase/icons/default';
|
|
9
9
|
import { useNotifications, useNotificationsAPI } from '../context/Notifications.js';
|
|
@@ -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 notificationAppearanceDefault = {
|
|
@@ -143,7 +145,6 @@ function NotificationWrapper(props) {
|
|
|
143
145
|
var notifications = useNotifications();
|
|
144
146
|
var hideNotifications = useNotificationsAPI().hideNotifications;
|
|
145
147
|
var className = props.className, close = props.close;
|
|
146
|
-
console.log(notifications);
|
|
147
148
|
return (jsx("div", { className: clsx('notification', className), children: jsx("div", { className: "notification__wrapper", children: notifications.map(function (notification, i) { return (jsx(Notification, { id: notification.id, appearance: notification.appearance, title: notification.title, status: notification.status, text: notification.text, close: close, onClickClose: hideNotifications }, i)); }) }) }));
|
|
148
149
|
}
|
|
149
150
|
|
|
@@ -6,8 +6,8 @@ import ceil from 'lodash/ceil';
|
|
|
6
6
|
import ReactPaginate from 'react-paginate';
|
|
7
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
9
|
-
import { D as Dropdown, a as DropdownItem } from '../
|
|
10
|
-
import { I as Icon } from '../
|
|
9
|
+
import { D as Dropdown, a as DropdownItem } from '../DropdownItem_es_CrwvBzq_.js';
|
|
10
|
+
import { I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
11
11
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
12
12
|
import { icons32, icons14 } from '@itcase/icons/default';
|
|
13
13
|
import 'lodash/camelCase';
|
|
@@ -24,6 +24,8 @@ import 'lodash/maxBy';
|
|
|
24
24
|
import '../hooks/useStyles/styleAttributes.js';
|
|
25
25
|
import '../Divider_es_kY-30pft.js';
|
|
26
26
|
import 'react-inlinesvg';
|
|
27
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
28
|
+
import '../context/UrlAssetPrefix.js';
|
|
27
29
|
import '../Link_es_DxtZLeKY.js';
|
|
28
30
|
|
|
29
31
|
var paginationAppearanceAccent = {
|
|
@@ -3,24 +3,26 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import SVG from 'react-inlinesvg';
|
|
6
|
+
import { urlWithAssetPrefix } from '../hoc/urlWithAssetPrefix.js';
|
|
6
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
8
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
|
-
import { B as Button } from '../
|
|
9
|
+
import { B as Button } from '../Button_es_CBUUZuP3.js';
|
|
9
10
|
import { G as Group } from '../Group_es_CYW2Hquh.js';
|
|
10
11
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
12
|
+
import '@itcase/common';
|
|
13
|
+
import '../context/UrlAssetPrefix.js';
|
|
11
14
|
import 'lodash/camelCase';
|
|
12
15
|
import 'lodash/castArray';
|
|
13
16
|
import 'lodash/upperFirst';
|
|
14
17
|
import '../context/Notifications.js';
|
|
15
18
|
import 'uuid';
|
|
16
|
-
import '@itcase/common';
|
|
17
19
|
import '../context/UIContext.js';
|
|
18
20
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
19
21
|
import 'react-responsive';
|
|
20
22
|
import '../utils/setViewportProperty.js';
|
|
21
23
|
import 'lodash/maxBy';
|
|
22
24
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
|
-
import '../
|
|
25
|
+
import '../Tooltip_es_Cc2orRUE.js';
|
|
24
26
|
import '../Link_es_DxtZLeKY.js';
|
|
25
27
|
import '../Loader_es_GYOr0UTX.js';
|
|
26
28
|
|
|
@@ -142,7 +144,7 @@ var responseConfig = {
|
|
|
142
144
|
responseConfig.appearance = appearanceConfig;
|
|
143
145
|
},
|
|
144
146
|
};
|
|
145
|
-
function Response(props) {
|
|
147
|
+
var Response = urlWithAssetPrefix(function Response(props) {
|
|
146
148
|
var className = props.className, appearance = props.appearance, width = props.width, height = props.height, title = props.title, desc = props.desc, primaryButton = props.primaryButton, onClickSecondaryButton = props.onClickSecondaryButton, secondaryButton = props.secondaryButton, before = props.before, after = props.after, isSkeleton = props.isSkeleton;
|
|
147
149
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
148
150
|
var _a;
|
|
@@ -150,6 +152,7 @@ function Response(props) {
|
|
|
150
152
|
}, {});
|
|
151
153
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
152
154
|
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, titleTextWeight = propsGenerator.titleTextWeight, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, descTextWeight = propsGenerator.descTextWeight, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, onClickPrimaryButton = propsGenerator.onClickPrimaryButton, primaryButtonAfter = propsGenerator.primaryButtonAfter, primaryButtonAppearance = propsGenerator.primaryButtonAppearance, primaryButtonBefore = propsGenerator.primaryButtonBefore, primaryButtonFill = propsGenerator.primaryButtonFill, primaryButtonFillHover = propsGenerator.primaryButtonFillHover, primaryButtonLabel = propsGenerator.primaryButtonLabel, primaryButtonLabelTextColor = propsGenerator.primaryButtonLabelTextColor, primaryButtonLabelTextSize = propsGenerator.primaryButtonLabelTextSize, primaryButtonShape = propsGenerator.primaryButtonShape, primaryButtonSize = propsGenerator.primaryButtonSize, primaryButtonWidth = propsGenerator.primaryButtonWidth, secondaryButtonAfter = propsGenerator.secondaryButtonAfter, secondaryButtonAppearance = propsGenerator.secondaryButtonAppearance, secondaryButtonBefore = propsGenerator.secondaryButtonBefore, secondaryButtonFill = propsGenerator.secondaryButtonFill, secondaryButtonFillHover = propsGenerator.secondaryButtonFillHover, secondaryButtonLabel = propsGenerator.secondaryButtonLabel, secondaryButtonLabelTextColor = propsGenerator.secondaryButtonLabelTextColor, secondaryButtonLabelTextSize = propsGenerator.secondaryButtonLabelTextSize, secondaryButtonShape = propsGenerator.secondaryButtonShape, secondaryButtonSize = propsGenerator.secondaryButtonSize, secondaryButtonWidth = propsGenerator.secondaryButtonWidth, dataTestId = propsGenerator.dataTestId, dataTour = propsGenerator.dataTour, imageSrc = propsGenerator.imageSrc, shapeClass = propsGenerator.shapeClass, svgFillClass = propsGenerator.svgFillClass, SvgImage = propsGenerator.SvgImage, svgPathFillClass = propsGenerator.svgPathFillClass, svgSrc = propsGenerator.svgSrc;
|
|
155
|
+
// TODO: use Icon instead?
|
|
153
156
|
var ImageComponent = useMemo(function () {
|
|
154
157
|
var src = imageSrc || svgSrc;
|
|
155
158
|
var Image = SvgImage;
|
|
@@ -183,7 +186,7 @@ function Response(props) {
|
|
|
183
186
|
secondaryButtonLabel ||
|
|
184
187
|
secondaryButton ||
|
|
185
188
|
appearanceConfig) && (jsxs(Group, { className: "response__button", width: "fill", children: [primaryButtonLabel ? (jsx(Button, { className: "response__button-item", appearance: primaryButtonAppearance, width: primaryButtonWidth || 'fill', size: primaryButtonSize, fill: primaryButtonFill, fillHover: primaryButtonFillHover, label: primaryButtonLabel, labelTextColor: primaryButtonLabelTextColor, labelTextSize: primaryButtonLabelTextSize, shape: primaryButtonShape, before: primaryButtonBefore, after: primaryButtonAfter, onClick: onClickPrimaryButton })) : (primaryButton), secondaryButtonLabel ? (jsx(Button, { className: "response__button-item", appearance: secondaryButtonAppearance, width: secondaryButtonWidth || 'fill', size: secondaryButtonSize, fill: secondaryButtonFill, fillHover: secondaryButtonFillHover, label: secondaryButtonLabel, labelTextColor: secondaryButtonLabelTextColor, labelTextSize: secondaryButtonLabelTextSize, shape: secondaryButtonShape, before: secondaryButtonBefore, after: secondaryButtonAfter, onClick: onClickSecondaryButton })) : (secondaryButton)] })), after] }));
|
|
186
|
-
}
|
|
189
|
+
});
|
|
187
190
|
var removeFillStroke = function (code) {
|
|
188
191
|
return code
|
|
189
192
|
.replace(/fill=".*?"/g, 'fill=""')
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import SVG from 'react-inlinesvg';
|
|
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 '../tslib.es6_es_Bwu1Cn-t.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';
|
|
@@ -18,13 +20,13 @@ import '../utils/setViewportProperty.js';
|
|
|
18
20
|
import 'lodash/maxBy';
|
|
19
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
22
|
|
|
21
|
-
function SVGContent(props) {
|
|
23
|
+
var SVGContent = urlWithAssetPrefix(function SVGContent(props) {
|
|
22
24
|
var className = props.className, src = props.src, SvgImage = props.SvgImage;
|
|
23
25
|
var propsGenerator = useDevicePropsGenerator(props);
|
|
24
26
|
var svgFillClass = propsGenerator.svgFillClass, svgFillHoverClass = propsGenerator.svgFillHoverClass;
|
|
25
27
|
// @ts-expect-error
|
|
26
28
|
var svgContentStyles = useStyles(props).styles;
|
|
27
29
|
return (jsxs("div", { className: clsx(className, 'svg-content', svgFillClass && "svg_fill_".concat(svgFillClass), svgFillHoverClass && "svg_fill_hover_".concat(svgFillHoverClass)), style: svgContentStyles, children: [src && jsx(SVG, { src: src }), SvgImage && jsx(SvgImage, {})] }));
|
|
28
|
-
}
|
|
30
|
+
});
|
|
29
31
|
|
|
30
32
|
export { SVGContent };
|
|
@@ -5,7 +5,7 @@ import React, { useCallback } from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
|
-
import { I as Icon } from '../
|
|
8
|
+
import { I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
9
9
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
10
10
|
import { S as Scrollbar } from '../Scrollbar_es_CThJeCLF.js';
|
|
11
11
|
import 'lodash/camelCase';
|
|
@@ -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
|
import 'react-scrollbars-custom';
|
|
26
28
|
|
|
@@ -2,7 +2,7 @@ import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React, { useRef, useMemo, createRef, useCallback, useEffect } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { I as Icon } from '../
|
|
5
|
+
import { I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
7
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
8
8
|
import '../hooks/useStyles/useStyles.js';
|
|
@@ -18,6 +18,8 @@ import 'react-responsive';
|
|
|
18
18
|
import '../utils/setViewportProperty.js';
|
|
19
19
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import 'react-inlinesvg';
|
|
21
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
22
|
+
import '../context/UrlAssetPrefix.js';
|
|
21
23
|
import '../Link_es_DxtZLeKY.js';
|
|
22
24
|
import 'lodash/castArray';
|
|
23
25
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import Select, { components } from 'react-select';
|
|
4
|
-
import { I as Icon, B as Badge } from '../
|
|
4
|
+
import { I as Icon, B as Badge } from '../Tooltip_es_Cc2orRUE.js';
|
|
5
5
|
import React, { useRef, useCallback, useEffect, useMemo } from 'react';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import CreatableSelect from 'react-select/creatable';
|
|
@@ -22,6 +22,8 @@ import 'react-responsive';
|
|
|
22
22
|
import '../utils/setViewportProperty.js';
|
|
23
23
|
import '../hooks/useStyles/styleAttributes.js';
|
|
24
24
|
import 'react-inlinesvg';
|
|
25
|
+
import '../hoc/urlWithAssetPrefix.js';
|
|
26
|
+
import '../context/UrlAssetPrefix.js';
|
|
25
27
|
import '../Link_es_DxtZLeKY.js';
|
|
26
28
|
import 'lodash/castArray';
|
|
27
29
|
|
|
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { Swiper as Swiper$1, SwiperSlide } from 'swiper/react';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import { b as Title } from '../
|
|
7
|
+
import { b as Title } from '../Tooltip_es_Cc2orRUE.js';
|
|
8
8
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
9
9
|
import 'lodash/camelCase';
|
|
10
10
|
import 'lodash/castArray';
|
|
@@ -20,6 +20,8 @@ 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
|
|
|
25
27
|
function Swiper(props) {
|
|
@@ -123,7 +123,6 @@ var Switch = React.forwardRef(function Switch(props, ref) {
|
|
|
123
123
|
}, {});
|
|
124
124
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
125
125
|
var size = propsGenerator.size, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, fillToggleActiveClass = propsGenerator.fillToggleActiveClass, fillToggleActiveHoverClass = propsGenerator.fillToggleActiveHoverClass, fillToggleClass = propsGenerator.fillToggleClass, fillToggleHoverClass = propsGenerator.fillToggleHoverClass, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize;
|
|
126
|
-
console.log(checked);
|
|
127
126
|
return (jsxs("div", { className: clsx('switch', className, align && "switch_align_".concat(align), size && "switch_size_".concat(size)), children: [title && (jsx(Text, { className: clsx('switch__title'), size: titleTextSize, textColor: titleTextColor, children: title })), desc && (jsx(Text, { className: clsx('switch__desc'), size: descTextSize, textColor: descTextColor, children: desc })), jsxs("div", { className: 'switch__item', children: [jsx("input", { id: id, className: "switch__checkbox", type: "checkbox", disabled: disabled, checked: checked || isActive,
|
|
128
127
|
// @ts-expect-error
|
|
129
128
|
ref: ref, onChange: onChange }), jsx("div", { className: clsx('switch__bg', !checked
|
package/dist/components/Tab.js
CHANGED
|
@@ -4,7 +4,7 @@ import React 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 { B as Badge, I as Icon } from '../
|
|
7
|
+
import { B as Badge, I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
8
8
|
import { D as Divider } from '../Divider_es_kY-30pft.js';
|
|
9
9
|
import { L as Link } from '../Link_es_DxtZLeKY.js';
|
|
10
10
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
@@ -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 tabAppearanceError = {
|
|
26
28
|
errorPrimary: {
|
package/dist/components/Tile.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } 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 { b as Title, B as Badge, I as Icon } from '../
|
|
6
|
+
import { b as Title, B as Badge, I as Icon } from '../Tooltip_es_Cc2orRUE.js';
|
|
7
7
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'lodash/camelCase';
|
|
@@ -19,6 +19,8 @@ import '../utils/setViewportProperty.js';
|
|
|
19
19
|
import 'lodash/maxBy';
|
|
20
20
|
import '../hooks/useStyles/styleAttributes.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 tileAppearanceSize = {
|
package/dist/components/Title.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as Title, d as titleAppearance, c as titleConfig } from '../
|
|
1
|
+
export { b as Title, d as titleAppearance, c as titleConfig } 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';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as Tooltip, a as tooltipAppearance, t as tooltipConfig } from '../
|
|
1
|
+
export { T as Tooltip, a as tooltipAppearance, t as tooltipConfig } 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';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createContext, useMemo } from 'react';
|
|
3
|
+
|
|
4
|
+
var UrlAssetPrefixContext = createContext({
|
|
5
|
+
assetPrefix: undefined,
|
|
6
|
+
ignorePathsList: undefined,
|
|
7
|
+
});
|
|
8
|
+
function UrlAssetPrefixProvider(props) {
|
|
9
|
+
var assetPrefix = props.assetPrefix, ignorePathsList = props.ignorePathsList, children = props.children;
|
|
10
|
+
var value = useMemo(function () { return ({ assetPrefix: assetPrefix, ignorePathsList: ignorePathsList }); }, [assetPrefix, ignorePathsList]);
|
|
11
|
+
return (jsx(UrlAssetPrefixContext.Provider, { value: value, children: children }));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { UrlAssetPrefixContext, UrlAssetPrefixProvider };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
import { formatURL } from '@itcase/common';
|
|
5
|
+
import { UrlAssetPrefixContext } from '../context/UrlAssetPrefix.js';
|
|
6
|
+
|
|
7
|
+
var urlPropsList = ['src', 'imageSrc', 'svgSrc', 'placeholderUrl'];
|
|
8
|
+
var urlWithAssetPrefix = function (WrappedComponent) {
|
|
9
|
+
var HOC = React.forwardRef(function HOC(props, ref) {
|
|
10
|
+
var _a = useContext(UrlAssetPrefixContext), assetPrefix = _a.assetPrefix, ignorePathsList = _a.ignorePathsList;
|
|
11
|
+
var overrideProps = urlPropsList.reduce(function (resultProps, propKey) {
|
|
12
|
+
var url = props[propKey];
|
|
13
|
+
if (url && typeof url === 'string') {
|
|
14
|
+
if (assetPrefix) {
|
|
15
|
+
var cleanUrl = formatURL(url);
|
|
16
|
+
var isNeedAssetPrefix = checkIsNeedAssetPrefix(cleanUrl, assetPrefix, ignorePathsList);
|
|
17
|
+
if (isNeedAssetPrefix) {
|
|
18
|
+
var prefixPath = formatURL(assetPrefix).slice(0, -1);
|
|
19
|
+
url = "".concat(prefixPath).concat(cleanUrl);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
resultProps[propKey] = url;
|
|
23
|
+
}
|
|
24
|
+
return resultProps;
|
|
25
|
+
}, {});
|
|
26
|
+
return jsx(WrappedComponent, __assign({}, props, overrideProps, { ref: ref }));
|
|
27
|
+
});
|
|
28
|
+
return HOC;
|
|
29
|
+
};
|
|
30
|
+
var checkIsNeedAssetPrefix = function (url, assetPrefix, ignorePathsList) {
|
|
31
|
+
if (ignorePathsList === void 0) { ignorePathsList = []; }
|
|
32
|
+
// Ignore prefix if:
|
|
33
|
+
var isPrefixIgnore =
|
|
34
|
+
// Url is absolute
|
|
35
|
+
url.startsWith('http:') ||
|
|
36
|
+
url.startsWith('https:') ||
|
|
37
|
+
// Url is data string
|
|
38
|
+
url.startsWith('data:') ||
|
|
39
|
+
// Url already have prefix
|
|
40
|
+
url.startsWith(assetPrefix);
|
|
41
|
+
if (isPrefixIgnore) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
// And check special paths for ignore prefix
|
|
45
|
+
for (var _i = 0, ignorePathsList_1 = ignorePathsList; _i < ignorePathsList_1.length; _i++) {
|
|
46
|
+
var urlPath = ignorePathsList_1[_i];
|
|
47
|
+
if (urlPath instanceof RegExp) {
|
|
48
|
+
if (urlPath.test(url)) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
if (url.startsWith(formatURL(urlPath))) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Need to add prefix to url
|
|
59
|
+
return true;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export { urlWithAssetPrefix };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { IconConfig
|
|
2
|
+
import type { IconConfig } from '../Icon/Icon.interface';
|
|
3
3
|
declare const iconConfig: IconConfig;
|
|
4
|
-
declare const Icon: React.ForwardRefExoticComponent<
|
|
4
|
+
declare const Icon: React.ForwardRefExoticComponent<{
|
|
5
|
+
imageSrc?: string;
|
|
6
|
+
src?: string;
|
|
7
|
+
svgSrc?: string;
|
|
8
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
5
9
|
export { Icon, iconConfig };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const Image: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
imageSrc?: string;
|
|
3
|
+
src?: string;
|
|
4
|
+
svgSrc?: string;
|
|
5
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
6
|
export { Image };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type { LogoConfig
|
|
1
|
+
import type { LogoConfig } from './Logo.interface';
|
|
2
2
|
declare const logoConfig: LogoConfig;
|
|
3
|
-
declare
|
|
3
|
+
declare const Logo: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
imageSrc?: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
svgSrc?: string;
|
|
7
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
8
|
export { Logo, logoConfig };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type { ResponseConfig
|
|
1
|
+
import type { ResponseConfig } from './Response.interface';
|
|
2
2
|
declare const responseConfig: ResponseConfig;
|
|
3
|
-
declare
|
|
3
|
+
declare const Response: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
imageSrc?: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
svgSrc?: string;
|
|
7
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
8
|
export { Response, responseConfig };
|
|
@@ -55,6 +55,7 @@ export interface ResponseProps extends ResponseAppearance, StyleAttributes {
|
|
|
55
55
|
/** desc description */
|
|
56
56
|
desc?: string;
|
|
57
57
|
descTextWeight?: TextWeightProps;
|
|
58
|
+
imageSrc?: string;
|
|
58
59
|
primaryButton?: boolean;
|
|
59
60
|
primaryButtonAfter?: ReactNode;
|
|
60
61
|
primaryButtonBefore?: ReactNode;
|
|
@@ -62,9 +63,10 @@ export interface ResponseProps extends ResponseAppearance, StyleAttributes {
|
|
|
62
63
|
secondaryButtonAfter?: ReactNode;
|
|
63
64
|
secondaryButtonBefore?: ReactNode;
|
|
64
65
|
style?: CSSProperties;
|
|
66
|
+
svgSrc?: string;
|
|
65
67
|
/** title description */
|
|
66
68
|
title?: string;
|
|
67
|
-
isSkeleton
|
|
69
|
+
isSkeleton?: boolean;
|
|
68
70
|
onClickPrimaryButton?: () => void;
|
|
69
71
|
onClickSecondaryButton?: () => void;
|
|
70
72
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const SVGContent: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
imageSrc?: string;
|
|
3
|
+
src?: string;
|
|
4
|
+
svgSrc?: string;
|
|
5
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
6
|
export { SVGContent };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type UrlAssetPrefixValue = {
|
|
2
|
+
assetPrefix?: string;
|
|
3
|
+
ignorePathsList?: Array<string | RegExp>;
|
|
4
|
+
};
|
|
5
|
+
type UrlAssetPrefixProviderProps = {
|
|
6
|
+
assetPrefix?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
ignorePathsList?: Array<string | RegExp>;
|
|
9
|
+
};
|
|
10
|
+
declare const UrlAssetPrefixContext: import("react").Context<UrlAssetPrefixValue>;
|
|
11
|
+
declare function UrlAssetPrefixProvider(props: UrlAssetPrefixProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { UrlAssetPrefixProvider, UrlAssetPrefixContext };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { type ComponentType } from 'react';
|
|
2
|
+
type UrlWithAssetPrefixProps = {
|
|
3
|
+
imageSrc?: string;
|
|
4
|
+
src?: string;
|
|
5
|
+
svgSrc?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const urlWithAssetPrefix: (WrappedComponent: ComponentType<UrlWithAssetPrefixProps>) => React.ForwardRefExoticComponent<UrlWithAssetPrefixProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { urlWithAssetPrefix };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.39",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
"import": "./dist/context/*.js",
|
|
45
45
|
"require": "./dist/cjs/context/*.js"
|
|
46
46
|
},
|
|
47
|
+
"./hoc/*": {
|
|
48
|
+
"types": "./dist/types/hoc/*.d.ts",
|
|
49
|
+
"import": "./dist/hoc/*.js",
|
|
50
|
+
"require": "./dist/cjs/hoc/*.js"
|
|
51
|
+
},
|
|
47
52
|
"./hooks/*": {
|
|
48
53
|
"types": "./dist/types/hooks/*.d.ts",
|
|
49
54
|
"import": "./dist/hooks/*.js",
|