@reportportal/ui-kit 0.0.1-alpha.46 → 0.0.1-alpha.47

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 (62) hide show
  1. package/dist/arrowUp-4a5caee7.js +6 -0
  2. package/dist/clear-53660571.js +5 -0
  3. package/dist/close-4b33d7c1.js +5 -0
  4. package/dist/common/utils/index.d.ts +1 -0
  5. package/dist/common/utils/isPositiveInteger.d.ts +1 -0
  6. package/dist/components/fieldText/fieldText.d.ts +2 -0
  7. package/dist/components/icons/index.d.ts +0 -1
  8. package/dist/components/index.d.ts +1 -3
  9. package/dist/{datePicker-68379fe1.js → datePicker-81d77983.js} +4 -5
  10. package/dist/datePicker.js +7 -4
  11. package/dist/dropdown-0260bb66.js +5 -0
  12. package/dist/dropdown-5225df5e.js +263 -0
  13. package/dist/dropdown.js +2 -1
  14. package/dist/error-4f493850.js +7 -0
  15. package/dist/fieldNumber-6a5fdd15.js +125 -0
  16. package/dist/fieldNumber.js +2 -1
  17. package/dist/fieldText-df070a3c.js +135 -0
  18. package/dist/fieldText.js +3 -2
  19. package/dist/icons.js +32 -0
  20. package/dist/index.js +72 -114
  21. package/dist/minus-660ea0d6.js +6 -0
  22. package/dist/modal.js +144 -14
  23. package/dist/pagination-38898dc9.js +345 -0
  24. package/dist/pagination.js +5 -2
  25. package/dist/prevChapter-ebd5a3a7.js +6 -0
  26. package/dist/spinLoader-c4a53718.js +11 -0
  27. package/dist/spinLoader.js +7 -0
  28. package/dist/style.css +1 -1
  29. package/dist/systemAlert.js +51 -0
  30. package/dist/table-32fc8c70.js +144 -0
  31. package/dist/table.js +2 -2
  32. package/package.json +1 -1
  33. package/dist/components/dataPicker2/dataPicker2/datePicker.d.ts +0 -24
  34. package/dist/components/dataPicker2/dataPicker2/header/datePickerHeader.d.ts +0 -15
  35. package/dist/components/dataPicker2/dataPicker2/header/index.d.ts +0 -3
  36. package/dist/components/dataPicker2/dataPicker2/index.d.ts +0 -3
  37. package/dist/components/dataPicker2/dataPicker2/utils.d.ts +0 -3
  38. package/dist/components/date2/date2.d.ts +0 -24
  39. package/dist/components/date2/index.d.ts +0 -3
  40. package/dist/components/datePicker1/datePicker.d.ts +0 -24
  41. package/dist/components/datePicker1/header/datePickerHeader.d.ts +0 -15
  42. package/dist/components/datePicker1/header/index.d.ts +0 -3
  43. package/dist/components/datePicker1/index.d.ts +0 -3
  44. package/dist/components/datePicker1/utils.d.ts +0 -3
  45. package/dist/components/reactDatePicker/index.d.ts +0 -3
  46. package/dist/components/reactDatePicker/reactDatePicker.d.ts +0 -2
  47. package/dist/components/reactDatePicker2/index.d.ts +0 -3
  48. package/dist/components/reactDatePicker2/reactDatePicker2.d.ts +0 -2
  49. package/dist/date2-9273411e.js +0 -46
  50. package/dist/date2.js +0 -7
  51. package/dist/datePicker-89394dc8.js +0 -194
  52. package/dist/datePicker1.js +0 -19
  53. package/dist/dropdown-b9c6dc2f.js +0 -264
  54. package/dist/fieldNumber-1f286b40.js +0 -127
  55. package/dist/fieldText-65e4c614.js +0 -134
  56. package/dist/index-54e3bfc2.js +0 -147
  57. package/dist/pagination-4ae395bd.js +0 -347
  58. package/dist/reactDatePicker2-a31b070e.js +0 -5
  59. package/dist/reactDatePicker2.js +0 -6
  60. package/dist/table-9bf4ddab.js +0 -147
  61. /package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +0 -0
  62. /package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +0 -0
