@reportportal/ui-kit 0.0.1-alpha.7 → 0.0.1-alpha.9

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 (91) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +197 -3
  3. package/dist/baseIconButton-7bc53dec.js +25 -0
  4. package/dist/baseIconButton.js +7 -0
  5. package/dist/bubblesLoader-a7e709d4.js +17 -0
  6. package/dist/bubblesLoader.js +1 -1
  7. package/dist/button-7fb84fde.js +62 -0
  8. package/dist/button.js +1 -1
  9. package/dist/checkbox-4143390f.js +70 -0
  10. package/dist/checkbox.js +1 -1
  11. package/dist/components/button/button.d.ts +0 -1
  12. package/dist/components/button/index.d.ts +2 -2
  13. package/dist/components/checkbox/checkbox.d.ts +1 -0
  14. package/dist/components/dropdown/constants.d.ts +4 -0
  15. package/dist/components/dropdown/dropdown.d.ts +0 -1
  16. package/dist/components/fieldText/fieldText.d.ts +1 -0
  17. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +14 -0
  18. package/dist/components/fieldTextFlex/index.d.ts +3 -0
  19. package/dist/components/icons/baseIconButton/baseIconButton.d.ts +8 -0
  20. package/dist/components/icons/baseIconButton/index.d.ts +4 -0
  21. package/dist/components/icons/index.d.ts +12 -0
  22. package/dist/components/index.d.ts +6 -1
  23. package/dist/components/modal/modal.d.ts +3 -1
  24. package/dist/components/pagination/index.d.ts +4 -0
  25. package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
  26. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
  27. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
  28. package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
  29. package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
  30. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
  31. package/dist/components/pagination/pageControls/index.d.ts +1 -0
  32. package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
  33. package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
  34. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +8 -0
  35. package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
  36. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
  37. package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
  38. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
  39. package/dist/components/pagination/pagination.d.ts +22 -0
  40. package/dist/components/pagination/types.d.ts +2 -0
  41. package/dist/components/popover/index.d.ts +1 -0
  42. package/dist/components/popover/popover.d.ts +18 -0
  43. package/dist/components/radio/index.d.ts +4 -0
  44. package/dist/components/radio/radio.d.ts +16 -0
  45. package/dist/components/radio/radioGroup.d.ts +8 -0
  46. package/dist/components/table/index.d.ts +3 -0
  47. package/dist/components/table/table.d.ts +3 -0
  48. package/dist/components/table/types.d.ts +46 -0
  49. package/dist/components/table/utils.d.ts +2 -0
  50. package/dist/components/themeProvider/themeProvider.d.ts +2 -1
  51. package/dist/components/tooltip/index.d.ts +1 -0
  52. package/dist/components/tooltip/tooltip.d.ts +13 -0
  53. package/dist/dropdown-e07f2a71.js +212 -0
  54. package/dist/dropdown.js +3 -4
  55. package/dist/fieldNumber-46fe79b9.js +127 -0
  56. package/dist/fieldNumber.js +2 -3
  57. package/dist/fieldText-d80b29ba.js +102 -0
  58. package/dist/fieldText.js +2 -2
  59. package/dist/fieldTextFlex-5bddf46a.js +67 -0
  60. package/dist/fieldTextFlex.js +8 -0
  61. package/dist/index-bb9b62ef.js +131 -0
  62. package/dist/index.js +46 -24
  63. package/dist/modal.js +14 -126
  64. package/dist/pagination-a36bc786.js +274 -0
  65. package/dist/pagination.js +13 -0
  66. package/dist/popover.js +95 -0
  67. package/dist/radio-fd49a09c.js +76 -0
  68. package/dist/{icon.js → radio.js} +4 -4
  69. package/dist/style.css +1 -1
  70. package/dist/systemMessage-1ced6079.js +30 -0
  71. package/dist/systemMessage.js +1 -1
  72. package/dist/themeProvider-46c2be7b.js +23 -0
  73. package/dist/themeProvider.js +4 -3
  74. package/dist/toggle-707ecb74.js +67 -0
  75. package/dist/toggle.js +1 -1
  76. package/dist/tooltip.js +70 -0
  77. package/package.json +30 -6
  78. package/dist/bubblesLoader-9bec3797.js +0 -17
  79. package/dist/button-d4944dbc.js +0 -64
  80. package/dist/checkbox-fdc44740.js +0 -68
  81. package/dist/clear-4963efcd.js +0 -5
  82. package/dist/components/icon/icon.d.ts +0 -11
  83. package/dist/components/icon/icons.d.ts +0 -21
  84. package/dist/components/icon/index.d.ts +0 -3
  85. package/dist/dropdown-45e7bc7d.js +0 -204
  86. package/dist/fieldNumber-27e69676.js +0 -132
  87. package/dist/fieldText-c7085849.js +0 -99
  88. package/dist/icon-71262f5c.js +0 -26
  89. package/dist/systemMessage-62c3133d.js +0 -30
  90. package/dist/themeProvider-5800417e.js +0 -19
  91. package/dist/toggle-5b3d8333.js +0 -67
