@itcase/ui 1.8.98 → 1.8.100
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/{DatePicker_cjs_mrV_Qly2.js → DatePicker_cjs_C8r1qPxL.js} +1 -1
- package/dist/{DatePicker_es_Di_4I2Xv.js → DatePicker_es_Dq0JuDDZ.js} +1 -1
- package/dist/{Group_cjs_GqR99U0L.js → Group_cjs_CHcrOFx0.js} +4 -4
- package/dist/{Group_es_Bo7Y6JwT.js → Group_es_DHJcG2MA.js} +4 -4
- package/dist/{Label_cjs_B1fNYJak.js → Label_cjs_COR0vD25.js} +2 -2
- package/dist/{Label_es_d9RioNNf.js → Label_es_LsHqmj27.js} +2 -2
- package/dist/cjs/components/AvatarStack.js +1 -1
- package/dist/cjs/components/Cell.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 +16 -8
- package/dist/cjs/components/Group.js +1 -1
- package/dist/cjs/components/Label.js +1 -1
- package/dist/cjs/components/Modal.js +4 -4
- package/dist/cjs/components/Notification.js +2 -2
- package/dist/cjs/components/Response.js +1 -1
- package/dist/cjs/components/Search.js +3 -3
- package/dist/cjs/components/Select.js +1 -1
- package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/components/AvatarStack.js +1 -1
- package/dist/components/Cell.js +1 -1
- package/dist/components/DatePeriod.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/Drawer.js +16 -8
- package/dist/components/Group.js +1 -1
- package/dist/components/Label.js +1 -1
- package/dist/components/Modal.js +4 -4
- package/dist/components/Notification.js +2 -2
- package/dist/components/Response.js +1 -1
- package/dist/components/Search.js +3 -3
- package/dist/components/Select.js +1 -1
- package/dist/css/components/DatePicker/DatePicker.css +12 -0
- package/dist/css/components/Modal/Modal.css +21 -0
- package/dist/css/components/Tab/Tab.css +6 -7
- package/dist/css/components/Tile/Tile.css +1 -0
- package/dist/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/types/components/Drawer/appearance/drawerSize.d.ts +1 -0
- package/package.json +5 -5
|
@@ -12,7 +12,7 @@ var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
|
12
12
|
var Button = require('./Button_cjs_DojNe74O.js');
|
|
13
13
|
var Icon = require('./Icon_cjs_B-nskaAO.js');
|
|
14
14
|
var Input = require('./Input_cjs_CFy0tfAO.js');
|
|
15
|
-
var Label = require('./
|
|
15
|
+
var Label = require('./Label_cjs_COR0vD25.js');
|
|
16
16
|
var Text = require('./Text_cjs_DmuzuKFj.js');
|
|
17
17
|
var _default = require('@itcase/icons/default');
|
|
18
18
|
|
|
@@ -10,7 +10,7 @@ import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
|
10
10
|
import { B as Button } from './Button_es_DCM3C_2S.js';
|
|
11
11
|
import { I as Icon } from './Icon_es_CTKPPrrC.js';
|
|
12
12
|
import { I as Input } from './Input_es_l3ry6luZ.js';
|
|
13
|
-
import { L as Label } from './
|
|
13
|
+
import { L as Label } from './Label_es_LsHqmj27.js';
|
|
14
14
|
import { T as Text } from './Text_es_DIU5ySvf.js';
|
|
15
15
|
import { icons14 } from '@itcase/icons/default';
|
|
16
16
|
|
|
@@ -24,13 +24,13 @@ var groupConfig = {
|
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
26
|
var Group = React.forwardRef(function Group(props, ref) {
|
|
27
|
-
var id = props.id,
|
|
27
|
+
var id = props.id, dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, name = props.name, appearance = props.appearance, isDisabled = props.isDisabled, htmlFor = props.htmlFor, scroll = props.scroll, style = props.style, _a = props.tag, Tag = _a === void 0 ? 'div' : _a, isActive = props.isActive, onClick = props.onClick, onMouseDown = props.onMouseDown, children = props.children;
|
|
28
28
|
var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, groupConfig);
|
|
29
29
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
30
|
-
var directionClass = propsGenerator.directionClass, flexGrowClass = propsGenerator.flexGrowClass,
|
|
30
|
+
var directionClass = propsGenerator.directionClass, flexGrowClass = propsGenerator.flexGrowClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorActiveClass = propsGenerator.borderColorActiveClass, borderColorActiveHoverClass = propsGenerator.borderColorActiveHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, textColorActiveClass = propsGenerator.textColorActiveClass, textColorClass = propsGenerator.textColorClass, textColorHoverClass = propsGenerator.textColorHoverClass, columnsClass = propsGenerator.columnsClass, elevationClass = propsGenerator.elevationClass, heightClass = propsGenerator.heightClass, iconFillHoverClass = propsGenerator.iconFillHoverClass, shapeClass = propsGenerator.shapeClass, stackingClass = propsGenerator.stackingClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
31
31
|
// @ts-expect-error
|
|
32
32
|
var groupStyles = useStyles.useStyles(props).styles;
|
|
33
|
-
return (jsxRuntime.jsx(Tag, { id: id, className: clsx(className, 'group', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), columnsClass && "group_columns_".concat(columnsClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), textColorClass && "group_text-color_".concat(textColorClass), textColorActiveClass &&
|
|
33
|
+
return (jsxRuntime.jsx(Tag, { id: id, dataTestId: dataTestId, dataTour: dataTour, className: clsx(className, 'group', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), columnsClass && "group_columns_".concat(columnsClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), textColorClass && "group_text-color_".concat(textColorClass), textColorActiveClass &&
|
|
34
34
|
"group_text-color_active_".concat(textColorActiveClass), textColorHoverClass && "group_text-color_hover_".concat(textColorHoverClass), iconFillHoverClass && "group_icon_fill_hover_".concat(iconFillHoverClass), !isDisabled
|
|
35
35
|
? !isActive
|
|
36
36
|
? fillClass && "fill_".concat(fillClass)
|
|
@@ -51,7 +51,7 @@ var Group = React.forwardRef(function Group(props, ref) {
|
|
|
51
51
|
"border-color_hover_".concat(borderColorHoverClass)
|
|
52
52
|
: borderColorActiveHoverClass &&
|
|
53
53
|
"border-color_active_hover_".concat(borderColorActiveHoverClass)
|
|
54
|
-
: fillDisabledClass && "fill_".concat(fillDisabledClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), elevationClass && "elevation_".concat(elevationClass),
|
|
54
|
+
: fillDisabledClass && "fill_".concat(fillDisabledClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), elevationClass && "elevation_".concat(elevationClass), onClick && 'cursor_type_pointer'), name: name, ref: ref, htmlFor: htmlFor, style: Object.assign({}, groupStyles, style), onClick: onClick, onMouseDown: onMouseDown, children: children }));
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
exports.Group = Group;
|
|
@@ -22,13 +22,13 @@ var groupConfig = {
|
|
|
22
22
|
},
|
|
23
23
|
};
|
|
24
24
|
var Group = React.forwardRef(function Group(props, ref) {
|
|
25
|
-
var id = props.id,
|
|
25
|
+
var id = props.id, dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, name = props.name, appearance = props.appearance, isDisabled = props.isDisabled, htmlFor = props.htmlFor, scroll = props.scroll, style = props.style, _a = props.tag, Tag = _a === void 0 ? 'div' : _a, isActive = props.isActive, onClick = props.onClick, onMouseDown = props.onMouseDown, children = props.children;
|
|
26
26
|
var appearanceConfig = useAppearanceConfig(appearance, groupConfig);
|
|
27
27
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
28
|
-
var directionClass = propsGenerator.directionClass, flexGrowClass = propsGenerator.flexGrowClass,
|
|
28
|
+
var directionClass = propsGenerator.directionClass, flexGrowClass = propsGenerator.flexGrowClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorActiveClass = propsGenerator.borderColorActiveClass, borderColorActiveHoverClass = propsGenerator.borderColorActiveHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, textColorActiveClass = propsGenerator.textColorActiveClass, textColorClass = propsGenerator.textColorClass, textColorHoverClass = propsGenerator.textColorHoverClass, columnsClass = propsGenerator.columnsClass, elevationClass = propsGenerator.elevationClass, heightClass = propsGenerator.heightClass, iconFillHoverClass = propsGenerator.iconFillHoverClass, shapeClass = propsGenerator.shapeClass, stackingClass = propsGenerator.stackingClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
29
29
|
// @ts-expect-error
|
|
30
30
|
var groupStyles = useStyles(props).styles;
|
|
31
|
-
return (jsx(Tag, { id: id, className: clsx(className, 'group', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), columnsClass && "group_columns_".concat(columnsClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), textColorClass && "group_text-color_".concat(textColorClass), textColorActiveClass &&
|
|
31
|
+
return (jsx(Tag, { id: id, dataTestId: dataTestId, dataTour: dataTour, className: clsx(className, 'group', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), columnsClass && "group_columns_".concat(columnsClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), textColorClass && "group_text-color_".concat(textColorClass), textColorActiveClass &&
|
|
32
32
|
"group_text-color_active_".concat(textColorActiveClass), textColorHoverClass && "group_text-color_hover_".concat(textColorHoverClass), iconFillHoverClass && "group_icon_fill_hover_".concat(iconFillHoverClass), !isDisabled
|
|
33
33
|
? !isActive
|
|
34
34
|
? fillClass && "fill_".concat(fillClass)
|
|
@@ -49,7 +49,7 @@ var Group = React.forwardRef(function Group(props, ref) {
|
|
|
49
49
|
"border-color_hover_".concat(borderColorHoverClass)
|
|
50
50
|
: borderColorActiveHoverClass &&
|
|
51
51
|
"border-color_active_hover_".concat(borderColorActiveHoverClass)
|
|
52
|
-
: fillDisabledClass && "fill_".concat(fillDisabledClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), elevationClass && "elevation_".concat(elevationClass),
|
|
52
|
+
: fillDisabledClass && "fill_".concat(fillDisabledClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), elevationClass && "elevation_".concat(elevationClass), onClick && 'cursor_type_pointer'), name: name, ref: ref, htmlFor: htmlFor, style: Object.assign({}, groupStyles, style), onClick: onClick, onMouseDown: onMouseDown, children: children }));
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
export { Group as G, groupAppearance as a, groupConfig as g };
|
|
@@ -320,7 +320,7 @@ var labelConfig = {
|
|
|
320
320
|
},
|
|
321
321
|
};
|
|
322
322
|
function Label(props) {
|
|
323
|
-
var className = props.className, appearance = props.appearance, label = props.label, cursor = props.cursor,
|
|
323
|
+
var dataTour = props.dataTour, className = props.className, appearance = props.appearance, label = props.label, cursor = props.cursor, showTooltip = props.showTooltip, before = props.before, after = props.after, isSkeleton = props.isSkeleton, onClick = props.onClick, children = props.children;
|
|
324
324
|
var tooltipRef = React.useRef(null);
|
|
325
325
|
var onMouseEnterLabel = React.useCallback(function () {
|
|
326
326
|
var _a;
|
|
@@ -335,7 +335,7 @@ function Label(props) {
|
|
|
335
335
|
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, tooltipAlignment = propsGenerator.tooltipAlignment, tooltipAppearance = propsGenerator.tooltipAppearance, tooltipArrowPosition = propsGenerator.tooltipArrowPosition, tooltipContent = propsGenerator.tooltipContent, tooltipText = propsGenerator.tooltipText, tooltipTextSize = propsGenerator.tooltipTextSize, tooltipTitle = propsGenerator.tooltipTitle, tooltipTitleSize = propsGenerator.tooltipTitleSize, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
336
336
|
// @ts-expect-error
|
|
337
337
|
var labelStyles = useStyles.useStyles(props).styles;
|
|
338
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'label', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "label_size_".concat(sizeClass), wrapClass && "
|
|
338
|
+
return (jsxRuntime.jsxs("div", { dataTour: dataTour, className: clsx(className, 'label', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "label_size_".concat(sizeClass), wrapClass && "word-wrap_".concat(wrapClass), widthClass && "label_width_".concat(widthClass), alignDirectionClass && "".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), isSkeleton && "label_skeleton", onClick && (cursor || 'cursor_type_pointer')), style: labelStyles, onClick: onClick, onMouseEnter: onMouseEnterLabel, onMouseLeave: onMouseLeaveLabel, children: [before, (iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('label__icon_before'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), jsxRuntime.jsxs("div", { className: "label__inner", children: [typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "label__text", size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsxRuntime.jsx("div", { className: "label__text", children: label })), children, showTooltip && (jsxRuntime.jsx(Icon.Tooltip, { className: "label__tooltip", ref: tooltipRef, appearance: tooltipAppearance, alignment: tooltipAlignment, title: tooltipTitle, titleSize: tooltipTitleSize, text: tooltipText, textSize: tooltipTextSize, arrowPosition: tooltipArrowPosition, children: tooltipContent }))] }), (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('label__icon_after'), fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), after] }));
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
exports.Label = Label;
|
|
@@ -318,7 +318,7 @@ var labelConfig = {
|
|
|
318
318
|
},
|
|
319
319
|
};
|
|
320
320
|
function Label(props) {
|
|
321
|
-
var className = props.className, appearance = props.appearance, label = props.label, cursor = props.cursor,
|
|
321
|
+
var dataTour = props.dataTour, className = props.className, appearance = props.appearance, label = props.label, cursor = props.cursor, showTooltip = props.showTooltip, before = props.before, after = props.after, isSkeleton = props.isSkeleton, onClick = props.onClick, children = props.children;
|
|
322
322
|
var tooltipRef = useRef(null);
|
|
323
323
|
var onMouseEnterLabel = useCallback(function () {
|
|
324
324
|
var _a;
|
|
@@ -333,7 +333,7 @@ function Label(props) {
|
|
|
333
333
|
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, tooltipAlignment = propsGenerator.tooltipAlignment, tooltipAppearance = propsGenerator.tooltipAppearance, tooltipArrowPosition = propsGenerator.tooltipArrowPosition, tooltipContent = propsGenerator.tooltipContent, tooltipText = propsGenerator.tooltipText, tooltipTextSize = propsGenerator.tooltipTextSize, tooltipTitle = propsGenerator.tooltipTitle, tooltipTitleSize = propsGenerator.tooltipTitleSize, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
334
334
|
// @ts-expect-error
|
|
335
335
|
var labelStyles = useStyles(props).styles;
|
|
336
|
-
return (jsxs("div", { className: clsx(className, 'label', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "label_size_".concat(sizeClass), wrapClass && "
|
|
336
|
+
return (jsxs("div", { dataTour: dataTour, className: clsx(className, 'label', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "label_size_".concat(sizeClass), wrapClass && "word-wrap_".concat(wrapClass), widthClass && "label_width_".concat(widthClass), alignDirectionClass && "".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), isSkeleton && "label_skeleton", onClick && (cursor || 'cursor_type_pointer')), style: labelStyles, onClick: onClick, onMouseEnter: onMouseEnterLabel, onMouseLeave: onMouseLeaveLabel, children: [before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: clsx('label__icon_before'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), jsxs("div", { className: "label__inner", children: [typeof label === 'string' ? (jsx(Text, { className: "label__text", size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsx("div", { className: "label__text", children: label })), children, showTooltip && (jsx(Tooltip, { className: "label__tooltip", ref: tooltipRef, appearance: tooltipAppearance, alignment: tooltipAlignment, title: tooltipTitle, titleSize: tooltipTitleSize, text: tooltipText, textSize: tooltipTextSize, arrowPosition: tooltipArrowPosition, children: tooltipContent }))] }), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: clsx('label__icon_after'), fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), after] }));
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
export { Label as L, labelAppearance as a, labelConfig as l };
|
|
@@ -6,7 +6,7 @@ var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceCon
|
|
|
6
6
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
7
7
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
8
8
|
var Avatar = require('../../Avatar_cjs_BcGACdXb.js');
|
|
9
|
-
var Group = require('../../
|
|
9
|
+
var Group = require('../../Group_cjs_CHcrOFx0.js');
|
|
10
10
|
var Text = require('../../Text_cjs_DmuzuKFj.js');
|
|
11
11
|
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
12
12
|
require('react');
|
|
@@ -6,7 +6,7 @@ var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceCon
|
|
|
6
6
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
7
7
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
8
8
|
var Icon = require('../../Icon_cjs_B-nskaAO.js');
|
|
9
|
-
var Label = require('../../
|
|
9
|
+
var Label = require('../../Label_cjs_COR0vD25.js');
|
|
10
10
|
var Text = require('../../Text_cjs_DmuzuKFj.js');
|
|
11
11
|
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
12
12
|
require('react');
|
|
@@ -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_C8r1qPxL.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_DFdZuX6w.js');
|
|
@@ -31,7 +31,7 @@ require('../../Link_cjs_BqT6eVl6.js');
|
|
|
31
31
|
require('../../Text_cjs_DmuzuKFj.js');
|
|
32
32
|
require('../../Loader_cjs_CMvh28cF.js');
|
|
33
33
|
require('../../Input_cjs_CFy0tfAO.js');
|
|
34
|
-
require('../../
|
|
34
|
+
require('../../Label_cjs_COR0vD25.js');
|
|
35
35
|
require('@itcase/icons/default');
|
|
36
36
|
require('lodash/castArray');
|
|
37
37
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var DatePicker = require('../../
|
|
3
|
+
var DatePicker = require('../../DatePicker_cjs_C8r1qPxL.js');
|
|
4
4
|
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
@@ -31,7 +31,7 @@ require('../../Link_cjs_BqT6eVl6.js');
|
|
|
31
31
|
require('../../Text_cjs_DmuzuKFj.js');
|
|
32
32
|
require('../../Loader_cjs_CMvh28cF.js');
|
|
33
33
|
require('../../Input_cjs_CFy0tfAO.js');
|
|
34
|
-
require('../../
|
|
34
|
+
require('../../Label_cjs_COR0vD25.js');
|
|
35
35
|
require('@itcase/icons/default');
|
|
36
36
|
|
|
37
37
|
|
|
@@ -33,6 +33,7 @@ var drawerAppearanceSize = {
|
|
|
33
33
|
sizeH3: {
|
|
34
34
|
titleTextSize: 'h3',
|
|
35
35
|
descTextSize: 's',
|
|
36
|
+
dividerSize: 's',
|
|
36
37
|
iconSize: 24,
|
|
37
38
|
},
|
|
38
39
|
};
|
|
@@ -74,20 +75,27 @@ var drawerConfig = {
|
|
|
74
75
|
},
|
|
75
76
|
};
|
|
76
77
|
function Drawer(props) {
|
|
77
|
-
var
|
|
78
|
-
var
|
|
78
|
+
var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, type = props.type, appearance = props.appearance, title = props.title, desc = props.desc, enableOverlay = props.enableOverlay, stickyButton = props.stickyButton, before = props.before, after = props.after, close = props.close, isOpen = props.isOpen, isOpenModal = props.isOpenModal, onClickClose = props.onClickClose, onClose = props.onClose, children = props.children;
|
|
79
|
+
var _isOpen = isOpen !== null && isOpen !== void 0 ? isOpen : isOpenModal;
|
|
80
|
+
var isOpenPrevRef = React.useRef(Boolean(_isOpen));
|
|
79
81
|
var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, drawerConfig);
|
|
80
82
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
81
|
-
var direction = propsGenerator.direction, size = propsGenerator.size, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, divider = propsGenerator.divider, zeroPadding = propsGenerator.zeroPadding, closeIcon = propsGenerator.closeIcon, closeIconFill = propsGenerator.closeIconFill, closeIconFillIcon = propsGenerator.closeIconFillIcon, closeIconFillSize = propsGenerator.closeIconFillSize, closeIconShape = propsGenerator.closeIconShape, closeIconSize = propsGenerator.closeIconSize, closeIconSrc = propsGenerator.closeIconSrc;
|
|
83
|
+
var direction = propsGenerator.direction, size = propsGenerator.size, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, divider = propsGenerator.divider, dividerSize = propsGenerator.dividerSize, zeroPadding = propsGenerator.zeroPadding, closeIcon = propsGenerator.closeIcon, closeIconFill = propsGenerator.closeIconFill, closeIconFillIcon = propsGenerator.closeIconFillIcon, closeIconFillSize = propsGenerator.closeIconFillSize, closeIconShape = propsGenerator.closeIconShape, closeIconSize = propsGenerator.closeIconSize, closeIconSrc = propsGenerator.closeIconSrc;
|
|
82
84
|
React.useEffect(function () {
|
|
83
|
-
|
|
85
|
+
var isFromOpenToClose = isOpenPrevRef.current === true && !_isOpen;
|
|
86
|
+
if (isFromOpenToClose && onClose) {
|
|
84
87
|
onClose();
|
|
85
88
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
isOpenPrevRef.current = Boolean(_isOpen);
|
|
90
|
+
var isNeedShowWarning = process.env.NODE_ENV === 'development' &&
|
|
91
|
+
typeof isOpenModal !== 'undefined';
|
|
92
|
+
if (isNeedShowWarning) {
|
|
93
|
+
console.warn('@itcase/ui Drawer warning: "isOpenModal" is deprecated, use "isOpen" instead.');
|
|
94
|
+
}
|
|
95
|
+
}, [_isOpen, onClose]);
|
|
96
|
+
return (jsxRuntime.jsxs(ReactDrawer, { dataTour: dataTour, 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,
|
|
89
97
|
// Drawer set prefix "EZDrawer" for any id
|
|
90
|
-
customIdSuffix: dataTestId ? "_".concat(dataTestId) : undefined,
|
|
98
|
+
customIdSuffix: dataTestId ? "_".concat(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 })] }));
|
|
91
99
|
}
|
|
92
100
|
|
|
93
101
|
exports.Drawer = Drawer;
|
|
@@ -134,10 +134,10 @@ var getOrCreateModalElement = function (modalQuerySelector, className) {
|
|
|
134
134
|
};
|
|
135
135
|
// Modal component that is an abstraction around the portal API.
|
|
136
136
|
var Modal = React.forwardRef(function Modal(props, ref) {
|
|
137
|
-
var id = props.id,
|
|
137
|
+
var id = props.id, dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, appearance = props.appearance, title = props.title, contentClassName = props.contentClassName, _a = props.modalQuerySelector, modalQuerySelector = _a === void 0 ? '#modal-global' : _a, scroll = props.scroll, _b = props.stickyHeader, stickyHeader = _b === void 0 ? false : _b, _c = props.isCloseOnBlur, isCloseOnBlur = _c === void 0 ? true : _c, _d = props.isOpen, initialIsOpen = _d === void 0 ? false : _d, _e = props.isOverlay, isOverlay = _e === void 0 ? true : _e, _f = props.isScrollOnOpen, isScrollOnOpen = _f === void 0 ? true : _f, _g = props.isSetFocusOnOpen, isSetFocusOnOpen = _g === void 0 ? true : _g, isSkeleton = props.isSkeleton, onClickOverlay = props.onClickOverlay, onCloseModal = props.onCloseModal, onOpenModal = props.onOpenModal, children = props.children;
|
|
138
138
|
// Query DOM element
|
|
139
|
-
var
|
|
140
|
-
var
|
|
139
|
+
var _h = React.useState(null), modalElement = _h[0], setModalElement = _h[1];
|
|
140
|
+
var _j = React.useState(initialIsOpen), isOpen = _j[0], setIsOpen = _j[1];
|
|
141
141
|
var modalContentRef = React.useRef(null);
|
|
142
142
|
// const modalOverlayRef = useRef(null)
|
|
143
143
|
var addModalProps = React.useCallback(function (element) {
|
|
@@ -225,7 +225,7 @@ var Modal = React.forwardRef(function Modal(props, ref) {
|
|
|
225
225
|
return (modalElement &&
|
|
226
226
|
ReactDOM.createPortal(
|
|
227
227
|
// Any valid React child: JSX, strings, arrays, etc.
|
|
228
|
-
isOpen ? (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("div", { id: id, className: clsx('modal__content', contentClassName, fillClass && "fill_".concat(fillClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), shapeClass && "shape_".concat(shapeClass), sizeClass && "modal_size_".concat(sizeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), elevationClass && "elevation_".concat(elevationClass), scroll && "modal-scroll_".concat(scroll), isSkeleton && 'modal_skeleton'),
|
|
228
|
+
isOpen ? (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("div", { id: id, className: clsx('modal__content', contentClassName, fillClass && "fill_".concat(fillClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), shapeClass && "shape_".concat(shapeClass), sizeClass && "modal_size_".concat(sizeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), elevationClass && "elevation_".concat(elevationClass), scroll && !stickyHeader && "modal-scroll_".concat(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, children: [(title || closeIconImage) && (jsxRuntime.jsxs("div", { className: clsx('modal__header'), children: [title && (jsxRuntime.jsx(Icon.Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), closeIconImage && (jsxRuntime.jsx("div", { className: "modal__close", onClick: closeModal, children: jsxRuntime.jsx(Icon.Icon, { appearance: closeIconAppearance, iconSize: closeIconSize, shape: closeIconShape, SvgImage: closeIconImage }) }))] })), jsxRuntime.jsx("div", { className: "modal__content-wrapper", children: children })] }), jsxRuntime.jsx(Overlay.Overlay, { className: "modal__overlay",
|
|
229
229
|
// ref={modalOverlayRef}
|
|
230
230
|
fill: overlayFill, opacity: overlayOpacity, isOverlay: isOverlay, onClick: onClickOverlay })] })) : null,
|
|
231
231
|
// A DOM element
|
|
@@ -132,13 +132,13 @@ var notificationConfig = {
|
|
|
132
132
|
},
|
|
133
133
|
};
|
|
134
134
|
function Notification(props) {
|
|
135
|
-
var id = props.id,
|
|
135
|
+
var id = props.id, dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, appearance = props.appearance, title = props.title, desc = props.desc, before = props.before, after = props.after, close = props.close, isSkeleton = props.isSkeleton, onClickClose = props.onClickClose;
|
|
136
136
|
var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, notificationConfig);
|
|
137
137
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
138
138
|
var fillClass = propsGenerator.fillClass, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, elevationClass = propsGenerator.elevationClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass, closeIcon = propsGenerator.closeIcon, closeIconFill = propsGenerator.closeIconFill, closeIconFillIcon = propsGenerator.closeIconFillIcon, closeIconFillSize = propsGenerator.closeIconFillSize, closeIconShape = propsGenerator.closeIconShape, closeIconSize = propsGenerator.closeIconSize, closeIconSrc = propsGenerator.closeIconSrc;
|
|
139
139
|
// @ts-expect-error
|
|
140
140
|
var notificationStyles = useStyles.useStyles(props).styles;
|
|
141
|
-
return (jsxRuntime.jsxs("div", { className: clsx('notification__item', elevationClass && "elevation_".concat(elevationClass), sizeClass && "notification__item_set_".concat(sizeClass), widthClass && "width_".concat(widthClass), fillClass && "fill_".concat(fillClass), isSkeleton && "notification__item_skeleton"),
|
|
141
|
+
return (jsxRuntime.jsxs("div", { className: clsx('notification__item', elevationClass && "elevation_".concat(elevationClass), sizeClass && "notification__item_set_".concat(sizeClass), widthClass && "width_".concat(widthClass), fillClass && "fill_".concat(fillClass), isSkeleton && "notification__item_skeleton"), "data-test-id": dataTestId, "data-tour": dataTour, style: notificationStyles, children: [before, jsxRuntime.jsxs("div", { className: clsx(className, 'notification__item-wrapper'), children: [title && (jsxRuntime.jsx(Text.Text, { className: "notification__item-title", size: titleTextSize, textColor: titleTextColor, children: title })), desc && (jsxRuntime.jsx(Text.Text, { className: "notification__item-text", size: descTextSize, textColor: descTextColor, children: desc })), close && (closeIcon || closeIconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('notification__item-close', 'cursor_type_pointer'), fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: function () { return onClickClose && onClickClose(id); } }))] }), after] }));
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
function NotificationWrapper(props) {
|
|
@@ -10,7 +10,7 @@ var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceCon
|
|
|
10
10
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
11
11
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
12
12
|
var Button = require('../../Button_cjs_DojNe74O.js');
|
|
13
|
-
var Group = require('../../
|
|
13
|
+
var Group = require('../../Group_cjs_CHcrOFx0.js');
|
|
14
14
|
var Text = require('../../Text_cjs_DmuzuKFj.js');
|
|
15
15
|
require('@itcase/common');
|
|
16
16
|
require('../context/UrlAssetPrefix.js');
|
|
@@ -190,7 +190,7 @@ var searchInputConfig = {
|
|
|
190
190
|
},
|
|
191
191
|
};
|
|
192
192
|
var SearchInput = React.forwardRef(function SearchInput(props, ref) {
|
|
193
|
-
var
|
|
193
|
+
var dataTour = props.dataTour, className = props.className, appearance = props.appearance, placeholder = props.placeholder, value = props.value, before = props.before, after = props.after, isActive = props.isActive, isSkeleton = props.isSkeleton, onChange = props.onChange, onClickClean = props.onClickClean, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
|
|
194
194
|
var onChangeSearchInput = React.useCallback(function (event) {
|
|
195
195
|
onChange && onChange(event.target.value);
|
|
196
196
|
}, [onChange]);
|
|
@@ -205,11 +205,11 @@ var SearchInput = React.forwardRef(function SearchInput(props, ref) {
|
|
|
205
205
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
206
206
|
var size = propsGenerator.size, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, iconClear = propsGenerator.iconClear, iconClearFill = propsGenerator.iconClearFill, iconClearSize = propsGenerator.iconClearSize, iconClearSrc = propsGenerator.iconClearSrc, inputFillClass = propsGenerator.inputFillClass, inputTextColorClass = propsGenerator.inputTextColorClass, inputTextSizeClass = propsGenerator.inputTextSizeClass, inputTextStyleClass = propsGenerator.inputTextStyleClass, inputTextWeightClass = propsGenerator.inputTextWeightClass, placeholderTextColor = propsGenerator.placeholderTextColor, placeholderTextSize = propsGenerator.placeholderTextSize, placeholderTextStyle = propsGenerator.placeholderTextStyle, placeholderTextWeight = propsGenerator.placeholderTextWeight, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, widthClass = propsGenerator.widthClass;
|
|
207
207
|
var searchInputStyles = useStyles.useStyles(props).styles;
|
|
208
|
-
return (jsxRuntime.jsxs("label", { className: clsx(className, 'search-input', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass), widthClass && "width_".concat(widthClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), size && "search-input_size_".concat(size), isSkeleton && "search-input_skeleton"),
|
|
208
|
+
return (jsxRuntime.jsxs("label", { dataTour: dataTour, className: clsx(className, 'search-input', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass), widthClass && "width_".concat(widthClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), size && "search-input_size_".concat(size), isSkeleton && "search-input_skeleton"), style: searchInputStyles, children: [before, (iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "search-input__icon-before", size: iconBeforeSize, iconFill: iconBeforeFill, imageSrc: iconBeforeSrc, SvgImage: iconBefore })), jsxRuntime.jsxs("div", { className: clsx('search-input__wrapper', inputFillClass && "fill_".concat(inputFillClass)), children: [jsxRuntime.jsx("input", { className: clsx('search-input__value', (inputTextSizeClass ||
|
|
209
209
|
inputTextWeightClass ||
|
|
210
210
|
inputTextColorClass ||
|
|
211
211
|
inputTextStyleClass) &&
|
|
212
|
-
'text', inputTextSizeClass && "text_size_".concat(inputTextSizeClass), inputTextWeightClass && "text-weight_".concat(inputTextWeightClass), inputTextColorClass && "text-color_".concat(inputTextColorClass), inputTextStyleClass && "text-style_".concat(inputTextStyleClass)), type: "text", ref: ref, required: true, value: value, onChange: onChangeSearchInput, onFocus: onFocus, onKeyDown: onKeyDown }), jsxRuntime.jsx("div", { className: "search-input__placeholder", children: jsxRuntime.jsx(Text.Text, { className: clsx('search-input__placeholder-value'), size: placeholderTextSize, textColor: placeholderTextColor, textStyle: placeholderTextStyle, textWeight: placeholderTextWeight, children: placeholder }) }), value && (jsxRuntime.jsx(Icon.Icon, { className: clsx('search-input__clear', 'cursor_type_pointer', isActive && "fill_".concat(iconClearFill)), size: iconClearSize, iconFill: iconClearFill, imageSrc: iconClearSrc, SvgImage: iconClear, onClick: onClickClearIcon }))] }), (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "search-input__icon-after", size: iconAfterSize, iconFill: iconAfterFill, imageSrc: iconAfterSrc, SvgImage: iconAfter })), after] }));
|
|
212
|
+
'text', inputTextSizeClass && "text_size_".concat(inputTextSizeClass), inputTextWeightClass && "text-weight_".concat(inputTextWeightClass), inputTextColorClass && "text-color_".concat(inputTextColorClass), inputTextStyleClass && "text-style_".concat(inputTextStyleClass)), type: "text", ref: ref, required: true, value: value || '', onChange: onChangeSearchInput, onFocus: onFocus, onKeyDown: onKeyDown }), jsxRuntime.jsx("div", { className: "search-input__placeholder", children: jsxRuntime.jsx(Text.Text, { className: clsx('search-input__placeholder-value'), size: placeholderTextSize, textColor: placeholderTextColor, textStyle: placeholderTextStyle, textWeight: placeholderTextWeight, children: placeholder }) }), value && (jsxRuntime.jsx(Icon.Icon, { className: clsx('search-input__clear', 'cursor_type_pointer', isActive && "fill_".concat(iconClearFill)), size: iconClearSize, iconFill: iconClearFill, imageSrc: iconClearSrc, SvgImage: iconClear, onClick: onClickClearIcon }))] }), (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "search-input__icon-after", size: iconAfterSize, iconFill: iconAfterFill, imageSrc: iconAfterSrc, SvgImage: iconAfter })), after] }));
|
|
213
213
|
});
|
|
214
214
|
// @ts-expect-error
|
|
215
215
|
SearchInput.DEFAULT_REF_STATE = {
|
|
@@ -7,7 +7,7 @@ var Icon = require('../../Icon_cjs_B-nskaAO.js');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var clsx = require('clsx');
|
|
9
9
|
var CreatableSelect = require('react-select/creatable');
|
|
10
|
-
var Group = require('../../
|
|
10
|
+
var Group = require('../../Group_cjs_CHcrOFx0.js');
|
|
11
11
|
var Text = require('../../Text_cjs_DmuzuKFj.js');
|
|
12
12
|
var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
13
13
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
@@ -6,7 +6,7 @@ var styleAttributes = [
|
|
|
6
6
|
/**
|
|
7
7
|
* Layout
|
|
8
8
|
*/
|
|
9
|
-
'alignContent', 'alignItems', 'alignSelf', 'aspectRatio', 'border', 'borderBottomWidth', '
|
|
9
|
+
'alignContent', 'alignItems', 'alignSelf', 'aspectRatio', 'border', 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth', 'borderWidth', 'bottom', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'gap', 'rowGap', 'columnGap', 'columnWidth', 'height', 'justifyContent', 'left', 'margin', 'marginBottom', 'marginHorizontal', 'marginLeft', 'marginRight', 'marginTop', 'marginVertical', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'overflow', 'overflowY', 'overflowX', 'padding', 'paddingBottom', 'paddingEnd', 'paddingHorizontal', 'paddingLeft', 'paddingRight', 'paddingStart', 'paddingTop', 'paddingVertical', 'position', 'right', 'top', ['width', {
|
|
10
10
|
validate: value => {
|
|
11
11
|
// Pass only number value for "width" style.
|
|
12
12
|
// If width have custom value, like "fill", we must set class by this value.
|
|
@@ -4,7 +4,7 @@ import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceC
|
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
6
|
import { A as Avatar } from '../Avatar_es_CRe2Om1a.js';
|
|
7
|
-
import { G as Group } from '../
|
|
7
|
+
import { G as Group } from '../Group_es_DHJcG2MA.js';
|
|
8
8
|
import { T as Text } from '../Text_es_DIU5ySvf.js';
|
|
9
9
|
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
10
10
|
import 'react';
|
package/dist/components/Cell.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceC
|
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
6
|
import { I as Icon } from '../Icon_es_CTKPPrrC.js';
|
|
7
|
-
import { L as Label } from '../
|
|
7
|
+
import { L as Label } from '../Label_es_LsHqmj27.js';
|
|
8
8
|
import { T as Text } from '../Text_es_DIU5ySvf.js';
|
|
9
9
|
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
10
10
|
import 'react';
|
|
@@ -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_Dq0JuDDZ.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_Dm-iGTBi.js';
|
|
@@ -29,7 +29,7 @@ import '../Link_es_BnUIX0QT.js';
|
|
|
29
29
|
import '../Text_es_DIU5ySvf.js';
|
|
30
30
|
import '../Loader_es_DGMpRDMk.js';
|
|
31
31
|
import '../Input_es_l3ry6luZ.js';
|
|
32
|
-
import '../
|
|
32
|
+
import '../Label_es_LsHqmj27.js';
|
|
33
33
|
import '@itcase/icons/default';
|
|
34
34
|
import 'lodash/castArray';
|
|
35
35
|
|
|
@@ -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_Dq0JuDDZ.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -29,5 +29,5 @@ import '../Link_es_BnUIX0QT.js';
|
|
|
29
29
|
import '../Text_es_DIU5ySvf.js';
|
|
30
30
|
import '../Loader_es_DGMpRDMk.js';
|
|
31
31
|
import '../Input_es_l3ry6luZ.js';
|
|
32
|
-
import '../
|
|
32
|
+
import '../Label_es_LsHqmj27.js';
|
|
33
33
|
import '@itcase/icons/default';
|
|
@@ -31,6 +31,7 @@ var drawerAppearanceSize = {
|
|
|
31
31
|
sizeH3: {
|
|
32
32
|
titleTextSize: 'h3',
|
|
33
33
|
descTextSize: 's',
|
|
34
|
+
dividerSize: 's',
|
|
34
35
|
iconSize: 24,
|
|
35
36
|
},
|
|
36
37
|
};
|
|
@@ -72,20 +73,27 @@ var drawerConfig = {
|
|
|
72
73
|
},
|
|
73
74
|
};
|
|
74
75
|
function Drawer(props) {
|
|
75
|
-
var
|
|
76
|
-
var
|
|
76
|
+
var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, type = props.type, appearance = props.appearance, title = props.title, desc = props.desc, enableOverlay = props.enableOverlay, stickyButton = props.stickyButton, before = props.before, after = props.after, close = props.close, isOpen = props.isOpen, isOpenModal = props.isOpenModal, onClickClose = props.onClickClose, onClose = props.onClose, children = props.children;
|
|
77
|
+
var _isOpen = isOpen !== null && isOpen !== void 0 ? isOpen : isOpenModal;
|
|
78
|
+
var isOpenPrevRef = useRef(Boolean(_isOpen));
|
|
77
79
|
var appearanceConfig = useAppearanceConfig(appearance, drawerConfig);
|
|
78
80
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
79
|
-
var direction = propsGenerator.direction, size = propsGenerator.size, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, divider = propsGenerator.divider, zeroPadding = propsGenerator.zeroPadding, closeIcon = propsGenerator.closeIcon, closeIconFill = propsGenerator.closeIconFill, closeIconFillIcon = propsGenerator.closeIconFillIcon, closeIconFillSize = propsGenerator.closeIconFillSize, closeIconShape = propsGenerator.closeIconShape, closeIconSize = propsGenerator.closeIconSize, closeIconSrc = propsGenerator.closeIconSrc;
|
|
81
|
+
var direction = propsGenerator.direction, size = propsGenerator.size, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, divider = propsGenerator.divider, dividerSize = propsGenerator.dividerSize, zeroPadding = propsGenerator.zeroPadding, closeIcon = propsGenerator.closeIcon, closeIconFill = propsGenerator.closeIconFill, closeIconFillIcon = propsGenerator.closeIconFillIcon, closeIconFillSize = propsGenerator.closeIconFillSize, closeIconShape = propsGenerator.closeIconShape, closeIconSize = propsGenerator.closeIconSize, closeIconSrc = propsGenerator.closeIconSrc;
|
|
80
82
|
useEffect(function () {
|
|
81
|
-
|
|
83
|
+
var isFromOpenToClose = isOpenPrevRef.current === true && !_isOpen;
|
|
84
|
+
if (isFromOpenToClose && onClose) {
|
|
82
85
|
onClose();
|
|
83
86
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
isOpenPrevRef.current = Boolean(_isOpen);
|
|
88
|
+
var isNeedShowWarning = process.env.NODE_ENV === 'development' &&
|
|
89
|
+
typeof isOpenModal !== 'undefined';
|
|
90
|
+
if (isNeedShowWarning) {
|
|
91
|
+
console.warn('@itcase/ui Drawer warning: "isOpenModal" is deprecated, use "isOpen" instead.');
|
|
92
|
+
}
|
|
93
|
+
}, [_isOpen, onClose]);
|
|
94
|
+
return (jsxs(ReactDrawer, { dataTour: dataTour, 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,
|
|
87
95
|
// Drawer set prefix "EZDrawer" for any id
|
|
88
|
-
customIdSuffix: dataTestId ? "_".concat(dataTestId) : undefined,
|
|
96
|
+
customIdSuffix: dataTestId ? "_".concat(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 })] }));
|
|
89
97
|
}
|
|
90
98
|
|
|
91
99
|
export { Drawer, drawerAppearance, drawerConfig };
|
package/dist/components/Group.js
CHANGED
package/dist/components/Label.js
CHANGED
package/dist/components/Modal.js
CHANGED
|
@@ -132,10 +132,10 @@ var getOrCreateModalElement = function (modalQuerySelector, className) {
|
|
|
132
132
|
};
|
|
133
133
|
// Modal component that is an abstraction around the portal API.
|
|
134
134
|
var Modal = React.forwardRef(function Modal(props, ref) {
|
|
135
|
-
var id = props.id,
|
|
135
|
+
var id = props.id, dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, appearance = props.appearance, title = props.title, contentClassName = props.contentClassName, _a = props.modalQuerySelector, modalQuerySelector = _a === void 0 ? '#modal-global' : _a, scroll = props.scroll, _b = props.stickyHeader, stickyHeader = _b === void 0 ? false : _b, _c = props.isCloseOnBlur, isCloseOnBlur = _c === void 0 ? true : _c, _d = props.isOpen, initialIsOpen = _d === void 0 ? false : _d, _e = props.isOverlay, isOverlay = _e === void 0 ? true : _e, _f = props.isScrollOnOpen, isScrollOnOpen = _f === void 0 ? true : _f, _g = props.isSetFocusOnOpen, isSetFocusOnOpen = _g === void 0 ? true : _g, isSkeleton = props.isSkeleton, onClickOverlay = props.onClickOverlay, onCloseModal = props.onCloseModal, onOpenModal = props.onOpenModal, children = props.children;
|
|
136
136
|
// Query DOM element
|
|
137
|
-
var
|
|
138
|
-
var
|
|
137
|
+
var _h = useState(null), modalElement = _h[0], setModalElement = _h[1];
|
|
138
|
+
var _j = useState(initialIsOpen), isOpen = _j[0], setIsOpen = _j[1];
|
|
139
139
|
var modalContentRef = useRef(null);
|
|
140
140
|
// const modalOverlayRef = useRef(null)
|
|
141
141
|
var addModalProps = useCallback(function (element) {
|
|
@@ -223,7 +223,7 @@ var Modal = React.forwardRef(function Modal(props, ref) {
|
|
|
223
223
|
return (modalElement &&
|
|
224
224
|
ReactDOM.createPortal(
|
|
225
225
|
// Any valid React child: JSX, strings, arrays, etc.
|
|
226
|
-
isOpen ? (jsxs(React.Fragment, { children: [jsxs("div", { id: id, className: clsx('modal__content', contentClassName, fillClass && "fill_".concat(fillClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), shapeClass && "shape_".concat(shapeClass), sizeClass && "modal_size_".concat(sizeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), elevationClass && "elevation_".concat(elevationClass), scroll && "modal-scroll_".concat(scroll), isSkeleton && 'modal_skeleton'),
|
|
226
|
+
isOpen ? (jsxs(React.Fragment, { children: [jsxs("div", { id: id, className: clsx('modal__content', contentClassName, fillClass && "fill_".concat(fillClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), shapeClass && "shape_".concat(shapeClass), sizeClass && "modal_size_".concat(sizeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), elevationClass && "elevation_".concat(elevationClass), scroll && !stickyHeader && "modal-scroll_".concat(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, children: [(title || closeIconImage) && (jsxs("div", { className: clsx('modal__header'), children: [title && (jsx(Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), closeIconImage && (jsx("div", { className: "modal__close", onClick: closeModal, children: jsx(Icon, { appearance: closeIconAppearance, iconSize: closeIconSize, shape: closeIconShape, SvgImage: closeIconImage }) }))] })), jsx("div", { className: "modal__content-wrapper", children: children })] }), jsx(Overlay, { className: "modal__overlay",
|
|
227
227
|
// ref={modalOverlayRef}
|
|
228
228
|
fill: overlayFill, opacity: overlayOpacity, isOverlay: isOverlay, onClick: onClickOverlay })] })) : null,
|
|
229
229
|
// A DOM element
|
|
@@ -130,13 +130,13 @@ var notificationConfig = {
|
|
|
130
130
|
},
|
|
131
131
|
};
|
|
132
132
|
function Notification(props) {
|
|
133
|
-
var id = props.id,
|
|
133
|
+
var id = props.id, dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, appearance = props.appearance, title = props.title, desc = props.desc, before = props.before, after = props.after, close = props.close, isSkeleton = props.isSkeleton, onClickClose = props.onClickClose;
|
|
134
134
|
var appearanceConfig = useAppearanceConfig(appearance, notificationConfig);
|
|
135
135
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
136
136
|
var fillClass = propsGenerator.fillClass, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, elevationClass = propsGenerator.elevationClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass, closeIcon = propsGenerator.closeIcon, closeIconFill = propsGenerator.closeIconFill, closeIconFillIcon = propsGenerator.closeIconFillIcon, closeIconFillSize = propsGenerator.closeIconFillSize, closeIconShape = propsGenerator.closeIconShape, closeIconSize = propsGenerator.closeIconSize, closeIconSrc = propsGenerator.closeIconSrc;
|
|
137
137
|
// @ts-expect-error
|
|
138
138
|
var notificationStyles = useStyles(props).styles;
|
|
139
|
-
return (jsxs("div", { className: clsx('notification__item', elevationClass && "elevation_".concat(elevationClass), sizeClass && "notification__item_set_".concat(sizeClass), widthClass && "width_".concat(widthClass), fillClass && "fill_".concat(fillClass), isSkeleton && "notification__item_skeleton"),
|
|
139
|
+
return (jsxs("div", { className: clsx('notification__item', elevationClass && "elevation_".concat(elevationClass), sizeClass && "notification__item_set_".concat(sizeClass), widthClass && "width_".concat(widthClass), fillClass && "fill_".concat(fillClass), isSkeleton && "notification__item_skeleton"), "data-test-id": dataTestId, "data-tour": dataTour, style: notificationStyles, children: [before, jsxs("div", { className: clsx(className, 'notification__item-wrapper'), children: [title && (jsx(Text, { className: "notification__item-title", size: titleTextSize, textColor: titleTextColor, children: title })), desc && (jsx(Text, { className: "notification__item-text", size: descTextSize, textColor: descTextColor, children: desc })), close && (closeIcon || closeIconSrc) && (jsx(Icon, { className: clsx('notification__item-close', 'cursor_type_pointer'), fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: function () { return onClickClose && onClickClose(id); } }))] }), after] }));
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
function NotificationWrapper(props) {
|
|
@@ -8,7 +8,7 @@ import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceC
|
|
|
8
8
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
9
9
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
10
10
|
import { B as Button } from '../Button_es_DCM3C_2S.js';
|
|
11
|
-
import { G as Group } from '../
|
|
11
|
+
import { G as Group } from '../Group_es_DHJcG2MA.js';
|
|
12
12
|
import { T as Text } from '../Text_es_DIU5ySvf.js';
|
|
13
13
|
import '@itcase/common';
|
|
14
14
|
import '../context/UrlAssetPrefix.js';
|
|
@@ -188,7 +188,7 @@ var searchInputConfig = {
|
|
|
188
188
|
},
|
|
189
189
|
};
|
|
190
190
|
var SearchInput = React.forwardRef(function SearchInput(props, ref) {
|
|
191
|
-
var
|
|
191
|
+
var dataTour = props.dataTour, className = props.className, appearance = props.appearance, placeholder = props.placeholder, value = props.value, before = props.before, after = props.after, isActive = props.isActive, isSkeleton = props.isSkeleton, onChange = props.onChange, onClickClean = props.onClickClean, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
|
|
192
192
|
var onChangeSearchInput = useCallback(function (event) {
|
|
193
193
|
onChange && onChange(event.target.value);
|
|
194
194
|
}, [onChange]);
|
|
@@ -203,11 +203,11 @@ var SearchInput = React.forwardRef(function SearchInput(props, ref) {
|
|
|
203
203
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
204
204
|
var size = propsGenerator.size, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, iconClear = propsGenerator.iconClear, iconClearFill = propsGenerator.iconClearFill, iconClearSize = propsGenerator.iconClearSize, iconClearSrc = propsGenerator.iconClearSrc, inputFillClass = propsGenerator.inputFillClass, inputTextColorClass = propsGenerator.inputTextColorClass, inputTextSizeClass = propsGenerator.inputTextSizeClass, inputTextStyleClass = propsGenerator.inputTextStyleClass, inputTextWeightClass = propsGenerator.inputTextWeightClass, placeholderTextColor = propsGenerator.placeholderTextColor, placeholderTextSize = propsGenerator.placeholderTextSize, placeholderTextStyle = propsGenerator.placeholderTextStyle, placeholderTextWeight = propsGenerator.placeholderTextWeight, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, widthClass = propsGenerator.widthClass;
|
|
205
205
|
var searchInputStyles = useStyles(props).styles;
|
|
206
|
-
return (jsxs("label", { className: clsx(className, 'search-input', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass), widthClass && "width_".concat(widthClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), size && "search-input_size_".concat(size), isSkeleton && "search-input_skeleton"),
|
|
206
|
+
return (jsxs("label", { dataTour: dataTour, className: clsx(className, 'search-input', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass), widthClass && "width_".concat(widthClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), size && "search-input_size_".concat(size), isSkeleton && "search-input_skeleton"), style: searchInputStyles, children: [before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "search-input__icon-before", size: iconBeforeSize, iconFill: iconBeforeFill, imageSrc: iconBeforeSrc, SvgImage: iconBefore })), jsxs("div", { className: clsx('search-input__wrapper', inputFillClass && "fill_".concat(inputFillClass)), children: [jsx("input", { className: clsx('search-input__value', (inputTextSizeClass ||
|
|
207
207
|
inputTextWeightClass ||
|
|
208
208
|
inputTextColorClass ||
|
|
209
209
|
inputTextStyleClass) &&
|
|
210
|
-
'text', inputTextSizeClass && "text_size_".concat(inputTextSizeClass), inputTextWeightClass && "text-weight_".concat(inputTextWeightClass), inputTextColorClass && "text-color_".concat(inputTextColorClass), inputTextStyleClass && "text-style_".concat(inputTextStyleClass)), type: "text", ref: ref, required: true, value: value, onChange: onChangeSearchInput, onFocus: onFocus, onKeyDown: onKeyDown }), jsx("div", { className: "search-input__placeholder", children: jsx(Text, { className: clsx('search-input__placeholder-value'), size: placeholderTextSize, textColor: placeholderTextColor, textStyle: placeholderTextStyle, textWeight: placeholderTextWeight, children: placeholder }) }), value && (jsx(Icon, { className: clsx('search-input__clear', 'cursor_type_pointer', isActive && "fill_".concat(iconClearFill)), size: iconClearSize, iconFill: iconClearFill, imageSrc: iconClearSrc, SvgImage: iconClear, onClick: onClickClearIcon }))] }), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "search-input__icon-after", size: iconAfterSize, iconFill: iconAfterFill, imageSrc: iconAfterSrc, SvgImage: iconAfter })), after] }));
|
|
210
|
+
'text', inputTextSizeClass && "text_size_".concat(inputTextSizeClass), inputTextWeightClass && "text-weight_".concat(inputTextWeightClass), inputTextColorClass && "text-color_".concat(inputTextColorClass), inputTextStyleClass && "text-style_".concat(inputTextStyleClass)), type: "text", ref: ref, required: true, value: value || '', onChange: onChangeSearchInput, onFocus: onFocus, onKeyDown: onKeyDown }), jsx("div", { className: "search-input__placeholder", children: jsx(Text, { className: clsx('search-input__placeholder-value'), size: placeholderTextSize, textColor: placeholderTextColor, textStyle: placeholderTextStyle, textWeight: placeholderTextWeight, children: placeholder }) }), value && (jsx(Icon, { className: clsx('search-input__clear', 'cursor_type_pointer', isActive && "fill_".concat(iconClearFill)), size: iconClearSize, iconFill: iconClearFill, imageSrc: iconClearSrc, SvgImage: iconClear, onClick: onClickClearIcon }))] }), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "search-input__icon-after", size: iconAfterSize, iconFill: iconAfterFill, imageSrc: iconAfterSrc, SvgImage: iconAfter })), after] }));
|
|
211
211
|
});
|
|
212
212
|
// @ts-expect-error
|
|
213
213
|
SearchInput.DEFAULT_REF_STATE = {
|
|
@@ -5,7 +5,7 @@ import { I as Icon, B as Badge } from '../Icon_es_CTKPPrrC.js';
|
|
|
5
5
|
import React, { useRef, useEffect, useMemo } from 'react';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import CreatableSelect from 'react-select/creatable';
|
|
8
|
-
import { G as Group } from '../
|
|
8
|
+
import { G as Group } from '../Group_es_DHJcG2MA.js';
|
|
9
9
|
import { T as Text } from '../Text_es_DIU5ySvf.js';
|
|
10
10
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
11
11
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
@@ -12,6 +12,18 @@
|
|
|
12
12
|
top: 6px;
|
|
13
13
|
width: 9px;
|
|
14
14
|
}
|
|
15
|
+
/* sr-only utility class for accessibility */
|
|
16
|
+
.react-datepicker__sr-only {
|
|
17
|
+
position: absolute;
|
|
18
|
+
width: 1px;
|
|
19
|
+
height: 1px;
|
|
20
|
+
padding: 0;
|
|
21
|
+
margin: -1px;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
clip: rect(0, 0, 0, 0);
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
border: 0;
|
|
26
|
+
}
|
|
15
27
|
.react-datepicker-wrapper {
|
|
16
28
|
display: inline-block;
|
|
17
29
|
padding: 0;
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
&__header {
|
|
26
26
|
position: relative;
|
|
27
27
|
display: flex;
|
|
28
|
+
justify-content: flex-end;
|
|
28
29
|
^&__title {
|
|
29
30
|
flex: 1;
|
|
30
31
|
}
|
|
@@ -60,6 +61,26 @@
|
|
|
60
61
|
}
|
|
61
62
|
.modal {
|
|
62
63
|
&-scroll {
|
|
64
|
+
&_header_sticky {
|
|
65
|
+
^^&__header {
|
|
66
|
+
position: sticky;
|
|
67
|
+
top: 0;
|
|
68
|
+
}
|
|
69
|
+
^^&__content {
|
|
70
|
+
&-wrapper {
|
|
71
|
+
position: relative;
|
|
72
|
+
overflow: hidden auto;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
&_true {
|
|
79
|
+
position: relative;
|
|
80
|
+
overflow: hidden auto;
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
}
|
|
63
84
|
&_vertical {
|
|
64
85
|
position: relative;
|
|
65
86
|
overflow: hidden auto;
|
|
@@ -87,32 +87,31 @@
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
:root {
|
|
90
|
-
--tab-size-xxl-padding:
|
|
90
|
+
--tab-size-xxl-padding: 0 14px;
|
|
91
91
|
--tab-size-xxl-gap: 4px;
|
|
92
92
|
--tab-size-xxl-min-height: 56px;
|
|
93
93
|
|
|
94
|
-
--tab-size-xl-padding: 10px;
|
|
94
|
+
--tab-size-xl-padding: 0 10px;
|
|
95
95
|
--tab-size-xl-gap: 4px;
|
|
96
96
|
--tab-size-xl-min-height: 40px;
|
|
97
97
|
|
|
98
|
-
--tab-size-l-padding:
|
|
98
|
+
--tab-size-l-padding: 0 12px;
|
|
99
99
|
--tab-size-l-gap: 4px;
|
|
100
100
|
--tab-size-l-min-height: 32px;
|
|
101
101
|
|
|
102
|
-
--tab-size-m-padding:
|
|
102
|
+
--tab-size-m-padding: 0 8px;
|
|
103
103
|
--tab-size-m-gap: 4px;
|
|
104
104
|
--tab-size-m-min-height: 28px;
|
|
105
105
|
|
|
106
|
-
--tab-size-s-padding:
|
|
106
|
+
--tab-size-s-padding: 0 6px;
|
|
107
107
|
--tab-size-s-gap: 4px;
|
|
108
108
|
--tab-size-s-min-height: 24px;
|
|
109
109
|
|
|
110
|
-
--tab-size-xs-padding:
|
|
110
|
+
--tab-size-xs-padding: 0 4px;
|
|
111
111
|
--tab-size-xs-gap: 4px;
|
|
112
112
|
--tab-size-xs-min-height: 20px;
|
|
113
113
|
|
|
114
114
|
--tab-size-xxs-padding: 0px;
|
|
115
115
|
--tab-size-xxs-gap: 4px;
|
|
116
116
|
--tab-size-xxs-min-height: 16px;
|
|
117
|
-
|
|
118
117
|
}
|
|
@@ -2,7 +2,7 @@ var styleAttributes = [
|
|
|
2
2
|
/**
|
|
3
3
|
* Layout
|
|
4
4
|
*/
|
|
5
|
-
'alignContent', 'alignItems', 'alignSelf', 'aspectRatio', 'border', 'borderBottomWidth', '
|
|
5
|
+
'alignContent', 'alignItems', 'alignSelf', 'aspectRatio', 'border', 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth', 'borderWidth', 'bottom', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'gap', 'rowGap', 'columnGap', 'columnWidth', 'height', 'justifyContent', 'left', 'margin', 'marginBottom', 'marginHorizontal', 'marginLeft', 'marginRight', 'marginTop', 'marginVertical', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'overflow', 'overflowY', 'overflowX', 'padding', 'paddingBottom', 'paddingEnd', 'paddingHorizontal', 'paddingLeft', 'paddingRight', 'paddingStart', 'paddingTop', 'paddingVertical', 'position', 'right', 'top', ['width', {
|
|
6
6
|
validate: value => {
|
|
7
7
|
// Pass only number value for "width" style.
|
|
8
8
|
// If width have custom value, like "fill", we must set class by this value.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.100",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
104
104
|
"@itcase/common": "^1.2.29",
|
|
105
105
|
"@itcase/icons": "^1.2.19",
|
|
106
|
-
"@itcase/storybook-config": "^1.1.
|
|
106
|
+
"@itcase/storybook-config": "^1.1.110",
|
|
107
107
|
"@itcase/tokens-am": "^1.1.19",
|
|
108
108
|
"@itcase/tokens-baikal": "^1.1.17",
|
|
109
109
|
"@itcase/tokens-palette": "^1.1.11",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"rc-slider": "^11.1.8",
|
|
118
118
|
"react": "^18.3.1",
|
|
119
119
|
"react-dadata": "^2.27.4",
|
|
120
|
-
"react-datepicker": "^8.
|
|
120
|
+
"react-datepicker": "^8.7.0",
|
|
121
121
|
"react-dom": "^18.3.1",
|
|
122
122
|
"react-indiana-drag-scroll": "^3.0.3-alpha",
|
|
123
123
|
"react-inlinesvg": "^4.2.0",
|
|
@@ -171,9 +171,9 @@
|
|
|
171
171
|
"lint-staged": "^16.1.5",
|
|
172
172
|
"prettier": "^3.6.2",
|
|
173
173
|
"react-docgen-typescript": "^2.4.0",
|
|
174
|
-
"rollup": "^4.46.
|
|
174
|
+
"rollup": "^4.46.4",
|
|
175
175
|
"rollup-plugin-copy": "^3.5.0",
|
|
176
|
-
"rollup-plugin-dts": "^6.2.
|
|
176
|
+
"rollup-plugin-dts": "^6.2.3",
|
|
177
177
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
178
178
|
"rollup-preserve-directives": "^1.1.3",
|
|
179
179
|
"semantic-release": "^24.2.7",
|