triafly-ui-kit 1.0.24 → 1.0.26
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/README.md +93 -93
- package/dist/{_commonjsHelpers-C6fGbg64.js → _virtual/_commonjsHelpers.js} +1 -1
- package/dist/_virtual/index.js +7 -0
- package/dist/_virtual/index2.js +7 -0
- package/dist/_virtual/index3.js +4 -0
- package/dist/_virtual/papaparse.min.js +7 -0
- package/dist/_virtual/papaparse.min2.js +4 -0
- package/dist/_virtual/react-paginate.js +7 -0
- package/dist/_virtual/react-paginate2.js +4 -0
- package/dist/assets/src/components/Ui/Tooltip/Tooltip.stories.module.css +1 -0
- package/dist/components/Ui/Accordeon/Accordeon.js +11 -10
- package/dist/components/Ui/Alert/Alert.js +9 -8
- package/dist/components/Ui/Avatar/Avatar.js +4 -3
- package/dist/components/Ui/Badge/Badge.js +19 -32
- package/dist/components/Ui/Button/Button.js +16 -15
- package/dist/components/Ui/ButtonsArray/ButtonsArray.js +8 -7
- package/dist/components/Ui/Checkbox/Checkbox.js +17 -16
- package/dist/components/Ui/CliTextareaInput/CliTextareaInput.js +16 -15
- package/dist/components/Ui/CustomLink/CustomLink.js +15 -14
- package/dist/components/Ui/DatePicker/DatePicker.js +16 -8
- package/dist/components/Ui/DatePicker/DatePicker.stories.js +39 -33
- package/dist/components/Ui/DropdownInput/DropdownInput.js +15 -14
- package/dist/components/Ui/DropdownMenu/DropdownMenu.js +4 -3
- package/dist/components/Ui/FileUpload/FileUpload.js +126 -544
- package/dist/components/Ui/Form/FormRoot/FormRoot.js +2 -1
- package/dist/components/Ui/Loader/Loader.js +5 -4
- package/dist/components/Ui/ModalWindow/ModalWindow.js +13 -12
- package/dist/components/Ui/Pagination/Pagination.js +20 -275
- package/dist/components/Ui/Radio/Radio.js +2 -1
- package/dist/components/Ui/SearchInput/SearchInput.js +13 -12
- package/dist/components/Ui/Skeleton/Skeleton.js +16 -18
- package/dist/components/Ui/Switch/Switch.js +10 -9
- package/dist/components/Ui/Table/MemoizedRow/MemoizedRow.js +30 -59
- package/dist/components/Ui/Table/Table.js +5 -4
- package/dist/components/Ui/Tabs/Tabs.js +6 -5
- package/dist/components/Ui/TextInput/TextInput.js +11 -10
- package/dist/components/Ui/TextareaInput/TextareaInput.js +18 -17
- package/dist/components/Ui/Tooltip/Tooltip.js +3 -2
- package/dist/components/Ui/Tooltip/Tooltip.stories.js +9 -14
- package/dist/context/ToastContext/ToastContext.js +22 -24
- package/dist/main.d.ts +0 -14
- package/dist/main.js +147 -149
- package/dist/node_modules/classnames/index.js +42 -0
- package/dist/node_modules/fast-deep-equal/index.js +31 -0
- package/dist/node_modules/papaparse/papaparse.min.js +421 -0
- package/dist/node_modules/react-paginate/dist/react-paginate.js +259 -0
- package/dist/src/components/Ui/Badge/Badge.module.scss.js +30 -0
- package/dist/src/components/Ui/Skeleton/Skeleton.module.scss.js +9 -0
- package/dist/src/components/Ui/Tooltip/Tooltip.stories.module.css.js +15 -0
- package/dist/src/context/ToastContext/ToastContext.module.scss.js +9 -0
- package/dist/styles/_mixins.scss +22 -0
- package/dist/styles/fix.scss +4 -0
- package/dist/styles/main.scss +27 -0
- package/dist/styles/reset.scss +106 -0
- package/dist/styles/typography.scss +102 -0
- package/dist/styles/variables.scss +278 -0
- package/package.json +110 -106
- package/src/styles/_mixins.scss +22 -0
- package/src/styles/fix.scss +4 -0
- package/src/styles/main.scss +27 -0
- package/src/styles/reset.scss +106 -0
- package/src/styles/typography.scss +102 -0
- package/src/styles/variables.scss +273 -0
- package/dist/assets/Tooltip.css +0 -1
- package/dist/components/Ui/DatePicker/index.js +0 -4
- package/dist/index-2QXL0WYc.js +0 -45
- /package/dist/assets/{Accordeon.css → src/components/Ui/Accordeon/Accordeon.css} +0 -0
- /package/dist/assets/{Alert.css → src/components/Ui/Alert/Alert.css} +0 -0
- /package/dist/assets/{Avatar.css → src/components/Ui/Avatar/Avatar.css} +0 -0
- /package/dist/assets/{Badge.css → src/components/Ui/Badge/Badge.module.css} +0 -0
- /package/dist/assets/{Button.css → src/components/Ui/Button/Button.css} +0 -0
- /package/dist/assets/{ButtonsArray.css → src/components/Ui/ButtonsArray/ButtonsArray.css} +0 -0
- /package/dist/assets/{Checkbox.css → src/components/Ui/Checkbox/Checkbox.css} +0 -0
- /package/dist/assets/{CliTextareaInput.css → src/components/Ui/CliTextareaInput/CliTextareaInput.css} +0 -0
- /package/dist/assets/{CustomLink.css → src/components/Ui/CustomLink/CustomLink.css} +0 -0
- /package/dist/assets/{DatePicker.css → src/components/Ui/DatePicker/DatePicker.css} +0 -0
- /package/dist/assets/{DropdownInput.css → src/components/Ui/DropdownInput/DropdownInput.css} +0 -0
- /package/dist/assets/{DropdownMenu.css → src/components/Ui/DropdownMenu/DropdownMenu.css} +0 -0
- /package/dist/assets/{FileUpload.css → src/components/Ui/FileUpload/FileUpload.css} +0 -0
- /package/dist/assets/{FormRoot.css → src/components/Ui/Form/FormRoot/Form.css} +0 -0
- /package/dist/assets/{Loader.css → src/components/Ui/Loader/Loader.css} +0 -0
- /package/dist/assets/{ModalWindow.css → src/components/Ui/ModalWindow/ModalWindow.css} +0 -0
- /package/dist/assets/{Pagination.css → src/components/Ui/Pagination/Pagination.css} +0 -0
- /package/dist/assets/{Radio.css → src/components/Ui/Radio/Radio.css} +0 -0
- /package/dist/assets/{SearchInput.css → src/components/Ui/SearchInput/SearchInput.css} +0 -0
- /package/dist/assets/{Skeleton.css → src/components/Ui/Skeleton/Skeleton.module.css} +0 -0
- /package/dist/assets/{Switch.css → src/components/Ui/Switch/Switch.css} +0 -0
- /package/dist/assets/{Table.css → src/components/Ui/Table/Table.css} +0 -0
- /package/dist/assets/{Tabs.css → src/components/Ui/Tabs/Tabs.css} +0 -0
- /package/dist/assets/{TextInput.css → src/components/Ui/TextInput/TextInput.css} +0 -0
- /package/dist/assets/{TextareaInput.css → src/components/Ui/TextareaInput/TextareaInput.css} +0 -0
- /package/dist/assets/{Tooltip2.css → src/components/Ui/Tooltip/Tooltip.css} +0 -0
- /package/dist/assets/{ToastContext.css → src/context/ToastContext/ToastContext.module.css} +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
import { jsxs as y, jsx as n } from "react/jsx-runtime";
|
2
2
|
import { forwardRef as A, useState as C, useRef as d, useCallback as g, useEffect as p } from "react";
|
3
|
-
import
|
3
|
+
import '../../../assets/src/components/Ui/CliTextareaInput/CliTextareaInput.css';/* empty css */
|
4
|
+
import F from "../../../_virtual/index.js";
|
4
5
|
import { highlightSyntax as $ } from "./utils/highlightSyntax/highlightSyntax.js";
|
5
6
|
import { useHistoryNavigation as q } from "./utils/hooks/useHistoryNavigation/useHistoryNavigation.js";
|
6
7
|
import { useTextCoursore as B } from "./utils/hooks/useTextCoursore/useTextCoursore.js";
|
@@ -8,22 +9,22 @@ import { useLineNumbers as G } from "./utils/hooks/useLineNumbers/useLineNumbers
|
|
8
9
|
import { useScrollSync as J } from "./utils/hooks/useScrollSync/useScrollSync.js";
|
9
10
|
import { useTextActions as O } from "./utils/hooks/useTextActions/useTextActions.js";
|
10
11
|
import { useKeyHandlers as Q } from "./utils/hooks/useKeyHandlers/useKeyHandlers.js";
|
11
|
-
|
12
|
+
const W = A(
|
12
13
|
({
|
13
14
|
name: c,
|
14
15
|
spellCheck: T = !1,
|
15
16
|
isDisabled: b = !1,
|
16
17
|
onChange: s,
|
17
|
-
value:
|
18
|
+
value: i,
|
18
19
|
resize: H = !1,
|
19
|
-
format:
|
20
|
+
format: l,
|
20
21
|
onSubmit: L,
|
21
22
|
onError: R,
|
22
23
|
history: I,
|
23
24
|
numberColl: K = !1,
|
24
25
|
showPrompt: u = !1
|
25
|
-
},
|
26
|
-
const [a, m] = C(
|
26
|
+
}, o) => {
|
27
|
+
const [a, m] = C(i), r = d(null), S = d(null), N = d(null);
|
27
28
|
J(r, S, N, a);
|
28
29
|
const { saveSelectionCoursore: h, restoreSelectionCoursore: v } = B(r), { visibleLines: M } = G(r, a), f = g(
|
29
30
|
(e) => {
|
@@ -47,12 +48,12 @@ import '../../../assets/CliTextareaInput.css';const W = A(
|
|
47
48
|
},
|
48
49
|
[s, c]
|
49
50
|
), { handleFormat: w, handleSubmit: D } = O({
|
50
|
-
value:
|
51
|
-
format:
|
51
|
+
value: i,
|
52
|
+
format: l,
|
52
53
|
onChange: f,
|
53
54
|
onSubmit: L,
|
54
55
|
onError: R
|
55
|
-
}), { navigate: E } = q(I,
|
56
|
+
}), { navigate: E } = q(I, l, j), U = Q({
|
56
57
|
navigate: E,
|
57
58
|
handleFormat: w,
|
58
59
|
handleSubmit: D,
|
@@ -61,13 +62,13 @@ import '../../../assets/CliTextareaInput.css';const W = A(
|
|
61
62
|
showPrompt: u
|
62
63
|
});
|
63
64
|
p(() => {
|
64
|
-
m(
|
65
|
-
}, [
|
65
|
+
m(i), v();
|
66
|
+
}, [i, v]), p(() => {
|
66
67
|
const e = r.current;
|
67
68
|
e && e.selectionStart < 3 && e.setSelectionRange(3, 3);
|
68
69
|
}, [a]), p(() => {
|
69
|
-
typeof
|
70
|
-
}, [
|
70
|
+
typeof o == "function" ? o(r.current) : o && (o.current = r.current);
|
71
|
+
}, [o]);
|
71
72
|
const V = F({
|
72
73
|
"no-resize": !H
|
73
74
|
}), _ = (e) => {
|
@@ -105,9 +106,9 @@ import '../../../assets/CliTextareaInput.css';const W = A(
|
|
105
106
|
"pre",
|
106
107
|
{
|
107
108
|
ref: S,
|
108
|
-
className: `formatted-content ${
|
109
|
+
className: `formatted-content ${l}`,
|
109
110
|
dangerouslySetInnerHTML: {
|
110
|
-
__html: $(a || "",
|
111
|
+
__html: $(a || "", l) || " "
|
111
112
|
}
|
112
113
|
}
|
113
114
|
)
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import { jsxs as p, jsx as c } from "react/jsx-runtime";
|
2
2
|
import { Link as x } from "react-router-dom";
|
3
|
-
import '../../../assets/CustomLink.css'
|
3
|
+
import '../../../assets/src/components/Ui/CustomLink/CustomLink.css';/* empty css */
|
4
|
+
const j = ({
|
4
5
|
href: s,
|
5
|
-
children:
|
6
|
+
children: t,
|
6
7
|
target: $ = "_self",
|
7
8
|
className: r = "",
|
8
|
-
style:
|
9
|
+
style: a = {},
|
9
10
|
onClick: l,
|
10
|
-
ariaLabel:
|
11
|
-
title:
|
11
|
+
ariaLabel: o,
|
12
|
+
title: e,
|
12
13
|
icon: n
|
13
14
|
}) => {
|
14
15
|
const i = !!(s != null && s.startsWith("http://")), m = `link ${r} ${i ? "external" : ""}`;
|
@@ -19,13 +20,13 @@ import '../../../assets/CustomLink.css';const u = ({
|
|
19
20
|
target: $,
|
20
21
|
rel: "noopener noreferrer",
|
21
22
|
className: `${m} ${r}`,
|
22
|
-
style:
|
23
|
+
style: a,
|
23
24
|
onClick: l,
|
24
|
-
"aria-label":
|
25
|
-
title:
|
25
|
+
"aria-label": o,
|
26
|
+
title: e,
|
26
27
|
children: [
|
27
28
|
n && /* @__PURE__ */ c("span", { className: "icon", children: n }),
|
28
|
-
|
29
|
+
t
|
29
30
|
]
|
30
31
|
}
|
31
32
|
) : /* @__PURE__ */ p(
|
@@ -33,17 +34,17 @@ import '../../../assets/CustomLink.css';const u = ({
|
|
33
34
|
{
|
34
35
|
to: s,
|
35
36
|
className: `${m} ${r}`,
|
36
|
-
style:
|
37
|
+
style: a,
|
37
38
|
onClick: l,
|
38
|
-
"aria-label":
|
39
|
-
title:
|
39
|
+
"aria-label": o,
|
40
|
+
title: e,
|
40
41
|
children: [
|
41
42
|
n && /* @__PURE__ */ c("span", { className: "icon", children: n }),
|
42
|
-
|
43
|
+
t
|
43
44
|
]
|
44
45
|
}
|
45
46
|
);
|
46
47
|
};
|
47
48
|
export {
|
48
|
-
|
49
|
+
j as CustomLink
|
49
50
|
};
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
2
2
|
import { useState as w, useRef as $, useEffect as N } from "react";
|
3
|
+
import '../../../assets/src/components/Ui/DatePicker/DatePicker.css';/* empty css */
|
3
4
|
import { IconCalendarBlank as A, IconCaretUpDown as G, IconCaretLeft as I, IconCaretRight as S } from "../Icons/Icons.js";
|
4
|
-
|
5
|
+
const H = [
|
5
6
|
"Январь",
|
6
7
|
"Февраль",
|
7
8
|
"Март",
|
@@ -14,7 +15,7 @@ import '../../../assets/DatePicker.css';const H = [
|
|
14
15
|
"Октябрь",
|
15
16
|
"Ноябрь",
|
16
17
|
"Декабрь"
|
17
|
-
],
|
18
|
+
], Z = ({
|
18
19
|
name: O = "date",
|
19
20
|
value: r = null,
|
20
21
|
onChange: x = () => {
|
@@ -115,11 +116,18 @@ import '../../../assets/DatePicker.css';const H = [
|
|
115
116
|
"aria-hidden": "true"
|
116
117
|
}
|
117
118
|
),
|
118
|
-
/* @__PURE__ */ i(
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
119
|
+
/* @__PURE__ */ i(
|
120
|
+
"div",
|
121
|
+
{
|
122
|
+
className: `datepicker-input ${T}`,
|
123
|
+
onClick: () => g(!F),
|
124
|
+
children: [
|
125
|
+
/* @__PURE__ */ n(A, {}),
|
126
|
+
/* @__PURE__ */ n("span", { className: "placeholder", children: c ? j(c) : L }),
|
127
|
+
/* @__PURE__ */ n(G, { className: "caret" })
|
128
|
+
]
|
129
|
+
}
|
130
|
+
),
|
123
131
|
F && /* @__PURE__ */ i("div", { className: `datepicker-calendar ${E}`, children: [
|
124
132
|
/* @__PURE__ */ i("div", { className: "calendar-controls", children: [
|
125
133
|
/* @__PURE__ */ i("div", { className: "month-control", children: [
|
@@ -171,5 +179,5 @@ import '../../../assets/DatePicker.css';const H = [
|
|
171
179
|
] });
|
172
180
|
};
|
173
181
|
export {
|
174
|
-
|
182
|
+
Z as default
|
175
183
|
};
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
2
2
|
import l from "react";
|
3
|
-
import
|
4
|
-
const
|
3
|
+
import n from "./DatePicker.js";
|
4
|
+
const d = {
|
5
5
|
title: "UIKit/DatePicker",
|
6
|
-
component:
|
6
|
+
component: n,
|
7
7
|
tags: ["autodocs"],
|
8
8
|
argTypes: {
|
9
9
|
value: {
|
@@ -39,27 +39,27 @@ const m = {
|
|
39
39
|
description: "Максимальная доступная дата"
|
40
40
|
}
|
41
41
|
}
|
42
|
-
},
|
42
|
+
}, m = {
|
43
43
|
args: {
|
44
44
|
placeholder: "Любая дата"
|
45
45
|
}
|
46
|
-
},
|
46
|
+
}, p = {
|
47
47
|
args: {
|
48
48
|
value: new Date(2023, 5, 15),
|
49
49
|
placeholder: "Выберите дату"
|
50
50
|
}
|
51
|
-
},
|
51
|
+
}, u = {
|
52
52
|
args: {
|
53
53
|
minDate: new Date(2023, 0, 1),
|
54
54
|
maxDate: new Date(2023, 11, 31)
|
55
55
|
}
|
56
|
-
},
|
56
|
+
}, x = {
|
57
57
|
args: {
|
58
58
|
inputClassName: "custom-input",
|
59
59
|
calendarClassName: "custom-calendar"
|
60
60
|
},
|
61
61
|
decorators: [
|
62
|
-
(
|
62
|
+
(t) => /* @__PURE__ */ a("div", { children: [
|
63
63
|
/* @__PURE__ */ e("style", { children: `
|
64
64
|
.custom-input {
|
65
65
|
border: 2px solid #6366f1;
|
@@ -75,40 +75,46 @@ const m = {
|
|
75
75
|
background-color: #6366f1;
|
76
76
|
}
|
77
77
|
` }),
|
78
|
-
/* @__PURE__ */ e(
|
78
|
+
/* @__PURE__ */ e(t, {})
|
79
79
|
] })
|
80
80
|
]
|
81
|
-
},
|
82
|
-
render:
|
83
|
-
const [t,
|
81
|
+
}, h = {
|
82
|
+
render: () => {
|
83
|
+
const [t, o] = l.useState(null);
|
84
84
|
return /* @__PURE__ */ a("div", { style: { maxWidth: "300px" }, children: [
|
85
|
-
/* @__PURE__ */ e(
|
85
|
+
/* @__PURE__ */ e(
|
86
|
+
n,
|
87
|
+
{
|
88
|
+
value: t,
|
89
|
+
onChange: o,
|
90
|
+
placeholder: "Контролируемый выбор"
|
91
|
+
}
|
92
|
+
),
|
86
93
|
/* @__PURE__ */ a("div", { style: { marginTop: "16px", fontSize: "14px" }, children: [
|
87
94
|
"Выбрано: ",
|
88
95
|
t ? t.toLocaleDateString("ru-RU") : "дата не выбрана"
|
89
96
|
] })
|
90
97
|
] });
|
91
98
|
}
|
92
|
-
},
|
93
|
-
render:
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
}
|
99
|
+
}, g = {
|
100
|
+
render: () => /* @__PURE__ */ a("form", { onSubmit: (o) => {
|
101
|
+
o.preventDefault();
|
102
|
+
const r = new FormData(o.target);
|
103
|
+
alert(`Выбрана дата: ${r.get("eventDate")}`);
|
104
|
+
}, style: { maxWidth: "300px" }, children: [
|
105
|
+
/* @__PURE__ */ a("div", { style: { marginBottom: "16px" }, children: [
|
106
|
+
/* @__PURE__ */ e("label", { style: { display: "block", marginBottom: "4px" }, children: "Дата события:" }),
|
107
|
+
/* @__PURE__ */ e(n, { name: "eventDate" })
|
108
|
+
] }),
|
109
|
+
/* @__PURE__ */ e("button", { type: "submit", children: "Отправить" })
|
110
|
+
] })
|
105
111
|
};
|
106
112
|
export {
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
113
|
+
h as Controlled,
|
114
|
+
x as CustomStyled,
|
115
|
+
m as Default,
|
116
|
+
g as InForm,
|
117
|
+
u as WithDateRange,
|
118
|
+
p as WithInitialDate,
|
119
|
+
d as default
|
114
120
|
};
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
2
2
|
import { useState as m, useRef as O, useEffect as g } from "react";
|
3
|
+
import '../../../assets/src/components/Ui/DropdownInput/DropdownInput.css';/* empty css */
|
3
4
|
import { IconCaretUpDown as E, IconWarningCircle as P } from "../Icons/Icons.js";
|
4
|
-
|
5
|
+
const j = ({
|
5
6
|
label: v,
|
6
7
|
options: i,
|
7
8
|
value: o,
|
@@ -13,10 +14,10 @@ import '../../../assets/DropdownInput.css';const j = ({
|
|
13
14
|
className: k = ""
|
14
15
|
}) => {
|
15
16
|
var w;
|
16
|
-
const [
|
17
|
+
const [p, u] = m(!1), [t, N] = m(o || ""), [I, x] = m(!1), s = O(null);
|
17
18
|
g(() => {
|
18
19
|
const e = (l) => {
|
19
|
-
|
20
|
+
s.current && !s.current.contains(l.target) && u(!1);
|
20
21
|
};
|
21
22
|
return document.addEventListener("click", e), () => {
|
22
23
|
document.removeEventListener("click", e);
|
@@ -25,21 +26,21 @@ import '../../../assets/DropdownInput.css';const j = ({
|
|
25
26
|
N(o || "");
|
26
27
|
}, [o]);
|
27
28
|
const b = (e) => {
|
28
|
-
N(e),
|
29
|
+
N(e), u(!1), f && f(e);
|
29
30
|
}, $ = (e) => {
|
30
31
|
var l;
|
31
|
-
if (e.stopPropagation(), !
|
32
|
-
const a = (l =
|
32
|
+
if (e.stopPropagation(), !p) {
|
33
|
+
const a = (l = s.current) == null ? void 0 : l.getBoundingClientRect(), D = window.innerHeight - ((a == null ? void 0 : a.bottom) || 0);
|
33
34
|
x(D < 304);
|
34
35
|
}
|
35
|
-
|
36
|
+
u((a) => !a);
|
36
37
|
};
|
37
|
-
return /* @__PURE__ */ c("div", { className: `dropdown-input ${k}`, ref:
|
38
|
+
return /* @__PURE__ */ c("div", { className: `dropdown-input ${k}`, ref: s, children: [
|
38
39
|
/* @__PURE__ */ c(
|
39
40
|
"select",
|
40
41
|
{
|
41
42
|
name: C,
|
42
|
-
value:
|
43
|
+
value: t,
|
43
44
|
onChange: (e) => b(e.target.value),
|
44
45
|
className: "dropdown-input__native",
|
45
46
|
disabled: h,
|
@@ -54,23 +55,23 @@ import '../../../assets/DropdownInput.css';const j = ({
|
|
54
55
|
"div",
|
55
56
|
{
|
56
57
|
className: `input-box
|
57
|
-
${
|
58
|
+
${p ? "opened" : ""}
|
58
59
|
${h ? "disabled" : ""}
|
59
60
|
${d ? "invalid" : ""}`,
|
60
61
|
onClick: $,
|
61
62
|
children: [
|
62
|
-
/* @__PURE__ */ n("span", { className: "input-value", children:
|
63
|
+
/* @__PURE__ */ n("span", { className: "input-value", children: t === void 0 ? (
|
63
64
|
// Если значение не передано
|
64
65
|
/* @__PURE__ */ n("span", { className: "placeholder", children: r })
|
65
|
-
) : ((w = i.find((e) => e.value ===
|
66
|
+
) : ((w = i.find((e) => e.value === t)) == null ? void 0 : w.label) || /* @__PURE__ */ n("span", { className: "placeholder", children: r }) }),
|
66
67
|
/* @__PURE__ */ n(E, { className: "caret" }),
|
67
|
-
|
68
|
+
p && /* @__PURE__ */ n("ul", { className: `options ${I ? "above" : ""}`, children: i.map((e) => /* @__PURE__ */ n(
|
68
69
|
"li",
|
69
70
|
{
|
70
71
|
onClick: (l) => {
|
71
72
|
l.stopPropagation(), b(e.value);
|
72
73
|
},
|
73
|
-
className:
|
74
|
+
className: t === e.value ? "option--selected" : "",
|
74
75
|
children: e.label
|
75
76
|
},
|
76
77
|
e.value
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { jsxs as R, jsx as h } from "react/jsx-runtime";
|
2
2
|
import { useState as a, useRef as b, useLayoutEffect as C } from "react";
|
3
|
-
import '../../../assets/DropdownMenu.css'
|
3
|
+
import '../../../assets/src/components/Ui/DropdownMenu/DropdownMenu.css';/* empty css */
|
4
|
+
const W = ({
|
4
5
|
content: m,
|
5
6
|
horizontalPosition: s = "right",
|
6
7
|
verticalPosition: c = "bottom",
|
@@ -78,6 +79,6 @@ import '../../../assets/DropdownMenu.css';const O = ({
|
|
78
79
|
] });
|
79
80
|
};
|
80
81
|
export {
|
81
|
-
|
82
|
-
|
82
|
+
W as DropdownMenu,
|
83
|
+
W as default
|
83
84
|
};
|