mimir-ui-kit 1.34.1 → 1.34.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{Input-DspsU5F4.js → Input-ChCIy5oY.js} +23 -27
- package/dist/{ProgressBar-DWKyrXzd.js → ProgressBar-CwLwhaeM.js} +23 -23
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/AccordionItem.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/CheckboxMimir.css +1 -1
- package/dist/assets/Chip.css +1 -1
- package/dist/assets/Drawer.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputPassword.css +1 -1
- package/dist/assets/Link.css +1 -1
- package/dist/assets/ListFiles.css +1 -1
- package/dist/assets/ListPhotos.css +1 -1
- package/dist/assets/MergedButton.css +1 -1
- package/dist/assets/NotificationBadge.css +1 -1
- package/dist/assets/OtpInput.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/ProgressBar2.css +1 -1
- package/dist/assets/RadioGroup.css +1 -1
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/TabTrail.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/TextArea.css +1 -1
- package/dist/assets/Timer.css +1 -1
- package/dist/assets/Uploader.css +1 -1
- package/dist/assets/UploaderPhotos.css +1 -1
- package/dist/assets/Vote.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Accordion/Accordion.js +16 -24
- package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
- package/dist/components/AnchorLink/Link.js +9 -9
- package/dist/components/Button/Button.js +33 -33
- package/dist/components/Button/types.js +1 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.js +19 -16
- package/dist/components/Chip/Chip.js +12 -12
- package/dist/components/DatePicker/DatePicker.d.ts +18 -36
- package/dist/components/DatePicker/DatePicker.js +6 -46
- package/dist/components/DatePicker/DatePickerModal.js +60 -76
- package/dist/components/DatePicker/MonthPickerModal.js +6 -14
- package/dist/components/DatePicker/YearPickerModal.js +2 -2
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +20 -20
- package/dist/components/Input/Input.d.ts +1 -5
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/constants.d.ts +3 -5
- package/dist/components/Input/constants.js +3 -7
- package/dist/components/Input/index.d.ts +2 -2
- package/dist/components/Input/index.js +2 -3
- package/dist/components/Input/types.d.ts +6 -2
- package/dist/components/Input/types.js +1 -0
- package/dist/components/InputPassword/InputPassword.js +8 -8
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/ListFiles/ListFiles.js +7 -7
- package/dist/components/ListPhotos/ListPhotos.js +4 -4
- package/dist/components/MergedButton/MergedButton.js +6 -6
- package/dist/components/NotificationBadge/NotificationBadge.js +4 -4
- package/dist/components/NotificationBadge/types.js +1 -0
- package/dist/components/OtpInput/OtpInput.js +5 -5
- package/dist/components/Pagination/Pagination.d.ts +3 -1
- package/dist/components/Pagination/Pagination.js +11 -7
- package/dist/components/Pagination/types.js +1 -0
- package/dist/components/RadioGroup/RadioGroup.js +9 -9
- package/dist/components/SelectSearch/SelectSearch.d.ts +2 -18
- package/dist/components/SelectSearch/SelectSearch.js +31 -47
- package/dist/components/SelectSearch/types.d.ts +4 -2
- package/dist/components/SelectSearch/types.js +1 -0
- package/dist/components/Slider/Slider.d.ts +2 -3
- package/dist/components/Slider/Slider.js +10 -12
- package/dist/components/Steps/Steps.d.ts +0 -4
- package/dist/components/Steps/Steps.js +1 -5
- package/dist/components/Steps/types.js +1 -0
- package/dist/components/TabTrail/TabTrail.d.ts +0 -8
- package/dist/components/TabTrail/TabTrail.js +17 -33
- package/dist/components/Tag/Tag.js +6 -6
- package/dist/components/Tag/types.js +1 -0
- package/dist/components/TextArea/TextArea.js +12 -14
- package/dist/components/TextArea/hooks.js +0 -4
- package/dist/components/TextArea/types.js +1 -0
- package/dist/components/Timer/Timer.js +1 -1
- package/dist/components/Toasts/ProgressBar.js +1 -1
- package/dist/components/Toasts/Toast.js +1 -1
- package/dist/components/Toasts/ToastList.js +1 -1
- package/dist/components/Toasts/ToastsProvider.js +1 -1
- package/dist/components/Toasts/types.js +1 -0
- package/dist/components/UniversalUploader/UniversalUploader.js +35 -21
- package/dist/components/UniversalUploader/types.js +1 -0
- package/dist/components/Uploader/Uploader.js +3 -3
- package/dist/components/UploaderFiles/UploaderFiles.js +1 -1
- package/dist/components/UploaderPhotos/UploaderPhotos.js +1 -1
- package/dist/components/Vote/Vote.d.ts +0 -8
- package/dist/components/Vote/Vote.js +4 -6
- package/dist/components/Vote/types.js +1 -0
- package/dist/components/index.d.ts +2 -14
- package/dist/components/index.js +2 -31
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/types.js +1 -0
- package/dist/index.js +2 -31
- package/dist/{label-P7Xsi5N7.js → label-BTEGh6O_.js} +2 -2
- package/dist/styles.module-Ugsf0AOb.js +38 -0
- package/package.json +1 -1
- package/dist/assets/Avatar.css +0 -1
- package/dist/assets/GosZnak.css +0 -1
- package/dist/assets/InputRangeSlider.css +0 -1
- package/dist/assets/SkeletonCircle.css +0 -1
- package/dist/assets/SkeletonText.css +0 -1
- package/dist/assets/Switcher.css +0 -1
- package/dist/assets/TwinSwitcher.css +0 -1
- package/dist/assets/variant.css +0 -1
- package/dist/components/Avatar/Avatar.d.ts +0 -3
- package/dist/components/Avatar/Avatar.js +0 -62
- package/dist/components/Avatar/constants.d.ts +0 -5
- package/dist/components/Avatar/constants.js +0 -9
- package/dist/components/Avatar/index.d.ts +0 -3
- package/dist/components/Avatar/index.js +0 -6
- package/dist/components/Avatar/types.d.ts +0 -10
- package/dist/components/DatePicker/utils.d.ts +0 -2
- package/dist/components/DatePicker/utils.js +0 -16
- package/dist/components/GosZnak/GosZnak.d.ts +0 -4
- package/dist/components/GosZnak/GosZnak.js +0 -76
- package/dist/components/GosZnak/constants.d.ts +0 -11
- package/dist/components/GosZnak/constants.js +0 -17
- package/dist/components/GosZnak/index.d.ts +0 -3
- package/dist/components/GosZnak/index.js +0 -7
- package/dist/components/GosZnak/types.d.ts +0 -26
- package/dist/components/InputRangeSlider/InputRangeSlider.d.ts +0 -3
- package/dist/components/InputRangeSlider/InputRangeSlider.js +0 -219
- package/dist/components/InputRangeSlider/constants.d.ts +0 -10
- package/dist/components/InputRangeSlider/constants.js +0 -18
- package/dist/components/InputRangeSlider/index.d.ts +0 -3
- package/dist/components/InputRangeSlider/index.js +0 -7
- package/dist/components/InputRangeSlider/types.d.ts +0 -33
- package/dist/components/Skeleton/SkeletonBrick/SkeletonBrick.d.ts +0 -12
- package/dist/components/Skeleton/SkeletonBrick/SkeletonBrick.js +0 -34
- package/dist/components/Skeleton/SkeletonCircle/SkeletonCircle.d.ts +0 -9
- package/dist/components/Skeleton/SkeletonCircle/SkeletonCircle.js +0 -31
- package/dist/components/Skeleton/SkeletonText/SkeletonText.d.ts +0 -10
- package/dist/components/Skeleton/SkeletonText/SkeletonText.js +0 -49
- package/dist/components/Skeleton/constants.d.ts +0 -5
- package/dist/components/Skeleton/constants.js +0 -9
- package/dist/components/Skeleton/index.d.ts +0 -4
- package/dist/components/Skeleton/index.js +0 -10
- package/dist/components/Switcher/Switcher.d.ts +0 -3
- package/dist/components/Switcher/Switcher.js +0 -118
- package/dist/components/Switcher/constants.d.ts +0 -4
- package/dist/components/Switcher/constants.js +0 -8
- package/dist/components/Switcher/index.d.ts +0 -3
- package/dist/components/Switcher/index.js +0 -6
- package/dist/components/Switcher/types.d.ts +0 -30
- package/dist/components/TwinSwitcher/TwinSwitcher.d.ts +0 -10
- package/dist/components/TwinSwitcher/TwinSwitcher.js +0 -65
- package/dist/components/TwinSwitcher/index.d.ts +0 -1
- package/dist/components/TwinSwitcher/index.js +0 -4
- package/dist/field-bS4z9Sdl.js +0 -12
- package/dist/styles.module-B9L4B63y.js +0 -40
- package/dist/variant.module-BinTBzAV.js +0 -15
@@ -1,17 +0,0 @@
|
|
1
|
-
var EGosZnakSize = /* @__PURE__ */ ((EGosZnakSize2) => {
|
2
|
-
EGosZnakSize2["S"] = "s";
|
3
|
-
EGosZnakSize2["L"] = "l";
|
4
|
-
return EGosZnakSize2;
|
5
|
-
})(EGosZnakSize || {});
|
6
|
-
var EGosZnakType = /* @__PURE__ */ ((EGosZnakType2) => {
|
7
|
-
EGosZnakType2["Normal"] = "normal";
|
8
|
-
EGosZnakType2["Traffic"] = "traffic";
|
9
|
-
EGosZnakType2["Military"] = "military";
|
10
|
-
EGosZnakType2["Police"] = "police";
|
11
|
-
EGosZnakType2["Diplomatic"] = "diplomatic";
|
12
|
-
return EGosZnakType2;
|
13
|
-
})(EGosZnakType || {});
|
14
|
-
export {
|
15
|
-
EGosZnakSize,
|
16
|
-
EGosZnakType
|
17
|
-
};
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import { EGosZnakSize, EGosZnakType } from './constants';
|
2
|
-
|
3
|
-
export type TGosZnakProps = {
|
4
|
-
/** Номер государственного знака */
|
5
|
-
number: string;
|
6
|
-
/** Код региона */
|
7
|
-
region: string;
|
8
|
-
/** Код страны */
|
9
|
-
country: string;
|
10
|
-
/** Размер госзнака. Если не указан, по умолчанию используется большой размер */
|
11
|
-
size?: EGosZnakSize | `${EGosZnakSize}`;
|
12
|
-
/** Тип госзнака. Если не указан, по умолчанию используется обычный тип */
|
13
|
-
type?: EGosZnakType | `${EGosZnakType}`;
|
14
|
-
/** Дополнительный CSS класс для стилизации */
|
15
|
-
className?: string;
|
16
|
-
/** Дополнительный CSS класс для стилизации номера */
|
17
|
-
numberClassName?: string;
|
18
|
-
/** Дополнительный CSS класс для стилизации региона */
|
19
|
-
regionClassName?: string;
|
20
|
-
/** Дополнительный CSS класс для стилизации страны */
|
21
|
-
countryClassName?: string;
|
22
|
-
/** Дополнительный CSS класс для стилизации контейнера номера */
|
23
|
-
numberContainerClassName?: string;
|
24
|
-
/** Дополнительный CSS класс для стилизации контейнера региона */
|
25
|
-
regionContainerClassName?: string;
|
26
|
-
};
|
@@ -1,3 +0,0 @@
|
|
1
|
-
import { TProps } from './types';
|
2
|
-
|
3
|
-
export declare const InputRangeSlider: import('react').MemoExoticComponent<({ min, max, value, disabled, isMinEqualMax, isSingleSlider, onChange, step, borderState, positions, minMaxDescriptions, onChangeValue, wrapperClassName, ...props }: TProps) => import("react/jsx-runtime").JSX.Element>;
|
@@ -1,219 +0,0 @@
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
2
|
-
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
|
-
import { memo, useState, useEffect } from "react";
|
4
|
-
import { EInputRangeSliderPositions, EInputRangeSliderBorderState, DEFAULT_STEP, DEFAULT_WIDTH } from "./constants.js";
|
5
|
-
import '../../assets/InputRangeSlider.css';const wrapper = "_wrapper_1kfjr_8";
|
6
|
-
const input = "_input_1kfjr_18";
|
7
|
-
const rail = "_rail_1kfjr_115";
|
8
|
-
const off = "_off_1kfjr_124";
|
9
|
-
const right = "_right_1kfjr_124";
|
10
|
-
const left = "_left_1kfjr_145";
|
11
|
-
const control = "_control_1kfjr_36";
|
12
|
-
const disabled = "_disabled_1kfjr_170";
|
13
|
-
const cls = {
|
14
|
-
"main-wrapper": "_main-wrapper_1kfjr_2",
|
15
|
-
wrapper,
|
16
|
-
"input-wrapper": "_input-wrapper_1kfjr_18",
|
17
|
-
"info-wrapper": "_info-wrapper_1kfjr_26",
|
18
|
-
"control-wrapper": "_control-wrapper_1kfjr_36",
|
19
|
-
input,
|
20
|
-
"equal-value": "_equal-value_1kfjr_108",
|
21
|
-
"is-double-range": "_is-double-range_1kfjr_111",
|
22
|
-
rail,
|
23
|
-
off,
|
24
|
-
right,
|
25
|
-
"double-range": "_double-range_1kfjr_124",
|
26
|
-
"inner-rail": "_inner-rail_1kfjr_134",
|
27
|
-
left,
|
28
|
-
control,
|
29
|
-
disabled
|
30
|
-
};
|
31
|
-
const InputRangeSlider = memo(
|
32
|
-
({
|
33
|
-
min,
|
34
|
-
max,
|
35
|
-
value,
|
36
|
-
disabled: disabled2,
|
37
|
-
isMinEqualMax = false,
|
38
|
-
isSingleSlider = true,
|
39
|
-
onChange,
|
40
|
-
step = DEFAULT_STEP,
|
41
|
-
borderState = EInputRangeSliderBorderState.ON,
|
42
|
-
positions = EInputRangeSliderPositions.LEFT,
|
43
|
-
minMaxDescriptions,
|
44
|
-
onChangeValue,
|
45
|
-
wrapperClassName,
|
46
|
-
...props
|
47
|
-
}) => {
|
48
|
-
const [minValue, setMinValue] = useState(() => (value == null ? void 0 : value.min) ?? min);
|
49
|
-
const [maxValue, setMaxValue] = useState(() => (value == null ? void 0 : value.max) ?? max);
|
50
|
-
const {
|
51
|
-
max: maxDescription,
|
52
|
-
min: minDescription,
|
53
|
-
maxClassName,
|
54
|
-
minClassName
|
55
|
-
} = minMaxDescriptions ?? {};
|
56
|
-
useEffect(() => {
|
57
|
-
if (value) {
|
58
|
-
value.min && setMinValue(value.min);
|
59
|
-
value.max && setMaxValue(value.max);
|
60
|
-
}
|
61
|
-
}, [value]);
|
62
|
-
const handleMinChange = (event) => {
|
63
|
-
event.preventDefault();
|
64
|
-
const newMinVal = Math.min(
|
65
|
-
+event.target.value,
|
66
|
-
isSingleSlider || isMinEqualMax ? maxValue : maxValue - step
|
67
|
-
);
|
68
|
-
if (!value) {
|
69
|
-
setMinValue(newMinVal);
|
70
|
-
}
|
71
|
-
onChangeValue == null ? void 0 : onChangeValue({ min: newMinVal, max: maxValue });
|
72
|
-
onChange == null ? void 0 : onChange(event);
|
73
|
-
};
|
74
|
-
const handleMaxChange = (event) => {
|
75
|
-
event.preventDefault();
|
76
|
-
const newMaxVal = Math.max(
|
77
|
-
+event.target.value,
|
78
|
-
isMinEqualMax ? minValue : minValue + step
|
79
|
-
);
|
80
|
-
if (!value) {
|
81
|
-
setMaxValue(newMaxVal);
|
82
|
-
}
|
83
|
-
onChangeValue == null ? void 0 : onChangeValue({ min: minValue, max: newMaxVal });
|
84
|
-
onChange == null ? void 0 : onChange(event);
|
85
|
-
};
|
86
|
-
const minPos = (minValue - min) / (max - min) * DEFAULT_WIDTH;
|
87
|
-
const maxPos = (maxValue - min) / (max - min) * DEFAULT_WIDTH;
|
88
|
-
const isLeftPosition = positions === EInputRangeSliderPositions.LEFT;
|
89
|
-
const isEqualValue = minValue === maxValue && maxPos !== 0;
|
90
|
-
const isOff = borderState === EInputRangeSliderBorderState.OFF;
|
91
|
-
const renderInputs = () => {
|
92
|
-
const inputProps = {
|
93
|
-
...props,
|
94
|
-
type: "range",
|
95
|
-
min,
|
96
|
-
max,
|
97
|
-
step
|
98
|
-
};
|
99
|
-
const leftInput = /* @__PURE__ */ jsx(
|
100
|
-
"input",
|
101
|
-
{
|
102
|
-
...inputProps,
|
103
|
-
className: classNames(cls.input, {
|
104
|
-
[cls["equal-value"]]: isEqualValue,
|
105
|
-
[cls["is-double-range"]]: !isSingleSlider
|
106
|
-
}),
|
107
|
-
disabled: disabled2,
|
108
|
-
value: minValue,
|
109
|
-
onChange: handleMinChange
|
110
|
-
}
|
111
|
-
);
|
112
|
-
const rightInput = /* @__PURE__ */ jsx(
|
113
|
-
"input",
|
114
|
-
{
|
115
|
-
...inputProps,
|
116
|
-
className: classNames(cls.input, {
|
117
|
-
[cls["is-double-range"]]: !isSingleSlider
|
118
|
-
}),
|
119
|
-
disabled: disabled2,
|
120
|
-
value: maxValue,
|
121
|
-
onChange: handleMaxChange
|
122
|
-
}
|
123
|
-
);
|
124
|
-
if (isSingleSlider) {
|
125
|
-
return isLeftPosition ? leftInput : rightInput;
|
126
|
-
}
|
127
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
128
|
-
leftInput,
|
129
|
-
rightInput
|
130
|
-
] });
|
131
|
-
};
|
132
|
-
const renderControls = () => {
|
133
|
-
const leftControl = /* @__PURE__ */ jsx(
|
134
|
-
"div",
|
135
|
-
{
|
136
|
-
className: classNames(cls.control, {
|
137
|
-
[cls.disabled]: disabled2
|
138
|
-
}),
|
139
|
-
style: {
|
140
|
-
left: `${minPos}%`
|
141
|
-
}
|
142
|
-
}
|
143
|
-
);
|
144
|
-
const rightControl = /* @__PURE__ */ jsx(
|
145
|
-
"div",
|
146
|
-
{
|
147
|
-
className: classNames(cls.control, {
|
148
|
-
[cls.disabled]: disabled2
|
149
|
-
}),
|
150
|
-
style: {
|
151
|
-
left: `${maxPos}%`
|
152
|
-
}
|
153
|
-
}
|
154
|
-
);
|
155
|
-
const getRailWidth = () => {
|
156
|
-
if (isOff) {
|
157
|
-
return isLeftPosition ? `${minPos}%` : `${DEFAULT_WIDTH - maxPos}%`;
|
158
|
-
}
|
159
|
-
return !isLeftPosition ? `${DEFAULT_WIDTH - maxPos}%` : void 0;
|
160
|
-
};
|
161
|
-
const innerRailRight = isSingleSlider && !isLeftPosition ? "0%" : `${DEFAULT_WIDTH - maxPos}%`;
|
162
|
-
const innerRailWidth = isSingleSlider && !isLeftPosition ? getRailWidth() : `${maxPos - minPos}%`;
|
163
|
-
const rail2 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
164
|
-
/* @__PURE__ */ jsx(
|
165
|
-
"div",
|
166
|
-
{
|
167
|
-
style: {
|
168
|
-
width: !isOff && !isLeftPosition ? `${maxPos}%` : getRailWidth()
|
169
|
-
},
|
170
|
-
className: classNames(cls.rail, cls[borderState], cls[positions], {
|
171
|
-
[cls["double-range"]]: !isSingleSlider
|
172
|
-
})
|
173
|
-
}
|
174
|
-
),
|
175
|
-
/* @__PURE__ */ jsx(
|
176
|
-
"div",
|
177
|
-
{
|
178
|
-
style: {
|
179
|
-
right: innerRailRight,
|
180
|
-
width: innerRailWidth
|
181
|
-
},
|
182
|
-
className: classNames(
|
183
|
-
cls["inner-rail"],
|
184
|
-
cls[borderState],
|
185
|
-
cls[positions],
|
186
|
-
{
|
187
|
-
[cls["double-range"]]: !isSingleSlider
|
188
|
-
}
|
189
|
-
)
|
190
|
-
}
|
191
|
-
)
|
192
|
-
] });
|
193
|
-
if (isSingleSlider) {
|
194
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
195
|
-
isLeftPosition ? leftControl : rightControl,
|
196
|
-
rail2
|
197
|
-
] });
|
198
|
-
}
|
199
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
200
|
-
leftControl,
|
201
|
-
rail2,
|
202
|
-
rightControl
|
203
|
-
] });
|
204
|
-
};
|
205
|
-
return /* @__PURE__ */ jsxs("div", { className: classNames(cls["main-wrapper"], wrapperClassName), children: [
|
206
|
-
/* @__PURE__ */ jsxs("div", { className: cls["info-wrapper"], children: [
|
207
|
-
!!minDescription && /* @__PURE__ */ jsx("div", { className: minClassName, children: minDescription }),
|
208
|
-
!!maxDescription && /* @__PURE__ */ jsx("div", { className: maxClassName, children: maxDescription })
|
209
|
-
] }),
|
210
|
-
/* @__PURE__ */ jsxs("div", { className: cls.wrapper, children: [
|
211
|
-
/* @__PURE__ */ jsx("div", { className: cls["control-wrapper"], children: renderControls() }),
|
212
|
-
/* @__PURE__ */ jsx("div", { className: cls["input-wrapper"], children: renderInputs() })
|
213
|
-
] })
|
214
|
-
] });
|
215
|
-
}
|
216
|
-
);
|
217
|
-
export {
|
218
|
-
InputRangeSlider
|
219
|
-
};
|
@@ -1,18 +0,0 @@
|
|
1
|
-
var EInputRangeSliderPositions = /* @__PURE__ */ ((EInputRangeSliderPositions2) => {
|
2
|
-
EInputRangeSliderPositions2["LEFT"] = "left";
|
3
|
-
EInputRangeSliderPositions2["RIGHT"] = "right";
|
4
|
-
return EInputRangeSliderPositions2;
|
5
|
-
})(EInputRangeSliderPositions || {});
|
6
|
-
var EInputRangeSliderBorderState = /* @__PURE__ */ ((EInputRangeSliderBorderState2) => {
|
7
|
-
EInputRangeSliderBorderState2["ON"] = "on";
|
8
|
-
EInputRangeSliderBorderState2["OFF"] = "off";
|
9
|
-
return EInputRangeSliderBorderState2;
|
10
|
-
})(EInputRangeSliderBorderState || {});
|
11
|
-
const DEFAULT_STEP = 1;
|
12
|
-
const DEFAULT_WIDTH = 100;
|
13
|
-
export {
|
14
|
-
DEFAULT_STEP,
|
15
|
-
DEFAULT_WIDTH,
|
16
|
-
EInputRangeSliderBorderState,
|
17
|
-
EInputRangeSliderPositions
|
18
|
-
};
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
2
|
-
import { EInputRangeSliderBorderState, EInputRangeSliderPositions } from './constants';
|
3
|
-
|
4
|
-
type TInputRangeSliderDoubleRangeProps = {
|
5
|
-
isSingleSlider: true;
|
6
|
-
positions?: EInputRangeSliderPositions | `${EInputRangeSliderPositions}`;
|
7
|
-
} | {
|
8
|
-
isSingleSlider?: false;
|
9
|
-
positions?: never;
|
10
|
-
};
|
11
|
-
export type TProps = TInputRangeSliderDoubleRangeProps & ({
|
12
|
-
min: number;
|
13
|
-
max: number;
|
14
|
-
step?: number;
|
15
|
-
wrapperClassName?: string;
|
16
|
-
isMinEqualMax?: boolean;
|
17
|
-
value?: {
|
18
|
-
min: number;
|
19
|
-
max: number;
|
20
|
-
};
|
21
|
-
onChangeValue?: (value: {
|
22
|
-
min: number;
|
23
|
-
max: number;
|
24
|
-
}) => void;
|
25
|
-
borderState?: EInputRangeSliderBorderState | `${EInputRangeSliderBorderState}`;
|
26
|
-
minMaxDescriptions?: {
|
27
|
-
min: ReactNode;
|
28
|
-
max: ReactNode;
|
29
|
-
minClassName?: string;
|
30
|
-
maxClassName?: string;
|
31
|
-
};
|
32
|
-
} & Omit<ComponentProps<'input'>, 'value'>);
|
33
|
-
export {};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { ComponentProps } from 'react';
|
2
|
-
import { ESkeletonVariant } from '../constants';
|
3
|
-
|
4
|
-
type TProps = ComponentProps<'div'> & {
|
5
|
-
className?: string;
|
6
|
-
width?: string | number;
|
7
|
-
height?: string | number;
|
8
|
-
borderRadius?: string | number;
|
9
|
-
variant?: `${ESkeletonVariant}` | ESkeletonVariant;
|
10
|
-
};
|
11
|
-
export declare const SkeletonBrick: ({ className, width, height, borderRadius, style, variant, ...otherProps }: TProps) => import("react/jsx-runtime").JSX.Element;
|
12
|
-
export {};
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
2
|
-
import { c as classNames } from "../../../index-CweZ_OcN.js";
|
3
|
-
import { ESkeletonVariant } from "../constants.js";
|
4
|
-
import { v as variantCls } from "../../../variant.module-BinTBzAV.js";
|
5
|
-
const SkeletonBrick = ({
|
6
|
-
className,
|
7
|
-
width = "100%",
|
8
|
-
height,
|
9
|
-
borderRadius = "var(--mimir-control-radius)",
|
10
|
-
style,
|
11
|
-
variant = ESkeletonVariant.WHITE,
|
12
|
-
...otherProps
|
13
|
-
}) => {
|
14
|
-
return /* @__PURE__ */ jsx(
|
15
|
-
"div",
|
16
|
-
{
|
17
|
-
...otherProps,
|
18
|
-
className: classNames(
|
19
|
-
variantCls.skeleton,
|
20
|
-
variantCls[variant],
|
21
|
-
className
|
22
|
-
),
|
23
|
-
style: {
|
24
|
-
...style,
|
25
|
-
width,
|
26
|
-
height,
|
27
|
-
borderRadius
|
28
|
-
}
|
29
|
-
}
|
30
|
-
);
|
31
|
-
};
|
32
|
-
export {
|
33
|
-
SkeletonBrick
|
34
|
-
};
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { ESkeletonVariant } from '../constants';
|
2
|
-
|
3
|
-
type TProps = {
|
4
|
-
className?: string;
|
5
|
-
size: number | string;
|
6
|
-
variant?: `${ESkeletonVariant}` | ESkeletonVariant;
|
7
|
-
};
|
8
|
-
export declare const SkeletonCircle: ({ className, variant, size }: TProps) => import("react/jsx-runtime").JSX.Element;
|
9
|
-
export {};
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
2
|
-
import { c as classNames } from "../../../index-CweZ_OcN.js";
|
3
|
-
import { ESkeletonVariant } from "../constants.js";
|
4
|
-
import { v as variantCls } from "../../../variant.module-BinTBzAV.js";
|
5
|
-
import '../../../assets/SkeletonCircle.css';const cls = {
|
6
|
-
"skeleton-circle": "_skeleton-circle_kxuh3_2"
|
7
|
-
};
|
8
|
-
const SkeletonCircle = ({
|
9
|
-
className,
|
10
|
-
variant = ESkeletonVariant.WHITE,
|
11
|
-
size
|
12
|
-
}) => {
|
13
|
-
return /* @__PURE__ */ jsx(
|
14
|
-
"div",
|
15
|
-
{
|
16
|
-
className: classNames(
|
17
|
-
cls["skeleton-circle"],
|
18
|
-
variantCls.skeleton,
|
19
|
-
variantCls[variant],
|
20
|
-
className
|
21
|
-
),
|
22
|
-
style: {
|
23
|
-
width: size,
|
24
|
-
height: size
|
25
|
-
}
|
26
|
-
}
|
27
|
-
);
|
28
|
-
};
|
29
|
-
export {
|
30
|
-
SkeletonCircle
|
31
|
-
};
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { ESkeletonVariant } from '../constants';
|
2
|
-
|
3
|
-
interface Props {
|
4
|
-
className?: string;
|
5
|
-
rows?: number;
|
6
|
-
variant?: `${ESkeletonVariant}` | ESkeletonVariant;
|
7
|
-
height?: string | number;
|
8
|
-
}
|
9
|
-
export declare const SkeletonText: import('react').MemoExoticComponent<({ rows, height, variant, ...props }: Props) => import("react/jsx-runtime").JSX.Element>;
|
10
|
-
export {};
|
@@ -1,49 +0,0 @@
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
2
|
-
import { c as classNames } from "../../../index-CweZ_OcN.js";
|
3
|
-
import { memo } from "react";
|
4
|
-
import { ESkeletonVariant } from "../constants.js";
|
5
|
-
import { SkeletonBrick } from "../SkeletonBrick/SkeletonBrick.js";
|
6
|
-
import '../../../assets/SkeletonText.css';const row = "_row_1ks6f_9";
|
7
|
-
const cls = {
|
8
|
-
"skeleton-text": "_skeleton-text_1ks6f_2",
|
9
|
-
row
|
10
|
-
};
|
11
|
-
const getRowWidth = (index, total) => {
|
12
|
-
if (index === total - 1) {
|
13
|
-
return "50%";
|
14
|
-
}
|
15
|
-
switch (index % 3) {
|
16
|
-
case 0:
|
17
|
-
return "100%";
|
18
|
-
case 1:
|
19
|
-
return "85%";
|
20
|
-
case 2:
|
21
|
-
return "93%";
|
22
|
-
default:
|
23
|
-
return "100%";
|
24
|
-
}
|
25
|
-
};
|
26
|
-
const SkeletonText = memo(
|
27
|
-
({
|
28
|
-
rows = 1,
|
29
|
-
height = 20,
|
30
|
-
variant = ESkeletonVariant.WHITE,
|
31
|
-
...props
|
32
|
-
}) => {
|
33
|
-
const { className } = props;
|
34
|
-
return /* @__PURE__ */ jsx("div", { className: classNames(cls["skeleton-text"], className), children: new Array(rows).fill(null).map((_, i) => {
|
35
|
-
return /* @__PURE__ */ jsx("div", { className: cls.row, children: /* @__PURE__ */ jsx(
|
36
|
-
SkeletonBrick,
|
37
|
-
{
|
38
|
-
variant,
|
39
|
-
height,
|
40
|
-
width: getRowWidth(i, rows),
|
41
|
-
style: { animationDelay: `${i * 0.125}s` }
|
42
|
-
}
|
43
|
-
) }, i);
|
44
|
-
}) }, rows);
|
45
|
-
}
|
46
|
-
);
|
47
|
-
export {
|
48
|
-
SkeletonText
|
49
|
-
};
|
@@ -1,9 +0,0 @@
|
|
1
|
-
var ESkeletonVariant = /* @__PURE__ */ ((ESkeletonVariant2) => {
|
2
|
-
ESkeletonVariant2["WHITE"] = "white";
|
3
|
-
ESkeletonVariant2["DARK_GRAY"] = "dark-gray";
|
4
|
-
ESkeletonVariant2["BLACK"] = "black";
|
5
|
-
return ESkeletonVariant2;
|
6
|
-
})(ESkeletonVariant || {});
|
7
|
-
export {
|
8
|
-
ESkeletonVariant
|
9
|
-
};
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { SkeletonBrick } from "./SkeletonBrick/SkeletonBrick.js";
|
2
|
-
import { SkeletonText } from "./SkeletonText/SkeletonText.js";
|
3
|
-
import { SkeletonCircle } from "./SkeletonCircle/SkeletonCircle.js";
|
4
|
-
import { ESkeletonVariant } from "./constants.js";
|
5
|
-
export {
|
6
|
-
ESkeletonVariant,
|
7
|
-
SkeletonBrick,
|
8
|
-
SkeletonCircle,
|
9
|
-
SkeletonText
|
10
|
-
};
|
@@ -1,118 +0,0 @@
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
-
import { H as H$1 } from "../../field-bS4z9Sdl.js";
|
3
|
-
import { K, w, z, U, u, a, b as l, T, I, G, j, p as p$1 } from "../../label-P7Xsi5N7.js";
|
4
|
-
import { W, H, y, p, o, $ as $f7dceffc5ad7768b$export$4e328f61c538687f, b as $6179b936705e76d3$export$ae780daf29e6d456, D, c as o$1 } from "../../keyboard-B256ZoM-.js";
|
5
|
-
import React__default, { createContext, useState, useMemo, useId, useContext, useRef, useCallback, Fragment, forwardRef } from "react";
|
6
|
-
import { w as w$1 } from "../../use-active-press-B6yeSopF.js";
|
7
|
-
import { T as T$1 } from "../../use-resolve-button-type-B6LE6gU3.js";
|
8
|
-
import { r } from "../../bugs-CSBdWk0R.js";
|
9
|
-
import { c as classNames } from "../../index-CweZ_OcN.js";
|
10
|
-
import { ELabelPositions } from "./constants.js";
|
11
|
-
import '../../assets/Switcher.css';let S = createContext(null);
|
12
|
-
S.displayName = "GroupContext";
|
13
|
-
let _e = Fragment;
|
14
|
-
function Pe(n) {
|
15
|
-
var a2;
|
16
|
-
let [o2, p2] = useState(null), [f, b] = z(), [h, t] = U(), c = useMemo(() => ({ switch: o2, setSwitch: p2 }), [o2, p2]), T2 = {}, y2 = n;
|
17
|
-
return React__default.createElement(t, { name: "Switch.Description", value: h }, React__default.createElement(b, { name: "Switch.Label", value: f, props: { htmlFor: (a2 = c.switch) == null ? void 0 : a2.id, onClick(u2) {
|
18
|
-
o2 && (u2.currentTarget instanceof HTMLLabelElement && u2.preventDefault(), o2.click(), o2.focus({ preventScroll: true }));
|
19
|
-
} } }, React__default.createElement(S.Provider, { value: c }, H({ ourProps: T2, theirProps: y2, slot: {}, defaultTag: _e, name: "Switch.Group" }))));
|
20
|
-
}
|
21
|
-
let Ee = "button";
|
22
|
-
function De(n, o$2) {
|
23
|
-
var C;
|
24
|
-
let p$2 = useId(), f = u(), b = a(), { id: h = f || `headlessui-switch-${p$2}`, disabled: t = b || false, checked: c, defaultChecked: T$2, onChange: y$1, name: a$1, value: u$1, form: F, autoFocus: d = false, ...k } = n, w2 = useContext(S), _ = useRef(null), H$12 = y(_, o$2, w2 === null ? null : w2.setSwitch), l$1 = l(T$2), [s, r$1] = T(c, y$1, l$1 != null ? l$1 : false), M = p(), [P, E] = useState(false), D$1 = o(() => {
|
25
|
-
E(true), r$1 == null || r$1(!s), M.nextFrame(() => {
|
26
|
-
E(false);
|
27
|
-
});
|
28
|
-
}), U2 = o((e) => {
|
29
|
-
if (r(e.currentTarget)) return e.preventDefault();
|
30
|
-
e.preventDefault(), D$1();
|
31
|
-
}), I$1 = o((e) => {
|
32
|
-
e.key === o$1.Space ? (e.preventDefault(), D$1()) : e.key === o$1.Enter && p$1(e.currentTarget);
|
33
|
-
}), B = o((e) => e.preventDefault()), K2 = I(), W2 = G(), { isFocusVisible: g, focusProps: O } = $f7dceffc5ad7768b$export$4e328f61c538687f({ autoFocus: d }), { isHovered: v, hoverProps: N } = $6179b936705e76d3$export$ae780daf29e6d456({ isDisabled: t }), { pressed: x, pressProps: J } = w$1({ disabled: t }), V = useMemo(() => ({ checked: s, disabled: t, hover: v, focus: g, active: x, autofocus: d, changing: P }), [s, v, g, x, t, P, d]), X = D({ id: h, ref: H$12, role: "switch", type: T$1(n, _), tabIndex: n.tabIndex === -1 ? 0 : (C = n.tabIndex) != null ? C : 0, "aria-checked": s, "aria-labelledby": K2, "aria-describedby": W2, disabled: t || void 0, autoFocus: d, onClick: U2, onKeyUp: I$1, onKeyPress: B }, O, N, J), j$1 = useCallback(() => {
|
34
|
-
if (l$1 !== void 0) return r$1 == null ? void 0 : r$1(l$1);
|
35
|
-
}, [r$1, l$1]);
|
36
|
-
return React__default.createElement(React__default.Fragment, null, a$1 != null && React__default.createElement(j, { disabled: t, data: { [a$1]: u$1 || "on" }, overrides: { type: "checkbox", checked: s }, form: F, onReset: j$1 }), H({ ourProps: X, theirProps: k, slot: V, defaultTag: Ee, name: "Switch" }));
|
37
|
-
}
|
38
|
-
let ge = W(De), ve = Pe, xe = K, Ce = w, qe = Object.assign(ge, { Group: ve, Label: xe, Description: Ce });
|
39
|
-
const left = "_left_gu0m2_14";
|
40
|
-
const right = "_right_gu0m2_17";
|
41
|
-
const label = "_label_gu0m2_21";
|
42
|
-
const switcher = "_switcher_gu0m2_2";
|
43
|
-
const cls = {
|
44
|
-
"switcher-wrapper": "_switcher-wrapper_gu0m2_2",
|
45
|
-
left,
|
46
|
-
right,
|
47
|
-
label,
|
48
|
-
switcher,
|
49
|
-
"switcher-checked": "_switcher-checked_gu0m2_45",
|
50
|
-
"switcher-thumb": "_switcher-thumb_gu0m2_55",
|
51
|
-
"switcher-checked-thumb": "_switcher-checked-thumb_gu0m2_65"
|
52
|
-
};
|
53
|
-
const Switcher = forwardRef(
|
54
|
-
({
|
55
|
-
id,
|
56
|
-
label: label2,
|
57
|
-
hasLabel = false,
|
58
|
-
labelPosition = ELabelPositions.LEFT,
|
59
|
-
className,
|
60
|
-
labelClassName,
|
61
|
-
switcherThumbClassName,
|
62
|
-
wrapperClassName,
|
63
|
-
children,
|
64
|
-
checked,
|
65
|
-
...props
|
66
|
-
}, ref) => {
|
67
|
-
const renderChildren = (bag) => {
|
68
|
-
if (typeof children === "function") {
|
69
|
-
return children({ ...bag, checked });
|
70
|
-
} else {
|
71
|
-
return children;
|
72
|
-
}
|
73
|
-
};
|
74
|
-
return /* @__PURE__ */ jsxs(
|
75
|
-
H$1,
|
76
|
-
{
|
77
|
-
className: classNames(
|
78
|
-
cls["switcher-wrapper"],
|
79
|
-
wrapperClassName,
|
80
|
-
cls[labelPosition]
|
81
|
-
),
|
82
|
-
children: [
|
83
|
-
label2 && hasLabel && /* @__PURE__ */ jsx(K, { className: classNames(cls.label, labelClassName), htmlFor: id, children: label2 }),
|
84
|
-
/* @__PURE__ */ jsxs(
|
85
|
-
qe,
|
86
|
-
{
|
87
|
-
...props,
|
88
|
-
id,
|
89
|
-
ref,
|
90
|
-
className: classNames(cls.switcher, className, {
|
91
|
-
[cls["switcher-checked"]]: checked
|
92
|
-
}),
|
93
|
-
children: [
|
94
|
-
renderChildren({ checked }),
|
95
|
-
/* @__PURE__ */ jsx(
|
96
|
-
"span",
|
97
|
-
{
|
98
|
-
"aria-hidden": "true",
|
99
|
-
className: classNames(
|
100
|
-
cls["switcher-thumb"],
|
101
|
-
switcherThumbClassName,
|
102
|
-
{
|
103
|
-
[cls["switcher-checked-thumb"]]: checked
|
104
|
-
}
|
105
|
-
)
|
106
|
-
}
|
107
|
-
)
|
108
|
-
]
|
109
|
-
}
|
110
|
-
)
|
111
|
-
]
|
112
|
-
}
|
113
|
-
);
|
114
|
-
}
|
115
|
-
);
|
116
|
-
export {
|
117
|
-
Switcher
|
118
|
-
};
|