@itcase/ui 1.0.102 → 1.1.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/components/Accordion.js +1 -0
- package/dist/components/Avatar.js +1 -0
- package/dist/components/Breadcrumbs.js +1 -0
- package/dist/components/Button.js +3 -0
- package/dist/components/Cell.js +1 -0
- package/dist/components/Choice.js +1 -0
- package/dist/components/ContextMenu.js +1 -0
- package/dist/components/CookiesWarning.js +1 -0
- package/dist/components/DatePicker.js +3 -2
- package/dist/components/Empty.js +1 -0
- package/dist/components/FormField.js +25 -22
- package/dist/components/Icon.js +1 -0
- package/dist/components/Input.js +3 -0
- package/dist/components/InputPassword.js +1 -0
- package/dist/components/Label.js +1 -0
- package/dist/components/LanguageSelector.js +1 -0
- package/dist/components/{RadioButton.js → Radio.js} +24 -24
- package/dist/components/Search.js +1 -0
- package/dist/components/Select.js +6 -5
- package/dist/components/SiteMenu.js +1 -0
- package/dist/components/Swiper.js +4 -4
- package/dist/components/Text.js +3 -1
- package/dist/components/Tile.js +1 -1
- package/dist/components/Tooltip.js +38 -20
- package/dist/css/components/Group/Group.css +1 -1
- package/dist/css/components/{RadioButton/RadioButton.css → Radio/Radio.css} +11 -10
- package/dist/css/components/Swiper/Swiper.css +2 -2
- package/dist/css/components/Title/Title.css +9 -0
- package/dist/stories/{RadioButton.stories.js → Radio.stories.js} +5 -5
- package/package.json +11 -10
|
@@ -10,7 +10,7 @@ var index = require('./Text.js');
|
|
|
10
10
|
var index$1 = require('./Icon.js');
|
|
11
11
|
var useStyles = require('../hooks/useStyles.js');
|
|
12
12
|
var useDeviceTargetClass = require('../hooks/useDeviceTargetClass.js');
|
|
13
|
-
var index$3 = require('./
|
|
13
|
+
var index$3 = require('./Radio.js');
|
|
14
14
|
require('lodash/castArray');
|
|
15
15
|
require('lodash/camelCase');
|
|
16
16
|
require('../context/UIContext.js');
|
|
@@ -43,6 +43,7 @@ require('./Title.js');
|
|
|
43
43
|
require('../constants/componentProps/textAlign.js');
|
|
44
44
|
require('../constants/componentProps/titleSize.js');
|
|
45
45
|
require('../constants/componentProps/wrap.js');
|
|
46
|
+
require('../constants/componentProps/textSize.js');
|
|
46
47
|
require('react-select');
|
|
47
48
|
require('react-dom');
|
|
48
49
|
require('../floating-ui.dom-C34fOuI9.js');
|
|
@@ -61,6 +62,7 @@ function FormField(props) {
|
|
|
61
62
|
id,
|
|
62
63
|
children,
|
|
63
64
|
afterItem,
|
|
65
|
+
dataTestId,
|
|
64
66
|
beforeItem,
|
|
65
67
|
dividerWidth,
|
|
66
68
|
dividerDirection,
|
|
@@ -113,6 +115,7 @@ function FormField(props) {
|
|
|
113
115
|
} = useStyles.useStyles(props);
|
|
114
116
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
115
117
|
className: clsx__default.default(className, 'form-field', set && `form-field_set_${set}`, sizeClass, fillClass, shapeClass, directionClass),
|
|
118
|
+
"data-testId": dataTestId,
|
|
116
119
|
style: formFieldStyles
|
|
117
120
|
}, label && /*#__PURE__*/React__default.default.createElement("label", {
|
|
118
121
|
htmlFor: id,
|
|
@@ -323,40 +326,40 @@ FormField.__docgenInfo = {
|
|
|
323
326
|
|
|
324
327
|
function ChoiceField(props) {
|
|
325
328
|
const {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
329
|
+
radioId,
|
|
330
|
+
radioClassName,
|
|
331
|
+
radioFillCheckmark,
|
|
332
|
+
radioFillChecked,
|
|
333
|
+
radioFill,
|
|
334
|
+
radioFillDisable,
|
|
335
|
+
radioShape,
|
|
336
|
+
radioBorder
|
|
334
337
|
} = props;
|
|
335
|
-
return /*#__PURE__*/React__default.default.createElement(FormField, props, /*#__PURE__*/React__default.default.createElement(index$3.
|
|
336
|
-
id:
|
|
337
|
-
className:
|
|
338
|
-
fillCheckmark:
|
|
339
|
-
fillChecked:
|
|
340
|
-
fill:
|
|
341
|
-
fillDisable:
|
|
342
|
-
shape:
|
|
343
|
-
border:
|
|
338
|
+
return /*#__PURE__*/React__default.default.createElement(FormField, props, /*#__PURE__*/React__default.default.createElement(index$3.Radio, {
|
|
339
|
+
id: radioId,
|
|
340
|
+
className: radioClassName,
|
|
341
|
+
fillCheckmark: radioFillCheckmark,
|
|
342
|
+
fillChecked: radioFillChecked,
|
|
343
|
+
fill: radioFill,
|
|
344
|
+
fillDisable: radioFillDisable,
|
|
345
|
+
shape: radioShape,
|
|
346
|
+
border: radioBorder
|
|
344
347
|
}));
|
|
345
348
|
}
|
|
346
349
|
ChoiceField.propTypes = {
|
|
347
|
-
|
|
350
|
+
radioClassName: PropTypes__default.default.string
|
|
348
351
|
};
|
|
349
352
|
ChoiceField.defaultProps = {
|
|
350
|
-
|
|
353
|
+
radioClassName: 'form-field__item-radio'
|
|
351
354
|
};
|
|
352
355
|
ChoiceField.__docgenInfo = {
|
|
353
356
|
"description": "",
|
|
354
357
|
"methods": [],
|
|
355
358
|
"displayName": "ChoiceField",
|
|
356
359
|
"props": {
|
|
357
|
-
"
|
|
360
|
+
"radioClassName": {
|
|
358
361
|
"defaultValue": {
|
|
359
|
-
"value": "'form-field__item-radio
|
|
362
|
+
"value": "'form-field__item-radio'",
|
|
360
363
|
"computed": false
|
|
361
364
|
},
|
|
362
365
|
"description": "",
|
package/dist/components/Icon.js
CHANGED
|
@@ -36,6 +36,7 @@ require('./Title.js');
|
|
|
36
36
|
require('../constants/componentProps/textAlign.js');
|
|
37
37
|
require('../constants/componentProps/titleSize.js');
|
|
38
38
|
require('../constants/componentProps/wrap.js');
|
|
39
|
+
require('../constants/componentProps/textSize.js');
|
|
39
40
|
|
|
40
41
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
41
42
|
|
package/dist/components/Input.js
CHANGED
|
@@ -32,8 +32,10 @@ const Input = /*#__PURE__*/React__default.default.forwardRef(function Input(prop
|
|
|
32
32
|
state,
|
|
33
33
|
id,
|
|
34
34
|
index,
|
|
35
|
+
dataTestId,
|
|
35
36
|
type,
|
|
36
37
|
className,
|
|
38
|
+
name,
|
|
37
39
|
placeholder,
|
|
38
40
|
isDisabled,
|
|
39
41
|
value,
|
|
@@ -121,6 +123,7 @@ const Input = /*#__PURE__*/React__default.default.forwardRef(function Input(prop
|
|
|
121
123
|
ref: ref,
|
|
122
124
|
disabled: isDisabled,
|
|
123
125
|
placeholder: placeholder,
|
|
126
|
+
"data-testid": dataTestId || (name ? `${name}Input` : 'input'),
|
|
124
127
|
value: value,
|
|
125
128
|
onBlur: onBlur,
|
|
126
129
|
onChange: onChange,
|
|
@@ -36,6 +36,7 @@ require('./Title.js');
|
|
|
36
36
|
require('../constants/componentProps/textAlign.js');
|
|
37
37
|
require('../constants/componentProps/titleSize.js');
|
|
38
38
|
require('../constants/componentProps/wrap.js');
|
|
39
|
+
require('../constants/componentProps/textSize.js');
|
|
39
40
|
require('lodash/castArray');
|
|
40
41
|
|
|
41
42
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
package/dist/components/Label.js
CHANGED
|
@@ -25,6 +25,7 @@ require('../constants/componentProps/wrap.js');
|
|
|
25
25
|
require('../context/UIContext.js');
|
|
26
26
|
require('../hooks/useMediaQueries.js');
|
|
27
27
|
require('react-responsive');
|
|
28
|
+
require('../constants/componentProps/textSize.js');
|
|
28
29
|
require('lodash/castArray');
|
|
29
30
|
require('lodash/camelCase');
|
|
30
31
|
require('lodash/maxBy');
|
|
@@ -37,6 +37,7 @@ require('./Title.js');
|
|
|
37
37
|
require('../constants/componentProps/textAlign.js');
|
|
38
38
|
require('../constants/componentProps/titleSize.js');
|
|
39
39
|
require('../constants/componentProps/wrap.js');
|
|
40
|
+
require('../constants/componentProps/textSize.js');
|
|
40
41
|
|
|
41
42
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
42
43
|
|
|
@@ -28,17 +28,17 @@ var React__default = /*#__PURE__*/_interopDefault(React);
|
|
|
28
28
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
29
29
|
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
30
30
|
|
|
31
|
-
const
|
|
31
|
+
const radioConfig = {
|
|
32
32
|
state: {},
|
|
33
33
|
setState: newComponent => {
|
|
34
|
-
|
|
34
|
+
radioConfig.state = newComponent;
|
|
35
35
|
},
|
|
36
36
|
appearance: {},
|
|
37
37
|
setAppearance: newComponent => {
|
|
38
|
-
|
|
38
|
+
radioConfig.appearance = newComponent;
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
function
|
|
41
|
+
function Radio(props) {
|
|
42
42
|
const {
|
|
43
43
|
appearance,
|
|
44
44
|
state,
|
|
@@ -62,11 +62,11 @@ function RadioButton(props) {
|
|
|
62
62
|
propsKey: 'fill'
|
|
63
63
|
});
|
|
64
64
|
const shapeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
65
|
-
prefix: '
|
|
65
|
+
prefix: 'radio_shape_',
|
|
66
66
|
propsKey: 'shape'
|
|
67
67
|
});
|
|
68
68
|
const stateShapeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
69
|
-
prefix: '
|
|
69
|
+
prefix: 'radio__state_shape_',
|
|
70
70
|
propsKey: 'stateShape'
|
|
71
71
|
});
|
|
72
72
|
const stateFillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
@@ -78,7 +78,7 @@ function RadioButton(props) {
|
|
|
78
78
|
propsKey: checked ? 'stateFillDisabledChecked' : 'stateFillDisabled'
|
|
79
79
|
});
|
|
80
80
|
const stateCheckmarkFillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
81
|
-
prefix: '
|
|
81
|
+
prefix: 'radio_checkmark_fill_',
|
|
82
82
|
propsKey: disabled ? 'stateCheckmarkFillDisabled' : 'stateCheckmarkFill'
|
|
83
83
|
});
|
|
84
84
|
const stateBorderWidthClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
@@ -99,43 +99,43 @@ function RadioButton(props) {
|
|
|
99
99
|
});
|
|
100
100
|
return /*#__PURE__*/React__default.default.createElement(Tag, {
|
|
101
101
|
htmlFor: id,
|
|
102
|
-
className: clsx__default.default(className, 'radio
|
|
102
|
+
className: clsx__default.default(className, 'radio', fillClass, shapeClass)
|
|
103
103
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
104
|
-
className: clsx__default.default('
|
|
104
|
+
className: clsx__default.default('radio__item', stateCheckmarkFillClass || radioConfig.appearance[appearance] && `radio_checkmark_fill_${radioConfig.appearance[appearance].stateCheckmarkFill}`.replace(/([A-Z])/g, '-$1').toLowerCase())
|
|
105
105
|
}, /*#__PURE__*/React__default.default.createElement("input", {
|
|
106
106
|
checked: checked,
|
|
107
|
-
className: "
|
|
107
|
+
className: "radio__input",
|
|
108
108
|
disabled: disabled,
|
|
109
109
|
id: id,
|
|
110
110
|
type: "radio",
|
|
111
111
|
onChange: onChange
|
|
112
112
|
}), /*#__PURE__*/React__default.default.createElement("div", {
|
|
113
|
-
className: clsx__default.default('
|
|
113
|
+
className: clsx__default.default('radio__state', disabled ? stateFillDisabledClass : stateFillClass, disabled ? stateBorderColorDisabledClass : stateBorderColorClass || radioConfig.appearance[appearance] && `border-color_${radioConfig.appearance[appearance].stateBorderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), stateBorderColorHoverClass, stateShapeClass || radioConfig.appearance[appearance] && `radio__state_shape_${radioConfig.appearance[appearance].stateShape}`.replace(/([A-Z])/g, '-$1').toLowerCase(), stateBorderWidthClass || radioConfig.appearance[appearance] && `border-width_${radioConfig.appearance[appearance].stateBorderWidth}`.replace(/([A-Z])/g, '-$1').toLowerCase())
|
|
114
114
|
}, "\xA0"), /*#__PURE__*/React__default.default.createElement("div", {
|
|
115
|
-
className: "
|
|
115
|
+
className: "radio__state-checkmark"
|
|
116
116
|
}, "\xA0")), label && /*#__PURE__*/React__default.default.createElement(index.Text, {
|
|
117
|
-
className: "
|
|
118
|
-
size: labelTextSize ||
|
|
119
|
-
textColor: labelTextColor ||
|
|
117
|
+
className: "radio__label",
|
|
118
|
+
size: labelTextSize || radioConfig.appearance[appearance].labelTextSize,
|
|
119
|
+
textColor: labelTextColor || radioConfig.appearance[appearance].labelTextColor,
|
|
120
120
|
textWeight: labelTextWidth
|
|
121
121
|
}, label), desc && /*#__PURE__*/React__default.default.createElement(index.Text, {
|
|
122
|
-
className: "
|
|
123
|
-
size: descTextSize ||
|
|
124
|
-
textColor: descTextColor ||
|
|
122
|
+
className: "radio__desc",
|
|
123
|
+
size: descTextSize || radioConfig.appearance[appearance].descTextSize,
|
|
124
|
+
textColor: descTextColor || radioConfig.appearance[appearance].descTextColor,
|
|
125
125
|
textWeight: descTextWidth
|
|
126
126
|
}, desc));
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
Radio.propTypes = {
|
|
129
129
|
className: PropTypes__default.default.string
|
|
130
130
|
};
|
|
131
|
-
|
|
131
|
+
Radio.defaultProps = {
|
|
132
132
|
shape: 'circular',
|
|
133
133
|
tag: 'label'
|
|
134
134
|
};
|
|
135
|
-
|
|
135
|
+
Radio.__docgenInfo = {
|
|
136
136
|
"description": "",
|
|
137
137
|
"methods": [],
|
|
138
|
-
"displayName": "
|
|
138
|
+
"displayName": "Radio",
|
|
139
139
|
"props": {
|
|
140
140
|
"shape": {
|
|
141
141
|
"defaultValue": {
|
|
@@ -161,5 +161,5 @@ RadioButton.__docgenInfo = {
|
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
-
exports.
|
|
165
|
-
exports.
|
|
164
|
+
exports.Radio = Radio;
|
|
165
|
+
exports.radioConfig = radioConfig;
|
|
@@ -36,6 +36,7 @@ require('./Title.js');
|
|
|
36
36
|
require('../constants/componentProps/textAlign.js');
|
|
37
37
|
require('../constants/componentProps/titleSize.js');
|
|
38
38
|
require('../constants/componentProps/wrap.js');
|
|
39
|
+
require('../constants/componentProps/textSize.js');
|
|
39
40
|
require('../constants/componentProps/textColorActive.js');
|
|
40
41
|
require('../constants/componentProps/textColorHover.js');
|
|
41
42
|
require('react-scrollbars-custom');
|
|
@@ -41,6 +41,7 @@ require('./Title.js');
|
|
|
41
41
|
require('../constants/componentProps/textAlign.js');
|
|
42
42
|
require('../constants/componentProps/titleSize.js');
|
|
43
43
|
require('../constants/componentProps/wrap.js');
|
|
44
|
+
require('../constants/componentProps/textSize.js');
|
|
44
45
|
require('../constants/componentProps/textColorActive.js');
|
|
45
46
|
require('../constants/componentProps/textColorHover.js');
|
|
46
47
|
require('../constants/componentProps/direction.js');
|
|
@@ -2463,7 +2464,7 @@ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : use
|
|
|
2463
2464
|
var useInsertionEffectWithLayoutFallback = useInsertionEffect || React__namespace.useLayoutEffect;
|
|
2464
2465
|
|
|
2465
2466
|
var isBrowser$1 = typeof document !== 'undefined';
|
|
2466
|
-
var
|
|
2467
|
+
var hasOwn = {}.hasOwnProperty;
|
|
2467
2468
|
|
|
2468
2469
|
var EmotionCacheContext = /* #__PURE__ */React__namespace.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
2469
2470
|
// because this module is primarily intended for the browser and node
|
|
@@ -2574,7 +2575,7 @@ var createEmotionProps = function createEmotionProps(type, props) {
|
|
|
2574
2575
|
var newProps = {};
|
|
2575
2576
|
|
|
2576
2577
|
for (var key in props) {
|
|
2577
|
-
if (
|
|
2578
|
+
if (hasOwn.call(props, key)) {
|
|
2578
2579
|
newProps[key] = props[key];
|
|
2579
2580
|
}
|
|
2580
2581
|
}
|
|
@@ -2651,7 +2652,7 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
2651
2652
|
var newProps = {};
|
|
2652
2653
|
|
|
2653
2654
|
for (var key in props) {
|
|
2654
|
-
if (
|
|
2655
|
+
if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
2655
2656
|
newProps[key] = props[key];
|
|
2656
2657
|
}
|
|
2657
2658
|
}
|
|
@@ -2673,7 +2674,7 @@ var Emotion$1 = Emotion;
|
|
|
2673
2674
|
|
|
2674
2675
|
var pkg = {
|
|
2675
2676
|
name: "@emotion/react",
|
|
2676
|
-
version: "11.11.
|
|
2677
|
+
version: "11.11.4",
|
|
2677
2678
|
main: "dist/emotion-react.cjs.js",
|
|
2678
2679
|
module: "dist/emotion-react.esm.js",
|
|
2679
2680
|
browser: {
|
|
@@ -2806,7 +2807,7 @@ var pkg = {
|
|
|
2806
2807
|
var jsx = function jsx(type, props) {
|
|
2807
2808
|
var args = arguments;
|
|
2808
2809
|
|
|
2809
|
-
if (props == null || !
|
|
2810
|
+
if (props == null || !hasOwn.call(props, 'css')) {
|
|
2810
2811
|
// $FlowFixMe
|
|
2811
2812
|
return React__namespace.createElement.apply(undefined, args);
|
|
2812
2813
|
}
|
|
@@ -35,6 +35,7 @@ require('./Title.js');
|
|
|
35
35
|
require('../constants/componentProps/textAlign.js');
|
|
36
36
|
require('../constants/componentProps/titleSize.js');
|
|
37
37
|
require('../constants/componentProps/wrap.js');
|
|
38
|
+
require('../constants/componentProps/textSize.js');
|
|
38
39
|
require('../constants/componentProps/textColorActive.js');
|
|
39
40
|
require('../constants/componentProps/textColorHover.js');
|
|
40
41
|
|
|
@@ -2433,7 +2433,7 @@ function loopFix(_temp) {
|
|
|
2433
2433
|
if (byMousewheel) {
|
|
2434
2434
|
swiper.setTranslate(swiper.translate - diff);
|
|
2435
2435
|
} else {
|
|
2436
|
-
swiper.slideTo(activeIndex + slidesPrepended, 0, false, true);
|
|
2436
|
+
swiper.slideTo(activeIndex + Math.ceil(slidesPrepended), 0, false, true);
|
|
2437
2437
|
if (setTranslate) {
|
|
2438
2438
|
swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;
|
|
2439
2439
|
swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;
|
|
@@ -4676,7 +4676,7 @@ const updateOnVirtualData = swiper => {
|
|
|
4676
4676
|
};
|
|
4677
4677
|
|
|
4678
4678
|
/**
|
|
4679
|
-
* Swiper React 11.0.
|
|
4679
|
+
* Swiper React 11.0.7
|
|
4680
4680
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
4681
4681
|
* https://swiperjs.com
|
|
4682
4682
|
*
|
|
@@ -4684,7 +4684,7 @@ const updateOnVirtualData = swiper => {
|
|
|
4684
4684
|
*
|
|
4685
4685
|
* Released under the MIT License
|
|
4686
4686
|
*
|
|
4687
|
-
* Released on: February
|
|
4687
|
+
* Released on: February 27, 2024
|
|
4688
4688
|
*/
|
|
4689
4689
|
|
|
4690
4690
|
|
|
@@ -4780,7 +4780,7 @@ function renderVirtual(swiper, slides, virtualData) {
|
|
|
4780
4780
|
return /*#__PURE__*/React__default.default.cloneElement(child, {
|
|
4781
4781
|
swiper,
|
|
4782
4782
|
style,
|
|
4783
|
-
key: `slide-${index}`
|
|
4783
|
+
key: child.props.virtualIndex || child.key || `slide-${index}`
|
|
4784
4784
|
});
|
|
4785
4785
|
});
|
|
4786
4786
|
}
|
package/dist/components/Text.js
CHANGED
|
@@ -37,6 +37,7 @@ function Text(props) {
|
|
|
37
37
|
const {
|
|
38
38
|
after,
|
|
39
39
|
appearance,
|
|
40
|
+
dataTestId,
|
|
40
41
|
before,
|
|
41
42
|
children,
|
|
42
43
|
className,
|
|
@@ -104,7 +105,8 @@ function Text(props) {
|
|
|
104
105
|
"data-tour": dataTour,
|
|
105
106
|
htmlFor: htmlFor,
|
|
106
107
|
style: textStyles,
|
|
107
|
-
onClick: onClick
|
|
108
|
+
onClick: onClick,
|
|
109
|
+
"data-testid": dataTestId
|
|
108
110
|
}, before, children, after);
|
|
109
111
|
}
|
|
110
112
|
Text.propTypes = {
|
package/dist/components/Tile.js
CHANGED
|
@@ -40,8 +40,8 @@ require('../constants/componentProps/underline.js');
|
|
|
40
40
|
require('../constants/componentProps/iconSize.js');
|
|
41
41
|
require('../constants/componentProps/strokeColor.js');
|
|
42
42
|
require('./Tooltip.js');
|
|
43
|
-
require('../constants/componentProps/textAlign.js');
|
|
44
43
|
require('../constants/componentProps/titleSize.js');
|
|
44
|
+
require('../constants/componentProps/textAlign.js');
|
|
45
45
|
require('../constants/componentProps/wrap.js');
|
|
46
46
|
|
|
47
47
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -6,11 +6,13 @@ var clsx = require('clsx');
|
|
|
6
6
|
var index$1 = require('./Text.js');
|
|
7
7
|
var index = require('./Title.js');
|
|
8
8
|
var size = require('../constants/componentProps/size.js');
|
|
9
|
+
var textSize = require('../constants/componentProps/textSize.js');
|
|
9
10
|
var fill = require('../constants/componentProps/fill.js');
|
|
10
11
|
var shape = require('../constants/componentProps/shape.js');
|
|
12
|
+
var textColor = require('../constants/componentProps/textColor.js');
|
|
13
|
+
var titleSize = require('../constants/componentProps/titleSize.js');
|
|
11
14
|
var useDeviceTargetClass = require('../hooks/useDeviceTargetClass.js');
|
|
12
15
|
var useStyles = require('../hooks/useStyles.js');
|
|
13
|
-
require('../constants/componentProps/textColor.js');
|
|
14
16
|
require('../constants/componentProps/textColorActive.js');
|
|
15
17
|
require('../constants/componentProps/textColorHover.js');
|
|
16
18
|
require('../constants/componentProps/textStyle.js');
|
|
@@ -25,7 +27,6 @@ require('../hooks/useMediaQueries.js');
|
|
|
25
27
|
require('react-responsive');
|
|
26
28
|
require('lodash/castArray');
|
|
27
29
|
require('../constants/componentProps/textAlign.js');
|
|
28
|
-
require('../constants/componentProps/titleSize.js');
|
|
29
30
|
require('../constants/componentProps/type.js');
|
|
30
31
|
require('../constants/componentProps/wrap.js');
|
|
31
32
|
|
|
@@ -56,11 +57,12 @@ const Tooltip = /*#__PURE__*/React__default.default.forwardRef(function Tooltip(
|
|
|
56
57
|
titleTextColor,
|
|
57
58
|
titleSize,
|
|
58
59
|
textColor,
|
|
59
|
-
textSize
|
|
60
|
+
textSize,
|
|
61
|
+
initialIsVisible
|
|
60
62
|
} = props;
|
|
61
63
|
const tooltipTimeoutHideRef = React.useRef(null);
|
|
62
64
|
const isTooltipCloseAnimationInProgressRef = React.useRef(false);
|
|
63
|
-
const [isTooltipVisible, setIsTooltipVisible] = React.useState(
|
|
65
|
+
const [isTooltipVisible, setIsTooltipVisible] = React.useState(initialIsVisible);
|
|
64
66
|
const openTooltip = React.useCallback(() => {
|
|
65
67
|
if (!isTooltipCloseAnimationInProgressRef.current) {
|
|
66
68
|
clearTimeout(tooltipTimeoutHideRef.current);
|
|
@@ -169,27 +171,39 @@ Tooltip.propTypes = {
|
|
|
169
171
|
shapeDesktop: PropTypes__default.default.oneOf(shape.default),
|
|
170
172
|
shapeMobile: PropTypes__default.default.oneOf(shape.default),
|
|
171
173
|
shapeTablet: PropTypes__default.default.oneOf(shape.default),
|
|
174
|
+
/**
|
|
175
|
+
* внутренний padding и отступ gap между элементами
|
|
176
|
+
*/
|
|
172
177
|
size: PropTypes__default.default.oneOf(size.default),
|
|
173
178
|
sizeDesktop: PropTypes__default.default.oneOf(size.default),
|
|
174
179
|
sizeMobile: PropTypes__default.default.oneOf(size.default),
|
|
175
180
|
sizeTablet: PropTypes__default.default.oneOf(size.default),
|
|
176
181
|
text: PropTypes__default.default.any,
|
|
177
|
-
textColor: PropTypes__default.default.oneOf(
|
|
178
|
-
textSize: PropTypes__default.default.oneOf(
|
|
179
|
-
textSizeDesktop: PropTypes__default.default.oneOf(
|
|
180
|
-
textSizeMobile: PropTypes__default.default.oneOf(
|
|
181
|
-
textSizeTablet: PropTypes__default.default.oneOf(
|
|
182
|
+
textColor: PropTypes__default.default.oneOf(textColor.default),
|
|
183
|
+
textSize: PropTypes__default.default.oneOf(textSize.default),
|
|
184
|
+
textSizeDesktop: PropTypes__default.default.oneOf(textSize.default),
|
|
185
|
+
textSizeMobile: PropTypes__default.default.oneOf(textSize.default),
|
|
186
|
+
textSizeTablet: PropTypes__default.default.oneOf(textSize.default),
|
|
182
187
|
title: PropTypes__default.default.string,
|
|
183
|
-
titleSize: PropTypes__default.default.
|
|
184
|
-
titleTextColor: PropTypes__default.default.
|
|
188
|
+
titleSize: PropTypes__default.default.oneOf(titleSize.default),
|
|
189
|
+
titleTextColor: PropTypes__default.default.oneOf(textColor.default),
|
|
185
190
|
type: PropTypes__default.default.string
|
|
186
191
|
};
|
|
187
|
-
Tooltip.defaultProps = {
|
|
192
|
+
Tooltip.defaultProps = {
|
|
193
|
+
initialIsVisible: null
|
|
194
|
+
};
|
|
188
195
|
Tooltip.__docgenInfo = {
|
|
189
196
|
"description": "",
|
|
190
197
|
"methods": [],
|
|
191
198
|
"displayName": "Tooltip",
|
|
192
199
|
"props": {
|
|
200
|
+
"initialIsVisible": {
|
|
201
|
+
"defaultValue": {
|
|
202
|
+
"value": "null",
|
|
203
|
+
"computed": false
|
|
204
|
+
},
|
|
205
|
+
"required": false
|
|
206
|
+
},
|
|
193
207
|
"after": {
|
|
194
208
|
"description": "",
|
|
195
209
|
"type": {
|
|
@@ -312,7 +326,7 @@ Tooltip.__docgenInfo = {
|
|
|
312
326
|
"required": false
|
|
313
327
|
},
|
|
314
328
|
"size": {
|
|
315
|
-
"description": "",
|
|
329
|
+
"description": "\u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0439 padding \u0438 \u043E\u0442\u0441\u0442\u0443\u043F gap \u043C\u0435\u0436\u0434\u0443 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C\u0438",
|
|
316
330
|
"type": {
|
|
317
331
|
"name": "enum",
|
|
318
332
|
"computed": true,
|
|
@@ -359,7 +373,7 @@ Tooltip.__docgenInfo = {
|
|
|
359
373
|
"type": {
|
|
360
374
|
"name": "enum",
|
|
361
375
|
"computed": true,
|
|
362
|
-
"value": "
|
|
376
|
+
"value": "textColorProps"
|
|
363
377
|
},
|
|
364
378
|
"required": false
|
|
365
379
|
},
|
|
@@ -368,7 +382,7 @@ Tooltip.__docgenInfo = {
|
|
|
368
382
|
"type": {
|
|
369
383
|
"name": "enum",
|
|
370
384
|
"computed": true,
|
|
371
|
-
"value": "
|
|
385
|
+
"value": "textSizeProps"
|
|
372
386
|
},
|
|
373
387
|
"required": false
|
|
374
388
|
},
|
|
@@ -377,7 +391,7 @@ Tooltip.__docgenInfo = {
|
|
|
377
391
|
"type": {
|
|
378
392
|
"name": "enum",
|
|
379
393
|
"computed": true,
|
|
380
|
-
"value": "
|
|
394
|
+
"value": "textSizeProps"
|
|
381
395
|
},
|
|
382
396
|
"required": false
|
|
383
397
|
},
|
|
@@ -386,7 +400,7 @@ Tooltip.__docgenInfo = {
|
|
|
386
400
|
"type": {
|
|
387
401
|
"name": "enum",
|
|
388
402
|
"computed": true,
|
|
389
|
-
"value": "
|
|
403
|
+
"value": "textSizeProps"
|
|
390
404
|
},
|
|
391
405
|
"required": false
|
|
392
406
|
},
|
|
@@ -395,7 +409,7 @@ Tooltip.__docgenInfo = {
|
|
|
395
409
|
"type": {
|
|
396
410
|
"name": "enum",
|
|
397
411
|
"computed": true,
|
|
398
|
-
"value": "
|
|
412
|
+
"value": "textSizeProps"
|
|
399
413
|
},
|
|
400
414
|
"required": false
|
|
401
415
|
},
|
|
@@ -409,14 +423,18 @@ Tooltip.__docgenInfo = {
|
|
|
409
423
|
"titleSize": {
|
|
410
424
|
"description": "",
|
|
411
425
|
"type": {
|
|
412
|
-
"name": "
|
|
426
|
+
"name": "enum",
|
|
427
|
+
"computed": true,
|
|
428
|
+
"value": "titleSizeProps"
|
|
413
429
|
},
|
|
414
430
|
"required": false
|
|
415
431
|
},
|
|
416
432
|
"titleTextColor": {
|
|
417
433
|
"description": "",
|
|
418
434
|
"type": {
|
|
419
|
-
"name": "
|
|
435
|
+
"name": "enum",
|
|
436
|
+
"computed": true,
|
|
437
|
+
"value": "textColorProps"
|
|
420
438
|
},
|
|
421
439
|
"required": false
|
|
422
440
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.radio
|
|
1
|
+
.radio {
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: auto 1fr;
|
|
4
4
|
grid-template-rows: auto auto;
|
|
5
5
|
column-gap: 4px;
|
|
6
6
|
&:hover {
|
|
7
7
|
^&__state {
|
|
8
|
-
border-color: var(--radio-
|
|
8
|
+
border-color: var(--radio-state-border-hover);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
&__item {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
z-index: 3;
|
|
33
33
|
cursor: pointer;
|
|
34
34
|
appearance: none;
|
|
35
|
-
&:disabled + .
|
|
35
|
+
&:disabled + .radio__state {
|
|
36
36
|
border-color: transparent !important;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
z-index: 1;
|
|
43
43
|
&_shape {
|
|
44
44
|
&_rounded {
|
|
45
|
-
border-radius: var(--radio-
|
|
45
|
+
border-radius: var(--radio-shape-rounded, 4px);
|
|
46
46
|
position: relative;
|
|
47
47
|
overflow: hidden;
|
|
48
48
|
}
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
.radio
|
|
69
|
+
.radio {
|
|
70
70
|
&_shape {
|
|
71
71
|
&_rounded {
|
|
72
72
|
^^&__item {
|
|
73
|
-
border-radius: var(--radio-
|
|
73
|
+
border-radius: var(--radio-item-shape-rounded, 4px);
|
|
74
74
|
position: relative;
|
|
75
75
|
overflow: hidden;
|
|
76
76
|
}
|
|
@@ -84,20 +84,21 @@
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
.radio
|
|
87
|
+
.radio {
|
|
88
88
|
&_checkmark {
|
|
89
89
|
&_fill {
|
|
90
90
|
@each $type in accent, primary, secondary, tertiary, surface, success, error {
|
|
91
91
|
&_$(type) {
|
|
92
92
|
&-item {
|
|
93
|
-
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent,
|
|
93
|
+
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent,
|
|
94
|
+
disabled, hover {
|
|
94
95
|
&-$(color) {
|
|
95
96
|
& ^^^^^&__input {
|
|
96
97
|
&:checked {
|
|
97
98
|
& ~ ^^^^^^^&__state {
|
|
98
99
|
&-checkmark {
|
|
99
|
-
display: block;
|
|
100
100
|
background: var(--color-$(type)-item-$(color));
|
|
101
|
+
display: block;
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
}
|
|
@@ -111,5 +112,5 @@
|
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
:root {
|
|
114
|
-
--radio-
|
|
115
|
+
--radio-state-border-hover: var(--color-surface-border-tertiary);
|
|
115
116
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Swiper 11.0.
|
|
2
|
+
* Swiper 11.0.7
|
|
3
3
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
4
4
|
* https://swiperjs.com
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on: February
|
|
10
|
+
* Released on: February 27, 2024
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/* FONT_START */
|