@@ -0,0 +1,131 @@
1
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
+ import * as y from "react";
3
+ import { useState as w, useEffect as g, useRef as j } from "react";
4
+ import { Scrollbars as B } from "rc-scrollbars";
5
+ import { AnimatePresence as D, motion as I } from "framer-motion";
6
+ import { c as m } from "./bind-06a7ff84.js";
7
+ import { u as K } from "./useOnClickOutside-c332f7d3.js";
8
+ import { K as F } from "./keyCodes-f63c0e11.js";
9
+ import { B as C } from "./button-7fb84fde.js";
10
+ import { B as P } from "./baseIconButton-7bc53dec.js";
11
+ const G = (t) => /* @__PURE__ */ y.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ y.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.732179 15.2698C0.330639 14.8683 0.33064 14.2172 0.73218 13.8157L6.54858 7.99928L0.73218 2.18288C0.33064 1.78134 0.330639 1.13031 0.732179 0.728774C1.13372 0.327235 1.78474 0.327235 2.18628 0.728774L8.00269 6.54518L13.8191 0.728767C14.2206 0.327229 14.8717 0.327228 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.18628 15.2698C1.78474 15.6713 1.13372 15.6713 0.732179 15.2698Z", fill: "#A2AAB5" })), X = () => {
12
+ const [t, a] = w({ width: 0, height: 0 });
13
+ return g(() => {
14
+ const o = () => {
15
+ a({
16
+ width: window.innerWidth,
17
+ height: window.innerHeight
18
+ });
19
+ };
20
+ return window.addEventListener("resize", o), o(), () => window.removeEventListener("resize", o);
21
+ }, []), t;
22
+ }, Y = {
23
+ "modal-content": "_modal-content_ojybs_1"
24
+ }, Z = m.bind(Y), b = ({ children: t }) => /* @__PURE__ */ e("div", { className: Z("modal-content"), children: t }), q = {
25
+ "buttons-block": "_buttons-block_1dgm4_1",
26
+ "button-container": "_button-container_1dgm4_5",
27
+ "modal-footer": "_modal-footer_1dgm4_14",
28
+ "with-extra-node": "_with-extra-node_1dgm4_21",
29
+ "size-small": "_size-small_1dgm4_25"
30
+ }, c = m.bind(q), J = ({
31
+ footerNode: t,
32
+ closeHandler: a,
33
+ okButton: o,
34
+ cancelButton: l,
35
+ size: s
36
+ }) => /* @__PURE__ */ i("div", { className: c("modal-footer", { "with-extra-node": t, [`size-${s}`]: s }), children: [
37
+ t && t,
38
+ /* @__PURE__ */ i("div", { className: c("buttons-block"), children: [
39
+ l && /* @__PURE__ */ e("div", { className: c("button-container"), children: /* @__PURE__ */ e(
40
+ C,
41
+ {
42
+ variant: "ghost",
43
+ adjustWidthOn: s === "small" ? "parent" : "content",
44
+ onClick: a,
45
+ ...l
46
+ }
47
+ ) }),
48
+ o && /* @__PURE__ */ e("div", { className: c("button-container"), children: /* @__PURE__ */ e(C, { adjustWidthOn: s === "small" ? "parent" : "content", ...o }) })
49
+ ] })
50
+ ] }), Q = {
51
+ "modal-header": "_modal-header_11gdx_1",
52
+ "modal-header-content": "_modal-header-content_11gdx_11",
53
+ "modal-title": "_modal-title_11gdx_20",
54
+ "close-modal-icon": "_close-modal-icon_11gdx_28"
55
+ }, r = m.bind(Q), U = ({ title: t, onClose: a, headerNode: o }) => /* @__PURE__ */ i("div", { className: r("modal-header"), children: [
56
+ /* @__PURE__ */ i("div", { className: r("modal-header-content"), children: [
57
+ t && /* @__PURE__ */ e("span", { className: r("modal-title"), children: t }),
58
+ o && o
59
+ ] }),
60
+ /* @__PURE__ */ e(P, { className: r("close-modal-icon"), onClick: a, children: /* @__PURE__ */ e(G, {}) })
61
+ ] }), V = "_modal_1kzzv_1", ee = {
62
+ modal: V,
63
+ "overlay-default": "_overlay-default_1kzzv_11",
64
+ "overlay-light-cyan": "_overlay-light-cyan_1kzzv_15",
65
+ "scrolling-content": "_scrolling-content_1kzzv_19",
66
+ "modal-window": "_modal-window_1kzzv_25",
67
+ "size-default": "_size-default_1kzzv_42",
68
+ "size-small": "_size-small_1kzzv_54",
69
+ "size-large": "_size-large_1kzzv_66"
70
+ }, k = m.bind(ee), te = 0.9, oe = 176, _e = ({
71
+ title: t,
72
+ headerNode: a,
73
+ children: o,
74
+ footerNode: l,
75
+ okButton: s,
76
+ cancelButton: E,
77
+ className: M,
78
+ size: _ = "default",
79
+ onClose: H = () => {
80
+ },
81
+ overlay: v = "default",
82
+ zIndex: L = 2,
83
+ allowCloseOutside: N = !0,
84
+ scrollable: A = !1
85
+ }) => {
86
+ const [O, f] = w(!1), [R, S] = w(0), n = j(null), z = X(), p = z.height, $ = p * te, h = (p - R) / 2, T = $ - oe, d = () => {
87
+ f(!1);
88
+ }, x = (u) => {
89
+ const { keyCode: W } = u;
90
+ W === F.ESCAPE_KEY_CODE && d();
91
+ };
92
+ return g(() => {
93
+ if (n && n.current) {
94
+ const { clientHeight: u } = n.current;
95
+ S(u);
96
+ }
97
+ }, [o, z]), g(() => (f(!0), n && n.current && n.current.focus(), document.addEventListener("keydown", x, !1), () => document.removeEventListener("keydown", x, !1)), []), K(n, N ? d : void 0), /* @__PURE__ */ e(D, { onExitComplete: H, children: O && /* @__PURE__ */ e("div", { className: k("modal", { [`overlay-${v}`]: v }), style: { zIndex: L }, children: /* @__PURE__ */ i(
98
+ I.div,
99
+ {
100
+ className: k("modal-window", { [`size-${_}`]: _ }, M),
101
+ ref: n,
102
+ tabIndex: 0,
103
+ initial: { opacity: 0, marginTop: -h },
104
+ animate: { opacity: 1, marginTop: h },
105
+ exit: { opacity: 0, marginTop: -h },
106
+ transition: { duration: 0.3 },
107
+ children: [
108
+ /* @__PURE__ */ e(U, { title: t, headerNode: a, onClose: d }),
109
+ A ? /* @__PURE__ */ e(B, { autoHeight: !0, autoHeightMax: T, hideTracksWhenNotNeeded: !0, children: /* @__PURE__ */ e(b, { children: o }) }) : /* @__PURE__ */ e(b, { children: o }),
110
+ /* @__PURE__ */ e(
111
+ J,
112
+ {
113
+ size: _,
114
+ footerNode: l,
115
+ okButton: s,
116
+ cancelButton: E,
117
+ closeHandler: d
118
+ }
119
+ )
120
+ ]
121
+ },
122
+ "modal-window"
123
+ ) }) });
124
+ };
125
+ export {
126
+ _e as M,
127
+ G as S,
128
+ b as a,
129
+ U as b,
130
+ J as c
131
+ };
package/dist/index.js CHANGED
@@ -1,34 +1,56 @@
1
- import { B as l } from "./button-d4944dbc.js";
2
- import { C as b } from "./checkbox-fdc44740.js";
3
- import { S as F } from "./systemMessage-62c3133d.js";
4
- import { F as n } from "./fieldText-c7085849.js";
5
- import { T as c } from "./themeProvider-5800417e.js";
6
- import { Modal as C } from "./modal.js";
7
- import { D as I } from "./dropdown-45e7bc7d.js";
8
- import { T as S } from "./toggle-5b3d8333.js";
9
- import { I as v } from "./icon-71262f5c.js";
10
- import { F as y } from "./fieldNumber-27e69676.js";
11
- import { B as N } from "./bubblesLoader-9bec3797.js";
1
+ import { B as v } from "./button-7fb84fde.js";
2
+ import { C as g } from "./checkbox-4143390f.js";
3
+ import { S as A } from "./systemMessage-1ced6079.js";
4
+ import { S as u, F as B } from "./fieldText-d80b29ba.js";
5
+ import { T as R } from "./themeProvider-46c2be7b.js";
6
+ import { S as H, M as E } from "./index-bb9b62ef.js";
7
+ import { D as P, S as D } from "./dropdown-e07f2a71.js";
8
+ import { T } from "./toggle-707ecb74.js";
9
+ import { F as V, a as U, S as k } from "./fieldNumber-46fe79b9.js";
10
+ import { B as N } from "./bubblesLoader-a7e709d4.js";
11
+ import { F as q } from "./fieldTextFlex-5bddf46a.js";
12
+ import { R as G } from "./radio-fd49a09c.js";
13
+ import { Tooltip as K } from "./tooltip.js";
14
+ import { Popover as Q } from "./popover.js";
15
+ import { P as X, a as Y, S as _ } from "./pagination-a36bc786.js";
16
+ import { B as e1 } from "./baseIconButton-7bc53dec.js";
17
+ import * as e from "react";
12
18
  import "react/jsx-runtime";
