mimir-ui-kit 1.27.8 → 1.29.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Accordion/Accordion.js +43 -44
- package/dist/components/DatePicker/DatePicker.d.ts +28 -0
- package/dist/components/DatePicker/DatePicker.js +37 -19
- package/dist/components/DatePicker/DatePickerModal.js +3 -2
- package/dist/components/DatePicker/MonthPickerModal.js +1 -1
- package/dist/components/DatePicker/YearPickerModal.js +1 -1
- package/dist/components/DatePicker/constants.d.ts +5 -0
- package/dist/components/DatePicker/constants.js +7 -0
- package/dist/components/Steps/Steps.js +1 -0
- package/dist/components/UniversalUploader/UniversalUploader.d.ts +3 -0
- package/dist/components/UniversalUploader/UniversalUploader.js +120 -0
- package/dist/components/UniversalUploader/constants.d.ts +6 -0
- package/dist/components/UniversalUploader/constants.js +18 -0
- package/dist/components/UniversalUploader/index.d.ts +3 -0
- package/dist/components/UniversalUploader/index.js +6 -0
- package/dist/components/UniversalUploader/types.d.ts +26 -0
- package/dist/components/UniversalUploader/types.js +1 -0
- package/dist/components/Uploader/Uploader.d.ts +1 -1
- package/dist/components/Uploader/Uploader.js +35 -9
- package/dist/components/Uploader/constants.d.ts +4 -1
- package/dist/components/Uploader/constants.js +27 -3
- package/dist/components/Uploader/index.d.ts +1 -0
- package/dist/components/Uploader/index.js +3 -1
- package/dist/components/UploaderFiles/UploaderFiles.d.ts +1 -1
- package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +4 -0
- package/dist/icons/components/32px/PersonalManager32px.js +8 -8
- package/dist/index.js +4 -0
- package/dist/styles.module-CLBRb2go.js +38 -0
- package/package.json +1 -1
- package/dist/styles.module-BZXDqssF.js +0 -36
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._accordion_2if29_2{padding-bottom:var(--accordion-space);border-bottom:1px solid var(--black-20)}._accordion_2if29_2 svg path{fill:var(--white)}._accordion_2if29_2._is-link_2if29_9{border:none}._header_2if29_13{display:flex;gap:var(--space-m);align-items:flex-start;justify-content:space-between;width:100%;font-weight:var(--font-weight-text-medium);font-family:var(--font-montserrat);text-align:left;border:none;cursor:pointer}._title_2if29_26{font-size:var(--accordion-text-size)}._title-uppercase_2if29_29{text-transform:uppercase}._icon_2if29_33{transition:transform .3s ease-in-out}._icon-container_2if29_36{display:flex;align-items:center;justify-content:center;transition:background-color .3s ease-in-out}._circle_2if29_43{min-width:var(--accordion-icon-circle-width);min-height:var(--accordion-icon-circle-height);background-color:var(--black-80);border-radius:50%}._square_2if29_50{min-width:var(--accordion-icon-square-width);min-height:var(--accordion-icon-square-height);background-color:var(--white);border-radius:var(--control-radius)}._square_2if29_50 svg path{fill:var(--black-100)}._panel_2if29_60{margin-top:var(--accordion-panel-space)}._panel_2if29_60._is-link_2if29_9{margin-top:var(--space-xs)}._open_2if29_67{background-color:var(--sapphire-100)}._open_2if29_67 svg{transform:rotate(-180deg)}._open_2if29_67._circle_2if29_43{background-color:var(--sapphire-100)}._open_2if29_67._square_2if29_50{background-color:var(--black-80)}._open_2if29_67._square_2if29_50 svg path{fill:var(--white)}._link-open_2if29_83{transform:rotate(-180deg)}._m_2if29_87{--accordion-space: var(--space-xl);--accordion-text-size: var(--size-text-xl2);--accordion-icon-circle-width: var(--accordion-icon-circle-size-m);--accordion-icon-circle-height: var(--accordion-icon-circle-size-m);--accordion-icon-square-width: var(--accordion-icon-square-size-m);--accordion-icon-square-height: var(--accordion-icon-square-size-m);--accordion-panel-space: var(--space-xl)}._s_2if29_50{--accordion-space: var(--space-m);--accordion-text-size: var(--size-text-l);--accordion-icon-circle-width: var(--accordion-icon-circle-size-s);--accordion-icon-circle-height: var(--accordion-icon-circle-size-s);--accordion-icon-square-width: var(--accordion-icon-square-size-s);--accordion-icon-square-height: var(--accordion-icon-square-size-s);--accordion-panel-space: var(--space-m)}._wrapper-button_2if29_107{width:100%}
|
package/dist/assets/styles.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._input_1fczl_2{padding-right:var(--space-3xl)}._input-wrapper_1fczl_6{flex:1}._date-wrapper_1fczl_10{position:relative;width:100%}._date-wrapper_1fczl_10 ._inputBorderControl_1fczl_14{border:transparent}._date-wrapper_1fczl_10:hover ._input-wrapper_1fczl_6{background-color:var(--input-bg-color-hover)}._date-wrapper_1fczl_10:before{position:absolute;top:0;right:60px;bottom:0;left:0;z-index:3;cursor:pointer;content:""}[data-disabled=true] ._date-wrapper_1fczl_10:before{cursor:auto}[data-disabled=true] ._date-wrapper_1fczl_10 ._input-wrapper_1fczl_6{background:var(--black-20)}[data-disabled=true] ._date-wrapper_1fczl_10 ._input-wrapper_1fczl_6 label,[data-disabled=true] ._date-wrapper_1fczl_10 ._input-wrapper_1fczl_6 input{color:var(--white)}[data-disabled=true] ._button-wrapper_1fczl_38 svg{color:var(--white);cursor:default;fill:var(--white)}._wrapper_1fczl_44{position:relative;display:flex;align-items:center;border-radius:var(--control-radius-s)}._wrapper_1fczl_44._active_1fczl_50{border-bottom:1px solid var(--citrine-100)}._button-wrapper_1fczl_38{position:absolute;top:0;right:0;z-index:2;display:flex;width:44px;height:100%;max-height:var(--button-height-xxl)}._button_1fczl_38{align-self:center;background-color:transparent;border-radius:var(--control-radius-s)}._field-overlow_1fczl_71{position:fixed;top:0;right:0;bottom:0;left:0;z-index:3}._calendar-block_1fczl_77{position:absolute;z-index:3;display:flex;flex-direction:column;width:368px;max-height:none;padding:16px;font-weight:var(--font-weight-text-regular);font-size:var(--size-text-l);font-family:var(--font-inter);font-style:normal;line-height:var(--line-height-text-2xs);text-align:center;text-overflow:ellipsis;background:var(--white);border-radius:var(--control-radius-s);box-shadow:0 0 #16172705,0 2px 4px #16172705,0 6px 6px #16172705,0 15px 9px #16172703;opacity:0;transition:height .5s ease-in;font-feature-settings:"zero";font-variant-numeric:slashed-zero}._calendar-block_1fczl_77 ._h_1fczl_100{display:flex;width:100%;color:var(--black-100)}._calendar-block_1fczl_77 ._b_1fczl_38{display:grid;grid-template-columns:repeat(7,1fr)}._calendar-block_1fczl_77 ._d_1fczl_10{display:flex;flex:1;gap:4px;align-items:center;justify-content:center;color:var(--black-100);cursor:pointer}._calendar-block_1fczl_77 ._m_1fczl_121,._calendar-block_1fczl_77 ._a_1fczl_50,._calendar-block_1fczl_77 ._prev_1fczl_123{width:auto;height:48px;overflow:hidden}._calendar-block_1fczl_77 ._m_1fczl_121{display:flex;align-items:center;justify-content:center;color:var(--disabled)}._calendar-block_1fczl_77 ._m_1fczl_121 b{font-weight:var(--font-weight-text-regular)}._calendar-block_1fczl_77 ._orange_1fczl_139{color:var(--citrine-100)}._calendar-block_1fczl_77 ._a_1fczl_50{color:var(--black-100);border-radius:var(--control-radius-s)}._calendar-block_1fczl_77 ._a_1fczl_50 b{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-weight:var(--font-weight-text-regular);cursor:pointer}._calendar-block_1fczl_77 ._a_1fczl_50 b:hover{background:var(--black-10)}._calendar-block_1fczl_77 ._a_1fczl_50 b:active{color:var(--white);background:var(--sapphire-100)}._calendar-block_1fczl_77 ._current_1fczl_164{background:var(--sapphire-10);border-radius:var(--control-radius-s)}._calendar-block_1fczl_77 ._monthGrid_1fczl_169{display:grid;grid-template-columns:repeat(3,1fr)}
|
@@ -119,31 +119,32 @@ function Re(e2, n) {
|
|
119
119
|
return React__default.createElement(s$1, null, React__default.createElement(H.Provider, { value: t2.panelId }, H$1({ mergeRefs: f, ourProps: g, theirProps: d, slot: D2, defaultTag: Se, features: be, visible: p, name: "Disclosure.Panel" })));
|
120
120
|
}
|
121
121
|
let Ae = W(me), Ce = W(ge), Ie = W(Re), We = Object.assign(Ae, { Button: Ce, Panel: Ie });
|
122
|
-
const accordion = "
|
123
|
-
const header = "
|
124
|
-
const title = "
|
125
|
-
const icon = "
|
126
|
-
const circle = "
|
127
|
-
const square = "
|
128
|
-
const panel = "
|
129
|
-
const open = "
|
130
|
-
const m = "
|
131
|
-
const s = "
|
122
|
+
const accordion = "_accordion_2if29_2";
|
123
|
+
const header = "_header_2if29_13";
|
124
|
+
const title = "_title_2if29_26";
|
125
|
+
const icon = "_icon_2if29_33";
|
126
|
+
const circle = "_circle_2if29_43";
|
127
|
+
const square = "_square_2if29_50";
|
128
|
+
const panel = "_panel_2if29_60";
|
129
|
+
const open = "_open_2if29_67";
|
130
|
+
const m = "_m_2if29_87";
|
131
|
+
const s = "_s_2if29_50";
|
132
132
|
const cls = {
|
133
133
|
accordion,
|
134
|
-
"is-link": "_is-
|
134
|
+
"is-link": "_is-link_2if29_9",
|
135
135
|
header,
|
136
136
|
title,
|
137
|
-
"title-uppercase": "_title-
|
137
|
+
"title-uppercase": "_title-uppercase_2if29_29",
|
138
138
|
icon,
|
139
|
-
"icon-container": "_icon-
|
139
|
+
"icon-container": "_icon-container_2if29_36",
|
140
140
|
circle,
|
141
141
|
square,
|
142
142
|
panel,
|
143
143
|
open,
|
144
|
-
"link-open": "_link-
|
144
|
+
"link-open": "_link-open_2if29_83",
|
145
145
|
m,
|
146
|
-
s
|
146
|
+
s,
|
147
|
+
"wrapper-button": "_wrapper-button_2if29_107"
|
147
148
|
};
|
148
149
|
const Accordion = forwardRef(
|
149
150
|
({
|
@@ -168,6 +169,9 @@ const Accordion = forwardRef(
|
|
168
169
|
const linkClasses = {
|
169
170
|
[cls["is-link"]]: isLink
|
170
171
|
};
|
172
|
+
const toggleAccordion = () => {
|
173
|
+
setIsOpen(!isOpen);
|
174
|
+
};
|
171
175
|
const renderButton = (open2) => {
|
172
176
|
const getIconName = () => {
|
173
177
|
if (iconType === EAccordionIconType.DROPDOWN) {
|
@@ -211,7 +215,7 @@ const Accordion = forwardRef(
|
|
211
215
|
{
|
212
216
|
className: classNames(
|
213
217
|
cls["icon-container"],
|
214
|
-
open2
|
218
|
+
open2,
|
215
219
|
cls[buttonStyle],
|
216
220
|
classNameIconButton
|
217
221
|
),
|
@@ -235,34 +239,29 @@ const Accordion = forwardRef(
|
|
235
239
|
linkClasses,
|
236
240
|
classNameAccordion
|
237
241
|
),
|
238
|
-
children: /* @__PURE__ */
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
children: /* @__PURE__ */ jsx(AccordionItem, { size, children })
|
262
|
-
}
|
263
|
-
)
|
264
|
-
] });
|
265
|
-
} })
|
242
|
+
children: /* @__PURE__ */ jsxs(We, { ref, children: [
|
243
|
+
/* @__PURE__ */ jsx("div", { className: cls["wrapper-button"], onClick: toggleAccordion, children: /* @__PURE__ */ jsx(
|
244
|
+
Ce,
|
245
|
+
{
|
246
|
+
as: isLink ? Fragment : EAccordionButtonType.BUTTON,
|
247
|
+
className: classNames({
|
248
|
+
[cls.header]: !isLink
|
249
|
+
}),
|
250
|
+
children: renderButton()
|
251
|
+
}
|
252
|
+
) }),
|
253
|
+
isOpen && /* @__PURE__ */ jsx(
|
254
|
+
Ie,
|
255
|
+
{
|
256
|
+
className: classNames(
|
257
|
+
cls.panel,
|
258
|
+
classNameContent,
|
259
|
+
linkClasses
|
260
|
+
),
|
261
|
+
children: /* @__PURE__ */ jsx(AccordionItem, { size, children })
|
262
|
+
}
|
263
|
+
)
|
264
|
+
] })
|
266
265
|
}
|
267
266
|
),
|
268
267
|
(subtitleNode || onlyOpenSubtitleNode) && /* @__PURE__ */ jsxs("div", { className: classNameSubtitleContainer, children: [
|
@@ -5,6 +5,13 @@ export type DatePicker = {
|
|
5
5
|
* функция=callback, которая вызывается при изменении значения и передает имя и новое значение для обновления стейта (data),
|
6
6
|
*/
|
7
7
|
onChangeValue?: (e: TDatePickerValue) => void;
|
8
|
+
/**
|
9
|
+
* функция=callback, которая вызывается при изменении значения и передает имя и новое значение для обновления стейта ошибки,
|
10
|
+
*/
|
11
|
+
onError?: (e: TDatePickerOnError) => void;
|
12
|
+
/** функция=callback, передает новое значение даты,
|
13
|
+
*/
|
14
|
+
onBlur?: (e: Date) => void;
|
8
15
|
/**
|
9
16
|
* функция ограничения выбора даты
|
10
17
|
(до какой даты выбор не доступен)
|
@@ -20,16 +27,32 @@ export type DatePicker = {
|
|
20
27
|
type?: 'days' | 'months' | 'years';
|
21
28
|
disabled?: boolean;
|
22
29
|
error?: boolean;
|
30
|
+
/**
|
31
|
+
* необязательное значение для немедленной валидации
|
32
|
+
*/
|
33
|
+
validateImmediately?: boolean;
|
34
|
+
editable?: boolean;
|
23
35
|
} & TInputProps;
|
24
36
|
export type TDatePickerValue = {
|
25
37
|
value?: Date;
|
26
38
|
name?: string;
|
27
39
|
};
|
40
|
+
export type TDatePickerOnError = {
|
41
|
+
name?: string;
|
42
|
+
active: boolean;
|
43
|
+
};
|
28
44
|
export declare const DatePicker: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<{
|
29
45
|
/**
|
30
46
|
* функция=callback, которая вызывается при изменении значения и передает имя и новое значение для обновления стейта (data),
|
31
47
|
*/
|
32
48
|
onChangeValue?: (e: TDatePickerValue) => void;
|
49
|
+
/**
|
50
|
+
* функция=callback, которая вызывается при изменении значения и передает имя и новое значение для обновления стейта ошибки,
|
51
|
+
*/
|
52
|
+
onError?: (e: TDatePickerOnError) => void;
|
53
|
+
/** функция=callback, передает новое значение даты,
|
54
|
+
*/
|
55
|
+
onBlur?: (e: Date) => void;
|
33
56
|
/**
|
34
57
|
* функция ограничения выбора даты
|
35
58
|
(до какой даты выбор не доступен)
|
@@ -45,4 +68,9 @@ export declare const DatePicker: import('react').MemoExoticComponent<import('rea
|
|
45
68
|
type?: "days" | "months" | "years";
|
46
69
|
disabled?: boolean;
|
47
70
|
error?: boolean;
|
71
|
+
/**
|
72
|
+
* необязательное значение для немедленной валидации
|
73
|
+
*/
|
74
|
+
validateImmediately?: boolean;
|
75
|
+
editable?: boolean;
|
48
76
|
} & import('../Input/types').TInputProps & import('../Input').TAdditionalProps & import('react').RefAttributes<HTMLInputElement>>>;
|
@@ -3,14 +3,13 @@ import { c as classNames } from "../../index-CweZ_OcN.js";
|
|
3
3
|
import { memo, forwardRef, useState, useEffect } from "react";
|
4
4
|
import { DatePickerModal } from "./DatePickerModal.js";
|
5
5
|
import { MonthPickerModal } from "./MonthPickerModal.js";
|
6
|
-
import { c as cls } from "../../styles.module-
|
6
|
+
import { c as cls } from "../../styles.module-CLBRb2go.js";
|
7
7
|
import { YearPickerModal } from "./YearPickerModal.js";
|
8
8
|
import { useClickOutside } from "../../hooks/useClickOutside/useClickOutside.js";
|
9
9
|
import { formating } from "../../utils/index.js";
|
10
10
|
import { Button } from "../Button/Button.js";
|
11
11
|
import { I as Input } from "../../Input-ChCIy5oY.js";
|
12
12
|
import { EInputVariant } from "../Input/constants.js";
|
13
|
-
import { parseDate } from "../../utils/formating/Date.js";
|
14
13
|
const DatePicker = memo(
|
15
14
|
forwardRef(
|
16
15
|
({
|
@@ -21,22 +20,39 @@ const DatePicker = memo(
|
|
21
20
|
before,
|
22
21
|
type = "days",
|
23
22
|
error,
|
23
|
+
onError,
|
24
|
+
onBlur,
|
25
|
+
validateImmediately,
|
24
26
|
variant,
|
25
27
|
disabled = false,
|
26
28
|
...props
|
27
29
|
}, ref) => {
|
28
30
|
const [isActive, setActive] = useState(false);
|
29
31
|
const [pickerType, setType] = useState(type);
|
30
|
-
const [date, setDate] = useState(
|
31
|
-
|
32
|
-
|
33
|
-
}
|
34
|
-
return /* @__PURE__ */ new Date();
|
35
|
-
});
|
32
|
+
const [date, setDate] = useState(
|
33
|
+
value && !isNaN(new Date(value).getTime()) ? new Date(value) : void 0
|
34
|
+
);
|
36
35
|
const [isError, setError] = useState(error);
|
37
36
|
useEffect(() => {
|
38
37
|
setError(error);
|
39
38
|
}, [error]);
|
39
|
+
useEffect(() => {
|
40
|
+
setDate(
|
41
|
+
value && !isNaN(new Date(value).getTime()) ? new Date(value) : void 0
|
42
|
+
);
|
43
|
+
}, [value]);
|
44
|
+
const milliseconds = value && new Date(value).getTime;
|
45
|
+
useEffect(() => {
|
46
|
+
if (validateImmediately) {
|
47
|
+
if (!milliseconds) {
|
48
|
+
setError(true);
|
49
|
+
onError == null ? void 0 : onError({ name, active: true });
|
50
|
+
} else {
|
51
|
+
setError(false);
|
52
|
+
onError == null ? void 0 : onError({ name, active: false });
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}, [validateImmediately, name, milliseconds]);
|
40
56
|
useClickOutside({
|
41
57
|
isActive,
|
42
58
|
setActive: (e) => {
|
@@ -48,10 +64,10 @@ const DatePicker = memo(
|
|
48
64
|
const onOpen = () => {
|
49
65
|
if (!disabled) setActive(true);
|
50
66
|
};
|
51
|
-
const onDate = (
|
52
|
-
if (!isNaN(
|
53
|
-
setDate(
|
54
|
-
onChangeValue == null ? void 0 : onChangeValue({ value:
|
67
|
+
const onDate = (sendDate) => {
|
68
|
+
if (!isNaN(sendDate.getTime())) {
|
69
|
+
setDate(sendDate);
|
70
|
+
onChangeValue == null ? void 0 : onChangeValue({ value: sendDate, name });
|
55
71
|
}
|
56
72
|
if (pickerType === "years") {
|
57
73
|
if (type === "years") {
|
@@ -69,10 +85,12 @@ const DatePicker = memo(
|
|
69
85
|
setType("days");
|
70
86
|
}
|
71
87
|
}
|
72
|
-
setDate(
|
73
|
-
onChangeValue == null ? void 0 : onChangeValue({ value:
|
88
|
+
setDate(sendDate);
|
89
|
+
onChangeValue == null ? void 0 : onChangeValue({ value: sendDate, name });
|
90
|
+
onBlur == null ? void 0 : onBlur(sendDate);
|
74
91
|
};
|
75
92
|
const wrapperClassNames = classNames(cls.wrapper, isActive && cls.active);
|
93
|
+
const InputClassNames = classNames(cls.input, cls.inputBorderControl);
|
76
94
|
return /* @__PURE__ */ jsxs("div", { className: wrapperClassNames, "data-disabled": disabled, children: [
|
77
95
|
/* @__PURE__ */ jsx(
|
78
96
|
"div",
|
@@ -84,12 +102,12 @@ const DatePicker = memo(
|
|
84
102
|
Input,
|
85
103
|
{
|
86
104
|
ref,
|
87
|
-
className:
|
105
|
+
className: InputClassNames,
|
88
106
|
wrapperClassName: cls["input-wrapper"],
|
89
107
|
size,
|
90
108
|
type: "text",
|
91
109
|
variant: isError ? EInputVariant.Error : variant,
|
92
|
-
value: !isNaN(date.getTime()) ? formating.Date(date, "dd.mm.yy") : "",
|
110
|
+
value: date && !(typeof date === "string") && !isNaN(date == null ? void 0 : date.getTime()) ? formating.Date(date, "dd.mm.yy") : "",
|
93
111
|
...props
|
94
112
|
}
|
95
113
|
)
|
@@ -110,7 +128,7 @@ const DatePicker = memo(
|
|
110
128
|
DatePickerModal,
|
111
129
|
{
|
112
130
|
onChangeValue: onDate,
|
113
|
-
date,
|
131
|
+
date: date || /* @__PURE__ */ new Date(),
|
114
132
|
setActive,
|
115
133
|
before: typeof before === "string" ? new Date(before) : before,
|
116
134
|
onType: setType
|
@@ -120,7 +138,7 @@ const DatePicker = memo(
|
|
120
138
|
MonthPickerModal,
|
121
139
|
{
|
122
140
|
onChangeValue: onDate,
|
123
|
-
date,
|
141
|
+
date: date || /* @__PURE__ */ new Date(),
|
124
142
|
setActive,
|
125
143
|
before: typeof before === "string" ? new Date(before) : before,
|
126
144
|
onType: setType
|
@@ -130,7 +148,7 @@ const DatePicker = memo(
|
|
130
148
|
YearPickerModal,
|
131
149
|
{
|
132
150
|
onChangeValue: onDate,
|
133
|
-
date,
|
151
|
+
date: date || /* @__PURE__ */ new Date(),
|
134
152
|
setActive,
|
135
153
|
before: typeof before === "string" ? new Date(before) : before,
|
136
154
|
onType: setType
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
2
2
|
import { useRef, useState, useEffect } from "react";
|
3
3
|
import { week } from "./constants.js";
|
4
|
-
import { c as cls } from "../../styles.module-
|
4
|
+
import { c as cls } from "../../styles.module-CLBRb2go.js";
|
5
5
|
import { Icon } from "../../icons/Icon.js";
|
6
6
|
import { formating } from "../../utils/index.js";
|
7
7
|
import { Button } from "../Button/Button.js";
|
@@ -15,6 +15,7 @@ function DatePickerModal({
|
|
15
15
|
}) {
|
16
16
|
var _a;
|
17
17
|
const field = useRef(null);
|
18
|
+
date = isNaN(new Date(date).getTime()) ? /* @__PURE__ */ new Date() : date;
|
18
19
|
const _current = parseDate(date);
|
19
20
|
const _selecte = parseDate(date);
|
20
21
|
const current = {
|
@@ -132,7 +133,7 @@ function DatePickerModal({
|
|
132
133
|
}
|
133
134
|
),
|
134
135
|
/* @__PURE__ */ jsxs("div", { className: cls["d"], onClick: () => onType == null ? void 0 : onType("months"), children: [
|
135
|
-
(
|
136
|
+
(_a = formating.Month(month.m)) == null ? void 0 : _a.name,
|
136
137
|
"’",
|
137
138
|
month.y.toString().slice(-2),
|
138
139
|
/* @__PURE__ */ jsx(Icon, { iconName: "DropdownArrowBottom16px" })
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
2
2
|
import { useRef, useState, useEffect } from "react";
|
3
3
|
import { months } from "./constants.js";
|
4
|
-
import { c as cls } from "../../styles.module-
|
4
|
+
import { c as cls } from "../../styles.module-CLBRb2go.js";
|
5
5
|
import { Icon } from "../../icons/Icon.js";
|
6
6
|
import { formating } from "../../utils/index.js";
|
7
7
|
import { Button } from "../Button/Button.js";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
2
2
|
import { useRef, useState, useEffect } from "react";
|
3
|
-
import { c as cls } from "../../styles.module-
|
3
|
+
import { c as cls } from "../../styles.module-CLBRb2go.js";
|
4
4
|
import { formating } from "../../utils/index.js";
|
5
5
|
import { Button } from "../Button/Button.js";
|
6
6
|
function YearPickerModal({
|
@@ -19,8 +19,15 @@ const months = [
|
|
19
19
|
"Ноябрь",
|
20
20
|
"Декабрь"
|
21
21
|
];
|
22
|
+
var EDatePickerValue = /* @__PURE__ */ ((EDatePickerValue2) => {
|
23
|
+
EDatePickerValue2["CurrentDate1"] = "";
|
24
|
+
EDatePickerValue2["CurrentDate"] = "20240510";
|
25
|
+
EDatePickerValue2["CurrentDate3"] = "2024-09-10";
|
26
|
+
return EDatePickerValue2;
|
27
|
+
})(EDatePickerValue || {});
|
22
28
|
export {
|
23
29
|
EDatePickerBeforeDate,
|
30
|
+
EDatePickerValue,
|
24
31
|
months,
|
25
32
|
week
|
26
33
|
};
|
@@ -0,0 +1,120 @@
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
+
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
|
+
import { forwardRef, useState, useEffect } from "react";
|
4
|
+
import { imageTypes } from "./constants.js";
|
5
|
+
import { ListFiles } from "../ListFiles/ListFiles.js";
|
6
|
+
import { ListPhotos } from "../ListPhotos/ListPhotos.js";
|
7
|
+
import { imageFileTypes } from "../Uploader/constants.js";
|
8
|
+
import { Uploader } from "../Uploader/Uploader.js";
|
9
|
+
import '../../assets/UploaderPhotos.css';const cls = {
|
10
|
+
"upload-file-wrapper": "_upload-file-wrapper_2zki8_2"
|
11
|
+
};
|
12
|
+
const UniversalUploader = forwardRef(
|
13
|
+
(props, ref) => {
|
14
|
+
const {
|
15
|
+
type,
|
16
|
+
filesType,
|
17
|
+
arrayName,
|
18
|
+
maxSize,
|
19
|
+
onChange,
|
20
|
+
value,
|
21
|
+
maxFiles,
|
22
|
+
titleUploader
|
23
|
+
} = props;
|
24
|
+
const [items, setItems] = useState(
|
25
|
+
value || []
|
26
|
+
);
|
27
|
+
const isMaxFilesReached = items.length >= maxFiles;
|
28
|
+
useEffect(() => {
|
29
|
+
if (value) {
|
30
|
+
setItems(value);
|
31
|
+
}
|
32
|
+
}, [value]);
|
33
|
+
const isImageFile = (file) => {
|
34
|
+
var _a;
|
35
|
+
if (!file) return false;
|
36
|
+
if (file instanceof File) {
|
37
|
+
return imageTypes.includes(file.type);
|
38
|
+
}
|
39
|
+
if ("file" in file && file.file instanceof File) {
|
40
|
+
return imageTypes.includes(file.file.type);
|
41
|
+
}
|
42
|
+
if ("url" in file && typeof file.url === "string") {
|
43
|
+
if (file.url.startsWith("blob:")) {
|
44
|
+
return typeof file.type === "string" && imageTypes.includes(file.type);
|
45
|
+
}
|
46
|
+
const extension = (_a = file.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
|
47
|
+
return imageFileTypes.includes(extension);
|
48
|
+
}
|
49
|
+
return false;
|
50
|
+
};
|
51
|
+
const onChangeValue = (e) => {
|
52
|
+
const newItems = e.value.map((el) => {
|
53
|
+
if (isImageFile(el.file)) {
|
54
|
+
return {
|
55
|
+
id: el.id,
|
56
|
+
url: URL.createObjectURL(el.file),
|
57
|
+
type: el.file.type,
|
58
|
+
name: el.file.name,
|
59
|
+
size: el.file.size
|
60
|
+
};
|
61
|
+
} else {
|
62
|
+
return {
|
63
|
+
id: el.id,
|
64
|
+
url: "",
|
65
|
+
size: el.file.size,
|
66
|
+
name: el.file.name,
|
67
|
+
type: el.file.type
|
68
|
+
};
|
69
|
+
}
|
70
|
+
});
|
71
|
+
setItems((prev) => [...prev, ...newItems]);
|
72
|
+
onChange == null ? void 0 : onChange({ type: "add", data: e.value });
|
73
|
+
};
|
74
|
+
const onDelete = (deleteId) => {
|
75
|
+
setItems((prev) => prev.filter((item) => item.id !== deleteId));
|
76
|
+
onChange == null ? void 0 : onChange({ type: "delete", data: deleteId });
|
77
|
+
};
|
78
|
+
return /* @__PURE__ */ jsxs(
|
79
|
+
"div",
|
80
|
+
{
|
81
|
+
className: classNames(
|
82
|
+
cls["upload-file-wrapper"],
|
83
|
+
isMaxFilesReached && cls.disabled
|
84
|
+
),
|
85
|
+
children: [
|
86
|
+
/* @__PURE__ */ jsx(
|
87
|
+
Uploader,
|
88
|
+
{
|
89
|
+
filesType,
|
90
|
+
arrayName,
|
91
|
+
maxSize,
|
92
|
+
onChangeValue,
|
93
|
+
ref,
|
94
|
+
maxFiles,
|
95
|
+
isDisabled: isMaxFilesReached,
|
96
|
+
titleUploader
|
97
|
+
}
|
98
|
+
),
|
99
|
+
(type === "files" || type === "all") && /* @__PURE__ */ jsx(
|
100
|
+
ListFiles,
|
101
|
+
{
|
102
|
+
value: items.filter((item) => !isImageFile(item)),
|
103
|
+
onChange: (j) => onDelete(j.deleteId)
|
104
|
+
}
|
105
|
+
),
|
106
|
+
(type === "photos" || type === "all") && /* @__PURE__ */ jsx(
|
107
|
+
ListPhotos,
|
108
|
+
{
|
109
|
+
value: items.filter((item) => isImageFile(item)),
|
110
|
+
onChange: (j) => onDelete(j.deleteId)
|
111
|
+
}
|
112
|
+
)
|
113
|
+
]
|
114
|
+
}
|
115
|
+
);
|
116
|
+
}
|
117
|
+
);
|
118
|
+
export {
|
119
|
+
UniversalUploader
|
120
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
var EUploaderType = /* @__PURE__ */ ((EUploaderType2) => {
|
2
|
+
EUploaderType2["FILES"] = "files";
|
3
|
+
EUploaderType2["PHOTOS"] = "photos";
|
4
|
+
EUploaderType2["ALL"] = "all";
|
5
|
+
return EUploaderType2;
|
6
|
+
})(EUploaderType || {});
|
7
|
+
const imageTypes = [
|
8
|
+
"image/jpg",
|
9
|
+
"image/jpeg",
|
10
|
+
"image/png",
|
11
|
+
"image/gif",
|
12
|
+
"image/tiff",
|
13
|
+
"image/heic"
|
14
|
+
];
|
15
|
+
export {
|
16
|
+
EUploaderType,
|
17
|
+
imageTypes
|
18
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { TFilesDetail } from '../ListFiles/ListFiles';
|
2
|
+
import { TPhotosDetail } from '../ListPhotos/ListPhotos';
|
3
|
+
import { TFileItem } from '../Uploader';
|
4
|
+
import { imageTypesArr } from '../Uploader/constants';
|
5
|
+
|
6
|
+
export type TUniversalUploader = {
|
7
|
+
type: 'files' | 'photos' | 'all';
|
8
|
+
filesType: imageTypesArr[];
|
9
|
+
arrayName: string;
|
10
|
+
maxSize: number;
|
11
|
+
onChange: (j: TOnChangeUpdate) => void;
|
12
|
+
value?: TFilesDetail[] | TPhotosDetail[];
|
13
|
+
maxFiles: number;
|
14
|
+
titleUploader?: string;
|
15
|
+
disabled?: boolean;
|
16
|
+
};
|
17
|
+
export type TOnChangeUpdate = {
|
18
|
+
type: string;
|
19
|
+
data: TFileItem[] | number;
|
20
|
+
};
|
21
|
+
export type TFileWithType = TFilesDetail & {
|
22
|
+
type?: string;
|
23
|
+
};
|
24
|
+
export type TPhotoWithType = TPhotosDetail & {
|
25
|
+
type?: string;
|
26
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -4,7 +4,7 @@ import { imageTypesArr } from './constants';
|
|
4
4
|
export type TUploader = {
|
5
5
|
/**
|
6
6
|
* Массив разрешенных типов файлов для настройки валидации
|
7
|
-
* 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'doc' | 'xls' | 'pdf' | 'docx' | 'txt' | 'xlsx'
|
7
|
+
* 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'heic' | 'doc' | 'xls' | 'pdf' | 'docx' | 'txt' | 'xlsx'
|
8
8
|
*/
|
9
9
|
filesType: imageTypesArr[];
|
10
10
|
/**
|
@@ -13,6 +13,7 @@ const MIME = {
|
|
13
13
|
png: "image/png",
|
14
14
|
tiff: "image/tiff",
|
15
15
|
gif: "image/gif",
|
16
|
+
heic: "image/heic",
|
16
17
|
webp: "image/webp",
|
17
18
|
doc: "application/msword",
|
18
19
|
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
@@ -21,10 +22,22 @@ const MIME = {
|
|
21
22
|
txt: "text/plain",
|
22
23
|
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
23
24
|
};
|
24
|
-
const filesTyps = [
|
25
|
-
|
26
|
-
|
25
|
+
const filesTyps = [
|
26
|
+
"jpeg",
|
27
|
+
"jpg",
|
28
|
+
"png",
|
29
|
+
"tiff",
|
30
|
+
"gif",
|
31
|
+
"heic"
|
32
|
+
];
|
33
|
+
const createIdGenerator = () => {
|
34
|
+
let id = 0;
|
35
|
+
return () => {
|
36
|
+
id = (id + 1) % Number.MAX_SAFE_INTEGER;
|
37
|
+
return id;
|
38
|
+
};
|
27
39
|
};
|
40
|
+
const generateId = createIdGenerator();
|
28
41
|
const Uploader = forwardRef(
|
29
42
|
(props, ref) => {
|
30
43
|
const {
|
@@ -32,20 +45,32 @@ const Uploader = forwardRef(
|
|
32
45
|
onChangeValue,
|
33
46
|
arrayName,
|
34
47
|
maxSize = 15,
|
48
|
+
maxFiles,
|
35
49
|
isDisabled,
|
36
50
|
titleUploader = "Или перетащите сюда"
|
37
51
|
} = props;
|
38
52
|
const uploaderRef = useRef(null);
|
53
|
+
const inputRef = useRef(null);
|
39
54
|
const idImg = useId();
|
55
|
+
const getFileType = (file) => {
|
56
|
+
var _a;
|
57
|
+
if (file.type) return file.type;
|
58
|
+
const extension = (_a = file.name.split(".").pop()) == null ? void 0 : _a.toLowerCase();
|
59
|
+
if (extension === "heic") return "image/heic";
|
60
|
+
return "";
|
61
|
+
};
|
40
62
|
const onChange = (e) => {
|
41
63
|
if (e.target.files && e.target.files[0]) {
|
42
|
-
const list =
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
});
|
64
|
+
const list = Array.from(e.target.files).filter((el) => {
|
65
|
+
const fileType = getFileType(el);
|
66
|
+
const isValidType = filesType.map((name) => MIME[name]).includes(fileType);
|
67
|
+
const isValidSize = el.size / 1024 ** 2 <= maxSize;
|
68
|
+
return isValidType && isValidSize;
|
69
|
+
}).slice(0, maxFiles).map((el) => ({ file: el, id: generateId() }));
|
48
70
|
onChangeValue({ arrayName, value: list });
|
71
|
+
if (inputRef.current) {
|
72
|
+
inputRef.current.value = "";
|
73
|
+
}
|
49
74
|
}
|
50
75
|
};
|
51
76
|
const onOpen = () => {
|
@@ -56,6 +81,7 @@ const Uploader = forwardRef(
|
|
56
81
|
/* @__PURE__ */ jsx(
|
57
82
|
"input",
|
58
83
|
{
|
84
|
+
ref: inputRef,
|
59
85
|
type: "file",
|
60
86
|
className: cls["upload-file-input"],
|
61
87
|
"aria-label": "Upload",
|
@@ -1,5 +1,8 @@
|
|
1
|
-
export type imageTypesArr = 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'doc' | 'xls' | 'pdf' | 'docx' | 'txt' | 'xlsx';
|
1
|
+
export type imageTypesArr = 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'heic' | 'doc' | 'xls' | 'pdf' | 'docx' | 'txt' | 'xlsx';
|
2
|
+
export declare const imageFileTypes: imageTypesArr[];
|
3
|
+
export declare const AllFileTypes: imageTypesArr[];
|
2
4
|
export declare const TypeFilesArray: {
|
3
5
|
images: imageTypesArr[];
|
4
6
|
docs: imageTypesArr[];
|
7
|
+
all: imageTypesArr[];
|
5
8
|
};
|
@@ -1,4 +1,11 @@
|
|
1
|
-
const imageFileTypes = [
|
1
|
+
const imageFileTypes = [
|
2
|
+
"jpeg",
|
3
|
+
"jpg",
|
4
|
+
"png",
|
5
|
+
"tiff",
|
6
|
+
"gif",
|
7
|
+
"heic"
|
8
|
+
];
|
2
9
|
const docsFileTypes = [
|
3
10
|
"doc",
|
4
11
|
"xls",
|
@@ -7,10 +14,27 @@ const docsFileTypes = [
|
|
7
14
|
"txt",
|
8
15
|
"xlsx"
|
9
16
|
];
|
17
|
+
const AllFileTypes = [
|
18
|
+
"jpeg",
|
19
|
+
"jpg",
|
20
|
+
"png",
|
21
|
+
"tiff",
|
22
|
+
"gif",
|
23
|
+
"heic",
|
24
|
+
"doc",
|
25
|
+
"xls",
|
26
|
+
"pdf",
|
27
|
+
"docx",
|
28
|
+
"txt",
|
29
|
+
"xlsx"
|
30
|
+
];
|
10
31
|
const TypeFilesArray = {
|
11
32
|
images: imageFileTypes,
|
12
|
-
docs: docsFileTypes
|
33
|
+
docs: docsFileTypes,
|
34
|
+
all: AllFileTypes
|
13
35
|
};
|
14
36
|
export {
|
15
|
-
|
37
|
+
AllFileTypes,
|
38
|
+
TypeFilesArray,
|
39
|
+
imageFileTypes
|
16
40
|
};
|
@@ -5,7 +5,7 @@ import { TFileItem } from '../Uploader/Uploader';
|
|
5
5
|
export type TUploaderFiles = {
|
6
6
|
/**
|
7
7
|
* Массив разрешенных типов файлов для настройки валидации
|
8
|
-
* 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'doc' | 'xls' | 'pdf' |'docx' | 'txt'
|
8
|
+
* 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'heic' | 'doc' | 'xls' | 'pdf' |'docx' | 'txt'
|
9
9
|
*/
|
10
10
|
filesType: imageTypesArr[];
|
11
11
|
/**
|
@@ -5,7 +5,7 @@ import { TFileItem } from '../Uploader/Uploader';
|
|
5
5
|
export type TUploaderPhotos = {
|
6
6
|
/**
|
7
7
|
* Массив разрешенных типов файлов для настройки валидации
|
8
|
-
* 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'doc' | 'xls' | 'pdf' |'docx' | 'txt'
|
8
|
+
* 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'heic' | 'doc' | 'xls' | 'pdf' |'docx' | 'txt'
|
9
9
|
*/
|
10
10
|
filesType: imageTypesArr[];
|
11
11
|
/**
|
@@ -42,3 +42,5 @@ export { NotificationBadge } from './NotificationBadge';
|
|
42
42
|
export type { TNotificationBadgeProps } from './NotificationBadge';
|
43
43
|
export { ENotificationBadgeSize } from './NotificationBadge';
|
44
44
|
export { Chip, EChipSize, EChipVariant } from './Chip';
|
45
|
+
export { UniversalUploader, EUploaderType } from './UniversalUploader';
|
46
|
+
export type { TUniversalUploader, TOnChangeUpdate, TPhotoWithType, TFileWithType } from './UniversalUploader';
|
package/dist/components/index.js
CHANGED
@@ -43,6 +43,8 @@ import { NotificationBadge } from "./NotificationBadge/NotificationBadge.js";
|
|
43
43
|
import { ENotificationBadgeSize } from "./NotificationBadge/constants.js";
|
44
44
|
import { Chip } from "./Chip/Chip.js";
|
45
45
|
import { EChipSize, EChipVariant } from "./Chip/constants.js";
|
46
|
+
import { UniversalUploader } from "./UniversalUploader/UniversalUploader.js";
|
47
|
+
import { EUploaderType } from "./UniversalUploader/constants.js";
|
46
48
|
export {
|
47
49
|
Accordion,
|
48
50
|
AccordionItem,
|
@@ -75,6 +77,7 @@ export {
|
|
75
77
|
ETagType,
|
76
78
|
EToastPosition,
|
77
79
|
EToastVariant,
|
80
|
+
EUploaderType,
|
78
81
|
EVoteSize,
|
79
82
|
AppImage as Image,
|
80
83
|
I as Input,
|
@@ -95,6 +98,7 @@ export {
|
|
95
98
|
TextArea,
|
96
99
|
Timer,
|
97
100
|
ToastProvider,
|
101
|
+
UniversalUploader,
|
98
102
|
Uploader,
|
99
103
|
UploaderPhotos,
|
100
104
|
Vote,
|
@@ -13,7 +13,7 @@ const PersonalManager32px = (props) => {
|
|
13
13
|
/* @__PURE__ */ jsx(
|
14
14
|
"path",
|
15
15
|
{
|
16
|
-
|
16
|
+
fillRule: "evenodd",
|
17
17
|
clipRule: "evenodd",
|
18
18
|
d: "M12.3627 11.7881C12.4759 11.7881 12.5677 11.8799 12.5677 11.9931V16.2677C12.5796 16.2931 12.5973 16.3305 12.6205 16.3781C12.6676 16.4748 12.7373 16.6135 12.8273 16.7801C13.0074 17.1139 13.2674 17.5576 13.5878 18.0002C13.9089 18.4438 14.2856 18.8792 14.6974 19.2019C15.1102 19.5253 15.5421 19.7232 15.9784 19.7232C16.4147 19.7232 16.8466 19.5253 17.2594 19.2019C17.6712 18.8792 18.0479 18.4438 18.369 18.0002C18.6893 17.5576 18.9494 17.1139 19.1295 16.7801C19.2195 16.6135 19.2892 16.4748 19.3363 16.3781C19.3595 16.3305 19.3772 16.2931 19.389 16.2677V11.9931C19.389 11.8799 19.4808 11.7881 19.5941 11.7881C19.7073 11.7881 19.7991 11.8799 19.7991 11.9931V16.3563L19.7812 16.3963L19.5941 16.3125C19.7812 16.3963 19.7812 16.3962 19.7812 16.3963L19.7807 16.3973L19.7797 16.3996L19.7758 16.4081C19.7739 16.4124 19.7714 16.4178 19.7684 16.4244C19.7662 16.429 19.7638 16.4341 19.7612 16.4398C19.7484 16.4672 19.7295 16.5071 19.7049 16.5577C19.6557 16.6588 19.5833 16.8026 19.4903 16.9749C19.3046 17.319 19.0351 17.7792 18.7012 18.2406C18.368 18.7008 17.9656 19.1694 17.5123 19.5246C17.0599 19.8791 16.5406 20.1332 15.9784 20.1332C15.4162 20.1332 14.8969 19.8791 14.4445 19.5246C13.9912 19.1694 13.5888 18.7008 13.2556 18.2406C12.9216 17.7792 12.6522 17.319 12.4664 16.9749C12.3734 16.8026 12.3011 16.6588 12.2519 16.5577C12.2272 16.5071 12.2084 16.4672 12.1956 16.4398C12.1892 16.426 12.1843 16.4154 12.1809 16.4081L12.1771 16.3996L12.1761 16.3973L12.1758 16.3966C12.1757 16.3966 12.1756 16.3963 12.3627 16.3125L12.1756 16.3963L12.1577 16.3563V11.9931C12.1577 11.8799 12.2495 11.7881 12.3627 11.7881Z",
|
19
19
|
fill: "#4D4D4D"
|
@@ -22,7 +22,7 @@ const PersonalManager32px = (props) => {
|
|
22
22
|
/* @__PURE__ */ jsx(
|
23
23
|
"path",
|
24
24
|
{
|
25
|
-
|
25
|
+
fillRule: "evenodd",
|
26
26
|
clipRule: "evenodd",
|
27
27
|
d: "M10.262 10.9373C10.262 7.72731 12.8655 5.12842 16.0708 5.12842C19.2808 5.12842 21.8797 7.73192 21.8797 10.9373V12.3756H21.4697V10.9373C21.4697 7.95816 19.0541 5.53844 16.0708 5.53844C13.0917 5.53844 10.672 7.95397 10.672 10.9373V12.3756H10.262V10.9373Z",
|
28
28
|
fill: "#4D4D4D"
|
@@ -31,7 +31,7 @@ const PersonalManager32px = (props) => {
|
|
31
31
|
/* @__PURE__ */ jsx(
|
32
32
|
"path",
|
33
33
|
{
|
34
|
-
|
34
|
+
fillRule: "evenodd",
|
35
35
|
clipRule: "evenodd",
|
36
36
|
d: "M21.6725 23.3494L18.1099 21.8232L18.2713 21.4463L21.8342 22.9726C22.7063 23.3476 23.2998 24.1647 23.3962 25.0964H23.41V26.8718H9.58862V25.0964H9.60245C9.69881 24.1647 10.2921 23.3477 11.1642 22.9727L14.7273 21.4463L14.8888 21.8232L11.3262 23.3494C11.3261 23.3494 11.3262 23.3494 11.3262 23.3494C10.5217 23.6954 9.99864 24.4879 9.99864 25.3648V26.4617H23V25.3648C23 24.488 22.477 23.6954 21.6725 23.3494C21.6726 23.3494 21.6724 23.3494 21.6725 23.3494Z",
|
37
37
|
fill: "#4D4D4D"
|
@@ -40,7 +40,7 @@ const PersonalManager32px = (props) => {
|
|
40
40
|
/* @__PURE__ */ jsx(
|
41
41
|
"path",
|
42
42
|
{
|
43
|
-
|
43
|
+
fillRule: "evenodd",
|
44
44
|
clipRule: "evenodd",
|
45
45
|
d: "M13.1572 8.49894C13.4332 8.38495 13.7126 8.33496 13.9195 8.33496C14.2567 8.33496 14.5856 8.43028 14.9034 8.56512C15.2191 8.69901 15.5369 8.87776 15.85 9.05389L15.8542 9.05627C16.6172 9.48657 17.4254 9.94046 18.3973 9.94046C18.874 9.94046 19.1914 9.81595 19.4295 9.64597C19.6743 9.47117 19.8469 9.24116 20.0274 8.99831C20.0949 8.90743 20.2233 8.88851 20.3142 8.95604C20.4051 9.02357 20.424 9.15199 20.3565 9.24287L20.3494 9.25241C20.1751 9.48702 19.9686 9.76482 19.6677 9.97967C19.356 10.2023 18.9542 10.3505 18.3973 10.3505C17.3141 10.3505 16.4233 9.84802 15.6783 9.42778C15.6699 9.42306 15.6615 9.41834 15.6532 9.41363C15.3343 9.23425 15.0355 9.06652 14.7433 8.94259C14.452 8.81901 14.1805 8.74498 13.9195 8.74498C13.77 8.74498 13.5436 8.78296 13.3137 8.87791C13.0848 8.97246 12.8669 9.11746 12.717 9.32069C12.5404 9.56493 12.4846 9.87771 12.5834 10.2766C12.6106 10.3865 12.5435 10.4976 12.4336 10.5248C12.3237 10.552 12.2126 10.485 12.1854 10.3751C12.0642 9.88573 12.1227 9.44214 12.3855 9.07947L12.3864 9.0782C12.5928 8.79791 12.8805 8.61322 13.1572 8.49894Z",
|
46
46
|
fill: "#4D4D4D"
|
@@ -56,7 +56,7 @@ const PersonalManager32px = (props) => {
|
|
56
56
|
/* @__PURE__ */ jsx(
|
57
57
|
"path",
|
58
58
|
{
|
59
|
-
|
59
|
+
fillRule: "evenodd",
|
60
60
|
clipRule: "evenodd",
|
61
61
|
d: "M9.32483 12.1901C8.65291 12.2893 8.13281 12.8687 8.13281 13.5721V15.877C8.13281 16.6451 8.75633 17.274 9.52984 17.274H10.6762V12.1707H9.32483V12.1901ZM9.73485 12.5807V12.5851H9.52984C8.98718 12.5851 8.54283 13.026 8.54283 13.5721V15.877C8.54283 16.4196 8.98377 16.864 9.52984 16.864H10.2661V12.5807H9.73485Z",
|
62
62
|
fill: "#4D4D4D"
|
@@ -72,7 +72,7 @@ const PersonalManager32px = (props) => {
|
|
72
72
|
/* @__PURE__ */ jsx(
|
73
73
|
"path",
|
74
74
|
{
|
75
|
-
|
75
|
+
fillRule: "evenodd",
|
76
76
|
clipRule: "evenodd",
|
77
77
|
d: "M22.8207 17.2501C23.4926 17.1509 24.0127 16.5715 24.0127 15.8681V13.5632C24.0127 12.7951 23.3892 12.1662 22.6156 12.1662H21.4693V17.2695H22.8207V17.2501ZM22.4106 16.8595V16.8551H22.6156C23.1583 16.8551 23.6027 16.4142 23.6027 15.8681V13.5632C23.6027 13.0206 23.1617 12.5762 22.6156 12.5762H21.8794V16.8595H22.4106Z",
|
78
78
|
fill: "#4D4D4D"
|
@@ -88,7 +88,7 @@ const PersonalManager32px = (props) => {
|
|
88
88
|
/* @__PURE__ */ jsx(
|
89
89
|
"path",
|
90
90
|
{
|
91
|
-
|
91
|
+
fillRule: "evenodd",
|
92
92
|
clipRule: "evenodd",
|
93
93
|
d: "M16.49 19.6642C16.49 19.1551 16.9029 18.7422 17.412 18.7422H18.1861C18.6952 18.7422 19.1081 19.1551 19.1081 19.6642C19.1081 20.1733 18.6952 20.5862 18.1861 20.5862H17.412C16.9029 20.5862 16.49 20.1733 16.49 19.6642ZM17.412 19.1522C17.1293 19.1522 16.9 19.3815 16.9 19.6642C16.9 19.9468 17.1293 20.1761 17.412 20.1761H18.1861C18.4688 20.1761 18.6981 19.9468 18.6981 19.6642C18.6981 19.3815 18.4688 19.1522 18.1861 19.1522H17.412Z",
|
94
94
|
fill: "#4D4D4D"
|
@@ -97,7 +97,7 @@ const PersonalManager32px = (props) => {
|
|
97
97
|
/* @__PURE__ */ jsx(
|
98
98
|
"path",
|
99
99
|
{
|
100
|
-
|
100
|
+
fillRule: "evenodd",
|
101
101
|
clipRule: "evenodd",
|
102
102
|
d: "M21.884 16.7214V17.2845C21.884 18.7305 20.7146 19.8999 19.2686 19.8999H18.7056V19.4899H19.2686C20.4881 19.4899 21.474 18.504 21.474 17.2845V16.7214H21.884Z",
|
103
103
|
fill: "#4D4D4D"
|
package/dist/index.js
CHANGED
@@ -43,6 +43,8 @@ import { NotificationBadge } from "./components/NotificationBadge/NotificationBa
|
|
43
43
|
import { ENotificationBadgeSize } from "./components/NotificationBadge/constants.js";
|
44
44
|
import { Chip } from "./components/Chip/Chip.js";
|
45
45
|
import { EChipSize, EChipVariant } from "./components/Chip/constants.js";
|
46
|
+
import { UniversalUploader } from "./components/UniversalUploader/UniversalUploader.js";
|
47
|
+
import { EUploaderType } from "./components/UniversalUploader/constants.js";
|
46
48
|
import { useMediaQuery } from "./hooks/useMediaQuery/useMediaQuery.js";
|
47
49
|
import { EMediaQuery, EMinMediaQuery } from "./hooks/useMediaQuery/constants.js";
|
48
50
|
import { useLockBodyScroll } from "./hooks/useLockBodyScroll/useLockBodyScroll.js";
|
@@ -88,6 +90,7 @@ import './assets/index.css';export {
|
|
88
90
|
ETagType,
|
89
91
|
EToastPosition,
|
90
92
|
EToastVariant,
|
93
|
+
EUploaderType,
|
91
94
|
EVoteSize,
|
92
95
|
Icon,
|
93
96
|
AppImage as Image,
|
@@ -109,6 +112,7 @@ import './assets/index.css';export {
|
|
109
112
|
TextArea,
|
110
113
|
Timer,
|
111
114
|
ToastProvider,
|
115
|
+
UniversalUploader,
|
112
116
|
Uploader,
|
113
117
|
UploaderPhotos,
|
114
118
|
Vote,
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import './assets/styles.css';const input = "_input_1fczl_2";
|
2
|
+
const inputBorderControl = "_inputBorderControl_1fczl_14";
|
3
|
+
const wrapper = "_wrapper_1fczl_44";
|
4
|
+
const active = "_active_1fczl_50";
|
5
|
+
const button = "_button_1fczl_38";
|
6
|
+
const h = "_h_1fczl_100";
|
7
|
+
const b = "_b_1fczl_38";
|
8
|
+
const d = "_d_1fczl_10";
|
9
|
+
const m = "_m_1fczl_121";
|
10
|
+
const a = "_a_1fczl_50";
|
11
|
+
const prev = "_prev_1fczl_123";
|
12
|
+
const orange = "_orange_1fczl_139";
|
13
|
+
const current = "_current_1fczl_164";
|
14
|
+
const monthGrid = "_monthGrid_1fczl_169";
|
15
|
+
const cls = {
|
16
|
+
input,
|
17
|
+
"input-wrapper": "_input-wrapper_1fczl_6",
|
18
|
+
"date-wrapper": "_date-wrapper_1fczl_10",
|
19
|
+
inputBorderControl,
|
20
|
+
"button-wrapper": "_button-wrapper_1fczl_38",
|
21
|
+
wrapper,
|
22
|
+
active,
|
23
|
+
button,
|
24
|
+
"field-overlow": "_field-overlow_1fczl_71",
|
25
|
+
"calendar-block": "_calendar-block_1fczl_77",
|
26
|
+
h,
|
27
|
+
b,
|
28
|
+
d,
|
29
|
+
m,
|
30
|
+
a,
|
31
|
+
prev,
|
32
|
+
orange,
|
33
|
+
current,
|
34
|
+
monthGrid
|
35
|
+
};
|
36
|
+
export {
|
37
|
+
cls as c
|
38
|
+
};
|
package/package.json
CHANGED
@@ -1,36 +0,0 @@
|
|
1
|
-
import './assets/styles.css';const input = "_input_3fxwe_2";
|
2
|
-
const wrapper = "_wrapper_3fxwe_41";
|
3
|
-
const active = "_active_3fxwe_47";
|
4
|
-
const button = "_button_3fxwe_35";
|
5
|
-
const h = "_h_3fxwe_97";
|
6
|
-
const b = "_b_3fxwe_35";
|
7
|
-
const d = "_d_3fxwe_10";
|
8
|
-
const m = "_m_3fxwe_118";
|
9
|
-
const a = "_a_3fxwe_47";
|
10
|
-
const prev = "_prev_3fxwe_120";
|
11
|
-
const orange = "_orange_3fxwe_136";
|
12
|
-
const current = "_current_3fxwe_161";
|
13
|
-
const monthGrid = "_monthGrid_3fxwe_166";
|
14
|
-
const cls = {
|
15
|
-
input,
|
16
|
-
"input-wrapper": "_input-wrapper_3fxwe_6",
|
17
|
-
"date-wrapper": "_date-wrapper_3fxwe_10",
|
18
|
-
"button-wrapper": "_button-wrapper_3fxwe_35",
|
19
|
-
wrapper,
|
20
|
-
active,
|
21
|
-
button,
|
22
|
-
"field-overlow": "_field-overlow_3fxwe_68",
|
23
|
-
"calendar-block": "_calendar-block_3fxwe_74",
|
24
|
-
h,
|
25
|
-
b,
|
26
|
-
d,
|
27
|
-
m,
|
28
|
-
a,
|
29
|
-
prev,
|
30
|
-
orange,
|
31
|
-
current,
|
32
|
-
monthGrid
|
33
|
-
};
|
34
|
-
export {
|
35
|
-
cls as c
|
36
|
-
};
|