@reportportal/ui-kit 0.0.1-alpha.8 → 0.0.1-alpha.81

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.
Files changed (142) hide show
  1. package/README.md +71 -13
  2. package/dist/arrowUp-4a5caee7.js +6 -0
  3. package/dist/baseIconButton-251479f7.js +25 -0
  4. package/dist/baseIconButton.js +1 -1
  5. package/dist/button-e0bd064d.js +66 -0
  6. package/dist/button.js +1 -1
  7. package/dist/calendarArrow-3e1339ea.js +6 -0
  8. package/dist/checkbox-aa91985d.js +73 -0
  9. package/dist/checkbox.js +1 -1
  10. package/dist/close-4d480ef7.js +5 -0
  11. package/dist/common/hooks/useOnClickOutside.d.ts +1 -0
  12. package/dist/common/types.d.ts +3 -0
  13. package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +1 -0
  14. package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +1 -0
  15. package/dist/components/bubblesLoader/bubblesLoader.d.ts +1 -0
  16. package/dist/components/bubblesLoader/index.d.ts +1 -0
  17. package/dist/components/button/button.d.ts +5 -4
  18. package/dist/components/button/index.d.ts +1 -0
  19. package/dist/components/checkbox/checkbox.d.ts +4 -1
  20. package/dist/components/checkbox/index.d.ts +1 -0
  21. package/dist/components/datePicker/datePicker.d.ts +25 -0
  22. package/dist/components/datePicker/header/datePickerHeader.d.ts +16 -0
  23. package/dist/components/datePicker/header/index.d.ts +4 -0
  24. package/dist/components/datePicker/index.d.ts +5 -0
  25. package/dist/components/datePicker/utils.d.ts +4 -0
  26. package/dist/components/dropdown/constants.d.ts +1 -0
  27. package/dist/components/dropdown/dropdown.d.ts +13 -4
  28. package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
  29. package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
  30. package/dist/components/dropdown/index.d.ts +1 -0
  31. package/dist/components/dropdown/types.d.ts +3 -0
  32. package/dist/components/dropdown/utils.d.ts +2 -1
  33. package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
  34. package/dist/components/fieldLabel/index.d.ts +1 -0
  35. package/dist/components/fieldNumber/constants.d.ts +1 -0
  36. package/dist/components/fieldNumber/fieldNumber.d.ts +3 -2
  37. package/dist/components/fieldNumber/index.d.ts +1 -0
  38. package/dist/components/fieldText/fieldText.d.ts +13 -4
  39. package/dist/components/fieldText/index.d.ts +1 -0
  40. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +4 -2
  41. package/dist/components/fieldTextFlex/index.d.ts +1 -0
  42. package/dist/components/icons/index.d.ts +46 -3
  43. package/dist/components/index.d.ts +10 -0
  44. package/dist/components/maxValueDisplay/index.d.ts +4 -0
  45. package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
  46. package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
  47. package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
  48. package/dist/components/modal/modal.d.ts +5 -2
  49. package/dist/components/modal/modalContent/modalContent.d.ts +2 -0
  50. package/dist/components/modal/modalFooter/modalFooter.d.ts +1 -0
  51. package/dist/components/modal/modalHeader/modalHeader.d.ts +2 -1
  52. package/dist/components/pagination/index.d.ts +5 -0
  53. package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
  54. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +10 -0
  55. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +13 -0
  56. package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
  57. package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
  58. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +11 -0
  59. package/dist/components/pagination/pageControls/index.d.ts +1 -0
  60. package/dist/components/pagination/pageControls/pageControls.d.ts +17 -0
  61. package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +12 -0
  62. package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
  63. package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
  64. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +12 -0
  65. package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
  66. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +11 -0
  67. package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
  68. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +9 -0
  69. package/dist/components/pagination/pagination.d.ts +23 -0
  70. package/dist/components/pagination/types.d.ts +2 -0
  71. package/dist/components/popover/index.d.ts +4 -0
  72. package/dist/components/popover/popover.d.ts +19 -0
  73. package/dist/components/radio/index.d.ts +1 -0
  74. package/dist/components/radio/radio.d.ts +1 -0
  75. package/dist/components/radio/radioGroup.d.ts +1 -0
  76. package/dist/components/spinLoader/index.d.ts +4 -0
  77. package/dist/components/spinLoader/spinLoader.d.ts +8 -0
  78. package/dist/components/systemAlert/index.d.ts +1 -0
  79. package/dist/components/systemAlert/systemAlert.d.ts +4 -0
  80. package/dist/components/systemAlert/types.d.ts +16 -0
  81. package/dist/components/systemMessage/index.d.ts +1 -0
  82. package/dist/components/systemMessage/systemMessage.d.ts +1 -0
  83. package/dist/components/table/constants.d.ts +2 -0
  84. package/dist/components/table/index.d.ts +4 -0
  85. package/dist/components/table/table.d.ts +4 -0
  86. package/dist/components/table/types.d.ts +52 -0
  87. package/dist/components/table/utils.d.ts +6 -0
  88. package/dist/components/themeProvider/index.d.ts +1 -0
  89. package/dist/components/themeProvider/themeProvider.d.ts +1 -0
  90. package/dist/components/toggle/index.d.ts +1 -0
  91. package/dist/components/toggle/toggle.d.ts +1 -0
  92. package/dist/components/tooltip/index.d.ts +1 -0
  93. package/dist/components/tooltip/tooltip.d.ts +23 -0
  94. package/dist/datePicker-27b11ae9.js +201 -0
  95. package/dist/datePicker.js +28 -0
  96. package/dist/dropdown-0260bb66.js +5 -0
  97. package/dist/dropdown-9427f821.js +282 -0
  98. package/dist/dropdown.js +5 -2
  99. package/dist/fieldLabel.js +18 -0
  100. package/dist/fieldNumber-2542b311.js +128 -0
  101. package/dist/fieldNumber.js +4 -2
  102. package/dist/fieldText-a61890cd.js +166 -0
  103. package/dist/fieldText.js +6 -2
  104. package/dist/fieldTextFlex-9e616f66.js +78 -0
  105. package/dist/fieldTextFlex.js +10 -0
  106. package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
  107. package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
  108. package/dist/icons.js +62 -0
  109. package/dist/index.js +106 -30
  110. package/dist/maxValueDisplay-9be01a75.js +13 -0
  111. package/dist/maxValueDisplay.js +6 -0
  112. package/dist/modal.js +144 -14
  113. package/dist/openEye-7b9cf080.js +7 -0
  114. package/dist/pagination-0e7eebc6.js +345 -0
  115. package/dist/pagination.js +20 -0
  116. package/dist/plus-0929dda4.js +6 -0
  117. package/dist/popover.js +99 -0
  118. package/dist/prevPage-87faf576.js +6 -0
  119. package/dist/radio-62546efa.js +76 -0
  120. package/dist/radio.js +9 -0
  121. package/dist/spinLoader-c4a53718.js +11 -0
  122. package/dist/spinLoader.js +7 -0
  123. package/dist/style.css +1 -1
  124. package/dist/success-8fd8bd2c.js +7 -0
  125. package/dist/systemAlert.js +63 -0
  126. package/dist/systemMessage-924fdaa6.js +30 -0
  127. package/dist/systemMessage.js +1 -1
  128. package/dist/table-20aa2cdf.js +142 -0
  129. package/dist/table.js +11 -0
  130. package/dist/toggle-304107fa.js +59 -0
  131. package/dist/toggle.js +1 -1
  132. package/dist/tooltip.js +101 -0
  133. package/package.json +30 -17
  134. package/dist/baseIconButton-7bc53dec.js +0 -25
  135. package/dist/button-497b4d19.js +0 -62
  136. package/dist/checkbox-1e21cf3e.js +0 -68
  137. package/dist/dropdown-e07f2a71.js +0 -212
  138. package/dist/fieldNumber-46fe79b9.js +0 -127
  139. package/dist/fieldText-65a50d9d.js +0 -101
  140. package/dist/index-2bee4457.js +0 -131
  141. package/dist/systemMessage-1ced6079.js +0 -30
  142. package/dist/toggle-707ecb74.js +0 -67
