mimir-ui-kit 1.34.2 → 1.34.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{Input-ChCIy5oY.js → Input-DspsU5F4.js} +27 -23
- package/dist/{ProgressBar-CwLwhaeM.js → ProgressBar-DWKyrXzd.js} +23 -23
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/AccordionItem.css +1 -1
- package/dist/assets/Avatar.css +1 -0
- 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/GosZnak.css +1 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputPassword.css +1 -1
- package/dist/assets/InputRangeSlider.css +1 -0
- 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/SkeletonCircle.css +1 -0
- package/dist/assets/SkeletonText.css +1 -0
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/Switcher.css +1 -0
- 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/TwinSwitcher.css +1 -0
- 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/assets/variant.css +1 -0
- package/dist/components/Accordion/Accordion.js +24 -16
- package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
- package/dist/components/AnchorLink/Link.js +9 -9
- package/dist/components/Avatar/Avatar.d.ts +3 -0
- package/dist/components/Avatar/Avatar.js +62 -0
- package/dist/components/Avatar/constants.d.ts +5 -0
- package/dist/components/Avatar/constants.js +9 -0
- package/dist/components/Avatar/index.d.ts +3 -0
- package/dist/components/Avatar/index.js +6 -0
- package/dist/components/Avatar/types.d.ts +10 -0
- package/dist/components/Button/Button.js +33 -33
- package/dist/components/CheckboxMimir/CheckboxMimir.js +16 -19
- package/dist/components/Chip/Chip.js +12 -12
- package/dist/components/DatePicker/DatePicker.d.ts +36 -18
- package/dist/components/DatePicker/DatePicker.js +46 -6
- package/dist/components/DatePicker/DatePickerModal.js +78 -62
- package/dist/components/DatePicker/MonthPickerModal.js +14 -6
- package/dist/components/DatePicker/YearPickerModal.js +2 -2
- package/dist/components/DatePicker/utils.d.ts +2 -0
- package/dist/components/DatePicker/utils.js +16 -0
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +20 -20
- package/dist/components/GosZnak/GosZnak.d.ts +4 -0
- package/dist/components/GosZnak/GosZnak.js +76 -0
- package/dist/components/GosZnak/constants.d.ts +11 -0
- package/dist/components/GosZnak/constants.js +17 -0
- package/dist/components/GosZnak/index.d.ts +3 -0
- package/dist/components/GosZnak/index.js +7 -0
- package/dist/components/GosZnak/types.d.ts +26 -0
- package/dist/components/Input/Input.d.ts +5 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/constants.d.ts +5 -3
- package/dist/components/Input/constants.js +7 -3
- package/dist/components/Input/index.d.ts +2 -2
- package/dist/components/Input/index.js +3 -2
- package/dist/components/Input/types.d.ts +2 -6
- package/dist/components/InputPassword/InputPassword.js +8 -8
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/InputRangeSlider/InputRangeSlider.d.ts +3 -0
- package/dist/components/InputRangeSlider/InputRangeSlider.js +219 -0
- package/dist/components/InputRangeSlider/constants.d.ts +10 -0
- package/dist/components/InputRangeSlider/constants.js +18 -0
- package/dist/components/InputRangeSlider/index.d.ts +3 -0
- package/dist/components/InputRangeSlider/index.js +7 -0
- package/dist/components/InputRangeSlider/types.d.ts +33 -0
- 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/OtpInput/OtpInput.js +5 -5
- package/dist/components/Pagination/Pagination.d.ts +1 -3
- package/dist/components/Pagination/Pagination.js +7 -11
- package/dist/components/RadioGroup/RadioGroup.js +9 -9
- package/dist/components/SelectSearch/SelectSearch.d.ts +18 -2
- package/dist/components/SelectSearch/SelectSearch.js +47 -31
- package/dist/components/SelectSearch/types.d.ts +2 -4
- package/dist/components/Skeleton/SkeletonBrick/SkeletonBrick.d.ts +12 -0
- package/dist/components/Skeleton/SkeletonBrick/SkeletonBrick.js +34 -0
- package/dist/components/Skeleton/SkeletonCircle/SkeletonCircle.d.ts +9 -0
- package/dist/components/Skeleton/SkeletonCircle/SkeletonCircle.js +31 -0
- package/dist/components/Skeleton/SkeletonText/SkeletonText.d.ts +10 -0
- package/dist/components/Skeleton/SkeletonText/SkeletonText.js +49 -0
- package/dist/components/Skeleton/constants.d.ts +5 -0
- package/dist/components/Skeleton/constants.js +9 -0
- package/dist/components/Skeleton/index.d.ts +4 -0
- package/dist/components/Skeleton/index.js +10 -0
- package/dist/components/Slider/Slider.d.ts +3 -2
- package/dist/components/Slider/Slider.js +12 -10
- package/dist/components/Steps/Steps.d.ts +4 -0
- package/dist/components/Steps/Steps.js +5 -1
- package/dist/components/Switcher/Switcher.d.ts +3 -0
- package/dist/components/Switcher/Switcher.js +118 -0
- package/dist/components/Switcher/constants.d.ts +4 -0
- package/dist/components/Switcher/constants.js +8 -0
- package/dist/components/Switcher/index.d.ts +3 -0
- package/dist/components/Switcher/index.js +6 -0
- package/dist/components/Switcher/types.d.ts +30 -0
- package/dist/components/TabTrail/TabTrail.d.ts +8 -0
- package/dist/components/TabTrail/TabTrail.js +33 -17
- package/dist/components/Tag/Tag.js +6 -6
- package/dist/components/TextArea/TextArea.js +14 -12
- package/dist/components/TextArea/hooks.js +4 -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/TwinSwitcher/TwinSwitcher.d.ts +10 -0
- package/dist/components/TwinSwitcher/TwinSwitcher.js +65 -0
- package/dist/components/TwinSwitcher/index.d.ts +1 -0
- package/dist/components/TwinSwitcher/index.js +4 -0
- package/dist/components/UniversalUploader/UniversalUploader.js +21 -35
- 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 +8 -0
- package/dist/components/Vote/Vote.js +6 -4
- package/dist/components/index.d.ts +14 -2
- package/dist/components/index.js +31 -2
- package/dist/field-bS4z9Sdl.js +12 -0
- package/dist/icons/Icon.js +1 -1
- package/dist/index.js +31 -2
- package/dist/{label-BTEGh6O_.js → label-P7Xsi5N7.js} +2 -2
- package/dist/styles.module-B9L4B63y.js +40 -0
- package/dist/variant.module-BinTBzAV.js +15 -0
- package/package.json +1 -1
- package/dist/components/Button/types.js +0 -1
- package/dist/components/Input/types.js +0 -1
- package/dist/components/NotificationBadge/types.js +0 -1
- package/dist/components/Pagination/types.js +0 -1
- package/dist/components/SelectSearch/types.js +0 -1
- package/dist/components/Steps/types.js +0 -1
- package/dist/components/Tag/types.js +0 -1
- package/dist/components/TextArea/types.js +0 -1
- package/dist/components/Toasts/types.js +0 -1
- package/dist/components/UniversalUploader/types.js +0 -1
- package/dist/components/Vote/types.js +0 -1
- package/dist/icons/components/types.js +0 -1
- package/dist/styles.module-Ugsf0AOb.js +0 -38
@@ -4,14 +4,14 @@ import * as React from "react";
|
|
4
4
|
import React__default, { useReducer, useMemo, useSyncExternalStore, useId as useId$1, useEffect, useCallback, useRef, useLayoutEffect, createContext, useContext, useState, Fragment, createRef, forwardRef } from "react";
|
5
5
|
import { ESelectSearchSize } from "./constants.js";
|
6
6
|
import { Icon } from "../../icons/Icon.js";
|
7
|
-
import { I as Input } from "../../Input-
|
7
|
+
import { I as Input } from "../../Input-DspsU5F4.js";
|
8
8
|
import { EInputVariant, EInputSize } from "../Input/constants.js";
|
9
9
|
import { n as n$2, u as u$3, d as o$1, s as s$3, o as o$2, p as p$1, t as t$3, e as s$4, W as W$1, y as y$3, T, H, M as M$1, a as u$5, $ as $f7dceffc5ad7768b$export$4e328f61c538687f, b as $6179b936705e76d3$export$ae780daf29e6d456, D as D$2, c as o$3 } from "../../keyboard-B256ZoM-.js";
|
10
10
|
import * as ReactDOM from "react-dom";
|
11
11
|
import { flushSync, createPortal } from "react-dom";
|
12
12
|
import { w } from "../../use-active-press-B6yeSopF.js";
|
13
13
|
import { u as u$4 } from "../../use-by-comparator-BUO78DGe.js";
|
14
|
-
import { K, a as a$5,
|
14
|
+
import { K, a as a$5, b as l$3, T as T$1, z, j as j$1, u as u$6, I as I$1, G } from "../../label-P7Xsi5N7.js";
|
15
15
|
import { A, h as h$1, f as f$6, _ } from "../../focus-management-1rQPII7Z.js";
|
16
16
|
import { T as T$2 } from "../../use-resolve-button-type-B6LE6gU3.js";
|
17
17
|
import { c as c$2, i as i$2, u as u$7, V, A as A$1 } from "../../open-closed-CbXq00et.js";
|
@@ -3752,35 +3752,36 @@ function No(o2, r2) {
|
|
3752
3752
|
return H({ ourProps: { id: d2, ref: M2, role: "option", tabIndex: s2 === true ? void 0 : -1, "aria-disabled": s2 === true ? true : void 0, "aria-selected": C, disabled: void 0, onMouseDown: y2, onFocus: A2, onPointerEnter: h2, onMouseEnter: h2, onPointerMove: O, onMouseMove: O, onPointerLeave: G2, onMouseLeave: G2 }, theirProps: a3, slot: J2, defaultTag: ko, name: "Combobox.Option" });
|
3753
3753
|
}
|
3754
3754
|
let Uo = W$1(ho), Ho = W$1(Vo), Go = W$1(Mo), jo = K, zo = W$1(Bo), Ko = W$1(No), Nt = Object.assign(Uo, { Input: Go, Button: Ho, Label: jo, Options: zo, Option: Ko });
|
3755
|
-
const disabled = "
|
3756
|
-
const container = "
|
3757
|
-
const full = "
|
3758
|
-
const button = "
|
3759
|
-
const options = "
|
3760
|
-
const top = "
|
3761
|
-
const bottom = "
|
3762
|
-
const m = "
|
3763
|
-
const l = "
|
3764
|
-
const option = "
|
3755
|
+
const disabled = "_disabled_a63ul_5";
|
3756
|
+
const container = "_container_a63ul_9";
|
3757
|
+
const full = "_full_a63ul_22";
|
3758
|
+
const button = "_button_a63ul_34";
|
3759
|
+
const options = "_options_a63ul_52";
|
3760
|
+
const top = "_top_a63ul_63";
|
3761
|
+
const bottom = "_bottom_a63ul_68";
|
3762
|
+
const m = "_m_a63ul_95";
|
3763
|
+
const l = "_l_a63ul_108";
|
3764
|
+
const option = "_option_a63ul_52";
|
3765
3765
|
const cls = {
|
3766
|
-
"select-search": "_select-
|
3766
|
+
"select-search": "_select-search_a63ul_2",
|
3767
3767
|
disabled,
|
3768
3768
|
container,
|
3769
|
-
"container-open": "_container-
|
3769
|
+
"container-open": "_container-open_a63ul_18",
|
3770
3770
|
full,
|
3771
|
-
"
|
3771
|
+
"selected-icon": "_selected-icon_a63ul_26",
|
3772
|
+
"selector-icon-open": "_selector-icon-open_a63ul_30",
|
3772
3773
|
button,
|
3774
|
+
"selector-icon": "_selector-icon_a63ul_30",
|
3773
3775
|
options,
|
3774
3776
|
top,
|
3775
3777
|
bottom,
|
3776
|
-
"no-options": "_no-
|
3778
|
+
"no-options": "_no-options_a63ul_89",
|
3777
3779
|
m,
|
3778
3780
|
l,
|
3779
|
-
"custom-input-class": "_custom-input-
|
3781
|
+
"custom-input-class": "_custom-input-class_a63ul_121",
|
3780
3782
|
option,
|
3781
|
-
"option-active": "_option-
|
3782
|
-
"option-inner": "_option-
|
3783
|
-
"selected-icon": "_selected-icon_1bdke_133"
|
3783
|
+
"option-active": "_option-active_a63ul_137",
|
3784
|
+
"option-inner": "_option-inner_a63ul_140"
|
3784
3785
|
};
|
3785
3786
|
const SelectSearch = forwardRef(
|
3786
3787
|
(props, ref) => {
|
@@ -3799,9 +3800,11 @@ const SelectSearch = forwardRef(
|
|
3799
3800
|
variant = EInputVariant.DefaultGray,
|
3800
3801
|
menuPlacement = "bottom",
|
3801
3802
|
disabled: disabled2 = false,
|
3802
|
-
searchProps
|
3803
|
+
searchProps,
|
3804
|
+
withClearButton = false
|
3803
3805
|
} = props;
|
3804
|
-
const [
|
3806
|
+
const currentInputValue = String((value == null ? void 0 : value[displayValue]) || "");
|
3807
|
+
const [inputValue, setInputValue] = useState(currentInputValue);
|
3805
3808
|
const mapSizeToInputSize = (size22) => {
|
3806
3809
|
switch (size22) {
|
3807
3810
|
case ESelectSearchSize.M:
|
@@ -3841,8 +3844,8 @@ const SelectSearch = forwardRef(
|
|
3841
3844
|
[onChange, onSearch, value]
|
3842
3845
|
);
|
3843
3846
|
useEffect(() => {
|
3844
|
-
setInputValue(
|
3845
|
-
}, [
|
3847
|
+
setInputValue(currentInputValue);
|
3848
|
+
}, [currentInputValue]);
|
3846
3849
|
return /* @__PURE__ */ jsx(
|
3847
3850
|
Nt,
|
3848
3851
|
{
|
@@ -3875,18 +3878,29 @@ const SelectSearch = forwardRef(
|
|
3875
3878
|
value: inputValue,
|
3876
3879
|
disabled: disabled2,
|
3877
3880
|
variant,
|
3881
|
+
withClearButton,
|
3882
|
+
"data-testid": "select-search-input",
|
3878
3883
|
...searchProps
|
3879
3884
|
}
|
3880
3885
|
),
|
3881
|
-
showArrow && /* @__PURE__ */ jsx(
|
3882
|
-
|
3886
|
+
showArrow && /* @__PURE__ */ jsx(
|
3887
|
+
Ho,
|
3883
3888
|
{
|
3884
|
-
|
3885
|
-
|
3886
|
-
|
3887
|
-
|
3889
|
+
className: classNames(cls.button, {
|
3890
|
+
[cls.disabled]: disabled2
|
3891
|
+
}),
|
3892
|
+
disabled: disabled2,
|
3893
|
+
children: /* @__PURE__ */ jsx(
|
3894
|
+
Icon,
|
3895
|
+
{
|
3896
|
+
iconName: size2 == ESelectSearchSize.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
3897
|
+
className: classNames(cls["selector-icon"], {
|
3898
|
+
[cls["selector-icon-open"]]: open
|
3899
|
+
})
|
3900
|
+
}
|
3901
|
+
)
|
3888
3902
|
}
|
3889
|
-
)
|
3903
|
+
)
|
3890
3904
|
]
|
3891
3905
|
}
|
3892
3906
|
),
|
@@ -3913,6 +3927,7 @@ const SelectSearch = forwardRef(
|
|
3913
3927
|
) : /* @__PURE__ */ jsx(
|
3914
3928
|
zo,
|
3915
3929
|
{
|
3930
|
+
"data-testid": "select-search-options",
|
3916
3931
|
className: classNames(
|
3917
3932
|
cls.options,
|
3918
3933
|
cls[size2],
|
@@ -3930,6 +3945,7 @@ const SelectSearch = forwardRef(
|
|
3930
3945
|
[cls["option-active"]]: focus
|
3931
3946
|
}
|
3932
3947
|
),
|
3948
|
+
"data-testid": `select-search-option-${item.id}`,
|
3933
3949
|
children: ({ selected }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
3934
3950
|
/* @__PURE__ */ jsxs("div", { className: cls["option-inner"], children: [
|
3935
3951
|
item.name,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
import { ESelectSearchSize } from './constants';
|
3
|
-
import { TInputProps
|
3
|
+
import { TInputProps } from '../Input';
|
4
4
|
|
5
5
|
export type TSelectOption = {
|
6
6
|
name: string;
|
@@ -9,7 +9,7 @@ export type TSelectOption = {
|
|
9
9
|
[index: string]: unknown;
|
10
10
|
};
|
11
11
|
export type TMenuPlacement = 'top' | 'bottom';
|
12
|
-
export type TSelectSearchProps = {
|
12
|
+
export type TSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'variant'> & {
|
13
13
|
/**
|
14
14
|
* Текущее выбранное значение.
|
15
15
|
*/
|
@@ -44,8 +44,6 @@ export type TSelectSearchProps = {
|
|
44
44
|
items: TSelectOption[];
|
45
45
|
/** Класснейм для значения */
|
46
46
|
classNameOption?: string;
|
47
|
-
/** Варианты отображения ввода */
|
48
|
-
variant?: TVariant;
|
49
47
|
/** Варианты отображения выпадающего меню */
|
50
48
|
menuPlacement?: TMenuPlacement;
|
51
49
|
/** Отключает компонент SelectSearch */
|
@@ -0,0 +1,12 @@
|
|
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 {};
|
@@ -0,0 +1,34 @@
|
|
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
|
+
};
|
@@ -0,0 +1,9 @@
|
|
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 {};
|
@@ -0,0 +1,31 @@
|
|
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
|
+
};
|
@@ -0,0 +1,10 @@
|
|
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 {};
|
@@ -0,0 +1,49 @@
|
|
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
|
+
};
|
@@ -0,0 +1,9 @@
|
|
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
|
+
};
|
@@ -0,0 +1,10 @@
|
|
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,5 +1,6 @@
|
|
1
|
+
import { SwiperProps } from 'swiper/react';
|
1
2
|
|
2
|
-
type TProps = {
|
3
|
+
type TProps = SwiperProps & {
|
3
4
|
/**
|
4
5
|
* Задержка перехода между слайдами
|
5
6
|
*/
|
@@ -30,5 +31,5 @@ type TProps = {
|
|
30
31
|
/**
|
31
32
|
* Компонент слайдера c прогресс баром.
|
32
33
|
*/
|
33
|
-
export declare const Slider: ({ images, swiperClassName, slideClassName, imageClassName, delay }: TProps) => import("react/jsx-runtime").JSX.Element;
|
34
|
+
export declare const Slider: ({ images, swiperClassName, slideClassName, imageClassName, delay, ...props }: TProps) => import("react/jsx-runtime").JSX.Element;
|
34
35
|
export {};
|
@@ -300,14 +300,14 @@ import '../../assets/Slider.css';function Autoplay(_ref) {
|
|
300
300
|
resume
|
301
301
|
});
|
302
302
|
}
|
303
|
-
const swiper = "
|
304
|
-
const slide = "
|
305
|
-
const link = "
|
306
|
-
const image = "
|
307
|
-
const navigation = "
|
308
|
-
const pagination = "
|
309
|
-
const slides = "
|
310
|
-
const separator = "
|
303
|
+
const swiper = "_swiper_rfcv9_3";
|
304
|
+
const slide = "_slide_rfcv9_9";
|
305
|
+
const link = "_link_rfcv9_16";
|
306
|
+
const image = "_image_rfcv9_22";
|
307
|
+
const navigation = "_navigation_rfcv9_29";
|
308
|
+
const pagination = "_pagination_rfcv9_39";
|
309
|
+
const slides = "_slides_rfcv9_54";
|
310
|
+
const separator = "_separator_rfcv9_60";
|
311
311
|
const cls = {
|
312
312
|
swiper,
|
313
313
|
slide,
|
@@ -318,12 +318,14 @@ const cls = {
|
|
318
318
|
slides,
|
319
319
|
separator
|
320
320
|
};
|
321
|
+
const DEFAULT_DELAY = 15e3;
|
321
322
|
const Slider = ({
|
322
323
|
images,
|
323
324
|
swiperClassName,
|
324
325
|
slideClassName,
|
325
326
|
imageClassName,
|
326
|
-
delay =
|
327
|
+
delay = DEFAULT_DELAY,
|
328
|
+
...props
|
327
329
|
}) => {
|
328
330
|
const progressBar = useRef(null);
|
329
331
|
const swiperRef = useRef(null);
|
@@ -349,10 +351,10 @@ const Slider = ({
|
|
349
351
|
return /* @__PURE__ */ jsxs(
|
350
352
|
Swiper,
|
351
353
|
{
|
354
|
+
...props,
|
352
355
|
ref: swiperRef,
|
353
356
|
className: classNames(cls.swiper, swiperClassName),
|
354
357
|
loop: true,
|
355
|
-
centeredSlides: true,
|
356
358
|
autoplay: {
|
357
359
|
delay,
|
358
360
|
disableOnInteraction: false
|
@@ -31,6 +31,7 @@ const Steps = forwardRef(
|
|
31
31
|
rootClassName,
|
32
32
|
stepClassName,
|
33
33
|
quantity,
|
34
|
+
needZeroValue = true,
|
34
35
|
current = ZERO_STEP,
|
35
36
|
editable: editable2 = false,
|
36
37
|
size = EStepsSize.M,
|
@@ -64,7 +65,10 @@ const Steps = forwardRef(
|
|
64
65
|
const handleClick = (idx) => {
|
65
66
|
const clickedStep = idx + DIFF_BETWEEN_STEP_AND_INDEX;
|
66
67
|
stepWasChangedRef.current = true;
|
67
|
-
|
68
|
+
if (needZeroValue) {
|
69
|
+
return setStep(clickedStep !== step2 ? clickedStep : ZERO_STEP);
|
70
|
+
}
|
71
|
+
setStep(clickedStep);
|
68
72
|
};
|
69
73
|
useEffect(() => {
|
70
74
|
if (stepWasChangedRef.current === true) {
|
@@ -0,0 +1,118 @@
|
|
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
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { SwitchProps } from '@headlessui/react';
|
2
|
+
import { ReactNode } from 'react';
|
3
|
+
import { ELabelPositions } from './constants';
|
4
|
+
|
5
|
+
export type SwitchRenderPropArg = {
|
6
|
+
checked?: boolean;
|
7
|
+
hover?: boolean;
|
8
|
+
focus?: boolean;
|
9
|
+
active?: boolean;
|
10
|
+
autofocus?: boolean;
|
11
|
+
changing?: boolean;
|
12
|
+
disabled?: boolean;
|
13
|
+
};
|
14
|
+
type TLabelProps = {
|
15
|
+
hasLabel: true;
|
16
|
+
label: ReactNode;
|
17
|
+
labelClassName?: string;
|
18
|
+
labelPosition?: ELabelPositions | `${ELabelPositions}`;
|
19
|
+
} | {
|
20
|
+
hasLabel: false;
|
21
|
+
label?: never;
|
22
|
+
labelClassName?: never;
|
23
|
+
labelPosition?: never;
|
24
|
+
};
|
25
|
+
export type TProps = SwitchProps & TLabelProps & {
|
26
|
+
className?: string;
|
27
|
+
switcherThumbClassName?: string;
|
28
|
+
wrapperClassName?: string;
|
29
|
+
};
|
30
|
+
export {};
|
@@ -31,5 +31,13 @@ export type TTabTrailProps = {
|
|
31
31
|
* Класснейм для TabTrail.
|
32
32
|
*/
|
33
33
|
className?: string;
|
34
|
+
/**
|
35
|
+
* Индекс выбранного таба.
|
36
|
+
*/
|
37
|
+
selectedTabIndex?: number;
|
38
|
+
/**
|
39
|
+
* Функция обратного вызова при изменении выбранного таба.
|
40
|
+
*/
|
41
|
+
onTabChange?: (index: number) => void;
|
34
42
|
};
|
35
43
|
export declare const TabTrail: import('react').ForwardRefExoticComponent<TTabTrailProps & import('react').RefAttributes<HTMLElement>>;
|