13
- import "react";
14
19
  import "./bind-06a7ff84.js";
15
20
  import "./keyCodes-f63c0e11.js";
16
- import "./clear-4963efcd.js";
17
21
  import "rc-scrollbars";
18
22
  import "framer-motion";
19
23
  import "./useOnClickOutside-c332f7d3.js";
20
- import "react-popper";
24
+ import "@floating-ui/react-dom";
21
25
  import "downshift";
26
+ import "@floating-ui/react";
27
+ const m = (o) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ e.createElement("path", { d: "M9.80051 6.3661C9.95672 6.20989 10.21 6.20989 10.3662 6.3661L10.6338 6.63375C10.7901 6.78996 10.7901 7.04323 10.6338 7.19944L8.83331 8.99996L10.6338 10.8005C10.79 10.9567 10.79 11.2099 10.6338 11.3662L10.3662 11.6338C10.21 11.79 9.95669 11.79 9.80048 11.6338L7.99998 9.8333L6.19953 11.6338C6.04332 11.79 5.79005 11.79 5.63384 11.6338L5.36619 11.3661C5.20998 11.2099 5.20998 10.9566 5.36619 10.8004L7.16665 8.99996L5.36617 7.19949C5.20996 7.04328 5.20996 6.79001 5.36617 6.6338L5.63382 6.36615C5.79003 6.20994 6.04329 6.20994 6.1995 6.36615L7.99998 8.16663L9.80051 6.3661Z", fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.99878 3V2C4.99878 1.44772 5.44649 1 5.99878 1H9.99878C10.5511 1 10.9988 1.44772 10.9988 2V3H14.5C14.7761 3 15 3.22386 15 3.5C15 3.77614 14.7761 4 14.5 4H13.4167L12.6146 13.6246C12.5498 14.402 11.8999 15 11.1198 15H4.8802C4.10007 15 3.45017 14.402 3.38538 13.6246L2.58333 4H1.5C1.22386 4 1 3.77614 1 3.5C1 3.22386 1.22386 3 1.5 3H4.99878ZM5.99878 2H9.99878V3H5.99878V2ZM3.5868 4L4.38193 13.5415C4.40352 13.8007 4.62016 14 4.8802 14H11.1198C11.3798 14 11.5965 13.8007 11.6181 13.5415L12.4132 4H3.5868Z", fill: "#A2AAB5" })), d = (o) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L4.14645 9.85355C3.95118 9.65829 3.95118 9.34171 4.14645 9.14645C4.34171 8.95118 4.65829 8.95118 4.85355 9.14645L7 11.2929L7 3.5C7 3.22386 7.22386 3 7.5 3C7.77614 3 8 3.22386 8 3.5L8 11.2929L10.1464 9.14645C10.3417 8.95119 10.6583 8.95118 10.8536 9.14645C11.0488 9.34171 11.0488 9.65829 10.8536 9.85355L7.85355 12.8536Z", fill: "#A2AAB5" })), w = (o) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L10.8536 6.14645C11.0488 6.34171 11.0488 6.65829 10.8536 6.85355C10.6583 7.04882 10.3417 7.04882 10.1464 6.85355L8 4.70711V12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 4.70711L4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355C3.95118 6.65829 3.95118 6.34171 4.14645 6.14645L7.14645 3.14645Z", fill: "#A2AAB5" })), c = (o) => /* @__PURE__ */ e.createElement("svg", { width: 14, height: 3, viewBox: "0 0 14 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.30811 2.47803C1.72868 2.47803 2.05339 2.36206 2.28223 2.13013C2.51107 1.89819 2.62549 1.60596 2.62549 1.25342C2.62549 0.894694 2.51107 0.596273 2.28223 0.358154C2.05339 0.120036 1.72868 0.000976562 1.30811 0.000976562C0.893717 0.000976562 0.572103 0.120036 0.343262 0.358154C0.114421 0.596273 0 0.894694 0 1.25342C0 1.61214 0.117513 1.90592 0.352539 2.13477C0.587565 2.36361 0.906087 2.47803 1.30811 2.47803ZM6.61475 2.47803C7.03532 2.47803 7.36003 2.36206 7.58887 2.13013C7.81771 1.89819 7.93213 1.60596 7.93213 1.25342C7.93213 0.894694 7.81771 0.596273 7.58887 0.358154C7.36003 0.120036 7.03532 0.000976562 6.61475 0.000976562C6.20036 0.000976562 5.87874 0.120036 5.6499 0.358154C5.42106 0.596273 5.30664 0.894694 5.30664 1.25342C5.30664 1.61214 5.42415 1.90592 5.65918 2.13477C5.89421 2.36361 6.21273 2.47803 6.61475 2.47803ZM12.8955 2.13013C12.6667 2.36206 12.342 2.47803 11.9214 2.47803C11.5194 2.47803 11.2008 2.36361 10.9658 2.13477C10.7308 1.90592 10.6133 1.61214 10.6133 1.25342C10.6133 0.894694 10.7277 0.596273 10.9565 0.358154C11.1854 0.120036 11.507 0.000976562 11.9214 0.000976562C12.342 0.000976562 12.6667 0.120036 12.8955 0.358154C13.1243 0.596273 13.2388 0.894694 13.2388 1.25342C13.2388 1.60596 13.1243 1.89819 12.8955 2.13013Z", fill: "#A2AAB5" }));
22
28
  export {
29
+ d as ArrowDownIcon,
30
+ w as ArrowUpIcon,
31
+ e1 as BaseIconButton,
23
32
  N as BubblesLoader,
24
- l as Button,
25
- b as Checkbox,
26
- I as Dropdown,
27
- y as FieldNumber,
28
- n as FieldText,
29
- v as Icon,
30
- C as Modal,
31
- F as SystemMessage,
32
- c as ThemeProvider,
33
- S as Toggle
33
+ v as Button,
34
+ g as Checkbox,
35
+ u as ClearIcon,
36
+ H as CloseIcon,
37
+ m as DeleteIcon,
38
+ P as Dropdown,
39
+ D as DropdownIcon,
40
+ V as FieldNumber,
41
+ B as FieldText,
42
+ q as FieldTextFlex,
43
+ c as MeatballMenuIcon,
44
+ U as MinusIcon,
45
+ E as Modal,
46
+ X as Pagination,
47
+ k as PlusIcon,
48
+ Q as Popover,
49
+ Y as PrevChapterIcon,
50
+ _ as PrevPageIcon,
51
+ G as Radio,
52
+ A as SystemMessage,
53
+ R as ThemeProvider,
54
+ T as Toggle,
55
+ K as Tooltip
34
56
  };
package/dist/modal.js CHANGED
@@ -1,128 +1,16 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { useState as w, useEffect as f, useRef as R } from "react";
3
- import { Scrollbars as T } from "rc-scrollbars";
4
- import { AnimatePresence as L, motion as W } from "framer-motion";
5
- import { c as m } from "./bind-06a7ff84.js";
6
- import { u as D } from "./useOnClickOutside-c332f7d3.js";
7
- import { K as I } from "./keyCodes-f63c0e11.js";
8
- import { B as b } from "./button-d4944dbc.js";
9
- import { I as j } from "./icon-71262f5c.js";
10
- import "./clear-4963efcd.js";
11
- const K = () => {
12
- const [t, a] = w({ width: 0, height: 0 });
13
- return f(() => {
14
- const o = () => {
15
- a({
16
- width: window.innerWidth,
17
- height: window.innerHeight
18
- });
19
- };
20
- return window.addEventListener("resize", o), o(), () => window.removeEventListener("resize", o);
21
- }, []), t;
22
- }, F = {
23
- "modal-content": "_modal-content_xak18_1"
24
- }, P = m.bind(F), G = ({ children: t }) => /* @__PURE__ */ e("div", { className: P("modal-content"), children: t }), X = {
25
- "buttons-block": "_buttons-block_1dgm4_1",
26
- "button-container": "_button-container_1dgm4_5",
27
- "modal-footer": "_modal-footer_1dgm4_14",
28
- "with-extra-node": "_with-extra-node_1dgm4_21",
29
- "size-small": "_size-small_1dgm4_25"
30
- }, c = m.bind(X), Y = ({
31
- footerNode: t,
32
- closeHandler: a,
33
- okButton: o,
34
- cancelButton: s,
35
- size: i
36
- }) => /* @__PURE__ */ l("div", { className: c("modal-footer", { "with-extra-node": t, [`size-${i}`]: i }), children: [
37
- t && t,
38
- /* @__PURE__ */ l("div", { className: c("buttons-block"), children: [
39
- s && /* @__PURE__ */ e("div", { className: c("button-container"), children: /* @__PURE__ */ e(
40
- b,
41
- {
42
- variant: "ghost",
43
- adjustWidthOn: i === "small" ? "parent" : "content",
44
- onClick: a,
45
- ...s
46
- }
47
- ) }),
48
- o && /* @__PURE__ */ e("div", { className: c("button-container"), children: /* @__PURE__ */ e(b, { adjustWidthOn: i === "small" ? "parent" : "content", ...o }) })
49
- ] })
50
- ] }), q = {
51
- "modal-header": "_modal-header_1d7tr_1",
52
- "modal-header-content": "_modal-header-content_1d7tr_11",
53
- "modal-title": "_modal-title_1d7tr_20",
54
- "close-modal-icon": "_close-modal-icon_1d7tr_28"
55
- }, r = m.bind(q), B = ({ title: t, onClose: a, headerNode: o }) => /* @__PURE__ */ l("div", { className: r("modal-header"), children: [
56
- /* @__PURE__ */ l("div", { className: r("modal-header-content"), children: [
57
- t && /* @__PURE__ */ e("span", { className: r("modal-title"), children: t }),
58
- o && o
59
- ] }),
60
- /* @__PURE__ */ e(j, { icon: "close", className: r("close-modal-icon"), onClick: a })
61
- ] }), J = "_modal_8a5l_1", Q = {
62
- modal: J,
63
- "overlay-default": "_overlay-default_8a5l_11",
64
- "overlay-light-cyan": "_overlay-light-cyan_8a5l_16",
65
- "scrolling-content": "_scrolling-content_8a5l_21",
66
- "modal-window": "_modal-window_8a5l_28",
67
- "size-default": "_size-default_8a5l_45",
68
- "size-small": "_size-small_8a5l_57",
69
- "size-large": "_size-large_8a5l_69"
70
- }, E = m.bind(Q), U = 0.9, V = 176, ce = ({
71
- title: t,
72
- headerNode: a,
73
- children: o,
74
- footerNode: s,
75
- okButton: i,
76
- cancelButton: H,
77
- className: M,
78
- size: _ = "default",
79
- onClose: z = () => {
80
- },
81
- overlay: g = "default",
82
- allowCloseOutside: N = !0
83
- }) => {
84
- const [k, p] = w(!1), [C, O] = w(0), n = R(null), v = K(), y = v.height, $ = y * U, h = (y - C) / 2, A = $ - V, d = () => {
85
- p(!1);
86
- }, x = (u) => {
87
- const { keyCode: S } = u;
88
- S === I.ESCAPE_KEY_CODE && d();
89
- };
90
- return f(() => {
91
- if (n && n.current) {
92
- const { clientHeight: u } = n.current;
93
- O(u);
94
- }
95
- }, [o, v]), f(() => (p(!0), n && n.current && n.current.focus(), document.addEventListener("keydown", x, !1), () => document.removeEventListener("keydown", x, !1)), []), D(n, N ? d : void 0), /* @__PURE__ */ e(L, { onExitComplete: z, children: k && /* @__PURE__ */ e("div", { className: E("modal", { [`overlay-${g}`]: g }), children: /* @__PURE__ */ l(
96
- W.div,
97
- {
98
- className: E("modal-window", { [`size-${_}`]: _ }, M),
99
- ref: n,
100
- tabIndex: 0,
101
- initial: { opacity: 0, marginTop: -h },
102
- animate: { opacity: 1, marginTop: h },
103
- exit: { opacity: 0, marginTop: -h },
104
- transition: { duration: 0.3 },
105
- children: [
106
- /* @__PURE__ */ e(B, { title: t, headerNode: a, onClose: d }),
107
- /* @__PURE__ */ e(T, { autoHeight: !0, autoHeightMax: A, hideTracksWhenNotNeeded: !0, children: /* @__PURE__ */ e(G, { children: o }) }),
108
- /* @__PURE__ */ e(
109
- Y,
110
- {
111
- size: _,
112
- footerNode: s,
113
- okButton: i,
114
- cancelButton: H,
115
- closeHandler: d
116
- }
117
- )
118
- ]
119
- },
120
- "modal-window"
121
- ) }) });
122
- };
1
+ import { M as s, a as n, c as b, b as c } from "./index-bb9b62ef.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-7fb84fde.js";
10
+ import "./baseIconButton-7bc53dec.js";
123
11
  export {
124
- ce as Modal,
125
- G as ModalContent,
126
- Y as ModalFooter,
127
- B as ModalHeader
12
+ s as Modal,
13
+ n as ModalContent,
14
+ b as ModalFooter,
15
+ c as ModalHeader
128
16
  };
@@ -0,0 +1,274 @@
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import { c as d } from "./bind-06a7ff84.js";
3
+ import * as u from "react";
4
+ import { useState as h } from "react";
5
+ import { Popover as C } from "./popover.js";
6
+ import { B as v } from "./button-7fb84fde.js";
7
+ import { F as T } from "./fieldText-d80b29ba.js";
8
+ import { B as m } from "./baseIconButton-7bc53dec.js";
9
+ const $ = (e) => /* @__PURE__ */ u.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ u.createElement("path", { d: "M12 13L4 8L12 3L12 13Z" })), y = (e) => /* @__PURE__ */ u.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ u.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 12L2 12L2 2.38498e-08L1.90798e-07 0L0 12ZM13 1L5 6L13 11L13 1Z" })), O = {
10
+ "item-counter": "_item-counter_4g6do_1"
11
+ }, B = d.bind(O), P = ({
12
+ activePage: e,
13
+ pageSize: n,
14
+ totalItems: o,
15
+ ofText: l,
16
+ itemsText: a
17
+ }) => {
18
+ const r = e * n, c = r - n;
19
+ return /* @__PURE__ */ i("div", { className: B("item-counter"), children: [
20
+ `${c + 1} - ${r < o ? r : o}`,
21
+ ` ${l} ${o} ${a}`
22
+ ] });
23
+ }, k = "_selected_183l8_32", I = {
24
+ "size-selector": "_size-selector_183l8_1",
25
+ "size-option": "_size-option_183l8_6",
26
+ selected: k
27
+ }, w = d.bind(I), E = ({
28
+ currentSize: e,
29
+ options: n,
30
+ onClickOption: o
31
+ }) => /* @__PURE__ */ s("div", { className: w("size-selector"), children: n.map((l) => /* @__PURE__ */ s(
32
+ "button",
33
+ {
34
+ className: w("size-option", { selected: l === e }),
35
+ onClick: () => {
36
+ o(l);
37
+ },
38
+ children: l
39
+ },
40
+ l
41
+ )) }), j = {
42
+ "page-size-control": "_page-size-control_gnurh_1",
43
+ "size-selector-button": "_size-selector-button_gnurh_10"
44
+ }, z = d.bind(j), V = ({
45
+ size: e,
46
+ sizeOptions: n,
47
+ perPageText: o,
48
+ changeSize: l
49
+ }) => {
50
+ const [a, r] = h(!1), c = (t) => {
51
+ l(t), r(!1);
52
+ };
53
+ return /* @__PURE__ */ i("div", { className: z("page-size-control"), children: [
54
+ /* @__PURE__ */ s(
55
+ C,
56
+ {
57
+ content: /* @__PURE__ */ s(E, { options: n, onClickOption: c, currentSize: e }),
58
+ placement: "top",
59
+ isOpened: a,
60
+ setIsOpened: r,
61
+ children: /* @__PURE__ */ s(v, { className: z("size-selector-button"), variant: "text", children: e })
62
+ }
63
+ ),
64
+ ` ${o}`
65
+ ] });
66
+ }, F = {
67
+ "page-selector": "_page-selector_rtho4_1",
68
+ "field-wrapper": "_field-wrapper_rtho4_6",
69
+ "apply-button": "_apply-button_rtho4_10"
70
+ }, b = d.bind(F), M = ({
71
+ totalPages: e,
72
+ pageText: n,
73
+ goActionText: o,
74
+ selectPage: l
75
+ }) => {
76
+ const [a, r] = h(""), [c, t] = h(!0), p = (A) => {
77
+ const f = A.target.value.replace(/\D/g, ""), N = Number(f), L = N > 0 && N <= e;
78
+ t(L), r(f);
79
+ }, _ = () => {
80
+ l(Number(a));
81
+ };
82
+ return /* @__PURE__ */ i("div", { className: b("page-selector"), children: [
83
+ /* @__PURE__ */ s("div", { className: b("field-wrapper"), children: /* @__PURE__ */ s(
84
+ T,
85
+ {
86
+ onChange: p,
87
+ value: a,
88
+ placeholder: n,
89
+ error: c ? "" : "Error",
90
+ touched: !0,
91
+ defaultWidth: !1,
92
+ displayError: !1
93
+ }
94
+ ) }),
95
+ /* @__PURE__ */ s(v, { onClick: _, disabled: !a || !c, className: b("apply-button"), children: o })
96
+ ] });
97
+ }, R = {
98
+ "active-page": "_active-page_14j0y_1",
99
+ "page-selector": "_page-selector_14j0y_10",
100
+ "page-selector-button": "_page-selector-button_14j0y_14"
101
+ }, x = d.bind(R), Z = ({
102
+ activePage: e,
103
+ totalPages: n,
104
+ pageText: o,
105
+ goToText: l,
106
+ goActionText: a,
107
+ changePage: r
108
+ }) => {
109
+ const [c, t] = h(!1), p = (_) => {
110
+ r(_), t(!1);
111
+ };
112
+ return /* @__PURE__ */ i("div", { className: x("active-page"), children: [
113
+ `${o} `,
114
+ /* @__PURE__ */ s(
115
+ C,
116
+ {
117
+ content: /* @__PURE__ */ s(
118
+ M,
119
+ {
120
+ pageText: o,
121
+ goActionText: a,
122
+ selectPage: p,
123
+ totalPages: n
124
+ }
125
+ ),
126
+ title: l,
127
+ placement: "top",
128
+ isOpened: c,
129
+ setIsOpened: t,
130
+ className: x("page-selector"),
131
+ children: /* @__PURE__ */ s(v, { className: x("page-selector-button"), variant: "text", children: e })
132
+ }
133
+ )
134
+ ] });
135
+ }, G = "_next_1p2t5_18", D = {
136
+ "page-navigator": "_page-navigator_1p2t5_1",
137
+ "page-buttons": "_page-buttons_1p2t5_6",
138
+ "page-button": "_page-button_1p2t5_6",
139
+ next: G
140
+ }, g = d.bind(D), W = ({
141
+ activePage: e,
142
+ changePage: n,
143
+ totalPages: o
144
+ }) => {
145
+ const l = () => {
146
+ n(1);
147
+ }, a = () => {
148
+ n(e - 1);
149
+ }, r = () => {
150
+ n(e + 1);
151
+ }, c = () => {
152
+ n(o);
153
+ };
154
+ return /* @__PURE__ */ i("div", { className: g("page-navigator"), children: [
155
+ /* @__PURE__ */ i("div", { className: g("page-buttons"), children: [
156
+ /* @__PURE__ */ s(
157
+ m,
158
+ {
159
+ className: g("page-button"),
160
+ onClick: l,
161
+ disabled: e === 1,
162
+ children: /* @__PURE__ */ s(y, {})
163
+ }
164
+ ),
165
+ /* @__PURE__ */ s(
166
+ m,
167
+ {
168
+ className: g("page-button"),
169
+ onClick: a,
170
+ disabled: e === 1,
171
+ children: /* @__PURE__ */ s($, {})
172
+ }
173
+ )
174
+ ] }),
175
+ /* @__PURE__ */ i("div", { className: g("page-buttons"), children: [
176
+ /* @__PURE__ */ s(
177
+ m,
178
+ {
179
+ className: g("page-button", "next"),
180
+ onClick: r,
181
+ disabled: e === o,
182
+ children: /* @__PURE__ */ s($, {})
183
+ }
184
+ ),
185
+ /* @__PURE__ */ s(
186
+ m,
187
+ {
188
+ className: g("page-button", "next"),
189
+ onClick: c,
190
+ disabled: e === o,
191
+ children: /* @__PURE__ */ s(y, {})
192
+ }
193
+ )
194
+ ] })
195
+ ] });
196
+ }, q = {
197
+ "page-controls": "_page-controls_thyf8_1",
198
+ "total-pages": "_total-pages_thyf8_8"
199
+ }, S = d.bind(q), H = ({
200
+ activePage: e,
201
+ changePage: n,
202
+ captions: o,
203
+ totalPages: l
204
+ }) => /* @__PURE__ */ i("div", { className: S("page-controls"), children: [
205
+ /* @__PURE__ */ s(
206
+ Z,
207
+ {
208
+ activePage: e,
209
+ totalPages: l,
210
+ changePage: n,
211
+ pageText: o.page,
212
+ goToText: o.goTo,
213
+ goActionText: o.goAction
214
+ }
215
+ ),
216
+ /* @__PURE__ */ s(W, { changePage: n, activePage: e, totalPages: l }),
217
+ /* @__PURE__ */ i("span", { className: S("total-pages"), children: [
218
+ `${o.of} `,
219
+ l
220
+ ] })
221
+ ] }), J = "_pagination_uykxy_1", K = {
222
+ pagination: J
223
+ }, Q = d.bind(K), ne = ({
224
+ activePage: e,
225
+ totalPages: n,
226
+ pageSize: o,
227
+ totalItems: l,
228
+ pageSizeOptions: a,
229
+ changePage: r,
230
+ changePageSize: c,
231
+ captions: t
232
+ }) => {
233
+ const p = (t == null ? void 0 : t.of) || "of", _ = (t == null ? void 0 : t.page) || "Page";
234
+ return /* @__PURE__ */ i("div", { className: Q("pagination"), children: [
235
+ /* @__PURE__ */ s(
236
+ P,
237
+ {
238
+ activePage: e,
239
+ pageSize: o,
240
+ totalItems: l,
241
+ ofText: p,
242
+ itemsText: (t == null ? void 0 : t.items) || "items"
243
+ }
244
+ ),
245
+ n > 1 && /* @__PURE__ */ s(
246
+ H,
247
+ {
248
+ activePage: e,
249
+ totalPages: n,
250
+ changePage: r,
251
+ captions: {
252
+ page: _,
253
+ of: p,
254
+ goTo: (t == null ? void 0 : t.goTo) || "Go to page",
255
+ goAction: (t == null ? void 0 : t.goAction) || "Go"
256
+ }
257
+ }
258
+ ),
259
+ /* @__PURE__ */ s(
260
+ V,
261
+ {
262
+ size: o,
263
+ sizeOptions: a,
264
+ changeSize: c,
265
+ perPageText: (t == null ? void 0 : t.perPage) || "per page"
266
+ }
267
+ )
268
+ ] });
269
+ };
270
+ export {
271
+ ne as P,
272
+ $ as S,
273
+ y as a
274
+ };
@@ -0,0 +1,13 @@
1
+ import { P as t } from "./pagination-a36bc786.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-7fb84fde.js";
8
+ import "./fieldText-d80b29ba.js";
9
+ import "./baseIconButton-7bc53dec.js";
10
+ export {
11
+ t as Pagination,
12
+ t as default
13
+ };