@reportportal/ui-kit 0.0.1-alpha.4 → 0.0.1-alpha.40
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/LICENSE +201 -201
- package/README.md +252 -3
- package/dist/baseIconButton-b6adc843.js +25 -0
- package/dist/baseIconButton.js +7 -0
- package/dist/bubblesLoader-a7e709d4.js +17 -0
- package/dist/bubblesLoader.js +7 -0
- package/dist/button-33c88abf.js +62 -0
- package/dist/button.js +1 -1
- package/dist/checkbox-9a6c7ce1.js +73 -0
- package/dist/checkbox.js +2 -2
- package/dist/common/constants/keyCodes.d.ts +24 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +7 -0
- package/dist/components/bubblesLoader/index.d.ts +3 -0
- package/dist/components/button/button.d.ts +0 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -1
- package/dist/components/datePicker/datePicker.d.ts +24 -0
- package/dist/components/datePicker/header/datePickerHeader.d.ts +15 -0
- package/dist/components/datePicker/header/index.d.ts +3 -0
- package/dist/components/datePicker/index.d.ts +3 -0
- package/dist/components/datePicker/utils.d.ts +3 -0
- package/dist/components/dropdown/constants.d.ts +7 -0
- package/dist/components/dropdown/dropdown.d.ts +28 -0
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +3 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +3 -0
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/dropdown/types.d.ts +22 -0
- package/dist/components/dropdown/utils.d.ts +4 -0
- package/dist/components/fieldNumber/constants.d.ts +4 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +18 -0
- package/dist/components/fieldNumber/index.d.ts +3 -0
- package/dist/components/fieldText/fieldText.d.ts +8 -3
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +14 -0
- package/dist/components/fieldTextFlex/index.d.ts +3 -0
- package/dist/components/icons/baseIconButton/baseIconButton.d.ts +8 -0
- package/dist/components/icons/baseIconButton/index.d.ts +4 -0
- package/dist/components/icons/index.d.ts +21 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/modal/modal.d.ts +6 -2
- package/dist/components/modal/modalContent/modalContent.d.ts +1 -0
- package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +4 -0
- package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
- package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
- package/dist/components/pagination/pageControls/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +11 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +11 -0
- package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
- package/dist/components/pagination/pagination.d.ts +22 -0
- package/dist/components/pagination/types.d.ts +2 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/popover.d.ts +18 -0
- package/dist/components/radio/index.d.ts +4 -0
- package/dist/components/radio/radio.d.ts +16 -0
- package/dist/components/radio/radioGroup.d.ts +8 -0
- package/dist/components/spinLoader/index.d.ts +3 -0
- package/dist/components/spinLoader/spinLoader.d.ts +7 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +3 -0
- package/dist/components/systemAlert/types.d.ts +14 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/table.d.ts +3 -0
- package/dist/components/table/types.d.ts +53 -0
- package/dist/components/table/utils.d.ts +3 -0
- package/dist/components/themeProvider/themeProvider.d.ts +2 -1
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/toggle.d.ts +11 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +19 -0
- package/dist/datePicker-1b333ee2.js +196 -0
- package/dist/datePicker.js +18 -0
- package/dist/dropdown-9f4d1928.js +245 -0
- package/dist/dropdown.js +15 -0
- package/dist/fieldNumber-1f286b40.js +127 -0
- package/dist/fieldNumber.js +10 -0
- package/dist/fieldText-65e4c614.js +134 -0
- package/dist/fieldText.js +2 -1
- package/dist/fieldTextFlex-5bddf46a.js +67 -0
- package/dist/fieldTextFlex.js +8 -0
- package/dist/index-54e3bfc2.js +147 -0
- package/dist/index.js +113 -16
- package/dist/keyCodes-f63c0e11.js +4 -0
- package/dist/modal.js +14 -135
- package/dist/pagination-f087f454.js +346 -0
- package/dist/pagination.js +14 -0
- package/dist/popover.js +95 -0
- package/dist/radio-bccc84f2.js +76 -0
- package/dist/radio.js +9 -0
- package/dist/style.css +1 -1
- package/dist/systemMessage-1ced6079.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-9bf4ddab.js +147 -0
- package/dist/table.js +11 -0
- package/dist/themeProvider-46c2be7b.js +23 -0
- package/dist/themeProvider.js +4 -3
- package/dist/toggle-1a3aacb5.js +59 -0
- package/dist/toggle.js +9 -0
- package/dist/tooltip.js +96 -0
- package/dist/useOnClickOutside-c332f7d3.js +16 -0
- package/package.json +105 -66
- package/dist/button-d4944dbc.js +0 -64
- package/dist/checkbox-7736509c.js +0 -70
- package/dist/common/constants/key-codes.d.ts +0 -5
- package/dist/fieldText-9621b0b7.js +0 -99
- package/dist/key-codes-abbe7725.js +0 -4
- package/dist/systemMessage-62c3133d.js +0 -30
- package/dist/themeProvider-5800417e.js +0 -19
package/dist/modal.js
CHANGED
|
@@ -1,137 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (!n)
|
|
12
|
-
return;
|
|
13
|
-
const t = (a) => {
|
|
14
|
-
e && e.current && !e.current.contains(a.target) && n(a);
|
|
15
|
-
};
|
|
16
|
-
return document.addEventListener("pointerdown", t), () => {
|
|
17
|
-
document.removeEventListener("pointerdown", t);
|
|
18
|
-
};
|
|
19
|
-
}, [e, n]);
|
|
20
|
-
}
|
|
21
|
-
const K = () => {
|
|
22
|
-
const [e, n] = g({ width: 0, height: 0 });
|
|
23
|
-
return m(() => {
|
|
24
|
-
const t = () => {
|
|
25
|
-
n({
|
|
26
|
-
width: window.innerWidth,
|
|
27
|
-
height: window.innerHeight
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
return window.addEventListener("resize", t), t(), () => window.removeEventListener("resize", t);
|
|
31
|
-
}, []), e;
|
|
32
|
-
}, I = {
|
|
33
|
-
"modal-content": "_modal-content_xak18_1"
|
|
34
|
-
}, F = _.bind(I), P = ({ children: e }) => /* @__PURE__ */ o("div", { className: F("modal-content"), children: e }), B = {
|
|
35
|
-
"buttons-block": "_buttons-block_1dgm4_1",
|
|
36
|
-
"button-container": "_button-container_1dgm4_5",
|
|
37
|
-
"modal-footer": "_modal-footer_1dgm4_14",
|
|
38
|
-
"with-extra-node": "_with-extra-node_1dgm4_21",
|
|
39
|
-
"size-small": "_size-small_1dgm4_25"
|
|
40
|
-
}, c = _.bind(B), G = ({
|
|
41
|
-
footerNode: e,
|
|
42
|
-
closeHandler: n,
|
|
43
|
-
okButton: t,
|
|
44
|
-
cancelButton: a,
|
|
45
|
-
size: s
|
|
46
|
-
}) => /* @__PURE__ */ l("div", { className: c("modal-footer", { "with-extra-node": e, [`size-${s}`]: s }), children: [
|
|
47
|
-
e && e,
|
|
48
|
-
/* @__PURE__ */ l("div", { className: c("buttons-block"), children: [
|
|
49
|
-
a && /* @__PURE__ */ o("div", { className: c("button-container"), children: /* @__PURE__ */ o(
|
|
50
|
-
x,
|
|
51
|
-
{
|
|
52
|
-
variant: "ghost",
|
|
53
|
-
adjustWidthOn: s === "small" ? "parent" : "content",
|
|
54
|
-
onClick: n,
|
|
55
|
-
...a
|
|
56
|
-
}
|
|
57
|
-
) }),
|
|
58
|
-
t && /* @__PURE__ */ o("div", { className: c("button-container"), children: /* @__PURE__ */ o(x, { adjustWidthOn: s === "small" ? "parent" : "content", ...t }) })
|
|
59
|
-
] })
|
|
60
|
-
] }), X = (e) => /* @__PURE__ */ z.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ z.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.732184 15.2698C0.330645 14.8683 0.330646 14.2172 0.732185 13.8157L6.54859 7.99928L0.732185 2.18288C0.330646 1.78134 0.330645 1.13031 0.732184 0.728774C1.13372 0.327234 1.78475 0.327234 2.18629 0.728774L8.00269 6.54518L13.8191 0.728767C14.2206 0.327228 14.8717 0.327227 15.2732 0.728767C15.6747 1.13031 15.6747 1.78133 15.2732 2.18287L9.45679 7.99928L15.2732 13.8157C15.6747 14.2172 15.6747 14.8683 15.2732 15.2698C14.8717 15.6713 14.2206 15.6713 13.8191 15.2698L8.00269 9.45338L2.18629 15.2698C1.78475 15.6713 1.13372 15.6713 0.732184 15.2698Z" })), Y = {
|
|
61
|
-
"modal-header": "_modal-header_12y1g_1",
|
|
62
|
-
"modal-header-content": "_modal-header-content_12y1g_11",
|
|
63
|
-
"modal-title": "_modal-title_12y1g_20",
|
|
64
|
-
"close-modal-icon": "_close-modal-icon_12y1g_28"
|
|
65
|
-
}, r = _.bind(Y), Z = ({ title: e, onClose: n, headerNode: t }) => /* @__PURE__ */ l("div", { className: r("modal-header"), children: [
|
|
66
|
-
/* @__PURE__ */ l("div", { className: r("modal-header-content"), children: [
|
|
67
|
-
e && /* @__PURE__ */ o("span", { className: r("modal-title"), children: e }),
|
|
68
|
-
t && t
|
|
69
|
-
] }),
|
|
70
|
-
/* @__PURE__ */ o("span", { className: r("close-modal-icon"), onClick: n, children: /* @__PURE__ */ o(X, {}) })
|
|
71
|
-
] }), q = "_modal_10zov_1", J = {
|
|
72
|
-
modal: q,
|
|
73
|
-
"overlay-default": "_overlay-default_10zov_11",
|
|
74
|
-
"overlay-light-cyan": "_overlay-light-cyan_10zov_16",
|
|
75
|
-
"scrolling-content": "_scrolling-content_10zov_21",
|
|
76
|
-
"modal-window": "_modal-window_10zov_28",
|
|
77
|
-
"size-default": "_size-default_10zov_45",
|
|
78
|
-
"size-small": "_size-small_10zov_57",
|
|
79
|
-
"size-large": "_size-large_10zov_69"
|
|
80
|
-
}, E = _.bind(J), Q = 0.9, U = 176, se = ({
|
|
81
|
-
title: e,
|
|
82
|
-
headerNode: n,
|
|
83
|
-
children: t,
|
|
84
|
-
footerNode: a,
|
|
85
|
-
okButton: s,
|
|
86
|
-
cancelButton: b,
|
|
87
|
-
className: L,
|
|
88
|
-
size: h = "default",
|
|
89
|
-
onClose: H = () => {
|
|
90
|
-
},
|
|
91
|
-
overlay: v = "default",
|
|
92
|
-
allowCloseOutside: M = !0
|
|
93
|
-
}) => {
|
|
94
|
-
const [N, f] = g(!1), [k, O] = g(0), i = $(null), p = K(), y = p.height, R = y * Q, u = (y - k) / 2, S = R - U, d = () => {
|
|
95
|
-
f(!1);
|
|
96
|
-
}, C = (w) => {
|
|
97
|
-
w.keyCode === W.ESCAPE_KEY_CODE && d();
|
|
98
|
-
};
|
|
99
|
-
return m(() => {
|
|
100
|
-
if (i && i.current) {
|
|
101
|
-
const { clientHeight: w } = i.current;
|
|
102
|
-
O(w);
|
|
103
|
-
}
|
|
104
|
-
}, [t, p]), m(() => (f(!0), i && i.current && i.current.focus(), document.addEventListener("keydown", C, !1), () => document.removeEventListener("keydown", C, !1)), []), j(i, M ? d : void 0), /* @__PURE__ */ o(T, { onExitComplete: H, children: N && /* @__PURE__ */ o("div", { className: E("modal", { [`overlay-${v}`]: v }), children: /* @__PURE__ */ l(
|
|
105
|
-
D.div,
|
|
106
|
-
{
|
|
107
|
-
className: E("modal-window", { [`size-${h}`]: h }, L),
|
|
108
|
-
ref: i,
|
|
109
|
-
tabIndex: 0,
|
|
110
|
-
initial: { opacity: 0, marginTop: -u },
|
|
111
|
-
animate: { opacity: 1, marginTop: u },
|
|
112
|
-
exit: { opacity: 0, marginTop: -u },
|
|
113
|
-
transition: { duration: 0.3 },
|
|
114
|
-
children: [
|
|
115
|
-
/* @__PURE__ */ o(Z, { title: e, headerNode: n, onClose: d }),
|
|
116
|
-
/* @__PURE__ */ o(A, { autoHeight: !0, autoHeightMax: S, hideTracksWhenNotNeeded: !0, children: /* @__PURE__ */ o(P, { children: t }) }),
|
|
117
|
-
/* @__PURE__ */ o(
|
|
118
|
-
G,
|
|
119
|
-
{
|
|
120
|
-
size: h,
|
|
121
|
-
footerNode: a,
|
|
122
|
-
okButton: s,
|
|
123
|
-
cancelButton: b,
|
|
124
|
-
closeHandler: d
|
|
125
|
-
}
|
|
126
|
-
)
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
"modal-window"
|
|
130
|
-
) }) });
|
|
131
|
-
};
|
|
1
|
+
import { M as s, a as n, c as b, b as c } from "./index-54e3bfc2.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "rc-scrollbars";
|
|
5
|
+
import "framer-motion";
|
|
6
|
+
import "./bind-06a7ff84.js";
|
|
7
|
+
import "./useOnClickOutside-c332f7d3.js";
|
|
8
|
+
import "./keyCodes-f63c0e11.js";
|
|
9
|
+
import "./button-33c88abf.js";
|
|
10
|
+
import "./baseIconButton-b6adc843.js";
|
|
132
11
|
export {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
12
|
+
s as Modal,
|
|
13
|
+
n as ModalContent,
|
|
14
|
+
b as ModalFooter,
|
|
15
|
+
c as ModalHeader
|
|
137
16
|
};
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "./bind-06a7ff84.js";
|
|
3
|
+
import * as b from "react";
|
|
4
|
+
import { useState as x } from "react";
|
|
5
|
+
import { Popover as B } from "./popover.js";
|
|
6
|
+
import { B as w } from "./button-33c88abf.js";
|
|
7
|
+
import { F as I } from "./fieldText-65e4c614.js";
|
|
8
|
+
import { B as f } from "./baseIconButton-b6adc843.js";
|
|
9
|
+
import { Tooltip as E } from "./tooltip.js";
|
|
10
|
+
const y = (e) => /* @__PURE__ */ b.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ b.createElement("path", { d: "M12 13L4 8L12 3L12 13Z" })), T = (e) => /* @__PURE__ */ b.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ b.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 12L2 12L2 2.38498e-08L1.90798e-07 0L0 12ZM13 1L5 6L13 11L13 1Z" })), k = {
|
|
11
|
+
"item-counter": "_item-counter_4g6do_1"
|
|
12
|
+
}, M = m.bind(k), P = ({
|
|
13
|
+
activePage: e,
|
|
14
|
+
pageSize: n,
|
|
15
|
+
totalItems: s,
|
|
16
|
+
ofText: r,
|
|
17
|
+
itemsText: c
|
|
18
|
+
}) => {
|
|
19
|
+
const a = e * n, i = a - n;
|
|
20
|
+
return /* @__PURE__ */ d("div", { className: M("item-counter"), children: [
|
|
21
|
+
`${i + 1} - ${a < s ? a : s}`,
|
|
22
|
+
` ${r} ${s} ${c}`
|
|
23
|
+
] });
|
|
24
|
+
}, R = "_selected_183l8_32", V = {
|
|
25
|
+
"size-selector": "_size-selector_183l8_1",
|
|
26
|
+
"size-option": "_size-option_183l8_6",
|
|
27
|
+
selected: R
|
|
28
|
+
}, C = m.bind(V), W = ({
|
|
29
|
+
currentSize: e,
|
|
30
|
+
options: n,
|
|
31
|
+
onClickOption: s
|
|
32
|
+
}) => /* @__PURE__ */ t("div", { className: C("size-selector"), children: n.map((r) => /* @__PURE__ */ t(
|
|
33
|
+
"button",
|
|
34
|
+
{
|
|
35
|
+
className: C("size-option", { selected: r === e }),
|
|
36
|
+
onClick: () => {
|
|
37
|
+
s(r);
|
|
38
|
+
},
|
|
39
|
+
children: r
|
|
40
|
+
},
|
|
41
|
+
r
|
|
42
|
+
)) }), D = {
|
|
43
|
+
"page-size-control": "_page-size-control_1y4na_1",
|
|
44
|
+
"size-selector-button": "_size-selector-button_1y4na_10"
|
|
45
|
+
}, S = m.bind(D), F = ({
|
|
46
|
+
size: e,
|
|
47
|
+
sizeOptions: n,
|
|
48
|
+
perPageText: s,
|
|
49
|
+
changeSize: r
|
|
50
|
+
}) => {
|
|
51
|
+
const [c, a] = x(!1), i = (o) => {
|
|
52
|
+
r(o), a(!1);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ d("div", { className: S("page-size-control"), children: [
|
|
55
|
+
/* @__PURE__ */ t(
|
|
56
|
+
B,
|
|
57
|
+
{
|
|
58
|
+
content: /* @__PURE__ */ t(W, { options: n, onClickOption: i, currentSize: e }),
|
|
59
|
+
placement: "top",
|
|
60
|
+
isOpened: c,
|
|
61
|
+
setIsOpened: a,
|
|
62
|
+
children: /* @__PURE__ */ t(w, { className: S("size-selector-button"), variant: "text", children: e })
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
` ${s}`
|
|
66
|
+
] });
|
|
67
|
+
}, Z = {
|
|
68
|
+
"page-selector": "_page-selector_rtho4_1",
|
|
69
|
+
"field-wrapper": "_field-wrapper_rtho4_6",
|
|
70
|
+
"apply-button": "_apply-button_rtho4_10"
|
|
71
|
+
}, N = m.bind(Z), j = ({
|
|
72
|
+
totalPages: e,
|
|
73
|
+
pageText: n,
|
|
74
|
+
goActionText: s,
|
|
75
|
+
selectPage: r
|
|
76
|
+
}) => {
|
|
77
|
+
const [c, a] = x(""), [i, o] = x(!0), p = (u) => {
|
|
78
|
+
const h = u.target.value.replace(/\D/g, ""), $ = Number(h), O = $ > 0 && $ <= e;
|
|
79
|
+
o(O), a(h);
|
|
80
|
+
}, l = () => {
|
|
81
|
+
r(Number(c));
|
|
82
|
+
};
|
|
83
|
+
return /* @__PURE__ */ d("div", { className: N("page-selector"), children: [
|
|
84
|
+
/* @__PURE__ */ t("div", { className: N("field-wrapper"), children: /* @__PURE__ */ t(
|
|
85
|
+
I,
|
|
86
|
+
{
|
|
87
|
+
onChange: p,
|
|
88
|
+
value: c,
|
|
89
|
+
placeholder: n,
|
|
90
|
+
error: i ? "" : "Error",
|
|
91
|
+
touched: !0,
|
|
92
|
+
defaultWidth: !1,
|
|
93
|
+
displayError: !1
|
|
94
|
+
}
|
|
95
|
+
) }),
|
|
96
|
+
/* @__PURE__ */ t(w, { onClick: l, disabled: !c || !i, className: N("apply-button"), children: s })
|
|
97
|
+
] });
|
|
98
|
+
}, G = {
|
|
99
|
+
"active-page": "_active-page_rmw5h_1",
|
|
100
|
+
"page-selector": "_page-selector_rmw5h_10",
|
|
101
|
+
"page-selector-button": "_page-selector-button_rmw5h_14"
|
|
102
|
+
}, v = m.bind(G), H = ({
|
|
103
|
+
activePage: e,
|
|
104
|
+
totalPages: n,
|
|
105
|
+
pageText: s,
|
|
106
|
+
goToText: r,
|
|
107
|
+
goActionText: c,
|
|
108
|
+
changePage: a
|
|
109
|
+
}) => {
|
|
110
|
+
const [i, o] = x(!1), p = (l) => {
|
|
111
|
+
a(l), o(!1);
|
|
112
|
+
};
|
|
113
|
+
return /* @__PURE__ */ d("div", { className: v("active-page"), children: [
|
|
114
|
+
`${s} `,
|
|
115
|
+
/* @__PURE__ */ t(
|
|
116
|
+
B,
|
|
117
|
+
{
|
|
118
|
+
content: /* @__PURE__ */ t(
|
|
119
|
+
j,
|
|
120
|
+
{
|
|
121
|
+
pageText: s,
|
|
122
|
+
goActionText: c,
|
|
123
|
+
selectPage: p,
|
|
124
|
+
totalPages: n
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
title: r,
|
|
128
|
+
placement: "top",
|
|
129
|
+
isOpened: i,
|
|
130
|
+
setIsOpened: o,
|
|
131
|
+
className: v("page-selector"),
|
|
132
|
+
children: /* @__PURE__ */ t(w, { className: v("page-selector-button"), variant: "text", children: e })
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
] });
|
|
136
|
+
}, q = "_bar_dfnmf_1", J = "_section_dfnmf_9", K = "_selected_dfnmf_33", Q = "_tooltip_dfnmf_37", U = {
|
|
137
|
+
bar: q,
|
|
138
|
+
"section-with-tooltip": "_section-with-tooltip_dfnmf_9",
|
|
139
|
+
section: J,
|
|
140
|
+
selected: K,
|
|
141
|
+
"tooltip-wrapper": "_tooltip-wrapper_dfnmf_37",
|
|
142
|
+
tooltip: Q,
|
|
143
|
+
"tooltip-text": "_tooltip-text_dfnmf_48",
|
|
144
|
+
"page-number": "_page-number_dfnmf_52"
|
|
145
|
+
}, g = m.bind(U), z = 13, A = 260, X = ({
|
|
146
|
+
totalPages: e,
|
|
147
|
+
activePage: n,
|
|
148
|
+
changePage: s,
|
|
149
|
+
captions: r
|
|
150
|
+
}) => {
|
|
151
|
+
const c = A / e, a = Math.min(Math.ceil(A / z), e), i = Math.max(z, c), o = [];
|
|
152
|
+
for (let l = 1; l <= e; l++)
|
|
153
|
+
o.push({
|
|
154
|
+
end: l * c,
|
|
155
|
+
pageNumber: l
|
|
156
|
+
});
|
|
157
|
+
const p = Array.from({ length: a }, () => ({ pages: { from: void 0, to: void 0 } }));
|
|
158
|
+
return o.forEach((l) => {
|
|
159
|
+
const u = Math.ceil(l.end / i) - 1, h = p[u].pages;
|
|
160
|
+
h.from || (h.from = l.pageNumber), h.to = l.pageNumber;
|
|
161
|
+
}), /* @__PURE__ */ t("div", { className: g("bar"), children: p.map((l, u) => /* @__PURE__ */ t(
|
|
162
|
+
"div",
|
|
163
|
+
{
|
|
164
|
+
className: g("section-with-tooltip"),
|
|
165
|
+
style: { width: i },
|
|
166
|
+
onClick: () => l.pages.from && s(l.pages.from),
|
|
167
|
+
children: /* @__PURE__ */ t(
|
|
168
|
+
E,
|
|
169
|
+
{
|
|
170
|
+
content: /* @__PURE__ */ d("div", { className: g("tooltip"), children: [
|
|
171
|
+
/* @__PURE__ */ t("div", { className: g("tooltip-text"), children: r.goTo }),
|
|
172
|
+
/* @__PURE__ */ t("div", { className: g("page-number"), children: l.pages.from })
|
|
173
|
+
] }),
|
|
174
|
+
wrapperClassName: g("tooltip-wrapper"),
|
|
175
|
+
placement: "top",
|
|
176
|
+
children: /* @__PURE__ */ t(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
className: g("section", {
|
|
180
|
+
selected: l.pages.from && l.pages.to && l.pages.from <= n && n <= l.pages.to
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
},
|
|
187
|
+
u
|
|
188
|
+
)) });
|
|
189
|
+
}, Y = "_next_1p2t5_18", ee = {
|
|
190
|
+
"page-navigator": "_page-navigator_1p2t5_1",
|
|
191
|
+
"page-buttons": "_page-buttons_1p2t5_6",
|
|
192
|
+
"page-button": "_page-button_1p2t5_6",
|
|
193
|
+
next: Y
|
|
194
|
+
}, _ = m.bind(ee), te = ({
|
|
195
|
+
activePage: e,
|
|
196
|
+
changePage: n,
|
|
197
|
+
totalPages: s,
|
|
198
|
+
captions: r
|
|
199
|
+
}) => {
|
|
200
|
+
const c = () => {
|
|
201
|
+
n(1);
|
|
202
|
+
}, a = () => {
|
|
203
|
+
n(e - 1);
|
|
204
|
+
}, i = () => {
|
|
205
|
+
n(e + 1);
|
|
206
|
+
}, o = () => {
|
|
207
|
+
n(s);
|
|
208
|
+
};
|
|
209
|
+
return /* @__PURE__ */ d("div", { className: _("page-navigator"), children: [
|
|
210
|
+
/* @__PURE__ */ d("div", { className: _("page-buttons"), children: [
|
|
211
|
+
/* @__PURE__ */ t(
|
|
212
|
+
f,
|
|
213
|
+
{
|
|
214
|
+
className: _("page-button"),
|
|
215
|
+
onClick: c,
|
|
216
|
+
disabled: e === 1,
|
|
217
|
+
children: /* @__PURE__ */ t(T, {})
|
|
218
|
+
}
|
|
219
|
+
),
|
|
220
|
+
/* @__PURE__ */ t(
|
|
221
|
+
f,
|
|
222
|
+
{
|
|
223
|
+
className: _("page-button"),
|
|
224
|
+
onClick: a,
|
|
225
|
+
disabled: e === 1,
|
|
226
|
+
children: /* @__PURE__ */ t(y, {})
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
] }),
|
|
230
|
+
/* @__PURE__ */ t(
|
|
231
|
+
X,
|
|
232
|
+
{
|
|
233
|
+
totalPages: s,
|
|
234
|
+
activePage: e,
|
|
235
|
+
changePage: n,
|
|
236
|
+
captions: r
|
|
237
|
+
}
|
|
238
|
+
),
|
|
239
|
+
/* @__PURE__ */ d("div", { className: _("page-buttons"), children: [
|
|
240
|
+
/* @__PURE__ */ t(
|
|
241
|
+
f,
|
|
242
|
+
{
|
|
243
|
+
className: _("page-button", "next"),
|
|
244
|
+
onClick: i,
|
|
245
|
+
disabled: e === s,
|
|
246
|
+
children: /* @__PURE__ */ t(y, {})
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
/* @__PURE__ */ t(
|
|
250
|
+
f,
|
|
251
|
+
{
|
|
252
|
+
className: _("page-button", "next"),
|
|
253
|
+
onClick: o,
|
|
254
|
+
disabled: e === s,
|
|
255
|
+
children: /* @__PURE__ */ t(T, {})
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
] })
|
|
259
|
+
] });
|
|
260
|
+
}, oe = {
|
|
261
|
+
"page-controls": "_page-controls_thyf8_1",
|
|
262
|
+
"total-pages": "_total-pages_thyf8_8"
|
|
263
|
+
}, L = m.bind(oe), se = ({
|
|
264
|
+
activePage: e,
|
|
265
|
+
changePage: n,
|
|
266
|
+
captions: s,
|
|
267
|
+
totalPages: r
|
|
268
|
+
}) => /* @__PURE__ */ d("div", { className: L("page-controls"), children: [
|
|
269
|
+
/* @__PURE__ */ t(
|
|
270
|
+
H,
|
|
271
|
+
{
|
|
272
|
+
activePage: e,
|
|
273
|
+
totalPages: r,
|
|
274
|
+
changePage: n,
|
|
275
|
+
pageText: s.page,
|
|
276
|
+
goToText: s.goTo,
|
|
277
|
+
goActionText: s.goAction
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ t(
|
|
281
|
+
te,
|
|
282
|
+
{
|
|
283
|
+
changePage: n,
|
|
284
|
+
activePage: e,
|
|
285
|
+
totalPages: r,
|
|
286
|
+
captions: { goTo: s.goTo }
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
/* @__PURE__ */ d("span", { className: L("total-pages"), children: [
|
|
290
|
+
`${s.of} `,
|
|
291
|
+
r
|
|
292
|
+
] })
|
|
293
|
+
] }), ne = "_pagination_wi26a_1", re = {
|
|
294
|
+
pagination: ne
|
|
295
|
+
}, le = m.bind(re), he = ({
|
|
296
|
+
activePage: e,
|
|
297
|
+
totalPages: n,
|
|
298
|
+
pageSize: s,
|
|
299
|
+
totalItems: r,
|
|
300
|
+
pageSizeOptions: c,
|
|
301
|
+
changePage: a,
|
|
302
|
+
changePageSize: i,
|
|
303
|
+
captions: o
|
|
304
|
+
}) => {
|
|
305
|
+
const p = (o == null ? void 0 : o.of) || "of", l = (o == null ? void 0 : o.page) || "Page";
|
|
306
|
+
return /* @__PURE__ */ d("div", { className: le("pagination"), children: [
|
|
307
|
+
/* @__PURE__ */ t(
|
|
308
|
+
P,
|
|
309
|
+
{
|
|
310
|
+
activePage: e,
|
|
311
|
+
pageSize: s,
|
|
312
|
+
totalItems: r,
|
|
313
|
+
ofText: p,
|
|
314
|
+
itemsText: (o == null ? void 0 : o.items) || "items"
|
|
315
|
+
}
|
|
316
|
+
),
|
|
317
|
+
n > 1 && /* @__PURE__ */ t(
|
|
318
|
+
se,
|
|
319
|
+
{
|
|
320
|
+
activePage: e,
|
|
321
|
+
totalPages: n,
|
|
322
|
+
changePage: a,
|
|
323
|
+
captions: {
|
|
324
|
+
page: l,
|
|
325
|
+
of: p,
|
|
326
|
+
goTo: (o == null ? void 0 : o.goTo) || "Go to page",
|
|
327
|
+
goAction: (o == null ? void 0 : o.goAction) || "Go"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
),
|
|
331
|
+
/* @__PURE__ */ t(
|
|
332
|
+
F,
|
|
333
|
+
{
|
|
334
|
+
size: s,
|
|
335
|
+
sizeOptions: c,
|
|
336
|
+
changeSize: i,
|
|
337
|
+
perPageText: (o == null ? void 0 : o.perPage) || "per page"
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
] });
|
|
341
|
+
};
|
|
342
|
+
export {
|
|
343
|
+
he as P,
|
|
344
|
+
y as S,
|
|
345
|
+
T as a
|
|
346
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { P as t } from "./pagination-f087f454.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "./bind-06a7ff84.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./popover.js";
|
|
6
|
+
import "@floating-ui/react";
|
|
7
|
+
import "./button-33c88abf.js";
|
|
8
|
+
import "./fieldText-65e4c614.js";
|
|
9
|
+
import "./baseIconButton-b6adc843.js";
|
|
10
|
+
import "./tooltip.js";
|
|
11
|
+
export {
|
|
12
|
+
t as Pagination,
|
|
13
|
+
t as default
|
|
14
|
+
};
|
package/dist/popover.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsxs as p, Fragment as G, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as H, useState as S } from "react";
|
|
3
|
+
import { useFloating as j, offset as C, flip as L, arrow as M, autoUpdate as O, useClick as U, useDismiss as W, useRole as q, useInteractions as z, FloatingFocusManager as B, FloatingArrow as J } from "@floating-ui/react";
|
|
4
|
+
import { c as K } from "./bind-06a7ff84.js";
|
|
5
|
+
const Q = "_popover_16ogt_1", V = "_title_16ogt_28", X = {
|
|
6
|
+
"popover-wrapper": "_popover-wrapper_16ogt_1",
|
|
7
|
+
popover: Q,
|
|
8
|
+
title: V
|
|
9
|
+
}, n = K.bind(X), m = 16, f = 8, Y = ["top", "right", "bottom", "left"], Z = [
|
|
10
|
+
"right",
|
|
11
|
+
"right-start",
|
|
12
|
+
"right-end",
|
|
13
|
+
"left",
|
|
14
|
+
"left-start",
|
|
15
|
+
"left-end"
|
|
16
|
+
], $ = [
|
|
17
|
+
"top",
|
|
18
|
+
"top-start",
|
|
19
|
+
"top-end",
|
|
20
|
+
"right",
|
|
21
|
+
"right-start",
|
|
22
|
+
"right-end",
|
|
23
|
+
"bottom",
|
|
24
|
+
"bottom-start",
|
|
25
|
+
"bottom-end",
|
|
26
|
+
"left",
|
|
27
|
+
"left-start",
|
|
28
|
+
"left-end"
|
|
29
|
+
], nt = ({
|
|
30
|
+
className: d,
|
|
31
|
+
content: g,
|
|
32
|
+
children: h,
|
|
33
|
+
placement: u = "bottom",
|
|
34
|
+
fallbackPlacements: v = $,
|
|
35
|
+
title: r,
|
|
36
|
+
arrowOffset: l = 16,
|
|
37
|
+
safeZone: _ = 4,
|
|
38
|
+
arrowColor: w = "white",
|
|
39
|
+
dataAutomationId: x,
|
|
40
|
+
isOpened: b,
|
|
41
|
+
setIsOpened: s
|
|
42
|
+
}) => {
|
|
43
|
+
const i = H(null), [F, R] = S(!1), a = s ? b : F, A = (e) => {
|
|
44
|
+
s ? s(e) : R(e);
|
|
45
|
+
}, { placement: N, refs: c, floatingStyles: P, context: t } = j({
|
|
46
|
+
open: a,
|
|
47
|
+
onOpenChange: A,
|
|
48
|
+
placement: u,
|
|
49
|
+
middleware: [
|
|
50
|
+
C(({ rects: e, placement: D }) => ({
|
|
51
|
+
mainAxis: _ + f,
|
|
52
|
+
alignmentAxis: ((Z.includes(D) ? e.reference.height : e.reference.width) - m) / 2 - l
|
|
53
|
+
})),
|
|
54
|
+
L({
|
|
55
|
+
fallbackAxisSideDirection: "start",
|
|
56
|
+
fallbackPlacements: v
|
|
57
|
+
}),
|
|
58
|
+
M({
|
|
59
|
+
element: i
|
|
60
|
+
})
|
|
61
|
+
],
|
|
62
|
+
whileElementsMounted: O
|
|
63
|
+
}), E = U(t), I = W(t), T = q(t), { getReferenceProps: k, getFloatingProps: y } = z([E, I, T]);
|
|
64
|
+
return /* @__PURE__ */ p(G, { children: [
|
|
65
|
+
/* @__PURE__ */ o("div", { ref: c.setReference, ...k(), className: n("popover-wrapper"), children: h }),
|
|
66
|
+
a && /* @__PURE__ */ o(B, { context: t, modal: !1, children: /* @__PURE__ */ p(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: n("popover", d),
|
|
70
|
+
"data-automation-id": x,
|
|
71
|
+
ref: c.setFloating,
|
|
72
|
+
style: P,
|
|
73
|
+
...y,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ o(
|
|
76
|
+
J,
|
|
77
|
+
{
|
|
78
|
+
ref: i,
|
|
79
|
+
context: t,
|
|
80
|
+
width: m,
|
|
81
|
+
height: f,
|
|
82
|
+
fill: w,
|
|
83
|
+
staticOffset: Y.includes(N) ? null : l
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
r && /* @__PURE__ */ o("div", { className: n("title"), children: r }),
|
|
87
|
+
g
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
) })
|
|
91
|
+
] });
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
nt as Popover
|
|
95
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as g, useId as k } from "react";
|
|
3
|
+
import { c as p } from "./bind-06a7ff84.js";
|
|
4
|
+
import { K as o } from "./keyCodes-f63c0e11.js";
|
|
5
|
+
const j = "_disabled_9d3ij_9", y = "_toggler_9d3ij_15", E = "_checked_9d3ij_21", x = "_input_9d3ij_28", C = {
|
|
6
|
+
"radio-button": "_radio-button_9d3ij_1",
|
|
7
|
+
disabled: j,
|
|
8
|
+
"children-container": "_children-container_9d3ij_12",
|
|
9
|
+
toggler: y,
|
|
10
|
+
checked: E,
|
|
11
|
+
input: x
|
|
12
|
+
}, d = p.bind(C), S = ({
|
|
13
|
+
option: e,
|
|
14
|
+
value: u,
|
|
15
|
+
onChange: b,
|
|
16
|
+
onFocus: D,
|
|
17
|
+
onBlur: K,
|
|
18
|
+
className: _,
|
|
19
|
+
...h
|
|
20
|
+
}) => {
|
|
21
|
+
const a = g(null), l = k(), s = String(e.value) === String(u), m = (c) => {
|
|
22
|
+
var n, t;
|
|
23
|
+
const { keyCode: r } = c;
|
|
24
|
+
if (r === o.SPACE_KEY_CODE) {
|
|
25
|
+
c.preventDefault(), (n = a.current) == null || n.click();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
r === o.ENTER_KEY_CODE && (c.preventDefault(), (t = a.current) == null || t.click());
|
|
29
|
+
};
|
|
30
|
+
return (
|
|
31
|
+
// eslint-disable-next-line
|
|
32
|
+
/* @__PURE__ */ f(
|
|
33
|
+
"label",
|
|
34
|
+
{
|
|
35
|
+
id: l,
|
|
36
|
+
className: d(_, "radio-button", {
|
|
37
|
+
disabled: e.disabled
|
|
38
|
+
}),
|
|
39
|
+
tabIndex: e.disabled ? -1 : 0,
|
|
40
|
+
onKeyDown: e.disabled ? void 0 : m,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ i(
|
|
43
|
+
"input",
|
|
44
|
+
{
|
|
45
|
+
tabIndex: -1,
|
|
46
|
+
ref: a,
|
|
47
|
+
type: "radio",
|
|
48
|
+
className: d("input"),
|
|
49
|
+
disabled: e.disabled,
|
|
50
|
+
onChange: b,
|
|
51
|
+
value: e.value,
|
|
52
|
+
checked: s,
|
|
53
|
+
...h
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ i(
|
|
57
|
+
"span",
|
|
58
|
+
{
|
|
59
|
+
role: "radio",
|
|
60
|
+
"aria-labelledby": l,
|
|
61
|
+
"aria-checked": s,
|
|
62
|
+
className: d("toggler", {
|
|
63
|
+
disabled: e.disabled,
|
|
64
|
+
checked: s
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ i("span", { className: d("children-container"), children: e.label })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
S as R
|
|
76
|
+
};
|