@@ -0,0 +1,135 @@
1
+ import { jsx as e, jsxs as c, Fragment as F } from "react/jsx-runtime";
2
+ import { forwardRef as Q, useRef as T, useState as U } from "react";
3
+ import { c as V } from "./bind-06a7ff84.js";
4
+ import { S as W } from "./clear-53660571.js";
5
+ import { S as X } from "./spinLoader-c4a53718.js";
6
+ const Y = "_collapsed_px1y8_13", Z = "_label_px1y8_21", $ = "_asterisk_px1y8_30", q = "_disabled_px1y8_36", v = "_field_px1y8_41", nn = "_placeholder_px1y8_62", en = "_error_px1y8_69", tn = "_touched_px1y8_69", sn = "_input_px1y8_84", cn = "_icon_px1y8_1", an = "_text_px1y8_175", on = {
7
+ "icon-container": "_icon-container_px1y8_1",
8
+ "icon-container-end": "_icon-container-end_px1y8_1",
9
+ "icon-container-start": "_icon-container-start_px1y8_1",
10
+ collapsed: Y,
11
+ label: Z,
12
+ asterisk: $,
13
+ disabled: q,
14
+ field: v,
15
+ "default-width": "_default-width_px1y8_53",
16
+ placeholder: nn,
17
+ error: en,
18
+ touched: tn,
19
+ "input-container": "_input-container_px1y8_84",
20
+ input: sn,
21
+ icon: cn,
22
+ "start-icon": "_start-icon_px1y8_131",
23
+ "clear-icon": "_clear-icon_px1y8_132",
24
+ "additional-content": "_additional-content_px1y8_168",
25
+ text: an,
26
+ "max-length-display": "_max-length-display_px1y8_176",
27
+ "error-text": "_error-text_px1y8_193",
28
+ "help-text": "_help-text_px1y8_197"
29
+ }, rn = (t) => typeof t == "number" && Number.isFinite(t) && Number.isInteger(t) && t > 0, n = V.bind(on), mn = Q(
30
+ ({
31
+ value: t = "",
32
+ className: _,
33
+ classNameHelpText: w,
34
+ error: o,
35
+ placeholder: d,
36
+ disabled: a = !1,
37
+ onChange: S,
38
+ touched: x = !1,
39
+ title: R,
40
+ label: i,
41
+ helpText: r,
42
+ defaultWidth: j = !0,
43
+ startIcon: m,
44
+ endIcon: u,
45
+ clearable: B = !1,
46
+ onClear: h,
47
+ isRequired: f = !1,
48
+ hasDoubleMessage: C = !1,
49
+ type: E = "text",
50
+ displayError: H = !0,
51
+ collapsible: I = !1,
52
+ loading: L = !1,
53
+ maxLengthDisplay: y,
54
+ onFocus: M = () => {
55
+ },
56
+ onBlur: P = () => {
57
+ },
58
+ ...z
59
+ }, A) => {
60
+ const D = T(null), l = A || D, [N, b] = U(!1), G = rn(y), J = (s) => {
61
+ b(!0), M(s);
62
+ }, K = (s) => {
63
+ b(!1), P(s);
64
+ }, O = () => {
65
+ var s;
66
+ h && (h(t), (s = l.current) == null || s.focus());
67
+ }, g = H && o && x, k = /* @__PURE__ */ e("span", { className: n("text", "help-text", w), children: r });
68
+ return /* @__PURE__ */ c(F, { children: [
69
+ i && /* @__PURE__ */ c("span", { className: n("label", { disabled: a }), children: [
70
+ i,
71
+ f && /* @__PURE__ */ e("span", { className: n("asterisk"), children: "*" })
72
+ ] }),
73
+ /* @__PURE__ */ c(
74
+ "div",
75
+ {
76
+ className: n("field", _, {
77
+ error: o,
78
+ touched: x,
79
+ disabled: a,
80
+ "default-width": j,
81
+ collapsed: I && !N && !t
82
+ }),
83
+ title: R,
84
+ children: [
85
+ L ? /* @__PURE__ */ e(X, {}) : m && /* @__PURE__ */ e(
86
+ "span",
87
+ {
88
+ className: n("icon-container-start"),
89
+ onClick: () => {
90
+ var p;
91
+ (p = l.current) == null || p.focus();
92
+ },
93
+ children: /* @__PURE__ */ e("span", { className: n("icon", { "start-icon": !N }), children: m })
94
+ }
95
+ ),
96
+ /* @__PURE__ */ c("span", { className: n("input-container"), children: [
97
+ /* @__PURE__ */ e(
98
+ "input",
99
+ {
100
+ ref: l,
101
+ type: E,
102
+ className: n("input"),
103
+ value: t,
104
+ disabled: a,
105
+ onChange: S,
106
+ onFocus: J,
107
+ onBlur: K,
108
+ ...z
109
+ }
110
+ ),
111
+ d && !t && /* @__PURE__ */ c("span", { className: n("placeholder"), children: [
112
+ d,
113
+ f && !i && /* @__PURE__ */ e("span", { className: n("asterisk") })
114
+ ] })
115
+ ] }),
116
+ G && /* @__PURE__ */ c("span", { className: n("max-length-display"), children: [
117
+ t.length,
118
+ "/",
119
+ y
120
+ ] }),
121
+ u && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: u }) }),
122
+ B && t.length > 0 && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("button", { type: "button", className: n("clear-icon", { disabled: a }), onClick: O, children: /* @__PURE__ */ e(W, {}) }) })
123
+ ]
124
+ }
125
+ ),
126
+ (g || r) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: a }), children: g ? /* @__PURE__ */ c(F, { children: [
127
+ /* @__PURE__ */ e("span", { className: n("text", "error-text"), children: o }),
128
+ C && k
129
+ ] }) : r && k })
130
+ ] });
131
+ }
132
+ );
133
+ export {
134
+ mn as F
135
+ };
package/dist/fieldText.js CHANGED
@@ -1,8 +1,9 @@
1
- import { F as o } from "./fieldText-65e4c614.js";
1
+ import { F as o } from "./fieldText-df070a3c.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
5
- import "./baseIconButton-b6adc843.js";
5
+ import "./clear-53660571.js";
6
+ import "./spinLoader-c4a53718.js";
6
7
  export {
7
8
  o as FieldText,
8
9
  o as default
package/dist/icons.js ADDED
@@ -0,0 +1,32 @@
1
+ import { S as c } from "./clear-53660571.js";
2
+ import { S as L } from "./close-4b33d7c1.js";
3
+ import { a as h, S as v } from "./minus-660ea0d6.js";
4
+ import * as e from "react";
5
+ import { S as g } from "./dropdown-0260bb66.js";
6
+ import { a as f, S as x } from "./prevChapter-ebd5a3a7.js";
7
+ import { S as M, a as E } from "./arrowUp-4a5caee7.js";
8
+ import { S as B, a as u } from "./calendar-f154eb78.js";
9
+ import { b as V, S as H, a as Z } from "./error-4f493850.js";
10
+ const 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", { 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" })), l = (C) => /* @__PURE__ */ e.createElement("svg", { width: 14, height: 3, viewBox: "0 0 14 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...C }, /* @__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" })), o = (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: "M13 7C13 8.47663 12.4666 9.82867 11.5819 10.874L12.3288 11.6208C12.663 11.5307 13.0348 11.6168 13.2971 11.8792L14.7113 13.2934C15.1019 13.6839 15.1019 14.3171 14.7113 14.7076C14.3208 15.0981 13.6877 15.0981 13.2971 14.7076L11.8829 13.2934C11.622 13.0325 11.5354 12.6632 11.6231 12.3304L10.8743 11.5816C9.829 12.4665 8.47681 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7ZM2.00071 7C2.00071 9.76103 4.23897 11.9993 7 11.9993C9.76103 11.9993 11.9993 9.76103 11.9993 7C11.9993 4.23897 9.76103 2.00071 7 2.00071C4.23897 2.00071 2.00071 4.23897 2.00071 7Z", fill: "#CFCFCF" })), n = (C) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 15, height: 14, viewBox: "0 0 15 14", fill: "none", ...C }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.2817 1.08596L8.58993 6.67232C8.43153 6.85569 8.33732 7.08554 8.33732 7.33504V12.9126L6.66254 12V7.69689C6.66254 7.22695 6.49186 6.76969 6.17611 6.39374L1.71829 1.08596L13.2817 1.08596ZM13.2817 0H1.71829C0.716181 0 0.144162 1.02163 0.745424 1.73753L5.20324 7.04531C5.36112 7.23329 5.44646 7.46192 5.44646 7.69689V12C5.44646 12.4113 5.7067 12.7874 6.11869 12.9713L7.79347 13.884C8.60204 14.245 9.5534 13.7199 9.5534 12.9126V7.33504L14.2546 1.73753C14.8558 1.02163 14.2838 0 13.2817 0Z", fill: "#A2AAB5" })), r = (C) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", ...C }, /* @__PURE__ */ e.createElement("path", { d: "M6.82255 13.5148L6.84059 13.5228L6.85794 13.5323L8.51335 14.4344C8.76171 14.5391 9.02975 14.512 9.23505 14.3987C9.44387 14.2834 9.5534 14.103 9.5534 13.9126V8.33504V8.15292L9.67052 8.01347L14.3717 2.41597C14.3717 2.41597 14.3717 2.41597 14.3717 2.41597C14.5301 2.22732 14.5313 2.01991 14.4331 1.84458C14.3308 1.66184 14.1067 1.5 13.7817 1.5H2.21829C1.89331 1.5 1.66918 1.66184 1.56686 1.84457C1.46869 2.01991 1.46986 2.22732 1.6283 2.41597L6.08612 7.72374C6.31597 7.99742 6.44646 8.3387 6.44646 8.69689V13C6.44646 13.1908 6.56846 13.4013 6.82255 13.5148Z", fill: "#009DBB", stroke: "#009DBB" })), a = (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", { d: "M8.35343 1.64645C8.23928 1.5323 8.08367 1.48488 7.93508 1.50419C7.84679 1.51567 7.76098 1.5507 7.68781 1.60929C7.67171 1.62216 7.65643 1.636 7.64204 1.65073L4.64633 4.64645C4.45106 4.84171 4.45106 5.15829 4.64633 5.35355C4.84159 5.54882 5.15817 5.54882 5.35343 5.35355L7.49979 3.2072L7.49979 9.99996C7.49979 10.2761 7.72365 10.5 7.99979 10.5C8.27593 10.5 8.49979 10.2761 8.49979 9.99996L8.49979 3.20701L10.6463 5.35355C10.8416 5.54881 11.1582 5.54881 11.3534 5.35355C11.5487 5.15829 11.5487 4.84171 11.3534 4.64644L8.35343 1.64645Z", fill: "#00829B" }), /* @__PURE__ */ e.createElement("path", { d: "M2 9.99996C2 9.72381 1.77614 9.49996 1.5 9.49996C1.22386 9.49996 1 9.72381 1 9.99996V13.1666C1 13.6529 1.19315 14.1192 1.53697 14.463C1.88079 14.8068 2.3471 15 2.83333 15H13.1667C13.6529 15 14.1192 14.8068 14.463 14.463C14.8068 14.1192 15 13.6529 15 13.1666V9.99996C15 9.72381 14.7761 9.49996 14.5 9.49996C14.2239 9.49996 14 9.72381 14 9.99996V13.1666C14 13.3876 13.9122 13.5996 13.7559 13.7559C13.5996 13.9122 13.3877 14 13.1667 14H2.83333C2.61232 14 2.40036 13.9122 2.24408 13.7559C2.0878 13.5996 2 13.3876 2 13.1666V9.99996Z", fill: "#00829B" }));
11
+ export {
12
+ M as ArrowDownIcon,
13
+ E as ArrowUpIcon,
14
+ B as CalendarArrowIcon,
15
+ u as CalendarIcon,
16
+ c as ClearIcon,
17
+ L as CloseIcon,
18
+ t as DeleteIcon,
19
+ g as DropdownIcon,
20
+ V as ErrorIcon,
21
+ a as ExportIcon,
22
+ r as FilterFilledIcon,
23
+ n as FilterOutlineIcon,
24
+ H as InfoIcon,
25
+ l as MeatballMenuIcon,
26
+ h as MinusIcon,
27
+ v as PlusIcon,
28
+ f as PrevChapterIcon,
29
+ x as PrevPageIcon,
30
+ o as SearchIcon,
31
+ Z as SuccessIcon
32
+ };
package/dist/index.js CHANGED
@@ -1,30 +1,35 @@
1
- import { B as K } from "./button-33c88abf.js";
2
- import { C as W } from "./checkbox-9a6c7ce1.js";
3
- import { S as Y } from "./systemMessage-1ced6079.js";
4
- import { a as e1, F as t1, S as o1 } from "./fieldText-65e4c614.js";
5
- import { T as l1 } from "./themeProvider-46c2be7b.js";
6
- import { S as d } from "./index-54e3bfc2.js";
7
- import { M as n1 } from "./index-54e3bfc2.js";
8
- import { D as C1, S as i1 } from "./dropdown-b9c6dc2f.js";
9
- import { T as m1 } from "./toggle-1a3aacb5.js";
10
- import { F as d1, a as w1, S as f1 } from "./fieldNumber-1f286b40.js";
11
- import { B as v1 } from "./bubblesLoader-a7e709d4.js";
12
- import { F as L1 } from "./fieldTextFlex-5bddf46a.js";
13
- import { R as u1 } from "./radio-bccc84f2.js";
14
- import { Tooltip as M1 } from "./tooltip.js";
15
- import { Popover as I1 } from "./popover.js";
16
- import { P as S1, a as _1, S as Z1 } from "./pagination-4ae395bd.js";
17
- import { S as F1, a as A1, T as H1 } from "./table-9bf4ddab.js";
18
- import { D as b1 } from "./datePicker-89394dc8.js";
19
- import { D as N1 } from "./datePicker-68379fe1.js";
20
- import { D as O1 } from "./date2-9273411e.js";
21
- import { R as U1 } from "./reactDatePicker2-a31b070e.js";
22
- import { jsxs as w, jsx as o } from "react/jsx-runtime";
23
- import * as t from "react";
24
- import { useEffect as f } from "react";
25
- import { c as h } from "./bind-06a7ff84.js";
26
- import { B as y1 } from "./baseIconButton-b6adc843.js";
27
- import { S as z1, a as G1 } from "./calendar-f154eb78.js";
1
+ import { B as l } from "./button-33c88abf.js";
2
+ import { B as S } from "./baseIconButton-b6adc843.js";
3
+ import { C as F } from "./checkbox-9a6c7ce1.js";
4
+ import { S as P } from "./systemMessage-1ced6079.js";
5
+ import { F as b } from "./fieldText-df070a3c.js";
6
+ import { T as C } from "./themeProvider-46c2be7b.js";
7
+ import { Modal as w } from "./modal.js";
8
+ import { D as M } from "./dropdown-5225df5e.js";
9
+ import { T as v } from "./toggle-1a3aacb5.js";
10
+ import { F as k } from "./fieldNumber-6a5fdd15.js";
11
+ import { B as E } from "./bubblesLoader-a7e709d4.js";
12
+ import { S as R } from "./spinLoader-c4a53718.js";
13
+ import { F as O } from "./fieldTextFlex-5bddf46a.js";
14
+ import { R as j } from "./radio-bccc84f2.js";
15
+ import { Tooltip as z } from "./tooltip.js";
16
+ import { Popover as H } from "./popover.js";
17
+ import { P as K } from "./pagination-38898dc9.js";
18
+ import { T as V } from "./table-32fc8c70.js";
19
+ import { D as X } from "./datePicker-81d77983.js";
20
+ import { SystemAlert as Z } from "./systemAlert.js";
21
+ import { S as $ } from "./clear-53660571.js";
22
+ import { S as ro } from "./close-4b33d7c1.js";
23
+ import { a as to, S as ao } from "./minus-660ea0d6.js";
24
+ import { DeleteIcon as mo, ExportIcon as so, FilterFilledIcon as no, FilterOutlineIcon as xo, MeatballMenuIcon as fo, SearchIcon as co } from "./icons.js";
25
+ import { S as lo } from "./dropdown-0260bb66.js";
26
+ import { a as So, S as Fo } from "./prevChapter-ebd5a3a7.js";
27
+ import { S as Po, a as To } from "./arrowUp-4a5caee7.js";
28
+ import { S as Bo, a as Co } from "./calendar-f154eb78.js";
29
+ import { b as wo, S as go, a as Mo } from "./error-4f493850.js";
30
+ import "react/jsx-runtime";
31
+ import "react";
32
+ import "./bind-06a7ff84.js";
28
33
  import "./keyCodes-f63c0e11.js";
