triafly-ui-kit 1.0.24 → 1.0.25
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 +278 -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,9 +1,10 @@
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
2
|
+
import '../../../../assets/src/components/Ui/Form/FormRoot/Form.css';/* empty css */
|
2
3
|
import { useMemo as l } from "react";
|
3
4
|
import { FormContext as f } from "../FormContext/FormContext.js";
|
4
5
|
import { FormItem as i } from "../FormItem/FormItem.js";
|
5
6
|
import { useForm as p } from "../useForm/useForm.js";
|
6
|
-
|
7
|
+
const v = ({ form: m, children: c, onFinish: o, disabled: t = !1 }) => {
|
7
8
|
const n = p()[0], s = l(() => {
|
8
9
|
const r = m || n;
|
9
10
|
return r.disabled = t, r;
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { IconCircleNotch as
|
3
|
-
import '../../../assets/Loader.css'
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
2
|
+
import { IconCircleNotch as e } from "../Icons/Icons.js";
|
3
|
+
import '../../../assets/src/components/Ui/Loader/Loader.css';/* empty css */
|
4
|
+
const s = ({ size: o, color: r, viewBox: m, className: t }) => /* @__PURE__ */ c(e, { size: o, color: r, viewBox: m, className: `loader ${t}` });
|
4
5
|
export {
|
5
|
-
|
6
|
+
s as Loader
|
6
7
|
};
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import { jsx as s, Fragment as h, jsxs as
|
1
|
+
import { jsx as s, Fragment as h, jsxs as m } from "react/jsx-runtime";
|
2
2
|
import { createElement as f } from "react";
|
3
3
|
import { createPortal as u } from "react-dom";
|
4
|
+
import '../../../assets/src/components/Ui/ModalWindow/ModalWindow.css';/* empty css */
|
4
5
|
import { Button as v } from "../Button/Button.js";
|
5
6
|
import { IconX as N } from "../Icons/Icons.js";
|
6
|
-
|
7
|
-
isOpen:
|
8
|
-
onClose:
|
7
|
+
const x = ({
|
8
|
+
isOpen: l,
|
9
|
+
onClose: i,
|
9
10
|
width: a,
|
10
11
|
size: r = "md",
|
11
12
|
iconHeader: o,
|
@@ -13,10 +14,10 @@ import '../../../assets/ModalWindow.css';const k = ({
|
|
13
14
|
children: d,
|
14
15
|
usePortal: e = !1,
|
15
16
|
foolHeight: c,
|
16
|
-
position:
|
17
|
+
position: p = "center"
|
17
18
|
}) => {
|
18
|
-
if (!
|
19
|
-
const
|
19
|
+
if (!l) return null;
|
20
|
+
const w = (o == null ? void 0 : o.size) ?? 20, n = /* @__PURE__ */ s(h, { children: /* @__PURE__ */ s("div", { className: `modal-window overlay position-${p}`, onClick: () => i(!1), children: /* @__PURE__ */ m(
|
20
21
|
"div",
|
21
22
|
{
|
22
23
|
className: `modal-window__body size-${r} ${c ? "foolHeight" : ""}`,
|
@@ -26,8 +27,8 @@ import '../../../assets/ModalWindow.css';const k = ({
|
|
26
27
|
pointerEvents: "auto"
|
27
28
|
},
|
28
29
|
children: [
|
29
|
-
/* @__PURE__ */
|
30
|
-
(o == null ? void 0 : o.view) && /* @__PURE__ */ s("div", { className: `modal-window__header__icon status-${o.status}`, children: f(o.icon, { size:
|
30
|
+
/* @__PURE__ */ m("div", { className: "modal-window__header", children: [
|
31
|
+
(o == null ? void 0 : o.view) && /* @__PURE__ */ s("div", { className: `modal-window__header__icon status-${o.status}`, children: f(o.icon, { size: w }) }),
|
31
32
|
t != null && t.toString() ? /* @__PURE__ */ s("span", { className: "modal-window__header__title", children: t }) : t,
|
32
33
|
/* @__PURE__ */ s(
|
33
34
|
v,
|
@@ -35,7 +36,7 @@ import '../../../assets/ModalWindow.css';const k = ({
|
|
35
36
|
type: "button",
|
36
37
|
icon: /* @__PURE__ */ s(N, { size: 24 }),
|
37
38
|
className: "icon-button",
|
38
|
-
onClick: () =>
|
39
|
+
onClick: () => i(!1)
|
39
40
|
}
|
40
41
|
)
|
41
42
|
] }),
|
@@ -43,8 +44,8 @@ import '../../../assets/ModalWindow.css';const k = ({
|
|
43
44
|
]
|
44
45
|
}
|
45
46
|
) }) });
|
46
|
-
return e ? u(
|
47
|
+
return e ? u(n, document.body) : n;
|
47
48
|
};
|
48
49
|
export {
|
49
|
-
|
50
|
+
x as ModalWindow
|
50
51
|
};
|
@@ -1,280 +1,25 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import { IconCaretRight as
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
ae.exports = M(ue);
|
10
|
-
})(fe, (Z) => (() => {
|
11
|
-
var M = { 703: (u, g, C) => {
|
12
|
-
var a = C(414);
|
13
|
-
function I() {
|
14
|
-
}
|
15
|
-
function F() {
|
16
|
-
}
|
17
|
-
F.resetWarningCache = I, u.exports = function() {
|
18
|
-
function m(ie, E, Y, K, se, U) {
|
19
|
-
if (U !== a) {
|
20
|
-
var $ = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
|
21
|
-
throw $.name = "Invariant Violation", $;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
function N() {
|
25
|
-
return m;
|
26
|
-
}
|
27
|
-
m.isRequired = m;
|
28
|
-
var q = { array: m, bigint: m, bool: m, func: m, number: m, object: m, string: m, symbol: m, any: m, arrayOf: N, element: m, elementType: m, instanceOf: N, node: m, objectOf: N, oneOf: N, oneOfType: N, shape: N, exact: N, checkPropTypes: F, resetWarningCache: I };
|
29
|
-
return q.PropTypes = q, q;
|
30
|
-
};
|
31
|
-
}, 697: (u, g, C) => {
|
32
|
-
u.exports = C(703)();
|
33
|
-
}, 414: (u) => {
|
34
|
-
u.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
35
|
-
}, 98: (u) => {
|
36
|
-
u.exports = Z;
|
37
|
-
} }, V = {};
|
38
|
-
function h(u) {
|
39
|
-
var g = V[u];
|
40
|
-
if (g !== void 0) return g.exports;
|
41
|
-
var C = V[u] = { exports: {} };
|
42
|
-
return M[u](C, C.exports, h), C.exports;
|
43
|
-
}
|
44
|
-
h.n = (u) => {
|
45
|
-
var g = u && u.__esModule ? () => u.default : () => u;
|
46
|
-
return h.d(g, { a: g }), g;
|
47
|
-
}, h.d = (u, g) => {
|
48
|
-
for (var C in g) h.o(g, C) && !h.o(u, C) && Object.defineProperty(u, C, { enumerable: !0, get: g[C] });
|
49
|
-
}, h.o = (u, g) => Object.prototype.hasOwnProperty.call(u, g), h.r = (u) => {
|
50
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(u, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(u, "__esModule", { value: !0 });
|
51
|
-
};
|
52
|
-
var te = {};
|
53
|
-
return (() => {
|
54
|
-
h.r(te), h.d(te, { default: () => le });
|
55
|
-
var u = h(98), g = h.n(u), C = h(697), a = h.n(C);
|
56
|
-
function I() {
|
57
|
-
return I = Object.assign ? Object.assign.bind() : function(r) {
|
58
|
-
for (var i = 1; i < arguments.length; i++) {
|
59
|
-
var o = arguments[i];
|
60
|
-
for (var l in o) Object.prototype.hasOwnProperty.call(o, l) && (r[l] = o[l]);
|
61
|
-
}
|
62
|
-
return r;
|
63
|
-
}, I.apply(this, arguments);
|
64
|
-
}
|
65
|
-
var F = function(r) {
|
66
|
-
var i = r.pageClassName, o = r.pageLinkClassName, l = r.page, S = r.selected, _ = r.activeClassName, R = r.activeLinkClassName, t = r.getEventListener, e = r.pageSelectedHandler, p = r.href, n = r.extraAriaContext, s = r.pageLabelBuilder, c = r.rel, f = r.ariaLabel || "Page " + l + (n ? " " + n : ""), v = null;
|
67
|
-
return S && (v = "page", f = r.ariaLabel || "Page " + l + " is your current page", i = i !== void 0 ? i + " " + _ : _, o !== void 0 ? R !== void 0 && (o = o + " " + R) : o = R), g().createElement("li", { className: i }, g().createElement("a", I({ rel: c, role: p ? void 0 : "button", className: o, href: p, tabIndex: S ? "-1" : "0", "aria-label": f, "aria-current": v, onKeyPress: e }, t(e)), s(l)));
|
68
|
-
};
|
69
|
-
F.propTypes = { pageSelectedHandler: a().func.isRequired, selected: a().bool.isRequired, pageClassName: a().string, pageLinkClassName: a().string, activeClassName: a().string, activeLinkClassName: a().string, extraAriaContext: a().string, href: a().string, ariaLabel: a().string, page: a().number.isRequired, getEventListener: a().func.isRequired, pageLabelBuilder: a().func.isRequired, rel: a().string };
|
70
|
-
const m = F;
|
71
|
-
function N() {
|
72
|
-
return N = Object.assign ? Object.assign.bind() : function(r) {
|
73
|
-
for (var i = 1; i < arguments.length; i++) {
|
74
|
-
var o = arguments[i];
|
75
|
-
for (var l in o) Object.prototype.hasOwnProperty.call(o, l) && (r[l] = o[l]);
|
76
|
-
}
|
77
|
-
return r;
|
78
|
-
}, N.apply(this, arguments);
|
79
|
-
}
|
80
|
-
var q = function(r) {
|
81
|
-
var i = r.breakLabel, o = r.breakAriaLabel, l = r.breakClassName, S = r.breakLinkClassName, _ = r.breakHandler, R = r.getEventListener, t = l || "break";
|
82
|
-
return g().createElement("li", { className: t }, g().createElement("a", N({ className: S, role: "button", tabIndex: "0", "aria-label": o, onKeyPress: _ }, R(_)), i));
|
83
|
-
};
|
84
|
-
q.propTypes = { breakLabel: a().oneOfType([a().string, a().node]), breakAriaLabel: a().string, breakClassName: a().string, breakLinkClassName: a().string, breakHandler: a().func.isRequired, getEventListener: a().func.isRequired };
|
85
|
-
const ie = q;
|
86
|
-
function E(r) {
|
87
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
88
|
-
return r ?? i;
|
89
|
-
}
|
90
|
-
function Y(r) {
|
91
|
-
return Y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
|
92
|
-
return typeof i;
|
93
|
-
} : function(i) {
|
94
|
-
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
95
|
-
}, Y(r);
|
96
|
-
}
|
97
|
-
function K() {
|
98
|
-
return K = Object.assign ? Object.assign.bind() : function(r) {
|
99
|
-
for (var i = 1; i < arguments.length; i++) {
|
100
|
-
var o = arguments[i];
|
101
|
-
for (var l in o) Object.prototype.hasOwnProperty.call(o, l) && (r[l] = o[l]);
|
102
|
-
}
|
103
|
-
return r;
|
104
|
-
}, K.apply(this, arguments);
|
105
|
-
}
|
106
|
-
function se(r, i) {
|
107
|
-
for (var o = 0; o < i.length; o++) {
|
108
|
-
var l = i[o];
|
109
|
-
l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Object.defineProperty(r, l.key, l);
|
110
|
-
}
|
111
|
-
}
|
112
|
-
function U(r, i) {
|
113
|
-
return U = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, l) {
|
114
|
-
return o.__proto__ = l, o;
|
115
|
-
}, U(r, i);
|
116
|
-
}
|
117
|
-
function $(r, i) {
|
118
|
-
if (i && (Y(i) === "object" || typeof i == "function")) return i;
|
119
|
-
if (i !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
120
|
-
return k(r);
|
121
|
-
}
|
122
|
-
function k(r) {
|
123
|
-
if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
124
|
-
return r;
|
125
|
-
}
|
126
|
-
function z(r) {
|
127
|
-
return z = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(i) {
|
128
|
-
return i.__proto__ || Object.getPrototypeOf(i);
|
129
|
-
}, z(r);
|
130
|
-
}
|
131
|
-
function P(r, i, o) {
|
132
|
-
return i in r ? Object.defineProperty(r, i, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : r[i] = o, r;
|
133
|
-
}
|
134
|
-
var re = function(r) {
|
135
|
-
(function(t, e) {
|
136
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
137
|
-
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && U(t, e);
|
138
|
-
})(R, r);
|
139
|
-
var i, o, l, S, _ = (l = R, S = function() {
|
140
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
141
|
-
if (typeof Proxy == "function") return !0;
|
142
|
-
try {
|
143
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
144
|
-
})), !0;
|
145
|
-
} catch {
|
146
|
-
return !1;
|
147
|
-
}
|
148
|
-
}(), function() {
|
149
|
-
var t, e = z(l);
|
150
|
-
if (S) {
|
151
|
-
var p = z(this).constructor;
|
152
|
-
t = Reflect.construct(e, arguments, p);
|
153
|
-
} else t = e.apply(this, arguments);
|
154
|
-
return $(this, t);
|
155
|
-
});
|
156
|
-
function R(t) {
|
157
|
-
var e, p;
|
158
|
-
return function(n, s) {
|
159
|
-
if (!(n instanceof s)) throw new TypeError("Cannot call a class as a function");
|
160
|
-
}(this, R), P(k(e = _.call(this, t)), "handlePreviousPage", function(n) {
|
161
|
-
var s = e.state.selected;
|
162
|
-
e.handleClick(n, null, s > 0 ? s - 1 : void 0, { isPrevious: !0 });
|
163
|
-
}), P(k(e), "handleNextPage", function(n) {
|
164
|
-
var s = e.state.selected, c = e.props.pageCount;
|
165
|
-
e.handleClick(n, null, s < c - 1 ? s + 1 : void 0, { isNext: !0 });
|
166
|
-
}), P(k(e), "handlePageSelected", function(n, s) {
|
167
|
-
if (e.state.selected === n) return e.callActiveCallback(n), void e.handleClick(s, null, void 0, { isActive: !0 });
|
168
|
-
e.handleClick(s, null, n);
|
169
|
-
}), P(k(e), "handlePageChange", function(n) {
|
170
|
-
e.state.selected !== n && (e.setState({ selected: n }), e.callCallback(n));
|
171
|
-
}), P(k(e), "getEventListener", function(n) {
|
172
|
-
return P({}, e.props.eventListener, n);
|
173
|
-
}), P(k(e), "handleClick", function(n, s, c) {
|
174
|
-
var f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, v = f.isPrevious, O = v !== void 0 && v, H = f.isNext, W = H !== void 0 && H, D = f.isBreak, x = D !== void 0 && D, w = f.isActive, A = w !== void 0 && w;
|
175
|
-
n.preventDefault ? n.preventDefault() : n.returnValue = !1;
|
176
|
-
var j = e.state.selected, d = e.props.onClick, L = c;
|
177
|
-
if (d) {
|
178
|
-
var y = d({ index: s, selected: j, nextSelectedPage: c, event: n, isPrevious: O, isNext: W, isBreak: x, isActive: A });
|
179
|
-
if (y === !1) return;
|
180
|
-
Number.isInteger(y) && (L = y);
|
181
|
-
}
|
182
|
-
L !== void 0 && e.handlePageChange(L);
|
183
|
-
}), P(k(e), "handleBreakClick", function(n, s) {
|
184
|
-
var c = e.state.selected;
|
185
|
-
e.handleClick(s, n, c < n ? e.getForwardJump() : e.getBackwardJump(), { isBreak: !0 });
|
186
|
-
}), P(k(e), "callCallback", function(n) {
|
187
|
-
e.props.onPageChange !== void 0 && typeof e.props.onPageChange == "function" && e.props.onPageChange({ selected: n });
|
188
|
-
}), P(k(e), "callActiveCallback", function(n) {
|
189
|
-
e.props.onPageActive !== void 0 && typeof e.props.onPageActive == "function" && e.props.onPageActive({ selected: n });
|
190
|
-
}), P(k(e), "getElementPageRel", function(n) {
|
191
|
-
var s = e.state.selected, c = e.props, f = c.nextPageRel, v = c.prevPageRel, O = c.selectedPageRel;
|
192
|
-
return s - 1 === n ? v : s === n ? O : s + 1 === n ? f : void 0;
|
193
|
-
}), P(k(e), "pagination", function() {
|
194
|
-
var n = [], s = e.props, c = s.pageRangeDisplayed, f = s.pageCount, v = s.marginPagesDisplayed, O = s.breakLabel, H = s.breakClassName, W = s.breakLinkClassName, D = s.breakAriaLabels, x = e.state.selected;
|
195
|
-
if (f <= c) for (var w = 0; w < f; w++) n.push(e.getPageElement(w));
|
196
|
-
else {
|
197
|
-
var A = c / 2, j = c - A;
|
198
|
-
x > f - c / 2 ? A = c - (j = f - x) : x < c / 2 && (j = c - (A = x));
|
199
|
-
var d, L, y = function(T) {
|
200
|
-
return e.getPageElement(T);
|
201
|
-
}, b = [];
|
202
|
-
for (d = 0; d < f; d++) {
|
203
|
-
var G = d + 1;
|
204
|
-
if (G <= v) b.push({ type: "page", index: d, display: y(d) });
|
205
|
-
else if (G > f - v) b.push({ type: "page", index: d, display: y(d) });
|
206
|
-
else if (d >= x - A && d <= x + (x === 0 && c > 1 ? j - 1 : j)) b.push({ type: "page", index: d, display: y(d) });
|
207
|
-
else if (O && b.length > 0 && b[b.length - 1].display !== L && (c > 0 || v > 0)) {
|
208
|
-
var ne = d < x ? D.backward : D.forward;
|
209
|
-
L = g().createElement(ie, { key: d, breakAriaLabel: ne, breakLabel: O, breakClassName: H, breakLinkClassName: W, breakHandler: e.handleBreakClick.bind(null, d), getEventListener: e.getEventListener }), b.push({ type: "break", index: d, display: L });
|
210
|
-
}
|
211
|
-
}
|
212
|
-
b.forEach(function(T, B) {
|
213
|
-
var Q = T;
|
214
|
-
T.type === "break" && b[B - 1] && b[B - 1].type === "page" && b[B + 1] && b[B + 1].type === "page" && b[B + 1].index - b[B - 1].index <= 2 && (Q = { type: "page", index: T.index, display: y(T.index) }), n.push(Q.display);
|
215
|
-
});
|
216
|
-
}
|
217
|
-
return n;
|
218
|
-
}), t.initialPage !== void 0 && t.forcePage !== void 0 && console.warn("(react-paginate): Both initialPage (".concat(t.initialPage, ") and forcePage (").concat(t.forcePage, ") props are provided, which is discouraged.") + ` Use exclusively forcePage prop for a controlled component.
|
219
|
-
See https://reactjs.org/docs/forms.html#controlled-components`), p = t.initialPage ? t.initialPage : t.forcePage ? t.forcePage : 0, e.state = { selected: p }, e;
|
220
|
-
}
|
221
|
-
return i = R, (o = [{ key: "componentDidMount", value: function() {
|
222
|
-
var t = this.props, e = t.initialPage, p = t.disableInitialCallback, n = t.extraAriaContext, s = t.pageCount, c = t.forcePage;
|
223
|
-
e === void 0 || p || this.callCallback(e), n && console.warn("DEPRECATED (react-paginate): The extraAriaContext prop is deprecated. You should now use the ariaLabelBuilder instead."), Number.isInteger(s) || console.warn("(react-paginate): The pageCount prop value provided is not an integer (".concat(s, "). Did you forget a Math.ceil()?")), e !== void 0 && e > s - 1 && console.warn("(react-paginate): The initialPage prop provided is greater than the maximum page index from pageCount prop (".concat(e, " > ").concat(s - 1, ").")), c !== void 0 && c > s - 1 && console.warn("(react-paginate): The forcePage prop provided is greater than the maximum page index from pageCount prop (".concat(c, " > ").concat(s - 1, ")."));
|
224
|
-
} }, { key: "componentDidUpdate", value: function(t) {
|
225
|
-
this.props.forcePage !== void 0 && this.props.forcePage !== t.forcePage && (this.props.forcePage > this.props.pageCount - 1 && console.warn("(react-paginate): The forcePage prop provided is greater than the maximum page index from pageCount prop (".concat(this.props.forcePage, " > ").concat(this.props.pageCount - 1, ").")), this.setState({ selected: this.props.forcePage })), Number.isInteger(t.pageCount) && !Number.isInteger(this.props.pageCount) && console.warn("(react-paginate): The pageCount prop value provided is not an integer (".concat(this.props.pageCount, "). Did you forget a Math.ceil()?"));
|
226
|
-
} }, { key: "getForwardJump", value: function() {
|
227
|
-
var t = this.state.selected, e = this.props, p = e.pageCount, n = t + e.pageRangeDisplayed;
|
228
|
-
return n >= p ? p - 1 : n;
|
229
|
-
} }, { key: "getBackwardJump", value: function() {
|
230
|
-
var t = this.state.selected - this.props.pageRangeDisplayed;
|
231
|
-
return t < 0 ? 0 : t;
|
232
|
-
} }, { key: "getElementHref", value: function(t) {
|
233
|
-
var e = this.props, p = e.hrefBuilder, n = e.pageCount, s = e.hrefAllControls;
|
234
|
-
if (p) return s || t >= 0 && t < n ? p(t + 1, n, this.state.selected) : void 0;
|
235
|
-
} }, { key: "ariaLabelBuilder", value: function(t) {
|
236
|
-
var e = t === this.state.selected;
|
237
|
-
if (this.props.ariaLabelBuilder && t >= 0 && t < this.props.pageCount) {
|
238
|
-
var p = this.props.ariaLabelBuilder(t + 1, e);
|
239
|
-
return this.props.extraAriaContext && !e && (p = p + " " + this.props.extraAriaContext), p;
|
240
|
-
}
|
241
|
-
} }, { key: "getPageElement", value: function(t) {
|
242
|
-
var e = this.state.selected, p = this.props, n = p.pageClassName, s = p.pageLinkClassName, c = p.activeClassName, f = p.activeLinkClassName, v = p.extraAriaContext, O = p.pageLabelBuilder;
|
243
|
-
return g().createElement(m, { key: t, pageSelectedHandler: this.handlePageSelected.bind(null, t), selected: e === t, rel: this.getElementPageRel(t), pageClassName: n, pageLinkClassName: s, activeClassName: c, activeLinkClassName: f, extraAriaContext: v, href: this.getElementHref(t), ariaLabel: this.ariaLabelBuilder(t), page: t + 1, pageLabelBuilder: O, getEventListener: this.getEventListener });
|
244
|
-
} }, { key: "render", value: function() {
|
245
|
-
var t = this.props.renderOnZeroPageCount;
|
246
|
-
if (this.props.pageCount === 0 && t !== void 0) return t && t(this.props);
|
247
|
-
var e = this.props, p = e.disabledClassName, n = e.disabledLinkClassName, s = e.pageCount, c = e.className, f = e.containerClassName, v = e.previousLabel, O = e.previousClassName, H = e.previousLinkClassName, W = e.previousAriaLabel, D = e.prevRel, x = e.nextLabel, w = e.nextClassName, A = e.nextLinkClassName, j = e.nextAriaLabel, d = e.nextRel, L = this.state.selected, y = L === 0, b = L === s - 1, G = "".concat(E(O)).concat(y ? " ".concat(E(p)) : ""), ne = "".concat(E(w)).concat(b ? " ".concat(E(p)) : ""), T = "".concat(E(H)).concat(y ? " ".concat(E(n)) : ""), B = "".concat(E(A)).concat(b ? " ".concat(E(n)) : ""), Q = y ? "true" : "false", ce = b ? "true" : "false";
|
248
|
-
return g().createElement("ul", { className: c || f, role: "navigation", "aria-label": "Pagination" }, g().createElement("li", { className: G }, g().createElement("a", K({ className: T, href: this.getElementHref(L - 1), tabIndex: y ? "-1" : "0", role: "button", onKeyPress: this.handlePreviousPage, "aria-disabled": Q, "aria-label": W, rel: D }, this.getEventListener(this.handlePreviousPage)), v)), this.pagination(), g().createElement("li", { className: ne }, g().createElement("a", K({ className: B, href: this.getElementHref(L + 1), tabIndex: b ? "-1" : "0", role: "button", onKeyPress: this.handleNextPage, "aria-disabled": ce, "aria-label": j, rel: d }, this.getEventListener(this.handleNextPage)), x)));
|
249
|
-
} }]) && se(i.prototype, o), Object.defineProperty(i, "prototype", { writable: !1 }), R;
|
250
|
-
}(u.Component);
|
251
|
-
P(re, "propTypes", { pageCount: a().number.isRequired, pageRangeDisplayed: a().number, marginPagesDisplayed: a().number, previousLabel: a().node, previousAriaLabel: a().string, prevPageRel: a().string, prevRel: a().string, nextLabel: a().node, nextAriaLabel: a().string, nextPageRel: a().string, nextRel: a().string, breakLabel: a().oneOfType([a().string, a().node]), breakAriaLabels: a().shape({ forward: a().string, backward: a().string }), hrefBuilder: a().func, hrefAllControls: a().bool, onPageChange: a().func, onPageActive: a().func, onClick: a().func, initialPage: a().number, forcePage: a().number, disableInitialCallback: a().bool, containerClassName: a().string, className: a().string, pageClassName: a().string, pageLinkClassName: a().string, pageLabelBuilder: a().func, activeClassName: a().string, activeLinkClassName: a().string, previousClassName: a().string, nextClassName: a().string, previousLinkClassName: a().string, nextLinkClassName: a().string, disabledClassName: a().string, disabledLinkClassName: a().string, breakClassName: a().string, breakLinkClassName: a().string, extraAriaContext: a().string, ariaLabelBuilder: a().func, eventListener: a().string, renderOnZeroPageCount: a().func, selectedPageRel: a().string }), P(re, "defaultProps", { pageRangeDisplayed: 2, marginPagesDisplayed: 3, activeClassName: "selected", previousLabel: "Previous", previousClassName: "previous", previousAriaLabel: "Previous page", prevPageRel: "prev", prevRel: "prev", nextLabel: "Next", nextClassName: "next", nextAriaLabel: "Next page", nextPageRel: "next", nextRel: "next", breakLabel: "...", breakAriaLabels: { forward: "Jump forward", backward: "Jump backward" }, disabledClassName: "disabled", disableInitialCallback: !1, pageLabelBuilder: function(r) {
|
252
|
-
return r;
|
253
|
-
}, eventListener: "onClick", renderOnZeroPageCount: void 0, selectedPageRel: "canonical", hrefAllControls: !1 });
|
254
|
-
const le = re;
|
255
|
-
})(), te;
|
256
|
-
})());
|
257
|
-
}(ee)), ee.exports;
|
258
|
-
}
|
259
|
-
var me = be();
|
260
|
-
const ve = /* @__PURE__ */ pe(me), ke = ({
|
261
|
-
currentPage: ae,
|
262
|
-
totalPages: J,
|
263
|
-
onPageChange: Z
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
2
|
+
import p from "../../../_virtual/react-paginate.js";
|
3
|
+
import '../../../assets/src/components/Ui/Pagination/Pagination.css';/* empty css */
|
4
|
+
import { IconCaretRight as r, IconCaretLeft as t } from "../Icons/Icons.js";
|
5
|
+
const c = ({
|
6
|
+
currentPage: i,
|
7
|
+
totalPages: e,
|
8
|
+
onPageChange: n
|
264
9
|
}) => {
|
265
|
-
const
|
266
|
-
|
10
|
+
const s = (g) => {
|
11
|
+
n(g.selected + 1);
|
267
12
|
};
|
268
|
-
return /* @__PURE__ */
|
269
|
-
|
13
|
+
return /* @__PURE__ */ a("div", { className: "Pagination__Wrap", children: /* @__PURE__ */ a(
|
14
|
+
p,
|
270
15
|
{
|
271
|
-
previousLabel: /* @__PURE__ */
|
272
|
-
nextLabel: /* @__PURE__ */
|
16
|
+
previousLabel: /* @__PURE__ */ a(t, {}),
|
17
|
+
nextLabel: /* @__PURE__ */ a(r, {}),
|
273
18
|
breakLabel: "...",
|
274
|
-
pageCount:
|
275
|
-
marginPagesDisplayed:
|
276
|
-
pageRangeDisplayed:
|
277
|
-
onPageChange:
|
19
|
+
pageCount: e,
|
20
|
+
marginPagesDisplayed: e > 7 ? 1 : 0,
|
21
|
+
pageRangeDisplayed: e > 7 ? 5 : e,
|
22
|
+
onPageChange: s,
|
278
23
|
containerClassName: "pagination",
|
279
24
|
pageClassName: "page-item",
|
280
25
|
pageLinkClassName: "page-link",
|
@@ -285,10 +30,10 @@ const ve = /* @__PURE__ */ pe(me), ke = ({
|
|
285
30
|
breakClassName: "page-item",
|
286
31
|
breakLinkClassName: "page-link",
|
287
32
|
activeClassName: "active",
|
288
|
-
forcePage:
|
33
|
+
forcePage: i - 1
|
289
34
|
}
|
290
35
|
) });
|
291
36
|
};
|
292
37
|
export {
|
293
|
-
|
38
|
+
c as Pagination
|
294
39
|
};
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { jsxs as I, Fragment as T, jsx as l } from "react/jsx-runtime";
|
2
2
|
import { useState as o, useRef as H, useEffect as w } from "react";
|
3
3
|
import { TextInput as U } from "../TextInput/TextInput.js";
|
4
|
+
import '../../../assets/src/components/Ui/SearchInput/SearchInput.css';/* empty css */
|
4
5
|
import { IconCaretUpDown as q } from "../Icons/Icons.js";
|
5
|
-
|
6
|
+
const z = ({
|
6
7
|
name: k = "SearchInput",
|
7
8
|
label: x,
|
8
9
|
placeholder: y = "",
|
@@ -14,18 +15,18 @@ import '../../../assets/SearchInput.css';const z = ({
|
|
14
15
|
className: D = "",
|
15
16
|
isClearable: E,
|
16
17
|
isLoading: L,
|
17
|
-
value:
|
18
|
+
value: r = "",
|
18
19
|
onChange: s,
|
19
20
|
options: n = []
|
20
21
|
}) => {
|
21
|
-
const [m, v] = o(
|
22
|
+
const [m, v] = o(r), [j, i] = o(""), [u, p] = o([]), [d, c] = o(!1), [g, A] = o(!1), [B, C] = o(!1), f = H(null);
|
22
23
|
w(() => {
|
23
|
-
if (
|
24
|
-
const e = n.find((t) => t.value ===
|
25
|
-
i(e ? e.label :
|
24
|
+
if (r) {
|
25
|
+
const e = n.find((t) => t.value === r);
|
26
|
+
i(e ? e.label : r);
|
26
27
|
} else
|
27
28
|
i("");
|
28
|
-
}, [
|
29
|
+
}, [r, n]), w(() => {
|
29
30
|
if (m.trim() === "" && g) {
|
30
31
|
p(n);
|
31
32
|
return;
|
@@ -36,7 +37,7 @@ import '../../../assets/SearchInput.css';const z = ({
|
|
36
37
|
p(e);
|
37
38
|
}, [m, n, g]), w(() => {
|
38
39
|
const e = (t) => {
|
39
|
-
f.current && !f.current.contains(t.target) &&
|
40
|
+
f.current && !f.current.contains(t.target) && c(!1);
|
40
41
|
};
|
41
42
|
return document.addEventListener("mousedown", e), () => {
|
42
43
|
document.removeEventListener("mousedown", e);
|
@@ -44,11 +45,11 @@ import '../../../assets/SearchInput.css';const z = ({
|
|
44
45
|
}, []);
|
45
46
|
const K = (e) => {
|
46
47
|
const t = e.target.value;
|
47
|
-
v(t), i(t), s == null || s(t),
|
48
|
+
v(t), i(t), s == null || s(t), c(!0);
|
48
49
|
}, b = (e) => {
|
49
|
-
v(e.value), i(e.label), s == null || s(e.value),
|
50
|
+
v(e.value), i(e.label), s == null || s(e.value), c(!1);
|
50
51
|
}, O = () => {
|
51
|
-
A(!0),
|
52
|
+
A(!0), c(!0), p(n);
|
52
53
|
}, P = (e) => {
|
53
54
|
e.key === "Enter" && u.length > 0 && d && b(u[0]);
|
54
55
|
}, S = (e) => {
|
@@ -57,7 +58,7 @@ import '../../../assets/SearchInput.css';const z = ({
|
|
57
58
|
const a = (t = f.current) == null ? void 0 : t.getBoundingClientRect(), R = window.innerHeight - ((a == null ? void 0 : a.bottom) || 0);
|
58
59
|
C(R < 304);
|
59
60
|
}
|
60
|
-
|
61
|
+
c((a) => !a);
|
61
62
|
};
|
62
63
|
return /* @__PURE__ */ I(T, { children: [
|
63
64
|
/* @__PURE__ */ l(
|
@@ -1,28 +1,26 @@
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
2
|
-
import
|
3
|
-
import
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
className: l,
|
13
|
-
style: m
|
2
|
+
import p from "../../../_virtual/index.js";
|
3
|
+
import e from "../../../src/components/Ui/Skeleton/Skeleton.module.scss.js";
|
4
|
+
const c = ({
|
5
|
+
width: s = "100%",
|
6
|
+
height: o = "100%",
|
7
|
+
borderRadius: t = "4px",
|
8
|
+
circle: r = !1,
|
9
|
+
animated: m = !0,
|
10
|
+
className: a,
|
11
|
+
style: l
|
14
12
|
}) => /* @__PURE__ */ i(
|
15
13
|
"div",
|
16
14
|
{
|
17
|
-
className:
|
15
|
+
className: p(e.skeleton, { [e.animated]: m }, a),
|
18
16
|
style: {
|
19
|
-
width:
|
20
|
-
height:
|
21
|
-
borderRadius:
|
22
|
-
...
|
17
|
+
width: s,
|
18
|
+
height: o,
|
19
|
+
borderRadius: r ? "50%" : t,
|
20
|
+
...l
|
23
21
|
}
|
24
22
|
}
|
25
23
|
);
|
26
24
|
export {
|
27
|
-
|
25
|
+
c as Skeleton
|
28
26
|
};
|
@@ -1,18 +1,19 @@
|
|
1
|
-
import { jsx as c, jsxs as
|
2
|
-
import '../../../assets/Switch.css'
|
1
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
2
|
+
import '../../../assets/src/components/Ui/Switch/Switch.css';/* empty css */
|
3
|
+
const d = ({
|
3
4
|
label: s,
|
4
5
|
isDisabled: e,
|
5
|
-
isChecked:
|
6
|
-
onChange:
|
7
|
-
name:
|
8
|
-
}) => /* @__PURE__ */ c("div", { className: "switch-container", children: /* @__PURE__ */
|
6
|
+
isChecked: i = !1,
|
7
|
+
onChange: a,
|
8
|
+
name: t = "Switch"
|
9
|
+
}) => /* @__PURE__ */ c("div", { className: "switch-container", children: /* @__PURE__ */ l("label", { className: `switch ${e ? "disabled" : ""}`, children: [
|
9
10
|
/* @__PURE__ */ c(
|
10
11
|
"input",
|
11
12
|
{
|
12
|
-
name:
|
13
|
+
name: t,
|
13
14
|
type: "checkbox",
|
14
|
-
checked:
|
15
|
-
onChange:
|
15
|
+
checked: i,
|
16
|
+
onChange: a,
|
16
17
|
disabled: e
|
17
18
|
}
|
18
19
|
),
|