@itcase/ui 1.8.0 → 1.8.1
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-DJxd2_t4.js → Button-CWPTzaG2.js} +1 -1
- package/dist/{Button-K5n8BI_w.js → Button-DHOZJDHv.js} +1 -1
- package/dist/{DropdownItem-f29l8dds.js → DropdownItem-Cl1pYnVf.js} +4 -4
- package/dist/{DropdownItem-CdAS1E-G.js → DropdownItem-_bKQxzEZ.js} +4 -4
- package/dist/{Input-v52BiIsb.js → Input-BH6rNRqZ.js} +2 -2
- package/dist/{Input-C_HeI9UK.js → Input-BRhHPsGM.js} +2 -2
- package/dist/{Loader-CZVsMYl6.js → Loader-CjT6-r3I.js} +1 -1
- package/dist/{Loader-BnhUh-g6.js → Loader-Dquhwxz4.js} +1 -1
- package/dist/cjs/components/Button.js +2 -2
- package/dist/cjs/components/Choice.js +54 -44
- package/dist/cjs/components/CookiesWarning.js +2 -2
- package/dist/cjs/components/DadataHintField.js +1 -1
- package/dist/cjs/components/DatePicker.js +13 -8
- package/dist/cjs/components/Dropdown.js +1 -1
- package/dist/cjs/components/Grid.js +5 -5
- package/dist/cjs/components/Input.js +1 -1
- package/dist/cjs/components/Loader.js +1 -1
- package/dist/cjs/components/Modal.js +1 -1
- package/dist/cjs/components/Pagination.js +15 -47
- package/dist/cjs/components/Response.js +2 -2
- package/dist/cjs/context/Notifications.js +3 -1
- package/dist/components/Button.js +2 -2
- package/dist/components/Choice.js +55 -45
- package/dist/components/CookiesWarning.js +2 -2
- package/dist/components/DadataHintField.js +1 -1
- package/dist/components/DatePicker.js +13 -8
- package/dist/components/Dropdown.js +1 -1
- package/dist/components/Grid.js +5 -5
- package/dist/components/Input.js +1 -1
- package/dist/components/Loader.js +1 -1
- package/dist/components/Modal.js +1 -1
- package/dist/components/Pagination.js +15 -47
- package/dist/components/Response.js +2 -2
- package/dist/context/Notifications.js +3 -1
- package/dist/css/components/Choice/Choice.css +32 -40
- package/dist/css/components/Choice/css/__item/choice__item.css +5 -16
- package/dist/css/components/Choice/css/__item/choice__item_shape.css +11 -0
- package/dist/css/components/DatePicker/DatePicker.css +3 -6
- package/dist/css/components/Dropdown/Dropdown.css +16 -25
- package/dist/css/components/Grid/Grid.css +50 -8
- package/dist/css/components/Grid/css/__item/grid__item_column.css +13 -1
- package/dist/css/components/Grid/css/__item/grid__item_justify-self.css +4 -1
- package/dist/css/components/Grid/css/__item/grid__item_row.css +2 -1
- package/dist/css/components/Input/Input.css +3 -0
- package/dist/css/components/Pagination/Pagination.css +10 -8
- package/dist/css/components/Pagination/css/__item/pagination__item.css +4 -5
- package/dist/css/styles/fill/fill_active.css +14 -0
- package/dist/css/styles/fill/fill_active_hover.css +50 -0
- package/dist/css/styles/fill/fill_hover.css +33 -0
- package/dist/types/components/Choice/appearance/choiceAccent.d.ts +11 -0
- package/dist/types/components/Choice/appearance/choiceSurface.d.ts +22 -0
- package/dist/types/components/DatePicker/DatePicker.appearance.d.ts +29 -2
- package/dist/types/components/DatePicker/appearance/datePickerSurface.d.ts +30 -0
- package/dist/types/components/Pagination/appearance/paginationSurface.d.ts +34 -0
- package/dist/types/context/Notifications.d.ts +3 -2
- package/package.json +16 -16
|
@@ -6,7 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var Icon = require('./Icon-D_BDlSSb.js');
|
|
8
8
|
var Link = require('./Link-CZ8o5lGW.js');
|
|
9
|
-
var Loader = require('./Loader-
|
|
9
|
+
var Loader = require('./Loader-CjT6-r3I.js');
|
|
10
10
|
var Text = require('./Text-DwIx33-P.js');
|
|
11
11
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
12
12
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { I as Icon } from './Icon-BF7i3XdQ.js';
|
|
6
6
|
import { a as LinkWrapper } from './Link-Cn7hiWmM.js';
|
|
7
|
-
import { L as Loader } from './Loader-
|
|
7
|
+
import { L as Loader } from './Loader-Dquhwxz4.js';
|
|
8
8
|
import { T as Text } from './Text-aaWArShm.js';
|
|
9
9
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
10
10
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
@@ -8,12 +8,12 @@ import { D as Divider } from './Divider-CUFKsm-9.js';
|
|
|
8
8
|
import { T as Text } from './Text-aaWArShm.js';
|
|
9
9
|
|
|
10
10
|
function Dropdown(props) {
|
|
11
|
-
var className = props.className, _a = props.animationClose, animationClose = _a === void 0 ? 'dropdown_animation_close' : _a, _b = props.animationOpen, animationOpen = _b === void 0 ? 'dropdown_animation_open' : _b, before = props.before, after = props.after, isOpen = props.isOpen,
|
|
11
|
+
var className = props.className, _a = props.animationClose, animationClose = _a === void 0 ? 'dropdown_animation_close' : _a, _b = props.animationOpen, animationOpen = _b === void 0 ? 'dropdown_animation_open' : _b, before = props.before, after = props.after, isOpen = props.isOpen, setIsOpen = props.setIsOpen, children = props.children;
|
|
12
12
|
var dropdownRef = useRef(null);
|
|
13
13
|
// const [isOpen, setIsOpen] = useState(false)
|
|
14
|
-
var
|
|
14
|
+
var _c = useState({
|
|
15
15
|
className: '',
|
|
16
|
-
}), animationState =
|
|
16
|
+
}), animationState = _c[0], setAnimationState = _c[1];
|
|
17
17
|
var onAnimationEnd = useCallback(function () {
|
|
18
18
|
// When component is change his visibility(display) in DOM,
|
|
19
19
|
// animation of close can run unnecessary on showing element.
|
|
@@ -57,7 +57,7 @@ function Dropdown(props) {
|
|
|
57
57
|
var propsGenerator = useDevicePropsGenerator(props);
|
|
58
58
|
var alignmentClass = propsGenerator.alignmentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, elevationClass = propsGenerator.elevationClass, shapeClass = propsGenerator.shapeClass;
|
|
59
59
|
var styles = useStyles(props).styles;
|
|
60
|
-
return (jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass),
|
|
60
|
+
return (jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), shapeClass && "dropdown_shape_".concat(shapeClass), elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, children && (jsx("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
|
|
61
61
|
// Add "onAnimationEnd" only for wrapper for ignore dropdown button
|
|
62
62
|
onAnimationEnd: onAnimationEnd, children: children })), after] }));
|
|
63
63
|
}
|
|
@@ -10,12 +10,12 @@ var Divider = require('./Divider-BQIfjvPR.js');
|
|
|
10
10
|
var Text = require('./Text-DwIx33-P.js');
|
|
11
11
|
|
|
12
12
|
function Dropdown(props) {
|
|
13
|
-
var className = props.className, _a = props.animationClose, animationClose = _a === void 0 ? 'dropdown_animation_close' : _a, _b = props.animationOpen, animationOpen = _b === void 0 ? 'dropdown_animation_open' : _b, before = props.before, after = props.after, isOpen = props.isOpen,
|
|
13
|
+
var className = props.className, _a = props.animationClose, animationClose = _a === void 0 ? 'dropdown_animation_close' : _a, _b = props.animationOpen, animationOpen = _b === void 0 ? 'dropdown_animation_open' : _b, before = props.before, after = props.after, isOpen = props.isOpen, setIsOpen = props.setIsOpen, children = props.children;
|
|
14
14
|
var dropdownRef = React.useRef(null);
|
|
15
15
|
// const [isOpen, setIsOpen] = useState(false)
|
|
16
|
-
var
|
|
16
|
+
var _c = React.useState({
|
|
17
17
|
className: '',
|
|
18
|
-
}), animationState =
|
|
18
|
+
}), animationState = _c[0], setAnimationState = _c[1];
|
|
19
19
|
var onAnimationEnd = React.useCallback(function () {
|
|
20
20
|
// When component is change his visibility(display) in DOM,
|
|
21
21
|
// animation of close can run unnecessary on showing element.
|
|
@@ -59,7 +59,7 @@ function Dropdown(props) {
|
|
|
59
59
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
60
60
|
var alignmentClass = propsGenerator.alignmentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, elevationClass = propsGenerator.elevationClass, shapeClass = propsGenerator.shapeClass;
|
|
61
61
|
var styles = useStyles.useStyles(props).styles;
|
|
62
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass),
|
|
62
|
+
return (jsxRuntime.jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), shapeClass && "dropdown_shape_".concat(shapeClass), elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, children && (jsxRuntime.jsx("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
|
|
63
63
|
// Add "onAnimationEnd" only for wrapper for ignore dropdown button
|
|
64
64
|
onAnimationEnd: onAnimationEnd, children: children })), after] }));
|
|
65
65
|
}
|
|
@@ -77,13 +77,13 @@ var Input = React.forwardRef(function Input(props, ref) {
|
|
|
77
77
|
}, {});
|
|
78
78
|
// const stateConfig = state && inputConfig.state && inputConfig.state[state]
|
|
79
79
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
80
|
-
var fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, borderColorClass = propsGenerator.borderColorClass, borderColorDisabledClass = propsGenerator.borderColorDisabledClass, borderWidthClass = propsGenerator.borderWidthClass, borderWidthDisabledClass = propsGenerator.borderWidthDisabledClass, textColorClass = propsGenerator.textColorClass, textColorDisabledClass = propsGenerator.textColorDisabledClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, placeholderTextColorDisabledClass = propsGenerator.placeholderTextColorDisabledClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
80
|
+
var fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorDisabledClass = propsGenerator.borderColorDisabledClass, borderWidthClass = propsGenerator.borderWidthClass, borderWidthDisabledClass = propsGenerator.borderWidthDisabledClass, textColorClass = propsGenerator.textColorClass, textColorDisabledClass = propsGenerator.textColorDisabledClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, placeholderTextColorDisabledClass = propsGenerator.placeholderTextColorDisabledClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
81
81
|
return (jsx("input", { id: String(id), className: clsx(className, 'input', type === 'number' && 'input_type_number', (textSizeClass || textColorClass || textWeightClass) && 'text', caretClass && "caret-color_".concat(caretClass), shapeClass && "input_shape_".concat(shapeClass), textSizeClass && "text_size_".concat(textSizeClass), textWeightClass && "text-weight_".concat(textWeightClass), widthClass && "width_".concat(widthClass), sizeClass && "input_size_".concat(sizeClass), textColorClass && "text-color_".concat(textColorClass), !isDisabled
|
|
82
82
|
? fillClass && "fill_".concat(fillClass)
|
|
83
83
|
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), !isDisabled
|
|
84
84
|
? borderWidthClass && "border-width_".concat(borderWidthClass)
|
|
85
85
|
: borderWidthDisabledClass &&
|
|
86
|
-
"border-width_disabled_".concat(borderWidthDisabledClass), !isDisabled
|
|
86
|
+
"border-width_disabled_".concat(borderWidthDisabledClass), !isDisabled ? fillHoverClass && "fill_hover_".concat(fillHoverClass) : null, !isDisabled
|
|
87
87
|
? borderColorClass && "border-color_".concat(borderColorClass)
|
|
88
88
|
: borderColorDisabledClass &&
|
|
89
89
|
"border-color_disabled_".concat(borderColorDisabledClass), !isDisabled
|
|
@@ -79,13 +79,13 @@ var Input = React.forwardRef(function Input(props, ref) {
|
|
|
79
79
|
}, {});
|
|
80
80
|
// const stateConfig = state && inputConfig.state && inputConfig.state[state]
|
|
81
81
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
82
|
-
var fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, borderColorClass = propsGenerator.borderColorClass, borderColorDisabledClass = propsGenerator.borderColorDisabledClass, borderWidthClass = propsGenerator.borderWidthClass, borderWidthDisabledClass = propsGenerator.borderWidthDisabledClass, textColorClass = propsGenerator.textColorClass, textColorDisabledClass = propsGenerator.textColorDisabledClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, placeholderTextColorDisabledClass = propsGenerator.placeholderTextColorDisabledClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
82
|
+
var fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorDisabledClass = propsGenerator.borderColorDisabledClass, borderWidthClass = propsGenerator.borderWidthClass, borderWidthDisabledClass = propsGenerator.borderWidthDisabledClass, textColorClass = propsGenerator.textColorClass, textColorDisabledClass = propsGenerator.textColorDisabledClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, placeholderTextColorDisabledClass = propsGenerator.placeholderTextColorDisabledClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
83
83
|
return (jsxRuntime.jsx("input", { id: String(id), className: clsx(className, 'input', type === 'number' && 'input_type_number', (textSizeClass || textColorClass || textWeightClass) && 'text', caretClass && "caret-color_".concat(caretClass), shapeClass && "input_shape_".concat(shapeClass), textSizeClass && "text_size_".concat(textSizeClass), textWeightClass && "text-weight_".concat(textWeightClass), widthClass && "width_".concat(widthClass), sizeClass && "input_size_".concat(sizeClass), textColorClass && "text-color_".concat(textColorClass), !isDisabled
|
|
84
84
|
? fillClass && "fill_".concat(fillClass)
|
|
85
85
|
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), !isDisabled
|
|
86
86
|
? borderWidthClass && "border-width_".concat(borderWidthClass)
|
|
87
87
|
: borderWidthDisabledClass &&
|
|
88
|
-
"border-width_disabled_".concat(borderWidthDisabledClass), !isDisabled
|
|
88
|
+
"border-width_disabled_".concat(borderWidthDisabledClass), !isDisabled ? fillHoverClass && "fill_hover_".concat(fillHoverClass) : null, !isDisabled
|
|
89
89
|
? borderColorClass && "border-color_".concat(borderColorClass)
|
|
90
90
|
: borderColorDisabledClass &&
|
|
91
91
|
"border-color_disabled_".concat(borderColorDisabledClass), !isDisabled
|
|
@@ -52,7 +52,7 @@ var loaderConfig = {
|
|
|
52
52
|
},
|
|
53
53
|
};
|
|
54
54
|
function Loader(props) {
|
|
55
|
-
var className = props.className,
|
|
55
|
+
var className = props.className, _a = props.type, type = _a === void 0 ? 'simple' : _a, appearance = props.appearance, text = props.text, isSkeleton = props.isSkeleton, children = props.children;
|
|
56
56
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
57
57
|
var _a;
|
|
58
58
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = loaderConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
@@ -50,7 +50,7 @@ var loaderConfig = {
|
|
|
50
50
|
},
|
|
51
51
|
};
|
|
52
52
|
function Loader(props) {
|
|
53
|
-
var className = props.className,
|
|
53
|
+
var className = props.className, _a = props.type, type = _a === void 0 ? 'simple' : _a, appearance = props.appearance, text = props.text, isSkeleton = props.isSkeleton, children = props.children;
|
|
54
54
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
55
55
|
var _a;
|
|
56
56
|
return (__assign(__assign({}, resultConfig), (_a = loaderConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Button = require('../../Button-
|
|
3
|
+
var Button = require('../../Button-CWPTzaG2.js');
|
|
4
4
|
require('../../tslib.es6-CCZ3TN_7.js');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
@@ -25,7 +25,7 @@ require('../../Link-CZ8o5lGW.js');
|
|
|
25
25
|
require('../../Tooltip-hznDyLwa.js');
|
|
26
26
|
require('../../Text-DwIx33-P.js');
|
|
27
27
|
require('../../Title-ByfOyy-n.js');
|
|
28
|
-
require('../../Loader-
|
|
28
|
+
require('../../Loader-CjT6-r3I.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -7,7 +7,7 @@ var clsx = require('clsx');
|
|
|
7
7
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
8
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
9
9
|
var Icon = require('../../Icon-D_BDlSSb.js');
|
|
10
|
-
var Loader = require('../../Loader-
|
|
10
|
+
var Loader = require('../../Loader-CjT6-r3I.js');
|
|
11
11
|
var Text = require('../../Text-DwIx33-P.js');
|
|
12
12
|
require('lodash/camelCase');
|
|
13
13
|
require('lodash/castArray');
|
|
@@ -26,30 +26,41 @@ require('../../Link-CZ8o5lGW.js');
|
|
|
26
26
|
require('../../Tooltip-hznDyLwa.js');
|
|
27
27
|
require('../../Title-ByfOyy-n.js');
|
|
28
28
|
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
size: 'normal',
|
|
29
|
+
var choiceAppearanceAccent = {
|
|
30
|
+
accentPrimary: {
|
|
32
31
|
fill: 'surfacePrimary',
|
|
33
32
|
fillActive: 'accentPrimary',
|
|
34
33
|
labelTextActiveColor: 'accentTextPrimary',
|
|
35
34
|
labelTextColor: 'surfaceTextPrimary',
|
|
36
35
|
labelTextSize: 's',
|
|
37
36
|
borderColor: 'surfaceBorderSecondary',
|
|
38
|
-
shape: 'rounded',
|
|
39
37
|
},
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var choiceAppearanceSurface = {
|
|
41
|
+
surfacePrimary: {
|
|
42
42
|
fill: 'surfacePrimary',
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
fillItem: 'surfaceItemInverse',
|
|
44
|
+
fillItemActive: 'surfaceItemSecondary',
|
|
45
|
+
fillItemActiveHover: 'surfaceItemTertiary',
|
|
46
|
+
fillItemHover: 'surfaceItemSecondary',
|
|
47
|
+
labelTextActiveColor: 'surfaceTextPrimary',
|
|
48
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
49
|
+
labelTextSize: 'm',
|
|
50
|
+
},
|
|
51
|
+
surfaceSecondary: {
|
|
52
|
+
fill: 'surfaceSecondary',
|
|
53
|
+
fillItem: 'surfacePrimary',
|
|
54
|
+
fillItemActive: 'surfacePrimary',
|
|
55
|
+
fillItemHover: 'surfacePrimary',
|
|
45
56
|
labelTextActiveColor: 'surfaceTextPrimary',
|
|
46
57
|
labelTextColor: 'surfaceTextPrimary',
|
|
47
58
|
labelTextSize: 'm',
|
|
48
|
-
borderColor: 'surfaceBorderTertiary',
|
|
49
|
-
shape: 'rounded',
|
|
50
59
|
},
|
|
51
60
|
};
|
|
52
61
|
|
|
62
|
+
var choiceAppearance = tslib_es6.__assign(tslib_es6.__assign({}, choiceAppearanceAccent), choiceAppearanceSurface);
|
|
63
|
+
|
|
53
64
|
var choiceConfig = {
|
|
54
65
|
appearance: choiceAppearance,
|
|
55
66
|
setAppearance: function (appearanceConfig) {
|
|
@@ -57,7 +68,7 @@ var choiceConfig = {
|
|
|
57
68
|
},
|
|
58
69
|
};
|
|
59
70
|
function Choice(props) {
|
|
60
|
-
var id = props.id, className = props.className, type = props.type, name = props.name, appearance = props.appearance,
|
|
71
|
+
var id = props.id, className = props.className, type = props.type, name = props.name, appearance = props.appearance, size = props.size, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, _b = props.active, active = _b === void 0 ? { value: undefined } : _b, activeIcon = props.activeIcon, dataTestId = props.dataTestId, dataTour = props.dataTour, icon = props.icon, itemAfter = props.itemAfter, itemBefore = props.itemBefore, _c = props.options, options = _c === void 0 ? [] : _c, before = props.before, after = props.after, _d = props.isCheckbox, isCheckbox = _d === void 0 ? false : _d, _e = props.isLoading, isLoading = _e === void 0 ? false : _e, setActiveSegment = props.setActiveSegment;
|
|
61
72
|
var controlRef = React.useRef(null);
|
|
62
73
|
var optionsRefs = React.useMemo(function () {
|
|
63
74
|
return new Map(options.map(function (item) { return [item.value, React.createRef()]; }));
|
|
@@ -71,39 +82,38 @@ function Choice(props) {
|
|
|
71
82
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = choiceConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
72
83
|
}, {});
|
|
73
84
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
74
|
-
var
|
|
75
|
-
// @ts-expect-error
|
|
85
|
+
var fillClass = propsGenerator.fillClass, fillItemActiveClass = propsGenerator.fillItemActiveClass, fillItemActiveDisabledClass = propsGenerator.fillItemActiveDisabledClass, fillItemActiveHoverClass = propsGenerator.fillItemActiveHoverClass, fillItemClass = propsGenerator.fillItemClass, fillItemDisabledClass = propsGenerator.fillItemDisabledClass, fillItemHoverClass = propsGenerator.fillItemHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveColorDisabled = propsGenerator.labelTextActiveColorDisabled, labelTextColor = propsGenerator.labelTextColor, labelTextColorDisabled = propsGenerator.labelTextColorDisabled, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconFillDisabled = propsGenerator.iconFillDisabled, activeIconItemFill = propsGenerator.activeIconItemFill, iconItemFill = propsGenerator.iconItemFill, iconSize = propsGenerator.iconSize, shapeClass = propsGenerator.shapeClass, shapeItemClass = propsGenerator.shapeItemClass, wrapClass = propsGenerator.wrapClass;
|
|
76
86
|
var styles = useStyles.useStyles(props).styles;
|
|
77
|
-
return (jsxRuntime.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
87
|
+
return (jsxRuntime.jsxs("div", { id: id, className: clsx(className, 'choice', fillClass && "fill_".concat(fillClass), shapeClass && "choice_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), size && "choice_size_".concat(size), type && "choice_type_".concat(type), wrapClass && "choice_wrap_".concat(wrapClass)), "data-testid": dataTestId && "".concat(dataTestId, "Choice"), "data-tour": dataTour, ref: controlRef, style: styles, children: [before && jsxRuntime.jsx("div", { className: "choice__before", children: before }), isLoading ? (jsxRuntime.jsx(Loader.Loader, { width: "fill", height: "fill", fill: "surfacePrimary", itemFill: "surfaceItemAccent" })) : (jsxRuntime.jsx(React.Fragment, { children: options.map(function (item) {
|
|
88
|
+
var isActive = typeof active === 'object'
|
|
89
|
+
? String(item.value) === String(active.value)
|
|
90
|
+
: String(item.value) === String(active);
|
|
91
|
+
return (jsxRuntime.jsxs("div", { className: clsx('choice__item', !isDisabled
|
|
92
|
+
? fillItemClass && "fill_".concat(fillItemClass)
|
|
93
|
+
: fillItemDisabledClass &&
|
|
94
|
+
"fill_disabled_".concat(fillItemDisabledClass), !isDisabled
|
|
95
|
+
? fillItemHoverClass && "fill_hover_".concat(fillItemHoverClass)
|
|
96
|
+
: null, !isActive && isDisabled && 'choice__item_state_disabled', isActive &&
|
|
97
|
+
fillItemActiveHoverClass &&
|
|
98
|
+
"fill_active_hover_".concat(fillItemActiveHoverClass), isActive
|
|
99
|
+
? !isDisabled
|
|
100
|
+
? fillItemActiveClass &&
|
|
101
|
+
"fill_active_".concat(fillItemActiveClass)
|
|
102
|
+
: fillItemActiveDisabledClass &&
|
|
103
|
+
"fill_active_disabled_".concat(fillItemActiveDisabledClass)
|
|
104
|
+
: !isDisabled
|
|
105
|
+
? fillItemClass && "fill_".concat(fillItemClass)
|
|
106
|
+
: fillItemDisabledClass &&
|
|
107
|
+
"fill_disabled_".concat(fillItemDisabledClass), isActive &&
|
|
108
|
+
isDisabled &&
|
|
109
|
+
'choice__item_active_state_disabled', isActive && 'choice__item_active', shapeItemClass && "choice__item_shape_".concat(shapeItemClass)), ref: optionsRefs.get(item.value), children: [jsxRuntime.jsx("input", { id: "".concat(name, "-").concat(item.value), className: "choice__item-radio", type: isCheckbox ? 'checkbox' : 'radio', name: name, disabled: isDisabled, checked: isActive, value: item.value, onChange: function (event) { return onChange(event, item); } }), jsxRuntime.jsxs("label", { className: clsx('choice__item-label', isDisabled && 'choice__item-label_state_disabled'), htmlFor: "".concat(name, "-").concat(item.value), children: [itemBefore, item.label && (jsxRuntime.jsx(Text.Text, { size: labelTextSize, textColor: isActive
|
|
110
|
+
? !isDisabled
|
|
111
|
+
? labelTextActiveColor
|
|
112
|
+
: labelTextActiveColorDisabled
|
|
113
|
+
: !isDisabled
|
|
114
|
+
? labelTextColor
|
|
115
|
+
: labelTextColorDisabled, textWeight: labelTextWeight, children: item.label })), (icon || activeIcon) && (jsxRuntime.jsx(Icon.Icon, { className: "choice__item-icon", iconFillDisabled: isDisabled ? iconFillDisabled : undefined, iconFill: isActive ? activeIconItemFill : iconItemFill, iconSize: iconSize, SvgImage: isActive ? activeIcon : icon })), itemAfter] })] }, "".concat(name, "-").concat(item.value)));
|
|
116
|
+
}) })), after && jsxRuntime.jsx("div", { className: "choice__after", children: after })] }));
|
|
107
117
|
}
|
|
108
118
|
|
|
109
119
|
exports.Choice = Choice;
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var Cookies = require('js-cookie');
|
|
7
7
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
var Button = require('../../Button-
|
|
8
|
+
var Button = require('../../Button-CWPTzaG2.js');
|
|
9
9
|
var Group = require('../../Group-utjnjUDZ.js');
|
|
10
10
|
var Text = require('../../Text-DwIx33-P.js');
|
|
11
11
|
require('../../tslib.es6-CCZ3TN_7.js');
|
|
@@ -27,7 +27,7 @@ require('../hooks/useStyles/styleAttributes.js');
|
|
|
27
27
|
require('../../Link-CZ8o5lGW.js');
|
|
28
28
|
require('../../Tooltip-hznDyLwa.js');
|
|
29
29
|
require('../../Title-ByfOyy-n.js');
|
|
30
|
-
require('../../Loader-
|
|
30
|
+
require('../../Loader-CjT6-r3I.js');
|
|
31
31
|
|
|
32
32
|
function CookiesWarning(props) {
|
|
33
33
|
var className = props.className, _a = props.message, message = _a === void 0 ? 'The site uses cookies to collect technical information, to optimize the design and improvement of the website, and to provide certain functions. By using the website, you agree to the use of «cookies».' : _a, textColor = props.textColor, textSize = props.textSize, buttonFill = props.buttonFill, buttonFillHover = props.buttonFillHover, _b = props.buttonLabel, buttonLabel = _b === void 0 ? 'I agree' : _b, buttonLabelSize = props.buttonLabelSize, buttonLabelTextColor = props.buttonLabelTextColor, buttonShape = props.buttonShape, buttonSize = props.buttonSize, buttonWidth = props.buttonWidth, _c = props.isHideOnScroll, isHideOnScroll = _c === void 0 ? false : _c;
|
|
@@ -5,7 +5,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var reactDadata = require('react-dadata');
|
|
8
|
-
var Input = require('../../Input-
|
|
8
|
+
var Input = require('../../Input-BRhHPsGM.js');
|
|
9
9
|
require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
require('lodash/camelCase');
|
|
11
11
|
require('lodash/castArray');
|
|
@@ -8,9 +8,9 @@ var locale = require('date-fns/locale');
|
|
|
8
8
|
var DatePicker = require('react-datepicker');
|
|
9
9
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
11
|
-
var Button = require('../../Button-
|
|
11
|
+
var Button = require('../../Button-CWPTzaG2.js');
|
|
12
12
|
var Icon = require('../../Icon-D_BDlSSb.js');
|
|
13
|
-
var Input = require('../../Input-
|
|
13
|
+
var Input = require('../../Input-BRhHPsGM.js');
|
|
14
14
|
var Label = require('../../Label-DsNZ-asS.js');
|
|
15
15
|
var Text = require('../../Text-DwIx33-P.js');
|
|
16
16
|
require('lodash/camelCase');
|
|
@@ -26,13 +26,13 @@ require('../utils/setViewportProperty.js');
|
|
|
26
26
|
require('lodash/maxBy');
|
|
27
27
|
require('../hooks/useStyles/styleAttributes.js');
|
|
28
28
|
require('../../Link-CZ8o5lGW.js');
|
|
29
|
-
require('../../Loader-
|
|
29
|
+
require('../../Loader-CjT6-r3I.js');
|
|
30
30
|
require('react-inlinesvg');
|
|
31
31
|
require('../../Tooltip-hznDyLwa.js');
|
|
32
32
|
require('../../Title-ByfOyy-n.js');
|
|
33
33
|
|
|
34
|
-
var
|
|
35
|
-
|
|
34
|
+
var datePickerAppearanceSurface = {
|
|
35
|
+
surfacePrimary: {
|
|
36
36
|
datePicker: {
|
|
37
37
|
daySize: 'xs',
|
|
38
38
|
dayTextColor: 'surfaceTextPrimary',
|
|
@@ -48,18 +48,23 @@ var datePickerAppearance = {
|
|
|
48
48
|
},
|
|
49
49
|
input: {
|
|
50
50
|
width: '200',
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
width: 'fill',
|
|
52
|
+
size: 'm',
|
|
53
|
+
fill: 'surfacePrimary',
|
|
54
|
+
fillHover: 'surfacePrimary',
|
|
55
|
+
borderColor: 'surfaceBorderInverse',
|
|
53
56
|
textColor: 'surfaceTextPrimary',
|
|
54
57
|
textSize: 'm',
|
|
55
58
|
caret: 'surfaceItemPrimary',
|
|
59
|
+
caret: 'secondaryItemSecondary',
|
|
56
60
|
placeholderTextColor: 'surfaceTextSecondary',
|
|
57
61
|
shape: 'rounded',
|
|
58
62
|
},
|
|
59
|
-
shape: 'rounded',
|
|
60
63
|
},
|
|
61
64
|
};
|
|
62
65
|
|
|
66
|
+
var datePickerAppearance = tslib_es6.__assign({}, datePickerAppearanceSurface);
|
|
67
|
+
|
|
63
68
|
var datePickerConfig = {
|
|
64
69
|
appearance: datePickerAppearance,
|
|
65
70
|
setAppearance: function (appearanceConfig) {
|
|
@@ -22,10 +22,10 @@ require('../hooks/useStyles/styleAttributes.js');
|
|
|
22
22
|
function Grid(props) {
|
|
23
23
|
var id = props.id, className = props.className, type = props.type, dataTour = props.dataTour, horizontalResizing = props.horizontalResizing, horizontalScroll = props.horizontalScroll, _a = props.tag, Tag = _a === void 0 ? 'div' : _a, useGridSystem = props.useGridSystem, verticalResizing = props.verticalResizing, before = props.before, after = props.after, onClick = props.onClick, onDoubleClick = props.onDoubleClick, children = props.children;
|
|
24
24
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
25
|
-
var justifyContentClass = propsGenerator.justifyContentClass, justifyItemsClass = propsGenerator.justifyItemsClass, alignContentClass = propsGenerator.alignContentClass, alignItemsClass = propsGenerator.alignItemsClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, columnGapClass = propsGenerator.columnGapClass, columnsClass = propsGenerator.columnsClass, rowGapClass = propsGenerator.rowGapClass, rowsClass = propsGenerator.rowsClass;
|
|
25
|
+
var justifyContentClass = propsGenerator.justifyContentClass, justifyItemsClass = propsGenerator.justifyItemsClass, alignContentClass = propsGenerator.alignContentClass, alignItemsClass = propsGenerator.alignItemsClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, columnGapClass = propsGenerator.columnGapClass, columnsClass = propsGenerator.columnsClass, heightClass = propsGenerator.heightClass, rowGapClass = propsGenerator.rowGapClass, rowsClass = propsGenerator.rowsClass, widthClass = propsGenerator.widthClass;
|
|
26
26
|
// @ts-expect-error
|
|
27
27
|
var gridStyles = useStyles.useStyles(props).styles;
|
|
28
|
-
return (jsxRuntime.jsxs(Tag, { id: id, className: clsx(className, 'grid', useGridSystem && "grid_state_system", horizontalScroll && "grid_scroll_horizontal", type && "grid_type_".concat(type), columnsClass && "grid_columns_".concat(columnsClass), rowsClass && "grid_rows_".concat(rowsClass), rowGapClass && "grid_row-gap_".concat(rowGapClass), columnGapClass && "grid_column-gap_".concat(columnGapClass), alignContentClass && "grid_align-content_".concat(alignContentClass), alignItemsClass && "grid_align-items_".concat(alignItemsClass), borderColorClass && "border-color_".concat(borderColorClass), justifyContentClass && "grid_justify-content_".concat(justifyContentClass), justifyItemsClass && "grid_justify-items_".concat(justifyItemsClass), fillClass && "fill_".concat(fillClass), horizontalResizing && "grid_horizontal-resizing_".concat(horizontalResizing), verticalResizing && "grid_vertical-resizing_".concat(verticalResizing)), "data-tour": dataTour, style: gridStyles, onClick: onClick, onDoubleClick: onDoubleClick, children: [before && jsxRuntime.jsx("div", { className: "grid__before", children: before }), children, after && jsxRuntime.jsx("div", { className: "grid__after", children: after })] }));
|
|
28
|
+
return (jsxRuntime.jsxs(Tag, { id: id, className: clsx(className, 'grid', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), useGridSystem && "grid_state_system", horizontalScroll && "grid_scroll_horizontal", type && "grid_type_".concat(type), columnsClass && "grid_columns_".concat(columnsClass), rowsClass && "grid_rows_".concat(rowsClass), rowGapClass && "grid_row-gap_".concat(rowGapClass), columnGapClass && "grid_column-gap_".concat(columnGapClass), alignContentClass && "grid_align-content_".concat(alignContentClass), alignItemsClass && "grid_align-items_".concat(alignItemsClass), borderColorClass && "border-color_".concat(borderColorClass), justifyContentClass && "grid_justify-content_".concat(justifyContentClass), justifyItemsClass && "grid_justify-items_".concat(justifyItemsClass), fillClass && "fill_".concat(fillClass), horizontalResizing && "grid_horizontal-resizing_".concat(horizontalResizing), verticalResizing && "grid_vertical-resizing_".concat(verticalResizing)), "data-tour": dataTour, style: gridStyles, onClick: onClick, onDoubleClick: onDoubleClick, children: [before && jsxRuntime.jsx("div", { className: "grid__before", children: before }), children, after && jsxRuntime.jsx("div", { className: "grid__after", children: after })] }));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function GridItem(props) {
|
|
@@ -38,12 +38,12 @@ function GridItem(props) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
function GridRow(props) {
|
|
41
|
-
var id = props.id, className = props.className, dataTestId = props.dataTestId, dataTour = props.dataTour, htmlFor = props.htmlFor,
|
|
41
|
+
var id = props.id, className = props.className, dataTestId = props.dataTestId, dataTour = props.dataTour, htmlFor = props.htmlFor, _a = props.tag, Tag = _a === void 0 ? 'div' : _a, onClick = props.onClick, children = props.children;
|
|
42
42
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
43
|
-
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass;
|
|
43
|
+
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, heightClass = propsGenerator.heightClass, widthClass = propsGenerator.widthClass;
|
|
44
44
|
// @ts-expect-error
|
|
45
45
|
var gridRowStyles = useStyles.useStyles(props).styles;
|
|
46
|
-
return (jsxRuntime.jsx(Tag, { id: id, className: clsx(className, 'grid__row', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), borderColorClass && "border-color_".concat(borderColorClass)), "data-testid": dataTestId, "data-tour": dataTour, htmlFor: htmlFor, style:
|
|
46
|
+
return (jsxRuntime.jsx(Tag, { id: id, className: clsx(className, 'grid__row', widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), borderColorClass && "border-color_".concat(borderColorClass)), "data-testid": dataTestId, "data-tour": dataTour, htmlFor: htmlFor, style: gridRowStyles, onClick: onClick, children: children }));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
exports.Grid = Grid;
|
|
@@ -9,7 +9,7 @@ var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevic
|
|
|
9
9
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
10
10
|
var Overlay = require('../../Overlay-BoIJ-g58.js');
|
|
11
11
|
var Title = require('../../Title-ByfOyy-n.js');
|
|
12
|
-
var Loader = require('../../Loader-
|
|
12
|
+
var Loader = require('../../Loader-CjT6-r3I.js');
|
|
13
13
|
require('lodash/camelCase');
|
|
14
14
|
require('lodash/castArray');
|
|
15
15
|
require('lodash/upperFirst');
|