29
34
  import "rc-scrollbars";
30
35
  import "framer-motion";
@@ -33,92 +38,45 @@ import "@floating-ui/react-dom";
33
38
  import "downshift";
34
39
  import "@floating-ui/react";
35
40
  import "react-datepicker";
36
- const O = (e) => /* @__PURE__ */ t.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.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__ */ t.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" })), k = (e) => /* @__PURE__ */ t.createElement("svg", { width: 14, height: 3, viewBox: "0 0 14 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.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" })), U = (e) => /* @__PURE__ */ t.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13 7C13 8.47663 12.4666 9.82867 11.5819 10.874L12.3288 11.6208C12.663 11.5307 13.0348 11.6168 13.2971 11.8792L14.7113 13.2934C15.1019 13.6839 15.1019 14.3171 14.7113 14.7076C14.3208 15.0981 13.6877 15.0981 13.2971 14.7076L11.8829 13.2934C11.622 13.0325 11.5354 12.6632 11.6231 12.3304L10.8743 11.5816C9.829 12.4665 8.47681 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7ZM2.00071 7C2.00071 9.76103 4.23897 11.9993 7 11.9993C9.76103 11.9993 11.9993 9.76103 11.9993 7C11.9993 4.23897 9.76103 2.00071 7 2.00071C4.23897 2.00071 2.00071 4.23897 2.00071 7Z", fill: "#CFCFCF" })), j = (e) => /* @__PURE__ */ t.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 15, height: 14, viewBox: "0 0 15 14", fill: "none", ...e }, /* @__PURE__ */ t.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.2817 1.08596L8.58993 6.67232C8.43153 6.85569 8.33732 7.08554 8.33732 7.33504V12.9126L6.66254 12V7.69689C6.66254 7.22695 6.49186 6.76969 6.17611 6.39374L1.71829 1.08596L13.2817 1.08596ZM13.2817 0H1.71829C0.716181 0 0.144162 1.02163 0.745424 1.73753L5.20324 7.04531C5.36112 7.23329 5.44646 7.46192 5.44646 7.69689V12C5.44646 12.4113 5.7067 12.7874 6.11869 12.9713L7.79347 13.884C8.60204 14.245 9.5534 13.7199 9.5534 12.9126V7.33504L14.2546 1.73753C14.8558 1.02163 14.2838 0 13.2817 0Z", fill: "#A2AAB5" })), y = (e) => /* @__PURE__ */ t.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", ...e }, /* @__PURE__ */ t.createElement("path", { d: "M6.82255 13.5148L6.84059 13.5228L6.85794 13.5323L8.51335 14.4344C8.76171 14.5391 9.02975 14.512 9.23505 14.3987C9.44387 14.2834 9.5534 14.103 9.5534 13.9126V8.33504V8.15292L9.67052 8.01347L14.3717 2.41597C14.3717 2.41597 14.3717 2.41597 14.3717 2.41597C14.5301 2.22732 14.5313 2.01991 14.4331 1.84458C14.3308 1.66184 14.1067 1.5 13.7817 1.5H2.21829C1.89331 1.5 1.66918 1.66184 1.56686 1.84457C1.46869 2.01991 1.46986 2.22732 1.6283 2.41597L6.08612 7.72374C6.31597 7.99742 6.44646 8.3387 6.44646 8.69689V13C6.44646 13.1908 6.56846 13.4013 6.82255 13.5148Z", fill: "#009DBB", stroke: "#009DBB" })), v = (e) => /* @__PURE__ */ t.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", ...e }, /* @__PURE__ */ t.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.2 9.99999C17.2 13.9764 13.9765 17.2 10 17.2C6.0236 17.2 2.80005 13.9764 2.80005 9.99999C2.80005 6.02354 6.0236 2.79999 10 2.79999C13.9765 2.79999 17.2 6.02354 17.2 9.99999ZM11 6.59999C11 7.15227 10.5523 7.59999 10 7.59999C9.44776 7.59999 9.00005 7.15227 9.00005 6.59999C9.00005 6.0477 9.44776 5.59999 10 5.59999C10.5523 5.59999 11 6.0477 11 6.59999ZM10.8 13.6C10.8 14.0418 10.4419 14.4 10 14.4C9.55822 14.4 9.20005 14.0418 9.20005 13.6L9.20005 9.19999C9.20005 8.75816 9.55822 8.39999 10 8.39999C10.4419 8.39999 10.8 8.75816 10.8 9.19999V13.6Z", fill: "white" })), g = (e) => /* @__PURE__ */ t.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", ...e }, /* @__PURE__ */ t.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.2 9.99999C17.2 13.9764 13.9765 17.2 10 17.2C6.0236 17.2 2.80005 13.9764 2.80005 9.99999C2.80005 6.02354 6.0236 2.79999 10 2.79999C13.9765 2.79999 17.2 6.02354 17.2 9.99999ZM13.8146 8.11216C14.0975 7.77273 14.0516 7.26828 13.7122 6.98543C13.3728 6.70258 12.8683 6.74844 12.5855 7.08786L9.14629 11.2149L7.36573 9.43432C7.05331 9.1219 6.54678 9.1219 6.23436 9.43432C5.92194 9.74674 5.92194 10.2533 6.23436 10.5657L8.63436 12.9657C8.7933 13.1246 9.01176 13.2094 9.2363 13.1992C9.46084 13.189 9.67073 13.0848 9.81463 12.9122L13.8146 8.11216Z", fill: "white" })), L = (e) => /* @__PURE__ */ t.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", ...e }, /* @__PURE__ */ t.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.0449 3.41275C10.5805 2.59573 9.41952 2.59573 8.95513 3.41275L2.16344 15.3617C1.69905 16.1787 2.27954 17.2 3.20832 17.2H16.7917C17.7205 17.2 18.3009 16.1787 17.8366 15.3617L11.0449 3.41275ZM10.9325 6.41163C10.9391 6.18625 10.7582 5.99999 10.5327 5.99999H9.46161C9.236 5.99999 9.05502 6.18647 9.06179 6.41198L9.24768 12.612C9.25416 12.8281 9.43125 13 9.6475 13H10.3523C10.5686 13 10.7458 12.8279 10.7521 12.6116L10.9325 6.41163ZM10 16C10.5523 16 11 15.5523 11 15C11 14.4477 10.5523 14 10 14C9.44771 14 9 14.4477 9 15C9 15.5523 9.44771 16 10 16Z", fill: "white" })), q = (e) => /* @__PURE__ */ t.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("path", { d: "M8.35343 1.64645C8.23928 1.5323 8.08367 1.48488 7.93508 1.50419C7.84679 1.51567 7.76098 1.5507 7.68781 1.60929C7.67171 1.62216 7.65643 1.636 7.64204 1.65073L4.64633 4.64645C4.45106 4.84171 4.45106 5.15829 4.64633 5.35355C4.84159 5.54882 5.15817 5.54882 5.35343 5.35355L7.49979 3.2072L7.49979 9.99996C7.49979 10.2761 7.72365 10.5 7.99979 10.5C8.27593 10.5 8.49979 10.2761 8.49979 9.99996L8.49979 3.20701L10.6463 5.35355C10.8416 5.54881 11.1582 5.54881 11.3534 5.35355C11.5487 5.15829 11.5487 4.84171 11.3534 4.64644L8.35343 1.64645Z", fill: "#00829B" }), /* @__PURE__ */ t.createElement("path", { d: "M2 9.99996C2 9.72381 1.77614 9.49996 1.5 9.49996C1.22386 9.49996 1 9.72381 1 9.99996V13.1666C1 13.6529 1.19315 14.1192 1.53697 14.463C1.88079 14.8068 2.3471 15 2.83333 15H13.1667C13.6529 15 14.1192 14.8068 14.463 14.463C14.8068 14.1192 15 13.6529 15 13.1666V9.99996C15 9.72381 14.7761 9.49996 14.5 9.49996C14.2239 9.49996 14 9.72381 14 9.99996V13.1666C14 13.3876 13.9122 13.5996 13.7559 13.7559C13.5996 13.9122 13.3877 14 13.1667 14H2.83333C2.61232 14 2.40036 13.9122 2.24408 13.7559C2.0878 13.5996 2 13.3876 2 13.1666V9.99996Z", fill: "#00829B" }));
37
- var n = /* @__PURE__ */ ((e) => (e.INFO = "info", e.SUCCESS = "success", e.ERROR = "error", e))(n || {});
38
- const x = "_error_14lm6_11", u = "_success_14lm6_14", E = "_info_14lm6_17", M = "_title_14lm6_32", R = {
39
- "system-alert": "_system-alert_14lm6_1",
40
- error: x,
41
- success: u,
42
- info: E,
43
- "icon-wrapper": "_icon-wrapper_14lm6_20",
44
- "content-wrapper": "_content-wrapper_14lm6_26",
45
- title: M,
46
- "close-button": "_close-button_14lm6_45"
47
- }, r = h.bind(R), I = 7e3, B = 4e3, z = ({
48
- title: e,
49
- onClose: l,
50
- icon: C = null,
51
- type: s = n.INFO,
52
- duration: i = B,
53
- className: c
54
- }) => {
55
- const a = s === n.ERROR ? I : i;
56
- f(() => {
57
- const p = setTimeout(() => {
58
- l();
59
- }, a);
60
- return () => clearTimeout(p);
61
- }, [a, l]);
62
- const m = () => {
63
- switch (s) {
64
- case "info":
65
- return /* @__PURE__ */ o(v, {});
66
- case "success":
67
- return /* @__PURE__ */ o(g, {});
68
- case "error":
69
- return /* @__PURE__ */ o(L, {});
70
- default:
71
- return C;
72
- }
73
- };
74
- return /* @__PURE__ */ w("div", { className: r("system-alert", s, c), children: [
75
- /* @__PURE__ */ o("div", { className: r("icon-wrapper"), children: m() }),
76
- /* @__PURE__ */ o("div", { className: r("content-wrapper"), children: /* @__PURE__ */ o("h2", { className: r("title"), children: e }) }),
77
- /* @__PURE__ */ o("button", { className: r("close-button"), onClick: l, "aria-label": "close system alert", children: /* @__PURE__ */ o(d, {}) })
78
- ] });
79
- };
80
41
  export {
81
- F1 as ArrowDownIcon,
82
- A1 as ArrowUpIcon,
83
- y1 as BaseIconButton,
84
- v1 as BubblesLoader,
85
- K as Button,
86
- z1 as CalendarArrowIcon,
87
- G1 as CalendarIcon,
88
- W as Checkbox,
89
- e1 as ClearIcon,
90
- d as CloseIcon,
91
- O1 as Date2,
92
- b1 as DatePicker,
93
- N1 as DatePicker1,
94
- O as DeleteIcon,
95
- C1 as Dropdown,
96
- i1 as DropdownIcon,
97
- L as ErrorIcon,
98
- q as ExportIcon,
99
- d1 as FieldNumber,
100
- t1 as FieldText,
101
- L1 as FieldTextFlex,
102
- y as FilterFilledIcon,
103
- j as FilterOutlineIcon,
104
- v as InfoIcon,
105
- k as MeatballMenuIcon,
106
- w1 as MinusIcon,
107
- n1 as Modal,
108
- S1 as Pagination,
109
- f1 as PlusIcon,
110
- I1 as Popover,
111
- _1 as PrevChapterIcon,
112
- Z1 as PrevPageIcon,
113
- u1 as Radio,
114
- U1 as ReactDatePicker2,
115
- U as SearchIcon,
116
- o1 as SpinLoader,
117
- g as SuccessIcon,
118
- z as SystemAlert,
119
- Y as SystemMessage,
120
- H1 as Table,
121
- l1 as ThemeProvider,
122
- m1 as Toggle,
123
- M1 as Tooltip
42
+ Po as ArrowDownIcon,
43
+ To as ArrowUpIcon,
44
+ S as BaseIconButton,
45
+ E as BubblesLoader,
46
+ l as Button,
47
+ Bo as CalendarArrowIcon,
48
+ Co as CalendarIcon,
49
+ F as Checkbox,
50
+ $ as ClearIcon,
51
+ ro as CloseIcon,
52
+ X as DatePicker,
53
+ mo as DeleteIcon,
54
+ M as Dropdown,
55
+ lo as DropdownIcon,
56
+ wo as ErrorIcon,
57
+ so as ExportIcon,
58
+ k as FieldNumber,
59
+ b as FieldText,
60
+ O as FieldTextFlex,
61
+ no as FilterFilledIcon,
62
+ xo as FilterOutlineIcon,
63
+ go as InfoIcon,
64
+ fo as MeatballMenuIcon,
65
+ to as MinusIcon,
66
+ w as Modal,
67
+ K as Pagination,
68
+ ao as PlusIcon,
69
+ H as Popover,
70
+ So as PrevChapterIcon,
71
+ Fo as PrevPageIcon,
72
+ j as Radio,
73
+ co as SearchIcon,
74
+ R as SpinLoader,
75
+ Mo as SuccessIcon,
76
+ Z as SystemAlert,
77
+ P as SystemMessage,
78
+ V as Table,
79
+ C as ThemeProvider,
80
+ v as Toggle,
81
+ z as Tooltip
124
82
  };
