mimir-ui-kit 1.41.5 → 1.42.0
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/assets/CardTrail.css +1 -1
- package/dist/assets/ClearButton.css +1 -0
- package/dist/assets/ListFiles.css +1 -1
- package/dist/components/CardTrail/CardTrail.d.ts +8 -0
- package/dist/components/CardTrail/CardTrail.js +82 -80
- package/dist/components/CardTrail/constants.d.ts +2 -0
- package/dist/components/CardTrail/constants.js +4 -2
- package/dist/components/InputClearButton/ClearButton.d.ts +46 -0
- package/dist/components/InputClearButton/ClearButton.js +41 -0
- package/dist/components/InputClearButton/constants.d.ts +8 -0
- package/dist/components/InputClearButton/constants.js +5 -0
- package/dist/components/InputClearButton/index.d.ts +4 -0
- package/dist/components/InputClearButton/index.js +6 -0
- package/dist/components/ListFiles/ListFiles.js +42 -45
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +26 -24
- package/dist/icons/components/12px/Close12px.js +13 -6
- package/dist/index.js +48 -46
- package/package.json +1 -1
- package/src/assets/styles/mixins/media.scss +3 -1
@@ -1 +1 @@
|
|
1
|
-
._card-
|
1
|
+
._card-trail_c21mz_3{display:flex;flex-direction:column}._card-trail-header_c21mz_7{display:flex;align-items:flex-end;justify-content:space-between}._card-trail-header_c21mz_7:not(:last-child){margin-bottom:var(--mimir-space-xs)}._card-trail-header-title_c21mz_15{margin-bottom:0;font-weight:var(--mimir-font-weight-text-medium);font-size:var(--mimir-size-text-l);font-family:var(--mimir-font-montserrat);line-height:var(--mimir-line-height-text-s1);letter-spacing:calc(var(--mimir-size-text-l) * -.02)}@media (max-width: 600px){._card-trail-header-title_c21mz_15{font-size:var(--mimir-size-text-m);letter-spacing:calc(var(--mimir-size-text-m) * -.02)}}._card-trail-header-merged-button_c21mz_29{margin-left:auto}._card-trail-list_c21mz_32{display:flex;margin-bottom:0;padding:0;overflow:auto;white-space:nowrap;scroll-behavior:smooth;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}._card-trail-list_c21mz_32::-webkit-scrollbar{display:none}._card-trail-list-item_c21mz_45{white-space:normal;white-space:initial;scroll-snap-align:start}._card-trail-list-item_c21mz_45._pointer_c21mz_49{cursor:pointer}
|
@@ -0,0 +1 @@
|
|
1
|
+
._clear_135p1_2{color:var(--asphalt-normal);border-radius:var(--mimir-control-radius-xs);display:flex;align-items:center;justify-content:center;flex-shrink:0}._clear_135p1_2 svg{color:currentcolor;fill:currentcolor}._clear_135p1_2 svg path{color:currentcolor;fill:currentcolor}._clear_135p1_2._gray_135p1_18{background:var(--gray-normal)}._clear_135p1_2:hover{box-shadow:none;color:var(--counter-text)}._clear_135p1_2:active{box-shadow:none;color:var(--asphalt-active)}._clear_135p1_2:disabled{color:var(--disabled)}._clear_135p1_2._l_135p1_32{height:var(--button-height-xs);width:var(--button-height-xs)}._clear_135p1_2._m-s_135p1_36{height:var(--button-height-ms);width:var(--button-height-ms)}
|
@@ -1 +1 @@
|
|
1
|
-
._file-
|
1
|
+
._file-info_rd4f3_2{display:flex;flex-direction:column;gap:var(--mimir-space-xs);overflow:hidden}._file-info_rd4f3_2 ._file-info-size_rd4f3_8{color:var(--disabled-color);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-m);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xxs);text-align:left;height:var(--mimir-space-2m);display:flex;align-items:center}._file-info_rd4f3_2 ._file-info-name-wrapper_rd4f3_19{display:table;width:100%;table-layout:fixed}._file-info_rd4f3_2 ._file-info-name-wrapper_rd4f3_19 ._file-info-name_rd4f3_19{display:table-cell;overflow:hidden;color:var(--black-100);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-l2);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xl);white-space:nowrap;text-align:left;text-overflow:ellipsis}._file-upload-container_rd4f3_37{display:flex;flex-direction:column;gap:var(--mimir-space-xs);width:100%;margin-bottom:0;padding-left:0}._file-upload-container_rd4f3_37 ._file-upload-container-item_rd4f3_45{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--mimir-space-xs) var(--mimir-space-m);background:var(--file-upload-container-background);border-radius:var(--mimir-control-radius)}._file-upload-container_rd4f3_37 ._file-upload-container-item_rd4f3_45 ._delete-button_rd4f3_54{position:absolute;top:var(--mimir-space-2xs);right:var(--mimir-space-2xs);background:var(--delete-button-background)}._white_rd4f3_61{--file-upload-container-background: var(--white);--delete-button-background: var(--black-5)}._gray_rd4f3_66{--file-upload-container-background: var(--black-5);--delete-button-background: var(--white)}
|
@@ -9,10 +9,18 @@ export type TProps = {
|
|
9
9
|
* Расстояние между карточками.
|
10
10
|
*/
|
11
11
|
spaceBetween?: number;
|
12
|
+
/**
|
13
|
+
* Делитель ширины карточками, который позволяет оставлять предыдщую карточку немного выглядывать.
|
14
|
+
*/
|
15
|
+
dividedCardWidth?: number;
|
12
16
|
/**
|
13
17
|
* Количество карточек для перелистывания.
|
14
18
|
*/
|
15
19
|
scrollStep?: number;
|
20
|
+
/**
|
21
|
+
* Index карточке, у которой надо брать ширирну.
|
22
|
+
*/
|
23
|
+
currentCardIndex?: number;
|
16
24
|
/**
|
17
25
|
* Флаг, определяющий, нужно ли при клике на карточку скроллиться до нее.
|
18
26
|
*/
|
@@ -1,116 +1,118 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as N, jsx as s } from "react/jsx-runtime";
|
2
2
|
import { c as i } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as
|
4
|
-
import { DEFAULT_SPACE_BETWEEN as
|
5
|
-
import { hasHorizontalScroll as
|
6
|
-
import { useMergeRefs as
|
7
|
-
import { useThrottledCallback as
|
8
|
-
import { MergedButton as
|
9
|
-
import '../../assets/CardTrail.css';const
|
10
|
-
"card-trail": "_card-
|
11
|
-
"card-trail-header": "_card-trail-
|
12
|
-
"card-trail-header-title": "_card-trail-header-
|
13
|
-
"card-trail-header-merged-button": "_card-trail-header-merged-
|
14
|
-
"card-trail-list": "_card-trail-
|
15
|
-
"card-trail-list-item": "_card-trail-list-
|
16
|
-
pointer:
|
17
|
-
},
|
3
|
+
import { forwardRef as H, useRef as E, useState as u, useEffect as O, Children as $ } from "react";
|
4
|
+
import { DEFAULT_SPACE_BETWEEN as j, DEFAULT_SCROLL_STEP as V, DEFAULT_DIVIDED as q, DEFAULT_CARD_INDEX as X } from "./constants.js";
|
5
|
+
import { hasHorizontalScroll as h, isScrollAtEdge as S } from "./utils.js";
|
6
|
+
import { useMergeRefs as G } from "../../hooks/useMergeRefs/useMergeRefs.js";
|
7
|
+
import { useThrottledCallback as J } from "../../hooks/useThrottledCallback/index.js";
|
8
|
+
import { MergedButton as K } from "../MergedButton/MergedButton.js";
|
9
|
+
import '../../assets/CardTrail.css';const P = "_pointer_c21mz_49", c = {
|
10
|
+
"card-trail": "_card-trail_c21mz_3",
|
11
|
+
"card-trail-header": "_card-trail-header_c21mz_7",
|
12
|
+
"card-trail-header-title": "_card-trail-header-title_c21mz_15",
|
13
|
+
"card-trail-header-merged-button": "_card-trail-header-merged-button_c21mz_29",
|
14
|
+
"card-trail-list": "_card-trail-list_c21mz_32",
|
15
|
+
"card-trail-list-item": "_card-trail-list-item_c21mz_45",
|
16
|
+
pointer: P
|
17
|
+
}, lr = H((v, D) => {
|
18
18
|
const {
|
19
|
-
cardClassName:
|
20
|
-
cardTrailClassName:
|
21
|
-
cardTrailHeaderClassName:
|
22
|
-
cardTrailListClassName:
|
23
|
-
cardTrailMergedButtonClassName:
|
24
|
-
children:
|
25
|
-
title:
|
26
|
-
spaceBetween: d =
|
27
|
-
scrollStep:
|
28
|
-
mergedButtonProps:
|
29
|
-
scrollToCard:
|
30
|
-
needButtons:
|
31
|
-
|
19
|
+
cardClassName: T,
|
20
|
+
cardTrailClassName: z,
|
21
|
+
cardTrailHeaderClassName: L,
|
22
|
+
cardTrailListClassName: A,
|
23
|
+
cardTrailMergedButtonClassName: W,
|
24
|
+
children: m,
|
25
|
+
title: f,
|
26
|
+
spaceBetween: d = j,
|
27
|
+
scrollStep: _ = V,
|
28
|
+
mergedButtonProps: l,
|
29
|
+
scrollToCard: C = !1,
|
30
|
+
needButtons: k = !0,
|
31
|
+
dividedCardWidth: p = q,
|
32
|
+
currentCardIndex: g = X
|
33
|
+
} = v, r = E(null), n = E(null), [o, I] = u({
|
32
34
|
leftButton: !0,
|
33
35
|
rightButton: !1
|
34
|
-
}), [
|
35
|
-
() =>
|
36
|
-
),
|
37
|
-
const
|
38
|
-
|
39
|
-
leftButton: !
|
40
|
-
rightButton: !
|
36
|
+
}), [w, B] = u(0), [y, b] = u(
|
37
|
+
() => h(r == null ? void 0 : r.current)
|
38
|
+
), x = G(r, D), M = J(() => {
|
39
|
+
const e = !S(r.current, "left"), t = !S(r.current, "right");
|
40
|
+
I({
|
41
|
+
leftButton: !e,
|
42
|
+
rightButton: !t
|
41
43
|
});
|
42
|
-
}, 300),
|
44
|
+
}, 300), F = (e) => () => {
|
43
45
|
var a;
|
44
|
-
if (!
|
46
|
+
if (!C)
|
45
47
|
return;
|
46
|
-
const
|
47
|
-
`[data-active-card='${
|
48
|
+
const t = (a = r == null ? void 0 : r.current) == null ? void 0 : a.querySelector(
|
49
|
+
`[data-active-card='${e}']`
|
48
50
|
);
|
49
|
-
|
51
|
+
t && (t == null || t.scrollIntoView({
|
50
52
|
behavior: "smooth",
|
51
53
|
block: "nearest",
|
52
54
|
inline: "center"
|
53
55
|
}));
|
54
|
-
},
|
56
|
+
}, R = () => {
|
55
57
|
var a;
|
56
58
|
if (!r.current || o.leftButton) return;
|
57
|
-
const
|
58
|
-
t.scrollBy({
|
59
|
-
left: -(
|
59
|
+
const e = r.current, t = ((a = e.children[g]) == null ? void 0 : a.clientWidth) ?? 0;
|
60
|
+
B(t / p), e.scrollBy({
|
61
|
+
left: -(t + d) * _,
|
60
62
|
behavior: "smooth"
|
61
63
|
});
|
62
|
-
},
|
64
|
+
}, U = () => {
|
63
65
|
var a;
|
64
66
|
if (!r.current || o.rightButton) return;
|
65
|
-
const
|
66
|
-
t.scrollBy({
|
67
|
-
left: (
|
67
|
+
const e = r.current, t = ((a = e.children[g]) == null ? void 0 : a.clientWidth) ?? 0;
|
68
|
+
B(t / p), e.scrollBy({
|
69
|
+
left: (t + d) * _,
|
68
70
|
behavior: "smooth"
|
69
71
|
});
|
70
72
|
};
|
71
|
-
return
|
72
|
-
const
|
73
|
-
if (
|
73
|
+
return O(() => {
|
74
|
+
const e = r.current;
|
75
|
+
if (e)
|
74
76
|
return n.current = new ResizeObserver(() => {
|
75
|
-
|
76
|
-
}), n.current.observe(
|
77
|
+
b(h(r == null ? void 0 : r.current));
|
78
|
+
}), n.current.observe(e), b(h(r == null ? void 0 : r.current)), () => {
|
77
79
|
n.current && n.current.disconnect();
|
78
80
|
};
|
79
|
-
}, [
|
80
|
-
/* @__PURE__ */
|
81
|
+
}, [m]), /* @__PURE__ */ N("section", { className: i(c["card-trail"], z), children: [
|
82
|
+
/* @__PURE__ */ N(
|
81
83
|
"header",
|
82
84
|
{
|
83
85
|
className: i(
|
84
|
-
|
85
|
-
|
86
|
+
c["card-trail-header"],
|
87
|
+
L
|
86
88
|
),
|
87
89
|
children: [
|
88
|
-
|
89
|
-
|
90
|
-
|
90
|
+
f && /* @__PURE__ */ s("h3", { className: c["card-trail-header-title"], children: f }),
|
91
|
+
y && k && /* @__PURE__ */ s(
|
92
|
+
K,
|
91
93
|
{
|
92
94
|
buttonsWrapperClassName: i(
|
93
|
-
|
94
|
-
|
95
|
+
c["card-trail-header-merged-button"],
|
96
|
+
W
|
95
97
|
),
|
96
98
|
buttons: [
|
97
99
|
{
|
98
100
|
isIconButton: !0,
|
99
101
|
iconName: "ArrowLeft16px",
|
100
102
|
variant: "gray",
|
101
|
-
onClick:
|
103
|
+
onClick: R,
|
102
104
|
disabled: o.leftButton,
|
103
105
|
size: "s",
|
104
|
-
...
|
106
|
+
...l == null ? void 0 : l.leftButton
|
105
107
|
},
|
106
108
|
{
|
107
109
|
isIconButton: !0,
|
108
110
|
iconName: "ArrowRight16px",
|
109
111
|
variant: "gray",
|
110
|
-
onClick:
|
112
|
+
onClick: U,
|
111
113
|
size: "s",
|
112
114
|
disabled: o.rightButton,
|
113
|
-
...
|
115
|
+
...l == null ? void 0 : l.rightButton
|
114
116
|
}
|
115
117
|
]
|
116
118
|
}
|
@@ -121,22 +123,22 @@ import '../../assets/CardTrail.css';const q = "_pointer_vv8gl_49", l = {
|
|
121
123
|
/* @__PURE__ */ s(
|
122
124
|
"ul",
|
123
125
|
{
|
124
|
-
onScroll:
|
125
|
-
style: { gap: d },
|
126
|
-
className: i(
|
127
|
-
ref:
|
128
|
-
children:
|
126
|
+
onScroll: M,
|
127
|
+
style: { gap: d, scrollPadding: `0 ${w}px` },
|
128
|
+
className: i(c["card-trail-list"], A),
|
129
|
+
ref: x,
|
130
|
+
children: $.map(m, (e, t) => /* @__PURE__ */ s(
|
129
131
|
"li",
|
130
132
|
{
|
131
|
-
onClick:
|
132
|
-
"data-active-card":
|
133
|
-
"data-testid": `card-trail-item-${
|
133
|
+
onClick: F(t),
|
134
|
+
"data-active-card": t,
|
135
|
+
"data-testid": `card-trail-item-${t}`,
|
134
136
|
className: i(
|
135
|
-
|
136
|
-
{ [
|
137
|
-
|
137
|
+
c["card-trail-list-item"],
|
138
|
+
{ [c.pointer]: C },
|
139
|
+
T
|
138
140
|
),
|
139
|
-
children:
|
141
|
+
children: e
|
140
142
|
}
|
141
143
|
))
|
142
144
|
}
|
@@ -144,5 +146,5 @@ import '../../assets/CardTrail.css';const q = "_pointer_vv8gl_49", l = {
|
|
144
146
|
] });
|
145
147
|
});
|
146
148
|
export {
|
147
|
-
|
149
|
+
lr as CardTrail
|
148
150
|
};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
|
3
|
+
export type TClearButton = {
|
4
|
+
/**
|
5
|
+
* Класс, применяемый к корневому элементу кнопки.
|
6
|
+
*/
|
7
|
+
className?: string;
|
8
|
+
/**
|
9
|
+
* Выключен ли clearButton или нет
|
10
|
+
*/
|
11
|
+
disabled?: boolean;
|
12
|
+
/**
|
13
|
+
* Вариант кнопки загрузки файла
|
14
|
+
*/
|
15
|
+
variant?: 'gray' | 'white';
|
16
|
+
/**
|
17
|
+
* Размер кнопки загрузки файла
|
18
|
+
*/
|
19
|
+
size?: 'l' | 'm-s';
|
20
|
+
/**
|
21
|
+
* Класс для кнопки
|
22
|
+
*/
|
23
|
+
clearButtonClassName?: string;
|
24
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
25
|
+
export declare const ClearButton: React.ForwardRefExoticComponent<{
|
26
|
+
/**
|
27
|
+
* Класс, применяемый к корневому элементу кнопки.
|
28
|
+
*/
|
29
|
+
className?: string;
|
30
|
+
/**
|
31
|
+
* Выключен ли clearButton или нет
|
32
|
+
*/
|
33
|
+
disabled?: boolean;
|
34
|
+
/**
|
35
|
+
* Вариант кнопки загрузки файла
|
36
|
+
*/
|
37
|
+
variant?: "gray" | "white";
|
38
|
+
/**
|
39
|
+
* Размер кнопки загрузки файла
|
40
|
+
*/
|
41
|
+
size?: "l" | "m-s";
|
42
|
+
/**
|
43
|
+
* Класс для кнопки
|
44
|
+
*/
|
45
|
+
clearButtonClassName?: string;
|
46
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
2
|
+
import { c as i } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as _ } from "react";
|
4
|
+
import { EClearButtonSize as a, EClearButtonVariant as f } from "./constants.js";
|
5
|
+
import { Icon as u } from "../../icons/Icon.js";
|
6
|
+
import '../../assets/ClearButton.css';const C = "_clear_135p1_2", y = "_gray_135p1_18", N = "_l_135p1_32", o = {
|
7
|
+
clear: C,
|
8
|
+
gray: y,
|
9
|
+
l: N,
|
10
|
+
"m-s": "_m-s_135p1_36"
|
11
|
+
}, d = _(
|
12
|
+
(s, e) => {
|
13
|
+
const {
|
14
|
+
disabled: l = !1,
|
15
|
+
size: r = a.MS,
|
16
|
+
variant: n = f.Gray,
|
17
|
+
className: c,
|
18
|
+
...m
|
19
|
+
} = s, p = i(
|
20
|
+
o.clear,
|
21
|
+
r === a.L ? o.l : o["m-s"],
|
22
|
+
o[n],
|
23
|
+
c
|
24
|
+
);
|
25
|
+
return /* @__PURE__ */ t(
|
26
|
+
"button",
|
27
|
+
{
|
28
|
+
type: "button",
|
29
|
+
ref: e,
|
30
|
+
...m,
|
31
|
+
disabled: l,
|
32
|
+
className: p,
|
33
|
+
children: /* @__PURE__ */ t(u, { iconName: r === "l" ? "Close16px" : "Close12px" })
|
34
|
+
}
|
35
|
+
);
|
36
|
+
}
|
37
|
+
);
|
38
|
+
d.displayName = "ClearButton";
|
39
|
+
export {
|
40
|
+
d as ClearButton
|
41
|
+
};
|
@@ -1,66 +1,63 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { c as
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
2
|
+
import { c as p } from "../../index-DIxK0V-G.js";
|
3
3
|
import { useState as u, useEffect as w } from "react";
|
4
|
-
import { EFileItemVariant as
|
5
|
-
import { formating as
|
6
|
-
import {
|
7
|
-
import '../../assets/ListFiles.css';const
|
8
|
-
"file-info": "_file-
|
9
|
-
"file-info-size": "_file-info-
|
10
|
-
"file-info-name-wrapper": "_file-info-name-
|
11
|
-
"file-info-name": "_file-info-
|
12
|
-
"file-upload-container": "_file-upload-
|
13
|
-
"file-upload-container-item": "_file-upload-container-
|
14
|
-
"delete-button": "_delete-
|
15
|
-
white:
|
16
|
-
gray:
|
4
|
+
import { EFileItemVariant as h } from "./constants.js";
|
5
|
+
import { formating as z } from "../../utils/index.js";
|
6
|
+
import { ClearButton as N } from "../InputClearButton/ClearButton.js";
|
7
|
+
import '../../assets/ListFiles.css';const y = "_white_rd4f3_61", x = "_gray_rd4f3_66", e = {
|
8
|
+
"file-info": "_file-info_rd4f3_2",
|
9
|
+
"file-info-size": "_file-info-size_rd4f3_8",
|
10
|
+
"file-info-name-wrapper": "_file-info-name-wrapper_rd4f3_19",
|
11
|
+
"file-info-name": "_file-info-name_rd4f3_19",
|
12
|
+
"file-upload-container": "_file-upload-container_rd4f3_37",
|
13
|
+
"file-upload-container-item": "_file-upload-container-item_rd4f3_45",
|
14
|
+
"delete-button": "_delete-button_rd4f3_54",
|
15
|
+
white: y,
|
16
|
+
gray: x
|
17
17
|
};
|
18
|
-
function
|
19
|
-
value:
|
20
|
-
onChange:
|
21
|
-
classNameWrapper:
|
22
|
-
variant:
|
23
|
-
disabled:
|
18
|
+
function F({
|
19
|
+
value: n,
|
20
|
+
onChange: f,
|
21
|
+
classNameWrapper: l,
|
22
|
+
variant: m = h.white,
|
23
|
+
disabled: c
|
24
24
|
}) {
|
25
|
-
const [
|
25
|
+
const [o, s] = u(n);
|
26
26
|
w(() => {
|
27
|
-
|
28
|
-
}, [
|
29
|
-
const
|
30
|
-
const
|
31
|
-
|
27
|
+
s(n);
|
28
|
+
}, [n]);
|
29
|
+
const d = async (i) => {
|
30
|
+
const t = [...o.filter((_) => _.id !== i)];
|
31
|
+
s(t), f == null || f({ deleteId: i, list: t });
|
32
32
|
};
|
33
|
-
return
|
33
|
+
return o.length ? /* @__PURE__ */ r(
|
34
34
|
"ul",
|
35
35
|
{
|
36
|
-
className:
|
36
|
+
className: p(
|
37
37
|
e["file-upload-container"],
|
38
|
-
|
39
|
-
e[
|
38
|
+
l,
|
39
|
+
e[m]
|
40
40
|
),
|
41
|
-
children:
|
42
|
-
/* @__PURE__ */
|
43
|
-
(i == null ? void 0 : i.size) && /* @__PURE__ */
|
41
|
+
children: o.map((i, t) => /* @__PURE__ */ a("li", { className: e["file-upload-container-item"], children: [
|
42
|
+
/* @__PURE__ */ a("div", { className: e["file-info"], children: [
|
43
|
+
(i == null ? void 0 : i.size) && /* @__PURE__ */ a("span", { className: e["file-info-size"], children: [
|
44
44
|
" ",
|
45
|
-
|
45
|
+
z.Size(i == null ? void 0 : i.size)
|
46
46
|
] }),
|
47
|
-
/* @__PURE__ */
|
47
|
+
/* @__PURE__ */ r("div", { className: e["file-info-name-wrapper"], children: /* @__PURE__ */ r("div", { className: e["file-info-name"], children: i.name }) })
|
48
48
|
] }),
|
49
|
-
!
|
50
|
-
|
49
|
+
!c && /* @__PURE__ */ r(
|
50
|
+
N,
|
51
51
|
{
|
52
|
-
isIconButton: !0,
|
53
|
-
iconName: "Close12px",
|
54
52
|
size: "m-s",
|
55
|
-
variant: "
|
56
|
-
|
57
|
-
onClick: () => p(i.id)
|
53
|
+
variant: "gray",
|
54
|
+
onClick: () => d(i.id)
|
58
55
|
}
|
59
56
|
)
|
60
|
-
] },
|
57
|
+
] }, t))
|
61
58
|
}
|
62
59
|
) : null;
|
63
60
|
}
|
64
61
|
export {
|
65
|
-
|
62
|
+
F as ListFiles
|
66
63
|
};
|
@@ -72,3 +72,4 @@ export { Table } from './Table';
|
|
72
72
|
export { ESortDirection, ETableVariant, ETableDisplayMode, ETableScrollButtonVariant, ETableScrollIconName } from './Table';
|
73
73
|
export { PromoSlider } from './PromoSlider';
|
74
74
|
export { CardTrail } from './CardTrail';
|
75
|
+
export { ClearButton } from './InputClearButton';
|
package/dist/components/index.js
CHANGED
@@ -5,12 +5,12 @@ import { EInputSize as S, EInputStatus as s, EInputVariant as u } from "./Input/
|
|
5
5
|
import { TextArea as c } from "./TextArea/TextArea.js";
|
6
6
|
import { ETextAreaInputSize as I } from "./TextArea/constants.js";
|
7
7
|
import { InputPassword as g } from "./InputPassword/InputPassword.js";
|
8
|
-
import { InputPhoneNumber as
|
8
|
+
import { InputPhoneNumber as B } from "./InputPhoneNumber/InputPhoneNumber.js";
|
9
9
|
import { getMaskedInputPhoneValue as k, getUnmaskedInputValue as P } from "./InputPhoneNumber/utils.js";
|
10
10
|
import { OtpInput as L } from "./OtpInput/OtpInput.js";
|
11
11
|
import { RadioGroup as A } from "./RadioGroup/RadioGroup.js";
|
12
|
-
import { DatePicker as
|
13
|
-
import { MergedButton as
|
12
|
+
import { DatePicker as R } from "./DatePicker/DatePicker.js";
|
13
|
+
import { MergedButton as w } from "./MergedButton/MergedButton.js";
|
14
14
|
import { EMergedButtonVariantRound as D } from "./MergedButton/constants.js";
|
15
15
|
import { AppImage as v } from "./Image/Image.js";
|
16
16
|
import { Loader as N } from "./Loader/Loader.js";
|
@@ -30,13 +30,13 @@ import { Tag as So } from "./Tag/Tag.js";
|
|
30
30
|
import { ETagSize as uo, ETagType as co } from "./Tag/constants.js";
|
31
31
|
import { Timer as Io } from "./Timer/Timer.js";
|
32
32
|
import { Accordion as go } from "./Accordion/Accordion.js";
|
33
|
-
import { EAccordionSize as
|
33
|
+
import { EAccordionSize as Bo } from "./Accordion/constants.js";
|
34
34
|
import { AccordionItem as ko } from "./Accordion/AccordionItem/AccordionItem.js";
|
35
35
|
import { TabTrail as bo } from "./TabTrail/TabTrail.js";
|
36
36
|
import { ETabTrailSize as Mo } from "./TabTrail/constants.js";
|
37
|
-
import { Pagination as
|
38
|
-
import { ToastProvider as
|
39
|
-
import { useToast as
|
37
|
+
import { Pagination as Co } from "./Pagination/Pagination.js";
|
38
|
+
import { ToastProvider as Uo } from "./Toasts/ToastsProvider.js";
|
39
|
+
import { useToast as yo } from "./Toasts/hooks.js";
|
40
40
|
import { EToastPosition as Fo, EToastVariant as vo } from "./Toasts/constants.js";
|
41
41
|
import { UploaderPhotos as No } from "./UploaderPhotos/UploaderPhotos.js";
|
42
42
|
import { UploaderFiles as Oo } from "./UploaderFiles/UploaderFiles.js";
|
@@ -55,12 +55,12 @@ import { EInputRangeSliderBorderState as sr, EInputRangeSliderPositions as ur }
|
|
55
55
|
import { GosZnak as cr } from "./GosZnak/GosZnak.js";
|
56
56
|
import { EGosZnakSize as Ir, EGosZnakType as Vr } from "./GosZnak/constants.js";
|
57
57
|
import { Switcher as zr } from "./Switcher/Switcher.js";
|
58
|
-
import { ELabelPositions as
|
58
|
+
import { ELabelPositions as hr } from "./Switcher/constants.js";
|
59
59
|
import { TwinSwitcher as Pr } from "./TwinSwitcher/TwinSwitcher.js";
|
60
60
|
import { SkeletonBrick as Lr } from "./Skeleton/SkeletonBrick/SkeletonBrick.js";
|
61
61
|
import { SkeletonText as Ar } from "./Skeleton/SkeletonText/SkeletonText.js";
|
62
|
-
import { SkeletonCircle as
|
63
|
-
import { ESkeletonVariant as
|
62
|
+
import { SkeletonCircle as Rr } from "./Skeleton/SkeletonCircle/SkeletonCircle.js";
|
63
|
+
import { ESkeletonVariant as wr } from "./Skeleton/constants.js";
|
64
64
|
import { Avatar as Dr } from "./Avatar/Avatar.js";
|
65
65
|
import { EAvatarSize as vr } from "./Avatar/constants.js";
|
66
66
|
import { MultiSelectSearch as Nr } from "./MultiSelectSearch/MultiSelectSearch.js";
|
@@ -74,8 +74,9 @@ import { Table as oe } from "./Table/Table.js";
|
|
74
74
|
import { ESortDirection as ee, ETableDisplayMode as te, ETableScrollButtonVariant as pe, ETableScrollIconName as ae, ETableVariant as ie } from "./Table/constants.js";
|
75
75
|
import { PromoSlider as fe } from "./PromoSlider/PromoSlider.js";
|
76
76
|
import { CardTrail as ne } from "./CardTrail/CardTrail.js";
|
77
|
-
import {
|
78
|
-
import {
|
77
|
+
import { ClearButton as Ee } from "./InputClearButton/ClearButton.js";
|
78
|
+
import { default as se } from "./Slider/Slider.js";
|
79
|
+
import { EProgressBarPosition as de } from "./Slider/constants.js";
|
79
80
|
export {
|
80
81
|
go as Accordion,
|
81
82
|
ko as AccordionItem,
|
@@ -84,10 +85,11 @@ export {
|
|
84
85
|
ne as CardTrail,
|
85
86
|
lo as CheckboxMimir,
|
86
87
|
tr as Chip,
|
87
|
-
|
88
|
+
Ee as ClearButton,
|
89
|
+
R as DatePicker,
|
88
90
|
J as Drawer,
|
89
91
|
X as Dropdown,
|
90
|
-
|
92
|
+
Bo as EAccordionSize,
|
91
93
|
vr as EAvatarSize,
|
92
94
|
p as EButtonForm,
|
93
95
|
a as EButtonSize,
|
@@ -106,7 +108,7 @@ export {
|
|
106
108
|
S as EInputSize,
|
107
109
|
s as EInputStatus,
|
108
110
|
u as EInputVariant,
|
109
|
-
|
111
|
+
hr as ELabelPositions,
|
110
112
|
Xo as ELinkSize,
|
111
113
|
Yo as ELinkVariant,
|
112
114
|
O as ELoaderSize,
|
@@ -114,9 +116,9 @@ export {
|
|
114
116
|
_r as EMessageShortReplyVariant,
|
115
117
|
Or as EMultiSelectSearchSize,
|
116
118
|
rr as ENotificationBadgeSize,
|
117
|
-
|
119
|
+
de as EProgressBarPosition,
|
118
120
|
xo as ESelectSearchSize,
|
119
|
-
|
121
|
+
wr as ESkeletonVariant,
|
120
122
|
ee as ESortDirection,
|
121
123
|
oo as EStepColor,
|
122
124
|
ro as EStepsSize,
|
@@ -137,25 +139,25 @@ export {
|
|
137
139
|
v as Image,
|
138
140
|
l as Input,
|
139
141
|
g as InputPassword,
|
140
|
-
|
142
|
+
B as InputPhoneNumber,
|
141
143
|
Er as InputRangeSlider,
|
142
144
|
Qo as Link,
|
143
145
|
qr as ListFiles,
|
144
146
|
Qr as ListPhotos,
|
145
147
|
N as Loader,
|
146
|
-
|
148
|
+
w as MergedButton,
|
147
149
|
Xr as MessageShortReply,
|
148
150
|
Nr as MultiSelectSearch,
|
149
151
|
$o as NotificationBadge,
|
150
152
|
L as OtpInput,
|
151
|
-
|
153
|
+
Co as Pagination,
|
152
154
|
fe as PromoSlider,
|
153
155
|
A as RadioGroup,
|
154
156
|
mo as SelectSearch,
|
155
157
|
Lr as SkeletonBrick,
|
156
|
-
|
158
|
+
Rr as SkeletonCircle,
|
157
159
|
Ar as SkeletonText,
|
158
|
-
|
160
|
+
se as Slider,
|
159
161
|
q as SliderLazy,
|
160
162
|
_ as Steps,
|
161
163
|
zr as Switcher,
|
@@ -164,7 +166,7 @@ export {
|
|
164
166
|
So as Tag,
|
165
167
|
c as TextArea,
|
166
168
|
Io as Timer,
|
167
|
-
|
169
|
+
Uo as ToastProvider,
|
168
170
|
Pr as TwinSwitcher,
|
169
171
|
fr as UniversalUploader,
|
170
172
|
Jo as Uploader,
|
@@ -173,5 +175,5 @@ export {
|
|
173
175
|
to as Vote,
|
174
176
|
k as getMaskedInputPhoneValue,
|
175
177
|
P as getUnmaskedInputValue,
|
176
|
-
|
178
|
+
yo as useToast
|
177
179
|
};
|
@@ -1,16 +1,23 @@
|
|
1
|
-
import { jsx as
|
2
|
-
const
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
2
|
+
const o = (e) => /* @__PURE__ */ l(
|
3
3
|
"svg",
|
4
4
|
{
|
5
5
|
width: "12",
|
6
6
|
height: "12",
|
7
|
-
viewBox: "0 0
|
8
|
-
fill: "none",
|
7
|
+
viewBox: "0 0 16 16",
|
9
8
|
xmlns: "http://www.w3.org/2000/svg",
|
10
9
|
...e,
|
11
|
-
children: /* @__PURE__ */
|
10
|
+
children: /* @__PURE__ */ l(
|
11
|
+
"path",
|
12
|
+
{
|
13
|
+
fillRule: "evenodd",
|
14
|
+
clipRule: "evenodd",
|
15
|
+
d: "M9.06 8l3.47 3.47-1.06 1.06L8 9.06l-3.47 3.47-1.06-1.06L6.94 8 3.47 4.53l1.06-1.06L8 6.94l3.47-3.47 1.06 1.06L9.06 8z",
|
16
|
+
fill: "#000"
|
17
|
+
}
|
18
|
+
)
|
12
19
|
}
|
13
20
|
);
|
14
21
|
export {
|
15
|
-
|
22
|
+
o as default
|
16
23
|
};
|
package/dist/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { Button as e } from "./components/Button/Button.js";
|
2
|
-
import { EButtonForm as p, EButtonSize as a, EButtonVariantBorderless as m, EButtonVariantDefault as
|
2
|
+
import { EButtonForm as p, EButtonSize as a, EButtonVariantBorderless as m, EButtonVariantDefault as f, EButtonVariantOutline as i, EButtonVariantRound as x } from "./components/Button/constants.js";
|
3
3
|
import { I as l } from "./Input-BU_6U1CW.js";
|
4
4
|
import { EInputSize as u, EInputStatus as E, EInputVariant as S } from "./components/Input/constants.js";
|
5
5
|
import { TextArea as c } from "./components/TextArea/TextArea.js";
|
6
6
|
import { ETextAreaInputSize as I } from "./components/TextArea/constants.js";
|
7
7
|
import { InputPassword as V } from "./components/InputPassword/InputPassword.js";
|
8
8
|
import { InputPhoneNumber as z } from "./components/InputPhoneNumber/InputPhoneNumber.js";
|
9
|
-
import { getMaskedInputPhoneValue as
|
9
|
+
import { getMaskedInputPhoneValue as h, getUnmaskedInputValue as P } from "./components/InputPhoneNumber/utils.js";
|
10
10
|
import { OtpInput as M } from "./components/OtpInput/OtpInput.js";
|
11
11
|
import { RadioGroup as C } from "./components/RadioGroup/RadioGroup.js";
|
12
12
|
import { DatePicker as L } from "./components/DatePicker/DatePicker.js";
|
@@ -23,7 +23,7 @@ import { Steps as _ } from "./components/Steps/Steps.js";
|
|
23
23
|
import { EStepColor as rr, EStepsSize as or } from "./components/Steps/constants.js";
|
24
24
|
import { Vote as tr } from "./components/Vote/Vote.js";
|
25
25
|
import { EVoteSize as ar } from "./components/Vote/constants.js";
|
26
|
-
import { SelectSearch as
|
26
|
+
import { SelectSearch as fr } from "./components/SelectSearch/SelectSearch.js";
|
27
27
|
import { ESelectSearchSize as xr } from "./components/SelectSearch/constants.js";
|
28
28
|
import { CheckboxMimir as lr } from "./components/CheckboxMimir/CheckboxMimir.js";
|
29
29
|
import { Tag as ur } from "./components/Tag/Tag.js";
|
@@ -31,7 +31,7 @@ import { ETagSize as Sr, ETagType as dr } from "./components/Tag/constants.js";
|
|
31
31
|
import { Timer as Tr } from "./components/Timer/Timer.js";
|
32
32
|
import { Accordion as gr } from "./components/Accordion/Accordion.js";
|
33
33
|
import { EAccordionSize as kr } from "./components/Accordion/constants.js";
|
34
|
-
import { AccordionItem as
|
34
|
+
import { AccordionItem as Br } from "./components/Accordion/AccordionItem/AccordionItem.js";
|
35
35
|
import { TabTrail as Pr } from "./components/TabTrail/TabTrail.js";
|
36
36
|
import { ETabTrailSize as Mr } from "./components/TabTrail/constants.js";
|
37
37
|
import { Pagination as Cr } from "./components/Pagination/Pagination.js";
|
@@ -48,14 +48,14 @@ import { NotificationBadge as _r } from "./components/NotificationBadge/Notifica
|
|
48
48
|
import { ENotificationBadgeSize as ro } from "./components/NotificationBadge/constants.js";
|
49
49
|
import { Chip as eo } from "./components/Chip/Chip.js";
|
50
50
|
import { EChipSize as po, EChipVariant as ao } from "./components/Chip/constants.js";
|
51
|
-
import { UniversalUploader as
|
51
|
+
import { UniversalUploader as fo } from "./components/UniversalUploader/UniversalUploader.js";
|
52
52
|
import { EUploaderType as xo } from "./components/UniversalUploader/constants.js";
|
53
53
|
import { InputRangeSlider as lo } from "./components/InputRangeSlider/InputRangeSlider.js";
|
54
54
|
import { EInputRangeSliderBorderState as uo, EInputRangeSliderPositions as Eo } from "./components/InputRangeSlider/constants.js";
|
55
55
|
import { GosZnak as co } from "./components/GosZnak/GosZnak.js";
|
56
56
|
import { EGosZnakSize as Io, EGosZnakType as go } from "./components/GosZnak/constants.js";
|
57
57
|
import { Switcher as ko } from "./components/Switcher/Switcher.js";
|
58
|
-
import { ELabelPositions as
|
58
|
+
import { ELabelPositions as Bo } from "./components/Switcher/constants.js";
|
59
59
|
import { TwinSwitcher as Po } from "./components/TwinSwitcher/TwinSwitcher.js";
|
60
60
|
import { SkeletonBrick as Mo } from "./components/Skeleton/SkeletonBrick/SkeletonBrick.js";
|
61
61
|
import { SkeletonText as Co } from "./components/Skeleton/SkeletonText/SkeletonText.js";
|
@@ -72,31 +72,33 @@ import { MessageShortReply as Xo } from "./components/MessageShortReply/MessageS
|
|
72
72
|
import { EMessageShortReplyVariant as _o } from "./components/MessageShortReply/constants.js";
|
73
73
|
import { Table as re } from "./components/Table/Table.js";
|
74
74
|
import { ESortDirection as ee, ETableDisplayMode as te, ETableScrollButtonVariant as pe, ETableScrollIconName as ae, ETableVariant as me } from "./components/Table/constants.js";
|
75
|
-
import { PromoSlider as
|
75
|
+
import { PromoSlider as ie } from "./components/PromoSlider/PromoSlider.js";
|
76
76
|
import { CardTrail as ne } from "./components/CardTrail/CardTrail.js";
|
77
|
-
import {
|
78
|
-
import {
|
79
|
-
import {
|
80
|
-
import {
|
81
|
-
import {
|
82
|
-
import {
|
83
|
-
import {
|
84
|
-
import {
|
85
|
-
import {
|
86
|
-
import {
|
87
|
-
import {
|
88
|
-
import {
|
89
|
-
import {
|
90
|
-
import {
|
91
|
-
import {
|
77
|
+
import { ClearButton as se } from "./components/InputClearButton/ClearButton.js";
|
78
|
+
import { useMediaQuery as Ee } from "./hooks/useMediaQuery/useMediaQuery.js";
|
79
|
+
import { EMediaQuery as de, EMinMediaQuery as ce } from "./hooks/useMediaQuery/constants.js";
|
80
|
+
import { useLockBodyScroll as Ie } from "./hooks/useLockBodyScroll/useLockBodyScroll.js";
|
81
|
+
import { useInterval as Ve } from "./hooks/useInterval/useInterval.js";
|
82
|
+
import { useTimer as ze } from "./hooks/useTimer/index.js";
|
83
|
+
import { useCopyToClipboard as he } from "./hooks/useCopyToClipboard/useCopyToClipboard.js";
|
84
|
+
import { useMergeRefs as be } from "./hooks/useMergeRefs/useMergeRefs.js";
|
85
|
+
import { useResizeObserver as ye } from "./hooks/useResizeObserver/useResizeObserver.js";
|
86
|
+
import { useCallbackRef as Re } from "./hooks/useCallbackRef/index.js";
|
87
|
+
import { useThrottledCallback as Ae } from "./hooks/useThrottledCallback/index.js";
|
88
|
+
import { Icon as Ue } from "./icons/Icon.js";
|
89
|
+
import { formating as ve } from "./utils/index.js";
|
90
|
+
import { default as Ge } from "./components/Slider/Slider.js";
|
91
|
+
import { EProgressBarPosition as Oe } from "./components/Slider/constants.js";
|
92
|
+
import { parseDate as Ze } from "./utils/formating/Date.js";
|
92
93
|
import './assets/index.css';export {
|
93
94
|
gr as Accordion,
|
94
|
-
|
95
|
+
Br as AccordionItem,
|
95
96
|
wo as Avatar,
|
96
97
|
e as Button,
|
97
98
|
ne as CardTrail,
|
98
99
|
lr as CheckboxMimir,
|
99
100
|
eo as Chip,
|
101
|
+
se as ClearButton,
|
100
102
|
L as DatePicker,
|
101
103
|
H as Drawer,
|
102
104
|
X as Dropdown,
|
@@ -105,8 +107,8 @@ import './assets/index.css';export {
|
|
105
107
|
p as EButtonForm,
|
106
108
|
a as EButtonSize,
|
107
109
|
m as EButtonVariantBorderless,
|
108
|
-
|
109
|
-
|
110
|
+
f as EButtonVariantDefault,
|
111
|
+
i as EButtonVariantOutline,
|
110
112
|
x as EButtonVariantRound,
|
111
113
|
po as EChipSize,
|
112
114
|
ao as EChipVariant,
|
@@ -119,17 +121,17 @@ import './assets/index.css';export {
|
|
119
121
|
u as EInputSize,
|
120
122
|
E as EInputStatus,
|
121
123
|
S as EInputVariant,
|
122
|
-
|
124
|
+
Bo as ELabelPositions,
|
123
125
|
Wr as ELinkSize,
|
124
126
|
Xr as ELinkVariant,
|
125
127
|
Q as ELoaderSize,
|
126
|
-
|
128
|
+
de as EMediaQuery,
|
127
129
|
w as EMergedButtonVariantRound,
|
128
130
|
_o as EMessageShortReplyVariant,
|
129
|
-
|
131
|
+
ce as EMinMediaQuery,
|
130
132
|
Qo as EMultiSelectSearchSize,
|
131
133
|
ro as ENotificationBadgeSize,
|
132
|
-
|
134
|
+
Oe as EProgressBarPosition,
|
133
135
|
xr as ESelectSearchSize,
|
134
136
|
Do as ESkeletonVariant,
|
135
137
|
ee as ESortDirection,
|
@@ -149,7 +151,7 @@ import './assets/index.css';export {
|
|
149
151
|
xo as EUploaderType,
|
150
152
|
ar as EVoteSize,
|
151
153
|
co as GosZnak,
|
152
|
-
|
154
|
+
Ue as Icon,
|
153
155
|
F as Image,
|
154
156
|
l as Input,
|
155
157
|
V as InputPassword,
|
@@ -165,13 +167,13 @@ import './assets/index.css';export {
|
|
165
167
|
_r as NotificationBadge,
|
166
168
|
M as OtpInput,
|
167
169
|
Cr as Pagination,
|
168
|
-
|
170
|
+
ie as PromoSlider,
|
169
171
|
C as RadioGroup,
|
170
|
-
|
172
|
+
fr as SelectSearch,
|
171
173
|
Mo as SkeletonBrick,
|
172
174
|
Lo as SkeletonCircle,
|
173
175
|
Co as SkeletonText,
|
174
|
-
|
176
|
+
Ge as Slider,
|
175
177
|
j as SliderLazy,
|
176
178
|
_ as Steps,
|
177
179
|
ko as Switcher,
|
@@ -182,23 +184,23 @@ import './assets/index.css';export {
|
|
182
184
|
Tr as Timer,
|
183
185
|
Lr as ToastProvider,
|
184
186
|
Po as TwinSwitcher,
|
185
|
-
|
187
|
+
fo as UniversalUploader,
|
186
188
|
qr as Uploader,
|
187
189
|
Or as UploaderFiles,
|
188
190
|
Gr as UploaderPhotos,
|
189
191
|
tr as Vote,
|
190
|
-
|
191
|
-
|
192
|
+
ve as formating,
|
193
|
+
h as getMaskedInputPhoneValue,
|
192
194
|
P as getUnmaskedInputValue,
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
195
|
+
Ze as parseDate,
|
196
|
+
Re as useCallbackRef,
|
197
|
+
he as useCopyToClipboard,
|
198
|
+
Ve as useInterval,
|
199
|
+
Ie as useLockBodyScroll,
|
200
|
+
Ee as useMediaQuery,
|
201
|
+
be as useMergeRefs,
|
202
|
+
ye as useResizeObserver,
|
203
|
+
Ae as useThrottledCallback,
|
204
|
+
ze as useTimer,
|
203
205
|
Dr as useToast
|
204
206
|
};
|
package/package.json
CHANGED