package/dist/modal.js CHANGED
@@ -1,16 +1,146 @@
1
- import { M as s, a as n, c as b, b as c } from "./index-2bee4457.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-497b4d19.js";
10
- import "./baseIconButton-7bc53dec.js";
1
+ import { jsx as e, jsxs as d, Fragment as F } from "react/jsx-runtime";
2
+ import { useState as w, useEffect as g, useRef as G } from "react";
3
+ import { Scrollbars as K } from "rc-scrollbars";
4
+ import { AnimatePresence as P, motion as B } from "framer-motion";
5
+ import { c as u } from "./bind-06a7ff84.js";
6
+ import { u as Y } from "./useOnClickOutside-c332f7d3.js";
7
+ import { K as U } from "./keyCodes-f63c0e11.js";
8
+ import { B as O } from "./button-e0bd064d.js";
9
+ import { B as X } from "./baseIconButton-251479f7.js";
10
+ import { S as J } from "./close-4d480ef7.js";
11
+ const Q = () => {
12
+ const [o, n] = w({ width: 0, height: 0 });
13
+ return g(() => {
14
+ const a = () => {
15
+ n({
16
+ width: window.innerWidth,
17
+ height: window.innerHeight
18
+ });
19
+ };
20
+ return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
21
+ }, []), o;
22
+ }, V = "_scrollable_zh8d2_12", Z = {
23
+ "modal-content": "_modal-content_zh8d2_1",
24
+ scrollable: V
25
+ }, ee = u.bind(Z), z = ({ scrollable: o = !1, children: n }) => /* @__PURE__ */ e("div", { className: ee("modal-content", { scrollable: o }), children: n }), te = {
26
+ "buttons-block": "_buttons-block_1mwne_1",
27
+ "button-container": "_button-container_1mwne_7",
28
+ "modal-footer": "_modal-footer_1mwne_12",
29
+ "with-extra-node": "_with-extra-node_1mwne_19",
30
+ "size-small": "_size-small_1mwne_23"
31
+ }, m = u.bind(te), oe = ({
32
+ footerNode: o,
33
+ closeHandler: n,
34
+ okButton: a,
35
+ cancelButton: r,
36
+ size: l
37
+ }) => /* @__PURE__ */ d("div", { className: m("modal-footer", { "with-extra-node": o, [`size-${l}`]: l }), children: [
38
+ o && o,
39
+ /* @__PURE__ */ d("div", { className: m("buttons-block"), children: [
40
+ r && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(
41
+ O,
42
+ {
43
+ variant: "ghost",
44
+ adjustWidthOn: l === "small" ? "parent" : "min-width",
45
+ onClick: n,
46
+ ...r
47
+ }
48
+ ) }),
49
+ a && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(O, { adjustWidthOn: l === "small" ? "parent" : "min-width", ...a }) })
50
+ ] })
51
+ ] }), ne = {
52
+ "modal-header": "_modal-header_w4aaf_1",
53
+ "width-description": "_width-description_w4aaf_10",
54
+ "modal-header-content": "_modal-header-content_w4aaf_14",
55
+ "modal-title": "_modal-title_w4aaf_20",
56
+ "close-modal-icon": "_close-modal-icon_w4aaf_29"
57
+ }, _ = u.bind(ne), ae = ({ title: o, onClose: n, withDescription: a = !1 }) => /* @__PURE__ */ d("div", { className: _("modal-header", { "width-description": a }), children: [
58
+ /* @__PURE__ */ e("div", { className: _("modal-header-content"), children: o && /* @__PURE__ */ e("div", { className: _("modal-title"), children: o }) }),
59
+ /* @__PURE__ */ e(X, { className: _("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(J, {}) })
60
+ ] }), le = "_modal_yxql5_1", se = "_description_yxql5_43", ie = "_scrollable_yxql5_53", de = {
61
+ modal: le,
62
+ "overlay-default": "_overlay-default_yxql5_12",
63
+ "overlay-light-cyan": "_overlay-light-cyan_yxql5_16",
64
+ "scrolling-content": "_scrolling-content_yxql5_20",
65
+ "modal-window": "_modal-window_yxql5_26",
66
+ description: se,
67
+ scrollable: ie,
68
+ "size-default": "_size-default_yxql5_57",
69
+ "size-small": "_size-small_yxql5_69",
70
+ "size-large": "_size-large_yxql5_81"
71
+ }, h = u.bind(de), ce = 0.9, re = 32 + 24, me = 32 + 8, _e = 36 + 16, he = 32 * 2, Ee = ({
72
+ title: o,
73
+ children: n,
74
+ footerNode: a,
75
+ okButton: r,
76
+ cancelButton: l,
77
+ className: A,
78
+ size: f = "default",
79
+ onClose: C = () => {
80
+ },
81
+ overlay: x = "default",
82
+ zIndex: D = 2,
83
+ allowCloseOutside: S = !0,
84
+ scrollable: p = !1,
85
+ withoutFooter: v = !1,
86
+ createFooter: b = null,
87
+ description: s = null
88
+ }) => {
89
+ const [T, H] = w(!1), [I, q] = w(0), [L, $] = w(!1), i = G(null), E = Q(), M = E.height, k = M * ce, y = (M - I) / 2, R = () => {
90
+ let t = k - he;
91
+ return v || (t = t - _e), s ? t = t - me : t = t - re, t;
92
+ }, c = () => {
93
+ H(!1);
94
+ }, N = (t) => {
95
+ const { keyCode: j } = t;
96
+ j === U.ESCAPE_KEY_CODE && c();
97
+ }, W = () => {
98
+ var t;
99
+ L || ((t = i.current) == null || t.focus(), $(!0));
100
+ };
101
+ return g(() => {
102
+ if (i && i.current) {
103
+ const { clientHeight: t } = i.current;
104
+ q(t);
105
+ }
106
+ }, [n, E]), g(() => (H(!0), document.addEventListener("keydown", N, !1), () => document.removeEventListener("keydown", N, !1)), []), Y(i, S ? c : void 0), /* @__PURE__ */ e(P, { onExitComplete: C, children: T && /* @__PURE__ */ e("div", { className: h("modal", { [`overlay-${x}`]: x }), style: { zIndex: D }, children: /* @__PURE__ */ d(
107
+ B.div,
108
+ {
109
+ className: h("modal-window", { [`size-${f}`]: f }, A),
110
+ ref: i,
111
+ tabIndex: 0,
112
+ initial: { opacity: 0, marginTop: -y },
113
+ animate: { opacity: 1, marginTop: y },
114
+ exit: { opacity: 0, marginTop: -y },
115
+ transition: { duration: 0.3 },
116
+ onAnimationStart: W,
117
+ children: [
118
+ /* @__PURE__ */ e(ae, { title: o, onClose: c, withDescription: !!s }),
119
+ p ? /* @__PURE__ */ d(K, { autoHeight: !0, autoHeightMax: R(), hideTracksWhenNotNeeded: !0, children: [
120
+ s && /* @__PURE__ */ e("span", { className: h("description", { scrollable: p }), children: s }),
121
+ /* @__PURE__ */ e(z, { scrollable: !0, children: n })
122
+ ] }) : /* @__PURE__ */ d(F, { children: [
123
+ s && /* @__PURE__ */ e("span", { className: h("description"), children: s }),
124
+ /* @__PURE__ */ e(z, { children: n })
125
+ ] }),
126
+ !v && (b ? b(c) : /* @__PURE__ */ e(
127
+ oe,
128
+ {
129
+ size: f,
130
+ footerNode: a,
131
+ okButton: r,
132
+ cancelButton: l,
133
+ closeHandler: c
134
+ }
135
+ ))
136
+ ]
137
+ },
138
+ "modal-window"
139
+ ) }) });
140
+ };
11
141
  export {
12
- s as Modal,
13
- n as ModalContent,
14
- b as ModalFooter,
15
- c as ModalHeader
142
+ Ee as Modal,
143
+ z as ModalContent,
144
+ oe as ModalFooter,
145
+ ae as ModalHeader
16
146
  };
@@ -0,0 +1,7 @@
1
+ import * as e from "react";
2
+ const l = (C) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 8C1 4.14001 4.14001 1 8 1C11.86 1 15 4.14001 15 8C15 11.8595 11.86 15 8 15C4.14001 15 1 11.8595 1 8ZM5 5.54545L5.54545 5L8 7.45455L10.4545 5L11 5.54545L8.54545 8L11 10.4545L10.4545 11L8 8.54545L5.54545 11L5 10.4545L7.45455 8L5 5.54545Z", fill: "#A2AAB5" })), t = (C) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.09194 3.90153C8.73249 3.84853 8.36745 3.82135 7.99778 3.82135C5.24735 3.82135 2.75312 5.32613 0.912626 7.77031C0.762442 7.97055 0.762442 8.25031 0.912626 8.45055C1.96494 9.84971 3.23098 10.9408 4.63642 11.6187L5.59679 9.95532C5.16732 9.39694 4.92809 8.68447 4.97644 7.91459C5.07067 6.40686 6.29276 5.18478 7.80049 5.09055C8.00285 5.07782 8.2013 5.08498 8.39407 5.11028L9.09194 3.90153ZM7.56961 6.5383C6.91222 6.71981 6.41543 7.30478 6.37225 8.00589C6.36032 8.18701 6.37814 8.36223 6.42131 8.5272L7.56961 6.5383ZM8.40613 9.68939L9.57119 7.67146C9.61868 7.84288 9.6387 8.02571 9.62624 8.21497C9.58001 8.92637 9.07238 9.51681 8.40613 9.68939ZM7.58518 11.1113C7.78307 11.1384 7.98701 11.1463 8.19509 11.1332C9.69987 11.0361 10.922 9.81398 11.0191 8.3092C11.0679 7.53332 10.8245 6.81576 10.3887 6.25546L11.3454 4.59845C12.7563 5.27587 14.0272 6.36953 15.0829 7.77325C15.2331 7.9735 15.2331 8.25325 15.0829 8.4535C13.2424 10.8977 10.7482 12.4025 7.99778 12.4025C7.62256 12.4025 7.25211 12.3744 6.88743 12.3199L7.58518 11.1113Z", fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("path", { d: "M10.5051 2.25952C10.7122 1.9008 11.1709 1.7779 11.5296 1.985C11.8883 2.19211 12.0112 2.6508 11.8041 3.00952L5.35413 14.1812C5.14702 14.54 4.68833 14.6629 4.32961 14.4558C3.97089 14.2487 3.84798 13.79 4.05509 13.4312L10.5051 2.25952Z", fill: "#A2AAB5" })), n = (C) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.99778 3.82135C5.24735 3.82135 2.75312 5.32613 0.912626 7.77031C0.762442 7.97055 0.762442 8.25031 0.912626 8.45055C2.75312 10.8977 5.24735 12.4025 7.99778 12.4025C10.7482 12.4025 13.2424 10.8977 15.0829 8.4535C15.2331 8.25325 15.2331 7.9735 15.0829 7.77325C13.2424 5.32614 10.7482 3.82135 7.99778 3.82135ZM8.19509 11.1332C6.36932 11.2481 4.86159 9.74331 4.97644 7.91459C5.07067 6.40686 6.29276 5.18478 7.80049 5.09055C9.62625 4.9757 11.134 6.48048 11.0191 8.3092C10.922 9.81398 9.69987 11.0361 8.19509 11.1332ZM6.37225 8.00589C6.30746 8.98945 7.12022 9.79926 8.10378 9.73742C8.9136 9.68736 9.57323 9.03068 9.62624 8.21497C9.69102 7.23141 8.87826 6.4216 7.8947 6.48344C7.08194 6.53644 6.42231 7.19313 6.37225 8.00589Z", fill: "#A2AAB5" }));
3
+ export {
4
+ l as S,
5
+ t as a,
6
+ n as b
7
+ };
@@ -0,0 +1,345 @@
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
+ import { c as g } from "./bind-06a7ff84.js";
3
+ import { useState as b } from "react";
4
+ import { Popover as O } from "./popover.js";
5
+ import { B as x } from "./button-e0bd064d.js";
6
+ import { F as A } from "./fieldText-a61890cd.js";
7
+ import { B as h } from "./baseIconButton-251479f7.js";
8
+ import { S as $, a as T } from "./prevPage-87faf576.js";
9
+ import { Tooltip as B } from "./tooltip.js";
10
+ const P = {
11
+ "item-counter": "_item-counter_4g6do_1"
12
+ }, E = g.bind(P), M = ({
13
+ activePage: o,
14
+ pageSize: n,
15
+ totalItems: s,
16
+ ofText: r,
17
+ itemsText: a
18
+ }) => {
19
+ const c = o * n, i = c - n;
20
+ return /* @__PURE__ */ p("div", { className: E("item-counter"), children: [
21
+ `${i + 1} - ${c < s ? c : s}`,
22
+ ` ${r} ${s} ${a}`
23
+ ] });
24
+ }, V = "_selected_9ub70_32", W = {
25
+ "size-selector": "_size-selector_9ub70_1",
26
+ "size-option": "_size-option_9ub70_6",
27
+ selected: V
28
+ }, C = g.bind(W), D = ({
29
+ currentSize: o,
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 === o }),
36
+ onClick: () => {
37
+ s(r);
38
+ },
39
+ children: r
40
+ },
41
+ r
42
+ )) }), F = {
43
+ "page-size-control": "_page-size-control_sgwmi_1",
44
+ "size-selector-button": "_size-selector-button_sgwmi_10"
45
+ }, w = g.bind(F), j = ({
46
+ size: o,
47
+ sizeOptions: n,
48
+ perPageText: s,
49
+ changeSize: r
50
+ }) => {
51
+ const [a, c] = b(!1), i = (e) => {
52
+ r(e), c(!1);
53
+ };
54
+ return /* @__PURE__ */ p("div", { className: w("page-size-control"), children: [
55
+ /* @__PURE__ */ t(
56
+ O,
57
+ {
58
+ content: /* @__PURE__ */ t(D, { options: n, onClickOption: i, currentSize: o }),
59
+ placement: "top",
60
+ isOpened: a,
61
+ setIsOpened: c,
62
+ children: /* @__PURE__ */ t(x, { className: w("size-selector-button"), variant: "text", children: o })
63
+ }
64
+ ),
65
+ ` ${s}`
66
+ ] });
67
+ }, G = {
68
+ "page-selector": "_page-selector_rtho4_1",
69
+ "field-wrapper": "_field-wrapper_rtho4_6",
70
+ "apply-button": "_apply-button_rtho4_10"
71
+ }, N = g.bind(G), H = ({
72
+ totalPages: o,
73
+ pageText: n,
74
+ goActionText: s,
75
+ selectPage: r
76
+ }) => {
77
+ const [a, c] = b(""), [i, e] = b(!0), d = (u) => {
78
+ const y = u.target.value.replace(/\D/g, ""), v = Number(y), k = v > 0 && v <= o;
79
+ e(k), c(y);
80
+ }, l = () => {
81
+ r(Number(a));
82
+ };
83
+ return /* @__PURE__ */ p("div", { className: N("page-selector"), children: [
84
+ /* @__PURE__ */ t("div", { className: N("field-wrapper"), children: /* @__PURE__ */ t(
85
+ A,
86
+ {
87
+ onChange: d,
88
+ value: a,
89
+ placeholder: n,
90
+ error: i ? "" : "Error",
91
+ touched: !0,
92
+ defaultWidth: !1,
93
+ displayError: !1
94
+ }
95
+ ) }),
96
+ /* @__PURE__ */ t(x, { onClick: l, disabled: !a || !i, className: N("apply-button"), children: s })
97
+ ] });
98
+ }, L = {
99
+ "active-page": "_active-page_1gl9o_1",
100
+ "page-selector": "_page-selector_1gl9o_10",
101
+ "page-selector-button": "_page-selector-button_1gl9o_14"
102
+ }, f = g.bind(L), R = ({
103
+ activePage: o,
104
+ totalPages: n,
105
+ pageText: s,
106
+ goToText: r,
107
+ goActionText: a,
108
+ changePage: c
109
+ }) => {
110
+ const [i, e] = b(!1), d = (l) => {
111
+ c(l), e(!1);
112
+ };
113
+ return /* @__PURE__ */ p("div", { className: f("active-page"), children: [
114
+ `${s} `,
115
+ /* @__PURE__ */ t(
116
+ O,
117
+ {
118
+ content: /* @__PURE__ */ t(
119
+ H,
120
+ {
121
+ pageText: s,
122
+ goActionText: a,
123
+ selectPage: d,
124
+ totalPages: n
125
+ }
126
+ ),
127
+ title: r,
128
+ placement: "top",
129
+ isOpened: i,
130
+ setIsOpened: e,
131
+ className: f("page-selector"),
132
+ children: /* @__PURE__ */ t(x, { className: f("page-selector-button"), variant: "text", children: o })
133
+ }
134
+ )
135
+ ] });
136
+ }, q = "_bar_y74hy_1", J = "_section_y74hy_9", K = "_selected_y74hy_33", Q = "_tooltip_y74hy_37", U = {
137
+ bar: q,
138
+ "section-with-tooltip": "_section-with-tooltip_y74hy_9",
139
+ section: J,
140
+ selected: K,
141
+ "tooltip-wrapper": "_tooltip-wrapper_y74hy_37",
142
+ tooltip: Q,
143
+ "tooltip-text": "_tooltip-text_y74hy_48",
144
+ "page-number": "_page-number_y74hy_52"
145
+ }, _ = g.bind(U), S = 13, z = 260, X = ({
146
+ totalPages: o,
147
+ activePage: n,
148
+ changePage: s,
149
+ captions: r
150
+ }) => {
151
+ const a = z / o, c = Math.min(Math.ceil(z / S), o), i = Math.max(S, a), e = [];
152
+ for (let l = 1; l <= o; l++)
153
+ e.push({
154
+ end: l * a,
155
+ pageNumber: l
156
+ });
157
+ const d = Array.from({ length: c }, () => ({ pages: { from: void 0, to: void 0 } }));
158
+ return d.forEach((l, u) => {
159
+ for (l.pages.from = e[0].pageNumber; i * (u + 1) > e[0].end; )
160
+ e.shift();
161
+ l.pages.to = e[0].pageNumber, e.shift();
162
+ }), /* @__PURE__ */ t("div", { className: _("bar"), children: d.map((l, u) => /* @__PURE__ */ t(
163
+ "div",
164
+ {
165
+ className: _("section-with-tooltip"),
166
+ style: { width: i },
167
+ onClick: () => l.pages.from && s(l.pages.from),
168
+ children: /* @__PURE__ */ t(
169
+ B,
170
+ {
171
+ content: /* @__PURE__ */ p("div", { className: _("tooltip"), children: [
172
+ /* @__PURE__ */ t("div", { className: _("tooltip-text"), children: r.goTo }),
173
+ /* @__PURE__ */ t("div", { className: _("page-number"), children: l.pages.from })
174
+ ] }),
175
+ wrapperClassName: _("tooltip-wrapper"),
176
+ placement: "top",
177
+ children: /* @__PURE__ */ t(
178
+ "div",
179
+ {
180
+ className: _("section", {
181
+ selected: l.pages.from && l.pages.to && l.pages.from <= n && n <= l.pages.to
182
+ })
183
+ }
184
+ )
185
+ }
186
+ )
187
+ },
188
+ u
189
+ )) });
190
+ }, Y = "_next_1p2t5_18", Z = {
191
+ "page-navigator": "_page-navigator_1p2t5_1",
192
+ "page-buttons": "_page-buttons_1p2t5_6",
193
+ "page-button": "_page-button_1p2t5_6",
194
+ next: Y
195
+ }, m = g.bind(Z), ee = ({
196
+ activePage: o,
197
+ changePage: n,
198
+ totalPages: s,
199
+ captions: r
200
+ }) => {
201
+ const a = () => {
202
+ n(1);
203
+ }, c = () => {
204
+ n(o - 1);
205
+ }, i = () => {
206
+ n(o + 1);
207
+ }, e = () => {
208
+ n(s);
209
+ };
210
+ return /* @__PURE__ */ p("div", { className: m("page-navigator"), children: [
211
+ /* @__PURE__ */ p("div", { className: m("page-buttons"), children: [
212
+ /* @__PURE__ */ t(
213
+ h,
214
+ {
215
+ className: m("page-button"),
216
+ onClick: a,
217
+ disabled: o === 1,
218
+ children: /* @__PURE__ */ t($, {})
219
+ }
220
+ ),
221
+ /* @__PURE__ */ t(
222
+ h,
223
+ {
224
+ className: m("page-button"),
225
+ onClick: c,
226
+ disabled: o === 1,
227
+ children: /* @__PURE__ */ t(T, {})
228
+ }
229
+ )
230
+ ] }),
231
+ /* @__PURE__ */ t(
232
+ X,
233
+ {
234
+ totalPages: s,
235
+ activePage: o,
236
+ changePage: n,
237
+ captions: r
238
+ }
239
+ ),
240
+ /* @__PURE__ */ p("div", { className: m("page-buttons"), children: [
241
+ /* @__PURE__ */ t(
242
+ h,
243
+ {
244
+ className: m("page-button", "next"),
245
+ onClick: i,
246
+ disabled: o === s,
247
+ children: /* @__PURE__ */ t(T, {})
248
+ }
249
+ ),
250
+ /* @__PURE__ */ t(
251
+ h,
252
+ {
253
+ className: m("page-button", "next"),
254
+ onClick: e,
255
+ disabled: o === s,
256
+ children: /* @__PURE__ */ t($, {})
257
+ }
258
+ )
259
+ ] })
260
+ ] });
261
+ }, te = {
262
+ "page-controls": "_page-controls_thyf8_1",
263
+ "total-pages": "_total-pages_thyf8_8"
264
+ }, I = g.bind(te), oe = ({
265
+ activePage: o,
266
+ changePage: n,
267
+ captions: s,
268
+ totalPages: r
269
+ }) => /* @__PURE__ */ p("div", { className: I("page-controls"), children: [
270
+ /* @__PURE__ */ t(
271
+ R,
272
+ {
273
+ activePage: o,
274
+ totalPages: r,
275
+ changePage: n,
276
+ pageText: s.page,
277
+ goToText: s.goTo,
278
+ goActionText: s.goAction
279
+ }
280
+ ),
281
+ /* @__PURE__ */ t(
282
+ ee,
283
+ {
284
+ changePage: n,
285
+ activePage: o,
286
+ totalPages: r,
287
+ captions: { goTo: s.goTo }
288
+ }
289
+ ),
290
+ /* @__PURE__ */ p("span", { className: I("total-pages"), children: [
291
+ `${s.of} `,
292
+ r
293
+ ] })
294
+ ] }), se = "_pagination_w2r3n_1", ne = {
295
+ pagination: se
296
+ }, re = g.bind(ne), ue = ({
297
+ activePage: o,
298
+ totalPages: n,
299
+ pageSize: s,
300
+ totalItems: r,
301
+ pageSizeOptions: a,
302
+ changePage: c,
303
+ changePageSize: i,
304
+ captions: e
305
+ }) => {
306
+ const d = (e == null ? void 0 : e.of) || "of", l = (e == null ? void 0 : e.page) || "Page";
307
+ return /* @__PURE__ */ p("div", { className: re("pagination"), children: [
308
+ /* @__PURE__ */ t(
309
+ M,
310
+ {
311
+ activePage: o,
312
+ pageSize: s,
313
+ totalItems: r,
314
+ ofText: d,
315
+ itemsText: (e == null ? void 0 : e.items) || "items"
316
+ }
317
+ ),
318
+ n > 1 && /* @__PURE__ */ t(
319
+ oe,
320
+ {
321
+ activePage: o,
322
+ totalPages: n,
323
+ changePage: c,
324
+ captions: {
325
+ page: l,
326
+ of: d,
327
+ goTo: (e == null ? void 0 : e.goTo) || "Go to page",
328
+ goAction: (e == null ? void 0 : e.goAction) || "Go"
329
+ }
330
+ }
331
+ ),
332
+ /* @__PURE__ */ t(
333
+ j,
334
+ {
335
+ size: s,
336
+ sizeOptions: a,
337
+ changeSize: i,
338
+ perPageText: (e == null ? void 0 : e.perPage) || "per page"
339
+ }
340
+ )
341
+ ] });
342
+ };
343
+ export {
344
+ ue as P
345
+ };
@@ -0,0 +1,20 @@
1
+ import { P as t } from "./pagination-0e7eebc6.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-e0bd064d.js";
8
+ import "./fieldText-a61890cd.js";
9
+ import "./openEye-7b9cf080.js";
10
+ import "./spinLoader-c4a53718.js";
11
+ import "./maxValueDisplay-9be01a75.js";
12
+ import "./fieldLabel.js";
13
+ import "./baseIconButton-251479f7.js";
14
+ import "./prevPage-87faf576.js";
15
+ import "./tooltip.js";
16
+ import "react-dom";
17
+ export {
18
+ t as Pagination,
19
+ t as default
20
+ };
@@ -0,0 +1,6 @@
1
+ import * as e from "react";
2
+ const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.31082 7.31081C2.94108 7.30926 2.6426 7.60773 2.64415 7.97748C2.64571 8.34722 2.9467 8.64822 3.31645 8.64977L12.6892 8.68919C13.0589 8.69074 13.3574 8.39227 13.3559 8.02252C13.3543 7.65278 13.0533 7.35178 12.6836 7.35023L3.31082 7.31081Z" })), C = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.00117 2.62046C7.63142 2.6189 7.33294 2.91738 7.3345 3.28712L7.35159 7.35159L3.28712 7.3345C2.91738 7.33295 2.6189 7.63142 2.62045 8.00117C2.62201 8.37091 2.92301 8.67191 3.29275 8.67346L7.35722 8.69056L7.37391 12.6599C7.37547 13.0296 7.67647 13.3306 8.04621 13.3322C8.41596 13.3337 8.71443 13.0352 8.71288 12.6655L8.69619 8.69619L12.6655 8.71288C13.0352 8.71444 13.3337 8.41596 13.3322 8.04621C13.3306 7.67647 13.0296 7.37547 12.6599 7.37392L8.69056 7.35722L8.67346 3.29275C8.67191 2.92301 8.37091 2.62201 8.00117 2.62046Z" }));
3
+ export {
4
+ l as S,
5
+ C as a
6
+ };
@@ -0,0 +1,99 @@
1
+ import { jsxs as f, Fragment as S, jsx as n } from "react/jsx-runtime";
2
+ import { useRef as j, useState as C, useCallback as L } from "react";
3
+ import { useFloating as M, offset as U, flip as W, arrow as q, autoUpdate as z, useClick as B, useDismiss as J, useRole as K, useInteractions as Q, FloatingFocusManager as V, FloatingArrow as X } from "@floating-ui/react";
4
+ import { c as Y } from "./bind-06a7ff84.js";
5
+ const Z = "_popover_n3nff_1", $ = "_title_n3nff_28", O = {
6
+ "popover-wrapper": "_popover-wrapper_n3nff_1",
7
+ popover: Z,
8
+ title: $
9
+ }, r = Y.bind(O), d = 16, g = 8, tt = ["top", "right", "bottom", "left"], et = [
10
+ "right",
11
+ "right-start",
12
+ "right-end",
13
+ "left",
14
+ "left-start",
15
+ "left-end"
16
+ ], ot = [
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
+ ], it = ({
30
+ className: h,
31
+ content: u,
32
+ children: v,
33
+ placement: _ = "bottom",
34
+ fallbackPlacements: b = ot,
35
+ title: i,
36
+ arrowOffset: o = 16,
37
+ safeZone: w = 4,
38
+ arrowColor: x = "white",
39
+ dataAutomationId: A,
40
+ isOpened: F,
41
+ setIsOpened: s,
42
+ isCentered: a = !0
43
+ }) => {
44
+ const c = j(null), [R, N] = C(!1), p = s ? F : R, P = (t) => {
45
+ s ? s(t) : N(t);
46
+ }, k = L(
47
+ (t, l) => a ? ((et.includes(l) ? t.reference.height : t.reference.width) - d) / 2 - o : -o,
48
+ [o, a]
49
+ ), { placement: E, refs: m, floatingStyles: I, context: e } = M({
50
+ open: p,
51
+ onOpenChange: P,
52
+ placement: _,
53
+ middleware: [
54
+ U(({ rects: t, placement: l }) => ({
55
+ mainAxis: w + g,
56
+ alignmentAxis: k(t, l)
57
+ })),
58
+ W({
59
+ fallbackAxisSideDirection: "start",
60
+ fallbackPlacements: b
61
+ }),
62
+ q({
63
+ element: c
64
+ })
65
+ ],
66
+ whileElementsMounted: z
67
+ }), T = B(e), y = J(e), D = K(e), { getReferenceProps: G, getFloatingProps: H } = Q([T, y, D]);
68
+ return /* @__PURE__ */ f(S, { children: [
69
+ /* @__PURE__ */ n("div", { ref: m.setReference, ...G(), className: r("popover-wrapper"), children: v }),
70
+ p && /* @__PURE__ */ n(V, { context: e, modal: !1, children: /* @__PURE__ */ f(
71
+ "div",
72
+ {
73
+ className: r("popover", h),
74
+ "data-automation-id": A,
75
+ ref: m.setFloating,
76
+ style: I,
77
+ ...H,
78
+ children: [
79
+ /* @__PURE__ */ n(
80
+ X,
81
+ {
82
+ ref: c,
83
+ context: e,
84
+ width: d,
85
+ height: g,
86
+ fill: x,
87
+ staticOffset: tt.includes(E) ? null : o
88
+ }
89
+ ),
90
+ i && /* @__PURE__ */ n("div", { className: r("title"), children: i }),
91
+ u
92
+ ]
93
+ }
94
+ ) })
95
+ ] });
96
+ };
97
+ export {
98
+ it as Popover
99
+ };
@@ -0,0 +1,6 @@
1
+ import * as e from "react";
2
+ const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 12L2 12L2 2.38498e-08L1.90798e-07 0L0 12ZM13 1L5 6L13 11L13 1Z" })), a = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M12 13L4 8L12 3L12 13Z" }));
3
+ export {
4
+ l as S,
5
+ a
6
+ };