@@ -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: "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" })), 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: "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" }));
3
+ export {
4
+ l as S,
5
+ C as a
6
+ };
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-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";
1
+ import { jsx as e, jsxs as c, Fragment as W } from "react/jsx-runtime";
2
+ import { useState as b, useEffect as g, useRef as j } from "react";
3
+ import { Scrollbars as G } from "rc-scrollbars";
4
+ import { AnimatePresence as K, motion as P } from "framer-motion";
5
+ import { c as u } from "./bind-06a7ff84.js";
6
+ import { u as B } from "./useOnClickOutside-c332f7d3.js";
7
+ import { K as q } from "./keyCodes-f63c0e11.js";
8
+ import { B as N } from "./button-33c88abf.js";
9
+ import { B as Y } from "./baseIconButton-b6adc843.js";
10
+ import { S as F } from "./close-4b33d7c1.js";
11
+ const U = () => {
12
+ const [o, n] = b({ width: 0, height: 0 });
13
+ return g(() => {
14
+ const l = () => {
15
+ n({
16
+ width: window.innerWidth,
17
+ height: window.innerHeight
18
+ });
19
+ };
20
+ return window.addEventListener("resize", l), l(), () => window.removeEventListener("resize", l);
21
+ }, []), o;
22
+ }, X = "_scrollable_qziry_12", J = {
23
+ "modal-content": "_modal-content_qziry_1",
24
+ scrollable: X
25
+ }, Q = u.bind(J), O = ({ scrollable: o = !1, children: n }) => /* @__PURE__ */ e("div", { className: Q("modal-content", { scrollable: o }), children: n }), V = {
26
+ "buttons-block": "_buttons-block_1dgm4_1",
27
+ "button-container": "_button-container_1dgm4_5",
28
+ "modal-footer": "_modal-footer_1dgm4_14",
29
+ "with-extra-node": "_with-extra-node_1dgm4_21",
30
+ "size-small": "_size-small_1dgm4_25"
31
+ }, m = u.bind(V), Z = ({
32
+ footerNode: o,
33
+ closeHandler: n,
34
+ okButton: l,
35
+ cancelButton: r,
36
+ size: a
37
+ }) => /* @__PURE__ */ c("div", { className: m("modal-footer", { "with-extra-node": o, [`size-${a}`]: a }), children: [
38
+ o && o,
39
+ /* @__PURE__ */ c("div", { className: m("buttons-block"), children: [
40
+ r && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(
41
+ N,
42
+ {
43
+ variant: "ghost",
44
+ adjustWidthOn: a === "small" ? "parent" : "content",
45
+ onClick: n,
46
+ ...r
47
+ }
48
+ ) }),
49
+ l && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(N, { adjustWidthOn: a === "small" ? "parent" : "content", ...l }) })
50
+ ] })
51
+ ] }), ee = {
52
+ "modal-header": "_modal-header_68lru_1",
53
+ "width-description": "_width-description_68lru_10",
54
+ "modal-header-content": "_modal-header-content_68lru_14",
55
+ "modal-title": "_modal-title_68lru_20",
56
+ "close-modal-icon": "_close-modal-icon_68lru_29"
57
+ }, _ = u.bind(ee), te = ({ title: o, onClose: n, withDescription: l = !1 }) => /* @__PURE__ */ c("div", { className: _("modal-header", { "width-description": l }), children: [
58
+ /* @__PURE__ */ e("div", { className: _("modal-header-content"), children: o && /* @__PURE__ */ e("div", { className: _("modal-title"), children: o }) }),
59
+ /* @__PURE__ */ e(Y, { className: _("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(F, {}) })
60
+ ] }), oe = "_modal_f3ckb_1", ne = "_description_f3ckb_43", le = "_scrollable_f3ckb_53", ae = {
61
+ modal: oe,
62
+ "overlay-default": "_overlay-default_f3ckb_12",
63
+ "overlay-light-cyan": "_overlay-light-cyan_f3ckb_16",
64
+ "scrolling-content": "_scrolling-content_f3ckb_20",
65
+ "modal-window": "_modal-window_f3ckb_26",
66
+ description: ne,
67
+ scrollable: le,
68
+ "size-default": "_size-default_f3ckb_57",
69
+ "size-small": "_size-small_f3ckb_69",
70
+ "size-large": "_size-large_f3ckb_81"
71
+ }, h = u.bind(ae), se = 0.9, ie = 32 + 24, ce = 32 + 8, de = 36 + 16, re = 32 * 2, ye = ({
72
+ title: o,
73
+ children: n,
74
+ footerNode: l,
75
+ okButton: r,
76
+ cancelButton: a,
77
+ className: z,
78
+ size: f = "default",
79
+ onClose: A = () => {
80
+ },
81
+ overlay: p = "default",
82
+ zIndex: C = 2,
83
+ allowCloseOutside: D = !0,
84
+ scrollable: v = !1,
85
+ withoutFooter: y = !1,
86
+ createFooter: H = null,
87
+ description: s = null
88
+ }) => {
89
+ const [S, k] = b(!1), [T, I] = b(0), i = j(null), E = U(), x = E.height, L = x * se, w = (x - T) / 2, $ = () => {
90
+ let t = L - re;
91
+ return y || (t = t - de), s ? t = t - ce : t = t - ie, t;
92
+ }, d = () => {
93
+ k(!1);
94
+ }, M = (t) => {
95
+ const { keyCode: R } = t;
96
+ R === q.ESCAPE_KEY_CODE && d();
97
+ };
98
+ return g(() => {
99
+ if (i && i.current) {
100
+ const { clientHeight: t } = i.current;
101
+ I(t);
102
+ }
103
+ }, [n, E]), g(() => (k(!0), document.addEventListener("keydown", M, !1), () => document.removeEventListener("keydown", M, !1)), []), B(i, D ? d : void 0), /* @__PURE__ */ e(K, { onExitComplete: A, children: S && /* @__PURE__ */ e("div", { className: h("modal", { [`overlay-${p}`]: p }), style: { zIndex: C }, children: /* @__PURE__ */ c(
104
+ P.div,
105
+ {
106
+ className: h("modal-window", { [`size-${f}`]: f }, z),
107
+ ref: i,
108
+ tabIndex: 0,
109
+ initial: { opacity: 0, marginTop: -w },
110
+ animate: { opacity: 1, marginTop: w },
111
+ exit: { opacity: 0, marginTop: -w },
112
+ transition: { duration: 0.3 },
113
+ onAnimationStart: () => {
114
+ var t;
115
+ return (t = i.current) == null ? void 0 : t.focus();
116
+ },
117
+ children: [
118
+ /* @__PURE__ */ e(te, { title: o, onClose: d, withDescription: !!s }),
119
+ v ? /* @__PURE__ */ c(G, { autoHeight: !0, autoHeightMax: $(), hideTracksWhenNotNeeded: !0, children: [
120
+ s && /* @__PURE__ */ e("span", { className: h("description", { scrollable: v }), children: s }),
121
+ /* @__PURE__ */ e(O, { scrollable: !0, children: n })
122
+ ] }) : /* @__PURE__ */ c(W, { children: [
123
+ s && /* @__PURE__ */ e("span", { className: h("description"), children: s }),
124
+ /* @__PURE__ */ e(O, { children: n })
125
+ ] }),
126
+ !y && (H ? H(d) : /* @__PURE__ */ e(
127
+ Z,
128
+ {
129
+ size: f,
130
+ footerNode: l,
131
+ okButton: r,
132
+ cancelButton: a,
133
+ closeHandler: d
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
+ ye as Modal,
143
+ O as ModalContent,
144
+ Z as ModalFooter,
145
+ te as ModalHeader
16
146
  };