@itcase/ui 1.1.23 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-Vxs8zjSy.js → Button-CSzPxWyC.js} +1 -1
- package/dist/{Chips-uYPtUsLf.js → Chips-Bd3ZFosY.js} +3 -4
- package/dist/{CookiesWarning-Dc6YFhTn.js → CookiesWarning-B30eAOND.js} +1 -1
- package/dist/{DatePicker-l1a-OAls.js → DatePicker-Bf7t1yiM.js} +29 -13
- package/dist/{ModalLoader-Bk6l3vO9.js → ModalLoader-4OS81u94.js} +17 -24
- package/dist/{Overlay-C4gCb0sL.js → Overlay-DNPslUfY.js} +2 -2
- package/dist/{Response-sCPsxYoM.js → Response-BMRzGa5t.js} +1 -1
- package/dist/{SwitchField-BdrNzvfC.js → SwitchField-DCwEVCVg.js} +2 -2
- package/dist/cjs/{Button-xUrOQjVd.js → Button-DH5f_2bV.js} +1 -1
- package/dist/cjs/{Chips-D6tw75eZ.js → Chips-wl8WgeWZ.js} +3 -4
- package/dist/cjs/{CookiesWarning-DaEYrVWy.js → CookiesWarning-C-6cEf16.js} +1 -1
- package/dist/cjs/{DatePicker-CBdRlgIa.js → DatePicker-4tMTL9Nx.js} +29 -13
- package/dist/cjs/{ModalLoader-QyRlFIR4.js → ModalLoader-DRt-18Tr.js} +17 -24
- package/dist/cjs/{Overlay-18bnPZPd.js → Overlay-CkN2X1BM.js} +2 -2
- package/dist/cjs/{Response-DDEFfCC4.js → Response-CTawELy2.js} +1 -1
- package/dist/cjs/{SwitchField-D2V-28Fy.js → SwitchField-C31Nbyyn.js} +2 -2
- package/dist/cjs/components/Button.js +1 -1
- package/dist/cjs/components/Caption/Caption.interface.d.ts +5 -5
- package/dist/cjs/components/Chips/Chips.interface.d.ts +1 -1
- package/dist/cjs/components/Chips.js +1 -1
- package/dist/cjs/components/CookiesWarning.js +2 -2
- package/dist/cjs/components/DatePicker.js +2 -2
- package/dist/cjs/components/FormField/FormFiled.interface.d.ts +1 -1
- package/dist/cjs/components/FormField.js +1 -1
- package/dist/cjs/components/Modal/Modal.d.ts +2 -2
- package/dist/cjs/components/Modal/Modal.interface.d.ts +18 -15
- package/dist/cjs/components/Modal/ModalLoader.d.ts +2 -2
- package/dist/cjs/components/Modal.js +2 -2
- package/dist/cjs/components/Overlay/Overlay.d.ts +2 -2
- package/dist/cjs/components/Overlay/Overlay.interface.d.ts +6 -4
- package/dist/cjs/components/Overlay.js +1 -1
- package/dist/cjs/components/Response.js +2 -2
- package/dist/cjs/components.js +8 -8
- package/dist/cjs/types/componentProps/fillGradient.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +1 -1
- package/dist/components/Button.js +1 -1
- package/dist/components/Caption/Caption.interface.d.ts +5 -5
- package/dist/components/Chips/Chips.interface.d.ts +1 -1
- package/dist/components/Chips.js +1 -1
- package/dist/components/CookiesWarning.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/FormField/FormFiled.interface.d.ts +1 -1
- package/dist/components/FormField.js +1 -1
- package/dist/components/Modal/Modal.d.ts +2 -2
- package/dist/components/Modal/Modal.interface.d.ts +18 -15
- package/dist/components/Modal/ModalLoader.d.ts +2 -2
- package/dist/components/Modal.js +2 -2
- package/dist/components/Overlay/Overlay.d.ts +2 -2
- package/dist/components/Overlay/Overlay.interface.d.ts +6 -4
- package/dist/components/Overlay.js +1 -1
- package/dist/components/Response.js +2 -2
- package/dist/components.js +8 -8
- package/dist/css/components/Swiper/Swiper.css +3 -0
- package/dist/stories/Chips.stories.js +2 -2
- package/dist/types/componentProps/fillGradient.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -84,7 +84,7 @@ var Button = React__default.forwardRef(function Button(props, ref) {
|
|
|
84
84
|
iconBefore ||
|
|
85
85
|
iconBeforeSrc ||
|
|
86
86
|
iconSrc) &&
|
|
87
|
-
'button_type_with-icon', loading && 'button_state_loading button_type_loader'), "data-test-id": dataTestId && "".concat(dataTestId, "Button"), "data-tour": dataTour, DefaultComponent: "button", disabled: isDisabled, href: link || href, rel: rel, style: buttonStyles, target: target, type: htmlType, onClick: onClick, onMouseDown: onMouseDown, children: jsxRuntimeExports.jsxs("div", { className: "button__wrapper", ref: ref, children: [loading && (jsxRuntimeExports.jsx(Loader, { className: "button__loader", fill: loaderFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.loaderFill), itemFill: loaderItemFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.loaderItemFill), set: loaderSet })), before, (iconBefore || iconBeforeSrc) && (jsxRuntimeExports.jsx(Icon, { className: "button__icon_before", fill: fillIconBefore, fillSize: iconBeforeFillSize, iconFill: iconBeforeFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconBeforeFill), imageSrc: iconBeforeSrc, shape: iconBeforeShape, size: iconBeforeSize, SvgImage: iconBefore })), (icon || iconSrc) && (jsxRuntimeExports.jsx(Icon, { className: "button__icon", fill: fillIcon, fillSize: iconFillSize, iconFill: iconFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconFill), imageSrc: iconSrc, shape: iconShape, size: iconSize, SvgImage: icon })), (children || label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label)) && (jsxRuntimeExports.jsx(Text, { className: "button__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize) || undefined, sizeMobile: labelTextSizeMobile, style: labelStyles,
|
|
87
|
+
'button_type_with-icon', loading && 'button_state_loading button_type_loader'), "data-test-id": dataTestId && "".concat(dataTestId, "Button"), "data-tour": dataTour, DefaultComponent: "button", disabled: isDisabled, href: link || href, rel: rel, style: buttonStyles, target: target, type: htmlType, onClick: onClick, onMouseDown: onMouseDown, children: jsxRuntimeExports.jsxs("div", { className: "button__wrapper", ref: ref, children: [loading && (jsxRuntimeExports.jsx(Loader, { className: "button__loader", fill: loaderFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.loaderFill), itemFill: loaderItemFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.loaderItemFill), set: loaderSet })), before, (iconBefore || iconBeforeSrc) && (jsxRuntimeExports.jsx(Icon, { className: "button__icon_before", fill: fillIconBefore, fillSize: iconBeforeFillSize, iconFill: iconBeforeFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconBeforeFill), imageSrc: iconBeforeSrc, shape: iconBeforeShape, size: iconBeforeSize, SvgImage: iconBefore })), (icon || iconSrc) && (jsxRuntimeExports.jsx(Icon, { className: "button__icon", fill: fillIcon, fillSize: iconFillSize, iconFill: iconFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconFill), imageSrc: iconSrc, shape: iconShape, size: iconSize, SvgImage: icon })), (children || label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label)) && (jsxRuntimeExports.jsx(Text, { className: "button__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize) || undefined, sizeMobile: labelTextSizeMobile, style: labelStyles, textColor: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), textColorHover: labelTextColorHover || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColorHover), textTruncate: labelTextTruncate, textWeight: labelTextWeight, textWrap: labelTextWrap, width: labelTextWidth, children: children || label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label) })), (iconAfter || iconAfterSrc) && (jsxRuntimeExports.jsx(Icon, { SvgImage: iconAfter, className: "button__icon_after", fill: fillIconAfter, fillSize: iconAfterFillSize, iconFill: iconAfterFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconAfterFill), imageSrc: iconAfterSrc, shape: iconAfterShape, size: iconAfterSize })), Badge, after] }) }));
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
export { Button as B, buttonConfig as b };
|
|
@@ -11,8 +11,7 @@ var chipsConfig = {
|
|
|
11
11
|
},
|
|
12
12
|
};
|
|
13
13
|
function Chips(props) {
|
|
14
|
-
var children = props.children, isActive = props.isActive, appearance = props.appearance, className = props.className, _a = props.label, label = _a === void 0 ? '' : _a,
|
|
15
|
-
labelTextActiveColor = props.labelTextActiveColor, labelTextColor = props.labelTextColor, labelTextWeight = props.labelTextWeight, type = props.type, onClick = props.onClick;
|
|
14
|
+
var children = props.children, isActive = props.isActive, appearance = props.appearance, className = props.className, _a = props.label, label = _a === void 0 ? '' : _a, labelTextActiveColor = props.labelTextActiveColor, labelTextColor = props.labelTextColor, labelTextSize = props.labelTextSize, labelTextWeight = props.labelTextWeight, type = props.type, onClick = props.onClick;
|
|
16
15
|
var alignDirectionClass = useDeviceTargetClass(props, {
|
|
17
16
|
prefix: 'align_',
|
|
18
17
|
propsKey: 'alignDirection',
|
|
@@ -57,7 +56,7 @@ function Chips(props) {
|
|
|
57
56
|
var chipsStyles = useStyles(props).styles;
|
|
58
57
|
// prettier-ignore
|
|
59
58
|
var appearanceConfig = (appearance && chipsConfig.appearance && chipsConfig.appearance[appearance]);
|
|
60
|
-
return (jsxRuntimeExports.jsx("div", {
|
|
59
|
+
return (jsxRuntimeExports.jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', isActive
|
|
61
60
|
? fillActiveClass ||
|
|
62
61
|
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.fillActive) &&
|
|
63
62
|
"fill_".concat(appearanceConfig.fillActive).replace(/([A-Z])/g, '-$1').toLowerCase())
|
|
@@ -69,7 +68,7 @@ function Chips(props) {
|
|
|
69
68
|
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.borderColor) &&
|
|
70
69
|
"border-color_".concat(appearanceConfig.borderColor)
|
|
71
70
|
.replace(/([A-Z])/g, '-$1')
|
|
72
|
-
.toLowerCase()), borderTypeClass, sizeClass, alignDirectionClass, alignClass, type && "chips_type_".concat(type), cursorClass, onClick && 'cursor_type_pointer'), onClick: onClick, children: jsxRuntimeExports.jsxs("div", { className: "chips__inner", children: [typeof label === 'string' ? (jsxRuntimeExports.jsx(Text, { className: "chips__label", size:
|
|
71
|
+
.toLowerCase()), borderTypeClass, sizeClass, alignDirectionClass, alignClass, type && "chips_type_".concat(type), cursorClass, onClick && 'cursor_type_pointer'), style: chipsStyles, onClick: onClick, children: jsxRuntimeExports.jsxs("div", { className: "chips__inner", children: [typeof label === 'string' ? (jsxRuntimeExports.jsx(Text, { className: "chips__label", size: labelTextSize, textWeight: labelTextWeight, textColor: isActive
|
|
73
72
|
? labelTextActiveColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextActiveColor)
|
|
74
73
|
: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), children: label })) : (jsxRuntimeExports.jsx("div", { className: "chips__label", children: label })), children] }) }));
|
|
75
74
|
}
|
|
@@ -3,7 +3,7 @@ import { useRef, useMemo, useCallback, useEffect } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import Cookies from 'js-cookie';
|
|
5
5
|
import { useDeviceTargetClass } from './hooks/useDeviceTargetClass.js';
|
|
6
|
-
import { B as Button } from './Button-
|
|
6
|
+
import { B as Button } from './Button-CSzPxWyC.js';
|
|
7
7
|
import { G as Group } from './Group-DLmtajo8.js';
|
|
8
8
|
import { T as Text } from './Text-Dz-KPI5I.js';
|
|
9
9
|
|
|
@@ -7,7 +7,7 @@ import * as ReactDOM from 'react-dom';
|
|
|
7
7
|
import ReactDOM__default, { findDOMNode } from 'react-dom';
|
|
8
8
|
import { o as offset$1, f as flip$1, c as computePosition, b as arrow$2, g as getComputedStyle, i as isElement, a as autoUpdate } from './floating-ui.dom-BV5qw-HP.js';
|
|
9
9
|
import { useDeviceTargetClass } from './hooks/useDeviceTargetClass.js';
|
|
10
|
-
import { B as Button } from './Button-
|
|
10
|
+
import { B as Button } from './Button-CSzPxWyC.js';
|
|
11
11
|
import { I as Icon } from './Icon-BLqnXYOO.js';
|
|
12
12
|
import { I as Input } from './Input-CYDtAlO-.js';
|
|
13
13
|
import { L as Label } from './Label-c3hONOHC.js';
|
|
@@ -14062,30 +14062,46 @@ function DatePickerInput(props) {
|
|
|
14062
14062
|
}, [endValue]);
|
|
14063
14063
|
var _a = useState(start), startDate = _a[0], setStartDate = _a[1];
|
|
14064
14064
|
var _b = useState(end), endDate = _b[0], setEndDate = _b[1];
|
|
14065
|
-
var handleChange = function (_a) {
|
|
14065
|
+
var handleChange = useCallback(function (_a) {
|
|
14066
14066
|
var newStartDate = _a[0], newEndDate = _a[1];
|
|
14067
14067
|
onChange && onChange(newStartDate, newEndDate);
|
|
14068
14068
|
setStartDate(newStartDate);
|
|
14069
14069
|
setEndDate(newEndDate);
|
|
14070
|
-
};
|
|
14071
|
-
var renderDayContents = function (day, date) {
|
|
14070
|
+
}, [onChange]);
|
|
14071
|
+
var renderDayContents = useCallback(function (day, date) {
|
|
14072
14072
|
return (jsxRuntimeExports.jsx(Button, { className: "react-datepicker__day-button", label: date.getDate().toString(), labelTextColor: datePickerProps.dayTextColor, labelTextSize: datePickerProps.dayTextSize, shape: datePickerProps.dayTextShape, size: datePickerProps.daySize }));
|
|
14073
|
-
}
|
|
14074
|
-
|
|
14073
|
+
}, [
|
|
14074
|
+
datePickerProps.daySize,
|
|
14075
|
+
datePickerProps.dayTextColor,
|
|
14076
|
+
datePickerProps.dayTextShape,
|
|
14077
|
+
datePickerProps.dayTextSize,
|
|
14078
|
+
]);
|
|
14079
|
+
var renderCustomHeader = useCallback(function (_a) {
|
|
14075
14080
|
var monthDate = _a.monthDate, decreaseMonth = _a.decreaseMonth, increaseMonth = _a.increaseMonth;
|
|
14076
|
-
return (jsxRuntimeExports.jsxs("div", { className: "react-datepicker__header--div", children: [datePickerProps.iconLeft && (jsxRuntimeExports.jsx(Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, size: datePickerProps.iconSize, SvgImage: datePickerProps.iconLeft, onClick: decreaseMonth })), jsxRuntimeExports.jsxs("div", { className: "react-datepicker__data", children: [jsxRuntimeExports.jsx(Text, { className: "react-datepicker__month", size: datePickerProps.monthTextSize, textColor: datePickerProps.monthTextColor, textWeight: datePickerProps.monthTextWeight, children: monthDate.toLocaleString('ru-RU', {
|
|
14077
|
-
|
|
14078
|
-
|
|
14079
|
-
|
|
14080
|
-
|
|
14081
|
-
|
|
14081
|
+
return (jsxRuntimeExports.jsxs("div", { className: "react-datepicker__header--div", children: [datePickerProps.iconLeft && (jsxRuntimeExports.jsx(Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, size: datePickerProps.iconSize, SvgImage: datePickerProps.iconLeft, onClick: decreaseMonth })), jsxRuntimeExports.jsxs("div", { className: "react-datepicker__data", children: [jsxRuntimeExports.jsx(Text, { className: "react-datepicker__month", size: datePickerProps.monthTextSize, textColor: datePickerProps.monthTextColor, textWeight: datePickerProps.monthTextWeight, children: monthDate.toLocaleString('ru-RU', { month: 'long' }) }), jsxRuntimeExports.jsx(Text, { className: "react-datepicker__year", size: datePickerProps.yearTextSize, textColor: datePickerProps.yearTextColor, textWeight: datePickerProps.yearTextWeight, children: monthDate.toLocaleString('ru-RU', { year: 'numeric' }) })] }), datePickerProps.iconRight && (jsxRuntimeExports.jsx(Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, size: datePickerProps.iconSize, SvgImage: datePickerProps.iconRight, onClick: increaseMonth }))] }));
|
|
14082
|
+
}, [
|
|
14083
|
+
datePickerProps.iconFill,
|
|
14084
|
+
datePickerProps.iconFillHover,
|
|
14085
|
+
datePickerProps.iconFillSize,
|
|
14086
|
+
datePickerProps.iconItemFill,
|
|
14087
|
+
datePickerProps.iconLeft,
|
|
14088
|
+
datePickerProps.iconRight,
|
|
14089
|
+
datePickerProps.iconShape,
|
|
14090
|
+
datePickerProps.iconSize,
|
|
14091
|
+
datePickerProps.monthTextColor,
|
|
14092
|
+
datePickerProps.monthTextSize,
|
|
14093
|
+
datePickerProps.monthTextWeight,
|
|
14094
|
+
datePickerProps.yearTextColor,
|
|
14095
|
+
datePickerProps.yearTextSize,
|
|
14096
|
+
datePickerProps.yearTextWeight,
|
|
14097
|
+
]);
|
|
14082
14098
|
useEffect(function () {
|
|
14083
14099
|
setStartDate(start);
|
|
14084
14100
|
}, [start]);
|
|
14085
14101
|
useEffect(function () {
|
|
14086
14102
|
setEndDate(end);
|
|
14087
14103
|
}, [end]);
|
|
14088
|
-
return (jsxRuntimeExports.jsx("div", { className: clsx$1(className, 'datepicker', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.monthsShown) && 'datepicker_type_multiple-months', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.customTimeInput) && 'datepicker_type_button', widthClass), children: jsxRuntimeExports.jsx(DatePicker, __assign({
|
|
14104
|
+
return (jsxRuntimeExports.jsx("div", { className: clsx$1(className, 'datepicker', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.monthsShown) && 'datepicker_type_multiple-months', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.customTimeInput) && 'datepicker_type_button', widthClass), children: jsxRuntimeExports.jsx(DatePicker, __assign({ ref: datepickerRef, endDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectsRange) ? endDate : undefined, locale: ru, minDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.disablePastDays) ? new Date() : undefined, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: startDate, startDate: startDate, customInput: jsxRuntimeExports.jsx(DatePickerCustomInput, { labelTextSize: labelTextSize, clearIcon: clearIcon, clearIconFill: clearIconFill, clearIconFillHover: clearIconFillHover, clearIconFillSize: clearIconFillSize, clearIconItemFill: clearIconItemFill, clearIconItemFillHover: clearIconItemFillHover, clearIconShape: clearIconShape, clearIconSize: clearIconSize, clearIconSrc: clearIconSrc, clearLabel: clearLabel, clearLabelTextColor: clearLabelTextColor, clearLabelTextColorHover: clearLabelTextColorHover, clearLabelTextSize: clearLabelTextSize, datepickerRef: datepickerRef, inputIcon: datePickerProps.inputIcon, inputIconFill: datePickerProps.inputIconFill, inputIconFillHover: datePickerProps.inputIconFillHover, inputIconFillSize: datePickerProps.inputIconFillSize, inputIconItemFill: datePickerProps.inputIconItemFill, inputIconShape: datePickerProps.inputIconShape, inputIconSize: datePickerProps.inputIconSize, inputIconSrc: datePickerProps.inputIconSrc, inputProps: inputProps, isClearable: datePickerProps.isClearable }), onChange: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectsRange) ? handleChange : onChange }, datePickerProps, {
|
|
14089
14105
|
// Important for use custom clear button
|
|
14090
14106
|
isClearable: false })) }));
|
|
14091
14107
|
}
|
|
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import ReactDOM__default from 'react-dom';
|
|
5
5
|
import { useDeviceTargetClass } from './hooks/useDeviceTargetClass.js';
|
|
6
6
|
import { useStyles } from './hooks/useStyles.js';
|
|
7
|
-
import { O as Overlay } from './Overlay-
|
|
7
|
+
import { O as Overlay } from './Overlay-DNPslUfY.js';
|
|
8
8
|
import { L as Loader } from './Loader-VCP1ZNcb.js';
|
|
9
9
|
|
|
10
10
|
var getOrCreateModalElement = function (modalQuerySelector, className) {
|
|
@@ -29,12 +29,12 @@ var getOrCreateModalElement = function (modalQuerySelector, className) {
|
|
|
29
29
|
};
|
|
30
30
|
// Modal component that is an abstraction around the portal API.
|
|
31
31
|
var Modal = React__default.forwardRef(function Modal(props, ref) {
|
|
32
|
-
var
|
|
32
|
+
var id = props.id, children = props.children, _a = props.isCloseOnBlur, isCloseOnBlur = _a === void 0 ? true : _a, _b = props.isOpen, initialIsOpen = _b === void 0 ? false : _b, _c = props.isOverlay, isOverlay = _c === void 0 ? true : _c, _d = props.isScrollOnOpen, isScrollOnOpen = _d === void 0 ? true : _d, _e = props.isSetFocusOnOpen, isSetFocusOnOpen = _e === void 0 ? true : _e, className = props.className, closeButton = props.closeButton, contentClassName = props.contentClassName, _f = props.modalQuerySelector, modalQuerySelector = _f === void 0 ? '#modal-global' : _f, overlayClassName = props.overlayClassName, overlayFill = props.overlayFill, overlayFillGradient = props.overlayFillGradient, overlayOpacity = props.overlayOpacity, onClickOverlay = props.onClickOverlay, onCloseModal = props.onCloseModal, onOpenModal = props.onOpenModal;
|
|
33
33
|
// Query DOM element
|
|
34
|
-
var
|
|
35
|
-
var
|
|
34
|
+
var _g = useState(null), modalElement = _g[0], setModalElement = _g[1];
|
|
35
|
+
var _h = useState(initialIsOpen), isOpen = _h[0], setIsOpen = _h[1];
|
|
36
36
|
var modalContentRef = useRef(null);
|
|
37
|
-
|
|
37
|
+
// const modalOverlayRef = useRef(null)
|
|
38
38
|
var addModalProps = useCallback(function (element) {
|
|
39
39
|
// Change class need in "useEffect"
|
|
40
40
|
if (isOpen) {
|
|
@@ -83,18 +83,18 @@ var Modal = React__default.forwardRef(function Modal(props, ref) {
|
|
|
83
83
|
}, [onOpenModal]);
|
|
84
84
|
// Hide modal and unmount children content
|
|
85
85
|
var closeModal = useCallback(function (event) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
if (event) {
|
|
87
|
+
// prettier-ignore
|
|
88
|
+
var hasRelatedTarget = (event.relatedTarget &&
|
|
89
|
+
modalElement &&
|
|
90
|
+
modalElement.contains(event.relatedTarget));
|
|
91
|
+
if (hasRelatedTarget) {
|
|
92
|
+
return event;
|
|
93
|
+
}
|
|
92
94
|
}
|
|
93
95
|
setIsOpen(false);
|
|
94
96
|
// Callback
|
|
95
|
-
|
|
96
|
-
onCloseModal();
|
|
97
|
-
}
|
|
97
|
+
onCloseModal && onCloseModal();
|
|
98
98
|
}, [modalElement, onCloseModal]);
|
|
99
99
|
useEffect(function () {
|
|
100
100
|
if (!modalElement) {
|
|
@@ -147,19 +147,12 @@ var Modal = React__default.forwardRef(function Modal(props, ref) {
|
|
|
147
147
|
return (modalElement &&
|
|
148
148
|
ReactDOM__default.createPortal(
|
|
149
149
|
// Any valid React child: JSX, strings, arrays, etc.
|
|
150
|
-
isOpen ? (jsxRuntimeExports.jsxs(React__default.Fragment, { children: [jsxRuntimeExports.jsxs("div", { className: clsx('modal-content', contentClassName, fillClass, shapeClass, borderColorClass, borderWidthClass, borderTypeClass, elevationClass),
|
|
151
|
-
//
|
|
152
|
-
|
|
150
|
+
isOpen ? (jsxRuntimeExports.jsxs(React__default.Fragment, { children: [jsxRuntimeExports.jsxs("div", { className: clsx('modal-content', contentClassName, fillClass, shapeClass, borderColorClass, borderWidthClass, borderTypeClass, elevationClass), ref: modalContentRef, id: id, style: modalStyles, tabIndex: 0, onBlur: isCloseOnBlur ? closeModal : undefined, children: [closeButton && (jsxRuntimeExports.jsx("div", { className: "modal-content__close", onClick: closeModal, children: closeButton })), jsxRuntimeExports.jsx("div", { className: "modal-content__wrapper", children: children })] }), jsxRuntimeExports.jsx(Overlay, { className: clsx('modal__overlay', 'overlay_type_modal', overlayClassName),
|
|
151
|
+
// ref={modalOverlayRef}
|
|
152
|
+
fill: overlayFill, opacity: overlayOpacity, fillGradient: overlayFillGradient, isOverlay: isOverlay, onClick: onClickOverlay })] })) : null,
|
|
153
153
|
// A DOM element
|
|
154
154
|
modalElement));
|
|
155
155
|
});
|
|
156
|
-
Modal.defaultProps = {
|
|
157
|
-
isOverlay: true,
|
|
158
|
-
isOpen: false,
|
|
159
|
-
isScrollOnOpen: true,
|
|
160
|
-
isSetFocusOnOpen: true,
|
|
161
|
-
modalQuerySelector: '#modal-global',
|
|
162
|
-
};
|
|
163
156
|
|
|
164
157
|
function ModalLoader(props) {
|
|
165
158
|
return (jsxRuntimeExports.jsx("div", { className: "modal-loading", children: jsxRuntimeExports.jsx("div", { className: "modal-loading__inner", children: jsxRuntimeExports.jsx(Loader, {}) }) }));
|
|
@@ -4,7 +4,7 @@ import { useDeviceTargetClass } from './hooks/useDeviceTargetClass.js';
|
|
|
4
4
|
import { useStyles } from './hooks/useStyles.js';
|
|
5
5
|
|
|
6
6
|
function Overlay(props) {
|
|
7
|
-
var className = props.className,
|
|
7
|
+
var isOverlay = props.isOverlay, className = props.className, type = props.type, onClick = props.onClick;
|
|
8
8
|
var fillClass = useDeviceTargetClass(props, {
|
|
9
9
|
prefix: 'fill_',
|
|
10
10
|
propsKey: 'fill',
|
|
@@ -19,7 +19,7 @@ function Overlay(props) {
|
|
|
19
19
|
});
|
|
20
20
|
// @ts-expect-error
|
|
21
21
|
var overlayStyles = useStyles(props).styles;
|
|
22
|
-
return (jsxRuntimeExports.jsx("div", { className: clsx(className, 'overlay', opacityClass, isOverlay && 'overlay_state_visible', type && "".concat(className, "_type_").concat(type), fillClass, fillGradientClass), style: overlayStyles, children: "\u00A0" }));
|
|
22
|
+
return (jsxRuntimeExports.jsx("div", { className: clsx(className, 'overlay', opacityClass, isOverlay && 'overlay_state_visible', type && "".concat(className, "_type_").concat(type), fillClass, fillGradientClass), style: overlayStyles, onClick: onClick, children: "\u00A0" }));
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export { Overlay as O };
|
|
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import SVG from 'react-inlinesvg';
|
|
5
5
|
import { useDeviceTargetClass } from './hooks/useDeviceTargetClass.js';
|
|
6
6
|
import { useStyles } from './hooks/useStyles.js';
|
|
7
|
-
import { B as Button } from './Button-
|
|
7
|
+
import { B as Button } from './Button-CSzPxWyC.js';
|
|
8
8
|
import { G as Group } from './Group-DLmtajo8.js';
|
|
9
9
|
import { T as Text } from './Text-Dz-KPI5I.js';
|
|
10
10
|
import { T as Title } from './Title-zpOK2AxL.js';
|
|
@@ -11,7 +11,7 @@ import { useStyles } from './hooks/useStyles.js';
|
|
|
11
11
|
import { S as Switch } from './Switch-0BHqovLA.js';
|
|
12
12
|
|
|
13
13
|
function FormField(props) {
|
|
14
|
-
var id = props.id, children = props.children, afterItem = props.afterItem, dataTestId = props.dataTestId, beforeItem = props.beforeItem, dividerWidth = props.dividerWidth, dividerDirection = props.dividerDirection, set = props.set, className = props.className, dividerSize = props.dividerSize, dividerFill = props.dividerFill, descSize = props.descSize, descTextWeight = props.descTextWeight, descTextColor = props.descTextColor, desc = props.desc, label = props.label,
|
|
14
|
+
var id = props.id, children = props.children, afterItem = props.afterItem, dataTestId = props.dataTestId, beforeItem = props.beforeItem, dividerWidth = props.dividerWidth, dividerDirection = props.dividerDirection, set = props.set, className = props.className, dividerSize = props.dividerSize, dividerFill = props.dividerFill, descSize = props.descSize, descTextWeight = props.descTextWeight, descTextColor = props.descTextColor, desc = props.desc, label = props.label, labelTextSize = props.labelTextSize, labelTextWeight = props.labelTextWeight, labelTextColor = props.labelTextColor, clearIconFill = props.clearIconFill, clearIcon = props.clearIcon, clearIconSize = props.clearIconSize, messageSize = props.messageSize, messageTextWeight = props.messageTextWeight, messageTextColor = props.messageTextColor, message = props.message;
|
|
15
15
|
var sizeClass = useDeviceTargetClass(props, {
|
|
16
16
|
prefix: 'form-field_size_',
|
|
17
17
|
propsKey: 'size',
|
|
@@ -38,7 +38,7 @@ function FormField(props) {
|
|
|
38
38
|
});
|
|
39
39
|
// @ts-expect-error
|
|
40
40
|
var formFieldStyles = useStyles(props).styles;
|
|
41
|
-
return (jsxRuntimeExports.jsxs("div", { className: clsx(className, 'form-field', set && "form-field_set_".concat(set), sizeClass, fillClass, shapeClass, directionClass), "data-test-id": dataTestId, style: formFieldStyles, children: [label && (jsxRuntimeExports.jsx("label", { htmlFor: id, className: "form-field__label", children: jsxRuntimeExports.jsx(Text, { size:
|
|
41
|
+
return (jsxRuntimeExports.jsxs("div", { className: clsx(className, 'form-field', set && "form-field_set_".concat(set), sizeClass, fillClass, shapeClass, directionClass), "data-test-id": dataTestId, style: formFieldStyles, children: [label && (jsxRuntimeExports.jsx("label", { htmlFor: id, className: "form-field__label", children: jsxRuntimeExports.jsx(Text, { size: labelTextSize, textWeight: labelTextWeight, textColor: labelTextColor, children: label }) })), desc && (jsxRuntimeExports.jsx("div", { className: "form-field__desc", children: jsxRuntimeExports.jsx(Text, { size: descSize, textWeight: descTextWeight, textColor: descTextColor, children: desc }) })), jsxRuntimeExports.jsxs("div", { className: clsx('form-field__item', inputFillClass, inputShapeClass), children: [jsxRuntimeExports.jsxs("div", { className: clsx('form-field__item-wrapper'), children: [beforeItem, children, clearIcon && jsxRuntimeExports.jsx(Icon, { fill: clearIconFill, SvgImage: clearIcon, size: clearIconSize }), afterItem] }), jsxRuntimeExports.jsx(Divider, { className: "form-field__item-divider", direction: dividerDirection, fill: dividerFill, size: dividerSize, width: dividerWidth })] }), message && (jsxRuntimeExports.jsx("div", { className: "form-field__message", children: jsxRuntimeExports.jsx(Text, { size: messageSize, textWeight: messageTextWeight, textColor: messageTextColor, children: message }) }))] }));
|
|
42
42
|
}
|
|
43
43
|
FormField.defaultProps = {
|
|
44
44
|
dividerWidth: 'fill',
|
|
@@ -91,7 +91,7 @@ var Button = React__default.default.forwardRef(function Button(props, ref) {
|
|
|
91
91
|
iconBefore ||
|
|
92
92
|
iconBeforeSrc ||
|
|
93
93
|
iconSrc) &&
|
|
94
|
-
'button_type_with-icon', loading && 'button_state_loading button_type_loader'), "data-test-id": dataTestId && "".concat(dataTestId, "Button"), "data-tour": dataTour, DefaultComponent: "button", disabled: isDisabled, href: link || href, rel: rel, style: buttonStyles, target: target, type: htmlType, onClick: onClick, onMouseDown: onMouseDown, children: jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "button__wrapper", ref: ref, children: [loading && (jsxRuntime.jsxRuntimeExports.jsx(Loader.Loader, { className: "button__loader", fill: loaderFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.loaderFill), itemFill: loaderItemFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.loaderItemFill), set: loaderSet })), before, (iconBefore || iconBeforeSrc) && (jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, { className: "button__icon_before", fill: fillIconBefore, fillSize: iconBeforeFillSize, iconFill: iconBeforeFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconBeforeFill), imageSrc: iconBeforeSrc, shape: iconBeforeShape, size: iconBeforeSize, SvgImage: iconBefore })), (icon || iconSrc) && (jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, { className: "button__icon", fill: fillIcon, fillSize: iconFillSize, iconFill: iconFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconFill), imageSrc: iconSrc, shape: iconShape, size: iconSize, SvgImage: icon })), (children || label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label)) && (jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { className: "button__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize) || undefined, sizeMobile: labelTextSizeMobile, style: labelStyles,
|
|
94
|
+
'button_type_with-icon', loading && 'button_state_loading button_type_loader'), "data-test-id": dataTestId && "".concat(dataTestId, "Button"), "data-tour": dataTour, DefaultComponent: "button", disabled: isDisabled, href: link || href, rel: rel, style: buttonStyles, target: target, type: htmlType, onClick: onClick, onMouseDown: onMouseDown, children: jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "button__wrapper", ref: ref, children: [loading && (jsxRuntime.jsxRuntimeExports.jsx(Loader.Loader, { className: "button__loader", fill: loaderFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.loaderFill), itemFill: loaderItemFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.loaderItemFill), set: loaderSet })), before, (iconBefore || iconBeforeSrc) && (jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, { className: "button__icon_before", fill: fillIconBefore, fillSize: iconBeforeFillSize, iconFill: iconBeforeFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconBeforeFill), imageSrc: iconBeforeSrc, shape: iconBeforeShape, size: iconBeforeSize, SvgImage: iconBefore })), (icon || iconSrc) && (jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, { className: "button__icon", fill: fillIcon, fillSize: iconFillSize, iconFill: iconFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconFill), imageSrc: iconSrc, shape: iconShape, size: iconSize, SvgImage: icon })), (children || label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label)) && (jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { className: "button__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize) || undefined, sizeMobile: labelTextSizeMobile, style: labelStyles, textColor: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), textColorHover: labelTextColorHover || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColorHover), textTruncate: labelTextTruncate, textWeight: labelTextWeight, textWrap: labelTextWrap, width: labelTextWidth, children: children || label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label) })), (iconAfter || iconAfterSrc) && (jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, { SvgImage: iconAfter, className: "button__icon_after", fill: fillIconAfter, fillSize: iconAfterFillSize, iconFill: iconAfterFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconAfterFill), imageSrc: iconAfterSrc, shape: iconAfterShape, size: iconAfterSize })), Badge, after] }) }));
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
exports.Button = Button;
|
|
@@ -17,8 +17,7 @@ var chipsConfig = {
|
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
function Chips(props) {
|
|
20
|
-
var children = props.children, isActive = props.isActive, appearance = props.appearance, className = props.className, _a = props.label, label = _a === void 0 ? '' : _a,
|
|
21
|
-
labelTextActiveColor = props.labelTextActiveColor, labelTextColor = props.labelTextColor, labelTextWeight = props.labelTextWeight, type = props.type, onClick = props.onClick;
|
|
20
|
+
var children = props.children, isActive = props.isActive, appearance = props.appearance, className = props.className, _a = props.label, label = _a === void 0 ? '' : _a, labelTextActiveColor = props.labelTextActiveColor, labelTextColor = props.labelTextColor, labelTextSize = props.labelTextSize, labelTextWeight = props.labelTextWeight, type = props.type, onClick = props.onClick;
|
|
22
21
|
var alignDirectionClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
23
22
|
prefix: 'align_',
|
|
24
23
|
propsKey: 'alignDirection',
|
|
@@ -63,7 +62,7 @@ function Chips(props) {
|
|
|
63
62
|
var chipsStyles = useStyles.useStyles(props).styles;
|
|
64
63
|
// prettier-ignore
|
|
65
64
|
var appearanceConfig = (appearance && chipsConfig.appearance && chipsConfig.appearance[appearance]);
|
|
66
|
-
return (jsxRuntime.jsxRuntimeExports.jsx("div", {
|
|
65
|
+
return (jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx__default.default(className, 'chips', isActive && 'chips_state_active', isActive
|
|
67
66
|
? fillActiveClass ||
|
|
68
67
|
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.fillActive) &&
|
|
69
68
|
"fill_".concat(appearanceConfig.fillActive).replace(/([A-Z])/g, '-$1').toLowerCase())
|
|
@@ -75,7 +74,7 @@ function Chips(props) {
|
|
|
75
74
|
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.borderColor) &&
|
|
76
75
|
"border-color_".concat(appearanceConfig.borderColor)
|
|
77
76
|
.replace(/([A-Z])/g, '-$1')
|
|
78
|
-
.toLowerCase()), borderTypeClass, sizeClass, alignDirectionClass, alignClass, type && "chips_type_".concat(type), cursorClass, onClick && 'cursor_type_pointer'), onClick: onClick, children: jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "chips__inner", children: [typeof label === 'string' ? (jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { className: "chips__label", size:
|
|
77
|
+
.toLowerCase()), borderTypeClass, sizeClass, alignDirectionClass, alignClass, type && "chips_type_".concat(type), cursorClass, onClick && 'cursor_type_pointer'), style: chipsStyles, onClick: onClick, children: jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "chips__inner", children: [typeof label === 'string' ? (jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { className: "chips__label", size: labelTextSize, textWeight: labelTextWeight, textColor: isActive
|
|
79
78
|
? labelTextActiveColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextActiveColor)
|
|
80
79
|
: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), children: label })) : (jsxRuntime.jsxRuntimeExports.jsx("div", { className: "chips__label", children: label })), children] }) }));
|
|
81
80
|
}
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var Cookies = require('js-cookie');
|
|
7
7
|
var useDeviceTargetClass = require('./hooks/useDeviceTargetClass.js');
|
|
8
|
-
var Button = require('./Button-
|
|
8
|
+
var Button = require('./Button-DH5f_2bV.js');
|
|
9
9
|
var Group = require('./Group-EFTg84wP.js');
|
|
10
10
|
var Text = require('./Text-B0SULA92.js');
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@ var clsx = require('clsx');
|
|
|
7
7
|
var ReactDOM = require('react-dom');
|
|
8
8
|
var floatingUi_dom = require('./floating-ui.dom-ma2MDAMT.js');
|
|
9
9
|
var useDeviceTargetClass = require('./hooks/useDeviceTargetClass.js');
|
|
10
|
-
var Button = require('./Button-
|
|
10
|
+
var Button = require('./Button-DH5f_2bV.js');
|
|
11
11
|
var Icon = require('./Icon-C7ZJyN5o.js');
|
|
12
12
|
var Input = require('./Input-vwyG3XF0.js');
|
|
13
13
|
var Label = require('./Label-C2uLpNrU.js');
|
|
@@ -14086,30 +14086,46 @@ function DatePickerInput(props) {
|
|
|
14086
14086
|
}, [endValue]);
|
|
14087
14087
|
var _a = React.useState(start), startDate = _a[0], setStartDate = _a[1];
|
|
14088
14088
|
var _b = React.useState(end), endDate = _b[0], setEndDate = _b[1];
|
|
14089
|
-
var handleChange = function (_a) {
|
|
14089
|
+
var handleChange = React.useCallback(function (_a) {
|
|
14090
14090
|
var newStartDate = _a[0], newEndDate = _a[1];
|
|
14091
14091
|
onChange && onChange(newStartDate, newEndDate);
|
|
14092
14092
|
setStartDate(newStartDate);
|
|
14093
14093
|
setEndDate(newEndDate);
|
|
14094
|
-
};
|
|
14095
|
-
var renderDayContents = function (day, date) {
|
|
14094
|
+
}, [onChange]);
|
|
14095
|
+
var renderDayContents = React.useCallback(function (day, date) {
|
|
14096
14096
|
return (jsxRuntime.jsxRuntimeExports.jsx(Button.Button, { className: "react-datepicker__day-button", label: date.getDate().toString(), labelTextColor: datePickerProps.dayTextColor, labelTextSize: datePickerProps.dayTextSize, shape: datePickerProps.dayTextShape, size: datePickerProps.daySize }));
|
|
14097
|
-
}
|
|
14098
|
-
|
|
14097
|
+
}, [
|
|
14098
|
+
datePickerProps.daySize,
|
|
14099
|
+
datePickerProps.dayTextColor,
|
|
14100
|
+
datePickerProps.dayTextShape,
|
|
14101
|
+
datePickerProps.dayTextSize,
|
|
14102
|
+
]);
|
|
14103
|
+
var renderCustomHeader = React.useCallback(function (_a) {
|
|
14099
14104
|
var monthDate = _a.monthDate, decreaseMonth = _a.decreaseMonth, increaseMonth = _a.increaseMonth;
|
|
14100
|
-
return (jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "react-datepicker__header--div", children: [datePickerProps.iconLeft && (jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, size: datePickerProps.iconSize, SvgImage: datePickerProps.iconLeft, onClick: decreaseMonth })), jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "react-datepicker__data", children: [jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { className: "react-datepicker__month", size: datePickerProps.monthTextSize, textColor: datePickerProps.monthTextColor, textWeight: datePickerProps.monthTextWeight, children: monthDate.toLocaleString('ru-RU', {
|
|
14101
|
-
|
|
14102
|
-
|
|
14103
|
-
|
|
14104
|
-
|
|
14105
|
-
|
|
14105
|
+
return (jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "react-datepicker__header--div", children: [datePickerProps.iconLeft && (jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, size: datePickerProps.iconSize, SvgImage: datePickerProps.iconLeft, onClick: decreaseMonth })), jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "react-datepicker__data", children: [jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { className: "react-datepicker__month", size: datePickerProps.monthTextSize, textColor: datePickerProps.monthTextColor, textWeight: datePickerProps.monthTextWeight, children: monthDate.toLocaleString('ru-RU', { month: 'long' }) }), jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { className: "react-datepicker__year", size: datePickerProps.yearTextSize, textColor: datePickerProps.yearTextColor, textWeight: datePickerProps.yearTextWeight, children: monthDate.toLocaleString('ru-RU', { year: 'numeric' }) })] }), datePickerProps.iconRight && (jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, size: datePickerProps.iconSize, SvgImage: datePickerProps.iconRight, onClick: increaseMonth }))] }));
|
|
14106
|
+
}, [
|
|
14107
|
+
datePickerProps.iconFill,
|
|
14108
|
+
datePickerProps.iconFillHover,
|
|
14109
|
+
datePickerProps.iconFillSize,
|
|
14110
|
+
datePickerProps.iconItemFill,
|
|
14111
|
+
datePickerProps.iconLeft,
|
|
14112
|
+
datePickerProps.iconRight,
|
|
14113
|
+
datePickerProps.iconShape,
|
|
14114
|
+
datePickerProps.iconSize,
|
|
14115
|
+
datePickerProps.monthTextColor,
|
|
14116
|
+
datePickerProps.monthTextSize,
|
|
14117
|
+
datePickerProps.monthTextWeight,
|
|
14118
|
+
datePickerProps.yearTextColor,
|
|
14119
|
+
datePickerProps.yearTextSize,
|
|
14120
|
+
datePickerProps.yearTextWeight,
|
|
14121
|
+
]);
|
|
14106
14122
|
React.useEffect(function () {
|
|
14107
14123
|
setStartDate(start);
|
|
14108
14124
|
}, [start]);
|
|
14109
14125
|
React.useEffect(function () {
|
|
14110
14126
|
setEndDate(end);
|
|
14111
14127
|
}, [end]);
|
|
14112
|
-
return (jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx__default.default(className, 'datepicker', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.monthsShown) && 'datepicker_type_multiple-months', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.customTimeInput) && 'datepicker_type_button', widthClass), children: jsxRuntime.jsxRuntimeExports.jsx(DatePicker, _tslib.__assign({
|
|
14128
|
+
return (jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx__default.default(className, 'datepicker', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.monthsShown) && 'datepicker_type_multiple-months', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.customTimeInput) && 'datepicker_type_button', widthClass), children: jsxRuntime.jsxRuntimeExports.jsx(DatePicker, _tslib.__assign({ ref: datepickerRef, endDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectsRange) ? endDate : undefined, locale: ru, minDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.disablePastDays) ? new Date() : undefined, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: startDate, startDate: startDate, customInput: jsxRuntime.jsxRuntimeExports.jsx(DatePickerCustomInput, { labelTextSize: labelTextSize, clearIcon: clearIcon, clearIconFill: clearIconFill, clearIconFillHover: clearIconFillHover, clearIconFillSize: clearIconFillSize, clearIconItemFill: clearIconItemFill, clearIconItemFillHover: clearIconItemFillHover, clearIconShape: clearIconShape, clearIconSize: clearIconSize, clearIconSrc: clearIconSrc, clearLabel: clearLabel, clearLabelTextColor: clearLabelTextColor, clearLabelTextColorHover: clearLabelTextColorHover, clearLabelTextSize: clearLabelTextSize, datepickerRef: datepickerRef, inputIcon: datePickerProps.inputIcon, inputIconFill: datePickerProps.inputIconFill, inputIconFillHover: datePickerProps.inputIconFillHover, inputIconFillSize: datePickerProps.inputIconFillSize, inputIconItemFill: datePickerProps.inputIconItemFill, inputIconShape: datePickerProps.inputIconShape, inputIconSize: datePickerProps.inputIconSize, inputIconSrc: datePickerProps.inputIconSrc, inputProps: inputProps, isClearable: datePickerProps.isClearable }), onChange: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectsRange) ? handleChange : onChange }, datePickerProps, {
|
|
14113
14129
|
// Important for use custom clear button
|
|
14114
14130
|
isClearable: false })) }));
|
|
14115
14131
|
}
|
|
@@ -6,7 +6,7 @@ var clsx = require('clsx');
|
|
|
6
6
|
var ReactDOM = require('react-dom');
|
|
7
7
|
var useDeviceTargetClass = require('./hooks/useDeviceTargetClass.js');
|
|
8
8
|
var useStyles = require('./hooks/useStyles.js');
|
|
9
|
-
var Overlay = require('./Overlay-
|
|
9
|
+
var Overlay = require('./Overlay-CkN2X1BM.js');
|
|
10
10
|
var Loader = require('./Loader-C2D6fJk1.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -37,12 +37,12 @@ var getOrCreateModalElement = function (modalQuerySelector, className) {
|
|
|
37
37
|
};
|
|
38
38
|
// Modal component that is an abstraction around the portal API.
|
|
39
39
|
var Modal = React__default.default.forwardRef(function Modal(props, ref) {
|
|
40
|
-
var
|
|
40
|
+
var id = props.id, children = props.children, _a = props.isCloseOnBlur, isCloseOnBlur = _a === void 0 ? true : _a, _b = props.isOpen, initialIsOpen = _b === void 0 ? false : _b, _c = props.isOverlay, isOverlay = _c === void 0 ? true : _c, _d = props.isScrollOnOpen, isScrollOnOpen = _d === void 0 ? true : _d, _e = props.isSetFocusOnOpen, isSetFocusOnOpen = _e === void 0 ? true : _e, className = props.className, closeButton = props.closeButton, contentClassName = props.contentClassName, _f = props.modalQuerySelector, modalQuerySelector = _f === void 0 ? '#modal-global' : _f, overlayClassName = props.overlayClassName, overlayFill = props.overlayFill, overlayFillGradient = props.overlayFillGradient, overlayOpacity = props.overlayOpacity, onClickOverlay = props.onClickOverlay, onCloseModal = props.onCloseModal, onOpenModal = props.onOpenModal;
|
|
41
41
|
// Query DOM element
|
|
42
|
-
var
|
|
43
|
-
var
|
|
42
|
+
var _g = React.useState(null), modalElement = _g[0], setModalElement = _g[1];
|
|
43
|
+
var _h = React.useState(initialIsOpen), isOpen = _h[0], setIsOpen = _h[1];
|
|
44
44
|
var modalContentRef = React.useRef(null);
|
|
45
|
-
|
|
45
|
+
// const modalOverlayRef = useRef(null)
|
|
46
46
|
var addModalProps = React.useCallback(function (element) {
|
|
47
47
|
// Change class need in "useEffect"
|
|
48
48
|
if (isOpen) {
|
|
@@ -91,18 +91,18 @@ var Modal = React__default.default.forwardRef(function Modal(props, ref) {
|
|
|
91
91
|
}, [onOpenModal]);
|
|
92
92
|
// Hide modal and unmount children content
|
|
93
93
|
var closeModal = React.useCallback(function (event) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
if (event) {
|
|
95
|
+
// prettier-ignore
|
|
96
|
+
var hasRelatedTarget = (event.relatedTarget &&
|
|
97
|
+
modalElement &&
|
|
98
|
+
modalElement.contains(event.relatedTarget));
|
|
99
|
+
if (hasRelatedTarget) {
|
|
100
|
+
return event;
|
|
101
|
+
}
|
|
100
102
|
}
|
|
101
103
|
setIsOpen(false);
|
|
102
104
|
// Callback
|
|
103
|
-
|
|
104
|
-
onCloseModal();
|
|
105
|
-
}
|
|
105
|
+
onCloseModal && onCloseModal();
|
|
106
106
|
}, [modalElement, onCloseModal]);
|
|
107
107
|
React.useEffect(function () {
|
|
108
108
|
if (!modalElement) {
|
|
@@ -155,19 +155,12 @@ var Modal = React__default.default.forwardRef(function Modal(props, ref) {
|
|
|
155
155
|
return (modalElement &&
|
|
156
156
|
ReactDOM__default.default.createPortal(
|
|
157
157
|
// Any valid React child: JSX, strings, arrays, etc.
|
|
158
|
-
isOpen ? (jsxRuntime.jsxRuntimeExports.jsxs(React__default.default.Fragment, { children: [jsxRuntime.jsxRuntimeExports.jsxs("div", { className: clsx__default.default('modal-content', contentClassName, fillClass, shapeClass, borderColorClass, borderWidthClass, borderTypeClass, elevationClass),
|
|
159
|
-
//
|
|
160
|
-
|
|
158
|
+
isOpen ? (jsxRuntime.jsxRuntimeExports.jsxs(React__default.default.Fragment, { children: [jsxRuntime.jsxRuntimeExports.jsxs("div", { className: clsx__default.default('modal-content', contentClassName, fillClass, shapeClass, borderColorClass, borderWidthClass, borderTypeClass, elevationClass), ref: modalContentRef, id: id, style: modalStyles, tabIndex: 0, onBlur: isCloseOnBlur ? closeModal : undefined, children: [closeButton && (jsxRuntime.jsxRuntimeExports.jsx("div", { className: "modal-content__close", onClick: closeModal, children: closeButton })), jsxRuntime.jsxRuntimeExports.jsx("div", { className: "modal-content__wrapper", children: children })] }), jsxRuntime.jsxRuntimeExports.jsx(Overlay.Overlay, { className: clsx__default.default('modal__overlay', 'overlay_type_modal', overlayClassName),
|
|
159
|
+
// ref={modalOverlayRef}
|
|
160
|
+
fill: overlayFill, opacity: overlayOpacity, fillGradient: overlayFillGradient, isOverlay: isOverlay, onClick: onClickOverlay })] })) : null,
|
|
161
161
|
// A DOM element
|
|
162
162
|
modalElement));
|
|
163
163
|
});
|
|
164
|
-
Modal.defaultProps = {
|
|
165
|
-
isOverlay: true,
|
|
166
|
-
isOpen: false,
|
|
167
|
-
isScrollOnOpen: true,
|
|
168
|
-
isSetFocusOnOpen: true,
|
|
169
|
-
modalQuerySelector: '#modal-global',
|
|
170
|
-
};
|
|
171
164
|
|
|
172
165
|
function ModalLoader(props) {
|
|
173
166
|
return (jsxRuntime.jsxRuntimeExports.jsx("div", { className: "modal-loading", children: jsxRuntime.jsxRuntimeExports.jsx("div", { className: "modal-loading__inner", children: jsxRuntime.jsxRuntimeExports.jsx(Loader.Loader, {}) }) }));
|
|
@@ -10,7 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
10
10
|
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
11
11
|
|
|
12
12
|
function Overlay(props) {
|
|
13
|
-
var className = props.className,
|
|
13
|
+
var isOverlay = props.isOverlay, className = props.className, type = props.type, onClick = props.onClick;
|
|
14
14
|
var fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
15
15
|
prefix: 'fill_',
|
|
16
16
|
propsKey: 'fill',
|
|
@@ -25,7 +25,7 @@ function Overlay(props) {
|
|
|
25
25
|
});
|
|
26
26
|
// @ts-expect-error
|
|
27
27
|
var overlayStyles = useStyles.useStyles(props).styles;
|
|
28
|
-
return (jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx__default.default(className, 'overlay', opacityClass, isOverlay && 'overlay_state_visible', type && "".concat(className, "_type_").concat(type), fillClass, fillGradientClass), style: overlayStyles, children: "\u00A0" }));
|
|
28
|
+
return (jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx__default.default(className, 'overlay', opacityClass, isOverlay && 'overlay_state_visible', type && "".concat(className, "_type_").concat(type), fillClass, fillGradientClass), style: overlayStyles, onClick: onClick, children: "\u00A0" }));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
exports.Overlay = Overlay;
|
|
@@ -6,7 +6,7 @@ var clsx = require('clsx');
|
|
|
6
6
|
var SVG = require('react-inlinesvg');
|
|
7
7
|
var useDeviceTargetClass = require('./hooks/useDeviceTargetClass.js');
|
|
8
8
|
var useStyles = require('./hooks/useStyles.js');
|
|
9
|
-
var Button = require('./Button-
|
|
9
|
+
var Button = require('./Button-DH5f_2bV.js');
|
|
10
10
|
var Group = require('./Group-EFTg84wP.js');
|
|
11
11
|
var Text = require('./Text-B0SULA92.js');
|
|
12
12
|
var Title = require('./Title-Ckp30YSI.js');
|
|
@@ -17,7 +17,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
17
17
|
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
18
18
|
|
|
19
19
|
function FormField(props) {
|
|
20
|
-
var id = props.id, children = props.children, afterItem = props.afterItem, dataTestId = props.dataTestId, beforeItem = props.beforeItem, dividerWidth = props.dividerWidth, dividerDirection = props.dividerDirection, set = props.set, className = props.className, dividerSize = props.dividerSize, dividerFill = props.dividerFill, descSize = props.descSize, descTextWeight = props.descTextWeight, descTextColor = props.descTextColor, desc = props.desc, label = props.label,
|
|
20
|
+
var id = props.id, children = props.children, afterItem = props.afterItem, dataTestId = props.dataTestId, beforeItem = props.beforeItem, dividerWidth = props.dividerWidth, dividerDirection = props.dividerDirection, set = props.set, className = props.className, dividerSize = props.dividerSize, dividerFill = props.dividerFill, descSize = props.descSize, descTextWeight = props.descTextWeight, descTextColor = props.descTextColor, desc = props.desc, label = props.label, labelTextSize = props.labelTextSize, labelTextWeight = props.labelTextWeight, labelTextColor = props.labelTextColor, clearIconFill = props.clearIconFill, clearIcon = props.clearIcon, clearIconSize = props.clearIconSize, messageSize = props.messageSize, messageTextWeight = props.messageTextWeight, messageTextColor = props.messageTextColor, message = props.message;
|
|
21
21
|
var sizeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
22
22
|
prefix: 'form-field_size_',
|
|
23
23
|
propsKey: 'size',
|
|
@@ -44,7 +44,7 @@ function FormField(props) {
|
|
|
44
44
|
});
|
|
45
45
|
// @ts-expect-error
|
|
46
46
|
var formFieldStyles = useStyles.useStyles(props).styles;
|
|
47
|
-
return (jsxRuntime.jsxRuntimeExports.jsxs("div", { className: clsx__default.default(className, 'form-field', set && "form-field_set_".concat(set), sizeClass, fillClass, shapeClass, directionClass), "data-test-id": dataTestId, style: formFieldStyles, children: [label && (jsxRuntime.jsxRuntimeExports.jsx("label", { htmlFor: id, className: "form-field__label", children: jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { size:
|
|
47
|
+
return (jsxRuntime.jsxRuntimeExports.jsxs("div", { className: clsx__default.default(className, 'form-field', set && "form-field_set_".concat(set), sizeClass, fillClass, shapeClass, directionClass), "data-test-id": dataTestId, style: formFieldStyles, children: [label && (jsxRuntime.jsxRuntimeExports.jsx("label", { htmlFor: id, className: "form-field__label", children: jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { size: labelTextSize, textWeight: labelTextWeight, textColor: labelTextColor, children: label }) })), desc && (jsxRuntime.jsxRuntimeExports.jsx("div", { className: "form-field__desc", children: jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { size: descSize, textWeight: descTextWeight, textColor: descTextColor, children: desc }) })), jsxRuntime.jsxRuntimeExports.jsxs("div", { className: clsx__default.default('form-field__item', inputFillClass, inputShapeClass), children: [jsxRuntime.jsxRuntimeExports.jsxs("div", { className: clsx__default.default('form-field__item-wrapper'), children: [beforeItem, children, clearIcon && jsxRuntime.jsxRuntimeExports.jsx(Icon.Icon, { fill: clearIconFill, SvgImage: clearIcon, size: clearIconSize }), afterItem] }), jsxRuntime.jsxRuntimeExports.jsx(Divider.Divider, { className: "form-field__item-divider", direction: dividerDirection, fill: dividerFill, size: dividerSize, width: dividerWidth })] }), message && (jsxRuntime.jsxRuntimeExports.jsx("div", { className: "form-field__message", children: jsxRuntime.jsxRuntimeExports.jsx(Text.Text, { size: messageSize, textWeight: messageTextWeight, textColor: messageTextColor, children: message }) }))] }));
|
|
48
48
|
}
|
|
49
49
|
FormField.defaultProps = {
|
|
50
50
|
dividerWidth: 'fill',
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
|
|
3
|
-
import { captionPositionPropsType,
|
|
3
|
+
import { captionPositionPropsType, tFillGradientProps, tFillProps } from '../../types';
|
|
4
4
|
export interface ICaptionThemeColor {
|
|
5
5
|
fill: tFillProps;
|
|
6
6
|
fillMobile: tFillProps;
|
|
7
7
|
fillTablet: tFillProps;
|
|
8
8
|
fillDesktop: tFillProps;
|
|
9
|
-
fillGradient:
|
|
10
|
-
fillGradientMobile:
|
|
11
|
-
fillGradientTablet:
|
|
12
|
-
fillGradientDesktop:
|
|
9
|
+
fillGradient: tFillGradientProps;
|
|
10
|
+
fillGradientMobile: tFillGradientProps;
|
|
11
|
+
fillGradientTablet: tFillGradientProps;
|
|
12
|
+
fillGradientDesktop: tFillGradientProps;
|
|
13
13
|
position: captionPositionPropsType;
|
|
14
14
|
positionMobile: captionPositionPropsType;
|
|
15
15
|
positionTablet: captionPositionPropsType;
|