mimir-ui-kit 1.24.0 → 1.24.1
Sign up to get free protection for your applications and to get access to all the features.
package/dist/assets/Steps.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._container_1cq8d_2{display:flex;width:-webkit-max-content;width:-moz-max-content;width:max-content}._container_1cq8d_2 ._step_1cq8d_6{pointer-events:none}._container_1cq8d_2 ._step_1cq8d_6._editable_1cq8d_9{pointer-events:all}._container_1cq8d_2 ._step_1cq8d_6._resizable_1cq8d_12{flex:1 1 auto;height:var(--step-height);-webkit-clip-path:polygon(0% 100%,10.514% 29.275%,10.514% 29.275%,11.405% 24.129%,12.479% 19.395%,13.72% 15.104%,15.112% 11.286%,16.638% 7.972%,18.28% 5.192%,20.024% 2.977%,21.852% 1.357%,23.748% .363%,25.694% .025%,100% 0%,89.492% 70.725%,89.492% 70.725%,88.6% 75.871%,87.525% 80.605%,86.283% 84.896%,84.891% 88.714%,83.364% 92.028%,81.721% 94.808%,79.976% 97.023%,78.148% 98.643%,76.252% 99.637%,74.306% 99.975%,.003% 99.992%);clip-path:polygon(0% 100%,10.514% 29.275%,10.514% 29.275%,11.405% 24.129%,12.479% 19.395%,13.72% 15.104%,15.112% 11.286%,16.638% 7.972%,18.28% 5.192%,20.024% 2.977%,21.852% 1.357%,23.748% .363%,25.694% .025%,100% 0%,89.492% 70.725%,89.492% 70.725%,88.6% 75.871%,87.525% 80.605%,86.283% 84.896%,84.891% 88.714%,83.364% 92.028%,81.721% 94.808%,79.976% 97.023%,78.148% 98.643%,76.252% 99.637%,74.306% 99.975%,.003% 99.992%)}._container_1cq8d_2 ._step_1cq8d_6._resizable_1cq8d_12._XS_1cq8d_17{--step-height: 8px}._container_1cq8d_2 ._step_1cq8d_6._resizable_1cq8d_12._XS1_1cq8d_20,._container_1cq8d_2 ._step_1cq8d_6._resizable_1cq8d_12._S_1cq8d_23{--step-height: 12px}._container_1cq8d_2 ._step_1cq8d_6._resizable_1cq8d_12._M_1cq8d_26{--step-height: 21px}._container_1cq8d_2 ._step_1cq8d_6._resizable_1cq8d_12._L_1cq8d_29{--step-height: 28px}._container_1cq8d_2 ._step_1cq8d_6._resizable_1cq8d_12._XL_1cq8d_32{--step-height: 12px}._container_1cq8d_2._resizable_1cq8d_12{width:auto}
|
@@ -38,6 +38,10 @@ export type TProps = TCommonStepsProps & {
|
|
38
38
|
* Цвет шага, если он не выбран
|
39
39
|
*/
|
40
40
|
unselectedColor?: string;
|
41
|
+
/**
|
42
|
+
* Адаптивный шаг
|
43
|
+
*/
|
44
|
+
resizable?: boolean;
|
41
45
|
};
|
42
46
|
export declare const Steps: import('react').ForwardRefExoticComponent<TCommonStepsProps & {
|
43
47
|
/**
|
@@ -76,4 +80,8 @@ export declare const Steps: import('react').ForwardRefExoticComponent<TCommonSte
|
|
76
80
|
* Цвет шага, если он не выбран
|
77
81
|
*/
|
78
82
|
unselectedColor?: string;
|
83
|
+
/**
|
84
|
+
* Адаптивный шаг
|
85
|
+
*/
|
86
|
+
resizable?: boolean;
|
79
87
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
@@ -3,13 +3,27 @@ import { c as classNames } from "../../index-CweZ_OcN.js";
|
|
3
3
|
import { forwardRef, useId, useState, useRef, useEffect } from "react";
|
4
4
|
import { ZERO_STEP, EStepsSize, ID_SEPARATOR, STEP_ICONS_MAP, StepSize, DIFF_BETWEEN_STEP_AND_INDEX } from "./constants.js";
|
5
5
|
import { Icon } from "../../icons/Icon.js";
|
6
|
-
import '../../assets/Steps.css';const container = "
|
7
|
-
const step = "
|
8
|
-
const editable = "
|
6
|
+
import '../../assets/Steps.css';const container = "_container_1cq8d_2";
|
7
|
+
const step = "_step_1cq8d_6";
|
8
|
+
const editable = "_editable_1cq8d_9";
|
9
|
+
const resizable = "_resizable_1cq8d_12";
|
10
|
+
const XS = "_XS_1cq8d_17";
|
11
|
+
const XS1 = "_XS1_1cq8d_20";
|
12
|
+
const S = "_S_1cq8d_23";
|
13
|
+
const M = "_M_1cq8d_26";
|
14
|
+
const L = "_L_1cq8d_29";
|
15
|
+
const XL = "_XL_1cq8d_32";
|
9
16
|
const cls = {
|
10
17
|
container,
|
11
18
|
step,
|
12
|
-
editable
|
19
|
+
editable,
|
20
|
+
resizable,
|
21
|
+
XS,
|
22
|
+
XS1,
|
23
|
+
S,
|
24
|
+
M,
|
25
|
+
L,
|
26
|
+
XL
|
13
27
|
};
|
14
28
|
const Steps = forwardRef(
|
15
29
|
(props, ref) => {
|
@@ -21,6 +35,7 @@ const Steps = forwardRef(
|
|
21
35
|
editable: editable2 = false,
|
22
36
|
size = EStepsSize.M,
|
23
37
|
onClick,
|
38
|
+
resizable: resizable2,
|
24
39
|
disabled = false,
|
25
40
|
zones = [{ color: "#ff0000", to: quantity }],
|
26
41
|
unselectedColor = "#ffffff"
|
@@ -60,21 +75,35 @@ const Steps = forwardRef(
|
|
60
75
|
return /* @__PURE__ */ jsx(
|
61
76
|
"button",
|
62
77
|
{
|
78
|
+
style: { backgroundColor: resizable2 ? color : void 0 },
|
63
79
|
id: `${idPrefix}${ID_SEPARATOR}${idx}`,
|
64
80
|
className: classNames(cls.step, cls[size], stepClassName, {
|
65
81
|
[cls.editable]: editable2 && !disabled,
|
82
|
+
[cls.resizable]: resizable2,
|
66
83
|
[cls.disabled]: disabled || !editable2 && idx + 1 > step2
|
67
84
|
}),
|
68
85
|
onClick: () => handleClick(idx),
|
69
86
|
onMouseEnter: handleMouseEnter,
|
70
87
|
onMouseLeave: handleMouseLeave,
|
71
|
-
|
72
|
-
children: /* @__PURE__ */ jsx(Icon, { iconName: STEP_ICONS_MAP[size].icon, ...StepSize[size] })
|
88
|
+
children: !resizable2 && /* @__PURE__ */ jsx(Icon, { iconName: STEP_ICONS_MAP[size].icon, ...StepSize[size] })
|
73
89
|
},
|
74
90
|
idx
|
75
91
|
);
|
76
92
|
});
|
77
|
-
return /* @__PURE__ */ jsx(
|
93
|
+
return /* @__PURE__ */ jsx(
|
94
|
+
"div",
|
95
|
+
{
|
96
|
+
className: classNames(
|
97
|
+
cls.container,
|
98
|
+
{
|
99
|
+
[cls.resizable]: resizable2
|
100
|
+
},
|
101
|
+
rootClassName
|
102
|
+
),
|
103
|
+
ref,
|
104
|
+
children: buttons
|
105
|
+
}
|
106
|
+
);
|
78
107
|
}
|
79
108
|
);
|
80
109
|
Steps.displayName = "Steps";
|